/* ================================================================
   Edu LMS — portal.css  v2
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-base:     #f1f5f9;
  --bg-card:     #ffffff;
  --bg-elevated: #f8fafc;
  --bg-hover:    #eef2f7;
  --border:      #e2e8f0;
  --border-md:   #cbd5e1;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-sub:    #475569;
  --accent:      #6366f1;
  --accent-dark: #4f46e5;
  --accent-dim:  rgba(99,102,241,.1);
  --teal:        #0d9488;
  --teal-dim:    rgba(13,148,136,.1);
  --green:       #059669;
  --green-dim:   rgba(5,150,105,.1);
  --yellow:      #d97706;
  --yellow-dim:  rgba(217,119,6,.1);
  --red:         #dc2626;
  --red-dim:     rgba(220,38,38,.1);
  --purple:      #7c3aed;
  --purple-dim:  rgba(124,58,237,.1);
  --radius:      10px;
  --radius-sm:   6px;
  --radius-xs:   4px;
  --sidebar-w:   252px;
  --panel-w:     520px;
  --topbar-h:    56px;
  --font:        'DM Sans', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --shadow:      0 2px 16px rgba(0,0,0,.07);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --t:           .15s ease;
  --sidebar-bg:  #1e1b4b;
  --fs-xs:   .72rem;
  --fs-sm:   .8125rem;
  --fs-base: .9375rem;
  --fs-md:   1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.375rem;
  --lh: 1.55;
}

/* ── Reset ──────────────────────────────────────────────── */
.tmp-wrap *, .tmp-wrap *::before, .tmp-wrap *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  font-family: var(--font); -webkit-font-smoothing: antialiased;
}
.tmp-wrap table, .tmp-wrap thead, .tmp-wrap tbody,
.tmp-wrap tr, .tmp-wrap th, .tmp-wrap td {
  border: 0; border-color: inherit; margin: 0; padding: 0;
  background: none; font-size: inherit; text-align: left; vertical-align: middle;
}
/* ================================================================
   DARK MODE
   Toggled by adding data-theme="dark" to #elms-app
   ================================================================ */
#elms-app[data-theme="dark"],
body:has(#elms-app[data-theme="dark"]) {
  background: #0f1117 !important;
}
#elms-app[data-theme="dark"] {
  --bg-base:     #0f1117;
  --bg-card:     #1a1d27;
  --bg-elevated: #21253a;
  --bg-hover:    #252a3d;
  --border:      #2e3349;
  --border-md:   #3a3f5c;
  --text:        #e8eaf0;
  --text-muted:  #7b82a0;
  --text-sub:    #9ba3c0;
  --accent:      #818cf8;
  --accent-dark: #6366f1;
  --accent-dim:  rgba(129,140,248,.15);
  --teal:        #2dd4bf;
  --teal-dim:    rgba(45,212,191,.12);
  --green:       #34d399;
  --green-dim:   rgba(52,211,153,.12);
  --yellow:      #fbbf24;
  --yellow-dim:  rgba(251,191,36,.12);
  --red:         #f87171;
  --red-dim:     rgba(248,113,113,.12);
  --purple:      #a78bfa;
  --purple-dim:  rgba(167,139,250,.12);
  --shadow:      0 2px 16px rgba(0,0,0,.4);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.5);
  --sidebar-bg:  #0d0f1a;
}
/* Dark mode: inputs/selects need explicit dark backgrounds */
#elms-app[data-theme="dark"] .tmp-field input,
#elms-app[data-theme="dark"] .tmp-field select,
#elms-app[data-theme="dark"] .tmp-field textarea {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border-md);
}
#elms-app[data-theme="dark"] .tmp-search-input,
#elms-app[data-theme="dark"] .tmp-filter-select {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-md);
}
#elms-app[data-theme="dark"] .tmp-auth-wrap {
  background: linear-gradient(145deg,#0d0f1a 0%,#111320 55%,#0d1a18 100%);
}
#elms-app[data-theme="dark"] .tmp-auth-card {
  background: var(--bg-card);
  box-shadow: 0 4px 40px rgba(0,0,0,.6);
}
#elms-app[data-theme="dark"] .elms-guardian-card {
  background: rgba(251,191,36,.07);
}
#elms-app[data-theme="dark"] .elms-guardian-card .tmp-field input,
#elms-app[data-theme="dark"] .elms-guardian-card .tmp-field select {
  background: var(--bg-elevated);
}




/* ── WP chrome removal ──────────────────────────────────── */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
body { margin-top: 0 !important; padding-top: 0 !important; }
.tmp-wrap-outer .entry-title, .tmp-wrap-outer .page-title,
.tmp-wrap-outer h1.entry-title, .tmp-wrap-outer h1.page-title { display: none !important; }

