/* /assets/student/compass/css/main.css
 *
 * Compass — the central directory of external sites + the document library.
 * Shares the SANKALP student-portal "paper" aesthetic (warm cream, terracotta,
 * Playfair Display + Outfit) but is its own self-contained product. Light theme
 * only, matching the dashboard. No external CSS deps beyond fonts + Tabler.
 */

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

:root {
  --cream:#f5ede0;   --cream-dark:#edddc8;
  --paper:#fdf8f2;   --paper-warm:#faf3e8;
  --rule:#d9c9b0;    --rule-mid:#c4af90;
  --ink:#1e1712;     --ink-mid:#5c4a35;   --ink-soft:#8c7560;
  --terra:#8b3a2a;   --terra-light:#a84e3b; --terra-deep:#6b2d1f; --terra-bg:#f5e8e4;
  --gold:#c9922a;
  --ok:#3f7d4e;      --ok-bg:#e6f0e4;
  --err:#a8382b;     --err-bg:#f7e6e2;

  --r:12px; --rl:18px; --rxl:24px;
  --shadow-sm:0 1px 2px rgba(107,45,31,.06), 0 2px 8px rgba(107,45,31,.05);
  --shadow-md:0 4px 12px rgba(107,45,31,.08), 0 12px 32px rgba(107,45,31,.07);
  --shadow-lg:0 12px 40px rgba(107,45,31,.14);
  --maxw:1180px;
}

