:root{
  --portal-bg:#f4f7fb;
  --portal-surface:#ffffff;
  --portal-surface-muted:#f7f9fd;
  --portal-border:#dbe3ef;
  --portal-ink:#192338;
  --portal-muted:#677792;
  --portal-brand:#14cfbc;
  --portal-brand-dark:#0d8076;
  --portal-accent:#5c51a2;
  --portal-accent-soft:#f1efff;
  --portal-success:#eaf9f4;
  --portal-success-ink:#158763;
  --portal-warning:#fff5e5;
  --portal-warning-ink:#a36508;
  --portal-info:#eef3ff;
  --portal-info-ink:#5463b8;
  --portal-shadow:0 18px 42px rgba(17, 30, 54, .08);
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,
body{
  min-height:100%;
}

body{
  position:relative;
  isolation:isolate;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  margin:0;
  padding-top:var(--nav-h, 64px); /* clear the fixed global navbar */
  color:var(--portal-ink);
  background:
    radial-gradient(620px 620px at 6% 8%, rgba(20,207,188,.16), transparent 72%),
    radial-gradient(720px 720px at 100% 0%, rgba(92,81,162,.18), transparent 74%),
    radial-gradient(560px 560px at 10% 74%, rgba(92,81,162,.12), transparent 76%),
    radial-gradient(540px 540px at 88% 84%, rgba(20,207,188,.11), transparent 76%),
    linear-gradient(135deg, rgba(92,81,162,.05) 0%, rgba(255,255,255,0) 28%),
    linear-gradient(180deg, #fbfcff 0%, var(--portal-bg) 100%);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(420px 420px at 18% 22%, rgba(255, 214, 128, .10), transparent 72%),
    radial-gradient(560px 560px at 82% 18%, rgba(94, 150, 255, .10), transparent 74%),
    radial-gradient(520px 520px at 74% 76%, rgba(20, 207, 188, .08), transparent 76%);
}

.dashboard-shell{
  flex:1 0 auto;
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:300px minmax(0, 1fr);
  align-items:start;
}

.dashboard-sidebar{
  position:sticky;
  top:var(--nav-h, 64px);
  height:calc(100vh - var(--nav-h, 64px));
  min-height:calc(100vh - var(--nav-h, 64px));
  overflow-y:auto;
  padding:20px 18px 22px;
  display:flex;
  flex-direction:column;
  gap:14px;
  background:rgba(244, 247, 252, .94);
  border-right:1px solid var(--portal-border);
  box-shadow:inset -1px 0 0 rgba(255,255,255,.65);
  scrollbar-width:thin;
}

.dashboard-sidebar__bottom{
  margin-top:auto;
  display:grid;
  gap:12px;
  padding-top:6px;
}

.dashboard-main{
  padding:16px 24px 48px;
}

.hero-card{
  display:block;
  margin-bottom:18px;
}

.hero-card.is-hidden{
  display:none;
}

.hero-panel,
.surface-card,
.mini-tab{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(219,227,239,.95);
  box-shadow:var(--portal-shadow);
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(20,207,188,.18);
  background:#effcf8;
  color:var(--portal-brand-dark);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hero-panel .eyebrow{
  display:none;
}

.child-switcher{
  position:relative;
  top:auto;
  right:auto;
  z-index:40;
  width:100%;
  flex-shrink:0;
}

.child-switcher__button{
  width:100%;
  min-height:46px;
  padding:9px 14px;
  border:1px solid rgba(219,227,239,.95);
  border-radius:16px;
  background:rgba(255,255,255,.92);
  box-shadow:var(--portal-shadow);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:#344462;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.child-switcher__button:hover{
  transform:translateY(-1px);
  border-color:rgba(92,81,162,.25);
}

.child-switcher__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-height:28px;
  min-width:64px;
  padding:0 10px;
  border-radius:999px;
  background:var(--portal-accent-soft);
  color:var(--portal-accent);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.child-switcher__label{
  flex:1 1 auto;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:left;
}

.child-switcher__chevron{
  width:8px;
  height:8px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  margin-top:-3px;
  opacity:.8;
}

.child-switcher.is-open .child-switcher__chevron{
  transform:rotate(-135deg);
  margin-top:2px;
}

.child-switcher__menu{
  position:absolute;
  bottom:calc(100% + 10px);
  left:0;
  right:auto;
  min-width:100%;
  padding:10px;
  border:1px solid var(--portal-border);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--portal-shadow);
  display:grid;
  gap:8px;
  z-index:30;
}

.child-switcher__menu[hidden]{
  display:none !important;
}

.child-switcher__option{
  width:100%;
  text-align:left;
  border:1px solid var(--portal-border);
  border-radius:14px;
  background:#fff;
  padding:12px 14px;
  color:#223250;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.child-switcher__option small{
  display:block;
  margin-top:4px;
  color:var(--portal-muted);
  font-size:13px;
}

.child-switcher__option.is-active{
  background:linear-gradient(135deg, rgba(20,207,188,.12), rgba(92,81,162,.10));
  border-color:rgba(92,81,162,.28);
}

.mentor-theme{
  display:grid;
  gap:10px;
}

.mentor-theme__buttons{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}

.mentor-theme__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:0 12px;
  border:1px solid rgba(219,227,239,.95);
  border-radius:14px;
  background:rgba(255,255,255,.92);
  color:#344462;
  font:inherit;
  font-size:12px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.mentor-theme__btn span:last-child{
  white-space:nowrap;
}

.mentor-theme__btn:hover{
  transform:translateY(-1px);
}

.mentor-theme__btn.is-active{
  background:linear-gradient(135deg, rgba(20,207,188,.14), rgba(92,81,162,.12));
  border-color:rgba(92,81,162,.25);
  color:#18233a;
}

.mentor-theme__icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  flex:0 0 18px;
}

.mentor-theme__icon svg{
  width:18px;
  height:18px;
  display:block;
}

.mentor-logout{
  min-height:46px;
  padding:9px 16px;
  border:1px solid rgba(24, 34, 56, .14);
  border-radius:16px;
  background:rgba(255,255,255,.92);
  box-shadow:var(--portal-shadow);
  color:#223250;
  font:inherit;
  font-weight:800;
  text-align:left;
  cursor:pointer;
  transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.mentor-logout:hover{
  transform:translateY(-1px);
  border-color:rgba(92,81,162,.25);
}

.hero-panel{
  border-radius:28px;
  padding:26px;
  display:grid;
  gap:18px;
  align-content:start;
  justify-items:center;
  text-align:center;
}

.hero-panel__intro{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  flex-wrap:wrap;
  padding-bottom:6px;
}

.hero-title{
  margin:10px 0 0;
  color:#12192a;
  font-size:clamp(.98rem, 1.5vw, 1.2rem);
  line-height:1.15;
}

.hero-panel__top,
.hero-panel__actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.hero-panel__actions{
  flex-direction:column;
}

.hero-panel__body{
  display:grid;
  justify-items:center;
  text-align:center;
}

.hero-tag,
.status-pill,
.badge-soft{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
}

.hero-tag{
  background:var(--portal-accent-soft);
  color:var(--portal-accent);
}

.status-pill--live{
  background:var(--portal-success);
  color:var(--portal-success-ink);
}

.status-pill--upcoming{
  background:var(--portal-warning);
  color:var(--portal-warning-ink);
}

.status-pill--done{
  background:var(--portal-info);
  color:var(--portal-info-ink);
}

.hero-panel #heroStatus{
  display:none;
}

.hero-panel h2,
.section-head h2{
  margin:0;
  color:#111a2c;
  font-size:1.42rem;
}

.hero-panel h2{
  font-size:clamp(1.75rem, 3vw, 2.35rem);
  line-height:1.08;
}

.hero-meta{
  margin:8px 0 6px;
  color:#31405f;
  font-weight:700;
}

.hero-summary{
  margin:0;
  color:var(--portal-muted);
}

.btn-primary,
.btn-secondary{
  min-height:46px;
  padding:0 16px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font:inherit;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  transition:transform .18s ease, border-color .18s ease;
}

.btn-primary{
  border:1px solid rgba(92,81,162,.18);
  color:#5d6788;
  background:linear-gradient(135deg, #eef2fb, #e5ebf8);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
}

.btn-secondary{
  border:1px solid var(--portal-border);
  color:#223251;
  background:#fff;
}

.btn-primary:hover,
.btn-secondary:hover,
.action-row:hover,
.mini-tab:hover{
  transform:translateY(-1px);
}

.hero-action-hint{
  max-width:420px;
  margin:2px auto 0;
  color:transparent;
  font-size:0;
  line-height:1.5;
  text-align:center;
}

.hero-action-hint::before{
  content:"Pute\021Bi ap\0103sa pe buton cu aproximativ 10 minute \00EEnainte de \00EEnceperea lec\021Biei.";
  color:var(--portal-muted);
  font-size:.95rem;
}

.hero-facts{
  display:grid;
  gap:10px;
  width:100%;
  justify-items:stretch;
  text-align:left;
}

.hero-fact{
  display:flex;
  justify-content:space-between;
  gap:12px;
  width:100%;
  padding-top:10px;
  border-top:1px solid #ebf0f7;
  color:#30405f;
}

.hero-fact span:first-child{
  color:var(--portal-muted);
}

.tab-strip{
  display:grid;
  gap:8px;
  grid-template-columns:1fr;
  margin-bottom:0;
}

.mini-tab{
  min-height:46px;
  padding:9px 16px;
  border:1px solid rgba(219,227,239,.95);
  border-radius:16px;
  background:rgba(255,255,255,.92);
  box-shadow:var(--portal-shadow);
  color:#344462;
  font:inherit;
  font-weight:700;
  text-align:left;
  cursor:pointer;
  transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.mini-tab.is-active,
.mini-tab[aria-selected="true"]{
  background:linear-gradient(135deg, rgba(20,207,188,.14), rgba(92,81,162,.12));
  border-color:rgba(92,81,162,.25);
  color:#18233a;
}

.tab-panel{
  display:none;
}

.tab-panel.is-active{
  display:block;
}

.metric-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
  margin-bottom:14px;
}

.metric-card{
  border-radius:20px;
  padding:20px;
  background:var(--portal-surface);
  border:1px solid rgba(219,227,239,.95);
  box-shadow:var(--portal-shadow);
}

.metric-card__label{
  display:block;
  margin-bottom:10px;
  color:var(--portal-muted);
  font-size:14px;
  font-weight:700;
}

.metric-card__value{
  display:block;
  font-size:2rem;
  line-height:1;
  font-weight:800;
  color:#121a2a;
}

.metric-card__hint{
  display:block;
  margin-top:10px;
  color:#4d5f7d;
  font-size:14px;
}

.content-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.content-grid--single{
  grid-template-columns:1fr;
}

.content-grid--overview{
  align-items:start;
}

.surface-card{
  border-radius:24px;
  padding:22px;
}

.surface-card--wide{
  grid-column:span 2;
}

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

.section-kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  margin-bottom:6px;
  color:var(--portal-accent);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.section-subcopy{
  margin:10px 0 0;
  max-width:64ch;
  color:var(--portal-muted);
  font-size:15px;
}

#tab-lessons .section-head,
#tab-materials .section-head,
#tab-archives .section-head,
#tab-feedback .section-head,
#tab-account .section-head{
  justify-content:center;
}

#tab-lessons .section-head > div,
#tab-materials .section-head > div,
#tab-archives .section-head > div,
#tab-feedback .section-head > div,
#tab-account .section-head > div{
  text-align:center;
}