/* ── Viewport takeover ──────────────────────────────────── */
/* ── WP chrome + theme suppression ─────────────────────────── */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
body { margin-top: 0 !important; padding-top: 0 !important; }
/* Page title heading injected by theme above shortcode */
.tmp-wrap-outer .entry-title,
.tmp-wrap-outer .page-title,
.tmp-wrap-outer h1.entry-title,
.tmp-wrap-outer h1.page-title,
.tmp-wrap-outer .entry-header,
.tmp-wrap-outer .page-header { display: none !important; }

/* Full-page takeover ─────────────────────────────────────────
   Using position:fixed so the element is sized by the viewport,
   not by document width. This eliminates the scrollbar-width
   bleed that caused the right-side blur on Windows.            */
html, body {
  overflow: hidden !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* Hide native browser scrollbar — appears on top of our fixed portal on Windows */
/* Kill scrollbar + match bg so gap between portal edge and viewport is invisible */
html, body {
  scrollbar-width: none !important;
  background: #f1f5f9 !important;  /* matches --bg-base; JS overrides to #0f1117 in dark */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.tmp-wrap-outer {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}
.tmp-wrap {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  color: var(--text);
  font-size: var(--fs-base);
  overflow: hidden;
  z-index: 99999;
  /* 1px border frame all around the portal */
  outline: 1px solid var(--border-md);
}
/* Force theme header/footer UNDER our portal overlay */
body.elms-portal-page #masthead,
body.elms-portal-page #site-header,
body.elms-portal-page .site-header,
body.elms-portal-page header,
body.elms-portal-page .site-footer,
body.elms-portal-page footer,
body.elms-portal-page .entry-header,
body.elms-portal-page .page-header,
body.elms-portal-page h1.entry-title,
body.elms-portal-page h1.page-title,
body.elms-portal-page .wp-block-post-title,
body.elms-portal-page .wp-block-template-part {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
.admin-bar .tmp-wrap { top: 32px !important; }
@media screen and (max-width:782px) { .admin-bar .tmp-wrap { top: 46px !important; } }

/* ================================================================
   AUTH SCREEN
   ================================================================ */
.tmp-auth-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; width: 100%; height: 100%;
  background: linear-gradient(145deg,#eef2ff 0%,#f8faff 55%,#f0fdf9 100%);
  overflow-y: auto;
}
.tmp-auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 44px; width: 100%; max-width: 440px;
  box-shadow: 0 4px 40px rgba(99,102,241,.12), 0 1px 3px rgba(0,0,0,.06);
}
.tmp-auth-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 6px; font-size: var(--fs-lg); font-weight: 700;
}
.tmp-auth-logo-icon {
  width: 44px; height: 44px; background: var(--accent); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99,102,241,.4);
}
.tmp-auth-tagline { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: 28px; }
.tmp-tabs {
  display: flex; background: var(--bg-base);
  border-radius: var(--radius-sm); padding: 3px; margin-bottom: 26px; gap: 3px;
}
.tmp-tab {
  flex: 1; padding: 8px; border: none; background: transparent;
  color: var(--text-muted); border-radius: 5px; cursor: pointer;
  font-size: var(--fs-sm); font-weight: 600; transition: var(--t);
}
.tmp-tab.active {
  background: var(--bg-card); color: var(--accent);
  box-shadow: 0 1px 4px rgba(0,0,0,.09);
}
.tmp-tab-content { display: none; }
.tmp-tab-content.active { display: block; }

/* ================================================================
   FORM ELEMENTS
   ================================================================ */
.tmp-form { display: flex; flex-direction: column; gap: 13px; }
.tmp-field { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.tmp-field label {
  font-size: var(--fs-xs); font-weight: 700; color: var(--text-sub);
  text-transform: uppercase; letter-spacing: .06em;
}
.tmp-field input,
.tmp-field select,
.tmp-field textarea {
  background: #fff; border: 1px solid var(--border-md); border-radius: var(--radius-sm);
  color: var(--text); font-size: var(--fs-base); padding: 9px 12px;
  transition: border-color .12s, box-shadow .12s;
  width: 100%; font-family: var(--font); appearance: none; line-height: var(--lh);
}
.tmp-field input:focus,
.tmp-field select:focus,
.tmp-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.tmp-field input[readonly] { opacity: .5; cursor: not-allowed; }
.tmp-field input::placeholder { color: var(--text-muted); opacity: 1; }
.tmp-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  background-size: 18px; padding-right: 36px; cursor: pointer;
}
.tmp-field-row { display: flex; gap: 12px; }
.tmp-field-row > .tmp-field { flex: 1; }
.tmp-field textarea { resize: vertical; min-height: 80px; }
.tmp-field-hint { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 3px; }

