/* Science Catalogs Hub: dashboard layout (sidebar, top bar, fixed footer). Plain CSS, no framework. */
@charset "UTF-8";
@import url("fonts.css");
@font-face {
    font-family: "Montserrat";
    src:url("montserrat.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
:root { --primary:#003049; --secondary:#f3781a; --bg:#f4f7fb; --card:#fff; --ink:#1c2733; --muted:#667085; --line:#dbe3ec; --brand:#003049; --brand-ink:#fff; --accent:#0b6e99; --good:#12805c; --bad:#c62828; --warn:#b54708; --focus:#2563eb;
        --shadow:0 10px 28px rgba(0,0,0,.08); --radius:7px; --side-w:250px; --side-w-min:72px; --top-h:64px; }
html[data-theme="dark"] { --primary:#0b2433; --bg:#15181d; --card:#1d2128; --ink:#e8edf2; --muted:#a3afbd; --line:#2d3643; --brand:#f3781a; --brand-ink:#fff; --accent:#6cc4ee; --good:#4ade9b; --bad:#ff8a80; --warn:#fbbf6a; --shadow:0 10px 28px rgba(0,0,0,.35); }
* { box-sizing: border-box; }
html { font-size: 12px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 12px; line-height: 1.5; }
a { color: var(--accent); } .tile { border-radius: var(--radius); box-shadow: var(--shadow); } .card { border-radius: var(--radius); box-shadow: var(--shadow); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1 { font-size: 18px; margin: 0 0 6px; } h2 { font-size: 12px; margin: 0 0 12px; } h3 { font-size: 12px; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; } .inline { display: inline; margin: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.brand-mark { background: var(--secondary); color: #fff; border-radius: var(--radius); display: grid; place-items: center; width: 38px; height: 38px; font-weight: 800; font-size: 12px; flex-shrink: 0; }

/* ---- shell: sidebar + (top bar / scrolling content / fixed footer) ---- */
body.app { height: 100vh; overflow: hidden; }
.dashboard { display: flex; height: 100vh; overflow: hidden; }
.main-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }
.scroll-area { flex: 1; overflow-y: auto; overflow-x: hidden; }

.sidebar { width: var(--side-w); flex: 0 0 var(--side-w); background: var(--primary); color: #fff; display: flex; flex-direction: column; transition: width .2s ease, flex-basis .2s ease; z-index: 40; overflow-y: auto; overflow-x: hidden; }
.sidebar .brand { height: var(--top-h); min-height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; font-weight: 800; text-decoration: none; }
.brand-text { white-space: nowrap; }
.nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 0; }
.sidebar .nav-link, .sidebar .subnav a { color: #fff; text-decoration: none; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 18px; transition: background .15s ease; font-weight: 600; }
.nav-link:hover, .subnav a:hover { background: var(--secondary); }
.nav-link.active { background: var(--secondary); }
.nav-link.soon { opacity: .55; cursor: default; } .nav-link.soon:hover { background: transparent; }
.nav-link small { font-size: 10px; border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; margin-left: 4px; text-transform: uppercase; }
.label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nav-item.has-sub > .nav-link::after { content: '▾'; margin-left: auto; font-size: 12px; opacity: .75; transition: transform .2s ease; }
.nav-item.open > .nav-link::after { transform: rotate(180deg); }
.subnav { display: none; flex-direction: column; gap: 2px; margin: 4px 0 4px 30px; border-left: 1px dotted rgba(255,255,255,.35); }
.nav-item.open > .subnav { display: flex; }
.subnav a { padding: 9px 14px; font-size: 12px; } .subnav a.on { background: rgba(255,255,255,.14); }

/* collapsed (icons only; sub-menus fly out) */
html[data-side="collapsed"] .dashboard .sidebar { width: var(--side-w-min); flex-basis: var(--side-w-min); overflow: visible; }
html[data-side="collapsed"] .dashboard .sidebar .brand { justify-content: center; padding: 0; }
html[data-side="collapsed"] .dashboard .brand-text, html[data-side="collapsed"] .dashboard .label, html[data-side="collapsed"] .dashboard .nav-item.has-sub > .nav-link::after { display: none; }
html[data-side="collapsed"] .dashboard .nav-link { justify-content: center; padding: 12px 0; }
html[data-side="collapsed"] .dashboard .nav-item { position: relative; }
html[data-side="collapsed"] .dashboard .nav-item.open > .subnav { display: none; }
html[data-side="collapsed"] .dashboard .nav-item.has-sub:hover > .subnav, html[data-side="collapsed"] .dashboard .nav-item.has-sub:focus-within > .subnav { display: flex; position: absolute; left: 100%; top: 0; min-width: 210px; margin: 0; padding: 8px; border: 0; background: var(--primary); box-shadow: 0 12px 30px rgba(0,0,0,.25); border-radius: 0 var(--radius) var(--radius) 0; z-index: 60; }

/* top bar */
.topbar { height: var(--top-h); flex: 0 0 var(--top-h); background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; position: relative; z-index: 30; }
.top-left, .top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-left { flex: 1; }
.sidebar-toggle, .icon-btn { width: 42px; height: 42px; border: 0; border-radius: var(--radius); display: inline-grid; place-items: center; cursor: pointer; flex: 0 0 42px; }
.sidebar-toggle { background: var(--primary); color: #fff; } .sidebar-toggle:hover { background: var(--secondary); }
.icon-btn { background: transparent; color: var(--ink); } .icon-btn:hover { background: rgba(127,127,127,.15); }
.top-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; width: min(420px, 100%); background: var(--bg); color: var(--muted); }
.top-search input { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; width: 100%; padding: 10px 0; }
.top-search:focus-within { border-color: var(--accent); }
.profile { position: relative; }
.profile-btn { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--secondary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: none; z-index: 70; }
.profile.open .dropdown { display: block; }
.dd-head { display: flex; flex-direction: column; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 12px; color: var(--muted); } .dd-head strong { color: var(--ink); font-size: 12px; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: rgba(127,127,127,.14); }
.dropdown form { margin: 0; }

/* fixed footer */
.footer-bar { flex: 0 0 auto; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 18px; font-size: 12px; }
.footer-links { display: flex; gap: 14px; } .footer-links a { color: #fff; opacity: .9; text-decoration: none; } .footer-links a:hover { opacity: 1; text-decoration: underline; }
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }

/* sign-in and setup pages (no sidebar) */
.plain-top { padding: 14px 18px; } .plain-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; }
.plain-body { min-height: calc(100vh - 140px); } .plain-foot { text-align: center; padding: 16px; color: var(--muted); font-size: 12px; }
body.plain .narrow { margin-top: 24px; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(var(--side-w), 86vw); flex-basis: auto; transform: translateX(-100%); transition: transform .2s ease; }
  .dashboard.mobile-open .sidebar { transform: translateX(0); }
  .overlay.show { display: block; }
  html[data-side="collapsed"] .dashboard .sidebar { width: min(var(--side-w), 86vw); }
  html[data-side="collapsed"] .dashboard .brand-text, html[data-side="collapsed"] .dashboard .label { display: inline; }
  html[data-side="collapsed"] .dashboard .nav-item.has-sub > .nav-link::after { display: inline; }
  html[data-side="collapsed"] .dashboard .nav-item.open > .subnav { display: flex; }
  html[data-side="collapsed"] .dashboard .nav-item.has-sub:hover > .subnav { position: static; background: transparent; box-shadow: none; padding: 0; min-width: 0; margin: 4px 0 4px 30px; border-left: 1px dotted rgba(255,255,255,.35); }
  html[data-side="collapsed"] .dashboard .nav-link { justify-content: flex-start; padding: 12px 18px; }
  .pname { display: none; }
}

.wrap { width: 100%; max-width: none; margin: 0; padding: 20px; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; } .mid { max-width: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.grid { display: flex; flex-wrap: wrap; gap: 14px; }
.tile { flex: 1 1 250px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
a.tile:hover { border-color: var(--accent); }
.tile strong { font-size: 12px; } .tile.soon { opacity: .65; }

.btn { display: inline-block; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 4px; }
.link-btn.danger { color: var(--bad); }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; }
.field > span { font-weight: 600; font-size: 12px; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.err { color: var(--bad); font-size: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.hint { font-size: 12px; color: var(--muted); }

.flash { margin: 14px 18px 0; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-weight: 600; }
.flash-ok { border-color: var(--good); color: var(--good); } .flash-err { border-color: var(--bad); color: var(--bad); }

.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.scroll { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; }
.badge-good { color: var(--good); } .badge-bad { color: var(--bad); } .badge-warn { color: var(--warn); } .badge-grey { color: var(--muted); }
.chip { display: inline-block; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; margin: 0 4px 4px 0; font-size: 12px; font-weight: 600; }
.search { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.search input, .search select { font: inherit; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.search input[type=search] { flex: 1 1 220px; }

.qr { width: fit-content; max-width: 100%; margin: 12px auto; background: #fff; padding: 12px; border-radius: 8px; border: 1px solid var(--line); line-height: 0; } .qr svg { display: block; width: auto; height: auto; max-width: 100%; stroke: none; flex: none; }
.secret { font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; word-break: break-all; display: inline-block; }
.codes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.codes li { font-family: ui-monospace, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; flex: 1 1 130px; text-align: center; }
.code-input { font-size: 24px; letter-spacing: .3em; text-align: center; }

dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); padding: 22px; max-width: 420px; }
dialog::backdrop { background: rgba(0,0,0,.45); }
.dl-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.kv { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0; } .kv div { min-width: 180px; } .kv dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
@media print { .sidebar, .topbar, .footer-bar, .flash, .actions, .noprint { display: none !important; } body { background: #fff; } .card { border: 0; } }
.plainlist { list-style: none; margin: 0; padding: 0; } .plainlist li { padding: 9px 0; border-bottom: 1px solid var(--line); } .plainlist li:last-child { border-bottom: 0; }

/* dashboard cards */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; color: var(--ink); text-decoration: none; min-width: 0; }
a.kpi-card:hover { border-color: var(--secondary); }
.kpi-value { font-size: 22px; font-weight: 800; line-height: 1; } .kpi-label { margin-top: 8px; color: var(--muted); }
.kpi-icon { width: 52px; height: 52px; border-radius: var(--radius); background: var(--primary); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.kpi-icon svg { width: 24px; height: 24px; }
h2.sect { font-size: 12px; margin: 4px 0 12px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

/* ===== components ===== */
[hidden] { display: none !important; }
.grow { flex: 1; }
.wide-form { max-width: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--bad); }
.field.invalid > span { color: var(--bad); }
input.valid { border-color: var(--good) !important; } input.invalid { border-color: var(--bad) !important; }

/* toasts (bottom right) */
.toast-container { position: fixed; right: 18px; bottom: 56px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: 12px; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.22); animation: toast-in .22s ease-out; transition: opacity .2s, transform .2s; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast.success { background: #16a34a; } .toast.danger { background: #dc2626; } .toast.warning { background: #d97706; } .toast.info { background: #2563eb; }
.t-icon { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; margin-top: 1px; }
.t-body { flex: 1; min-width: 0; } .t-title { font-weight: 800; font-size: 12px; } .t-body p { margin: 2px 0 0; font-size: 12px; line-height: 1.45; opacity: .96; word-break: break-word; }
.t-close { border: 0; background: transparent; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; opacity: .85; padding: 0 0 0 4px; }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* loading buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.loading { opacity: .85; pointer-events: none; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
.btn-ghost .spinner { border-color: rgba(127,127,127,.35); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .2s; }
.slider::before { content: ''; position: absolute; width: 22px; height: 22px; left: 4px; top: 4px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.switch input:checked + .slider { background: var(--good); } .switch input:checked + .slider::before { transform: translateX(22px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--focus); outline-offset: 2px; }

/* wizard */
.wiz-heads { display: none; list-style: none; margin: 0 0 18px; padding: 0; gap: 8px; flex-wrap: wrap; }
.wizard.wiz-on .wiz-heads { display: flex; }
.wiz-head { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; font-size: 12px; }
.wiz-n { width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.wiz-head.active { border-color: var(--secondary); background: rgba(243,120,26,.1); } .wiz-head.active .wiz-n { background: var(--secondary); color: #fff; }
.wiz-head.done { border-color: var(--good); } .wiz-head.done .wiz-n { background: var(--good); color: #fff; font-size: 0; } .wiz-head.done .wiz-n::before { content: '✓'; font-size: 12px; }
.wizard .wiz-step { display: flex; flex-direction: column; gap: 14px; }
.wizard .wiz-step > h2 { margin: 0; } .wizard .wiz-step > p { margin: -8px 0 0; }
.wizard.wiz-on .wiz-step > h2 { font-size: 12px; }
.wiz-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 16px; }
.wizard:not(.wiz-on) .wiz-step { padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.wiz-summary { margin: 0; display: flex; flex-direction: column; }
.wiz-sum-title { margin-top: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.wiz-sum-row { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.wiz-sum-row dt { flex: 0 0 38%; color: var(--muted); } .wiz-sum-row dd { margin: 0; font-weight: 600; word-break: break-word; }

/* tables */
.tbl-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.tbl-search { flex: 1 1 240px; max-width: 360px; font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.tbl-per { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; } .tbl-nav { display: flex; gap: 8px; }
.table thead th { background: rgba(127,127,127,.07); }
.table tbody tr:nth-child(even) { background: rgba(127,127,127,.045); }
.table tbody tr:hover { background: rgba(243,120,26,.07); }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable::after { content: ' ↕'; opacity: .4; } th.sortable[aria-sort="ascending"]::after { content: ' ▲'; opacity: 1; color: var(--secondary); } th.sortable[aria-sort="descending"]::after { content: ' ▼'; opacity: 1; color: var(--secondary); }
@media (max-width: 760px) {
  .table[data-table] thead { display: none; }
  .table[data-table], .table[data-table] tbody, .table[data-table] tr, .table[data-table] td { display: block; width: 100%; }
  .table[data-table] tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 12px; background: var(--card); }
  .table[data-table] td { border: 0; padding: 7px 0; display: flex; gap: 12px; justify-content: space-between; text-align: right; }
  .table[data-table] td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; text-align: left; flex: none; padding-top: 2px; }
  .table[data-table] td:first-child { display: block; text-align: left; border-bottom: 1px solid var(--line); margin-bottom: 4px; } .table[data-table] td:first-child::before { display: none; }
}

/* password meter */
.pw-box { display: flex; flex-direction: column; gap: 8px; }
.pw-line { display: flex; justify-content: space-between; } .pw-meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pw-meter > div { height: 100%; width: 0; transition: width .2s; } .pw-meter .low { background: var(--bad); } .pw-meter .mid { background: #f59e0b; } .pw-meter .high { background: var(--good); }
.pw-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; font-size: 12px; color: var(--muted); }
.pw-rules li::before { content: '○'; margin-right: 8px; } .pw-rules li.ok { color: var(--good); } .pw-rules li.ok::before { content: '●'; } .pw-rules li.bad { color: var(--bad); } .pw-rules li.bad::before { content: '●'; }
.pw-show { align-self: flex-start; padding: 0; }
@media (max-width: 520px) { .pw-rules { grid-template-columns: 1fr; } }

/* dashboard home */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; margin-bottom: 8px; }
.dash-grid .card { margin-bottom: 0; }
.quick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.quick .btn { padding: 10px 16px; }
.btn-accent { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.feed { list-style: none; margin: 0; padding: 0; } .feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } .feed li:last-child { border-bottom: 0; }
.feed .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--secondary); margin-top: 7px; flex: none; }
.feed .when { color: var(--muted); font-size: 12px; }
.chart { width: 100%; height: auto; display: block; } .chart .bar { fill: var(--secondary); } .chart .bar.zero { fill: var(--line); } .chart text { fill: var(--muted); font-size: 11px; text-anchor: middle; } .chart .val { fill: var(--ink); font-weight: 700; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }

/* fields keep their natural height inside stacked forms (the 220px basis is only meant for fields sitting side by side in a .row) */
.form > .field, .wiz-step > .field, .card > .field { flex: 0 0 auto; }
.nav-link.soon .label { white-space: normal; line-height: 1.25; overflow: visible; }

/* ---- searchable drop-downs ---- */
.combo { position: relative; }
.combo-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; max-height: 280px; overflow: auto; background: var(--card, var(--bg)); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
.combo-list li { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.combo-list li small { color: var(--muted); font-size: 12px; }
.combo-list li.on, .combo-list li[role=option]:hover { background: var(--accent-soft, rgba(37, 99, 235, .12)); }
.combo-list .combo-empty { color: var(--muted); cursor: default; }

/* ---- images and files ---- */
.media-form { margin-bottom: 16px; }
.media-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.media-item { margin: 0; flex: 0 1 190px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--bg); }
.media-thumb { display: flex; align-items: center; justify-content: center; height: 150px; border-radius: 8px; background: var(--line); overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: contain; }
.media-pdf { font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.media-item figcaption { font-size: 12px; word-break: break-word; }

/* ---- approval and preview ---- */
.note-box { background: var(--bg); border: 1px solid var(--warn); border-radius: 8px; padding: 8px 12px; }
.preview { padding: 0; overflow: hidden; }
.preview-hero { display: block; width: 100%; max-height: 360px; object-fit: contain; background: var(--line); }
.preview-body { padding: 18px 22px; }
.preview-title { font-size: 18px; margin: 0 0 6px; }
.preview-sub { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

/* simple text editor (bold, underline, italic, link, lists) */
.rte { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.rte:focus-within { border-color: var(--primary); }
.rte-toolbar { display: flex; align-items: center; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); background: var(--bg); border-radius: var(--radius) var(--radius) 0 0; flex-wrap: wrap; }
.rte-btn { min-width: 30px; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--ink); cursor: pointer; font: inherit; }
.rte-btn:hover { background: var(--line); } .rte-btn.on { background: var(--primary); color: #fff; }
.rte-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.rte-editor { min-height: 260px; max-height: 60vh; overflow-y: auto; padding: 10px 12px; outline: none; line-height: 1.55; overflow-wrap: anywhere; }
.rte-editor p { margin: 0 0 8px; } .rte-editor ul, .rte-editor ol, .post-body ul, .post-body ol { margin: 4px 0 8px; padding-left: 22px; } .rte-editor a, .post-body a { color: var(--primary); text-decoration: underline; }
.rte-link { display: none; gap: 6px; padding: 6px; border-bottom: 1px solid var(--line); align-items: center; } .rte-link.show { display: flex; } .rte-link input { flex: 1; min-width: 0; }
.rte-count { text-align: right; padding: 2px 8px 4px; }
.rte-editor.rte-short { min-height: 120px; }
/* meetings: buttons side by side in a table row */
.row-actions { white-space: nowrap; } .row-actions form { display: inline-block; margin: 0 0 0 4px; }
/* journal APC per article type */
.apc-rates { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.apc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.apc-table th, .apc-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.apc-table thead th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.apc-table td { position: relative; width: 30%; }
.apc-table td input { width: 100%; padding: 7px 8px 7px 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; }
.apc-table .apc-cur { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); line-height: 1; color: var(--muted); font-size: 13px; pointer-events: none; }
.apc-rates .check { margin-top: 4px; font-size: 14px; }
@media (max-width: 640px) { .apc-table th[scope=row] { font-size: 13px; } .apc-table td { width: 34%; } }
.rte-editor h2, .post-body h2 { font-size: 18px; margin: 12px 0 6px; } .rte-editor h3, .post-body h3 { font-size: 16px; margin: 10px 0 4px; }
.rte-editor:empty::before { content: attr(data-placeholder); color: var(--muted); }

/* ---------- Font Awesome icons ---------- */
i.fa-solid { width: 20px; text-align: center; flex: 0 0 auto; font-size: 14px; line-height: 1; }
.kpi-icon i.fa-solid { width: 24px; font-size: 20px; }
.sidebar-toggle i.fa-solid, .icon-btn i.fa-solid { font-size: 16px; }

/* ---------- floating-label fields: white background, clear border ---------- */
.field { position: relative; gap: 0; }
.field > span { position: absolute; left: 10px; top: 11px; z-index: 2; max-width: calc(100% - 28px); padding: 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--card); color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.2; pointer-events: none; transition: top .15s ease, font-size .15s ease, color .15s ease; }
.field input, .field select, .field textarea { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; min-height: 40px; box-shadow: none; }
.field textarea { min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.field:focus-within > span,
.field:has(input:not(:placeholder-shown)) > span, .field:has(textarea:not(:placeholder-shown)) > span, .field:has(select) > span,
.field:has(input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=file], input[type=color], input[type=number]) > span,
.field:has(.combo-input, .rte, .dz, .tags, input:disabled) > span { top: -7px; font-size: 10.5px; color: var(--accent); }
.field.invalid > span { color: var(--bad); }
.field > small.err { margin-top: 3px; }
.field input[type=file] { padding: 8px 12px; }
.field > .combo-list { top: 100%; }
.field .rte, .field .tags { margin-top: 0; }
.search input, .search select, .top-search { background: var(--card); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], input[type=tel], select, textarea { background-color: var(--card); }

/* ---------- tag input ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; padding: 6px 8px 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; cursor: text; }
.tags:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: rgba(11, 110, 153, .12); color: var(--accent); font-size: 12px; font-weight: 600; }
.tag button { border: 0; background: none; color: inherit; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; line-height: 1; padding: 0; }
.tag button:hover { background: rgba(0, 0, 0, .12); }
.field .tags input { flex: 1 1 120px; min-width: 100px; border: 0; padding: 4px 2px; min-height: 0; background: transparent; box-shadow: none; width: auto; }
.field .tags input:focus { box-shadow: none; }

/* ---------- dropzone with previews ---------- */
.dz { display: flex; flex-direction: column; gap: 10px; }
.dz-label { font-weight: 600; font-size: 12px; }
.dz-area { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 22px 14px; text-align: center; border: 2px dashed var(--line); border-radius: 10px; background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.dz-area:hover, .dz-area:focus-visible, .dz.over .dz-area { border-color: var(--accent); background: rgba(11, 110, 153, .06); outline: 0; }
.dz-area i.fa-solid { font-size: 26px; width: auto; color: var(--accent); }
.dz-area .muted { font-size: 12px; }
.dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dz-msg { color: var(--bad); font-size: 12px; min-height: 0; } .dz-msg:empty { display: none; }
.dz-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dz-list:empty { display: none; }
.dz-item { position: relative; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; display: flex; flex-direction: column; }
.dz-item .dz-thumb { height: 110px; display: grid; place-items: center; background: var(--bg); }
.dz-item img { width: 100%; height: 110px; object-fit: cover; display: block; }
.dz-item .dz-thumb i.fa-solid { font-size: 30px; width: auto; color: var(--bad); }
.dz-item .dz-meta { padding: 6px 8px; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.dz-item .dz-meta span { display: block; color: var(--muted); }
.dz-item .dz-x, .dz-item .dz-rm { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.dz-item .dz-x i.fa-solid, .dz-item .dz-rm i.fa-solid { width: auto; font-size: 11px; }
.dz-item .dz-rm input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dz-item.gone { opacity: .45; } .dz-item.gone img { filter: grayscale(1); }
.dz-badge { position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 999px; background: var(--secondary); color: #fff; font-size: 10px; font-weight: 700; }

/* ---------- on/off switch in tables ---------- */
.tg { display: inline-flex; align-items: center; gap: 8px; }
.tg form { margin: 0; }
.tg .switch { width: 40px; height: 22px; } .tg .switch .slider::before { width: 16px; height: 16px; left: 3px; top: 3px; } .tg .switch input:checked + .slider::before { transform: translateX(18px); }
.tg .switch input:disabled { cursor: not-allowed; } .tg .switch:has(input:disabled) { opacity: .45; }

.tags-value { display: none !important; }

.preview-cover { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; margin-bottom: 14px; }
.preview-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; } .preview-gallery img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; }

.inline-edit { display: flex; gap: 8px; align-items: center; margin: 0; } .inline-edit input { flex: 1; min-width: 160px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); }
.btn.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.perm { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; }
.perm input { margin-top: 2px; } .perm small { display: block; color: var(--muted); }
.card > .field ~ .field, .card > .row ~ .field, .card > .field ~ .row, .card > .row ~ .row { margin-top: 14px; }

/* ===== dashboard: centre column + right column ===== */
.home-cols { display: flex; gap: 20px; align-items: flex-start; }
.home-main { flex: 1 1 0; min-width: 0; }
.home-side { flex: 0 0 320px; width: 320px; position: sticky; top: 0; }
.home-main .stats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.home-side .card { margin-bottom: 0; }
@media (max-width: 1100px) { .home-cols { flex-direction: column; } .home-side { flex: none; width: 100%; position: static; } }

/* ===== notifications bell ===== */
.notif .icon-btn { position: relative; }
.bell-badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--danger, #d64545); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.notif.open .notif-dd { display: block; }
.notif-dd { width: 360px; max-width: calc(100vw - 24px); padding: 0; max-height: 70vh; overflow: auto; right: -60px; }
.nd-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.nd-head form { margin: 0; } .nd-head button { width: auto; padding: 4px 8px; font-size: 13px; color: var(--secondary); }
.nd-empty { padding: 18px 14px; margin: 0; }
.notif-dd .nd-item, .nlist a { display: flex; gap: 12px; padding: 12px 14px; border-radius: 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.nd-item.unread, .nlist .unread a { background: rgba(127,127,127,.09); }
.nic { flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(127,127,127,.15); display: grid; place-items: center; }
.ntx { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ntx .muted { font-size: 13px; } .ntx .when { font-size: 12px; color: var(--muted); }
.notif-dd .nd-all { text-align: center; color: var(--secondary); font-weight: 600; border-bottom: 0; }
.nlist { list-style: none; margin: 0; padding: 0; } .nlist li:last-child a { border-bottom: 0; } .nlist a:hover, .nd-item:hover { background: rgba(127,127,127,.14); }
@media (max-width: 600px) { .notif-dd { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-width: none; } }

/* ===== mail ===== */
.mail-wrap { padding-bottom: 0; }
.mail { display: grid; grid-template-columns: 210px minmax(300px, 400px) minmax(0, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-height: calc(100vh - 140px); overflow: hidden; }
.mail > * { min-width: 0; }
.mail-nav { padding: 16px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.mail-compose { justify-content: center; text-align: center; }
.mail-nav nav { display: flex; flex-direction: column; gap: 2px; }
.mail-nav nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.mail-nav nav a span { flex: 1; } .mail-nav nav a:hover { background: rgba(127,127,127,.12); }
.mail-nav nav a.on { background: rgba(127,127,127,.18); font-weight: 700; }
.mail-nav nav b { font-size: 12px; background: var(--secondary); color: #fff; border-radius: 9px; padding: 1px 7px; }
.mail-note { margin-top: auto; }
.mail-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.mail-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mail-search input { flex: 1; border: 0; background: transparent; color: var(--ink); font: inherit; outline: 0; }
.mail-tools { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mail-tools .btn { padding: 5px 10px; } .mail-tools .btn:disabled { opacity: .4; cursor: default; }
.chk { display: inline-flex; align-items: center; padding: 0 4px; }
.mrows { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.mrow { display: flex; align-items: flex-start; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.mrow .chk { padding-top: 14px; } .mrow form { margin: 0; }
.mrow:hover, .mrow.picked { background: rgba(127,127,127,.09); } .mrow.sel { background: rgba(127,127,127,.17); }
.star { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 11px 6px; } .star.on { color: #e5a823; }
.mlink { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 4px; color: var(--ink); text-decoration: none; }
.mfrom { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmeta { grid-column: 2; grid-row: 1; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.mmeta .badge{font-size:0.8rem!important;padding:1px 2px;color:var(--bad)!important;border:none!important;}
.msub { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mrow:not(.unread) .mfrom, .mrow:not(.unread) .msub strong { font-weight: 400; }
.mrow.unread .mfrom { font-weight: 700; }
.mail-empty { padding: 24px 16px; }
.mail-pane { padding: 20px 24px; overflow: auto; }
.mail-back { display: none; margin-bottom: 12px; }
.mail-blank { display: grid; place-items: center; text-align: center; height: 100%; color: var(--muted); gap: 6px; } .mail-blank i { font-size: 38px; }
.mview h2 { margin: 0 0 14px; }
.mhead { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.mbody { line-height: 1.6; overflow-wrap: anywhere; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.mbody blockquote { margin: 10px 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.compose .field { margin-bottom: 14px; }
.guard { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius); margin: 14px 0; font-size: 13px; color: var(--muted); }
.note-box.good { border-color: #2e9d5b; } .note-box.bad { border-color: #d64545; }
.rv { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.rv-items { list-style: none; margin: 0; padding: 0; } .rv-items a { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: var(--radius); color: var(--ink); text-decoration: none; } .rv-items a:hover, .rv-items a.on { background: rgba(127,127,127,.15); }
.rv-meta { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; margin: 10px 0; } .rv-meta dt { color: var(--muted); } .rv-meta dd { margin: 0; overflow-wrap: anywhere; }
.rv-actions { display: grid; gap: 14px; }
@media (max-width: 1200px) { .mail { grid-template-columns: 180px minmax(260px, 340px) minmax(0, 1fr); } }
@media (max-width: 900px) {
  .mail { grid-template-columns: 1fr; min-height: 0; }
  .mail-nav { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; } .mail-nav nav { flex-direction: row; flex-wrap: wrap; } .mail-note { display: none; }
  .mail-list { border-right: 0; } .mail-pane { display: none; }
  .mail.has-pane .mail-list, .mail.has-pane .mail-nav { display: none; } .mail.has-pane .mail-pane { display: block; } .mail-back { display: inline-block; }
  .rv { grid-template-columns: 1fr; }
}

/* ===== employee view: main column + right column ===== */
.view-cols { display: flex; gap: 20px; align-items: flex-start; }
.view-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.view-main > .card, .view-side > .card { margin-bottom: 0; }
.view-side { flex: 0 0 360px; width: 360px; display: flex; flex-direction: column; gap: 20px; }
.kv.stack { flex-direction: column; gap: 12px; } .kv.stack div { min-width: 0; }
.side-links { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.side-links .btn, .side-links form, .side-links form .btn { width: 100%; justify-content: center; text-align: center; }
.edit-box { margin-top: 16px; } .edit-box summary { list-style: none; cursor: pointer; width: 100%; justify-content: center; text-align: center; display: block; }
.edit-box summary::-webkit-details-marker { display: none; }
.edit-box .form { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1100px) { .view-cols { flex-direction: column; } .view-side { flex: none; width: 100%; } }
.leave-row { align-items: center; } .leave-row .field { flex: 1 1 160px; } .leave-bal { margin: 0; flex: 1 1 160px; }
.wide-form form.form > .card { margin-bottom: 20px; }

/* ===== mail: labels, sync bar, attachments, write window, settings tabs ===== */
.bad-text { color: var(--bad); }
.lc-c1 { --lc: #3b82f6; } .lc-c2 { --lc: #16a34a; } .lc-c3 { --lc: #f59e0b; } .lc-c4 { --lc: #dc2626; } .lc-c5 { --lc: #8b5cf6; } .lc-c6 { --lc: #0d9488; } .lc-c7 { --lc: #db2777; } .lc-c8 { --lc: #6b7280; }
.lab-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lc, #6b7280); flex: none; }
.lab-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; line-height: 1.5; padding: 0 8px; border-radius: 999px; border: 1px solid var(--lc, #6b7280); color: var(--lc, #6b7280); vertical-align: 1px; }
.lab-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px; }
.mlabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 12px; } .mlabs form { margin: 0; }
.mail-labels h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mail-labels nav a em { font-style: normal; font-size: 12px; color: var(--muted); }
.lab-new summary { cursor: pointer; padding: 8px 10px; color: var(--accent); font-weight: 600; list-style: none; } .lab-new summary::-webkit-details-marker { display: none; }
.lab-new form { display: flex; flex-direction: column; gap: 10px; padding: 6px 4px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; } .swatches label { cursor: pointer; display: inline-flex; padding: 3px; border-radius: 50%; border: 2px solid transparent; }
.swatches input { position: absolute; opacity: 0; width: 0; height: 0; } .swatches label:has(input:checked) { border-color: var(--ink); } .swatches label:has(input:focus-visible) { outline: 2px solid var(--focus); }
.swatches .lab-dot { width: 16px; height: 16px; }
details.pop { position: relative; display: inline-block; } details.pop > summary { list-style: none; cursor: pointer; } details.pop > summary::-webkit-details-marker { display: none; }
.pop-box { position: absolute; z-index: 40; left: 0; top: calc(100% + 6px); min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.pop-box > button { text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 7px 8px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; } .pop-box > button:hover { background: rgba(127,127,127,.14); }
.pop-box .check { display: flex; align-items: center; gap: 8px; }
.mail-nav details.pop { display: block; } .mail-nav .pop-box { position: static; box-shadow: none; }
.mail-tools details.pop .btn { padding: 5px 10px; }
.mail-sync { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .mail-sync .btn { padding: 4px 10px; }
.matts { margin: 0 0 14px; } .matts h3 { margin: 0 0 8px; font-size: 14px; } .matts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.att-card { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; min-width: 150px; max-width: 240px; font-size: 12px; line-height: 1.3; } .att-card:hover { background: rgba(127,127,127,.1); }

/* the write window */
.cdlg { width: min(1040px, 96vw); max-width: none; max-height: 94vh; padding: 0; overflow: hidden; }
.cform { display: flex; flex-direction: column; max-height: 94vh; }
.cdlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); } .cdlg-head h2 { margin: 0; font-size: 18px; }
.cdlg-x { color: var(--muted); padding: 6px 8px; border-radius: 6px; text-decoration: none; } .cdlg-x:hover { background: rgba(127,127,127,.15); }
.cdlg-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; overflow: auto; flex: 1; }
.cdlg-write { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cdlg-write .field { margin: 0; flex: none; }
.cdlg-attach { padding: 16px 18px; border-left: 1px solid var(--line); background: rgba(127,127,127,.05); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cdlg-attach h3 { margin: 0; font-size: 15px; }
.att-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 18px 12px; text-align: center; color: var(--muted); cursor: pointer; background: var(--card); transition: border-color .15s, background .15s; }
.att-drop i { font-size: 26px; color: var(--accent); } .att-drop p { margin: 6px 0 4px; color: var(--ink); } .att-drop small { display: block; }
.att-drop.over, .att-drop:focus-visible { border-color: var(--secondary); background: rgba(243,120,26,.07); outline: 0; }
.att-drop .link-btn { padding: 0; }
.att-bar { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 3px; overflow: hidden; background: var(--line); color: var(--secondary); }
.att-bar::-webkit-progress-bar { background: var(--line); } .att-bar::-webkit-progress-value { background: var(--secondary); border-radius: 3px; } .att-bar::-moz-progress-bar { background: var(--secondary); } .att-used { margin: 0; }
.att-msg { margin: 0; min-height: 0; font-size: 13px; color: var(--bad); } .att-msg:empty { display: none; }
.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; overflow: auto; max-height: 38vh; }
.att-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.att-thumb { width: 42px; height: 42px; flex: none; border-radius: 8px; background: rgba(127,127,127,.12); display: grid; place-items: center; overflow: hidden; color: var(--accent); font-size: 18px; } .att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; } .att-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; } .att-meta span { font-size: 12px; color: var(--muted); }
.att-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; } .att-x:hover { color: var(--bad); background: rgba(127,127,127,.15); }
.cdlg-foot { border-top: 1px solid var(--line); padding: 12px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cdlg-foot .guard { margin: 0; border: 0; padding: 0; flex: 1 1 320px; }
.cdlg-foot .actions { margin: 0; }
@media (max-width: 800px) { .cdlg { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; } .cform { max-height: 100vh; height: 100%; } .cdlg-body { grid-template-columns: 1fr; } .cdlg-attach { border-left: 0; border-top: 1px solid var(--line); } }

/* email settings: tabs on the left */
.set-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-tabs { position: sticky; top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.set-tabs a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; } .set-tabs a i { width: 18px; text-align: center; color: var(--muted); }
.set-tabs a:hover { background: rgba(127,127,127,.12); } .set-tabs a.on { background: rgba(243,120,26,.12); font-weight: 700; box-shadow: inset 3px 0 0 var(--secondary); } .set-tabs a.on i { color: var(--secondary); }
.set-body { min-width: 0; } .set-body .card:last-child { margin-bottom: 0; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; flex-wrap: wrap; } .inline-form .field { flex: 0 1 240px; }
@media (max-width: 800px) { .set-layout { grid-template-columns: 1fr; } .set-tabs { position: static; flex-direction: row; flex-wrap: wrap; } }
.mail-tools { gap: 4px; } .mail-tools .btn, .mail-tools details.pop .btn { padding: 5px 8px; font-size: 13px; }
.mail-tools { padding: 4px 8px; border-top: 0; } .mail-tools .btn, .mail-tools details.pop .btn { padding: 4px 7px; font-size: 12px; min-width: 28px; justify-content: center; line-height: 1.2; } .mail-tools .chk { padding: 0 6px 0 2px; }
.mact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: -4px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mact .btn, .mact details.pop > summary.btn { padding: 4px 8px; font-size: 13px; min-width: 30px; justify-content: center; line-height: 1.2; } .mact form { margin: 0; }
.mact details.pop > summary.btn, .mail-tools details.pop > summary.btn { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); }
.pop-box .btn[type=submit] { align-self: flex-start; }

.att-card .att-thumb { width: 28px; height: 28px; border-radius: 6px; font-size: 13px; } .att-card .att-meta { min-width: 0; display: flex; flex-direction: column; } .att-card .att-meta strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; } .att-card .att-meta span { color: var(--muted, #777); font-size: 11px; }
.matts h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; } .att-all { margin-left: auto; font-weight: 600; font-size: 12px; color: var(--accent); text-decoration: none; } .att-all:hover { text-decoration: underline; }
.matts ul { gap: 6px; }

/* ===== journal page: submissions and pipeline ===== */
.pipe-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; } .pipe-chips .chip { cursor: pointer; margin: 0; font-family: inherit; color: var(--ink); } .pipe-chips .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pipe-bar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 6px; } .pipe-bar .field { flex: 1 1 260px; margin: 0; }
.pipe-table th.chk, .pipe-table td.chk { width: 32px; padding-right: 0; }
.pipe-steps { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; } .pipe-steps li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; } .pipe-steps .ps-name { font-weight: 600; font-size: 13px; } .pipe-steps .ps-n { font-weight: 700; font-size: 13px; color: var(--accent); } .pipe-steps .ps-note { grid-column: 1 / -1; line-height: 1.35; }
.stepper { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; } .stepper li { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); } .stepper li.done { color: var(--good); border-color: var(--good); } .stepper li.now { background: var(--accent); border-color: var(--accent); color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pipe-table .badge { white-space: nowrap; } .pipe-table td, .pipe-table th { vertical-align: top; } .pipe-table td:nth-child(3) .badge, .pipe-table td .badge { display: inline-block; }
.view-side .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; } .view-side .kv div { min-width: 0; }
.view-side { flex-basis: 340px; width: 340px; }
.pipe-table td.ttl { min-width: 190px; } .pipe-table { min-width: 0; } .pipe-table .badge { font-size: 11px; padding: 2px 8px; } .pipe-table td, .pipe-table th { padding-left: 8px; padding-right: 8px; }
.pipe-table { font-size: 13px; } .pipe-table th { font-size: 11px; letter-spacing: 0; white-space: nowrap; } .pipe-table td, .pipe-table th { padding: 8px 6px; } .pipe-table td.ttl { min-width: 170px; }
.pipe-table .badge { white-space: normal; max-width: 120px; line-height: 1.25; text-align: center; border-radius: 12px; } .pipe-table td.ttl { min-width: 150px; }
.pipe-chips { margin: 0 0 14px; gap: 6px; } .pipe-chips .chip { font-size: 11px; padding: 2px 10px; line-height: 1.6; } .pipe-chips .chip b { margin-left: 4px; font-weight: 800; opacity: .85; }
.apc-amt { display: contents; } .apc-amt[hidden] { display: none; }
.nowrap { white-space: nowrap; }
.fee-acts { display: flex; gap: 6px; margin-top: 4px; }

/* wizard fee rows and conference programme days */
.fee-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.fee-row .field { flex: 1 1 160px; min-width: 0; } .fee-row .field:first-child { flex: 2 1 220px; }
.fee-row > .btn { flex: 0 0 auto; margin-bottom: 4px; }
.day-head { margin: 18px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.day-head:first-child { margin-top: 0; }

@media (min-width: 760px) {
  .fee-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
  .fee-row .fee-cat { grid-column: span 2; } .fee-row .field:nth-of-type(4) { grid-column: span 2; }
  .fee-row > .btn { justify-self: end; }
}
.fee-row { margin-bottom: 10px; }

/* My account: profile photo */
.photo-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.photo-row > div { flex: 1 1 260px; min-width: 0; }
.photo-preview { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line, #dde3e8); }
.photo-empty { display: grid; place-items: center; background: var(--secondary); color: #fff; font-size: 32px; font-weight: 800; }

/* ===== Scholars Post admin (scholarspost/) ===== */
.eyebrow { margin: 0 0 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--secondary); }
.sp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.sp-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.sp-tabs a:hover { background: rgba(127,127,127,.12); }
.sp-tabs a.on { background: rgba(243,120,26,.12); box-shadow: inset 0 -2px 0 var(--secondary); }
.sp-tabs a i { color: var(--muted); } .sp-tabs a.on i { color: var(--secondary); }
.sp-count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--secondary); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.sp-waiting { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.sp-wait { display: flex; align-items: center; gap: 14px; margin: 0; text-decoration: none; color: var(--ink); }
.sp-wait > i { font-size: 20px; color: var(--muted); width: 24px; text-align: center; }
.sp-wait span { display: flex; flex-direction: column; } .sp-wait strong { font-size: 22px; line-height: 1.1; }
.sp-wait.has { border-color: var(--secondary); } .sp-wait.has > i { color: var(--secondary); }
.sp-stats { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sp-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.sp-charts .card { margin: 0; }
.sp-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.sp-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.sp-bar i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.sp-bar span { font-size: 10px; color: var(--muted); }
.sp-bar i.h0 { height: 2px; opacity: .25; }
.sp-bar i.h5 { height: 5%; } .sp-bar i.h10 { height: 10%; } .sp-bar i.h15 { height: 15%; } .sp-bar i.h20 { height: 20%; } .sp-bar i.h25 { height: 25%; }
.sp-bar i.h30 { height: 30%; } .sp-bar i.h35 { height: 35%; } .sp-bar i.h40 { height: 40%; } .sp-bar i.h45 { height: 45%; } .sp-bar i.h50 { height: 50%; }
.sp-bar i.h55 { height: 55%; } .sp-bar i.h60 { height: 60%; } .sp-bar i.h65 { height: 65%; } .sp-bar i.h70 { height: 70%; } .sp-bar i.h75 { height: 75%; }
.sp-bar i.h80 { height: 80%; } .sp-bar i.h85 { height: 85%; } .sp-bar i.h90 { height: 90%; } .sp-bar i.h95 { height: 95%; } .sp-bar i.h100 { height: 100%; }
.sp-act { display: inline-flex; gap: 6px; align-items: center; margin: 0 6px 6px 0; flex-wrap: wrap; }
.sp-note { padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; min-width: 170px; }
.sp-decide { min-width: 220px; }
.sp-decide .badge { margin-bottom: 6px; }
.sp-decide > a { display: block; margin-bottom: 6px; }
.danger-text { color: var(--bad) !important; }
.ok-text { color: var(--good); }
.sp-ad { display: flex; gap: 10px; align-items: flex-start; min-width: 260px; }
.sp-ad img { width: 90px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.sp-msg-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin-bottom: 8px; }
.sp-msg-body { padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; margin: 8px 0 12px; overflow-wrap: anywhere; }
.sp-search { align-items: flex-end; }
.sp-health { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-health li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sp-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; } .sp-dot.ok { background: var(--good); } .sp-dot.warn { background: var(--warn); }
.sp-log { white-space: pre-wrap; font-size: 11px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 320px; overflow: auto; margin: 0; }

/* ===== SciNexID members (scinexid/) ===== */
.sx-bar { display: inline-block; width: 70px; height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; vertical-align: middle; }
.sx-bar i { display: block; height: 100%; border-radius: 99px; }
.sx-good i { background: var(--good); } .sx-warn i { background: var(--warn); } .sx-bad i { background: var(--bad); }
.sx-bar i.w0 { width: 3%; } .sx-bar i.w10 { width: 10%; } .sx-bar i.w20 { width: 20%; } .sx-bar i.w30 { width: 30%; } .sx-bar i.w40 { width: 40%; } .sx-bar i.w50 { width: 50%; }
.sx-bar i.w60 { width: 60%; } .sx-bar i.w70 { width: 70%; } .sx-bar i.w80 { width: 80%; } .sx-bar i.w90 { width: 90%; } .sx-bar i.w100 { width: 100%; }
.sx-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.sx-bulk select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; }
.sx-miss { max-width: 360px; }
.sx-pager { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.sx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.sx-grid .card { margin: 0; }
.sx-checks { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.sx-checks li.ok i { color: var(--good); } .sx-checks li.no { color: var(--muted); } .sx-checks li.no i { color: var(--bad); }
.sx-hist { margin: 0; padding-left: 18px; }
.sx-ver + .sx-ver { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }

/* ===== Website pages (pages/) ===== */
.page-preview { max-width: 860px; line-height: 1.7; }
.page-preview h2 { font-size: 16px; margin: 18px 0 8px; } .page-preview h3 { font-size: 14px; margin: 14px 0 6px; }
.rte-btn b { font-size: 11px; }
.pg-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.rte-editor h2 { font-size: 15px; margin: 12px 0 6px; } .rte-editor h3 { font-size: 13px; margin: 10px 0 6px; }
.pg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.pg-layout.single { grid-template-columns: minmax(0, 1fr); }
.pg-side { position: sticky; top: 12px; }
.pg-side .card { margin: 0; max-height: calc(100vh - 160px); overflow-y: auto; }
.pg-versions { list-style: none; margin: 0; padding: 0; }
.pg-versions li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.pg-versions li:first-child { border-top: 0; padding-top: 0; }
.pg-vact { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 1000px) { .pg-layout { grid-template-columns: minmax(0, 1fr); } .pg-side { position: static; } }

/* Website pages: placeholders, tables and quotes in the editor */
.pg-ph { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pg-ph li { display: flex; flex-direction: column; gap: 2px; }
.pg-ph-btn { align-self: flex-start; font: 600 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--bg); color: var(--accent); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; cursor: pointer; }
.pg-ph-btn:hover { border-color: var(--accent); }
.pg-rules { padding-left: 16px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pg-rules code, .card p code { font-size: 11px; background: var(--bg); padding: 0 4px; border-radius: 4px; }
.rte-editor table { border-collapse: collapse; width: 100%; margin: 6px 0 10px; }
.rte-editor th, .rte-editor td { border: 1px solid var(--line); padding: 4px 6px; text-align: left; vertical-align: top; }
.rte-editor th { background: var(--bg); }
.rte-editor blockquote { margin: 6px 0 10px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 8px 8px 0; }
.rte-editor ul.scx-check { list-style: '✓  '; }

/* Help-center FAQs */
.faq-topic-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.faq-topic-head h2 { margin: 0 0 2px; }
.faq-topic-head p { margin: 0; }
.faq-ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); color: var(--accent); flex: none; }
.faq-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.faq-act .tg { margin-left: 4px; }
.faq-qs { margin: 12px 0 0; padding-left: 20px; }
.faq-qs li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.faq-qs li:first-child { border-top: 0; }
@media (max-width: 700px) { .faq-qs li { flex-direction: column; align-items: flex-start; } }

/* ---- Queries (queries/) ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.q-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; }
.q-chip b { font-weight: 700; color: var(--muted); }
.q-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.q-chip.on b { color: #fff; }
.q-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 8px; }
.q-filters .field { flex: 0 1 170px; margin: 0; }
.q-filters .q-search { flex: 1 1 240px; }
.q-filters .actions { margin: 0; }
.q-total { margin: 4px 0 8px; }
.table-wrap { overflow-x: auto; }
.th-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.th-sort.on { color: var(--ink); }
.th-sort:hover { color: var(--accent); }
.q-table td { vertical-align: top; }
.q-table tr.q-new td:first-child { box-shadow: inset 3px 0 0 var(--secondary); font-weight: 700; }
.q-act { white-space: nowrap; text-align: right; }
.q-act .btn { margin-left: 4px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.q-view { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 16px; align-items: start; }
.q-msg { font-size: 13px; line-height: 1.7; white-space: normal; margin-bottom: 12px; overflow-wrap: anywhere; }
.q-who dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.q-who dt { color: var(--muted); } .q-who dd { margin: 0; overflow-wrap: anywhere; }
.q-reply { border-top: 1px solid var(--line); padding: 12px 0; }
.q-reply:first-of-type { border-top: 0; }
.q-reply.q-failed { opacity: .8; }
.q-reply-body { font-size: 13px; line-height: 1.6; }
.q-status select { padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
.q-dlg { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.25); background: var(--card); color: var(--ink); }
.q-dlg::backdrop { background: rgba(10, 20, 30, .45); }
.q-dlg form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.q-dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.q-dlg-head h2 { margin: 0; font-size: 14px; }
.q-dlg-body { padding: 14px 18px; overflow-y: auto; }
.q-dlg-foot { padding: 12px 18px; border-top: 1px solid var(--line); margin: 0; }
.q-orig { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--line); max-height: 90px; overflow: auto; }
.q-dlg textarea { min-height: 160px; }
.q-sig { align-self: center; }
@media (max-width: 900px) { .q-view { grid-template-columns: 1fr; } .q-act { text-align: left; } }

/* ---- Mail: mailbox switcher, signature ---- */
.mail-box-pick { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.mail-box-pick select { width: 100%; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; }
.mail-sig { margin-top: 8px; }
.mail-sig-preview { margin-top: 6px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; color: #1c2733; overflow-x: auto; }
.people-pick { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; }
.people-pick legend { font-weight: 700; padding: 0 6px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; max-height: 360px; overflow-y: auto; }

/* VIRAT pricing (virat/pricing) */
.vp-packs input.vp-in { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; }
.vp-packs input.vp-num { max-width: 110px; }
.vp-packs td { vertical-align: middle; }
.vp-packs tr.vp-new input.vp-in { border-style: dashed; }
.vp-packs .err { display: block; margin-top: 4px; }
.vp-costs { display: flex; flex-wrap: wrap; gap: 14px; }
.vp-cost { flex: 1 1 340px; min-width: 0; margin: 0; padding: 10px 14px 4px; border: 1px solid var(--line); border-radius: 8px; }
.vp-cost legend { padding: 0 6px; font-weight: 700; }
.vp-cost .row > .field { flex: 1 1 140px; min-width: 0; }
.vp-save { margin: 0 0 20px; }
@media (max-width: 760px) {
  .vp-packs thead { display: none; }
  .vp-packs tr { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .vp-packs td { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex: 1 1 130px; border: 0; padding: 2px 4px; }
  .vp-packs td > input.vp-in { align-self: stretch; }
  .vp-packs td::before { content: attr(data-label); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .vp-packs input.vp-num { max-width: none; }
}

.vp-sid .row > .field { flex: 1 1 180px; min-width: 0; }
.vp-sid .row > .vp-sid-reason { flex: 3 1 320px; }

/* Scholars Post: ad types and pricing (scholarspost/ad-pricing) */
.sp-price { border-top: 1px solid var(--line); padding: 16px 0; }
.sp-price:first-of-type { border-top: 0; padding-top: 6px; }
.sp-price-grid { display: flex; flex-wrap: wrap; gap: 14px 12px; align-items: center; }
.sp-price-grid > .field { flex: 1 1 150px; min-width: 0; }
.sp-price-grid > .field.sp-wide { flex: 1 1 100%; }
.sp-price-grid > .sp-check { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sp-price-grid > .btn { flex: 0 0 auto; }
.sp-price-del { margin: -8px 0 8px; }

/* Books */
.book-card { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.book-cover { width: 150px; max-width: 40%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); flex: none; }
.book-card .kv { flex: 1 1 320px; }
@media (max-width: 600px) { .book-cover { width: 120px; } }

/* ---- HR self-service (My HR, Team, HR) ---- */
[data-halves][hidden], [data-doc-row][hidden], [data-addr-perm][hidden] { display: none !important; }
.hr-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--hr-c, var(--accent)); vertical-align: middle; flex: 0 0 auto; }
.hr-bal { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.hr-bal-card { flex: 1 1 170px; display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--hr-c, var(--accent)); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; color: var(--ink); text-decoration: none; }
.hr-bal-card:hover { border-color: var(--hr-c, var(--accent)); }
.hr-bal-name { font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.hr-bal-num { font-size: 24px; font-weight: 800; line-height: 1.1; }
.hr-li { display: flex; align-items: center; gap: 8px; }
.hr-progress { height: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 4px 0 10px; }
.hr-progress span { display: block; height: 100%; width: 0; background: var(--good); transition: width .3s ease; }
.hr-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 24px; }
.hr-kv div { min-width: 0; }
.hr-sub { margin-top: 18px; }
.hr-details { margin-top: 12px; }
.hr-details > summary { list-style: none; display: inline-flex; cursor: pointer; }
.hr-details > summary::-webkit-details-marker { display: none; }
.hr-details[open] > summary { margin-bottom: 14px; }
.hr-doc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hr-doc form { margin: 0; }
.hr-doc-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius); background: var(--bg); color: var(--accent); flex: 0 0 auto; }
.hr-halves { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.hr-count { font-weight: 700; color: var(--accent); min-height: 18px; margin: 8px 0; }
.hr-reqs { display: flex; flex-direction: column; gap: 14px; }
.hr-req { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--bg); }
.hr-req p { margin: 6px 0; }
.hr-req-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hr-reason { white-space: pre-line; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.hr-decide { margin-top: 10px; }
.hr-decide .field { max-width: 520px; }
.warn-text { color: var(--warn); }
.hr-past td { opacity: .6; }
.hr-mini { width: 64px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; }
.hr-flags { display: flex; flex-wrap: wrap; gap: 8px 18px; border: 0; padding: 0; margin: 12px 0; }
.hr-flags legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.hr-type > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hr-type[open] > summary { margin-bottom: 14px; }
.hr-type[data-off] { opacity: .75; }
.hr-cal { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hr-cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.hr-cal-h { padding: 8px; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: rgba(127,127,127,.07); border-bottom: 1px solid var(--line); }
.hr-cal-c { min-height: 92px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hr-cal-row .hr-cal-c:last-child { border-right: 0; }
.hr-cal-c.is-off, .hr-cal-empty { background: rgba(127,127,127,.06); }
.hr-cal-c.is-hol { background: rgba(243,120,26,.08); }
.hr-cal-c.is-today .hr-cal-n { background: var(--secondary); color: #fff; border-radius: 999px; padding: 0 7px; }
.hr-cal-n { font-weight: 700; align-self: flex-start; }
.hr-cal-hol { font-size: 11px; color: var(--secondary); font-weight: 600; }
.hr-cal-p { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--hr-c, var(--accent)); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-cal-p.is-pending { opacity: .5; }
@media (max-width: 760px) {
  .hr-cal-c { min-height: 64px; padding: 4px; }
  .hr-cal-h { padding: 6px 2px; font-size: 10px; text-align: center; }
  .hr-cal-p { font-size: 10px; padding: 0 3px; }
  .hr-bal-card { flex-basis: 140px; }
}
.table .inline-form { margin-top: 0; gap: 6px; align-items: center; flex-wrap: nowrap; }

/* ---- Conference check-in desk ---- */
.ci-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ci-camera video { width: 100%; max-height: 360px; background: #000; border-radius: var(--radius); object-fit: cover; margin-bottom: 10px; }
.ci-camera video[hidden], .ci-camera canvas[hidden], .ci-result[hidden] { display: none; }
.form.ci-code { flex-direction: row; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.form.ci-code > .field { flex: 1 1 240px; }
.ci-result { border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; border: 2px solid var(--line); }
.ci-result.is-ok { border-color: var(--good); background: rgba(18,128,92,.09); }
.ci-result.is-warn { border-color: var(--warn); background: rgba(181,71,8,.09); }
.ci-result.is-bad { border-color: var(--bad); background: rgba(198,40,40,.09); }
.ci-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.ci-result.is-ok .ci-title { color: var(--good); } .ci-result.is-warn .ci-title { color: var(--warn); } .ci-result.is-bad .ci-title { color: var(--bad); }
.ci-who { display: flex; flex-direction: column; gap: 2px; }
.ci-who strong { font-size: 15px; }
.ci-who p { margin: 4px 0 0; }
.ci-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .ci-stats { grid-template-columns: 1fr; } }

/* Online participation page */
.inline-details { display: inline-block; margin: 0 6px; vertical-align: middle; }
.inline-details > summary { list-style: none; cursor: pointer; display: inline; }
.inline-details > summary::-webkit-details-marker { display: none; }
.inline-details[open] form { display: flex; gap: 6px; margin-top: 6px; }
.inline-details input[type=text], .form-inline input[type=text] { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; color: var(--ink); min-width: 180px; }
.form-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; flex-wrap: wrap; }
.live-polls { display: flex; flex-wrap: wrap; gap: 14px; }
.live-poll { flex: 1 1 300px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.live-poll p { margin: 0 0 8px; }
.live-poll li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 8px; padding: 4px 0; }
.live-poll progress { flex: 1 1 100%; height: 6px; appearance: none; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; }
.live-poll progress::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
.live-poll progress::-webkit-progress-value { background: var(--accent, #f77f00); border-radius: 99px; }
.live-poll progress::-moz-progress-bar { background: var(--accent, #f77f00); border-radius: 99px; }

/* Clients (clients/view.php) */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
fieldset.field legend { font-weight: 600; margin-bottom: 6px; }
fieldset.field .check { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; }

/* ---- Social media (social/) ---- */
.soc-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.soc-tabs > a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--card); }
.soc-tabs > a.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.soc-tabs > a b { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--secondary); color: #fff; font-size: 11px; text-align: center; }
.soc-search { margin-left: auto; } .soc-search input { font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); min-width: 200px; }
.soc-chip { display: inline-flex; align-items: center; gap: 5px; margin: 0 4px 4px 0; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid currentColor; text-decoration: none; white-space: nowrap; }
.soc-good { color: var(--good); } .soc-warn { color: var(--warn); } .soc-bad { color: var(--bad); } .soc-grey { color: var(--muted); }
a.soc-chip:hover { background: rgba(127,127,127,.1); }
.soc-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.soc-grid > .card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.soc-compose .field textarea { resize: vertical; min-height: 120px; }
.soc-compose .field textarea[readonly] { opacity: .8; cursor: default; }
.soc-current { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; } .soc-current img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.soc-platforms { display: flex; flex-direction: column; gap: 8px; }
.soc-platforms i, .soc-ptabs i, .soc-target h3 i { width: 16px; text-align: center; }
.fa-linkedin { color: #0a66c2; } .fa-facebook { color: #1877f2; } .fa-instagram { color: #d62976; }
html[data-theme="dark"] .fa-linkedin { color: #4d9de0; } html[data-theme="dark"] .fa-facebook { color: #5b9cf5; } html[data-theme="dark"] .fa-instagram { color: #f06aa4; }
.soc-off { opacity: .5; }
.soc-ptabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.soc-ptabs button { font: inherit; font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.soc-ptabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--secondary); }
.soc-ptabs button b { color: var(--bad); }
.soc-panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.soc-panel-grid > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.soc-count { margin: 0; font-size: 12px; color: var(--muted); } .soc-count.is-over { color: var(--bad); font-weight: 700; }
/* previews: a neutral card in the style of each platform */
.soc-preview { background: #fff; color: #1c1c1c; border: 1px solid #dfe3e8; border-radius: 10px; max-width: 520px; overflow: hidden; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; line-height: 1.45; }
.soc-pv-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.soc-pv-head strong { display: block; font-size: 14px; } .soc-pv-sub { display: block; font-size: 12px; color: #65676b; }
.soc-pv-avatar { width: 40px; height: 40px; border-radius: 6px; background: #003049; color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.soc-pv-facebook .soc-pv-avatar, .soc-pv-instagram .soc-pv-avatar { border-radius: 50%; }
.soc-pv-instagram .soc-pv-avatar { width: 32px; height: 32px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #d62976; }
.soc-pv-text { padding: 0 14px 12px; white-space: pre-wrap; word-break: break-word; }
.soc-pv-title { display: block; padding: 0 14px 4px; font-size: 15px; }
.soc-pv-link { color: #0a66c2; font-weight: 600; } .soc-pv-facebook .soc-pv-link { color: #385898; } .soc-pv-instagram .soc-pv-link { color: #00376b; }
.soc-pv-more { font: inherit; background: none; border: 0; padding: 0; color: #65676b; cursor: pointer; font-weight: 600; }
.soc-pv-img img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.soc-pv-ig { aspect-ratio: 4 / 5; background: #000; } .soc-pv-ig img { height: 100%; max-height: none; object-fit: cover; }
.soc-pv-noimg { display: grid; place-items: center; aspect-ratio: 1; background: #f2f2f2; color: #b42318; font-weight: 700; }
.soc-pv-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; background: #f0f2f5; border-top: 1px solid #dfe3e8; word-break: break-all; }
.soc-pv-host { font-size: 11px; color: #65676b; letter-spacing: .03em; }
.soc-pv-caption { padding: 10px 14px 12px; } .soc-pv-caption .soc-pv-text { padding: 0; }
.soc-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.soc-target { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.soc-target header { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .soc-target h3 { margin: 0; }
.soc-target p { margin: 0; }
.soc-text { white-space: pre-wrap; word-break: break-word; font: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0; max-height: 220px; overflow: auto; }
.soc-manual { border-top: 1px dashed var(--line); padding-top: 10px; gap: 8px; }
.soc-field-btn { flex: 0 0 auto; justify-content: flex-end; }
.soc-view-img { display: block; max-width: min(100%, 420px); border-radius: 8px; border: 1px solid var(--line); margin-top: 10px; }
.soc-cal-item { display: block; padding: 3px 6px; border-radius: 6px; background: rgba(11,110,153,.1); color: var(--ink); text-decoration: none; font-size: 11px; line-height: 1.3; min-width: 0; }
.soc-cal-item:hover { background: rgba(11,110,153,.2); } .soc-cal-item.is-pending { opacity: .55; }
.soc-cal-time { font-weight: 700; margin-right: 4px; } .soc-cal-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.soc-cal-icons { display: flex; gap: 5px; margin-top: 2px; }
.soc-cal-icons i.soc-i-good, .soc-i-good { color: var(--good) !important; } .soc-cal-icons i.soc-i-warn, .soc-i-warn { color: var(--warn) !important; } .soc-cal-icons i.soc-i-bad, .soc-i-bad { color: var(--bad) !important; } .soc-cal-icons i.soc-i-grey { color: var(--muted) !important; }
.soc-legend { margin: 10px 0 0; }
.soc-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.soc-lib-item { margin: 0; display: flex; flex-direction: column; gap: 6px; } .soc-lib-item h3 { margin: 0; }
.soc-lib-text { margin: 0; color: var(--muted); flex: 1; word-break: break-word; }
.soc-steps { display: flex; flex-direction: column; gap: 10px; padding-left: 18px; } .soc-steps code { word-break: break-all; }
@media (max-width: 1000px) { .soc-grid, .soc-panel-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .soc-search { margin-left: 0; width: 100%; } .soc-search input { width: 100%; min-width: 0; } .soc-cal-title, .soc-cal-time { display: none; } .soc-cal-item { padding: 2px 3px; } }

/* ---- Statistics (stats.php) ---- */
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 16px; align-items: start; }
.st-card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.st-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.st-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; }
.st-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(243,120,26,.12); color: var(--secondary); }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.st-tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg); min-width: 0; }
.st-val { font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.st-label { font-weight: 700; margin-top: 4px; }
.st-sub { color: var(--muted); font-size: 11px; margin-top: 2px; }
.st-sub-h { margin: 4px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.st-wait { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.st-wait li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.st-wait li:last-child { border-bottom: 0; }
.st-wait li b { min-width: 30px; text-align: center; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.st-wait li.has b { background: var(--secondary); color: #fff; }
.st-money { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.st-money div { border-left: 3px solid var(--good); padding: 4px 10px; }
.st-money dt { font-size: 11px; color: var(--muted); }
.st-money dd { margin: 0; font-weight: 800; font-size: 16px; word-break: break-word; } .st-money dd span { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.st-note { margin: 0; }

/* Conference certificates: design */
.cert-design-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.cert-tpls { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cert-tpls legend { margin-bottom: 6px; }
.cert-tpl { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line, #e2e8ee); border-radius: 10px; padding: 12px; cursor: pointer; }
.cert-tpl:has(input:checked) { border-color: var(--accent, #eb6500); box-shadow: 0 0 0 2px rgba(235, 101, 0, .18); }
.cert-tpl input { margin-top: 3px; }
.cert-thumb { flex: none; width: 72px; height: 51px; border-radius: 3px; position: relative; background: #fff; border: 1px solid #d5dde4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; }
.cert-thumb b { display: block; height: 3px; width: 60%; background: #c9d3db; border-radius: 2px; }
.cert-thumb b:first-of-type { width: 40%; height: 5px; background: #013a56; }
.cert-thumb i { position: absolute; inset: 0; pointer-events: none; }
.cert-thumb-classic i { border: 4px solid #013a56; box-shadow: inset 0 0 0 1px #c89b3c; }
.cert-thumb-modern { align-items: flex-start; padding-left: 18px; }
.cert-thumb-modern i { border-left: 10px solid #013a56; }
.cert-thumb-minimal i { inset: 4px; border: 1px solid #eb6500; }
.cert-accent input[type=color] { width: 64px; height: 36px; padding: 2px; border-radius: 8px; }
.cert-imgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cert-img { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cert-img-box { height: 64px; border: 1px dashed #cdd6de; border-radius: 8px; display: grid; place-items: center; padding: 6px; background: repeating-conic-gradient(#f3f5f7 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.cert-img-box img { max-height: 52px; max-width: 100%; object-fit: contain; }
.cert-img input[type=file] { font-size: .8rem; max-width: 100%; }
@media (max-width: 900px) { .cert-tpls, .cert-imgs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cert-tpls, .cert-imgs { grid-template-columns: 1fr; } }
.cert-accent { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sms-template { white-space: pre-wrap; background: var(--bg, #f5f7fa); border: 1px solid var(--line, #e2e8ee); border-radius: 8px; padding: 10px 12px; font-size: .86rem; }

/* ---- Insight Studio ---- */
.ins-list { display: grid; gap: 14px; }
.ins-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.ins-thumb { display: block; aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.ins-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ins-thumb span { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 22px; }
.ins-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ins-body h2 { font-size: 15px; margin: 0; line-height: 1.35; } .ins-body h2 a { color: var(--ink); text-decoration: none; } .ins-body h2 a:hover { color: var(--accent); }
.ins-body p { margin: 0; } .ins-dek { color: var(--ink); opacity: .85; }
.ins-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; } .ins-meta .chip { margin: 0; }
.ins-body .actions { margin-top: 4px; }
.ins-cover { width: 100%; border-radius: 6px; border: 1px solid var(--line); display: block; }
.ins-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ins-item { display: flex; flex-direction: column; gap: 6px; } .ins-item h2 { font-size: 13px; margin: 0; line-height: 1.4; } .ins-item p { margin: 0; } .ins-item .actions { margin-top: auto; padding-top: 6px; }
.ins-search { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .ins-search .form-inline { display: flex; gap: 8px; align-items: flex-end; } .ins-search .field { margin: 0; }
.ins-key + .ins-key { margin-top: 10px; } .ins-key p { margin: 4px 0 0; } .ins-key .check.inline { display: inline-flex; margin-left: 6px; }
.ins-break { word-break: break-all; }
.view-side .ins-cover + p { margin-top: 6px; }
@media (max-width: 800px) { .ins-card { grid-template-columns: 1fr; } .ins-news, .ins-search { grid-template-columns: 1fr; } }
.ins-gap { margin-top: 20px; }

/* ---- Editorial boards ---- */
.bd-add summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; }
.bd-add summary::-webkit-details-marker { display: none; }
.bd-add[open] summary { margin-bottom: 14px; }
.bd-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.bd-filter a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; }
.bd-filter a b { color: var(--muted); font-weight: 700; margin-left: 4px; } .bd-filter a.on { border-color: var(--secondary); background: rgba(243,120,26,.1); }
.bd-bulk .row { align-items: flex-end; } .bd-bulk textarea { min-height: 44px; }
.bd-table td { vertical-align: top; } .bd-table td:first-child { width: 28px; } .bd-table input[type=checkbox] { width: 18px; height: 18px; }
.bd-edit { display: inline-block; text-align: left; } .bd-edit[open] { display: block; margin-top: 8px; min-width: 300px; } .bd-edit summary { list-style: none; } .bd-edit summary::-webkit-details-marker { display: none; }
.bd-edit .form { margin-top: 10px; white-space: normal; } .bd-edit form + form { margin-top: 8px; }
.bd-order { display: flex; gap: 6px; align-items: center; } .bd-order input { width: 64px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); }
.bd-findbar { align-items: flex-end; margin-bottom: 12px; } .bd-findbar .field { margin: 0; min-width: 220px; }
.bd-email { margin-top: 4px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; } .bd-email > form, .bd-email > a { display: inline-block; }
.bd-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 6px; background: var(--bg); }

/* Scholars Post › Mentor domains */
.sp-domain-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.sp-domain-add label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; }
.sp-domain-note { display: flex; gap: 6px; }
.sp-domain-note input { flex: 1; min-width: 140px; }

/* Memberships › Plans and features */
.hm-aud { margin: 22px 0 10px; font-size: 18px; }
.hm-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.hm-plan { display: flex; flex-direction: column; gap: 10px; }
.hm-plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hm-plan-head h3 { margin: 0; font-size: 17px; }
.hm-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.hm-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; grid-column: 1 / -1; }
.hm-check input { margin-top: 3px; }

/* Mobile apps (apps/) */
.app-icon { border-radius: 16px; border: 1px solid var(--line); }
.app-order { width: 5em; }
.app-actions { margin-top: 12px; }
.app-shots { display: flex; gap: 14px; flex-wrap: wrap; }
.app-shots figure { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.app-shots img { height: 220px; width: auto; border-radius: 14px; border: 1px solid var(--line); }

/* Website usage (usage.php) */
.u-chart { margin: 16px 0 0; }
.u-chart svg { display: block; width: 100%; height: 140px; stroke: none; flex: none; }
.u-chart rect { fill: #0a6a96; }
.u-chart rect:hover { fill: #f47f20; }
.u-chart figcaption { margin-top: 6px; }
.table tr.is-active td { background: rgba(10, 106, 150, .08); }

/* Videos (social/videos, video, video-edit) */
.vid-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 12px; }
.vid-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-row { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.vid-row img { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; background: var(--line); }
.vid-progress { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.vid-progress progress { flex: 1; height: 10px; accent-color: var(--primary); }
ul.plain { list-style: none; padding: 0; margin: 0 0 12px; } ul.plain li { padding: 3px 0; }

/* Product emails (product-mail/edit) */
.pg-layout.pm-layout { grid-template-columns: minmax(0, 1fr) 420px; }
.pm-side .card { margin-bottom: 16px; }
.pm-side .btn-block { width: 100%; justify-content: center; }
.pm-side hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.pm-preview { display: block; width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 8px; background: #f4f6f8; }
@media (max-width: 1000px) { .pg-layout.pm-layout { grid-template-columns: minmax(0, 1fr); } }