#tab-materials .section-subcopy,
#tab-archives .section-subcopy{
  margin-left:auto;
  margin-right:auto;
}

.badge-soft{
  background:var(--portal-info);
  color:var(--portal-info-ink);
}

.overview-highlights,
.lesson-focus{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

.lesson-browser{
  display:grid;
  gap:14px;
}

.lesson-program-tabs,
.lesson-number-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

#tab-lessons .lesson-program-tabs,
#tab-lessons .lesson-number-tabs,
#tab-feedback .lesson-program-tabs,
#tab-feedback .lesson-number-tabs{
  justify-content:center;
}

.lesson-program-tab,
.lesson-number-tab{
  border:1px solid rgba(219,227,239,.95);
  background:rgba(255,255,255,.92);
  color:#344462;
  border-radius:16px;
  box-shadow:var(--portal-shadow);
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.lesson-program-tab{
  min-height:52px;
  padding:10px 16px;
}

.lesson-number-tab{
  min-height:46px;
  padding:9px 14px;
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.lesson-number-tab svg{
  width:14px;
  height:14px;
  flex-shrink:0;
}

.lesson-program-tab:hover,
.lesson-number-tab:hover{
  transform:translateY(-1px);
  border-color:rgba(92,81,162,.25);
}

.lesson-program-tab.is-active,
.lesson-number-tab.is-active{
  background:linear-gradient(135deg, rgba(20,207,188,.14), rgba(92,81,162,.12));
  border-color:rgba(92,81,162,.26);
  color:#15213a;
}

.lesson-detail-card{
  border:1px solid var(--portal-border);
  background:var(--portal-surface-muted);
  border-radius:20px;
  padding:20px;
  display:grid;
  gap:16px;
}

.lesson-detail-card h3{
  margin:0;
  color:#13203a;
  font-size:1.22rem;
}

.lesson-detail-card p{
  margin:0;
  color:var(--portal-muted);
}

.lesson-detail-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.lesson-detail-pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:6px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#5362b8;
  font-size:12px;
  font-weight:700;
}

.lesson-detail-pill svg{
  width:13px;
  height:13px;
  flex-shrink:0;
}

.lesson-detail-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.lesson-detail-block{
  border:1px solid var(--portal-border);
  background:#fff;
  border-radius:16px;
  padding:16px;
}

.lesson-detail-block strong{
  display:block;
  margin-bottom:8px;
  color:#14203a;
}

.highlight-card,
.focus-card,
.stack-item,
.resource-item{
  border:1px solid var(--portal-border);
  background:var(--portal-surface-muted);
  border-radius:18px;
}

.highlight-card,
.focus-card{
  padding:18px;
}

.highlight-card h3,
.focus-card h3{
  margin:0 0 8px;
  font-size:1.04rem;
  color:#14203a;
}

.highlight-card p,
.focus-card p{
  margin:0;
  color:var(--portal-muted);
}

.stack-list{
  display:grid;
  gap:12px;
}

.stack-item{
  padding:16px;
}

.stack-item h3{
  margin:0 0 6px;
  font-size:1rem;
  color:#17243e;
}

.stack-item p{
  margin:0;
  color:var(--portal-muted);
}

.stack-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  margin-top:8px;
  color:#71809e;
  font-size:13px;
}