/* ================================================================
   BUTTONS
   ================================================================ */
.tmp-btn-primary {
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 10px 20px;
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  transition: var(--t); display: inline-flex; align-items: center;
  justify-content: center; gap: 6px; white-space: nowrap;
}
.tmp-btn-primary:hover { background: var(--accent-dark); box-shadow: 0 3px 10px rgba(99,102,241,.35); transform: translateY(-1px); }
.tmp-btn-primary:active { transform: none; box-shadow: none; }
.tmp-btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.tmp-btn-outline {
  background: transparent; border: 1px solid var(--border-md); color: var(--text-sub);
  border-radius: var(--radius-sm); padding: 9px 17px;
  font-size: var(--fs-sm); cursor: pointer; transition: var(--t);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.tmp-btn-outline:hover { background: var(--bg-elevated); border-color: var(--border-md); color: var(--text); }
.tmp-btn-ghost {
  background: transparent; border: none; color: var(--text-muted);
  padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: var(--fs-sm); transition: var(--t);
  display: inline-flex; align-items: center; gap: 6px;
}
.tmp-btn-ghost:hover { color: var(--text); background: var(--bg-hover); }
.tmp-btn-danger {
  background: var(--red-dim); color: var(--red); border: none;
  border-radius: var(--radius-sm); padding: 7px 13px;
  font-size: var(--fs-xs); font-weight: 700; cursor: pointer;
  transition: var(--t); display: inline-flex; align-items: center; gap: 5px;
}
.tmp-btn-danger:hover { background: var(--red); color: #fff; }
.tmp-btn-sm { padding: 6px 12px !important; font-size: var(--fs-xs) !important; }
.tmp-btn-teal {
  background: var(--teal); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 8px 15px;
  font-size: var(--fs-xs); font-weight: 700; cursor: pointer;
  transition: var(--t); display: inline-flex; align-items: center; gap: 5px;
}
.tmp-btn-teal:hover { background: #0f766e; }

.tmp-msg { font-size: var(--fs-sm); font-weight: 500; padding: 9px 12px; border-radius: var(--radius-sm); display: none; }
.tmp-msg:not(:empty) { display: block; }
.tmp-msg-error   { background: var(--red-dim);   color: var(--red); }
.tmp-msg-success { background: var(--green-dim); color: var(--green); }

/* ================================================================
   PORTAL SHELL
   ================================================================ */
.tmp-portal { display: flex; flex: 1; min-height: 0; overflow: hidden; }

/* ── Sidebar ────────────────────────────────────────────── */
.tmp-sidebar {
  width: var(--sidebar-w); background: var(--sidebar-bg);
  display: flex; flex-direction: column; flex-shrink: 0;
  height: 100%; overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.05);
}
.tmp-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.tmp-sidebar-logo {
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
  height: var(--topbar-h); border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: var(--fs-md); font-weight: 700; color: #fff;
  flex-shrink: 0; letter-spacing: -.01em;
}
.tmp-sidebar-logo-icon {
  width: 30px; height: 30px; background: var(--accent); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0;
}

.tmp-nav { display: flex; flex-direction: column; gap: 1px; padding: 8px; flex: 1; overflow-y: auto; min-height: 0; }
.tmp-nav-section { display: flex; flex-direction: column; gap: 1px; padding: 8px 0 4px; border-top: 1px solid rgba(255,255,255,.07); margin-top: 4px; }
.tmp-nav-section-label {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.25);
  padding: 6px 10px 3px 12px;
}
.tmp-nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px;
  border-radius: 8px; color: rgba(255,255,255,.55); font-size: var(--fs-sm);
  font-weight: 500; cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; transition: background .12s, color .12s;
}
.tmp-nav-item:hover  { background: rgba(255,255,255,.09); color: rgba(255,255,255,.9); }
.tmp-nav-item.active { background: rgba(255,255,255,.13); color: #fff; font-weight: 600; }
.tmp-nav-item.active .tmp-nav-icon svg { stroke: #fff !important; opacity: 1; }
.tmp-nav-item:hover  .tmp-nav-icon svg { stroke: rgba(255,255,255,.88) !important; }
.tmp-nav-icon { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.tmp-nav-icon svg { stroke: rgba(255,255,255,.45); transition: stroke .12s; }

.tmp-sidebar-footer {
  padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.tmp-user-chip { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.tmp-avatar {
  width: 30px; height: 30px; background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .7rem; color: #fff; flex-shrink: 0;
}
.tmp-user-info { display: flex; flex-direction: column; min-width: 0; }
.tmp-user-name { font-size: var(--fs-xs); font-weight: 600; color: rgba(255,255,255,.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmp-user-role { font-size: .63rem; color: rgba(255,255,255,.3); }
.tmp-logout-btn {
  background: none; border: none; color: rgba(255,255,255,.3); cursor: pointer;
  padding: 5px; border-radius: 5px; transition: var(--t); display: flex;
}
.tmp-logout-btn:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.09); }

/* ── Topbar ─────────────────────────────────────────────── */
.tmp-topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar-h); padding: 0 20px;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 12px;
}
.tmp-topbar-title { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.02em; }
.tmp-topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ── Content area ───────────────────────────────────────── */
.tmp-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px 22px; }
.tmp-view { display: none; }
.tmp-view.active { display: block; }

.tmp-view-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.tmp-view-header h2 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; }
.tmp-view-sub { color: var(--text-muted); font-size: var(--fs-sm); margin-top: 2px; }
.tmp-view-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── KPI cards ──────────────────────────────────────────── */
.tmp-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(195px,1fr)); gap: 12px; margin-bottom: 20px; }
.tmp-kpi-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 17px;
  display: flex; align-items: center; gap: 13px; transition: var(--t);
}
.tmp-kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tmp-kpi-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.tmp-kpi-value { font-size: 1.85rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.tmp-kpi-label { font-size: var(--fs-xs); font-weight: 700; color: var(--text-sub); margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }

/* ── Filter bar ─────────────────────────────────────────── */
.tmp-filter-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.tmp-search-wrap { position: relative; flex: 1; min-width: 160px; max-width: 280px; }
.tmp-search-wrap svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; opacity: .45; }
.tmp-search-input {
  border: 1px solid var(--border-md); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text);
  padding: 8px 12px 8px 31px; font-size: var(--fs-sm); width: 100%; transition: var(--t);
}
.tmp-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.tmp-filter-select {
  border: 1px solid var(--border-md); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text);
  padding: 8px 28px 8px 10px; font-size: var(--fs-sm); cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 16px; transition: var(--t);
}
.tmp-filter-select:focus { outline: none; border-color: var(--accent); }

