﻿/* History, queue, credits & access, PayU, paging and the signed-in workspace (team.py / payu.py). */

/* ---------- paging ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0 4px; flex-wrap: wrap; }
.pager .btn[disabled], .pager .btn.disabled { opacity: .45; pointer-events: none; }
.pager-info { font-size: .9rem; color: var(--muted); }
.pager-info b { color: var(--ink); }

/* ---------- filters ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; }
.filter-bar select, .filter-bar input[type="date"] { min-height: 40px; border-radius: var(--r-sm, 10px); }
.filter-bar select { width: auto; flex: 0 1 auto; }
.fb-search { flex: 1 1 240px; position: relative; display: flex; align-items: center; margin: 0; }
.fb-search i { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.fb-search input { width: 100%; padding-left: 36px; min-height: 40px; }
.fb-date { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .85rem; color: var(--muted); }
.fb-date input { width: auto; }

.filter-panel { padding: 0; overflow: visible; }
.filter-bar.flat { box-shadow: none; border: 0; background: none; margin: 0; }
.adv-filters { border-top: 1px solid var(--line); }
.adv-filters > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adv-filters > summary::-webkit-details-marker { display: none; }
.adv-filters > summary small { font-weight: 400; }
.adv-filters[open] > summary { border-bottom: 1px dashed var(--line); }
.fcount { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand);
  color: #fff; font-size: .75rem; }
.fgroups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; padding: 14px 16px; }
.fgroup { border: 1px solid var(--line); border-radius: var(--r-md, 14px); padding: 10px 12px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px;
  align-content: flex-start; min-width: 0; }
.fgroup.wide { grid-column: 1 / -1; }
.fgroup legend { padding: 0 6px; font-weight: 700; font-size: .85rem; display: flex; gap: 10px; align-items: center; }
.link-btn { border: 0; background: none; color: var(--brand); font-size: .78rem; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.fchip { position: relative; margin: 0; cursor: pointer; }
.fchip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fchip span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  font-size: .85rem; background: var(--card); transition: all .15s; user-select: none; }
.fchip span b { color: var(--muted); font-weight: 600; }
.fchip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.fchip input:checked + span::before { content: "\2713"; font-weight: 800; }
.fchip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.fnum { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 0 0; font-size: .85rem; color: var(--muted); }
.fnum input { width: 80px !important; min-height: 34px; padding: 4px 8px; }
.email-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; padding: 6px; border: 1px solid #dfe3ec;
  border-radius: var(--r-sm, 10px); background: var(--card); cursor: text; }
.email-picker .email-input { flex: 1 1 220px; border: 0 !important; box-shadow: none !important; min-height: 32px; padding: 4px 6px; background: none; }
.email-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--brand-soft);
  color: var(--brand-dark); font-size: .82rem; font-weight: 600; }
.email-tag button { border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.fg-actions { display: flex; align-items: center; gap: 12px; padding: 0 16px 16px; flex-wrap: wrap; }
.view-more { display: flex; justify-content: center; margin-top: 12px; }

.hist-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.hchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: .85rem; text-decoration: none; transition: border-color .15s, background .15s; }
.hchip b { font-weight: 700; color: var(--muted); }
.hchip:hover { border-color: var(--brand); }
.hchip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.hchip.on b { color: inherit; }

/* ---------- status ---------- */
.st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  white-space: nowrap; background: #eef2f7; color: #475569; }
.st-pill.st-done { background: #e8f8ee; color: #15803d; }
.st-pill.st-processing { background: #eef0ff; color: #4338ca; }
.st-pill.st-queued { background: #fff7e6; color: #b45309; }
.st-pill.st-failed { background: #fdecec; color: #b91c1c; }
.st-pill.st-cancelled { background: #f1f2f6; color: #6b7280; }
.st-why { color: #b91c1c; margin-top: 4px; max-width: 34ch; overflow-wrap: anywhere; }
.hist-status .muted { margin-top: 4px; max-width: 30ch; }
.hist-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; }
.hist-meta span { overflow-wrap: anywhere; }
.hist-row.st-cancelled td, .hist-row.st-failed td { background: rgba(148, 163, 184, .05); }

.actions-col { text-align: right; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.row-actions form { margin: 0; }

/* cancel / remove pop-overs */
.cancel-menu { position: relative; display: inline-block; }
.cancel-menu > summary { list-style: none; cursor: pointer; }
.cancel-menu > summary::-webkit-details-marker { display: none; }
.cancel-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(380px, 86vw); padding: 16px; text-align: left;
  box-shadow: var(--sh-2, var(--shadow)); border: 1px solid var(--line); }
.cancel-pop .stack { display: flex; flex-direction: column; gap: 8px; }
.cancel-pop hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.cancel-pop .check { align-items: flex-start; font-weight: 400; }
.cancel-pop textarea, .cancel-pop input:not([type="checkbox"]):not([type="radio"]) { width: 100%; }
.cancel-pop .field { margin: 0; }
.manage-pop .cancel-pop { right: auto; left: 0; }

/* ---------- credits & access ---------- */
.give-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.give-form .field { flex: 1 1 220px; margin: 0; }
.give-form .field.narrow { flex: 0 0 110px; }
.give-form .check { margin: 0 0 10px; }
.mini-form { display: inline-flex; gap: 6px; align-items: center; }
.num-in { width: 76px !important; min-height: 32px; padding: 4px 8px; }
.left-num { font-size: 1.05rem; }
.left-num.zero { color: var(--muted); }
.left-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; margin-top: 4px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; font-size: .78rem; }
.role-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #f1f5f9; color: #334155; }
.role-tag.role-manager { background: #e0f2fe; color: #075985; }
.role-tag.role-instructor { background: #dcfce7; color: #166534; }
tr.is-removed td { opacity: .7; }
tr.is-removed td:last-child { opacity: 1; }
.invite-checks input { max-width: 160px; }
.plan-slot { border: 1px solid var(--brand-soft); }

.detail-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0 0; font-size: .86rem; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.view-details { width: 100%; justify-content: center; margin-bottom: 10px; }

/* live updates: a thin bar while an area refreshes */
html.live-busy::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; background: var(--grad);
  animation: livebar 1s ease-in-out infinite; transform-origin: left; }
@keyframes livebar { 0% { transform: scaleX(.05); opacity: 1; } 70% { transform: scaleX(.85); } 100% { transform: scaleX(1); opacity: .2; } }
html.live-busy [data-live] { transition: opacity .2s; opacity: .75; }

/* validity, subject / class, organization */
.validity-pick { display: flex; gap: 6px; align-items: center; }
.validity-pick select { min-width: 0; }
.validity-field.compact { display: inline-flex; margin: 0; }
.validity-field.compact > span:first-child { display: none; }
.validity-field.compact select { min-height: 32px; padding: 4px 28px 4px 8px; font-size: .82rem; width: auto; }
.validity-field.compact input[type="date"] { min-height: 32px; padding: 4px 6px; font-size: .82rem; width: auto; }
.invite-credits, .invite-class { align-items: flex-end; }
.invite-note { margin: -4px 0 8px; }
.org-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft);
  color: var(--brand-dark); font-weight: 600; font-size: .82rem; margin-right: 4px; }
.ws-class-pick { margin-top: 14px; }
.ws-class-pick.first { margin: 0 0 14px; padding: 12px; border-radius: var(--r-md, 14px); background: var(--brand-soft); }
.ws-class-pick .field { margin: 0; }
.ws-org-note { margin: 8px 0 0; }
.org-wrap { max-width: 560px; margin: 24px auto; }
.org-card { padding: 30px; text-align: center; }
.org-card .ws-ico { margin: 0 auto 12px; width: 56px; height: 56px; }
.org-card h1 { font-size: 1.5rem; margin: 0 0 6px; }
.org-form { text-align: left; margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.org-preview { padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r-md, 14px); display: grid; gap: 4px; }
/* report side column: everything fits its width (long titles wrap, wide tables scroll inside their card) */
.report-body > .side { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; scrollbar-gutter: stable; }
.report-body > .side > * { min-width: 0; max-width: 100%; }
.report-body > .side .card { overflow-wrap: anywhere; }
.report-body > .side .table-wrap, .report-body > .side table { max-width: 100%; }
.report-body > .side .table-wrap { overflow-x: auto; }
.report-body > .side img, .report-body > .side iframe, .report-body > .side pre { max-width: 100%; }
.report-body > .side pre { white-space: pre-wrap; }
.report-body > .side select, .report-body > .side input:not([type="checkbox"]):not([type="radio"]),
.report-body > .side textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
.report-body > .side select { width: 100%; text-overflow: ellipsis; }
.report-body > .side form, .report-body > .side .row-form { min-width: 0; max-width: 100%; flex-wrap: wrap; }
@media (min-width: 1500px) {
  .report-layout { max-width: 1560px; }
  .report-body { grid-template-columns: minmax(0, 1fr) 400px; }
}

/* "hidden" always hides – component styles (display: grid / flex) must never show a hidden box */
[hidden] { display: none !important; }
.job-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.ws-watch { margin-top: 10px; justify-content: center; }

/* newsletter */
.nl-wrap { max-width: 860px; margin: 10px auto 30px; display: grid; gap: 22px; }
.nl-hero { text-align: center; padding: 36px 28px; position: relative; overflow: hidden; }
.nl-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--grad); }
.nl-hero h1 { margin: 10px 0 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.nl-hero > p { max-width: 560px; margin: 0 auto; }
.nl-ico { width: 60px; height: 60px; margin: 0 auto 6px; border-radius: 18px; display: grid; place-items: center; font-size: 1.5rem;
  color: #fff; background: var(--grad); box-shadow: 0 12px 26px -12px var(--brand); }
.nl-ico.done { background: #475569; box-shadow: none; }
.nl-form { display: flex; gap: 10px; max-width: 520px; margin: 22px auto 14px; flex-wrap: wrap; }
.nl-form input[type="email"] { flex: 1 1 240px; min-height: 48px; }
.nl-form .btn { min-height: 48px; }
.nl-again { margin: 20px 0 10px; }
.nl-points { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; font-size: .9rem; }
.nl-points i { color: var(--low); margin-right: 4px; }
.nl-latest h2 { margin: 0 0 12px; }
.nl-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 12px; }
.nl-post { display: flex; flex-direction: column; gap: 6px; padding: 16px; text-decoration: none; color: var(--ink); margin: 0;
  transition: transform .15s, box-shadow .15s; }
.nl-post:hover { transform: translateY(-2px); box-shadow: var(--sh-2, var(--shadow)); }
.nl-post b { font-size: 1.02rem; line-height: 1.35; }
.nl-read { margin-top: auto; color: var(--brand); font-weight: 600; font-size: .88rem; }
.blog-subscribe { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; margin: 26px 0; border-radius: 16px;
  background: var(--brand-soft); }
.blog-subscribe > div { flex: 1 1 240px; }
.blog-subscribe form { display: flex; gap: 8px; flex: 1 1 300px; }
.blog-subscribe input { flex: 1; }

/* report designs: welcome wizard + gallery */
.wizard { max-width: 1100px; margin: 0 auto; width: 100%; align-content: start; gap: 18px; }
/* stepper: three dots joined by a line (the page's "form { display: grid }" must not stretch it) */
.wizard > .wiz-steps { list-style: none; display: flex; align-items: center; justify-content: center; justify-self: center; gap: 10px;
  padding: 0; margin: 8px 0 6px; width: min(560px, 100%); }
.wiz-steps li { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 0; height: auto; border: 0; background: none;
  color: var(--muted); font-weight: 600; font-size: .86rem; white-space: nowrap; flex: 0 0 auto; }
.wiz-steps li em { font-style: normal; }
.wiz-steps li span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card);
  border: 2px solid var(--line); font-size: .82rem; font-weight: 800; transition: all .2s; }
.wiz-steps li.on { color: var(--ink); }
.wiz-steps li.on span { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 0 5px var(--brand-soft); }
.wiz-steps li.done span { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; }
.wiz-steps .wiz-line { flex: 1 1 30px; min-width: 18px; height: 2px; border-radius: 2px; background: var(--line); }
.wiz-steps li.done + .wiz-line { background: var(--grad); }
.wiz-step { padding: 28px; }
.ww-eyebrow { margin: 0 0 2px; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.wiz-step[data-step="1"] { text-align: center; max-width: 720px; width: 100%; justify-self: center; margin: 0 auto; padding: 0 0 26px; overflow: hidden; }
.wiz-hero { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 22px; display: grid; place-items: center; font-size: 1.9rem;
  color: #fff; background: var(--grad); box-shadow: 0 16px 34px -14px var(--brand); position: relative; animation: ww-wave 1.6s ease .3s 1; }
@keyframes ww-wave { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(-12deg); } 40%, 80% { transform: rotate(10deg); } }
.wiz-step h1 { margin: 0 0 10px; font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.2; }
.wiz-org { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; background: var(--card);
  color: var(--brand-dark); font-weight: 700; margin: 0 0 12px; border: 1px solid var(--brand-soft); position: relative; }
/* welcome: soft gradient hero, plan at a glance, what happens next */
.ww-hero { position: relative; padding: 40px 28px 26px; background: linear-gradient(180deg, var(--brand-soft), transparent); overflow: hidden; }
.ww-hero > * { position: relative; }
.ww-glow { position: absolute !important; border-radius: 50%; filter: blur(40px); opacity: .45; pointer-events: none; }
.ww-glow.g1 { width: 220px; height: 220px; background: var(--brand); top: -120px; left: -60px; }
.ww-glow.g2 { width: 200px; height: 200px; background: #f59e0b; top: -110px; right: -50px; }
.ww-greet { margin: 0 0 2px; font-weight: 700; color: var(--brand); font-size: .95rem; }
.ww-lead { margin: 0 auto; max-width: 520px; color: var(--muted); font-size: 1.02rem; line-height: 1.6; }
.ww-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin: 4px 28px 0; }
.ww-plan > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.ww-plan i { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.ww-plan span { font-size: .74rem; color: var(--muted); font-weight: 600; }
.ww-plan b { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ww-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 28px 0; counter-reset: ww; }
.ww-steps > div { position: relative; display: grid; justify-items: center; gap: 4px; padding: 18px 12px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--brand-soft) 35%, transparent); counter-increment: ww; }
.ww-steps > div::before { content: counter(ww); position: absolute; top: 8px; left: 10px; font-size: .7rem; font-weight: 800; color: var(--muted); }
.ww-steps b { font-size: .92rem; }
.ww-steps small { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.ww-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); color: var(--brand);
  box-shadow: 0 6px 16px -10px rgba(15, 23, 42, .35); margin-bottom: 4px; }
