* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.container-counseling {
    max-width: 1400px;
    margin: 0 100px;
    background: #2c3e50;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}



h1 {
    text-align: center;
    color: #F8FBFF;
    margin-bottom: 10px;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    user-select: none;
}

.accordion-toggle {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 15px solid #F8FBFF;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.accordion-toggle.active {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-content.active {
    max-height: 3000px;
    transition: max-height 0.6s ease-in;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 14px;
}

.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 5px;
}

.week-navigation button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.week-navigation button:hover {
    background: #2980b9;
}

.week-navigation button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.week-range {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 0px;
    padding: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.legend-dot.available {
    background: transparent;
    border: 3px solid #3498db;
}

.legend-dot.booked {
    background: #e74c3c;
    color: white;
}

.booking-table-wrapper {
    position: relative;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.booking-table {
    flex: 1;
    max-height: 600px;
    border: 2px solid #ddd;
    border-radius: 5px;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.booking-table table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
}

.scroll-indicator {
    color: #7f8c8d;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.8;
}

.scroll-indicator.show {
    display: flex;
}

.scroll-indicator.vertical {
    flex-direction: column;
    align-self: stretch;
    justify-content: center;
    line-height: 1.2;
}

.scroll-indicator.horizontal {
    margin-top: 10px;
}

.booking-table th,
.booking-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: center;
    min-width: 120px;
}

.booking-table th.time-header,
.time-cell {
    min-width: 80px;
}

.booking-table th {
    background: #34495e;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 15;
}

.booking-table th.time-header {
    background: #2c3e50;
    width: 100px;
    position: sticky;
    left: 0;
    top: 0;
    z-index: 25;
}

.time-cell {
    background: #ecf0f1;
    font-weight: bold;
    color: #2c3e50;
    position: sticky;
    left: 0;
    z-index: 10;
}

.holiday-cell {
    background: #bdc3c7;
}

.date-header.holiday {
    background: #95a5a6;
}

.slot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: bold;
}

.slot.available {
    background: transparent;
    border: 3px solid #3498db;
}

.slot.available:hover {
    background: #3498db;
    transform: scale(1.1);
}

.slot.booked {
    background: #e74c3c;
    color: white;
    cursor: not-allowed;
}

td.disabled-cell {
    background: #bdc3c7;
}

td.disabled-cell .slot {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #000;
}

.modal h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.modal-datetime {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: bold;
}

.required-mark {
    color: #e74c3c;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel {
    background: #95a5a6;
    color: white;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.btn-submit {
    background: #27ae60;
    color: white;
}

.btn-submit:hover {
    background: #229954;
}

.btn-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.success-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #27ae60;
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    text-align: center;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 4000;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .container-counseling {
    margin: 0 10px;
    padding: 10px;
    }
    .container { padding: 15px; }
    h1 { font-size: 22px; }
    .week-navigation {
        flex-wrap: wrap;
        gap: 10px;
    }
    .week-navigation .week-range {
        width: 100%;
        order: -1;
        text-align: center;
        font-size: 16px;
    }
    .week-navigation button {
        padding: 8px 16px;
        font-size: 14px;
    }
    .booking-table { max-height: 500px; }
    .booking-table table { min-width: 600px; }
    .booking-table th,
    .booking-table td {
        min-width: 80px;
        padding: 10px 4px;
        font-size: 13px;
    }
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
}
