/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── DESIGN TOKENS ── */
:root {
  /* Neutrals */
  --bg:            #f8f7f4;
  --surface:       #ffffff;
  --surface-2:     #f1f0ec;
  --border:        #e4e2da;
  --border-strong: #c4c1b8;
  --text:          #16140f;
  --text-muted:    #6b6860;
  --text-hint:     #a09d96;

  /* Semantic */
  --red:           #d63f3f;
  --red-light:     #fdf1f1;
  --red-mid:       #f0b0b0;
  --amber:         #c96a00;
  --amber-light:   #fdf5ea;
  --amber-mid:     #e8b060;
  --yellow:        #b89200;
  --yellow-light:  #fdf9e3;
  --green:         #237a4b;
  --green-light:   #ebf5f0;
  --blue:          #2563a8;
  --blue-light:    #eaf1fb;

  /* Radius */
  --r:   8px;
  --rl: 14px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --bg:            #111110;
  --surface:       #1c1b19;
  --surface-2:     #252420;
  --border:        #2e2c28;
  --border-strong: #46443e;
  --text:          #e8e6e0;
  --text-muted:    #9a9790;
  --text-hint:     #6a6762;

  --red-light:     #2a1818;
  --red-mid:       #6a2828;
  --amber-light:   #251c0e;
  --amber-mid:     #6a4010;
  --yellow-light:  #201c0a;
  --green-light:   #0e1f16;
  --blue-light:    #0f1a28;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  transition: background .2s, color .2s;
}

/* ── TYPOGRAPHY ── */
label {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-hint);
  margin-bottom: 12px;
}
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-hint);
  font-size: 13px;
}
hr { border: none; border-top: .5px solid var(--border); margin: 20px 0; }

/* ── FORM ELEMENTS ── */
input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .2s;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,168,.12);
}
textarea { resize: vertical; min-height: 70px; }
input::placeholder, textarea::placeholder { color: var(--text-hint); }

/* ── FORM GRID ── */
.fg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fc { grid-column: 1 / -1; }
.form-footer { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 640px) {
  .fg { grid-template-columns: 1fr; }
  .fc { grid-column: 1; }
}