.progress-mini{
  margin-top:12px;
}

.progress-mini__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
  color:#1f2a44;
  font-weight:700;
}

.progress-bar{
  width:100%;
  height:10px;
  overflow:hidden;
  border-radius:999px;
  background:#e8eef8;
}

.progress-bar span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, #14cfbc, #5c51a2);
}

.schedule-item{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
}

.schedule-day{
  min-width:58px;
  padding:10px 8px;
  border-radius:14px;
  text-align:center;
  background:#edf3fb;
  color:#243250;
  font-weight:800;
}

.resource-grid{
  display:grid;
  gap:12px;
}

.resource-item{
  padding:18px;
}

.resource-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.resource-top strong,
.summary-box strong,
.detail-list strong{
  color:#14203a;
}

.resource-top span,
.summary-box p,
.detail-list span{
  color:var(--portal-muted);
}

.resource-tag,
.history-tag{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.resource-tag{
  background:#ebfbf7;
  color:#137f72;
}

.history-tag{
  background:#f1efff;
  color:#5649aa;
}

.resource-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}

.inline-btn,
.action-row{
  border:1px solid var(--portal-border);
  border-radius:14px;
  background:#fff;
  color:#253552;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.inline-btn{
  padding:9px 12px;
}

.summary-box{
  display:grid;
  gap:14px;
}

.summary-box__block{
  padding:16px;
  border:1px solid var(--portal-border);
  background:var(--portal-surface-muted);
  border-radius:18px;
}

.summary-box__block p{
  margin:6px 0 0;
}

.table-wrap{
  overflow:auto;
}

.lesson-table{
  width:100%;
  min-width:720px;
  border-collapse:collapse;
}

.lesson-table th,
.lesson-table td{
  padding:14px 10px;
  text-align:left;
  border-bottom:1px solid #e8eef7;
  vertical-align:top;
}

.lesson-table th{
  color:#6d7c98;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.lesson-table td{
  color:#223250;
}

.lesson-table tr:last-child td{
  border-bottom:none;
}

.check-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:12px;
}

.check-list li{
  display:grid;
  grid-template-columns:22px 1fr;
  gap:12px;
  color:#31415f;
}

.check-list li::before{
  content:"✓";
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border-radius:7px;
  background:#eaf8f5;
  color:#0f8e81;
  font-size:13px;
  font-weight:800;
}

.detail-list{
  display:grid;
  gap:14px;
}

.detail-row{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding-bottom:12px;
  border-bottom:1px solid #ebf0f7;
}

.detail-row:last-child{
  border-bottom:none;
  padding-bottom:0;
}

/* ==================== LOGIN & BLOCKED SCREENS ==================== */
.login-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.login-screen[hidden]{ display:none; }

.login-card{
  width:100%;
  max-width:400px;
  padding:36px 32px;
  border-radius:24px;
  background:var(--portal-surface);
  border:1px solid var(--portal-border);
  box-shadow:var(--portal-shadow);
  text-align:center;
}

.login-logo{
  font-size:1.6rem;
  font-weight:800;
  margin-bottom:4px;
}

.login-logo__mini{ color:var(--portal-brand); }
.login-logo__codex{ color:var(--portal-accent); }

.sidebar-brand{
  font-size:1.3rem;
  font-weight:800;
  padding:0 4px 8px;
  border-bottom:1px solid var(--portal-border);
  margin-bottom:4px;
}

.login-subtitle{
  color:var(--portal-muted);
  margin:0 0 20px;
  font-size:14px;
}

.login-form{
  display:grid;
  gap:14px;
  text-align:left;
}

.form-group{
  display:grid;
  gap:6px;
}

.form-group label{
  font-size:13px;
  font-weight:700;
  color:var(--portal-muted);
}

.form-group input{
  min-height:44px;
  padding:10px 14px;
  border:1px solid var(--portal-border);
  border-radius:12px;
  background:var(--portal-surface-muted);
  color:var(--portal-ink);
  font:inherit;
  font-size:15px;
  transition:border-color .18s ease;
}

.form-group input:focus{
  outline:none;
  border-color:var(--portal-brand);
}

.btn-login{
  width:100%;
  margin-top:4px;
}