/* ── Table ──────────────────────────────────────────────── */
.tmp-table-wrap { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border-md); }
.tmp-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tmp-table thead { background: var(--bg-elevated); }
.tmp-table th {
  padding: 9px 13px; font-size: .68rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .07em; white-space: nowrap;
  border-bottom: 1px solid var(--border-md);
}
.tmp-table td { padding: 10px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tmp-table tbody tr:last-child td { border-bottom: none; }
.tmp-table tbody tr:hover td { background: var(--bg-hover); cursor: pointer; }
.tmp-cell-name { font-weight: 600; }
.tmp-cell-sub { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 1px; }

/* ── Badges ─────────────────────────────────────────────── */
.tmp-badge {
  display: inline-block; padding: 2px 7px; border-radius: 20px;
  font-size: .67rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; white-space: nowrap;
}
.tmp-badge-green  { background: var(--green-dim);  color: var(--green); }
.tmp-badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.tmp-badge-red    { background: var(--red-dim);    color: var(--red); }
.tmp-badge-grey   { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.tmp-badge-blue   { background: var(--accent-dim); color: var(--accent); }
.tmp-badge-purple { background: var(--purple-dim); color: var(--purple); }
.tmp-badge-teal   { background: var(--teal-dim);   color: var(--teal); }

/* ── Action buttons ─────────────────────────────────────── */
.tmp-actions { display: flex; gap: 4px; align-items: center; }
.tmp-actions button, .tmp-actions a {
  font-size: .7rem; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: 4px 9px; border-radius: var(--radius-xs); transition: var(--t);
  display: inline-flex; align-items: center; gap: 3px; border: none; background: none;
}
.tmp-actions .edit   { color: var(--accent);  background: var(--accent-dim); }
.tmp-actions .edit:hover   { background: var(--accent); color: #fff; }
.tmp-actions .delete { color: var(--red);     background: var(--red-dim); }
.tmp-actions .delete:hover { background: var(--red); color: #fff; }
.tmp-actions .view   { color: var(--teal);    background: var(--teal-dim); }
.tmp-actions .view:hover   { background: var(--teal); color: #fff; }

/* ── Empty state ────────────────────────────────────────── */
.tmp-empty { padding: 52px 24px; text-align: center; }
.tmp-empty-icon { font-size: 2.2rem; margin-bottom: 12px; opacity: .4; }
.tmp-empty h3 { font-size: var(--fs-md); font-weight: 600; color: var(--text-sub); margin-bottom: 6px; }
.tmp-empty p { font-size: var(--fs-sm); color: var(--text-muted); max-width: 300px; margin: 0 auto; }

/* ── Slide-in panel ─────────────────────────────────────── */
/*
  BLUR FIX: backdrop-filter on the overlay causes a GPU compositing layer
  that bleeds as a blur stripe next to the scrollbar on Windows/Linux.
  Removed entirely — semi-transparent overlay is sufficient.

  CLOSE BUTTON FIX: panels used onclick="E.closePanel()" but E has no such
  method. All panel close buttons now use onclick="closePanel()" which calls
  the globally-scoped function.
*/
.tmp-panel-overlay {
  display: none; position: absolute; inset: 0;
  background: rgba(15,23,42,.4); z-index: 300;
  /* NO backdrop-filter — this was causing the right-side blur artefact */
}
.tmp-panel-overlay.open { display: block; }
.tmp-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: var(--panel-w); max-width: 100%;
  background: var(--bg-card); border-left: 1px solid var(--border-md);
  z-index: 400; display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,.1);
  /* Isolate compositing to this element, preventing bleed */
  isolation: isolate;
}
.tmp-panel.open { transform: translateX(0); }
.tmp-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; height: var(--topbar-h);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
  gap: 8px;
}
.tmp-panel-title { font-size: var(--fs-md); font-weight: 700; flex: 1; }
.tmp-panel-close {
  /* Fixed: was not working because onclick called E.closePanel() which
     doesn't exist. Now calls global closePanel() function directly. */
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 20px; line-height: 1;
  transition: var(--t); flex-shrink: 0;
}
.tmp-panel-close:hover { background: var(--bg-hover); color: var(--text); }
.tmp-panel-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 18px; }
.tmp-panel-footer {
  padding: 14px 18px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0;
}

/* ── Section title ──────────────────────────────────────── */
.tmp-section-title {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted);
  margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.tmp-section-title:first-child { margin-top: 0; }

/* ── Info grids ─────────────────────────────────────────── */
.tmp-info-grid,
.elms-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.elms-info-item { display: flex; flex-direction: column; gap: 2px; }
.tmp-info-label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.tmp-info-value { font-size: var(--fs-sm); color: var(--text); font-weight: 500; }

/* ── Progress bar ───────────────────────────────────────── */
.tmp-progress-wrap { display: flex; align-items: center; gap: 8px; }
.tmp-progress-bar { flex: 1; height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; border: 1px solid var(--border); min-width: 50px; }
.tmp-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }
.tmp-progress-pct { font-size: var(--fs-xs); font-weight: 700; color: var(--text-sub); min-width: 28px; text-align: right; }

