/**
 * public/css/style.css
 *
 * Shared design tokens and components used across all three pages
 * (login.html, index.html, admin.html). Originally each page carried its
 * own copy of these rules (see Steps 14-16) so every page rendered
 * correctly as it was built, in build order, before this file existed.
 * This step extracts the genuinely shared parts here and removes the
 * duplicates from each page's inline <style> block, which now only holds
 * page-specific layout (sidebar/tabs/charts for index.html, the centered
 * card shell for login.html, form-grid/file-drop for admin.html).
 */

:root {
  --navy: #1A2C5B;
  --navy-deep: #0F1B3D;
  --gold: #C9A84C;
  --off-white: #F7F5F0;
  --white: #FFFFFF;
  --text-dark: #20242E;
  --text-muted: #6B7280;
  --success: #2C6E49;
  --danger: #B3452C;
  --border: #E2E5EB;
  --font-display: Cambria, Georgia, 'Times New Roman', serif;
  --font-body: Calibri, 'Segoe UI', system-ui, -apple-system, sans-serif;

  --chart-1: #1A2C5B;
  --chart-2: #C9A84C;
  --chart-3: #6B7A99;
  --chart-4: #D9C68A;
  --chart-5: #8FA3B8;
  --chart-6: #E6D9AE;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0;
}

a { color: var(--navy); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary:hover { background: var(--navy-deep); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn-secondary {
  background: var(--off-white);
  color: var(--navy);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-secondary:hover { background: var(--border); }
.btn-secondary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}
.field .optional { font-weight: 400; color: var(--text-muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 9px 10px;
  font-size: 13.5px;
  font-family: var(--font-body);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--off-white);
  color: var(--text-dark);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26, 44, 91, 0.12);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.field textarea { resize: vertical; min-height: 56px; }

@media (prefers-reduced-motion: reduce) {
  .field input, .field select, .field textarea, .btn-primary, .btn-secondary {
    transition: none;
  }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(15, 27, 61, 0.06);
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.loading-placeholder {
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px;
  text-align: center;
}

.form-feedback {
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
}
.form-feedback.visible { display: block; }
.form-feedback.success { background: #DCEEE3; color: var(--success); }
.form-feedback.error { background: #FBEAE4; color: var(--danger); }
