:root {
  --navy: #0A0F1F; --navy-2: #0E1631; --navy-3: #16203c;
  --orange: #F97316; --orange-h: #EA6A0C;
  --white: #FFFFFF; --slate: #AEB6C7;
  --ink: #12192b; --ink-2: #667085; --line: #e4e7ec; --field: #f7f8fa;
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: #f2f4f7;
  color-scheme: light;  /* native select/datalist popups follow this, not the OS dark theme */
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 520px; margin: 0 auto; padding: 40px 16px 56px; }
.wrap.wide { max-width: 1180px; padding-top: 24px; }
a { color: var(--orange); }

/* ---------------------------------------------------------------- wordmark */
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; background: var(--orange); color: #fff;
  font-size: 20px; font-weight: 800; line-height: 38px; text-align: center;
  box-shadow: 0 6px 14px -4px rgba(249, 115, 22, .6);
}
.brand .mark {
  color: var(--navy); font-size: 19px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.brand .mark i { color: var(--orange); font-style: normal; }

/* -------------------------------------------------------------- form pages */
.card {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: 0 10px 30px -12px rgba(16, 24, 40, .18);
}
.card.narrow { max-width: 400px; margin: 0 auto; }
.card.center { text-align: center; }
h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; text-align: center; }
.sub { margin: 0 0 26px; color: var(--ink-2); font-size: 15px; text-align: center; }

label {
  display: block; margin-bottom: 18px; color: var(--ink-2);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
label b { color: #e5484d; font-weight: 700; }
input, select, button { font: inherit; }
input, select {
  width: 100%; margin-top: 7px; padding: 13px 14px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-weight: 400; letter-spacing: normal; text-transform: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder { color: #98a2b3; }
select {
  appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
                    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: right 19px center, right 14px center;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
select option { background: #fff; color: var(--ink); }
input:focus, select:focus {
  outline: none; border-color: var(--orange); background: #fff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .22);
}

button, .btn-link {
  display: inline-block; width: 100%; padding: 14px 18px; border: 0; border-radius: 10px;
  background: var(--orange); color: #fff; font-weight: 700; font-size: 15px;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .05s;
}
button:hover, .btn-link:hover { background: var(--orange-h); }
button:active, .btn-link:active { transform: translateY(1px); }
button:focus-visible, .btn-link:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
form > button { margin-top: 8px; }
button.ghost, .btn-link.ghost {
  background: transparent; color: var(--slate); border: 1px solid rgba(174, 182, 199, .35);
}
button.ghost:hover, .btn-link.ghost:hover { background: rgba(255, 255, 255, .07); color: var(--white); }

.err {
  display: block; margin-top: 6px; color: #c0362c; font-size: 12.5px;
  font-weight: 500; letter-spacing: normal; text-transform: none;
}
.alert {
  margin: 0 0 18px; padding: 11px 13px; border-radius: 10px; border-left: 3px solid #c0362c;
  background: #fdecea; color: #96261d; font-size: 14px;
}
.hp { position: absolute; left: -9999px; }
.tick {
  width: 56px; height: 56px; margin: 6px auto 14px; border-radius: 50%;
  background: rgba(249, 115, 22, .12); color: var(--orange); font-size: 28px; line-height: 56px;
}
.card.center .btn-link { width: auto; padding-left: 26px; padding-right: 26px; }
.powered {
  margin: 22px 0 0; text-align: center; color: #98a2b3; font-size: 12.5px;
}
.powered b { color: var(--orange); letter-spacing: .08em; }

/* ------------------------------------------------------------------- admin */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-in {
  max-width: 1180px; margin: 0 auto; padding: 12px 16px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.topbar .brand { margin: 0; }
.topbar .brand .mark { color: var(--navy); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.topbar-actions form { margin: 0; }
.topbar-actions button, .topbar-actions .btn-link { width: auto; padding: 10px 16px; font-size: 14px; }
.topbar-actions button.ghost {
  background: var(--white); color: var(--ink-2); border: 1px solid var(--line);
}
.topbar-actions button.ghost:hover { background: var(--field); color: var(--ink); }

.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 16px; }
.bar h1 { font-size: 22px; margin: 0; text-align: left; }
.count {
  font-size: 12px; font-weight: 700; color: #b6520c; vertical-align: middle;
  background: rgba(249, 115, 22, .12); border-radius: 999px; padding: 3px 11px;
}

.filters {
  display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin-bottom: 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  box-shadow: 0 4px 14px -8px rgba(16, 24, 40, .2);
}
.filters input, .filters select { margin: 0; padding: 11px 13px; }
.filters button, .filters .btn-link { padding: 11px 16px; }
.filters .btn-link.ghost { background: var(--field); color: var(--ink-2); border: 1px solid var(--line); }
.filters .btn-link.ghost:hover { background: #eef0f4; color: var(--ink); }

.table-scroll {
  overflow-x: auto; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 4px 14px -8px rgba(16, 24, 40, .2);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--ink); }
th, td { padding: 12px 14px; text-align: left; white-space: nowrap; }
thead th {
  background: var(--field); color: var(--ink-2); border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
tbody tr + tr td { border-top: 1px solid var(--line); }
tbody tr:hover td { background: #f7f9fc; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.muted { color: var(--ink-2); }
.tag {
  display: inline-block; background: rgba(249, 115, 22, .12); color: #b6520c;
  border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 600;
}
.empty { text-align: center; color: var(--ink-2); padding: 40px; white-space: normal; }
.pager { display: flex; gap: 18px; align-items: center; justify-content: center; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.pager a { font-weight: 600; text-decoration: none; }
.pager a:hover { text-decoration: underline; }

@media (min-width: 760px) {
  .filters { grid-template-columns: 2fr 1.2fr 1.2fr 1fr 1fr auto auto; align-items: center; }
  .filters button, .filters .btn-link { width: auto; }
}
