:root {
  --navy: #0a2a5e;
  --navy-deep: #072045;
  --navy-700: #0b2a5b;
  --pink: #e91e63;
  --pink-dark: #cc1454;
  --blue-soft: #d5e4f7;
  --pink-soft: #f8cddd;
  --ink: #0b2a5b;
  --muted: #5b6b82;
  --line: #e6ebf2;
  --bg: #f6f8fc;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(11, 42, 91, 0.08);
  --shadow-lg: 0 20px 50px rgba(11, 42, 91, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body, #root { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; color: var(--navy-700); line-height: 1.12; font-weight: 800; }

p { margin: 0; }

button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.text-pink { color: var(--pink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 12px; border: 2px solid transparent;
  padding: 14px 26px; font-weight: 700; font-size: 16px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-pink { background: var(--pink); color: #fff; box-shadow: 0 10px 24px rgba(233,30,99,.28); }
.btn-pink:hover { background: var(--pink-dark); }
.btn-outline { background: #fff; color: var(--navy-700); border-color: #cdd8e8; }
.btn-outline:hover { border-color: var(--navy); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.section-title { text-align: center; font-size: 30px; position: relative; margin-bottom: 40px; }
.section-title::after {
  content: ""; display: block; width: 54px; height: 4px; border-radius: 3px;
  background: var(--pink); margin: 12px auto 0;
}

/* ---------- Navbar ---------- */
.nav {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; position: sticky; top: 0; z-index: 50;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 52px; height: 52px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; overflow: hidden; flex: none;
}
.brand-logo img { width: 44px; height: 44px; object-fit: contain; }
.brand-text .l1 { color: var(--pink); font-weight: 800; font-size: 15px; line-height: 1.1; }
.brand-text .l2 { color: #7fb0e8; font-weight: 700; font-size: 10px; letter-spacing: 2px; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: #dbe6f5; font-weight: 600; font-size: 15px; padding: 6px 0; position: relative; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 3px; border-radius: 3px; background: var(--pink);
}
.nav-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-cta {
  display: inline-flex; align-items: center; background: var(--pink); color: #fff !important;
  font-weight: 700; font-size: 15px; padding: 10px 22px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(233,30,99,.35); transition: background .12s ease, transform .12s ease;
}
.nav-cta:hover { background: #d81b60; transform: translateY(-1px); }
.nav-cta.active::after { content: none; }

/* ---------- Footer ---------- */
.footer { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%); color: #cdd9ec; margin-top: 70px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 30px; padding: 46px 0; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer .brand-text .l1 { font-size: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .contact-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.socials { display: flex; gap: 12px; flex-wrap: wrap; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.socials a:hover { background: var(--pink); }
.footer-bar { background: var(--pink); text-align: center; padding: 14px; color: #fff; font-weight: 600; font-size: 14px; display:flex; gap:8px; align-items:center; justify-content:center; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 54px; letter-spacing: -1px; }
.hero .lead { color: var(--muted); font-size: 18px; margin: 20px 0 30px; max-width: 460px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-img { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* Info strip */
.info-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.info-card .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.info-card .k { font-size: 13px; color: var(--muted); }
.info-card .v { font-size: 18px; font-weight: 800; color: var(--navy-700); }

/* ---------- Subjects ---------- */
.section { padding: 56px 0; }
.subjects-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.subject-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.subject-card .top { display: flex; align-items: flex-start; gap: 14px; }
.subject-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.subject-ic.blue { background: var(--blue-soft); color: var(--navy); }
.subject-ic.pink { background: var(--pink-soft); color: var(--pink); }
.subject-card h3 { font-size: 18px; margin-bottom: 6px; }
.subject-card p { color: var(--muted); font-size: 14px; }
.subject-card .arrow { color: var(--pink); margin-top: 16px; font-size: 20px; }

/* ---------- Why / How ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.why-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; text-align: center; box-shadow: var(--shadow); }
.why-card .ic { color: var(--navy); margin-bottom: 12px; display: grid; place-items: center; }
.why-card .ic .pink { color: var(--pink); }
.why-card h4 { font-size: 15px; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: 13px; }

.steps { display: grid; gap: 26px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step .num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.step:nth-child(odd) .num { background: var(--navy); }
.step:nth-child(even) .num { background: var(--pink); }
.step h4 { font-size: 16px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- Register page ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; padding: 56px 0; }
.split h1 { font-size: 44px; }
.split .lead { color: var(--muted); margin: 18px 0; font-size: 17px; }
.facts { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 22px; overflow: hidden; }
.fact { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: none; }
.fact .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.fact .k { font-size: 13px; color: var(--muted); }
.fact .v { font-weight: 800; color: var(--navy-700); }

.form-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 36px; }
.form-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.form-head .av { width: 52px; height: 52px; border-radius: 50%; background: var(--pink-soft); color: var(--pink); display: grid; place-items: center; }
.form-head h3 { font-size: 22px; }
.form-head p { color: var(--muted); font-size: 14px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; color: var(--navy-700); }
.input-wrap { position: relative; }
.input-wrap .ic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #9fb0c8; }
.input-toggle { background: none; border: none; padding: 4px; display: grid; place-items: center; cursor: pointer; }
.input-toggle:hover { color: var(--pink); }
.input-wrap input {
  width: 100%; padding: 14px 44px 14px 16px; border: 1px solid #d8e0ec; border-radius: 12px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fbfcfe; transition: border .12s ease, box-shadow .12s ease;
}
.input-wrap input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(233,30,99,.12); background: #fff; }
.field select {
  width: 100%; padding: 14px 16px; border: 1px solid #d8e0ec; border-radius: 12px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fbfcfe; cursor: pointer;
}
.field select:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(233,30,99,.12); background: #fff; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 22px; font-size: 14px; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--pink); flex: none; }
.form-foot { text-align: center; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.form-foot a { color: #2f6fd6; font-weight: 700; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #fdeaef; color: #b31347; border: 1px solid #f6c6d6; }
.alert-ok { background: #e9f7ef; color: #1a7a45; border: 1px solid #bfe6cd; }

/* ---------- Downloads / success ---------- */
.center-wrap { max-width: 960px; margin: 46px auto; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); padding: 46px; text-align: center; }
.tick { width: 84px; height: 84px; border-radius: 50%; background: #e4f6ea; color: #1a7a45; display: grid; place-items: center; margin: 0 auto 20px; }
.center-wrap h1 { font-size: 46px; }
.center-wrap .sub { color: var(--muted); margin-top: 10px; }
.reg-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: #eef3fb; border-radius: 14px; padding: 22px; margin: 30px 0; text-align: left; }
.reg-summary .cell { display: flex; gap: 12px; align-items: center; }
.reg-summary .ic { color: var(--navy); }
.reg-summary .k { font-size: 12px; color: var(--muted); }
.reg-summary .v { font-weight: 800; color: var(--navy-700); }
.dl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dl-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.dl-card .subject-ic { margin: 0 auto 12px; }
.dl-card h4 { margin-bottom: 14px; font-size: 15px; }
.dl-btn { width: 100%; justify-content: center; border: 1px solid #e0c2ce; color: var(--pink); background: #fff; border-radius: 10px; padding: 10px; font-weight: 700; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
.dl-btn:hover { background: #fff2f6; }
.dl-all { display: flex; align-items: center; gap: 18px; border: 1px solid #f4c9d9; background: #fff; border-radius: 16px; padding: 22px; margin-top: 18px; text-align: left; }
.dl-all .ic { width: 56px; height: 56px; border-radius: 14px; background: var(--pink); color: #fff; display: grid; place-items: center; flex: none; }
.dl-all h3 { color: var(--pink); font-size: 20px; }
.dl-all p { color: var(--muted); font-size: 14px; }
.dl-all .go { margin-left: auto; color: var(--pink); font-size: 26px; }

/* ---------- Simple content pages ---------- */
.page { padding: 50px 0; }
.page h1 { font-size: 40px; margin-bottom: 8px; }
.page .lead { color: var(--muted); font-size: 18px; margin-bottom: 30px; max-width: 720px; }
.prose p { color: #384a63; margin-bottom: 16px; max-width: 760px; }
.card-plain { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: var(--shadow); }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 460px; margin: 60px auto; }
.admin-shell { max-width: 1100px; margin: 30px auto; padding: 0 24px; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.tab { padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--muted); }
.tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 12px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.table th { background: #f2f6fc; color: var(--navy-700); font-weight: 700; }
.table tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.pill.yes { background: #e4f6ea; color: #1a7a45; }
.link-btn { background: none; border: none; color: var(--pink); font-weight: 700; }
.upload-row { display: grid; grid-template-columns: 1.5fr 1fr 2fr auto; gap: 12px; align-items: end; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.upload-row label { font-size: 13px; font-weight: 700; margin-bottom: 6px; display: block; }
.upload-row select, .upload-row input { width: 100%; padding: 10px; border: 1px solid #d8e0ec; border-radius: 8px; font-family: inherit; }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { text-align: center; padding: 60px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .two-col, .split { grid-template-columns: 1fr; }
  .hero-img { order: -1; }
  .info-strip, .subjects-grid, .dl-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .reg-summary { grid-template-columns: 1fr; }
  .upload-row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 84px; left: 0; right: 0; flex-direction: column; background: var(--navy-deep); padding: 18px 24px; gap: 16px; }
  .nav-toggle { display: block; }
  .nav-actions { gap: 10px; }
  .nav-cta { padding: 8px 16px; font-size: 14px; }
  .brand-text .l1 { font-size: 13px; }
  .hero h1 { font-size: 38px; }
  .info-strip, .subjects-grid, .why-grid, .dl-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .center-wrap, .form-card { padding: 24px; }
  .center-wrap h1 { font-size: 34px; }
}

/* ============================================================
   Dashboard shell (admin + student portal) — collapsible sidebar
   ============================================================ */
.dash-shell { display: flex; min-height: 100vh; background: var(--bg); }

.dash-sidebar {
  width: 260px; flex: none; background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #dbe6f5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  transition: width .18s ease;
}
.dash-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.dash-brand-link { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.dash-brand-logo { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; }
.dash-brand-logo img { width: 34px; height: 34px; object-fit: contain; }
.dash-brand-name { font-weight: 800; font-size: 14px; line-height: 1.25; color: #fff; white-space: nowrap; }
.dash-brand-sub { font-size: 11px; color: #8fb3e0; white-space: nowrap; }
.dash-close { display: none; background: none; border: none; color: #fff; }

.dash-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; overflow-x: hidden; }
.dash-nav-item {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: none; border: none; color: #cddaf0; padding: 12px 14px; border-radius: 10px;
  font-weight: 600; font-size: 14px; transition: background .12s ease, color .12s ease;
  white-space: nowrap;
}
.dash-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.dash-nav-item.active { background: var(--pink); color: #fff; }
.dash-nav-item svg { flex: none; }

.dash-sidebar-foot { padding: 14px 12px 18px; border-top: 1px solid rgba(255,255,255,.12); }
.dash-user { padding: 8px 14px; font-size: 12px; color: #9db3d6; word-break: break-word; }
.dash-nav-item.logout { color: #f5b8cd; }
.dash-nav-item.logout:hover { background: rgba(233,30,99,.15); color: #fff; }

.dash-backdrop { display: none; }

.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-topbar { display: flex; align-items: center; gap: 14px; background: #fff; border-bottom: 1px solid var(--line); padding: 14px 18px; position: sticky; top: 0; z-index: 20; }
.dash-hamburger { background: none; border: none; color: var(--navy-700); }
.dash-topbar-title { font-weight: 800; color: var(--navy-700); }
.dash-content { flex: 1; padding: 28px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* Desktop collapse (icon-only rail) */
@media (min-width: 881px) {
  .dash-sidebar.collapsed { width: 78px; }
  .dash-sidebar.collapsed .dash-brand { justify-content: center; padding: 20px 10px; }
  .dash-sidebar.collapsed .dash-brand-text { display: none; }
  .dash-sidebar.collapsed .dash-nav-item { justify-content: center; padding: 12px; }
  .dash-sidebar.collapsed .dash-label { display: none; }
  .dash-sidebar.collapsed .dash-user { display: none; }
}

@media (max-width: 880px) {
  .dash-sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--shadow-lg); width: 260px !important;
  }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-close { display: block; }
  .dash-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(7,32,69,.45); z-index: 55; }
  .dash-content { padding: 18px; }
}

/* ============================================================
   DataTable
   ============================================================ */
.dtable-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.dtable-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dtable-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #d8e0ec; border-radius: 10px; padding: 9px 14px; color: #9fb0c8; min-width: 220px; }
.dtable-search input { border: none; outline: none; font-family: inherit; font-size: 14px; color: var(--ink); width: 100%; background: transparent; }
.dtable-filter-select {
  border: 1px solid #d8e0ec; border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 14px;
  color: var(--ink); background: #fff; min-width: 150px; cursor: pointer;
}
.dtable-export { position: relative; }
.dtable-export-btn { padding: 10px 16px; font-size: 14px; font-weight: 700; }
.dtable-export-menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 160px; z-index: 30; overflow: hidden;
}
.dtable-export-menu button { display: block; width: 100%; text-align: left; padding: 10px 16px; background: none; border: none; font-size: 14px; font-weight: 600; color: var(--navy-700); }
.dtable-export-menu button:hover { background: #f2f6fc; }

.dtable-scroll { overflow-x: auto; border-radius: 12px; box-shadow: var(--shadow); }
.dtable-table { min-width: 560px; }
.dtable-table th.sortable { cursor: pointer; user-select: none; }
.dtable-table th.sortable:hover { color: var(--pink); }
.dtable-empty { text-align: center; color: var(--muted); padding: 28px !important; }

.dtable-pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; flex-wrap: wrap; gap: 10px; }
.dtable-count { font-size: 13px; color: var(--muted); }
.dtable-pages { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--navy-700); }
.dtable-pages button { background: #fff; border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--navy-700); }
.dtable-pages button:disabled { opacity: .4; cursor: not-allowed; }
.dtable-pages button:not(:disabled):hover { border-color: var(--pink); color: var(--pink); }

/* ============================================================
   CRUD forms, modals, portal cards
   ============================================================ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(7,32,69,.5); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 28px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-size: 20px; }
.modal-close { background: none; border: none; color: var(--muted); }

.icon-btn { background: none; border: none; color: var(--muted); padding: 6px; border-radius: 8px; display: inline-flex; }
.icon-btn:hover { background: #f2f6fc; color: var(--pink); }
.icon-btn.danger:hover { color: #cc1454; background: #fdeaef; }

.textarea { width: 100%; padding: 12px 14px; border: 1px solid #d8e0ec; border-radius: 10px; font-family: inherit; font-size: 14px; resize: vertical; min-height: 80px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.stat-card .k { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat-card .v { font-size: 26px; font-weight: 800; color: var(--navy-700); }

.portal-subject { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 18px; overflow: hidden; box-shadow: var(--shadow); }
.portal-subject-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.portal-subject-head h3 { font-size: 17px; }
.portal-subject-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.portal-subject-actions { margin-left: auto; display: flex; gap: 10px; }
.portal-papers { border-top: 1px solid var(--line); }
.portal-paper { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.portal-paper:last-child { border-bottom: none; }
.portal-paper-year { font-weight: 800; color: var(--navy-700); width: 56px; flex: none; }
.portal-paper-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }

.otp-boxes { display: flex; gap: 10px; justify-content: center; margin: 6px 0 20px; }
.otp-boxes input {
  width: 44px; height: 52px; text-align: center; font-size: 20px; font-weight: 800;
  border: 1px solid #d8e0ec; border-radius: 10px; font-family: inherit;
}
.otp-boxes input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(233,30,99,.12); }

@media (max-width: 620px) {
  .dtable-table { min-width: 480px; }
  .modal-card { padding: 20px; }
  .portal-paper { flex-wrap: wrap; }
  .portal-paper-year { width: auto; }
  .portal-subject-head { flex-wrap: wrap; }
  .portal-subject-actions { width: 100%; margin-left: 0; }
  .portal-subject-actions .btn { width: 100%; justify-content: center; }
}