/* ── Course cards ───────────────────────────────────────── */
.tmp-course-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 13px; }
.tmp-course-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; transition: var(--t);
  cursor: pointer; display: flex; flex-direction: column; gap: 10px;
}
.tmp-course-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: rgba(99,102,241,.35); }
.tmp-course-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tmp-course-card-title { font-size: var(--fs-md); font-weight: 700; line-height: 1.3; }
.tmp-course-card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.tmp-course-card-desc { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tmp-course-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--border); margin-top: auto; }
.tmp-course-card-stat { font-size: var(--fs-xs); color: var(--text-muted); }
.tmp-course-card-price { font-size: var(--fs-md); font-weight: 700; color: var(--accent); }

/* ── Enroll list ────────────────────────────────────────── */
.tmp-enroll-list { display: flex; flex-direction: column; gap: 6px; }
.tmp-enroll-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; background: var(--bg-elevated);
  border-radius: var(--radius-sm); border: 1px solid var(--border); gap: 8px;
}
.tmp-enroll-name { font-weight: 600; font-size: var(--fs-sm); }
.tmp-enroll-meta { font-size: var(--fs-xs); color: var(--text-muted); }
.tmp-enroll-actions { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }

/* ── Toast ──────────────────────────────────────────────── */
.tmp-toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  padding: 11px 17px; border-radius: 10px; font-size: var(--fs-sm);
  font-weight: 600; color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,.2);
  transform: translateY(12px); opacity: 0;
  transition: transform .24s cubic-bezier(.34,1.56,.64,1), opacity .24s ease;
  pointer-events: none; max-width: 300px;
}
.tmp-toast.show { transform: translateY(0); opacity: 1; }
.tmp-toast.success { background: var(--green); }
.tmp-toast.error   { background: var(--red); }
.tmp-toast.info    { background: var(--accent); }

