/* ============================================================
   Brand palette — The Bookkeeper's Academy official colours.
   Everything in this file references these variables, so updating
   them here updates the whole app.
   ============================================================ */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f1efeb;       /* warm off-white */
  --color-border: #d0cdc5;       /* warm light grey */
  --color-text: #545455;         /* charcoal grey */
  --color-text-muted: #7a7a7b;
  --color-navy: #2c2245;         /* dark navy/indigo */
  --color-gold: #b38335;         /* amber/gold accent */
  --color-gold-dark: #96702c;
  --color-slate: #434e7b;        /* slate blue */
  --radius: 10px;
  --shadow: 0 2px 10px rgba(44, 34, 69, 0.08);
  --max-width: 720px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  background: var(--color-bg-alt);
  color: var(--color-text);
  line-height: 1.5;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--color-navy);
  color: #fff;
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 15px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.progress-wrap {
  max-width: var(--max-width);
  margin: 10px auto 0;
}

.progress-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 6px;
}

.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-gold);
  width: 0%;
  transition: width 0.3s ease;
}

.main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

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

.footer a { color: var(--color-slate); }

/* Cards / panels */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 28px 24px;
  margin-bottom: 20px;
}

h1 {
  font-size: 24px;
  color: var(--color-navy);
  margin: 0 0 14px;
}

h2 {
  font-size: 19px;
  color: var(--color-navy);
  margin: 0 0 4px;
}

.section-index {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold-dark);
  font-weight: 600;
  margin-bottom: 6px;
}

p { margin: 0 0 14px; color: var(--color-text); }
p.muted { color: var(--color-text-muted); font-size: 14px; }

/* Form elements */
.field {
  margin-bottom: 26px;
}

.field-label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  color: var(--color-text);
}

.field-help {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: -4px 0 10px;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 62, 0.15);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

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

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option-item:hover {
  border-color: var(--color-slate);
}

.option-item.selected {
  border-color: var(--color-gold);
  background: rgba(176, 141, 62, 0.08);
}

.option-item input {
  margin-top: 3px;
}

.file-drop {
  border: 2px dashed var(--color-border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.file-list {
  margin-top: 10px;
  font-size: 14px;
}

.file-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--color-bg-alt);
  border-radius: 6px;
  margin-bottom: 6px;
}

/* Buttons */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  gap: 12px;
}

button {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 22px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.05s ease;
}

button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--color-gold);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--color-gold-dark); }

.btn-secondary {
  background: transparent;
  color: var(--color-navy);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--color-navy); }

.save-indicator {
  font-size: 12px;
  color: var(--color-text-muted);
  min-height: 16px;
}

.error-banner {
  background: #fdecec;
  border: 1px solid #f2b8b8;
  color: #8a1f1f;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.center-note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  margin-top: 16px;
}

/* Admin results page */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
}

.admin-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.status-submitted {
  background: rgba(67, 78, 123, 0.12);
  color: var(--color-slate);
}

.status-badge.status-in_progress {
  background: rgba(176, 141, 62, 0.12);
  color: var(--color-gold-dark);
}
