/* ============================================================
   main.css — Continuity Program
   ============================================================ */

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

:root {
  --blue:      #0722AB;
  --blue-dark: #051a85;
  --blue-mid:  #0f2fd4;
  --red:       #ED5353;
  --red-dark:  #d43c3c;
  --white:     #ffffff;
  --off-white: #f5f6fc;
  --gray-100:  #eef0f8;
  --gray-200:  #d8dbed;
  --gray-400:  #8e94b8;
  --gray-600:  #4a5080;
  --gray-800:  #1c2045;
  --green:     #22c55e;
  --orange:    #f97316;
  --error-red: #c0392b;
  --font-head: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-body: 'Montserrat', 'Segoe UI', sans-serif;
  --grad:      linear-gradient(90deg, #0722AB 0%, #ED5353 100%);
  --grad-r:    linear-gradient(90deg, #ED5353 0%, #0722AB 100%);
  --grad-d:    linear-gradient(135deg, #0722AB 0%, #ED5353 100%);
  --radius:    6px;
  --shadow:    0 2px 12px rgba(7,34,171,.08);
  --shadow-md: 0 4px 28px rgba(7,34,171,.14);
  --transition: 200ms ease;
  --max-w:     1180px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--off-white); color: var(--gray-800); line-height: 1.5; font-size: 15px; font-weight: 400; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }
h1,h2,h3,h4,h5 { font-family: var(--font-head); line-height: 1.2; color: var(--gray-800); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin-bottom: .65rem; line-height: 1.55; }
ul { list-style: none; }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.site-main { min-height: 70vh; }

/* ── Header / Nav ──────────────────────────────────────── */
.site-header { background: var(--blue); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(7,34,171,.3); }
.header-inner { display: flex; align-items: center; height: 62px; gap: 1.5rem; }

/* Brand / logo */
.brand { display: flex; align-items: center; gap: .6rem; color: var(--white); text-decoration: none; }
.brand-logo { width: 50px; display: block; }
.brand img { width: 50px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-word { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; color: var(--white); }
.brand-sub  { font-family: var(--font-body); font-size: .54rem; text-transform: uppercase; letter-spacing: .18em; color: rgba(255,255,255,.5); }

.main-nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.nav-list { display: flex; gap: .15rem; align-items: center; }
.nav-item { position: relative; }

/* ── FIX: pseudo-element bridge closes gap between trigger and dropdown ── */
.has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px; /* matches the gap + a little extra */
  background: transparent;
}
.has-dropdown:hover::after { display: block; }

.nav-link {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.82);
  font-family: var(--font-body); font-size: .78rem; font-weight: 500;
  padding: .4rem .62rem; border-radius: var(--radius);
  display: flex; align-items: center; gap: .3rem;
  transition: var(--transition); letter-spacing: .01em;
}
.nav-link:hover, .nav-item.active .nav-link { color: var(--white); background: rgba(255,255,255,.12); }
.nav-link svg { transition: transform var(--transition); }
.has-dropdown:hover .nav-link svg { transform: rotate(180deg); }

/* dropdown: moved up by 4px so the bridge pseudo covers the gap cleanly */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 192px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition);
  border-top: 3px solid var(--red);
  z-index: 200;
}
/* Keep open while hovering nav-item OR the dropdown itself */
.has-dropdown:hover .dropdown,
.dropdown:hover { opacity: 1; pointer-events: auto; transform: translateY(0); }

.dropdown li a {
  display: block; padding: .55rem 1rem;
  font-family: var(--font-body); font-size: .78rem; font-weight: 500;
  color: var(--gray-800); transition: var(--transition);
}
.dropdown li a:hover { background: var(--gray-100); color: var(--blue); }
.nav-auth { display: flex; gap: .4rem; }

