:root {
    --primary: #0BA3EF;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;

    --font-h1: 2rem;
    --font-h2: 1.7rem;
    --font-h3: 1.3rem;
    --font-h4: 1.2rem;
    --font-h5: 1.1rem;
    --font-h6: 1rem;
    --font-p: 1rem;
    --font-li: 1rem;
    --font-span: 1rem;
}

@media (max-width: 768px) {
    :root {
        --font-h1: 1.5rem;
        --font-h2: 1.3rem;
        --font-h3: 1.1rem;
        --font-h4: 0.7rem;
        --font-h5: 0.6rem;
        --font-h6: 0.5rem;
        --font-p: 0.5rem;
        --font-li: 0.5rem;
        --font-span: 0.5rem;
    }
}

h1 { font-size: var(--font-h1); }
h2 { font-size: var(--font-h2); }
h3 { font-size: var(--font-h3); }
h4 { font-size: var(--font-h4); }
h5 { font-size: var(--font-h5); }
h6 { font-size: var(--font-h6); }

p { font-size: var(--font-p); }

ul li,
ol li { 
    font-size: var(--font-li);
}

/* span {
    font-size: var(--font-span);
} */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    color: var(--dark);
    line-height: 1.6;
}

.cls-accept{
    background: #27ae60;
    color: white;
}
.cls-reject{
    background: #e74c3c;
    color: white;
}


.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    /* background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%); */
    background-color: #0BA1ED;
    color: white;
    padding: 20px 0;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    z-index: 100;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.sidebar-header h2 i {
    font-size: 1.8rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 3px solid var(--success);
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-light);
}