/* ── Loading ────────────────────────────────────────────── */
.tmp-loading { display: flex; align-items: center; justify-content: center; padding: 48px; }
.tmp-spinner { width: 28px; height: 28px; border: 3px solid var(--border-md); border-top-color: var(--accent); border-radius: 50%; animation: elms-spin .6s linear infinite; }
@keyframes elms-spin { to { transform: rotate(360deg); } }

/* ── Confirm dialog ─────────────────────────────────────── */
.tmp-confirm-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 9000; align-items: center; justify-content: center; }
.tmp-confirm-overlay.open { display: flex; }
.tmp-confirm-box { background: var(--bg-card); border-radius: 16px; padding: 28px; max-width: 350px; width: 90%; box-shadow: var(--shadow-lg); text-align: center; }
.tmp-confirm-icon { font-size: 1.9rem; margin-bottom: 10px; }
.tmp-confirm-box h3 { font-size: var(--fs-md); font-weight: 700; margin-bottom: 8px; }
.tmp-confirm-box p { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.tmp-confirm-btns { display: flex; gap: 10px; justify-content: center; }

/* ── Card + dash grid ───────────────────────────────────── */
.tmp-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.tmp-card-title { font-size: .68rem; font-weight: 700; color: var(--text-sub); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px; }
.tmp-dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width:900px) { .tmp-dash-grid { grid-template-columns: 1fr; } }

.tmp-recent-list { display: flex; flex-direction: column; }
.tmp-recent-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.tmp-recent-item:last-child { border-bottom: none; }
.tmp-recent-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tmp-recent-text { flex: 1; font-size: var(--fs-sm); }
.tmp-recent-time { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }

/* ── View tabs ──────────────────────────────────────────── */
.tmp-view-tabs { display: flex; gap: 2px; background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 3px; border: 1px solid var(--border); }
.tmp-view-tab { padding: 6px 12px; border: none; background: transparent; color: var(--text-muted); border-radius: 4px; cursor: pointer; font-size: var(--fs-xs); font-weight: 600; transition: var(--t); }
.tmp-view-tab.active { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ================================================================
   CURRICULUM BUILDER
   ================================================================ */
.elms-curriculum { display: flex; flex-direction: column; gap: 8px; }
.elms-topic-block { background: var(--bg-card); border: 1px solid var(--border-md); border-radius: var(--radius); overflow: hidden; }
.elms-topic-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 13px;
  background: var(--bg-elevated); cursor: pointer; user-select: none; transition: background .12s;
}
.elms-topic-header:hover { background: var(--bg-hover); }
.elms-topic-drag { color: var(--text-muted); font-size: 13px; cursor: grab; opacity: .6; }
.elms-topic-title { flex: 1; font-weight: 700; font-size: var(--fs-sm); }
.elms-topic-count { font-size: var(--fs-xs); color: var(--text-muted); }
.elms-topic-toggle { font-size: 11px; color: var(--text-muted); transition: transform .18s; }
.elms-topic-toggle.open { transform: rotate(0deg); }
.elms-topic-body { padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.elms-curriculum-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-base);
  font-size: var(--fs-sm); transition: background .1s;
}
.elms-curriculum-item:hover { background: var(--bg-elevated); }
.elms-item-icon { font-size: 12px; flex-shrink: 0; opacity: .7; }
.elms-item-title { flex: 1; font-weight: 500; }
.elms-item-meta { font-size: var(--fs-xs); color: var(--text-muted); }
.elms-item-actions { display: flex; gap: 2px; margin-left: auto; }
.elms-item-btn {
  background: none; border: none; cursor: pointer;
  padding: 3px 5px; border-radius: 4px; color: var(--text-muted);
  font-size: 12px; transition: var(--t);
}
.elms-item-btn:hover { background: var(--bg-hover); color: var(--text); }
.elms-add-item-row { display: flex; gap: 5px; padding: 6px 0 2px; flex-wrap: wrap; }