.btn-ghost{
  background:none;
  border:1px solid var(--portal-border);
  border-radius:12px;
  padding:10px 16px;
  color:var(--portal-muted);
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.login-error{
  padding:10px 14px;
  border-radius:10px;
  background:rgba(231,76,60,.08);
  color:#c0392b;
  font-size:14px;
  font-weight:600;
  margin-bottom:14px;
}

.login-error[hidden]{ display:none; }

.login-help{
  margin:18px 0 0;
  color:var(--portal-muted);
  font-size:13px;
  line-height:1.5;
}

.blocked-message{
  display:grid;
  gap:12px;
  justify-items:center;
  padding:20px 0;
}

.blocked-message h2{
  margin:0;
  color:var(--portal-warning-ink);
}

.blocked-message p{
  margin:0;
  color:var(--portal-muted);
  max-width:32ch;
}

.btn-logout-blocked{
  margin-top:16px;
}

/* ==================== GRACE BANNER ==================== */
.grace-banner{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 18px;
  border-radius:14px;
  background:var(--portal-warning);
  border:1px solid rgba(163,101,8,.15);
  margin-bottom:16px;
  font-size:14px;
  font-weight:600;
  color:var(--portal-warning-ink);
}

.grace-banner[hidden]{ display:none; }

.grace-cta{
  margin-left:auto;
  padding:6px 14px;
  border-radius:8px;
  background:rgba(163,101,8,.12);
  color:var(--portal-warning-ink);
  font-weight:700;
  font-size:13px;
  text-decoration:none;
  white-space:nowrap;
}

/* ==================== SCHEDULE LIST ==================== */
.schedule-list{
  display:grid;
  gap:10px;
}

.schedule-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  border:1px solid var(--portal-border);
  background:var(--portal-surface-muted);
  border-radius:14px;
}

.schedule-day-badge{
  min-width:72px;
  padding:8px 12px;
  border-radius:10px;
  text-align:center;
  background:linear-gradient(135deg, rgba(20,207,188,.12), rgba(92,81,162,.10));
  color:var(--portal-accent);
  font-weight:800;
  font-size:13px;
}

.schedule-info{
  display:grid;
  gap:2px;
}

.schedule-info strong{
  color:var(--portal-ink);
  font-size:15px;
}

.schedule-info span{
  color:var(--portal-muted);
  font-size:13px;
}

/* ==================== FEEDBACK CARDS ==================== */
.feedback-list{
  display:grid;
  gap:12px;
}

.feedback-card{
  padding:16px 18px;
  border:1px solid var(--portal-border);
  background:var(--portal-surface-muted);
  border-radius:16px;
}

.feedback-header{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:8px;
}

.feedback-lesson{
  font-weight:700;
  color:var(--portal-ink);
}

.feedback-rating{
  display:inline-flex;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:var(--portal-info);
  color:var(--portal-info-ink);
}

.feedback-rating--foarte-activ{
  background:var(--portal-success);
  color:var(--portal-success-ink);
}

.feedback-rating--sub-nivelul-clasei{
  background:rgba(231,76,60,.08);
  color:#c0392b;
}

.feedback-date{
  margin-left:auto;
  font-size:12px;
  color:var(--portal-muted);
}

.feedback-notes{
  margin:0 0 8px;
  color:var(--portal-muted);
  font-size:14px;
}

.feedback-mentions{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:4px;
}

.feedback-mentions li{
  padding-left:16px;
  position:relative;
  color:var(--portal-muted);
  font-size:14px;
}

.feedback-mentions li::before{
  content:"•";
  position:absolute;
  left:4px;
  color:var(--portal-brand);
  font-weight:800;
}

/* ==================== SUBSCRIPTION STATUS ==================== */
.sub-status{
  display:inline-flex;
  padding:4px 10px;
  border-radius:8px;
  font-size:13px;
  font-weight:700;
}

.sub-status.status-active{
  background:var(--portal-success);
  color:var(--portal-success-ink);
}

.sub-status.status-grace{
  background:var(--portal-warning);
  color:var(--portal-warning-ink);
}

.sub-status.status-expired{
  background:rgba(231,76,60,.08);
  color:#c0392b;
}

/* ==================== PASSWORD FORM ==================== */
.change-password-form{
  display:grid;
  gap:14px;
  max-width:360px;
}

.change-password-form .btn-primary{
  justify-self:start;
}

.form-message{
  padding:10px 14px;
  border-radius:10px;
  font-size:13px;
  font-weight:600;
}

.form-message[hidden]{ display:none; }

.form-message--success{
  background:var(--portal-success);
  color:var(--portal-success-ink);
}

.form-message--error{
  background:rgba(231,76,60,.08);
  color:#c0392b;
}

/* ==================== TOAST ==================== */
.toast-container{
  position:fixed;
  bottom:24px;
  right:24px;
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.toast{
  padding:12px 20px;
  border-radius:12px;
  background:var(--portal-surface);
  border:1px solid var(--portal-border);
  box-shadow:0 8px 24px rgba(0,0,0,.12);
  font-weight:600;
  font-size:14px;
  color:var(--portal-ink);
  opacity:0;
  transform:translateY(10px);
  transition:opacity .3s ease, transform .3s ease;
}

.toast--visible{
  opacity:1;
  transform:translateY(0);
}

.toast--success{ border-left:4px solid var(--portal-success-ink); }
.toast--error{ border-left:4px solid #c0392b; }
.toast--info{ border-left:4px solid var(--portal-brand); }

/* ==================== PROGRESS NOTE ==================== */
.progress-note{
  display:block;
  margin-top:6px;
  font-size:13px;
  color:var(--portal-muted);
}

/* ==================== EMPTY STATE ==================== */
.empty-state{
  text-align:center;
  padding:32px 16px;
  color:var(--portal-muted);
}

.empty-text{
  color:var(--portal-muted);
  font-size:14px;
  text-align:center;
  padding:20px 0;
}

/* ==================== COMPLETED LESSON TAB ==================== */
.lesson-number-tab.is-completed{
  background:var(--portal-success);
  border-color:rgba(21,135,99,.18);
  color:var(--portal-success-ink);
}

/* ==================== MINI-TAB WITH ICONS ==================== */
.mini-tab{
  display:flex;
  align-items:center;
  gap:10px;
}

.mini-tab svg{
  flex-shrink:0;
  opacity:.7;
}

.mini-tab.is-active svg{
  opacity:1;
}

/* ==================== LOADING SPINNER ==================== */
.loading-spinner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
  color:var(--portal-muted);
  font-size:15px;
  font-weight:600;
}

.spinner{
  width:40px;
  height:40px;
  border:4px solid var(--portal-border);
  border-top-color:var(--portal-brand);
  border-radius:50%;
  animation:spin .8s linear infinite;
}

@keyframes spin{
  to{ transform:rotate(360deg); }
}

/* ==================== HERO GREETING & NEXT CLASS ==================== */
.hero-greeting{
  margin:0;
  font-size:clamp(1.5rem, 2.5vw, 2rem);
  line-height:1.15;
  color:#12192a;
}

.hero-subgreeting{
  margin:4px 0 0;
  color:var(--portal-muted);
  font-size:15px;
}

.hero-panel__greeting{
  text-align:left;
  width:100%;
}

.hero-panel__next-class{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  width:100%;
  padding:16px 18px;
  border-radius:18px;
  background:var(--portal-surface-muted);
  border:1px solid var(--portal-border);
}

.next-class-info{
  display:grid;
  gap:4px;
}

.next-class-label{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--portal-muted);
}

