
:root{--navy:#0b2f66;--navy2:#123f83;--gold:#e8ad22;--bg:#f4f7fb;--ink:#172033;--muted:#6d7688;--line:#dde4ee;--success:#188454;--danger:#c53f4f;font-family:system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}.hidden{display:none!important}button,input{font:inherit}button{cursor:pointer}.splash{position:fixed;inset:0;background:linear-gradient(155deg,var(--navy),#061b3c);z-index:9999;color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:24px;transition:.3s}.splash-mark,.brand-mark,.mini-logo{display:grid;place-items:center;background:linear-gradient(145deg,var(--gold),#ffd76b);color:var(--navy);font-weight:900;box-shadow:0 10px 30px rgba(0,0,0,.15)}.splash-mark{width:96px;height:96px;border-radius:28px;font-size:36px}.splash h1{margin:20px 0 5px;font-size:34px}.splash p{opacity:.82;margin:0}.dots{display:flex;gap:7px;margin-top:24px}.dots i{width:8px;height:8px;border-radius:50%;background:#fff;animation:b 1s infinite}.dots i:nth-child(2){animation-delay:.12s}.dots i:nth-child(3){animation-delay:.24s}@keyframes b{50%{opacity:.25;transform:translateY(-4px)}}.offline-bar{position:fixed;top:0;left:0;right:0;background:#a33;color:#fff;text-align:center;padding:8px;z-index:10000;font-size:13px}.login-shell{min-height:100vh;display:grid;grid-template-columns:1.1fr .9fr}.login-brand{background:linear-gradient(145deg,var(--navy),#071d40);color:#fff;padding:52px;display:flex;flex-direction:column;justify-content:space-between}.brand-row,.header-brand{display:flex;align-items:center;gap:12px;direction:ltr;text-align:left}.brand-mark{width:58px;height:58px;border-radius:18px;font-size:22px}.brand-mark.small{width:42px;height:42px;border-radius:13px;font-size:16px}.brand-row strong,.header-brand strong{display:block;font-size:20px}.brand-row small,.header-brand small{opacity:.72}.hero-copy{max-width:650px}.eyebrow{color:var(--gold);font-weight:800;font-size:13px}.hero-copy h1{font-size:48px;line-height:1.15;margin:14px 0}.hero-copy p{font-size:18px;line-height:1.8;opacity:.83}.feature-pills{display:flex;flex-wrap:wrap;gap:8px}.feature-pills span{border:1px solid rgba(255,255,255,.25);padding:8px 12px;border-radius:999px;font-size:13px}.login-card{align-self:center;margin:38px;max-width:500px;width:calc(100% - 76px);background:#fff;border:1px solid var(--line);border-radius:28px;padding:34px;box-shadow:0 22px 70px rgba(20,50,90,.10)}.mini-logo{width:58px;height:58px;border-radius:18px;margin:auto;font-size:20px}.login-card h2{text-align:center;margin:16px 0 6px}.muted{color:var(--muted)}.login-card>p{text-align:center}label{display:block;font-weight:700;font-size:14px;margin-top:18px}input{width:100%;border:1px solid var(--line);border-radius:14px;padding:13px 14px;margin-top:7px;background:#fff;outline:none}input:focus{border-color:var(--navy2);box-shadow:0 0 0 3px rgba(18,63,131,.08)}.password-wrap{position:relative}.password-wrap input{padding-left:50px}.icon-btn{position:absolute;left:8px;top:14px;background:none;border:0}.primary-btn,.secondary-btn,.ghost-btn{border-radius:12px;border:0;padding:12px 16px;font-weight:800}.primary-btn{background:linear-gradient(135deg,var(--navy),var(--navy2));color:#fff;width:100%;margin-top:22px}.secondary-btn{background:#eef4ff;color:var(--navy);border:1px solid #cddaf1;width:100%;margin-top:10px}.secondary-btn.compact{width:auto;margin:0}.ghost-btn{background:#fff;border:1px solid var(--line);color:var(--navy)}.message{margin-top:14px;border-radius:12px;padding:11px 12px;font-size:13px}.message.error{background:#fff0f2;color:#a62b3b}.login-note{font-size:12px!important;line-height:1.7;background:#fff8e7;padding:10px;border-radius:12px;color:#72500b!important}.app-header{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:30}.header-actions{display:flex;align-items:center;gap:10px}.role-badge{background:#fff4d4;color:#7a5700;border:1px solid #f2d681;padding:7px 10px;border-radius:999px;font-size:12px;font-weight:800}.app-body{display:grid;grid-template-columns:230px 1fr;min-height:calc(100vh - 76px)}.sidebar{background:linear-gradient(180deg,var(--navy),#071d40);padding:18px 12px;display:flex;flex-direction:column;gap:7px}.nav-item{border:0;background:transparent;color:#e9effa;text-align:right;padding:12px 14px;border-radius:10px;font-weight:700}.nav-item.active,.nav-item:hover{background:var(--gold);color:#12264b}.content{padding:28px;min-width:0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.section-head h2{margin:5px 0 0}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.stat-card,.panel,.group-card,.student-card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 25px rgba(18,45,80,.05)}.stat-card{padding:18px}.stat-card b{display:block;font-size:28px;color:var(--navy);margin-top:7px}.stat-card span{font-size:13px;color:var(--muted)}.panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}.panel{padding:18px}.panel h3{margin-top:0}.cards-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.group-card{padding:18px}.group-card h3{margin:0 0 8px}.group-card p{margin:5px 0;color:var(--muted)}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:650px}th,td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:right;font-size:13px}th{color:var(--muted);font-weight:800;background:#fafbfd}.status{display:inline-block;padding:5px 8px;border-radius:999px;font-weight:800;font-size:11px}.status.active{background:#e8f7f0;color:var(--success)}.status.inactive{background:#fff0f2;color:var(--danger)}.toolbar{margin-bottom:12px}.toolbar input{max-width:360px}.student-card{padding:22px}.student-card h3{font-size:24px;margin:0 0 8px}.student-meta{display:flex;gap:10px;flex-wrap:wrap}.student-meta span{background:#f2f5fa;border:1px solid var(--line);padding:7px 10px;border-radius:10px;font-size:13px}.empty{padding:26px;text-align:center;color:var(--muted);background:#fff;border:1px dashed #cfd8e7;border-radius:16px}@media(max-width:900px){.login-shell{grid-template-columns:1fr}.login-brand{display:none}.login-card{margin:28px auto;width:calc(100% - 32px)}.app-body{grid-template-columns:1fr}.sidebar{position:sticky;top:76px;z-index:20;flex-direction:row;overflow:auto;padding:8px}.nav-item{white-space:nowrap;text-align:center;padding:9px 12px}.content{padding:18px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.panel-grid{grid-template-columns:1fr}.cards-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.app-header{padding:0 12px;height:68px}.app-body{min-height:calc(100vh - 68px)}.sidebar{top:68px}.header-brand small{display:none}.ghost-btn{padding:8px 10px;font-size:12px}.role-badge{display:none}.content{padding:14px}.stats-grid{grid-template-columns:1fr 1fr;gap:10px}.stat-card{padding:14px}.stat-card b{font-size:23px}.cards-grid{grid-template-columns:1fr}.section-head{align-items:flex-start}.secondary-btn.compact{padding:9px 11px}}


/* ===== V1.1 Mobile navigation + data-list fixes ===== */
@media(max-width:900px){
  .app-body{display:block;min-height:calc(100vh - 76px)}
  .sidebar{
    position:sticky;top:76px;z-index:20;
    width:100%;height:auto!important;min-height:0!important;
    padding:8px 10px;
    display:flex;flex-direction:row;align-items:center;justify-content:flex-start;
    gap:6px;overflow-x:auto;overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
  }
  .nav-item{
    flex:0 0 auto!important;
    width:auto!important;height:42px!important;min-height:42px!important;max-height:42px!important;
    padding:0 14px!important;margin:0!important;
    display:flex;align-items:center;justify-content:center;
    border-radius:12px;line-height:1!important;white-space:nowrap;
    align-self:center!important;
  }
  .nav-item.active,.nav-item:hover{height:42px!important;min-height:42px!important;max-height:42px!important}
}

@media(max-width:640px){
  .app-header{height:68px}
  .app-body{min-height:calc(100vh - 68px)}
  .sidebar{top:68px}
  .panel{padding:14px}
  .table-wrap{overflow:visible}
  .responsive-data-table{min-width:0!important;width:100%;border-collapse:separate;border-spacing:0}
  .responsive-data-table thead{display:none}
  .responsive-data-table,.responsive-data-table tbody,.responsive-data-table tr,.responsive-data-table td{display:block;width:100%}
  .responsive-data-table tbody{display:grid;gap:12px}
  .responsive-data-table tr{
    border:1px solid var(--line);border-radius:16px;background:#fff;
    padding:10px 12px;box-shadow:0 5px 16px rgba(18,45,80,.04);overflow:hidden;
  }
  .responsive-data-table td{
    border-bottom:1px solid #edf1f6;padding:9px 2px!important;
    display:flex;align-items:center;justify-content:space-between;gap:14px;
    text-align:left;font-size:13px;white-space:normal;overflow-wrap:anywhere;
  }
  .responsive-data-table td:last-child{border-bottom:0}
  .responsive-data-table td::before{
    content:attr(data-label);font-weight:800;color:var(--muted);text-align:right;flex:0 0 auto;
  }
  .students-data-table td[data-label="الاسم"]{font-weight:800;color:var(--ink)}
  .students-data-table td[data-label="الاسم"]::before{font-weight:800;color:var(--muted)}
}


/* ===== V1.2 Teacher management ===== */
.inline-btn{width:auto!important;margin:0!important;display:inline-flex;align-items:center;justify-content:center;gap:6px}
select{width:100%;border:1px solid var(--line);border-radius:14px;padding:13px 14px;margin-top:7px;background:#fff;outline:none;font:inherit;color:var(--ink)}
select:focus{border-color:var(--navy2);box-shadow:0 0 0 3px rgba(18,63,131,.08)}
.actions{display:flex;gap:6px;flex-wrap:wrap}.action-btn{border:1px solid var(--line);background:#fff;color:var(--navy);padding:7px 9px;border-radius:9px;font-weight:800;font-size:12px}.action-btn.warn{color:#9a5c00;background:#fff8e7;border-color:#f1d28b}.action-btn.danger{color:#a52b3d;background:#fff1f3;border-color:#f0c5cb}
.group-actions{display:flex;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.modal{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:18px}.modal-backdrop{position:absolute;inset:0;background:rgba(4,17,39,.62);backdrop-filter:blur(3px)}.modal-card{position:relative;z-index:1;background:#fff;border-radius:22px;border:1px solid var(--line);box-shadow:0 25px 80px rgba(0,0,0,.25);width:min(560px,100%);max-height:90vh;overflow:auto;padding:22px}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.modal-head h3{margin:4px 0 0;font-size:23px}.close-btn{border:0;background:#f1f4f8;color:var(--navy);width:38px;height:38px;border-radius:12px;font-size:24px;line-height:1}.modal-actions{display:flex;gap:10px;justify-content:flex-start;margin-top:20px}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f7f9fc;border:1px solid var(--line);padding:12px 14px;border-radius:14px}.switch-row input{width:22px;height:22px;margin:0}.hint{margin-top:15px;padding:11px 12px;background:#fff8e7;color:#70510c;border:1px solid #f0d58f;border-radius:12px;font-size:12px;line-height:1.7}.success-box{background:#eaf8f1;color:#126b45;border:1px solid #bde7d2;padding:12px;border-radius:12px;margin:16px 0}.credential-line{display:grid;grid-template-columns:150px 1fr;gap:12px;align-items:start;padding:11px 0;border-bottom:1px solid var(--line)}.credential-line span{color:var(--muted);font-weight:700}.credential-line code{direction:ltr;text-align:left;overflow-wrap:anywhere;background:#f4f6f9;padding:7px;border-radius:8px}.danger-note{color:#9a2737;background:#fff2f3;border:1px solid #f1ccd1;border-radius:12px;padding:10px;font-size:12px;line-height:1.6}.toast{position:fixed;z-index:3000;left:50%;bottom:24px;transform:translateX(-50%);background:#172033;color:#fff;padding:11px 16px;border-radius:12px;box-shadow:0 12px 35px rgba(0,0,0,.18);max-width:calc(100% - 32px);text-align:center}.toast.error{background:#9e2f3f}.toast.ok{background:#126b45}
@media(max-width:640px){.section-head .primary-btn.inline-btn{padding:9px 11px;font-size:12px}.actions{justify-content:flex-start}.responsive-data-table td[data-label="الإجراءات"]{display:block}.responsive-data-table td[data-label="الإجراءات"]::before{display:block;margin-bottom:8px}.credential-line{grid-template-columns:1fr}.modal{padding:10px}.modal-card{padding:18px;border-radius:18px}.modal-actions{display:grid;grid-template-columns:1fr 1fr}.modal-actions .inline-btn{width:100%!important}}


/* =========================
   V1.3 TENANT BRANDING
   ========================= */
.tenant-identity{display:flex;flex-direction:column;gap:7px}
.tenant-identity b{font-size:20px;color:var(--navy)}
.tenant-identity span{font-weight:700}
.tenant-phone{margin:2px 0 0!important;color:var(--muted);direction:ltr;text-align:right}
.tenant-parent-banner{
  display:flex;align-items:center;gap:14px;
  background:linear-gradient(135deg,var(--navy),var(--navy-2));
  color:#fff;border-radius:18px;padding:16px 18px;margin-bottom:14px;
  box-shadow:0 10px 28px rgba(11,47,102,.12)
}
.tenant-parent-banner .tenant-avatar{
  min-width:52px;width:52px;height:52px;border-radius:16px;
  display:grid;place-items:center;background:var(--gold);color:var(--navy);
  font-weight:900;font-size:18px;direction:ltr
}
.tenant-parent-banner b{display:block;font-size:18px}
.tenant-parent-banner span{display:block;margin-top:3px;opacity:.9;font-weight:700}
.tenant-parent-banner small{display:block;margin-top:5px;opacity:.78;direction:ltr;text-align:right}


/* =========================
   V1.4 LESSON TRACKING
   ========================= */
.lesson-setup-panel{margin-bottom:16px}
.lesson-setup-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px
}
.lesson-title-field{grid-column:span 2}
.lesson-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}
.lesson-id-preview{font-size:12px;color:var(--muted);direction:ltr;text-align:left;overflow-wrap:anywhere}
.lesson-default-note{
  background:#fff8e7;border:1px solid #f0d58f;color:#70510c;
  border-radius:14px;padding:12px 14px;margin-bottom:12px;line-height:1.7
}
.lesson-roster{display:grid;gap:12px}
.lesson-student-card{
  background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;
  box-shadow:0 7px 20px rgba(18,45,80,.04)
}
.lesson-student-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.lesson-student-head b{display:block;font-size:16px}
.lesson-student-head span{color:var(--muted);font-size:12px}
.lesson-fields-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.lesson-fields-grid label{margin:0;font-size:12px;color:var(--muted)}
.lesson-field{margin-top:6px!important;padding:10px 9px!important;font-size:13px}
.lesson-save-bar{
  position:sticky;bottom:10px;z-index:10;margin-top:14px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:rgba(255,255,255,.96);backdrop-filter:blur(10px);
  border:1px solid var(--line);border-radius:16px;padding:12px 14px;
  box-shadow:0 12px 32px rgba(18,45,80,.10)
}
.parent-month-label{
  margin:0;display:flex;align-items:center;gap:8px;color:var(--muted);
  font-size:12px;font-weight:800
}
.parent-month-label input{width:auto;min-width:150px;margin:0;padding:9px 10px}
.parent-month-panel{margin-top:14px}
.parent-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.parent-summary-grid>div:not(.empty){
  background:#f7f9fc;border:1px solid var(--line);border-radius:14px;padding:12px;text-align:center
}
.parent-summary-grid span{display:block;color:var(--muted);font-size:12px}
.parent-summary-grid b{display:block;color:var(--navy);font-size:22px;margin-top:5px}
.parent-lessons-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 2px 10px}
.parent-lessons-head h3{margin:0}
.parent-lessons-list{display:grid;gap:12px}
.parent-lesson-card{
  background:#fff;border:1px solid var(--line);border-right:5px solid var(--success);
  border-radius:17px;padding:15px;box-shadow:0 6px 18px rgba(18,45,80,.04)
}
.parent-lesson-card.absent{border-right-color:var(--danger)}
.parent-lesson-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.parent-lesson-head b{display:block;font-size:16px}
.parent-lesson-head span{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.attendance-pill{padding:6px 9px;border-radius:999px;font-size:11px!important;font-weight:900;white-space:nowrap}
.attendance-pill.present{background:#e8f7f0;color:var(--success)}
.attendance-pill.absent{background:#fff0f2;color:var(--danger)}
.parent-lesson-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.parent-lesson-grid>div{background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:9px;text-align:center}
.parent-lesson-grid span{display:block;color:var(--muted);font-size:11px}
.parent-lesson-grid b{display:block;margin-top:4px;font-size:13px}

@media(max-width:900px){
  .lesson-setup-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lesson-title-field{grid-column:span 2}
  .lesson-fields-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .lesson-setup-grid{grid-template-columns:1fr 1fr}
  .lesson-title-field{grid-column:1/-1}
  .lesson-toolbar{align-items:flex-start;flex-direction:column}
  .lesson-fields-grid{grid-template-columns:1fr 1fr}
  .lesson-save-bar{bottom:6px}
  .parent-summary-grid{grid-template-columns:1fr 1fr}
  .parent-month-label{width:100%;justify-content:space-between;margin-top:8px}
  .section-head:has(.parent-month-label){flex-wrap:wrap}
}


/* =========================
   V1.4.1 PARENT LESSON FIXES
   ========================= */
.parent-lesson-grid.four-items{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.text-success{color:var(--success)!important}
.text-danger{color:var(--danger)!important}

/* Prevent sticky navigation from visually crowding content on mobile. */
@media(max-width:560px){
  .parent-lesson-grid.four-items{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .section{
    scroll-margin-top:132px;
  }
  .content{
    padding-top:18px;
  }
}


/* =========================
   V1.4.2 FORCED-REFRESH + ATTENDANCE
   ========================= */
.attendance-explicit{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#f7f9fc;
}
.attendance-explicit span{color:var(--muted);font-size:12px;font-weight:800}
.attendance-explicit b{font-size:15px}
.attendance-explicit.present{background:#eef9f4;border-color:#cdebdc}
.attendance-explicit.present b{color:var(--success)}
.attendance-explicit.absent{background:#fff2f4;border-color:#f1cdd3}
.attendance-explicit.absent b{color:var(--danger)}

.build-chip{
  position:fixed;
  left:7px;
  bottom:7px;
  z-index:99999;
  font:700 9px/1 system-ui,sans-serif;
  color:#6f7b90;
  background:rgba(255,255,255,.88);
  border:1px solid #dbe2ec;
  border-radius:999px;
  padding:4px 6px;
  pointer-events:none;
  opacity:.72;
}


/* =========================
   V1.5 MONTHLY EXAM + NOTES
   ========================= */
.exam-setup-panel{margin-bottom:16px}
.exam-setup-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.exam-roster{display:grid;gap:12px}
.exam-student-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  box-shadow:0 7px 20px rgba(18,45,80,.04);
}
.exam-student-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin-bottom:12px;
}
.exam-student-head b{display:block;font-size:16px}
.exam-student-head span{color:var(--muted);font-size:12px}
.exam-student-fields{
  display:grid;
  grid-template-columns:minmax(150px,.6fr) minmax(260px,1.4fr);
  gap:12px;
}
.exam-student-fields label{margin:0}
.score-input-wrap{
  display:flex;align-items:center;gap:8px;
}
.score-input-wrap input{margin-top:6px}
.score-input-wrap span{
  white-space:nowrap;color:var(--muted);font-weight:800;margin-top:6px
}
textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  margin-top:7px;
  background:#fff;
  outline:none;
  resize:vertical;
  font:inherit;
}
textarea:focus{
  border-color:var(--navy-2);
  box-shadow:0 0 0 3px rgba(18,63,131,.08);
}
.parent-exam-wrap{margin-top:14px}
.parent-exam-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  box-shadow:0 8px 25px rgba(18,45,80,.05);
}
.parent-exam-card.has-score{
  border-top:4px solid var(--gold);
}
.parent-exam-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;
}
.parent-exam-head h3{margin:4px 0 0}
.exam-percent{
  min-width:66px;height:66px;border-radius:18px;
  display:grid;place-items:center;
  background:var(--navy);color:#fff;
  font-size:20px;font-weight:900;
}
.parent-exam-card.no-score .exam-percent{
  background:#eef2f7;color:var(--muted);
}
.parent-exam-score{
  margin-top:14px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:#f7f9fc;border:1px solid var(--line);
  border-radius:14px;padding:13px 14px;
}
.parent-exam-score span{color:var(--muted);font-weight:800}
.parent-exam-score b{color:var(--navy);font-size:20px}
.teacher-note-box{
  margin-top:12px;
  background:#fff8e7;
  border:1px solid #f0d58f;
  border-radius:14px;
  padding:13px 14px;
}
.teacher-note-box span{
  display:block;color:#76520a;font-size:12px;font-weight:900
}
.teacher-note-box p{
  margin:7px 0 0;line-height:1.8
}
#homeParentExam .parent-exam-card{box-shadow:none;border-radius:14px;padding:14px}
#homeParentExam .exam-percent{min-width:54px;height:54px;border-radius:14px;font-size:17px}

@media(max-width:900px){
  .exam-setup-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .exam-setup-grid{grid-template-columns:1fr 1fr}
  .exam-student-fields{grid-template-columns:1fr}
  .parent-exam-head{align-items:center}
}


/* =========================
   V1.5.1 RTL SCORE FIX
   ========================= */
.ltr-score{
  direction:ltr;
  unicode-bidi:isolate;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.ltr-score bdi{
  direction:ltr;
  unicode-bidi:isolate;
}


/* =========================
   V1.6 PARENT CARDS + QR
   ========================= */
.qr-action{background:#eef7ff!important;color:#0b4f8a!important;border-color:#c9dfef!important}
.credential-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:8px}
.credential-actions .primary-btn,.credential-actions .secondary-btn{margin:0}
.cards-toolbar-panel{margin-bottom:16px}
.cards-toolbar-grid{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(260px,1.3fr);gap:14px;align-items:end}
.cards-link-box{background:#f7f9fc;border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.cards-link-box span{display:block;color:var(--muted);font-size:12px;font-weight:800;margin-bottom:6px}
.cards-link-box code{display:block;direction:ltr;text-align:left;font-size:12px;overflow-wrap:anywhere;color:var(--navy)}
.cards-toolbar-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.parent-cards-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.card-preview-modal{max-width:780px!important}
.card-modal-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.qr-scratch{position:fixed;left:-9999px;top:-9999px;width:320px;height:320px;opacity:0;pointer-events:none}

.paper-parent-card{
  background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;
  box-shadow:0 10px 30px rgba(18,45,80,.08)
}
.paper-card-top{
  background:linear-gradient(135deg,var(--navy),#071d40);color:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px
}
.paper-card-brand{display:flex;align-items:center;gap:10px;direction:ltr;text-align:left}
.paper-card-mark{
  min-width:48px;width:48px;height:48px;border-radius:14px;background:var(--gold);color:var(--navy);
  display:grid;place-items:center;font-weight:900;font-size:17px
}
.paper-card-brand strong{display:block;font-size:16px}
.paper-card-brand small{display:block;font-size:11px;opacity:.82;margin-top:2px}
.paper-card-label{font-weight:900;font-size:13px;color:var(--gold)}
.paper-card-body{display:grid;grid-template-columns:minmax(0,1fr) 155px;gap:15px;padding:17px}
.paper-card-info h3{font-size:21px;margin:0 0 12px}
.paper-card-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.paper-card-meta>div,.paper-card-login-row{background:#f6f8fb;border:1px solid var(--line);border-radius:12px;padding:9px 10px}
.paper-card-meta span,.paper-card-login-row span{display:block;color:var(--muted);font-size:11px;font-weight:800}
.paper-card-meta b,.paper-card-login-row b{display:block;margin-top:4px;font-size:12px}
.paper-card-login-row{margin-top:8px}
.paper-card-login-row .ltr-value,.ltr-value{direction:ltr;unicode-bidi:isolate;text-align:left;font-size:17px}
.muted-login b{font-size:11px;color:var(--muted);line-height:1.5}
.paper-card-qr{text-align:center}
.paper-card-qr img{display:block;width:135px;height:135px;margin:0 auto 5px;border:7px solid #fff}
.paper-card-qr b{display:block;font-size:13px}
.paper-card-qr span{display:block;color:var(--muted);font-size:10px;line-height:1.5;margin-top:3px}
.qr-error{width:135px;height:135px;margin:auto;display:grid;place-items:center;border:1px dashed var(--line);border-radius:10px}
.paper-card-footer{
  border-top:1px solid var(--line);padding:9px 15px;display:flex;align-items:center;
  justify-content:space-between;gap:10px;color:var(--muted);direction:ltr;font-size:10px
}
.paper-card-footer code{font-size:9px;overflow-wrap:anywhere}

@media(max-width:900px){
  .parent-cards-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
  .credential-actions{grid-template-columns:1fr}
  .cards-toolbar-grid{grid-template-columns:1fr}
  .paper-card-body{grid-template-columns:1fr 125px;padding:13px;gap:10px}
  .paper-card-qr img{width:112px;height:112px}
  .paper-card-info h3{font-size:18px}
  .paper-card-label{font-size:11px}
  .paper-card-top{padding:12px}
  .paper-card-mark{width:42px;height:42px;min-width:42px}
  .paper-card-footer{font-size:9px}
}


/* =========================
   V1.6.1 PRE-LOGIN TENANT BRANDING
   ========================= */
#loginBrandName,#splashBrand{
  overflow-wrap:anywhere;
}
#loginBrandSubtitle{
  display:block;
  margin-top:2px;
}
#loginNote{
  text-align:right;
}
@media(max-width:900px){
  .login-card{
    border-top:5px solid var(--gold);
  }
}


/* =========================
   V1.7 REPORTS
   ========================= */
.report-mode-switch{
  display:inline-flex;
  gap:6px;
  padding:5px;
  background:#eaf0f8;
  border-radius:14px;
  margin-bottom:14px;
}
.report-mode-btn{
  border:0;
  background:transparent;
  color:var(--navy);
  border-radius:10px;
  padding:10px 16px;
  font:inherit;
  font-weight:900;
  cursor:pointer;
}
.report-mode-btn.active{
  background:var(--navy);
  color:#fff;
  box-shadow:0 6px 16px rgba(11,47,102,.12);
}
.report-controls-panel{margin-bottom:16px}
.report-controls-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.report-actions-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}
.report-preview-wrap{margin-top:18px}
.monthly-report{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(18,45,80,.06);
}
.report-brand-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:18px 20px;
  background:linear-gradient(135deg,var(--navy),#071d40);
  color:#fff;
}
.report-brand-main{
  display:flex;
  align-items:center;
  gap:11px;
  direction:ltr;
  text-align:left;
}
.report-brand-mark{
  min-width:54px;
  width:54px;
  height:54px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:var(--gold);
  color:var(--navy);
  font-size:18px;
  font-weight:900;
}
.report-brand-main strong{display:block;font-size:19px}
.report-brand-main span{display:block;font-size:11px;opacity:.82;margin-top:3px}
.report-title-block{text-align:right}
.report-title-block h3{margin:0;font-size:23px}
.report-title-block p{margin:5px 0 0;opacity:.82}
.report-student-bar{
  display:grid;
  grid-template-columns:2fr .8fr 1.3fr 1.5fr;
  gap:9px;
  padding:14px 16px;
  background:#f5f8fc;
}
.report-student-bar>div{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 11px;
}
.report-student-bar span{
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.report-student-bar b{
  display:block;
  margin-top:4px;
  font-size:13px;
}
.report-metrics-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  padding:16px;
}
.report-metric{
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 9px;
  text-align:center;
}
.report-metric span{
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.report-metric b{
  display:block;
  color:var(--navy);
  font-size:21px;
  margin-top:5px;
}
.report-metric small{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-top:3px;
}
.report-note{
  margin:0 16px 16px;
  padding:13px 14px;
  background:#fff8e7;
  border:1px solid #f0d58f;
  border-radius:14px;
}
.report-note span{
  color:#76520a;
  font-size:11px;
  font-weight:900;
}
.report-note p{
  margin:7px 0 0;
  line-height:1.8;
}
.report-lessons-section{padding:0 16px 16px}
.report-lessons-section h4{margin:4px 0 10px;font-size:17px}
.report-table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:14px;
}
.report-table{
  width:100%;
  min-width:720px;
  border-collapse:collapse;
  background:#fff;
}
.report-table th,.report-table td{
  padding:10px 11px;
  border-bottom:1px solid var(--line);
  text-align:right;
  vertical-align:top;
  font-size:12px;
}
.report-table th{
  background:#f4f7fb;
  color:#586579;
  font-weight:900;
}
.report-table td small{
  display:block;
  color:var(--muted);
  margin-top:3px;
}
.success-text{color:var(--success)!important}
.danger-text{color:var(--danger)!important}
.group-report-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.group-report-table{min-width:1050px}
.report-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 16px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:10px;
  direction:ltr;
}
.parent-head-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.parent-head-actions .parent-month-label{margin:0}

@media(max-width:900px){
  .report-metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .group-report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .report-student-bar{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .report-controls-grid{grid-template-columns:1fr}
  .report-brand-header{align-items:flex-start}
  .report-brand-main strong{font-size:16px}
  .report-title-block h3{font-size:19px}
  .report-metrics-grid{grid-template-columns:1fr 1fr}
  .report-student-bar{grid-template-columns:1fr 1fr}
  .parent-head-actions{width:100%;align-items:stretch}
  .parent-head-actions .secondary-btn{width:100%}
}


/* =========================
   V1.8 SUPER ADMIN / SAAS
   ========================= */
.tenant-toolbar{margin-bottom:12px}
.tenant-toolbar input{max-width:520px}
.tenant-cell-sub{display:block;color:var(--muted);margin-top:4px;font-size:11px}
.tenant-email-cell{font-size:11px;overflow-wrap:anywhere}
.plan-pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#eef3fb;color:var(--navy);font-size:11px;font-weight:900;text-transform:capitalize}
.status.expired{background:#fff1dd;color:#96600b}
.subscription-expired{color:#a56500;font-weight:900}
.tenant-actions{flex-wrap:wrap;min-width:230px}
.success-action{color:#16764c!important;border-color:#bfe2d1!important;background:#edf9f3!important}
.reset-action{color:#5e4c92!important;border-color:#d9d0f0!important;background:#f7f4ff!important}
.action-btn:disabled{opacity:.45;cursor:not-allowed}
.tenant-modal-card{width:min(760px,100%)!important}
.tenant-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tenant-form-grid label{margin:0}
.field-help{display:block;color:var(--muted);font-size:10px;line-height:1.5;margin-top:5px}
input[type="color"]{min-height:48px;padding:5px}
.tenants-data-table{min-width:1180px}

@media(max-width:700px){
  .tenant-form-grid{grid-template-columns:1fr}
  .tenant-actions{min-width:0}
}


/* =========================
   V1.9 PLAN LIMITS / SUBSCRIPTIONS
   ========================= */
.student-add-wrap{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
}
.plan-usage-inline{
  color:var(--muted);
  font-weight:800;
  font-size:11px;
}
.plan-usage-inline.limit-reached{
  color:#a55d00;
}
.plan-usage-card{
  display:grid;
  gap:12px;
}
.plan-usage-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.plan-usage-head span{
  display:block;
  color:var(--muted);
  font-size:12px;
}
.plan-usage-head b{
  display:block;
  color:var(--navy);
  margin-top:4px;
  font-size:20px;
}
.plan-usage-head strong{
  color:var(--navy);
  font-size:22px;
}
.plan-progress,
.mini-progress{
  overflow:hidden;
  border-radius:999px;
  background:#e8edf5;
}
.plan-progress{
  height:12px;
}
.mini-progress{
  width:100px;
  max-width:100%;
  height:6px;
  margin-top:6px;
}
.plan-progress i,
.mini-progress i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--navy),var(--gold));
}
.plan-usage-meta{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
}
.plan-usage-meta b{
  color:var(--ink);
}
.plan-warning{
  padding:10px 12px;
  border-radius:12px;
  background:#fff4df;
  border:1px solid #edd29a;
  color:#7a5310;
  line-height:1.6;
  font-size:12px;
}
.tenant-usage-cell{
  min-width:110px;
}
#addStudentBtn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

@media(max-width:600px){
  .plan-usage-head strong{font-size:19px}
  .plan-usage-meta{display:grid;gap:6px}
}


/* =========================
   V1.10 REAL PLAN FEATURES
   ========================= */
.plan-summary-help{
  min-height:32px;
}
.plan-matrix-mini{
  display:grid;
  gap:8px;
  margin:12px 0;
}
.plan-matrix-mini>div{
  display:grid;
  grid-template-columns:90px 1fr;
  align-items:start;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8faff;
}
.plan-matrix-mini b{
  color:var(--navy);
  direction:ltr;
}
.plan-matrix-mini span{
  color:var(--muted);
  line-height:1.55;
  font-size:11px;
}
.pro-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-inline-start:6px;
  padding:2px 6px;
  border-radius:999px;
  background:var(--navy);
  color:#fff;
  font-size:8px;
  font-weight:900;
  direction:ltr;
}
.plan-feature-list{
  display:grid;
  gap:8px;
}
.plan-feature-list>div{
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 11px;
  border-radius:11px;
  border:1px solid var(--line);
}
.plan-feature-list>div span{
  width:26px;
  height:26px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  font-weight:900;
}
.plan-feature-list .enabled{
  background:#f2fbf6;
  border-color:#cde9d9;
}
.plan-feature-list .enabled span{
  background:#dff5e8;
  color:#187c50;
}
.plan-feature-list .locked{
  background:#f7f8fb;
  color:#8a92a2;
}
.plan-feature-list .locked span{
  background:#eceff4;
}


/* =========================
   V1.11 COMMERCIAL SUBSCRIPTIONS
   ========================= */
.tenant-toolbar{
  display:grid;
  gap:12px;
}
.tenant-filter-bar{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.tenant-filter-chip{
  border:1px solid var(--line);
  background:#fff;
  color:var(--navy);
  padding:7px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:11px;
}
.tenant-filter-chip.active{
  background:var(--navy);
  color:#fff;
  border-color:var(--navy);
}
.subscription-state{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.subscription-state.active,
.subscription-state.unlimited{
  background:#e8f7f0;
  color:#16764c;
}
.subscription-state.expiring30{
  background:#fff7df;
  color:#87620b;
}
.subscription-state.expiring7{
  background:#fff0d9;
  color:#a45a00;
}
.subscription-state.expired{
  background:#fff0f2;
  color:#a62b3b;
}
.subscription-state.suspended{
  background:#eef1f6;
  color:#657083;
}
.renew-action{
  color:#0f6f4b!important;
  background:#edf9f3!important;
  border-color:#bfe2d1!important;
}
.history-action{
  color:#6b4b9b!important;
  background:#f7f3ff!important;
  border-color:#ddd0f1!important;
}
.subscription-ok-box{
  padding:14px;
  border:1px solid #bfe2d1;
  background:#edf9f3;
  color:#16764c;
  border-radius:14px;
  line-height:1.7;
}
.subscription-alert-list{
  display:grid;
  gap:9px;
}
.subscription-alert-item{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  text-align:right;
}
.subscription-alert-item span{
  display:grid;
  gap:3px;
}
.subscription-alert-item small{
  color:var(--muted);
}
.subscription-alert-item strong{
  white-space:nowrap;
}
.subscription-alert-item.expiring7{
  border-color:#f0d09a;
  background:#fff9ee;
  color:#8a5a07;
}
.subscription-alert-item.expired{
  border-color:#efc9cf;
  background:#fff5f6;
  color:#9c2f40;
}

.renewal-modal-card{width:min(700px,100%)!important}
.renew-tenant-summary{
  margin:16px 0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.renew-tenant-summary>div{
  border:1px solid var(--line);
  background:#f8fafc;
  border-radius:13px;
  padding:11px 12px;
}
.renew-tenant-summary span{
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-bottom:4px;
}
.renew-presets{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin:8px 0 14px;
}
.renew-preset{
  border:1px solid var(--line);
  background:#fff;
  color:var(--navy);
  border-radius:12px;
  padding:11px 8px;
  font-weight:900;
}
.renew-preset.active{
  background:var(--gold);
  border-color:var(--gold);
  color:#13294d;
}
.renew-preview{
  border:1px solid #d6e0ef;
  background:#f4f7fb;
  border-radius:14px;
  padding:13px 14px;
  margin-bottom:8px;
}
.renew-preview span{
  color:var(--muted);
  font-size:11px;
  display:block;
}
.renew-preview b{
  display:block;
  color:var(--navy);
  font-size:22px;
  margin:5px 0 3px;
}
.renew-preview small{
  color:var(--muted);
  line-height:1.6;
}

.subscription-history-card{width:min(760px,100%)!important}
.subscription-history-list{
  display:grid;
  gap:12px;
  margin-top:16px;
}
.subscription-history-item{
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  background:#fff;
}
.history-main{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.history-main small{
  display:block;
  color:var(--muted);
  margin-top:4px;
}
.history-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:12px;
}
.history-grid span{
  background:#f7f9fc;
  border:1px solid var(--line);
  padding:9px 10px;
  border-radius:11px;
  color:var(--muted);
  font-size:12px;
}
.history-grid b{color:var(--ink)}
.history-note{
  margin:10px 0 0;
  padding:9px 10px;
  background:#fff8e7;
  border-radius:10px;
  color:#70510c;
  font-size:12px;
}
.history-admin{
  display:block;
  color:var(--muted);
  margin-top:9px;
}

@media(max-width:640px){
  .renew-tenant-summary{grid-template-columns:1fr 1fr}
  .renew-presets{grid-template-columns:1fr 1fr}
  .history-grid{grid-template-columns:1fr}
  .subscription-alert-item{align-items:flex-start}
}


/* =========================
   V1.12 FINANCIAL DASHBOARD
   ========================= */
.finance-stats-grid{margin-bottom:18px}
.finance-filter-panel{margin-bottom:18px}
.finance-filter-head,
.finance-table-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.finance-filter-head h3,
.finance-table-head h3{margin:0 0 4px}
.finance-filter-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.finance-filter-actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:14px;
}
.finance-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.finance-summary-card{
  border:1px solid var(--line);
  background:#fff;
  border-radius:18px;
  padding:17px;
  box-shadow:0 10px 25px rgba(24,53,91,.04);
}
.finance-summary-card span{
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:8px;
}
.finance-summary-card b{
  display:block;
  color:var(--navy);
  font-size:22px;
}
.finance-panels{margin-bottom:18px}
.payment-methods-breakdown{
  display:grid;
  gap:14px;
}
.finance-breakdown-row{display:grid;gap:7px}
.finance-breakdown-label{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font-size:12px;
}
.finance-breakdown-label span{
  color:var(--ink);
  font-weight:900;
}
.finance-breakdown-label b{
  color:var(--muted);
  font-size:11px;
}
.finance-breakdown-bar{
  height:9px;
  border-radius:999px;
  overflow:hidden;
  background:#e9eef6;
}
.finance-breakdown-bar i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--navy),var(--gold));
}
.finance-data-table .finance-period{
  white-space:nowrap;
  font-size:11px;
}
.finance-data-table td{vertical-align:middle}
.bidi-name{
  unicode-bidi:isolate;
  display:inline-block;
}

@media(max-width:900px){
  .finance-filter-grid{grid-template-columns:1fr 1fr}
  .finance-summary-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .finance-filter-head,
  .finance-table-head{display:grid}
  .finance-filter-grid{grid-template-columns:1fr}
  .finance-summary-card b{font-size:18px}
}

/* V1.13 PLAN MANAGEMENT */
.plan-admin-note{margin:0 0 18px;padding:14px 16px;border:1px solid rgba(232,173,34,.42);background:#fff8df;color:#73540c;border-radius:18px;line-height:1.8}.plans-admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.plan-admin-card{background:#fff;border:1px solid var(--line);border-top:5px solid var(--gold);border-radius:24px;padding:20px;box-shadow:0 12px 30px rgba(24,53,91,.05);display:grid;gap:17px}.plan-admin-card.inactive{opacity:.75;border-top-color:#a9b0bc}.plan-admin-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.plan-admin-card-head small{display:block;color:var(--gold);font-weight:900;letter-spacing:.08em;margin-bottom:4px}.plan-admin-card-head h3{margin:0;font-size:24px}.plan-admin-metrics{display:grid;grid-template-columns:1fr 1fr;gap:9px}.plan-admin-metrics>div{border:1px solid var(--line);background:#f8fafe;padding:12px;border-radius:15px}.plan-admin-metrics span{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}.plan-admin-metrics b{color:var(--navy);font-size:15px}.plan-admin-features{display:grid;gap:7px}.plan-admin-features span{display:block;padding:9px 11px;border-radius:12px;font-size:12px}.plan-admin-features .on{background:#ebfaf3;color:#178154}.plan-admin-features .off{background:#f3f5f8;color:#8a93a2}.plan-edit-btn{width:100%}.plan-config-modal-card{max-width:720px}.plan-feature-editor{display:grid;gap:10px;margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:20px;background:#fbfcff}.plan-feature-editor-head h4{margin:0 0 4px;font-size:20px}.plan-feature-editor .switch-row{margin:0}.mandatory-feature{opacity:.72}.apply-plan-existing-row{margin-top:16px;align-items:flex-start}.apply-plan-existing-row>span{display:grid;gap:4px}.plan-active-row{margin-top:14px}@media(max-width:980px){.plans-admin-grid{grid-template-columns:1fr}}@media(max-width:560px){.plan-admin-metrics{grid-template-columns:1fr 1fr}.plan-admin-card{padding:16px}}


/* =========================
   V1.14 PUBLIC SIGNUP + REQUESTS
   ========================= */
.teacher-signup-entry{width:100%;border:1px solid rgba(232,173,34,.55);background:#fff8df;color:var(--navy);border-radius:18px;padding:15px 18px;font:inherit;font-weight:900;cursor:pointer}
.teacher-signup-entry:hover{transform:translateY(-1px)}
.nav-count-badge{display:inline-flex;min-width:22px;height:22px;padding:0 6px;border-radius:999px;align-items:center;justify-content:center;background:#fff;color:var(--navy);font-size:11px;font-weight:900;margin-inline-start:5px}
.nav-item.active .nav-count-badge{background:var(--navy);color:#fff}
.public-signup-modal-card{max-width:820px}
.signup-lead{margin-top:0;line-height:1.85}
.public-signup-plans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0 20px}
.public-plan-card{appearance:none;border:2px solid var(--line);background:#fff;border-radius:20px;padding:15px;text-align:right;cursor:pointer;display:grid;gap:8px;color:var(--ink);font:inherit;transition:.18s ease}
.public-plan-card.selected{border-color:var(--gold);box-shadow:0 0 0 3px rgba(232,173,34,.14);background:#fffdf7}
.public-plan-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.public-plan-card-head span{color:var(--gold);font-size:11px;font-weight:900;letter-spacing:.08em}
.public-plan-card-head b{font-size:19px}
.public-plan-card>strong{color:var(--navy);font-size:18px}
.public-plan-card>small{color:var(--muted)}
.public-plan-features{display:grid;gap:4px;margin-top:5px}
.public-plan-features span{color:#278661;font-size:11px}
.signup-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.signup-price-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:16px 0}
.signup-price-summary>div{border:1px solid var(--line);background:#f7f9fd;border-radius:15px;padding:11px}
.signup-price-summary span{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}
.signup-price-summary b{color:var(--navy);font-size:14px}
.signup-trust-note{padding:13px 15px;background:#fff8df;color:#73540c;border:1px solid rgba(232,173,34,.4);border-radius:16px;line-height:1.8;margin:15px 0;font-size:12px}
.signup-honeypot{position:absolute !important;left:-9999px !important;opacity:0 !important;width:1px !important;height:1px !important}
.signup-success-block{text-align:center;padding:22px 4px 6px}
.signup-success-icon{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;margin:0 auto 14px;background:#e8f8f0;color:#18875d;font-size:36px;font-weight:900}
.signup-success-block h3{margin:0 0 8px;font-size:28px}
.signup-success-block p{color:var(--muted);line-height:1.8}
.signup-reference-box{border:1px solid var(--line);background:#f7f9fd;border-radius:16px;padding:14px;margin:18px 0}
.signup-reference-box span{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}
.signup-reference-box b{color:var(--navy);font-size:20px}
.request-stats-grid{margin-bottom:18px}
.request-toolbar-panel{margin-bottom:18px}
.subscription-requests-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.subscription-request-card{background:#fff;border:1px solid var(--line);border-top:5px solid var(--gold);border-radius:24px;padding:19px;box-shadow:0 12px 30px rgba(24,53,91,.05)}
.subscription-request-card.approved{border-top-color:#25976b}
.subscription-request-card.rejected{border-top-color:#d85a65}
.request-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:15px}
.request-card-head h3{margin:8px 0 3px;font-size:23px}
.request-card-head p{margin:0;color:var(--muted)}
.request-date{color:var(--muted);font-size:11px;white-space:nowrap}
.request-status{display:inline-flex;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:900}
.request-status.pending{background:#fff5cf;color:#8b6500}
.request-status.approved{background:#e8f8f0;color:#18875d}
.request-status.rejected{background:#fff0f1;color:#b53f4a}
.request-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.request-info-grid>div{background:#f7f9fd;border:1px solid var(--line);border-radius:14px;padding:11px;min-width:0}
.request-info-grid span,.request-note span{display:block;color:var(--muted);font-size:10px;margin-bottom:4px}
.request-info-grid b{display:block;overflow-wrap:anywhere}
.request-note{background:#fbfcff;border:1px solid var(--line);border-radius:14px;padding:11px;margin-top:9px}
.request-note p{margin:0;line-height:1.7}
.request-note.admin-note{background:#fff8df;border-color:rgba(232,173,34,.35)}
.request-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.reject-request-btn{border-color:#e7b7bc;color:#aa3d48;background:#fff7f8}
.request-result-line{margin-top:14px;padding:11px;border-radius:13px;background:#eaf9f2;color:#177a55}
.request-result-line.rejected{background:#fff1f2;color:#b33e49}
.approval-request-card{max-width:760px}
.approval-applicant-summary,.approval-preview{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}
.approval-applicant-summary>div,.approval-preview>div{border:1px solid var(--line);background:#f7f9fd;border-radius:15px;padding:12px;min-width:0}
.approval-applicant-summary span,.approval-preview span{display:block;color:var(--muted);font-size:10px;margin-bottom:5px}
.approval-applicant-summary b{overflow-wrap:anywhere}
.approval-warning{margin-top:15px;padding:13px 15px;border:1px solid rgba(232,173,34,.4);border-radius:16px;background:#fff8df;color:#73540c;line-height:1.75;font-size:12px}
.home-request-cta{display:grid;gap:8px}
.home-request-cta>b{color:var(--navy);font-size:20px}
@media(max-width:820px){.public-signup-plans{grid-template-columns:1fr}.subscription-requests-grid{grid-template-columns:1fr}}
@media(max-width:620px){.signup-form-grid,.approval-applicant-summary,.approval-preview{grid-template-columns:1fr}.signup-price-summary{grid-template-columns:1fr 1fr}.request-info-grid{grid-template-columns:1fr}}


/* =========================
   V1.15 FIRST-LOGIN ONBOARDING
   ========================= */
.onboarding-lock-modal{z-index:12000}
.onboarding-lock-backdrop{
  background:rgba(8,24,48,.76);
  backdrop-filter:blur(7px);
}
.teacher-onboarding-card{
  max-width:720px;
  border-top:6px solid var(--gold);
  max-height:calc(100dvh - 30px);
}
.onboarding-brand{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:8px;
}
.onboarding-brand .brand-logo{
  flex:0 0 auto;
  width:62px;
  height:62px;
  border-radius:20px;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#efb01f,#ffd65e);
  color:var(--navy);
  font-size:24px;
  font-weight:900;
  box-shadow:0 8px 24px rgba(232,173,34,.22);
}
.onboarding-brand h3{margin:3px 0 0;font-size:30px}
.onboarding-intro{line-height:1.8;margin:8px 0 16px}
.onboarding-plan-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin:0 0 18px;
}
.onboarding-plan-summary>div{
  background:#f6f8fc;
  border:1px solid var(--line);
  border-radius:15px;
  padding:11px;
  min-width:0;
}
.onboarding-plan-summary span{display:block;color:var(--muted);font-size:10px;margin-bottom:5px}
.onboarding-plan-summary b{display:block;color:var(--navy);overflow-wrap:anywhere}
.onboarding-separator{
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--navy);
  font-weight:900;
  margin:18px 0 10px;
}
.onboarding-separator::before,.onboarding-separator::after{
  content:"";
  height:1px;
  background:var(--line);
  flex:1;
}
.password-field{position:relative}
.password-field input{padding-inline-start:54px}
.password-eye{
  position:absolute;
  inset-inline-start:10px;
  top:50%;
  transform:translateY(-50%);
  width:40px;
  height:40px;
  border:0;
  border-radius:12px;
  background:#eef3fb;
  cursor:pointer;
  font-size:17px;
}
.password-rules-box{
  display:grid;
  gap:6px;
  margin:12px 0 15px;
  padding:13px 15px;
  border:1px solid var(--line);
  background:#f8faff;
  border-radius:16px;
}
.password-rules-box b{color:var(--navy);margin-bottom:2px}
.password-rules-box span{color:var(--muted);font-size:12px}
.password-rules-box span.ok{color:#1c8a62;font-weight:800}
.onboarding-security-note{
  padding:13px 15px;
  margin:0 0 15px;
  border-radius:16px;
  background:#eaf8f2;
  color:#197653;
  border:1px solid #c9eadc;
  line-height:1.75;
  font-size:12px;
}
#completeTeacherOnboardingBtn{width:100%}
@media(max-width:620px){
  .onboarding-plan-summary{grid-template-columns:1fr 1fr}
  .teacher-onboarding-card{max-height:calc(100dvh - 18px)}
  .onboarding-brand h3{font-size:25px}
}


/* =========================
   V1.16 TEACHER ACCOUNT
   ========================= */
.account-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.account-summary-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  box-shadow:0 10px 25px rgba(24,53,91,.04);
}
.account-summary-card span{
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-bottom:7px;
}
.account-summary-card b{
  display:block;
  color:var(--navy);
  font-size:18px;
  overflow-wrap:anywhere;
}
.account-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}
.account-panel{
  min-width:0;
}
.account-panel-head{
  margin-bottom:14px;
}
.account-panel-head h3{
  margin:0 0 5px;
}
.account-readonly-note{
  margin:14px 0;
  padding:12px 14px;
  background:#f6f8fc;
  border:1px solid var(--line);
  color:var(--muted);
  border-radius:14px;
  line-height:1.7;
  font-size:12px;
}
.account-security-tip{
  margin-top:16px;
  padding:12px 14px;
  border:1px solid #c9eadc;
  background:#eaf8f2;
  color:#197653;
  border-radius:14px;
  line-height:1.7;
  font-size:12px;
}
.account-password-rules{
  margin-top:14px;
}
#teacherProfileForm>.primary-btn,
#changeTeacherPasswordForm>.primary-btn{
  width:100%;
}
#accountEmail:disabled{
  background:#f3f5f8;
  color:#7b8593;
  opacity:1;
}

@media(max-width:900px){
  .account-layout{
    grid-template-columns:1fr;
  }
}
@media(max-width:620px){
  .account-summary-grid{
    grid-template-columns:1fr 1fr;
  }
}


/* =========================
   V1.17 PASSWORD RECOVERY
   ========================= */
.forgot-password-entry{
  width:100%;
  border:0;
  background:transparent;
  color:var(--navy);
  padding:8px 10px;
  font:inherit;
  font-weight:900;
  text-decoration:underline;
  text-underline-offset:4px;
  cursor:pointer;
}
.password-reset-card{
  max-width:520px;
}
.reset-lead{
  margin-top:0;
  line-height:1.85;
}
.reset-security-note{
  padding:12px 14px;
  margin:12px 0 15px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#f7f9fd;
  color:var(--muted);
  font-size:12px;
  line-height:1.7;
}
#sendPasswordResetBtn{
  width:100%;
}
.reset-help-box{
  margin:16px 0;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(232,173,34,.36);
  background:#fff8df;
  color:#73540c;
  font-size:12px;
  line-height:1.75;
}


/* =========================
   V1.18 RENEWAL REQUESTS
   ========================= */
.teacher-renewal-panel{
  margin-bottom:18px;
  border-top:5px solid var(--gold);
}
.teacher-renewal-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  margin-bottom:15px;
}
.teacher-renewal-head h3{
  margin:3px 0 5px;
  font-size:24px;
}
.renewal-expiry-pill{
  flex:0 0 auto;
  padding:8px 11px;
  border-radius:999px;
  background:#eaf8f2;
  color:#197653;
  font-size:11px;
  font-weight:900;
}
.renewal-expiry-pill.expired{
  background:#fff0f1;
  color:#b33e49;
}
.renewal-plan-strip,
.renewal-request-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  margin-bottom:14px;
}
.renewal-request-summary{
  grid-template-columns:1fr 1fr;
}
.renewal-plan-strip>div,
.renewal-request-summary>div{
  background:#f7f9fd;
  border:1px solid var(--line);
  border-radius:14px;
  padding:11px;
  min-width:0;
}
.renewal-plan-strip span,
.renewal-request-summary span{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-bottom:5px;
}
.renewal-plan-strip b,
.renewal-request-summary b{
  display:block;
  color:var(--navy);
  overflow-wrap:anywhere;
}
.renewal-current-request{
  border-radius:16px;
  padding:13px 14px;
  margin:12px 0 14px;
  border:1px solid var(--line);
}
.renewal-current-request.pending{
  background:#fff8df;
  border-color:rgba(232,173,34,.4);
}
.renewal-current-request.approved{
  background:#eaf8f2;
  border-color:#c9eadc;
}
.renewal-current-request.rejected{
  background:#fff1f2;
  border-color:#efc8cc;
}
.renewal-current-request>div{
  display:grid;
  gap:5px;
}
.renewal-current-request small{
  color:var(--muted);
}
.renewal-current-request p{
  margin:8px 0 0;
  line-height:1.7;
  font-size:12px;
}
.teacher-renewal-request-card{
  max-width:650px;
}
.expired-renewal-home{
  display:grid;
  gap:8px;
}
.expired-renewal-home>b{
  color:#b33e49;
  font-size:18px;
}

@media(max-width:620px){
  .teacher-renewal-head{
    display:grid;
  }
  .renewal-expiry-pill{
    justify-self:start;
  }
  .renewal-plan-strip,
  .renewal-request-summary{
    grid-template-columns:1fr;
  }
}


/* =========================
   V1.19 PAYMENTS & RECEIPTS
   ========================= */
.teacher-payments-panel{
  margin-bottom:18px;
  border-top:5px solid var(--navy);
}
.teacher-payments-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}
.teacher-payments-head h3{
  margin:3px 0 5px;
  font-size:24px;
}
.teacher-payments-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  margin-bottom:14px;
}
.teacher-payments-summary>div{
  border:1px solid var(--line);
  background:#f7f9fd;
  border-radius:14px;
  padding:12px;
}
.teacher-payments-summary span{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-bottom:5px;
}
.teacher-payments-summary b{
  display:block;
  color:var(--navy);
  font-size:17px;
}
.teacher-payments-list{
  display:grid;
  gap:11px;
}
.teacher-payment-item{
  border:1px solid var(--line);
  border-radius:17px;
  padding:14px;
  background:#fff;
}
.teacher-payment-main{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.teacher-payment-main>div{
  display:grid;
  gap:4px;
}
.teacher-payment-main strong{
  color:#197653;
  font-size:20px;
  white-space:nowrap;
}
.teacher-payment-main small{
  color:var(--muted);
}
.payment-receipt-number{
  color:var(--gold);
  font-weight:900;
  font-size:10px;
}
.teacher-payment-meta{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin:11px 0;
}
.teacher-payment-meta>span{
  background:#f7f9fd;
  border:1px solid var(--line);
  border-radius:11px;
  padding:8px;
  color:var(--muted);
  font-size:10px;
}
.teacher-payment-meta b{
  display:block;
  color:var(--ink);
  margin-top:4px;
  overflow-wrap:anywhere;
}
.payment-receipt-btn{
  width:100%;
}
.receipt-action-btn{
  white-space:nowrap;
  border:1px solid rgba(232,173,34,.55);
  background:#fff8df;
  color:var(--navy);
}
.history-receipt-btn{
  width:100%;
  margin-top:10px;
}
@media(max-width:620px){
  .teacher-payments-head{
    display:grid;
  }
  .teacher-payments-summary{
    grid-template-columns:1fr;
  }
  .teacher-payment-meta{
    grid-template-columns:1fr;
  }
}


/* =========================
   V1.20 PERFORMANCE & SCALE
   ========================= */
.scale-status-note{
  margin-top:16px;
  border:1px solid #c9eadc;
  background:#eaf8f2;
  color:#197653;
  border-radius:15px;
  padding:12px 14px;
  font-size:11px;
  line-height:1.7;
}


/* =========================
   V1.20.1 ABSENCE LOGIC
   ========================= */
.lesson-student-card.student-absent-card{
  border-color:#efc8cc;
  background:#fffafb;
}
.lesson-student-card.student-absent-card .lesson-field:disabled{
  opacity:.72;
  background:#f2f3f5;
  color:#7b8491;
  cursor:not-allowed;
}
.absent-auto-note{
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  background:#fff0f1;
  color:#a73b46;
  border:1px solid #efc8cc;
  font-size:11px;
  font-weight:800;
  line-height:1.7;
}


/* =========================
   V1.21 SMART DASHBOARD + SCHEDULING
   ========================= */
.smart-dashboard{
  display:grid;
  gap:14px;
}
.smart-dashboard-hero{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.smart-dashboard-hero h3{
  margin:3px 0 5px;
  font-size:24px;
}
.smart-dashboard-hero p{
  margin:0;
  color:var(--muted);
}
.smart-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.smart-kpis>div{
  border:1px solid var(--line);
  background:#f7f9fd;
  border-radius:14px;
  padding:11px;
}
.smart-kpis span{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-bottom:5px;
}
.smart-kpis b{
  color:var(--navy);
  font-size:17px;
}
.smart-next-lesson{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:13px;
  border:1px solid rgba(232,173,34,.4);
  background:#fff8df;
  border-radius:18px;
  padding:14px;
}
.smart-next-lesson.no-schedule{
  grid-template-columns:1fr auto;
}
.smart-next-icon{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:var(--gold);
  color:var(--navy);
  font-size:20px;
}
.smart-next-copy span{
  color:#8a690e;
  font-size:10px;
  font-weight:900;
}
.smart-next-copy h4{
  margin:3px 0;
  font-size:20px;
}
.smart-next-copy p{
  margin:0;
  color:var(--muted);
  font-size:12px;
}
.smart-next-copy>b{
  display:block;
  margin-top:5px;
  color:#197653;
}
.smart-section-title,
.schedule-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}
.smart-section-title span,
.schedule-date-label{
  color:var(--muted);
  font-size:11px;
}
.schedule-panel-head h3{
  margin:3px 0 0;
  font-size:23px;
}
.schedule-list{
  display:grid;
  gap:9px;
}
.schedule-session-card{
  display:grid;
  grid-template-columns:90px 1fr auto;
  align-items:center;
  gap:12px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  padding:12px;
}
.schedule-session-card.live{
  border-color:#b5dfd1;
  background:#f0fbf7;
}
.schedule-session-card.finished{
  opacity:.65;
}
.schedule-session-time b{
  display:block;
  color:var(--navy);
}
.schedule-session-time span{
  color:var(--muted);
  font-size:10px;
}
.schedule-session-title{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.schedule-session-title h4{
  margin:0;
  font-size:17px;
}
.schedule-session-status{
  padding:4px 7px;
  border-radius:999px;
  background:#eef3fb;
  color:var(--navy);
  font-size:9px;
  font-weight:900;
}
.schedule-session-card.live .schedule-session-status{
  background:#dff6ec;
  color:#197653;
}
.schedule-session-main p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:11px;
}
.schedule-lesson-btn{
  border:1px solid rgba(232,173,34,.5);
  background:#fff8df;
  color:var(--navy);
  border-radius:12px;
  padding:9px 11px;
  font:inherit;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.schedule-session-card.compact{
  grid-template-columns:75px 1fr auto;
  padding:10px;
}
.weekly-schedule-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(150px,1fr));
  gap:10px;
  overflow-x:auto;
  padding-bottom:5px;
}
.weekly-day-card{
  border:1px solid var(--line);
  border-radius:17px;
  background:#f8fafd;
  min-height:180px;
  overflow:hidden;
}
.weekly-day-card.today{
  border-color:var(--gold);
  box-shadow:0 0 0 2px rgba(232,173,34,.1);
}
.weekly-day-head{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:11px;
  background:#eef3fb;
}
.weekly-day-card.today .weekly-day-head{
  background:#fff5cf;
}
.weekly-day-head span{
  color:var(--muted);
  font-size:9px;
}
.weekly-day-list{
  display:grid;
  gap:7px;
  padding:8px;
}
.weekly-slot{
  appearance:none;
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:11px;
  padding:9px;
  text-align:right;
  font:inherit;
  cursor:pointer;
}
.weekly-slot span{
  color:var(--gold);
  font-size:9px;
  font-weight:900;
}
.weekly-slot b{
  display:block;
  margin:3px 0;
  color:var(--navy);
}
.weekly-slot small{
  color:var(--muted);
}
.weekly-empty{
  padding:16px 8px;
  text-align:center;
  color:var(--muted);
  font-size:10px;
}
.group-schedule-editor{
  border:1px solid #e1e7ef;background:#f8fafc;border-radius:20px;padding:14px;margin:15px 0;
}
.group-schedule-editor-head{margin-bottom:12px}.group-schedule-editor-head b{display:block;color:var(--navy);font-size:15px}.group-schedule-editor-head small{display:block;color:var(--muted);font-size:11px;margin-top:4px}
.group-schedule-days{display:grid;gap:8px}
.schedule-day-editor{border:1px solid #e0e6ee;background:#fff;border-radius:15px;padding:0 13px;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
.schedule-day-editor.is-enabled{border-color:#c9d9e8;box-shadow:0 4px 14px rgba(11,47,102,.05);background:#fff}
.schedule-day-row{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.schedule-day-name{display:flex;align-items:baseline;gap:9px}.schedule-day-name b{font-size:14px;color:var(--navy)}.schedule-day-name small{font-size:10px;color:#8a97a8;font-weight:700}.schedule-day-editor.is-enabled .schedule-day-name small{color:#16735b}
.schedule-day-switch{position:relative;width:48px;height:28px;margin:0!important;display:block;flex:0 0 auto}.schedule-day-switch input{position:absolute;opacity:0;pointer-events:none}.schedule-day-switch span{position:absolute;inset:0;border-radius:999px;background:#dce3eb;transition:.2s}.schedule-day-switch span::after{content:"";position:absolute;width:22px;height:22px;top:3px;right:3px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(22,38,58,.2);transition:.2s}.schedule-day-switch input:checked+span{background:#176f5b}.schedule-day-switch input:checked+span::after{transform:translateX(-20px)}
.schedule-day-times{display:grid;grid-template-columns:1fr 1fr;gap:10px;max-height:0;opacity:0;overflow:hidden;transition:max-height .22s ease,opacity .18s ease,padding .22s ease;border-top:1px solid transparent;padding:0}
.schedule-day-editor.is-enabled .schedule-day-times{max-height:100px;opacity:1;border-top-color:#edf1f5;padding:10px 0 12px}
.schedule-day-times label{margin:0!important;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;color:#66778b;font-size:11px;font-weight:800}.schedule-day-times input[type="time"]{margin:0;min-height:44px;border-radius:12px;background:#f8fafc;text-align:center;font-size:14px;color:#172a43;padding:8px 10px}.schedule-day-times input[type="time"]:focus{background:#fff}
.schedule-aware-group-card{
  display:grid;
  gap:12px;
}
.group-card-title-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.group-card-title-row h3{
  margin:0 0 4px;
}
.group-card-title-row p{
  margin:0;
  color:var(--muted);
}
.group-schedule-preview{
  background:#f7f9fd;
  border:1px solid var(--line);
  border-radius:14px;
  padding:11px;
}
.group-schedule-preview>span{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-bottom:7px;
}
.group-schedule-preview p{
  margin:0;
  color:var(--muted);
}
.group-schedule-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.group-schedule-chips b{
  display:inline-flex;
  padding:6px 8px;
  border-radius:999px;
  background:#fff5cf;
  color:#71550b;
  font-size:10px;
}
.schedule-summary-grid{
  margin-bottom:18px;
}
.schedule-empty-state{
  border:1px dashed var(--line);
  border-radius:14px;
}
@media(max-width:800px){
  .smart-kpis{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:620px){
  .smart-dashboard-hero{
    display:grid;
  }
  .smart-next-lesson,
  .smart-next-lesson.no-schedule{
    grid-template-columns:1fr;
  }
  .smart-next-icon{
    display:none;
  }
  .schedule-session-card,
  .schedule-session-card.compact{
    grid-template-columns:70px 1fr;
  }
  .schedule-lesson-btn{
    grid-column:1/-1;
    width:100%;
  }
}


/* =========================
   V1.22 STUDENT PAYMENTS & DUES
   ========================= */
.student-finance-toolbar-panel{margin-bottom:18px}
.student-finance-toolbar{display:grid;grid-template-columns:180px 1fr 1.5fr;gap:12px;align-items:end}
.student-finance-filter-bar{margin-top:12px}
.student-finance-list{display:grid;gap:12px}
.student-finance-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:15px}
.student-finance-card.unpaid{border-inline-start:5px solid #d9535f}
.student-finance-card.partial{border-inline-start:5px solid var(--gold)}
.student-finance-card.paid{border-inline-start:5px solid #2da67a}
.student-finance-card.no_fee{border-inline-start:5px solid #9aa4b3}
.student-finance-card-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.student-finance-card-head h3{margin:5px 0 3px;font-size:20px}
.student-finance-card-head p{margin:0;color:var(--muted);font-size:11px}
.student-finance-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:9px;font-weight:900}
.student-finance-status.unpaid{background:#fff0f1;color:#b33e49}.student-finance-status.partial{background:#fff8df;color:#87650c}.student-finance-status.paid{background:#eaf8f2;color:#197653}.student-finance-status.no_fee{background:#eef2f6;color:#657083}
.student-finance-remaining{text-align:left}.student-finance-remaining span{display:block;color:var(--muted);font-size:10px}.student-finance-remaining b{color:var(--navy);font-size:22px}
.student-finance-numbers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:13px 0}
.student-finance-numbers>div{background:#f7f9fd;border:1px solid var(--line);border-radius:13px;padding:10px}
.student-finance-numbers span{display:block;color:var(--muted);font-size:9px;margin-bottom:4px}.student-finance-numbers b{color:var(--navy)}
.student-finance-card-actions{display:flex;gap:8px;flex-wrap:wrap}
.student-payment-modal-card{max-width:680px}
.student-payment-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:14px}
.student-payment-summary>div{padding:10px;background:#f7f9fd;border:1px solid var(--line);border-radius:13px}.student-payment-summary>div.remaining{background:#fff8df;border-color:#eadba7}
.student-payment-summary span{display:block;color:var(--muted);font-size:9px;margin-bottom:4px}.student-payment-summary b{color:var(--navy);overflow-wrap:anywhere}
.student-payment-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.student-payment-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:12px}
.student-payment-history-list{display:grid;gap:10px}.student-payment-history-item{border:1px solid var(--line);border-radius:15px;padding:13px}
.student-payment-history-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.student-payment-history-head>div{display:grid;gap:4px}.student-payment-history-head>div>b{font-size:20px;color:#197653}.student-payment-history-head small{color:var(--muted)}
.student-payment-history-meta{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:10px 0}.student-payment-history-meta>span{padding:8px;background:#f7f9fd;border-radius:10px;color:var(--muted);font-size:10px}.student-payment-history-meta b{display:block;color:var(--ink);margin-top:4px}
.group-fee-badge{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 11px;border-radius:13px;background:#eaf8f2;border:1px solid #c9eadc}
.group-fee-badge span{color:#197653;font-size:10px}.group-fee-badge b{color:var(--navy)}
.parent-finance-panel{margin-top:14px}.parent-finance-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.parent-finance-summary>div{border:1px solid var(--line);background:#f7f9fd;border-radius:13px;padding:10px}.parent-finance-summary span{display:block;color:var(--muted);font-size:9px;margin-bottom:4px}.parent-finance-summary b{color:var(--navy);font-size:17px}.parent-finance-summary.compact b{font-size:15px}
.parent-payment-list{display:grid;gap:8px;margin-top:10px}.parent-payment-item{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:10px}.parent-payment-item>div b{display:block;color:#197653}.parent-payment-item>div span{color:var(--muted);font-size:9px}
@media(max-width:720px){.student-finance-toolbar{grid-template-columns:1fr 1fr}.student-finance-search-label{grid-column:1/-1}.student-finance-numbers{grid-template-columns:1fr 1fr}.student-payment-summary{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.student-finance-toolbar{grid-template-columns:1fr}.student-finance-search-label{grid-column:auto}.student-finance-card-head{display:grid}.student-finance-remaining{text-align:right}.student-payment-grid{grid-template-columns:1fr}.student-payment-history-meta{grid-template-columns:1fr}}


/* =========================
   V1.23 PARENT COMMUNICATION CENTER
   ========================= */
.communication-control-panel{margin-bottom:16px}
.communication-select-grid{display:grid;grid-template-columns:1fr 220px;gap:12px}
.communication-student-identity{margin-top:12px}
.communication-identity-main{
  display:grid;grid-template-columns:1fr 280px;gap:12px;align-items:stretch
}
.communication-identity-main>div{
  border:1px solid var(--line);background:#f7f9fd;border-radius:15px;padding:12px
}
.communication-identity-main span{display:block;color:var(--muted);font-size:10px;margin-bottom:4px}
.communication-identity-main b{display:block;color:var(--navy);font-size:18px}
.communication-identity-main small{display:block;color:var(--muted);margin-top:5px}
.communication-phone-box.valid{background:#eaf8f2;border-color:#c9eadc}
.communication-phone-box.missing{background:#fff8df;border-color:#eadba7}
.communication-panel-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}
.communication-panel-head h3{margin:3px 0 0;font-size:22px}
.communication-safe-note{max-width:320px;color:var(--muted);font-size:10px;line-height:1.6}
.communication-template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.communication-template{
  border:1px solid var(--line);background:#fff;border-radius:14px;padding:12px;text-align:right;
  font:inherit;cursor:pointer;transition:.15s ease
}
.communication-template b{display:block;color:var(--navy);margin-bottom:4px}
.communication-template span{color:var(--muted);font-size:10px}
.communication-template.active{border-color:var(--gold);background:#fff8df;box-shadow:0 0 0 2px rgba(232,173,34,.08)}
.communication-message{
  width:100%;min-height:240px;resize:vertical;line-height:1.9;font-size:15px;
  border:1px solid var(--line);border-radius:16px;padding:14px;background:#fbfcfe;color:var(--ink)
}
.communication-data-status{
  display:inline-flex;padding:6px 9px;border-radius:999px;background:#eef3fb;color:var(--navy);
  font-size:9px;font-weight:900
}
.communication-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}
.communication-whatsapp-btn{background:#157c57}







.whatsapp-action{border-color:#b9dfd1!important;color:#197653!important;background:#effaf6!important}
@media(max-width:760px){
  .communication-select-grid,.communication-identity-main{grid-template-columns:1fr}
  .communication-template-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
  .communication-template-grid{grid-template-columns:1fr}
  .communication-panel-head{display:grid}
}


/* V1.23.1 communication logging reliability */
#openWhatsAppBtn:disabled{opacity:.7;cursor:wait}


/* =========================
   V1.24 SMART ALERTS & FOLLOW-UP
   ========================= */
.smart-alert-controls-panel{margin-bottom:14px}
.smart-alert-controls{display:grid;grid-template-columns:220px minmax(240px,1fr);gap:12px;align-items:end}
.smart-alert-analysis-note{
  margin-top:12px;border:1px solid #dce8f6;background:#f7fbff;border-radius:14px;padding:11px 13px;
  display:flex;gap:10px;align-items:flex-start
}
.smart-alert-analysis-note b{white-space:nowrap;color:var(--navy)}
.smart-alert-analysis-note span{color:var(--muted);font-size:11px;line-height:1.7}
.smart-alert-progress{
  border:1px solid var(--line);background:#fff;border-radius:14px;padding:11px 13px;margin:0 0 14px
}
.smart-alert-progress-track{height:8px;background:#edf1f6;border-radius:999px;overflow:hidden;margin-bottom:7px}
.smart-alert-progress-track span{display:block;width:0;height:100%;background:var(--gold);border-radius:999px;transition:width .18s ease}
.smart-alert-progress b{font-size:10px;color:var(--navy)}
.smart-alert-stats{margin-bottom:14px}
.smart-alert-filter-panel{display:grid;gap:12px;margin-bottom:14px}
.smart-alert-filter-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.smart-alert-filter-row>span{font-size:10px;font-weight:900;color:var(--navy);min-width:52px}
.smart-alert-filter-chips{margin:0;flex:1}
.smart-alert-list{display:grid;gap:12px}
.smart-alert-card{
  border:1px solid var(--line);border-right:5px solid #d4a62f;background:#fff;border-radius:17px;padding:14px;
  box-shadow:0 6px 22px rgba(21,45,81,.05)
}
.smart-alert-card.urgent{border-right-color:#c13d3d}
.smart-alert-card.state-resolved{opacity:.78;border-right-color:#2f8d69}
.smart-alert-card.state-snoozed{opacity:.83;border-right-color:#c28b20}
.smart-alert-card.state-dismissed{opacity:.66;border-right-color:#8b94a2}
.smart-alert-card-head{display:flex;justify-content:space-between;gap:12px}
.smart-alert-person{display:flex;align-items:flex-start;gap:11px}
.smart-alert-avatar{
  width:44px;height:44px;border-radius:14px;background:#eef4fb;color:var(--navy);
  display:grid;place-items:center;font-size:20px;font-weight:900;flex:0 0 44px
}
.smart-alert-person h3{margin:5px 0 3px;color:var(--navy);font-size:18px}
.smart-alert-person p{margin:0;color:var(--muted);font-size:10px}
.smart-alert-badges{display:flex;gap:6px;flex-wrap:wrap}
.smart-alert-priority,.smart-alert-type,.smart-alert-state{
  display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:9px;font-weight:900
}
.smart-alert-priority.urgent{background:#fdecec;color:#a82929}
.smart-alert-priority.followup{background:#fff5d9;color:#86610e}
.smart-alert-type{background:#eef3fb;color:#35557e}
.smart-alert-state.active{background:#fff4db;color:#875f08}
.smart-alert-state.resolved{background:#e8f7f0;color:#237453}
.smart-alert-state.snoozed{background:#fff5db;color:#8e650d}
.smart-alert-state.dismissed{background:#eef0f3;color:#68717d}
.smart-alert-reason{
  margin-top:12px;padding:12px 13px;background:#f8fafc;border:1px solid #e7ebf1;border-radius:14px
}
.smart-alert-reason b{display:block;color:var(--navy);margin-bottom:5px}
.smart-alert-reason p{margin:0;color:#566274;line-height:1.75;font-size:12px}
.smart-alert-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.danger-outline{border-color:#efcaca!important;color:#a43a3a!important;background:#fff8f8!important}
.smart-alert-empty{min-height:100px;display:grid;place-items:center}
.smart-alert-dashboard-card{
  margin-top:12px;border:1px solid #dbe7f4;background:linear-gradient(135deg,#f8fbff,#fff);
  border-radius:16px;padding:13px;display:flex;align-items:center;justify-content:space-between;gap:12px
}
.smart-alert-dashboard-card.has-urgent{border-color:#f0cccc;background:linear-gradient(135deg,#fff8f8,#fff)}
.smart-alert-dashboard-card h4{margin:3px 0 4px;color:var(--navy);font-size:17px}
.smart-alert-dashboard-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.6}
@media(max-width:760px){
  .smart-alert-controls{grid-template-columns:1fr}
  .smart-alert-dashboard-card{align-items:flex-start;flex-direction:column}
}
@media(max-width:520px){
  .smart-alert-analysis-note{display:grid}
  .smart-alert-filter-row{display:grid;gap:7px}
  .smart-alert-actions .inline-btn{flex:1 1 calc(50% - 8px)}
}


/* =========================
   V1.25 GAMIFICATION / LEADERBOARD
   ========================= */
.leaderboard-head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.leaderboard-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.leaderboard-note{margin-top:12px;border:1px solid #dfe6ef;background:#f7f9fd;border-radius:14px;padding:12px;display:grid;gap:4px}
.leaderboard-note b{color:var(--navy)}.leaderboard-note span{color:var(--muted);font-size:10px;line-height:1.7}
.leaderboard-config-summary{margin:12px 0}.leaderboard-config-chips{display:flex;gap:7px;flex-wrap:wrap}
.leaderboard-config-chips span{display:inline-flex;align-items:center;gap:6px;border:1px solid #dfe6ef;background:#fff;border-radius:999px;padding:6px 9px;font-size:9px}
.leaderboard-config-chips b{color:var(--navy)}.leaderboard-config-chips em{font-style:normal;color:#197653;font-weight:900}
.leaderboard-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.leaderboard-winner{position:relative;border:1px solid #dfe6ef;background:#fff;border-radius:18px;padding:16px;text-align:center;overflow:hidden}
.leaderboard-winner:before{content:"";position:absolute;inset:0 0 auto;height:5px;background:#d9e1ec}
.leaderboard-winner.rank-1{border-color:#eadba7;background:#fffdf5;box-shadow:0 10px 24px rgba(23,32,51,.08)}
.leaderboard-winner.rank-1:before{background:#e8ad22}.leaderboard-winner.rank-2:before{background:#aeb7c4}.leaderboard-winner.rank-3:before{background:#b98255}
.leaderboard-medal{font-size:34px}.leaderboard-winner>span{display:block;color:var(--muted);font-size:9px}.leaderboard-winner h3{margin:5px 0;color:var(--navy);font-size:18px}
.leaderboard-winner>b{display:block;font-size:24px;color:#172033}.leaderboard-winner>small{display:block;color:var(--muted);margin:3px 0 10px}
.leaderboard-table-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.leaderboard-table-head h3{margin:3px 0 0}
.leaderboard-data-table td small{display:block;color:var(--muted);margin-top:3px}.leaderboard-rank-cell{font-size:18px}.certificate-action-btn{white-space:nowrap}
.gamification-settings-card{max-width:760px}.gamification-settings-intro{margin-top:0}.gamification-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.gamification-settings-grid label{margin:0}.gamification-exam-weight{grid-column:1/-1}.gamification-form-note{margin-top:12px;padding:10px 12px;border-radius:12px;background:#fff8df;border:1px solid #eadba7;color:#806116;font-size:10px;line-height:1.7}
@media(max-width:800px){.leaderboard-podium{grid-template-columns:1fr}.leaderboard-controls,.gamification-settings-grid{grid-template-columns:1fr}.gamification-exam-weight{grid-column:auto}.leaderboard-table-head{align-items:flex-start}.leaderboard-head-actions{justify-content:flex-start}}


/* ==========================================================
   V1.25.1 — PREMIUM VISUAL REFRESH
   ========================================================== */
:root{
  --navy:#0A2A55;--navy2:#123E78;--navy-2:#123E78;--gold:#F2B541;
  --bg:#F5F7FB;--surface:#FFFFFF;--surface-soft:#F8FAFD;--surface-blue:#F1F6FC;
  --ink:#17243A;--muted:#748095;--line:#E5EAF1;--line-strong:#D8E0EA;
  --success:#16845B;--danger:#C94B5B;--warning:#A97412;
  --shadow-xs:0 2px 8px rgba(15,35,65,.04);
  --shadow-sm:0 8px 24px rgba(15,35,65,.065);
  --shadow-md:0 16px 40px rgba(15,35,65,.10);
  --radius-sm:12px;--radius-md:16px;--radius-lg:22px;--radius-xl:28px;
  --control-h:46px;--content-max:1460px;
  font-family:system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif
}
html{background:var(--bg);scroll-behavior:smooth}
body{background:radial-gradient(circle at 95% 0%,rgba(18,62,120,.055),transparent 26rem),var(--bg);color:var(--ink);min-height:100vh;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
::selection{background:rgba(242,181,65,.30);color:var(--navy)}
button,input,select,textarea{font:inherit}button{-webkit-tap-highlight-color:transparent}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(18,62,120,.14);outline-offset:2px}

/* Header */
.app-header{height:72px;background:rgba(255,255,255,.94);border-bottom:1px solid rgba(216,224,234,.82);box-shadow:0 1px 0 rgba(15,35,65,.02);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);padding:0 24px}
.header-brand{gap:11px}.header-brand .brand-mark.small{width:43px;height:43px;border-radius:14px;box-shadow:none;border:1px solid rgba(255,255,255,.42)}
.header-brand strong{font-size:17px;letter-spacing:-.2px;color:var(--navy)}.header-brand small{font-size:11px;color:var(--muted);opacity:1;margin-top:2px}
.header-actions{gap:8px}.role-badge{min-height:34px;display:inline-flex;align-items:center;background:#FFF7DF;border:1px solid #F2DB99;color:#78580B;padding:7px 11px;font-size:10px;border-radius:999px}
.ghost-btn{min-height:38px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:var(--shadow-xs);color:var(--navy);transition:.18s ease}

/* Layout & nav */
.app-body{grid-template-columns:252px minmax(0,1fr);min-height:calc(100vh - 72px)}
.sidebar{position:sticky;top:72px;height:calc(100vh - 72px);overflow-y:auto;padding:18px 12px 28px;gap:5px;background:linear-gradient(180deg,rgba(255,255,255,.035),transparent 180px),linear-gradient(180deg,var(--navy),#061C3A);border-left:1px solid rgba(255,255,255,.05);scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}
.sidebar::-webkit-scrollbar{width:5px}.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.15);border-radius:999px}
.nav-item{width:100%;min-height:46px;display:flex;align-items:center;gap:11px;border:1px solid transparent;color:#DDE8F7;padding:10px 12px;border-radius:13px;font-size:13px;font-weight:750;line-height:1.25;transition:background .16s ease,color .16s ease,border-color .16s ease,transform .16s ease}
.nav-item:hover{color:#fff;background:rgba(255,255,255,.075);border-color:rgba(255,255,255,.06)}
.nav-item.active{color:#10284A;background:linear-gradient(135deg,#FFD676,var(--gold));border-color:rgba(255,255,255,.18);box-shadow:0 9px 22px rgba(0,0,0,.14)}
.nav-item:active{transform:scale(.985)}
.nav-icon{width:20px;height:20px;flex:0 0 20px;display:grid;place-items:center;opacity:.94}
.nav-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.nav-count-badge{margin-inline-start:auto;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px;border-radius:999px;background:#D94B5D;color:#fff;font-size:9px;box-shadow:0 3px 8px rgba(217,75,93,.28)}

/* Content hierarchy */
.content{width:100%;max-width:var(--content-max);margin:0 auto;padding:30px clamp(18px,2.7vw,38px) 48px}
.section{animation:premiumSectionIn .22s ease both}@keyframes premiumSectionIn{from{opacity:.3;transform:translateY(4px)}to{opacity:1;transform:none}}
.section-head{min-height:58px;align-items:center;margin-bottom:18px}.section-head>div:first-child{min-width:0}
.section-head h2{margin:3px 0 0;color:var(--navy);font-size:clamp(22px,2vw,28px);line-height:1.25;letter-spacing:-.25px}
.section-head p{margin:7px 0 0;line-height:1.65;font-size:12px}
.eyebrow{display:inline-flex;align-items:center;gap:5px;color:#9A7015;font-size:10px;font-weight:900;letter-spacing:.4px;text-transform:none}
.eyebrow::before{content:"";width:16px;height:3px;border-radius:999px;background:var(--gold)}.muted{color:var(--muted)}

/* Card system */
.stat-card,.panel,.group-card,.student-card,.lesson-student-card,.exam-student-card,.student-finance-card,.smart-alert-card,.leaderboard-winner{border:1px solid var(--line);background:rgba(255,255,255,.98);box-shadow:var(--shadow-xs)}
.panel,.group-card,.student-card{border-radius:var(--radius-lg)}.panel{padding:20px}.panel h3{color:var(--navy);font-size:17px;line-height:1.35;margin:0 0 14px}
.panel-grid{gap:14px;margin-top:16px}.cards-grid{gap:14px}
.group-card{position:relative;overflow:hidden;padding:19px;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.group-card::before{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,var(--gold),rgba(242,181,65,.25))}
.group-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm);border-color:#D7E0EB}.group-card h3{color:var(--navy);font-size:18px}.group-card p{font-size:11px;line-height:1.55}

/* KPI */
.stats-grid{gap:12px;grid-template-columns:repeat(4,minmax(0,1fr))}
.stat-card{min-height:105px;position:relative;overflow:hidden;border-radius:19px;padding:17px 18px;display:flex;flex-direction:column;justify-content:center}
.stat-card::after{content:"";position:absolute;width:76px;height:76px;border-radius:50%;left:-28px;top:-27px;background:rgba(18,62,120,.055)}
.stat-card::before{content:"";position:absolute;inset:15px auto 15px 0;width:3px;border-radius:999px;background:var(--gold)}
.stat-card span{color:var(--muted);font-size:11px;font-weight:750}.stat-card b{margin-top:6px;color:var(--navy);font-size:26px;line-height:1.15;letter-spacing:-.4px}

/* Forms */
label{color:#435069;font-size:12px;font-weight:800;margin-top:16px}
input,select,textarea{min-height:var(--control-h);border:1px solid var(--line-strong);border-radius:13px;background:#fff;color:var(--ink);padding:11px 13px;margin-top:7px;box-shadow:0 1px 0 rgba(15,35,65,.015);transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
input::placeholder,textarea::placeholder{color:#A1AABB}input:hover,select:hover,textarea:hover{border-color:#C8D3E0}
input:focus,select:focus,textarea:focus{border-color:#9AB4D4;box-shadow:0 0 0 4px rgba(18,62,120,.075);background:#fff}.field-help{color:var(--muted);font-size:10px;line-height:1.6}

/* Buttons */
.primary-btn,.secondary-btn,.ghost-btn,.action-btn{min-height:42px;border-radius:12px;font-weight:850;transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease}
.primary-btn{background:linear-gradient(135deg,var(--navy),var(--navy2));color:#fff;border:1px solid rgba(0,0,0,.02);box-shadow:0 8px 18px rgba(10,42,85,.15)}
.primary-btn:hover{box-shadow:0 10px 22px rgba(10,42,85,.20)}.primary-btn:active,.secondary-btn:active,.action-btn:active{transform:translateY(1px) scale(.99)}
.secondary-btn{background:var(--surface-blue);color:var(--navy);border:1px solid #D6E2F0;box-shadow:none}.secondary-btn:hover{background:#EAF2FB;border-color:#C8D8EA}
.secondary-btn.compact,.inline-btn{min-height:40px;padding:9px 13px}
.action-btn{min-height:34px;padding:7px 10px;font-size:10px;background:#fff;border:1px solid var(--line-strong);color:var(--navy)}
.action-btn:hover{background:var(--surface-blue);border-color:#C8D8EA}.action-btn.warn{background:#FFF8E8}.action-btn.danger,.danger-outline{background:#FFF7F8!important}.actions{gap:7px}

/* Tables */
.table-wrap{border:1px solid var(--line);border-radius:16px;overflow:auto;background:#fff}table{min-width:650px}
th{height:46px;padding:11px 12px;background:#F7F9FC;color:#657189;border-bottom:1px solid var(--line);font-size:10px;letter-spacing:.1px}
td{padding:12px;border-bottom:1px solid #EDF1F5;font-size:12px}tbody tr{transition:background .12s ease}tbody tr:hover{background:#FBFCFE}tbody tr:last-child td{border-bottom:0}
.status{padding:5px 9px;border-radius:999px;font-size:9px;border:1px solid transparent}.status.active{background:#EAF8F2;color:#13704D;border-color:#D3EEE2}.status.inactive{background:#FFF1F3;color:#B03A4A;border-color:#F1D6DA}

/* Feedback */
.empty{border:1px dashed #D5DEE9;border-radius:16px;background:#FAFBFD;color:#8994A6;padding:28px 18px;font-size:12px}.message{border-radius:13px}
.toast{bottom:22px;min-height:44px;display:flex;align-items:center;justify-content:center;border-radius:14px;padding:11px 16px;box-shadow:0 16px 42px rgba(4,20,42,.20);font-size:12px}

/* Modals */
.modal-backdrop{background:rgba(4,17,39,.56);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.modal-card{width:min(620px,100%);border:1px solid rgba(255,255,255,.65);border-radius:24px;padding:22px;box-shadow:0 28px 80px rgba(4,17,39,.24)}
.modal-head{padding-bottom:13px;border-bottom:1px solid #EEF1F5;margin-bottom:4px}.modal-head h3{font-size:21px;color:var(--navy)}
.close-btn{width:38px;height:38px;background:#F4F6F9;border:1px solid var(--line);color:#657189}.switch-row{min-height:50px;border-color:var(--line);background:#FAFBFD}

/* Login */
.login-shell{background:#F5F7FB;grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr)}
.login-brand{position:relative;overflow:hidden;padding:54px clamp(34px,5vw,78px);background:radial-gradient(circle at 20% 15%,rgba(242,181,65,.18),transparent 19rem),radial-gradient(circle at 90% 80%,rgba(255,255,255,.07),transparent 24rem),linear-gradient(145deg,var(--navy),#061C3A 80%)}
.login-brand::after{content:"";position:absolute;width:420px;height:420px;border:1px solid rgba(255,255,255,.06);border-radius:50%;left:-210px;bottom:-220px}
.brand-mark,.mini-logo,.splash-mark{background:linear-gradient(145deg,#FFD878,var(--gold));color:#10284A}
.hero-copy h1{max-width:720px;font-size:clamp(38px,4vw,58px);line-height:1.12;letter-spacing:-1.2px}.hero-copy p{max-width:630px;font-size:16px;line-height:1.9}
.feature-pills span{background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.15);backdrop-filter:blur(6px)}
.login-card{margin:34px auto;max-width:470px;border-radius:28px;border:1px solid var(--line);box-shadow:var(--shadow-md);padding:34px}.login-card h2{font-size:25px;color:var(--navy)}
.login-note{background:#FFF9EA;border:1px solid #F1E1B1;color:#7A5A12!important}.forgot-password-entry,.teacher-signup-entry{min-height:40px;border-radius:11px}

/* Feature harmonization */
.smart-dashboard-hero{border:1px solid #D9E4F0;border-radius:24px;background:radial-gradient(circle at 8% 10%,rgba(242,181,65,.16),transparent 10rem),linear-gradient(135deg,#F8FBFF,#FFFFFF);box-shadow:var(--shadow-xs);overflow:hidden}
.smart-kpis{gap:10px}.smart-kpi{border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:none}.smart-next-lesson{border-radius:18px}
.schedule-session-card,.schedule-session-card.compact{border:1px solid var(--line);border-radius:16px;box-shadow:none}.schedule-time-badge{border-radius:13px}
.student-finance-card,.smart-alert-card{border-radius:18px;box-shadow:var(--shadow-xs)}.student-finance-card:hover,.smart-alert-card:hover{box-shadow:var(--shadow-sm)}
.student-finance-numbers>div,.student-payment-summary>div,.parent-finance-summary>div{background:#F8FAFD;border-color:var(--line);border-radius:13px}
.communication-template{min-height:82px;border-color:var(--line);border-radius:15px;transition:.16s ease}.communication-template:hover{transform:translateY(-1px);box-shadow:var(--shadow-xs)}
.communication-template.active{background:#FFF9E9;border-color:#E9C96D;box-shadow:0 0 0 3px rgba(242,181,65,.09)}.communication-message{border-radius:16px;background:#FBFCFE}
.smart-alert-card{border-right-width:4px}.smart-alert-avatar{border-radius:13px;background:#F0F5FB}.smart-alert-reason{background:#FAFBFD;border-color:var(--line)}
.leaderboard-winner{border-radius:20px;box-shadow:var(--shadow-xs)}.leaderboard-winner.rank-1{background:linear-gradient(180deg,#FFFDF4,#fff);box-shadow:0 12px 30px rgba(94,74,18,.09)}
.tenant-parent-banner{border-radius:22px;padding:18px;background:radial-gradient(circle at 12% 10%,rgba(242,181,65,.17),transparent 9rem),linear-gradient(135deg,var(--navy),#061C3A);box-shadow:0 12px 30px rgba(10,42,85,.12)}
.student-card{padding:20px}.student-meta span{border-radius:999px;padding:7px 11px;background:#F4F7FB}
.parent-summary-grid>div:not(.empty),.parent-lesson-grid>div{background:#F8FAFD;border-color:var(--line);border-radius:14px}
.parent-lesson-card{border-radius:18px;border-color:var(--line);box-shadow:var(--shadow-xs)}
.build-chip{left:9px;bottom:9px;background:rgba(255,255,255,.92);color:#8A94A5;border-color:#E1E6ED;padding:5px 7px;opacity:.82}

/* Mobile app experience */
@media(max-width:900px){
  .app-header{height:64px;padding:0 14px}.header-brand .brand-mark.small{width:38px;height:38px;border-radius:12px}.header-brand strong{font-size:14px}.header-brand small{font-size:9px}
  .app-body{display:block;min-height:calc(100vh - 64px)}
  .sidebar{position:fixed!important;z-index:120;top:auto!important;right:0;left:0;bottom:0;width:100%;height:70px!important;min-height:70px!important;padding:7px max(10px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));display:flex;flex-direction:row;align-items:center;gap:5px;overflow-x:auto;overflow-y:hidden;border:0;border-top:1px solid rgba(216,224,234,.92);background:rgba(255,255,255,.96);box-shadow:0 -9px 30px rgba(10,42,85,.08);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);scrollbar-width:none}
  .sidebar::-webkit-scrollbar{display:none}
  .nav-item{position:relative;flex:0 0 72px!important;width:72px!important;height:56px!important;min-height:56px!important;max-height:56px!important;padding:5px 4px!important;margin:0!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:14px;color:#707D91;background:transparent;border:1px solid transparent;font-size:9px;font-weight:800;white-space:nowrap;overflow:visible}
  .nav-icon{width:21px;height:21px;flex-basis:21px}.nav-icon svg{width:21px;height:21px;stroke-width:1.85}
  .nav-item:hover{color:#56667D;background:#F6F8FB;border-color:transparent}
  .nav-item.active,.nav-item.active:hover{height:56px!important;min-height:56px!important;max-height:56px!important;color:var(--navy);background:#FFF6DA;border-color:#F1DB98;box-shadow:none}
  .nav-item.active .nav-icon{color:#A7770C}
  .nav-count-badge{position:absolute;transform:translate(17px,-13px);min-width:17px;height:17px;padding:0 4px;font-size:8px}
  .content{max-width:none;padding:21px 14px calc(96px + env(safe-area-inset-bottom))}
  .section{scroll-margin-top:76px}.section-head{align-items:flex-start;margin-bottom:15px}.section-head h2{font-size:22px}.section-head p{font-size:11px}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat-card{min-height:94px;padding:14px;border-radius:17px}.stat-card b{font-size:22px}
  .panel{padding:16px;border-radius:19px}.panel-grid{gap:11px}.cards-grid{grid-template-columns:1fr;gap:11px}
  .table-wrap{overflow:visible;border:0;border-radius:0;background:transparent}
  .responsive-data-table{min-width:0!important}.responsive-data-table tbody{gap:10px}
  .responsive-data-table tr{border:1px solid var(--line);border-radius:17px;background:#fff;padding:9px 12px;box-shadow:var(--shadow-xs)}
  .responsive-data-table td{min-height:40px;padding:9px 1px!important;border-bottom:1px solid #EEF1F5;font-size:12px}
  .responsive-data-table td::before{font-size:10px;color:#8792A4}.responsive-data-table td[data-label="الإجراءات"]{padding-top:11px!important}
}
@media(max-width:640px){
  .app-header{height:62px}.header-actions{gap:5px}.ghost-btn{min-height:34px;padding:7px 9px;font-size:10px}.role-badge{display:none}.content{padding-top:18px}
  .section-head{gap:9px;flex-wrap:wrap}.section-head>button,.section-head>.leaderboard-head-actions{max-width:100%}
  .section-head .primary-btn.inline-btn,.section-head .secondary-btn.compact{min-height:38px;padding:8px 11px;font-size:10px}.toolbar input{max-width:none}
  .modal{padding:0;align-items:end}.modal-card{width:100%;max-width:none;max-height:92vh;border-radius:24px 24px 0 0;border-bottom:0;padding:19px 16px calc(18px + env(safe-area-inset-bottom));animation:premiumSheetUp .2s ease both}
  @keyframes premiumSheetUp{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
  .modal-head{position:sticky;top:-19px;background:#fff;z-index:2;padding-top:4px}.modal-actions{gap:8px}.modal-actions .inline-btn{min-height:43px}
  .student-finance-numbers{gap:7px}.communication-template-grid{grid-template-columns:1fr 1fr}.leaderboard-podium{gap:9px}
}
@media(max-width:430px){
  .header-brand small{display:none}.stats-grid{grid-template-columns:1fr 1fr}.stat-card{min-height:88px}.stat-card span{font-size:10px}.stat-card b{font-size:20px}
  .communication-template-grid{grid-template-columns:1fr}.primary-btn,.secondary-btn{font-size:12px}.actions{gap:6px}
}
@supports(padding:max(0px)){body{padding-top:env(safe-area-inset-top)}.app-header{top:env(safe-area-inset-top)}}


/* ==========================================================
   V1.25.2 — MOBILE LAYOUT HOTFIX
   Fixes:
   1) section switch now starts from top
   2) more safe bottom spacing above fixed bottom navigation
   3) build/version chip no longer collides with nav labels
   4) sticky save/toast elements lifted above bottom bar
   ========================================================== */
@media(max-width:900px){
  .content{
    padding-bottom:calc(112px + env(safe-area-inset-bottom)) !important;
  }
  .build-chip{
    bottom:calc(76px + env(safe-area-inset-bottom)) !important;
    left:8px !important;
    z-index:121 !important;
    font-size:9px !important;
    opacity:.9 !important;
  }
  .toast{
    bottom:calc(88px + env(safe-area-inset-bottom)) !important;
  }
  .lesson-save-bar{
    bottom:calc(86px + env(safe-area-inset-bottom)) !important;
  }
}
@media(max-width:640px){
  .content{
    padding-top:18px !important;
    padding-bottom:calc(118px + env(safe-area-inset-bottom)) !important;
  }
  .modal-card{
    margin-bottom:calc(4px + env(safe-area-inset-bottom));
  }
}


/* ==========================================================
   V1.25.3 — STRUCTURE FIX + MOBILE POLISH
   ========================================================== */
@media(max-width:900px){
  .build-chip{
    top:72px !important;
    bottom:auto !important;
    left:8px !important;
    z-index:31 !important;
    opacity:.68 !important;
    pointer-events:none !important;
  }
}
@media(max-width:640px){
  .build-chip{top:68px !important;}
}


/* ==========================================================
   V1.25.4 — MOBILE LOGIN ROOT-CAUSE FIX
   The desktop premium login grid was overriding the earlier
   mobile rule because it appeared later in the stylesheet.
   ========================================================== */
@media(max-width:900px){
  html,body{
    max-width:100%;
    overflow-x:hidden;
  }

  .login-shell{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:flex-start !important;
    grid-template-columns:none !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    min-height:100svh !important;
    padding:clamp(28px,7vh,64px) 16px 32px !important;
    background:
      radial-gradient(circle at 50% -80px,rgba(242,181,65,.10),transparent 220px),
      #F5F7FB !important;
  }

  .login-brand{
    display:none !important;
  }

  .login-card{
    display:block !important;
    position:relative !important;
    width:min(100%,480px) !important;
    max-width:480px !important;
    min-width:0 !important;
    margin:0 auto !important;
    align-self:auto !important;
    justify-self:auto !important;
    padding:28px 22px !important;
    border-radius:24px !important;
    border-top:4px solid var(--gold) !important;
    overflow:visible !important;
  }

  .login-card .mini-logo{
    width:64px !important;
    height:64px !important;
    border-radius:19px !important;
    font-size:21px !important;
  }

  .login-card h2{
    margin:16px 0 7px !important;
    font-size:27px !important;
    line-height:1.35 !important;
    text-align:center !important;
  }

  .login-card>p,
  #loginIntro,
  #loginNote{
    max-width:100% !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
  }

  #loginIntro{
    margin:0 auto 4px !important;
    line-height:1.85 !important;
    font-size:13px !important;
  }

  .login-card label{
    width:100% !important;
    margin-top:16px !important;
    font-size:13px !important;
    line-height:1.5 !important;
  }

  .login-card input{
    width:100% !important;
    min-width:0 !important;
    height:48px !important;
    min-height:48px !important;
    font-size:16px !important;
    line-height:1.2 !important;
    padding:12px 13px !important;
  }

  .login-card .password-wrap{
    width:100% !important;
  }

  .login-card .password-wrap input{
    padding-left:48px !important;
  }

  .login-card .icon-btn{
    top:13px !important;
    left:8px !important;
  }

  .login-card .primary-btn,
  .login-card .secondary-btn,
  .forgot-password-entry,
  .teacher-signup-entry{
    width:100% !important;
    max-width:100% !important;
  }

  .login-note{
    margin-top:12px !important;
    font-size:11px !important;
    line-height:1.75 !important;
  }

  /* Keep the test build badge out of the form area. */
  body:has(#loginView:not(.hidden)) .build-chip{
    top:auto !important;
    bottom:8px !important;
    left:8px !important;
    z-index:5 !important;
  }
}

@media(max-width:480px){
  .login-shell{
    padding:24px 13px 28px !important;
  }

  .login-card{
    width:100% !important;
    padding:24px 17px !important;
    border-radius:21px !important;
  }

  .login-card .mini-logo{
    width:58px !important;
    height:58px !important;
    border-radius:17px !important;
  }

  .login-card h2{
    font-size:25px !important;
  }
}

/* ==========================================================
   V1.25.5 — LOGIN VISIBILITY HOTFIX
   V1.25.4's mobile .login-shell { display:flex!important }
   appeared after .hidden and therefore overrode the auth
   visibility state on mobile. Keep the mobile layout, but
   allow auth state to hide the login view explicitly.
   ========================================================== */
#loginView.hidden{
  display:none !important;
}


/* ==========================================================
   V1.25.6 — MOBILE UI STABILIZATION / VISUAL CONSISTENCY
   UI-only. No data model, Firebase, or business-logic changes.
   ========================================================== */

/* Version belongs to the app chrome, never floats above page content. */
.app-header .build-chip{
  position:static !important;
  inset:auto !important;
  z-index:auto !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:4px 8px !important;
  border:1px solid #E3E8EF;
  border-radius:999px;
  background:#F7F9FC !important;
  color:#7B8799 !important;
  box-shadow:none !important;
  opacity:1 !important;
  font-size:9px !important;
  font-weight:800;
  line-height:1;
  direction:ltr;
  white-space:nowrap;
  pointer-events:none;
}

/* Cleaner page hierarchy and predictable sizing. */
.section{min-width:0}
.section-head>div:first-child{min-width:0;max-width:100%}
.section-head h2,.section-head p,.panel h3{overflow-wrap:anywhere}
.panel,.stat-card,.responsive-data-table tr{isolation:isolate}
.toolbar input{background:#FBFCFE;border-color:#DDE4ED}
.toolbar input::placeholder{color:#9AA5B4;opacity:1}

/* Dashboard: remove the visual "card inside card" effect from Today's board. */
#homePanels> .panel:first-child{
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
#homePanels> .panel:first-child>h3{
  margin:0 0 12px;
  padding-inline:2px;
  font-size:20px;
}
.smart-dashboard{gap:12px}
.smart-dashboard-hero{padding:18px 19px}
.smart-dashboard-hero h3{line-height:1.45}
.smart-dashboard-hero p{line-height:1.7}
.smart-kpis>div{min-width:0}
.smart-kpis b{display:block;overflow-wrap:anywhere;line-height:1.3}

/* Student cards: labels and values keep their own columns instead of colliding. */
@media(max-width:900px){
  .app-header .build-chip{
    min-height:24px;
    padding:3px 6px !important;
    font-size:8px !important;
  }

  .section-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    column-gap:12px;
    row-gap:8px;
  }
  .section-head>div:first-child{grid-column:1}
  .section-head>button,
  .section-head>.leaderboard-head-actions{grid-column:2;align-self:start}
  .section-head p{max-width:42rem}

  .stats-grid{align-items:stretch}
  .stat-card{height:100%;justify-content:center}
  .stat-card span{line-height:1.45}
  .stat-card b{overflow-wrap:anywhere}

  #homePanels{gap:14px}
  #homePanels>.panel{min-width:0}
  .smart-dashboard-hero{padding:16px}
  .smart-kpis>div{padding:11px 10px}

  .responsive-data-table tr{overflow:visible}
  .responsive-data-table td{
    display:grid !important;
    grid-template-columns:minmax(86px,31%) minmax(0,1fr);
    align-items:center;
    gap:12px;
    text-align:start !important;
    line-height:1.55;
  }
  .responsive-data-table td::before{
    min-width:0;
    text-align:right;
    line-height:1.35;
  }
  .responsive-data-table td>*{min-width:0;max-width:100%}
  .responsive-data-table .ltr-value{direction:ltr;text-align:left;justify-self:start;overflow-wrap:anywhere}
  .responsive-data-table td[data-label="الإجراءات"]{
    display:block !important;
  }
  .responsive-data-table td[data-label="الإجراءات"]::before{
    display:block;
    margin-bottom:10px;
  }
  .responsive-data-table td[data-label="الإجراءات"] .actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .responsive-data-table td[data-label="الإجراءات"] .action-btn{
    width:100%;
    min-width:0;
    min-height:40px;
    padding:8px 7px;
    line-height:1.35;
    white-space:normal;
  }
}

@media(max-width:640px){
  .app-header{padding-inline:12px}
  .header-actions{gap:6px;flex:0 0 auto}
  .header-brand{min-width:0;gap:9px}
  .header-brand strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}
  .app-header .build-chip{font-size:7.5px !important;padding:3px 5px !important}
  #logoutBtn{padding-inline:9px;font-size:10px;white-space:nowrap}

  .content{padding-inline:14px !important}
  .section-head h2{font-size:24px;line-height:1.3}
  .section-head .eyebrow{font-size:11px}
  .section-head .primary-btn.inline-btn,
  .section-head .secondary-btn.compact{font-size:11px;min-height:40px;padding:8px 12px}

  .panel{overflow:hidden}
  .toolbar{margin-bottom:14px}
  .toolbar input{height:48px;border-radius:15px;font-size:15px;padding-inline:14px}

  .smart-dashboard-hero{gap:12px}
  .smart-dashboard-hero .secondary-btn.compact{width:100%;margin-top:2px}
  .smart-kpis{gap:8px}
  .smart-kpis>div{min-height:76px;display:flex;flex-direction:column;justify-content:center}
  .smart-kpis span{line-height:1.4}
  .smart-kpis b{font-size:16px}
}

@media(max-width:390px){
  .header-brand strong{max-width:128px}
  .app-header .build-chip{display:none}
  .section-head{grid-template-columns:minmax(0,1fr) auto;column-gap:8px}
  .responsive-data-table td{grid-template-columns:82px minmax(0,1fr);gap:9px}
}

/* ==========================================================
   V1.25.7 — PREMIUM MOBILE DESIGN SYSTEM
   Visual-only refinement built directly on V1.25.6.
   Focus: Dashboard, Students, page hierarchy, bottom navigation.
   ========================================================== */
:root{
  --navy:#0A2A55;
  --navy2:#123E78;
  --gold:#F2B541;
  --bg:#F6F8FC;
  --ink:#17243A;
  --muted:#758195;
  --line:#E1E7EF;
  --surface:#FFFFFF;
  --surface-soft:#F8FAFD;
  --radius-sm:12px;
  --radius-md:16px;
  --radius-lg:20px;
  --radius-xl:24px;
  --shadow-xs:0 2px 8px rgba(10,42,85,.035);
  --shadow-sm:0 8px 24px rgba(10,42,85,.06);
}

body{
  background:
    radial-gradient(circle at 100% 0,rgba(18,62,120,.045),transparent 24rem),
    var(--bg);
}

/* App chrome */
.app-header{
  border-bottom-color:rgba(218,225,235,.9);
  box-shadow:0 1px 0 rgba(10,42,85,.025);
}
.header-brand .brand-mark.small{
  background:linear-gradient(145deg,#FFD978,var(--gold));
  color:var(--navy);
}
.header-actions .build-chip{
  background:#F4F7FB !important;
  border-color:#E0E6EE;
  color:#8994A5 !important;
  letter-spacing:.15px;
}

/* Page title hierarchy */
.section-head{
  position:relative;
}
.section-head .eyebrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#9A7116;
  letter-spacing:.15px;
}
.section-head .eyebrow::before{
  content:"";
  width:18px;
  height:3px;
  border-radius:999px;
  background:var(--gold);
}
.section-head h2{
  color:var(--navy);
  letter-spacing:-.45px;
}
.section-head p{
  color:var(--muted);
}

/* Cards: quiet, consistent, premium */
.panel,.stat-card,.group-card,.student-card,.student-finance-card,.smart-alert-card,.leaderboard-winner{
  border-color:var(--line);
  box-shadow:var(--shadow-xs);
}
.panel{
  background:rgba(255,255,255,.985);
}

/* Dashboard metrics are supporting information, not giant tiles. */
#homeSection>.stats-grid{
  gap:10px;
  margin-bottom:18px;
}
#homeSection>.stats-grid .stat-card{
  min-height:88px;
  padding:14px 16px;
  border-radius:18px;
  background:linear-gradient(180deg,#FFFFFF,#FCFDFE);
}
#homeSection>.stats-grid .stat-card::before{
  inset:18px auto 18px 0;
  width:3px;
}
#homeSection>.stats-grid .stat-card::after{
  width:62px;
  height:62px;
  left:-26px;
  top:-25px;
  background:rgba(18,62,120,.035);
}
#homeSection>.stats-grid .stat-card span{
  font-size:10px;
  font-weight:750;
  color:#7C8798;
}
#homeSection>.stats-grid .stat-card b{
  margin-top:5px;
  font-size:22px;
  letter-spacing:-.5px;
}

/* Today's dashboard becomes the focal action area. */
#homePanels>.panel:first-child{
  margin-top:2px;
}
.smart-dashboard{
  gap:14px;
}
.smart-dashboard-hero{
  position:relative;
  padding:20px 21px;
  border-radius:22px;
  border:1px solid #DCE5F0;
  background:
    radial-gradient(circle at 5% 0,rgba(242,181,65,.13),transparent 9rem),
    linear-gradient(135deg,#F8FBFF 0%,#FFFFFF 72%);
}
.smart-dashboard-hero::after{
  content:"";
  position:absolute;
  top:20px;
  inset-inline-end:0;
  width:4px;
  height:42px;
  border-radius:999px 0 0 999px;
  background:var(--gold);
}
.smart-dashboard-hero h3{
  color:var(--navy);
  font-size:22px;
  letter-spacing:-.4px;
}
.smart-dashboard-hero p{
  font-size:12px;
}
.smart-dashboard-hero .secondary-btn{
  background:#fff;
  border-color:#D7E1EC;
  box-shadow:none;
}
.smart-kpis{
  gap:8px;
}
.smart-kpis>div{
  border-color:#E3E9F0;
  background:var(--surface-soft);
  border-radius:14px;
  padding:10px 11px;
}
.smart-kpis span{
  font-size:9.5px;
}
.smart-kpis b{
  font-size:16px;
  letter-spacing:-.25px;
}
.smart-next-lesson{
  border:1px solid #EBD89D;
  background:linear-gradient(135deg,#FFF9E8,#FFFDF7);
  box-shadow:none;
}
.smart-next-icon{
  background:#F7C851;
  box-shadow:0 6px 15px rgba(242,181,65,.18);
}
.smart-next-copy h4{
  color:var(--navy);
}
.smart-section-title{
  padding:2px 1px 8px;
}
.smart-section-title b{
  color:var(--navy);
}

/* Students: make the search panel lighter and the list feel like an app. */
#studentsSection>.panel{
  padding:16px;
}
#studentsSection .toolbar{
  margin-bottom:13px;
}
#studentsSection .toolbar input{
  border:1px solid #DCE4ED;
  background:#FBFCFE;
  box-shadow:inset 0 1px 0 rgba(10,42,85,.015);
}
.students-data-table .status{
  font-weight:800;
  letter-spacing:.1px;
}
.students-data-table .actions .action-btn{
  font-weight:750;
}
.students-data-table .whatsapp-action{
  color:#16704E;
  border-color:#CAE8DA;
  background:#F2FBF7;
}
.students-data-table .qr-action{
  color:#175A91;
  border-color:#D1E2F0;
  background:#F4F9FD;
}

/* Bottom navigation: stable five-item viewport with deliberate scrolling for extras. */
@media(max-width:900px){
  .sidebar{
    height:74px !important;
    min-height:74px !important;
    gap:3px;
    padding-top:6px;
    padding-bottom:calc(6px + env(safe-area-inset-bottom));
    scroll-snap-type:x proximity;
    overscroll-behavior-x:contain;
    box-shadow:0 -7px 26px rgba(10,42,85,.075);
  }
  .nav-item{
    flex:0 0 calc((100vw - 20px)/5) !important;
    width:calc((100vw - 20px)/5) !important;
    max-width:82px !important;
    min-width:64px !important;
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    border-radius:15px;
    scroll-snap-align:center;
    font-size:9px;
  }
  .nav-item.active,.nav-item.active:hover{
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    background:#FFF7DF;
    border-color:#EFD99B;
  }
  .nav-icon,.nav-icon svg{
    width:22px;
    height:22px;
  }
  .content{
    padding-bottom:calc(104px + env(safe-area-inset-bottom)) !important;
  }

  /* Mobile page header: title and primary action never fight for space. */
  .section-head{
    grid-template-columns:minmax(0,1fr) auto;
    column-gap:10px;
    row-gap:6px;
    margin-bottom:16px;
  }
  .section-head h2{
    margin-top:4px;
    font-size:24px;
  }
  .section-head p{
    margin-top:6px;
    line-height:1.7;
  }

  #homeSection>.section-head{
    padding:3px 1px 0;
  }
  #homeSection>.stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }
  #homeSection>.stats-grid .stat-card{
    min-height:78px;
    padding:12px 13px;
  }
  #homeSection>.stats-grid .stat-card b{
    font-size:19px;
  }

  .smart-dashboard-hero{
    padding:17px;
  }
  .smart-dashboard-hero h3{
    font-size:20px;
    line-height:1.5;
  }
  .smart-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .smart-kpis>div{
    min-height:66px;
    padding:9px 10px;
  }
  .smart-next-lesson{
    grid-template-columns:42px minmax(0,1fr);
    gap:11px;
    padding:13px;
  }
  .smart-next-lesson>.primary-btn,
  .smart-next-lesson>.secondary-btn{
    grid-column:1/-1;
    width:100%;
    min-height:42px;
  }
  .smart-next-icon{
    width:42px;
    height:42px;
    border-radius:13px;
  }

  /* Compact student card layout: name first, details in a two-column grid. */
  #studentsSection>.panel{
    padding:0;
    border:0;
    background:transparent;
    box-shadow:none;
  }
  #studentsSection .toolbar{
    padding:0;
    margin-bottom:12px;
  }
  #studentsSection .toolbar input{
    height:48px;
    border-radius:15px;
    background:#fff;
  }
  .students-data-table tbody{
    display:grid;
    gap:11px;
  }
  .students-data-table tr{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    column-gap:12px;
    row-gap:0;
    padding:14px 15px !important;
    border-radius:19px !important;
    border:1px solid var(--line) !important;
    background:#fff;
    box-shadow:var(--shadow-xs) !important;
    overflow:hidden;
  }
  .students-data-table td{
    display:flex !important;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:3px !important;
    min-width:0;
    min-height:0 !important;
    padding:9px 0 !important;
    border-bottom:1px solid #EEF2F6 !important;
    text-align:start !important;
  }
  .students-data-table td::before{
    display:block;
    margin:0;
    font-size:9px;
    line-height:1.25;
    color:#8A95A6;
    font-weight:750;
  }
  .students-data-table td[data-label="الاسم"]{
    grid-column:1/-1;
    order:1;
    padding-top:1px !important;
    padding-bottom:12px !important;
    color:var(--navy);
    font-size:16px;
    font-weight:850;
    line-height:1.55;
  }
  .students-data-table td[data-label="الاسم"]::before{display:none}
  .students-data-table td[data-label="الكود"]{order:2;font-weight:800;color:#3F4C60}
  .students-data-table td[data-label="الحالة"]{order:2;align-items:flex-end}
  .students-data-table td[data-label="الحالة"]::before{text-align:left}
  .students-data-table td[data-label="الصف"]{order:3}
  .students-data-table td[data-label="المجموعة"]{order:3}
  .students-data-table td[data-label="ولي الأمر"]{
    grid-column:1/-1;
    order:4;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    padding:10px 0 !important;
  }
  .students-data-table td[data-label="ولي الأمر"]::before{margin:0}
  .students-data-table td[data-label="الإجراءات"]{
    grid-column:1/-1;
    order:5;
    display:block !important;
    border-bottom:0 !important;
    padding:12px 0 0 !important;
  }
  .students-data-table td[data-label="الإجراءات"]::before{
    display:none;
  }
  .students-data-table td[data-label="الإجراءات"] .actions{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:7px;
  }
  .students-data-table td[data-label="الإجراءات"] .action-btn{
    width:100%;
    min-width:0;
    min-height:38px;
    padding:7px 5px;
    border-radius:11px;
    font-size:9.5px;
    line-height:1.3;
    white-space:normal;
  }
}

@media(max-width:520px){
  .app-header{
    padding-inline:12px;
  }
  .header-brand strong{
    max-width:138px;
  }
  .app-header .build-chip{
    display:none !important;
  }
  #logoutBtn{
    min-height:36px;
    padding:7px 10px;
    border-radius:11px;
  }
  .section-head h2{
    font-size:23px;
  }
  .section-head .primary-btn.inline-btn,
  .section-head .secondary-btn.compact{
    min-height:39px;
    padding:8px 11px;
  }
  .students-data-table td[data-label="الإجراءات"] .actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .students-data-table td[data-label="الإجراءات"] .action-btn{
    min-height:40px;
    font-size:10px;
  }
}

@media(max-width:360px){
  .header-brand strong{max-width:112px}
  .section-head{grid-template-columns:minmax(0,1fr) auto}
  #homeSection>.stats-grid{gap:7px}
  .students-data-table tr{padding:13px !important}
}

/* v1.34.0 — TABEA ONE unified KPI cards.
   Neutral information uses cool brand tones; gold is reserved for ranking and active emphasis. */
@media(max-width:900px){
  body[data-role="teacher"] :is(
    #scheduleSection .schedule-summary-grid,
    #studentFinanceSection .student-finance-stats,
    #smartAlertsSection .smart-alert-stats,
    #leaderboardSection .leaderboard-stats
  ) .stat-card{
    position:relative !important;
    isolation:isolate !important;
    overflow:hidden !important;
    min-width:0 !important;
    border:1px solid #DCE7F1 !important;
    border-radius:16px !important;
    background:linear-gradient(145deg,#FFFFFF 0%,#F8FBFE 100%) !important;
    box-shadow:0 6px 18px rgba(11,45,87,.045) !important;
  }
  body[data-role="teacher"] :is(
    #scheduleSection .schedule-summary-grid,
    #studentFinanceSection .student-finance-stats,
    #smartAlertsSection .smart-alert-stats,
    #leaderboardSection .leaderboard-stats
  ) .stat-card::before,
  body[data-role="teacher"] :is(
    #scheduleSection .schedule-summary-grid,
    #studentFinanceSection .student-finance-stats,
    #smartAlertsSection .smart-alert-stats,
    #leaderboardSection .leaderboard-stats
  ) .stat-card::after{
    content:none !important;
    display:none !important;
  }
  body[data-role="teacher"] :is(
    #scheduleSection .schedule-summary-grid,
    #studentFinanceSection .student-finance-stats,
    #smartAlertsSection .smart-alert-stats,
    #leaderboardSection .leaderboard-stats
  ) .stat-card span{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:5px !important;
    color:#65758A !important;
    font-weight:750 !important;
  }
  body[data-role="teacher"] :is(
    #scheduleSection .schedule-summary-grid,
    #studentFinanceSection .student-finance-stats,
    #smartAlertsSection .smart-alert-stats,
    #leaderboardSection .leaderboard-stats
  ) .stat-card span::before{
    content:"";
    flex:0 0 auto;
    width:6px;
    height:6px;
    border-radius:2px;
    background:#2F78B7;
    box-shadow:0 0 0 3px #EAF3FA;
  }
  body[data-role="teacher"] :is(
    #scheduleSection .schedule-summary-grid,
    #studentFinanceSection .student-finance-stats,
    #smartAlertsSection .smart-alert-stats,
    #leaderboardSection .leaderboard-stats
  ) .stat-card b{
    color:#0B3564 !important;
    font-weight:850 !important;
    letter-spacing:0 !important;
  }

  /* Semantic states: informative, collected, due, safe — without decorative stripes. */
  body[data-role="teacher"] #studentFinanceSection .student-finance-stats .stat-card:nth-child(2),
  body[data-role="teacher"] #studentFinanceSection .student-finance-stats .stat-card:nth-child(4){
    border-color:#CFE9DE !important;
    background:linear-gradient(145deg,#FFFFFF,#F3FBF7) !important;
  }
  body[data-role="teacher"] #studentFinanceSection .student-finance-stats .stat-card:nth-child(2) span::before,
  body[data-role="teacher"] #studentFinanceSection .student-finance-stats .stat-card:nth-child(4) span::before{
    background:#16805D !important;
    box-shadow:0 0 0 3px #E5F6EF !important;
  }
  body[data-role="teacher"] #smartAlertsSection .smart-alert-stats .stat-card:nth-child(1){border-color:#F0D1D5 !important;background:linear-gradient(145deg,#FFFFFF,#FFF7F8) !important}
  body[data-role="teacher"] #smartAlertsSection .smart-alert-stats .stat-card:nth-child(1) span::before{background:#C64752 !important;box-shadow:0 0 0 3px #FBEAEC !important}
  body[data-role="teacher"] #smartAlertsSection .smart-alert-stats .stat-card:nth-child(2){border-color:#F0DEC0 !important;background:linear-gradient(145deg,#FFFFFF,#FFFAF1) !important}
  body[data-role="teacher"] #smartAlertsSection .smart-alert-stats .stat-card:nth-child(2) span::before{background:#B77816 !important;box-shadow:0 0 0 3px #FFF1D8 !important}
  body[data-role="teacher"] #smartAlertsSection .smart-alert-stats .stat-card:nth-child(4){border-color:#CFE9DE !important;background:linear-gradient(145deg,#FFFFFF,#F3FBF7) !important}
  body[data-role="teacher"] #smartAlertsSection .smart-alert-stats .stat-card:nth-child(4) span::before{background:#16805D !important;box-shadow:0 0 0 3px #E5F6EF !important}

  /* Ranking may use gold, but only on the meaningful highest-score KPI. */
  body[data-role="teacher"] #leaderboardSection .leaderboard-stats .stat-card:nth-child(2){
    border-color:#E9D694 !important;
    background:linear-gradient(145deg,#FFFFFF,#FFFBEF) !important;
  }
  body[data-role="teacher"] #leaderboardSection .leaderboard-stats .stat-card:nth-child(2) span::before{
    background:#D9A51E !important;
    box-shadow:0 0 0 3px #FFF3CF !important;
  }
}

/* V1.33.0 — Live smart-alert entry in the mobile teacher header. */
.header-notifications-btn{display:none}
@media(max-width:900px){
  body[data-role="teacher"] .header-notifications-btn:not(.hidden){
    position:absolute;
    inset-inline-end:18px;
    top:50%;
    z-index:3;
    display:grid;
    place-items:center;
    width:34px;
    height:34px;
    padding:0;
    border:1px solid rgba(255,255,255,.18);
    border-radius:11px;
    background:rgba(255,255,255,.07);
    color:#fff;
    box-shadow:none;
    transform:translateY(-50%);
    -webkit-tap-highlight-color:transparent;
  }
  body[data-role="teacher"] .header-notifications-btn:active{
    background:rgba(255,255,255,.14);
    transform:translateY(-50%) scale(.96);
  }
  body[data-role="teacher"] .header-notifications-btn svg{
    width:20px;
    height:20px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
  }
  body[data-role="teacher"] .header-notifications-badge{
    position:absolute;
    inset-inline-end:-4px;
    top:-5px;
    display:grid;
    place-items:center;
    min-width:17px;
    height:17px;
    padding:0 4px;
    border:2px solid var(--tei-brand-navy,#104A82);
    border-radius:99px;
    background:#D94B58;
    color:#fff;
    font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
    font-size:9px;
    font-weight:850;
    line-height:1;
    box-shadow:0 2px 5px rgba(8,45,87,.24);
  }
  body[data-role="teacher"] .header-notifications-btn.has-urgent{
    color:#FFE08A;
    border-color:rgba(244,185,40,.38);
  }
}
@media(max-width:360px){
  body[data-role="teacher"] .header-notifications-btn:not(.hidden){
    inset-inline-end:14px;
    width:32px;
    height:32px;
    border-radius:10px;
  }
}

/* V1.32.0 — TABEA ONE platform mark.
   Tenant marks remain text-based and are populated dynamically. */
.platform-logo-mark{
  padding:0!important;
  overflow:hidden;
  background:transparent!important;
  box-shadow:none!important;
}
.platform-logo-mark img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

/* V1.32.2 — Polished platform identity in the compact teacher header. */
.mobile-platform-mark{display:none}
@media(max-width:900px){
  body[data-role="teacher"] .app-header{position:sticky!important}
  body[data-role="teacher"] .mobile-platform-mark{
    position:absolute;
    inset-inline-start:18px;
    top:50%;
    z-index:2;
    display:block;
    width:32px;
    height:32px;
    padding:0;
    overflow:hidden;
    border:1px solid rgba(255,214,107,.38);
    border-radius:10px;
    background:#0E3A6E;
    box-shadow:0 2px 7px rgba(0,20,45,.12);
    transform:translateY(-50%);
  }
  body[data-role="teacher"] .mobile-platform-mark img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
  }
}
@media(max-width:360px){
  body[data-role="teacher"] .mobile-platform-mark{
    inset-inline-start:14px;
    width:30px;
    height:30px;
    border-radius:9px;
  }
}

/* ==========================================================
   V1.26.0 PREVIEW — ACADEMIC COMMAND CENTER / PHASE 1
   Login, shared teacher chrome, Home and Students only.
   ========================================================== */
:root{
  --tp-navy-950:#082D57;
  --tp-navy-900:#0B3768;
  --tp-blue-700:#124F8A;
  --tp-blue-600:#175FA7;
  --tp-gold-500:#F4B928;
  --tp-gold-100:#FFF5D6;
  --tp-canvas:#F5F7FB;
  --tp-surface:#FFFFFF;
  --tp-ink:#10233F;
  --tp-muted:#66758A;
  --tp-border:#DFE6EF;
  --tp-success:#16805D;
  --tp-success-soft:#ECF8F3;
  --tp-danger:#C64752;
  --tp-shadow:0 6px 22px rgba(8,45,87,.055);
  --tp-shadow-raised:0 12px 34px rgba(8,45,87,.10);
  --tp-radius-sm:12px;
  --tp-radius-md:16px;
  --tp-radius-lg:20px;
  font-family:"Cairo","IBM Plex Sans Arabic",Tahoma,Arial,sans-serif;
}
body{background:var(--tp-canvas);color:var(--tp-ink)}
button,input,select,textarea{font-family:inherit}
.page-kicker{display:block;margin-bottom:3px;color:var(--tp-blue-600);font-size:11px;font-weight:800;letter-spacing:.02em}

/* Product lockup shared by generic and tenant-aware login. */
.login-product-lockup{display:flex;align-items:center;justify-content:center;gap:12px;direction:ltr;text-align:left}
.login-product-lockup>div:last-child{display:grid;gap:1px}
.login-product-lockup strong{font-size:20px;line-height:1.2;color:inherit}
.login-product-lockup small{font-size:11px;color:inherit;opacity:.72}
.login-kicker{display:block;margin:22px 0 7px;text-align:center;color:var(--tp-gold-500);font-size:12px;font-weight:800}
#loginView .mini-logo{position:relative;overflow:hidden;isolation:isolate}
#loginView .mini-logo::before{content:"";position:absolute;inset:7px;border:1px solid currentColor;border-radius:13px;opacity:.45}
#loginView .mini-logo span{position:relative;z-index:1}

@media(max-width:900px){
  #loginView.login-shell:not(.hidden){
    padding:32px 22px max(28px,env(safe-area-inset-bottom)) !important;
    background:
      radial-gradient(circle at 84% 10%,rgba(244,185,40,.16),transparent 25%),
      radial-gradient(circle at 12% 92%,rgba(23,95,167,.30),transparent 34%),
      linear-gradient(158deg,#0C4076 0%,var(--tp-navy-950) 54%,#061E3B 100%) !important;
  }
  #loginView .login-card{width:min(100%,390px) !important;max-width:390px !important}
  #loginView .login-product-lockup .mini-logo{
    width:58px !important;height:66px !important;margin:0 !important;border-radius:17px 17px 21px 21px !important;
    border:1.5px solid rgba(244,185,40,.9) !important;background:rgba(255,255,255,.045) !important;
    color:var(--tp-gold-500) !important;font-size:18px !important;
  }
  #loginView .login-product-lockup strong{color:#fff;font-size:21px}
  #loginView .login-product-lockup small{color:rgba(255,255,255,.72);font-size:11px}
  #loginView .login-card h2{font-size:25px !important;line-height:1.35 !important}
  #loginView #loginIntro{font-size:13px !important;line-height:1.75 !important;margin-bottom:20px !important}
  #loginView label{font-size:13px !important}
  #loginView input{height:52px !important;border-radius:14px !important}
  #loginView #loginBtn{height:52px !important;border-radius:14px !important;background:#fff !important;color:var(--tp-navy-950) !important}
  #loginView #loginBtn::after{content:"  ←";color:var(--tp-gold-500)}
  #loginView .teacher-signup-entry{border-color:rgba(244,185,40,.42) !important;color:#FFE39A !important}

  body[data-role="teacher"] .app-header{
    height:60px !important;min-height:60px !important;padding:0 18px !important;
    background:linear-gradient(100deg,var(--tp-navy-950),#104A82) !important;
  }
  body[data-role="teacher"] #headerScreenTitle{font-size:17px !important;letter-spacing:0 !important}
  body[data-role="teacher"] .content{padding:20px 18px calc(78px + env(safe-area-inset-bottom)) !important}
  body[data-role="teacher"] .section-head{margin-bottom:16px;align-items:flex-end}
  body[data-role="teacher"] .section-head h2{margin:0;color:var(--tp-ink);font-size:26px;line-height:1.35;font-weight:850}
  body[data-role="teacher"] .section-head .muted{margin:4px 0 0;font-size:12px;line-height:1.6}
  body[data-role="teacher"] .icon-action-btn{position:relative;width:42px;height:42px;min-width:42px;border-radius:13px;background:#fff;border:1px solid var(--tp-border);color:var(--tp-navy-900);box-shadow:none;font-size:0}
  body[data-role="teacher"] .icon-action-btn::before{content:"";display:block;width:18px;height:18px;margin:auto;border:2px solid currentColor;border-left-color:transparent;border-radius:50%}
  body[data-role="teacher"] .icon-action-btn::after{content:"";position:absolute;width:6px;height:6px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:translate(0,-9px) rotate(-25deg)}

  body[data-role="teacher"] .teacher-mobile-nav:not(.hidden){
    height:calc(62px + env(safe-area-inset-bottom)) !important;padding:3px 10px calc(3px + env(safe-area-inset-bottom)) !important;
    background:rgba(8,45,87,.98) !important;box-shadow:0 -8px 24px rgba(8,45,87,.16) !important;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item{
    height:54px !important;min-height:54px !important;max-height:54px !important;border-radius:12px !important;
    color:rgba(255,255,255,.70) !important;font-size:10px !important;gap:3px !important;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item.active,
  body[data-role="teacher"] .teacher-mobile-nav .mobile-more-trigger.active{background:rgba(255,255,255,.075) !important;color:var(--tp-gold-500) !important}

  /* Home: operational hierarchy instead of a wall of equal cards. */
  #homeSection .home-page-head{margin-bottom:14px}
  body[data-role="teacher"] #homeSection #statsGrid{display:none !important}
  body[data-role="teacher"] #homeSection #homePanels{display:block !important;margin:0 !important}
  #homeSection .teacher-command-center{padding:0 !important;border:0 !important;background:transparent !important;box-shadow:none !important}
  #homeSection .smart-dashboard{display:grid;gap:14px}
  #homeSection .smart-dashboard-hero{
    display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:0 2px;background:transparent;border:0;box-shadow:none;
  }
  #homeSection .smart-dashboard-hero .eyebrow{display:none}
  #homeSection .smart-dashboard-hero h3{margin:0;color:var(--tp-muted);font-size:12px;font-weight:650}
  #homeSection .smart-dashboard-hero p{display:none}
  #homeSection .smart-dashboard-hero .secondary-btn{min-height:38px;padding:8px 12px;border-radius:11px;background:#fff;border-color:var(--tp-border);font-size:11px}
  #homeSection .smart-next-lesson{
    position:relative;
    order:-2;display:grid;grid-template-columns:44px minmax(0,1fr);gap:4px 12px;padding:18px;border:0;border-radius:var(--tp-radius-lg);
    background:linear-gradient(135deg,var(--tp-navy-950),#12528F);color:#fff;box-shadow:var(--tp-shadow-raised);overflow:hidden;
  }
  #homeSection .smart-next-lesson::after{content:"";position:absolute;inset-inline-start:-28px;bottom:-48px;width:130px;height:130px;border:24px solid rgba(244,185,40,.10);border-radius:50%}
  #homeSection .smart-next-icon{grid-row:1/3;width:44px;height:44px;border-radius:14px;background:rgba(255,255,255,.10);color:var(--tp-gold-500);display:grid;place-items:center}
  #homeSection .smart-next-copy{position:relative;z-index:1}
  #homeSection .smart-next-copy span{color:rgba(255,255,255,.70);font-size:11px}
  #homeSection .smart-next-copy h4{margin:3px 0;color:#fff;font-size:18px;line-height:1.45}
  #homeSection .smart-next-copy p{margin:0;color:rgba(255,255,255,.72);font-size:11px}
  #homeSection .smart-next-copy b{display:inline-block;margin-top:8px;padding:5px 9px;border-radius:99px;background:rgba(244,185,40,.16);color:#FFE18A;font-size:10px}
  #homeSection .smart-next-lesson>.primary-btn,#homeSection .smart-next-lesson>.secondary-btn{grid-column:1/-1;position:relative;z-index:1;width:100%;min-height:44px;margin:12px 0 0;border-radius:12px;background:var(--tp-gold-500);color:var(--tp-navy-950);box-shadow:none}
  #homeSection .dashboard-quick-actions{order:-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0}
  #homeSection .dashboard-quick-actions button{min-width:0;min-height:76px;padding:10px 4px;border:1px solid var(--tp-border);border-radius:15px;background:#fff;color:var(--tp-ink);box-shadow:none}
  #homeSection .dashboard-quick-actions button span{width:31px;height:31px;margin:auto auto 6px;border-radius:10px;background:#EDF4FC;color:var(--tp-blue-700);display:grid;place-items:center;font-size:16px}
  #homeSection .dashboard-quick-actions button b{font-size:9.5px;line-height:1.35;white-space:normal}
  #homeSection .smart-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0}
  #homeSection .smart-kpis>div{min-width:0;padding:11px 6px;border:1px solid var(--tp-border);border-radius:14px;background:#fff;text-align:center;box-shadow:none}
  #homeSection .smart-kpis span{font-size:8.5px;line-height:1.3;color:var(--tp-muted)}
  #homeSection .smart-kpis b{display:block;margin-top:5px;color:var(--tp-navy-900);font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #homeSection .smart-alert-dashboard-card,#homeSection .smart-today-mini{border:1px solid var(--tp-border);border-radius:var(--tp-radius-lg);background:#fff;box-shadow:var(--tp-shadow)}
  #homeSection .dashboard-secondary-grid{display:none !important}

  /* Students: compact identity-led cards with reliable actions. */
  #studentsSection .students-page-head{align-items:flex-end !important}
  #studentsSection #addStudentBtn{width:auto !important;min-width:118px;min-height:42px;margin:0 !important;padding:10px 13px;border-radius:13px;background:var(--tp-navy-900);box-shadow:none;font-size:11px;white-space:nowrap}
  #studentsSection #addStudentBtn span{color:var(--tp-gold-500);font-size:15px}
  #studentsSection .students-list-panel{padding:0 !important;border:0 !important;background:transparent !important;box-shadow:none !important}
  #studentsSection .student-search-wrap{position:relative;margin:0 0 12px !important}
  #studentsSection .student-search-wrap .search-icon{position:absolute;right:15px;top:50%;width:16px;height:16px;border:2px solid #8290A3;border-radius:50%;transform:translateY(-60%);z-index:2}
  #studentsSection .student-search-wrap .search-icon::after{content:"";position:absolute;width:7px;height:2px;background:#8290A3;left:-5px;bottom:-2px;transform:rotate(45deg);border-radius:3px}
  #studentsSection #studentSearch{max-width:none;width:100%;height:48px;margin:0;padding:10px 44px 10px 14px;border:1px solid var(--tp-border);border-radius:15px;background:#fff;box-shadow:none;font-size:14px}
  #studentsSection .students-data-table tbody{gap:10px}
  #studentsSection .students-data-table tr.student-row-card{grid-template-columns:minmax(0,1fr) auto !important;padding:14px !important;border-color:var(--tp-border) !important;border-radius:18px !important;box-shadow:var(--tp-shadow) !important}
  #studentsSection .students-data-table tr.student-row-card td[data-label="الاسم"]{display:grid !important;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:10px}
  #studentsSection .student-avatar{width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#EAF2FC,#F7FAFE);border:1px solid #DCE7F4;color:var(--tp-blue-700);display:grid;place-items:center;font-size:14px;font-weight:850}
  #studentsSection .student-identity-copy{min-width:0;display:block}
  #studentsSection .student-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--tp-ink);font-size:14px}
  #studentsSection .student-inline-meta{margin-top:2px;font-size:10px;color:var(--tp-muted)}
  #studentsSection .students-data-table tr.student-row-card td[data-label="الحالة"]{padding-top:4px !important}
  #studentsSection .status{padding:5px 8px;border-radius:99px;font-size:9px}
  #studentsSection .status.active{background:var(--tp-success-soft);color:var(--tp-success);border:1px solid #CBEBDD}
  #studentsSection .students-data-table tr.student-row-card td[data-label="ولي الأمر"]{margin-top:10px;padding-top:9px !important;font-size:11px}
  #studentsSection .student-primary-actions{display:grid !important;grid-template-columns:42px minmax(0,1fr) minmax(0,1fr) !important;gap:8px !important;direction:ltr}
  #studentsSection .student-primary-actions .action-btn{height:40px !important;min-height:40px !important;border-radius:12px !important;font-size:10px !important;font-weight:800 !important;direction:rtl}
  #studentsSection .student-primary-actions .whatsapp-action{grid-column:3;background:var(--tp-success-soft) !important;border-color:#BFE4D5 !important;color:var(--tp-success) !important}
  #studentsSection .student-primary-actions .qr-action{grid-column:2;background:#EDF5FC !important;border-color:#CFE1F2 !important;color:var(--tp-navy-900) !important}
  #studentsSection .student-primary-actions .row-more-menu{grid-column:1;grid-row:1}
  #studentsSection .row-more-trigger{width:42px !important;height:40px !important;border-radius:12px !important;border:1px solid var(--tp-border) !important;background:#fff !important;color:var(--tp-navy-900) !important;font-size:22px !important}
}

@media(max-width:380px){
  body[data-role="teacher"] .content{padding-inline:14px !important}
  body[data-role="teacher"] .section-head h2{font-size:23px}
  #homeSection .dashboard-quick-actions{gap:6px}
  #homeSection .dashboard-quick-actions button b{font-size:8.8px}
  #studentsSection #addStudentBtn{min-width:106px;padding-inline:10px}
}

/* ==========================================================
   V1.25.8 — MASTER MOBILE UI / PHASE 1
   Reference-driven redesign: Header, fixed 5-item teacher nav,
   Dashboard, Students, Groups. No backend/data-model changes.
   ========================================================== */
:root{
  --brand-navy:#123F78;
  --deep-navy:#0B2D57;
  --primary-blue:#17569A;
  --brand-gold:#F2B824;
  --soft-gold:#FFF6D8;
  --app-bg:#F5F7FB;
  --surface:#FFFFFF;
  --text-primary:#17253A;
  --text-secondary:#66758A;
  --border:#DFE6EF;
  --success:#16805D;
  --success-bg:#EAF8F2;
  --warning:#B7790B;
  --danger:#C64752;
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --radius-control:13px;
  --radius-card:18px;
  --shadow-card:0 5px 18px rgba(11,45,87,.045);
  --navy:var(--brand-navy);
  --navy2:var(--primary-blue);
  --gold:var(--brand-gold);
  --bg:var(--app-bg);
  --ink:var(--text-primary);
  --muted:var(--text-secondary);
  --line:var(--border);
}
body{background:var(--app-bg);color:var(--text-primary);font-family:"Segoe UI",Tahoma,Arial,sans-serif}
.content{max-width:1440px;width:100%;margin-inline:auto}
.section-head{margin-bottom:var(--space-5);align-items:flex-end}
.section-head h2{font-size:clamp(24px,2.1vw,28px);font-weight:850;line-height:1.2;letter-spacing:-.35px;color:var(--deep-navy);margin:0}
.section-head p{font-size:13px;line-height:1.7;margin:6px 0 0;max-width:680px}
.section-head .eyebrow{display:none}
.primary-btn{background:var(--brand-navy);box-shadow:none}
.primary-btn:hover{background:var(--deep-navy)}
.secondary-btn{background:#F3F7FC;border-color:#DCE5EF;color:var(--brand-navy);box-shadow:none}
.action-btn{box-shadow:none}
.status.active{background:var(--success-bg);color:var(--success);border:1px solid #CDEBDE}
.status.inactive{background:#FFF0F1;color:var(--danger);border:1px solid #F3D4D7}

/* Compact native app header */
.app-header{height:68px;padding:0 20px;background:rgba(255,255,255,.98);border-bottom:1px solid var(--border);box-shadow:0 1px 0 rgba(11,45,87,.02);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.app-header-identity{gap:11px;min-width:0}
.app-header-identity .brand-mark.small{width:40px;height:40px;border-radius:13px;flex:0 0 40px;background:linear-gradient(145deg,#FFD969,var(--brand-gold));color:var(--deep-navy);box-shadow:0 4px 12px rgba(242,184,36,.16)}
.app-header-copy{display:grid;gap:1px;min-width:0;text-align:start}
.app-header-copy small{font-size:10px;color:var(--text-secondary);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.app-header-copy strong{font-size:17px;color:var(--deep-navy);font-weight:850;line-height:1.15;white-space:nowrap}
.app-header-copy span{font-size:9px;color:#8A96A8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:250px}
.app-header .role-badge{background:#F4F7FB;border-color:#E0E6EF;color:#5E6E82}
.icon-action-btn{width:40px;height:40px;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--brand-navy);font-size:21px;display:grid;place-items:center;padding:0}

/* Dashboard: command center first, account details second */
#homeSection>.section-head{margin-bottom:14px}
#homeSection>.section-head h2{font-size:27px}
#homeSection>.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 16px}
#homeSection>.stats-grid .stat-card:nth-child(4){display:none}
#homeSection>.stats-grid .stat-card{min-height:76px;border-radius:16px;padding:13px 14px;border:1px solid var(--border);box-shadow:none;background:#fff}
#homeSection>.stats-grid .stat-card::before,#homeSection>.stats-grid .stat-card::after{display:none}
#homeSection>.stats-grid .stat-card span{font-size:11px;color:var(--text-secondary);font-weight:650}
#homeSection>.stats-grid .stat-card b{font-size:23px;color:var(--deep-navy);margin-top:4px}
#homePanels{display:block;margin-top:0}
.teacher-command-center{display:block}
.teacher-command-center .smart-dashboard{display:grid;gap:14px}
.smart-dashboard-hero{order:0;padding:0;border:0;background:transparent;box-shadow:none;display:flex;align-items:center;justify-content:space-between;gap:14px}
.smart-dashboard-hero::after{display:none}
.smart-dashboard-hero .eyebrow{display:none}
.smart-dashboard-hero h3{font-size:15px;margin:0;color:var(--text-primary);font-weight:750}
.smart-dashboard-hero p{font-size:12px;color:var(--text-secondary);margin:4px 0 0}
.smart-dashboard-hero .secondary-btn{width:auto;min-height:36px;margin:0;border-radius:11px;font-size:11px;padding:8px 12px}
.dashboard-quick-actions{order:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.dashboard-quick-actions button{min-height:72px;padding:9px 5px;border:1px solid var(--border);border-radius:15px;background:#fff;color:var(--deep-navy);display:grid;place-items:center;align-content:center;gap:5px;font:inherit;box-shadow:none}
.dashboard-quick-actions button span{font-size:20px;line-height:1;color:var(--primary-blue)}
.dashboard-quick-actions button b{font-size:10.5px;line-height:1.35}
.smart-kpis{order:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.smart-kpis>div{min-height:64px;border:1px solid var(--border);border-radius:14px;background:#fff;padding:10px 11px;box-shadow:none}
.smart-kpis span{font-size:9.5px;color:var(--text-secondary)}
.smart-kpis b{font-size:16px;color:var(--deep-navy)}
.smart-next-lesson{order:1;border:1px solid #ECD996;border-radius:18px;background:linear-gradient(135deg,#FFF9E8,#FFFFFF);padding:16px;box-shadow:none;position:relative;overflow:hidden}
.smart-next-lesson::before{content:"";position:absolute;inset-block:14px;inset-inline-start:0;width:3px;border-radius:99px;background:var(--brand-gold)}
.smart-next-icon{background:var(--brand-navy);color:#fff;box-shadow:none}
.smart-next-copy span{color:#9A7112;font-size:10px;font-weight:800}
.smart-next-copy h4{font-size:17px;color:var(--deep-navy);margin:3px 0}
.smart-next-copy p{font-size:11px;color:var(--text-secondary)}
.smart-next-copy>b{font-size:11px;color:var(--success)}
.smart-next-lesson .primary-btn{min-height:39px;padding:9px 13px;margin:0;border-radius:11px;font-size:11px}
.smart-alert-dashboard-card{order:4}
.smart-today-mini{order:5}
.dashboard-secondary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.dashboard-secondary-grid>.panel{margin:0;padding:17px;border-radius:18px;box-shadow:none}

/* Search / list primitives */
.students-list-panel{padding:16px;border-radius:18px;box-shadow:none}
.student-search-wrap{position:relative;max-width:520px}
.student-search-wrap .search-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);z-index:1;color:#78879A;font-size:20px;pointer-events:none}
.student-search-wrap input{height:48px;margin:0;padding-inline-start:44px;border-radius:14px;background:#FBFCFE;border-color:var(--border)}
.student-inline-meta{display:none}
.student-primary-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.row-more-menu{position:relative}
.row-more-trigger{width:38px;height:38px;border:1px solid var(--border);border-radius:11px;background:#fff;color:var(--deep-navy);display:grid;place-items:center;font-size:20px;font-weight:900;cursor:pointer;user-select:none;padding:0}
.row-more-popover{position:absolute;z-index:40;inset-inline-end:0;top:44px;min-width:170px;background:#fff;border:1px solid var(--border);border-radius:13px;padding:6px;box-shadow:0 14px 36px rgba(11,45,87,.12);display:grid;gap:3px}
.menu-action{border:0;background:transparent;text-align:start;color:var(--text-primary);font:inherit;font-size:12px;font-weight:700;padding:10px;border-radius:9px}
.menu-action:hover{background:#F4F7FB}.menu-action.warn{color:var(--warning)}.menu-action.success{color:var(--success)}.menu-action.danger{color:var(--danger)}

/* Groups master cards */
.groups-master-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.master-group-card{padding:17px;border-radius:18px;box-shadow:none;border:1px solid var(--border);background:#fff;overflow:visible}
.master-group-card::before{display:none}
.group-card-title-row{align-items:flex-start}
.group-card-title-row h3{font-size:16px;margin:0;color:var(--deep-navy)}
.group-card-title-row p{font-size:11px;margin:5px 0 0;color:var(--text-secondary)}
.group-id-chip{display:inline-flex;padding:2px 6px;border-radius:7px;background:#F3F6FA;color:#68788C;font-size:9px;font-weight:800;margin-inline-end:5px}
.group-summary-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:14px 0;border-block:1px solid #EDF1F5;padding-block:12px}
.group-summary-strip>div{padding-inline:9px;border-inline-end:1px solid #EDF1F5;min-width:0}.group-summary-strip>div:last-child{border-inline-end:0}
.group-summary-strip span{display:block;font-size:9px;color:var(--text-secondary)}
.group-summary-strip b{display:block;margin-top:4px;font-size:12px;color:var(--deep-navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.master-group-card .group-schedule-preview{margin-top:0;padding:0;border:0;background:transparent}
.master-group-card .group-schedule-preview>span{font-size:10px;color:var(--text-secondary);font-weight:750}
.master-group-card .group-schedule-chips{margin-top:8px;display:flex;flex-wrap:wrap;gap:5px}
.master-group-card .group-schedule-chips b,.master-group-card .group-schedule-chips em{padding:5px 7px;border-radius:8px;background:#F4F7FB;color:#53657A;font-size:9px;font-style:normal;font-weight:700}
.master-group-actions{display:flex;align-items:center;justify-content:space-between;margin-top:14px;gap:8px}
.master-group-actions .group-lesson-btn{width:auto;margin:0;min-height:40px;padding:9px 15px;border-radius:11px;font-size:11px}

/* Fixed five-destination teacher navigation. */
.teacher-mobile-nav,.mobile-more-sheet,.mobile-sheet-backdrop{display:none}

@media(max-width:900px){
  body[data-role="teacher"] .sidebar{display:none !important}
  body[data-role="teacher"] .app-body{display:block;min-height:calc(100vh - 64px)}
  body[data-role="teacher"] .teacher-mobile-nav{position:fixed;z-index:70;inset-inline:0;bottom:0;height:70px;padding:5px 8px calc(5px + env(safe-area-inset-bottom));background:rgba(255,255,255,.98);border-top:1px solid var(--border);box-shadow:0 -8px 26px rgba(11,45,87,.07);display:grid !important;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
  body[data-role="teacher"] .teacher-mobile-nav.hidden{display:none !important}
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item{display:flex !important;position:relative;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:100% !important;max-width:none !important;min-width:0 !important;height:57px !important;min-height:57px !important;max-height:57px !important;padding:5px 2px;border:0;border-radius:13px;background:transparent;color:#728095;font:inherit;font-size:9px;font-weight:750;white-space:nowrap}
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item.hidden{display:none !important}
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item.active{background:var(--soft-gold);color:var(--deep-navy);border:1px solid #F1DE9D}
  .mobile-nav-icon{font-size:19px;line-height:1;color:currentColor;font-weight:800}
  body[data-role="teacher"] .content{padding:18px 14px calc(94px + env(safe-area-inset-bottom)) !important}
  body[data-role="teacher"] .mobile-sheet-backdrop{position:fixed;display:block;z-index:80;inset:0;background:rgba(8,25,48,.34);backdrop-filter:blur(2px)}
  body[data-role="teacher"] .mobile-sheet-backdrop.hidden{display:none !important}
  body[data-role="teacher"] .mobile-more-sheet{display:block;position:fixed;z-index:90;inset-inline:8px;bottom:calc(8px + env(safe-area-inset-bottom));max-height:min(82vh,680px);overflow:auto;background:#fff;border:1px solid var(--border);border-radius:24px;padding:8px 14px 14px;box-shadow:0 22px 60px rgba(9,33,63,.22)}
  body[data-role="teacher"] .mobile-more-sheet.hidden{display:none !important}
  .mobile-sheet-handle{width:42px;height:4px;border-radius:99px;background:#D8E0E9;margin:2px auto 10px}
  .mobile-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:4px 2px 12px;border-bottom:1px solid #EEF2F6}
  .mobile-sheet-head>div{display:grid;gap:2px}.mobile-sheet-head strong{font-size:19px;color:var(--deep-navy)}.mobile-sheet-head span{font-size:10px;color:var(--text-secondary)}
  .sheet-close-btn{width:36px;height:36px;border:1px solid var(--border);border-radius:11px;background:#fff;color:#637388;font-size:23px}
  .mobile-more-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px 0}
  .mobile-more-grid .more-menu-item{display:grid !important;min-width:0 !important;width:100% !important;height:auto !important;max-width:none !important;min-height:72px !important;padding:12px !important;border:1px solid var(--border);border-radius:14px;background:#fff;text-align:start;color:var(--text-primary);white-space:normal}
  .mobile-more-grid .more-menu-item.hidden{display:none !important}
  .mobile-more-grid .more-menu-item.active{background:#F7FAFE;border-color:#C9D9EA;color:var(--deep-navy)}
  .mobile-more-grid .more-menu-item b{display:block;font-size:12px}.mobile-more-grid .more-menu-item span{display:block;font-size:9px;color:var(--text-secondary);margin-top:4px;line-height:1.5}
  .mobile-sheet-footer{display:flex;justify-content:space-between;gap:10px;padding:10px 2px;color:#8A96A7;font-size:9px;border-top:1px solid #EEF2F6}
  .mobile-logout-btn{width:100%;min-height:42px;border:1px solid #F0D5D8;border-radius:12px;background:#FFF5F5;color:var(--danger);font:inherit;font-size:11px;font-weight:800}
  body.mobile-sheet-open{overflow:hidden}

  .app-header{height:62px;padding:0 13px}
  .app-header-identity .brand-mark.small{width:36px;height:36px;flex-basis:36px;border-radius:11px;font-size:13px}
  .app-header-copy small{font-size:8.5px;max-width:150px}.app-header-copy strong{font-size:16px}.app-header-copy span{display:none}
  body[data-role="teacher"] .app-header .role-badge,body[data-role="teacher"] .app-header-logout{display:none}
  .section-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;margin-bottom:16px}
  .section-head h2{font-size:24px}.section-head p{font-size:11px;margin-top:5px;line-height:1.55}
  .section-head .primary-btn.inline-btn{width:auto;min-height:40px;margin:0;padding:9px 12px;border-radius:11px;font-size:10.5px}
  #homeSection>.section-head h2{font-size:25px}
  #homeSection>.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  #homeSection>.stats-grid .stat-card{min-height:68px;padding:10px 9px}
  #homeSection>.stats-grid .stat-card span{font-size:9px}#homeSection>.stats-grid .stat-card b{font-size:17px}
  .smart-dashboard-hero{align-items:flex-start}.smart-dashboard-hero h3{font-size:13px}.smart-dashboard-hero .secondary-btn{font-size:9.5px;padding:7px 9px;min-height:34px}
  .dashboard-quick-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.dashboard-quick-actions button{min-height:64px;border-radius:13px}.dashboard-quick-actions button span{font-size:18px}.dashboard-quick-actions button b{font-size:9px}
  .smart-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.smart-kpis>div{min-height:58px}.smart-kpis b{font-size:15px}
  .smart-next-lesson{grid-template-columns:40px minmax(0,1fr);gap:10px;padding:13px}.smart-next-icon{width:40px;height:40px}.smart-next-copy h4{font-size:15px}.smart-next-lesson>.primary-btn,.smart-next-lesson>.secondary-btn{grid-column:1/-1;width:100%}
  .dashboard-secondary-grid{grid-template-columns:1fr;gap:10px;margin-top:14px}.dashboard-secondary-grid>.panel{padding:14px}

  /* Student table becomes a concise app list. */
  #studentsSection>.students-list-panel{padding:0;border:0;background:transparent;box-shadow:none}
  #studentsSection .table-wrap{overflow:visible}
  .students-data-table{min-width:0 !important;display:block}.students-data-table thead{display:none}.students-data-table tbody{display:grid;gap:9px}
  .students-data-table tr.student-row-card{display:grid !important;grid-template-columns:minmax(0,1fr) auto;gap:0 10px;padding:14px !important;border:1px solid var(--border) !important;border-radius:17px !important;background:#fff;box-shadow:var(--shadow-card) !important;overflow:visible}
  .students-data-table tr.student-row-card td{display:none !important;border:0 !important;padding:0 !important;min-height:0 !important}
  .students-data-table tr.student-row-card td[data-label="الاسم"]{display:block !important;grid-column:1;grid-row:1;color:var(--deep-navy);font-size:15px;font-weight:850;line-height:1.45;text-align:start !important}
  .students-data-table tr.student-row-card td[data-label="الاسم"]::before{display:none}.student-inline-meta{display:block;margin-top:3px;font-size:9.5px;color:var(--text-secondary);font-weight:650}
  .students-data-table tr.student-row-card td[data-label="الحالة"]{display:flex !important;grid-column:2;grid-row:1;align-items:flex-start !important}.students-data-table tr.student-row-card td[data-label="الحالة"]::before{display:none}
  .students-data-table tr.student-row-card td[data-label="ولي الأمر"]{display:flex !important;grid-column:1/-1;grid-row:2;align-items:center !important;justify-content:flex-start !important;gap:7px !important;margin-top:11px;padding-top:10px !important;border-top:1px solid #EEF2F6 !important;font-size:11px;color:#4A5B70}.students-data-table tr.student-row-card td[data-label="ولي الأمر"]::before{content:"ولي الأمر";display:inline;color:#8A96A7;font-size:9px;font-weight:700;margin-inline-end:3px}
  .students-data-table tr.student-row-card td[data-label="الإجراءات"]{display:block !important;grid-column:1/-1;grid-row:3;margin-top:11px}.students-data-table tr.student-row-card td[data-label="الإجراءات"]::before{display:none}
  .student-primary-actions{display:flex;gap:7px;flex-wrap:nowrap}.student-primary-actions>.action-btn{flex:1;min-height:38px;border-radius:10px;font-size:9.5px;padding:7px}.student-primary-actions .row-more-menu{flex:0 0 auto}.student-primary-actions .row-more-trigger{width:38px;height:38px}
  .student-search-wrap{max-width:none;margin-bottom:10px}.student-search-wrap input{height:46px}

  .groups-master-grid{grid-template-columns:1fr;gap:10px}.master-group-card{padding:14px}.group-summary-strip{margin:12px 0;padding-block:10px}.master-group-actions{margin-top:12px}
}

@media(max-width:360px){
  body[data-role="teacher"] .content{padding-inline:11px !important}
  .app-header-copy small{max-width:110px}.app-header-copy strong{font-size:15px}
  .section-head{gap:7px}.section-head h2{font-size:22px}.section-head p{display:none}
  .section-head .primary-btn.inline-btn{padding:8px 9px;font-size:9.5px}
  .dashboard-quick-actions button b{font-size:8.4px}
  .mobile-more-grid{grid-template-columns:1fr 1fr;gap:6px}.mobile-more-grid .more-menu-item{min-height:68px !important;padding:10px !important}
}
.mobile-nav-icon svg{width:20px;height:20px;display:block}


/* ==========================================================
   V1.25.9 — UI STABILIZATION HOTFIX
   Root-cause fixes for mobile nav duplication, More sheet
   inherited heights, and dashboard mobile layout conflicts.
   No backend/data-model changes.
   ========================================================== */
@media(max-width:900px){
  /* The dedicated five-item nav already owns its SVGs. Old premium
     navigation enhancement must never create a second visual icon. */
  body[data-role="teacher"] .teacher-mobile-nav .nav-icon{
    display:none !important;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item{
    overflow:hidden !important;
    line-height:1.15;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-icon{
    width:22px;
    height:22px;
    display:grid;
    place-items:center;
    flex:0 0 22px;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-icon svg{
    width:22px;
    height:22px;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item>span:last-child{
    display:block;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  /* More sheet buttons are menu cards, not bottom-nav tabs. Reset every
     inherited nav dimension that previously forced 58px cards. */
  body[data-role="teacher"] .mobile-more-grid .more-menu-item{
    display:grid !important;
    grid-template-columns:30px minmax(0,1fr) !important;
    grid-template-rows:auto auto !important;
    column-gap:10px !important;
    row-gap:2px !important;
    align-items:center !important;
    align-content:center !important;
    justify-items:stretch !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:auto !important;
    min-height:88px !important;
    max-height:none !important;
    padding:12px 13px !important;
    margin:0 !important;
    overflow:hidden !important;
    text-align:start !important;
    white-space:normal !important;
    border-radius:15px !important;
  }
  body[data-role="teacher"] .mobile-more-grid .more-menu-item .nav-icon{
    display:grid !important;
    grid-column:1;
    grid-row:1 / 3;
    align-self:center;
    justify-self:center;
    width:24px !important;
    height:24px !important;
    color:#65778C;
    flex:0 0 24px !important;
  }
  body[data-role="teacher"] .mobile-more-grid .more-menu-item .nav-icon svg{
    width:24px !important;
    height:24px !important;
  }
  body[data-role="teacher"] .mobile-more-grid .more-menu-item>b{
    grid-column:2;
    grid-row:1;
    min-width:0;
    margin:0 !important;
    font-size:13px !important;
    line-height:1.35 !important;
    color:var(--deep-navy);
  }
  body[data-role="teacher"] .mobile-more-grid .more-menu-item>span:not(.nav-icon){
    grid-column:2;
    grid-row:2;
    min-width:0;
    margin:2px 0 0 !important;
    font-size:10px !important;
    line-height:1.45 !important;
    color:var(--text-secondary);
    overflow-wrap:anywhere;
  }
  body[data-role="teacher"] .mobile-more-grid .more-menu-item.active .nav-icon{
    color:#A7770C;
  }

  /* Dashboard header: defeat the older compact-button rule whose higher
     specificity forced a full-width button and squeezed the date copy. */
  #homeSection .smart-dashboard-hero{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:10px !important;
    width:100%;
    min-width:0;
  }
  #homeSection .smart-dashboard-hero>div{
    min-width:0;
  }
  #homeSection .smart-dashboard-hero h3{
    font-size:15px !important;
    line-height:1.55 !important;
    margin:0 !important;
    overflow-wrap:anywhere;
  }
  #homeSection .smart-dashboard-hero p{
    font-size:11px !important;
    line-height:1.5 !important;
    margin-top:3px !important;
  }
  #homeSection .smart-dashboard-hero .secondary-btn.compact{
    width:auto !important;
    min-width:94px !important;
    max-width:130px !important;
    min-height:36px !important;
    margin:0 !important;
    padding:8px 11px !important;
    white-space:nowrap;
  }

  /* Next lesson: use an explicit single-column mobile card. The older
     three-column desktop grid caused the copy to collapse on RTL phones. */
  #homeSection .smart-next-lesson,
  #homeSection .smart-next-lesson.no-schedule{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:10px !important;
    min-width:0 !important;
    padding:15px !important;
  }
  #homeSection .smart-next-icon{
    display:none !important;
  }
  #homeSection .smart-next-copy{
    width:100% !important;
    min-width:0 !important;
    text-align:start !important;
  }
  #homeSection .smart-next-copy span{
    display:block;
    margin-bottom:4px;
  }
  #homeSection .smart-next-copy h4{
    margin:0 0 5px !important;
    font-size:18px !important;
    line-height:1.45 !important;
    overflow-wrap:anywhere;
  }
  #homeSection .smart-next-copy p{
    margin:0 0 5px !important;
    font-size:11.5px !important;
    line-height:1.65 !important;
    overflow-wrap:anywhere;
  }
  #homeSection .smart-next-copy>b{
    display:block;
    margin-top:2px;
    font-size:11px !important;
  }
  #homeSection .smart-next-lesson>.primary-btn,
  #homeSection .smart-next-lesson>.secondary-btn{
    width:100% !important;
    min-height:42px !important;
    margin:0 !important;
  }

  /* Student action row refinement from the live phone screenshots. */
  #studentsSection .student-primary-actions{
    align-items:stretch;
  }
  #studentsSection .student-primary-actions>.action-btn{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  #studentsSection .students-data-table tr.student-row-card td[data-label="ولي الأمر"]{
    min-width:0;
    overflow-wrap:anywhere;
  }
}

@media(max-width:360px){
  body[data-role="teacher"] .mobile-more-grid{
    grid-template-columns:1fr !important;
  }
  body[data-role="teacher"] .mobile-more-grid .more-menu-item{
    min-height:72px !important;
  }
  #homeSection .smart-dashboard-hero{
    grid-template-columns:1fr !important;
  }
  #homeSection .smart-dashboard-hero .secondary-btn.compact{
    width:100% !important;
    max-width:none !important;
  }
}

/* ==========================================================
   V1.25.10 — STUDENT ACTION MENU STACKING HOTFIX
   Keep an opened student overflow menu above following cards.
   ========================================================== */
@media(max-width:900px){
  .students-data-table tr.student-row-card{
    position:relative;
    z-index:1;
    isolation:isolate;
  }
  .students-data-table tr.student-row-card:has(.row-more-trigger[aria-expanded="true"]){
    z-index:120;
  }
  .student-primary-actions .row-more-menu{
    position:relative;
    z-index:2;
  }
  .student-primary-actions .row-more-menu:has(.row-more-trigger[aria-expanded="true"]){
    z-index:130;
  }
  .student-primary-actions .row-more-popover{
    z-index:140;
    inset-inline-end:0;
    inset-inline-start:auto;
    top:calc(100% + 6px);
    max-width:min(210px,calc(100vw - 48px));
  }
}


/* ==========================================================
   V1.25.11 — VIEWPORT-AWARE STUDENT ACTION MENU
   The same rule works for every student, regardless of row order.
   ========================================================== */
@media(max-width:900px){
  .students-data-table .row-more-menu.open-up .row-more-popover{
    top:auto !important;
    bottom:calc(100% + 6px) !important;
  }
}

/* ==========================================================
   V1.25.12 — STAGE 2 MASTER UI
   Groups + Schedule + Lesson Registration
   Visual-only evolution; no data model changes.
   ========================================================== */

/* Stage 2 shared primitives */
#groupsSection .section-head,
#scheduleSection .section-head,
#lessonSection .section-head{margin-bottom:18px}
#groupsSection .section-head h2,
#scheduleSection .section-head h2,
#lessonSection .section-head h2{letter-spacing:-.2px}
#groupsSection .section-head p,
#scheduleSection .section-head p,
#lessonSection .section-head p{max-width:620px}

/* Groups */
#groupsSection .groups-master-grid{gap:12px}
#groupsSection .master-group-card{position:relative;border-color:#E0E7EF;padding:18px;background:#fff}
#groupsSection .master-group-card:hover{box-shadow:0 8px 24px rgba(11,45,87,.05)}
#groupsSection .group-card-title-row{display:flex;justify-content:space-between;gap:12px}
#groupsSection .group-card-title-row h3{font-size:17px;line-height:1.5}
#groupsSection .group-card-title-row .status{flex:none}
#groupsSection .group-summary-strip{background:#F8FAFD;border:1px solid #EDF1F5;border-radius:14px;padding:10px 0;margin:14px 0}
#groupsSection .group-summary-strip>div{border-inline-end:1px solid #E8EDF3;padding-inline:11px}
#groupsSection .group-summary-strip span{font-size:10px}
#groupsSection .group-summary-strip b{font-size:13px;margin-top:5px}
#groupsSection .group-schedule-preview{min-height:48px}
#groupsSection .group-schedule-chips b{background:#F1F5F9!important;color:#42566F!important}
#groupsSection .master-group-actions{border-top:1px solid #EEF2F6;padding-top:12px}
#groupsSection .master-group-actions .group-lesson-btn{min-width:132px}

/* Schedule mobile browser */
.mobile-schedule-browser{display:none}
.schedule-day-selector{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:2px 1px 8px;scroll-snap-type:x proximity}
.schedule-day-selector::-webkit-scrollbar{display:none}
.schedule-day-chip{flex:0 0 64px;min-height:68px;border:1px solid #E0E6EE;border-radius:16px;background:#fff;color:#68788C;font:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;scroll-snap-align:start}
.schedule-day-chip span{font-size:10px;font-weight:750}
.schedule-day-chip b{font-size:17px;color:var(--deep-navy)}
.schedule-day-chip.active{background:var(--soft-gold,#FFF6D8);border-color:#E8CE75;color:#946C0B;box-shadow:0 3px 10px rgba(139,102,9,.05)}
.schedule-day-chip.active b{color:#9A7112}
.schedule-mobile-timeline{margin-top:9px}
.schedule-mobile-date{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 2px 11px}
.schedule-mobile-date b{font-size:17px;color:var(--deep-navy)}
.schedule-mobile-date span{font-size:11px;color:var(--text-secondary)}
.schedule-timeline-list{position:relative;display:grid;gap:10px;padding-inline-start:14px}
.schedule-timeline-list::before{content:"";position:absolute;inset-inline-start:3px;top:16px;bottom:16px;width:1px;background:#DCE4ED}
.schedule-timeline-list .schedule-session-card{position:relative}
.schedule-timeline-list .schedule-session-card::before{content:"";position:absolute;inset-inline-start:-15px;top:24px;width:8px;height:8px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 4px #FFF8E4}
#scheduleSection .schedule-summary-grid .stat-card{box-shadow:none}

/* Lesson flow */
.lesson-stepper{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:-2px 0 16px}
.lesson-step{position:relative;display:flex;align-items:center;gap:8px;min-width:0;color:#8490A0}
.lesson-step:not(:last-child)::after{content:"";position:absolute;top:14px;inset-inline-start:calc(100% - 4px);width:calc(100% + 8px);height:1px;background:#DEE5ED;z-index:0}
.lesson-step span{position:relative;z-index:1;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#F2F5F8;border:1px solid #DEE5ED;font-size:11px;font-weight:850;flex:none}
.lesson-step b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lesson-step.active{color:var(--deep-navy)}
.lesson-step.active span{background:var(--soft-gold,#FFF6D8);border-color:#E5CA70;color:#9A7112}
#lessonSection .lesson-setup-panel{padding:18px;border-radius:20px;box-shadow:none}
#lessonSection .lesson-setup-grid label{font-size:11px;font-weight:750;color:#617187}
#lessonSection .lesson-setup-grid input,#lessonSection .lesson-setup-grid select{margin-top:7px;background:#FBFCFE}
#lessonSection .lesson-toolbar{border-top:1px solid #EEF2F6;padding-top:14px}
#lessonSection .lesson-continue-btn{margin:0;min-width:150px}
.lesson-roster-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 2px 12px}
.lesson-roster-head h3{margin:0;color:var(--deep-navy);font-size:19px}
.lesson-roster-head p{margin:3px 0 0;font-size:11px}
.lesson-roster-head>span{flex:none;padding:7px 10px;border-radius:999px;background:#F2F6FA;color:#617187;font-size:11px}
.lesson-default-note{background:#FFF9E9;border-color:#EBD995;color:#765716;box-shadow:none}
#lessonSection .lesson-student-card{box-shadow:none;border-color:#E1E7EE;padding:15px}
#lessonSection .lesson-fields-grid label{font-size:10px;font-weight:750}
#lessonSection .lesson-field{background:#FBFCFE;border-radius:11px!important}
#lessonSection .lesson-save-bar{border-radius:17px;box-shadow:0 12px 28px rgba(11,45,87,.09)}

@media(max-width:900px){
  #groupsSection .groups-master-grid{grid-template-columns:1fr}
  #groupsSection .master-group-card{padding:15px;border-radius:18px}
  #groupsSection .master-group-actions{align-items:center}
  #groupsSection .master-group-actions .group-lesson-btn{flex:1;min-width:0;min-height:42px}

  #scheduleSection .schedule-page-head{align-items:center;flex-wrap:nowrap}
  #scheduleSection .schedule-page-head .icon-action-btn{flex:none}
  #scheduleSection .schedule-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:14px}
  #scheduleSection .schedule-summary-grid .stat-card:nth-child(4){display:none}
  #scheduleSection .mobile-schedule-browser{display:block;margin-bottom:18px}
  #scheduleSection .schedule-today-panel,#scheduleSection .panel:has(#weeklyScheduleGrid){display:none}
  #scheduleSection .schedule-session-card,#scheduleSection .schedule-session-card.compact{grid-template-columns:72px minmax(0,1fr);gap:10px;padding:13px;border-radius:16px}
  #scheduleSection .schedule-session-time{align-self:start;padding-top:2px}
  #scheduleSection .schedule-session-time b{font-size:13px}
  #scheduleSection .schedule-session-time span{font-size:9px}
  #scheduleSection .schedule-session-title{gap:6px}
  #scheduleSection .schedule-session-title h4{font-size:15px;line-height:1.45}
  #scheduleSection .schedule-session-status{font-size:8px}
  #scheduleSection .schedule-session-main p{font-size:10px}
  #scheduleSection .schedule-lesson-btn{grid-column:2;width:max-content;min-width:104px;margin-top:3px;padding:8px 11px}

  #lessonSection .lesson-stepper{gap:4px;margin-bottom:14px}
  #lessonSection .lesson-step{flex-direction:column;justify-content:flex-start;text-align:center;gap:5px}
  #lessonSection .lesson-step:not(:last-child)::after{top:14px;inset-inline-start:calc(50% + 15px);width:calc(100% - 30px)}
  #lessonSection .lesson-step b{font-size:9px;max-width:100%}
  #lessonSection .lesson-setup-panel{padding:15px}
  #lessonSection .lesson-setup-grid{grid-template-columns:1fr 1fr;gap:10px}
  #lessonSection .lesson-title-field{grid-column:1/-1}
  #lessonSection .lesson-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:10px}
  #lessonSection .lesson-id-preview{order:2;text-align:center;direction:rtl;font-size:9px;opacity:.72}
  #lessonSection .lesson-continue-btn{order:1;width:100%;min-height:43px}
  #lessonSection .lesson-roster-head{margin-top:18px}
  #lessonSection .lesson-roster-head h3{font-size:17px}
  #lessonSection .lesson-fields-grid{grid-template-columns:1fr 1fr;gap:9px}
  #lessonSection .lesson-student-head{align-items:flex-start}
  #lessonSection .lesson-save-bar{align-items:center;gap:8px;padding:10px 11px}
  #lessonSection .lesson-save-bar .primary-btn{flex:1;margin:0;min-height:42px}
}

@media(max-width:370px){
  #lessonSection .lesson-setup-grid{grid-template-columns:1fr}
  #lessonSection .lesson-title-field{grid-column:auto}
  #lessonSection .lesson-fields-grid{grid-template-columns:1fr}
  .schedule-day-chip{flex-basis:58px}
}


/* ==========================================================
   V1.25.14 — SHARED UI STABILIZATION
   One global overflow-menu layer + reliable 3-column schedule KPIs.
   ========================================================== */
.row-more-popover.row-more-portal{
  position:fixed !important;
  z-index:10000 !important;
  inset:auto !important;
  min-width:170px;
  max-width:min(220px,calc(100vw - 24px));
  margin:0 !important;
  visibility:visible !important;
}
@media(max-width:900px){
  #scheduleSection .schedule-summary-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:8px !important;
    margin-bottom:12px !important;
    align-items:stretch !important;
  }
  #scheduleSection .schedule-summary-grid .stat-card{
    display:flex !important;
    min-width:0 !important;
    min-height:78px !important;
    height:100% !important;
    padding:11px 8px !important;
    border-radius:16px !important;
  }
  #scheduleSection .schedule-summary-grid .stat-card span{
    font-size:9px !important;
    line-height:1.35 !important;
  }
  #scheduleSection .schedule-summary-grid .stat-card b{
    font-size:20px !important;
    margin-top:5px !important;
    line-height:1.15 !important;
  }
  #scheduleSection .schedule-summary-grid .stat-card:nth-child(4){display:none !important}
  #scheduleSection .schedule-day-selector{direction:rtl}
}
@media(max-width:340px){
  #scheduleSection .schedule-summary-grid{gap:6px !important}
  #scheduleSection .schedule-summary-grid .stat-card{padding:10px 6px !important}
  #scheduleSection .schedule-summary-grid .stat-card span{font-size:8px !important}
  #scheduleSection .schedule-summary-grid .stat-card b{font-size:18px !important}
}

/* ==========================================================
   V1.25.19 — REFERENCE-LOCKED CHROME PASS
   Baseline: V1.25.15. Scope is deliberately limited to:
   1) Login  2) Teacher app header  3) Teacher bottom navigation
   No page/body component redesign and no business-logic changes.
   ========================================================== */
:root{
  --tei-deep-navy:#0B2D57;
  --tei-brand-navy:#123F78;
  --tei-primary-blue:#17569A;
  --tei-gold:#F2B824;
  --tei-soft-gold:#FFF6D8;
  --tei-app-bg:#F5F7FB;
  --tei-surface:#FFFFFF;
  --tei-text:#17253A;
  --tei-muted:#66758A;
  --tei-border:#DFE6EF;
}

/* Login: full-screen branded surface, no oversized floating white card. */
@media(max-width:900px){
  #loginView.login-shell:not(.hidden){
    display:flex !important;
    min-height:100svh !important;
    width:100% !important;
    padding:clamp(42px,7vh,72px) 24px 42px !important;
    align-items:center !important;
    justify-content:center !important;
    background:
      radial-gradient(circle at 75% 8%,rgba(242,184,36,.14),transparent 28%),
      linear-gradient(165deg,#123F78 0%,#0B2D57 58%,#071F3E 100%) !important;
  }
  #loginView .login-brand{display:none !important}
  #loginView .login-card{
    width:min(100%,420px) !important;
    max-width:420px !important;
    margin:0 auto !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    color:#fff !important;
  }
  #loginView .mini-logo{
    width:82px !important;
    height:82px !important;
    margin:0 auto 20px !important;
    border:1.5px solid rgba(242,184,36,.78) !important;
    border-radius:25px !important;
    background:rgba(255,255,255,.035) !important;
    color:var(--tei-gold) !important;
    box-shadow:none !important;
    font-size:25px !important;
    letter-spacing:.5px;
  }
  #loginView .login-card h2{
    margin:0 0 8px !important;
    color:#fff !important;
    font-family:"Cairo","Noto Kufi Arabic",Tahoma,Arial,sans-serif;
    font-size:28px !important;
    font-weight:800 !important;
    line-height:1.35 !important;
  }
  #loginView #loginIntro{
    margin:0 auto 24px !important;
    max-width:330px !important;
    color:rgba(255,255,255,.76) !important;
    font-size:13px !important;
    line-height:1.9 !important;
  }
  #loginView label{
    margin-top:15px !important;
    color:#fff !important;
    font-size:12px !important;
    font-weight:750 !important;
  }
  #loginView input{
    height:50px !important;
    min-height:50px !important;
    margin-top:7px !important;
    padding:12px 14px !important;
    border:1px solid rgba(255,255,255,.18) !important;
    border-radius:12px !important;
    background:#fff !important;
    color:var(--tei-text) !important;
    box-shadow:none !important;
    font-size:16px !important;
  }
  #loginView input:focus{
    border-color:var(--tei-gold) !important;
    box-shadow:0 0 0 3px rgba(242,184,36,.16) !important;
  }
  #loginView input::placeholder{color:#98A4B4 !important;opacity:1}
  #loginView .password-wrap .icon-btn{color:#66758A !important}
  #loginView #loginBtn{
    height:50px !important;
    margin-top:20px !important;
    border:0 !important;
    border-radius:12px !important;
    background:var(--tei-gold) !important;
    color:var(--tei-deep-navy) !important;
    box-shadow:none !important;
    font-size:14px !important;
    font-weight:900 !important;
  }
  #loginView #installBtn{
    min-height:44px !important;
    border:1px solid rgba(255,255,255,.25) !important;
    border-radius:12px !important;
    background:transparent !important;
    color:#fff !important;
  }
  #loginView .forgot-password-entry,
  #loginView .teacher-signup-entry{
    min-height:auto !important;
    margin:16px 0 0 !important;
    padding:4px 8px !important;
    border:0 !important;
    background:transparent !important;
    color:#fff !important;
    font-size:12px !important;
    font-weight:800 !important;
    text-decoration:none !important;
  }
  #loginView .teacher-signup-entry{
    width:100% !important;
    margin-top:18px !important;
    padding:12px !important;
    border:1px solid rgba(255,255,255,.20) !important;
    border-radius:12px !important;
  }
  #loginView #loginNote{display:none !important}
  body:has(#loginView:not(.hidden)) .teacher-mobile-nav,
  body:has(#loginView:not(.hidden)) .mobile-more-sheet,
  body:has(#loginView:not(.hidden)) .mobile-sheet-backdrop{display:none !important}
}

/* Teacher app header: compact navy app bar matching the approved reference. */
@media(max-width:900px){
  body[data-role="teacher"] .app-header{
    position:sticky !important;
    top:0 !important;
    z-index:60 !important;
    height:58px !important;
    min-height:58px !important;
    padding:0 14px !important;
    border:0 !important;
    border-bottom:1px solid rgba(255,255,255,.09) !important;
    background:linear-gradient(90deg,var(--tei-deep-navy),var(--tei-brand-navy)) !important;
    box-shadow:none !important;
    color:#fff !important;
  }
  body[data-role="teacher"] .app-header-identity{
    width:100% !important;
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    gap:0 !important;
    direction:rtl !important;
    text-align:center !important;
  }
  body[data-role="teacher"] .app-header-identity .brand-mark,
  body[data-role="teacher"] .app-header-copy small,
  body[data-role="teacher"] .app-header-copy span{display:none !important}
  body[data-role="teacher"] .app-header-copy{
    display:block !important;
    min-width:0 !important;
    text-align:center !important;
  }
  body[data-role="teacher"] #headerScreenTitle{
    color:#fff !important;
    font-family:"Cairo","Noto Kufi Arabic",Tahoma,Arial,sans-serif;
    font-size:17px !important;
    font-weight:800 !important;
    line-height:1 !important;
  }
  body[data-role="teacher"] .app-header .header-actions{display:none !important}
  body[data-role="teacher"] .app-body{min-height:calc(100svh - 58px) !important}
  body[data-role="teacher"] .sidebar{display:none !important}
}

/* Teacher bottom navigation: five fixed destinations, dark navy, gold active. */
@media(max-width:900px){
  body[data-role="teacher"] .teacher-mobile-nav:not(.hidden){
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:0 !important;
    position:fixed !important;
    inset-inline:0 !important;
    bottom:0 !important;
    z-index:80 !important;
    height:calc(64px + env(safe-area-inset-bottom)) !important;
    padding:4px 8px calc(4px + env(safe-area-inset-bottom)) !important;
    border:0 !important;
    border-top:1px solid rgba(255,255,255,.09) !important;
    background:linear-gradient(90deg,#0B2D57,#123F78) !important;
    box-shadow:0 -8px 26px rgba(11,45,87,.14) !important;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item{
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    height:56px !important;
    min-height:56px !important;
    max-height:56px !important;
    margin:0 !important;
    padding:5px 2px !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:3px !important;
    border:0 !important;
    border-radius:11px !important;
    background:transparent !important;
    color:rgba(255,255,255,.72) !important;
    box-shadow:none !important;
    font-size:9px !important;
    font-weight:750 !important;
    line-height:1.1 !important;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-icon{
    width:22px !important;
    height:22px !important;
    display:grid !important;
    place-items:center !important;
    color:currentColor !important;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-icon svg{
    width:22px !important;
    height:22px !important;
    display:block !important;
  }
  body[data-role="teacher"] .teacher-mobile-nav .nav-icon{display:none !important}
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item.active,
  body[data-role="teacher"] .teacher-mobile-nav .mobile-more-trigger.active{
    border:0 !important;
    background:rgba(255,255,255,.08) !important;
    color:var(--tei-gold) !important;
  }
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item.active::before,
  body[data-role="teacher"] .teacher-mobile-nav .mobile-more-trigger.active::before{
    content:"";
    position:absolute;
    top:1px;
    width:22px;
    height:2px;
    border-radius:99px;
    background:var(--tei-gold);
  }
  body[data-role="teacher"] .content{
    padding-bottom:calc(82px + env(safe-area-inset-bottom)) !important;
  }

  /* Keep More usable and visually tied to the same chrome. */
  body[data-role="teacher"] .mobile-sheet-backdrop:not(.hidden){z-index:89 !important}
  body[data-role="teacher"] .mobile-more-sheet:not(.hidden){
    z-index:90 !important;
    border-radius:22px 22px 0 0 !important;
    border-color:var(--tei-border) !important;
    box-shadow:0 -14px 44px rgba(11,45,87,.20) !important;
  }
}

@media(max-width:360px){
  #loginView.login-shell:not(.hidden){padding-inline:18px !important}
  #loginView .mini-logo{width:72px !important;height:72px !important;border-radius:22px !important}
  #loginView .login-card h2{font-size:25px !important}
  body[data-role="teacher"] #headerScreenTitle{font-size:16px !important}
  body[data-role="teacher"] .teacher-mobile-nav{padding-inline:4px !important}
  body[data-role="teacher"] .teacher-mobile-nav .mobile-nav-item{font-size:8.5px !important}
}

/* ==========================================================
   V1.34.1 — PARENT PORTAL IDENTITY HARMONIZATION
   IMPORTANT: every rule in this block is scoped to parent role.
   Teacher and Super Admin UI are intentionally untouched.
   ========================================================== */
body[data-role="parent"]{
  --parent-navy:#0B2D57;
  --parent-blue:#123F78;
  --parent-gold:#F2B824;
  --parent-soft-gold:#FFF6D8;
  --parent-bg:#F5F7FB;
  --parent-surface:#FFFFFF;
  --parent-ink:#17253A;
  --parent-muted:#66758A;
  --parent-border:#DFE6EF;
  background:radial-gradient(circle at 92% 0,rgba(18,63,120,.055),transparent 24rem),var(--parent-bg);
  color:var(--parent-ink);
}
body[data-role="parent"] .app-header{
  background:linear-gradient(100deg,var(--parent-blue),var(--parent-navy));
  border-bottom:0;
  box-shadow:0 7px 22px rgba(11,45,87,.10);
}
body[data-role="parent"] .app-header-copy small,
body[data-role="parent"] .app-header-copy strong,
body[data-role="parent"] .app-header-copy span{color:#fff}
body[data-role="parent"] .app-header-copy small,
body[data-role="parent"] .app-header-copy span{opacity:.76}
body[data-role="parent"] .app-header .role-badge{
  background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.16)
}
body[data-role="parent"] .app-header .ghost-btn{
  background:rgba(255,255,255,.10);color:#fff;border-color:rgba(255,255,255,.18)
}
body[data-role="parent"] .sidebar{
  background:linear-gradient(180deg,var(--parent-blue),#061C3A);
  border-left:1px solid rgba(255,255,255,.05)
}
body[data-role="parent"] .nav-item{color:#DDE8F7}
body[data-role="parent"] .nav-item.active,
body[data-role="parent"] .nav-item:hover{
  background:var(--parent-soft-gold);color:var(--parent-navy);border-color:#F0D98C
}
body[data-role="parent"] .nav-item.active .nav-icon{color:#A7770C}
body[data-role="parent"] .content{max-width:1120px;width:100%;margin-inline:auto}
body[data-role="parent"] .section-head{margin-bottom:16px;align-items:flex-end}
body[data-role="parent"] .section-head h2{
  margin:2px 0 0;color:var(--parent-ink);font-size:26px;line-height:1.35;font-weight:850
}
body[data-role="parent"] .page-kicker{
  display:inline-flex;align-items:center;gap:7px;color:#A7770C;font-size:10px;font-weight:850;letter-spacing:.02em
}
body[data-role="parent"] .page-kicker::before{
  content:"";width:7px;height:7px;border-radius:50%;background:var(--parent-gold);box-shadow:0 0 0 3px rgba(242,184,36,.14)
}
body[data-role="parent"] .muted{color:var(--parent-muted)}
body[data-role="parent"] .stat-card,
body[data-role="parent"] .panel,
body[data-role="parent"] .student-card,
body[data-role="parent"] .parent-exam-card,
body[data-role="parent"] .parent-lesson-card{
  background:var(--parent-surface);border-color:var(--parent-border);box-shadow:0 5px 18px rgba(11,45,87,.045)
}
body[data-role="parent"] .stat-card{border-radius:18px;position:relative;overflow:hidden}
body[data-role="parent"] .stat-card::after{
  content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:3px;background:var(--parent-gold);opacity:.9
}
body[data-role="parent"] .stat-card span{color:var(--parent-muted);font-weight:700}
body[data-role="parent"] .stat-card b{color:var(--parent-navy);font-weight:900}
body[data-role="parent"] .panel{border-radius:20px}
body[data-role="parent"] .panel h3,
body[data-role="parent"] .parent-lessons-head h3{color:var(--parent-ink);font-weight:850}
body[data-role="parent"] .tenant-parent-banner{
  border-radius:22px;padding:18px;
  background:radial-gradient(circle at 12% 10%,rgba(242,184,36,.18),transparent 9rem),linear-gradient(135deg,var(--parent-blue),#061C3A);
  box-shadow:0 12px 30px rgba(11,45,87,.12)
}
body[data-role="parent"] .tenant-parent-banner .tenant-avatar{
  background:linear-gradient(145deg,var(--parent-gold),#FFD66A);color:var(--parent-navy);border-radius:16px
}
body[data-role="parent"] .student-card{border-radius:20px;padding:18px}
body[data-role="parent"] .student-card h3{color:var(--parent-ink);font-size:21px}
body[data-role="parent"] .student-meta span{
  background:#F4F7FB;border-color:var(--parent-border);border-radius:999px;color:#4A5B70;font-size:11px;font-weight:750
}
body[data-role="parent"] .parent-summary-grid{gap:10px}
body[data-role="parent"] .parent-summary-grid>div:not(.empty),
body[data-role="parent"] .parent-lesson-grid>div{
  background:#F8FAFD;border-color:var(--parent-border);border-radius:14px
}
body[data-role="parent"] .parent-summary-grid span,
body[data-role="parent"] .parent-lesson-grid span{color:var(--parent-muted);font-weight:700}
body[data-role="parent"] .parent-summary-grid b{color:var(--parent-navy);font-weight:900}
body[data-role="parent"] .parent-lesson-card{
  border-radius:18px;border-right-width:4px;padding:15px 16px
}
body[data-role="parent"] .parent-lesson-card:not(.absent){border-right-color:#16805D}
body[data-role="parent"] .parent-lesson-card.absent{border-right-color:#C64752}
body[data-role="parent"] .attendance-pill.present{background:#EAF8F2;color:#16805D}
body[data-role="parent"] .attendance-pill.absent{background:#FFF1F3;color:#C64752}
body[data-role="parent"] .parent-exam-card{border-radius:20px}
body[data-role="parent"] .parent-exam-card.has-score{border-top:3px solid var(--parent-gold)}
body[data-role="parent"] .exam-percent{
  background:linear-gradient(145deg,var(--parent-blue),var(--parent-navy));border-radius:16px;box-shadow:0 8px 20px rgba(11,45,87,.12)
}
body[data-role="parent"] .parent-exam-score,
body[data-role="parent"] .parent-finance-summary>div{
  background:#F8FAFD;border-color:var(--parent-border);border-radius:14px
}
body[data-role="parent"] .parent-finance-summary b{color:var(--parent-navy)}
body[data-role="parent"] .parent-payment-item{
  background:#fff;border-color:var(--parent-border);border-radius:14px
}
body[data-role="parent"] .primary-btn{
  background:linear-gradient(135deg,var(--parent-blue),var(--parent-navy));border-radius:13px;box-shadow:none
}
body[data-role="parent"] .secondary-btn{
  background:#F3F7FC;color:var(--parent-navy);border-color:#D7E1ED;border-radius:13px
}
body[data-role="parent"] input,
body[data-role="parent"] select,
body[data-role="parent"] textarea{
  border-color:var(--parent-border);border-radius:13px;background:#fff
}
body[data-role="parent"] input:focus,
body[data-role="parent"] select:focus,
body[data-role="parent"] textarea:focus{
  border-color:var(--parent-blue);box-shadow:0 0 0 3px rgba(18,63,120,.08)
}
body[data-role="parent"] .empty{
  background:#FBFCFE;border-color:#D7E0EA;color:var(--parent-muted);border-radius:16px
}
body[data-role="parent"] .teacher-note-box{
  background:#FFF9E9;border-color:#EBD598;color:#6E5315;border-radius:14px
}
body[data-role="parent"] .parent-month-label input{background:#fff;border-color:var(--parent-border)}
body[data-role="parent"] #homePanels{gap:12px}
body[data-role="parent"] #homePanels>.panel{margin:0}

@media(max-width:900px){
  body[data-role="parent"] .app-header{height:58px;min-height:58px;padding:0 14px}
  body[data-role="parent"] .app-header-identity .brand-mark{width:36px;height:36px;border-radius:11px}
  body[data-role="parent"] #headerScreenTitle{font-size:16px;color:#fff}
  body[data-role="parent"] .header-actions .role-badge{display:none}
  body[data-role="parent"] .app-header-logout{min-height:34px;padding:7px 10px;font-size:10px}
  body[data-role="parent"] .app-body{min-height:calc(100svh - 58px)}
  body[data-role="parent"] .sidebar{
    position:fixed!important;z-index:70;top:auto!important;inset-inline:0;bottom:0;
    width:100%;height:70px!important;min-height:70px!important;
    padding:5px max(12px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
    display:flex;justify-content:center;gap:8px;overflow:hidden;
    background:rgba(255,255,255,.985);border:0;border-top:1px solid var(--parent-border);box-shadow:0 -8px 26px rgba(11,45,87,.07)
  }
  body[data-role="parent"] .sidebar .nav-item{
    flex:0 1 120px!important;width:min(120px,42vw)!important;height:57px!important;min-height:57px!important;max-height:57px!important;
    color:#728095;background:transparent;border:1px solid transparent;border-radius:13px;font-size:9px;font-weight:800
  }
  body[data-role="parent"] .sidebar .nav-item.active{
    background:var(--parent-soft-gold);color:var(--parent-navy);border-color:#F1DE9D
  }
  body[data-role="parent"] .sidebar .nav-icon{width:21px;height:21px;color:currentColor}
  body[data-role="parent"] .content{padding:18px 14px calc(92px + env(safe-area-inset-bottom))}
  body[data-role="parent"] .section-head{align-items:flex-start;margin-bottom:14px}
  body[data-role="parent"] .section-head h2{font-size:23px}
  body[data-role="parent"] .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  body[data-role="parent"] .stat-card{min-height:88px;padding:13px 14px}
  body[data-role="parent"] .stat-card b{font-size:21px}
  body[data-role="parent"] .panel-grid{grid-template-columns:1fr;gap:11px;margin-top:12px}
  body[data-role="parent"] .panel{padding:15px;border-radius:18px}
  body[data-role="parent"] .parent-head-actions{width:100%;display:grid;grid-template-columns:1fr auto;align-items:end;gap:8px}
  body[data-role="parent"] .parent-head-actions .parent-month-label{width:100%;margin:0;display:block}
  body[data-role="parent"] .parent-head-actions .parent-month-label input{width:100%;min-width:0;margin-top:6px}
  body[data-role="parent"] .parent-head-actions .secondary-btn{width:auto;min-height:41px;margin:0;white-space:nowrap}
}
@media(max-width:520px){
  body[data-role="parent"] .content{padding-inline:11px}
  body[data-role="parent"] .app-header-copy small,
  body[data-role="parent"] .app-header-copy span{display:none}
  body[data-role="parent"] .app-header-identity .brand-mark{display:none}
  body[data-role="parent"] .parent-head-actions{grid-template-columns:1fr}
  body[data-role="parent"] .parent-head-actions .secondary-btn{width:100%}
  body[data-role="parent"] .parent-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-role="parent"] .parent-finance-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  body[data-role="parent"] .parent-finance-summary>div{padding:9px 6px}
  body[data-role="parent"] .parent-finance-summary span{font-size:8.5px}
  body[data-role="parent"] .parent-finance-summary b{font-size:14px}
}

/* ==========================================================
   V1.34.2 — PARENT PORTAL VISUAL PARITY WITH TEACHER UI
   Parent-only overrides. No teacher/admin/backend changes.
   ========================================================== */
@media(max-width:900px){
  /* Same compact app chrome used by the teacher portal. */
  body[data-role="parent"] .app-header{
    position:sticky!important;top:0!important;z-index:60!important;
    height:58px!important;min-height:58px!important;padding:0 14px!important;
    border:0!important;border-bottom:1px solid rgba(255,255,255,.09)!important;
    background:linear-gradient(90deg,#0B2D57,#123F78)!important;
    box-shadow:none!important;color:#fff!important;
  }
  body[data-role="parent"] .mobile-platform-mark{
    position:absolute!important;inset-inline-start:14px!important;top:50%!important;z-index:3!important;
    display:block!important;width:32px!important;height:32px!important;padding:0!important;overflow:hidden!important;
    border:1px solid rgba(255,214,107,.38)!important;border-radius:10px!important;background:#0E3A6E!important;
    box-shadow:0 2px 7px rgba(0,20,45,.12)!important;transform:translateY(-50%)!important;
  }
  body[data-role="parent"] .mobile-platform-mark img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
  body[data-role="parent"] .app-header-identity{
    width:100%!important;display:flex!important;justify-content:center!important;align-items:center!important;
    gap:0!important;direction:rtl!important;text-align:center!important;
  }
  body[data-role="parent"] .app-header-identity .brand-mark,
  body[data-role="parent"] .app-header-copy small,
  body[data-role="parent"] .app-header-copy span{display:none!important}
  body[data-role="parent"] .app-header-copy{display:block!important;min-width:0!important;text-align:center!important}
  body[data-role="parent"] #headerScreenTitle{
    color:#fff!important;font-family:"Cairo","Noto Kufi Arabic",Tahoma,Arial,sans-serif!important;
    font-size:17px!important;font-weight:800!important;line-height:1!important;letter-spacing:0!important;
  }
  /* Keep parent logout available, but compact and visually subordinate. */
  body[data-role="parent"] .header-actions{position:absolute!important;inset-inline-end:12px!important;display:flex!important;z-index:3!important}
  body[data-role="parent"] .header-actions .role-badge{display:none!important}
  body[data-role="parent"] .app-header-logout{
    width:auto!important;min-width:74px!important;min-height:34px!important;margin:0!important;padding:7px 10px!important;
    border:1px solid rgba(255,255,255,.18)!important;border-radius:11px!important;background:rgba(255,255,255,.08)!important;
    color:#fff!important;font-size:10px!important;font-weight:800!important;box-shadow:none!important;
  }

  /* Same bottom-nav visual language as teacher portal. */
  body[data-role="parent"] .sidebar{
    position:fixed!important;z-index:80!important;top:auto!important;inset-inline:0!important;bottom:0!important;
    width:100%!important;height:calc(64px + env(safe-area-inset-bottom))!important;min-height:64px!important;
    padding:4px 10px calc(4px + env(safe-area-inset-bottom))!important;
    display:flex!important;justify-content:center!important;gap:8px!important;overflow:hidden!important;
    border:0!important;border-top:1px solid rgba(255,255,255,.09)!important;
    background:linear-gradient(90deg,#0B2D57,#123F78)!important;
    box-shadow:0 -8px 26px rgba(11,45,87,.14)!important;
  }
  body[data-role="parent"] .sidebar .nav-item{
    flex:0 1 132px!important;width:min(132px,42vw)!important;height:54px!important;min-height:54px!important;max-height:54px!important;
    padding:5px 8px!important;color:rgba(255,255,255,.72)!important;background:transparent!important;
    border:1px solid transparent!important;border-radius:12px!important;font-size:10px!important;font-weight:800!important;gap:3px!important;
  }
  body[data-role="parent"] .sidebar .nav-item.active{
    background:rgba(255,255,255,.075)!important;color:#F2B824!important;border-color:rgba(242,184,36,.18)!important;
  }
  body[data-role="parent"] .sidebar .nav-icon{width:22px!important;height:22px!important;color:currentColor!important}

  /* Same content density and scale as teacher pages. */
  body[data-role="parent"] .app-body{min-height:calc(100svh - 58px)!important}
  body[data-role="parent"] .content{max-width:1120px!important;width:100%!important;margin-inline:auto!important;padding:20px 18px calc(82px + env(safe-area-inset-bottom))!important}
  body[data-role="parent"] .section-head{margin-bottom:16px!important;align-items:flex-end!important;gap:10px!important}
  body[data-role="parent"] .section-head h2{margin:0!important;color:#17253A!important;font-size:26px!important;line-height:1.35!important;font-weight:850!important}
  body[data-role="parent"] .section-head .muted{margin:4px 0 0!important;font-size:12px!important;line-height:1.6!important}
  body[data-role="parent"] .page-kicker{font-size:11px!important;margin-bottom:3px!important}
  body[data-role="parent"] .icon-action-btn{width:42px!important;height:42px!important;min-width:42px!important;border-radius:13px!important;background:#fff!important;border:1px solid #DFE6EF!important;box-shadow:none!important}

  body[data-role="parent"] .panel-grid{grid-template-columns:1fr!important;gap:11px!important;margin-top:12px!important}
  body[data-role="parent"] .panel{padding:16px!important;border-radius:19px!important;border:1px solid #DFE6EF!important;box-shadow:0 6px 22px rgba(8,45,87,.055)!important}
  body[data-role="parent"] .panel h3,
  body[data-role="parent"] .parent-lessons-head h3{font-size:17px!important;line-height:1.35!important;margin:0 0 12px!important;color:#17253A!important}

  /* Parent home summary cards aligned to teacher KPI sizing. */
  body[data-role="parent"] .parent-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body[data-role="parent"] .parent-summary-grid>div:not(.empty){
    min-height:78px!important;padding:11px 10px!important;border:1px solid #DFE6EF!important;border-radius:16px!important;
    background:#fff!important;display:flex!important;flex-direction:column!important;justify-content:center!important;text-align:center!important;box-shadow:none!important;
  }
  body[data-role="parent"] .parent-summary-grid span{font-size:10.5px!important;line-height:1.35!important;color:#66758A!important}
  body[data-role="parent"] .parent-summary-grid b{margin-top:5px!important;font-size:20px!important;line-height:1.2!important;color:#0B2D57!important}

  /* Tenant + student identity blocks use the same compact card rhythm. */
  body[data-role="parent"] .tenant-parent-banner{
    min-height:92px!important;margin-bottom:12px!important;padding:14px 15px!important;border-radius:19px!important;gap:12px!important;
    background:linear-gradient(135deg,#0B2D57,#17569A)!important;box-shadow:0 8px 24px rgba(11,45,87,.10)!important;
  }
  body[data-role="parent"] .tenant-parent-banner .tenant-avatar{min-width:46px!important;width:46px!important;height:46px!important;border-radius:14px!important;font-size:15px!important}
  body[data-role="parent"] .tenant-parent-banner b{font-size:16px!important;line-height:1.3!important}
  body[data-role="parent"] .tenant-parent-banner span{font-size:12px!important}
  body[data-role="parent"] .tenant-parent-banner small{font-size:11px!important}
  body[data-role="parent"] .student-card{padding:15px!important;border-radius:18px!important}
  body[data-role="parent"] .student-card h3{margin:0 0 10px!important;font-size:19px!important;line-height:1.45!important}
  body[data-role="parent"] .student-meta{gap:7px!important}
  body[data-role="parent"] .student-meta span{padding:6px 9px!important;font-size:10px!important;border-radius:99px!important}

  /* Exam card: reduce oversized percentage / score blocks. */
  body[data-role="parent"] .parent-exam-wrap{margin-top:11px!important}
  body[data-role="parent"] .parent-exam-card{padding:15px!important;border-radius:18px!important;box-shadow:0 6px 22px rgba(8,45,87,.045)!important}
  body[data-role="parent"] .parent-exam-head{gap:10px!important;align-items:center!important}
  body[data-role="parent"] .parent-exam-head h3{font-size:17px!important;line-height:1.35!important}
  body[data-role="parent"] .exam-percent{min-width:58px!important;width:58px!important;height:58px!important;border-radius:15px!important;font-size:18px!important}
  body[data-role="parent"] .parent-exam-score{margin-top:11px!important;padding:11px 12px!important;border-radius:13px!important}
  body[data-role="parent"] .parent-exam-score span{font-size:11px!important}
  body[data-role="parent"] .parent-exam-score b{font-size:18px!important}
  body[data-role="parent"] .teacher-note-box{margin-top:10px!important;padding:11px 12px!important;border-radius:13px!important}
  body[data-role="parent"] .teacher-note-box span{font-size:10.5px!important}
  body[data-role="parent"] .teacher-note-box p{margin-top:5px!important;font-size:13px!important;line-height:1.7!important}
  body[data-role="parent"] #homeParentExam .parent-exam-card{padding:13px!important;border-radius:16px!important}
  body[data-role="parent"] #homeParentExam .exam-percent{min-width:52px!important;width:52px!important;height:52px!important;border-radius:14px!important;font-size:16px!important}

  /* Finance cards match the compact KPI scale used in teacher portal. */
  body[data-role="parent"] .parent-finance-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  body[data-role="parent"] .parent-finance-summary>div{min-height:64px!important;padding:9px 6px!important;border-radius:13px!important;background:#fff!important}
  body[data-role="parent"] .parent-finance-summary span{font-size:8.5px!important;line-height:1.25!important}
  body[data-role="parent"] .parent-finance-summary b{font-size:14px!important;line-height:1.25!important}
  body[data-role="parent"] .parent-payment-item{padding:11px 12px!important;border-radius:13px!important}
  body[data-role="parent"] .parent-payment-item b{font-size:14px!important}
  body[data-role="parent"] .parent-payment-item span{font-size:10px!important}

  /* Lesson history uses teacher-card dimensions instead of large report tiles. */
  body[data-role="parent"] .parent-lessons-head{margin:16px 2px 9px!important;align-items:center!important}
  body[data-role="parent"] .parent-lessons-head h3{margin:0!important;font-size:19px!important}
  body[data-role="parent"] .parent-lessons-head .muted{font-size:10px!important}
  body[data-role="parent"] .parent-lessons-list{gap:10px!important}
  body[data-role="parent"] .parent-lesson-card{padding:13px 14px!important;border-radius:17px!important;border-right-width:4px!important;box-shadow:0 5px 18px rgba(11,45,87,.04)!important}
  body[data-role="parent"] .parent-lesson-head b{font-size:15px!important;line-height:1.35!important}
  body[data-role="parent"] .parent-lesson-head span{font-size:10.5px!important;margin-top:3px!important}
  body[data-role="parent"] .attendance-pill{padding:5px 8px!important;font-size:9.5px!important}
  body[data-role="parent"] .parent-lesson-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-top:10px!important}
  body[data-role="parent"] .parent-lesson-grid>div{min-height:60px!important;padding:8px 6px!important;border-radius:12px!important;background:#F8FAFD!important}
  body[data-role="parent"] .parent-lesson-grid span{font-size:9.5px!important;line-height:1.3!important}
  body[data-role="parent"] .parent-lesson-grid b{margin-top:3px!important;font-size:12px!important;line-height:1.35!important}

  /* Follow-up filters/controls same control height as teacher portal. */
  body[data-role="parent"] .parent-head-actions{width:100%!important;display:grid!important;grid-template-columns:1fr auto!important;align-items:end!important;gap:8px!important}
  body[data-role="parent"] .parent-month-label{font-size:11px!important;margin:0!important}
  body[data-role="parent"] .parent-month-label input{height:44px!important;margin-top:6px!important;padding:9px 11px!important;border-radius:13px!important}
  body[data-role="parent"] .parent-head-actions .secondary-btn{width:auto!important;min-height:44px!important;margin:0!important;padding:10px 13px!important;border-radius:13px!important;font-size:11px!important;white-space:nowrap!important}
}

@media(max-width:520px){
  body[data-role="parent"] .content{padding:18px 14px calc(82px + env(safe-area-inset-bottom))!important}
  body[data-role="parent"] .section-head h2{font-size:23px!important}
  body[data-role="parent"] .panel{padding:14px!important}
  body[data-role="parent"] .parent-head-actions{grid-template-columns:1fr!important}
  body[data-role="parent"] .parent-head-actions .secondary-btn{width:100%!important}
  /* Explicitly restore the app mark: V1.34.1 hid it below 520px. */
  body[data-role="parent"] .mobile-platform-mark{display:block!important}
  body[data-role="parent"] .app-header-identity .brand-mark{display:none!important}
}

@media(max-width:360px){
  body[data-role="parent"] .mobile-platform-mark{inset-inline-start:10px!important;width:30px!important;height:30px!important;border-radius:9px!important}
  body[data-role="parent"] .app-header-logout{min-width:66px!important;padding-inline:8px!important;font-size:9px!important}
  body[data-role="parent"] .content{padding-inline:12px!important}
}

/* ==========================================================
   V1.34.3 — PARENT PORTAL DENSITY / SCALE PARITY
   Parent-only finishing pass. Mirrors teacher mobile tokens.
   ========================================================== */
@media(max-width:900px){
  /* Chrome: exact teacher mobile dimensions. */
  body[data-role="parent"] .app-header{
    height:60px!important;min-height:60px!important;padding:0 18px!important;
    background:linear-gradient(100deg,#082D57,#104A82)!important;
  }
  body[data-role="parent"] .mobile-platform-mark{inset-inline-start:18px!important;width:34px!important;height:34px!important;border-radius:11px!important}
  body[data-role="parent"] #headerScreenTitle{font-size:17px!important}
  body[data-role="parent"] .header-actions{inset-inline-end:18px!important}
  body[data-role="parent"] .app-header-logout{min-width:72px!important;min-height:34px!important;padding:6px 9px!important;border-radius:10px!important;font-size:9.5px!important}

  body[data-role="parent"] .sidebar{
    height:calc(62px + env(safe-area-inset-bottom))!important;min-height:62px!important;
    padding:3px 10px calc(3px + env(safe-area-inset-bottom))!important;
    gap:7px!important;background:rgba(8,45,87,.98)!important;
  }
  body[data-role="parent"] .sidebar .nav-item{
    flex:0 1 126px!important;width:min(126px,41vw)!important;height:54px!important;min-height:54px!important;max-height:54px!important;
    padding:4px 7px!important;border-radius:12px!important;font-size:9.5px!important;gap:2px!important;
  }
  body[data-role="parent"] .sidebar .nav-icon{width:21px!important;height:21px!important}

  /* Teacher-like page rhythm: more information above the fold. */
  body[data-role="parent"] .content{padding:16px 18px calc(76px + env(safe-area-inset-bottom))!important}
  body[data-role="parent"] .section-head{margin-bottom:12px!important;gap:8px!important}
  body[data-role="parent"] .section-head h2{font-size:23px!important;line-height:1.28!important;letter-spacing:-.01em!important}
  body[data-role="parent"] .section-head .muted{margin-top:3px!important;font-size:10.5px!important;line-height:1.5!important}
  body[data-role="parent"] .page-kicker{margin-bottom:2px!important;font-size:10px!important}
  body[data-role="parent"] .icon-action-btn{width:40px!important;height:40px!important;min-width:40px!important;border-radius:13px!important;font-size:20px!important}

  body[data-role="parent"] .panel-grid{gap:9px!important;margin-top:10px!important}
  body[data-role="parent"] .panel{padding:13px!important;border-radius:17px!important;box-shadow:0 6px 18px rgba(8,45,87,.045)!important}
  body[data-role="parent"] .panel h3,
  body[data-role="parent"] .parent-lessons-head h3{font-size:16px!important;line-height:1.3!important;margin:0 0 9px!important}

  /* Home summary = same compact KPI density used by teacher dashboard. */
  body[data-role="parent"] .parent-summary-grid{gap:8px!important}
  body[data-role="parent"] .parent-summary-grid>div:not(.empty){min-height:68px!important;padding:9px 8px!important;border-radius:14px!important}
  body[data-role="parent"] .parent-summary-grid span{font-size:9.5px!important;line-height:1.25!important}
  body[data-role="parent"] .parent-summary-grid b{margin-top:4px!important;font-size:17px!important;line-height:1.15!important}

  /* Parent identity blocks: compact, teacher-card proportions. */
  body[data-role="parent"] .tenant-parent-banner{min-height:78px!important;margin-bottom:9px!important;padding:12px 13px!important;border-radius:18px!important;gap:10px!important}
  body[data-role="parent"] .tenant-parent-banner .tenant-avatar{min-width:42px!important;width:42px!important;height:42px!important;border-radius:13px!important;font-size:14px!important}
  body[data-role="parent"] .tenant-parent-banner b{font-size:14.5px!important}
  body[data-role="parent"] .tenant-parent-banner span{font-size:10.5px!important}
  body[data-role="parent"] .tenant-parent-banner small{font-size:9.5px!important}
  body[data-role="parent"] .student-card{padding:12px 13px!important;border-radius:17px!important}
  body[data-role="parent"] .student-card h3{margin:0 0 8px!important;font-size:17px!important;line-height:1.35!important}
  body[data-role="parent"] .student-meta{gap:6px!important}
  body[data-role="parent"] .student-meta span{padding:5px 8px!important;font-size:9px!important}
  body[data-role="parent"] .parent-month-panel{margin-top:9px!important}

  /* Exam: remove report-like bulk, keep brand accent. */
  body[data-role="parent"] .parent-exam-wrap{margin-top:9px!important}
  body[data-role="parent"] .parent-exam-card{padding:12px!important;border-radius:16px!important}
  body[data-role="parent"] .parent-exam-head{gap:8px!important}
  body[data-role="parent"] .parent-exam-head .eyebrow{font-size:9px!important;line-height:1.2!important}
  body[data-role="parent"] .parent-exam-head h3{margin-top:2px!important;font-size:15.5px!important;line-height:1.3!important}
  body[data-role="parent"] .exam-percent{min-width:48px!important;width:48px!important;height:48px!important;border-radius:13px!important;font-size:15px!important}
  body[data-role="parent"] .parent-exam-score{margin-top:9px!important;padding:9px 10px!important;border-radius:12px!important;min-height:44px!important}
  body[data-role="parent"] .parent-exam-score span{font-size:9.5px!important}
  body[data-role="parent"] .parent-exam-score b{font-size:15px!important}
  body[data-role="parent"] .teacher-note-box{margin-top:8px!important;padding:9px 10px!important;border-radius:12px!important}
  body[data-role="parent"] .teacher-note-box span{font-size:9px!important}
  body[data-role="parent"] .teacher-note-box p{margin-top:3px!important;font-size:11.5px!important;line-height:1.55!important}
  body[data-role="parent"] #homeParentExam .parent-exam-card{padding:11px!important;border-radius:15px!important}
  body[data-role="parent"] #homeParentExam .exam-percent{min-width:46px!important;width:46px!important;height:46px!important;border-radius:12px!important;font-size:14px!important}

  /* Finance: one glance, no oversized tiles. */
  body[data-role="parent"] .parent-finance-summary{gap:6px!important}
  body[data-role="parent"] .parent-finance-summary>div{min-height:56px!important;padding:7px 5px!important;border-radius:12px!important}
  body[data-role="parent"] .parent-finance-summary span{font-size:7.8px!important}
  body[data-role="parent"] .parent-finance-summary b{font-size:12.5px!important}
  body[data-role="parent"] .parent-payment-item{padding:9px 10px!important;border-radius:12px!important}
  body[data-role="parent"] .parent-payment-item b{font-size:12.5px!important}
  body[data-role="parent"] .parent-payment-item span{font-size:9px!important}
  body[data-role="parent"] .parent-payment-item .secondary-btn{min-height:36px!important;padding:7px 10px!important;border-radius:10px!important;font-size:10px!important}

  /* Lesson history: compact teacher-card anatomy. */
  body[data-role="parent"] .parent-lessons-head{margin:13px 2px 7px!important}
  body[data-role="parent"] .parent-lessons-head h3{font-size:17px!important;margin:0!important}
  body[data-role="parent"] .parent-lessons-head .muted{font-size:9px!important}
  body[data-role="parent"] .parent-lessons-list{gap:8px!important}
  body[data-role="parent"] .parent-lesson-card{padding:11px 12px!important;border-radius:16px!important;border-right-width:4px!important}
  body[data-role="parent"] .parent-lesson-head b{font-size:14px!important;line-height:1.3!important}
  body[data-role="parent"] .parent-lesson-head span{font-size:9.5px!important;margin-top:2px!important}
  body[data-role="parent"] .attendance-pill{padding:4px 7px!important;font-size:8.5px!important}
  body[data-role="parent"] .attendance-explicit{margin-top:8px!important;min-height:42px!important;padding:8px 10px!important;border-radius:11px!important}
  body[data-role="parent"] .attendance-explicit span{font-size:9px!important}
  body[data-role="parent"] .attendance-explicit b{font-size:12px!important}
  body[data-role="parent"] .parent-lesson-grid{gap:6px!important;margin-top:8px!important}
  body[data-role="parent"] .parent-lesson-grid>div{min-height:50px!important;padding:7px 5px!important;border-radius:11px!important}
  body[data-role="parent"] .parent-lesson-grid span{font-size:8.5px!important}
  body[data-role="parent"] .parent-lesson-grid b{margin-top:2px!important;font-size:11px!important}

  /* Follow-up controls = teacher control dimensions. */
  body[data-role="parent"] .parent-head-actions{gap:7px!important}
  body[data-role="parent"] .parent-month-label{font-size:10px!important}
  body[data-role="parent"] .parent-month-label input{height:42px!important;margin-top:5px!important;padding:8px 10px!important;border-radius:12px!important;font-size:12px!important}
  body[data-role="parent"] .parent-head-actions .secondary-btn{min-height:42px!important;padding:9px 12px!important;border-radius:12px!important;font-size:10px!important}
}

@media(max-width:520px){
  body[data-role="parent"] .content{padding:15px 14px calc(76px + env(safe-area-inset-bottom))!important}
  body[data-role="parent"] .section-head h2{font-size:22px!important}
  body[data-role="parent"] .panel{padding:12px!important}
  body[data-role="parent"] .parent-head-actions{grid-template-columns:minmax(0,1fr) auto!important;align-items:end!important}
  body[data-role="parent"] .parent-head-actions .secondary-btn{width:auto!important;min-width:112px!important}
  body[data-role="parent"] .mobile-platform-mark{inset-inline-start:14px!important;width:32px!important;height:32px!important;border-radius:10px!important}
  body[data-role="parent"] .header-actions{inset-inline-end:14px!important}
}

@media(max-width:370px){
  body[data-role="parent"] .content{padding-inline:12px!important}
  body[data-role="parent"] .section-head h2{font-size:21px!important}
  body[data-role="parent"] .parent-summary-grid{gap:7px!important}
  body[data-role="parent"] .parent-head-actions{grid-template-columns:1fr!important}
  body[data-role="parent"] .parent-head-actions .secondary-btn{width:100%!important}
}

/* =========================
   V1.34.4 PARENT LIVE TEACHER PROFILE
   Teacher photo + shared live profile, Parent Portal only
   ========================= */
body[data-role="parent"] .tenant-parent-banner .tenant-avatar.has-photo,
body[data-role="parent"] .parent-teacher-panel-avatar.has-photo{
  overflow:hidden;background:#fff;border:2px solid rgba(255,255,255,.82);padding:0;
}
body[data-role="parent"] .tenant-parent-banner .tenant-avatar img,
body[data-role="parent"] .parent-teacher-panel-avatar img{
  width:100%;height:100%;display:block;object-fit:cover;object-position:center;
}
body[data-role="parent"] .tenant-parent-copy{min-width:0;flex:1}
body[data-role="parent"] .parent-teacher-identity{
  display:flex;flex-direction:row;align-items:center;gap:12px;
}
body[data-role="parent"] .parent-teacher-panel-avatar{
  width:48px;height:48px;min-width:48px;border-radius:15px;display:grid;place-items:center;
  background:linear-gradient(145deg,var(--gold),#ffd768);color:var(--navy);font-weight:900;font-size:15px;
  box-shadow:0 6px 16px rgba(13,57,105,.08);
}
body[data-role="parent"] .parent-teacher-panel-copy{min-width:0;display:flex;flex-direction:column;gap:3px}
body[data-role="parent"] .parent-teacher-panel-copy b{font-size:16px;color:var(--navy);line-height:1.3}
body[data-role="parent"] .parent-teacher-panel-copy span{font-size:13px;font-weight:750;color:var(--ink)}
body[data-role="parent"] .parent-teacher-panel-copy .tenant-phone{font-size:12px;margin:1px 0 0!important}
@media(max-width:640px){
  body[data-role="parent"] .parent-teacher-panel-avatar{width:42px;height:42px;min-width:42px;border-radius:13px;font-size:14px}
  body[data-role="parent"] .parent-teacher-panel-copy b{font-size:14.5px}
  body[data-role="parent"] .parent-teacher-panel-copy span{font-size:11.5px}
  body[data-role="parent"] .parent-teacher-panel-copy .tenant-phone{font-size:10.5px}
}


/* =========================
   V1.34.5 PARENT TEACHER IDENTITY PLACEMENT
   Remove duplicate teacher panel; keep premium banner + compact contact actions.
   Parent Portal only.
   ========================= */
body[data-role="parent"] .parent-teacher-contact{
  margin:18px 0 4px;padding:14px 15px 15px;border:1px solid var(--line);
  border-radius:18px;background:#fff;box-shadow:0 7px 20px rgba(13,57,105,.045);
}
body[data-role="parent"] .parent-teacher-contact-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:11px}
body[data-role="parent"] .parent-teacher-contact-head .page-kicker{font-size:10px!important;color:#9a7412!important;margin-bottom:3px!important}
body[data-role="parent"] .parent-teacher-contact-head h3{margin:0;font-size:17px;line-height:1.35;color:var(--ink)}
body[data-role="parent"] .parent-teacher-contact-body{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:11px;border-top:1px solid #edf1f6}
body[data-role="parent"] .parent-teacher-contact-copy{min-width:0;display:flex;flex-direction:column;gap:2px;text-align:right}
body[data-role="parent"] .parent-teacher-contact-copy span{font-size:10.5px;color:var(--muted)}
body[data-role="parent"] .parent-teacher-contact-copy b{font-size:13px;color:var(--navy);letter-spacing:.2px}
body[data-role="parent"] .parent-teacher-contact-actions{display:flex;align-items:stretch;gap:7px;flex-shrink:0}
body[data-role="parent"] .parent-contact-action{
  min-width:62px;min-height:48px;padding:7px 9px;border:1px solid #dbe4ee;border-radius:13px;background:#f8fafc;
  color:var(--navy);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;
  font:inherit;cursor:pointer;box-shadow:none;
}
body[data-role="parent"] .parent-contact-action span{font-size:15px;line-height:1}
body[data-role="parent"] .parent-contact-action b{font-size:9.5px;line-height:1.2;white-space:nowrap}
body[data-role="parent"] .parent-contact-action:active{transform:translateY(1px)}
body[data-role="parent"] .parent-contact-whatsapp{background:#effaf5;border-color:#cfe9de;color:#147455}
body[data-role="parent"] .parent-contact-empty{font-size:11.5px;color:var(--muted);padding:3px 0}
@media(max-width:520px){
  body[data-role="parent"] .parent-teacher-contact{margin-top:14px;padding:12px;border-radius:16px}
  body[data-role="parent"] .parent-teacher-contact-head h3{font-size:15px}
  body[data-role="parent"] .parent-teacher-contact-body{gap:8px;align-items:flex-end;flex-direction:column}
  body[data-role="parent"] .parent-teacher-contact-copy{width:100%}
  body[data-role="parent"] .parent-teacher-contact-actions{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  body[data-role="parent"] .parent-contact-action{min-width:0;min-height:44px;padding:6px 4px;border-radius:12px}
  body[data-role="parent"] .parent-contact-action b{font-size:9px}
}


/* =========================
   V1.34.6 PARENT PREMIUM FINISHING PASS
   Parent Portal only: richer identity, compact metrics, polished contact card.
   ========================= */
body[data-role="parent"] .tenant-parent-banner .tenant-avatar{
  width:58px!important;height:58px!important;min-width:58px!important;border-radius:18px!important;
  border:3px solid rgba(255,255,255,.92)!important;box-shadow:0 7px 18px rgba(4,25,54,.18);overflow:hidden;
}
body[data-role="parent"] .tenant-parent-banner .tenant-avatar img{width:100%;height:100%;object-fit:cover;display:block}
body[data-role="parent"] .parent-student-identity-card{display:flex;flex-direction:column;gap:12px}
body[data-role="parent"] .parent-student-identity{display:flex;align-items:center;gap:11px}
body[data-role="parent"] .parent-student-avatar{
  width:46px;height:46px;min-width:46px;border-radius:15px;display:grid;place-items:center;
  background:linear-gradient(145deg,#edf4fc,#dfeaf7);border:1px solid #d6e1ed;color:var(--parent-navy);
  font-size:16px;font-weight:900;box-shadow:0 5px 14px rgba(11,45,87,.06)
}
body[data-role="parent"] .parent-student-identity h3{margin:0!important;line-height:1.25}
body[data-role="parent"] .parent-summary-metric{position:relative;min-height:104px!important;padding:15px 14px!important}
body[data-role="parent"] .parent-summary-icon{
  position:absolute;inset-inline-start:12px;top:12px;width:27px;height:27px;border-radius:9px;display:grid;place-items:center;
  background:#eef4fb;color:var(--parent-blue)
}
body[data-role="parent"] .parent-summary-icon svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
body[data-role="parent"] .parent-summary-homework .parent-summary-icon{background:#fff7df;color:#a7770c}
body[data-role="parent"] .parent-summary-recitation .parent-summary-icon{background:#f0f3ff;color:#465ea6}
body[data-role="parent"] .parent-summary-participation .parent-summary-icon{background:#fff3e8;color:#b66f28}
body[data-role="parent"] .parent-summary-label{display:block;padding-inline-start:32px!important}
body[data-role="parent"] .parent-teacher-contact{margin-top:30px!important;padding:15px 16px 16px!important}
body[data-role="parent"] .parent-teacher-contact-body{display:block!important;padding-top:12px!important}
body[data-role="parent"] .parent-contact-teacher{display:flex;align-items:center;gap:11px;margin-bottom:12px}
body[data-role="parent"] .parent-contact-teacher-avatar{
  width:52px;height:52px;min-width:52px;border-radius:16px;overflow:hidden;display:grid;place-items:center;
  background:linear-gradient(145deg,var(--parent-blue),var(--parent-navy));color:#fff;border:2px solid #fff;
  box-shadow:0 6px 16px rgba(11,45,87,.14);font-size:15px;font-weight:900
}
body[data-role="parent"] .parent-contact-teacher-avatar img{width:100%;height:100%;object-fit:cover;display:block}
body[data-role="parent"] .parent-contact-teacher-copy{min-width:0;display:flex;flex-direction:column;gap:2px;text-align:right}
body[data-role="parent"] .parent-contact-teacher-copy b{color:var(--parent-ink);font-size:14px;line-height:1.25}
body[data-role="parent"] .parent-contact-teacher-copy span{color:var(--parent-muted);font-size:10.5px;font-weight:700}
body[data-role="parent"] .parent-contact-teacher-copy small{color:var(--parent-navy);font-size:11px;font-weight:800;text-align:right}
body[data-role="parent"] .parent-teacher-contact-actions{width:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
body[data-role="parent"] .parent-contact-action{
  min-width:0!important;min-height:54px!important;padding:8px 6px!important;border-radius:14px!important;
  background:#f8fafc!important;border:1px solid #dce5ef!important;box-shadow:0 4px 12px rgba(11,45,87,.035)!important;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease
}
body[data-role="parent"] .parent-contact-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body[data-role="parent"] .parent-contact-action b{font-size:10px!important}
body[data-role="parent"] .parent-contact-action:hover{border-color:#c9d7e6!important;box-shadow:0 6px 15px rgba(11,45,87,.06)!important}
body[data-role="parent"] .parent-contact-whatsapp{background:#effaf5!important;border-color:#cce8dc!important;color:#147455!important}
@media(max-width:520px){
  body[data-role="parent"] .tenant-parent-banner .tenant-avatar{width:54px!important;height:54px!important;min-width:54px!important;border-radius:17px!important}
  body[data-role="parent"] .parent-student-avatar{width:42px;height:42px;min-width:42px;border-radius:13px;font-size:14px}
  body[data-role="parent"] .parent-summary-metric{min-height:96px!important;padding:13px 12px!important}
  body[data-role="parent"] .parent-summary-icon{width:25px;height:25px;top:10px;inset-inline-start:10px}
  body[data-role="parent"] .parent-summary-label{padding-inline-start:28px!important}
  body[data-role="parent"] .parent-teacher-contact{margin-top:26px!important;padding:13px!important}
  body[data-role="parent"] .parent-contact-teacher-avatar{width:48px;height:48px;min-width:48px;border-radius:15px}
  body[data-role="parent"] .parent-contact-action{min-height:50px!important;border-radius:13px!important}
}

/* V1.34.7 — Teaching Profile & Dynamic Lesson Evaluation */
.teaching-profile-editor{margin:22px 0 18px;padding:18px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(180deg,#fbfcff 0%,#f5f8fc 100%)}
.teaching-profile-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}
.teaching-profile-head h4{margin:4px 0 6px;font-size:20px;color:var(--navy)}
.teaching-profile-head .eyebrow{color:#9b7112;font-weight:800;font-size:12px}
.evaluation-metrics-editor{display:grid;gap:10px;margin-top:14px}
.evaluation-metric-row{display:grid;grid-template-columns:minmax(92px,.55fr) minmax(180px,1.6fr) minmax(170px,1fr);gap:12px;align-items:end;padding:12px;border:1px solid var(--line);border-radius:16px;background:#fff}
.evaluation-metric-row.fixed{grid-template-columns:1fr auto;align-items:center;background:#f8fbff}
.evaluation-metric-row.fixed div{display:flex;flex-direction:column;gap:3px}.evaluation-metric-row.fixed span{font-size:12px;color:var(--muted)}
.metric-fixed-badge{padding:7px 11px;border-radius:999px;background:#fff6d8;color:#8a6508!important;font-weight:800}
.metric-toggle{display:flex!important;align-items:center;gap:8px;min-height:48px}.metric-toggle input{width:20px;height:20px;accent-color:var(--navy);margin:0}
.evaluation-metric-row small{align-self:center;color:var(--muted);line-height:1.6}
.evaluation-profile-preview{margin-top:14px;padding:14px;border-radius:16px;background:linear-gradient(135deg,var(--navy),#17569a);color:#fff}
.evaluation-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.evaluation-preview-head span{opacity:.78;font-size:12px}.evaluation-preview-head b{font-size:15px}
.evaluation-preview-pills{display:flex;flex-wrap:wrap;gap:8px}.evaluation-preview-pills span{padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);font-weight:700;font-size:13px}
.teaching-profile-note{margin-top:12px}.parent-lesson-grid.compact-items{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:620px){.teaching-profile-editor{padding:14px}.evaluation-metric-row{grid-template-columns:1fr}.evaluation-metric-row.fixed{grid-template-columns:1fr auto}.metric-toggle{min-height:auto}.parent-lesson-grid.compact-items{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* V1.34.8 — Safe Student Archive */
.student-list-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.student-view-switch{display:inline-flex;align-items:center;gap:6px;padding:4px;background:#f2f5f9;border:1px solid var(--line,#dfe6ef);border-radius:14px}
.student-view-chip{border:0;background:transparent;color:var(--muted,#66758a);font:inherit;font-weight:800;padding:8px 12px;border-radius:10px;cursor:pointer;transition:.18s ease}
.student-view-chip.active{background:var(--brand-navy,#123f78);color:#fff;box-shadow:0 4px 12px rgba(18,63,120,.16)}
.student-list-mode-hint{color:var(--muted,#66758a);font-weight:600}
.archived-student-row{opacity:.82;background:#fafbfc}
.restore-student-action{background:#eaf8f2!important;color:#16805d!important;border-color:#bfe8d7!important;font-weight:800}
.row-more-popover .menu-action.danger{color:#c64752!important}
@media(max-width:640px){.student-list-controls{align-items:stretch}.student-view-switch{width:100%;display:grid;grid-template-columns:1fr 1fr}.student-view-chip{width:100%}.student-list-mode-hint{line-height:1.6}}


/* V1.34.12 — Student archive polish */
#studentsSection .archived-student-row{
  opacity:.9;
  background:linear-gradient(180deg,#fff 0%,#f8fafc 100%);
}
#studentsSection .archived-student-row .student-name,
#studentsSection .archived-student-row .student-code{color:#52657a}
#studentsSection .restore-student-action{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:auto!important;
  min-width:118px!important;
  min-height:42px!important;
  padding:9px 16px!important;
  white-space:nowrap!important;
  line-height:1!important;
  border-radius:12px!important;
  background:#eaf8f2!important;
  color:#16805d!important;
  border:1px solid #bfe8d7!important;
  font-size:12px!important;
  font-weight:850!important;
}
#studentsSection .restore-student-action::before{content:'↻';font-size:16px;font-weight:900;line-height:1}
#studentsSection .restore-student-action:hover{background:#def4ea!important;border-color:#9fd9c5!important}
#studentsSection .archived-student-row .status.inactive{background:#fff1f3!important;color:#b63c4d!important;border-color:#f0c5cb!important}
@media(max-width:640px){
  #studentsSection .archived-student-row td[data-label="الإجراءات"] .student-primary-actions{justify-content:flex-start!important}
  #studentsSection .archived-student-row .restore-student-action{width:auto!important;max-width:100%!important;min-width:124px!important}
}

/* V1.34.13 — Role transition / stale UI flash guard */
.session-transition{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:24px;background:linear-gradient(155deg,rgba(7,31,67,.98),rgba(8,73,133,.98));color:#fff;backdrop-filter:blur(10px)}
.session-transition.hidden{display:none!important}
.session-transition-card{width:min(360px,calc(100vw - 40px));text-align:center;padding:30px 24px;border:1px solid rgba(255,255,255,.12);border-radius:28px;background:rgba(255,255,255,.075);box-shadow:0 24px 70px rgba(0,0,0,.24)}
.session-transition-mark{width:68px;height:68px;margin:0 auto 16px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(145deg,#ffd878,var(--gold));box-shadow:0 12px 30px rgba(0,0,0,.18)}
.session-transition-mark img{width:46px;height:46px;display:block}
.session-transition-card strong{display:block;font-size:20px;line-height:1.5;margin-bottom:5px}
.session-transition-card>span{display:block;font-size:13px;line-height:1.7;color:rgba(255,255,255,.74)}
.session-transition-dots{display:flex;justify-content:center;gap:7px;margin-top:18px}
.session-transition-dots i{width:7px;height:7px;border-radius:50%;background:#fff;animation:sessionTransitionPulse 1s infinite ease-in-out}
.session-transition-dots i:nth-child(2){animation-delay:.12s}.session-transition-dots i:nth-child(3){animation-delay:.24s}
@keyframes sessionTransitionPulse{50%{opacity:.28;transform:translateY(-3px)}}
body.session-transitioning{overflow:hidden}

/* V1.34.14 — Branded default student avatar */
.default-student-avatar{overflow:hidden!important;padding:0!important;background:#EFF5FB!important;border:1px solid #D7E3F0!important;color:transparent!important;display:grid!important;place-items:center!important}
.default-student-avatar img{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important}
#studentsSection .student-avatar.default-student-avatar{border-radius:50%!important;box-shadow:0 4px 12px rgba(11,47,102,.08)!important}
#smartAlertsSection .smart-alert-avatar.default-student-avatar{border-radius:50%!important;box-shadow:0 4px 12px rgba(11,47,102,.08)!important}
body[data-role="parent"] .parent-student-avatar.default-student-avatar{border-radius:50%!important;box-shadow:0 5px 14px rgba(11,45,87,.08)!important}

/* =========================================================
   V1.34.15 — Parent identity hierarchy
   Student first, teacher second, with compact premium labels.
   Parent-scoped only: no teacher/admin visual impact.
   ========================================================= */
body[data-role="parent"] .parent-identity-block{
  margin:0 0 14px;
}
body[data-role="parent"] .parent-identity-section-title{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  margin:0 4px 9px;
  color:var(--navy,#123f78);
}
body[data-role="parent"] .parent-identity-section-title h3{
  margin:0;
  font-size:17px;
  line-height:1.35;
  font-weight:800;
  color:inherit;
}
body[data-role="parent"] .parent-identity-dot{
  width:8px;
  height:8px;
  flex:0 0 8px;
  border-radius:999px;
  background:var(--gold,#f2b824);
  box-shadow:0 0 0 5px rgba(242,184,36,.13);
}
body[data-role="parent"] .parent-teacher-section-title{
  color:#9b7410;
}
body[data-role="parent"] .parent-student-block .parent-student-identity-card,
body[data-role="parent"] .parent-teacher-block .tenant-parent-banner{
  margin-bottom:0!important;
}
body[data-role="parent"] .parent-teacher-block{
  margin-top:2px;
  margin-bottom:16px;
}
@media (max-width:480px){
  body[data-role="parent"] .parent-identity-block{margin-bottom:12px}
  body[data-role="parent"] .parent-identity-section-title{margin:0 3px 8px;gap:7px}
  body[data-role="parent"] .parent-identity-section-title h3{font-size:15.5px}
  body[data-role="parent"] .parent-identity-dot{width:7px;height:7px;flex-basis:7px;box-shadow:0 0 0 4px rgba(242,184,36,.12)}
}

/* =========================
   V1.34.16 PARENT LINKED PROFILE CARD
   Student-first identity + compact teacher relationship in one card.
   Parent Portal only.
   ========================= */
body[data-role="parent"] .parent-linked-profile-card{
  margin:0 0 14px;
  padding:16px;
  border:1px solid var(--parent-border,#dfe6ef);
  border-radius:20px;
  background:#fff;
  box-shadow:0 6px 20px rgba(11,45,87,.05);
  overflow:hidden;
}
body[data-role="parent"] .parent-linked-student{
  display:flex;
  flex-direction:column;
  gap:11px;
}
body[data-role="parent"] .parent-linked-profile-card .parent-student-identity{
  display:flex;
  align-items:center;
  gap:11px;
  margin:0;
}
body[data-role="parent"] .parent-linked-profile-card .parent-student-avatar{
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  border-radius:16px!important;
  box-shadow:0 5px 14px rgba(11,45,87,.07)!important;
}
body[data-role="parent"] .parent-linked-student-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
body[data-role="parent"] .parent-linked-label{
  color:var(--parent-muted,#66758a);
  font-size:10.5px;
  font-weight:800;
}
body[data-role="parent"] .parent-linked-student-copy h3{
  margin:0!important;
  color:var(--parent-ink,#17253a)!important;
  font-size:18px!important;
  line-height:1.35!important;
  font-weight:850!important;
}
body[data-role="parent"] .parent-linked-student-meta{
  display:flex!important;
  flex-wrap:wrap;
  gap:7px!important;
  margin:0!important;
}
body[data-role="parent"] .parent-linked-student-meta span{
  padding:7px 10px!important;
  border:1px solid var(--parent-border,#dfe6ef)!important;
  border-radius:999px!important;
  background:#f7f9fc!important;
  color:#4a5b70!important;
  font-size:10.5px!important;
  font-weight:800!important;
}
body[data-role="parent"] .parent-profile-divider{
  height:1px;
  margin:14px 0 12px;
  background:linear-gradient(90deg,transparent,#e5eaf1 12%,#e5eaf1 88%,transparent);
}
body[data-role="parent"] .parent-linked-teacher{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:12px;
}
body[data-role="parent"] .parent-linked-teacher-heading{
  display:flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
  color:#9b7410;
  font-size:10.5px;
  line-height:1.3;
  font-weight:850;
}
body[data-role="parent"] .parent-linked-teacher-heading .parent-identity-dot{
  width:6px;
  height:6px;
  flex-basis:6px;
  box-shadow:0 0 0 3px rgba(242,184,36,.12);
}
body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline{
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  gap:9px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--parent-ink,#17253a)!important;
}
body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline .tenant-avatar{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  border-radius:13px!important;
  border:2px solid #fff!important;
  box-shadow:0 4px 12px rgba(11,45,87,.09)!important;
  order:0;
}
body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline .tenant-parent-copy{
  min-width:0;
  text-align:right;
}
body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline b{
  margin:0!important;
  color:var(--parent-navy,#0b2d57)!important;
  font-size:13.5px!important;
  line-height:1.25!important;
}
body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline span{
  margin-top:2px!important;
  color:var(--parent-ink,#17253a)!important;
  opacity:1!important;
  font-size:11px!important;
  line-height:1.25!important;
}
body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline small{
  margin-top:2px!important;
  color:var(--parent-muted,#66758a)!important;
  opacity:1!important;
  font-size:9.5px!important;
}
@media(max-width:480px){
  body[data-role="parent"] .parent-linked-profile-card{padding:13px;border-radius:18px;margin-bottom:12px}
  body[data-role="parent"] .parent-linked-profile-card .parent-student-avatar{width:48px!important;height:48px!important;min-width:48px!important;border-radius:15px!important}
  body[data-role="parent"] .parent-linked-student-copy h3{font-size:16px!important}
  body[data-role="parent"] .parent-linked-label{font-size:9.5px}
  body[data-role="parent"] .parent-linked-student-meta span{padding:6px 8px!important;font-size:9.5px!important}
  body[data-role="parent"] .parent-profile-divider{margin:12px 0 10px}
  body[data-role="parent"] .parent-linked-teacher{grid-template-columns:1fr;gap:7px}
  body[data-role="parent"] .parent-linked-teacher-heading{font-size:9.5px}
  body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline .tenant-avatar{width:40px!important;height:40px!important;min-width:40px!important;border-radius:12px!important}
  body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline b{font-size:12.5px!important}
  body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline span{font-size:10.5px!important}
  body[data-role="parent"] .parent-linked-profile-card .parent-teacher-inline small{font-size:9px!important}
}


/* =========================
   V1.34.17 PARENT HOME / DETAIL INFORMATION ARCHITECTURE
   Home = current snapshot. Student = detailed month view.
   ========================= */
body[data-role="parent"] .parent-home-profile-slot{
  display:block!important;
  margin:0 0 14px!important;
}
body[data-role="parent"] .parent-home-profile-slot .parent-home-linked-card{
  grid-column:1/-1;
}
body[data-role="parent"] .parent-home-linked-card{
  background:#fff;
  border:1px solid var(--line,#dfe6ef);
  border-radius:20px;
  box-shadow:0 6px 20px rgba(15,35,65,.055);
  padding:16px 18px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 1px minmax(0,1fr);
  align-items:center;
  gap:16px;
}
body[data-role="parent"] .parent-home-student-row,
body[data-role="parent"] .parent-home-teacher-row{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
body[data-role="parent"] .parent-home-student-row>div:last-child,
body[data-role="parent"] .parent-home-teacher-row>div:last-child{min-width:0;display:flex;flex-direction:column;gap:2px}
body[data-role="parent"] .parent-home-student-row span,
body[data-role="parent"] .parent-home-teacher-row span{font-size:12px;color:#8a6c16;font-weight:700}
body[data-role="parent"] .parent-home-student-row b,
body[data-role="parent"] .parent-home-teacher-row b{font-size:15px;color:#173557;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-role="parent"] .parent-home-student-row small,
body[data-role="parent"] .parent-home-teacher-row small{font-size:12px;color:#758398;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-role="parent"] .parent-home-student-avatar,
body[data-role="parent"] .parent-home-teacher-row .tenant-parent-avatar{
  width:54px!important;height:54px!important;flex:0 0 54px!important;border-radius:16px!important;overflow:hidden
}
body[data-role="parent"] .parent-home-link-divider{width:1px;height:52px;background:#e6ebf2}
body[data-role="parent"] .parent-home-glance-panel{padding:16px!important}
body[data-role="parent"] .parent-home-glance-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
body[data-role="parent"] .parent-home-glance-head h3{margin:0!important}
body[data-role="parent"] .parent-home-glance-head span{font-size:12px;color:#7c899b}
body[data-role="parent"] .parent-home-glance-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
body[data-role="parent"] .parent-home-glance-item{min-width:0}
body[data-role="parent"] .parent-home-last-lesson-item{grid-column:1/-1}
body[data-role="parent"] .parent-home-update-card,
body[data-role="parent"] .parent-home-finance-compact{
  min-height:82px;border:1px solid #e0e7ef;border-radius:16px;background:#f9fbfd;padding:13px 14px;display:flex;align-items:center;gap:12px
}
body[data-role="parent"] .parent-home-finance-compact{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px}
body[data-role="parent"] .parent-home-finance-compact span,
body[data-role="parent"] .parent-home-update-copy span{font-size:12px;color:#758398}
body[data-role="parent"] .parent-home-finance-compact b{font-size:20px;color:#123f78}
body[data-role="parent"] .parent-home-finance-compact small,
body[data-role="parent"] .parent-home-update-copy small{font-size:11.5px;color:#7a8797;line-height:1.5}
body[data-role="parent"] .parent-home-update-icon{width:50px;height:50px;flex:0 0 50px;border-radius:14px;background:#123f78;color:#fff;display:grid;place-items:center;font-weight:800;font-size:16px}
body[data-role="parent"] .parent-home-update-icon.present{background:#eaf8f2;color:#16805d}
body[data-role="parent"] .parent-home-update-icon.absent{background:#fff0f2;color:#c64752}
body[data-role="parent"] .parent-home-update-copy{min-width:0;display:flex;flex-direction:column;gap:2px}
body[data-role="parent"] .parent-home-update-copy b{font-size:14px;color:#17253a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-role="parent"] .parent-home-details-cta{
  background:linear-gradient(135deg,#0b2d57,#17569a);border-radius:20px;padding:17px 18px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 12px;box-shadow:0 8px 22px rgba(18,63,120,.14)
}
body[data-role="parent"] .parent-home-details-cta>div{display:flex;flex-direction:column;gap:4px;min-width:0}
body[data-role="parent"] .parent-home-details-cta b{font-size:15px}
body[data-role="parent"] .parent-home-details-cta span{font-size:12px;color:rgba(255,255,255,.75);line-height:1.55}
body[data-role="parent"] .parent-home-details-btn{width:auto!important;white-space:nowrap;background:#fff!important;color:#123f78!important;border:0!important;padding:11px 15px!important;box-shadow:none!important}
body[data-role="parent"] .parent-detail-student-strip{
  background:#fff;border:1px solid #e0e7ef;border-radius:18px;padding:12px 14px;display:flex;align-items:center;gap:12px;margin-bottom:12px;box-shadow:0 4px 14px rgba(15,35,65,.04)
}
body[data-role="parent"] .parent-detail-student-avatar{width:48px!important;height:48px!important;flex:0 0 48px!important;border-radius:14px!important}
body[data-role="parent"] .parent-detail-student-strip>div:last-child{display:flex;flex-direction:column;gap:2px;min-width:0}
body[data-role="parent"] .parent-detail-student-strip b{font-size:15px;color:#17253a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-role="parent"] .parent-detail-student-strip span{font-size:12px;color:#758398}
@media(max-width:520px){
  body[data-role="parent"] .parent-home-linked-card{grid-template-columns:1fr;gap:10px;padding:14px}
  body[data-role="parent"] .parent-home-link-divider{width:100%;height:1px}
  body[data-role="parent"] .parent-home-student-row,
  body[data-role="parent"] .parent-home-teacher-row{gap:10px}
  body[data-role="parent"] .parent-home-glance-grid{grid-template-columns:1fr}
  body[data-role="parent"] .parent-home-last-lesson-item{grid-column:auto}
  body[data-role="parent"] .parent-home-details-cta{align-items:stretch;flex-direction:column}
  body[data-role="parent"] .parent-home-details-btn{width:100%!important}
}

/* =========================
   V1.34.20 PARENT HOME LINKED PROFILE VISIBILITY FIX
   Parent home must start with the unified student + teacher card.
   Overrides the teacher-dashboard rule that hides #statsGrid.
   ========================= */
body[data-role="parent"] #homeSection #statsGrid.parent-home-profile-slot{
  display:block!important;
  margin:0 0 14px!important;
}
body[data-role="parent"] #homeSection #statsGrid.parent-home-profile-slot .parent-home-linked-card{
  display:grid!important;
  width:100%;
}
@media(max-width:520px){
  body[data-role="parent"] #homeSection #statsGrid.parent-home-profile-slot{
    display:block!important;
  }
}

/* =========================
   V1.34.20 PARENT HOME TEACHER AVATAR CONTAINMENT
   Keep teacher identity as a compact footer inside the linked student card.
   ========================= */
body[data-role="parent"] #homeSection .parent-home-linked-card{
  display:block!important;
  padding:0!important;
  overflow:hidden!important;
}
body[data-role="parent"] #homeSection .parent-home-student-row{
  padding:16px 18px 15px!important;
}
body[data-role="parent"] #homeSection .parent-home-link-divider{
  display:block!important;
  width:auto!important;
  height:1px!important;
  margin:0 18px!important;
  background:#e6ebf2!important;
}
body[data-role="parent"] #homeSection .parent-home-teacher-row{
  padding:12px 18px 14px!important;
  background:linear-gradient(180deg,#fbfdff 0%,#f6f9fd 100%)!important;
  gap:11px!important;
}
body[data-role="parent"] #homeSection .parent-home-teacher-row .tenant-avatar{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  max-width:46px!important;
  flex:0 0 46px!important;
  border-radius:14px!important;
  overflow:hidden!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  background:linear-gradient(145deg,#123f78,#17569a)!important;
  color:#f2b824!important;
  border:2px solid #fff!important;
  box-shadow:0 3px 10px rgba(11,45,87,.12)!important;
  font-size:13px!important;
  line-height:1!important;
}
body[data-role="parent"] #homeSection .parent-home-teacher-row .tenant-avatar img{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:0!important;
  max-height:100%!important;
  display:block!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:inherit!important;
  margin:0!important;
  padding:0!important;
  position:static!important;
  transform:none!important;
}
body[data-role="parent"] #homeSection .parent-home-teacher-row>div:last-child{
  flex:1 1 auto!important;
  min-width:0!important;
}
body[data-role="parent"] #homeSection .parent-home-teacher-row span{
  font-size:10px!important;
  color:#9a7619!important;
}
body[data-role="parent"] #homeSection .parent-home-teacher-row b{
  font-size:13px!important;
  line-height:1.35!important;
}
body[data-role="parent"] #homeSection .parent-home-teacher-row small{
  font-size:10.5px!important;
  line-height:1.35!important;
}
body[data-role="parent"] #homeSection .parent-home-teacher-phone{
  direction:ltr!important;
  text-align:right!important;
  color:#66758a!important;
}
@media (max-width:380px){
  body[data-role="parent"] #homeSection .parent-home-student-row{padding:14px 14px 13px!important}
  body[data-role="parent"] #homeSection .parent-home-link-divider{margin:0 14px!important}
  body[data-role="parent"] #homeSection .parent-home-teacher-row{padding:10px 14px 12px!important}
  body[data-role="parent"] #homeSection .parent-home-teacher-row .tenant-avatar{width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;flex-basis:42px!important;border-radius:12px!important}
}


/* =========================
   V1.34.21 PARENT HOME POLISH
   ========================= */
body[data-role="parent"] #homeSection .home-page-head{
  min-height:34px;
  margin-bottom:10px!important;
  align-items:center;
}
body[data-role="parent"] #homeSection .home-page-head>div{
  flex:1;
}
body[data-role="parent"] #homeSection .home-page-head .page-kicker{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0;
  font-size:12px;
  color:#a67c12;
  font-weight:800;
}
body[data-role="parent"] #homeSection .home-page-head .page-kicker::before{
  content:'';
  width:7px;
  height:7px;
  border-radius:999px;
  background:#f1b91f;
  box-shadow:0 0 0 5px rgba(241,185,31,.12);
}
body[data-role="parent"] #welcomeTitle.parent-home-title-hidden,
body[data-role="parent"] #welcomeText.parent-home-title-hidden{
  display:none!important;
}
body[data-role="parent"] #refreshBtn{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  padding:0!important;
  border-radius:12px!important;
  font-size:20px!important;
  box-shadow:none!important;
  background:#fff!important;
  border:1px solid #dce5ef!important;
  color:#123f78!important;
}
body[data-role="parent"] .parent-home-glance-head h3{
  font-size:20px!important;
}
body[data-role="parent"] .parent-home-details-cta{
  margin-top:10px;
}


/* ==========================================================
   V1.34.22 — TEACHER DASHBOARD STABILIZATION
   Final teacher-only contract. Keeps Parent/Super Admin untouched.
   ========================================================== */
body[data-role="teacher"] #homeSection .smart-dashboard{
  display:grid!important;
  gap:14px!important;
}
body[data-role="teacher"] #homeSection .smart-dashboard>*{
  order:initial!important;
}
body[data-role="teacher"] #homeSection .teacher-home-profile-hero{
  order:initial!important;
}
body[data-role="teacher"] #homeSection .smart-next-lesson{
  order:initial!important;
}
body[data-role="teacher"] #homeSection .dashboard-quick-actions{
  order:initial!important;
}
body[data-role="teacher"] #homeSection .smart-kpis{
  order:initial!important;
}
body[data-role="teacher"] #homeSection .smart-dashboard-hero{
  order:initial!important;
}
body[data-role="teacher"] #homeSection .smart-alert-dashboard-card,
body[data-role="teacher"] #homeSection .smart-today-mini{
  order:initial!important;
}
body[data-role="teacher"] #homeSection .dashboard-action-icon{
  width:32px!important;
  height:32px!important;
  margin:0 auto 5px!important;
  border-radius:10px!important;
  background:#edf4fc!important;
  color:var(--tp-blue-700,#17569a)!important;
  display:grid!important;
  place-items:center!important;
}
body[data-role="teacher"] #homeSection .dashboard-action-icon svg{
  width:17px!important;
  height:17px!important;
  display:block!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
body[data-role="teacher"] #homeSection .smart-dashboard-hero .eyebrow{
  display:none!important;
}
body[data-role="teacher"] #homeSection .smart-dashboard-hero p{
  display:block!important;
  margin:3px 0 0!important;
  color:var(--tp-muted,#66758a)!important;
  font-size:10.5px!important;
}
body[data-role="teacher"] #homeSection .smart-dashboard-hero h3{
  color:var(--tp-ink,#17253a)!important;
  font-size:12px!important;
  font-weight:750!important;
}
body[data-role="teacher"] #homeSection #statsGrid{
  display:none!important;
}
body[data-role="teacher"] #homeSection #homePanels{
  display:block!important;
  margin:0!important;
}
body[data-role="teacher"] #homeSection .dashboard-secondary-grid{
  display:none!important;
}

/* V1.34.23 — Quick Actions Icon Fix; rendering rules live in phase1.css. */

/* V1.34.30 — SEO & identity stabilization; no visual changes. */

/* v1.35.0 — Teacher self-registration & trial */
.trial-offer-card{display:flex;gap:14px;align-items:center;padding:16px;border:1px solid rgba(19,80,145,.16);background:linear-gradient(135deg,#f6faff,#fffaf0);border-radius:18px;margin:0 0 18px}
.trial-offer-card>div:last-child{display:flex;flex-direction:column;gap:4px}
.trial-offer-card b{color:#0b2f66;font-size:1rem}
.trial-offer-card span{color:#637083;font-size:.86rem;line-height:1.65}
.trial-offer-badge{flex:0 0 auto;background:#0b2f66;color:#fff!important;padding:9px 12px;border-radius:999px;font-weight:800;white-space:nowrap}
.self-signup-note{margin-top:14px}
.subscription-state.trial,.status.trial{background:#fff4cf;color:#7b5900;border-color:#f0cf68}
@media(max-width:620px){.trial-offer-card{align-items:flex-start;flex-direction:column}.trial-offer-badge{align-self:flex-start}.self-signup-modal-card .signup-form-grid{grid-template-columns:1fr}}


/* === V1.35.1 Super Admin teachers premium cards === */
#tenantsSection .panel{overflow:visible}
.admin-teachers-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:16px;margin-top:18px}
.admin-teacher-card{position:relative;border:1px solid #dfe6ef;border-radius:24px;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);box-shadow:0 10px 28px rgba(10,47,94,.07);padding:18px;overflow:hidden}
.admin-teacher-card::before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:#1f5c9b}
.admin-teacher-card.trial::before{background:#e5ac21}.admin-teacher-card.expired::before{background:#cf4f5d}.admin-teacher-card.suspended::before{background:#8b96a7}.admin-teacher-card.expiring7::before,.admin-teacher-card.expiring30::before{background:#e28a22}
.admin-teacher-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.admin-teacher-identity{display:flex;align-items:center;gap:12px;min-width:0}
.admin-teacher-avatar{width:58px;height:58px;flex:0 0 58px;border-radius:18px;background:linear-gradient(145deg,#0b315f,#195a98);color:#fff;display:grid;place-items:center;font-size:20px;font-weight:900;border:2px solid #f0b522;overflow:hidden;box-shadow:0 7px 18px rgba(10,47,94,.16)}
.admin-teacher-avatar.has-photo img{width:100%;height:100%;object-fit:cover;display:block}
.admin-teacher-copy{min-width:0}.admin-teacher-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.admin-teacher-copy h3{margin:0;color:#0b315f;font-size:17px;line-height:1.35}.admin-teacher-copy p{margin:3px 0 6px;color:#66758a;font-size:12px}.admin-tenant-id{display:inline-flex;padding:4px 8px;border-radius:999px;background:#f1f5fa;color:#6c7b8d;font-size:10px;font-weight:800;letter-spacing:.3px}
.admin-plan-badge{flex:0 0 auto;background:#fff6dc;color:#8a6715;border:1px solid #f2d886;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:900}
.admin-teacher-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:12px}.admin-teacher-meta-grid>div{min-width:0;border:1px solid #e7ecf2;background:#fff;border-radius:14px;padding:10px}.admin-teacher-meta-grid span{display:block;color:#8a97a8;font-size:10px;margin-bottom:4px}.admin-teacher-meta-grid b{display:block;color:#20344f;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-meta-email{font-size:10.5px!important}
.admin-teacher-subscription-box{display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(135deg,#f5f8fc,#fff);border:1px solid #e0e7f0;border-radius:18px;padding:12px;margin-bottom:14px}.admin-subscription-copy span{display:block;color:#8b97a6;font-size:10px}.admin-subscription-copy b{display:block;color:#0b315f;font-size:13px;margin:3px 0}.admin-subscription-copy small{color:#7c8795;font-size:10px}.admin-usage-ring{--usage:0%;position:relative;width:64px;height:64px;flex:0 0 64px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;background:conic-gradient(#164f89 var(--usage),#e9eef5 0);font-weight:900;color:#0b315f}.admin-usage-ring::after{content:"";position:absolute;inset:6px;border-radius:50%;background:#fff}.admin-usage-ring span,.admin-usage-ring small{position:relative;z-index:1}.admin-usage-ring span{font-size:12px}.admin-usage-ring small{font-size:8px;color:#8a97a8;font-weight:700}
.admin-teacher-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.admin-card-action{min-height:38px;border-radius:12px;border:1px solid #d9e2ec;background:#fff;color:#26415f;font-weight:800;font-size:11px;padding:7px 8px}.admin-card-action.primary{background:#0b3b70;color:#fff;border-color:#0b3b70}.admin-card-action.danger{color:#b14f59;border-color:#f0cdd1;background:#fff8f8}.admin-card-action.success{color:#16704d;border-color:#bfe5d5;background:#f4fcf8}.admin-card-action.ghost{grid-column:1/-1;background:#f7f3ff;color:#66508c;border-color:#ded3f1}.admin-card-action:disabled{opacity:.45}
.admin-tenants-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;gap:6px;padding:36px 18px;border:1px dashed #d9e1eb;border-radius:20px;background:#fbfcfe;color:#708096}.admin-tenants-empty b{color:#173858}
#tenantsSection .tenant-toolbar{align-items:flex-start;gap:12px}#tenantsSection .tenant-toolbar>input{min-height:44px}
@media(max-width:700px){
  .admin-teachers-grid{grid-template-columns:1fr;gap:12px;margin-top:12px}.admin-teacher-card{border-radius:21px;padding:14px}.admin-teacher-avatar{width:52px;height:52px;flex-basis:52px;border-radius:16px}.admin-teacher-copy h3{font-size:15px}.admin-plan-badge{font-size:9px;padding:6px 8px}.admin-teacher-meta-grid{gap:7px}.admin-teacher-meta-grid>div{padding:9px}.admin-teacher-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-card-action.ghost{grid-column:1/-1}.admin-teacher-subscription-box{padding:10px}.admin-usage-ring{width:56px;height:56px;flex-basis:56px}
}


/* v1.35.2 — Subscription request + receipt */
.subscription-receipt-preview{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #dfe6ef;border-radius:16px;background:#f8fbff;margin:-2px 0 12px}.subscription-receipt-preview img{width:78px;height:78px;object-fit:cover;border-radius:12px;border:1px solid #d9e2ec}.request-receipt-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px dashed #cbd8e6;background:#f8fbff;border-radius:14px;padding:10px 12px;margin-top:10px}.request-receipt-row span{font-size:12px;font-weight:800;color:#33506f}.subscription-receipt-modal-card{width:min(620px,94vw)!important}.subscription-receipt-full{display:block;max-width:100%;max-height:72vh;margin:auto;border-radius:16px;object-fit:contain;background:#f4f6f8;border:1px solid #dde5ee}.teacher-renewal-request-card select#teacherRenewalRequestedPlan{font-weight:800;color:#0b315f}

/* v1.35.4 — Payment settings + Paymob checkout */
.payment-settings-panel{display:flex;flex-direction:column;gap:18px}
.payment-settings-status{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--line,#e5e7eb)}
.payment-settings-status h3{margin:2px 0 0}
.payment-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.payment-method-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.payment-method-setting{border:1px solid #dfe6ef;border-radius:18px;padding:14px;background:#fbfcfe;display:flex;flex-direction:column;gap:12px}
.payment-method-setting-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.payment-method-setting-head b{display:block;color:#0b2f66}
.payment-method-setting-head small{display:block;color:#718096;margin-top:3px}
.switch-line{display:inline-flex!important;align-items:center;gap:6px;margin:0!important;font-size:12px;white-space:nowrap}
.switch-line input{width:auto!important;margin:0}
.ltr-input{direction:ltr;text-align:left}
.teacher-payment-instructions{border:1px solid #d8e3f1;background:linear-gradient(180deg,#f8fbff,#fff);border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:10px}
.teacher-payment-instructions-head{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.teacher-payment-instructions-head span{font-weight:800;color:#0b2f66}
.teacher-payment-instructions-head small{color:#718096}
.teacher-payment-methods-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.teacher-payment-method-card{border:1px solid #e3e8ef;background:#fff;border-radius:14px;padding:11px;min-width:0}
.teacher-payment-method-card span{display:block;font-size:11px;color:#6b7280;margin-bottom:4px}
.teacher-payment-method-card b{display:block;overflow-wrap:anywhere;color:#111827}
.teacher-payment-method-card small{display:block;margin-top:5px;color:#7c8798}
.teacher-payment-instructions-text{margin:0;color:#596579;font-size:12px;line-height:1.7}
@media(max-width:700px){.payment-settings-grid,.payment-method-settings-grid,.teacher-payment-methods-info{grid-template-columns:1fr}.payment-settings-status,.teacher-payment-instructions-head{align-items:flex-start;flex-direction:column}}


/* v1.35.4 — Secure Paymob checkout */
.paymob-checkout-card{margin:14px 0;border:1px solid #cfe0f5;background:linear-gradient(180deg,#f7fbff 0%,#fff 100%);border-radius:20px;padding:15px;box-shadow:0 8px 24px rgba(11,47,102,.06)}
.paymob-checkout-head{display:flex;align-items:center;gap:11px;margin-bottom:9px}
.paymob-checkout-icon{width:38px;height:38px;flex:0 0 38px;border-radius:13px;display:grid;place-items:center;background:#e8f8f2;color:#07966f;font-weight:950;font-size:20px;border:1px solid #bcebdc}
.paymob-checkout-head span{display:block;color:#5f6f83;font-size:11px;font-weight:800;margin-bottom:2px}
.paymob-checkout-head b{display:block;color:#0b2f66;font-size:15px}
.paymob-checkout-card p{margin:0 0 11px;color:#526277;font-size:12px;line-height:1.75}
.paymob-checkout-card>small{display:block;margin-top:9px;color:#7a8798;font-size:10.5px;line-height:1.6}
.paymob-checkout-btn{width:100%;margin:0;min-height:48px;font-weight:900}
.paymob-checkout-btn:disabled{opacity:.55;cursor:not-allowed}
.manual-payment-divider{display:flex;align-items:center;gap:10px;margin:18px 0 13px;color:#778499;font-size:11px;font-weight:800}
.manual-payment-divider::before,.manual-payment-divider::after{content:"";height:1px;background:#e3e9f1;flex:1}
.paymob-pending{border-color:#bcd8ff!important;background:linear-gradient(180deg,#f5f9ff,#fff)!important}
.paymob-pending-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.paymob-pending-actions .inline-btn{margin:0;min-height:38px}
@media(max-width:620px){.paymob-checkout-card{padding:13px;border-radius:17px}.paymob-checkout-head b{font-size:14px}.paymob-pending-actions{display:grid;grid-template-columns:1fr 1fr}.paymob-pending-actions .inline-btn{width:100%}}

.request-result-line.paymob-auto{border:1px solid #cfe0f5;background:#f5f9ff;color:#0b4f91;font-weight:800}

/* =========================================================
   v1.36.1 — Product positioning copy refinement
   Scoped to #teacherSignupModal only; no auth/payment logic touched.
   ========================================================= */
#teacherSignupModal .self-signup-modal-card{
  width:min(760px,100%);
  max-height:min(94vh,980px);
  padding:0;
  overflow:auto;
  border:1px solid rgba(255,255,255,.82);
  border-radius:30px;
  background:linear-gradient(180deg,#fff 0%,#fbfcff 100%);
  box-shadow:0 30px 90px rgba(5,30,63,.28);
}
#teacherSignupModal .signup-modal-head{
  position:sticky;top:0;z-index:4;
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:24px 26px 18px;margin:0;
  border-bottom:1px solid #edf1f6;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(16px);
}
#teacherSignupModal .signup-heading-copy{min-width:0}
#teacherSignupModal .signup-heading-copy .eyebrow{font-size:11px;letter-spacing:.3px}
#teacherSignupModal .signup-heading-copy h3{margin:7px 0 5px;font-size:28px;line-height:1.25;color:#0b2f66;letter-spacing:-.2px}
#teacherSignupModal .signup-heading-copy p{margin:0;color:#718096;font-size:13px;line-height:1.75;font-weight:600}
#teacherSignupModal .close-btn{
  flex:0 0 44px;width:44px;height:44px;border-radius:14px;
  border:1px solid #dce3ed;background:#f6f8fb;color:#607086;
  font-size:27px;box-shadow:0 4px 12px rgba(13,42,79,.05);
}
#teacherSignupModal #signupIntroBlock{padding:22px 26px 28px}
#teacherSignupModal .signup-premium-offer{
  position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;
  padding:18px 19px;margin:0 0 22px;overflow:hidden;
  border:1px solid rgba(218,174,60,.30);border-radius:22px;
  background:
    radial-gradient(circle at 95% 0%,rgba(236,190,67,.16),transparent 34%),
    linear-gradient(135deg,#f7faff 0%,#fffaf0 100%);
  box-shadow:0 10px 28px rgba(15,58,112,.055);
}
#teacherSignupModal .signup-premium-offer::before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:linear-gradient(#f2bf38,#c99616)}
#teacherSignupModal .trial-offer-badge{
  width:84px;height:84px;padding:0;border-radius:24px;
  display:grid;place-items:center;align-content:center;gap:0;
  background:linear-gradient(145deg,#123f83,#082d57);color:#fff!important;
  box-shadow:0 10px 24px rgba(8,45,87,.18);
}
#teacherSignupModal .trial-offer-badge span{color:#fff;font-size:30px;line-height:1;font-weight:950}
#teacherSignupModal .trial-offer-badge small{color:#fff;font-size:10px;opacity:.88;font-weight:800;margin-top:4px}
#teacherSignupModal .trial-offer-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
#teacherSignupModal .trial-offer-copy .trial-mini-label{color:#9a7015;font-size:10px;font-weight:900;letter-spacing:.15px}
#teacherSignupModal .trial-offer-copy b{color:#0b2f66;font-size:17px;line-height:1.55}
#teacherSignupModal .trial-offer-copy>span:last-child{color:#6f7c8e;font-size:12.5px;line-height:1.75;font-weight:550}
#teacherSignupModal .trial-check{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#eef6ff;color:#123f83;border:1px solid #d7e4f4;font-weight:950}
#teacherSignupModal .premium-signup-form{margin:0}
#teacherSignupModal .signup-section-title{display:flex;align-items:center;gap:10px;margin:20px 0 10px}
#teacherSignupModal .signup-section-title:first-of-type{margin-top:2px}
#teacherSignupModal .signup-section-title>span{
  width:31px;height:31px;display:grid;place-items:center;flex:0 0 31px;
  border-radius:10px;background:#edf4fc;color:#123f78;font-size:10px;font-weight:950;border:1px solid #dce8f5;
}
#teacherSignupModal .signup-section-title>div{display:flex;flex-direction:column;gap:1px}
#teacherSignupModal .signup-section-title b{font-size:13px;color:#15375f}
#teacherSignupModal .signup-section-title small{font-size:10px;color:#8a95a5;font-weight:600;line-height:1.5}
#teacherSignupModal .signup-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}
#teacherSignupModal .signup-field{margin:0;font-weight:700;font-size:12px;color:#37485f}
#teacherSignupModal .signup-label{display:block;margin:0 2px 6px}
#teacherSignupModal .signup-control{position:relative;display:flex;align-items:center}
#teacherSignupModal .signup-control-icon{
  position:absolute;inset-inline-start:13px;z-index:1;width:27px;height:27px;
  display:grid;place-items:center;color:#8191a5;font-size:15px;font-style:normal;
  pointer-events:none;filter:grayscale(1);opacity:.82;
}
#teacherSignupModal .signup-control input,
#teacherSignupModal .signup-control select{
  width:100%;height:50px;margin:0;padding:0 14px;padding-inline-start:48px;
  border:1px solid #dce3ec;border-radius:15px;background:#fbfcfe;color:#183553;
  outline:none;font-size:13px;font-weight:700;box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease,transform .16s ease;
}
#teacherSignupModal .signup-control select{appearance:none;padding-inline-end:36px;cursor:pointer}
#teacherSignupModal .signup-select-control::after{content:"⌄";position:absolute;inset-inline-end:14px;color:#718096;font-size:16px;pointer-events:none}
#teacherSignupModal .signup-control input::placeholder{color:#a6b0bf;font-weight:650}
#teacherSignupModal .signup-control:focus-within input,
#teacherSignupModal .signup-control:focus-within select{
  border-color:#89a9cf;background:#fff;box-shadow:0 0 0 4px rgba(18,63,120,.075),0 6px 16px rgba(18,63,120,.045);
}
#teacherSignupModal .signup-control:focus-within .signup-control-icon{color:#123f78;opacity:1}
#teacherSignupModal .premium-signup-trust{
  display:flex;align-items:flex-start;gap:10px;padding:13px 14px;margin:18px 0 0;
  border:1px solid rgba(232,173,34,.32);border-radius:16px;background:linear-gradient(135deg,#fffaf0,#fffdf7);color:#73540c;
}
#teacherSignupModal .premium-signup-trust .trust-icon{width:26px;height:26px;display:grid;place-items:center;flex:0 0 26px;border-radius:9px;background:#fff1be;color:#7b5a0b;font-size:12px;font-weight:950}
#teacherSignupModal .premium-signup-trust>div{display:flex;flex-direction:column;gap:2px}
#teacherSignupModal .premium-signup-trust b{font-size:12px;color:#71520c}
#teacherSignupModal .premium-signup-trust span:last-child{font-size:10.5px;color:#8b7337;line-height:1.55}
#teacherSignupModal .signup-submit-btn{
  min-height:54px;margin-top:16px;border-radius:16px;padding:0 18px;
  display:flex;align-items:center;justify-content:center;gap:12px;
  background:linear-gradient(105deg,#17609f 0%,#0d4a82 45%,#082f5f 100%);
  box-shadow:0 14px 28px rgba(9,49,95,.18),inset 0 1px 0 rgba(255,255,255,.18);
  font-size:14px;font-weight:900;
}
#teacherSignupModal .signup-submit-btn:hover{box-shadow:0 16px 32px rgba(9,49,95,.22),inset 0 1px 0 rgba(255,255,255,.2)}
#teacherSignupModal .signup-submit-btn:disabled{opacity:.72;cursor:wait}
#teacherSignupModal .signup-submit-arrow{color:#f2c541;font-size:18px;line-height:1}
#teacherSignupModal .signup-submit-meta{text-align:center;margin-top:9px;color:#8c97a6;font-size:9.5px;font-weight:650;line-height:1.6}

@media(max-width:640px){
  #teacherSignupModal{padding:0;align-items:end}
  #teacherSignupModal .self-signup-modal-card{width:100%;max-width:none;max-height:calc(100dvh - 68px);border-radius:28px 28px 0 0;border-bottom:0}
  #teacherSignupModal .signup-modal-head{padding:18px 18px 14px}
  #teacherSignupModal .signup-heading-copy h3{font-size:24px;margin-top:5px}
  #teacherSignupModal .signup-heading-copy p{font-size:11px;line-height:1.55;max-width:290px}
  #teacherSignupModal .close-btn{width:42px;height:42px;flex-basis:42px}
  #teacherSignupModal #signupIntroBlock{padding:16px 18px calc(24px + env(safe-area-inset-bottom))}
  #teacherSignupModal .signup-premium-offer{grid-template-columns:72px 1fr;gap:12px;padding:14px;margin-bottom:18px;border-radius:20px}
  #teacherSignupModal .trial-offer-badge{width:72px;height:72px;border-radius:21px}
  #teacherSignupModal .trial-offer-badge span{font-size:26px}
  #teacherSignupModal .trial-check{display:none}
  #teacherSignupModal .trial-offer-copy b{font-size:14px}
  #teacherSignupModal .trial-offer-copy>span:last-child{font-size:10.5px;line-height:1.6}
  #teacherSignupModal .signup-form-grid{grid-template-columns:1fr;gap:10px}
  #teacherSignupModal .signup-section-title{margin:17px 0 8px}
  #teacherSignupModal .signup-control input,#teacherSignupModal .signup-control select{height:49px}
  #teacherSignupModal .signup-primary-fields .signup-field-name{order:1}
  #teacherSignupModal .signup-primary-fields .signup-field-phone{order:2}
  #teacherSignupModal .signup-primary-fields .signup-field-email{order:3}
  #teacherSignupModal .signup-primary-fields .signup-field-brand{order:4}
  #teacherSignupModal .premium-signup-trust{margin-top:16px}
  #teacherSignupModal .signup-submit-btn{min-height:54px;margin-top:14px}
}


/* ============================================================
   v1.36.2 — Teacher signup clarity & friction reduction
   - Removes unnecessary location step from self-service signup
   - Keeps subject as a compact standalone field
   - Aligns password guidance with the actual validation rule
   ============================================================ */
#teacherSignupModal .signup-subject-block{margin-top:14px}
#teacherSignupModal .signup-subject-block .signup-field{max-width:none}
#teacherSignupModal .signup-subject-block .signup-label{color:#37485f}
@media(max-width:640px){
  #teacherSignupModal .signup-subject-block{margin-top:10px}
}

/* V1.37.1 — report export renderer: preview === PNG === PDF */
.report-export-preview{display:grid;gap:18px;justify-items:center}
.report-export-page{margin:0;width:min(100%,760px);background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:0 14px 38px rgba(12,39,76,.10)}
.report-export-page img{display:block;width:100%;height:auto;background:#fff}
.report-export-page figcaption{text-align:center;padding:9px 12px;color:var(--muted);font-size:11px;border-top:1px solid var(--line)}
#reportsSection .report-actions-row .inline-btn{min-height:48px}
@media(max-width:560px){.report-export-page{border-radius:16px}.report-export-preview{gap:12px}}


/* ==========================================================
   V1.38.4 — PARENT HOME FINAL PREMIUM REFINEMENT
   Parent-only. Fixes full-report navigation + compact current snapshot.
   ========================================================== */
body[data-role="parent"] #homeSection .home-page-head{
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  min-height:46px!important;margin-bottom:12px!important;gap:12px!important;
}
body[data-role="parent"] #homeSection .home-page-head>div{order:2!important;min-width:0!important;text-align:right!important}
body[data-role="parent"] #homeSection #refreshBtn.parent-home-refresh-btn{
  order:1!important;width:auto!important;height:42px!important;min-width:82px!important;min-height:42px!important;
  padding:0 17px!important;border-radius:14px!important;background:#fff!important;color:#123f78!important;
  border:1px solid #d8e2ed!important;font-size:12px!important;font-weight:850!important;line-height:1!important;
  box-shadow:0 4px 12px rgba(11,45,87,.045)!important;
}
body[data-role="parent"] #homeSection #refreshBtn.parent-home-refresh-btn:active{transform:translateY(1px)!important}
body[data-role="parent"] .app-header-logout{
  min-height:32px!important;height:32px!important;padding:5px 10px!important;border-radius:10px!important;
  font-size:10px!important;font-weight:750!important;background:rgba(255,255,255,.06)!important;
  border:1px solid rgba(255,255,255,.22)!important;color:#fff!important;
}
body[data-role="parent"] #homeSection .parent-home-linked-card{
  border-radius:22px!important;border:1px solid #dce5ef!important;box-shadow:0 7px 22px rgba(11,45,87,.055)!important;
}
body[data-role="parent"] #homeSection .parent-home-student-row{padding:16px 18px 14px!important}
body[data-role="parent"] #homeSection .parent-home-teacher-row{padding:11px 18px 13px!important}
body[data-role="parent"] #homeSection #homePanels>.panel:first-child{padding:17px!important}
body[data-role="parent"] #homeSection #homePanels>.panel:first-child>h3{margin-bottom:13px!important;font-size:20px!important}
body[data-role="parent"] .parent-home-summary-metric{
  min-height:105px!important;padding:14px 13px 12px!important;display:flex!important;flex-direction:column!important;
  justify-content:flex-end!important;align-items:flex-start!important;
}
body[data-role="parent"] .parent-home-summary-metric .parent-summary-label{padding-inline-start:31px!important;min-height:24px!important}
body[data-role="parent"] .parent-home-summary-metric>b{font-size:24px!important;line-height:1.05!important;margin-top:9px!important}
body[data-role="parent"] .parent-home-summary-metric>small{
  display:block;margin-top:7px;font-size:10.5px;line-height:1.35;color:#728096;font-weight:700;
}
body[data-role="parent"] .parent-home-last-updated{
  margin-top:10px;padding-top:10px;border-top:1px solid #edf1f6;text-align:right;color:#8b97a7;font-size:10.5px;font-weight:650;
}
body[data-role="parent"] .parent-home-empty-summary{
  grid-column:1/-1!important;min-height:92px!important;display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;gap:5px!important;text-align:center!important;padding:16px!important;
}
body[data-role="parent"] .parent-home-empty-summary b{font-size:13px!important;margin:0!important;color:#173557!important}
body[data-role="parent"] .parent-home-empty-summary span{font-size:10.5px!important;line-height:1.55!important;color:#7c8999!important}
body[data-role="parent"] .parent-home-glance-panel{padding:17px!important}
body[data-role="parent"] .parent-home-glance-head{margin-bottom:13px!important;align-items:flex-end!important}
body[data-role="parent"] .parent-home-glance-head>div{display:flex;flex-direction:column;gap:2px;min-width:0}
body[data-role="parent"] .parent-home-glance-head h3{font-size:20px!important;line-height:1.25!important}
body[data-role="parent"] .parent-home-glance-head small{font-size:10.5px;color:#8995a5;font-weight:650}
body[data-role="parent"] .parent-home-glance-head>span{padding:5px 8px;border-radius:999px;background:#f5f7fb;color:#758398!important;font-size:10px!important}
body[data-role="parent"] .parent-home-update-card,
body[data-role="parent"] .parent-home-finance-compact{
  min-height:94px!important;padding:14px!important;border-radius:17px!important;background:#fbfcfe!important;
  border:1px solid #dde6ef!important;box-shadow:none!important;
}
body[data-role="parent"] .parent-home-update-copy b{font-size:14.5px!important;line-height:1.45!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
body[data-role="parent"] .parent-home-update-copy small{margin-top:2px;font-size:10.5px!important}
body[data-role="parent"] .parent-home-update-icon{width:54px!important;height:54px!important;flex-basis:54px!important;border-radius:16px!important;font-size:17px!important}
body[data-role="parent"] .parent-home-finance-compact{align-items:stretch!important;justify-content:center!important}
body[data-role="parent"] .parent-home-finance-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
body[data-role="parent"] .parent-home-finance-status{
  font-style:normal;padding:5px 8px;border-radius:999px;font-size:9.5px;font-weight:850;background:#eef3f8;color:#65758a;white-space:nowrap;
}
body[data-role="parent"] .parent-home-finance-compact.paid .parent-home-finance-status{background:#eaf8f2;color:#16805d}
body[data-role="parent"] .parent-home-finance-compact.due .parent-home-finance-status{background:#fff4d9;color:#8b6712}
body[data-role="parent"] .parent-home-finance-compact.clear .parent-home-finance-status{background:#eef3f8;color:#65758a}
body[data-role="parent"] .parent-home-finance-compact b{font-size:22px!important;margin-top:8px!important}
body[data-role="parent"] .parent-home-details-cta{
  margin:2px 0 12px!important;padding:14px!important;border-radius:19px!important;background:#fff!important;color:#173557!important;
  border:1px solid #dbe5ef!important;box-shadow:0 6px 18px rgba(11,45,87,.05)!important;display:flex!important;
  align-items:center!important;justify-content:space-between!important;gap:13px!important;
}
body[data-role="parent"] .parent-home-details-copy{display:flex!important;align-items:center!important;gap:11px!important;min-width:0!important;flex:1 1 auto!important}
body[data-role="parent"] .parent-home-details-copy>div{display:flex;flex-direction:column;gap:2px;min-width:0}
body[data-role="parent"] .parent-home-details-copy b{font-size:14px!important;color:#173557!important}
body[data-role="parent"] .parent-home-details-copy span{font-size:10.5px!important;color:#758398!important;line-height:1.55!important}
body[data-role="parent"] .parent-home-report-icon{
  width:42px;height:42px;min-width:42px;border-radius:13px;background:#eef4fb;color:#17569a;display:grid;place-items:center;
}
body[data-role="parent"] .parent-home-report-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body[data-role="parent"] .parent-home-details-btn{
  width:auto!important;min-width:126px!important;min-height:42px!important;padding:10px 13px!important;border-radius:13px!important;
  background:linear-gradient(135deg,#17569a,#0b2d57)!important;color:#fff!important;border:0!important;font-size:11.5px!important;
  font-weight:850!important;box-shadow:none!important;white-space:nowrap!important;
}
@media(max-width:520px){
  body[data-role="parent"] #homeSection .home-page-head{padding-inline:1px!important}
  body[data-role="parent"] #homeSection #refreshBtn.parent-home-refresh-btn{min-width:76px!important;height:40px!important;min-height:40px!important;padding:0 14px!important}
  body[data-role="parent"] .parent-home-summary-metric{min-height:101px!important;padding:13px 12px 11px!important}
  body[data-role="parent"] .parent-home-summary-metric>b{font-size:23px!important}
  body[data-role="parent"] .parent-home-glance-grid{grid-template-columns:1fr!important;gap:10px!important}
  body[data-role="parent"] .parent-home-details-cta{align-items:stretch!important;flex-direction:column!important;padding:13px!important}
  body[data-role="parent"] .parent-home-details-btn{width:100%!important;min-height:44px!important}
  body[data-role="parent"] .parent-home-details-copy{align-items:flex-start!important}
}

/* V1.40.1 — explicit business Teacher Code identity */
.admin-teacher-code{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.admin-teacher-code small{color:#7a8798;font-size:10px;font-weight:700}
.admin-teacher-code .admin-tenant-id{margin:0}

/* V1.40.7 — per-session billing */
.student-finance-billing-detail{
  display:block;
  margin-top:6px;
  color:var(--muted,#6b7788);
  font-size:.82rem;
  font-weight:700;
}
.parent-finance-billing{
  margin-bottom:12px;
  padding:10px 12px;
  border:1px solid rgba(18,63,120,.12);
  border-radius:12px;
  background:rgba(18,63,120,.045);
  color:#123f78;
  font-weight:800;
  text-align:center;
}

.qr-attendance-panel{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 14px;padding:16px 17px;border:1px solid #D9E5F0;border-radius:18px;background:#F7FBFF}.qr-attendance-copy h3{margin:3px 0 5px;color:var(--deep-navy);font-size:17px}.qr-attendance-copy p{margin:0;color:var(--muted);font-size:11px;line-height:1.8}.qr-attendance-open-btn{margin:0!important;min-width:170px}.qr-attendance-modal{z-index:1200;background:rgba(5,20,39,.72);backdrop-filter:blur(8px)}.qr-attendance-card{width:min(94vw,520px);max-height:min(92vh,820px);overflow:auto;border-radius:24px;padding:18px;background:#fff}.qr-attendance-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.qr-attendance-head h3{margin:3px 0}.qr-attendance-progress{margin:15px 0 12px;padding:12px;border:1px solid #E1E8F0;border-radius:15px;background:#F8FAFD}.qr-attendance-progress>div:first-child{display:flex;justify-content:space-between}.qr-attendance-progress-track{height:7px;margin-top:9px;border-radius:999px;background:#E7EDF4;overflow:hidden}.qr-attendance-progress-track i{display:block;width:0;height:100%;background:#16805D}.qr-attendance-reader{min-height:270px;border-radius:18px;overflow:hidden;background:#071A2C}.qr-attendance-reader video{object-fit:cover!important}.qr-attendance-status{margin-top:12px;padding:12px;border-radius:14px;background:#F8FAFD}.qr-attendance-status b,.qr-attendance-status span{display:block}.qr-attendance-status.success{background:#ECF9F3;color:#137253}.qr-attendance-status.duplicate{background:#FFF8E6;color:#8A6812}.qr-attendance-status.error{background:#FFF0F2;color:#A93847}.qr-attendance-manual{margin-top:12px}.qr-attendance-manual>div{display:grid;grid-template-columns:1fr auto;gap:8px}.qr-attendance-actions{display:flex;gap:8px;margin-top:13px}.qr-attendance-actions button{flex:1}.lesson-student-card.qr-attendance-hit{outline:3px solid rgba(30,157,113,.18)}@media(max-width:620px){.qr-attendance-panel{flex-direction:column;align-items:stretch}.qr-attendance-open-btn{width:100%}.qr-attendance-card{width:calc(100vw - 18px)}}

/* V1.41.7 — Assistant / Staff Accounts */
.staff-management-panel{margin:18px 0}
.staff-management-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:14px}
.staff-management-head h3{margin:4px 0}.staff-management-head p{margin:0}
.staff-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}
.staff-item{border:1px solid #dfe7ef;border-radius:16px;padding:14px;background:#fff}
.staff-item.inactive{opacity:.72;background:#fafbfc}
.staff-item-main{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.staff-item-main b{display:block;color:var(--deep-navy);font-size:15px}.staff-item-main span.ltr-value{display:block;margin-top:4px;font-size:11px;color:var(--muted)}
.staff-item p{font-size:11px;color:var(--muted);line-height:1.7;margin:10px 0}
.staff-item-actions{display:flex;gap:7px;flex-wrap:wrap}
.staff-permissions-box{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0;padding:12px;border:1px solid #e1e8f0;border-radius:14px;background:#f8fafc}
.staff-permissions-box>b,.staff-permissions-box>small{grid-column:1/-1}.staff-permissions-box label{display:flex;gap:8px;align-items:center;margin:0;padding:8px;border-radius:10px;background:#fff;border:1px solid #e7edf3}
.staff-permissions-box input{width:auto;margin:0}
.staff-readonly-chip{display:inline-flex;padding:6px 10px;border-radius:999px;background:#eef3f8;color:#63748a;font-size:10px;font-weight:800}
.staff-session-panel{margin-top:14px}
.staff-credentials-card .credentials-grid{margin:14px 0}
@media(max-width:620px){.staff-management-head{flex-direction:column}.staff-management-head .primary-btn{width:100%}.staff-permissions-box{grid-template-columns:1fr}.staff-list{grid-template-columns:1fr}}


/* V1.41.8 — Teacher-defined assistant passwords */
.staff-password-field{margin:12px 0}
.password-input-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:stretch}
.password-input-row input{margin:0!important;min-width:0}
.password-eye-btn{margin:0!important;min-width:76px;padding-inline:12px}
.password-rules{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.password-rules span{
  font-size:9.5px;color:#7b8796;background:#f3f6f9;border:1px solid #e1e7ee;
  border-radius:999px;padding:5px 8px;transition:.18s ease
}
.password-rules span.pass{color:#137253;background:#ecf9f3;border-color:#bfe9d8}
@media(max-width:420px){
  .password-input-row{grid-template-columns:1fr}
  .password-eye-btn{width:100%}
}

/* V1.41.10 — App-native student group picker + derived grade */
#studentGrade[readonly]{background:#f4f7fa;color:#506174;cursor:default}
.app-select-trigger{
  width:100%;min-height:58px;border:1px solid #d9e2ec;border-radius:16px;background:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;
  color:var(--deep-navy);font:inherit;font-weight:700;text-align:right;cursor:pointer;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease
}
.app-select-trigger:focus,.app-select-trigger:focus-visible{
  outline:none;border-color:#8aa9c8;box-shadow:0 0 0 4px rgba(23,86,154,.10)
}
.app-select-trigger.has-value{background:#fbfdff}
.app-select-trigger .app-select-placeholder{color:#9aa7b7;font-weight:600}
.app-select-chevron{font-size:22px;line-height:1;color:#5d7187;transform:translateY(-2px)}
.app-picker-card{
  max-width:560px;max-height:min(78vh,720px);display:flex;flex-direction:column;
  padding-bottom:max(16px,env(safe-area-inset-bottom))
}
.app-picker-list{
  display:flex;flex-direction:column;gap:8px;overflow:auto;padding:4px 2px 2px;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch
}
.app-picker-option{
  width:100%;border:1px solid #e0e7ef;background:#fff;border-radius:15px;
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;
  padding:13px 14px;text-align:right;color:var(--deep-navy);font:inherit;cursor:pointer
}
.app-picker-option.selected{border-color:#d7b33f;background:#fffaf0;box-shadow:0 0 0 1px rgba(215,179,63,.12)}
.app-picker-radio{width:20px;height:20px;border:2px solid #9aa8b8;border-radius:50%;position:relative}
.app-picker-option.selected .app-picker-radio{border-color:#d2a91e}
.app-picker-option.selected .app-picker-radio::after{content:"";position:absolute;inset:4px;border-radius:50%;background:#d2a91e}
.app-picker-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.app-picker-copy b{font-size:14px;white-space:normal}
.app-picker-copy small{font-size:10.5px;color:#748397}
.app-picker-check{font-size:17px;color:#b58c10;font-weight:900}
@media(max-width:620px){
  #studentGroupPickerModal .modal-card{
    position:fixed;left:12px;right:12px;bottom:12px;top:auto;width:auto;max-width:none;
    max-height:78vh;border-radius:24px
  }
}

/* V1.41.11 — reliable custom picker interaction */
#studentGroupPickerModal{z-index:99999}
#studentGroupPickerModal.hidden{display:none!important}
#studentGroupPickerModal:not(.hidden){display:flex!important;pointer-events:auto}
#studentGroupPickerModal .modal-backdrop{pointer-events:auto}
#studentGroupPickerModal .modal-card{pointer-events:auto;z-index:2}
#studentGroupPickerBtn{position:relative;z-index:1;pointer-events:auto!important}

/* V1.41.12 — Unified TABEA ONE custom select system */
.app-native-select-source{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
}
.app-global-select-trigger{margin-top:0}
.app-global-select-trigger:disabled{opacity:.55;cursor:not-allowed}
#appSelectModal{z-index:100000}
#appSelectModal.hidden{display:none!important}
#appSelectModal:not(.hidden){display:flex!important;pointer-events:auto}
#appSelectModal .modal-card{pointer-events:auto;z-index:2}
.app-select-search-wrap{padding:0 2px 10px}
.app-select-search-wrap input{
  width:100%;min-height:48px;border:1px solid #dce4ed;border-radius:14px;
  background:#f8fafc;padding:0 14px;font:inherit;color:var(--deep-navy)
}
.app-picker-option.disabled{opacity:.45;cursor:not-allowed}
@media(max-width:620px){
  #appSelectModal .modal-card{
    position:fixed;left:12px;right:12px;bottom:12px;top:auto;width:auto;max-width:none;
    max-height:82vh;border-radius:24px
  }
}

/* V1.41.13 — hard native-select blocker */
.app-select-shell{
  display:block;
  width:100%;
  position:relative;
}
.app-select-shell > .app-global-select-trigger{
  width:100%;
}
.app-select-shell > .app-native-select-source{
  position:absolute!important;
  inset:0!important;
  width:1px!important;
  height:1px!important;
  margin:0!important;
  padding:0!important;
  opacity:0!important;
  pointer-events:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
select[data-app-select-enhanced="1"]{
  pointer-events:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}

/* V1.41.14 — WhatsApp group action */
.group-whatsapp-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border-color:#bfe8d5;
  background:#effaf5;
  color:#137253;
  font-weight:800;
}
.group-whatsapp-btn span{
  font-size:16px;
  line-height:1;
}
.master-group-actions{
  flex-wrap:wrap;
}

/* V1.41.15 — Group card actions polish */
.master-group-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
}
.group-main-action-row{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
}
.group-main-action-row .group-lesson-btn{
  flex:1 1 auto;
  min-width:0;
}
.group-main-action-row .row-more-menu{
  flex:0 0 auto;
}
.group-whatsapp-btn{
  width:100%;
  min-height:50px;
  border:1px solid #b9e7d3;
  border-radius:15px;
  background:#eefaf5;
  color:#146b50;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:0 16px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 5px 16px rgba(19,114,83,.06);
}
.group-whatsapp-btn:active{
  transform:translateY(1px);
}
.group-whatsapp-icon{
  width:26px;
  height:26px;
  border-radius:50%;
  background:#d8f3e8;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
  line-height:1;
}

/* V1.41.16 — Professional group action hierarchy */
.master-group-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
}
.group-primary-action{
  width:100%;
  min-height:54px;
  border-radius:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  white-space:nowrap;
}
.group-secondary-action-row{
  display:flex;
  align-items:stretch;
  gap:10px;
  width:100%;
}
.group-secondary-action-row .group-whatsapp-btn{
  flex:1 1 auto;
  width:auto;
  min-width:0;
  min-height:50px;
}
.group-secondary-spacer{
  flex:1 1 auto;
}
.group-more-menu{
  flex:0 0 56px;
  width:56px;
}
.group-more-trigger{
  width:56px!important;
  min-width:56px!important;
  height:50px!important;
  min-height:50px!important;
  border-radius:15px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:27px!important;
  line-height:1!important;
  padding:0!important;
}
@media(max-width:420px){
  .group-secondary-action-row{gap:8px}
  .group-more-menu{flex-basis:54px;width:54px}
  .group-more-trigger{
    width:54px!important;
    min-width:54px!important;
  }
}


/* V1.42.2 — in-app replacement for browser alert / confirm / prompt dialogs */
.app-dialog-modal{z-index:14000}
.app-dialog-card{width:min(520px,100%);overflow:hidden;padding:0!important;direction:rtl}
.app-dialog-top{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 4px}
.app-dialog-brand-mark{width:42px;height:42px;border-radius:14px;background:linear-gradient(145deg,#0b2f66,#154f8d);display:grid;place-items:center;box-shadow:0 8px 20px rgba(11,47,102,.18)}
.app-dialog-brand-mark img{width:27px;height:27px;object-fit:contain}
.app-dialog-close{flex:0 0 auto}
.app-dialog-copy{padding:7px 22px 0;text-align:right}
.app-dialog-copy .eyebrow{display:block;color:var(--gold);font-size:11px;font-weight:900;letter-spacing:.08em;margin-bottom:5px}
.app-dialog-copy h3{margin:0;color:var(--navy);font-size:24px;line-height:1.45}
.app-dialog-copy p{margin:10px 0 0;color:#5e697b;font-size:14px;font-weight:650;line-height:1.9;white-space:pre-line}
.app-dialog-field{padding:15px 22px 0}
.app-dialog-field label{display:block;color:var(--navy);font-size:12px;font-weight:850;margin-bottom:7px}
.app-dialog-field textarea{display:block;width:100%;min-height:92px;resize:vertical;border:1px solid #dce3ec;border-radius:15px;background:#f8fafc;padding:12px 13px;font:inherit;color:#15243a;outline:none;box-sizing:border-box;direction:rtl;text-align:right}
.app-dialog-field textarea:focus{border-color:#2c659e;box-shadow:0 0 0 3px rgba(44,101,158,.10);background:#fff}
.app-dialog-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:10px;padding:20px 22px 22px;margin-top:4px}
.app-dialog-actions button{min-height:48px;border-radius:15px;font-weight:900;font-size:14px}
.app-dialog-confirm{border:0;padding:11px 16px;cursor:pointer}
.app-dialog-confirm.primary{background:var(--navy);color:#fff;box-shadow:0 10px 22px rgba(11,47,102,.16)}
.app-dialog-confirm.danger{background:#b42335;color:#fff;box-shadow:0 10px 22px rgba(180,35,53,.15)}
.app-dialog-modal[data-variant="danger"] .app-dialog-brand-mark{background:linear-gradient(145deg,#8f1d2d,#be3042)}
@media(max-width:620px){
  .app-dialog-card{border-radius:26px 26px 0 0!important;padding-bottom:env(safe-area-inset-bottom)!important}
  .app-dialog-top{padding:17px 18px 3px}.app-dialog-copy{padding:6px 18px 0}.app-dialog-copy h3{font-size:21px}.app-dialog-copy p{font-size:13px;line-height:1.85}
  .app-dialog-field{padding:14px 18px 0}.app-dialog-actions{padding:18px;grid-template-columns:1fr 1.2fr}.app-dialog-actions button{min-height:46px}
}


/* =========================
   V1.42.3 IN-APP DATE / MONTH PICKER + COMPACT GROUP SCHEDULE
   ========================= */
.app-picker-modal{z-index:13950}.app-picker-card{width:min(520px,calc(100% - 28px));padding:0!important;overflow:hidden;direction:rtl}
.app-picker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:19px 20px 11px;border-bottom:1px solid #edf1f5}.app-picker-head .eyebrow{color:var(--gold);font-weight:900;font-size:10px;letter-spacing:.08em}.app-picker-head h3{margin:4px 0 0;color:var(--navy);font-size:21px}
.app-picker-selected{margin:13px 18px 0;padding:11px 13px;border-radius:13px;background:#f4f7fb;color:#53667d;font-size:12px;font-weight:800;text-align:center;min-height:19px}
.app-picker-nav{display:grid;grid-template-columns:42px 1fr 42px;align-items:center;gap:8px;padding:13px 18px 9px}.app-picker-nav b{text-align:center;color:var(--navy);font-size:15px}.app-picker-nav button{width:40px;height:40px;border:1px solid #e0e6ee;border-radius:12px;background:#fff;color:var(--navy);font-size:28px;line-height:1;display:grid;place-items:center;cursor:pointer}
.app-picker-weekdays,.app-picker-day-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;padding-inline:18px}.app-picker-weekdays{padding-bottom:5px}.app-picker-weekdays span{text-align:center;color:#8290a1;font-size:10px;font-weight:900}
.app-picker-grid button{font:inherit;border:0;cursor:pointer}.app-picker-day-grid{padding-bottom:12px}.app-picker-day{aspect-ratio:1;border-radius:13px!important;background:transparent;color:#24364d;font-size:13px;font-weight:800}.app-picker-day.muted{color:#b2bac6}.app-picker-day.today{box-shadow:inset 0 0 0 1px #d8b54b;color:#8a6509}.app-picker-day.selected{background:var(--navy)!important;color:#fff!important;box-shadow:0 5px 12px rgba(11,47,102,.15)}
.app-picker-month-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:5px 18px 18px}.app-picker-month{min-height:50px;border-radius:13px!important;background:#f7f9fc;color:#475b72;font-weight:850}.app-picker-month.current{box-shadow:inset 0 0 0 1px #d8b54b;color:#85620c}.app-picker-month.selected{background:var(--navy)!important;color:#fff!important;box-shadow:0 5px 12px rgba(11,47,102,.14)}
.app-picker-actions{display:grid;grid-template-columns:.8fr 1fr 1.2fr;gap:9px;padding:14px 18px 19px;border-top:1px solid #edf1f5}.app-picker-actions button{min-height:46px;border-radius:14px;font-weight:900}
input[data-app-picker-mode]{cursor:pointer}
@media(max-width:640px){.app-picker-card{width:calc(100% - 24px);border-radius:25px!important}.app-picker-head{padding:17px 18px 10px}.app-picker-head h3{font-size:19px}.app-picker-selected{margin-inline:15px}.app-picker-nav{padding-inline:15px}.app-picker-weekdays,.app-picker-day-grid{padding-inline:15px}.app-picker-month-grid{padding-inline:15px}.app-picker-actions{padding:13px 15px 17px}.schedule-day-times{grid-template-columns:1fr 1fr}.schedule-day-times label{grid-template-columns:28px 1fr}}

/* =========================
   V1.42.4 UI POLISH — PICKER ACTIONS + GROUP SCHEDULE RESPONSIVE FIX
   ========================= */
.app-picker-actions{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.app-picker-actions button{
  width:100%;
  min-width:0;
  min-height:48px;
  padding-inline:10px;
  white-space:nowrap;
}

.schedule-day-editor{
  min-width:0;
}
.schedule-day-times{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  width:100%;
  min-width:0;
}
.schedule-day-times label{
  display:grid;
  grid-template-columns:26px minmax(0,1fr);
  align-items:center;
  gap:7px;
  min-width:0;
  width:100%;
  overflow:visible;
}
.schedule-day-times label > span{
  width:26px;
  text-align:center;
  white-space:nowrap;
}
.schedule-day-times input[type="time"]{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  padding:8px 6px;
  direction:ltr;
  text-align:center;
  font-size:13px;
}

@media(max-width:420px){
  .group-schedule-editor{padding:11px;margin-inline:0}
  .schedule-day-editor{padding-inline:11px}
  .schedule-day-row{min-height:56px;gap:10px}
  .schedule-day-name{gap:7px}
  .schedule-day-times{gap:8px}
  .schedule-day-times label{grid-template-columns:22px minmax(0,1fr);gap:5px}
  .schedule-day-times label > span{width:22px;font-size:10px}
  .schedule-day-times input[type="time"]{font-size:12px;padding-inline:3px}
  .app-picker-actions{gap:8px;padding-inline:14px}
  .app-picker-actions button{font-size:13px;padding-inline:6px}
}


/* =========================
   V1.42.5 IN-APP TIME PICKER + EQUAL PICKER ACTIONS
   ========================= */
.app-time-picker-modal{z-index:13960}
.app-time-picker-card{width:min(480px,calc(100% - 28px));padding:0!important;overflow:hidden;direction:rtl}
.app-time-selected{margin:14px 18px 2px;padding:16px 14px;border-radius:16px;background:#f4f7fb;color:var(--navy);font-size:30px;line-height:1;font-weight:900;text-align:center;letter-spacing:.02em}
.app-time-picker-body{padding:14px 18px 16px;display:grid;gap:14px}
.app-time-section{display:grid;gap:8px}.app-time-label{font-size:11px;font-weight:900;color:#6d7d90}
.app-time-hours{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}
.app-time-minutes{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;max-height:116px;overflow:auto;padding:1px;scrollbar-width:none}.app-time-minutes::-webkit-scrollbar{display:none}
.app-time-hours button,.app-time-minutes button{min-width:0;height:42px;border:1px solid #e3e8ef;border-radius:12px;background:#f8fafc;color:#324960;font:inherit;font-size:13px;font-weight:900;cursor:pointer}
.app-time-hours button.selected,.app-time-minutes button.selected{background:var(--navy);border-color:var(--navy);color:#fff;box-shadow:0 5px 12px rgba(11,47,102,.14)}
.app-time-period{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding-top:2px}.app-time-period button{min-height:46px;border:1px solid #dfe6ee;border-radius:14px;background:#fff;color:#52657a;font:inherit;font-weight:900}.app-time-period button.selected{background:#fff6d8;border-color:#e5c85e;color:#74550b}
.app-time-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:14px 18px 19px;border-top:1px solid #edf1f5}.app-time-actions button{width:100%;min-width:0;min-height:48px;border-radius:14px;font-weight:900;white-space:nowrap}
/* Month/date footer actions are intentionally equal-size. */
.app-picker-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.app-picker-actions button{width:100%!important;min-width:0!important;min-height:48px!important}
input[data-app-time-picker="1"]{cursor:pointer}
@media(max-width:420px){
  .app-time-picker-card{width:calc(100% - 24px);border-radius:25px!important}
  .app-time-selected{font-size:27px;margin-inline:15px}
  .app-time-picker-body{padding-inline:15px}
  .app-time-hours,.app-time-minutes{grid-template-columns:repeat(4,1fr)}
  .app-time-actions{gap:8px;padding-inline:14px}.app-time-actions button{font-size:13px;padding-inline:6px}
}
\n\n/* V1.42.7 — branded email verification result */\n.email-action-view{position:fixed;inset:0;z-index:20000;display:flex;align-items:center;justify-content:center;padding:24px;background:linear-gradient(160deg,#082c55 0%,#0e477d 56%,#123b68 100%);direction:rtl}\n.email-action-view.hidden{display:none!important}\n.email-action-shell{width:min(100%,460px);background:#fff;border-radius:30px;padding:34px 26px 28px;text-align:center;box-shadow:0 24px 70px rgba(3,21,42,.34);border:1px solid rgba(255,255,255,.55)}\n.email-action-brand{display:flex;align-items:center;justify-content:center;gap:13px;margin-bottom:27px;color:#123e70}\n.email-action-brand img{width:64px;height:64px;border-radius:18px;box-shadow:0 10px 28px rgba(18,62,112,.18)}\n.email-action-brand div{display:flex;flex-direction:column;align-items:flex-start;line-height:1.05}\n.email-action-brand span{font-size:20px;font-weight:900;letter-spacing:.3px}\n.email-action-brand small{font-size:15px;font-weight:800;color:#c99412;margin-top:6px}\n.email-action-status{width:78px;height:78px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 22px;font-size:42px;font-weight:900}\n.email-action-status.pending{background:#eef4fb;color:#164f8f}\n.email-action-status.success{background:#e8f7f1;color:#15765e}\n.email-action-status.error{background:#fff0f0;color:#b33a3a}\n.email-action-shell h1{margin:0 0 13px;color:#0e3767;font-size:clamp(25px,6vw,32px);line-height:1.35;font-weight:900}\n.email-action-shell p{margin:0 auto 26px;max-width:360px;color:#68778b;font-size:16px;line-height:1.9}\n.email-action-primary{width:100%;min-height:58px;border:0;border-radius:17px;background:#164f8f;color:#fff;font:inherit;font-weight:900;font-size:17px;box-shadow:0 10px 24px rgba(22,79,143,.2)}\n.email-action-primary:disabled{opacity:.55;cursor:wait}\n.email-action-foot{margin-top:18px;color:#9aa5b3;font-size:12px}\nbody.email-action-active{overflow:hidden}\n

/* V1.42.8 — isolated standalone email verification route */
html.tabea-email-action-mode,
html.tabea-email-action-mode body{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  min-height:100%!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#082d57!important;
}
html.tabea-email-action-mode body > *:not(#emailActionView):not(script){
  display:none!important;
}
html.tabea-email-action-mode #emailActionView{
  display:flex!important;
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100dvh!important;
  min-height:100vh!important;
  max-width:none!important;
  margin:0!important;
  padding:max(24px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:auto!important;
  background:
    radial-gradient(circle at 85% 8%,rgba(232,173,34,.15),transparent 28%),
    radial-gradient(circle at 12% 88%,rgba(255,255,255,.08),transparent 34%),
    linear-gradient(155deg,#061d3b 0%,#0a3768 48%,#0f4d86 100%)!important;
  transform:none!important;
  zoom:1!important;
  z-index:2147483647!important;
}
html.tabea-email-action-mode #emailActionView.hidden{display:flex!important}
html.tabea-email-action-mode .email-action-shell{
  width:min(100%,480px)!important;
  max-width:480px!important;
  margin:auto!important;
  padding:38px 30px 28px!important;
  border-radius:30px!important;
  background:#fff!important;
  box-shadow:0 28px 90px rgba(0,15,34,.38)!important;
  border:1px solid rgba(255,255,255,.72)!important;
  transform:none!important;
}
html.tabea-email-action-mode .email-action-brand{
  margin-bottom:30px!important;
  gap:14px!important;
}
html.tabea-email-action-mode .email-action-brand img{
  width:70px!important;
  height:70px!important;
  border-radius:20px!important;
}
html.tabea-email-action-mode .email-action-brand div{
  align-items:flex-start!important;
}
html.tabea-email-action-mode .email-action-brand span{
  font-size:21px!important;
  white-space:nowrap!important;
}
html.tabea-email-action-mode .email-action-brand small{
  font-size:15px!important;
}
html.tabea-email-action-mode .email-action-status{
  width:84px!important;
  height:84px!important;
  font-size:44px!important;
  margin-bottom:24px!important;
  box-shadow:0 12px 30px rgba(18,62,112,.08)!important;
}
html.tabea-email-action-mode .email-action-shell h1{
  font-size:clamp(26px,5vw,32px)!important;
  margin-bottom:14px!important;
}
html.tabea-email-action-mode .email-action-shell p{
  font-size:16px!important;
  line-height:1.9!important;
  margin-bottom:28px!important;
}
html.tabea-email-action-mode .email-action-primary{
  min-height:60px!important;
  border-radius:16px!important;
  font-size:17px!important;
}
html.tabea-email-action-mode .email-action-foot{
  margin-top:20px!important;
  font-size:12px!important;
}
@media (max-width:560px){
  html.tabea-email-action-mode #emailActionView{
    align-items:center!important;
    padding:20px 16px max(20px,env(safe-area-inset-bottom))!important;
  }
  html.tabea-email-action-mode .email-action-shell{
    width:100%!important;
    padding:32px 22px 24px!important;
    border-radius:26px!important;
  }
  html.tabea-email-action-mode .email-action-brand img{
    width:62px!important;
    height:62px!important;
  }
  html.tabea-email-action-mode .email-action-brand span{font-size:19px!important}
}

/* QR attendance mobile close/accessibility fix */
.qr-attendance-modal{overscroll-behavior:contain}
.qr-attendance-card{position:relative;overscroll-behavior:contain}
.qr-attendance-close{z-index:1305}
@media(max-width:620px){
  .qr-attendance-modal{align-items:flex-start;padding:0}
  .qr-attendance-card{
    width:100vw;
    max-width:100vw;
    height:100dvh;
    max-height:100dvh;
    border-radius:0;
    padding:calc(16px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  .qr-attendance-close{
    position:fixed;
    top:calc(10px + env(safe-area-inset-top));
    left:12px;
    width:46px;
    height:46px;
    min-width:46px;
    border-radius:14px;
    background:#fff;
    border:1px solid #d9e5f0;
    box-shadow:0 8px 22px rgba(5,20,39,.18);
    font-size:28px;
    line-height:1;
    display:grid;
    place-items:center;
    z-index:1305;
  }
  .qr-attendance-head{padding-left:54px}
  .qr-attendance-reader{min-height:240px}
  .qr-attendance-actions{position:sticky;bottom:0;background:#fff;padding:10px 0 calc(4px + env(safe-area-inset-bottom));z-index:2}
}