/* ── Question builder ───────────────────────────────────── */
.elms-question-item { background: var(--bg-elevated); border: 1px solid var(--border-md); border-radius: var(--radius-sm); padding: 12px 13px; }
.elms-question-header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.elms-question-num {
  background: var(--accent-dim); color: var(--accent); border-radius: 50%;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.elms-question-text { flex: 1; font-weight: 600; font-size: var(--fs-sm); }
.elms-q-type-badge { font-size: .62rem; padding: 2px 6px; border-radius: 10px; background: var(--purple-dim); color: var(--purple); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; }
.elms-answer-options { display: flex; flex-direction: column; gap: 3px; padding-left: 30px; }
.elms-answer-opt { display: flex; align-items: center; gap: 5px; font-size: var(--fs-sm); }
.elms-answer-opt.correct { color: var(--green); font-weight: 600; }
.elms-answer-opt.correct::before { content: '✓'; font-size: 11px; }
.elms-opt-letter { background: var(--border); border-radius: 4px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }

/* ── Analytics ──────────────────────────────────────────── */
.elms-chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.elms-chart-title { font-size: .68rem; font-weight: 700; color: var(--text-sub); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px; }
.elms-mini-bar-chart { display: flex; align-items: flex-end; gap: 2px; height: 52px; }
.elms-bar { flex: 1; background: var(--accent-dim); border-radius: 2px 2px 0 0; min-height: 3px; transition: background .1s; position: relative; cursor: pointer; }
.elms-bar:hover { background: var(--accent); }
.elms-bar:hover::after {
  content: attr(title); position: absolute; bottom: calc(100% + 4px); left: 50%;
  transform: translateX(-50%); background: var(--text); color: #fff;
  padding: 3px 7px; border-radius: 4px; font-size: 10px;
  white-space: nowrap; pointer-events: none;
}
.elms-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.elms-stat-row:last-child { border-bottom: none; }
.elms-stat-label { color: var(--text-sub); }
.elms-stat-val { font-weight: 700; }

/* ── Gradebook ──────────────────────────────────────────── */
.elms-grade-a { color: #059669; font-weight: 700; }
.elms-grade-b { color: #0d9488; font-weight: 700; }
.elms-grade-c { color: #d97706; font-weight: 700; }
.elms-grade-f { color: #dc2626; font-weight: 700; }

/* ── Certificates ───────────────────────────────────────── */
.elms-cert-card {
  background: linear-gradient(135deg,#1e1b4b 0%,#312e81 100%);
  border-radius: var(--radius); padding: 20px; color: #fff;
  position: relative; overflow: hidden;
}
.elms-cert-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}
.elms-cert-badge  { font-size: 24px; margin-bottom: 7px; position: relative; }
.elms-cert-title  { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; opacity: .5; margin-bottom: 3px; position: relative; }
.elms-cert-name   { font-size: var(--fs-lg); font-weight: 700; margin-bottom: 2px; position: relative; }
.elms-cert-course { font-size: var(--fs-sm); opacity: .72; margin-bottom: 10px; position: relative; }
.elms-cert-number { font-size: .68rem; font-family: var(--font-mono); opacity: .4; position: relative; }
.elms-cert-date   { font-size: .68rem; opacity: .4; margin-top: 2px; position: relative; }

/* ── Submissions ────────────────────────────────────────── */
.elms-submission-card { background: var(--bg-elevated); border: 1px solid var(--border-md); border-radius: var(--radius); padding: 13px; margin-bottom: 8px; }
.elms-submission-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 7px; }
.elms-submission-student { font-weight: 700; font-size: var(--fs-sm); }
.elms-submission-meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 1px; }
.elms-submission-body {
  font-size: var(--fs-sm); color: var(--text-sub); line-height: 1.6;
  padding: 9px; background: var(--bg-card); border-radius: var(--radius-sm);
  border: 1px solid var(--border); margin-bottom: 8px;
  max-height: 100px; overflow-y: auto;
}
.elms-grade-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.elms-grade-form input { width: 80px; }

/* ── Builder two-col layout ─────────────────────────────── */
.elms-builder-layout { display: grid; grid-template-columns: 1fr 350px; gap: 16px; }
@media(max-width:1100px) { .elms-builder-layout { grid-template-columns: 1fr; } }

/* ── Sub-tabs ───────────────────────────────────────────── */
.elms-subtabs { display: flex; border-bottom: 2px solid var(--border-md); margin-bottom: 16px; }
.elms-subtab {
  padding: 7px 14px; border: none; background: none; color: var(--text-muted);
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--t);
}
.elms-subtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.elms-subtab:hover:not(.active) { color: var(--text-sub); }
.elms-subtab-content { display: none; }
.elms-subtab-content.active { display: block; }
.elms-ptab-content { display: none; }
.elms-ptab-content.active { display: block; }

/* ── Misc ───────────────────────────────────────────────── */
.elms-drip-badge { background: var(--yellow-dim); color: var(--yellow); font-size: .67rem; padding: 2px 6px; border-radius: 10px; font-weight: 700; }
.elms-rich-preview { font-size: var(--fs-sm); line-height: 1.7; color: var(--text-sub); }
.elms-rich-preview h1, .elms-rich-preview h2, .elms-rich-preview h3 { color: var(--text); margin: 10px 0 5px; }
.elms-rich-preview p { margin: 0 0 7px; }
.elms-rich-preview ul, .elms-rich-preview ol { padding-left: 18px; margin: 0 0 7px; }


/* ================================================================
   STUDENT TYPES
   ================================================================ */

/* Type tab bar above the students table */
.elms-type-tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--border-md);
  margin-bottom: 14px;
}
.elms-type-tab {
  padding: 8px 16px; border: none; background: none;
  color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: var(--t);
}
.elms-type-tab:hover:not(.active) { color: var(--text-sub); }
.elms-type-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.elms-type-tab--minor.active { color: var(--yellow); border-bottom-color: var(--yellow); }