.header h1 {
    color: var(--primary);
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.stat-card:hover {
    /* transform: translateY(-5px); */
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.pending .stat-icon {
    background-color: rgba(248, 150, 30, 0.2);
    color: var(--warning);
}

.accepted .stat-icon {
    background-color: rgba(76, 201, 240, 0.2);
    color: var(--success);
}

.completed .stat-icon {
    background-color: rgba(67, 97, 238, 0.2);
    color: var(--primary);
}

.rejected .stat-icon {
    background-color: rgba(247, 37, 133, 0.2);
    color: var(--danger);
}

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #3aa8d0;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Filters */
.filters {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: anchor-center;
}
.filters input, .filters select{
    border: 1px solid #ccc!important;
    padding: 10px!important;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--gray);
}

select, input {
    padding: 8px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

/* Sessions Table */
.sessions-table-container {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.table-header {
    padding: 15px 20px;
    /* background-color: var(--light); */
    background-color: #fff;
    /* border-bottom: 1px solid var(--gray-light); */
    border-bottom: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.table-header h3 {
    color: var(--primary);
}

.table-actions {
    display: flex;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

th {
    background-color: var(--light);
    font-weight: 600;
    color: var(--gray);
    font-size: 0.9rem;
}

tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending {
    background-color: rgba(248, 150, 30, 0.2);
    color: var(--warning);
}

.status-accepted {
    background-color: rgba(76, 201, 240, 0.2);
    color: var(--success);
}

.status-completed {
    background-color: rgba(67, 97, 238, 0.2);
    color: var(--primary);
}

.status-rejected {
    background-color: rgba(247, 37, 133, 0.2);
    color: var(--danger);
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 0px;
    transition: var(--transition);
}

.btn-accept {
    background-color: var(--success);
    color: white;
}

.btn-reject {
    background-color: var(--danger);
    color: white;
}

.btn-join {
    background-color: var(--primary);
    color: white;
}

.btn-view {
    background-color: var(--info);
    color: white;
}

.action-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.pagination button {
    padding: 6px 8px;
    border: 1px solid var(--gray-light);
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.pagination button.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:hover:not(.active) {
    background-color: var(--gray-light);
}
.pagination .page-number{
    width: 40px;
    margin-left: 1px;
    margin-right: 1px;
}
/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    font-size: 14px;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.table-header button:hover, 
.table-header button:focus, 
.table-header button:active{
    border: 1px solid transparent!important;
}
.filters button:hover, 
.filters button:focus, 
.filters button:active{
    border: 1px solid transparent!important;
} 
.session-actions button:hover, 
.session-actions button:focus, 
.session-actions button:active{
    border: none!important;
}

/* Responsive */
@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
    }
    
    .sidebar-menu li {
        flex: 0 0 auto;
        margin-bottom: 0;
    }
    
    .sidebar-menu a {
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar-menu a:hover, .sidebar-menu a.active {
        border-left: none;
        border-bottom: 3px solid var(--success);
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-actions {
        flex-direction: column;
    }
    
    .filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}


/* Modal Form Styles */
.cls-therapist-dashboard .modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.cls-therapist-dashboard .form-group {
    margin-bottom: 20px;
}

.cls-therapist-dashboard .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.cls-therapist-dashboard .form-group input,
.cls-therapist-dashboard .form-group select,
.cls-therapist-dashboard .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background-color: white;
}

.cls-therapist-dashboard .form-group input:focus,
.cls-therapist-dashboard .form-group select:focus,
.cls-therapist-dashboard .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.cls-therapist-dashboard .form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Required field indicator */
.cls-therapist-dashboard .form-group.required label::after {
    content: " *";
    color: var(--danger);
}

/* Form validation styles */
.cls-therapist-dashboard .form-group.error input,
.cls-therapist-dashboard .form-group.error select,
.cls-therapist-dashboard .form-group.error textarea {
    border-color: var(--danger);
}

.cls-therapist-dashboard .error-message {
    color: var(--danger);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.cls-therapist-dashboard .form-group.error .error-message {
    display: block;
}

/* Loading state */
.cls-therapist-dashboard .btn-loading {
    position: relative;
    color: transparent !important;
}

.cls-therapist-dashboard .btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: button-loading 0.8s linear infinite;
}

@keyframes button-loading {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success message */
.cls-therapist-dashboard .success-message {
    background-color: rgba(76, 201, 240, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: none;
}

/* Modal responsive */
@media (max-width: 576px) {
    .cls-therapist-dashboard .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .cls-therapist-dashboard .modal-footer {
        flex-direction: column;
    }
    
    .cls-therapist-dashboard .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Modal Centering Fix */
.cls-therapist-dashboard .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cls-therapist-dashboard .modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 765px;
    max-height: 90vh;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.3s ease;
    margin: auto;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Ensure modal is centered */
.cls-therapist-dashboard .modal.show {
    display: flex !important;
}

/* Backdrop fix */
.cls-therapist-dashboard .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Session Details Styles */
.session-details {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-light);
}

.detail-section h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.9rem;
}

.detail-item span {
    color: var(--dark);
}

.session-logs {
    max-height: 200px;
    overflow-y: auto;
}

.logs-table {
    width: 100%;
    font-size: 0.85rem;
}

.logs-table th,
.logs-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.logs-table th {
    background-color: var(--light);
    font-weight: 600;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/** Therapist session list pagination */
/* Ensure table stays fixed height during loading */
.sessions-table tbody .loading-row td {
    padding: 0 !important;
}
.sessions-table tbody  td {
    font-size: 14px;
    font-weight: 400;
    color: #000;
}

.table-loader {
    height: 450px; /* FIXED HEIGHT → UI DOES NOT JUMP */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 20px;
}

.skeleton-line {
    height: 14px;
    width: 100%;
    background: #e2e2e2;
    border-radius: 4px;
    animation: skeleton-loading 1.2s infinite ease-in-out;
}

/* Skeleton animation */
@keyframes skeleton-loading {
    0% {
        background-color: #e4e4e4;
    }
    50% {
        background-color: #f0f0f0;
    }
    100% {
        background-color: #e4e4e4;
    }
}


/* Countdown CSS */
.cls-upcoming-session-timer-therapist {
    margin: 1.5rem 0;
    padding: 1.5rem;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: linear-gradient(135deg, #30B363 0%, #0CA4F0 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cls-upcoming-session-timer-therapist .cls-timer-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.cls-upcoming-session-timer-therapist .cls-timer-header h3 {
    margin: 0;
    color: white;
    font-size: 1.4rem;
}

.cls-upcoming-session-timer-therapist .cls-client-name {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.cls-upcoming-session-timer-therapist .cls-timer-container {
    text-align: center;
}

.cls-upcoming-session-timer-therapist .cls-timer-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.cls-upcoming-session-timer-therapist .cls-timer-unit {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 10px;
    min-width: 80px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.cls-upcoming-session-timer-therapist .cls-timer-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cls-upcoming-session-timer-therapist .cls-timer-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cls-upcoming-session-timer-therapist .cls-session-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.cls-upcoming-session-timer-therapist .cls-session-info p {
    margin: 0.5rem 0;
    color: rgba(255,255,255,0.9);
}

.cls-upcoming-session-timer-therapist .cls-reminder-sent {
    color: #4ade80;
    font-weight: 500;
}

.cls-upcoming-session-timer-therapist .cls-reminder-pending {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.cls-upcoming-session-timer-therapist .cls-reminder-sent i,
.cls-upcoming-session-timer-therapist .cls-reminder-pending i {
    margin-right: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .cls-upcoming-session-timer-therapist .cls-timer-display {
        gap: 0.5rem;
    }
    
    .cls-upcoming-session-timer-therapist .cls-timer-unit {
        min-width: 70px;
        padding: 0.75rem;
    }
    
    .cls-upcoming-session-timer-therapist .cls-timer-value {
        font-size: 1.5rem;
    }
    
    .cls-upcoming-session-timer-therapist .cls-timer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.cls-timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cls-timer-header h3 {
    margin: 0;
    color: white;
    font-size: 1.5em;
}

.cls-client-name {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.cls-timer-display {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.cls-timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cls-timer-value {
    /* font-size: 2.5em;
    font-weight: bold;
    background: rgba(255,255,255,0.15);
    padding: 10px;
    border-radius: 8px;
    min-width: 80px;
    margin-bottom: 5px; */
}

.cls-timer-label {
    font-size: 0.9em;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cls-reminder-sent {
    color: #28a745;
    font-weight: bold;
    padding: 8px 12px;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 4px;
}

.cls-reminder-info {
    padding: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}