@font-face {
  font-family: "Druk Local";
  src: url(/fonts/drukwidecyr-medium.D05BX1Bq.woff2) format("woff2");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Druk Local";
  src: url(/fonts/drukwidecyr-bold.BmSxsSWv.woff2) format("woff2");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: "Mazzard Local";
  src: url(/fonts/MazzardM-Regular.DvwoIqsG.woff2) format("woff2");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Mazzard Local";
  src: url(/fonts/MazzardM-SemiBold.Bt5jLnOR.woff2) format("woff2");
  font-weight: 600 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f7f6;
  --panel: #ffffff;
  --card: #ffffff;
  --field: #ffffff;
  --field-line: #d8d8d4;
  --border: #e0e0dd;
  --ink: #151514;
  --muted: #82827f;
  --dim: #adadaa;
  --accent: #baee2a;
  --accent-hover: #95be22;
  --accent-pressed: #708f19;
  --accent-text: #708f19;
  --accent-wash: #f1fcd4;
  --error: #cc3f12;
  --success: #329834;
  --font-display: "Druk Local", "Unbounded", "Arial Black", sans-serif;
  --font-body: "Mazzard Local", "Manrope", "Helvetica Neue", Arial, sans-serif;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

a { color: inherit; }

.brand {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding-bottom: 10px;
  position: relative;
  margin-bottom: 22px;
}
.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px);
}

/* ---- login card ---- */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(21, 21, 20, 0.08);
  padding: 32px;
}
.card h1, .card h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin: 0 0 24px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}
input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 18px;
  transition: border-color .2s;
}
input::placeholder { color: var(--dim); }
input:focus {
  outline: none;
  border-color: var(--accent);
}

button, .btn-ghost, .btn-accent {
  font-family: inherit;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  padding: 13px 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  transition: background-color .2s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.55; cursor: default; }

.error {
  color: var(--error);
  font-size: 0.85rem;
  margin: -10px 0 16px;
  min-height: 1em;
}
.success {
  color: var(--success);
  font-size: 0.85rem;
  margin: -10px 0 16px;
  min-height: 1em;
}

/* ---- admin dashboard ---- */

header.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.admin-header .brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding: 0;
}
header.admin-header .brand::after { display: none; }
header.admin-header .brand strong {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
header.admin-header .brand span {
  color: var(--muted);
  font-size: 0.85rem;
}
header.admin-header .right { display: flex; align-items: center; gap: 16px; }
#whoami { color: var(--dim); font-size: 0.85rem; }
#count { color: var(--muted); font-size: 0.85rem; }

.btn-ghost {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--accent-hover); color: var(--accent-text); }

.btn-accent {
  padding: 11px 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color .2s;
}
.btn-accent:hover { background: var(--accent-hover); }
.btn-accent:disabled { opacity: 0.55; cursor: default; }

main.admin-main { padding: 32px; max-width: 1280px; margin: 0 auto; }
.empty {
  color: var(--muted);
  padding: 80px 0;
  text-align: center;
  font-size: 0.95rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.lead {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(21, 21, 20, 0.04);
  transition: border-color .2s, box-shadow .2s;
}
.lead:hover { border-color: var(--field-line); box-shadow: 0 6px 20px rgba(21, 21, 20, 0.08); }

.lead__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.lead__date {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.lead__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.lead__fields--shipping {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.field label {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.field span {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.field span.dim { color: var(--dim); }