/* Adult / Minor badges in the table */
.elms-badge-adult {
  background: var(--accent-dim); color: var(--accent);
  font-size: .65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}
.elms-badge-minor {
  background: var(--yellow-dim); color: var(--yellow);
  font-size: .65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}

/* Toggle buttons inside the Add/Edit Student panel */
.elms-type-toggle { display: flex; gap: 8px; margin-bottom: 18px; }
.elms-type-btn {
  flex: 1; padding: 12px 14px; border: 2px solid var(--border-md);
  border-radius: var(--radius); background: var(--bg-elevated);
  color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer; transition: var(--t); text-align: left; line-height: 1.3;
}
.elms-type-btn:hover { border-color: var(--border-md); color: var(--text); background: var(--bg-hover); }
.elms-type-btn.active {
  border-color: var(--accent); background: var(--accent-dim);
  color: var(--accent);
}
#sp-type-minor.active {
  border-color: var(--yellow); background: var(--yellow-dim);
  color: var(--yellow);
}

/* Guardian details card */
.elms-guardian-card {
  background: var(--yellow-dim); border: 1px solid var(--yellow);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.elms-guardian-card .tmp-field input,
.elms-guardian-card .tmp-field select {
  background: #fff;
}

/* Approval checkbox row */
.elms-approval-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 4px; flex-wrap: wrap;
}
.elms-approval-label {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  color: var(--text);
}
.elms-approval-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--green); cursor: pointer;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width:768px) {
  :root { --sidebar-w: 0px; --panel-w: 100%; }
  .tmp-sidebar { display: none; }
  .tmp-kpi-grid { grid-template-columns: 1fr 1fr; }
  .tmp-course-grid { grid-template-columns: 1fr; }
  .tmp-info-grid, .elms-info-grid { grid-template-columns: 1fr; }
  .tmp-field-row { flex-direction: column; }
  .elms-builder-layout { grid-template-columns: 1fr; }
  .tmp-content { padding: 14px 15px; }
}

/* ═══════════════════════════════════════════════
   BILLING / PRICING
   ═══════════════════════════════════════════════ */

/* Plan Banner */
.elms-plan-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.elms-plan-banner-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  margin-bottom: 4px;
}
.elms-plan-banner-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}
.elms-usage-group {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.elms-usage-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.elms-usage-val {
  font-weight: 600;
  color: var(--text);
}
.elms-usage-bar-wrap {
  height: 4px;
  background: var(--bg-hover);
  border-radius: 99px;
  margin-top: -4px;
  margin-bottom: 4px;
  overflow: hidden;
}
.elms-usage-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}
.elms-usage-green  { background: var(--green); }
.elms-usage-yellow { background: var(--yellow); }
.elms-usage-red    { background: var(--red); }

/* Pricing Grid */
.elms-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .elms-pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .elms-pricing-grid { grid-template-columns: 1fr; }
}
.elms-pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px 20px;
  margin-top: 12px; /* space for the absolutely-positioned badge */
  transition: var(--t);
}
.elms-pricing-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.elms-pricing-card--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(99,102,241,.15);
}
.elms-pricing-card--current {
  border-color: var(--green);
  background: var(--green-dim);
}
.elms-pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
.elms-pricing-name {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.elms-pricing-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 16px;
}
.elms-pricing-period {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
}
.elms-pricing-features {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.elms-pricing-features li {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.elms-pricing-features li::before { content: none; }

/* Warning msg */
.tmp-msg-warning {
  background: #fef9c3;
  color: #713f12;
  border: 1px solid #fde047;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: var(--fs-xs);
}
[data-theme="dark"] .tmp-msg-warning {
  background: rgba(254,249,195,.1);
  color: #fde047;
  border-color: rgba(253,224,71,.3);
}
