/* =========================================================
   Silicon Valley Academy — Tuition Liability Portal styles
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@300;400;500;600;700&family=Dancing+Script:wght@600;700&display=swap');

:root {
  --navy-50:  #f3f6fb;
  --navy-100: #e2eaf4;
  --navy-200: #c0d0e4;
  --navy-400: #6985ad;
  --navy-600: #2b4775;
  --navy-700: #1f3a64;
  --navy-800: #15294a;
  --navy-900: #0d1d36;

  --gold:        #c9a14a;
  --gold-soft:   #e8d6a6;
  --gold-deep:   #8d6b22;

  --paper:   #fbfaf6;
  --bg:      #f5f6f9;
  --card:    #ffffff;

  --ink:        #1b2236;
  --ink-soft:   #475069;
  --muted:      #6f7891;
  --border:     #e3e6ee;
  --border-soft:#eef0f5;

  --error:   #b42318;
  --success: #15803d;
  --warning: #b54708;

  --shadow-sm: 0 1px 2px rgba(13,29,54,0.06);
  --shadow:    0 4px 14px rgba(13,29,54,0.08);
  --shadow-lg: 0 20px 40px -12px rgba(13,29,54,0.18);

  --radius:    14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(43,71,117,0.10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #eef1f6 100%);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--navy-700); text-decoration: none; border-bottom: 1px solid var(--navy-200); }
a:hover { color: var(--navy-900); border-bottom-color: var(--navy-600); }

/* ---------- Top bar ---------- */
.topbar {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #fff;
  padding: 18px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--gold);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 50;
}
.topbar .brand-row { display: flex; align-items: center; gap: 14px; }
.topbar .crest {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  padding: 4px;
  box-shadow: 0 0 0 1.5px var(--gold);
  overflow: hidden;
  flex-shrink: 0;
}
.topbar .crest img { width: 100%; height: 100%; object-fit: contain; display: block; }
.topbar .brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.4px;
  line-height: 1.1;
}
.topbar .brand small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--gold-soft);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 4px;
}
.topbar .right {
  display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: #d8e0ee;
}

/* ---------- Layout ---------- */
.container { max-width: 1040px; margin: 36px auto 64px; padding: 0 28px; }
.container.narrow { max-width: 820px; }

/* ---------- Hero (landing) ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 64px 32px 56px;
  margin: 0 0 28px;
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(201,161,74,0.10), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(43,71,117,0.10), transparent 55%);
  pointer-events: none;
}
.hero .crest-lg {
  width: 92px; height: 92px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  padding: 8px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 8px rgba(201,161,74,0.18);
}
.hero .crest-lg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--navy-900);
  letter-spacing: 0.2px;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: var(--paper);
  padding: 4px 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero p.lead {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 8px auto 0;
  position: relative;
}

.divider-ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 28px auto 22px; color: var(--gold);
}
.divider-ornament::before, .divider-ornament::after {
  content: ''; flex: 1; max-width: 100px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}
.divider-ornament .dot { width: 5px; height: 5px; background: var(--gold); border-radius: 50%; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  position: relative;
}
.card.elevated { box-shadow: var(--shadow-lg); }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: 'Cormorant Garamond', serif; color: var(--navy-900); letter-spacing: 0.2px; }
h1 { font-size: 30px; margin: 0 0 10px; font-weight: 600; }
h2 {
  font-size: 22px; font-weight: 600;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}
h2::after {
  content: ''; position: absolute; left: 0; bottom: -1px;
  width: 42px; height: 2px; background: var(--gold);
}
h3 { font-size: 17px; font-weight: 600; margin: 22px 0 8px; color: var(--navy-800); }
p { margin: 0 0 12px; }
ol, ul { padding-left: 22px; }
ol li, ul li { margin-bottom: 6px; }

/* ---------- Policy box ---------- */
.policy {
  background: var(--paper);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy-700);
  padding: 22px 26px;
  font-size: 14.5px;
  line-height: 1.7;
  max-height: 460px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 2px 4px rgba(13,29,54,0.04);
}
.policy p { margin: 0 0 12px; }
.policy ul { padding-left: 22px; }
.policy::-webkit-scrollbar { width: 8px; }
.policy::-webkit-scrollbar-thumb { background: var(--navy-200); border-radius: 4px; }

/* ---------- Form elements ---------- */
label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--navy-800);
  letter-spacing: 0.1px;
}
label .req { color: var(--error); margin-left: 2px; }
label .opt { color: var(--muted); font-weight: 400; font-size: 12px; font-style: italic; }

