@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-var.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-var.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --canvas: #fbf8f3;
  --card: #ffffff;
  --ink: #0f1b2d;
  --ink-hover: #1a2d4a;
  --gold: #b88e3d;
  --gold-dark: #967026;
  --gold-tint: #f3ebd8;
  --slate: #3b5a6f;
  --sage: #4a7062;
  --line: #e5dfd3;
  --line-strong: #d6cebe;
  --muted: #4a5568;
  --muted-2: #6e7a8a;
  --disabled: #a09a8f;
  --ok-bg: #ebf3ee;
  --ok-line: #c6ded0;
  --info-bg: #eaf0f4;
  --info-line: #d0dee5;
  --error: #ba1a1a;
  --error-bg: #ffdad6;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --shadow-card: 0 1px 3px rgb(15 27 45 / 6%);
  --shadow-gold: 0 0 0 1px var(--gold), 0 4px 12px rgb(184 142 61 / 18%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .page {
    padding: 3rem;
  }
}

.display,
h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

@media (min-width: 768px) {
  .display,
  h1 {
    font-size: 2rem;
  }
}

.lead {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 40rem;
}

.muted {
  color: var(--muted-2);
}

.page-header {
  margin-bottom: 2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.actions {
  margin: 1.5rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 2rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-primary:hover {
  background: var(--gold);
}

.btn-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
}

.alert-fee {
  background: var(--gold-tint);
  border: 1px solid var(--gold-dark);
  border-radius: var(--r-md);
  padding: 1rem;
  margin: 1rem 0;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--r-sm);
}

.badge-full {
  background: var(--ink);
  color: var(--card);
}

.badge-open {
  background: var(--ok-bg);
  color: var(--sage);
  border: 1px solid var(--ok-line);
}

.field {
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.field-hint {
  font-size: 0.875rem;
  color: var(--muted-2);
  margin: 0.25rem 0 0;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'],
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font: inherit;
  background: var(--card);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--gold-tint), 0 0 0 3px var(--gold);
}

.print-doc {
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
}

.print-table th,
.print-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.5rem;
}

@media print {
  body {
    background: #fff;
  }
  .no-print {
    display: none !important;
  }
}

.branch-list-section {
  margin-top: 2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.branch-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.branch-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.branch-row:hover {
  background: var(--gold-tint);
}

.branch-row-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.branch-name {
  font-weight: 600;
}

.branch-divider {
  height: 1px;
  background: var(--line-strong);
  margin: 0.5rem 0;
}

.badge-online {
  background: var(--info-bg);
  color: var(--slate);
  border: 1px solid var(--info-line);
}

.step-strip {
  margin: 0;
  padding-left: 1.25rem;
}

.progress-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.progress-step.is-active {
  font-weight: 700;
  color: var(--gold-dark);
}

.progress-step.is-done {
  color: var(--sage);
}

.progress-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 3rem;
}

.checkbox-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0.35rem 0;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--slate);
}

.received-lead {
  font-family: var(--font-display);
  font-size: 1.125rem;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  margin-bottom: 1rem;
}

.alert-ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  margin-bottom: 1rem;
}

.btn-sm {
  height: 36px;
  padding: 0 1rem;
  font-size: 0.75rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .admin-layout {
    grid-template-columns: 220px 1fr;
  }
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--ink);
}

.admin-nav-link.is-active {
  background: var(--gold-tint);
  font-weight: 600;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}

.queue-list {
  padding-left: 1.25rem;
}

.login-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}
