/* =====================================================================
   ADVENT DIGITAL CANADA — Aurora Brand System
   Deep-space indigo · electric cyan → violet aurora gradients
   Headings: Space Grotesk · Body: Inter
   ===================================================================== */
:root {
  /* Brand core */
  --space: #070b1f;        /* deep space (darkest bg) */
  --space-2: #0b1230;      /* raised dark surface */
  --space-3: #121a42;      /* card on dark */
  --ink: #131a3f;          /* headings on light */
  --body: #3c476b;         /* body text on light */
  --muted: #6b779c;        /* secondary text */
  --cloud: #f6f8ff;        /* light page bg */
  --card: #ffffff;
  --line: #e3e8f8;

  --cyan: #22d3ee;
  --indigo: #6366f1;
  --violet: #a855f7;
  --mint: #34d399;
  --rose: #fb7185;

  --grad: linear-gradient(100deg, var(--cyan) 0%, var(--indigo) 55%, var(--violet) 100%);
  --grad-soft: linear-gradient(100deg, rgba(34,211,238,.12), rgba(99,102,241,.12), rgba(168,85,247,.12));

  --radius: 18px;
  --shadow: 0 18px 44px rgba(12, 18, 54, 0.12);
  --shadow-sm: 0 6px 20px rgba(12, 18, 54, 0.08);
  --glow: 0 8px 32px rgba(99, 102, 241, 0.45);

  /* Legacy aliases (used across pages) */
  --navy: var(--ink);
  --navy-2: var(--space-2);
  --navy-3: var(--space-3);
  --accent: var(--cyan);
  --accent-dark: #0ea5c4;
  --bg: var(--cloud);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--body);
  background: var(--cloud);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', 'Inter', sans-serif; line-height: 1.15; color: var(--ink); letter-spacing: -0.01em; }
