/* ============================================================
   Parent portal — standalone base styles
   This file is self-contained: the parent portal does not load
   any CSS from the main sdms-frontend project. Design tokens
   below intentionally match it so the two look consistent, but
   there is no file dependency between them.
   ============================================================ */

:root {
  /* Core brand */
  --ink-navy: #2A3FE0;
  --ink-navy-deep: #1B237A;
  --ink-navy-soft: #5B6BF5;
  --paper: #DCEBFC;
  --paper-raised: #FFFFFF;

  /* Accents (vivid, Material-style) */
  --brass: #FF8A1E;
  --brass-light: #FFB35C;
  --emerald: #16A362;
  --emerald-light: #34D399;
  --violet: #8B5CF6;
  --violet-light: #C4B5FD;
  --sky: #0EA5E9;
  --clay: #EF4444;

  --charcoal: #1B1F2E;
  --charcoal-soft: #656C82;
  --line: #E3E7F5;
  --line-on-navy: rgba(255, 255, 255, 0.2);

  --grad-brand: linear-gradient(135deg, #3245F0 0%, #6A3EE8 55%, #A238D6 100%);
  --grad-primary: linear-gradient(135deg, #3A4CF2 0%, #6A3EE8 100%);
  --grad-emerald: linear-gradient(135deg, #16A362 0%, #34D399 100%);
  --grad-brass: linear-gradient(135deg, #FF8A1E 0%, #FFB35C 100%);

  --shadow-sm: 0 2px 8px -2px rgba(30, 40, 100, 0.10);
  --shadow-md: 0 8px 24px -8px rgba(30, 40, 100, 0.18);
  --shadow-lg: 0 16px 40px -12px rgba(40, 30, 120, 0.28);

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --transition: 180ms ease;
}

@media (prefers-reduced-motion: reduce) {
  :root { --transition: 0ms; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--paper);
}

/* ============================================================
   Two-panel auth layout (login + contact pages)
   ============================================================ */
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; }
}

.panel-brand {
  background: var(--grad-brand);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 56px;
  padding: 72px 64px;
  position: relative;
  overflow: hidden;
}

.panel-brand::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 30, 0.45) 0%, rgba(255, 138, 30, 0) 70%);
  pointer-events: none;
}

.panel-brand::after {
  content: "";
  position: absolute;
  bottom: -160px;
  left: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.35) 0%, rgba(52, 211, 153, 0) 70%);
  pointer-events: none;
}

@media (max-width: 900px) {
  .panel-brand { padding: 40px 32px 32px; gap: 28px; }
}

.brand-copy__logo {
  width: 280px;
  height: auto;
  display: block;
  margin: 0 0 24px;
  filter: drop-shadow(0 10px 24px rgba(10, 10, 40, 0.35));
}

@media (max-width: 900px) {
  .brand-copy__logo { width: 210px; margin: 0 0 16px; }
}

.brand-copy__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  margin: 0 0 18px;
  position: relative;
}

.brand-copy__tagline {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 34ch;
  margin: 0;
  position: relative;
}

.ledger { max-width: 220px; position: relative; }

.ledger__caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 12px;
}

.ledger__scale {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-on-navy);
  padding-left: 16px;
}

.ledger__tick {
  display: flex;
  align-items: center;
  height: 22px;
  position: relative;
}

.ledger__tick::before {
  content: "";
  position: absolute;
  left: -17px;
  width: 10px;
  height: 1px;
  background: var(--line-on-navy);
}

.ledger__value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.ledger__tick--peak { height: 34px; }
.ledger__tick--peak::before { width: 16px; height: 2px; background: var(--brass-light); }
.ledger__tick--peak .ledger__value { font-size: 20px; font-weight: 700; color: #FFD9A8; }

@media (max-width: 900px) {
  .ledger { display: none; }
}

.panel-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  gap: 24px;
}

