/* =========================================================
   1) ROOT VARIABLES
========================================================= */
:root{
    --primary:#1f3b82;
    --primary-dark:#132c68;
    --primary-soft:#eaf1ff;

    --secondary:#2f6df6;
    --secondary-light:#7aa2ff;

    --gold:#d7a94b;
    --gold-dark:#b8872d;
    --gold-soft:#f6ecd1;

    --success:#16a34a;
    --success-soft:#ecfdf5;

    --warning:#d97706;
    --warning-soft:#fff7ed;

    --danger:#dc2626;
    --danger-soft:#fef2f2;

    --text-dark:#172033;
    --text-muted:#667085;

    --white:#ffffff;
    --card-border:#e7edf7;
    --table-head:#f6f9ff;
    --body-bg:#f6f7fb;
}

/* =========================================================
   2) RESET & BASE
========================================================= */
*{
    box-sizing:border-box;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    margin:0;
    padding:22px;
    direction:rtl;
    color:var(--text-dark);
    background:
        radial-gradient(circle at top right, rgba(31,59,130,0.08), transparent 28%),
        radial-gradient(circle at bottom left, rgba(215,169,75,0.08), transparent 24%),
        linear-gradient(135deg, #fbfbfd, #eef3f9);
}

a{
    text-decoration:none;
    transition:0.2s ease;
}

h2{
    margin:0;
    font-size:26px;
    color:var(--text-dark);
}

label{
    display:block;
    margin-bottom:8px;
    font-weight:700;
    color:#1e293b;
}

.section-subtitle{
    margin-top:6px;
    color:var(--text-muted);
    font-size:14px;
}

/* =========================================================
   3) MAIN LAYOUT
========================================================= */
.layout{
    display:flex;
    align-items:flex-start;
    min-height:100vh;
    gap:20px;
}

.content{
    flex:1;
    min-width:0;
}

.page-wrapper{
    max-width:1400px;
    margin:0 auto;
}
/* =========================================================
   4) SIDEBAR
========================================================= */
.sidebar{
    width:260px;
    flex-shrink:0;
    align-self:flex-start;
    position:relative;
    overflow:hidden;
    padding:26px 18px;
    border-radius:26px;
    color:#fff;
    background:linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow:0 18px 40px rgba(15,23,42,0.18);
    display:flex;
    flex-direction:column;
}

@media (min-width:1024px){
    .sidebar{
        position:sticky;
        top:20px;
        max-height:calc(100vh - 40px);
        overflow-y:auto;
    }
}

.sidebar::before{
    content:"";
    position:absolute;
    top:-60px;
    left:-50px;
    width:160px;
    height:160px;
    border-radius:50%;
    background:rgba(255,255,255,0.06);
}

.sidebar::after{
    content:"";
    position:absolute;
    bottom:-70px;
    right:-60px;
    width:180px;
    height:180px;
    border-radius:50%;
    background:rgba(215,169,75,0.10);
}

.sidebar-title{
    display:none;
}

.sidebar-brand{
    position:relative;
    z-index:1;
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:34px;
    padding-bottom:18px;
    border-bottom:1px solid rgba(255,255,255,0.12);
}

.brand-badge{
    width:48px;
    height:48px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    font-weight:800;
    letter-spacing:1px;
    color:#fff;
    background:linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
    border:1px solid rgba(255,255,255,0.12);
}

.brand-text{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.brand-text strong{
    font-size:18px;
    color:#fff;
}

.brand-text span{
    font-size:13px;
    color:rgba(255,255,255,0.72);
}

.sidebar-user{
    position:relative;
    z-index:1;
    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.08);
    border-radius:16px;
    padding:14px;
    margin-bottom:18px;
}

.sidebar-user-name{
    font-weight:800;
    color:#fff;
    margin-bottom:4px;
}

.sidebar-user-username{
    font-size:13px;
    color:rgba(255,255,255,0.70);
}

.sidebar-menu{
    position:relative;
    z-index:1;
    display:flex;
    flex-direction:column;
    gap:10px;
    flex:1;
    min-height:0;
    overflow-y:auto;
    padding-left:2px;
    padding-right:2px;
}

.menu-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:14px;
    border-radius:14px;
    color:#fff;
    font-weight:700;
    text-decoration:none;
    transition:all .18s ease;
}

.menu-item:hover{
    background:rgba(255,255,255,0.10);
    transform:translateX(-2px);
}

.menu-item.active{
    color:#fff8e8;
    border-right:4px solid var(--gold);
    background:linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
    box-shadow:inset 0 0 0 1px rgba(255,255,255,0.10);
}

.menu-icon{
    width:22px;
    text-align:center;
    flex-shrink:0;
}

.logout-item{
    margin-top:auto;
    background:rgba(255,255,255,0.06);
}

.sidebar-menu::-webkit-scrollbar{
    width:6px;
}

.sidebar-menu::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,0.22);
    border-radius:20px;
}

.sidebar-menu::-webkit-scrollbar-track{
    background:transparent;
}
/* =========================================================
   5) TOPBAR
========================================================= */
.topbar{
    position:relative;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:24px;
    padding:22px 24px;
    border-radius:24px;
    border:1px solid rgba(255,255,255,0.78);
    background:linear-gradient(135deg, rgba(255,255,255,0.94), rgba(248,250,255,0.92));
    box-shadow:0 14px 28px rgba(15,23,42,0.07);
}

