/* ==========================================================
   Webster College — main stylesheet (public site + portal)
   ========================================================== */
:root {
  --navy: #0d2b52;
  --navy-2: #14396b;
  --navy-3: #1e4f8f;
  --gold: #d4a017;
  --gold-2: #f2c94c;
  --ink: #1b2533;
  --muted: #5b6878;
  --line: #e3e8ef;
  --bg: #f5f7fb;
  --card: #ffffff;
  --green: #1e8e5a;
  --red: #c0392b;
  --amber: #b7791f;
  --blue: #2563eb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --font: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Merriweather", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; line-height: 1.6; font-size: 15px; }
img { max-width: 100%; }
a { color: var(--navy-3); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy); }
h1, h2 { font-family: var(--serif); }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; }
.hidden { display: none !important; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--navy-2);
  background: var(--navy-2); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none !important; line-height: 1.2; font-family: inherit; }
.btn:hover { background: var(--navy); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1a1300; }
.btn-gold:hover { background: #bf8f12; }
.btn-outline { background: transparent; color: var(--navy-2); }
.btn-outline:hover { background: #eef3fa; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #a93226; }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: #2b3a4d; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cdd5df; border-radius: 8px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(30, 79, 143, .15); }
textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-row { margin-bottom: 16px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 20px; }
legend { font-weight: 700; color: var(--navy); padding: 0 8px; }
.req { color: var(--red); }

/* ---------- Checkbox grid (subject pickers) ---------- */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.check-item { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; margin: 0; background: #fff; }
.check-item:has(input:checked) { border-color: var(--navy-3); background: #eef3fa; }
.check-item input { margin: 0; }
.count-over { color: var(--red); font-weight: 700; }

/* ---------- Dropdown menu (public nav) ---------- */
.main-nav li.has-sub { position: relative; }
.main-nav .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 60; flex-direction: column; }
.main-nav li.has-sub:hover > .sub, .main-nav li.has-sub:focus-within > .sub { display: flex; }
.main-nav .sub a { padding: 9px 12px; }
.main-nav .sub small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.service-band { background: linear-gradient(90deg, #fbf1d3, #fff7e0); border-bottom: 1px solid #f0dfa8; font-size: 14px; }
.service-band .container { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; padding-top: 9px; padding-bottom: 9px; text-align: center; }
.service-band b { color: var(--navy); }

/* ---------- Alerts & badges ---------- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; font-size: 14px; }
.alert-success { background: #e9f7ef; border-color: #b7e4c7; color: #146c43; }
.alert-error { background: #fdecea; border-color: #f5c2c0; color: #a12622; }
.alert-info { background: #e8f0fe; border-color: #c3d7fb; color: #1d4ed8; }
.alert-warning { background: #fff7e6; border-color: #f6d79b; color: #8a5a00; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-green { background: #e3f6ec; color: #146c43; }
.badge-red { background: #fde8e7; color: #a12622; }
.badge-amber { background: #fff3db; color: #8a5a00; }
.badge-blue { background: #e5edff; color: #1d4ed8; }
.badge-grey { background: #eef1f5; color: #4b5563; }
.badge-gold { background: #fbf1d3; color: #7a5a00; }

/* ==========================================================
   PUBLIC WEBSITE
   ========================================================== */
.topbar { background: var(--navy); color: #c9d6e8; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.topbar .tb-left span { margin-right: 18px; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none !important; }
.brand img { width: 58px; height: 58px; object-fit: contain; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--navy); line-height: 1.1; }
.brand-tag { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.main-nav a { display: block; white-space: nowrap; padding: 10px 14px; color: var(--ink); font-weight: 600; font-size: 14px; border-radius: 8px; text-decoration: none; }
.main-nav a:hover, .main-nav a.active { color: var(--navy-2); background: #eef3fa; }
.main-nav .btn { margin-left: 8px; color: #fff; }
.main-nav .btn:hover { background: var(--navy); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 4px 0; }

.hero { position: relative; color: #fff; background:
  radial-gradient(1200px 500px at 85% -10%, rgba(212, 160, 23, .28), transparent 60%),
  linear-gradient(135deg, #0a2246 0%, #14396b 55%, #1e4f8f 100%); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding-top: 80px; padding-bottom: 90px; }
.hero h1 { color: #fff; font-size: clamp(32px, 4.4vw, 52px); margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--gold-2); }
.hero p.lead { font-size: 18px; color: #d7e2f2; max-width: 600px; }
.hero .eyebrow { display: inline-block; background: rgba(212,160,23,.16); color: var(--gold-2); border: 1px solid rgba(212,160,23,.4); padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 18px; }
.hero .btn-group { margin-top: 26px; }
.hero-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 26px; backdrop-filter: blur(6px); }
.hero-card h3 { color: #fff; font-size: 17px; }
.hero-card ul { list-style: none; margin: 0; padding: 0; }
.hero-card li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed rgba(255,255,255,.18); font-size: 14px; }
.hero-card li:last-child { border-bottom: 0; }
.hero-card li b { color: var(--gold-2); }

.page-hero { background: linear-gradient(135deg, #0a2246, #1e4f8f); color: #fff; padding: 56px 0 46px; }
.page-hero h1 { color: #fff; margin-bottom: 6px; font-size: clamp(28px, 3.4vw, 40px); }
.page-hero p { color: #cfdcf0; margin: 0; }
.crumbs { font-size: 13px; color: #a9bddb; margin-bottom: 10px; }
.crumbs a { color: #fff; }

.section { padding: 72px 0; }
.section-alt { background: var(--bg); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head .kicker { color: var(--gold); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); margin-top: 6px; }

.stats-band { background: #fff; margin-top: -44px; position: relative; z-index: 2; border-radius: 16px; box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-band div { padding: 26px; text-align: center; border-right: 1px solid var(--line); }
.stats-band div:last-child { border-right: 0; }
.stats-band b { display: block; font-family: var(--serif); font-size: 32px; color: var(--navy); }
.stats-band span { color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid > * { min-width: 0; }            /* let wide tables scroll inside their card instead of stretching the page */
.items-start { align-items: start; }
.grid-main-side { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.grid-side-main { grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); align-items: start; }
.card, .table-wrap { min-width: 0; max-width: 100%; }

.feature { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: #eef3fa; color: var(--navy-2); margin-bottom: 16px; }
.feature .ico svg { width: 26px; height: 26px; }
.feature h3 { font-size: 18px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

.level-card { border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.level-card .lc-top { padding: 22px 24px; color: #fff; }
.level-card .lc-top h3 { color: #fff; margin: 0; font-size: 19px; }
.level-card .lc-top span { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }
.level-card .lc-body { padding: 20px 24px 24px; flex: 1; }
.level-card ul { padding-left: 18px; margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.lc-1 { background: linear-gradient(135deg, #c2410c, #f59e0b); }
.lc-2 { background: linear-gradient(135deg, #047857, #10b981); }
.lc-3 { background: linear-gradient(135deg, #1e4f8f, #3b82f6); }
.lc-4 { background: linear-gradient(135deg, #6d28d9, #a855f7); }
.lc-5 { background: linear-gradient(135deg, #0a2246, #14396b); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.art-panel { border-radius: 20px; min-height: 340px; background:
  linear-gradient(160deg, rgba(10,34,70,.0), rgba(10,34,70,.55)),
  radial-gradient(circle at 30% 30%, #f2c94c 0 60px, transparent 61px),
  linear-gradient(135deg, #1e4f8f, #0a2246); position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 26px; color: #fff; }
.art-panel blockquote { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.5; }
.art-panel cite { display: block; margin-top: 10px; font-size: 13px; color: var(--gold-2); font-style: normal; }
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: #e3f6ec; color: var(--green); font-weight: 800; font-size: 12px; display: grid; place-items: center; }

.news-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.news-card .nc-head { height: 8px; background: linear-gradient(90deg, var(--navy-2), var(--gold)); }
.news-card .nc-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.news-card h3 { font-size: 17px; margin-bottom: 8px; }
.news-card h3 a { color: var(--navy); }
.news-card p { color: var(--muted); font-size: 14px; flex: 1; }
.meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.date-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 62px; border-radius: 10px; background: var(--navy); color: #fff; flex-shrink: 0; }
.date-chip b { font-size: 22px; line-height: 1; font-family: var(--serif); }
.date-chip span { font-size: 11px; text-transform: uppercase; color: var(--gold-2); letter-spacing: .08em; }
.event-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.event-row:last-child { border-bottom: 0; }
.event-row h4 { margin: 0 0 4px; font-size: 16px; }

.cta { background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border-radius: 20px; padding: 46px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { color: #cfdcf0; margin: 0; }

.table-simple { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-simple th, .table-simple td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table-simple th { background: var(--bg); color: var(--navy); font-weight: 700; }

.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.step { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; position: relative; }
.step::before { counter-increment: step; content: counter(step); width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #1a1300; font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.step h4 { margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }

.prose { max-width: 760px; }
.prose p { font-size: 16px; }

.site-footer { background: #081b36; color: #a9b8cf; padding: 60px 0 0; font-size: 14px; }
.site-footer h4 { color: #fff; font-family: var(--font); font-size: 15px; margin-bottom: 14px; }
.site-footer a { color: #d5e0f0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 44px; padding: 18px 0; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Auth page ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, #0a2246, #1e4f8f); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h1 { color: #fff; font-size: 36px; }
.auth-side p { color: #cfdcf0; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 36px; box-shadow: var(--shadow); }
.demo-creds { font-size: 12.5px; background: var(--bg); border: 1px dashed #cdd5df; border-radius: 8px; padding: 10px 12px; margin-top: 18px; color: var(--muted); }
.demo-creds code { color: var(--navy); }

/* ==========================================================
   PORTAL
   ========================================================== */
body.portal { background: var(--bg); }
.portal-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #c7d4e8; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .sb-brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); text-decoration: none !important; }
.sidebar .sb-brand img { width: 42px; height: 42px; object-fit: contain; }
.sidebar .sb-brand b { color: #fff; font-family: var(--serif); font-size: 16px; display: block; line-height: 1.1; }
.sidebar .sb-brand small { color: var(--gold-2); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.sidebar nav { padding: 10px 10px 30px; flex: 1; }
.sidebar .sb-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #7f93b3; padding: 16px 10px 6px; font-weight: 700; }
.sidebar a.sb-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #d5e0f0; font-size: 14px; text-decoration: none; }
.sidebar a.sb-link svg { width: 18px; height: 18px; opacity: .8; flex-shrink: 0; }
.sidebar a.sb-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar a.sb-link.active { background: var(--gold); color: #1a1300; font-weight: 600; }
.sidebar a.sb-link.active svg { opacity: 1; }
.sidebar .sb-count { margin-left: auto; background: #c0392b; color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; }

.portal-main { min-width: 0; display: flex; flex-direction: column; }
.portal-top { background: #fff; border-bottom: 1px solid var(--line); height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 20; gap: 12px; }
.portal-top .pt-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.portal-top h1 { font-size: 19px; margin: 0; font-family: var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-pill { background: #fbf1d3; color: #7a5a00; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 96px; height: 96px; font-size: 30px; border-radius: 16px; }
.user-chip .uc-name { font-weight: 600; line-height: 1.2; }
.user-chip .uc-role { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.sb-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; cursor: pointer; }
.sb-toggle span { display: block; width: 18px; height: 2px; background: var(--navy); margin: 3px 0; }

.portal-content { padding: 26px; flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-family: var(--font); font-size: 17px; }
.page-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.kpi .k-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.kpi .k-ico svg { width: 22px; height: 22px; }
.kpi > div { min-width: 0; }
.kpi b { display: block; font-size: clamp(17px, 1.7vw, 21px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--navy); line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 13px; }
.k-blue { background: #e5edff; color: #1d4ed8; } .k-green { background: #e3f6ec; color: #146c43; }
.k-gold { background: #fbf1d3; color: #7a5a00; } .k-red { background: #fde8e7; color: #a12622; } .k-purple { background: #f1e8ff; color: #6d28d9; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.table td.wrap, .table th.wrap { white-space: normal; min-width: 180px; }
.table th { background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #52607a; font-weight: 700; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td a b, .table td > a:first-child { white-space: nowrap; }
.table input[type=number] { width: 90px; padding: 7px 8px; }
.table .tight { white-space: nowrap; width: 1%; }
.table tfoot td { font-weight: 700; background: #f8fafc; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filters > div { min-width: 160px; }
.filters label { font-size: 12px; }

.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pager a { padding: 6px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; }
.pager a.active { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }

.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a.active { color: var(--navy-2); border-color: var(--gold); }

.att-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.att-opts label { margin: 0; font-weight: 500; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.att-opts input { margin: 0; }

.progress { height: 8px; background: #edf1f6; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); }

.bar-list { display: grid; gap: 10px; }
.bar-list .bl-row { display: grid; grid-template-columns: 140px 1fr 50px; gap: 10px; align-items: center; font-size: 13px; }

.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- Report card (print friendly) ---------- */
.report-card { background: #fff; max-width: 900px; margin: 0 auto 30px; border: 2px solid var(--navy); padding: 26px 30px; font-size: 13.5px; page-break-after: always; }
.report-card:last-child { page-break-after: auto; }
.rc-head { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; gap: 12px; text-align: center; border-bottom: 3px double var(--navy); padding-bottom: 12px; margin-bottom: 14px; }
.rc-head img.logo { width: 76px; }
.rc-head h2 { margin: 0; font-size: 24px; letter-spacing: .04em; text-transform: uppercase; }
.rc-head .rc-motto { font-style: italic; color: var(--muted); font-size: 12.5px; }
.rc-head .rc-title { display: inline-block; margin-top: 6px; background: var(--navy); color: #fff; padding: 3px 14px; border-radius: 4px; font-weight: 700; letter-spacing: .1em; font-size: 12px; }
.rc-photo { width: 84px; height: 96px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 11px; overflow: hidden; }
.rc-photo img { width: 100%; height: 100%; object-fit: cover; }
.rc-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 18px; margin-bottom: 14px; }
.rc-info div span { color: var(--muted); }
.rc-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.rc-table th, .rc-table td { border: 1px solid #9aa8bb; padding: 6px 8px; text-align: center; }
.rc-table th { background: #e9eef6; font-size: 11.5px; text-transform: uppercase; }
.rc-table td:first-child, .rc-table th:first-child { text-align: left; }
.rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rc-box { border: 1px solid #9aa8bb; padding: 10px 12px; }
.rc-box h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.rc-sign { display: flex; justify-content: space-between; margin-top: 28px; gap: 20px; }
.rc-sign div { flex: 1; border-top: 1px solid #333; padding-top: 4px; text-align: center; font-size: 12px; }
.rc-key { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

@media print {
  .sidebar, .portal-top, .no-print, .site-header, .topbar, .site-footer { display: none !important; }
  .portal-shell { display: block; }
  .portal-content { padding: 0; }
  body.portal { background: #fff; }
  .report-card { border-width: 1.5px; margin: 0; max-width: none; }
  .card { border: 0; box-shadow: none; padding: 0; }
  a { color: inherit; }
}


/* ---------- Admission documents, letters & vouchers ---------- */
.doc-list { display: grid; gap: 10px; }
.doc-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none !important; }
.doc-item:hover { border-color: var(--navy-3); background: #f6f9fd; }
.doc-item small { display: block; color: var(--muted); font-size: 12.5px; }
.doc-ico { width: 44px; height: 50px; border-radius: 6px; background: #fde8e7; color: #a12622; font-weight: 800; font-size: 11px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid #f5c2c0; }
.doc-go { margin-left: auto; font-weight: 600; color: var(--navy-3); font-size: 13px; white-space: nowrap; }
.voucher-card { border: 2px dashed var(--gold); border-radius: 12px; background: #fffaf0; padding: 16px; }
.voucher-card .vc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #ead9a6; }
.voucher-card .vc-row b { font-family: ui-monospace, Consolas, monospace; font-size: 18px; letter-spacing: .08em; color: var(--navy); }
.voucher-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.voucher-sheet .voucher-card { page-break-inside: avoid; break-inside: avoid; }
.letter { background: #fff; max-width: 820px; margin: 0 auto 40px; padding: 44px 56px; box-shadow: var(--shadow); font-size: 15px; line-height: 1.7; }
.letter-head { display: flex; gap: 18px; align-items: center; border-bottom: 3px double var(--navy); padding-bottom: 14px; margin-bottom: 18px; }
.letter-head img { width: 92px; height: 92px; }
.letter-head h1 { font-size: 26px; margin: 2px 0; letter-spacing: .05em; }
.letter-head .small { line-height: 1.5; }
.letter-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; font-size: 14px; }
.letter-title { font-family: var(--font); font-size: 16px; text-decoration: underline; text-align: center; margin: 18px 0; }
.letter ol { padding-left: 22px; }
.letter-sign { margin-top: 10px; }
.sig-line { width: 220px; border-bottom: 1px solid #333; height: 40px; margin-bottom: 6px; }
@media print {
  body { background: #fff !important; }
  .letter { box-shadow: none; padding: 0; margin: 0; max-width: none; }
}
@media (max-width: 640px) { .letter { padding: 24px 18px; } .letter-head { flex-direction: column; text-align: center; } }

/* ---------- Attendance register grid ---------- */
.att-grid th, .att-grid td { padding: 6px 6px; font-size: 12px; }
.att-grid th.text-center, .att-grid td.text-center { text-align: center; }
.att-mark { display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 5px; font-weight: 700; font-size: 11px; }
.att-present { background: #e3f6ec; color: #146c43; }
.att-late { background: #fff3db; color: #8a5a00; }
.att-absent { background: #fde8e7; color: #a12622; }
.att-excused { background: #e5edff; color: #1d4ed8; }
.att-none { color: #b8c1cc; }
@media print { .att-mark { border: 1px solid #ccc; } .kpis { display: none; } }

/* ---------- Online payment box ---------- */
.pay-box { border: 1px solid #c3d7fb; background: #f3f7ff; border-radius: 12px; padding: 16px; }
.pay-box input[type=email] { max-width: 360px; }
.pay-box .btn { display: inline-flex; }

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
  .portal-content .grid-main-side, .portal-content .grid-side-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1200px) {
  .grid-main-side, .grid-side-main { grid-template-columns: minmax(0, 1fr); }
  .portal-content .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); display: none; box-shadow: 0 10px 20px rgba(0,0,0,.06); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 10px 20px 18px; }
  .main-nav .btn { margin: 8px 0 0; justify-content: center; }
  .main-nav .sub { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; min-width: 0; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 10px 20px 18px; }
  .main-nav .btn { margin: 8px 0 0; justify-content: center; }
  .hero .container, .split, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stats-band div:nth-child(2) { border-right: 0; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .portal-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -270px; width: 260px; z-index: 60; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sb-toggle { display: block; }
  .portal-content { padding: 16px; }
  .portal-top { padding: 0 16px; }
  .term-pill, .user-chip .uc-text { display: none; }
  .dl { grid-template-columns: 1fr; }
  .rc-info { grid-template-columns: 1fr 1fr; }
  .rc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-4, .footer-grid, .steps { grid-template-columns: 1fr; }
  .topbar .tb-left { display: none; }
  .cta { padding: 30px; }
}

/* ---------- Houses ---------- */
.house-badge { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.house-dot { display:inline-block; width:12px; height:12px; border-radius:50%; flex:0 0 12px; box-shadow:0 0 0 1px rgba(0,0,0,.15); -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.house-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; margin-bottom:18px; }
.house-card { background:#fff; border:1px solid #e3e8ef; border-top:5px solid var(--hc,#1e4f8f); border-radius:10px; padding:14px 16px; }
.house-card h4 { margin:0 0 4px; font-size:1.05rem; }
.house-card .hc-meta { font-size:.82rem; color:#64748b; margin-bottom:8px; }
.house-card .hc-nums { display:flex; gap:14px; font-size:.9rem; margin-bottom:10px; }
.house-card .hc-nums b { display:block; font-size:1.2rem; }
.house-card.inactive { opacity:.6; }
.standings td.rank { font-weight:700; width:40px; }

/* ---------- Export buttons & user menu ---------- */
.export-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.export-btns .btn svg { width: 15px; height: 15px; }
.uc-menu { position: relative; }
.uc-menu > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid transparent; user-select: none; }
.uc-menu > summary::-webkit-details-marker { display: none; }
.uc-menu > summary:hover, .uc-menu[open] > summary { background: #f1f5fb; border-color: var(--line, #e3e8ef); }
.uc-menu > summary:focus-visible { outline: 2px solid var(--gold, #d4a017); outline-offset: 2px; }
.uc-menu .uc-text { display: flex; flex-direction: column; }
.uc-caret { font-size: 11px; color: var(--muted); transition: transform .15s; }
.uc-menu[open] .uc-caret { transform: rotate(180deg); }
.uc-drop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; box-shadow: 0 14px 40px rgba(16, 42, 84, .16); padding: 6px; z-index: 200; }
.uc-drop .uc-head { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid #eef2f6; margin-bottom: 6px; }
.uc-drop .uc-head b { display: block; font-size: 14px; color: var(--navy); }
.uc-drop .uc-head small { color: var(--muted); font-size: 12px; }
.uc-drop a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text, #1f2937); font-size: 14px; text-decoration: none; }
.uc-drop a:hover, .uc-drop a:focus { background: #f1f5fb; color: var(--navy); }
.uc-drop a svg { width: 17px; height: 17px; flex-shrink: 0; }
.uc-drop a.uc-logout { border-top: 1px solid #eef2f6; margin-top: 6px; border-radius: 0 0 8px 8px; color: #c0392b; font-weight: 600; }
.uc-drop a.uc-logout:hover { background: #fdecea; color: #a93226; }
@media (max-width: 760px) { .uc-menu > summary .uc-text, .uc-caret { display: none; } .uc-drop { min-width: 230px; } }

/* ---------- Homepage slideshow ---------- */
.hero.has-slides { background: #0a2246; min-height: 560px; }
.hero.has-slides::after { display: none; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s ease-in-out; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); transition: transform 9s ease-out; }
.hero-slide.is-active img { transform: scale(1.12); }
.hero-slide figcaption { position: absolute; right: calc(36px + var(--ctrl-w, 0px)); bottom: 60px; z-index: 2; max-width: min(420px, 50%); background: rgba(10, 34, 70, .72); color: #fff; font-size: 13px; padding: 7px 12px; border-radius: 8px; border-left: 3px solid var(--gold); }
.hero-shade { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(8, 27, 56, .92) 0%, rgba(10, 34, 70, .78) 42%, rgba(10, 34, 70, .45) 75%, rgba(10, 34, 70, .35) 100%),
              linear-gradient(0deg, rgba(8, 27, 56, .65) 0%, transparent 35%); }
.hero.has-slides .container { z-index: 2; padding-bottom: 130px; }
.hero.has-slides .hero-card { background: rgba(10, 34, 70, .55); }
.hero-controls { position: absolute; right: 24px; bottom: 60px; z-index: 3; display: flex; align-items: center; gap: 8px; }
.hero-dots { display: flex; gap: 6px; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); background: transparent; padding: 0; cursor: pointer; transition: background .2s, transform .2s; }
.hero-dot.is-active { background: var(--gold-2); border-color: var(--gold-2); transform: scale(1.2); }
.hc-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(10, 34, 70, .55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.hc-btn.hc-pause { font-size: 10px; letter-spacing: -1px; }
.hc-btn:hover, .hero-dot:hover { border-color: var(--gold-2); }
.hc-btn:focus-visible, .hero-dot:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .hero-slide, .hero-slide img { transition: none; } .hero-slide.is-active img { transform: scale(1.04); } }
@media (max-width: 760px) {
  .hero.has-slides { min-height: 0; }
  .hero-shade { background: linear-gradient(180deg, rgba(8, 27, 56, .82) 0%, rgba(10, 34, 70, .78) 60%, rgba(8, 27, 56, .9) 100%); }
  .hero.has-slides .container { padding-bottom: 150px; }
  .hero-slide figcaption { left: 16px; right: auto; bottom: 104px; max-width: calc(100% - 32px); }
  .hero-controls { right: 50%; transform: translateX(50%); bottom: 58px; }
}

/* ---------- News pictures ---------- */
.news-card .nc-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e8eef6; }
.news-card .nc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.news-card:hover .nc-img img { transform: scale(1.04); }
.news-card-row { flex-direction: row; }
.news-card-row .nc-img { aspect-ratio: auto; width: 34%; min-width: 120px; flex-shrink: 0; }
.news-card-row .nc-head { display: none; }
.news-card-row:not(:has(.nc-img)) { border-top: 4px solid var(--gold); }
@media (max-width: 520px) { .news-card-row { flex-direction: column; } .news-card-row .nc-img { width: 100%; aspect-ratio: 16 / 9; } }
.article-figure { margin: 0 0 20px; }
.article-figure img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 12px; display: block; cursor: zoom-in; }
.article-figure figcaption, .notice-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; font-style: italic; }
.notice-figure { margin: 6px 0 14px; }
.notice-figure img { max-width: 100%; max-height: 380px; border-radius: 10px; display: block; cursor: zoom-in; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-grid a { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: #e8eef6; cursor: zoom-in; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.photo-grid a:hover img { transform: scale(1.05); }
.photo-grid a span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.photo-grid-sm { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.side-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.list-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; }
.list-thumb-empty { display: grid; place-items: center; background: #f1f5fb; color: #a0aec0; }
.list-thumb-empty svg { width: 18px; height: 18px; }

/* picture editing in the portal */
.img-edit { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.img-current { margin: 0; width: 180px; }
.img-current img { width: 180px; height: 120px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--line); }
.img-current figcaption { margin-top: 6px; }
.chk { display: inline-flex !important; gap: 6px; align-items: center; font-weight: 500 !important; }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ge-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.ge-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 6px; }
.ge-item input[type=text] { font-size: 13px; padding: 6px 8px; margin-bottom: 4px; }
.slide-list { display: grid; gap: 12px; }
.slide-row { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; }
.slide-row img { width: 200px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.slide-row.is-hidden img { opacity: .4; filter: grayscale(1); }
.slide-fields { flex: 1; min-width: 0; }
.slide-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.slide-actions .spacer { flex: 1; }
@media (max-width: 640px) { .slide-row { flex-direction: column; } .slide-row img { width: 100%; } }

/* ---------- Picture viewer ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(5, 12, 24, .92); display: flex; align-items: center; justify-content: center; padding: 50px 60px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #e6edf7; font-size: 14px; margin-top: 12px; text-align: center; max-width: 720px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lightbox button[hidden] { display: none; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }
@media (max-width: 640px) { .lightbox { padding: 56px 8px; } .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; } }

/* ---------- Logo & profile photo editing ---------- */
.logo-edit { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { width: 150px; height: 150px; border: 1px dashed var(--line); border-radius: 14px; display: grid; place-items: center; padding: 12px;
  background: repeating-conic-gradient(#f1f5fb 0% 25%, #fff 0% 50%) 50% / 18px 18px; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.photo-form .photo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.photo-form .photo-row input[type=file] { flex: 1; min-width: 180px; }
.avatar img { border-radius: 50%; }
.avatar-lg img { border-radius: 16px; }

/* ---- Transcripts: steps, linking, verification ---- */
.tabs-sub { margin-top: -8px; }
.tabs-sub a { padding: 7px 12px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row form { margin: 0; }
.tx-steps { list-style: none; counter-reset: tx; margin: 0; padding: 0; }
.tx-steps > li { counter-increment: tx; position: relative; padding: 2px 0 18px 44px; margin: 0; }
.tx-steps > li::before { content: counter(tx); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: #eef1f6; color: var(--muted); border: 2px solid var(--line); }
.tx-steps > li::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.tx-steps > li:last-child::after { display: none; }
.tx-steps > li.done::before { content: "✓"; background: #e5f5ec; color: #16794a; border-color: #8fd1ad; }
.tx-steps > li.done::after { background: #8fd1ad; }
.tx-find { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tx-find input { flex: 1 1 220px; min-width: 0; }
.tx-found { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; font-size: 13px; }
.tx-upload label { display: block; margin-bottom: 6px; }
.verify-card { border-top: 5px solid var(--line); }
.verify-ok { border-top-color: #16794a; }
.verify-bad { border-top-color: #c0392b; }
.verify-title { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 0 0 8px; }
.verify-title svg { width: 28px; height: 28px; flex: none; }
.verify-ok .verify-title { color: #16794a; }
.verify-bad .verify-title { color: #c0392b; }
.table-kv th { width: 40%; text-align: left; color: var(--muted); font-weight: 600; }
.tx-upload .photo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tx-upload .photo-row input[type=file] { flex: 1; min-width: 180px; }
.btn-group form { margin: 0; }

/* ---- Session timeout dialog ---- */
.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; }
.sx-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(9, 22, 44, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: sx-fade .2s ease-out; }
.sx-backdrop[hidden] { display: none; }
.sx-ended { background: rgba(9, 22, 44, .82); }
body.sx-open { overflow: hidden; }
.sx-dialog { width: 100%; max-width: 420px; background: var(--card); border-radius: 16px; box-shadow: 0 24px 60px rgba(9, 22, 44, .35); border-top: 5px solid var(--gold); padding: 30px 28px 24px; text-align: center; animation: sx-pop .25s cubic-bezier(.2, .9, .3, 1.2); }
.sx-ended .sx-dialog { border-top-color: var(--navy-3); }
.sx-dialog h2 { font-family: var(--font); font-size: 21px; font-weight: 800; color: var(--navy); margin: 14px 0 8px; }
.sx-dialog p { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }
.sx-dialog p b { color: var(--ink); }
.sx-ring { position: relative; width: 112px; height: 112px; margin: 0 auto; }
.sx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sx-ring circle { fill: none; stroke-width: 8; }
.sx-track { stroke: #eef1f6; }
.sx-bar { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.sx-urgent .sx-bar { stroke: var(--red); }
.sx-clock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.sx-urgent .sx-clock { color: var(--red); animation: sx-pulse 1s ease-in-out infinite; }
.sx-lock { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: #eaf0f8; color: var(--navy-3); }
.sx-lock svg { width: 36px; height: 36px; }
.sx-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sx-actions .btn { min-width: 150px; justify-content: center; }
.sx-hint { font-size: 12.5px !important; margin: 16px 0 0 !important; }
@keyframes sx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sx-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sx-pulse { 50% { opacity: .55; } }
@media (max-width: 480px) { .sx-dialog { padding: 24px 18px 18px; } .sx-actions .btn { flex: 1 1 100%; } }
@media (prefers-reduced-motion: reduce) { .sx-backdrop, .sx-dialog, .sx-urgent .sx-clock { animation: none; } .sx-bar { transition: none; } }
@media print { .sx-backdrop { display: none !important; } }

/* ---- Danger zone / erase all data ---- */
.danger-zone { border: 1px solid #f1c4bf; }
.danger-zone h3 { color: var(--red); }
.dz-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.dz-row > div { flex: 1 1 320px; }
.erase-card { max-width: 760px; border-top: 5px solid var(--red); }
.erase-card h2 { font-family: var(--font); font-size: 21px; font-weight: 800; color: var(--navy); margin: 0 0 10px; }
.erase-done { border-top-color: var(--green); }
.erase-lock { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fdecea; color: var(--red); margin-bottom: 10px; }
.erase-lock svg { width: 28px; height: 28px; }
.erase-form { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.erase-form .form-row input { max-width: 360px; }
.erase-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin: 6px 0 14px; }