input[type=text], input[type=email], input[type=date], input[type=number], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input[readonly] { background: var(--bg); color: var(--ink-soft); }
textarea { min-height: 170px; resize: vertical; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(43,71,117,0.15);
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

.help { font-size: 12.5px; color: var(--muted); margin-top: 5px; font-style: italic; }

/* ---------- Buttons ---------- */
button, .btn {
  background: linear-gradient(180deg, var(--navy-700) 0%, var(--navy-800) 100%);
  color: #fff;
  border: 1px solid var(--navy-900);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s, box-shadow 0.15s, filter 0.15s;
}
button:hover, .btn:hover {
  filter: brightness(1.08);
  box-shadow: var(--shadow);
}
button:active { transform: translateY(1px); }

button.primary-gold {
  background: linear-gradient(180deg, #d4ae5a 0%, var(--gold-deep) 100%);
  border-color: var(--gold-deep);
}
button.secondary {
  background: #fff;
  color: var(--navy-700);
  border: 1px solid var(--navy-200);
}
button.secondary:hover { background: var(--navy-50); }
button.ghost { background: transparent; color: var(--navy-700); border: none; box-shadow: none; }
button.ghost:hover { background: var(--navy-50); }
button.danger {
  background: linear-gradient(180deg, #c2381f 0%, #93281a 100%);
  border-color: #7a1f13;
}
button:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }

/* ---------- Banners ---------- */
.banner {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 14px;
  border: 1px solid transparent;
  display: flex; align-items: flex-start; gap: 10px;
}
.banner::before {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  margin-top: 1px;
  flex-shrink: 0;
}
.banner.info { background: #eff4fb; border-color: #c5d4ea; color: #1f3a64; }
.banner.info::before { content: 'i'; color: var(--navy-700); }
.banner.success { background: #ecfdf3; border-color: #abefc6; color: #054f31; }
.banner.success::before { content: '✓'; color: var(--success); }
.banner.error { background: #fef3f2; border-color: #fecdca; color: #7a271a; }
.banner.error::before { content: '!'; color: var(--error); }
.banner.warning { background: #fff8eb; border-color: #fedf89; color: #7a2e0e; }
.banner.warning::before { content: '!'; color: var(--warning); }

/* ---------- Signatures ---------- */
.signature-line {
  font-family: 'Dancing Script', 'Brush Script MT', cursive;
  font-size: 28px;
  font-weight: 700;
  color: #0d1d36;
  padding: 4px 12px;
  border-bottom: 1.5px solid var(--ink-soft);
  min-width: 260px;
  display: inline-block;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.signature-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 14px 0;
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}
.signature-block h3 { margin-top: 0; color: var(--navy-700); }

/* ---------- Records table ---------- */
table.records { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.records th, table.records td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
table.records th {
  background: var(--navy-50);
  font-weight: 600;
  color: var(--navy-800);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
table.records tr:hover { background: var(--navy-50); }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid transparent;
}
.tag.issued        { background: #f1f4f9; color: #475069; border-color: #d8dee8; }
.tag.acknowledged  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.tag.appealed      { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.tag.revoked       { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.tag.approved_full    { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.tag.approved_partial { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.tag.denied           { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.tag.more_info_needed { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); font-size: 13.5px; }
.spacer { height: 14px; }

.checkbox-row {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 14px 0;
  font-size: 14px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.checkbox-row input { margin-top: 4px; transform: scale(1.15); accent-color: var(--navy-700); }
.checkbox-row label { margin: 0; font-weight: 400; color: var(--ink-soft); cursor: pointer; }

.file-list { list-style: none; padding: 0; margin: 10px 0; }
.file-list li {
  background: var(--navy-50);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 13.5px;
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--border-soft);
}
.file-list li button { padding: 4px 12px; font-size: 11px; background: var(--error); border-color: #7a1f13; }

.affidavit-box {
  background: linear-gradient(180deg, #fffaf0 0%, #fff5e1 100%);
  border: 1px solid var(--gold-soft);
  border-left: 4px solid var(--gold-deep);
  padding: 18px 22px;
  font-style: italic;
  font-size: 14.5px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  color: var(--navy-900);
  line-height: 1.7;
  border-radius: var(--radius-sm);
}

/* ---------- Modal ---------- */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(13,29,54,0.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  max-width: 760px; width: 100%;
  max-height: 92vh; overflow-y: auto;
  padding: 32px 36px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--gold);
}

/* ---------- Tabs ---------- */
.tab-row {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab-row button {
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 22px;
  font-weight: 500;
  box-shadow: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  letter-spacing: 0.3px;
}
.tab-row button:hover { background: var(--navy-50); color: var(--navy-700); filter: none; }
.tab-row button.active {
  color: var(--navy-800);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* ---------- Stepper ---------- */
.stepper {
  display: flex; justify-content: center; gap: 0;
  margin: 0 auto 28px;
  max-width: 600px;
}
.stepper .step {
  flex: 1; text-align: center;
  position: relative;
  padding: 0 8px;
}
.stepper .step .circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700; font-size: 16px;
  margin: 0 auto 6px;
  transition: all 0.2s;
}
.stepper .step .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}
.stepper .step.active .circle {
  background: var(--navy-700); border-color: var(--navy-700); color: #fff;
  box-shadow: 0 0 0 4px rgba(43,71,117,0.15);
}
.stepper .step.active .label { color: var(--navy-800); }
.stepper .step.done .circle {
  background: var(--gold); border-color: var(--gold-deep); color: #fff;
}
.stepper .step.done .label { color: var(--gold-deep); }
.stepper .step:not(:last-child)::after {
  content: '';
  position: absolute; top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px);
  height: 2px; background: var(--border);
}
.stepper .step.done:not(:last-child)::after { background: var(--gold-soft); }

/* ---------- Footer (landing) ---------- */
.footer {
  text-align: center;
  padding: 28px 16px 8px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.3px;
}
.footer .crest-sm {
  display: inline-block; width: 22px; height: 22px;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  box-shadow: 0 0 0 1px var(--gold-soft);
}
.footer .crest-sm img { width: 100%; height: 100%; object-fit: contain; display: block; }

#g_id_signin { margin: 18px 0; }