.topbar::after{
    content:"";
    position:absolute;
    top:0;
    left:0;
    width:220px;
    height:100%;
    background:linear-gradient(90deg, rgba(215,169,75,0.12), transparent);
    pointer-events:none;
}

.topbar-text{
    position:relative;
    z-index:1;
}

.topbar-text h1{
    margin:0 0 6px;
    font-size:38px;
    font-weight:800;
    color:var(--primary);
    letter-spacing:0.2px;
}

.topbar-text p{
    margin:0;
    color:var(--text-muted);
    font-size:15px;
}

.topbar-badge{
    position:relative;
    z-index:1;
    white-space:nowrap;
    padding:10px 16px;
    border-radius:999px;
    font-weight:800;
    color:#9a6b14;
    border:1px solid #ead8a8;
    background:linear-gradient(135deg, #fff8e8, #f8ecd0);
    box-shadow:0 4px 12px rgba(215,169,75,0.12);
}

/* =========================================================
   6) SECTION CARDS
========================================================= */
.section-card{
    margin-bottom:24px;
    padding:20px;
    border-radius:24px;
    border:1px solid rgba(255,255,255,0.80);
    background:rgba(255,255,255,0.88);
    box-shadow:0 14px 28px rgba(15,23,42,0.06);
}

.section-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:16px;
}

/* =========================================================
   7) DASHBOARD CARDS
========================================================= */
.dashboard{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
    gap:18px;
    margin-bottom:24px;
}

.card{
    position:relative;
    overflow:hidden;
    min-height:150px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    padding:22px 20px;
    border-radius:24px;
    color:#fff;
    box-shadow:0 16px 30px rgba(15,23,42,0.12);
    transition:0.25s ease;
}

.card:hover{
    transform:translateY(-6px) scale(1.01);
    box-shadow:0 24px 45px rgba(15,23,42,0.18);
}

.card::after{
    content:"";
    position:absolute;
    left:-20px;
    bottom:-20px;
    width:90px;
    height:90px;
    border-radius:50%;
    background:rgba(255,255,255,0.10);
}

.card-top{
    position:relative;
    z-index:1;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.card-bottom{
    position:relative;
    z-index:1;
}

.card-icon{
    width:48px;
    height:48px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    background:rgba(255,255,255,0.16);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,0.08);
}

.card-label{
    font-size:15px;
    font-weight:700;
    opacity:0.96;
    line-height:1.5;
}

.card-number{
    margin-bottom:8px;
    font-size:42px;
    font-weight:900;
    line-height:1;
    letter-spacing:0.5px;
}

.card-line{
    width:44px;
    height:4px;
    border-radius:999px;
    background:rgba(255,255,255,0.35);
}