.next-class-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:4px;
}

/* ==================== JOIN LESSON BUTTON ==================== */
.btn-join{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:46px;
  padding:0 20px;
  border-radius:14px;
  background:linear-gradient(135deg, #14cfbc, #0d9e8f);
  color:#fff;
  font:inherit;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
  transition:transform .18s ease, box-shadow .18s ease;
  box-shadow:0 8px 20px rgba(20,207,188,.25);
}

.btn-join:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(20,207,188,.35);
}

.btn-join svg{
  flex-shrink:0;
}

.btn-join--disabled{
  background:linear-gradient(135deg, #9aa3ad, #6e7682);
  box-shadow:none;
  cursor:not-allowed;
  opacity:.85;
}
.btn-join--disabled:hover{
  transform:none;
  box-shadow:none;
}

/* ==================== COUNTDOWN PILL ==================== */
.countdown-pill{
  display:inline-flex;
  align-items:center;
  padding:5px 12px;
  border-radius:999px;
  background:var(--portal-info);
  color:var(--portal-info-ink);
  font-size:13px;
  font-weight:700;
}

.countdown-pill--today{
  background:var(--portal-success);
  color:var(--portal-success-ink);
  animation:pulse-today 2s ease-in-out infinite;
}

@keyframes pulse-today{
  0%,100%{ opacity:1; }
  50%{ opacity:.7; }
}

/* ==================== TWO-COLUMN LAYOUT ==================== */
.content-grid--two{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

/* ==================== ATTENDANCE STREAK ==================== */
.streak-dots{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:flex-end;
}

.streak-dot{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}

.streak-dot__icon{
  width:32px;
  height:32px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid var(--portal-border);
  background:var(--portal-surface-muted);
  transition:transform .18s ease;
}

.streak-dot__icon svg{
  width:14px;
  height:14px;
}

.streak-dot--present .streak-dot__icon{
  background:var(--portal-success);
  border-color:rgba(21,135,99,.2);
  color:var(--portal-success-ink);
}

.streak-dot--absent .streak-dot__icon{
  background:rgba(231,76,60,.08);
  border-color:rgba(231,76,60,.15);
  color:#c0392b;
}

.streak-dot__label{
  font-size:10px;
  font-weight:700;
  color:var(--portal-muted);
  text-transform:uppercase;
}

.streak-summary{
  margin-top:12px;
  font-size:14px;
  color:var(--portal-muted);
  font-weight:600;
}

/* ==================== ACTIVITY FEED ==================== */
.activity-feed{
  display:grid;
  gap:12px;
}

.activity-item{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--portal-border);
  background:var(--portal-surface-muted);
  border-radius:14px;
}

.activity-icon{
  flex-shrink:0;
  width:34px;
  height:34px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--portal-accent-soft);
  color:var(--portal-accent);
}

.activity-icon svg{
  width:18px;
  height:18px;
}

.activity-content{
  display:grid;
  gap:2px;
  min-width:0;
}

.activity-text{
  font-size:14px;
  font-weight:600;
  color:var(--portal-ink);
}

.activity-date{
  font-size:12px;
  color:var(--portal-muted);
}

/* ==================== ACHIEVEMENTS ==================== */
.achievements-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));
  gap:14px;
}

.achievement-card{
  position:relative;
  padding:20px 16px;
  border:1px solid var(--portal-border);
  border-radius:18px;
  background:var(--portal-surface-muted);
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  transition:transform .18s ease, border-color .18s ease;
}

.achievement-card--unlocked{
  background:linear-gradient(135deg, rgba(20,207,188,.06), rgba(92,81,162,.04));
  border-color:rgba(20,207,188,.22);
}

.achievement-card--unlocked:hover{
  transform:translateY(-2px);
}

.achievement-card--locked{
  opacity:.55;
  filter:grayscale(.4);
}

.achievement-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:12px;
  background:linear-gradient(135deg, rgba(20,207,188,.1), rgba(92,81,162,.08));
  color:var(--portal-accent);
}

.achievement-card--unlocked .achievement-icon{
  color:var(--portal-brand-dark);
  background:linear-gradient(135deg, rgba(20,207,188,.15), rgba(92,81,162,.1));
}

.achievement-card--locked .achievement-icon{
  color:var(--portal-muted);
  background:rgba(0,0,0,.04);
}

.achievement-info{
  display:grid;
  gap:4px;
}

.achievement-info strong{
  font-size:14px;
  color:var(--portal-ink);
}

.achievement-info span{
  font-size:12px;
  color:var(--portal-muted);
}

