/* TOSCAN Portal — Municipal Government of Candoni
   Black, warm white and gold. Plus Jakarta Sans for headings and figures, Inter for text. */
:root {
  --ink: #121214; --ink-2: #1d1d21; --ink-3: #2a2a30; --text: #1d1d22; --muted: #63636b; --faint: #9a9aa3;
  --line: #e9e7e1; --line-2: #d8d5cc; --bg: #f6f5f1; --card: #ffffff; --hover: #faf9f5;
  --gold: #d4af37; --gold-2: #c09a1f; --gold-3: #e6c65a; --gold-ink: #75600f; --gold-soft: #fbf6e2; --gold-soft-2: #f3e7b6;
  --gold-grad: linear-gradient(180deg, #e2c255 0%, #d1aa2e 100%);
  --ok: #1f7a3e; --ok-bg: #e4f3e9; --warn: #8a5a00; --warn-bg: #fdf1d6; --bad: #b42323; --bad-bg: #fbe6e6;
  --info: #2b4f86; --info-bg: #e8eef8; --neutral-bg: #efeff2;
  --radius: 16px; --shadow: 0 1px 2px rgba(18,18,20,.04), 0 4px 16px -6px rgba(18,18,20,.07);
  --shadow-lg: 0 24px 64px -12px rgba(18,18,20,.28);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Plus Jakarta Sans", var(--font);
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; margin: 0 0 .5rem; color: var(--ink); letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: 1.85rem; letter-spacing: -.02em; font-weight: 800; } h2 { font-size: 1.25rem; } h3 { font-size: 1.02rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .8rem; }
a { color: var(--info); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .xs { font-size: .78rem; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mono { font-family: var(--font); font-variant-numeric: tabular-nums; }
.num, td.right, th.right, .stat .n { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
::selection { background: var(--gold-soft-2); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }
ul { padding-left: 1.2rem; }

/* Drifting gold lines behind dark banners */
.paths { position: absolute; inset: 0; pointer-events: none; color: var(--gold); overflow: hidden; }
.paths svg { width: 100%; height: 100%; display: block; }
.paths path { stroke-dasharray: .3 .7; animation: drift 25s linear infinite; }
@keyframes drift { to { stroke-dashoffset: -1; } }
@media (prefers-reduced-motion: reduce) { .paths path { animation: none; stroke-dasharray: none; } }

/* Dark banner card: dashboard greeting and student profile */
.hero-card, .card.hero-card { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, #24211a 0%, var(--ink) 55%); color: #e9e9ee; border: 1px solid #2a2a30; border-radius: 20px; box-shadow: 0 18px 40px -22px rgba(18,18,20,.6); isolation: isolate; }
.hero-card .paths { opacity: .8; z-index: -1; -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 60%); mask-image: linear-gradient(90deg, transparent 15%, #000 60%); }
.hero-card .paths svg, .pub-band .paths svg { transform: scaleX(-1); }
.hero-card .paths path, .pub-band .paths path { stroke-dasharray: .55 .45; }
.hero-card h1, .hero-card h2 { color: #fff; }
.hero-card .muted, .hero-card p, .home-head.hero-card p { color: #c4c4cc; }
.hero-card .kv dt { color: #9a9aa6; } .hero-card .kv dd { color: #fff; }
.hero-card b.mono { color: var(--gold-3); }
.hero-card .avatar { box-shadow: 0 0 0 3px rgba(212,175,55,.55), 0 8px 24px -6px rgba(0,0,0,.6); }
.card.hero-card { padding: 1.6rem 1.8rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: .9rem; white-space: nowrap; color: var(--ink); line-height: 1.3; box-shadow: 0 1px 2px rgba(18,18,20,.05); transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s; }
.btn:hover { background: var(--hover); border-color: #bfbbb0; }
.btn:active:not(:disabled) { transform: translateY(1px); }
a.btn { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary, .btn.gold { background: var(--gold-grad); color: var(--ink); border-color: #c49f25; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(117,96,15,.25); }
.btn.primary:hover, .btn.gold:hover { background: linear-gradient(180deg, #d8b740 0%, #c39d22 100%); border-color: #b48f1c; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 12px -4px rgba(117,96,15,.45); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.ok:hover { background: #196532; }
.btn.danger { color: var(--bad); border-color: #ecc5c5; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.sm { min-height: 32px; padding: .3rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--hover); border-color: transparent; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--info); text-decoration: underline; font-weight: 500; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; }

/* Forms */
label { display: block; font-size: .82rem; font-weight: 600; color: #3f3f46; margin-bottom: .35rem; }
.req::after { content: " *"; color: var(--bad); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=tel], input[type=search], input[type=url], input:not([type]), select, textarea {
  width: 100%; padding: .55rem .8rem; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; min-height: 42px; box-shadow: inset 0 1px 2px rgba(18,18,20,.03); transition: border-color .15s, box-shadow .15s; }
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: #bfbbb0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(212,175,55,.2); }
textarea { min-height: 84px; resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background: #f3f2ee; color: #6f6f78; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; vertical-align: -3px; accent-color: var(--gold-2); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; font-weight: 500; color: var(--text); }
.grid { display: grid; gap: .85rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .spanall { grid-column: 1 / -1; }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; } }
.field-err { color: var(--bad); font-size: .82rem; margin-top: .2rem; }
.form-msg { font-size: .88rem; margin-top: .6rem; }
.form-msg.err { color: var(--bad); } .form-msg.ok { color: var(--ok); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 700; font-size: .74rem; padding: 0 .4rem; color: var(--gold-ink); text-transform: uppercase; letter-spacing: .06em; }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.5rem; margin-bottom: 1.1rem; box-shadow: var(--shadow); }
.card.flush { padding: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .9rem; }
.card-head h2, .card-head h3 { margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; }
.page-head h1::before { content: ""; display: block; width: 32px; height: 4px; border-radius: 4px; background: var(--gold-grad); margin-bottom: .7rem; }
.page-head p { margin: .25rem 0 0; color: var(--muted); max-width: 70ch; }

/* Key figures: a quiet row of label / value pairs, not tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin: 0 0 1.2rem; }
.stat { position: relative; padding: 1rem 1.15rem .95rem; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .25rem; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--gold-grad); opacity: .85; }
.stat .n { font-family: var(--display); font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--ink); letter-spacing: -.03em; overflow-wrap: anywhere; }
.stat .l { font-size: .74rem; color: var(--muted); line-height: 1.3; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
a.stat:hover { border-color: var(--gold-soft-2); box-shadow: 0 8px 24px -10px rgba(117,96,15,.35); transform: translateY(-1px); }
a.stat:hover .n { color: var(--gold-ink); }
.stat.alert::before { background: var(--bad); }
.stat.alert .n { color: var(--bad); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Home */
.home-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.4rem; }
.home-head.hero-card { padding: 1.7rem 1.9rem; min-height: 150px; }
.home-head h1 { font-size: 2.1rem; margin: 0; }
.home-head p { margin: .1rem 0 0; color: var(--muted); }
.home { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 980px) { .home { grid-template-columns: 1fr; } }
.inbox { list-style: none; margin: 0; padding: 0; }
.inbox li { display: flex; align-items: center; gap: .9rem; padding: .85rem .6rem; margin: 0 -.6rem; border-bottom: 1px solid var(--line); border-radius: 12px; transition: background .15s; }
.inbox li:last-child { border-bottom: 0; }
.inbox li a { text-decoration: none; color: inherit; display: contents; }
.inbox .ic { width: 42px; height: 42px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(117,96,15,.12); background: var(--gold-soft); color: var(--gold-ink); display: grid; place-items: center; flex: none; }
.inbox .ic svg { width: 20px; height: 20px; }
.inbox .ic.red { background: var(--bad-bg); color: var(--bad); } .inbox .ic.blue { background: var(--info-bg); color: var(--info); } .inbox .ic.green { background: var(--ok-bg); color: var(--ok); }
.inbox .t { flex: 1; min-width: 0; }
.inbox .t b { font-weight: 600; display: block; }
.inbox .t span { font-size: .82rem; color: var(--muted); }
.inbox .n { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; background: var(--neutral-bg); border-radius: 999px; padding: .15rem .6rem; font-size: .85rem; }
.inbox li:hover { background: var(--hover); }
.inbox li:has(a) { cursor: pointer; }
.inbox li:has(a)::after { content: ""; width: 8px; height: 8px; flex: none; border-right: 2px solid var(--faint); border-top: 2px solid var(--faint); transform: rotate(45deg); margin: 0 .3rem 0 -.2rem; transition: transform .15s, border-color .15s; }
.inbox li:has(a):hover::after { border-color: var(--gold-2); transform: translateX(3px) rotate(45deg); }
.inbox li:hover .n { background: var(--gold-soft-2); }
.glance { list-style: none; margin: 0; padding: 0; }
.glance li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.glance li:last-child { border-bottom: 0; }
.glance li span { color: var(--muted); }
.glance li b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.glance a { color: inherit; text-decoration: none; }
.glance a:hover b { color: var(--gold-ink); }
.upcoming { list-style: none; margin: 0; padding: 0; }
.upcoming li { padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.upcoming li:last-child { border-bottom: 0; }
.upcoming .when { font-size: .78rem; color: var(--muted); display: block; }
/* Announcements on the student dashboard */
.ann-card { border-color: var(--gold-soft-2); }
.ann-list { list-style: none; margin: 0; padding: 0; }
.ann-list li { padding: .85rem 0 .85rem .95rem; border-bottom: 1px solid var(--line); border-left: 3px solid var(--line-2); margin-left: .1rem; }
.ann-list li:last-child { border-bottom: 0; }
.ann-list li.pinned { border-left-color: var(--gold); background: linear-gradient(90deg, var(--gold-soft) 0%, transparent 70%); border-radius: 0 10px 10px 0; }
.ann-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .25rem; }
.ann-top b { font-family: var(--display); font-size: 1rem; color: var(--ink); }
.ann-body { font-size: .92rem; margin-bottom: .35rem; overflow-wrap: anywhere; }

.rep-menu .btn { white-space: normal; text-align: left; justify-content: flex-start; line-height: 1.3; width: 100%; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; }
.split.rep-split { grid-template-columns: 270px minmax(0, 1fr); }
@media (max-width: 980px) { .split, .split.rep-split { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }

/* Tables */
.table-tools { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: .8rem; }
.table-tools > .grow { flex: 1; min-width: 180px; }
.table-tools > div { min-width: 130px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; background: #faf9f6; border-bottom: 1px solid var(--line-2); padding: .65rem .7rem; white-space: nowrap; }
thead th:first-child { border-top-left-radius: 10px; } thead th:last-child { border-top-right-radius: 10px; }
th.sortable { cursor: pointer; user-select: none; transition: color .12s; }
th.sortable:hover { color: var(--ink); }
th.asc, th.desc { color: var(--ink); }
.card > .table-wrap, .card .table-wrap:has(> table > thead) { border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table thead th { border-top: 0; }
.pager .btn { min-height: 34px; }
th.sortable::after { content: " ↕"; color: #c4c4cc; }
th.asc::after { content: " ↑"; color: var(--ink); } th.desc::after { content: " ↓"; color: var(--ink); }
td { border-bottom: 1px solid var(--line); padding: .7rem .7rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--gold-soft); }
tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .7rem .2rem 0; font-size: .85rem; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 1.6rem 1rem; }
.loading { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.loading::before { content: ""; display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: .5rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Badges */
.badge { display: inline-block; padding: .2rem .62rem; border-radius: 999px; font-size: .73rem; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: #4a4a52; letter-spacing: .01em; box-shadow: inset 0 0 0 1px rgba(18,18,20,.06); }
.b-ok { background: var(--ok-bg); color: var(--ok); } .b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); } .b-info { background: var(--info-bg); color: var(--info); }
.b-gold { background: var(--gold-soft); color: var(--gold-ink); } .b-dark { background: var(--ink); color: #fff; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.notice { padding: .8rem 1rem .8rem 1.05rem; border-radius: 12px; font-size: .9rem; margin-bottom: .9rem; border: 1px solid transparent; border-left-width: 4px; }
.notice.info { background: var(--info-bg); color: #1f3d66; border-left-color: var(--info); } .notice.warn { background: var(--warn-bg); color: #6b4800; border-left-color: #d49a1c; }
.notice.bad { background: var(--bad-bg); color: #7a2222; border-left-color: var(--bad); } .notice.ok { background: var(--ok-bg); color: #1f4f29; border-left-color: var(--ok); }

/* Avatar */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold-soft-2) 100%); color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgba(117,96,15,.15); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; flex: none; overflow: hidden; font-size: .9rem; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.8rem; }
.avatar.sm { width: 32px; height: 32px; font-size: .75rem; }

/* Auth screens */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); background: var(--bg); }
.auth-hero { background: var(--ink) center / cover no-repeat; color: #fff; position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 3.2rem; min-height: 280px; overflow: hidden; }
.auth-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,18,20,.3) 0%, rgba(18,18,20,.92) 100%); }
.auth-hero::after { content: ""; position: absolute; left: 3.2rem; right: 3.2rem; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--gold) 0%, rgba(212,175,55,0) 100%); }
.auth-hero > * { position: relative; }
.auth-hero > .paths { position: absolute; opacity: .6; }
.auth-box > * { animation: rise .5s cubic-bezier(.22,1,.36,1) both; }
.auth-box > :nth-child(2) { animation-delay: .05s; } .auth-box > :nth-child(3) { animation-delay: .1s; } .auth-box > :nth-child(4) { animation-delay: .15s; }
.auth-box > :nth-child(5) { animation-delay: .2s; } .auth-box > :nth-child(n+6) { animation-delay: .25s; }
.auth-hero .seal, .auth-hero h1, .auth-hero .sub, .auth-hero .pillars { animation: rise .6s cubic-bezier(.22,1,.36,1) both; }
.auth-hero h1 { animation-delay: .08s; } .auth-hero .sub { animation-delay: .16s; } .auth-hero .pillars { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-panel { position: relative; overflow: hidden; }
.auth-panel::before { content: ""; position: absolute; right: -20%; top: -30%; width: 80%; height: 90%; border-radius: 50%; background: radial-gradient(closest-side, rgba(212,175,55,.12), transparent); pointer-events: none; }
.auth-box { position: relative; }
.auth-hero .seal { width: 84px; height: 84px; margin-bottom: 1.4rem; filter: drop-shadow(0 6px 18px rgba(212,175,55,.25)); }
.auth-hero h1 { color: #fff; font-size: 2.6rem; line-height: 1.1; margin-bottom: .6rem; max-width: 18ch; }
.auth-hero .sub { color: #d4d4da; margin: 0 0 1.4rem; max-width: 52ch; }
.pillars { display: flex; gap: 1.4rem; flex-wrap: wrap; letter-spacing: .22em; font-size: .78rem; font-weight: 600; color: var(--gold); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2.4rem 1.4rem; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box.wide { max-width: 720px; }
.auth-box h2 { margin-bottom: .25rem; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.gbtn { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .7rem; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(18,18,20,.05); transition: background .15s, border-color .15s; }
.gbtn:hover { background: var(--hover); border-color: #bdbdc6; }
.or { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .8rem; margin: 1rem 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.auth-links { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; font-size: .88rem; }
.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-box form .btn.primary[type=submit] { min-height: 46px; border-radius: 12px; font-size: .95rem; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-hero { padding: 1.6rem; min-height: 220px; } .auth-hero::after { left: 1.6rem; right: 1.6rem; } .auth-hero h1 { font-size: 1.6rem; } }

/* Shell: black top bar and sidebar, gold accents */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .8rem; padding: 0 1.2rem; background: var(--ink); color: #fff; border-bottom: 1px solid #26262b; height: 64px; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, rgba(212,175,55,0) 0%, var(--gold) 20%, var(--gold) 80%, rgba(212,175,55,0) 100%); opacity: .7; }
.topbar .seal { width: 38px; height: 38px; }
.topbar .brand { line-height: 1.15; padding-left: .9rem; border-left: 1px solid #3a3a42; margin-left: .1rem; }
.topbar .brand b { color: var(--gold); font-family: var(--display); font-size: 1.05rem; display: block; font-weight: 800; letter-spacing: -.02em; }
.topbar .brand span { color: #a9a9b2; font-size: .74rem; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn { position: relative; background: none; border: 1px solid transparent; color: #f2f2f5; border-radius: 8px; height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 .6rem; gap: .4rem; text-decoration: none; font-weight: 500; font-size: .9rem; }
.topbar .icon-btn { transition: background .15s, border-color .15s; }
.topbar .icon-btn:hover { background: #222227; border-color: #34343b; }
.topbar .icon-btn svg { width: 20px; height: 20px; }
.topbar .dot { position: absolute; top: 3px; right: 3px; background: var(--bad); color: #fff; font-size: .66rem; border-radius: 99px; padding: 0 .33rem; font-weight: 600; line-height: 1.5; }
.me { display: flex; align-items: center; gap: .6rem; font-size: .88rem; padding: 0 .4rem; color: #fff; }
.me .who div { line-height: 1.2; }
.me .role { color: var(--gold); font-size: .72rem; }
.topbar .menu-btn { display: none; }
.layout { display: flex; min-height: calc(100vh - 64px); background: linear-gradient(to right, var(--ink) 236px, transparent 236px); }
.layout .side { align-self: flex-start; }
.topbar .icon-btn, .topbar .brand b { white-space: nowrap; }
.side { width: 236px; flex: none; background: var(--ink); border-right: 1px solid #2c2c33; padding: .9rem .7rem; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; }
.side .group { color: #7d7d86; font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; padding: 1rem .85rem .4rem; margin-top: .3rem; border-top: 1px solid #222227; font-weight: 700; }
.side .group:first-child { border-top: 0; margin-top: 0; padding-top: .2rem; }
.side a { display: flex; justify-content: space-between; align-items: center; color: #cfcfd6; text-decoration: none; min-height: 40px; padding: .5rem .85rem; border-radius: 10px; font-size: .92rem; margin-bottom: 2px; font-weight: 500; position: relative; transition: background .15s, color .15s; }
.side a:hover { background: #1f1f24; color: #fff; }
.side a.active { background: linear-gradient(90deg, rgba(212,175,55,.2) 0%, rgba(212,175,55,.06) 100%); color: var(--gold-3); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(212,175,55,.22); }
.side a.active::before { content: ""; position: absolute; left: -.7rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.side .count { background: var(--bad); color: #fff; font-size: .7rem; border-radius: 99px; padding: .05rem .45rem; font-weight: 600; }
.side a.active .count { background: var(--gold); color: var(--ink); }
.main { flex: 1; min-width: 0; padding: 2rem 2.2rem 3.5rem; max-width: 1280px; }
@media (max-width: 900px) {
  .topbar .menu-btn { display: inline-flex; }
  .side { position: fixed; left: 0; top: 64px; z-index: 25; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 4px 0 24px rgba(0,0,0,.3); }
  .main { padding: 1rem; }
  .me .who { display: none; }
  .layout { background: none; }
  .topbar { gap: .4rem; padding: 0 .6rem; }
  .topbar .brand span { display: none; }
  .topbar .brand { padding-left: .6rem; }
  .home-head h1 { font-size: 1.5rem; }
  .home-head .avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
}

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; }
@media (max-width: 760px) { .tabs { flex-wrap: nowrap; overflow-x: auto; } }
.tabs button { background: none; border: 0; padding: .65rem .95rem; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -1px; border-radius: 8px 8px 0 0; transition: color .15s, background .15s, border-color .15s; }
.tabs button:hover { background: var(--hover); }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--gold); }

/* Profile header */
.profile { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.profile .info { flex: 1; min-width: 220px; }
.profile h2 { margin: 0 0 .2rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 .9rem .6rem; }
.timeline li::before { content: ""; position: absolute; left: -1.55rem; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); border: 2px solid #fff; }
.timeline li.done::before { background: var(--ok); } .timeline li.current::before { background: var(--gold); } .timeline li.bad::before { background: var(--bad); }
.timeline .when { font-size: .78rem; color: var(--muted); }

/* Requirement rows */
.req-grid { display: grid; gap: .6rem; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.req-row:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.req-row .name { font-weight: 600; }
.progress { height: 6px; background: var(--neutral-bg); border-radius: 99px; overflow: hidden; margin-top: .4rem; }
.progress > div { height: 100%; background: var(--gold-grad); width: 0; transition: width .3s; }

/* Modal, toast */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(18,18,20,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 760px; padding: 1.6rem 1.6rem 1.2rem; position: relative; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal { border-top: 4px solid var(--gold); }
.modal > h2:first-of-type, .modal > h3:first-of-type { padding-right: 2.4rem; }
.modal.wide { max-width: 1100px; } .modal.narrow { max-width: 460px; }
.modal .x { position: absolute; top: .55rem; right: .7rem; background: none; border: 0; font-size: 1.5rem; color: var(--muted); line-height: 1; width: 32px; height: 32px; border-radius: 8px; }
.modal .x:hover { background: var(--hover); color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
#toasts { position: fixed; z-index: 80; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .4rem; align-items: center; pointer-events: none; }
#toasts div { background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-size: .9rem; font-weight: 500; max-width: 92vw; box-shadow: 0 12px 32px -8px rgba(0,0,0,.4); border: 1px solid #2a2a30; animation: pop .18s ease-out; }
#toasts div.err { background: var(--bad); } #toasts div.ok { background: var(--ok); }

/* Document viewer */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; }
.viewer .frame { background: #2e2e33; border-radius: 10px; min-height: 70vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer .frame iframe { width: 100%; height: 75vh; border: 0; background: #fff; }
.viewer .frame img { max-width: 100%; max-height: 75vh; }
@media (max-width: 900px) { .viewer { grid-template-columns: 1fr; } .viewer .frame { min-height: 50vh; } }

/* Notification list */
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: .75rem .4rem; border-bottom: 1px solid var(--line); display: flex; gap: .7rem; }
.notes li.unread { background: var(--gold-soft); }
.notes .kind { width: 6px; border-radius: 4px; flex: none; background: var(--line-2); }
.notes .kind.ok { background: var(--ok); } .notes .kind.warn { background: var(--warn); } .notes .kind.action { background: var(--gold); }

/* Print */
#print-area { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; color: #000; font-family: var(--font); }
}
.ph { text-align: center; margin-bottom: 8px; }
.ph img { display: block; width: 72px; height: 72px; object-fit: contain; margin: 0 auto 4px; }
.ph .l1 { font-weight: 700; font-size: 14px; } .ph .l2 { font-size: 11px; }
.ph .l3 { font-weight: 700; font-size: 16px; margin-top: 4px; letter-spacing: 1px; } .ph .l4 { font-size: 12px; }
.pt { width: 100%; border-collapse: collapse; font-size: 10.5px; margin-top: 6px; }
.pt th, .pt td { border: 1px solid #000; padding: 3px 5px; color: #000; }
.pt th { background: #eee; text-transform: none; letter-spacing: 0; font-size: 10px; white-space: normal; }
.pmeta { display: flex; justify-content: space-between; font-size: 11px; margin: 6px 0; }
/* Four equal columns; the certification text takes the free space so every signature line sits at the same height. */
.sigs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sigs { margin-top: 26px; font-size: 10.5px; break-inside: avoid; }
.sigs > div { display: flex; flex-direction: column; }
.sigs .lb { flex: 1; padding-bottom: 30px; }
.sigs .nm { border-top: 1px solid #000; text-align: center; font-weight: 700; padding-top: 2px; height: 16px; line-height: 14px; box-sizing: content-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sigs .tt { text-align: center; font-size: 10px; min-height: 13px; }

/* Public pages: TOSCAN search application, status and bidbook */
.apply-slot:empty { display: none; }
.apply-slot { width: 100%; max-width: 420px; margin-top: 1.5rem; }
.apply-card { position: relative; border: 1px solid var(--gold-soft-2); border-radius: 16px; padding: 1.1rem 1.2rem; background: linear-gradient(160deg, #fdf9ea 0%, var(--gold-soft) 100%); box-shadow: 0 8px 24px -14px rgba(117,96,15,.45); }
.apply-card h3 { margin: .15rem 0 .3rem; font-size: 1.02rem; }
.apply-card p { margin: 0 0 .75rem; color: #4a4434; }
.apply-kicker { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
.apply-dl { display: inline-block; margin-top: .7rem; font-size: .85rem; font-weight: 600; color: var(--gold-ink); text-decoration: none; }
.apply-dl:hover { text-decoration: underline; }
.pub { min-height: 100vh; background: var(--bg); position: relative; }
.pub-band { position: absolute; left: 0; right: 0; top: 0; height: 300px; background: radial-gradient(90% 120% at 80% 0%, #24211a 0%, var(--ink) 60%); overflow: hidden; z-index: 0; }
.pub-band .paths { opacity: .5; }
.pub-head { z-index: 2; }
.pub-main { position: relative; z-index: 1; }
.pub-main > .loading { color: #d6d6dc; }
.pub-card { box-shadow: 0 24px 60px -28px rgba(18,18,20,.55); border-color: #e4e1d8; }
.pub-head { background: var(--ink); border-bottom: 1px solid #26262b; padding: .7rem 1.2rem; display: flex; align-items: center; position: relative; }
.pub-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, rgba(212,175,55,0) 0%, var(--gold) 20%, var(--gold) 80%, rgba(212,175,55,0) 100%); opacity: .7; }
.pub-brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.pub-brand img { width: 36px; height: 36px; }
.pub-brand b { display: block; font-family: var(--display); font-weight: 800; color: var(--gold); letter-spacing: -.02em; }
.pub-brand small { display: block; font-size: .74rem; color: #a9a9b2; }
.pub-main { max-width: 760px; margin: 0 auto; padding: 2.4rem 1rem 3rem; }
.pub-card { padding: 1.6rem 1.7rem; }
.pub-title { border-bottom: 1px solid var(--line); padding-bottom: .9rem; margin-bottom: 1rem; }
.pub-title h1 { margin: .2rem 0 0; font-size: 1.7rem; }
.pub-intro p { margin: 0 0 .7rem; }
.pub-fields { margin: 1.2rem 0 1rem; gap: 1rem 1.1rem; }
.pub-q { display: flex; flex-direction: column; }
.pub-q label { font-weight: 500; }
.pub-q .pub-help { order: -1; margin: -.15rem 0 .35rem; }
.pub-q label { order: -2; }
.pub-q > input, .pub-q > select, .pub-q > textarea { margin-top: auto; }
.pub-help { margin: -.1rem 0 .3rem; }
.pub-q.invalid input, .pub-q.invalid select, .pub-q.invalid textarea { border-color: var(--bad); background: #fffafa; }
.pub-consent { background: var(--neutral-bg); border-radius: 10px; padding: .8rem .95rem; margin-bottom: .6rem; }
.pub-consent input { margin-top: .2rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pub-done { text-align: center; }
.pub-done .btn-row, .pub-done .notice { justify-content: center; text-align: left; }
.pub-check { width: 56px; height: 56px; margin: 0 auto .6rem; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 1.7rem; font-weight: 700; }
.code-box { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1.1rem 0; }
.code-box > div { border: 1px dashed var(--gold); border-radius: 12px; padding: .8rem; background: var(--gold-soft); }
.code-box span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.code-box b { font-family: var(--display); font-size: 1.35rem; letter-spacing: .08em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.bidbook-box { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.bidbook-box ol { padding-left: 1.2rem; margin: .4rem 0 .9rem; }
.bidbook-box ol li { margin-bottom: .3rem; }
.q-row { display: grid; grid-template-columns: minmax(0, 2fr) 130px minmax(0, 1.5fr) auto auto; gap: .5rem; align-items: start; padding: .7rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .5rem; background: #fff; }
.q-row .q-help { grid-column: 1 / 4; }
@media (max-width: 760px) { .q-row { grid-template-columns: 1fr 1fr; } .q-row .q-help { grid-column: 1 / -1; } .code-box { grid-template-columns: 1fr; } .pub-card { padding: 1.1rem; } }