img { max-width: 100%; }
a { color: var(--indigo); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 11, 31, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 13px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: grid; place-items: center; padding: 6px;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name { color: #fff; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17.5px; letter-spacing: 0.1px; }
.brand-name span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { display: block; font-size: 10px; font-weight: 500; color: #8b9bc7; letter-spacing: 3.2px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { color: #b9c5e8; text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: var(--cyan); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; border: none; transition: all .22s;
}
.btn-accent { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(99,102,241,0.6); filter: saturate(1.15); }
.btn-ghost { background: rgba(255,255,255,0.04); color: #eaf0ff; border: 1.5px solid rgba(139, 155, 199, 0.45); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-navy { background: var(--ink); color: #fff; }
.btn-navy:hover { background: #1d2757; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; border-radius: 10px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Hero (aurora) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--space);
  color: #fff; padding: 104px 0 118px;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
}
.hero::before {
  width: 640px; height: 640px; top: -260px; right: -140px;
  background: radial-gradient(circle, rgba(168,85,247,0.4), rgba(99,102,241,0.18) 55%, transparent 70%);
  animation: drift1 14s ease-in-out infinite alternate;
}
.hero::after {
  width: 560px; height: 560px; bottom: -280px; left: -160px;
  background: radial-gradient(circle, rgba(34,211,238,0.32), rgba(34,211,238,0.08) 55%, transparent 70%);
  animation: drift2 17s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(-70px, 50px) scale(1.12); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(60px, -40px) scale(1.08); } }

.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px;
  background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.35);
  color: var(--cyan); font-size: 12.5px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; margin-bottom: 24px;
}
.hero .eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.hero h1 { color: #fff; font-size: clamp(36px, 4.8vw, 58px); font-weight: 700; margin-bottom: 22px; letter-spacing: -0.02em; }
.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { color: #aab8de; font-size: 18.5px; max-width: 540px; margin-bottom: 36px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 22px; padding: 30px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.hero-card h3 { color: #fff; font-size: 17px; margin-bottom: 16px; }
.hero-stat { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.hero-stat:last-child { border-bottom: none; }
.hero-stat .ico {
  flex: 0 0 42px; height: 42px; border-radius: 12px;
  background: var(--grad-soft); border: 1px solid rgba(139,155,199,0.25);
  display: grid; place-items: center; font-size: 19px;
}
.hero-stat b { display: block; color: #fff; font-size: 15px; font-family: 'Space Grotesk', sans-serif; }
.hero-stat span { color: #92a2cc; font-size: 13.5px; }

/* ---------- Sections ---------- */
section.block { padding: 92px 0; }
section.block.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 56px; }
.section-head .kicker {
  display: inline-block; margin-bottom: 14px;
  font-weight: 700; font-size: 12.5px; letter-spacing: 2.6px; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 17px; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow-sm); transition: transform .22s, box-shadow .22s;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity .22s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card .ico {
  width: 54px; height: 54px; border-radius: 14px; font-size: 25px;
  background: var(--grad-soft); border: 1px solid #e2e5fb;
  display: grid; place-items: center; margin-bottom: 18px;
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- Requirements ---------- */
.req-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.req-item {
  display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.req-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.req-item .tick {
  flex: 0 0 36px; height: 36px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 15px;
  display: grid; place-items: center; margin-top: 2px; box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.req-item b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 15.5px; color: var(--ink); margin-bottom: 4px; }
.req-item span { color: var(--muted); font-size: 14.5px; }

.note-box {
  margin-top: 34px; padding: 22px 28px; border-radius: var(--radius);
  background: var(--grad-soft); border: 1px solid #dfe3fb; color: #4b53a2; font-size: 14.5px;
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; position: relative; box-shadow: var(--shadow-sm);
}
.step .num {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; display: grid; place-items: center;
  margin-bottom: 16px; box-shadow: 0 6px 18px rgba(99,102,241,0.35);
}
.step h3 { font-size: 16.5px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative; overflow: hidden;
  background: var(--space);
  border-radius: 26px; padding: 62px 48px; color: #fff; text-align: center;
}
.cta-banner::before {
  content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
  top: -220px; right: -100px; filter: blur(80px);
  background: radial-gradient(circle, rgba(168,85,247,0.45), transparent 65%);
}
.cta-banner::after {
  content: ''; position: absolute; width: 440px; height: 440px; border-radius: 50%;
  bottom: -220px; left: -80px; filter: blur(80px);
  background: radial-gradient(circle, rgba(34,211,238,0.4), transparent 65%);
}
.cta-banner h2 { color: #fff; font-size: clamp(25px, 3.1vw, 36px); margin-bottom: 12px; position: relative; z-index: 1; }
.cta-banner p { color: #aab8de; margin-bottom: 30px; font-size: 16.5px; position: relative; z-index: 1; }
.cta-banner .btn { position: relative; z-index: 1; }

/* ---------- Forms ---------- */
.form-shell {
  max-width: 720px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 22px; padding: 44px; box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label.f-label { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 7px; }
label.f-label .req-star { color: var(--rose); }
.f-input, .f-select, .f-textarea {
  width: 100%; padding: 12.5px 15px; border: 1.5px solid var(--line); border-radius: 11px;
  font-family: 'Inter', sans-serif; font-size: 15px; color: var(--ink); background: #fafbff;
  transition: border-color .2s, box-shadow .2s;
}
.f-input:focus, .f-select:focus, .f-textarea:focus {
  outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(99,102,241,0.14); background: #fff;
}
.f-textarea { resize: vertical; min-height: 110px; }
.f-hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.file-drop {
  display: block; border: 2px dashed #c4cdf2; border-radius: 14px; padding: 28px; text-align: center;
  background: #fafbff; cursor: pointer; transition: border-color .2s, background .2s;
}
.file-drop:hover { border-color: var(--indigo); background: #f4f6ff; }
.file-drop input { display: none; }
.file-drop .fd-icon { font-size: 30px; margin-bottom: 6px; }
.file-drop b { color: var(--ink); }
.file-drop small { display: block; color: var(--muted); margin-top: 4px; }

/* ---------- Footer ---------- */
footer { background: var(--space); color: #9daccf; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; padding-bottom: 42px; border-bottom: 1px solid rgba(255,255,255,0.08); }
footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; }
footer a { color: #9daccf; text-decoration: none; font-size: 14.5px; transition: color .2s; }
footer a:hover { color: var(--cyan); }
.footer-about p { font-size: 14.5px; max-width: 330px; margin-top: 14px; }
.social-row { display: flex; gap: 12px; margin-top: 20px; }
.social-row a {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  display: grid; place-items: center; transition: all .2s;
}
.social-row a:hover { background: var(--grad); border-color: transparent; transform: translateY(-3px); box-shadow: var(--glow); }
.social-row svg { width: 19px; height: 19px; fill: #dfe6fb; }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 24px; font-size: 13px; color: #6d7ca6; }

/* ---------- Portal ---------- */
.portal-wrap { max-width: 1140px; margin: 0 auto; padding: 44px 24px 90px; }
.auth-shell { max-width: 480px; margin: 40px auto; }
.auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 40px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.auth-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad); }
.auth-card h2 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }
.auth-tabs { display: flex; background: #eef1fc; border-radius: 12px; padding: 5px; margin-bottom: 28px; }
.auth-tabs button {
  flex: 1; padding: 10px; border: none; border-radius: 9px; background: transparent;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer;
}
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.pw-wrap { position: relative; }
.pw-wrap .pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 17px; color: var(--muted);
}
.form-msg { border-radius: 11px; padding: 12px 16px; font-size: 14px; margin-bottom: 18px; display: none; }
.form-msg.err { display: block; background: #fdeef1; color: #c2415a; border: 1px solid #f6cdd6; }
.form-msg.ok { display: block; background: #e9faf3; color: #14805e; border: 1px solid #bfeedd; }
.form-msg.info { display: block; background: #eef2ff; color: #4550b8; border: 1px solid #d5dbfa; }

.dash-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.dash-head h2 { font-size: 26px; }
.dash-head .who { color: var(--muted); font-size: 14.5px; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th {
  text-align: left; font-family: 'Space Grotesk', sans-serif; font-size: 12.5px; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--muted); padding: 14px 18px; border-bottom: 2px solid var(--line); background: #fafbff;
}
table.data td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
table.data tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.ok { background: #e9faf3; color: #14805e; }
.pill.pending { background: #fff4e0; color: #a06b12; }
.pill.rej { background: #fdeef1; color: #c2415a; }

.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.admin-tabs button {
  padding: 11px 20px; border: 1.5px solid var(--line); background: #fff; border-radius: 11px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; transition: all .15s;
}
.admin-tabs button.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,0.3); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.panel-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.panel-card h3 { font-size: 18px; margin-bottom: 18px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.toolbar .f-input, .toolbar .f-select { width: auto; min-width: 180px; }

.payslip-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 26px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.payslip-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.payslip-card b { font-family: 'Space Grotesk', sans-serif; color: var(--ink); }
.payslip-card .meta { color: var(--muted); font-size: 13.5px; }
.payslip-card .amt { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; color: var(--ink); }

.badge-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--rose); color: #fff; font-size: 12px; font-weight: 700; margin-left: 6px;
}

.empty-state { text-align: center; color: var(--muted); padding: 46px 20px; }
.empty-state .big { font-size: 40px; margin-bottom: 10px; }

.config-warning {
  background: var(--grad-soft); border: 1.5px solid #d8dcfa; border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 28px; color: #4b53a2; font-size: 14.5px;
}
.config-warning code { background: #e4e8fd; padding: 2px 7px; border-radius: 6px; font-size: 13px; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  background: var(--space);
  color: #fff; padding: 66px 0 62px; text-align: center;
}
.page-hero::before {
  content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  top: -260px; left: 50%; transform: translateX(-50%); filter: blur(90px);
  background: radial-gradient(circle, rgba(99,102,241,0.5), rgba(34,211,238,0.15) 60%, transparent 70%);
}
.page-hero h1 { position: relative; color: #fff; font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 12px; }
.page-hero p { position: relative; color: #aab8de; font-size: 17px; max-width: 620px; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards-3 { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--space); flex-direction: column; padding: 18px 24px; gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .form-shell { padding: 28px 22px; }
  .hero { padding: 72px 0 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
}

/* ---------- Print (payslips) ---------- */
@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; left: 0; top: 0; width: 100%; }
}
