*{box-sizing:border-box}body{margin:0;font-family:Tahoma,Arial,sans-serif;background:#f5f8fc;color:#17324d}.top{background:linear-gradient(135deg,#123a70 0%,#1769d1 100%);color:#fff;padding:9px 16px;position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:70px;box-shadow:0 5px 18px rgba(18,58,112,.18)}.brand{display:flex;align-items:center;gap:9px;flex:0 0 auto;min-width:0}.brand img{width:46px;height:46px;object-fit:contain;background:#fff;border-radius:12px;padding:3px;box-shadow:0 2px 8px rgba(0,0,0,.12)}.brand h1{margin:0;font-size:18px;line-height:1.25;white-space:nowrap}.brand small{opacity:.88;font-size:11px;white-space:nowrap}.wrap{max-width:1100px;margin:24px auto;padding:0 16px}.card{background:#fff;border:1px solid #dce6f0;border-radius:18px;padding:20px;box-shadow:0 8px 28px rgba(18,58,112,.07);margin-bottom:18px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:flex;flex-direction:column;gap:7px}.field.full{grid-column:1/-1}label{font-weight:700}input,button,select{font:inherit}input{border:1px solid #cfdbe7;border-radius:12px;padding:12px;background:#fcfeff;outline:none}input:focus{border-color:#1769d1;box-shadow:0 0 0 3px #eaf4ff}.btn{border:0;border-radius:12px;padding:12px 18px;cursor:pointer;font-weight:700}.primary{background:#1769d1;color:#fff}.secondary{background:#eef4f9;color:#17324d}.danger{background:#d94b4b;color:#fff}.success{background:#159a68;color:#fff}.muted{color:#6b7f93}.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.nav{display:flex;align-items:center;justify-content:flex-start;gap:6px;flex:1 1 auto;min-width:0;margin:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.nav::-webkit-scrollbar{display:none}.nav .btn{padding:9px 11px;border-radius:10px;font-size:13px;line-height:1;white-space:nowrap;box-shadow:inset 0 1px 0 rgba(255,255,255,.08);transition:background .18s ease,transform .18s ease,border-color .18s ease}.nav .btn:hover{background:rgba(255,255,255,.22);border-color:rgba(255,255,255,.42);transform:translateY(-1px)}.nav button{background:rgba(255,255,255,.13);color:#fff;border:1px solid rgba(255,255,255,.28)}.nav a.btn{background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.30);text-decoration:none}.stat{padding:14px;border-radius:14px;background:#f7fbff;border:1px solid #dce6f0}.stat b{font-size:24px}.badge{display:inline-block;padding:5px 10px;border-radius:999px;background:#eef4f9}.pending{background:#fff3cd}.active{background:#dff7eb}.blocked{background:#fde2e2}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:10px;border-bottom:1px solid #e5edf5;text-align:right;white-space:nowrap}th{background:#f7fbff}.alert{padding:12px;border-radius:12px;margin-bottom:14px;background:#eef4f9}.err{background:#fde2e2;color:#8c1f1f}.ok{background:#dff7eb;color:#146b49}.login{max-width:520px;margin:50px auto}.print-sheet{background:#fff;width:210mm;min-height:297mm;margin:0 auto;padding:18mm;border:1px solid #ddd}.print-title{text-align:center;border-bottom:2px solid #123a70;padding-bottom:10px;margin-bottom:25px}.print-row{display:flex;border-bottom:1px solid #ddd;padding:12px 0;gap:15px}.print-row strong{width:180px}@media(max-width:700px){.grid{grid-template-columns:1fr}.print-sheet{width:auto;min-height:auto}}@media print{body{background:#fff}.top,.no-print{display:none!important}.print-sheet{border:0;margin:0;padding:12mm;width:210mm;min-height:297mm;box-shadow:none}}
.hidden{display:none!important}.small{padding:8px 10px;font-size:13px}.actions{display:flex;gap:6px;flex-wrap:wrap;min-width:320px}.actions .btn{white-space:nowrap}

.created-box{background:#eef8f3;border:1px solid #bfe4d2;border-radius:14px;padding:14px}.created-title{font-weight:700;margin-bottom:7px}.created-email{font-size:20px;font-weight:800;direction:ltr;text-align:left;background:#fff;border:1px dashed #8fb8a3;border-radius:10px;padding:10px;margin-bottom:10px}.inbox-item{display:block;width:100%;text-align:right;background:#fff;border:1px solid #d8e2ec;border-radius:14px;padding:14px;cursor:pointer;margin-bottom:10px}.inbox-item:hover{border-color:#1769d1;background:#f8fbff}.inbox-subject{font-weight:800;font-size:17px;color:#17324d;margin-bottom:6px}.inbox-meta{font-size:13px;color:#6b7f93;margin-top:3px;direction:rtl}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.setting{display:flex;align-items:flex-start;gap:10px;border:1px solid #dce6f0;border-radius:12px;padding:12px;background:#f8fbff;cursor:pointer}.setting input{margin-top:3px;width:18px;height:18px}.setting span{display:flex;flex-direction:column;gap:4px}.setting small{color:#6b7f93;font-weight:400}@media(max-width:700px){.settings-grid{grid-template-columns:1fr}}


/* Inbox clarity */
.inbox-item { text-align: right; direction: rtl; }
.inbox-topline { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:7px; }
.inbox-code { font-weight:800; font-size:14px; }
.inbox-date { font-size:12px; opacity:.72; white-space:nowrap; }
.inbox-alt { margin-top:7px; font-size:13px; font-weight:700; direction:ltr; text-align:right; }
.message-identity { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0 16px; }
.message-code, .message-alt { background:#eef5ff; border:1px solid #cbdcf3; border-radius:10px; padding:9px 12px; }
.message-code strong { font-size:18px; letter-spacing:.4px; }
.message-alt { direction:ltr; text-align:left; font-weight:700; }

/* V8 print layout */
.print-sheet{background:#fff;width:210mm;min-height:297mm;margin:0 auto;padding:14mm 16mm;box-sizing:border-box;border:1px solid #ddd;color:#111;display:flex;flex-direction:column}
.print-government-header{text-align:center;padding-top:2mm}.ministry-logo{width:34mm;height:30mm;object-fit:contain;display:block;margin:0 auto 2mm}.government-title{font-weight:800;font-size:18px;margin-bottom:9mm}.print-main-title{text-align:center;font-size:22px;font-weight:800;border-top:2px solid #111;border-bottom:2px solid #111;padding:5mm 0;margin-bottom:10mm}.print-table{border:2px solid #111}.print-row{display:grid;grid-template-columns:30% 70%;border-bottom:1px solid #111;min-height:22mm;align-items:center}.print-row:last-child{border-bottom:0}.print-row strong{font-size:17px;padding:5mm;border-left:1px solid #111;text-align:right}.print-row span{font-size:18px;padding:5mm;text-align:center;font-weight:700;word-break:break-word}.print-footer{text-align:center;margin-top:auto;padding-top:12mm;font-size:13px;font-weight:700}@media print{.print-sheet{border:0;margin:0;width:210mm;min-height:297mm;padding:12mm 14mm}.print-government-header,.print-main-title,.print-table,.print-footer{break-inside:avoid}}

/* V10.3 inbox + A4 refinements */
.inbox-layout{display:grid;grid-template-columns:360px minmax(0,1fr);gap:16px;direction:rtl;align-items:start}.inbox-list-panel{max-height:calc(100vh - 260px);overflow:auto;padding-left:4px}.message-view-panel{min-height:520px;background:#f8fbff;border:1px solid #d8e2ec;border-radius:14px;padding:18px;position:sticky;top:90px}.empty-message{min-height:480px;display:flex;align-items:center;justify-content:center;color:#71839a;text-align:center}.inbox-item{position:relative}.inbox-item.unread{border-right:5px solid #1769d1;background:#eef6ff;font-weight:700}.inbox-item.read{border-right:5px solid #d7e0ea;background:#fff}.inbox-item.unread .inbox-subject{font-weight:900}.inbox-item.read .inbox-subject{font-weight:700}.inbox-date{direction:rtl}.print-sheet{width:210mm;height:297mm;min-height:297mm;padding:10mm 13mm}.ministry-logo{width:28mm;height:25mm}.government-title{font-size:15px;margin-bottom:6mm}.print-main-title{font-size:18px;padding:3mm 0;margin-bottom:7mm}.print-row{min-height:18mm}.print-row strong{font-size:14px;padding:3mm}.print-row span{font-size:15px;padding:3mm}.print-footer{padding-top:8mm;font-size:11px}@page{size:A4 portrait;margin:0}@media print{html,body{width:210mm;height:297mm;margin:0!important;padding:0!important}.print-sheet{width:210mm;height:297mm;min-height:297mm;margin:0;padding:10mm 13mm;border:0;box-shadow:none}.print-row{min-height:18mm}.print-row strong{font-size:14px}.print-row span{font-size:15px}}@media(max-width:900px){.inbox-layout{grid-template-columns:1fr}.inbox-list-panel{max-height:420px}.message-view-panel{position:static}}
/* V10.5 inbox readability: unread messages are visually heavier and clearly marked. */
.inbox-item.unread{border-right:6px solid #0b57d0;background:#e3f0ff;font-weight:800;box-shadow:0 1px 5px rgba(11,87,208,.12)}
.inbox-item.unread::before{content:"";position:absolute;left:10px;top:10px;width:9px;height:9px;border-radius:50%;background:#0b57d0}
.inbox-item.unread .inbox-code,.inbox-item.unread .inbox-subject,.inbox-item.unread .inbox-meta{font-weight:800}
.inbox-item.read{opacity:.88}

/* V10.7 - A4 print registration header */
.print-registration-banner{text-align:center;width:100%;margin:0 auto 6mm;padding:2mm 5mm 3mm;color:#222;direction:rtl}
.print-registration-title{font-size:12px;color:#8b8b8b;line-height:1.35;margin-bottom:3mm}
.print-registration-subtitle{font-size:15px;font-weight:700;line-height:1.25;margin-bottom:2mm}
.print-success-icon{width:10mm;height:10mm;border-radius:50%;background:#61bd00;color:#fff;font-size:7mm;line-height:10mm;margin:0 auto 2mm;font-weight:800}
.print-success-title{font-size:12px;font-weight:800;line-height:1.3;margin-bottom:1.5mm}
.print-success-note{font-size:9px;font-weight:600;line-height:1.45;max-width:105mm;margin:0 auto;color:#222}
@media print{
  @page{size:A4 portrait;margin:0}
  html,body{width:210mm!important;height:297mm!important;margin:0!important;padding:0!important}
  .print-sheet{width:210mm!important;height:297mm!important;min-height:297mm!important;max-height:297mm!important;margin:0!important;padding:8mm 12mm!important;box-sizing:border-box!important;overflow:hidden!important}
  .print-government-header{padding-top:0!important}
  .ministry-logo{width:24mm!important;height:21mm!important;margin-bottom:1mm!important}
  .government-title{font-size:12px!important;margin-bottom:4mm!important}
  .print-registration-banner{margin-bottom:4mm!important;padding:1mm 3mm 2mm!important}
  .print-registration-title{font-size:10px!important;margin-bottom:2mm!important}
  .print-registration-subtitle{font-size:12px!important;margin-bottom:1mm!important}
  .print-success-icon{width:7mm!important;height:7mm!important;font-size:5mm!important;line-height:7mm!important;margin-bottom:1mm!important}
  .print-success-title{font-size:10px!important;margin-bottom:1mm!important}
  .print-success-note{font-size:8px!important;max-width:110mm!important}
  .print-main-title{font-size:15px!important;padding:2.5mm 0!important;margin-bottom:4mm!important}
  .print-table{border-width:1px!important}
  .print-row{min-height:14mm!important}
  .print-row strong{font-size:11px!important;padding:2.5mm!important}
  .print-row span{font-size:12px!important;padding:2.5mm!important}
  .print-footer{padding-top:4mm!important;font-size:9px!important}
}

/* V10.12 - print content scale 95% to prevent right/bottom overflow */
@media print{
  .print-sheet{
    zoom:95%;
  }
}
/* V10.13 - prevent trailing blank print page while keeping 95% content scale */
@media print{
  html,body{width:210mm!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important}
  .print-sheet{
    width:199.5mm!important;
    height:282.15mm!important;
    min-height:282.15mm!important;
    max-height:282.15mm!important;
    margin:0 auto!important;
    padding:8mm 12mm!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    zoom:1!important;
    break-after:avoid!important;
    page-break-after:avoid!important;
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
}
/* V10.14 - enlarge the ministry/header section slightly while preserving A4 fit */
@media print{
  .print-government-header{padding-top:0!important}
  .ministry-logo{width:30mm!important;height:26mm!important;margin-bottom:1.5mm!important}
  .government-title{font-size:11px!important;margin-bottom:3mm!important}
  .print-registration-banner{margin-bottom:3mm!important;padding:1.5mm 3mm 2mm!important}
  .print-registration-title{font-size:10.5px!important;margin-bottom:1.5mm!important}
  .print-registration-subtitle{font-size:13px!important;margin-bottom:1mm!important}
  .print-success-icon{width:7.5mm!important;height:7.5mm!important;font-size:5.2mm!important;line-height:7.5mm!important;margin-bottom:1mm!important}
  .print-success-title{font-size:10.5px!important;margin-bottom:1mm!important}
  .print-success-note{font-size:8.2px!important;max-width:115mm!important}
  .print-main-title{margin-bottom:3.5mm!important}
}

/* V10.19 - single named ministry window + email favicon launch UI */
.ministry-launch-card{padding:24px}.ministry-launch-head{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}.ministry-open-btn{font-size:16px}.ministry-info-box{margin-top:18px;border:1px solid #d8e5f2;border-radius:14px;background:#f7fbff;padding:14px;display:grid;gap:7px}.ministry-info-box span{font-family:Tahoma,Arial,sans-serif}@media(max-width:700px){.ministry-launch-head{align-items:stretch}.ministry-open-btn{width:100%}}

.ministry-status{display:inline-block;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:800;white-space:nowrap}.ministry-status.ok{background:#e8f7ee;color:#167a45}.ministry-status.info{background:#e8f1ff;color:#1f5fae}.ministry-status.err{background:#fdeaea;color:#b42318}.ministry-status.warn{background:#fff5d6;color:#8a6200}.ministry-email{font-size:11px;margin-top:4px;direction:ltr;text-align:center;word-break:break-all}

/* V10.21 - Responsive student records table */
.records-card{overflow:hidden}
.records-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #dfe8f1;border-radius:14px}
.records-table{min-width:1180px}
.records-table th{position:sticky;top:0;z-index:2;background:#eef5fb;color:#17324d;font-weight:800;border-bottom:2px solid #d7e4ef}
.records-table tbody tr:nth-child(odd){background:#ffffff}
.records-table tbody tr:nth-child(even){background:#f7fafd}
.records-table tbody tr:hover{background:#eef6ff}
.records-table td{vertical-align:middle;border-bottom:1px solid #e2eaf2}
.records-table .ltr-cell{direction:ltr;text-align:right;font-family:Tahoma,Arial,sans-serif}
.record-action-btn{min-width:135px}
.records-toolbar{align-items:flex-start}
.records-summary{font-size:13px;margin-top:4px}
@media(max-width:700px){
  .wrap{padding:0 10px;margin:14px auto}
  .card{padding:14px;border-radius:14px}
  .top{padding:13px 14px}
  .brand img{width:46px;height:46px}
  .brand h1{font-size:18px}
  .nav{gap:6px}
  .nav button{padding:9px 11px}
  .records-toolbar{display:flex;flex-direction:column;align-items:stretch!important;gap:10px}
  .records-toolbar .btn{width:100%}
  .records-table-wrap{margin:0 -2px}
  .records-table{min-width:1050px}
  .records-table th,.records-table td{padding:9px 10px;font-size:13px}
  .record-action-btn{min-width:125px;padding:10px 12px}
}


/* V10.22 - safer, cleaner admin user actions */
.admin-users-wrap{border:1px solid #dfe8f1;border-radius:14px;background:#fff;overflow:auto;-webkit-overflow-scrolling:touch}
.admin-users-table{min-width:1120px}
.admin-users-table th{position:sticky;top:0;z-index:3;background:#eef5fb;color:#17324d;border-bottom:2px solid #d7e4ef}
.admin-users-table tbody tr:nth-child(odd){background:#fff}
.admin-users-table tbody tr:nth-child(even){background:#f7fafd}
.admin-users-table tbody tr:hover{background:#eef6ff}
.admin-users-table td{vertical-align:middle;padding:11px 10px}
.admin-phone{direction:ltr;text-align:right;font-weight:700;letter-spacing:.2px}
.admin-gmail{direction:ltr;text-align:right;font-weight:600;min-width:210px}
.password-box{display:flex;align-items:center;gap:7px;justify-content:flex-start;direction:ltr}
.admin-password{min-width:82px;display:inline-block;letter-spacing:1px}
.password-toggle{border:1px solid #d7e2ec;background:#fff;border-radius:9px;padding:6px 8px;cursor:pointer;font-size:14px}
.password-toggle:hover{background:#eef5fb}
.credit-box{display:flex;flex-direction:column;align-items:center;min-width:62px}
.credit-box b{font-size:18px;color:#1769d1}
.credit-box small,.usage-box small{font-size:11px;color:#71839a}
.usage-box{display:flex;gap:12px;justify-content:center;min-width:125px}
.usage-box span{display:flex;flex-direction:column;align-items:center;min-width:48px}
.usage-box b{font-size:16px}
.actions-cell{min-width:300px}
.primary-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.action-main,.action-menu summary,.action-menu-btn{border:1px solid #d6e2ed;border-radius:10px;font:inherit;font-weight:800;cursor:pointer;white-space:nowrap}
.action-main{padding:9px 12px;background:#1769d1;color:#fff;border-color:#1769d1}
.action-main.secondary{background:#eef4f9;color:#17324d;border-color:#d6e2ed}
.action-main:hover{filter:brightness(.97)}
.action-menu{position:relative}
.action-menu summary{list-style:none;padding:9px 12px;background:#f5f8fc;color:#17324d;user-select:none}
.action-menu summary::-webkit-details-marker{display:none}
.action-menu summary:after{content:' ▾';font-size:11px}
.action-menu[open] summary{background:#eaf2f9}
.action-menu-panel{position:absolute;right:0;top:calc(100% + 6px);z-index:20;width:210px;padding:8px;background:#fff;border:1px solid #d6e2ed;border-radius:12px;box-shadow:0 12px 30px rgba(18,58,112,.16);display:flex;flex-direction:column;gap:6px}
.action-menu-btn{width:100%;padding:9px 10px;text-align:right;background:#f7fafc;color:#17324d}
.action-menu-btn:hover{background:#eef5fb}
.action-menu-btn.success{background:#e8f7ee;color:#167a45;border-color:#ccebd9}
.action-menu-btn.danger{background:#fff0f0;color:#b42318;border-color:#f0c8c8}
.action-menu-panel .danger{border-top:1px solid #f0d8d8}
@media(max-width:700px){
  .admin-users-table{min-width:1120px}
  .admin-users-table th,.admin-users-table td{padding:9px 9px;font-size:13px}
  .actions-cell{min-width:290px}
  .action-main,.action-menu summary{padding:9px 10px}
}

/* V10.23 - clear account status filters */
.status-filter-card{margin:15px 0;padding:14px 16px;border:1px solid #dce6f0;border-radius:14px;background:#fbfdff}
.status-filter-title{font-weight:800;margin-bottom:10px;color:#17324d}
.status-filters{display:flex;gap:8px;flex-wrap:wrap}
.status-filter{border:1px solid #d6e2ed;background:#fff;color:#17324d;border-radius:999px;padding:9px 13px;cursor:pointer;font:inherit;font-weight:700;transition:.15s;box-shadow:0 1px 2px rgba(18,58,112,.04)}
.status-filter b{display:inline-flex;min-width:22px;justify-content:center;margin-right:5px;padding:1px 6px;border-radius:999px;background:#eef4f9}
.status-filter:hover{transform:translateY(-1px);background:#f3f8fc}
.status-filter.selected{outline:2px solid #1769d1;outline-offset:1px;background:#eaf4ff;color:#0f4f9e}
.status-filter.filter-active.selected{outline-color:#159a68;background:#e8f7ee;color:#167a45}
.status-filter.filter-awaiting.selected{outline-color:#d79b00;background:#fff7dc;color:#8a5a00}
.status-filter.filter-pending.selected{outline-color:#d97706;background:#fff2df;color:#9a4f00}
.status-filter.filter-rejected.selected,.status-filter.filter-blocked.selected{outline-color:#d94b4b;background:#fff0f0;color:#b42318}
.badge.awaiting{background:#fff3cd;color:#8a5a00}
.badge.rejected{background:#fde2e2;color:#a61b1b}
.action-menu-btn.danger-soft{background:#fff7f7;color:#b42318;border-color:#f0d0d0}
@media(max-width:700px){.status-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.status-filter{width:100%;font-size:13px;padding:10px 7px}.status-filter b{float:left;margin-right:0}.status-filter.selected{outline-width:2px}}

/* V10.26 - clear student-record filters */
.records-filter-panel{margin:16px 0;padding:16px;border:1px solid #dce6f0;border-radius:14px;background:#f8fbfe}
.records-filter-title{font-weight:800;font-size:16px;margin-bottom:10px;color:#17324d}
.records-search-row{display:flex;gap:9px;align-items:center}
.records-search-input{flex:1;min-width:0;background:#fff}
.record-status-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:10px}
.record-status-filter{border:1px solid #d6e2ed;background:#fff;color:#17324d;border-radius:11px;padding:10px 9px;cursor:pointer;font:inherit;font-weight:800;transition:.15s;box-shadow:0 1px 2px rgba(18,58,112,.04)}
.record-status-filter b{display:inline-flex;min-width:24px;justify-content:center;margin-right:5px;padding:1px 6px;border-radius:999px;background:#eef4f9}
.record-status-filter:hover{background:#f1f7fc;transform:translateY(-1px)}
.record-status-filter.selected{outline:2px solid #1769d1;outline-offset:1px;background:#eaf4ff;color:#0f4f9e}
.record-status-filter[data-status="not_started"].selected{outline-color:#d79b00;background:#fff7dc;color:#8a5a00}
.record-status-filter[data-status="in_progress"].selected{outline-color:#4c8bd9;background:#edf5ff;color:#1f5fae}
.record-status-filter[data-status="completed"].selected{outline-color:#159a68;background:#e8f7ee;color:#167a45}
.record-status-filter[data-status="error"].selected{outline-color:#d94b4b;background:#fff0f0;color:#b42318}
.records-empty{text-align:center!important;padding:28px!important;color:#71839a!important;font-weight:700}
@media(max-width:800px){
  .record-status-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .records-filter-panel{padding:12px}
  .records-search-row{flex-direction:column;align-items:stretch}
  .records-search-row .btn{width:100%}
  .records-search-input{width:100%}
  .record-status-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .record-status-filter{font-size:12px;padding:10px 6px}
}

/* Student record editing */
.record-actions{display:flex;flex-direction:column;gap:6px;min-width:145px}
.modal-backdrop{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;padding:18px}
.modal-card{width:min(680px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:16px;padding:20px;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.modal-card .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.modal-card label{display:flex;flex-direction:column;gap:6px;font-weight:600}
.modal-card input{width:100%;box-sizing:border-box}
.modal-card .full{grid-column:1/-1}
.readonly-value{padding:11px 12px;border:1px solid #ddd;border-radius:9px;background:#f5f6f7;color:#555}
@media(max-width:650px){.modal-card .form-grid{grid-template-columns:1fr}.modal-card .full{grid-column:auto}.record-actions{min-width:0}}

/* V3.9 - full student record cards + grouped bulk PDF printing */
.records-all-data-note{margin:14px 0;padding:12px 14px;border:1px solid #d9e8f5;border-radius:12px;background:#f5faff;color:#28506f}
.records-card-list{display:flex;flex-direction:column;gap:18px}
.records-day-group{display:flex;flex-direction:column;gap:10px}
.records-day-divider{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border-radius:12px;background:linear-gradient(90deg,#eef7ff,#f8fbff);border:1px solid #cfe2f3;color:#174d78;font-weight:900;position:sticky;top:8px;z-index:2}
.records-day-divider span{font-size:15px}.records-day-divider b{font-size:12px;background:#fff;border:1px solid #cfe2f3;border-radius:999px;padding:5px 10px;white-space:nowrap}.records-day-list{display:flex;flex-direction:column;gap:10px}
.record-card-actions .btn:disabled{opacity:.55;cursor:not-allowed;filter:grayscale(.15)}
.record-card-item{width:100%;background:#fff;border:1px solid #dce6f0;border-radius:16px;padding:16px;box-shadow:0 4px 16px rgba(18,58,112,.05);min-width:0}
.record-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px solid #e7eef5;padding-bottom:12px;margin-bottom:12px}
.record-card-name{font-size:18px;font-weight:900;color:#123a70;word-break:break-word}
.record-card-code{margin-top:4px;color:#6b7f93;font-size:13px}
.record-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.record-data-cell{min-width:0;padding:10px;border:1px solid #e5edf5;border-radius:11px;background:#f9fbfd;display:flex;flex-direction:column;gap:5px}
.record-data-cell span{font-size:12px;color:#71839a;font-weight:700}
.record-data-cell b{font-size:14px;color:#17324d;overflow-wrap:anywhere}
.breakable{word-break:break-all}
.record-card-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid #e7eef5}
.record-card-actions .btn{flex:1 1 150px}
.print-manager-card{direction:rtl}
.print-selection-count{background:#eaf4ff;color:#0f4f9e;border:1px solid #cfe3f8;border-radius:999px;padding:8px 14px;font-weight:800;white-space:nowrap}
.print-bulk-actions{margin-bottom:14px}
.print-groups{display:flex;flex-direction:column;gap:14px}
.print-day-group{border:1px solid #dce6f0;border-radius:15px;background:#fff;overflow:hidden}
.print-day-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;background:#f5f9fd;border-bottom:1px solid #dce6f0}
.print-group-select-all{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-weight:700;white-space:nowrap}.print-group-select-all input{width:18px;height:18px;cursor:pointer;accent-color:#1467c7}
.print-record-list{display:flex;flex-direction:column}
.print-record-option{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #edf2f6;cursor:pointer;min-width:0}
.print-record-option:last-child{border-bottom:0}
.print-record-option:hover{background:#f8fbfe}
.print-record-option input{width:20px;height:20px;flex:0 0 auto;accent-color:#1769d1}
.print-record-checkmark{display:none}
.print-record-info{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0;flex:1}
.print-record-info b{min-width:170px;overflow-wrap:anywhere}
.print-record-info span{color:#667b90;font-size:13px;overflow-wrap:anywhere}
.print-record-status{flex:0 0 auto}
.print-sheet{break-after:page;page-break-after:always}
.print-sheet:last-child{break-after:auto;page-break-after:auto}
@media(max-width:900px){
  .records-day-list{grid-template-columns:1fr}
}
@media(max-width:650px){
  .record-card-grid{grid-template-columns:1fr}
  .record-card-head{flex-direction:column}
  .print-day-head{flex-direction:column;align-items:stretch}
  .print-record-info{display:grid;grid-template-columns:1fr;gap:3px}
  .print-record-status{display:none}
  .print-bulk-actions .btn{width:100%}
}
@media print{
  .print-sheet{break-after:page!important;page-break-after:always!important}
  .print-sheet:last-child{break-after:auto!important;page-break-after:auto!important}
}

/* Zero message-credit warning */
.stat-zero-credit{border:1px solid #efb6b6;background:#fff5f5}
.stat-zero-credit b{color:#c62828 !important}
.zero-credit-alert{display:flex;align-items:center;gap:14px;margin-top:14px;padding:14px 16px;border:1px solid #f1b7b7;border-radius:14px;background:linear-gradient(135deg,#fff7f7,#fff0f0);color:#8f1d1d;box-shadow:0 6px 18px rgba(160,40,40,.08)}
.zero-credit-alert strong{display:block;margin-bottom:4px;color:#b42318;font-size:16px}
.zero-credit-alert small{display:block;margin-top:5px;color:#8b5e5e}
.zero-credit-alert.compact{margin:12px 0 14px}
.zero-credit-gif{font-size:30px;min-width:54px;text-align:center;animation:fekraCreditPulse 1.35s ease-in-out infinite}
@keyframes fekraCreditPulse{0%,100%{transform:translateY(0) scale(1);opacity:1}50%{transform:translateY(-4px) scale(1.12);opacity:.82}}

/* V3.13.3 - admin users table: show all columns without desktop horizontal scrolling */
@media (min-width: 901px){
  .admin-users-wrap{overflow-x:hidden;overflow-y:visible}
  .admin-users-table{width:100%;min-width:0;table-layout:fixed}
  .admin-users-table th,.admin-users-table td{white-space:normal;overflow-wrap:anywhere;word-break:break-word;padding:9px 7px;font-size:13px}
  .admin-users-table th:nth-child(1),.admin-users-table td:nth-child(1){width:10%}
  .admin-users-table th:nth-child(2),.admin-users-table td:nth-child(2){width:20%}
  .admin-users-table th:nth-child(3),.admin-users-table td:nth-child(3){width:12%}
  .admin-users-table th:nth-child(4),.admin-users-table td:nth-child(4){width:11%}
  .admin-users-table th:nth-child(5),.admin-users-table td:nth-child(5){width:9%}
  .admin-users-table th:nth-child(6),.admin-users-table td:nth-child(6){width:12%}
  .admin-users-table th:nth-child(7),.admin-users-table td:nth-child(7){width:26%}
  .admin-gmail{min-width:0;word-break:break-all}
  .admin-phone{word-break:break-all}
  .password-box{gap:4px;justify-content:center;flex-wrap:wrap}
  .admin-password{min-width:0}
  .usage-box{min-width:0;gap:7px}
  .credit-box{min-width:0}
  .actions-cell{min-width:0}
  .primary-actions{gap:5px;justify-content:center}
  .action-main,.action-menu summary{padding:7px 8px;font-size:12px}
}

/* V3.13.4 - give the admin page more desktop workspace */
.admin-page .wrap{max-width:1320px;padding-left:20px;padding-right:20px}
@media (min-width:1500px){.admin-page .wrap{max-width:1420px}}
@media (max-width:900px){.admin-page .wrap{max-width:100%;padding-left:14px;padding-right:14px}}


/* V1.9 FINAL - readable single-line navigation */
.top{min-height:76px;padding:10px 18px;gap:14px}
.brand{gap:11px}
.brand img{width:52px;height:52px;border-radius:13px;padding:3px}
.brand h1{font-size:19px}
.brand small{font-size:12px}
.nav{gap:7px;overflow-x:auto;scrollbar-width:none;align-items:center}
.nav .btn{padding:10px 14px;min-height:40px;border-radius:11px;font-size:14px;line-height:1.15;font-weight:800}
.nav .btn:first-letter{font-size:1.15em}
#extensionToggleBtn{min-width:168px}
@media(max-width:1100px){.top{padding:9px 12px;gap:10px}.brand{gap:8px}.brand img{width:48px;height:48px}.brand h1{font-size:17px}.brand small{font-size:11px}.nav{gap:5px}.nav .btn{padding:9px 11px;font-size:13px;min-height:38px}#extensionToggleBtn{min-width:154px}}
@media(max-width:760px){.top{min-height:64px;padding:7px 9px;gap:7px}.brand{gap:6px}.brand img{width:42px;height:42px}.brand h1{font-size:14px}.brand small{display:none}.nav{gap:4px}.nav .btn{padding:8px 9px;font-size:12px;min-height:36px}#extensionToggleBtn{min-width:140px}}

/* V1.9 FINAL ADMIN UX - readable actions, no clipped controls, responsive users list */
.admin-users-wrap{position:relative}
.admin-users-table{border-spacing:0}
.admin-users-table th,.admin-users-table td{height:auto;line-height:1.35}
.admin-users-table th{white-space:nowrap!important}
.admin-users-table td{vertical-align:middle}
.admin-users-table .admin-phone,.admin-users-table .admin-gmail{font-size:13px}
.admin-users-table .admin-gmail{direction:ltr;text-align:right;overflow-wrap:anywhere}
.admin-users-table .password-box{min-height:34px}
.admin-users-table .password-toggle{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;padding:0;flex:0 0 34px}
.admin-users-table .action-main,.admin-users-table .action-menu summary{min-height:34px;display:inline-flex;align-items:center;justify-content:center;gap:4px}
.admin-users-table .action-menu-panel{z-index:1000}

@media (min-width:901px){
  /* Prevent the inner table from creating a tiny scrollbar that clips the action controls. */
  .admin-users-wrap{overflow:visible!important;overflow-x:visible!important;overflow-y:visible!important}
  .admin-users-table{width:100%!important;min-width:0!important;table-layout:fixed}
  .admin-users-table th:nth-child(1),.admin-users-table td:nth-child(1){width:11%}
  .admin-users-table th:nth-child(2),.admin-users-table td:nth-child(2){width:20%}
  .admin-users-table th:nth-child(3),.admin-users-table td:nth-child(3){width:11%}
  .admin-users-table th:nth-child(4),.admin-users-table td:nth-child(4){width:12%}
  .admin-users-table th:nth-child(5),.admin-users-table td:nth-child(5){width:10%}
  .admin-users-table th:nth-child(6),.admin-users-table td:nth-child(6){width:11%}
  .admin-users-table th:nth-child(7),.admin-users-table td:nth-child(7){width:25%}
  .admin-users-table th,.admin-users-table td{padding:10px 7px}
  .admin-users-table .actions-cell{min-width:0!important}
  .admin-users-table .primary-actions{flex-wrap:nowrap;gap:5px;justify-content:center}
  .admin-users-table .action-main,.admin-users-table .action-menu summary{padding:8px 8px;font-size:12px}
  .admin-users-table .action-menu-panel{right:0;min-width:215px}
}

@media (max-width:900px){
  .admin-users-wrap{overflow-x:auto!important;overflow-y:visible!important}
  .admin-users-table{min-width:1080px!important}
}

@media (max-width:700px){
  /* Convert the client list into readable cards instead of forcing seven columns onto a phone. */
  .admin-users-wrap{overflow:visible!important;border:0;background:transparent}
  .admin-users-table{min-width:0!important;width:100%!important;display:block;table-layout:auto!important}
  .admin-users-table thead{display:none}
  .admin-users-table tbody,.admin-users-table tr,.admin-users-table td{display:block;width:100%}
  .admin-users-table tr{margin:0 0 12px;background:#fff!important;border:1px solid #dfe8f1;border-radius:14px;box-shadow:0 5px 16px rgba(18,58,112,.06);overflow:visible}
  .admin-users-table td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px;align-items:center;padding:10px 12px;border-bottom:1px solid #edf2f7;white-space:normal!important;text-align:right}
  .admin-users-table td:last-child{border-bottom:0}
  .admin-users-table td::before{font-weight:800;color:#536b82;font-size:12px}
  .admin-users-table td:nth-child(1)::before{content:'الهاتف'}
  .admin-users-table td:nth-child(2)::before{content:'Gmail'}
  .admin-users-table td:nth-child(3)::before{content:'كلمة المرور'}
  .admin-users-table td:nth-child(4)::before{content:'الحالة'}
  .admin-users-table td:nth-child(5)::before{content:'الرصيد المتاح'}
  .admin-users-table td:nth-child(6)::before{content:'الاستخدام'}
  .admin-users-table td:nth-child(7)::before{content:'الإجراءات'}
  .admin-users-table .admin-phone,.admin-users-table .admin-gmail{min-width:0;word-break:break-word}
  .admin-users-table .password-box{justify-content:flex-start}
  .admin-users-table .actions-cell{min-width:0!important}
  .admin-users-table .primary-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px}
  .admin-users-table .action-main,.admin-users-table .action-menu summary{padding:8px 9px;font-size:12px}
  .admin-users-table .action-menu-panel{position:static;width:100%;margin-top:6px;box-shadow:none}
}

/* FINAL NAV OVERRIDE - larger and clearer buttons */
.nav{gap:8px;overflow-x:auto;scrollbar-width:none;align-items:center;padding:2px 0}
.nav .btn{padding:11px 16px;min-height:44px;border-radius:12px;font-size:15px;line-height:1.15;font-weight:800}
.nav .btn:first-letter{font-size:1.18em}
#extensionToggleBtn{min-width:150px}
@media(max-width:1100px){.top{padding:9px 12px;gap:10px}.brand{gap:8px}.brand img{width:48px;height:48px}.brand h1{font-size:17px}.brand small{font-size:11px}.nav{gap:6px}.nav .btn{padding:10px 13px;font-size:14px;min-height:42px}#extensionToggleBtn{min-width:145px}}
@media(max-width:760px){.top{min-height:64px;padding:7px 9px;gap:7px}.brand{gap:6px}.brand img{width:42px;height:42px}.brand h1{font-size:14px}.brand small{display:none}.nav{gap:5px}.nav .btn{padding:9px 11px;font-size:13px;min-height:40px}#extensionToggleBtn{min-width:136px}}

/* Final browser-extension download button */
.browser-extension-btn{min-width:170px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;cursor:pointer}
@media(max-width:1100px){.browser-extension-btn{min-width:160px}}
@media(max-width:760px){.browser-extension-btn{min-width:150px}}


/* Client recharge notification */
.recharge-toast{position:fixed;top:22px;right:22px;z-index:99999;display:flex;align-items:center;gap:12px;min-width:320px;max-width:460px;padding:15px 16px;background:#fff;border:1px solid #d9e7f5;border-radius:16px;box-shadow:0 12px 35px rgba(0,0,0,.16);direction:rtl;animation:fekraToastIn .28s ease-out}
.recharge-toast-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#e8f7ee;font-size:23px;flex:0 0 auto}
.recharge-toast-body{line-height:1.7;color:#17324d;flex:1}
.recharge-toast-body strong{display:block;font-size:16px;color:#168a4b}
.recharge-toast-body small{color:#60758a}
.recharge-toast-close{border:0;background:transparent;font-size:24px;cursor:pointer;color:#718096;line-height:1}
@keyframes fekraToastIn{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){.recharge-toast{right:10px;left:10px;top:10px;min-width:0;max-width:none}.extension-manage-btn,.browser-extension-btn{font-size:14px}}

/* Fekra modern login */
.auth-page{min-height:calc(100vh - 40px);display:flex;align-items:center;justify-content:center;padding:38px 18px;background:radial-gradient(circle at 15% 10%,#eaf4ff 0,#f5f8fc 38%,#eef5fb 100%)}
.auth-card{width:min(620px,100%);background:rgba(255,255,255,.96);border:1px solid #d7e4f0;border-radius:28px;padding:30px;box-shadow:0 22px 70px rgba(18,58,112,.16);backdrop-filter:blur(8px)}
.auth-hero{display:flex;align-items:center;gap:18px;margin-bottom:24px;padding:18px;border-radius:22px;background:linear-gradient(135deg,#123a70,#1769d1);color:#fff;box-shadow:0 12px 28px rgba(23,105,209,.22)}
.auth-logo-wrap{width:76px;height:76px;flex:0 0 76px;background:#fff;border-radius:22px;padding:7px;display:flex;align-items:center;justify-content:center}.auth-logo-wrap img{width:100%;height:100%;object-fit:contain;border-radius:16px}
.auth-kicker{font-size:12px;opacity:.9;margin-bottom:4px}.auth-hero h1{margin:0;font-size:29px}.auth-hero p{margin:6px 0 0;opacity:.9;font-size:14px}
.auth-form{display:flex;flex-direction:column;gap:15px}.auth-form .field{gap:8px}.auth-form input{min-height:50px;font-size:16px;background:#fbfdff}.password-wrap{position:relative}.password-wrap input{width:100%;padding-left:52px}.password-toggle{position:absolute;left:7px;top:7px;height:36px;width:40px;border:0;background:#eef5fb;border-radius:10px;cursor:pointer;font-size:17px}
.remember-row{display:flex;align-items:center;gap:9px;font-weight:700;color:#3a536b;cursor:pointer}.remember-row input{width:18px;height:18px;accent-color:#1769d1}
.auth-submit{width:100%;min-height:52px;font-size:17px;box-shadow:0 9px 20px rgba(23,105,209,.22)}.link-btn{background:transparent;color:#1769d1;border:1px solid #d7e5f2}.auth-note{margin-top:17px;padding:13px 15px;border-radius:14px;background:#f3f8fd;color:#5d7184;font-size:12px;line-height:1.7;border:1px solid #dfebf5}
.activation-box{padding:16px;border-radius:18px;background:#fff9e8;border:1px solid #f0d889}.activation-box.hidden{display:none}.activation-head{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px}.activation-head>span{font-size:25px}.activation-head strong{display:block;color:#7a5a00}.activation-head small{display:block;color:#8c7b4d;margin-top:3px}
@media(max-width:600px){.auth-page{padding:20px 12px}.auth-card{padding:18px;border-radius:22px}.auth-hero{padding:15px}.auth-logo-wrap{width:62px;height:62px;flex-basis:62px}.auth-hero h1{font-size:23px}}


/* Inline customer details in admin */
.inline-client-details > td{padding:0!important;border:0!important;background:transparent!important}
.inline-client-panel{margin:10px 0 16px;padding:18px;border:1px solid #cfe0ef;border-radius:16px;background:#f8fbfe;box-shadow:0 8px 24px rgba(18,58,112,.08)}
.inline-client-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.inline-client-head h3{margin:0 0 5px}
.inline-client-head p{margin:0}
.inline-client-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0 16px}
.inline-client-summary>div{padding:11px 12px;background:#fff;border:1px solid #e0eaf3;border-radius:12px}
.inline-client-summary span{display:block;font-size:12px;color:#667b8f;margin-bottom:4px}
.inline-client-summary b{display:block;word-break:break-word}
.inline-client-panel .table-wrap{max-width:100%;overflow:auto}
.inline-client-panel table{min-width:1050px}
@media(max-width:700px){.inline-client-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.inline-client-head{align-items:flex-start;flex-direction:column}.inline-client-panel{padding:12px}}

/* V10.29 ADMIN POLISH + ACTIVATION COPY */

/* V10.34 — premium admin customer cards and reliable action targets */
.admin-users-section{margin-top:15px}
.admin-users-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px;padding:15px 16px;border:1px solid #d9e7f2;border-radius:16px;background:linear-gradient(135deg,#ffffff,#f6fbff);box-shadow:0 7px 22px rgba(18,58,112,.05)}
.admin-users-toolbar h3{margin:0 0 4px}.admin-users-toolbar p{margin:0}.admin-users-hint{padding:9px 12px;border-radius:11px;background:#eef7ff;color:#1a5f98;font-size:12px;font-weight:800}
.admin-users-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.admin-user-card{position:relative;overflow:visible;background:#fff;border:1px solid #d4e2ee;border-radius:20px;padding:16px;box-shadow:0 8px 26px rgba(18,58,112,.08);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.admin-user-card::before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,#1769d1,#55a7e8,#1769d1)}
.admin-user-card:hover{transform:translateY(-2px);box-shadow:0 13px 34px rgba(18,58,112,.12);border-color:#b8d2e8}
.admin-user-card:has(.admin-more-menu[open]){z-index:2000}
.admin-more-menu[open]{z-index:2001}
.admin-user-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding-top:4px;padding-bottom:13px;border-bottom:1px solid #e5eef5}
.admin-user-identity{display:flex;align-items:center;gap:10px;min-width:0}.admin-user-avatar{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:#eef6ff;border:1px solid #d3e6f7;font-size:22px;flex:0 0 auto}.admin-user-identity h3{margin:0 0 3px;font-size:16px}.admin-user-identity b,.admin-user-identity span{display:block;max-width:100%;overflow-wrap:anywhere;font-size:12px}.admin-user-identity span{color:#667e93;margin-top:3px}
.admin-user-status-wrap{display:flex;flex-direction:column;align-items:flex-end;gap:7px;min-width:120px}.admin-user-status-wrap .badge{font-weight:900}.admin-user-card-body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px}.admin-user-data-cell{min-width:0;padding:10px 11px;border:1px solid #e2ecf4;border-radius:12px;background:#fbfdff}.admin-user-data-cell span{display:block;font-size:11px;color:#73879a;font-weight:800;margin-bottom:5px}.admin-user-data-cell b{display:block;overflow-wrap:anywhere;color:#183b56}.admin-user-password-cell{grid-column:1/-1;background:linear-gradient(135deg,#f8fbff,#eef7ff);border-color:#cfe1f1}.admin-user-secret{display:flex;align-items:center;gap:7px;min-width:0}.admin-user-secret b{font-size:15px;flex:1;min-width:0;word-break:break-all}.icon-btn{border:1px solid #cfdfea;background:#fff;border-radius:9px;width:34px;height:34px;display:grid;place-items:center;cursor:pointer;flex:0 0 auto}.icon-btn:hover{background:#eef7ff}
.admin-user-actions-title{margin-top:13px;margin-bottom:7px;font-size:11px;color:#71879a;font-weight:900}.admin-user-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.admin-user-action{border:1px solid #d6e3ee;border-radius:10px;padding:9px 7px;background:#f8fbfe;color:#17324d;font-weight:800;cursor:pointer;min-height:40px;transition:.15s ease}.admin-user-action:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(18,58,112,.08)}.admin-user-action.primary{background:#1769d1;border-color:#1769d1;color:#fff}.admin-user-action.secondary{background:#eef4f9}.admin-user-action.success{background:#e7f8f0;border-color:#bce6d2;color:#116d4b}.admin-user-action.warning{background:#fff5db;border-color:#efd795;color:#765600}.admin-user-action.danger{background:#fdeaea;border-color:#efc0c0;color:#9c2828}.admin-user-action:disabled{opacity:.55;cursor:not-allowed;transform:none;box-shadow:none}
.admin-user-inline-slot{grid-column:1/-1;margin-top:4px}.admin-user-inline-slot[hidden]{display:none}
.admin-empty-card{padding:24px;border:1px dashed #bfd3e3;border-radius:16px;background:#fbfdff;text-align:center;color:#6b7f93;font-weight:800;grid-column:1/-1}
@media(max-width:900px){.admin-users-cards{grid-template-columns:1fr}.admin-users-toolbar{align-items:flex-start;flex-direction:column}.admin-user-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.admin-user-card-body{grid-template-columns:1fr 1fr}.admin-user-password-cell{grid-column:1/-1}.admin-user-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-user-card-head{flex-direction:column}.admin-user-status-wrap{align-items:flex-start}.admin-users-toolbar{padding:12px}.admin-user-card{padding:13px}}
.admin-page{background:linear-gradient(180deg,#f4f8fc 0%,#eef4f9 55%,#f7fafc 100%);color:#17324d}
.admin-page .top{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);border-bottom:1px solid #dbe7f1;box-shadow:0 5px 22px rgba(18,58,112,.07)}
.admin-page main.wrap{padding-top:24px;padding-bottom:50px}
.admin-page .card{border:1px solid #dbe7f1;border-radius:18px;box-shadow:0 8px 28px rgba(18,58,112,.06);background:rgba(255,255,255,.97)}
.admin-page #dashboard>.card,.admin-page #dashboard>section{overflow:visible}
.admin-page h2{font-size:24px;letter-spacing:-.2px}.admin-page h3{font-size:18px}
.admin-customer-search{background:linear-gradient(135deg,#ffffff,#f7fbff)!important}
.status-filter-card{border:1px solid #dbe7f1;border-radius:18px;background:#fff;padding:15px 16px;box-shadow:0 8px 24px rgba(18,58,112,.05);margin:15px 0}
.status-filter-title{font-weight:900;color:#17324d;margin-bottom:11px}
.status-filters{display:flex;flex-wrap:wrap;gap:8px}.status-filter{border:1px solid #d8e4ee;background:#f8fbfe;color:#35536d;border-radius:999px;padding:9px 13px;font-weight:800;cursor:pointer;transition:.18s ease}.status-filter:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(18,58,112,.08)}.status-filter.selected{background:#e9f3ff;border-color:#86b8ea;color:#145a9f;box-shadow:0 4px 12px rgba(23,105,209,.10)}
.admin-status-stack{display:flex;flex-direction:column;align-items:center;gap:6px}.activation-code-mini{display:flex;align-items:center;justify-content:center;gap:5px;padding:4px 6px;border:1px solid #efd58c;border-radius:9px;background:#fff8df;color:#765600;font-weight:900;font-size:13px}.copy-code-btn{border:0;background:#fff;min-width:28px;height:28px;border-radius:7px;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.08)}.copy-code-btn:hover{background:#f4f8fc}.copy-code-menu-btn{font-weight:800}
.activation-admin-panel{display:flex;align-items:center;gap:13px;margin:12px 0;padding:14px 16px;border:1px solid #cfe2f5;border-radius:16px;background:linear-gradient(135deg,#f7fbff,#eef7ff);box-shadow:0 8px 22px rgba(23,105,209,.08);direction:rtl}.activation-admin-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;background:#fff;font-size:23px;box-shadow:0 3px 10px rgba(0,0,0,.06)}.activation-admin-body{flex:1;min-width:0}.activation-admin-body strong{display:block;color:#155d9f;font-size:16px}.activation-admin-body>span{display:block;color:#62798d;font-size:12px;margin-top:3px}.activation-admin-code{display:flex;align-items:center;gap:9px;margin-top:9px}.activation-admin-code>b{font-size:22px;letter-spacing:3px;padding:7px 12px;background:#fff;border:1px dashed #9dc2e5;border-radius:10px;color:#17324d}.activation-admin-close{border:0;background:transparent;color:#71869a;font-size:25px;cursor:pointer;padding:4px 8px}.activation-admin-close:hover{color:#17324d}
.inline-client-panel{border-radius:18px!important;background:linear-gradient(180deg,#f8fbfe,#f2f7fb)!important;border-color:#cbddeb!important;box-shadow:0 10px 28px rgba(18,58,112,.09)!important}.inline-client-head{padding-bottom:12px;border-bottom:1px solid #dce8f1}.inline-client-summary>div{box-shadow:0 3px 10px rgba(18,58,112,.04)}.inline-client-panel table th{background:#edf5fb;color:#21435f;font-weight:900}.inline-client-panel table td,.inline-client-panel table th{padding:10px 9px}.admin-page .table-wrap{border-radius:14px}
.admin-page .action-main,.admin-page .action-menu summary{border-radius:10px!important;font-weight:800!important}.admin-page .action-menu-panel{border:1px solid #d6e3ee!important;border-radius:12px!important;box-shadow:0 12px 30px rgba(18,58,112,.14)!important;background:#fff!important;padding:6px!important}.admin-page .action-menu-btn{border-radius:9px!important;margin:2px 0!important}
.admin-page input,.admin-page select{border-color:#d3e1ec!important;border-radius:11px!important;min-height:44px}.admin-page input:focus,.admin-page select:focus{border-color:#5da1dc!important;box-shadow:0 0 0 3px rgba(23,105,209,.10)!important;outline:none}.admin-page .btn{border-radius:11px;font-weight:800}.admin-page .primary{box-shadow:0 5px 14px rgba(23,105,209,.14)}
@media(max-width:700px){.activation-admin-panel{align-items:flex-start}.activation-admin-code{flex-wrap:wrap}.activation-admin-code>b{font-size:19px}.status-filters{overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.status-filter{white-space:nowrap}}

/* Admin: record transfer + unified password controls */
.record-transfer-toolbar {
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin:14px 0;
  padding:14px;
  border:1px solid #dbe5ef;
  border-radius:12px;
  background:#f8fbff;
}
.record-transfer-controls {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.transfer-target-picker { display:flex; flex-direction:column; gap:6px; min-width:280px; }
.transfer-target-search-label { font-weight:700; color:#23415f; font-size:.92rem; }
.transfer-target-search { width:100%; min-width:280px; box-sizing:border-box; padding:9px 10px; border:1px solid #cbd5e1; border-radius:9px; background:#fff; font:inherit; }
.transfer-target-search-status { display:block; font-size:.82rem; }
.transfer-target-user {
  min-width:280px;
  padding:9px 10px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  background:#fff;
  font:inherit;
}
.record-transfer-check {
  width:18px;
  height:18px;
  cursor:pointer;
}
.admin-unified-password-cell {
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}
.admin-unified-password-cell .btn {
  padding:4px 7px;
}
@media (max-width:700px) {
  .transfer-target-user, .transfer-target-search { min-width:0; width:100%; }
  .transfer-target-picker { min-width:0; width:100%; }
  .record-transfer-controls { width:100%; }
  .record-transfer-controls .btn { flex:1; }
}

/* ADMIN RECORD CARDS + CLEAR SELECTION */
.admin-records-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}
.admin-record-card{background:#fff;border:1px solid #d9e5ee;border-radius:16px;padding:14px;box-shadow:0 5px 18px rgba(18,58,112,.06);transition:.15s ease}
.admin-record-card.record-selected{border-color:#4c9be8;box-shadow:0 0 0 3px rgba(76,155,232,.12),0 8px 22px rgba(18,58,112,.08);background:#f7fbff}
.admin-record-card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-bottom:10px;margin-bottom:10px;border-bottom:1px solid #e4edf4}
.admin-record-select{display:flex;align-items:center;gap:8px;font-weight:900;color:#174c78;cursor:pointer}
.admin-record-select input{width:20px;height:20px;accent-color:#1976d2}
.admin-record-id{font-size:12px;color:#71879a;font-weight:800}
.admin-record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.admin-record-field{padding:10px 11px;border:1px solid #e4edf4;border-radius:11px;background:#fbfdff;min-width:0}
.admin-record-field span{display:block;font-size:11px;color:#71879a;font-weight:800;margin-bottom:5px}
.admin-record-field b{display:block;word-break:break-word;overflow-wrap:anywhere;color:#183a55}
.admin-record-field-wide,.admin-password-field{grid-column:1/-1}
.unified-email-field{border-color:#bcd9ef;background:#f4faff}
.unified-email-field b{color:#0e5d96}
.admin-secret-line{display:flex;align-items:center;justify-content:space-between;gap:8px}
.admin-secret-line b{font-size:16px}
.selection-counter{margin-top:7px;color:#205b88;font-weight:800}
.password-box{display:flex;align-items:center;justify-content:center;gap:5px;max-width:100%}
.admin-password{word-break:break-all;font-weight:800;direction:ltr}
.password-copy-btn,.password-toggle{border:1px solid #d5e2ec;background:#fff;border-radius:8px;min-width:30px;height:30px;cursor:pointer}
.password-copy-btn:hover,.password-toggle:hover{background:#f1f7fb}
@media(max-width:900px){.admin-records-list{grid-template-columns:1fr}}
@media(max-width:700px){.admin-record-grid{grid-template-columns:1fr}.admin-record-field-wide,.admin-password-field{grid-column:auto}.admin-secret-line{align-items:flex-start;flex-direction:column}}

/* V10.30 - Premium framed cards for client + admin student records */
.record-card-item,
.admin-record-card{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  border:1px solid #cfddea;
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  box-shadow:0 8px 24px rgba(18,58,112,.075),0 2px 5px rgba(18,58,112,.035);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.record-card-item::before,
.admin-record-card::before{
  content:"";
  position:absolute;
  inset:0;
  border:1px solid rgba(255,255,255,.9);
  border-radius:20px;
  pointer-events:none;
  z-index:-1;
}
.record-card-item::after,
.admin-record-card::after{
  content:"";
  position:absolute;
  top:0;
  right:0;
  left:0;
  height:5px;
  background:linear-gradient(90deg,#123a70,#1769d1,#4da5e8);
  opacity:.95;
}
.record-card-item:hover,
.admin-record-card:hover{
  transform:translateY(-3px);
  border-color:#a9c8e3;
  box-shadow:0 14px 34px rgba(18,58,112,.12),0 3px 8px rgba(18,58,112,.045);
}
.record-card-head,
.admin-record-card-head{
  position:relative;
  padding-top:3px;
}
.record-card-name{letter-spacing:.1px}
.record-card-status{flex:0 0 auto}
.record-data-cell,
.admin-record-field{
  border-color:#dce7f0;
  background:linear-gradient(180deg,#fbfdff,#f6faff);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.record-data-cell:hover,
.admin-record-field:hover{
  border-color:#bfd5e8;
  background:#f5faff;
}
.unified-email-field,
.admin-record-card .unified-email-field{
  border-color:#9fc9e8;
  background:linear-gradient(180deg,#f2faff,#eaf6ff);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 3px 10px rgba(23,105,209,.05);
}
.record-card-actions,
.admin-record-card .admin-record-card-head{
  border-color:#dce7f0;
}
.admin-record-card.record-selected{
  border-color:#3b8fd4;
  background:linear-gradient(180deg,#ffffff 0%,#f1f8ff 100%);
  box-shadow:0 0 0 3px rgba(59,143,212,.13),0 15px 34px rgba(18,58,112,.12);
}
.admin-record-card.record-selected::after{
  background:linear-gradient(90deg,#159a68,#2f9fdb,#1769d1);
}
.admin-record-select{
  padding:7px 10px;
  border:1px solid #d6e4ef;
  border-radius:11px;
  background:#f8fbfe;
}
.admin-record-card.record-selected .admin-record-select{
  border-color:#9bc7e7;
  background:#eaf5ff;
}

/* General section/card frame refinement on both client and admin pages */
.card{
  border-color:#d5e2ed;
  box-shadow:0 8px 28px rgba(18,58,112,.065),0 2px 5px rgba(18,58,112,.025);
}
.card > h2,.card > h3{color:#123a70}

@media(max-width:700px){
  .record-card-item,.record-card-item::before,.admin-record-card,.admin-record-card::before{border-radius:17px}
  .record-card-item:hover,.admin-record-card:hover{transform:none}
}


/* V10.31 inbox grouping: one box per student code, newest message first. */
.inbox-student-box{background:#fff;border:1px solid #cfdceb;border-radius:18px;margin-bottom:14px;overflow:hidden;box-shadow:0 5px 18px rgba(20,55,90,.07)}
.inbox-student-head{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:15px 16px;background:linear-gradient(135deg,#f2f8ff,#fff);border-bottom:1px solid #dce6f0}
.inbox-student-title{font-size:17px;font-weight:900;color:#17324d}
.inbox-student-email{margin-top:5px;font-size:13px;color:#5f748a}
.inbox-student-count{display:flex;flex-direction:column;align-items:flex-end;gap:3px;white-space:nowrap;font-size:13px;color:#526b82}
.inbox-student-count b{font-size:18px;color:#17324d}
.inbox-student-count span{font-size:12px}
.inbox-message-stack{padding:7px}
.inbox-message-row{width:100%;display:flex;justify-content:space-between;align-items:center;gap:14px;text-align:right;direction:rtl;border:1px solid transparent;border-radius:12px;background:#fff;padding:12px 13px;margin:3px 0;cursor:pointer;transition:.15s ease}
.inbox-message-row:hover{background:#f5f9ff;border-color:#b9d0e8;transform:translateY(-1px)}
.inbox-message-row.unread{background:#eef6ff;border-right:5px solid #0b57d0;font-weight:800}
.inbox-message-row.read{border-right:5px solid #d7e0ea}
.inbox-message-main{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.inbox-message-subject{font-size:15px;font-weight:800;color:#17324d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inbox-message-from{font-size:12px;color:#6b7f93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inbox-message-time{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:110px;font-size:11px;color:#71839a;white-space:nowrap}
.inbox-message-time b{color:#0b57d0;font-size:11px}
@media(max-width:700px){.inbox-student-head{align-items:flex-start;flex-direction:column}.inbox-student-count{align-items:flex-start}.inbox-message-row{align-items:flex-start}.inbox-message-time{min-width:90px}}


/* V10.32 inbox premium compact layout: keep the inbox dense and open message content in a modal. */
.inbox-layout-compact{display:block;direction:rtl}
.inbox-list-panel-wide{max-height:none;overflow:visible;padding:0}
.inbox-list-panel-wide #inboxList{display:block;width:100%;min-width:0}
.inbox-student-box{margin:0;border:1px solid #cdddea;border-radius:16px;box-shadow:0 6px 18px rgba(18,58,112,.065);overflow:hidden;background:#fff}
.inbox-student-head{min-height:70px;padding:11px 13px;background:linear-gradient(135deg,#f4f9fe,#fff);border-bottom:1px solid #e0e8ef}
.inbox-student-title{font-size:15px;line-height:1.35}
.inbox-student-email{font-size:12px;margin-top:4px;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inbox-student-count{font-size:11px;gap:2px}
.inbox-student-count b{font-size:16px}
.inbox-student-count span{font-size:10px}
.inbox-message-stack{padding:5px;background:#fbfdff}
.inbox-message-row{min-height:52px;padding:7px 9px;margin:2px 0;border-radius:10px;gap:8px;border:1px solid #e5edf4}
.inbox-message-row:hover{transform:none;background:#f3f8fd;border-color:#b8d0e5;box-shadow:0 2px 7px rgba(18,58,112,.06)}
.inbox-message-row.unread{border-right:4px solid #0b57d0;background:#eef6ff}
.inbox-message-row.read{border-right:4px solid #d6e0e9}
.inbox-message-main{gap:2px;min-width:0}
.inbox-message-subject{font-size:13px;line-height:1.35}
.inbox-message-from{font-size:10px;line-height:1.2}
.inbox-message-time{min-width:82px;gap:1px;font-size:9px;align-items:flex-start}
.inbox-message-time b{font-size:9px}
.message-modal{display:none;position:fixed;inset:0;z-index:9999;align-items:center;justify-content:center;padding:22px}
.message-modal.open{display:flex}
.message-modal-backdrop{position:absolute;inset:0;background:rgba(8,29,50,.48);backdrop-filter:blur(3px)}
.message-modal-dialog{position:relative;z-index:1;width:min(920px,96vw);max-height:90vh;background:#fff;border:1px solid #cbdbe8;border-radius:20px;box-shadow:0 24px 70px rgba(0,0,0,.25);overflow:hidden}
.message-modal-content{max-height:90vh;overflow:auto;padding:20px;direction:rtl}
.message-modal-content .message-identity{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.message-modal-content .message-code,.message-modal-content .message-alt{background:#f2f7fb;border:1px solid #d5e2ed;border-radius:11px;padding:9px 12px}
.message-modal-content iframe{min-height:360px!important;max-height:46vh}
.message-modal-content h2{margin:0}
.message-modal-open{overflow:hidden}
@media(max-width:900px){.inbox-list-panel-wide #inboxList{display:block;width:100%}.message-modal{padding:10px}.message-modal-dialog,.message-modal-content{max-height:94vh}.message-modal-content{padding:14px}}

/* V10.37 inbox: student codes in a right-hand column, messages in the main panel. */
.inbox-code-message-layout{display:grid;grid-template-columns:20% minmax(0,1fr);gap:14px;direction:rtl;align-items:stretch;min-height:520px;width:100%;box-sizing:border-box}
.inbox-code-sidebar{border:1px solid #d4e1ec;border-radius:16px;background:#f7fbff;overflow:hidden;position:sticky;top:90px;max-height:calc(100vh - 260px)}
.inbox-code-sidebar-title{padding:13px 14px;background:linear-gradient(135deg,#eaf4ff,#fff);border-bottom:1px solid #dbe6ef;font-weight:900;color:#17324d}
.inbox-code-list{padding:7px;overflow:auto;max-height:calc(100vh - 315px)}
.inbox-code-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #dbe5ee;background:#fff;border-radius:11px;padding:10px 9px;margin:4px 0;text-align:right;direction:rtl;cursor:pointer;transition:.15s;box-shadow:0 1px 2px rgba(18,58,112,.03)}
.inbox-code-item:hover{border-color:#a9c7e2;background:#f6faff}
.inbox-code-item.active{border-color:#1769d1;background:#eaf4ff;box-shadow:inset -4px 0 0 #1769d1}
.inbox-code-item-main{min-width:0;display:flex;flex-direction:column;gap:3px}
.inbox-code-item-main strong{font-size:14px;color:#17324d}
.inbox-code-item-main small{font-size:10px;color:#71839a;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inbox-code-item-meta{display:flex;flex-direction:column;align-items:center;min-width:42px;font-size:11px;color:#526b82}
.inbox-code-item-meta b{font-size:16px;color:#17324d}
.inbox-code-item-meta em{font-style:normal;font-size:9px;color:#0b57d0;white-space:nowrap}
.inbox-code-item-meta .read-state{color:#6c7e90}
.inbox-messages-panel{border:1px solid #d4e1ec;border-radius:16px;background:#fff;overflow:hidden;min-width:0}
.inbox-selected-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:linear-gradient(135deg,#f2f8ff,#fff);border-bottom:1px solid #dce6f0}
.inbox-selected-code{font-size:16px;font-weight:900;color:#17324d}
.inbox-selected-email{font-size:11px;color:#667b90;margin-top:4px}
.inbox-selected-count{white-space:nowrap;color:#526b82;font-size:12px}
.inbox-selected-count b{font-size:18px;color:#17324d;margin-left:4px}
.inbox-selected-messages{padding:8px;display:flex;flex-direction:column;gap:5px}
.inbox-selected-messages .inbox-message-row{margin:0;min-height:58px}
@media(max-width:800px){
  .inbox-code-message-layout{grid-template-columns:1fr;min-height:0}
  .inbox-code-sidebar{position:static;max-height:250px}
  .inbox-code-list{max-height:190px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
}
@media(max-width:520px){.inbox-code-list{grid-template-columns:1fr}.inbox-selected-head{align-items:flex-start;flex-direction:column}}

/* V10.43 - full-width records, reduced display fields, alternating row tone */
.records-day-list .record-card-item:nth-child(odd){
  background:linear-gradient(180deg,#eef3f8 0%,#e8eef4 100%);
  border-color:#c4d0dc;
}
.records-day-list .record-card-item:nth-child(even){
  background:linear-gradient(180deg,#ffffff 0%,#f8fbfd 100%);
}
.records-day-list .record-card-item:nth-child(odd) .record-data-cell{background:rgba(255,255,255,.56)}
.records-day-list .record-card-item:nth-child(even) .record-data-cell{background:#fbfdff}
.record-card-item{width:100%;max-width:none}
@media(max-width:900px){
  .records-day-list{display:flex;flex-direction:column;gap:10px}
  .record-card-item{width:100%}
}
@media(max-width:650px){
  .records-card-list{gap:12px}
  .record-card-item{padding:13px;border-radius:15px}
  .record-card-actions{display:grid;grid-template-columns:1fr}
  .record-card-actions .btn{width:100%;min-height:44px}
}


/* V10.39 definitive navigation/version/inbox fixes */
.site-version-badge{display:inline-flex;align-items:center;margin-right:8px;padding:4px 8px;border:1px solid rgba(255,255,255,.35);border-radius:999px;background:rgba(255,255,255,.14);color:#fff;font-size:10px;font-weight:900;white-space:nowrap}
.nav .btn.nav-active{background:#fff!important;color:#123a70!important;border-color:#fff!important;box-shadow:0 4px 12px rgba(0,0,0,.16),inset 0 -2px 0 #1769d1!important;transform:none!important}
.nav .btn.nav-active:hover{background:#fff!important;color:#123a70!important;transform:none!important}
.inbox-layout-compact,.inbox-list-panel-wide,.inbox-list-panel-wide #inboxList{width:100%;min-width:0}
.inbox-list-panel-wide #inboxList{display:block!important}
.inbox-code-message-layout{width:100%;max-width:none;grid-template-columns:minmax(0,1fr) 280px;direction:ltr}
.inbox-code-sidebar{direction:rtl;grid-column:2}
.inbox-messages-panel{direction:rtl;grid-column:1;grid-row:1}
.inbox-code-item,.inbox-message-row{transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}
.inbox-code-item.active{font-weight:900;outline:2px solid #1769d1;outline-offset:1px}
@media(max-width:800px){.inbox-code-message-layout{grid-template-columns:1fr;direction:rtl}.inbox-code-sidebar,.inbox-messages-panel{grid-column:auto;grid-row:auto}.site-version-badge{font-size:9px;padding:3px 6px;margin-right:4px}}


/* V10.43 - unified navigation, homepage layout, responsive records/inbox/admin */
.nav .nav-active{background:#fff!important;color:#123a70!important;border-color:#fff!important;box-shadow:0 4px 12px rgba(0,0,0,.18),inset 0 -3px 0 #0b57d0!important;font-weight:900!important}
.nav .nav-active:hover{transform:none!important;background:#fff!important;color:#123a70!important}
.home-tools-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch}
.home-tool-card{margin-bottom:0;min-width:0}
.home-tool-card .row{align-items:stretch}
.home-tool-card .btn{min-height:44px}
.record-card-item{width:100%!important;max-width:none!important}
.records-day-list .record-card-item:nth-child(odd){background:#e9eef3!important;border-color:#bcc9d5!important}
.records-day-list .record-card-item:nth-child(even){background:#fff!important;border-color:#dce6f0!important}
.records-day-list .record-card-item:nth-child(odd) .record-data-cell{background:#f5f8fa!important}
.records-day-list .record-card-item:nth-child(even) .record-data-cell{background:#fbfdff!important}
.admin-top-nav{display:flex;gap:7px;align-items:center;flex-wrap:nowrap;margin-right:auto;flex:1 1 0;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:0 0 7px;scrollbar-width:auto;scrollbar-color:#8aa8c4 rgba(255,255,255,.35);overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.admin-top-nav .btn{min-height:40px;text-decoration:none;flex:0 0 auto;white-space:nowrap}
.admin-top-nav::-webkit-scrollbar{height:9px}
.admin-top-nav::-webkit-scrollbar-track{background:rgba(255,255,255,.28);border-radius:999px}
.admin-top-nav::-webkit-scrollbar-thumb{background:#8aa8c4;border-radius:999px;border:2px solid rgba(255,255,255,.35)}
.admin-top-nav::-webkit-scrollbar-thumb:hover{background:#6f91b0}
@media(max-width:850px){.home-tools-grid{grid-template-columns:1fr}.home-tool-card{margin-bottom:0}}
@media(max-width:700px){.home-tools-grid{gap:12px}.admin-top-nav{width:100%;flex:1 1 100%;justify-content:flex-start;padding-bottom:7px}.admin-top-nav .btn{flex:0 0 auto}.top{align-items:flex-start}.nav{max-width:100%}}

/* V10.43 FINAL layout correction */
.wrap{max-width:1400px}
.inbox-code-message-layout{grid-template-columns:minmax(0,18%) minmax(0,82%)!important;width:100%}
.inbox-messages-panel{width:100%;min-width:0}
.admin-records-list{grid-template-columns:1fr!important;width:100%}


/* V10.50 - compact one-row student records with right-side actions */
.records-day-list{gap:10px}
.record-card-item{display:grid;grid-template-columns:minmax(0,1fr) 300px;direction:ltr;align-items:stretch;gap:14px;padding:12px 14px;cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease,background .18s ease}
.record-card-main{direction:rtl;min-width:0}
.record-card-item .record-card-head{margin:0 0 8px;padding:0 0 8px;align-items:center}
.record-card-item .record-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.record-card-item .record-data-cell{padding:8px 9px;min-height:48px;justify-content:center}
.record-card-item .record-data-cell span{font-size:11px}
.record-card-item .record-data-cell b{font-size:13px}
.record-card-actions{direction:rtl;display:flex;flex-direction:column;justify-content:center;gap:7px;margin:0;padding:0;border:0;border-right:1px solid #dfe8f1;padding-right:14px}
.record-card-actions .btn{flex:0 0 auto;width:100%;min-height:40px}
.record-card-item:hover{border-color:#72a9e6;box-shadow:0 7px 20px rgba(18,76,140,.12);transform:translateY(-1px)}
.record-card-item.record-card-active{border:2px solid #1769d1!important;background:linear-gradient(180deg,#f7fbff,#eef6ff)!important;box-shadow:0 0 0 3px rgba(23,105,209,.13),0 10px 24px rgba(23,105,209,.13);transform:none}
.record-card-item.record-card-active .record-card-name{color:#0b57b7}
.record-card-item:focus-visible{outline:3px solid rgba(23,105,209,.25);outline-offset:2px}
@media(max-width:1050px){.record-card-item{grid-template-columns:minmax(0,1fr) 250px}.record-card-item .record-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.record-card-item{grid-template-columns:1fr;direction:rtl}.record-card-actions{border-right:0;border-top:1px solid #dfe8f1;padding-right:0;padding-top:10px;display:grid;grid-template-columns:1fr}.record-card-item .record-card-grid{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.record-card-item .record-card-grid{grid-template-columns:1fr}.record-card-actions .btn{min-height:44px}}

/* V10.51 - Student alternate-email creation: national ID + code + ministry name on one row, phone below */
.student-create-form{width:100%}
.student-create-main-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:end}
.student-create-phone-row{margin-top:14px}
.student-name-hidden-field{display:none!important}
.student-name-source-note{margin-top:8px;font-size:12px;text-align:right}
@media(max-width:850px){.student-create-main-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.student-create-main-row{grid-template-columns:1fr}.student-name-source-note{font-size:11px}}

/* V10.57 - inbox layout: messages larger on the LEFT, student codes smaller on the RIGHT */
.inbox-code-message-layout{
  grid-template-columns:minmax(0,20%) minmax(0,80%) !important;
  direction:rtl !important;
  width:100%;
  max-width:none;
}
.inbox-messages-panel{width:100%;min-width:0;}
.inbox-code-sidebar{width:100%;min-width:0;}
@media(max-width:800px){
  .inbox-code-message-layout{grid-template-columns:1fr !important;direction:rtl !important;}
}

/* V10.60 inbox final layout: student codes RIGHT 20%, messages LEFT remaining space. */
.inbox-code-message-layout{grid-template-columns:minmax(170px,20%) minmax(0,1fr)!important;direction:rtl!important;width:100%;box-sizing:border-box;}
.inbox-code-sidebar{grid-column:1;grid-row:1;}
.inbox-messages-panel{grid-column:2;grid-row:1;min-width:0;}
@media(max-width:800px){.inbox-code-message-layout{grid-template-columns:1fr!important;}.inbox-code-sidebar,.inbox-messages-panel{grid-column:1;grid-row:auto;}}


/* V10.61 - FINAL A4 PRINT FIX: exact A4 geometry, no clipping/overflow */
@media print{
  @page{size:A4 portrait;margin:0!important}
  html,body{width:210mm!important;min-width:210mm!important;max-width:210mm!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important;overflow:visible!important}
  body{direction:rtl!important}
  .print-sheet{
    width:210mm!important;height:297mm!important;min-height:297mm!important;max-height:297mm!important;
    margin:0!important;padding:8mm 12mm!important;box-sizing:border-box!important;
    border:0!important;box-shadow:none!important;overflow:hidden!important;zoom:1!important;
    break-after:page!important;page-break-after:always!important;break-inside:avoid!important;page-break-inside:avoid!important;
    display:flex!important;flex-direction:column!important;direction:rtl!important;
  }
  .print-sheet:last-child{break-after:auto!important;page-break-after:auto!important}
  .print-government-header{width:100%!important;text-align:center!important;padding:0!important;margin:0!important}
  .ministry-logo{width:28mm!important;height:24mm!important;object-fit:contain!important;margin:0 auto 1mm!important;display:block!important}
  .government-title{font-size:14px!important;line-height:1.2!important;margin:0 0 3mm!important}
  .print-registration-banner{width:100%!important;text-align:center!important;margin:0 0 3mm!important;padding:0!important}
  .print-registration-title{font-size:10px!important;line-height:1.25!important;margin:0 0 1mm!important}
  .print-registration-subtitle{font-size:13px!important;line-height:1.2!important;margin:0 0 1mm!important}
  .print-success-icon{width:7mm!important;height:7mm!important;line-height:7mm!important;font-size:5mm!important;margin:0 auto 1mm!important}
  .print-success-title{font-size:10px!important;line-height:1.2!important;margin:0 0 1mm!important}
  .print-success-note{font-size:7.5px!important;line-height:1.35!important;max-width:115mm!important;margin:0 auto!important}
  .print-main-title{width:100%!important;text-align:center!important;font-size:16px!important;line-height:1.2!important;padding:2.5mm 0!important;margin:0 0 4mm!important;border-top:1.5px solid #111!important;border-bottom:1.5px solid #111!important}
  .print-table{width:100%!important;border:1.2px solid #111!important;box-sizing:border-box!important;direction:rtl!important}
  .print-row{width:100%!important;display:grid!important;grid-template-columns:30% 70%!important;min-height:16mm!important;height:16mm!important;box-sizing:border-box!important;border-bottom:1px solid #111!important;direction:rtl!important}
  .print-row:last-child{border-bottom:0!important}
  .print-row strong{display:flex!important;align-items:center!important;justify-content:flex-start!important;width:auto!important;min-width:0!important;padding:2mm 3mm!important;border-left:1px solid #111!important;border-right:0!important;font-size:11px!important;line-height:1.15!important;text-align:right!important;white-space:normal!important;overflow-wrap:anywhere!important;box-sizing:border-box!important}
  .print-row span{display:flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:0!important;padding:2mm 3mm!important;font-size:12px!important;line-height:1.2!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;box-sizing:border-box!important}
  .print-footer{margin-top:auto!important;padding-top:4mm!important;font-size:8.5px!important;line-height:1.2!important}
}


/* V10.70 - customer announcement modal */
.fekra-announcement-backdrop{position:fixed;inset:0;z-index:99999;background:rgba(9,27,45,.58);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:18px}
.fekra-announcement-card{position:relative;width:min(620px,96vw);max-height:min(78vh,760px);overflow:auto;background:#fff;border:1px solid #d9e6f0;border-radius:24px;box-shadow:0 24px 70px rgba(0,0,0,.25);padding:32px;text-align:center;animation:fekraAnnIn .18s ease-out}
.fekra-announcement-icon{font-size:42px;margin-bottom:6px}.fekra-announcement-card h2{margin:0 0 14px;color:#123653}.fekra-announcement-body{font-size:17px;line-height:1.9;color:#405a70;white-space:normal;text-align:right;background:#f7fbfe;border:1px solid #e2edf5;border-radius:16px;padding:18px;margin-bottom:20px}.fekra-announcement-close{position:absolute;left:14px;top:12px;width:38px;height:38px;border:0;border-radius:50%;background:#eef4f8;color:#38556c;font-size:25px;cursor:pointer}.fekra-announcement-close:hover{background:#e3edf4}.fekra-announcement-ok{min-width:130px}@keyframes fekraAnnIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:600px){.fekra-announcement-card{padding:25px 18px;border-radius:18px}.fekra-announcement-body{font-size:15px}}

/* V10.73 - A4 print content at 95% scale */
@media print {
  .print-sheet {
    transform: scale(0.95);
    transform-origin: top center;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: -14.85mm !important;
  }
}

/* V10.74 - FINAL A4 PRINT: physical 95% content area on an A4 sheet */
@media print {
  @page { size: A4 portrait; margin: 0 !important; }
  html, body { width: 210mm !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .print-sheet {
    width: 199.5mm !important;
    height: 282.15mm !important;
    min-height: 282.15mm !important;
    max-height: 282.15mm !important;
    margin: 7.425mm auto !important;
    padding: 7mm 10mm !important;
    box-sizing: border-box !important;
    transform: none !important;
    zoom: 1 !important;
    overflow: hidden !important;
    border: 0 !important;
    box-shadow: none !important;
    break-after: page !important;
    page-break-after: always !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  .print-sheet:last-child { break-after: auto !important; page-break-after: auto !important; }
}

/* V10.75 - hard override: A4 physical page with 95% content area */
@media print {
  @page { size: 210mm 297mm; margin: 0 !important; }
  html, body { width:210mm !important; min-width:210mm !important; height:auto !important; margin:0 !important; padding:0 !important; background:#fff !important; }
  .print-sheet {
    width:199.5mm !important;
    height:282.15mm !important;
    min-height:282.15mm !important;
    max-height:282.15mm !important;
    margin:7.425mm auto !important;
    padding:7mm 10mm !important;
    box-sizing:border-box !important;
    transform:none !important;
    zoom:1 !important;
    overflow:hidden !important;
    border:0 !important;
    box-shadow:none !important;
    break-inside:avoid !important;
    page-break-inside:avoid !important;
    break-after:page !important;
    page-break-after:always !important;
  }
  .print-sheet:last-child { break-after:auto !important; page-break-after:auto !important; }
}


/* V10.84 Fekra polish: home tools, records hero, ministry cookie action */
.premium-tool-card{padding:0;overflow:hidden;border:1px solid #d7e5f2;box-shadow:0 8px 28px rgba(18,58,112,.07)}
.tool-card-head{display:flex;gap:14px;align-items:center;padding:20px 20px 16px;background:linear-gradient(135deg,#f5faff,#ffffff);border-bottom:1px solid #e1ebf4}
.tool-card-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:#eaf4ff;font-size:26px;flex:0 0 auto}
.tool-card-head h2{margin:0 0 5px;color:#123f78;font-size:20px}
.tool-card-head p{margin:0;color:#6d8094;line-height:1.65;font-size:13px}
.tool-steps{display:flex;gap:8px;flex-wrap:wrap;padding:14px 20px 0}
.tool-steps span{display:inline-flex;align-items:center;gap:6px;background:#f7fafc;border:1px solid #e1eaf2;border-radius:999px;padding:7px 10px;font-size:12px;color:#476177;font-weight:700}
.tool-steps b{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#166bc7;color:#fff;font-size:11px}
.tool-actions-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:16px 20px 12px}
.tool-actions-grid .btn{width:100%;min-height:44px}
.tool-note{margin:0 20px 20px;padding:11px 13px;border:1px solid #e0eaf3;border-radius:11px;background:#f8fbfe;color:#60768b;font-size:12px;line-height:1.7}
.password-setting-box{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px 20px 12px}
.password-setting-box .field{margin:0}
.records-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;margin:-1px -1px 14px;background:linear-gradient(135deg,#f4f9ff,#fff);border:1px solid #dce9f4;border-radius:15px}
.records-hero h2{margin:2px 0 5px;color:#123f78;font-size:23px}
.records-hero p{margin:0;color:#6d8094;line-height:1.7;font-size:13px}
.section-kicker{font-size:11px;font-weight:900;color:#1871cf;letter-spacing:.2px}
.records-hero-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.records-summary-pill{background:#fff;border:1px solid #d9e6f1;border-radius:999px;padding:9px 12px;color:#60768b;font-size:12px;white-space:nowrap}
.clear-ministry-cookies-btn{white-space:nowrap}
@media(max-width:850px){.tool-actions-grid{grid-template-columns:1fr}.password-setting-box{grid-template-columns:1fr}.records-hero{align-items:flex-start;flex-direction:column}.records-hero-actions{justify-content:flex-start}}

/* V10.89 records safety + zoom-friendly actions */
.nav-print-btn{display:inline-flex!important;flex-direction:column;align-items:center;justify-content:center;gap:2px;line-height:1.05!important;min-width:150px!important;padding:7px 12px!important}
.nav-print-main{font-size:17px;font-weight:900;display:block}
.nav-print-sub{font-size:10px;font-weight:700;opacity:.9;display:block;white-space:nowrap}
.print-subtitle-strong{margin:-8px 0 8px;font-size:14px;font-weight:900;color:#1769d1}
.admin-record-select-group{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.admin-record-delete-select{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:800;color:#8b1e1e}
.admin-record-delete-select input{accent-color:#d94b4b}
.admin-record-delete-locked{font-size:12px;font-weight:800;color:#667b8f;background:#eef4f9;border-radius:9px;padding:6px 9px}
.admin-record-delete-action{display:flex;align-items:center;justify-content:space-between;gap:10px}
.admin-record-card.record-delete-selected{border-color:#d94b4b;box-shadow:0 0 0 2px rgba(217,75,75,.12)}
.record-delete-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:12px;border:1px solid #f0c8c8;border-radius:14px;background:#fff8f8}
.record-delete-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.admin-record-sticky-bar{position:fixed;left:0;right:0;bottom:0;z-index:1200;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:rgba(255,255,255,.97);border-top:1px solid #cfdbe7;box-shadow:0 -7px 24px rgba(18,58,112,.16);backdrop-filter:blur(7px)}
.admin-record-sticky-count{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px}
.admin-record-sticky-count span{padding:5px 9px;border-radius:999px;background:#eef4f9;font-weight:800}
.admin-record-sticky-actions{display:flex;gap:8px;flex-wrap:wrap}
.inline-client-panel{padding-bottom:82px!important}
@media(max-width:700px){.nav-print-btn{min-width:130px!important}.nav-print-main{font-size:15px}.nav-print-sub{font-size:9px}.record-delete-toolbar{align-items:stretch;flex-direction:column}.admin-record-sticky-bar{padding:8px 10px;align-items:stretch;flex-direction:column}.admin-record-sticky-actions{display:grid;grid-template-columns:1fr 1fr}.admin-record-sticky-actions .btn{width:100%}}

/* V10.91 admin records controls */
.admin-print-link{display:inline-flex!important;flex-direction:column;align-items:center;justify-content:center;line-height:1.05!important;gap:2px;min-width:150px}
.admin-print-link small{font-size:9px;font-weight:700;opacity:.9}
.admin-record-sticky-bar{position:sticky!important;bottom:8px!important;left:auto!important;right:auto!important;margin:14px -10px -10px;padding:10px 12px!important;border:1px solid #cfdbe7;border-radius:14px;box-shadow:0 -5px 20px rgba(18,58,112,.12);background:rgba(255,255,255,.98)}
.inline-client-panel{padding-bottom:12px!important}
@media(max-width:700px){.admin-print-link{min-width:130px}.admin-record-sticky-bar{margin:12px 0 -4px;position:sticky!important}.admin-record-sticky-actions{grid-template-columns:1fr 1fr}}

/* V10.92 - Admin compact dashboard, advanced search, credit result modal */
.admin-dashboard-stat{min-height:92px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}
.admin-dashboard-stat b{font-size:25px;margin-top:5px}
.admin-advanced-search{padding:0;overflow:hidden}
.admin-advanced-search>summary{list-style:none;cursor:pointer;padding:16px 18px;font-weight:900;font-size:16px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f7fbff}
.admin-advanced-search>summary::-webkit-details-marker{display:none}
.admin-advanced-search>summary:before{content:'▸';font-size:14px;margin-left:8px;transition:.15s}
.admin-advanced-search[open]>summary:before{transform:rotate(90deg)}
.admin-advanced-search>summary span{font-size:12px;color:#6b8094;font-weight:700;margin-right:auto}
.admin-advanced-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px}
.admin-search-box{padding:14px;border:1px solid #dce8f2;border-radius:15px;background:#fff}
.admin-search-box-wide{grid-column:1/-1}
.admin-search-box h3{margin:0 0 5px;font-size:15px}
.admin-user-compact-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:11px}
.admin-user-compact-meta>div{padding:9px 10px;border:1px solid #e2ecf4;border-radius:11px;background:#fbfdff}
.admin-user-compact-meta span{display:block;color:#73879a;font-size:11px;font-weight:800;margin-bottom:3px}
.admin-user-compact-meta b{display:block;color:#183b56}
.admin-user-actions{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:7px!important;margin-top:12px}
.admin-user-action.icon-action{min-height:55px;padding:7px 4px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:18px}
.admin-user-action.icon-action small{font-size:10px;font-weight:900;line-height:1.1}
.admin-more-menu{position:relative;min-width:0}
.admin-more-menu>summary{list-style:none;height:100%;border:1px solid #d6e3ee;border-radius:10px;background:#f8fbfe;color:#17324d;font-weight:900;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:20px}
.admin-more-menu>summary::-webkit-details-marker{display:none}
.admin-more-menu>summary small{font-size:10px}
.admin-more-panel{position:absolute;z-index:1300;right:0;top:calc(100% + 6px);width:210px;background:#fff;border:1px solid #d5e2ed;border-radius:13px;padding:6px;box-shadow:0 15px 35px rgba(18,58,112,.18)}
.admin-more-item{width:100%;border:0;background:#fff;border-radius:9px;padding:9px 10px;text-align:right;cursor:pointer;font:inherit;font-size:12px;font-weight:800;color:#183b56}
.admin-more-item:hover{background:#eef6ff}
.admin-more-item.danger{color:#a32a2a}.admin-more-item.warning{color:#765600}.admin-more-item.success{color:#116d4b}
.admin-result-modal{position:fixed;inset:0;z-index:3000;background:rgba(9,27,48,.48);display:flex;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(4px)}
.admin-result-dialog{width:min(420px,100%);background:#fff;border-radius:22px;padding:24px 20px 20px;text-align:center;box-shadow:0 25px 70px rgba(0,0,0,.22);animation:adminResultIn .16s ease-out}
.admin-result-icon{width:58px;height:58px;margin:0 auto 9px;border-radius:50%;display:grid;place-items:center;background:#eaf8f0;font-size:27px}
.admin-result-dialog h3{margin:0 0 12px;font-size:20px;color:#17324d}
.admin-result-body{font-size:15px;line-height:2;color:#536a7d}
.admin-result-body b{color:#17324d;font-size:16px}
.admin-result-current{font-size:12px;color:#71879a}
.admin-result-balance{font-size:27px!important;display:inline-block;line-height:1.2;margin-top:2px}
.admin-result-ok{min-width:130px;margin-top:16px}
@keyframes adminResultIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:900px){.admin-user-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important}.admin-advanced-grid{grid-template-columns:1fr}.admin-search-box-wide{grid-column:auto}}
@media(max-width:620px){.admin-user-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important}.admin-user-action.icon-action{min-height:52px}.admin-user-card{padding:12px}.admin-advanced-search>summary{padding:14px}.admin-advanced-search>summary span{font-size:10px}.admin-more-panel{position:fixed;left:12px;right:12px;bottom:12px;top:auto;width:auto}.admin-result-dialog{padding:22px 15px 17px}}

/* V10.97 - simplified main navigation + side menu */
.nav{display:flex;align-items:center;gap:7px;flex:1 1 auto;min-width:0;overflow:hidden;justify-content:flex-start}
.nav .nav-main-btn{flex:0 1 auto;min-width:0;white-space:nowrap}
.nav-more-btn{flex:0 0 auto;white-space:nowrap;background:rgba(255,255,255,.2)!important;color:#fff!important;border:1px solid rgba(255,255,255,.42)!important}
.more-menu-overlay{position:fixed;inset:0;background:rgba(8,31,58,.42);z-index:9998;opacity:0;transition:opacity .2s ease;backdrop-filter:blur(2px)}
.more-menu-overlay.is-open{opacity:1}
.more-menu{position:fixed;top:0;left:0;right:auto;width:min(360px,92vw);height:100vh;background:#fff;color:#17324d;z-index:9999;box-shadow:10px 0 35px rgba(0,0,0,.2);transform:translateX(-105%);transition:transform .22s ease;display:flex;flex-direction:column;direction:rtl}
.more-menu.is-open{transform:translateX(0)}
.more-menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 18px 14px;background:linear-gradient(135deg,#123a70,#1769d1);color:#fff}
.more-menu-head strong{display:block;font-size:18px}.more-menu-head small{display:block;margin-top:4px;opacity:.9;font-size:11px}
.more-menu-close{width:40px;height:40px;border:1px solid rgba(255,255,255,.45);border-radius:10px;background:rgba(255,255,255,.14);color:#fff;font-size:18px;cursor:pointer}
.more-menu-list{padding:14px;display:flex;flex-direction:column;gap:9px;overflow:auto}
.more-menu-item{display:flex;align-items:center;gap:12px;width:100%;min-height:50px;padding:12px 14px;border:1px solid #dbe5ef;border-radius:12px;background:#f7fbff;color:#17324d;text-decoration:none;font:inherit;font-weight:800;cursor:pointer;text-align:right}
.more-menu-item:hover{background:#eef5fb;border-color:#b9cde1}.more-menu-item.danger-item{color:#9b2424;background:#fff4f4;border-color:#f1caca}
.more-menu-item span{flex:1}
body.more-menu-open{overflow:hidden}
@media(max-width:760px){.top{min-height:64px}.nav{gap:5px;overflow:hidden}.nav .nav-main-btn{padding:8px 9px!important;font-size:12px!important}.nav .nav-print-btn{min-width:108px!important}.nav-more-btn{padding:8px 10px!important;font-size:12px!important}.more-menu{left:0;right:auto;width:min(340px,94vw)}}
/* V10.102 — force customer cards to render all records in the main admin grid */
.admin-users-cards{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:16px !important;align-items:start !important;}
.admin-users-cards>.admin-user-card{width:auto !important;margin:0 !important;box-sizing:border-box !important;}
@media(max-width:900px){.admin-users-cards{grid-template-columns:1fr !important;}}


/* V10.103 — authoritative customer cards layout */
#usersCards.admin-users-cards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  align-items: start !important;
}
#usersCards.admin-users-cards > .admin-user-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
@media (max-width: 900px) {
  #usersCards.admin-users-cards { grid-template-columns: 1fr !important; }
}

/* V10.103 — five dashboard statistics in one row */
#summary.grid.admin-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
}
#summary.grid.admin-summary-grid > .stat { width: auto !important; min-width: 0 !important; margin: 0 !important; }
@media (max-width: 900px) { #summary.grid.admin-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; } }
@media (max-width: 520px) { #summary.grid.admin-summary-grid { grid-template-columns: 1fr !important; } }
/* V10.104 — force customer accounts section to remain visible */
.admin-users-section{display:block !important;visibility:visible !important;opacity:1 !important;position:relative !important;clear:both !important;min-height:80px !important;}
.admin-users-section .admin-users-toolbar{display:flex !important;visibility:visible !important;opacity:1 !important;}
#usersCards.admin-users-cards{display:grid !important;visibility:visible !important;opacity:1 !important;}
#usersCards.admin-users-cards:empty{min-height:80px !important;display:grid !important;}

.records-bulk-action-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:14px 0;padding:14px 16px;border:2px solid #d7e3ef;border-radius:14px;background:#f8fbff;position:sticky;top:8px;z-index:20;box-shadow:0 4px 14px rgba(20,50,90,.08)}.records-bulk-actions{display:flex;gap:8px;flex-wrap:wrap}.bulk-delete-count{margin-top:5px;font-weight:800}.records-bulk-action-bar .btn{min-height:40px}@media(max-width:700px){.records-bulk-action-bar{position:static;flex-direction:column;align-items:stretch}.records-bulk-actions{width:100%}.records-bulk-actions .btn{flex:1}}


/* V10.111 — customer More menu is portaled to body to eliminate grid/card clipping and stacking-context bugs */
.admin-more-trigger{position:relative!important;z-index:1!important;min-width:0!important;}
.admin-global-more-panel{position:fixed;display:block;width:280px;max-width:calc(100vw - 20px);max-height:calc(100vh - 20px);overflow:auto;background:#fff;color:#17324d;border:1px solid #cfddea;border-radius:14px;padding:7px;box-shadow:0 18px 48px rgba(18,58,112,.24),0 4px 12px rgba(0,0,0,.12);direction:rtl;text-align:right;}
.admin-global-more-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px 9px;margin-bottom:4px;border-bottom:1px solid #e3edf5;color:#17324d;}
.admin-global-more-head strong{font-size:12px;font-weight:900;}
.admin-global-more-close{width:30px;height:30px;border:1px solid #d6e3ee;border-radius:8px;background:#f7fbff;color:#536b80;font-size:20px;line-height:1;cursor:pointer;}
.admin-global-more-close:hover{background:#eef5fb;color:#17324d;}
.admin-global-more-list{display:flex;flex-direction:column;gap:4px;}
.admin-global-more-panel .admin-more-item{display:flex;align-items:center;justify-content:flex-start;gap:6px;width:100%;min-height:38px;border:0;background:#fff;border-radius:9px;padding:8px 10px;text-align:right;cursor:pointer;font:inherit;font-size:12px;font-weight:800;color:#183b56;}
.admin-global-more-panel .admin-more-item:hover{background:#eef6ff;}
.admin-global-more-panel .admin-more-item.danger{color:#a32a2a;background:#fff8f8;}
.admin-global-more-panel .admin-more-item.warning{color:#765600;}
.admin-global-more-panel .admin-more-item.success{color:#116d4b;}
@media(max-width:620px){.admin-global-more-panel{width:calc(100vw - 20px);max-width:calc(100vw - 20px);}}

/* V10.116 administrative customer visibility */
.admin-user-card-hidden { opacity: .86; }
.status-filter.filter-hidden { border-style: dashed; }

/* V10.137 inbox sidebar: code only, alternate email below. */
.inbox-code-item-main{gap:2px}
.inbox-code-item-main strong{font-size:15px;font-weight:900;letter-spacing:.2px}
.inbox-code-item-main small{font-size:10px;font-weight:500}
.inbox-code-item-meta{display:none!important}

/* V10.139 - print page footer branding */
.print-footer{color:#c62828!important;text-align:center!important;margin-top:auto!important;padding-top:8mm!important;font-weight:700!important;line-height:1.35!important}
.print-footer-tag{margin-top:2mm!important;font-size:1.08em!important;font-weight:800!important}
@media print{.print-footer{color:#c62828!important;padding-top:6mm!important}.print-footer-tag{margin-top:1.5mm!important}}

/* V10.139 Security Audit */
.security-audit-panel{margin:14px 0;padding:14px;border:1px solid var(--border,#ddd);border-radius:14px;background:var(--card,#fff)}
.security-audit-head h3{margin:0 0 4px}
.security-audit-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin-top:12px}
.security-audit-card{padding:12px;border:1px solid var(--border,#ddd);border-radius:12px;background:rgba(127,127,127,.035);display:grid;gap:8px}
.security-audit-card>div{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.security-audit-card span{color:var(--muted,#666);font-size:.9em}
.security-audit-card b{overflow-wrap:anywhere}


/* V10.151 — responsive primary navigation: keep More visible on phones */
.more-menu-item.nav-collapsed-item {
  appearance: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  justify-content: flex-start;
  white-space: normal;
  text-align: right;
  color: #17324d !important;
  background: #f7fbff !important;
  border: 1px solid #dbe5ef !important;
  min-height: 50px;
  padding: 12px 14px !important;
  flex: 0 0 auto !important;
}
.more-menu-item.nav-collapsed-item .nav-print-main { display: inline; }
.more-menu-item.nav-collapsed-item .nav-print-sub { display: inline; margin-inline-start: 5px; font-size: 12px; }
@media (max-width: 760px) {
  .nav { justify-content: flex-end; overflow: visible; }
  .nav-more-btn { margin-inline-start: auto; }
  .top { flex-wrap: wrap; }
  .nav-collapsed-item { width: 100% !important; }
}


/* V10.163 inbox: show confirmation codes directly in message cards. */
.inbox-message-card-wrap{margin:4px 0;border:1px solid #e5edf4;border-radius:12px;background:#fff;overflow:hidden}
.inbox-message-card-wrap .inbox-message-row{border:0;border-radius:0;margin:0}
.inbox-confirmation-code{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;background:#f0f8ff;border-top:1px solid #d9e8f5;color:#183b59;font-size:13px}
.inbox-confirmation-code strong{font-size:20px;letter-spacing:2px;color:#087443;margin-inline-start:6px}
.inbox-copy-code{padding:6px 12px!important;white-space:nowrap;font-size:12px!important}
@media(max-width:560px){.inbox-confirmation-code{align-items:flex-start;flex-direction:column}.inbox-confirmation-code strong{font-size:18px}}


/* V10.171 visual polish */
.home-heading-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.theme-toggle{white-space:nowrap;border:1px solid #cfe0f5;box-shadow:0 3px 10px rgba(23,105,209,.08)}
.student-create-three-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.student-create-three-fields .field{min-width:0}.phone-input-group{display:flex;gap:8px;align-items:stretch}.phone-input-group input{min-width:0;flex:1;width:100%}.phone-input-group .btn{white-space:nowrap;padding:10px 13px}.create-email-actions{display:flex;justify-content:center;margin-top:20px}.create-email-submit{min-width:190px;padding:13px 28px;box-shadow:0 7px 18px rgba(23,105,209,.22);transition:transform .18s ease,box-shadow .18s ease}.create-email-submit:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(23,105,209,.28)}
.zero-credit-contact{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid rgba(180,35,24,.16)}.zero-credit-contact b{font-size:17px;letter-spacing:.3px;direction:ltr}.zero-credit-contact .btn{padding:7px 12px;font-size:12px}
@media(max-width:850px){.student-create-three-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.student-create-three-fields .field:last-child{grid-column:1/-1}}@media(max-width:600px){.student-create-three-fields{grid-template-columns:1fr}.student-create-three-fields .field:last-child{grid-column:auto}.home-heading-row{align-items:stretch}.home-heading-row .theme-toggle{width:100%}.zero-credit-contact{align-items:flex-start;flex-direction:column}}
:root[data-theme="dark"],body[data-theme="dark"]{color-scheme:dark;background:#111827;color:#e5edf7}body[data-theme="dark"]{background:#111827;color:#e5edf7}body[data-theme="dark"] .wrap{color:#e5edf7}
body[data-theme="dark"] .card,body[data-theme="dark"] .message-modal-dialog,body[data-theme="dark"] .message-modal-content,body[data-theme="dark"] .inbox-item,body[data-theme="dark"] .record-card-item,body[data-theme="dark"] .records-filter-panel,body[data-theme="dark"] .records-hero,body[data-theme="dark"] .print-manager-card,body[data-theme="dark"] .setting,body[data-theme="dark"] .password-setting-box,body[data-theme="dark"] .stat,body[data-theme="dark"] .message-view-panel{background:#1f2937!important;color:#e5edf7!important;border-color:#37465a!important;box-shadow:0 8px 24px rgba(0,0,0,.18)}
body[data-theme="dark"] input,body[data-theme="dark"] select,body[data-theme="dark"] textarea{background:#111827!important;color:#f3f6fb!important;border-color:#475569!important}body[data-theme="dark"] input::placeholder,body[data-theme="dark"] textarea::placeholder{color:#94a3b8}body[data-theme="dark"] .muted,body[data-theme="dark"] small,body[data-theme="dark"] .inbox-meta,body[data-theme="dark"] .records-all-data-note{color:#b8c5d6!important}body[data-theme="dark"] .inbox-subject,body[data-theme="dark"] .record-card-name,body[data-theme="dark"] h1,body[data-theme="dark"] h2,body[data-theme="dark"] h3,body[data-theme="dark"] label{color:#f1f5f9}
body[data-theme="dark"] th,body[data-theme="dark"] .inbox-item.unread,body[data-theme="dark"] .record-card-item.record-card-active{background:#26384e!important;color:#f1f5f9!important}body[data-theme="dark"] td,body[data-theme="dark"] th,body[data-theme="dark"] .record-card-grid>div,body[data-theme="dark"] .record-card-actions{border-color:#37465a!important}body[data-theme="dark"] .secondary,body[data-theme="dark"] .badge,body[data-theme="dark"] .records-summary-pill{background:#334155!important;color:#e5edf7!important;border-color:#475569!important}
body[data-theme="dark"] .zero-credit-alert{background:linear-gradient(135deg,#3a2025,#2b1b20)!important;color:#fecaca!important;border-color:#7f333b!important}body[data-theme="dark"] .zero-credit-alert strong{color:#fca5a5!important}body[data-theme="dark"] .zero-credit-contact{border-color:#71343b}body[data-theme="dark"] .created-box{background:#17352d!important;border-color:#28634d!important;color:#d1fae5!important}body[data-theme="dark"] .created-email{background:#10251f!important;color:#d1fae5!important;border-color:#28634d!important}body[data-theme="dark"] .more-menu{background:#1f2937!important;color:#e5edf7!important;border-color:#37465a!important}body[data-theme="dark"] .more-menu-item{background:#26384e!important;color:#e5edf7!important;border-color:#37465a!important}body[data-theme="dark"] .alert{background:#26384e;color:#e5edf7}body[data-theme="dark"] .err{background:#4a2429;color:#fecaca}body[data-theme="dark"] .ok{background:#173c30;color:#bbf7d0}

/* Keep unified email and password visually grouped in student records */
.record-email-password-stack{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.record-email-password-stack .record-password-label{margin-top:5px;padding-top:5px;border-top:1px solid #dce6f0;width:100%}body[data-theme="dark"] .record-email-password-stack .record-password-label{border-color:#37465a}


/* V10.172 — refined student record cards */
.record-card-item{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 238px;
  grid-template-areas:"main actions";
  gap:18px;
  align-items:stretch;
  padding:18px;
  border:1px solid #d6e2ef;
  border-radius:18px;
  background:linear-gradient(145deg,#fff 0%,#f8fbff 100%);
  box-shadow:0 5px 18px rgba(20,58,100,.07);
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.record-card-item:hover{border-color:#8ebcf0;box-shadow:0 9px 24px rgba(20,82,150,.11);transform:translateY(-1px)}
.record-card-item.record-card-active{border-color:#3b82d0;box-shadow:0 0 0 2px rgba(59,130,208,.13),0 8px 22px rgba(20,82,150,.09)}
.record-card-main{grid-area:main;min-width:0}
.record-card-head{align-items:center;padding:0 0 14px;margin:0 0 14px;border-bottom:1px solid #e2eaf3}
.record-card-name{font-size:19px;line-height:1.5;letter-spacing:0}
.record-card-code{display:inline-flex;gap:5px;align-items:center;margin-top:5px;font-size:12px}
.record-card-status{flex:0 0 auto}
.record-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.record-data-cell{justify-content:center;min-height:65px;padding:11px 13px;border:1px solid #e1eaf4;border-radius:12px;background:#f5f8fc;gap:6px}
.record-data-cell span{font-size:11px;line-height:1.4;color:#687f98}
.record-data-cell b{font-size:13px;line-height:1.5;color:#173653}
.record-email-password-stack{grid-column:span 1;gap:5px;background:#edf5ff;border-color:#cfe1f6}
.record-email-password-stack .record-password-label{padding-top:7px;margin-top:2px;border-top:1px solid #d5e3f2}
.record-email-password-stack b{font-size:12px}
.record-card-actions{grid-area:actions;display:flex;flex-direction:column;justify-content:center;gap:9px;margin:0;padding:0 0 0 17px;border:0;border-left:1px solid #e2eaf3}
.record-card-actions .btn{flex:0 0 auto;width:100%;min-height:39px;justify-content:center;border-radius:10px;font-size:12px;white-space:normal;line-height:1.4}
.record-card-actions .btn.primary{box-shadow:0 4px 10px rgba(23,105,209,.15)}
.record-card-actions .btn:disabled{opacity:.55}
body[data-theme="dark"] .record-card-item{background:linear-gradient(145deg,#1f2937 0%,#202f42 100%)!important;border-color:#3b4b60!important}
body[data-theme="dark"] .record-card-head,body[data-theme="dark"] .record-card-actions{border-color:#3b4b60!important}
body[data-theme="dark"] .record-data-cell{background:#263548!important;border-color:#3b4b60!important}
body[data-theme="dark"] .record-email-password-stack{background:#203b59!important;border-color:#42658a!important}
body[data-theme="dark"] .record-email-password-stack .record-password-label{border-color:#42658a!important}
body[data-theme="dark"] .record-data-cell span{color:#b5c7dc!important}
body[data-theme="dark"] .record-data-cell b{color:#eef5ff!important}
@media(max-width:1000px){
 .record-card-item{grid-template-columns:minmax(0,1fr) 205px;gap:13px;padding:14px}
 .record-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .record-card-actions{padding-left:12px}
}
@media(max-width:700px){
 .record-card-item{grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "actions";gap:12px;padding:13px}
 .record-card-head{align-items:flex-start}
 .record-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .record-card-actions{border-left:0;border-top:1px solid #e2eaf3;padding:12px 0 0;flex-direction:row;flex-wrap:wrap}
 .record-card-actions .btn{flex:1 1 145px;width:auto}
}
@media(max-width:430px){
 .record-card-grid{grid-template-columns:minmax(0,1fr)}
 .record-card-head{flex-direction:column;align-items:stretch}
 .record-card-status{align-self:flex-start}
}


/* V10.173 — dark-mode contrast and legibility patch */
html[data-theme="dark"], html[data-theme="dark"] body, body[data-theme="dark"]{
  background:#0f1724!important;
  color:#e8eef7!important;
  color-scheme:dark;
}
body[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,p,span,strong,b,label,small,legend,summary,dt,dd,li,td,th,caption,.title,.subtitle,.description,.muted,.help-text,.form-text,.field-label,.section-title,.card-title,.panel-title,.settings-title,.step-title,.step-description,.excel-import-title,.password-policy-title){
  color:#e8eef7!important;
}
body[data-theme="dark"] :is(.card-header,.panel-header,.section-header,.settings-header,.excel-import-header,.password-policy-header,.card-title-row,.section-title-row,.modal-header,.page-header,.form-section-header){
  background:#1b293b!important;
  color:#f1f5fb!important;
  border-color:#34465d!important;
}
body[data-theme="dark"] :is(.card-header,.panel-header,.section-header,.settings-header,.excel-import-header,.password-policy-header,.card-title-row,.section-title-row,.modal-header,.page-header,.form-section-header) *{
  color:#f1f5fb!important;
}
body[data-theme="dark"] :is(.card,.panel,.settings-panel,.form-card,.excel-import-card,.password-policy-card,.step-card,.import-step,.setting-card,.section-card,.modal-content,.modal-body,.table-wrap,.table-container,.empty-state,.help-box,.info-box,.form-help,.notice,.hint-box){
  background-color:#1b293b!important;
  color:#e8eef7!important;
  border-color:#34465d!important;
}
body[data-theme="dark"] :is(.card,.panel,.settings-panel,.form-card,.excel-import-card,.password-policy-card,.step-card,.import-step,.setting-card,.section-card,.modal-content,.modal-body,.table-wrap,.table-container,.empty-state,.help-box,.info-box,.form-help,.notice,.hint-box) :is(p,span,strong,b,label,small,div,li){
  color:inherit;
}
body[data-theme="dark"] :is(.btn,.button,button,input[type="button"],input[type="submit"]){color:#f8fafc}
body[data-theme="dark"] :is(.btn.secondary,.button.secondary,button.secondary){background:#334155!important;color:#f1f5f9!important;border-color:#475569!important}
body[data-theme="dark"] :is(.btn.primary,.button.primary,button.primary){background:#1769d1!important;color:#fff!important}
body[data-theme="dark"] :is(.btn.success,.button.success,button.success){background:#15966b!important;color:#fff!important}
body[data-theme="dark"] :is(.badge,.status,.pill,.step-number,.count-badge){color:#eaf2ff!important}
body[data-theme="dark"] a{color:#93c5fd}
body[data-theme="dark"] hr{border-color:#34465d}
body[data-theme="dark"] [style*="background: white"],body[data-theme="dark"] [style*="background:#fff"],body[data-theme="dark"] [style*="background: #fff"],body[data-theme="dark"] [style*="background-color: white"],body[data-theme="dark"] [style*="background-color:#fff"],body[data-theme="dark"] [style*="background-color: #fff"]{
  background:#1b293b!important;
}


/* V10.174 — enforce dark-mode readability for actual page components */
html[data-theme="dark"] body, body[data-theme="dark"]{background:#0f1724!important;color:#e8eef7!important;color-scheme:dark}
body[data-theme="dark"] #app,
body[data-theme="dark"] .wrap,
body[data-theme="dark"] main{color:#e8eef7!important}
body[data-theme="dark"] .home-tools-grid .home-tool-card,
body[data-theme="dark"] .home-tool-card,
body[data-theme="dark"] .premium-tool-card,
body[data-theme="dark"] .password-setting-box,
body[data-theme="dark"] .tool-note,
body[data-theme="dark"] .tool-steps,
body[data-theme="dark"] .student-create-form,
body[data-theme="dark"] .student-create-main-row,
body[data-theme="dark"] .records-day-group,
body[data-theme="dark"] .records-day-divider,
body[data-theme="dark"] .records-day-list,
body[data-theme="dark"] .record-card-item,
body[data-theme="dark"] .record-data-cell,
body[data-theme="dark"] .record-email-password-stack{
 background:#1b293b!important;color:#e8eef7!important;border-color:#3a4d65!important;
}
body[data-theme="dark"] .tool-card-head,
body[data-theme="dark"] .excel-head,
body[data-theme="dark"] .password-head,
body[data-theme="dark"] .record-card-head{
 background:#1b293b!important;color:#f8fafc!important;border-color:#3a4d65!important;
}
body[data-theme="dark"] .tool-card-head h1,
body[data-theme="dark"] .tool-card-head h2,
body[data-theme="dark"] .tool-card-head h3,
body[data-theme="dark"] .tool-card-head p,
body[data-theme="dark"] .home-tool-card h1,
body[data-theme="dark"] .home-tool-card h2,
body[data-theme="dark"] .home-tool-card h3,
body[data-theme="dark"] .home-tool-card p,
body[data-theme="dark"] .record-card-name,
body[data-theme="dark"] .record-card-code,
body[data-theme="dark"] .record-card-code span,
body[data-theme="dark"] .record-data-cell b,
body[data-theme="dark"] .record-data-cell span,
body[data-theme="dark"] .tool-note b,
body[data-theme="dark"] .tool-note,
body[data-theme="dark"] .tool-steps,
body[data-theme="dark"] .tool-steps span,
body[data-theme="dark"] .tool-steps b,
body[data-theme="dark"] .field label,
body[data-theme="dark"] .muted,
body[data-theme="dark"] small,
body[data-theme="dark"] label,
body[data-theme="dark"] .record-password-label{
 color:#e8eef7!important;
}
body[data-theme="dark"] .record-email-password-stack{background:#203b59!important;border-color:#42658a!important}
body[data-theme="dark"] .record-card-item:hover,
body[data-theme="dark"] .record-card-item.record-card-active{background:#23354b!important;border-color:#60a5fa!important}
body[data-theme="dark"] .record-card-actions{border-color:#3a4d65!important}
body[data-theme="dark"] .home-tool-card input,
body[data-theme="dark"] .home-tool-card select,
body[data-theme="dark"] .home-tool-card textarea,
body[data-theme="dark"] .student-create-form input,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea{
 background:#101a29!important;color:#f8fafc!important;border-color:#52657d!important;
}
body[data-theme="dark"] input::placeholder,body[data-theme="dark"] textarea::placeholder{color:#a9b9cc!important;opacity:1}
body[data-theme="dark"] .tool-card-icon{background:#273b53!important;color:#fff!important}
body[data-theme="dark"] .tool-steps span{background:#26384e!important;border-color:#3a4d65!important}
body[data-theme="dark"] .tool-note{background:#172538!important;border-color:#3a4d65!important}
body[data-theme="dark"] .records-day-divider{background:#24364c!important}
body[data-theme="dark"] .records-day-divider *{color:#e8eef7!important}
body[data-theme="dark"] .record-data-cell b{overflow-wrap:anywhere;word-break:break-word}
body[data-theme="dark"] .record-email-password-stack .record-password-label{border-color:#42658a!important}
body[data-theme="dark"] .btn.secondary{background:#334155!important;color:#f8fafc!important;border-color:#52657d!important}
body[data-theme="dark"] .btn.primary{background:#1769d1!important;color:#fff!important}
body[data-theme="dark"] .btn.success{background:#15966b!important;color:#fff!important}



/* V10.175 — site-wide dark theme consistency pass */
html[data-theme="dark"]{background:#0b1220!important;color-scheme:dark}
html[data-theme="dark"] body,
body[data-theme="dark"]{background:#0b1220!important;color:#e6edf7!important;color-scheme:dark}
html[data-theme="dark"] body::before,body[data-theme="dark"]::before{background:#0b1220!important}
body[data-theme="dark"] #app,
body[data-theme="dark"] #view,
body[data-theme="dark"] main,
body[data-theme="dark"] .wrap,
body[data-theme="dark"] .page,
body[data-theme="dark"] .content,
body[data-theme="dark"] .container{background:transparent!important;color:#e6edf7!important}

/* All common surfaces, including page-specific cards that were missed by earlier patches. */
body[data-theme="dark"] :is(
  .card,.panel,.box,.section,.section-card,.content-card,.form-card,.form-section,
  .home-tool-card,.home-tools-card,.premium-tool-card,.tool-card,.tool-panel,
  .settings-panel,.settings-card,.setting,.setting-card,.password-setting-box,
  .excel-import-card,.excel-card,.import-card,.import-panel,.import-step,.step-card,
  .records-hero,.records-filter-panel,.records-day-group,.records-day-list,
  .records-day-divider,.record-card-item,.record-data-cell,.record-email-password-stack,
  .print-manager-card,.print-card,.print-section,.message-view-panel,.message-modal-dialog,
  .message-modal-content,.message-modal-body,.inbox-item,.inbox-list,.inbox-panel,
  .table-wrap,.table-container,.modal-content,.modal-body,.modal-dialog,.dropdown-menu,
  .more-menu,.more-menu-item,.tool-note,.tool-steps,.notice,.hint-box,.help-box,
  .info-box,.empty-state,.stat,.stat-card,.field,.form-row,.list-group,.list-item
){background-color:#172438!important;color:#e6edf7!important;border-color:#34465b!important;box-shadow:none}

/* Force readable foreground colors in nested labels and generated inline blocks. */
body[data-theme="dark"] :is(
  h1,h2,h3,h4,h5,h6,p,span,strong,b,label,small,legend,summary,dt,dd,li,td,th,
  caption,div,section,article,aside,header,footer,main,form,fieldset,output,
  .muted,.subtle,.help-text,.form-text,.description,.subtitle,.title,.label,
  .record-card-name,.record-card-code,.record-data-cell span,.record-data-cell b,
  .record-email,.record-password,.inbox-subject,.inbox-meta,.message-date,
  .tool-note,.tool-steps,.step-title,.step-description,.field label
){color:inherit}
body[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,.page-title,.section-title,.card-title,.record-card-name,.inbox-subject){color:#f8fafc!important}
body[data-theme="dark"] :is(small,.muted,.subtle,.help-text,.form-text,.description,.subtitle,.inbox-meta,.message-date){color:#b9c7d9!important}
body[data-theme="dark"] :is(input,select,textarea,[contenteditable="true"]){
  background:#0d1727!important;color:#f8fafc!important;border-color:#465a73!important;
  box-shadow:none!important
}
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder{color:#9eafc4!important;opacity:1!important}
body[data-theme="dark"] select option{background:#172438!important;color:#f8fafc!important}
body[data-theme="dark"] :is(button,.btn,.button,input[type="button"],input[type="submit"]){color:#f8fafc}
body[data-theme="dark"] :is(.btn.secondary,.button.secondary,button.secondary,.btn:not(.primary):not(.success):not(.danger)){
  background:#2a3a50!important;color:#f1f5f9!important;border-color:#465a73!important
}
body[data-theme="dark"] :is(.btn.primary,.button.primary,button.primary){background:#1769d1!important;color:#fff!important;border-color:#1769d1!important}
body[data-theme="dark"] :is(.btn.success,.button.success,button.success){background:#12845f!important;color:#fff!important}
body[data-theme="dark"] :is(.btn.danger,.button.danger,button.danger){background:#9f343c!important;color:#fff!important}
body[data-theme="dark"] a{color:#93c5fd!important}
body[data-theme="dark"] hr,
body[data-theme="dark"] :is(table,th,td,.divider,.border,.record-card-actions){border-color:#34465b!important}
body[data-theme="dark"] table{background:#172438!important;color:#e6edf7!important}
body[data-theme="dark"] thead,
body[data-theme="dark"] th{background:#22334a!important;color:#f8fafc!important}
body[data-theme="dark"] tr:nth-child(even),
body[data-theme="dark"] tbody tr:nth-child(even){background:#1a2a40!important}
body[data-theme="dark"] tr:nth-child(odd),
body[data-theme="dark"] tbody tr:nth-child(odd){background:#172438!important}
body[data-theme="dark"] .record-email-password-stack{background:#1c3550!important;border-color:#3c5d7c!important}
body[data-theme="dark"] .record-card-item:hover,
body[data-theme="dark"] .record-card-item.record-card-active,
body[data-theme="dark"] .inbox-item.unread{background:#203651!important;border-color:#60a5fa!important}
body[data-theme="dark"] .zero-credit-alert,
body[data-theme="dark"] .stat-zero-credit{background:#3a2028!important;color:#fecaca!important;border-color:#7f3945!important}
body[data-theme="dark"] .zero-credit-alert *,
body[data-theme="dark"] .stat-zero-credit *{color:#fecaca!important}
/* Inline white/near-white backgrounds should not remain bright in dark mode. */
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background-color: #fff"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background-color:white"],
html[data-theme="dark"] [style*="background-color: white"],
body[data-theme="dark"] [style*="background:#fff"],
body[data-theme="dark"] [style*="background: #fff"],
body[data-theme="dark"] [style*="background-color:#fff"],
body[data-theme="dark"] [style*="background-color: #fff"],
body[data-theme="dark"] [style*="background:white"],
body[data-theme="dark"] [style*="background: white"],
body[data-theme="dark"] [style*="background-color:white"],
body[data-theme="dark"] [style*="background-color: white"]{
  background:#172438!important;color:#e6edf7!important;border-color:#34465b!important
}


/* ===== V10.177 theme and records consistency patch ===== */
:root { color-scheme: light; }
:root[data-theme="dark"], body[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"] {
  --theme-bg: #0d1625;
  --theme-surface: #172438;
  --theme-surface-raised: #20334b;
  --theme-border: #34465b;
  --theme-text: #e6edf7;
  --theme-muted: #a9b8ca;
}
:root[data-theme="dark"] body {
  background: var(--theme-bg);
  color: var(--theme-text);
}
:root[data-theme="dark"] :is(input, select, textarea) {
  background-color: #132033;
  color: var(--theme-text);
  border-color: var(--theme-border);
}
:root[data-theme="dark"] :is(input, select, textarea)::placeholder {
  color: #9aabc0;
  opacity: 1;
}
:root[data-theme="dark"] :is(table, th, td) { border-color: var(--theme-border); }
:root[data-theme="dark"] :is(.modal, .modal-content, .dialog, .dropdown-menu, .more-menu) {
  background-color: var(--theme-surface);
  color: var(--theme-text);
  border-color: var(--theme-border);
}
:root[data-theme="dark"] :is(.muted, .hint, .help-text, small) { color: var(--theme-muted); }
/* Keep user-provided message bodies readable instead of forcing every descendant white. */
:root[data-theme="dark"] :is(.message-body, .message-content, .inbox-message-body, .message-text) {
  background-color: #132033;
  color: var(--theme-text);
  border-color: var(--theme-border);
  overflow-wrap: anywhere;
}
/* Compact student record cards without changing record data or actions. */
.records-card-list, .records-day-list { gap: 8px !important; }
.record-card-item {
  padding: 10px 12px !important;
  margin: 0 !important;
  border-radius: 12px !important;
}
.record-card-head {
  gap: 8px !important;
  margin-bottom: 7px !important;
  padding-bottom: 7px !important;
}
.record-card-grid { gap: 7px !important; }
.record-data-cell {
  min-width: 0;
  padding: 7px 9px !important;
  gap: 3px !important;
  overflow-wrap: anywhere;
}
.record-data-cell span { font-size: 11px !important; }
.record-data-cell b { font-size: 13px !important; line-height: 1.4 !important; overflow-wrap: anywhere; }
.record-card-actions { gap: 6px !important; margin-top: 7px !important; padding-top: 7px !important; }
@media (max-width: 650px) {
  .record-card-item { padding: 9px !important; }
  .record-card-actions { flex-wrap: wrap; }
  .record-card-actions .btn { flex: 1 1 auto; }
}


/* V10.178 — actual inbox component contrast repair */
body[data-theme="dark"] .inbox-layout,
body[data-theme="dark"] .inbox-list-panel,
body[data-theme="dark"] .inbox-list-panel-wide,
body[data-theme="dark"] #inboxList,
body[data-theme="dark"] .inbox-selected-messages,
body[data-theme="dark"] .inbox-selected-head {
  background: #172438 !important;
  color: #e8eef8 !important;
  border-color: #34465b !important;
}
body[data-theme="dark"] .inbox-code-item,
body[data-theme="dark"] .inbox-message-row,
body[data-theme="dark"] .inbox-message-card-wrap {
  background: #1c2b40 !important;
  color: #e8eef8 !important;
  border-color: #3a4d64 !important;
}
body[data-theme="dark"] .inbox-code-item strong,
body[data-theme="dark"] .inbox-message-subject,
body[data-theme="dark"] .inbox-selected-head *,
body[data-theme="dark"] .inbox-selected-count b {
  color: #edf4ff !important;
}
body[data-theme="dark"] .inbox-code-item small,
body[data-theme="dark"] .inbox-message-from,
body[data-theme="dark"] .inbox-message-time,
body[data-theme="dark"] .inbox-selected-count {
  color: #b8c7da !important;
}
body[data-theme="dark"] .inbox-message-row.unread,
body[data-theme="dark"] .inbox-confirmation-code {
  background: #203b59 !important;
  color: #edf4ff !important;
  border-color: #3b5878 !important;
}
body[data-theme="dark"] .inbox-confirmation-code strong { color: #86efac !important; }
body[data-theme="dark"] .inbox-code-item.active {
  background: #244a73 !important;
  outline-color: #60a5fa !important;
}
body[data-theme="dark"] .inbox-code-item:hover,
body[data-theme="dark"] .inbox-message-row:hover {
  background: #263d57 !important;
}
body[data-theme="dark"] .message-modal,
body[data-theme="dark"] .message-modal-backdrop { color: #e8eef8; }
body[data-theme="dark"] .message-modal-dialog,
body[data-theme="dark"] .message-modal-content,
body[data-theme="dark"] .message-view-panel {
  background: #172438 !important;
  color: #e8eef8 !important;
  border-color: #34465b !important;
}
body[data-theme="dark"] .message-modal-content :is(p, div, span, td, th, label) {
  color: inherit;
}
body[data-theme="dark"] .message-modal-content :is(input, textarea, pre, iframe) {
  background: #101b2b !important;
  color: #e8eef8 !important;
  border-color: #34465b !important;
}
/* Compact inbox columns/cards and remove the oversized empty canvas feel. */
.inbox-student-groups, .inbox-groups-layout { gap: 10px; }
.inbox-code-item { padding: 9px 10px !important; margin-bottom: 6px !important; border-radius: 11px !important; }
.inbox-message-card-wrap { margin: 5px 0 !important; border-radius: 10px !important; }
.inbox-message-row { padding: 10px 12px !important; }
.inbox-selected-messages { gap: 6px !important; padding: 8px !important; }


/* V10.179 — print page dark-mode contrast fix */
body[data-theme="dark"] .print-manager-card,
body[data-theme="dark"] .print-day-group,
body[data-theme="dark"] .print-record-list,
body[data-theme="dark"] .print-record-option,
body[data-theme="dark"] .print-form,
body[data-theme="dark"] #printForm,
body[data-theme="dark"] #printGroups {
  background: #172438 !important;
  color: #e8eef8 !important;
  border-color: #34465b !important;
}
body[data-theme="dark"] .print-day-group > :first-child {
  background: #20334b !important;
  color: #edf4ff !important;
  border-color: #34465b !important;
}
body[data-theme="dark"] .print-record-option {
  border-bottom-color: #34465b !important;
}
body[data-theme="dark"] .print-record-option:hover,
body[data-theme="dark"] .print-record-option:has(input:checked) {
  background: #244a73 !important;
}
body[data-theme="dark"] .print-record-info,
body[data-theme="dark"] .print-record-info b,
body[data-theme="dark"] .print-record-info span,
body[data-theme="dark"] .print-record-status,
body[data-theme="dark"] .print-group-select-all,
body[data-theme="dark"] .print-group-select-all *,
body[data-theme="dark"] .print-selection-count {
  color: #e8eef8 !important;
}
body[data-theme="dark"] .print-record-option input {
  accent-color: #60a5fa;
}
body[data-theme="dark"] .print-manager-card :is(h1,h2,h3,p,label,strong,b,small) {
  color: inherit;
}
body[data-theme="dark"] .print-manager-card .muted {
  color: #b8c7da !important;
}
body[data-theme="dark"] .print-manager-card :is(input[type="text"],input[type="search"],select) {
  background: #0f1b2b !important;
  color: #e8eef8 !important;
  border-color: #40546c !important;
}
body[data-theme="dark"] .print-manager-card :is(input[type="text"],input[type="search"])::placeholder {
  color: #a9b8ca !important;
  opacity: 1;
}


/* =========================================================
   V10.180 — Student Records: professional redesign
   Scope is limited to the records page; CRUD logic unchanged.
   ========================================================= */
.records-card {
  overflow: visible;
  border: 1px solid var(--border, #d7e2ef);
  border-radius: 20px;
  padding: clamp(14px, 2vw, 24px);
  background: var(--card, #fff);
}
.records-hero {
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; padding: 4px 2px 20px; margin-bottom:18px;
  border-bottom:1px solid var(--border, #e2e8f0);
}
.records-hero h2 { margin:5px 0 8px; font-size:clamp(22px,2vw,29px); line-height:1.3; letter-spacing:-.3px; }
.records-hero p { max-width:760px; margin:0; line-height:1.8; color:var(--muted,#64748b); }
.records-hero-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.records-summary-pill {
  display:inline-flex; align-items:center; gap:5px; white-space:nowrap;
  padding:10px 13px; border-radius:12px; background:#edf5ff; color:#1d4f91;
  border:1px solid #d6e7fb; font-size:13px; font-weight:700;
}
.records-filter-panel {
  padding:16px; border:1px solid var(--border,#dbe5ef); border-radius:16px;
  background:var(--surface-soft,#f8fafc); margin-bottom:14px;
}
.records-filter-title { font-size:14px; font-weight:800; margin-bottom:10px; }
.records-search-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; }
.records-search-input {
  width:100%; min-width:0; min-height:44px; border:1px solid #cbd8e6;
  border-radius:12px; padding:10px 14px; background:#fff; color:#172b43;
  outline:none; transition:border-color .15s,box-shadow .15s;
}
.records-search-input:focus { border-color:#2876d8; box-shadow:0 0 0 3px rgba(40,118,216,.13); }
.record-status-filters { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.record-status-filter {
  display:inline-flex; align-items:center; gap:8px; border:1px solid #d7e1ec;
  border-radius:999px; background:#fff; color:#334155; padding:8px 12px;
  font-size:12px; font-weight:700; cursor:pointer; transition:.15s;
}
.record-status-filter b {
  display:inline-grid; place-items:center; min-width:23px; height:22px;
  border-radius:999px; padding:0 5px; background:#edf2f7; color:#334155;
}
.record-status-filter:hover { border-color:#8eb8e8; background:#f5f9ff; }
.record-status-filter.selected { background:#1769d1; color:#fff; border-color:#1769d1; box-shadow:0 3px 10px rgba(23,105,209,.16); }
.record-status-filter.selected b { background:rgba(255,255,255,.2); color:#fff; }
.records-all-data-note {
  margin:0 0 14px; padding:10px 13px; border-radius:12px;
  background:#f0f7ff; border:1px solid #dbeafe; color:#31557b;
  font-size:12px; line-height:1.7;
}
.records-card-list { display:flex; flex-direction:column; gap:12px; }
.records-day-group {
  border:1px solid #dbe4ef; border-radius:16px; overflow:hidden;
  background:#fff; box-shadow:0 3px 12px rgba(15,38,68,.035);
}
.records-day-divider {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:10px 14px; background:#f1f6fc; border-bottom:1px solid #dbe4ef;
  color:#344e6e; font-size:13px; font-weight:800;
}
.records-day-divider b {
  flex:none; border-radius:999px; padding:4px 9px; background:#e1edfb;
  color:#1c5798; font-size:11px;
}
.records-day-list { display:flex; flex-direction:column; gap:0; }
.record-card-item {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:stretch;
  gap:16px; padding:16px; margin:0; width:100%; max-width:none;
  direction:rtl; cursor:pointer; background:#fff; color:#1e293b;
  border:0; border-bottom:1px solid #e8eef5; border-radius:0;
  box-shadow:none; transition:background .15s,border-color .15s;
}
.record-card-item:last-child { border-bottom:0; }
.record-card-item:hover { background:#f8fbff; box-shadow:none; transform:none; }
.record-card-item.record-card-active {
  background:#eff6ff !important; border:0 !important;
  box-shadow:inset -4px 0 #1769d1 !important; transform:none;
}
.record-card-main { min-width:0; }
.record-card-head {
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px; margin:0 0 12px; padding:0 0 11px;
  border-bottom:1px solid #edf1f6;
}
.record-student-block { min-width:0; }
.record-card-name { color:#152f4e; font-size:16px; font-weight:800; line-height:1.6; overflow-wrap:anywhere; }
.record-card-code { margin-top:3px; color:#64748b; font-size:12px; font-weight:600; }
.record-card-code span { color:#1d5da5; font-weight:800; }
.record-card-status { flex:none; }
.record-card-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.record-data-cell {
  display:flex; flex-direction:column; justify-content:center; gap:5px;
  min-width:0; min-height:64px; padding:10px 12px;
  border:1px solid #e2eaf3; border-radius:11px; background:#f8fafc;
}
.record-data-cell span { color:#64748b; font-size:11px; font-weight:700; line-height:1.5; }
.record-data-cell b { color:#243b53; font-size:13px; font-weight:800; line-height:1.55; overflow-wrap:anywhere; }
.record-data-cell .record-password-label { margin-top:4px; padding-top:6px; border-top:1px dashed #d7e1ec; }
.record-card-actions {
  display:flex; flex-direction:column; justify-content:center; gap:7px;
  min-width:174px; padding-right:15px; border-right:1px solid #e5edf5;
}
.record-card-actions .btn { justify-content:center; white-space:nowrap; min-height:36px; border-radius:10px; font-size:12px; }
.record-card-actions .btn:disabled { opacity:.48; cursor:not-allowed; }
.records-empty {
  padding:38px 18px; border:1px dashed #cbd8e6; border-radius:15px;
  text-align:center; color:#64748b; background:#f8fafc;
}
/* Dark mode: explicit component-level contrast, no pale text on white surfaces. */
:root[data-theme="dark"] .records-card,
body[data-theme="dark"] .records-card {
  background:#121e2e; border-color:#34465b; color:#e7eef8;
}
:root[data-theme="dark"] .records-hero,
body[data-theme="dark"] .records-hero { border-color:#34465b; }
:root[data-theme="dark"] .records-hero p,
body[data-theme="dark"] .records-hero p { color:#b8c7da; }
:root[data-theme="dark"] .records-summary-pill,
body[data-theme="dark"] .records-summary-pill { background:#1b3552; color:#dbeafe; border-color:#355474; }
:root[data-theme="dark"] .records-filter-panel,
body[data-theme="dark"] .records-filter-panel { background:#17263a; border-color:#34465b; }
:root[data-theme="dark"] .records-search-input,
body[data-theme="dark"] .records-search-input { background:#0d1828; color:#edf4ff; border-color:#425770; }
:root[data-theme="dark"] .records-search-input::placeholder,
body[data-theme="dark"] .records-search-input::placeholder { color:#9eafc4; opacity:1; }
:root[data-theme="dark"] .record-status-filter,
body[data-theme="dark"] .record-status-filter { background:#1c2c41; border-color:#3b4e65; color:#d9e4f2; }
:root[data-theme="dark"] .record-status-filter b,
body[data-theme="dark"] .record-status-filter b { background:#2c4059; color:#e4edf8; }
:root[data-theme="dark"] .record-status-filter.selected,
body[data-theme="dark"] .record-status-filter.selected { background:#1769d1; border-color:#3985e8; color:#fff; }
:root[data-theme="dark"] .records-all-data-note,
body[data-theme="dark"] .records-all-data-note { background:#172f49; border-color:#2e4c6c; color:#cfe2fa; }
:root[data-theme="dark"] .records-day-group,
body[data-theme="dark"] .records-day-group { background:#152236; border-color:#354a63; }
:root[data-theme="dark"] .records-day-divider,
body[data-theme="dark"] .records-day-divider { background:#1d3048; color:#e1eaf6; border-color:#354a63; }
:root[data-theme="dark"] .records-day-divider b,
body[data-theme="dark"] .records-day-divider b { background:#2b4563; color:#d7eaff; }
:root[data-theme="dark"] .record-card-item,
body[data-theme="dark"] .record-card-item { background:#152236 !important; color:#e7eef8; border-color:#30445d; }
:root[data-theme="dark"] .record-card-item:hover,
body[data-theme="dark"] .record-card-item:hover { background:#1a2c43 !important; }
:root[data-theme="dark"] .record-card-item.record-card-active,
body[data-theme="dark"] .record-card-item.record-card-active { background:#1a3553 !important; box-shadow:inset -4px 0 #60a5fa !important; }
:root[data-theme="dark"] .record-card-head,
body[data-theme="dark"] .record-card-head { border-color:#30445d; }
:root[data-theme="dark"] .record-card-name,
body[data-theme="dark"] .record-card-name { color:#f0f6ff; }
:root[data-theme="dark"] .record-card-code,
body[data-theme="dark"] .record-card-code { color:#b8c7da; }
:root[data-theme="dark"] .record-card-code span,
body[data-theme="dark"] .record-card-code span { color:#8fc1ff; }
:root[data-theme="dark"] .record-data-cell,
body[data-theme="dark"] .record-data-cell { background:#1a2b41; border-color:#354a63; }
:root[data-theme="dark"] .record-data-cell span,
body[data-theme="dark"] .record-data-cell span { color:#afc0d4; }
:root[data-theme="dark"] .record-data-cell b,
body[data-theme="dark"] .record-data-cell b { color:#f0f5fc; }
:root[data-theme="dark"] .record-data-cell .record-password-label,
body[data-theme="dark"] .record-data-cell .record-password-label { border-color:#40546b; }
:root[data-theme="dark"] .records-empty,
body[data-theme="dark"] .records-empty { background:#17263a; border-color:#40546b; color:#c2d0e0; }
:root[data-theme="dark"] .record-card-actions,
body[data-theme="dark"] .record-card-actions { border-color:#354a63; }
@media (max-width:1100px) {
  .record-card-item { grid-template-columns:minmax(0,1fr) 160px; gap:12px; }
  .record-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .record-card-actions { min-width:150px; padding-right:12px; }
}
@media (max-width:720px) {
  .records-hero { align-items:flex-start; flex-direction:column; }
  .records-hero-actions { width:100%; }
  .records-search-row { grid-template-columns:1fr; }
  .record-card-item { grid-template-columns:1fr; gap:12px; }
  .record-card-actions { min-width:0; border-right:0; border-top:1px solid #e5edf5; padding:12px 0 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .record-card-actions .btn { white-space:normal; }
  :root[data-theme="dark"] .record-card-actions,
  body[data-theme="dark"] .record-card-actions { border-color:#354a63; }
}
@media (max-width:430px) {
  .records-card { padding:10px; border-radius:15px; }
  .records-filter-panel { padding:11px; }
  .record-card-grid { grid-template-columns:1fr; }
  .record-card-head { flex-direction:column; }
  .record-card-actions { grid-template-columns:1fr; }
  .records-day-divider { align-items:flex-start; flex-direction:column; gap:5px; }
}


/* V10.181 — Records Elite layout refinement */
.records-card { padding:clamp(16px,2vw,28px); border-radius:22px; }
.records-hero { align-items:center; padding-bottom:18px; margin-bottom:18px; }
.records-hero .section-kicker {
  display:inline-flex; align-items:center; gap:6px; padding:5px 10px;
  border-radius:999px; background:#eaf3ff; color:#1d5ca4;
  font-size:11px; font-weight:800; margin-bottom:8px;
}
.records-hero h2 { font-size:28px; font-weight:900; color:#172b45; }
.records-hero-actions { justify-content:flex-start; }
.records-summary-pill { box-shadow:inset 0 1px 0 rgba(255,255,255,.7); }
.records-filter-panel { box-shadow:0 4px 16px rgba(22,49,82,.035); }
.records-filter-title { display:flex; align-items:center; gap:8px; }
.records-search-input { min-height:48px; font-size:13px; }
.record-status-filters { gap:7px; }
.record-status-filter { min-height:37px; }
.records-all-data-note { border-radius:10px; }
.records-day-group { border-radius:17px; box-shadow:0 5px 18px rgba(22,45,75,.045); }
.records-day-divider { padding:12px 16px; }
.record-card-item {
  grid-template-columns:minmax(0,1fr) 164px;
  gap:16px; padding:17px 18px;
}
.record-card-main { display:flex; flex-direction:column; justify-content:center; }
.record-card-head { align-items:center; margin-bottom:12px; padding-bottom:12px; }
.record-card-name { font-size:16px; letter-spacing:0; }
.record-card-status .status-badge,
.record-card-status .badge { white-space:nowrap; }
.record-card-grid {
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:stretch; gap:10px;
}
.record-data-cell {
  min-height:76px; padding:11px 13px; border-radius:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
}
.record-data-cell span { font-size:11px; }
.record-data-cell b { font-size:13px; }
.record-email-password-stack { grid-column:span 2; }
.record-card-actions {
  min-width:164px; padding-right:16px; gap:8px;
  justify-content:center; border-right:1px solid #dce6f1;
}
.record-card-actions .btn {
  min-height:38px; padding:9px 10px; font-size:11.5px;
  border-radius:11px; font-weight:800;
}
.record-card-actions .btn.primary { box-shadow:0 3px 8px rgba(23,105,209,.17); }
.record-card-item.record-card-active {
  box-shadow:inset -4px 0 #1769d1, 0 3px 12px rgba(23,105,209,.06) !important;
}
:root[data-theme="dark"] .records-hero .section-kicker,
body[data-theme="dark"] .records-hero .section-kicker {
  background:#1d3550; color:#b9dcff;
}
:root[data-theme="dark"] .records-hero h2,
body[data-theme="dark"] .records-hero h2 { color:#f1f6ff; }
:root[data-theme="dark"] .record-data-cell,
body[data-theme="dark"] .record-data-cell {
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
:root[data-theme="dark"] .record-card-actions,
body[data-theme="dark"] .record-card-actions { border-color:#3a4e66; }
@media (max-width:1100px) {
  .record-card-item { grid-template-columns:minmax(0,1fr) 150px; gap:12px; }
  .record-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .record-email-password-stack { grid-column:span 2; }
  .record-card-actions { min-width:150px; padding-right:12px; }
}
@media (max-width:720px) {
  .records-hero h2 { font-size:24px; }
  .record-card-item { grid-template-columns:minmax(0,1fr); padding:14px; }
  .record-card-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-right:0; border-top:1px solid #dce6f1; padding:12px 0 0; }
  .record-email-password-stack { grid-column:span 2; }
}
@media (max-width:430px) {
  .record-card-grid { grid-template-columns:1fr; }
  .record-email-password-stack { grid-column:span 1; }
  .record-card-head { align-items:flex-start; }
  .record-card-actions { grid-template-columns:1fr; }
}


/* V10.182 — transparent record fields + restore inbox message contrast */
:root[data-theme="dark"] .record-data-cell,
body[data-theme="dark"] .record-data-cell {
  background: transparent !important;
  box-shadow: none !important;
  border: 1px solid #40516a !important;
}
:root[data-theme="dark"] .record-data-cell span,
body[data-theme="dark"] .record-data-cell span { color:#b9c8da !important; }
:root[data-theme="dark"] .record-data-cell b,
body[data-theme="dark"] .record-data-cell b { color:#f2f6fc !important; }
:root[data-theme="dark"] .record-data-cell .record-password-label,
body[data-theme="dark"] .record-data-cell .record-password-label { border-color:#40516a !important; }

/* Inbox must remain visible; dark surfaces and readable text for all message rows. */
:root[data-theme="dark"] .inbox-code-sidebar,
body[data-theme="dark"] .inbox-code-sidebar,
:root[data-theme="dark"] .inbox-messages-panel,
body[data-theme="dark"] .inbox-messages-panel,
:root[data-theme="dark"] .inbox-list-panel,
body[data-theme="dark"] .inbox-list-panel,
:root[data-theme="dark"] .inbox-list-panel-wide,
body[data-theme="dark"] .inbox-list-panel-wide,
:root[data-theme="dark"] #inboxList,
body[data-theme="dark"] #inboxList {
  background:#142237 !important;
  color:#eaf1fa !important;
  border-color:#3a4e66 !important;
}
:root[data-theme="dark"] .inbox-student-box,
body[data-theme="dark"] .inbox-student-box,
:root[data-theme="dark"] .inbox-message-card-wrap,
body[data-theme="dark"] .inbox-message-card-wrap {
  background:#192a40 !important;
  color:#eaf1fa !important;
  border-color:#3a4e66 !important;
}
:root[data-theme="dark"] .inbox-student-head,
body[data-theme="dark"] .inbox-student-head,
:root[data-theme="dark"] .inbox-selected-head,
body[data-theme="dark"] .inbox-selected-head,
:root[data-theme="dark"] .inbox-code-sidebar-title,
body[data-theme="dark"] .inbox-code-sidebar-title {
  background:#1d3048 !important;
  color:#f0f6ff !important;
  border-color:#3a4e66 !important;
}
:root[data-theme="dark"] .inbox-student-title,
body[data-theme="dark"] .inbox-student-title,
:root[data-theme="dark"] .inbox-student-count b,
body[data-theme="dark"] .inbox-student-count b,
:root[data-theme="dark"] .inbox-selected-code,
body[data-theme="dark"] .inbox-selected-code,
:root[data-theme="dark"] .inbox-selected-count b,
body[data-theme="dark"] .inbox-selected-count b,
:root[data-theme="dark"] .inbox-code-item-main strong,
body[data-theme="dark"] .inbox-code-item-main strong,
:root[data-theme="dark"] .inbox-message-subject,
body[data-theme="dark"] .inbox-message-subject {
  color:#f0f6ff !important;
}
:root[data-theme="dark"] .inbox-student-email,
body[data-theme="dark"] .inbox-student-email,
:root[data-theme="dark"] .inbox-student-count,
body[data-theme="dark"] .inbox-student-count,
:root[data-theme="dark"] .inbox-selected-email,
body[data-theme="dark"] .inbox-selected-email,
:root[data-theme="dark"] .inbox-selected-count,
body[data-theme="dark"] .inbox-selected-count,
:root[data-theme="dark"] .inbox-code-item-main small,
body[data-theme="dark"] .inbox-code-item-main small,
:root[data-theme="dark"] .inbox-message-from,
body[data-theme="dark"] .inbox-message-from,
:root[data-theme="dark"] .inbox-message-time,
body[data-theme="dark"] .inbox-message-time {
  color:#b8c8dc !important;
}
:root[data-theme="dark"] .inbox-code-item,
body[data-theme="dark"] .inbox-code-item,
:root[data-theme="dark"] .inbox-message-row,
body[data-theme="dark"] .inbox-message-row {
  display:flex;
  background:#1b2c42 !important;
  color:#eaf1fa !important;
  border-color:#3a4e66 !important;
}
:root[data-theme="dark"] .inbox-code-item.active,
body[data-theme="dark"] .inbox-code-item.active {
  background:#24476b !important;
  border-color:#70adf7 !important;
  box-shadow:inset -4px 0 #70adf7 !important;
}
:root[data-theme="dark"] .inbox-code-item:hover,
body[data-theme="dark"] .inbox-code-item:hover,
:root[data-theme="dark"] .inbox-message-row:hover,
body[data-theme="dark"] .inbox-message-row:hover {
  background:#243b55 !important;
}
:root[data-theme="dark"] .inbox-message-row.unread,
body[data-theme="dark"] .inbox-message-row.unread {
  background:#203c5b !important;
  border-right-color:#70adf7 !important;
}
:root[data-theme="dark"] .inbox-message-stack,
body[data-theme="dark"] .inbox-message-stack,
:root[data-theme="dark"] .inbox-selected-messages,
body[data-theme="dark"] .inbox-selected-messages {
  background:#142237 !important;
}
:root[data-theme="dark"] .inbox-confirmation-code,
body[data-theme="dark"] .inbox-confirmation-code {
  background:#20364e !important;
  color:#eaf1fa !important;
  border-color:#3a5874 !important;
}
:root[data-theme="dark"] .inbox-confirmation-code strong,
body[data-theme="dark"] .inbox-confirmation-code strong { color:#86efac !important; }
:root[data-theme="dark"] .message-modal-dialog,
body[data-theme="dark"] .message-modal-dialog,
:root[data-theme="dark"] .message-modal-content,
body[data-theme="dark"] .message-modal-content {
  background:#142237 !important;
  color:#eaf1fa !important;
  border-color:#3a4e66 !important;
}


/* V10.183 — force readable contrast in student record fields */
:root[data-theme="dark"] .record-card-item .record-data-cell,
body[data-theme="dark"] .record-card-item .record-data-cell,
html[data-theme="dark"] .record-card-item .record-data-cell {
  background: transparent !important;
  background-color: transparent !important;
  color: #f4f7fb !important;
  border: 1px solid #40536b !important;
  box-shadow: none !important;
}
:root[data-theme="dark"] .record-card-item .record-data-cell *,
body[data-theme="dark"] .record-card-item .record-data-cell *,
html[data-theme="dark"] .record-card-item .record-data-cell * {
  background: transparent !important;
  background-color: transparent !important;
}
:root[data-theme="dark"] .record-card-item .record-data-cell span,
body[data-theme="dark"] .record-card-item .record-data-cell span,
html[data-theme="dark"] .record-card-item .record-data-cell span {
  color: #b9c9dc !important;
  opacity: 1 !important;
}
:root[data-theme="dark"] .record-card-item .record-data-cell b,
:root[data-theme="dark"] .record-card-item .record-data-cell strong,
body[data-theme="dark"] .record-card-item .record-data-cell b,
body[data-theme="dark"] .record-card-item .record-data-cell strong,
html[data-theme="dark"] .record-card-item .record-data-cell b,
html[data-theme="dark"] .record-card-item .record-data-cell strong {
  color: #f5f8fc !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #f5f8fc !important;
}
:root[data-theme="dark"] .record-card-item .record-data-cell a,
body[data-theme="dark"] .record-card-item .record-data-cell a,
html[data-theme="dark"] .record-card-item .record-data-cell a {
  color: #9dccff !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #9dccff !important;
}
:root[data-theme="dark"] .record-card-item .record-data-cell .record-password-label,
body[data-theme="dark"] .record-card-item .record-data-cell .record-password-label {
  border-color: #40536b !important;
}


/* V10.184 — larger record action buttons for comfortable reading */
.record-card-actions {
  min-width: 190px !important;
  gap: 10px !important;
  padding-right: 18px !important;
}
.record-card-actions .btn {
  min-height: 44px !important;
  padding: 11px 14px !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap;
}
@media (max-width:1100px) {
  .record-card-actions { min-width: 175px !important; padding-right: 14px !important; }
  .record-card-actions .btn { font-size: 12.5px !important; padding: 10px 11px !important; }
}
@media (max-width:720px) {
  .record-card-actions { min-width: 0 !important; padding-right: 0 !important; }
  .record-card-actions .btn { min-height: 44px !important; white-space: normal; }
}

/* Compact English metadata for recharge/payment views */
.payment-customer-meta{display:flex;flex-wrap:wrap;gap:4px 12px;margin:4px 0 6px;font-family:Arial,sans-serif;font-size:11px;line-height:1.35;color:#667085;direction:ltr;text-align:left;overflow-wrap:anywhere}
.payment-meta-en{display:inline-block;font-family:Arial,sans-serif;font-size:10px;line-height:1.25;white-space:nowrap;color:#667085;direction:ltr}

/* V10.194: customer profile and recharge-result metadata */
.credit-result-meta{margin:16px 0 18px;padding:12px 14px;background:#f5f8fc;border:1px solid #e2eaf3;border-radius:12px;text-align:right;display:grid;gap:9px}
.credit-result-meta>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.credit-result-meta span{font-size:11px;color:#66788c}
.credit-result-meta b{font-size:11px;font-weight:700;color:#1d3550;overflow-wrap:anywhere}
.customer-profile-overlay{padding:18px;overflow:auto;align-items:flex-start}
.customer-profile-dialog{width:min(1100px,100%);max-height:calc(100vh - 36px);overflow:auto;background:var(--card,#fff);color:var(--text,#17324d);border-radius:18px;padding:20px;box-shadow:0 25px 70px rgba(0,0,0,.24);text-align:right}
.customer-profile-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border,#dbe4ed);padding-bottom:14px;margin-bottom:16px}
.customer-profile-head h2{margin:0 0 6px;font-size:21px}.customer-profile-head p{margin:0;color:var(--muted,#718096);font-size:13px}
.customer-profile-loading{padding:28px;text-align:center;color:var(--muted,#718096)}
.customer-profile-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}
.customer-profile-summary>div,.customer-profile-fields>div{padding:12px;border:1px solid var(--border,#dbe4ed);border-radius:11px;background:var(--surface,#f8fafc);min-width:0}
.customer-profile-summary span,.customer-profile-fields span{display:block;font-size:12px;color:var(--muted,#718096);margin-bottom:6px}
.customer-profile-summary b,.customer-profile-fields b{display:block;overflow-wrap:anywhere;font-size:13px}
.customer-profile-section{margin:14px 0;padding:14px;border:1px solid var(--border,#dbe4ed);border-radius:13px;min-width:0}
.customer-profile-section h3{margin:0 0 12px;font-size:16px}
.customer-profile-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.customer-profile-dialog .table-wrap{max-width:100%;overflow:auto}.customer-profile-dialog table{min-width:650px;width:100%}.customer-profile-dialog th,.customer-profile-dialog td{font-size:12px;padding:9px 10px}
.customer-profile-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
@media(max-width:700px){.customer-profile-overlay{padding:8px}.customer-profile-dialog{padding:13px;max-height:calc(100vh - 16px)}.customer-profile-head{flex-direction:column}.customer-profile-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-profile-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.credit-result-meta{padding:10px}}
@media(max-width:420px){.customer-profile-fields{grid-template-columns:1fr}.customer-profile-head h2{font-size:18px}}
@media(min-width:901px){.admin-user-actions{grid-template-columns:repeat(8,minmax(0,1fr))!important}}

/* FekraEmailWeb V10.197 — Admin Control Center (presentation only) */
.admin-page{--admin-ink:#172f49;--admin-muted:#687d91;--admin-line:#dce6ef;--admin-surface:#f4f7fb;background:#f2f5f9;color:var(--admin-ink)}
.admin-page .top{background:rgba(255,255,255,.96);border-bottom:1px solid var(--admin-line);box-shadow:0 4px 18px rgba(20,48,80,.06)}
.admin-page .top .brand{max-width:1440px;margin:auto;padding:16px 26px;display:flex;align-items:center;gap:14px}
.admin-page .brand img{width:48px;height:48px;object-fit:contain}
.admin-page .brand h1{font-size:22px;font-weight:900;letter-spacing:-.4px;margin:0 0 4px}
.admin-page .brand small{color:var(--admin-muted)}
.admin-page .site-version-badge{display:inline-flex;margin-inline-start:8px;padding:4px 8px;border-radius:7px;background:#eaf2ff;color:#245eaa;font-size:11px;font-weight:800}
.admin-page main.wrap{max-width:1480px;padding:24px 26px 56px}
.admin-page #dashboard{border:0;background:transparent;box-shadow:none;padding:0;display:block}
.admin-page #dashboard>.card,.admin-page #dashboard>section,.admin-page #dashboard>details{margin-block:14px!important}
.admin-page #dashboard h2{font-size:25px;font-weight:900;color:var(--admin-ink)}
.admin-page #dashboard h3{font-weight:850;color:var(--admin-ink)}
.admin-page #dashboard .card,.admin-page #dashboard .status-filter-card{border:1px solid var(--admin-line);border-radius:16px;background:#fff;box-shadow:0 4px 16px rgba(24,52,80,.045);padding:20px}
.admin-page #dashboard .admin-tools-menu{padding:0!important;overflow:hidden}
.admin-page #dashboard .admin-tools-menu>summary{background:#f7f9fc!important;border-bottom:1px solid var(--admin-line);padding:13px 18px!important}
.admin-workspace-nav{position:sticky;top:76px;z-index:35;display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:12px 0 20px;padding:10px;border:1px solid var(--admin-line);border-radius:14px;background:rgba(255,255,255,.96);box-shadow:0 6px 20px rgba(20,48,80,.07);backdrop-filter:blur(12px)}
.admin-workspace-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:37px;padding:8px 12px;border-radius:9px;color:#35516c;text-decoration:none;font-size:13px;font-weight:800;white-space:nowrap;transition:background .15s,color .15s}
.admin-workspace-nav a:hover,.admin-workspace-nav a:focus-visible{background:#eaf2ff;color:#155db7;outline:none}
#adminOverview,#adminSettings,#adminOnline,#adminSearch,#adminExport,#adminBackup,#adminUsersSection{scroll-margin-top:145px}
.admin-page .admin-users-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:16px}
.admin-page .admin-users-toolbar h3{margin-top:0}
.admin-page .admin-users-hint{background:#f3f7fc;border:1px solid #e1eaf3;border-radius:10px;padding:10px 12px;font-size:12px;color:#59718a}
.admin-page .admin-users-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.admin-page .admin-user-card{min-width:0;border:1px solid var(--admin-line);border-radius:14px;background:#fff;box-shadow:0 3px 12px rgba(20,48,80,.035);transition:border-color .15s,box-shadow .15s}
.admin-page .admin-user-card:hover{border-color:#b7cde3;box-shadow:0 8px 22px rgba(20,48,80,.075)}
.admin-page .admin-summary-grid{gap:12px}
.admin-page .stat{border-radius:12px}
.admin-page .status-filters{gap:8px}
.admin-page .status-filter{border-radius:10px;min-height:42px;font-weight:800}
.admin-page .admin-advanced-search>summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-weight:900;color:var(--admin-ink);padding:2px 0 14px}
.admin-page .admin-advanced-search>summary span{font-size:12px;color:var(--admin-muted);font-weight:500}
.admin-page .admin-search-box{border:1px solid #e3ebf3;border-radius:12px;background:#fbfcfe;padding:15px;min-width:0}
.admin-page .admin-search-box h3{margin-top:0}
.admin-page .table-wrap{border:1px solid var(--admin-line);overflow:auto}
.admin-page .table-wrap table{border-collapse:separate;border-spacing:0}
.admin-page .table-wrap th{position:sticky;top:0;z-index:1;background:#edf3f9;color:#284661;font-weight:900}
.admin-page .table-wrap td,.admin-page .table-wrap th{border-bottom:1px solid #e8eef4}
.admin-page .btn{min-height:40px;transition:transform .12s,box-shadow .12s}
.admin-page .btn:active{transform:translateY(1px)}
.admin-page .admin-announcement-box{margin-top:18px;padding-top:16px;border-top:1px solid var(--admin-line)}
.admin-page .settings-grid{gap:12px}
.admin-page .setting{border:1px solid #e2eaf2;border-radius:11px;padding:12px;background:#fbfcfe}
html[data-theme="dark"] .admin-page,body.admin-page[data-theme="dark"]{--admin-ink:#e6edf5;--admin-muted:#a3b3c5;--admin-line:#34475b;--admin-surface:#1b2837;background:#111b27;color:var(--admin-ink)}
html[data-theme="dark"] .admin-page .top,body.admin-page[data-theme="dark"] .top{background:rgba(20,31,44,.97);border-color:#34475b}
html[data-theme="dark"] .admin-page #dashboard .card,html[data-theme="dark"] .admin-page #dashboard .status-filter-card,body.admin-page[data-theme="dark"] #dashboard .card,body.admin-page[data-theme="dark"] #dashboard .status-filter-card{background:#1b2837;border-color:#34475b;color:var(--admin-ink)}
html[data-theme="dark"] .admin-workspace-nav,body.admin-page[data-theme="dark"] .admin-workspace-nav{background:rgba(24,37,52,.97);border-color:#34475b}
html[data-theme="dark"] .admin-workspace-nav a,body.admin-page[data-theme="dark"] .admin-workspace-nav a{color:#d2dfed}
html[data-theme="dark"] .admin-workspace-nav a:hover,body.admin-page[data-theme="dark"] .admin-workspace-nav a:hover{background:#243f5d;color:#fff}
html[data-theme="dark"] .admin-page .admin-search-box,html[data-theme="dark"] .admin-page .setting,body.admin-page[data-theme="dark"] .admin-search-box,body.admin-page[data-theme="dark"] .setting{background:#172433;border-color:#34475b}
html[data-theme="dark"] .admin-page .admin-tools-menu>summary,body.admin-page[data-theme="dark"] .admin-tools-menu>summary{background:#172433!important;border-color:#34475b}
html[data-theme="dark"] .admin-page .table-wrap th,body.admin-page[data-theme="dark"] .table-wrap th{background:#24374b;color:#e1ebf5}
@media(max-width:900px){.admin-page main.wrap{padding:16px 12px 36px}.admin-workspace-nav{top:62px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}.admin-workspace-nav a{flex:0 0 auto}.admin-page .admin-users-cards{grid-template-columns:1fr}.admin-page #dashboard .card,.admin-page #dashboard .status-filter-card{padding:15px}}
@media(max-width:520px){.admin-page .top .brand{padding:12px}.admin-page .brand img{width:40px;height:40px}.admin-page .brand h1{font-size:18px}.admin-page .brand small{font-size:11px}.admin-page .site-version-badge{font-size:10px}.admin-page .admin-users-toolbar{display:block}.admin-page .admin-users-hint{margin-top:10px}.admin-page .admin-advanced-grid{grid-template-columns:minmax(0,1fr)}.admin-page .admin-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* FekraEmailWeb V10.197 — structured administration workspace */
.admin-page main.wrap{max-width:1680px;padding:22px 24px 56px}
.admin-page #dashboard>.admin-workspace-layout{display:grid;grid-template-columns:248px minmax(0,1fr);gap:22px;align-items:start;margin-top:18px;direction:rtl}
.admin-page .admin-sidebar{position:sticky;top:18px;min-width:0;padding:18px 13px;border:1px solid #243b55;border-radius:20px;background:linear-gradient(165deg,#172a40 0%,#102033 100%);color:#eef5ff;box-shadow:0 16px 38px rgba(13,32,54,.17);min-height:calc(100vh - 42px);display:flex;flex-direction:column}
.admin-page .admin-sidebar-brand{display:flex;align-items:center;gap:11px;padding:5px 7px 20px;border-bottom:1px solid rgba(255,255,255,.12)}
.admin-page .admin-sidebar-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#62a4ff,#2870d7);font-size:23px;font-weight:950;color:white;box-shadow:0 7px 18px rgba(36,112,215,.35)}
.admin-page .admin-sidebar-brand b{display:block;font-size:15px;color:#fff}.admin-page .admin-sidebar-brand small{display:block;font-size:9px;letter-spacing:1px;color:#9db4cc;margin-top:4px;direction:ltr;text-align:right}
.admin-page .admin-sidebar-label{padding:19px 10px 8px;color:#8da8c4;font-size:10px;font-weight:900;letter-spacing:.8px}
.admin-page .admin-workspace-nav{position:static;display:flex;flex-direction:column;align-items:stretch;gap:5px;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;overflow:visible}
.admin-page .admin-workspace-nav a{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:44px;padding:10px 12px;border:1px solid transparent;border-radius:11px;color:#c1d1e2;font-size:12px;font-weight:750;white-space:normal;text-align:right}
.admin-page .admin-workspace-nav a::before{content:"";display:block;flex:0 0 7px;width:7px;height:7px;border-radius:3px;background:#58738f;box-shadow:0 0 0 4px rgba(88,115,143,.12)}
.admin-page .admin-workspace-nav a:hover,.admin-page .admin-workspace-nav a:focus-visible{background:rgba(91,151,226,.13);border-color:rgba(114,170,238,.18);color:#fff}
.admin-page .admin-workspace-nav a[href="#adminOverview"]::before{background:#69a6ff}.admin-page .admin-workspace-nav a[href="#adminSettings"]::before{background:#bd9bff}.admin-page .admin-workspace-nav a[href="#adminOnline"]::before{background:#53d6a2}.admin-page .admin-workspace-nav a[href="#adminSearch"]::before{background:#ffc66e}.admin-page .admin-workspace-nav a[href="#adminExport"]::before{background:#70d2e8}.admin-page .admin-workspace-nav a[href="#adminBackup"]::before{background:#f59baf}.admin-page .admin-workspace-nav a[href="#adminUsersSection"]::before{background:#91b6ff}
.admin-page .admin-sidebar-footer{display:flex;align-items:center;gap:8px;margin-top:auto;padding:16px 9px 2px;border-top:1px solid rgba(255,255,255,.12);font-size:11px;color:#a9bfd5}
.admin-page .admin-status-dot{width:8px;height:8px;border-radius:50%;background:#42d69a;box-shadow:0 0 0 4px rgba(66,214,154,.13)}
.admin-page .admin-workspace-content{min-width:0}
.admin-page .admin-page-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:23px 25px;border:1px solid var(--admin-line);border-radius:18px;background:linear-gradient(115deg,#fff 0%,#f2f7ff 100%);box-shadow:0 7px 24px rgba(20,48,80,.045)}
.admin-page .admin-eyebrow{font-size:10px;font-weight:900;letter-spacing:1.4px;color:#3975bf;direction:ltr;display:block;text-align:right}
.admin-page .admin-page-heading h2{margin:7px 0 5px!important;font-size:27px!important;letter-spacing:-.6px}
.admin-page .admin-page-heading p{margin:0;color:var(--admin-muted);font-size:13px}
.admin-page .admin-heading-actions{display:flex;gap:8px;flex-wrap:wrap}
.admin-page .admin-heading-actions .btn{white-space:nowrap}
.admin-page #dashboard .admin-workspace-content>.card,.admin-page #dashboard .admin-workspace-content>section,.admin-page #dashboard .admin-workspace-content>details,.admin-page #dashboard .admin-workspace-content>.status-filter-card{margin-block:14px!important}
.admin-page #dashboard .admin-workspace-content>#adminOverview{padding:2px 3px}
.admin-page #dashboard .admin-workspace-content>#adminOverview h2{margin-top:0}
.admin-page .admin-users-section{padding:20px;border:1px solid var(--admin-line);border-radius:16px;background:var(--card,#fff);box-shadow:0 4px 16px rgba(24,52,80,.045)}
.admin-page .admin-users-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
.admin-page .admin-tools-menu{margin-bottom:10px!important}
html[data-theme="dark"] .admin-page .admin-page-heading,body.admin-page[data-theme="dark"] .admin-page-heading{background:linear-gradient(115deg,#1b2837 0%,#1b3047 100%);border-color:#34475b}
html[data-theme="dark"] .admin-page .admin-page-heading h2,body.admin-page[data-theme="dark"] .admin-page-heading h2{color:#e6edf5}
html[data-theme="dark"] .admin-page .admin-users-section,body.admin-page[data-theme="dark"] .admin-users-section{background:#1b2837;border-color:#34475b}
@media(max-width:1050px){.admin-page #dashboard>.admin-workspace-layout{grid-template-columns:205px minmax(0,1fr);gap:14px}.admin-page .admin-sidebar{padding:14px 9px}.admin-page .admin-page-heading{padding:18px}.admin-page .admin-page-heading h2{font-size:23px!important}}
@media(max-width:780px){.admin-page #dashboard>.admin-workspace-layout{grid-template-columns:minmax(0,1fr);gap:12px}.admin-page .admin-sidebar{position:relative;top:auto;min-height:0;padding:12px;border-radius:15px}.admin-page .admin-sidebar-brand{padding-bottom:12px}.admin-page .admin-sidebar-label{padding:12px 8px 7px}.admin-page .admin-workspace-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.admin-page .admin-workspace-nav a{min-height:40px;padding:8px;font-size:11px}.admin-page .admin-sidebar-footer{margin-top:12px;padding-top:10px}.admin-page .admin-page-heading{align-items:flex-start;flex-direction:column}.admin-page .admin-heading-actions{width:100%}.admin-page .admin-heading-actions .btn{flex:1}.admin-page .admin-users-cards{grid-template-columns:minmax(0,1fr)}}
@media(max-width:420px){.admin-page main.wrap{padding:10px 8px 28px}.admin-page .admin-page-heading{padding:15px}.admin-page .admin-workspace-nav{grid-template-columns:minmax(0,1fr)}.admin-page .admin-heading-actions{flex-direction:column}.admin-page .admin-heading-actions .btn{width:100%}}


/* FekraEmailWeb V10.199 — compact customer rows + full profile modal */
.admin-page .admin-users-cards{display:block!important;gap:0!important;border:1px solid var(--admin-line);border-radius:14px;overflow:visible;background:var(--card,#fff)}
.admin-page .admin-customer-table-head{display:grid;grid-template-columns:minmax(260px,1.7fr) minmax(100px,.65fr) minmax(130px,.75fr) minmax(100px,.6fr);gap:12px;align-items:center;padding:12px 16px;background:#edf3f9;color:#284661;border:1px solid var(--admin-line);border-bottom:0;border-radius:14px 14px 0 0;font-size:12px;font-weight:900}
.admin-page .admin-customer-row{display:grid;grid-template-columns:minmax(260px,1.7fr) minmax(100px,.65fr) minmax(130px,.75fr) minmax(100px,.6fr);gap:12px;align-items:center;padding:12px 16px;border:0;border-bottom:1px solid var(--admin-line);border-radius:0;box-shadow:none;background:var(--card,#fff);cursor:pointer;transition:background .15s,box-shadow .15s;min-width:0}
.admin-page .admin-customer-row:last-child{border-bottom:0;border-radius:0 0 14px 14px}
.admin-page .admin-customer-row:hover,.admin-page .admin-customer-row:focus-visible{background:#f3f8fe;box-shadow:inset -3px 0 #3478d4;outline:none}
.admin-page .admin-user-card-head{display:contents}
.admin-page .admin-user-identity{min-width:0;display:flex;align-items:center;gap:10px}
.admin-page .admin-user-identity>div:last-child{min-width:0;display:grid;gap:3px}
.admin-page .admin-user-identity h3{font-size:13px;margin:0}
.admin-page .admin-user-identity b,.admin-page .admin-user-identity span{font-size:12px;overflow-wrap:anywhere}
.admin-page .admin-user-compact-meta{display:contents}
.admin-page .admin-user-compact-meta>div{min-width:0;padding:0;border:0;background:transparent;display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.admin-page .admin-user-compact-meta>div>span{font-size:11px;color:var(--admin-muted)}
.admin-page .admin-user-compact-meta>div>b{font-size:13px}
.admin-page .admin-row-actions{min-width:0;position:relative}
.admin-page .admin-row-actions>summary{display:flex;align-items:center;justify-content:center;gap:8px;list-style:none;border:1px solid var(--admin-line);border-radius:9px;padding:8px 10px;font-size:12px;font-weight:800;background:var(--admin-surface,#f7f9fc);cursor:pointer;white-space:nowrap}
.admin-page .admin-row-actions>summary::-webkit-details-marker{display:none}
.admin-page .admin-row-actions[open]{grid-column:1/-1;cursor:default}
.admin-page .admin-row-actions[open]>.admin-user-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;padding:12px 0 2px}
.admin-page .admin-row-actions[open] .admin-user-action{min-width:75px}
.admin-page .admin-user-inline-slot{grid-column:1/-1;width:100%;min-width:0}
.admin-page .admin-user-inline-slot[hidden]{display:none!important}
html[data-theme="dark"] .admin-page .admin-customer-table-head,body.admin-page[data-theme="dark"] .admin-customer-table-head{background:#24374b;color:#e1ebf5}
html[data-theme="dark"] .admin-page .admin-customer-row,body.admin-page[data-theme="dark"] .admin-customer-row{background:#1b2837;color:var(--admin-ink)}
html[data-theme="dark"] .admin-page .admin-customer-row:hover,html[data-theme="dark"] .admin-page .admin-customer-row:focus-visible,body.admin-page[data-theme="dark"] .admin-customer-row:hover,body.admin-page[data-theme="dark"] .admin-customer-row:focus-visible{background:#22364b}
html[data-theme="dark"] .admin-page .admin-row-actions>summary,body.admin-page[data-theme="dark"] .admin-row-actions>summary{background:#172433;color:#e1ebf5}
@media(max-width:850px){.admin-page .admin-customer-table-head{display:none}.admin-page .admin-customer-row{grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:12px}.admin-page .admin-user-identity{grid-column:1}.admin-page .admin-user-compact-meta>div:first-child{grid-column:1}.admin-page .admin-user-compact-meta>div:nth-child(2){grid-column:2;grid-row:1}.admin-page .admin-row-actions{grid-column:2;grid-row:2}.admin-page .admin-user-compact-meta>div{display:none}.admin-page .admin-user-compact-meta>div:first-child,.admin-page .admin-user-compact-meta>div:nth-child(2){display:flex}.admin-page .admin-user-inline-slot{grid-column:1/-1}}
@media(max-width:520px){.admin-page .admin-customer-row{grid-template-columns:minmax(0,1fr) auto}.admin-page .admin-user-identity b,.admin-page .admin-user-identity span{font-size:11px}.admin-page .admin-user-compact-meta>div:nth-child(2){grid-column:1;grid-row:2}.admin-page .admin-row-actions{grid-column:2;grid-row:1/3}}



/* FekraEmailWeb V10.200 — enforce one customer per row and declutter point actions */
#usersCards.admin-users-cards {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  width: 100% !important;
  border: 1px solid var(--admin-line, #d7e2ee) !important;
  border-radius: 12px !important;
  overflow: visible !important;
  background: var(--card, #fff) !important;
}
#usersCards.admin-users-cards > .admin-customer-row,
#usersCards.admin-users-cards > .admin-user-card {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.8fr) minmax(110px, .65fr) minmax(140px, .8fr) minmax(100px, .45fr) !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-bottom: 1px solid var(--admin-line, #d7e2ee) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--card, #fff) !important;
}
#usersCards.admin-users-cards > .admin-customer-row:last-child { border-bottom: 0 !important; }
#usersCards .admin-user-card-head { display: contents !important; }
#usersCards .admin-user-identity { min-width: 0 !important; display: flex !important; align-items: center !important; gap: 10px !important; }
#usersCards .admin-user-identity > div:last-child { min-width: 0 !important; }
#usersCards .admin-user-identity h3 { margin: 0 0 3px !important; font-size: 13px !important; }
#usersCards .admin-user-identity b,
#usersCards .admin-user-identity span { font-size: 12px !important; overflow-wrap: anywhere !important; }
#usersCards .admin-user-compact-meta { display: contents !important; }
#usersCards .admin-user-compact-meta > div {
  min-width: 0 !important; padding: 0 !important; border: 0 !important;
  background: transparent !important; display: flex !important;
  flex-direction: column !important; align-items: flex-start !important; gap: 4px !important;
}
#usersCards .admin-user-compact-meta > div > span { font-size: 11px !important; color: var(--admin-muted, #64748b) !important; }
#usersCards .admin-row-actions { min-width: 0 !important; position: relative !important; }
#usersCards .admin-row-actions > summary {
  display: flex !important; align-items: center !important; justify-content: center !important;
  gap: 6px !important; list-style: none !important; white-space: nowrap !important;
  border: 1px solid var(--admin-line, #d7e2ee) !important; border-radius: 9px !important;
  padding: 9px 10px !important; background: var(--admin-surface, #f7f9fc) !important;
  font-size: 12px !important; font-weight: 800 !important; cursor: pointer !important;
}
#usersCards .admin-row-actions > summary::-webkit-details-marker { display: none !important; }
/* Override older global !important rules that caused every point/action button to show all the time. */
#usersCards .admin-user-actions,
#usersCards .admin-row-actions:not([open]) > .admin-user-actions { display: none !important; }
#usersCards .admin-row-actions[open] { grid-column: 1 / -1 !important; cursor: default !important; }
#usersCards .admin-row-actions[open] > .admin-user-actions {
  display: flex !important; flex-wrap: wrap !important; gap: 8px !important;
  justify-content: flex-start !important; padding: 12px 0 2px !important; margin: 0 !important;
}
#usersCards .admin-row-actions[open] .admin-user-action {
  flex: 0 0 auto !important; min-width: 82px !important; min-height: 42px !important;
  padding: 8px 10px !important; border-radius: 9px !important;
}
/* V10.223: keep the confirmation code on its own full-width row; otherwise CSS grid places it in the narrow actions column. */
#usersCards .admin-activation-code-inline {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}
#usersCards .admin-activation-code-inline > div { min-width: 0 !important; }
#usersCards .admin-user-inline-slot { grid-column: 1 / -1 !important; width: 100% !important; min-width: 0 !important; }
#usersCards .admin-user-inline-slot[hidden] { display: none !important; }
.admin-customer-table-head {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.8fr) minmax(110px, .65fr) minmax(140px, .8fr) minmax(100px, .45fr) !important;
  gap: 14px !important; align-items: center !important; padding: 12px 16px !important;
}
html[data-theme="dark"] #usersCards.admin-users-cards,
html[data-theme="dark"] #usersCards.admin-users-cards > .admin-customer-row {
  background: var(--card, #172433) !important; color: var(--admin-ink, #e6edf5) !important;
}
html[data-theme="dark"] .admin-customer-table-head { background: #24374b !important; color: #e1ebf5 !important; }
@media (max-width: 850px) {
  .admin-customer-table-head { display: none !important; }
  #usersCards.admin-users-cards > .admin-customer-row,
  #usersCards.admin-users-cards > .admin-user-card {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important; padding: 12px !important;
  }
  #usersCards .admin-user-identity { grid-column: 1 !important; }
  #usersCards .admin-user-compact-meta > div:first-child { grid-column: 1 !important; display: flex !important; }
  #usersCards .admin-user-compact-meta > div:nth-child(2) { grid-column: 2 !important; grid-row: 1 !important; display: flex !important; }
  #usersCards .admin-user-compact-meta > div:nth-child(n+3) { display: none !important; }
  #usersCards .admin-row-actions { grid-column: 2 !important; grid-row: 2 !important; }
}
@media (max-width: 520px) {
  #usersCards .admin-user-identity b,
  #usersCards .admin-user-identity span { font-size: 11px !important; }
  #usersCards .admin-user-compact-meta > div:nth-child(2) { grid-column: 1 !important; grid-row: 2 !important; }
  #usersCards .admin-row-actions { grid-column: 2 !important; grid-row: 1 / 3 !important; }
}


/* V10.201: show the version badge only inside the admin page */
body:not(.admin-page) .site-version-badge { display: none !important; }

/* V1.2 @2026 admin workspace: show one functional section at a time. */
.admin-page .admin-view-hidden{display:none!important;visibility:hidden!important}
.admin-page .admin-workspace-nav a.active-admin-view{background:#e8f1ff;color:#154f9c;border-color:#c6dcff}
.admin-page .admin-device-count{display:inline-flex!important;align-items:center;gap:5px;margin-top:5px;padding:3px 7px;border-radius:7px;background:rgba(34,145,95,.10);color:#16734b;font-size:11px;font-weight:800}
html[data-theme="dark"] .admin-page .admin-workspace-nav a.active-admin-view,body.admin-page[data-theme="dark"] .admin-workspace-nav a.active-admin-view{background:#243f5d;color:#fff;border-color:#42658a}
html[data-theme="dark"] .admin-page .admin-device-count,body.admin-page[data-theme="dark"] .admin-device-count{background:rgba(60,190,130,.15);color:#80e0b0}


/* V1.2 @2026 — simplified customer records and migration/deletion actions */
.admin-records-section-head{margin:18px 0 10px;padding:12px 14px;border:1px solid #d8e6f1;border-radius:14px;background:linear-gradient(120deg,#f2f8fd,#fff)}
.admin-records-section-head h3{margin:0 0 5px;font-size:17px;color:#173b58}
.admin-records-section-head p{margin:0;font-size:12px}
.client-record-search{margin:10px 0 14px;padding:12px;border:1px solid #dce8f1;border-radius:13px;background:#fff}
.record-transfer-toolbar{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;margin:16px 0 10px;border-color:#c9dff0;background:#f4f9fe}
.record-transfer-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,1.5fr) auto;align-items:end;gap:10px}
.record-transfer-controls .transfer-select-all-label{align-self:center}
.record-delete-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:10px 0 18px}
.record-delete-controls{justify-content:flex-start;padding-top:2px}
.admin-records-list{grid-template-columns:minmax(0,1fr)!important}
@media(max-width:760px){.record-transfer-controls{grid-template-columns:minmax(0,1fr)}.record-transfer-controls .btn{width:100%}.admin-records-section-head{margin-top:12px}.record-delete-controls{display:grid;grid-template-columns:1fr}.record-delete-controls .btn{width:100%}}

/* V1.5 @2026 — move migration/deletion controls above records and keep search empty */
.inline-client-panel .record-transfer-toolbar,
.inline-client-panel .record-delete-toolbar{box-sizing:border-box;width:100%;padding:16px 18px;border-radius:15px;gap:14px;}
.inline-client-panel .record-transfer-toolbar{border:1px solid #c8def2;background:linear-gradient(135deg,#f2f8ff 0%,#fff 100%);}
.inline-client-panel .record-delete-toolbar{border:1px solid #f0c2c2;background:linear-gradient(135deg,#fff5f5 0%,#fff 100%);}
.inline-client-panel .record-transfer-toolbar>div:first-child,
.inline-client-panel .record-delete-toolbar>div:first-child{min-width:0;}
.inline-client-panel .record-transfer-toolbar strong,
.inline-client-panel .record-delete-toolbar strong{display:block;margin-bottom:6px;font-size:15px;line-height:1.7;color:#173b58;}
.inline-client-panel .record-delete-toolbar strong{color:#8c2424;}
.inline-client-panel .record-transfer-toolbar .muted,
.inline-client-panel .record-delete-toolbar .muted{font-size:12px;line-height:1.8;}
.inline-client-panel .selection-counter,
.inline-client-panel .delete-selection-counter{display:inline-flex;align-items:center;gap:5px;margin-top:9px;padding:6px 10px;border-radius:9px;background:#e8f2fc;color:#174f7c;font-size:12px;font-weight:800;}
.inline-client-panel .delete-selection-counter{background:#ffe8e8;color:#972c2c;}
.inline-client-panel .record-transfer-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,1.5fr) minmax(130px,auto);align-items:end;gap:12px;}
.inline-client-panel .transfer-select-all-label{display:flex;align-items:center;gap:8px;min-height:42px;padding:8px 10px;border:1px solid #d4e3f1;border-radius:10px;background:#fff;font-size:12px;font-weight:800;}
.inline-client-panel .transfer-target-picker{min-width:0;gap:7px;}
.inline-client-panel .transfer-target-search,.inline-client-panel .transfer-target-user{min-width:0;width:100%;min-height:40px;border-radius:10px;}
.inline-client-panel .record-transfer-controls>.btn{min-height:42px;white-space:nowrap;}
.inline-client-panel .record-delete-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch;}
.inline-client-panel .record-delete-controls .btn{min-height:42px;white-space:normal;}
.inline-client-panel .record-delete-controls [data-action="delete-selected-records"]{box-shadow:0 3px 8px rgba(185,35,35,.14);}
.inline-client-panel .admin-record-delete-action{margin-top:2px;}
@media(max-width:760px){.inline-client-panel .record-transfer-controls{grid-template-columns:minmax(0,1fr);}.inline-client-panel .record-delete-controls{grid-template-columns:minmax(0,1fr);}.inline-client-panel .record-transfer-toolbar,.inline-client-panel .record-delete-toolbar{padding:12px;}}


/* Global search results: keep restored customer/student data inside the search workspace. */
.admin-global-results-title{font-weight:800;margin:8px 0;color:var(--text,#17324d)}
.admin-global-search-results{display:grid;gap:9px;min-width:0}
.admin-global-customer-result{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:12px;border:1px solid #d9e6f2;border-radius:12px;background:var(--card,#fff)}
.admin-global-customer-main,.admin-global-customer-meta{display:flex;flex-direction:column;gap:4px;min-width:0;overflow-wrap:anywhere}
.admin-global-customer-main strong{direction:ltr;text-align:right}
.admin-global-customer-main span,.admin-global-customer-meta span{font-size:12px;color:var(--muted,#61758a)}
html[data-theme="dark"] .admin-global-customer-result,body.admin-page[data-theme="dark"] .admin-global-customer-result{background:#172433;border-color:#34475b}
@media(max-width:700px){.admin-global-customer-result{grid-template-columns:1fr;align-items:stretch}.admin-global-customer-result .btn{width:100%}}

/* Student record copy action */
.admin-record-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.admin-record-head-actions .btn{white-space:nowrap}
@media(max-width:560px){.admin-record-head-actions{justify-content:flex-start;width:100%}.admin-record-card-head{align-items:flex-start;flex-wrap:wrap}}

/* V1.9: keep the student copy action beside the student name */
.admin-student-name-copy-line{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.admin-student-name-copy-line>b{min-width:0;overflow-wrap:anywhere}
.admin-copy-student-details{flex:0 0 auto;white-space:nowrap}
@media(max-width:560px){.admin-student-name-copy-line{align-items:flex-start;flex-direction:column}.admin-copy-student-details{width:100%}}

/* V1.10 @2026: copy student credentials directly beside each student name */
.record-card-name-line{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;min-width:0}
.record-card-name-line .record-card-name{min-width:0;flex:1}
.copy-student-details-btn{flex:0 0 auto;white-space:nowrap}
@media(max-width:560px){.record-card-name-line{align-items:flex-start}.copy-student-details-btn{font-size:12px;padding:6px 9px}}

/* Fekra batch image resizer */
.image-resizer-modal{position:fixed;inset:0;z-index:10050;background:rgba(8,18,35,.68);display:flex;align-items:center;justify-content:center;padding:18px;overflow:auto}
.image-resizer-modal[hidden]{display:none!important}
.image-resizer-card{width:min(650px,100%);max-height:92vh;overflow:auto;background:var(--card-bg,#fff);color:var(--text,#172033);border:1px solid var(--border,#d7e0ea);border-radius:16px;padding:22px;box-shadow:0 24px 80px rgba(0,0,0,.3)}
.image-resizer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border,#d7e0ea);padding-bottom:12px}
.image-resizer-head h2{font-size:21px;margin:0}.image-resizer-head button{border:0;border-radius:8px;padding:7px 11px;background:#e8edf4;cursor:pointer;font-size:18px}
.image-resizer-help{line-height:1.8;font-size:14px;color:var(--muted,#64748b)}
.image-folder-picker{display:flex;flex-direction:column;gap:8px;font-weight:800;margin:16px 0}.image-folder-picker input{width:100%;padding:10px;border:1px solid var(--border,#cbd5e1);border-radius:9px;background:var(--input-bg,#fff);color:inherit}
.image-resizer-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.image-resizer-fields label{display:flex;flex-direction:column;gap:6px;font-weight:800;font-size:14px}.image-resizer-fields input,.image-resizer-fields select{width:100%;min-height:42px;border:1px solid var(--border,#cbd5e1);border-radius:8px;padding:8px;background:var(--input-bg,#fff);color:inherit;font:inherit}
.image-resizer-selected{margin:16px 0;padding:10px;border-radius:8px;background:var(--soft-bg,#f1f5f9);font-size:14px}.image-resizer-actions{display:flex;gap:10px;flex-wrap:wrap}.image-resizer-actions button{min-height:42px}.image-resizer-actions #runImageResizeBtn{background:#087d28;color:#fff;border-color:#087d28}.image-resizer-actions button:disabled{opacity:.6;cursor:wait}.image-resizer-card progress{display:block;width:100%;height:18px;margin-top:16px}.image-resizer-status{margin-top:8px;min-height:24px;font-size:14px;font-weight:700;line-height:1.6}
body[data-theme="dark"] .image-resizer-card{background:#1f2937;color:#e5edf7;border-color:#37465a}body[data-theme="dark"] .image-resizer-fields input,body[data-theme="dark"] .image-resizer-fields select,body[data-theme="dark"] .image-folder-picker input{background:#111827;color:#f3f4f6;border-color:#475569}body[data-theme="dark"] .image-resizer-selected{background:#26384e}
@media(max-width:760px){.image-resizer-modal{padding:8px}.image-resizer-card{padding:15px}.image-resizer-head h2{font-size:18px}.image-resizer-fields{grid-template-columns:1fr}.image-resizer-open{font-size:12px!important;padding:8px 9px!important}}

/* Per-image review and manual crop editor */
.image-edit-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:14px 0}.image-edit-card{border:1px solid var(--border,#d7e0ea);border-radius:12px;padding:10px;background:var(--soft-bg,#f8fafc);min-width:0}.image-edit-preview{height:210px;position:relative;display:flex;align-items:center;justify-content:center;background:#e5e7eb;border-radius:8px;overflow:hidden}.image-edit-preview img{max-width:100%;max-height:100%;object-fit:contain}.image-delete-btn{position:absolute;top:7px;right:7px;z-index:2;width:30px;height:30px;border:2px solid #fff;border-radius:50%;background:#dc2626;color:#fff;font:bold 23px/24px Arial,sans-serif;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;box-shadow:0 1px 6px #0006}.image-delete-btn:hover{background:#991b1b;transform:scale(1.06)}.image-delete-btn:focus-visible{outline:3px solid #2563eb;outline-offset:2px}.image-edit-name{font-size:13px;font-weight:700;overflow-wrap:anywhere;margin:8px 0}.image-edit-actions{display:flex;gap:6px;flex-wrap:wrap}.image-edit-actions button{font-size:12px;padding:7px}.image-edit-note{font-size:12px;line-height:1.6;margin-top:8px;color:var(--muted,#64748b)}.image-crop-overlay{position:fixed;inset:0;z-index:10070;background:#000a;display:flex;align-items:center;justify-content:center;padding:12px;overflow:auto}.image-crop-dialog{width:min(640px,100%);max-height:96vh;overflow:auto;background:var(--card-bg,#fff);color:var(--text,#172033);border-radius:14px;padding:16px}.image-crop-dialog h3{margin-top:0}.image-crop-canvas{display:block;max-width:100%;max-height:55vh;object-fit:contain;background:white;border:1px solid #94a3b8;margin:10px auto}.image-crop-dialog label{display:block;margin:12px 0;font-size:13px;font-weight:700}.image-crop-dialog input{display:block;width:100%}
/* Free four-corner crop and perspective correction */
.free-crop-stage{position:relative;width:max-content;max-width:100%;margin:12px auto;line-height:0;touch-action:none}.free-crop-canvas{display:block;max-width:min(100%,540px);max-height:55vh;width:auto;height:auto;margin:0}.free-crop-points{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;transform-origin:top left}.free-crop-outline{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.free-crop-outline polygon{fill:#00cdbb12;stroke:#00cdbb;stroke-width:0.7;vector-effect:non-scaling-stroke}.free-crop-point{position:absolute;transform:translate(-50%,-50%);width:18px;height:18px;border:3px solid #00cdbb;border-radius:50%;background:#fff;color:transparent;font-size:0;line-height:0;box-shadow:0 1px 5px #0008;pointer-events:auto;touch-action:none;cursor:move;padding:0}.free-crop-point:focus-visible{outline:3px solid #087cff;outline-offset:3px}.free-crop-help{font-size:12px;line-height:1.6;color:var(--muted,#64748b)}

/* V1.13.10 crop rotation controls */
.crop-toolbar{align-items:center}.crop-toolbar .crop-rotate-left,.crop-toolbar .crop-rotate-right{white-space:nowrap}.crop-toolbar button:disabled{opacity:.55;cursor:wait}

/* Image crop workflow polish V1.13.11 */
.image-edit-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.image-edit-actions .image-crop-btn{background:#075fce!important;color:#fff!important;border:1px solid #075fce!important;font-weight:800;min-height:42px;padding:10px 14px!important}.image-edit-actions .image-reset-btn{background:#eef2f7!important;color:#253247!important;border:1px solid #cbd5e1!important;font-weight:700;min-height:42px;padding:10px 14px!important}.image-crop-dialog{width:min(760px,100%);max-height:96vh;padding:18px;display:flex;flex-direction:column;gap:10px}.crop-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid #e2e8f0;padding-bottom:10px}.crop-dialog-head h3{font-size:21px;margin:0 0 4px}.crop-file-name{font-size:12px;color:#64748b;margin:0;overflow-wrap:anywhere}.crop-close{width:38px;height:38px;border:0;border-radius:10px;background:#eef2f7;color:#1e293b;font-size:27px;line-height:1;cursor:pointer;flex:0 0 auto}.crop-instruction{margin:0!important;padding:10px 12px;border-radius:10px;background:#eff6ff;color:#1e3a8a;font-size:14px;line-height:1.65}.image-crop-dialog .free-crop-stage{margin:4px auto 8px;max-width:100%;border:1px solid #d7e0ea;border-radius:10px;overflow:visible;background:#f8fafc}.image-crop-dialog .free-crop-canvas{max-height:48vh;border:0;border-radius:10px}.image-crop-dialog .free-crop-point{width:30px;height:30px;border:4px solid #fff;background:#00a99b;box-shadow:0 0 0 2px #008b80,0 2px 8px #0006;color:#fff;font-size:11px;font-weight:900;line-height:1;display:flex;align-items:center;justify-content:center;touch-action:none}.image-crop-dialog .free-crop-point:focus-visible{outline:3px solid #2563eb;outline-offset:4px}.crop-rotate-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 0;border-top:1px solid #e2e8f0}.crop-rotate-row span{font-size:13px;font-weight:800;color:#475569;margin-inline-end:4px}.crop-rotate-row button{min-height:42px;padding:9px 14px!important;background:#f1f5f9!important;border:1px solid #cbd5e1!important;color:#1e293b!important;font-weight:800!important}.crop-rotate-row .crop-reset{margin-inline-start:auto}.crop-footer-actions{display:flex;gap:10px;justify-content:flex-end;border-top:1px solid #e2e8f0;padding-top:12px}.crop-footer-actions button{min-height:46px;padding:11px 20px!important;font-weight:900!important}.crop-footer-actions .crop-save{background:#087d28!important;border:1px solid #087d28!important;color:#fff!important;min-width:150px}.crop-footer-actions .crop-cancel{background:#f1f5f9!important;border:1px solid #cbd5e1!important;color:#1e293b!important}@media(max-width:560px){.image-crop-dialog{padding:12px;gap:8px}.crop-dialog-head h3{font-size:18px}.crop-instruction{font-size:13px}.image-crop-dialog .free-crop-canvas{max-height:42vh}.crop-rotate-row{gap:6px}.crop-rotate-row span{width:100%}.crop-rotate-row .crop-reset{margin-inline-start:0}.crop-footer-actions{display:grid;grid-template-columns:1fr 1.5fr}.crop-footer-actions button{width:100%;min-width:0}}

/* V1.13.13 — refreshed image workspace and crop UI */
.image-resizer-modal{align-items:flex-start;background:radial-gradient(ellipse at top right,#123d5a 0%,#071523 62%,#030914 100%);padding:clamp(10px,2vw,28px)}
.image-resizer-card{width:min(1240px,100%);max-height:calc(100vh - 24px);overflow:auto;border:1px solid #cbd5e144;border-radius:24px;padding:clamp(16px,2.2vw,30px);background:linear-gradient(145deg,#fff 0%,#f4f8fc 100%);box-shadow:0 24px 80px #0006;color:#172033}
.image-resizer-head{position:sticky;top:-1px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-2px 0 14px;padding:0 0 14px;border-bottom:1px solid #dbe5ef;background:linear-gradient(145deg,#fff 0%,#f4f8fc 100%)}
.image-resizer-head h2{margin:0;font-size:clamp(21px,2.5vw,30px);font-weight:900;letter-spacing:-.4px;color:#0f2c46}
#closeImageResizerBtn{width:44px;height:44px;border:0;border-radius:14px;background:#e7eef5;color:#18334c;font-size:22px;font-weight:900;cursor:pointer}
.image-resizer-help{margin:0 0 18px;padding:13px 16px;border-radius:14px;background:#e8f4ff;border:1px solid #c4e2fa;color:#17466b;line-height:1.8;font-size:14px}
.image-resizer-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0}
.image-resizer-actions .btn{min-height:46px;padding:11px 18px!important;border-radius:12px!important;font-size:14px!important;font-weight:850!important;box-shadow:0 3px 0 #0000000d}
#chooseSingleImageBtn,#chooseImageFolderBtn{background:#075fce!important;border:1px solid #075fce!important;color:#fff!important}
#chooseImageFolderBtn{background:#0e766e!important;border-color:#0e766e!important}
.image-resizer-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0;padding:16px;border:1px solid #d8e3ee;border-radius:16px;background:#fff}
.image-resizer-fields label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:850;color:#34465b}
.image-resizer-fields input,.image-resizer-fields select{width:100%;min-width:0;min-height:43px;border:1px solid #cbd8e5;border-radius:10px;padding:8px 10px;background:#f8fbff;color:#13263a;font-size:15px;font-weight:700}
.image-resizer-selected{margin:16px 0;padding:13px 16px;border-radius:13px;background:#eaf8f1;border:1px solid #b8e4cd;color:#145b3b;font-weight:800;line-height:1.7}
.image-edit-gallery{grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:16px;margin:18px 0}
.image-edit-card{padding:13px;border:1px solid #d5e0eb;border-radius:18px;background:#fff;box-shadow:0 6px 18px #1e3a5f0b;transition:transform .16s ease,box-shadow .16s ease}
.image-edit-card:hover{transform:translateY(-2px);box-shadow:0 12px 26px #1e3a5f14}
.image-edit-preview{height:260px;border:1px solid #d8e1eb;border-radius:13px;background:linear-gradient(45deg,#edf2f7 25%,transparent 25%,transparent 75%,#edf2f7 75%),linear-gradient(45deg,#edf2f7 25%,#fff 25%,#fff 75%,#edf2f7 75%);background-position:0 0,8px 8px;background-size:16px 16px}
.image-edit-preview img{width:100%;height:100%;object-fit:contain;padding:5px}
.image-edit-name{font-size:13px;color:#273b50;margin:11px 2px;min-height:20px}
.image-edit-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.image-edit-actions .image-crop-btn{min-height:44px;border-radius:11px!important;background:#075fce!important;border-color:#075fce!important;color:white!important;font-size:13px!important}
.image-edit-actions .image-reset-btn{min-height:44px;border-radius:11px!important;background:#eef3f8!important;border-color:#cbd8e5!important;color:#253b50!important;font-size:13px!important}
.image-edit-note{padding:8px 9px;border-radius:9px;background:#f4f7fb;color:#607187;line-height:1.7}
#runImageResizeBtn{background:#087d37!important;color:#fff!important;border:1px solid #087d37!important;min-width:190px}
#cancelImageResizeBtn{background:#e8eef5!important;color:#26384b!important;border:1px solid #cbd5e1!important}
#imageResizeProgress{width:100%;height:12px;accent-color:#0e9f6e}
.image-resizer-status{padding:10px 12px;border-radius:10px;background:#f0f4f8;color:#34465b;font-weight:750}
/* Crop dialog is a spacious editor, not a small floating box */
.image-crop-overlay{padding:clamp(8px,2vw,24px);background:rgba(3,12,25,.84);backdrop-filter:blur(7px)}
.image-crop-dialog{width:min(1040px,100%);max-height:96vh;gap:12px;padding:clamp(14px,2vw,24px);border:1px solid #dbe6f1;border-radius:22px;box-shadow:0 28px 90px #0008;background:#f8fbff}
.crop-dialog-head{align-items:center;border-bottom:1px solid #d7e3ef;padding-bottom:14px}
.crop-dialog-head h3{font-size:clamp(20px,2vw,27px);color:#102e48}
.crop-file-name{font-size:12px;margin-top:5px}
.crop-instruction{background:#e5f2ff;color:#17456d;border:1px solid #c6e2fb;border-radius:12px;padding:12px 15px;font-weight:650}
.image-crop-dialog .free-crop-stage{width:fit-content;max-width:100%;margin:4px auto 10px;padding:0;border:2px solid #c7d7e7;border-radius:14px;background:#e8eef5;box-shadow:0 8px 28px #16324d18;overflow:hidden}
.image-crop-dialog .free-crop-canvas{max-width:min(100%,900px);max-height:58vh;border-radius:12px;cursor:crosshair;touch-action:none}
.image-crop-dialog .free-crop-point{width:32px;height:32px;background:#087fce;border:4px solid #fff;box-shadow:0 0 0 2px #075fce,0 3px 10px #0007;font-size:12px;cursor:grab}
.image-crop-dialog .free-crop-point:active{cursor:grabbing;transform:translate(-50%,-50%) scale(1.12)}
.free-crop-outline polygon{fill:#087fce18;stroke:#00a78f;stroke-width:1.2;stroke-dasharray:3 1;vector-effect:non-scaling-stroke}
.crop-rotate-row{padding:13px 0;border-top:1px solid #d7e3ef}
.crop-rotate-row span{color:#243e56}
.crop-rotate-row button{border-radius:11px!important;min-height:44px!important}
.crop-rotate-row .crop-rotate-left,.crop-rotate-row .crop-rotate-right{background:#e6f1ff!important;border-color:#b9d8fb!important;color:#124b82!important}
.crop-rotate-row .crop-reset{margin-inline-start:auto;background:#fff4d8!important;border-color:#f2d58a!important;color:#6b4a00!important}
.crop-footer-actions{padding-top:14px}
.crop-footer-actions .crop-save{border-radius:12px!important;background:#087d37!important;box-shadow:0 4px 0 #05642b!important}
.crop-footer-actions .crop-cancel{border-radius:12px!important}
@media(max-width:760px){.image-resizer-modal{padding:6px}.image-resizer-card{max-height:calc(100vh - 12px);padding:14px;border-radius:18px}.image-resizer-fields{grid-template-columns:repeat(2,minmax(0,1fr));padding:11px}.image-edit-gallery{grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr))}.image-edit-preview{height:220px}.image-crop-dialog .free-crop-canvas{max-height:44vh}.crop-rotate-row .crop-reset{margin-inline-start:0}}
@media(max-width:420px){.image-resizer-fields{grid-template-columns:1fr 1fr}.image-edit-gallery{grid-template-columns:1fr}.image-edit-preview{height:250px}.image-edit-actions{grid-template-columns:1fr}.crop-footer-actions{grid-template-columns:1fr 1.5fr}}

/* V1.13.18: clean corner handles without numbers */
.image-crop-dialog .free-crop-point{font-size:0!important;color:transparent!important;}

/* V1.13.19: square corner grips and mid-edge drag bars */
.image-crop-dialog .free-crop-point{width:10px!important;height:10px!important;border:1px solid #fff!important;border-radius:2px!important;background:#00bfae!important;box-shadow:0 0 0 1.5px #008b80,0 1px 4px #0006!important;color:transparent!important;font-size:0!important;line-height:0!important;padding:0!important;display:block!important;cursor:move!important;touch-action:none!important}
.image-crop-dialog .free-crop-edge{position:absolute;z-index:3;transform:translate(-50%,-50%);width:26px;height:7px;border:1px solid #fff;border-radius:4px;background:#00bfae;box-shadow:0 0 0 1.5px #008b80,0 1px 4px #0006;padding:0;cursor:move;pointer-events:auto;touch-action:none}
.image-crop-dialog .free-crop-edge[data-edge="1"],.image-crop-dialog .free-crop-edge[data-edge="3"]{width:7px;height:26px}
.image-crop-dialog .free-crop-point:active,.image-crop-dialog .free-crop-edge:active{background:#087fce}


/* V1.13.22 — Header navigation layout repair: prevent crowded/overlapping buttons */
.top{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;min-width:0}
.top>.brand{order:0;flex:0 0 auto;max-width:100%;min-width:0}
.top>.brand>div{min-width:0}
.top>.brand h1{white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.top>.nav{order:1;flex:1 1 100%;width:100%;max-width:100%;min-width:0;box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:7px;overflow:visible}
.top>.nav>.btn{box-sizing:border-box;flex:0 0 auto;max-width:100%;min-height:38px;height:auto;line-height:1.25;white-space:normal;overflow-wrap:anywhere;text-align:center}
.top>.nav>.nav-print-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.top>.nav>.nav-print-btn .nav-print-sub{display:block;max-width:100%;white-space:normal;line-height:1.2}
@media(min-width:1101px){.top>.brand{margin-inline-start:auto}.top>.nav{flex:1 1 auto;width:auto;max-width:calc(100% - 300px);justify-content:flex-start}}
@media(max-width:1100px) and (min-width:761px){.top{align-items:flex-start;padding:10px 12px}.top>.brand{width:100%;justify-content:flex-end}.top>.nav{flex:1 1 100%;justify-content:flex-start}.top>.nav>.btn{font-size:13px;padding:8px 10px}}
@media(max-width:760px){.top{align-items:stretch;gap:8px}.top>.brand{width:100%;justify-content:flex-end}.top>.brand img{flex:0 0 auto}.top>.brand h1{font-size:16px}.top>.brand small{font-size:11px}.top>.nav{width:100%;flex:1 1 100%;overflow:visible;gap:6px}.top>.nav>.nav-main-btn.nav-collapsed-item{display:none}}
/* V1.13.24 — image conversion button inherits the same sizing as Records and Inbox */

/* V1.13.25 — inline image converter workspace and consistent navigation button */
.top>.nav>#openImageResizerBtn{font:inherit;box-sizing:border-box;flex:0 0 auto;min-height:38px;height:auto;line-height:1.25;white-space:normal;overflow-wrap:anywhere;text-align:center}
.top>.nav>#openImageResizerBtn.image-resizer-current{outline:2px solid rgba(255,255,255,.75);outline-offset:1px}
.image-resizer-page{display:block;position:relative;z-index:1;width:100%;box-sizing:border-box;padding:clamp(10px,2vw,28px);background:transparent;color:var(--text,#172033)}
.image-resizer-page[hidden]{display:none!important}
.image-resizer-page .image-resizer-card{width:min(1240px,100%);max-width:1240px;max-height:none;min-height:0;overflow:visible;margin:0 auto;border:1px solid var(--border,#d7e0ea);border-radius:20px;padding:clamp(16px,2.2vw,30px);background:var(--card-bg,#fff);box-shadow:0 8px 28px rgba(0,0,0,.12);color:var(--text,#172033);box-sizing:border-box}
.image-resizer-page .image-resizer-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.image-resizer-page .image-resizer-head h2{margin:0;line-height:1.35}
.image-resizer-page .image-resizer-head #closeImageResizerBtn{flex:0 0 auto}
body.image-resizer-page-open{background:var(--page-bg,#f3f6fb)}
@media(max-width:760px){.image-resizer-page{padding:10px}.image-resizer-page .image-resizer-card{padding:14px;border-radius:14px}.image-resizer-page .image-resizer-fields{grid-template-columns:1fr!important}}

/* v1.13.26 - independent student/teacher workspaces on customer home */
.audience-switch { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0 15px; }
.audience-switch-btn { appearance:none; border:1px solid #c8d8eb; border-radius:14px; background:#f1f6fc; padding:16px 18px; font:inherit; font-weight:800; font-size:18px; color:#254b77; text-align:center; cursor:pointer;box-shadow:0 2px 5px rgba(20,52,93,.04); transition:border-color .2s, background .2s,box-shadow .2s; }
.audience-switch-btn small { display:block;font-size:12px;font-weight:500;margin-top:4px;color:#647992; }
.audience-switch-btn.is-active { color:#fff;background:#1767ce;border-color:#1767ce;box-shadow:0 7px 16px rgba(23,103,206,.18); }
.audience-switch-btn.is-active small { color:#e6f0ff; }
.audience-switch-btn:focus-visible { outline:3px solid #f59e0b;outline-offset:3px; }
.audience-workspace[hidden] { display:none!important; }
.audience-workspace-title { display:flex;align-items:center;gap:12px;margin:8px 0 16px;padding:12px 16px;background:#eaf3ff;border:1px solid #d0e3f9;border-radius:12px; }
.audience-workspace-title > span { font-size:29px; }
.audience-workspace-title h2 { margin:0 0 2px;font-size:20px;color:#173d70; }
.audience-workspace-title p { margin:0;font-size:13px;color:#65778b;line-height:1.7; }
.teacher-title { background:#ecf8f4;border-color:#d1e9df; }
.teacher-title h2 { color:#14624b; }
.teacher-workspace-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px; }
.teacher-feature-card { padding:22px 18px;min-width:0; }
.teacher-feature-card .teacher-feature-icon { font-size:28px; }
.teacher-feature-card h3 { font-size:18px;margin:9px 0;line-height:1.5; }
.teacher-feature-card p { color:#66778b;font-size:13px;line-height:1.9;min-height:74px; }
.teacher-feature-status { display:inline-block;padding:7px 11px;border-radius:999px;background:#eef2f6;border:1px solid #d7e0e9;color:#53657d;font-size:12px;font-weight:700; }
.teacher-safety-note { padding:15px 18px;margin-top:15px;border:1px solid #cce4d9;border-radius:12px;background:#f2fbf7;color:#225b48; }
.teacher-safety-note p { margin:7px 0 0;line-height:1.9;font-size:13px; }
@media(max-width:860px) { .teacher-workspace-grid {grid-template-columns:1fr;} .teacher-feature-card p { min-height:0; } }
@media(max-width:560px) { .audience-switch { gap:8px; } .audience-switch-btn {padding:11px 7px;font-size:15px;} .audience-switch-btn small { font-size:10px; } }
body[data-theme="dark"] .audience-switch-btn { background:#26384f;border-color:#465d77;color:#e7effb; }
body[data-theme="dark"] .audience-switch-btn.is-active { background:#1e65b8;border-color:#1e65b8;color:#fff; }
body[data-theme="dark"] .audience-workspace-title {background:#24364c;border-color:#3b526e;}
body[data-theme="dark"] .audience-workspace-title h2 {color:#e8f1ff;}
body[data-theme="dark"] .audience-workspace-title p {color:#bac8d8;}
body[data-theme="dark"] .teacher-safety-note {background:#203e36;border-color:#355f4f;color:#d9f5e7;}
body[data-theme="dark"] .teacher-feature-status {background:#2a3849;border-color:#4b5970;color:#d8e1ed;}


/* V1.13.30 — one-line customer summary: credits / students / teachers */
.home-summary-stats {
  display: grid;
  direction: rtl;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  width: 100%;
  margin-top: 12px;
}
.home-summary-stats > .stat {
  box-sizing: border-box;
  margin: 0;
  min-width: 0;
  min-height: 104px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: right;
  border-radius: 14px;
  border: 1px solid #d6e5f5;
  background: #f6faff;
}
.home-summary-stats > .stat .muted {
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.home-summary-stats > .stat b {
  display: block;
  margin-top: 4px;
  color: #133d70;
  font-size: clamp(25px, 2.6vw, 33px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.home-summary-stats > .home-summary-credit { background: #f2f7ff; border-color: #cfe1fb; }
.home-summary-stats > .home-summary-students { background: #f5fbff; }
.home-summary-stats > .home-summary-teachers { background: #f4faf8; border-color: #d4ece3; }
.home-summary-stats > .home-summary-teachers b { color: #17674e; }
.home-summary-stats > .stat-zero-credit b { color: #c62828; }
/* Preserve the same single row on narrow screens, with horizontal scrolling
   instead of squeezing Arabic text into unreadable columns. */
@media (max-width: 620px) {
  .home-summary-stats {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 9px;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .home-summary-stats > .stat {
    min-height: 96px;
    padding: 14px 12px;
    scroll-snap-align: start;
  }
  .home-summary-stats > .stat .muted { font-size: 12px; }
  .home-summary-stats > .stat b { font-size: 27px; }
}
body[data-theme="dark"] .home-summary-stats > .stat b,
:root[data-theme="dark"] .home-summary-stats > .stat b { color: #e2eeff; }
body[data-theme="dark"] .home-summary-stats > .stat-zero-credit b,
:root[data-theme="dark"] .home-summary-stats > .stat-zero-credit b { color: #fecaca; }