.wiz-welcome .wiz-actions { margin-top: 22px; padding: 0 28px; }
.wiz-welcome .btn.big { padding-inline: 28px; }
.ww-skip { display: inline-block; margin: 10px auto 0; background: none; border: 0; padding: 4px 8px; font: inherit; font-size: .86rem;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; justify-self: center; }
.ww-skip:hover { color: var(--brand); }
.ww-trust { margin: 14px 28px 0; font-size: .8rem; color: var(--muted); }
.ww-trust i { color: #16a34a; margin-right: 4px; }
@media (max-width: 640px) {
  .wiz-steps li em { display: none; }
  .wiz-steps li.on em { display: inline; }
  .ww-hero { padding: 30px 16px 20px; }
  .ww-plan, .ww-steps, .ww-trust { margin-left: 16px; margin-right: 16px; }
  .ww-steps { grid-template-columns: 1fr; }
  .ww-steps > div { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 12px; padding: 12px 14px 12px 28px; }
  .ww-steps .ww-ico { grid-row: span 2; margin: 0; }
  .wiz-welcome .wiz-actions { padding: 0 16px; }
  .wiz-welcome .wiz-actions .btn { width: 100%; justify-content: center; }
}
.wiz-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.wiz-step[data-step="1"] .wiz-actions { justify-content: center; }
.sticky-save { position: sticky; bottom: 12px; justify-content: flex-end; z-index: 5; }
.pick-count { font-weight: 700; color: var(--brand-dark); margin: 0; }
.design-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.chip-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit;
  font-size: .86rem; font-weight: 600; color: var(--ink); }