.achievement-check,
.achievement-lock{
  position:absolute;
  top:10px;
  right:10px;
  width:24px;
  height:24px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.achievement-check{
  background:var(--portal-success);
  color:var(--portal-success-ink);
}

.achievement-lock{
  background:rgba(0,0,0,.06);
  color:var(--portal-muted);
}

.achievement-check svg,
.achievement-lock svg{
  width:14px;
  height:14px;
}

/* ==================== TAB BADGE ==================== */
.tab-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:linear-gradient(135deg, #14cfbc, #0d8076);
  color:#fff;
  font-size:11px;
  font-weight:800;
  line-height:1;
}

.tab-badge[hidden]{ display:none; }

/* ==================== METRIC CARD ICON ==================== */
.metric-card__icon{
  display:flex;
  align-items:center;
  margin-bottom:8px;
  color:var(--portal-brand);
}

.metric-card__icon svg{
  width:22px;
  height:22px;
}

/* ==================== COLORED FEEDBACK CARDS ==================== */
.feedback-card--excellent{
  border-left:4px solid var(--portal-success-ink);
}

.feedback-card--good{
  border-left:4px solid var(--portal-brand);
}

.feedback-card--needs-work{
  border-left:4px solid #e67e22;
}

/* ==================== LESSON STATUS PILLS ==================== */
.lesson-detail-pill--done{
  background:var(--portal-success);
  color:var(--portal-success-ink);
}

.lesson-detail-pill--current{
  background:linear-gradient(135deg, rgba(20,207,188,.15), rgba(92,81,162,.12));
  color:var(--portal-accent);
  border:1px solid rgba(92,81,162,.18);
}

/* ==================== RESOURCE META ==================== */
.resource-meta{
  display:block;
  margin-top:6px;
  font-size:12px;
  color:var(--portal-muted);
}

/* ==================== DARK THEME ==================== */
body[data-theme="dark"]{
  --portal-bg:#161032;
  --portal-surface:rgba(30,22,71,.86);
  --portal-surface-muted:rgba(34,24,79,.78);
  --portal-border:rgba(92,81,162,.28);
  --portal-ink:#fafafa;
  --portal-muted:rgba(255,255,255,.72);
  --portal-brand:#14cfbc;
  --portal-brand-dark:#14cfbc;
  --portal-accent:#5c51a2;
  --portal-accent-soft:rgba(92,81,162,.22);
  --portal-success:rgba(20,207,188,.14);
  --portal-success-ink:#14cfbc;
  --portal-warning:rgba(255,232,48,.1);
  --portal-warning-ink:rgba(255,232,48,.92);
  --portal-info:rgba(92,81,162,.28);
  --portal-info-ink:#fafafa;
  --portal-shadow:0 20px 46px rgba(0,0,0,.35);
  background:
    radial-gradient(980px 680px at 12% -12%, rgba(92, 81, 162, .22), rgba(92, 81, 162, 0)) no-repeat,
    radial-gradient(760px 520px at 88% 8%, rgba(20, 207, 188, .07), rgba(20, 207, 188, 0)) no-repeat,
    var(--portal-bg);
}

body[data-theme="dark"] .dashboard-sidebar{
  background:rgba(18,13,44,.82);
  border-right:1px solid rgba(92,81,162,.24);
  box-shadow:inset -1px 0 0 rgba(255,255,255,.04);
}

body[data-theme="dark"] .hero-panel,
body[data-theme="dark"] .surface-card,
body[data-theme="dark"] .metric-card,
body[data-theme="dark"] .mini-tab,
body[data-theme="dark"] .child-switcher__button,
body[data-theme="dark"] .child-switcher__menu,
body[data-theme="dark"] .child-switcher__option,
body[data-theme="dark"] .lesson-program-tab,
body[data-theme="dark"] .lesson-number-tab,
body[data-theme="dark"] .lesson-detail-card,
body[data-theme="dark"] .lesson-detail-block,
body[data-theme="dark"] .highlight-card,
body[data-theme="dark"] .focus-card,
body[data-theme="dark"] .stack-item,
body[data-theme="dark"] .resource-item,
body[data-theme="dark"] .summary-box__block,
body[data-theme="dark"] .inline-btn,
body[data-theme="dark"] .action-row,
body[data-theme="dark"] .mentor-theme__btn,
body[data-theme="dark"] .mentor-logout{
  background:rgba(92,81,162,.12);
  border-color:rgba(92,81,162,.28);
  color:var(--portal-ink);
  box-shadow:none;
}

body[data-theme="dark"] .mini-tab.is-active,
body[data-theme="dark"] .mini-tab[aria-selected="true"],
body[data-theme="dark"] .mentor-theme__btn.is-active,
body[data-theme="dark"] .lesson-program-tab.is-active,
body[data-theme="dark"] .lesson-number-tab.is-active,
body[data-theme="dark"] .child-switcher__option.is-active{
  background:rgba(92,81,162,.34);
  border-color:rgba(20,207,188,.24);
  color:var(--portal-ink);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03), 0 0 0 1px rgba(20,207,188,.08);
}

body[data-theme="dark"] .mini-tab:hover,
body[data-theme="dark"] .child-switcher__button:hover,
body[data-theme="dark"] .lesson-program-tab:hover,
body[data-theme="dark"] .lesson-number-tab:hover,
body[data-theme="dark"] .mentor-theme__btn:hover,
body[data-theme="dark"] .mentor-logout:hover,
body[data-theme="dark"] .btn-primary:hover,
body[data-theme="dark"] .btn-secondary:hover{
  border-color:rgba(20,207,188,.28);
}

body[data-theme="dark"] .hero-panel h2,
body[data-theme="dark"] .section-head h2,
body[data-theme="dark"] .hero-title,
body[data-theme="dark"] .metric-card__value,
body[data-theme="dark"] .lesson-detail-card h3,
body[data-theme="dark"] .lesson-detail-block strong,
body[data-theme="dark"] .highlight-card h3,
body[data-theme="dark"] .focus-card h3,
body[data-theme="dark"] .stack-item h3,
body[data-theme="dark"] .resource-top strong,
body[data-theme="dark"] .summary-box strong,
body[data-theme="dark"] .detail-list strong,
body[data-theme="dark"] .progress-mini__top,
body[data-theme="dark"] .progress-mini__top span,
body[data-theme="dark"] .progress-mini__top strong,
body[data-theme="dark"] .detail-list span,
body[data-theme="dark"] .lesson-table td{
  color:var(--portal-ink);
}

body[data-theme="dark"] .detail-row strong,
body[data-theme="dark"] .detail-row span,
body[data-theme="dark"] #accountSummary strong,
body[data-theme="dark"] #accountSummary span{
  color:var(--portal-ink) !important;
}

body[data-theme="dark"] .hero-meta,
body[data-theme="dark"] .hero-summary,
body[data-theme="dark"] .metric-card__label,
body[data-theme="dark"] .metric-card__hint,
body[data-theme="dark"] .section-subcopy,
body[data-theme="dark"] .lesson-detail-card p,
body[data-theme="dark"] .highlight-card p,
body[data-theme="dark"] .focus-card p,
body[data-theme="dark"] .stack-item p,
body[data-theme="dark"] .stack-meta,
body[data-theme="dark"] .resource-top span,
body[data-theme="dark"] .summary-box p,
body[data-theme="dark"] .detail-list span,
body[data-theme="dark"] .lesson-table th,
body[data-theme="dark"] .check-list li,
body[data-theme="dark"] .child-switcher__option small,
body[data-theme="dark"] .hero-action-hint::before{
  color:var(--portal-muted);
}

body[data-theme="dark"] .eyebrow,
body[data-theme="dark"] .hero-tag,
body[data-theme="dark"] .section-kicker{
  background:rgba(20,207,188,.12);
  color:#14cfbc;
  border-color:rgba(20,207,188,.18);
}

body[data-theme="dark"] .child-switcher__count,
body[data-theme="dark"] .lesson-detail-pill,
body[data-theme="dark"] .badge-soft,
body[data-theme="dark"] .history-tag{
  background:rgba(92,81,162,.28);
  color:#fafafa;
}

body[data-theme="dark"] .status-pill--live,
body[data-theme="dark"] .resource-tag{
  background:rgba(20,207,188,.14);
  color:#14cfbc;
}

body[data-theme="dark"] .status-pill--upcoming{
  background:rgba(255,232,48,.1);
  color:rgba(255,232,48,.92);
}

