/* ── AddFlow Design System — base.css ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font:        -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --blue:        #0071e3;
  --blue-dark:   #0a84ff;
  --blue-hover:  #0077ed;
  --text:        #1d1d1f;
  --text-2:      #6e6e73;
  --text-3:      #aeaeb2;
  --bg:          #fff;
  --bg-2:        #f5f5f7;
  --bg-3:        #e5e5ea;
  --border:      #d2d2d7;
  --radius-sm:   8px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue:      #0a84ff;
    --blue-hover:#1a8fff;
    --text:      #f5f5f7;
    --text-2:    #86868b;
    --text-3:    #48484a;
    --bg:        #000;
    --bg-2:      #1c1c1e;
    --bg-3:      #2c2c2e;
    --border:    #3a3a3c;
  }
}

html { font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Shared form components ── */
.form-field { margin-bottom: 0.875rem; }

.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.1px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-2);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-3); }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  background: var(--bg);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,.15);
}

@media (prefers-color-scheme: dark) {
  .form-field input:focus,
  .form-field select:focus,
  .form-field textarea:focus {
    box-shadow: 0 0 0 3px rgba(10,132,255,.2);
  }
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  background: var(--blue);
  color: #fff;
  font-size: .9375rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-primary:hover   { background: var(--blue-hover); }
.btn-primary:active  { transform: scale(.99); }
.btn-primary:disabled{ background: var(--text-3); cursor: not-allowed; transform: none; }
.btn-primary.full    { width: 100%; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  background: var(--bg-2);
  color: var(--text);
  font-size: .9375rem;
  font-weight: 500;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-secondary:hover { background: var(--bg-3); border-color: var(--text-3); }
.btn-secondary.full  { width: 100%; }

/* ── Error area ── */
.error-area {
  background: #fff2f2;
  border: 1px solid #ffc5c5;
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: .875rem;
  color: #c0392b;
}
.error-area ul { margin: 0; padding-left: 1.1rem; }
.error-area li { margin-bottom: .2rem; }
.error-area[hidden] { display: none; }

@media (prefers-color-scheme: dark) {
  .error-area { background: #2c1010; border-color: #7b2020; color: #ff6b6b; }
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--text-3);
  font-size: .8125rem;
}
.divider::before,
.divider::after { content: ''; flex: 1; height: 1px; background: var(--bg-3); }

/* ── Utility ── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
