/* ==========================================================================
   Nohro Tools — shared design system
   Matches the charcoal wordmark and the existing offer-sheet/TARIC pages:
   warm off-white, monochrome charcoal, rounded to echo the logo. Used by the
   login + admin pages so the whole app is one family. No external fonts/CDN.
   ========================================================================== */

:root {
  --bg:        #f6f5f3;   /* warm off-white app background */
  --surface:   #ffffff;
  --surface-2: #f1efec;
  --ink:       #3a3a3a;   /* logo charcoal — headings, primary buttons */
  --ink-2:     #6f6c67;   /* body text */
  --ink-3:     #a3a09a;   /* secondary / hints */
  --line:      #e8e6e1;
  --line-2:    #d8d5cf;

  --ok: #2e7d4f;    --ok-bg: #eef7f1;    --ok-line: #cfe8d9;
  --warn: #8a6a2f;  --warn-bg: #f7f0e3;  --warn-line: #ead9b8;
  --danger: #b3402e;--danger-bg: #fbf0ee;--danger-line: #efd2ca;

  --focus: rgba(58,58,58,.14);
  --r: 16px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(58,58,58,.04), 0 8px 30px rgba(58,58,58,.06);
  --shadow-sm: 0 1px 2px rgba(58,58,58,.04);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

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

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

h1, h2, h3 { color: var(--ink); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1rem; }
h3 { font-size: .92rem; }

.section-title { font-size: .72rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }

/* ── App shell (top bar with logo) ─────────────────────────────────────── */
.app-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.app-header__inner { max-width: 960px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 16px; }
.app-header__logo { height: 20px; width: auto; display: block; }
.app-header__title { font-size: .72rem; font-weight: 500; color: var(--ink-3); letter-spacing: .02em; margin-top: 5px; }
.app-header__spacer { flex: 1; }
.app-header__user { font-size: .84rem; color: var(--ink-3); display: flex; align-items: center; gap: 14px; }

.container { max-width: 860px; margin: 36px auto; padding: 0 20px 60px; }
.container--narrow { max-width: 420px; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 28px 32px; }
.card + .card { margin-top: 20px; }
.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card__step { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.card__title { font-size: 1rem; font-weight: 700; color: var(--ink); }

/* ── Forms ─────────────────────────────────────────────────────────────── */
label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
label .hint, .hint { font-weight: 400; color: var(--ink-3); }
input[type=text], input[type=password], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: 10px 13px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: inherit; font-size: .92rem; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus); }
textarea { resize: vertical; line-height: 1.45; }
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

/* ── Buttons (pill, charcoal — matches the offer-sheet page) ───────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 26px; border: 1px solid transparent; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .15s, transform .05s, opacity .15s; text-decoration: none; line-height: 1; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #232323; text-decoration: none; }
.btn--secondary { background: #eceae6; color: var(--ink); }
.btn--secondary:hover { background: #e0ddd8; text-decoration: none; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); text-decoration: none; }
.btn--block { width: 100%; }
.btn--lg { padding: 13px 28px; font-size: .96rem; }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge--ok   { background: var(--ok-bg);   color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--err  { background: var(--danger-bg); color: var(--danger); }
.badge--muted{ background: var(--surface-2); color: var(--ink-3); }

/* ── Alerts / flash ────────────────────────────────────────────────────── */
.alert { border-radius: var(--r-sm); padding: 11px 15px; font-size: .875rem; margin-bottom: 16px; border: 1px solid transparent; }
.alert--err  { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.alert--ok   { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-line); }
.alert--warn { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-line); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; background: #fff; }
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }

/* ── Auth screen (login / admin login) ─────────────────────────────────── */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 40px 40px 34px; width: 100%; max-width: 400px; }
.auth__brand { text-align: center; margin-bottom: 28px; }
.auth__brand img { height: 30px; width: auto; }
.auth__brand small { display: block; font-size: .8rem; color: var(--ink-3); margin-top: 11px; letter-spacing: .01em; }

/* ── Utilities ─────────────────────────────────────────────────────────── */
.muted { color: var(--ink-3); }
.small { font-size: .82rem; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-2 { margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

@media (max-width: 600px) {
  .app-header__inner, .container { padding-left: 16px; padding-right: 16px; }
  .card { padding: 22px 20px; }
}