.form-card {
  width: 100%;
  max-width: 380px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 480px) {
  .form-card { padding: 32px 24px; }
}

.form-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 6px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.form-card__subtitle {
  font-size: 14px;
  color: var(--charcoal-soft);
  margin: 0 0 32px;
}

/* ============================================================
   Form fields (shared by login + contact forms)
   ============================================================ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-form[hidden] { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
}

.field__input {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--charcoal);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea.field__input {
  resize: vertical;
  min-height: 72px;
  font-family: var(--font-body);
}

.field__input:focus-visible {
  outline: none;
  border-color: var(--ink-navy);
  box-shadow: 0 0 0 4px rgba(58, 76, 242, 0.16);
}

.field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field__input-wrap .field__input { padding-right: 64px; }

.field__toggle {
  position: absolute;
  right: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-navy);
  background: transparent;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.field__toggle:hover { color: var(--ink-navy-deep); background: rgba(58, 76, 242, 0.08); }
.field__toggle:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }

/* ============================================================
   Submit + form states
   ============================================================ */
.submit-btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--grad-primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  cursor: pointer;
  margin-top: 4px;
  text-decoration: none;
  display: block;
  text-align: center;
  box-shadow: 0 8px 20px -8px rgba(58, 76, 242, 0.55);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity var(--transition);
}

.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(58, 76, 242, 0.6); }
.submit-btn:active { transform: translateY(0) scale(0.98); }
.submit-btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-error {
  font-size: 13px;
  font-weight: 500;
  color: #B91C1C;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  line-height: 1.5;
}

.form-success {
  font-size: 13px;
  font-weight: 500;
  color: #0F7A47;
  background: rgba(22, 163, 98, 0.1);
  border: 1px solid rgba(22, 163, 98, 0.25);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  line-height: 1.5;
  text-align: center;
}

.help-text {
  font-size: 13px;
  color: var(--charcoal-soft);
  text-align: center;
  margin: 4px 0 0;
}

.footer-note {
  font-size: 12px;
  color: var(--charcoal-soft);
  text-align: center;
  margin: 0;
}

.footer-credit {
  font-size: 11px;
  color: var(--charcoal-soft);
  opacity: 0.7;
  text-align: center;
  margin: 6px 0 0;
}

/* ============================================================
   Secondary links (parent portal ↔ contact page ↔ back links)
   ============================================================ */
.whatsapp-link {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-navy);
  text-decoration: none;
  background: transparent;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border: none;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.whatsapp-link:hover,
.whatsapp-link:focus-visible { text-decoration: underline; }

.whatsapp-link--button {
  color: #fff;
  background: var(--grad-emerald);
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-top: 18px;
  box-shadow: 0 8px 20px -8px rgba(22, 163, 98, 0.55);
  transition: background var(--transition), transform 180ms ease, box-shadow 180ms ease;
}

.whatsapp-link--button:hover,
.whatsapp-link--button:focus-visible {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(22, 163, 98, 0.6);
}

.whatsapp-link--button:active { transform: translateY(0) scale(0.98); }

/* ============================================================
   Data table (marks / removed-marks history)
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-navy);
  padding: 0 10px 10px;
  border-bottom: 2px solid var(--line);
}

.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table tr:hover td { background: rgba(58, 76, 242, 0.03); }

.data-table tr:last-child td { border-bottom: none; }

.data-table__empty {
  text-align: center;
  color: var(--charcoal-soft);
  padding: 24px 10px;
}

.data-table__deduction {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--clay);
}

.voided-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: var(--clay);
  margin-left: 6px;
}

.session-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 163, 98, 0.12);
  color: var(--emerald);
  white-space: nowrap;
}

.session-status-badge--scheduled {
  background: rgba(58, 76, 242, 0.1);
  color: var(--ink-navy);
}

.session-status-badge--cancelled {
  background: rgba(101, 108, 130, 0.12);
  color: var(--charcoal-soft);
}