.chip-btn.on { background: var(--grad); color: #fff; border-color: transparent; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.design-card { position: relative; display: flex; flex-direction: column; border: 2px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--card); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; margin: 0; }
.design-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px rgba(15, 23, 42, .35); }
.design-card input { position: absolute; opacity: 0; pointer-events: none; }
.design-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.design-card.locked { opacity: .55; cursor: not-allowed; }
.design-img { display: block; background: #f1f5f9; aspect-ratio: 210 / 297; overflow: hidden; }
.design-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.design-meta { padding: 10px 12px 12px; display: grid; gap: 3px; }
.design-meta b { font-size: .92rem; display: flex; align-items: center; gap: 6px; }
.design-meta small { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.design-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: 0 0 14px; vertical-align: -2px; margin-right: 6px; }
.design-meta .design-dot { position: absolute; top: 10px; left: 10px; width: 18px; height: 18px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.design-rank:not(:empty) { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 999px; background: var(--grad); color: #fff;
  font-size: .75rem; font-weight: 800; box-shadow: 0 6px 14px -6px var(--brand); }
.design-open { position: absolute; bottom: 10px; right: 10px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.design-open:hover { color: var(--brand); border-color: var(--brand); }
.filter-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.choice-card { position: relative; margin: 0; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card > span { display: grid; gap: 4px; padding: 16px; border: 2px solid var(--line); border-radius: 14px; height: 100%; }
.choice-card small { color: var(--muted); }
.choice-card input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.choice-card input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.own-filters { display: grid; gap: 10px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 14px; }
.own-filters .check.inline-num { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl-pick-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dl-chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .84rem;
  color: var(--ink); text-decoration: none; background: var(--card); }
.dl-chip:hover { border-color: var(--brand); }
.dl-default { font-style: normal; font-size: .7rem; padding: 1px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); margin-left: 4px; }
.dl-more { border-top: 1px dashed var(--line); }
@media (max-width: 640px) { .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .wiz-step { padding: 18px; } }

.account-dialog .pw-row, .account-dialog .code-row { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.account-dialog .pw-row[hidden], .account-dialog .code-row[hidden] { display: none; }
.account-dialog [data-send-code] { align-self: flex-start; }
.price-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.price-tool { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--brand-soft); }
.price-tool .row-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.price-tool .btn.ghost { align-self: flex-start; }
.live-rate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; }
.key-rows { display: grid; gap: 8px; margin: 10px 0 14px; }
.key-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.key-label { width: 110px; color: var(--muted); font-size: .85rem; }
.key-val { flex: 1; min-width: 160px; font-size: .92rem; overflow-wrap: anywhere; }
.change-keys > summary { list-style: none; cursor: pointer; display: inline-flex; }
.change-keys > summary::-webkit-details-marker { display: none; }
.change-keys .stack { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.retention-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 0 0 18px; }
.retention-grid .card { margin: 0; }
.retention-grid h2 { font-size: 1.1rem; margin: 0 0 6px; }
.retention-grid .stack { display: flex; flex-direction: column; gap: 12px; }
.retention-grid .field { margin: 0; }
.danger-zone { border: 1.5px solid #fecaca; }
.danger-zone h2 i { color: var(--high); }

/* storage list: size column, sortable headers */
.sort-head { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sort-head i { color: var(--muted); font-size: .8em; }
.sort-head.on, .sort-head.on i { color: var(--brand); }
td.size-big { color: var(--high); font-weight: 700; }
.storage-filter select { width: auto; }

/* History: select several, download as ZIP */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 10px; border-radius: 12px;
  background: var(--brand-soft); }
.bulk-bar .bulk-all { margin: 0; }
.hist-table .sel-col { width: 34px; text-align: center; padding-left: 8px; padding-right: 0; }
.hist-table .sel-col input { width: 17px; height: 17px; }

/* offline bar */
.offline-bar { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 3000; display: flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 24px); padding: 10px 18px; border-radius: 999px; color: #fff; font-size: .9rem;
  background: linear-gradient(120deg, #be123c, #ea580c); box-shadow: 0 12px 30px -10px rgba(190, 18, 60, .6);
  animation: upin .35s ease-out; }
.offline-bar .ob-dot { width: 9px; height: 9px; border-radius: 50%; background: #fde68a; flex: 0 0 9px;
  box-shadow: 0 0 0 0 rgba(253, 230, 138, .7); animation: obpulse 1.6s infinite; }
@keyframes obpulse { 70% { box-shadow: 0 0 0 9px rgba(253, 230, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(253, 230, 138, 0); } }
@media (max-width: 640px) { .offline-bar .ob-text { display: none; } }

/* customer pop-ups (plan added, report ready, payment not approved …) */
.user-pops { position: fixed; right: 18px; bottom: 96px; z-index: 1200; display: flex; flex-direction: column; gap: 10px;
  width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.user-pop { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 14px; border-radius: 16px;
  background: var(--card, #fff); border: 1px solid var(--line); box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .35);
  animation: upin .35s cubic-bezier(.2, .9, .3, 1.2); transition: opacity .3s, transform .3s; position: relative; }
.user-pop.hide { opacity: 0; transform: translateY(10px); }
@keyframes upin { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.user-pop .up-ico { flex: 0 0 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem;
  background: var(--brand-soft); color: var(--brand-dark); }
.user-pop.good .up-ico { background: #e8f8ee; color: #15803d; }
.user-pop.bad .up-ico { background: #fdecec; color: #b91c1c; }
.user-pop.good { border-left: 4px solid #16a34a; }
.user-pop.bad { border-left: 4px solid #dc2626; }
.user-pop .up-body { flex: 1; min-width: 0; }
.user-pop .up-body b { display: block; font-size: .98rem; margin-bottom: 2px; }
.user-pop .up-body p { margin: 0; font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.user-pop .up-actions { margin-top: 8px; display: flex; gap: 6px; }
.user-pop .up-actions:empty { display: none; }
.user-pop .up-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.2rem; color: var(--muted); cursor: pointer; }
@media (max-width: 640px) { .user-pops { right: 16px; bottom: 88px; } }

/* admin dashboard: screenshots waiting */
.review-card { border: 2px solid #f59e0b; }
.review-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0;
  border-top: 1px solid var(--line); }
.review-row:first-of-type { border-top: 0; }
.review-row img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.review-row .rv-actions { display: flex; flex-direction: column; gap: 6px; }
.review-row .rv-actions form { margin: 0; }
@media (max-width: 640px) { .review-row { grid-template-columns: 64px minmax(0, 1fr); } .review-row img { width: 64px; height: 64px; }
  .review-row .rv-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } }

/* invitation history */
.inv-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: #eef2f7; color: #475569; white-space: nowrap; }
.inv-pill.inv-pending { background: #fff7e6; color: #b45309; }
.inv-pill.inv-accepted { background: #e8f8ee; color: #15803d; }
.inv-pill.inv-revoked, .inv-pill.inv-declined { background: #fdecec; color: #b91c1c; }
tr.inv-revoked td, tr.inv-expired td, tr.inv-declined td { opacity: .75; }
tr.inv-revoked td:last-child, tr.inv-expired td:last-child, tr.inv-declined td:last-child { opacity: 1; }

/* checks from several people */
.join-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px auto 0; max-width: 1180px; width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 14px; background: var(--brand-soft); border: 1px solid var(--brand); color: var(--brand-dark); }
.join-banner > span { flex: 1; min-width: 200px; }
.join-banner form { margin: 0; }
.pill-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px;
  background: var(--high); color: #fff; font-size: .7rem; font-weight: 700; }
.join-card { border: 2px solid var(--brand); }
.join-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.join-row:first-of-type { border-top: 0; }
.join-text { flex: 1; min-width: 220px; }
.join-row form { margin: 0; }
.ws-ico.sm { flex: 0 0 38px; height: 38px; font-size: 1rem; border-radius: 12px; }
.src-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.src-card { border: 1px solid var(--line); border-radius: var(--r-md, 14px); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.src-card.off { opacity: .65; }
.src-card form { margin-top: auto; }
.src-tag { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; background: #f1f5f9;
  font-weight: 700; font-size: .82rem; }
.src-tag.direct { background: var(--brand-soft); color: var(--brand-dark); }
.src-num b { font-size: 1.5rem; }
.src-pick { border: 1px solid var(--line); border-radius: var(--r-md, 14px); padding: 10px 12px 12px; margin: 0 0 14px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.src-pick legend { padding: 0 6px; font-weight: 700; font-size: .9rem; }
.src-pick legend em { font-weight: 400; color: var(--muted); font-style: normal; }
.src-opt { position: relative; margin: 0; cursor: pointer; }
.src-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.src-opt > span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; transition: all .15s; }
.src-opt small { color: var(--muted); }
.src-opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px var(--brand-soft); }
.src-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* subjects & classes */
.subj-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.subj-tree { padding: 12px; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; }
.subj-tree a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.subj-tree a:hover { background: var(--brand-soft); }
.subj-tree a.on { background: var(--grad); color: #fff; }
.subj-tree a.on i, .subj-tree a.on small, .subj-tree a.on b { color: #fff; }
.subj-tree i { color: var(--brand); width: 16px; text-align: center; }
.subj-tree small { margin-left: auto; color: var(--muted); font-size: .75rem; }
.subj-tree b { margin-left: auto; font-size: .78rem; color: var(--muted); font-weight: 600; }
.subj-all { font-weight: 700; margin-bottom: 6px; }
.subj-name { font-weight: 700; margin-top: 4px; }
.subj-block ul { list-style: none; margin: 0 0 6px 14px; padding: 0 0 0 8px; border-left: 2px solid var(--line); }
.subj-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.subj-head h2 { margin: 0; }
.subj-head h2 small { font-size: .8rem; font-weight: 500; margin-left: 6px; }
.subj-head .filter-bar { padding: 0; }
.class-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px;
  background: var(--brand-soft); }
.class-tools > span { margin-right: auto; }
.lbl-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; margin: 2px 2px 2px 0; border-radius: 999px; background: #f1f5f9;
  font-size: .78rem; font-weight: 600; color: #334155; }
.lbl-chip i { color: var(--brand); }
.mini-select { width: auto !important; min-height: 32px; padding: 4px 26px 4px 8px; font-size: .8rem; max-width: 190px; }
.wide-field { flex: 2 1 320px !important; }
.ws-need-class { padding: 18px; border: 2px dashed var(--brand); border-radius: var(--r-md, 14px); background: var(--brand-soft); }
.ws-need-class h3 { margin: 0 0 4px; }
@media (max-width: 900px) {
  .subj-layout { grid-template-columns: 1fr; }
  .subj-tree { position: static; max-height: none; }
}

.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: -4px 0; }
.or-line::before, .or-line::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.org-need { color: var(--high) !important; margin: 0; }
.logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 180px; height: 72px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center;
  background: repeating-conic-gradient(#f3f4f8 0% 25%, #fff 0% 50%) 50% / 16px 16px; color: var(--muted); font-size: 1.6rem; overflow: hidden; }
.logo-box img { max-width: 92%; max-height: 86%; object-fit: contain; }
.logo-pick { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
.logo-help { margin: 8px 0 0; padding-left: 18px; font-size: .82rem; color: var(--muted); font-weight: 400; display: grid; gap: 3px; }
.logo-help b { color: var(--ink); font-weight: 600; }
.hist-meta .lbl { color: var(--brand-dark); font-weight: 600; }

/* role buttons above the People list */
.role-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.role-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 600; font-size: .92rem; text-decoration: none; transition: all .15s; }
.role-tab i { color: var(--muted); }
.role-tab:hover { border-color: var(--brand); }
.role-tab.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -10px var(--brand); }
.role-tab.on i { color: #fff; }

/* person details */
.person-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.person-avatar { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800;
  color: #fff; background: var(--grad); }
.person-head h1 { margin: 0 0 4px; }
.person-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 18px 0 0; }
.person-facts > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md, 14px); }
.person-facts span { display: block; color: var(--muted); font-size: .8rem; }
.person-facts b { font-size: 1rem; overflow-wrap: anywhere; }

/* ---------- My plan: the plan you have ---------- */
.plan.current-plan { border: 2px solid var(--low); box-shadow: 0 10px 30px -12px rgba(22, 163, 74, .35); }
.plan-badge.current { background: var(--low); }
.current-plan-note { margin: 6px 0 12px; padding: 8px 12px; border-radius: var(--r-sm, 10px); background: #e8f8ee; color: #166534;
  font-size: .85rem; font-weight: 600; }

/* ---------- billing details form ---------- */
#invoice-details form { display: grid; gap: 14px; margin-top: 12px; }
#invoice-details .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#invoice-details .field { margin: 0; }
#invoice-details input, #invoice-details select { min-height: 44px; }
#invoice-details summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
#invoice-details summary::-webkit-details-marker { display: none; }
#invoice-details summary::after { content: "\f078"; font: var(--fa-font-solid, 900 1em "Font Awesome 6 Free"); margin-left: auto; color: var(--muted);
  transition: transform .2s; }
#invoice-details details[open] summary::after { transform: rotate(180deg); }
textarea.short-area { min-height: 90px !important; height: auto; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; }
.form-actions .btn { width: auto; min-width: 220px; justify-content: center; }
@media (max-width: 640px) {
  #invoice-details .form-row { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
}

/* ---------- PayU ---------- */
.pay-payu > summary { cursor: pointer; }
.payu-form { padding-top: 12px; }
.payu-form .btn.big { width: 100%; justify-content: center; }

/* ---------- signed-in workspace ---------- */
.ws { max-width: 1180px; margin: 0 auto; }
.ws-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 20px; }
.ws-head h1 { margin: 0 0 4px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.ws-head p { margin: 0; }
.ws-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ws-upload { padding: 26px; position: relative; overflow: hidden; }
.ws-upload::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.ws-upload-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.ws-upload-head h2 { margin: 0 0 2px; font-size: 1.25rem; }
.ws-upload-head p { margin: 0; }
.ws-ico { flex: 0 0 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; color: #fff; background: var(--grad);
  box-shadow: 0 8px 18px -8px var(--brand); }
.ws-form .dropzone, .ws-form .drop-zone { min-height: 210px; }
.ws-form .field { margin-top: 14px; }
.ws-options { margin: 14px 0 4px; }
.ws-toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md, 14px);
  cursor: pointer; background: var(--card); }
.ws-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ws-toggle-ui { flex: 0 0 42px; height: 24px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .2s; }
.ws-toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.ws-toggle input:checked + .ws-toggle-ui { background: var(--brand); }
.ws-toggle input:checked + .ws-toggle-ui::after { transform: translateX(18px); }
.ws-toggle input:focus-visible + .ws-toggle-ui { outline: 2px solid var(--brand); outline-offset: 2px; }
.ws-toggle b { display: block; font-size: .95rem; }
.ws-toggle small { color: var(--muted); }
.ws-submit { width: 100%; justify-content: center; margin-top: 16px; }
.ws-privacy { margin: 12px 0 0; }

.ws-side { display: flex; flex-direction: column; gap: 16px; }
.ws-side .card { margin: 0; }
.ws-plan-label { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft);
  color: var(--brand-dark); font-weight: 700; font-size: .8rem; }
.ws-plan-num { margin: 10px 0 8px; color: var(--muted); }
.ws-plan-num b { font-size: 1.8rem; color: var(--ink); margin-right: 4px; }
.ws-plan .meter { margin: 6px 0; }
.ws-plan p { margin: 6px 0; }
.ws-plan-links { font-size: .88rem; margin-top: 6px; }
.ws-recent-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ws-recent-head h2 { margin: 0; font-size: 1.05rem; }
.ws-list { list-style: none; margin: 0; padding: 0; }
.ws-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ws-list li:first-child { border-top: 0; }
.ws-li-main { flex: 1; min-width: 0; }
.ws-li-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-li-main a { color: inherit; text-decoration: none; }
.ws-li-main a:hover b { color: var(--brand); }
.ws-li-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-st { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #eef2f7; color: #64748b; font-size: .85rem; }
.st-done .ws-st { background: #e8f8ee; color: #15803d; }
.st-processing .ws-st { background: #eef0ff; color: #4338ca; }
.st-queued .ws-st { background: #fff7e6; color: #b45309; }
.st-failed .ws-st { background: #fdecec; color: #b91c1c; }
.ws-empty { text-align: center; padding: 18px 8px; color: var(--muted); }
.ws-empty i { font-size: 1.8rem; opacity: .6; }
.ws-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; }
.ws-links a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm, 10px); color: var(--ink);
  text-decoration: none; font-size: .9rem; font-weight: 500; }
.ws-links a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.ws-links i { width: 18px; text-align: center; color: var(--brand); }
.ws-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 8px; }
.ws-steps > div { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-md, 14px); border: 1px dashed var(--line); }
.ws-steps span { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--brand-dark);
  background: var(--brand-soft); }
.ws-steps p { margin: 0; }
.ws-steps b { display: block; }
.ws-steps small { color: var(--muted); }

.trial-banner { display: flex; align-items: center; gap: 16px; margin: 0 0 20px; padding: 16px 20px; border-radius: var(--r-lg, 20px);
  color: #fff; background: var(--grad); box-shadow: 0 14px 30px -14px var(--brand); }
.trial-ico { flex: 0 0 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; background: rgba(255, 255, 255, .18); }
.trial-text { flex: 1; min-width: 0; }
.trial-text b { display: block; font-size: 1.02rem; }
.trial-text span { opacity: .9; font-size: .9rem; }
.trial-banner .btn.primary { background: #fff; color: var(--brand-dark); border-color: #fff; white-space: nowrap; }
.trial-banner .btn.primary:hover { background: rgba(255, 255, 255, .9); }
.ws-plans { margin: 28px 0 8px; scroll-margin-top: 90px; }
.ws-plans-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.ws-plans-head h2 { margin: 0 0 4px; }
.ws-plans-head p { margin: 0; }

@media (max-width: 960px) {
  .ws-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .trial-banner { flex-wrap: wrap; }
  .trial-banner .btn { width: 100%; justify-content: center; }
}
@media (max-width: 640px) {
  .ws-upload { padding: 18px; }
  .ws-steps { grid-template-columns: 1fr; }
  .ws-links { grid-template-columns: 1fr; }
  .filter-bar > * { flex: 1 1 100%; }
  .fb-date input { flex: 1; }
  .cancel-pop { position: fixed; left: 16px !important; right: 16px; top: auto; bottom: 16px; width: auto; max-height: 80vh; overflow: auto; }
  .actions-col { text-align: left; }
  .row-actions { justify-content: flex-start; }
  .mini-form { flex-wrap: wrap; }
}

/* dark theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .st-pill, :root:not([data-theme="light"]) .ws-st { background: rgba(148, 163, 184, .16); color: #cbd5e1; }
  :root:not([data-theme="light"]) .st-pill.st-done { background: rgba(22, 163, 74, .18); color: #86efac; }
  :root:not([data-theme="light"]) .st-pill.st-failed { background: rgba(220, 38, 38, .18); color: #fca5a5; }
  :root:not([data-theme="light"]) .st-pill.st-queued { background: rgba(217, 119, 6, .18); color: #fcd34d; }
  :root:not([data-theme="light"]) .current-plan-note { background: rgba(22, 163, 74, .16); color: #86efac; }
}
:root[data-theme="dark"] .st-pill, :root[data-theme="dark"] .ws-st { background: rgba(148, 163, 184, .16); color: #cbd5e1; }
:root[data-theme="dark"] .st-pill.st-done { background: rgba(22, 163, 74, .18); color: #86efac; }
:root[data-theme="dark"] .st-pill.st-failed { background: rgba(220, 38, 38, .18); color: #fca5a5; }
:root[data-theme="dark"] .st-pill.st-queued { background: rgba(217, 119, 6, .18); color: #fcd34d; }
:root[data-theme="dark"] .current-plan-note { background: rgba(22, 163, 74, .16); color: #86efac; }

/* grades & class reports, My results */
.export-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; margin-bottom: 4px; }
.grade-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; margin: 0 0 16px; }
.grade-stats > div { position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; }
.grade-stats > div::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.grade-stats span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.grade-stats b { font-size: 1.45rem; line-height: 1.1; }
.grade-stats .gs-pass::before { background: #16a34a; } .grade-stats .gs-pass b { color: #15803d; }
.grade-stats .gs-fail::before { background: #dc2626; } .grade-stats .gs-fail b { color: #b91c1c; }
.grade-stats .gs-wait::before { background: #d97706; } .grade-stats .gs-wait b { color: #b45309; }
.grade-stats .gs-miss::before { background: #94a3b8; }
.rules-card { display: grid; gap: 12px; padding: 16px 18px; margin-bottom: 14px; }
.rules-head { display: flex; gap: 12px; align-items: flex-start; }
.rules-head p { margin: 2px 0 0; }
.rules-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.rules-form { display: flex !important; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }
.rules-form .field { flex: 1 1 150px; margin: 0; }
.rules-form em { font-style: normal; color: var(--muted); font-weight: 400; }
.grade-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.grade-filter .chip-btn { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.grade-filter .chip-btn small { font-size: .72rem; opacity: .75; }
.grade-search { margin: 0 0 0 auto !important; display: block !important; position: relative; flex: 0 1 260px; }
.grade-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.grade-form { display: block !important; margin: 0; }
.grade-table td { vertical-align: middle; }
.mini-in { width: 100%; min-width: 120px; padding: 5px 8px !important; min-height: 32px; font-size: .84rem; margin: 2px 0; }
.mini-in.wide { min-width: 170px; }
.tiny { font-size: .72rem; }
.marks-in { display: inline-flex; align-items: center; gap: 4px; }
.marks-in input { width: 68px !important; min-height: 34px; padding: 4px 6px; text-align: center; font-weight: 700; }
.marks-in small { color: var(--muted); white-space: nowrap; }
.grade-letter { font-size: 1.1rem; }
.res-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.res-pass { background: #e8f8ee; color: #15803d; } .res-fail { background: #fdecec; color: #b91c1c; }
.res-ungraded { background: #fff7e6; color: #b45309; } .res-pending { background: #eef0ff; color: #4338ca; }
.res-missing { background: #f1f2f6; color: #6b7280; }
.res-row-missing td { opacity: .75; }
.grade-save { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 30px -18px rgba(15, 23, 42, .45); }
.grade-chip { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.class-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.class-card { display: grid; gap: 12px; padding: 16px; }
.cc-head { display: flex; gap: 10px; align-items: center; }
.cc-head > div { display: grid; min-width: 0; }
.cc-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.cc-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; }
.cc-stats b { display: block; font-size: 1.1rem; } .cc-stats span { font-size: .68rem; color: var(--muted); }
.cc-stats .ok b { color: #15803d; } .cc-stats .bad b { color: #b91c1c; } .cc-stats .wait b { color: #b45309; }
.cc-bar { display: flex; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.cc-bar i.ok { background: #16a34a; } .cc-bar i.bad { background: #dc2626; }
.cc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-actions .btn.primary { flex: 1; justify-content: center; }
.small-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.result-cards { display: grid; gap: 12px; margin-bottom: 20px; }
.result-card { display: flex; gap: 18px; align-items: flex-start; padding: 18px; border-left: 4px solid var(--line); }
.res-card-pass { border-left-color: #16a34a; } .res-card-fail { border-left-color: #dc2626; }
.rc-score { position: relative; width: 74px; height: 74px; flex: 0 0 74px; }
.rc-score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rc-score circle { fill: none; stroke-width: 4; }
.rc-track { stroke: var(--line); } .rc-fill { stroke: var(--brand); stroke-linecap: round; }
.res-card-pass .rc-fill { stroke: #16a34a; } .res-card-fail .rc-fill { stroke: #dc2626; }
.rc-score b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; }
.rc-body { display: grid; gap: 6px; min-width: 0; flex: 1; justify-items: start; }
.rc-body h3 { margin: 0; font-size: 1.05rem; } .rc-body p { margin: 0; }
.rc-facts { display: flex; flex-wrap: wrap; gap: 18px; }
.rc-facts span { display: grid; gap: 2px; } .rc-facts small { font-size: .7rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.rc-note { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--ink); font-size: .9rem; }
.rc-note i { color: var(--brand); margin-right: 4px; }
.section-title { font-size: 1.05rem; margin: 18px 0 10px; display: flex; gap: 8px; align-items: center; }
@media (max-width: 640px) {
  .grade-search { flex: 1 1 100%; margin: 0 !important; }
  .result-card { flex-direction: column; }
  .grade-save { justify-content: stretch; } .grade-save .btn { flex: 1; justify-content: center; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .res-pass { background: rgba(22, 163, 74, .18); color: #86efac; }
  :root:not([data-theme="light"]) .res-fail { background: rgba(220, 38, 38, .18); color: #fca5a5; }
  :root:not([data-theme="light"]) .res-ungraded { background: rgba(217, 119, 6, .18); color: #fcd34d; }
  :root:not([data-theme="light"]) .res-pending { background: rgba(99, 102, 241, .2); color: #c7d2fe; }
  :root:not([data-theme="light"]) .res-missing { background: rgba(148, 163, 184, .16); color: #cbd5e1; }
}
:root[data-theme="dark"] .res-pass { background: rgba(22, 163, 74, .18); color: #86efac; }
:root[data-theme="dark"] .res-fail { background: rgba(220, 38, 38, .18); color: #fca5a5; }
:root[data-theme="dark"] .res-ungraded { background: rgba(217, 119, 6, .18); color: #fcd34d; }
:root[data-theme="dark"] .res-pending { background: rgba(99, 102, 241, .2); color: #c7d2fe; }
:root[data-theme="dark"] .res-missing { background: rgba(148, 163, 184, .16); color: #cbd5e1; }

/* storage page: tabs and the filter bar */
.seg-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg, #f1f5f9); border: 1px solid var(--line); flex-wrap: wrap; }
.seg-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 9px; font-size: .86rem; font-weight: 600;
  color: var(--muted); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.seg-tabs a:hover { color: var(--ink); background: var(--card); }
.seg-tabs a.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px var(--brand); }
.storage-filter { display: flex !important; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 12px; margin: 12px 0 10px !important;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.storage-filter select, .storage-filter input { min-height: 40px; margin: 0; }
.storage-filter > select { flex: 0 1 150px; }
.storage-filter .sf-date { display: grid !important; gap: 3px; flex: 0 1 150px; }
.storage-filter .sf-date span { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.storage-filter .sf-search { position: relative; flex: 1 1 200px; display: block !important; }
.storage-filter .sf-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.storage-filter .sf-search input { width: 100%; padding-left: 34px; }
.storage-filter .sf-actions { display: flex; gap: 6px; margin-left: auto; }
.storage-filter .sf-actions .btn { min-height: 40px; }
@media (max-width: 640px) {
  .storage-filter > select, .storage-filter .sf-date { flex: 1 1 140px; }
  .storage-filter .sf-actions { flex: 1 1 100%; } .storage-filter .sf-actions .btn { flex: 1; justify-content: center; }
}

/* class report graphs */
.grade-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 14px; }
.gc-card { padding: 16px 18px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.gc-card h3 { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.gc-card h3 i { color: var(--brand); }
.gc-card h3 small { font-weight: 500; font-size: .75rem; }
.gc-card p { margin: 0; }
.gc-wide { grid-column: 1 / -1; }
.gc-donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.gc-donut { width: 132px; height: 132px; flex: 0 0 132px; border-radius: 50%; display: grid; place-items: center; }
.gc-donut > div { width: 88px; height: 88px; border-radius: 50%; background: var(--card); display: grid; place-content: center; text-align: center; }
.gc-donut b { font-size: 1.2rem; line-height: 1.1; } .gc-donut span { font-size: .72rem; color: var(--muted); }
.gc-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1; min-width: 140px; }
.gc-legend li { display: grid; grid-template-columns: 12px 1fr auto 38px; gap: 8px; align-items: center; font-size: .85rem; }
.gc-legend i { width: 12px; height: 12px; border-radius: 4px; }
.gc-legend small { color: var(--muted); text-align: right; }
.gc-cols { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.gc-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.gc-col b { font-size: .85rem; }
.gc-bar { width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; transition: height .4s; }
.gc-col small { font-size: .7rem; color: var(--muted); white-space: nowrap; margin-bottom: -20px; }
.gc-card .gc-cols { margin-bottom: 18px; }
.gc-rows { display: grid; gap: 8px; }
.gc-row { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 44px; gap: 10px; align-items: center; font-size: .85rem; }
.gc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-row b { text-align: right; }
.gc-track { position: relative; height: 12px; border-radius: 6px; background: var(--line); }
.gc-track > span { display: block; height: 100%; border-radius: 6px; }
.gc-limit { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; z-index: 1; }
.gc-limit-key { display: inline-block; width: 2px; height: 12px; background: var(--ink); opacity: .55; vertical-align: -2px; margin-right: 4px; }

/* grading: drafts & publishing, re-checks, rubric, Excel, history; My results deadlines; notifications */
.publish-bar { display: flex !important; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 14px !important; padding: 12px 16px;
  border-radius: 14px; background: linear-gradient(90deg, #fff7e6, var(--card)); border: 1px solid #fcd34d; }
.publish-bar > div { display: grid; flex: 1 1 260px; }
.publish-bar .btn { margin-left: auto; }
.pb-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #fde68a; color: #92400e; }
.pub-tag { display: inline-flex; gap: 5px; align-items: center; margin-top: 5px; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.pub-tag.is-draft { background: #fff7e6; color: #b45309; } .pub-tag.is-pub { background: #e8f8ee; color: #15803d; }
.rc-tag { display: inline-flex; gap: 5px; align-items: center; margin-top: 5px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  text-decoration: none; }
.rc-tag.rc-open { background: #eef0ff; color: #4338ca; } .rc-tag.rc-answered { background: #f1f5f9; color: #475569; }
.count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; }
.recheck-card { padding: 16px 18px; margin-bottom: 14px; display: grid; gap: 12px; border-left: 4px solid var(--brand); }
.recheck-card h3 { margin: 0; display: flex; gap: 8px; align-items: center; font-size: 1rem; }
.recheck-item { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.ri-msg { margin: 0; padding: 8px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 8px; font-size: .9rem; }
.ri-form { display: flex !important; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }
.ri-form .field { flex: 1 1 280px; margin: 0; } .ri-form .ri-marks { flex: 0 1 160px; }
.ri-form textarea { min-height: 60px !important; }
details.rules-card > summary { list-style: none; cursor: pointer; }
details.rules-card > summary::-webkit-details-marker { display: none; }
.rules-caret { margin-left: auto; color: var(--muted); transition: transform .2s; }
details.rules-card[open] .rules-caret { transform: rotate(180deg); }
.rules-head > div { flex: 1; }
.rubric-field { flex: 1 1 100% !important; }
.rubric-field textarea { min-height: 90px !important; font-family: inherit; }
.publish-mode { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0; display: grid; gap: 4px; flex: 1 1 280px; }
.publish-mode legend { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 0 4px; }
.import-card { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 18px; margin-bottom: 14px; }
.import-card .ic-text { display: grid; flex: 1 1 220px; }
.ic-upload { display: flex !important; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.ic-upload input[type=file] { max-width: 230px; font-size: .82rem; }
.rubric-in { display: grid; gap: 4px; justify-items: end; }
.rubric-in label { display: inline-flex; gap: 5px; align-items: center; font-size: .72rem; color: var(--muted); }
.rubric-in label span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rubric-in input { width: 54px !important; min-height: 28px; padding: 2px 4px; text-align: center; font-weight: 700; }
.rubric-total { font-size: .78rem; }
.hist-menu { display: inline-block; margin-top: 4px; }
.hist-pop { width: min(360px, 86vw); right: 0; left: auto; }
.hist-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; max-height: 280px; overflow-y: auto; font-size: .82rem; }
.hist-list li { padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.cc-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.due-card { padding: 16px 18px; margin-bottom: 14px; }
.due-card h3 { margin: 0 0 10px; display: flex; gap: 8px; align-items: center; font-size: 1rem; }
.due-card h3 i { color: var(--brand); }
.due-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.due-list li { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.due-date { width: 46px; height: 50px; flex: 0 0 46px; border-radius: 10px; display: grid; place-content: center; text-align: center;
  background: var(--brand-soft); color: var(--brand-dark); line-height: 1; }
.due-date b { font-size: 1.2rem; } .due-date small { font-size: .68rem; text-transform: uppercase; font-weight: 700; }
.due-body { display: grid; flex: 1 1 200px; min-width: 0; }
.due-pill { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; white-space: nowrap; }
.due-soon { border-color: #fcd34d !important; background: #fffbeb; } .due-soon .due-pill { background: #fef3c7; color: #b45309; }
.due-late { border-color: #fca5a5 !important; } .due-late .due-pill { background: #fdecec; color: #b91c1c; } .due-late .due-date { background: #fdecec; color: #b91c1c; }
.due-done { opacity: .7; } .due-done .due-pill { background: #e8f8ee; color: #15803d; }
.rub-break { display: grid; gap: 4px; width: 100%; max-width: 420px; }
.rb-row { display: grid; grid-template-columns: minmax(80px, 140px) 1fr 54px; gap: 8px; align-items: center; font-size: .82rem; }
.rb-row b { text-align: right; }
.rb-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.rb-track i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.rc-answer { width: 100%; padding: 10px 12px; border-radius: 10px; background: #f1f5f9; display: grid; gap: 4px; }
.rc-answer p { margin: 0; }
.recheck-ask { width: 100%; } .recheck-ask[open] summary { margin-bottom: 8px; }
.recheck-ask form { margin: 0; }
.college-pick { margin: 0; display: block !important; } .college-pick select { min-height: 40px; }
.rate-cell { min-width: 140px; } .rate-cell b { margin-left: 8px; font-size: .85rem; }
.rate-bar { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; vertical-align: middle; }
.rate-bar i { display: block; height: 100%; border-radius: 4px; }
.ok-num { color: #15803d; font-weight: 700; } .bad-num { color: #b91c1c; font-weight: 700; }
.notif-form { display: grid !important; gap: 14px; max-width: 720px; }
.notif-card { padding: 18px; display: grid; gap: 12px; }
.nc-head { display: flex; gap: 12px; align-items: center; } .nc-head > div { display: grid; }
.nc-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.15rem; }
.nc-ico.wa { background: #dcfce7; color: #16a34a; font-size: 1.4rem; }
.notif-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.switch-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row .sw { width: 38px; height: 22px; flex: 0 0 38px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .2s; }
.switch-row .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch-row input:checked + .sw { background: var(--brand); } .switch-row input:checked + .sw::after { left: 19px; }
.switch-row input:focus-visible + .sw { outline: 2px solid var(--brand); outline-offset: 2px; }
.notif-save { display: flex; justify-content: flex-end; }

/* short pages on tall screens: content stays at the top instead of spreading out */
main.container { align-content: start; }


/* API: filter access chips, docs access table */
.filter-chip { display: inline-flex; align-items: center; gap: 4px; margin: 2px 2px 2px 0; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.filter-chip.ok { background: #e8f8ee; color: #15803d; } .filter-chip.no { background: #f1f2f6; color: #6b7280; }
.access-table td, .access-table th { text-align: center; } .access-table td:first-child, .access-table th:first-child, .access-table td:nth-child(2) { text-align: left; }
.docs-h3 { font-size: 1rem; margin: 18px 0 8px; display: flex; gap: 8px; align-items: center; }

.note-ok { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #e8f8ee; color: #166534; }


/* ===== API documentation ===== */
.api-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 34px 36px;
  border-radius: 22px; color: #fff; background: radial-gradient(circle at 85% 10%, rgba(255,255,255,.14), transparent 40%),
  linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, var(--brand) 140%); box-shadow: 0 24px 60px -34px rgba(15, 23, 42, .6); }
.api-hero h1 { color: #fff; margin: 8px 0 10px; font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.api-hero p { margin: 0; color: #cbd5e1; font-size: 1.05rem; line-height: 1.6; max-width: 560px; }
.ah-eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.12);
  font-size: .8rem; font-weight: 700; letter-spacing: .03em; }
.ah-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.ah-ghost { background: rgba(255,255,255,.1) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.25) !important; }
.ah-card { display: grid; gap: 2px; padding: 8px; border-radius: 16px; background: rgba(2, 6, 23, .55); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px); }
.ah-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; }
.ah-row + .ah-row { border-top: 1px solid rgba(255,255,255,.07); }
.ah-row span { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; }
.ah-row code { background: none !important; color: #e2e8f0 !important; font-size: .82rem; overflow-wrap: anywhere; padding: 0 !important; }
.ah-row code[data-copy] { cursor: pointer; } .ah-row code[data-copy]:hover { color: #fff !important; text-decoration: underline dotted; }
.ah-row code.copied::after { content: "  ✓ copied"; color: #86efac; }
.docs { margin-top: 22px; grid-template-columns: 230px minmax(0, 1fr) !important; gap: 26px !important; }
.docs-nav { top: 80px !important; padding: 14px 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  max-height: calc(100vh - 100px); overflow-y: auto; gap: 1px !important; }
.dn-group { display: block; margin: 12px 8px 6px; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dn-group:first-child { margin-top: 2px; }
.docs-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; color: var(--ink); text-decoration: none;
  font-size: .87rem; border-left: 3px solid transparent; }
.docs-nav a:hover { background: var(--brand-soft); }
.docs-nav a.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; border-left-color: var(--brand); }
.verb.mini { font-size: .6rem; padding: 2px 5px; border-radius: 5px; min-width: 34px; text-align: center; }
.docs-main { gap: 18px !important; }
.docs-sec { padding: 26px 28px !important; border-radius: 18px !important; }
.docs-sec > h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.3rem; margin: 0 0 12px; }
.docs-sec > h2:has(.verb) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.08rem; font-weight: 700;
  padding: 10px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--line); }
.docs-sec > h2 + p { font-size: 1rem; color: var(--ink); }
.sec-ico { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; font-size: .95rem;
  background: var(--brand-soft); color: var(--brand); }
.docs-sec p { line-height: 1.65; }
.docs-sec code:not(pre code) { background: #f1f5f9; color: #be185d; padding: 1px 6px; border-radius: 6px; font-size: .84em; }
.docs-sec pre { border-radius: 12px; font-size: .84rem; line-height: 1.55; }
.docs-sec pre code.hljs { padding: 16px 18px; border-radius: 12px; background: #0d1117; }
.code-tabs { border: 0 !important; border-radius: 14px !important; box-shadow: 0 14px 34px -22px rgba(15, 23, 42, .6); margin-top: 14px !important; }
.code-tabs-bar { background: #161b22 !important; padding: 6px !important; border-bottom: 1px solid #30363d; }
.code-tabs-bar button { border-radius: 8px !important; padding: 6px 12px !important; }
.code-tabs-bar button.on { background: #30363d !important; }
.code-tabs pre code.hljs { border-radius: 0; }
.docs-params { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; border-collapse: separate !important; border-spacing: 0; }
.docs-params th { background: #f8fafc; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.docs-params th, .docs-params td { padding: 10px 12px !important; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-params tr:last-child td { border-bottom: 0; }
.flow { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.flow li { position: relative; display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--brand-soft), transparent 70%); }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 26px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--brand); font-size: .75rem; z-index: 1; }
.flow-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.flow small { color: var(--muted); line-height: 1.5; font-size: .82rem; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin: 12px 0 0;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.callout > i { margin-top: 3px; font-size: 1.05rem; }
.callout > div { min-width: 0; flex: 1; } .callout pre { margin: 8px 0; }
.callout.tip { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.callout.warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.facts > div { display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; row-gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.facts i { grid-row: span 2; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.facts span { font-size: .86rem; color: var(--muted); line-height: 1.5; }
.code-pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font: 700 .78rem ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.code-pill.c2 { background: #dcfce7; color: #166534; } .code-pill.c4 { background: #fee2e2; color: #991b1b; } .code-pill.c5 { background: #fef3c7; color: #92400e; }
.err-table td:first-child { width: 110px; }
@media (max-width: 900px) {
  .api-hero { grid-template-columns: 1fr; padding: 26px 20px; }
  .docs { grid-template-columns: minmax(0, 1fr) !important; }
  .docs-nav { position: sticky !important; top: 60px !important; z-index: 20; display: flex !important; flex-wrap: nowrap; overflow-x: auto;
    max-height: none; padding: 8px; gap: 4px !important; }
  .dn-group { display: none; }
  .docs-nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .docs-nav a.on { border-bottom-color: var(--brand); }
  .flow { grid-template-columns: 1fr 1fr; } .flow li::after { display: none; }
  .facts { grid-template-columns: 1fr; }
  .docs-sec { padding: 20px 16px !important; }
}
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } .ah-row { grid-template-columns: 1fr; gap: 2px; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .docs-sec > h2:has(.verb), :root:not([data-theme="light"]) .docs-params th { background: rgba(148,163,184,.08); }
  :root:not([data-theme="light"]) .docs-sec code:not(pre code) { background: rgba(148,163,184,.15); color: #f9a8d4; }
  :root:not([data-theme="light"]) .callout { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.35); color: #bfdbfe; }
  :root:not([data-theme="light"]) .callout.tip { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: #bbf7d0; }
  :root:not([data-theme="light"]) .callout.warn { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: #fde68a; }
}

.docs-sec > h2:not(:has(.verb)) { font-family: var(--font-head); }

.docs-sec pre:has(> code.hljs) { padding: 0 !important; background: #0d1117 !important; border: 0; }
.docs-sec pre > code.hljs { display: block; overflow-x: auto; }
@media (max-width: 900px) { .flow li:not(:last-child)::after { display: none; } }
.req { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: .64rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; vertical-align: 1px; }
.req.yes { background: #fee2e2; color: #991b1b; } .req.no { background: #f1f5f9; color: #64748b; }

/* admin login security */
.sec-status { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 16px 18px; }
.sec-status > div { display: grid; flex: 1 1 220px; }
.ss-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; background: #fef3c7; color: #b45309; }
.ss-ico.on { background: #dcfce7; color: #15803d; }
.sec-card { padding: 20px 22px; display: grid; gap: 12px; }
.sec-card h2 { margin: 0; display: flex; gap: 10px; align-items: center; font-size: 1.1rem; }
.sec-form { display: grid !important; gap: 14px; margin: 0; }
.sec-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.sec-confirm { display: flex !important; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; }
.sec-confirm .otp-input { max-width: 180px; font-size: 1.3rem; letter-spacing: .25em; text-align: center; }