/* ── Accent tiles (fill + ink) ─────────────────────────────────────────────── */
.cx-tile { display:inline-flex; align-items:center; justify-content:center; color:#fff; }
.cx-tile--terra { background:linear-gradient(135deg,#a84e3b,#6b2d1f); }
.cx-tile--gold  { background:linear-gradient(135deg,#d8a53f,#9a6f18); }
.cx-tile--sage  { background:linear-gradient(135deg,#6d8c60,#3f5738); }
.cx-tile--plum  { background:linear-gradient(135deg,#8f5a7d,#5e3550); }
.cx-tile--slate { background:linear-gradient(135deg,#5a6577,#2f3847); }
.cx-tile--ocean { background:linear-gradient(135deg,#3a7d90,#1f4a58); }

html { scroll-behavior:smooth; }
body.cx-body {
  font-family:'Outfit',system-ui,sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(201,146,42,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(139,58,42,.08), transparent 55%),
    var(--cream);
  color:var(--ink);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
  font-size:16.5px;
  line-height:1.55;
}

a { color:inherit; text-decoration:none; }
em { font-style:italic; }

@keyframes cxUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }
@keyframes cxIn { from{opacity:0} to{opacity:1} }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.cx-header {
  position:sticky; top:0; z-index:50;
  background:rgba(253,248,242,.82);
  backdrop-filter:saturate(140%) blur(14px);
  -webkit-backdrop-filter:saturate(140%) blur(14px);
  border-bottom:1px solid var(--rule);
  box-shadow:0 2px 24px rgba(139,58,42,.05);
}
.cx-header__inner {
  max-width:var(--maxw); margin:0 auto; padding:0 26px;
  height:70px; display:flex; align-items:center; gap:22px;
}
.cx-brand { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.cx-brand__mark {
  width:42px; height:42px; border-radius:12px;
  background:linear-gradient(135deg,var(--terra-light),var(--terra-deep));
  color:var(--paper); display:flex; align-items:center; justify-content:center;
  font-size:23px; box-shadow:var(--shadow-sm);
}
.cx-brand__text { display:flex; flex-direction:column; line-height:1; }
.cx-brand__name { font-family:'Playfair Display',serif; font-size:23px; font-weight:600; color:var(--terra); letter-spacing:-.3px; }
.cx-brand__sub { font-size:10px; font-weight:600; letter-spacing:3px; color:var(--ink-soft); text-transform:uppercase; margin-top:3px; }

.cx-search {
  flex:1; max-width:440px; display:flex; align-items:center; gap:9px;
  background:var(--paper); border:1px solid var(--rule); border-radius:999px;
  padding:0 16px; height:42px; transition:.18s;
}
.cx-search:focus-within { border-color:var(--terra-light); box-shadow:0 0 0 4px var(--terra-bg); }
.cx-search i { color:var(--ink-soft); font-size:18px; }
.cx-search input { flex:1; border:0; background:transparent; font:inherit; font-size:15px; color:var(--ink); outline:none; }

.cx-nav { display:flex; align-items:center; gap:4px; margin-left:auto; }
.cx-nav__link {
  display:flex; align-items:center; gap:7px; padding:9px 13px; border-radius:10px;
  font-size:14.5px; font-weight:500; color:var(--ink-mid); transition:.15s; white-space:nowrap;
}
.cx-nav__link i { font-size:18px; }
.cx-nav__link:hover { background:var(--paper-warm); color:var(--ink); }
.cx-nav__link.is-active { background:var(--terra-bg); color:var(--terra); }
.cx-nav__link--portal { color:var(--ink-soft); }

/* Admin sub-nav */
.cx-subnav { border-top:1px solid var(--rule); background:rgba(250,243,232,.7); }
.cx-subnav__inner { max-width:var(--maxw); margin:0 auto; padding:0 26px; display:flex; gap:4px; overflow-x:auto; }
.cx-subnav__tab {
  display:flex; align-items:center; gap:7px; padding:12px 14px; font-size:14px; font-weight:500;
  color:var(--ink-mid); border-bottom:2.5px solid transparent; white-space:nowrap; transition:.15s;
}
.cx-subnav__tab i { font-size:17px; }
.cx-subnav__tab:hover { color:var(--terra); }
.cx-subnav__tab.is-active { color:var(--terra); border-bottom-color:var(--terra); }

/* ── Layout shell ───────────────────────────────────────────────────────────── */
.cx-main { max-width:var(--maxw); margin:0 auto; padding:34px 26px 60px; animation:cxIn .4s ease; }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.cx-hero {
  position:relative; overflow:hidden; border-radius:var(--rxl);
  background:linear-gradient(135deg,#3a1c14 0%,#6b2d1f 55%,#8b3a2a 100%);
  color:var(--paper); padding:56px 48px; margin-bottom:30px;
  box-shadow:var(--shadow-lg);
}
.cx-hero__glow {
  position:absolute; inset:0;
  background:
    radial-gradient(500px 300px at 88% 8%, rgba(216,165,63,.38), transparent 60%),
    radial-gradient(420px 300px at 6% 100%, rgba(168,78,59,.5), transparent 60%);
  pointer-events:none;
}
.cx-hero__content { position:relative; max-width:660px; }
.cx-hero__eyebrow {
  display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:600;
  letter-spacing:1.5px; text-transform:uppercase; color:#f0d8b0;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.16);
  padding:6px 13px; border-radius:999px; margin-bottom:20px;
}
.cx-hero__title {
  font-family:'Playfair Display',serif; font-weight:500; font-size:clamp(30px,5vw,48px);
  line-height:1.08; letter-spacing:-.5px; margin-bottom:14px;
}
.cx-hero__title em { color:#f0c979; font-style:italic; }
.cx-hero__lead { font-size:17px; color:rgba(253,248,242,.86); max-width:520px; margin-bottom:26px; }
.cx-hero__search {
  display:flex; align-items:center; gap:10px; background:var(--paper);
  border-radius:14px; padding:7px 7px 7px 18px; max-width:520px; box-shadow:var(--shadow-md);
}
.cx-hero__search i { color:var(--ink-soft); font-size:20px; }
.cx-hero__search input { flex:1; border:0; background:transparent; font:inherit; font-size:16px; color:var(--ink); outline:none; }
.cx-hero__search button {
  border:0; background:linear-gradient(135deg,var(--terra-light),var(--terra-deep)); color:#fff;
  font:inherit; font-weight:600; font-size:15px; padding:11px 22px; border-radius:10px; cursor:pointer; transition:.15s;
}
.cx-hero__search button:hover { filter:brightness(1.08); }
.cx-hero__stats { display:flex; align-items:center; gap:16px; margin-top:22px; font-size:14.5px; color:rgba(253,248,242,.8); }
.cx-hero__stats strong { color:var(--paper); font-weight:600; }
.cx-dot { width:4px; height:4px; border-radius:50%; background:rgba(253,248,242,.45); }

/* ── Page head (docs) ───────────────────────────────────────────────────────── */
.cx-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap; margin-bottom:24px; }
.cx-page-head__eyebrow { display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:600; letter-spacing:1.2px; text-transform:uppercase; color:var(--terra); margin-bottom:8px; }
.cx-page-head__title { font-family:'Playfair Display',serif; font-weight:600; font-size:clamp(28px,4vw,40px); letter-spacing:-.5px; }
.cx-page-head__lead { color:var(--ink-mid); font-size:16px; margin-top:6px; max-width:560px; }
.cx-inline-search {
  display:flex; align-items:center; gap:9px; background:var(--paper); border:1px solid var(--rule);
  border-radius:999px; padding:0 16px; height:44px; min-width:260px;
}
.cx-inline-search i { color:var(--ink-soft); }
.cx-inline-search input { border:0; background:transparent; font:inherit; font-size:15px; outline:none; width:100%; }
.cx-inline-search:focus-within { border-color:var(--terra-light); box-shadow:0 0 0 4px var(--terra-bg); }

/* ── Category chips ─────────────────────────────────────────────────────────── */
.cx-chips { display:flex; flex-wrap:wrap; gap:9px; margin-bottom:30px; }
.cx-chip {
  display:inline-flex; align-items:center; gap:7px; padding:8px 15px; border-radius:999px;
  background:var(--paper); border:1px solid var(--rule); font-size:14px; font-weight:500;
  color:var(--ink-mid); transition:.15s;
}
.cx-chip i { font-size:16px; color:var(--ink-soft); }
.cx-chip:hover { border-color:var(--rule-mid); background:var(--paper-warm); transform:translateY(-1px); }
.cx-chip.is-active { background:var(--terra); border-color:var(--terra); color:#fff; }
.cx-chip.is-active i { color:#f0c979; }
.cx-chip__count { font-size:12px; font-weight:600; background:rgba(0,0,0,.06); border-radius:999px; padding:1px 8px; color:inherit; }
.cx-chip.is-active .cx-chip__count { background:rgba(255,255,255,.2); }

/* ── Sections ───────────────────────────────────────────────────────────────── */
.cx-section { margin-bottom:40px; }
.cx-section__head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.cx-section__title { display:flex; align-items:center; gap:11px; font-family:'Playfair Display',serif; font-weight:600; font-size:23px; color:var(--ink); letter-spacing:-.3px; }
.cx-section__title > i { color:var(--terra); font-size:22px; }
.cx-section__icon { width:34px; height:34px; border-radius:9px; font-size:18px; }
.cx-section__count { font-size:13px; font-weight:600; color:var(--ink-soft); background:var(--paper-warm); border:1px solid var(--rule); border-radius:999px; padding:4px 12px; }
.cx-section__lead { color:var(--ink-mid); margin:-6px 0 16px; }
.cx-section__more { display:inline-flex; align-items:center; gap:5px; font-size:14px; font-weight:600; color:var(--terra); transition:.15s; }
.cx-section__more i { transition:transform .15s; }
.cx-section__more:hover i { transform:translateX(3px); }

/* ── Link cards ─────────────────────────────────────────────────────────────── */
.cx-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(258px,1fr)); gap:16px; }
.cx-link-card {
  display:flex; flex-direction:column; gap:12px; padding:18px;
  background:var(--paper); border:1px solid var(--rule); border-radius:var(--rl);
  box-shadow:var(--shadow-sm); transition:transform .18s, box-shadow .18s, border-color .18s;
  position:relative; overflow:hidden; animation:cxUp .4s ease both;
}
.cx-link-card::after {
  content:""; position:absolute; left:0; right:0; top:0; height:3px;
  background:linear-gradient(90deg,var(--terra-light),var(--gold)); opacity:0; transition:.18s;
}
.cx-link-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:var(--rule-mid); }
.cx-link-card:hover::after { opacity:1; }
.cx-link-card__top { display:flex; align-items:flex-start; justify-content:space-between; }
.cx-tile { width:48px; height:48px; border-radius:13px; font-size:24px; box-shadow:var(--shadow-sm); position:relative; }
.cx-favicon { border-radius:6px; }
.cx-tile__fallback-icon { display:none; }
.cx-tile--fallback .cx-tile__fallback-icon { display:block; }
.cx-star { color:var(--gold); font-size:17px; }
.cx-link-card__body { flex:1; }
.cx-link-card__title { font-size:16.5px; font-weight:600; color:var(--ink); line-height:1.3; }
.cx-link-card__desc { font-size:14px; color:var(--ink-mid); margin-top:5px; line-height:1.45; }
.cx-link-card__foot { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:11px; border-top:1px solid var(--rule); font-size:12.5px; }
.cx-link-card__host { display:inline-flex; align-items:center; gap:5px; color:var(--terra); font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cx-link-card__host i { font-size:14px; }
.cx-link-card__author { color:var(--ink-soft); white-space:nowrap; }

/* ── Document cards ─────────────────────────────────────────────────────────── */
.cx-doc-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:16px; }
.cx-doc-card {
  display:flex; align-items:center; gap:16px; padding:16px 18px;
  background:var(--paper); border:1px solid var(--rule); border-radius:var(--rl);
  box-shadow:var(--shadow-sm); transition:transform .18s, box-shadow .18s, border-color .18s; animation:cxUp .4s ease both;
}
.cx-doc-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); border-color:var(--rule-mid); }
.cx-doc-card__face { width:56px; height:64px; border-radius:11px; flex-direction:column; gap:3px; flex-shrink:0; font-size:26px; }
.cx-doc-card__ext { font-size:9.5px; font-weight:700; letter-spacing:.5px; opacity:.92; }
.cx-doc-card__body { flex:1; min-width:0; }
.cx-doc-card__title { font-size:16px; font-weight:600; color:var(--ink); line-height:1.3; }
.cx-doc-card__desc { font-size:13.5px; color:var(--ink-mid); margin-top:3px; }
.cx-doc-card__meta { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:9px; font-size:12.5px; color:var(--ink-soft); }
.cx-doc-card__size { font-weight:600; }
.cx-doc-card__arrow { color:var(--ink-soft); font-size:19px; transition:transform .15s; }
.cx-doc-card:hover .cx-doc-card__arrow { transform:translateX(3px); color:var(--terra); }

/* Tags / pills */
.cx-tag { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:500; color:var(--ink-mid); background:var(--paper-warm); border:1px solid var(--rule); border-radius:999px; padding:3px 10px; }
.cx-tag i { font-size:13px; }
.cx-tag--muted { color:var(--ink-soft); }
.cx-tag--strong { background:var(--terra-bg); border-color:#e6cabf; color:var(--terra); font-weight:600; }
.cx-pill { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; border-radius:999px; padding:3px 10px; }
.cx-pill i { font-size:13px; }
.cx-pill--ok { color:var(--ok); background:var(--ok-bg); }
.cx-pill--muted { color:var(--ink-soft); background:var(--cream-dark); }

/* ── Document detail ────────────────────────────────────────────────────────── */
.cx-doc-detail { max-width:760px; margin:0 auto; }
.cx-back { display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:500; color:var(--ink-mid); margin-bottom:18px; transition:.15s; }
.cx-back:hover { color:var(--terra); }
.cx-doc-detail__card { background:var(--paper); border:1px solid var(--rule); border-radius:var(--rxl); box-shadow:var(--shadow-md); padding:32px; }
.cx-doc-detail__head { display:flex; gap:20px; align-items:flex-start; }
.cx-doc-detail__face { width:72px; height:82px; border-radius:15px; font-size:38px; flex-shrink:0; }
.cx-doc-detail__badges { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:10px; }
.cx-doc-detail__title { font-family:'Playfair Display',serif; font-weight:600; font-size:27px; line-height:1.2; color:var(--ink); }
.cx-doc-detail__facts { display:flex; flex-wrap:wrap; gap:16px; margin-top:12px; font-size:13.5px; color:var(--ink-soft); }
.cx-doc-detail__facts i { font-size:15px; margin-right:3px; vertical-align:-2px; }
.cx-doc-detail__desc { margin-top:22px; padding-top:22px; border-top:1px solid var(--rule); color:var(--ink-mid); font-size:15.5px; line-height:1.6; }
.cx-doc-detail__preview { margin-top:22px; border-radius:14px; overflow:hidden; border:1px solid var(--rule); background:var(--paper-warm); }
.cx-doc-detail__preview img { width:100%; display:block; max-height:520px; object-fit:contain; }
.cx-doc-detail__actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:26px; }
.cx-doc-detail__manage { display:inline-flex; align-items:center; gap:6px; margin-top:20px; font-size:13.5px; font-weight:500; color:var(--ink-soft); }
.cx-doc-detail__manage:hover { color:var(--terra); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.cx-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font:inherit; font-weight:600; font-size:14.5px; border-radius:11px; padding:11px 20px;
  border:1px solid transparent; cursor:pointer; transition:.15s; white-space:nowrap;
}
.cx-btn i { font-size:18px; }
.cx-btn--lg { padding:14px 26px; font-size:15.5px; }
.cx-btn--primary { background:linear-gradient(135deg,var(--terra-light),var(--terra-deep)); color:#fff; box-shadow:var(--shadow-sm); }
.cx-btn--primary:hover { filter:brightness(1.07); box-shadow:var(--shadow-md); }
.cx-btn--ghost { background:var(--paper); border-color:var(--rule); color:var(--ink-mid); }
.cx-btn--ghost:hover { background:var(--paper-warm); border-color:var(--rule-mid); color:var(--ink); }
.cx-btn.is-copied { background:var(--ok); color:#fff; border-color:var(--ok); }
.cx-btn__hint { font-weight:500; font-size:12px; opacity:.8; }

/* ── Empty states ───────────────────────────────────────────────────────────── */
.cx-empty { display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center; padding:44px 24px; color:var(--ink-soft); }
.cx-empty i { font-size:42px; color:var(--rule-mid); }
.cx-empty p { font-size:15px; }
.cx-empty--lg { padding:70px 24px; background:var(--paper); border:1px dashed var(--rule-mid); border-radius:var(--rxl); }
.cx-empty--lg i { font-size:58px; }
.cx-empty--lg h3 { font-family:'Playfair Display',serif; font-size:22px; color:var(--ink-mid); font-weight:600; }
.cx-empty--lg .cx-btn { margin-top:8px; }

/* ── Gate / 404 ─────────────────────────────────────────────────────────────── */
.cx-gate { display:flex; justify-content:center; padding:40px 0; }
.cx-gate__card { max-width:520px; text-align:center; background:var(--paper); border:1px solid var(--rule); border-radius:var(--rxl); box-shadow:var(--shadow-md); padding:48px 40px; }
.cx-gate__icon { display:inline-flex; align-items:center; justify-content:center; width:76px; height:76px; border-radius:20px; background:var(--terra-bg); color:var(--terra); font-size:38px; margin-bottom:22px; }
.cx-gate__title { font-family:'Playfair Display',serif; font-size:28px; font-weight:600; color:var(--ink); margin-bottom:12px; }
.cx-gate__lead { color:var(--ink-mid); font-size:16px; line-height:1.6; margin-bottom:28px; }
.cx-gate__actions { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }

/* ── Admin ──────────────────────────────────────────────────────────────────── */
.cx-admin__head { margin-bottom:24px; }
.cx-admin__head h1 { font-family:'Playfair Display',serif; font-size:30px; font-weight:600; letter-spacing:-.4px; }
.cx-admin__head p { color:var(--ink-mid); margin-top:5px; font-size:15px; max-width:640px; }

.cx-stat-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:28px; }
.cx-stat { background:var(--paper); border:1px solid var(--rule); border-radius:var(--rl); padding:18px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:3px; }
.cx-stat__icon { width:40px; height:40px; border-radius:11px; font-size:20px; margin-bottom:8px; }
.cx-stat__value { font-family:'Playfair Display',serif; font-size:28px; font-weight:600; color:var(--ink); line-height:1; }
.cx-stat__label { font-size:13px; color:var(--ink-soft); font-weight:500; }

.cx-admin__actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; }
.cx-action-card { display:flex; align-items:center; gap:14px; background:var(--paper); border:1px solid var(--rule); border-radius:var(--rl); padding:16px 18px; box-shadow:var(--shadow-sm); transition:.16s; }
.cx-action-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); border-color:var(--rule-mid); }
.cx-action-card .cx-tile { width:44px; height:44px; border-radius:12px; font-size:22px; flex-shrink:0; }
.cx-action-card__text { flex:1; display:flex; flex-direction:column; font-size:13.5px; color:var(--ink-soft); }
.cx-action-card__text strong { font-size:16px; color:var(--ink); font-weight:600; }
.cx-action-card > i:last-child { color:var(--ink-soft); font-size:18px; }

/* Split: form + list */
.cx-admin__split { display:grid; grid-template-columns:minmax(320px,400px) 1fr; gap:24px; align-items:start; }
.cx-card { background:var(--paper); border:1px solid var(--rule); border-radius:var(--rl); box-shadow:var(--shadow-sm); }
.cx-form { padding:22px; position:sticky; top:100px; }
.cx-form__title { font-family:'Playfair Display',serif; font-size:19px; font-weight:600; margin-bottom:16px; }
.cx-field { display:block; margin-bottom:14px; }
.cx-field__label { display:block; font-size:13px; font-weight:600; color:var(--ink-mid); margin-bottom:6px; }
.cx-field__opt { font-weight:400; color:var(--ink-soft); }
.cx-field input[type=text], .cx-field input[type=number], .cx-field textarea, .cx-field select {
  width:100%; font:inherit; font-size:14.5px; color:var(--ink); background:var(--paper-warm);
  border:1px solid var(--rule); border-radius:10px; padding:10px 13px; outline:none; transition:.15s;
}
.cx-field textarea { resize:vertical; }
.cx-field input:focus, .cx-field textarea:focus, .cx-field select:focus { border-color:var(--terra-light); box-shadow:0 0 0 3px var(--terra-bg); background:var(--paper); }
.cx-field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.cx-check { display:flex; align-items:center; gap:9px; font-size:14px; color:var(--ink-mid); margin:4px 0 8px; cursor:pointer; }
.cx-check input { width:17px; height:17px; accent-color:var(--terra); }
.cx-form__actions { display:flex; gap:10px; margin-top:18px; }

/* Visibility radio cards */
.cx-vis { border:0; margin-bottom:14px; }
.cx-vis legend { margin-bottom:8px; }
.cx-vis__opt { display:flex; gap:11px; padding:12px 14px; border:1px solid var(--rule); border-radius:11px; margin-bottom:9px; cursor:pointer; transition:.15s; background:var(--paper-warm); }
.cx-vis__opt input { margin-top:3px; accent-color:var(--terra); }
.cx-vis__opt:hover { border-color:var(--rule-mid); }
.cx-vis__opt:has(input:checked) { border-color:var(--terra-light); background:var(--terra-bg); box-shadow:0 0 0 2px var(--terra-bg); }
.cx-vis__body { display:flex; flex-direction:column; }
.cx-vis__body i { display:none; }
.cx-vis__body strong { font-size:14.5px; font-weight:600; color:var(--ink); }
.cx-vis__body small { font-size:12.5px; color:var(--ink-soft); }

/* Swatches */
.cx-swatches { display:flex; gap:9px; }
.cx-swatch { position:relative; cursor:pointer; }
.cx-swatch input { position:absolute; opacity:0; }
.cx-swatch span { display:block; width:30px; height:30px; border-radius:9px; box-shadow:inset 0 0 0 2px rgba(255,255,255,.35); transition:.15s; }
.cx-swatch--terra span { background:linear-gradient(135deg,#a84e3b,#6b2d1f); }
.cx-swatch--gold span { background:linear-gradient(135deg,#d8a53f,#9a6f18); }
.cx-swatch--sage span { background:linear-gradient(135deg,#6d8c60,#3f5738); }
.cx-swatch--plum span { background:linear-gradient(135deg,#8f5a7d,#5e3550); }
.cx-swatch--slate span { background:linear-gradient(135deg,#5a6577,#2f3847); }
.cx-swatch--ocean span { background:linear-gradient(135deg,#3a7d90,#1f4a58); }
.cx-swatch input:checked + span { box-shadow:0 0 0 2px var(--paper), 0 0 0 4px var(--ink-mid); transform:scale(1.08); }

/* Dropzone */
.cx-dropzone {
  position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center;
  border:2px dashed var(--rule-mid); border-radius:14px; padding:26px 18px; margin-bottom:16px;
  background:var(--paper-warm); cursor:pointer; transition:.15s;
}
.cx-dropzone input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; }
.cx-dropzone i { font-size:34px; color:var(--terra-light); }
.cx-dropzone__label { font-size:14.5px; font-weight:600; color:var(--ink-mid); }
.cx-dropzone__hint { font-size:12.5px; color:var(--ink-soft); }
.cx-dropzone__file { font-size:13.5px; font-weight:600; color:var(--terra); margin-top:6px; word-break:break-all; }
.cx-dropzone.is-drag, .cx-dropzone.has-file { border-color:var(--terra-light); background:var(--terra-bg); }

.cx-file-chip { display:flex; align-items:center; gap:12px; padding:12px; background:var(--paper-warm); border:1px solid var(--rule); border-radius:11px; margin-bottom:16px; font-size:13px; color:var(--ink-mid); }
.cx-file-chip .cx-tile { width:44px; height:44px; border-radius:11px; font-size:22px; flex-shrink:0; }

/* Rows (list items) */
.cx-list-head { font-size:13px; font-weight:600; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.5px; margin-bottom:10px; padding:0 4px; }
.cx-row { display:flex; align-items:center; gap:14px; background:var(--paper); border:1px solid var(--rule); border-radius:var(--r); padding:13px 15px; margin-bottom:10px; box-shadow:var(--shadow-sm); transition:.14s; }
.cx-row:hover { border-color:var(--rule-mid); box-shadow:var(--shadow-md); }
.cx-row__tile { width:44px; height:44px; border-radius:11px; font-size:22px; flex-shrink:0; }
.cx-avatar { width:44px; height:44px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-weight:600; font-size:18px; color:#fff; background:linear-gradient(135deg,var(--terra-light),var(--terra-deep)); font-family:'Playfair Display',serif; }
.cx-row__main { flex:1; min-width:0; }
.cx-row__title { font-size:15.5px; font-weight:600; color:var(--ink); display:flex; align-items:center; gap:7px; }
.cx-row__star { color:var(--gold); font-size:14px; }
.cx-row__sub { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:4px; font-size:12.5px; color:var(--ink-soft); }
.cx-row__sub i { font-size:13px; margin-right:3px; vertical-align:-1px; }
.cx-row__sub > span { display:inline-flex; align-items:center; }
.cx-row__actions { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.cx-row__actions form { display:inline-flex; }
.cx-icon-btn { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:9px; border:1px solid var(--rule); background:var(--paper); color:var(--ink-mid); cursor:pointer; transition:.14s; font-size:17px; }
.cx-icon-btn:hover { background:var(--paper-warm); border-color:var(--rule-mid); color:var(--ink); }
.cx-icon-btn--danger:hover { background:var(--err-bg); border-color:#e0b6ac; color:var(--err); }

/* Alerts */
.cx-alert { display:flex; align-items:center; gap:9px; padding:12px 16px; border-radius:11px; font-size:14.5px; font-weight:500; margin-bottom:18px; }
.cx-alert i { font-size:19px; }
.cx-alert--ok { background:var(--ok-bg); color:var(--ok); border:1px solid #bcd8bd; }
.cx-alert--err { background:var(--err-bg); color:var(--err); border:1px solid #e4b6ab; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.cx-footer { border-top:1px solid var(--rule); background:var(--paper-warm); margin-top:40px; }
.cx-footer__inner { max-width:var(--maxw); margin:0 auto; padding:30px 26px; text-align:center; }
.cx-footer__brand { display:inline-flex; align-items:center; gap:8px; font-family:'Playfair Display',serif; font-size:20px; font-weight:600; color:var(--terra); }
.cx-footer__tagline { color:var(--ink-mid); font-size:14.5px; margin-top:5px; }
.cx-footer__meta { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:14px; font-size:13px; color:var(--ink-soft); }
.cx-footer__meta a { color:var(--terra); font-weight:600; }

/* ── User-picker theme bridge (component ships neutral) ─────────────────────── */
.upick-input { width:100%; font:inherit; font-size:14.5px; background:var(--paper-warm); border:1px solid var(--rule); border-radius:10px; padding:10px 13px; outline:none; }
.upick-input:focus { border-color:var(--terra-light); box-shadow:0 0 0 3px var(--terra-bg); background:var(--paper); }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width:900px) {
  .cx-admin__split { grid-template-columns:1fr; }
  .cx-form { position:static; }
}
@media (max-width:760px) {
  .cx-header__inner { height:auto; flex-wrap:wrap; padding:12px 18px; gap:12px; }
  .cx-search { order:3; max-width:none; flex-basis:100%; }
  .cx-nav { margin-left:auto; }
  .cx-nav__link span { display:none; }
  .cx-nav__link { padding:9px; }
  .cx-nav__link--portal span { display:none; }
  .cx-main { padding:24px 18px 48px; }
  .cx-hero { padding:38px 26px; }
  .cx-page-head { align-items:stretch; }
  .cx-inline-search { min-width:0; width:100%; }
  .cx-field-row { grid-template-columns:1fr; }
  .cx-doc-detail__card { padding:24px 20px; }
  .cx-doc-detail__head { flex-direction:column; gap:14px; }
}
@media (max-width:420px) {
  .cx-grid, .cx-doc-grid { grid-template-columns:1fr; }
}