/* Mobile toggle */
.mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .5rem; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .5rem 1.15rem; border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: .78rem;
  cursor: pointer; border: 2px solid transparent;
  transition: var(--transition); white-space: nowrap; letter-spacing: .02em;
}
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-mid); border-color: var(--blue-mid); color: var(--white); }
.btn-red { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.btn-gold { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-gold:hover { background: var(--red-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.42); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.1); color: var(--white); }
.btn-ghost { background: transparent; color: rgba(255,255,255,.62); border-color: transparent; }
.btn-ghost:hover { color: var(--white); }
.btn-sm { padding: .28rem .78rem; font-size: .72rem; }
.btn-lg { padding: .68rem 1.65rem; font-size: .86rem; }
.btn-danger { background: var(--error-red); color: var(--white); border-color: var(--error-red); }
.btn-danger:hover { background: #a93226; }
.btn-secondary { background: var(--gray-100); color: var(--gray-800); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }

/* ── Alerts ───────────────────────────────────────────────── */
.alert { padding: .75rem 1.05rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .82rem; border-left: 4px solid; line-height: 1.45; }
.alert-success { background: #ecfdf5; border-color: var(--green);    color: #14532d; }
.alert-error   { background: #fef2f2; border-color: var(--error-red);color: #7f1d1d; }
.alert-warning { background: #fff7ed; border-color: var(--orange);   color: #7c2d12; }
.alert-info    { background: #eff6ff; border-color: var(--blue);     color: #1e3a8a; }

/* ── Cards ──────────────────────────────────────────────── */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-body { padding: 1.4rem; }
.card-title { font-family: var(--font-head); font-size: .98rem; font-weight: 700; margin-bottom: .45rem; color: var(--gray-800); }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .7rem; font-weight: 700; margin-bottom: .3rem; color: var(--gray-600); text-transform: uppercase; letter-spacing: .07em; font-family: var(--font-head); }
.form-control { width: 100%; padding: .58rem .85rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-family: var(--font-body); font-size: .85rem; background: var(--white); transition: var(--transition); color: var(--gray-800); line-height: 1.4; }
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7,34,171,.1); }
textarea.form-control { min-height: 108px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: .72rem; color: var(--gray-400); margin-top: .18rem; line-height: 1.4; }
.required::after { content: ' *'; color: var(--red); }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { background: var(--blue); color: var(--white); padding: .65rem .95rem; text-align: left; font-family: var(--font-head); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
tbody td { padding: .65rem .95rem; border-bottom: 1px solid var(--gray-200); font-size: .82rem; vertical-align: middle; line-height: 1.4; }
tbody tr:hover { background: var(--gray-100); }
tbody tr:last-child td { border-bottom: none; }

/* ── Status Badges ──────────────────────────────────────── */
.badge { display: inline-block; padding: .17rem .55rem; border-radius: 20px; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-family: var(--font-head); }
.badge-published  { background: #dcfce7; color: #15803d; }
.badge-approved   { background: #dcfce7; color: #15803d; }
.badge-submitted  { background: #dbeafe; color: #1d4ed8; }
.badge-review     { background: #fef9c3; color: #a16207; }
.badge-rejected   { background: #fee2e2; color: #b91c1c; }
.badge-withdrawn  { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }
.badge-draft      { background: var(--gray-200); color: var(--gray-600); }
.badge-open       { background: #dbeafe; color: #1d4ed8; }
.badge-royalty    { background: #fce7f3; color: #9d174d; }
.badge-active     { background: #dcfce7; color: #15803d; }
.badge-suspended  { background: #fee2e2; color: #b91c1c; }
.badge-under_review       { background: #fef9c3; color: #a16207; }
.badge-revision_required  { background: #ffedd5; color: #c2410c; }
.badge-embargoed  { background: #f3e8ff; color: #7c3aed; }
.badge-hidden     { background: var(--gray-200); color: var(--gray-600); }

/* ── Page Hero ───────────────────────────────────────────── */
.page-hero { background: var(--grad-d); color: var(--white); padding: 3.25rem 0 2.6rem; }
.page-hero h1 { color: var(--white); }
.page-hero p  { color: rgba(255,255,255,.82); font-size: .95rem; max-width: 580px; line-height: 1.5; }

/* ── Homepage Hero ───────────────────────────────────────── */
.hero-section {
  position: relative;
  background: #0722AB;
  color: var(--white);
  padding: 5rem 0 4rem;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
}
/* Background image layer */
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../assets/continuity-hero-image.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
/* Gradient overlay on top of image */
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    90deg,
    rgba(7,34,171,.92) 0%,
    rgba(7,34,171,.80) 45%,
    rgba(237,83,83,.65) 100%
  );
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-content { max-width: 590px; }
.hero-section h1 { color: var(--white); margin-bottom: 1rem; line-height: 1.15; }
.hero-section p { color: rgba(255,255,255,.88); font-size: .97rem; margin-bottom: 1.65rem; line-height: 1.55; }
.hero-badges { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.65rem; }
.hero-badge { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: .28rem .82rem; border-radius: 20px; font-size: .71rem; font-family: var(--font-body); font-weight: 600; letter-spacing: .02em; }
.hero-actions { display: flex; gap: .85rem; flex-wrap: wrap; }

/* ── Section / grid helpers ──────────────────────────────── */
.section { padding: 3.25rem 0; }
.section-title { margin-bottom: .38rem; }
.section-sub { color: var(--gray-600); margin-bottom: 2rem; font-size: .9rem; line-height: 1.5; }

/* ── SVG icon (replaces emoji) ───────────────────────────── */
.icon-wrap { width: 24px; height: 24px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: .75rem; flex-shrink: 0; }
.icon-wrap svg { width: 24px; height: 24px; }
.icon-blue  { background: rgba(7,34,171,.1);  color: var(--blue); }
.icon-red   { background: rgba(237,83,83,.1); color: var(--red); }
.icon-green { background: rgba(34,197,94,.1); color: #16a34a; }
.icon-gray  { background: var(--gray-100);    color: var(--gray-600); }

/* ── Feature / step cards ────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 1.15rem; }
.feature-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border-top: 3px solid var(--blue); }
.feature-card:nth-child(even) { border-top-color: var(--red); }
.feature-card h3 { font-size: .95rem; margin-bottom: .38rem; }
.feature-card p  { font-size: .82rem; color: var(--gray-600); margin: 0; line-height: 1.5; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 1.15rem; counter-reset: step; }
.step-card { position: relative; background: var(--white); padding: 1.3rem; border-radius: var(--radius); box-shadow: var(--shadow); counter-increment: step; }
.step-card::before { content: counter(step); position: absolute; top: .85rem; right: .95rem; font-family: var(--font-head); font-size: 2rem; color: var(--gray-200); font-weight: 700; line-height: 1; }
.step-card h3 { font-size: .9rem; margin-bottom: .35rem; }
.step-card p  { font-size: .8rem; color: var(--gray-600); margin: 0; line-height: 1.5; }

/* ── Recent submission activity cards ────────────────────── */
.recent-submissions { display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); gap: 1.15rem; }
.submission-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem; border-left: 4px solid var(--red); }
.submission-card .tag { display: inline-block; font-size: .68rem; background: var(--gray-100); color: var(--gray-600); padding: .15rem .52rem; border-radius: 3px; margin-bottom: .6rem; text-transform: capitalize; font-family: var(--font-head); font-weight: 600; }
.submission-card h3 { font-size: .9rem; margin-bottom: .42rem; line-height: 1.35; }
.submission-card .meta { font-size: .73rem; color: var(--gray-400); }

/* ── CTA section ─────────────────────────────────────────── */
.cta-section { background: var(--blue); background: linear-gradient(90deg,rgba(7,34,171,1) 0%,rgba(237,83,83,1) 100%); color: var(--white); padding: 3.25rem 0; text-align: center; }
.cta-section h2 { color: var(--white); margin-bottom: .85rem; }
.cta-section p  { color: rgba(255,255,255,.85); margin-bottom: 1.65rem; font-size: .92rem; }

/* ── Manuscripts grid ────────────────────────────────────── */
.manuscripts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1.15rem; }
.manuscript-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform var(--transition), box-shadow var(--transition); }
.manuscript-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.manuscript-card.is-withdrawn { opacity: .72; }
.manuscript-card .card-cover { height: 125px; background: linear-gradient(135deg,#0722AB 0%,#ED5353 100%); display: flex; align-items: center; justify-content: center; }
.manuscript-card .card-cover img { width: 100%; height: 100%; object-fit: cover; }
.manuscript-card .card-body { flex: 1; padding: 1.1rem; }
.manuscript-card .card-footer { padding: .6rem 1.1rem; border-top: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; font-size: .73rem; color: var(--gray-400); }

/* ── Dashboard Shell ─────────────────────────────────────── */
.dashboard { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 62px); }
.sidebar { background: #0722AB; background: linear-gradient(180deg,#0722AB 0%,#051a85 100%); color: var(--white); padding: 0; position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; }
.sidebar-brand { padding: 1.25rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,.1); font-family: var(--font-head); font-size: .85rem; font-weight: 700; color: rgba(255,255,255,.9); letter-spacing: -.01em; }
.sidebar-user { padding: .85rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .73rem; color: rgba(255,255,255,.52); line-height: 1.4; }
.sidebar-user strong { color: var(--white); display: block; font-size: .82rem; margin-bottom: .08rem; font-family: var(--font-head); }
.sidebar-menu { padding: .55rem 0; }
.sidebar-menu a, .sidebar-menu button { display: flex; align-items: center; gap: .65rem; padding: .58rem 1.15rem; color: rgba(255,255,255,.7); font-family: var(--font-body); font-size: .78rem; font-weight: 500; background: none; border: none; width: 100%; text-align: left; cursor: pointer; transition: var(--transition); border-left: 3px solid transparent; line-height: 1.3; }
.sidebar-menu a:hover, .sidebar-menu a.active { background: rgba(255,255,255,.1); color: var(--white); border-left-color: var(--red); }
.sidebar-section { padding: .52rem 1.15rem .18rem; font-size: .6rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.3); font-family: var(--font-head); }
.dash-content { padding: 1.65rem 1.9rem; background: var(--off-white); }
.dash-header { margin-bottom: 1.6rem; }
.dash-header h1 { font-size: 1.45rem; margin-bottom: .18rem; }
.dash-header p { color: var(--gray-600); font-size: .84rem; line-height: 1.45; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: .85rem; margin-bottom: 1.6rem; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 1.1rem 1.3rem; box-shadow: var(--shadow); border-top: 3px solid var(--blue); }
.stat-card .stat-val { font-family: var(--font-head); font-size: 1.7rem; color: var(--gray-800); font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { font-size: .67rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .07em; font-family: var(--font-head); margin-top: .18rem; }
.stat-card.gold  { border-top-color: var(--red); }
.stat-card.green { border-top-color: var(--green); }
.stat-card.red   { border-top-color: var(--error-red); }

/* ── Submission form ─────────────────────────────────────── */
.submit-form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.85rem; max-width: 820px; }
.submit-step { display: none; }
.submit-step.active { display: block; }
.step-indicator { display: flex; gap: 0; margin-bottom: 1.85rem; }
.step-dot { flex: 1; text-align: center; font-size: .68rem; font-family: var(--font-head); font-weight: 700; color: var(--gray-400); padding-bottom: .6rem; border-bottom: 3px solid var(--gray-200); letter-spacing: .02em; }
.step-dot.active { color: var(--blue); border-bottom-color: var(--blue); }
.step-dot.done   { color: var(--green); border-bottom-color: var(--green); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: #0722AB; background: linear-gradient(135deg,#051a85 0%,#0722AB 100%); color: rgba(255,255,255,.62); padding-top: 2.6rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 1.85rem; }
.footer-brand .brand-word { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--white); display: block; margin-bottom: .4rem; letter-spacing: -.01em; }
.footer-brand p { font-size: .79rem; color: rgba(255,255,255,.48); margin-top: .38rem; line-height: 1.5; }
.footer-col h4 { color: var(--white); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .8rem; font-family: var(--font-head); font-weight: 700; }
.footer-col ul li { margin-bottom: .42rem; }
.footer-col ul li a { color: rgba(255,255,255,.48); font-size: .79rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; font-size: .73rem; flex-wrap: wrap; gap: .5rem; }
.footer-plethoryt { display: flex; align-items: center; gap: .55rem; color: rgba(255,255,255,.48); font-size: .75rem; transition: var(--transition); }
.footer-plethoryt:hover { color: var(--white); }
.footer-plethoryt img { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; }
.admin-link { color: rgba(255,255,255,.25); font-size: .68rem; transition: var(--transition); }
.admin-link:hover { color: rgba(255,255,255,.62); }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: .42rem; align-items: center; justify-content: center; margin-top: 1.85rem; }
.pagination a, .pagination span { padding: .38rem .75rem; border-radius: var(--radius); border: 1.5px solid var(--gray-200); font-size: .78rem; color: var(--gray-800); transition: var(--transition); font-family: var(--font-head); font-weight: 600; }
.pagination a:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pagination .current { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pagination .disabled { color: var(--gray-400); pointer-events: none; }

/* ── Math CAPTCHA ────────────────────────────────────────── */
.captcha-box { background: var(--gray-100); border: 1.5px solid var(--gray-200); border-radius: var(--radius); padding: .7rem 1rem; display: flex; align-items: center; gap: .75rem; }
.captcha-question { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--blue); letter-spacing: .04em; }
.captcha-box input { width: 80px; }

/* ── Rate limit countdown ────────────────────────────────── */
.lockout-timer { font-family: var(--font-head); font-weight: 700; color: var(--red); }

/* ── Misc ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--gray-400); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 1.3rem 0; }
.empty-state { text-align: center; padding: 2.6rem 1rem; color: var(--gray-400); }
.action-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.3rem; flex-wrap: wrap; gap: .6rem; }
.modal-overlay { position: fixed; inset: 0; background: rgba(7,34,171,.38); z-index: 999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-box { background: var(--white); border-radius: var(--radius); max-width: 510px; width: 100%; padding: 1.65rem; box-shadow: var(--shadow-md); }
.modal-box h3 { margin-bottom: .85rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main-nav { position: fixed; inset: 62px 0 0 0; background: var(--blue); flex-direction: column; align-items: stretch; padding: 1rem; gap: 0; transform: translateX(100%); transition: transform .25s ease; z-index: 99; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-item { border-bottom: 1px solid rgba(255,255,255,.07); }
  .nav-link { padding: .82rem .5rem; }
  /* Mobile: no pseudo-gap-bridge needed */
  .has-dropdown::after { display: none; }
  .dropdown { position: static; opacity: 1; pointer-events: auto; transform: none; box-shadow: none; border-radius: 0; border-top: none; background: rgba(255,255,255,.06); display: none; z-index: auto; }
  .has-dropdown.open .dropdown { display: block; }
  .nav-auth { flex-direction: column; padding: 1rem 0; }
  .mobile-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero-section { padding: 3rem 0; min-height: auto; }
  .features-grid { grid-template-columns: 1fr; }
  .recent-submissions { grid-template-columns: 1fr; }
  .table-wrap { font-size: .76rem; }
  thead th, tbody td { padding: .52rem .42rem; }
  .dash-content { padding: 1.15rem; }
}
@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
}
@media (min-width: 320px) { body { min-width: 320px; } }
