/* ─── design tokens ─────────────────────────────────────────────────────── */
:root {
  --blue:        #1e6dff;
  --blue-600:    #1457d8;
  --blue-700:    #0f3fb0;
  --blue-50:     #e8f0ff;
  --blue-100:    #dbeafe;
  --green:       #10b981;
  --green-50:    #d1fae5;
  --red:         #ef4444;
  --orange:      #f59e0b;
  --orange-50:   #fef3c7;
  --purple-1:    #8b5cf6;
  --purple-2:    #6d28d9;
  --teal:        #0ea5a4;

  --bg:          #f4f6fa;
  --surface:     #ffffff;
  --line:        #e5e7eb;
  --line-2:      #eef0f4;
  --text:        #0f172a;
  --muted:       #6b7280;
  --muted-2:     #94a3b8;
  --soft:        #f3f4f8;

  --radius:      14px;
  --radius-lg:   18px;
  --radius-sm:   10px;
  --shadow-sm:   0 1px 2px rgba(15, 23, 42, .04);
  --shadow:      0 6px 24px rgba(15, 23, 42, .06);
  --shadow-md:   0 10px 30px rgba(15, 23, 42, .08);

  --header-h:    72px;
  --banner-h:    74px;
  --nav-h:       72px;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
input, select, textarea { font: inherit; }
img, svg { display: block; max-width: 100%; }

.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 13px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.error { color: var(--red); margin-top: 8px; font-size: 14px; }

/* ─── login ─────────────────────────────────────────────────────────────── */
.login-bg {
  min-height: 100vh;
  display: grid; place-items: center;
  background:
    radial-gradient(900px 360px at 50% -10%, var(--blue-50), transparent 60%),
    var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow);
}
.brand {
  display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px;
}
.brand-mark {
  font-weight: 800; color: var(--blue);
  font-size: 26px; letter-spacing: -.5px;
}
.brand-sub { color: var(--muted); font-size: 14px; }
.login-card h1 { margin: 4px 0 4px; font-size: 22px; }

label {
  display: block; font-size: 13px; font-weight: 500;
  margin: 14px 0 6px;
}
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="date"], input[type="number"],
input[type="search"], select, textarea {
  width: 100%;
  background: #fff;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--blue-50);
  border-color: var(--blue);
}

.btn {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); padding: 10px 14px;
  border-radius: 10px; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, border-color .15s, color .15s, transform .04s;
}
.btn:hover { background: #f8fafc; }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; padding: 12px; }
.btn-primary {
  background: linear-gradient(180deg, var(--blue), var(--blue-600));
  color: #fff; border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.04); background: linear-gradient(180deg, var(--blue), var(--blue-700)); }
.btn-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f1f5f9; color: var(--text); }
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* ─── pills ─────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.pill-success { background: var(--green-50); color: #047857; }
.pill-warning { background: var(--orange-50); color: #92400e; }
.pill-danger  { background: #fee2e2; color: #991b1b; }
.pill-info    { background: var(--blue-50); color: var(--blue-700); }
.pill-muted   { background: #eef0f4; color: #475569; }

/* ─── cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 16px; }
.card-header {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.card-header h2 { margin: 0; font-size: 15px; font-weight: 700; }

/* ─── modal ─────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: grid; place-items: center; z-index: 50; padding: 20px;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 540px; box-shadow: var(--shadow-md); overflow: hidden;
}
.modal header { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal header h2 { margin: 0; font-size: 16px; }
.modal .modal-body { padding: 18px; max-height: 70vh; overflow: auto; }
.modal footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