.card-blue{
    background:linear-gradient(135deg,#1f3b82,#3f66d0);
}

.card-purple{
    background:linear-gradient(135deg,#e3c04c,#f0c63e);
}

.card-teal{
    background:linear-gradient(135deg,#0f766e,#2dd4bf);
}

.card-red{
    background:linear-gradient(135deg,#dc2626,#f87171);
}

.card-green{
    background:linear-gradient(135deg,#6b4de6,#9a7cff);
}

/* =========================================================
   8) BUTTONS
========================================================= */
.button-link,
button,
input[type="submit"]{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:11px 16px;
    border:none;
    border-radius:14px;
    cursor:pointer;
    font-size:14px;
    font-weight:800;
    color:#fff;
    background:linear-gradient(135deg, var(--secondary), var(--secondary-light));
    box-shadow:0 10px 20px rgba(47,109,246,0.18);
}

.button-link:hover,
button:hover,
input[type="submit"]:hover{
    transform:translateY(-1px);
    opacity:0.97;
}

.button-link.secondary{
    background:linear-gradient(135deg, #0f9f75, #34d399);
}

.button-link.gray{
    background:linear-gradient(135deg, #738399, #98a6b8);
}

.button-link.danger{
    background:linear-gradient(135deg, #dc2626, #f87171);
}

.header-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

/* =========================================================
   9) FORMS
========================================================= */
form{
    margin-bottom:24px;
    padding:22px;
    border-radius:24px;
    border:1px solid rgba(255,255,255,0.80);
    background:rgba(255,255,255,0.88);
    box-shadow:0 14px 28px rgba(15,23,42,0.06);
}

input,
select,
textarea{
    width:100%;
    margin-top:6px;
    margin-bottom:16px;
    padding:12px 14px;
    border:1px solid #dbe4f0;
    border-radius:14px;
    outline:none;
    font-size:15px;
    color:var(--text-dark);
    background:#fbfcff;
    transition:0.2s ease;
}

input:focus,
select:focus,
textarea:focus{
    border-color:var(--secondary-light);
    background:#fff;
    box-shadow:0 0 0 4px rgba(47,109,246,0.10);
}

textarea{
    min-height:120px;
    resize:vertical;
}

.form-section{
    margin-bottom:18px;
    padding:18px;
    border:1px solid #eef2f7;
    border-radius:18px;
    background:#fcfdff;
}

.form-section-title{
    margin:0 0 14px;
    font-size:18px;
    font-weight:800;
    color:var(--primary);
}

/* =========================================================
   10) FILTERS SECTION
========================================================= */
.filters-card{
    position:relative;
    z-index:50;
    overflow:visible !important;
}

.filters-card::before{
    content:"";
    position:absolute;
    top:-40px;
    left:-40px;
    width:160px;
    height:160px;
    border-radius:50%;
    background:rgba(31,59,130,0.04);
    pointer-events:none;
}

.filter-form{
    position:relative;
    z-index:60;
    margin:0;
    padding:0;
    border:none;
    background:transparent;
    box-shadow:none;
    overflow:visible !important;
}

.filter-grid{
    display:grid;
    grid-template-columns:2.2fr 1fr 1fr;
    gap:16px;
    margin-bottom:16px;
}

.filter-field{
    display:flex;
    flex-direction:column;
}

.filter-field label{
    margin-bottom:8px;
    font-size:13px;
    font-weight:800;
    color:var(--primary);
}

.filter-search{
    grid-column:auto;
}

.filter-field input,
.filter-field select{
    margin-bottom:0;
    height:50px;
    background:#ffffff;
    border:1px solid #dce6f4;
    box-shadow:0 4px 10px rgba(15,23,42,0.02);
}

.filter-field input::placeholder{
    color:#94a3b8;
}

.filter-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.filter-actions button,
.filter-actions .button-link{
    min-width:130px;
}

/* =========================================================
   11) SEARCH DROPDOWN
========================================================= */
.student-search-box{
    position:relative;
    z-index:70;
    width:100%;
}

.student-results{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    left:0;
    z-index:9999;
    display:none;
    max-height:340px;
    overflow-y:auto;
    padding:8px;
    background:#ffffff;
    border:1px solid #dde6f2;
    border-radius:18px;
    box-shadow:0 18px 35px rgba(15,23,42,0.10);
}

.student-result-item{
    margin-bottom:6px;
    padding:12px 14px;
    border:1px solid transparent;
    border-radius:14px;
    cursor:pointer;
    background:linear-gradient(135deg, #ffffff, #fbfcff);
    transition:0.2s ease;
}

.student-result-item:last-child{
    margin-bottom:0;
}

.student-result-item:hover{
    background:#ebf4ff;
    border-color:#dbe7fb;
    transform:translateY(-1px);
}

.student-result-main{
    font-size:14px;
    font-weight:800;
    line-height:1.5;
    color:#1f3b82;
}

/* =========================================================
   12) STUDENTS SECTION
========================================================= */
.students-section{
    position:relative;
    z-index:1;
    overflow:hidden;
}

.students-section::before{
    content:"";
    position:absolute;
    bottom:-40px;
    left:-40px;
    width:170px;
    height:170px;
    border-radius:50%;
    background:rgba(215,169,75,0.06);
    pointer-events:none;
}

.students-section .section-header,
.students-section .table-wrap,
.pagination{
    position:relative;
    z-index:1;
}

.students-meta{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.students-chip{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:8px 12px;
    border:1px solid #dbe6fb;
    border-radius:999px;
    font-size:13px;
    font-weight:800;
    color:var(--primary);
    background:#f4f7ff;
}

/* =========================================================
   13) TABLES
========================================================= */
.table-wrap{
    overflow:auto;
    border:1px solid #eef2f7;
    border-radius:20px;
    background:#fff;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,0.3);
}

.students-section .table-wrap{
    border-radius:22px;
    border:1px solid #e7edf7;
    box-shadow:0 14px 30px rgba(15,23,42,0.05);
}

table{
    width:100%;
    min-width:980px;
    border-collapse:collapse;
}

.students-section table{
    min-width:1100px;
}

th{
    padding:15px 12px;
    border-bottom:1px solid #e6edf5;
    text-align:center;
    white-space:nowrap;
    font-size:14px;
    font-weight:900;
    color:var(--primary);
    background:linear-gradient(135deg, #f8faff, #eef4ff);
}

td{
    padding:14px 12px;
    border-bottom:1px solid #edf2f7;
    text-align:center;
    white-space:nowrap;
    font-size:14px;
    color:#334155;
}

tr:hover td{
    background:#fbfdff;
}

.empty-state{
    padding:26px;
    text-align:center;
    border:1px dashed #d7dfeb;
    border-radius:18px;
    color:var(--text-muted);
    background:#fff;
}

.empty-inline{
    padding:24px 10px;
    color:#64748b;
    font-weight:700;
}

/* =========================================================
   14) STUDENT TABLE CELLS
========================================================= */
.student-name{
    font-weight:800;
    color:var(--primary);
}

.student-code{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:6px 10px;
    border:1px solid #dce7fb;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    color:#2c5bd9;
    background:#eef4ff;
}

.student-country{
    color:#475569;
    font-weight:700;
}

.student-phone{
    direction:ltr;
    display:inline-block;
    color:#1f2937;
    font-weight:700;
}

.session-date{
    color:#334155;
    font-weight:700;
}

.next-session-date{
    color:#1f3b82;
    font-weight:800;
}

/* =========================================================
   15) PACKAGE BADGES
========================================================= */
.package-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:72px;
    padding:7px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
}

.package-cell-none{
    background:#f8fafc;
    color:#64748b;
    border:1px solid #e2e8f0;
}

.package-cell-good{
    background:#ecfdf5;
    color:#047857;
    border:1px solid #a7f3d0;
}

.package-cell-low{
    background:#fff7ed;
    color:#c2410c;
    border:1px solid #fdba74;
}

.package-cell-ended{
    background:#fef2f2;
    color:#b91c1c;
    border:1px solid #fecaca;
}

/* =========================================================
   16) TABLE ACTION BUTTONS
========================================================= */
.table-actions{
    display:flex;
    justify-content:center;
    gap:6px;
    flex-wrap:wrap;
    white-space:normal;
}

.table-actions a{
    margin:0;
    padding:8px 10px;
    border-radius:12px;
    font-size:12px;
    font-weight:800;
    transition:all 0.22s ease;
    position:relative;
}

.table-actions a:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 18px rgba(15,23,42,0.10);
}

.table-actions a:active{
    transform:translateY(0);
}

.table-actions .action-view{
    background:#eff6ff;
    color:#2563eb;
}

.table-actions .action-view:hover{
    background:#dbeafe;
}

.table-actions .action-edit{
    background:#ecfeff;
    color:#0891b2;
}

.table-actions .action-edit:hover{
    background:#cffafe;
}

.table-actions .action-session{
    background:#fff7ed;
    color:#ea580c;
}

.table-actions .action-session:hover{
    background:#ffedd5;
}

.table-actions .action-package{
    background:#eefbf5;
    color:#16a34a;
}

.table-actions .action-package:hover{
    background:#dcfce7;
}

.table-actions .action-delete{
    background:#fef2f2;
    color:#dc2626;
}

.table-actions .action-delete:hover{
    background:#fee2e2;
}

/* =========================================================
   17) PAGINATION
========================================================= */
.pagination{
    display:flex;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
    margin-top:22px;
}

.page-link{
    min-width:44px;
    height:44px;
    padding:0 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #dde6f2;
    border-radius:14px;
    font-weight:800;
    color:#334155;
    background:#ffffff;
    box-shadow:0 6px 12px rgba(15,23,42,0.03);
}

.page-link:hover{
    background:#eef4ff;
    color:var(--primary);
}

.active-page{
    color:#fff !important;
    border-color:transparent !important;
    background:linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    box-shadow:0 12px 20px rgba(47,109,246,0.18);
}

/* =========================================================
   18) PROFILE / STUDENT CARDS
========================================================= */
.profile-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:14px;
    margin-bottom:24px;
}

.profile-item{
    position:relative;
    overflow:hidden;
    padding:16px;
    border:1px solid #e8eef7;
    border-radius:18px;
    font-size:15px;
    font-weight:600;
    color:#334155;
    background:linear-gradient(135deg, #ffffff, #fbfcff);
    box-shadow:0 8px 18px rgba(15,23,42,0.05);
    transition:0.2s ease;
}

.profile-item::before{
    content:"";
    position:absolute;
    top:0;
    right:0;
    width:6px;
    height:100%;
    border-radius:0 18px 18px 0;
}

.profile-item:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 22px rgba(15,23,42,0.08);
}

.profile-item strong{
    display:block;
    margin-bottom:8px;
    font-size:14px;
    font-weight:800;
    color:var(--primary);
}

.profile-grid .profile-item:nth-child(4n+1)::before{
    background:linear-gradient(180deg, var(--primary), var(--secondary-light));
}

.profile-grid .profile-item:nth-child(4n+2)::before{
    background:linear-gradient(180deg, #0f9f75, #34d399);
}

.profile-grid .profile-item:nth-child(4n+3)::before{
    background:linear-gradient(180deg, #d97706, #f4b740);
}

.profile-grid .profile-item:nth-child(4n+4)::before{
    background:linear-gradient(180deg, #5a66db, #9aa8ff);
}

.note-box{
    padding:16px;
    line-height:1.8;
    color:#334155;
    background:#fbfcff;
    border:1px solid #e4eaf5;
    border-radius:16px;
}

/* =========================================================
   19) STUDENT PROFILE TABS
========================================================= */
.student-tabs{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:20px;
}

.student-tab{
    border:none;
    cursor:pointer;
    padding:12px 18px;
    border-radius:14px;
    font-weight:800;
    color:#334155;
    background:#f1f5f9;
    transition:0.2s ease;
}

.student-tab:hover{
    background:#e2e8f0;
}

.student-tab.active{
    color:#fff;
    background:#2563eb;
    box-shadow:0 10px 20px rgba(37,99,235,0.18);
}

.tab-content{
    display:none;
}

.tab-content.active{
    display:block;
}

/* =========================================================
   20) PACKAGE STATUS / PROGRESS
========================================================= */
.package-status{
    display:inline-block;
    padding:6px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
}

.package-good{
    background:var(--success-soft);
    color:#059669;
}

.package-warning{
    background:var(--warning-soft);
    color:var(--warning);
}

.package-danger{
    background:#f5f3ff;
    color:#7c3aed;
}

.package-progress{
    width:100%;
    height:8px;
    margin-top:6px;
    overflow:hidden;
    border-radius:6px;
    background:#e5e7eb;
}

.package-progress-bar{
    height:100%;
    background:linear-gradient(90deg, #c8922d, #e1bb67);
}

/* =========================================================
   21) TODAY SESSIONS
========================================================= */
.today-section{
    position:relative;
    overflow:hidden;
}

.today-section::after{
    content:"";
    position:absolute;
    top:-30px;
    left:-30px;
    width:140px;
    height:140px;
    border-radius:50%;
    background:rgba(47,109,246,0.05);
    pointer-events:none;
}

.today-counter{
    white-space:nowrap;
    padding:10px 14px;
    border-radius:14px;
    font-weight:800;
    color:var(--primary);
    border:1px solid #dce7fb;
    background:linear-gradient(135deg, var(--primary-soft), #f8fbff);
}

.today-sessions-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
    gap:16px;
}

.today-session-card{
    position:relative;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    padding:18px;
    border:1px solid #e6edf8;
    border-radius:20px;
    background:linear-gradient(135deg, #ffffff, #f8fbff);
    box-shadow:0 10px 22px rgba(15,23,42,0.05);
    transition:0.25s ease;
}

.today-session-card:hover{
    transform:translateY(-4px);
    box-shadow:0 16px 30px rgba(15,23,42,0.10);
}

.today-session-card::before{
    content:"";
    position:absolute;
    top:0;
    right:0;
    width:6px;
    height:100%;
    border-radius:0 20px 20px 0;
}

/* Morning */
.today-session-card.time-morning::before{
    background:linear-gradient(180deg, #2563eb, #60a5fa);
}

/* Afternoon */
.today-session-card.time-afternoon::before{
    background:linear-gradient(180deg, #d97706, #f4b740);
}

/* Evening */
.today-session-card.time-evening::before{
    background:linear-gradient(180deg, #6d28d9, #a78bfa);
}

.today-session-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
}

.today-session-name-link{
    text-decoration:none;
    display:inline-flex;
    align-items:center;
}

.today-session-name{
    display:inline-flex;
    align-items:center;
    padding:8px 14px;
    border:1px solid transparent;
    border-radius:12px;
    font-size:14px;
    font-weight:800;
    box-shadow:0 4px 10px rgba(15,23,42,0.05);
    transition:0.2s ease;
}

.today-session-name::before{
    content:"ðŸ‘¤";
    margin-left:6px;
    font-size:13px;
}

.today-session-name-link:hover .today-session-name{
    transform:translateY(-2px) scale(1.02);
    box-shadow:0 10px 18px rgba(15,23,42,0.10);
    filter:brightness(1.01);
}

/* Name color by time */
.today-session-card.time-morning .today-session-name{
    color:#1d4ed8;
    background:linear-gradient(135deg,#eff6ff,#dbeafe);
    border-color:#bfdbfe;
}

.today-session-card.time-afternoon .today-session-name{
    color:#b45309;
    background:linear-gradient(135deg,#fff7ed,#ffedd5);
    border-color:#fed7aa;
}

.today-session-card.time-evening .today-session-name{
    color:#7c3aed;
    background:linear-gradient(135deg,#f5f3ff,#ede9fe);
    border-color:#d8b4fe;
}

.today-session-time{
    font-weight:900;
    letter-spacing:0.3px;
}

/* Time color by time */
.today-session-card.time-morning .today-session-time{
    color:#2563eb;
}

.today-session-card.time-afternoon .today-session-time{
    color:#c2410c;
}

.today-session-card.time-evening .today-session-time{
    color:#7c3aed;
}

.today-session-list{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.today-session-row{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:14px;
    font-weight:600;
    color:#475569;
}

.today-session-icon{
    width:34px;
    height:34px;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    font-size:15px;
    color:var(--secondary);
    background:#eff6ff;
}

.today-session-mini-action{
    position:absolute;
    left:12px;
    bottom:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:5px 10px;
    border:1px solid transparent;
    border-radius:8px;
    font-size:11px;
    font-weight:800;
    text-decoration:none;
    transition:0.2s ease;
}

.today-session-mini-action:hover{
    transform:translateY(-1px);
    box-shadow:0 4px 10px rgba(0,0,0,0.08);
}

/* Mini action color by time */
.today-session-card.time-morning .today-session-mini-action{
    background:#eff6ff;
    color:#2563eb;
    border-color:#dbeafe;
}

.today-session-card.time-afternoon .today-session-mini-action{
    background:#fff7ed;
    color:#c2410c;
    border-color:#fed7aa;
}

.today-session-card.time-evening .today-session-mini-action{
    background:#f5f3ff;
    color:#7c3aed;
    border-color:#ddd6fe;
}

.today-empty{
    padding:28px;
    text-align:center;
    border:1px dashed #d6dfec;
    border-radius:18px;
    color:var(--text-muted);
    background:linear-gradient(135deg,#ffffff,#fbfcff);
}

.week-tabs{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

.week-tab{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-width:92px;
    padding:10px 14px;
    border-radius:16px;
    border:1px solid #dce6f4;
    background:#ffffff;
    color:#334155;
    text-decoration:none;
    box-shadow:0 6px 14px rgba(15,23,42,0.04);
    transition:0.2s ease;
}

.week-tab:hover{
    transform:translateY(-1px);
    background:#f8fbff;
    border-color:#cfe0fb;
}

.week-tab.active{
    background:linear-gradient(135deg, #eff6ff, #dbeafe);
    color:#1d4ed8;
    border-color:#bfdbfe;
    box-shadow:0 10px 20px rgba(37,99,235,0.12);
}

.week-tab-label{
    font-size:13px;
    font-weight:800;
    margin-bottom:4px;
}

.week-tab-date{
    font-size:12px;
    font-weight:700;
    opacity:0.8;
}

/* =========================================================
   22) TOAST NOTIFICATIONS
========================================================= */
.toast{
    position:fixed;
    top:24px;
    left:24px;
    z-index:99999;
    min-width:280px;
    max-width:420px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px 16px;
    border:1px solid transparent;
    border-radius:18px;
    backdrop-filter:blur(8px);
    box-shadow:0 18px 35px rgba(15,23,42,0.16);
    animation:toastSlideIn 0.35s ease;
}

.toast-success{
    color:#065f46;
    background:rgba(236,253,245,0.96);
    border-color:#a7f3d0;
}

.toast-error{
    color:#991b1b;
    background:rgba(254,242,242,0.96);
    border-color:#fecaca;
}

.toast-info{
    color:#1e3a8a;
    background:rgba(239,246,255,0.96);
    border-color:#bfdbfe;
}

.toast-icon{
    width:32px;
    height:32px;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    font-weight:900;
    background:rgba(255,255,255,0.7);
}

.toast-content{
    flex:1;
    font-size:14px;
    font-weight:800;
    line-height:1.6;
}

.toast-close{
    padding:0;
    border:none;
    background:transparent;
    color:inherit;
    font-size:22px;
    line-height:1;
    cursor:pointer;
    box-shadow:none;
}

.toast-hide{
    opacity:0;
    transform:translateY(-10px);
    transition:all 0.3s ease;
}

@keyframes toastSlideIn{
    from{
        opacity:0;
        transform:translateY(-12px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* =========================================================
   23) DELETE MODAL
========================================================= */
.modal-overlay{
    position:fixed;
    inset:0;
    z-index:99998;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(15,23,42,0.45);
}

.modal-overlay.show{
    display:flex;
}

.modal-box{
    width:100%;
    max-width:420px;
    padding:28px 24px;
    border-radius:24px;
    text-align:center;
    background:#fff;
    box-shadow:0 24px 50px rgba(15,23,42,0.22);
    animation:modalPop 0.25s ease;
}

.modal-icon{
    width:64px;
    height:64px;
    margin:0 auto 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:20px;
    font-size:28px;
    background:linear-gradient(135deg, #fff7ed, #ffedd5);
}

.modal-box h3{
    margin:0 0 8px;
    font-size:24px;
    font-weight:900;
    color:#0f172a;
}

.modal-box p{
    margin:0 0 20px;
    line-height:1.8;
    font-weight:600;
    color:#64748b;
}

.modal-actions{
    display:flex;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
}

@keyframes modalPop{
    from{
        opacity:0;
        transform:scale(0.96);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}

/* =========================================================
   24) LOGIN PAGE
========================================================= */
.login-body{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:
        radial-gradient(circle at top right, rgba(31,59,130,0.12), transparent 28%),
        radial-gradient(circle at bottom left, rgba(215,169,75,0.10), transparent 24%),
        linear-gradient(135deg, #f7f9fc, #eef3f9);
}

.login-page{
    width:100%;
    max-width:440px;
    padding:20px;
}

.login-card{
    padding:32px 28px;
    border-radius:28px;
    border:1px solid rgba(255,255,255,0.85);
    background:rgba(255,255,255,0.94);
    box-shadow:0 20px 40px rgba(15,23,42,0.10);
}

.login-brand{
    text-align:center;
    margin-bottom:24px;
}

.login-logo{
    width:68px;
    height:68px;
    margin:0 auto 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:20px;
    font-size:24px;
    font-weight:900;
    color:#fff;
    background:linear-gradient(135deg, var(--primary), var(--secondary-light));
    box-shadow:0 12px 24px rgba(31,59,130,0.20);
}

.login-brand h1{
    margin:0 0 6px;
    font-size:32px;
    color:var(--primary);
}

.login-brand p{
    margin:0;
    color:var(--text-muted);
}

.login-form{
    margin:0;
    padding:0;
    border:none;
    background:transparent;
    box-shadow:none;
}

.login-error{
    margin-bottom:18px;
    padding:12px 14px;
    border:1px solid #fecaca;
    border-radius:14px;
    text-align:center;
    font-weight:700;
    color:#b91c1c;
    background:var(--danger-soft);
}

.login-success{
    margin-bottom:18px;
    padding:12px 14px;
    border:1px solid #a7f3d0;
    border-radius:14px;
    text-align:center;
    font-weight:700;
    color:#047857;
    background:var(--success-soft);
}

.login-footer-link{
    margin-top:18px;
    text-align:center;
}

.login-footer-link a{
    color:var(--secondary);
    font-weight:700;
}

/* =========================================================
   25) RESPONSIVE
========================================================= */
@media (max-width:1100px){
    .filter-grid{
        grid-template-columns:1fr 1fr;
    }

    .filter-search{
        grid-column:1 / -1;
    }
}

@media (max-width:900px){
    body{
        padding:16px;
    }

    .layout{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
    }

    .topbar{
        flex-direction:column;
        align-items:flex-start;
    }

    .dashboard{
        grid-template-columns:1fr 1fr;
    }

    .filter-grid{
        grid-template-columns:1fr;
    }

    .section-header{
        flex-direction:column;
        align-items:flex-start;
    }
}

@media (max-width:760px){
    .students-meta{
        width:100%;
    }

    .header-actions{
        width:100%;
    }
}

@media (max-width:560px){
    .dashboard{
        grid-template-columns:1fr;
    }

    .topbar-text h1{
        font-size:30px;
    }

    .today-session-top{
        flex-direction:column;
        align-items:flex-start;
    }

    .toast{
        top:16px;
        left:16px;
        right:16px;
        min-width:auto;
        max-width:none;
    }

    .modal-actions{
        flex-direction:column;
    }

    .modal-actions .button-link{
        width:100%;
    }
}

.today-session-name::before{
content:"👤";
margin-left:8px;
font-size:16px;
display:inline-flex;
align-items:center;
}

.today-session-card{
padding-bottom:35px;
}

.session-status{
padding:3px 8px;
border-radius:6px;
font-size:12px;
font-weight:600;
}

/* approved */
.session-status.approved{
background:#e6f7ee;
color:#16a34a;
}

/* pending */
.session-status.pending{
background:#fff8db;
color:#b45309;
}

/* canceled */
.session-status.canceled{
background:#ffeaea;
color:#dc2626;
}

/* rejected */
.session-status.rejected{
background:#ffeaea;
color:#dc2626;
}

.today-session-card{
    position: relative;
    padding-bottom: 60px;
}

.today-session-zoom-action{
    position: absolute;
    right: 16px;
    bottom: 13px;

    font-size: 10px;
    font-weight: 600;

    padding: 5px 12px;
    border-radius: 8px;

    background: rgba(59,130,246,0.12);
    color: #2563eb;

    text-decoration: none;
    border: 1px solid rgba(59,130,246,0.25);

    backdrop-filter: blur(2px);

    transition: all 0.15s ease;
}

.today-session-zoom-action:hover{
    background: rgba(59,130,246,0.22);
    border-color: rgba(59,130,246,0.40);
    transform: translateY(-1px);
}

.day-picker-form{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.day-picker-label{
    font-weight:600;
    font-size:13px;
    color:#4b5563;
}

.day-picker-input{
    height:38px;
    padding:0 12px;
    border-radius:12px;
    border:1px solid #cbd5e1;
    background:#eef6ff;
    color:#1e3a5f;
    font-size:13px;
    font-family:inherit;
    outline:none;
    transition:0.2s ease;
}

.day-picker-input:hover{
    background:#e3f0ff;
    border-color:#93c5fd;
}

.day-picker-input:focus{
    border-color:#60a5fa;
    box-shadow:0 0 0 3px rgba(96,165,250,0.15);
    background:#ffffff;
}

.day-picker-btn{
    height:38px;
    padding:0 14px;
    border:none;
    border-radius:12px;
    background:#dbeafe;
    color:#1d4ed8;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
    transition:0.2s ease;
}

.day-picker-btn:hover{
    background:#bfdbfe;
}

.day-picker-mini{
    display:flex;
    align-items:center;
}

.day-picker-mini-input{
    height:32px;
    padding:2px 8px;
    border-radius:10px;
    border:1px solid #cbd5e1;
    background:#f1f7ff;
    color:#1e3a5f;
    font-size:12px;
    font-family:inherit;
    outline:none;
    transition:0.2s ease;
}

.day-picker-mini-input:hover{
    border-color:#93c5fd;
}

.day-picker-mini-input:focus{
    border-color:#60a5fa;
    box-shadow:0 0 0 2px rgba(96,165,250,0.2);
}



.stats-hidden .stat-value{
    letter-spacing:2px;
}

.topbar-badge-group{
    display:flex;
    align-items:center;
    gap:10px;
}

.topbar-eye-btn{
    width:40px;
    height:40px;
    border:none;
    border-radius:12px;
    background:rgba(255,255,255,0.18);
    color:#fff;
    cursor:pointer;
    font-size:18px;
    transition:0.2s ease;
    backdrop-filter:blur(6px);
}

.topbar-eye-btn:hover{
    background:rgba(255,255,255,0.28);
}

/* =========================================================
   GLOBAL DATE / TIME PICKER STYLE
========================================================= */

.js-date-picker,
.js-time-picker,
.js-datetime-picker,
.flatpickr-input {
    height: 46px;
    width: 100%;
    padding: 0 14px;
    border: 1px solid #d8e3f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    outline: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.js-date-picker::placeholder,
.js-time-picker::placeholder,
.js-datetime-picker::placeholder,
.flatpickr-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.js-date-picker:hover,
.js-time-picker:hover,
.js-datetime-picker:hover,
.flatpickr-input:hover {
    border-color: #bfd3ea;
    background: #ffffff;
}

.js-date-picker:focus,
.js-time-picker:focus,
.js-datetime-picker:focus,
.flatpickr-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
    background: #ffffff;
}

/* =========================================================
   FLATPICKR POPUP
========================================================= */

.flatpickr-calendar {
    width: 320px;
    border: 1px solid #e6edf6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    font-family: inherit;
    direction: rtl;
}

.flatpickr-months {
    padding: 10px 10px 6px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-bottom: 1px solid #edf3f9;
}

.flatpickr-month {
    height: 40px;
}

.flatpickr-current-month {
    padding-top: 4px;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 800;
    color: #0f172a;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    top: 10px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: #475569;
    fill: #475569;
    transition: all .18s ease;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: #eff6ff;
    color: #2563eb;
    fill: #2563eb;
}

.flatpickr-weekdays {
    background: #ffffff;
    padding: 4px 8px 0;
}

span.flatpickr-weekday {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.flatpickr-days {
    padding: 8px 10px 12px;
}

.flatpickr-day {
    max-width: 38px;
    height: 38px;
    line-height: 38px;
    margin: 2px 0;
    border-radius: 12px;
    border: none;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
    transition: all .16s ease;
}

.flatpickr-day:hover {
    background: #eff6ff;
    color: #2563eb;
}

.flatpickr-day.today {
    border: 1px solid #93c5fd;
    background: #f8fbff;
    color: #2563eb;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    border: none;
}

.flatpickr-day.inRange {
    background: #eaf3ff;
    color: #1d4ed8;
    box-shadow: none;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #cbd5e1;
    background: transparent;
    cursor: not-allowed;
}

/* =========================================================
   TIME PICKER
========================================================= */

.flatpickr-time {
    border-top: 1px solid #edf3f9;
    height: 48px;
    max-height: 48px;
    background: #fcfdff;
}

.flatpickr-time .numInputWrapper,
.flatpickr-time input,
.flatpickr-time .flatpickr-am-pm {
    height: 48px;
    line-height: 48px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
    background: #eef6ff;
}

.flatpickr-time .flatpickr-time-separator {
    color: #94a3b8;
    font-weight: 800;
}

.numInputWrapper span.arrowUp:after {
    border-bottom-color: #64748b;
}

.numInputWrapper span.arrowDown:after {
    border-top-color: #64748b;
}

.numInputWrapper span:hover {
    background: #eef6ff;
}

/* =========================================================
   MOBILE / SMALL SCREENS
========================================================= */

@media (max-width: 700px) {
    .flatpickr-calendar {
        width: 290px;
    }

    .flatpickr-day {
        max-width: 34px;
        height: 34px;
        line-height: 34px;
        border-radius: 10px;
        font-size: 12px;
    }

    .js-date-picker,
    .js-time-picker,
    .js-datetime-picker,
    .flatpickr-input {
        height: 44px;
        border-radius: 12px;
        font-size: 12px;
    }
}

html[dir="ltr"] body,
body.app-ltr {
    direction: ltr;
    text-align: left;
}

html[dir="ltr"] .sidebar,
body.app-ltr .sidebar {
    direction: ltr;
}

html[dir="ltr"] .topbar,
html[dir="ltr"] .section-header,
html[dir="ltr"] .card-top,
html[dir="ltr"] .students-meta,
html[dir="ltr"] .filter-actions,
html[dir="ltr"] .table-actions,
html[dir="ltr"] .sidebar-brand,
html[dir="ltr"] .sidebar-user,
html[dir="ltr"] .sidebar-menu,
html[dir="ltr"] .week-tabs,
html[dir="ltr"] .student-tabs,
html[dir="ltr"] .pagination,
body.app-ltr .topbar,
body.app-ltr .section-header,
body.app-ltr .card-top,
body.app-ltr .students-meta,
body.app-ltr .filter-actions,
body.app-ltr .table-actions,
body.app-ltr .sidebar-brand,
body.app-ltr .sidebar-user,
body.app-ltr .sidebar-menu,
body.app-ltr .week-tabs,
body.app-ltr .student-tabs,
body.app-ltr .pagination {
    direction: ltr;
}

html[dir="ltr"] .table-wrap table,
body.app-ltr .table-wrap table {
    direction: ltr;
}

html[dir="ltr"] .login-card,
body.app-ltr .login-card {
    text-align: left;
}

.notes-text{
    white-space: pre-line;
    word-break: break-word;
    line-height: 1.6;
    max-width: 500px;
}

@media (max-width: 1023px){
    .layout{
        flex-direction: column;
        gap: 16px;
    }

    .sidebar{
        width: 100%;
        height: auto;
        max-height: none;
        position: relative;
        top: auto;
        overflow: visible;
        border-radius: 20px;
    }

    .content{
        width: 100%;
    }

    .page-wrapper{
        max-width: 100%;
    }
}