body[data-theme="dark"] .status-pill--done{
  background:rgba(92,81,162,.28);
  color:#fafafa;
}

body[data-theme="dark"] .progress-bar{
  background:rgba(92,81,162,.22);
}

body[data-theme="dark"] .progress-bar span{
  background:linear-gradient(90deg, #5c51a2, #14cfbc);
}

body[data-theme="dark"] .schedule-day,
body[data-theme="dark"] .check-list li::before{
  background:rgba(92,81,162,.22);
  color:#fafafa;
}

body[data-theme="dark"] .hero-fact,
body[data-theme="dark"] .detail-row,
body[data-theme="dark"] .lesson-table th,
body[data-theme="dark"] .lesson-table td{
  border-color:rgba(92,81,162,.2);
}

body[data-theme="dark"] .btn-primary{
  border-color:transparent;
  background:#14cfbc;
  color:#041d1a;
  box-shadow:0 16px 28px rgba(20, 207, 188, .18);
}

body[data-theme="dark"] .btn-secondary,
body[data-theme="dark"] .inline-btn,
body[data-theme="dark"] .action-row{
  background:rgba(92,81,162,.22);
  color:var(--portal-ink);
  border-color:rgba(92,81,162,.3);
}

body[data-theme="dark"] .login-card,
body[data-theme="dark"] .form-group input{
  background:rgba(30,22,71,.92);
  border-color:rgba(92,81,162,.28);
  color:var(--portal-ink);
}

body[data-theme="dark"] .grace-banner{
  background:rgba(163,101,8,.12);
  border-color:rgba(163,101,8,.2);
}

body[data-theme="dark"] .schedule-item,
body[data-theme="dark"] .feedback-card{
  background:rgba(92,81,162,.12);
  border-color:rgba(92,81,162,.28);
}

body[data-theme="dark"] .schedule-day-badge{
  background:rgba(92,81,162,.28);
  color:var(--portal-brand);
}

body[data-theme="dark"] .toast{
  background:rgba(30,22,71,.95);
  border-color:rgba(92,81,162,.28);
}

body[data-theme="dark"] .lesson-number-tab.is-completed{
  background:rgba(20,207,188,.14);
  border-color:rgba(20,207,188,.2);
  color:#14cfbc;
}

body[data-theme="dark"] .hero-greeting,
body[data-theme="dark"] .achievement-info strong,
body[data-theme="dark"] .activity-text{
  color:var(--portal-ink);
}

body[data-theme="dark"] .hero-subgreeting,
body[data-theme="dark"] .next-class-label,
body[data-theme="dark"] .streak-dot__label,
body[data-theme="dark"] .streak-summary,
body[data-theme="dark"] .activity-date,
body[data-theme="dark"] .achievement-info span,
body[data-theme="dark"] .resource-meta{
  color:var(--portal-muted);
}

body[data-theme="dark"] .hero-panel__next-class,
body[data-theme="dark"] .activity-item,
body[data-theme="dark"] .achievement-card{
  background:rgba(92,81,162,.12);
  border-color:rgba(92,81,162,.28);
}

body[data-theme="dark"] .achievement-card--unlocked{
  background:rgba(20,207,188,.08);
  border-color:rgba(20,207,188,.2);
}

body[data-theme="dark"] .streak-dot__icon{
  background:rgba(92,81,162,.18);
  border-color:rgba(92,81,162,.28);
}

body[data-theme="dark"] .streak-dot--present .streak-dot__icon{
  background:rgba(20,207,188,.14);
  border-color:rgba(20,207,188,.2);
  color:#14cfbc;
}

body[data-theme="dark"] .streak-dot--absent .streak-dot__icon{
  background:rgba(231,76,60,.12);
  border-color:rgba(231,76,60,.2);
  color:#ff6b6b;
}

body[data-theme="dark"] .countdown-pill{
  background:rgba(92,81,162,.28);
  color:#fafafa;
}

body[data-theme="dark"] .countdown-pill--today{
  background:rgba(20,207,188,.14);
  color:#14cfbc;
}

body[data-theme="dark"] .btn-join{
  background:linear-gradient(135deg, #14cfbc, #0d9e8f);
  color:#041d1a;
  box-shadow:0 8px 20px rgba(20,207,188,.2);
}

body[data-theme="dark"] .activity-icon{
  background:rgba(92,81,162,.28);
  color:#14cfbc;
}

body[data-theme="dark"] .metric-card__icon{
  color:#14cfbc;
}

body[data-theme="dark"] .achievement-icon{
  background:rgba(92,81,162,.22);
  color:var(--portal-brand);
}

body[data-theme="dark"] .achievement-card--locked .achievement-icon{
  background:rgba(255,255,255,.06);
  color:var(--portal-muted);
}

body[data-theme="dark"] .achievement-lock{
  background:rgba(255,255,255,.06);
}

body[data-theme="dark"] .spinner{
  border-color:rgba(92,81,162,.28);
  border-top-color:var(--portal-brand);
}

body[data-theme="dark"] .lesson-detail-pill--done{
  background:rgba(20,207,188,.14);
  color:#14cfbc;
}

body[data-theme="dark"] .lesson-detail-pill--current{
  background:rgba(92,81,162,.28);
  color:#fafafa;
  border-color:rgba(92,81,162,.4);
}

.action-stack{
  display:grid;
  gap:12px;
}

.action-row{
  min-height:50px;
  padding:0 16px;
  text-align:left;
}

.surface-card p{
  max-width:none;
}

@media (max-width: 1080px){
  .metric-grid,
  .content-grid,
  .overview-highlights,
  .lesson-focus{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .content-grid--two{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .surface-card--wide{
    grid-column:span 2;
  }

  .achievements-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .dashboard-shell{
    padding:0 0 40px;
    grid-template-columns:1fr;
  }

  .dashboard-sidebar{
    position:static;
    top:auto;
    height:auto;
    min-height:0;
    overflow:visible;
    padding:22px 14px 0;
    border-right:none;
    border-bottom:1px solid var(--portal-border);
  }

  .dashboard-main{
    padding:16px 14px 40px;
  }

  .tab-strip{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .child-switcher{
    width:100%;
  }

  .child-switcher__button{
    width:100%;
    justify-content:space-between;
  }

  .child-switcher__menu{
    left:0;
    right:auto;
    min-width:100%;
    top:auto;
    bottom:calc(100% + 10px);
  }

  .metric-grid,
  .content-grid,
  .content-grid--two,
  .overview-highlights,
  .lesson-focus{
    grid-template-columns:1fr;
  }

  .hero-panel,
  .surface-card,
  .metric-card{
    border-radius:22px;
  }

  .hero-panel{
    padding:22px 20px;
  }

  .hero-panel__intro{
    align-items:flex-start;
  }

  .hero-panel__next-class{
    flex-direction:column;
    align-items:flex-start;
  }

  .btn-join{
    width:100%;
    justify-content:center;
  }

  .surface-card--wide{
    grid-column:span 1;
  }

  .lesson-detail-grid{
    grid-template-columns:1fr;
  }

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

  .schedule-item,
  .resource-top,
  .detail-row{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width: 520px){
  .tab-strip{
    grid-template-columns:1fr;
  }

  .mentor-theme__buttons{
    grid-template-columns:1fr;
  }
}

/* ==================== ANNOUNCEMENTS BANNER ==================== */
.announcements-banner{
  display:flex;flex-direction:column;gap:8px;margin-bottom:18px;
}
.announcement-item{
  display:flex;align-items:flex-start;gap:12px;
  padding:14px 18px;border-radius:12px;
  background:var(--portal-info);color:var(--portal-info-ink);
  border:1px solid transparent;
}
.announcement-item.announcement--important{
  background:var(--portal-warning);color:var(--portal-warning-ink);
}
.announcement-item.announcement--urgent{
  background:#ffeaea;color:#b81d1d;
  border-color:#f5b3b3;
}
.announcement-icon{flex-shrink:0;margin-top:2px;}
.announcement-content{flex:1;min-width:0;}
.announcement-content strong{display:block;font-size:.95rem;margin-bottom:2px;}
.announcement-content p{margin:0;font-size:.87rem;opacity:.88;line-height:1.45;}
.announcement-date{flex-shrink:0;font-size:.78rem;opacity:.6;white-space:nowrap;margin-top:2px;}

/* Homework tag */
.resource-item--hw{border-left:3px solid var(--portal-accent);}
.resource-tag--hw{background:var(--portal-accent-soft);color:var(--portal-accent);}
.hw-due{font-size:.82rem;color:var(--portal-warning-ink);font-weight:500;}

/* Delete account */
.surface-card--danger{border:1px solid #f5b3b3;}
.delete-account-info{font-size:.88rem;color:var(--portal-muted);line-height:1.5;margin:0 0 14px;}
.btn-danger-outline{
  display:inline-flex;align-items:center;gap:6px;
  padding:10px 20px;border-radius:8px;font-size:.9rem;font-weight:600;
  border:1.5px solid #dc2626;color:#dc2626;background:transparent;cursor:pointer;
  transition:all .2s;
}
.btn-danger-outline:hover{background:#dc2626;color:#fff;}

/* Upgrade CTA */
.upgrade-cta{margin-top:16px;padding:16px;border-radius:12px;background:var(--portal-accent-soft);border:1px solid var(--portal-accent);text-align:center;}
.upgrade-cta p{margin:0 0 12px;font-size:.9rem;color:var(--portal-accent);line-height:1.4;}
.btn-upgrade{
  display:inline-flex;align-items:center;gap:8px;
  padding:12px 24px;border-radius:10px;font-size:.95rem;font-weight:700;
  background:var(--portal-accent);color:#fff;text-decoration:none;
  transition:transform .2s,box-shadow .2s;
}
.btn-upgrade:hover{transform:translateY(-1px);box-shadow:0 4px 16px rgba(92,81,162,.35);}

/* ── Lesson open button (read-only viewer) ── */
.lesson-detail-open{ margin-top:16px; }
.lesson-open-btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 20px; border-radius:12px; border:0; cursor:pointer;
  background:linear-gradient(135deg,#14CFBC,#0fb5a4); color:#06201d;
  font-weight:800; font-size:.95rem;
  transition:transform .12s ease, box-shadow .2s ease;
}
.lesson-open-btn:hover{ transform:translateY(-2px); box-shadow:0 12px 28px rgba(20,207,188,.32); }
.lesson-locked-note{ margin:0; font-size:.85rem; opacity:.6; }

/* Manual Zoom join details (fallback) — student hero (no host key) */
.manual-join{ margin-top:12px; font-size:.82rem; line-height:1.6; color:rgba(255,255,255,.9); }
.manual-join[hidden]{ display:none; }
.manual-join__label{ opacity:.7; font-weight:600; margin-right:4px; }
.manual-join strong{ font-weight:800; letter-spacing:.02em; }

/* Hide the public site floating contact buttons (phone + WhatsApp) inside the eLearning portal */
.float-buttons { display: none !important; }


/* ── Logo în sidebar (logo.svg e alb → invert pe tema deschisă) ── */
.sidebar-brand__logo{ height:30px; display:block; margin:2px 0 4px; filter:invert(.82) sepia(.3) saturate(3) hue-rotate(210deg); }
body[data-theme="dark"] .sidebar-brand__logo{ filter:none; }

/* ── Banner „abonament inactiv” — persistent, dar elegant ── */
.grace-banner--locked{
  background:linear-gradient(135deg, rgba(255,232,48,.16), rgba(20,207,188,.10));
  border:1.5px solid rgba(255,232,48,.55);
  font-weight:600;
}
.grace-banner--pulse{ animation:mcxPulse .5s ease 2; }
@keyframes mcxPulse{ 50%{ transform:scale(1.02); box-shadow:0 0 0 6px rgba(255,232,48,.25); } }


/* ── CTA-ul din bannerul „abonament inactiv”: vizibil, cu glow ── */
.grace-banner--locked .grace-cta{
  background:linear-gradient(135deg, #14CFBC, #0fb5a4);
  color:#06201d;
  padding:10px 22px;
  border-radius:999px;
  font-weight:800;
  font-size:.95rem;
  white-space:nowrap;
  border:none;
  box-shadow:0 0 0 0 rgba(20,207,188,.55), 0 6px 18px rgba(20,207,188,.45);
  animation:mcxGlow 2.2s ease-in-out infinite;
  transition:transform .2s ease, box-shadow .2s ease;
}
.grace-banner--locked .grace-cta:hover{
  transform:translateY(-2px) scale(1.03);
  box-shadow:0 0 0 5px rgba(20,207,188,.22), 0 10px 26px rgba(20,207,188,.55);
  animation-play-state:paused;
}
@keyframes mcxGlow{
  0%,100%{ box-shadow:0 0 0 0 rgba(20,207,188,.55), 0 6px 18px rgba(20,207,188,.40); }
  50%   { box-shadow:0 0 0 7px rgba(20,207,188,.14), 0 6px 22px rgba(20,207,188,.60); }
}
@media (prefers-reduced-motion: reduce){
  .grace-banner--locked .grace-cta{ animation:none; }
}
