@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  /* Brand palette sampled from the Sal's logo: charcoal field, gold wordmark, and the car's red -> blue gradient + green underline. */
  --black: #212121; --ink: #1d1d1d; --accent: #c4a414; --accent-hover: #d6b520; --accent-ink: #675806; --accent-soft: #f4eecb;
  --car-red: #9a1627; --car-purple: #4e1263; --car-blue: #14118c; --green: #2b7929;
  --paper: #e1dfd9; --white: #fff; --muted: #57534b; --line: #cfccc2;
  --danger: #b3182e; --danger-soft: #fbe6e9; --ok: #2b7929; --warn: #b36b00; --blue: #2f3fae;
  --stripe: linear-gradient(90deg, var(--car-red), var(--car-purple) 55%, var(--car-blue));
  --radius: 10px; --shadow: 0 2px 10px rgba(0,0,0,.08);
  --head: 'Space Grotesk', system-ui, sans-serif; --body: 'Raleway', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 500 15px/1.5 var(--body); color: var(--ink); background: var(--paper); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; }
a { color: var(--accent-ink); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .right { text-align: right; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 0; min-width: 0; }
.stack > * + * { margin-top: 12px; }

/* header */
.topbar { background: var(--black); color: var(--paper); border-bottom: 4px solid transparent; border-image: var(--stripe) 1; }
.topbar .in { max-width: 1280px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { font: 700 1.15rem var(--head); color: var(--paper); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand img { height: 38px; width: auto; }
.brand b { color: var(--accent); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--paper); text-decoration: none; padding: 6px 12px; border-radius: 6px; font-weight: 600; opacity: .85; }
.nav a:hover { opacity: 1; background: #2a2a2a; }
.nav a.active { background: var(--accent); color: var(--black); opacity: 1; }
.topbar .phone { color: var(--paper); text-decoration: none; font-weight: 700; }

/* layout */
.wrap { max-width: 1280px; margin: 0 auto; padding: 20px; }
.narrow { max-width: 860px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }

/* controls */
label { display: block; font-weight: 700; font-size: .82rem; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
textarea { min-height: 70px; resize: vertical; }
.btn { font: 700 .95rem var(--body); border: 0; border-radius: 8px; padding: 10px 18px; cursor: pointer; background: var(--accent); color: var(--black); text-decoration: none; display: inline-block; }
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.dark { background: var(--black); color: #fff; } .btn.dark:hover { background: #3a3a3a; }
.btn.sm { padding: 5px 11px; font-size: .82rem; }
.err { background: var(--danger-soft); color: var(--danger); border: 1px solid #efb3bb; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.note { background: #fff7e6; border: 1px solid #f0d9a5; padding: 10px 12px; border-radius: 8px; }

/* chips / badges */
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #eee; color: #444; text-transform: uppercase; letter-spacing: .03em; }
.badge.scheduled { background: #e6eefc; color: #1f4fa8; } .badge.in_progress { background: #fff1d6; color: #8a5800; }
.badge.done { background: #dff3e8; color: #17653a; } .badge.cancelled, .badge.no_show { background: #eee; color: #777; }
.badge.red { background: var(--danger); color: #fff; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px; border-bottom: 2px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--paper); }
td input, td select { padding: 6px 8px; }

/* modal & toast */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow: auto; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 760px; padding: 22px; box-shadow: 0 10px 40px rgba(0,0,0,.35); border-top: 5px solid var(--accent); }
.modal.wide { max-width: 980px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.x { background: none; border: 0; font-size: 1.6rem; cursor: pointer; line-height: 1; color: var(--muted); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--black); color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 600; z-index: 99; border-left: 4px solid var(--accent); }

@media (max-width: 640px) { .wrap { padding: 12px; } .modal { padding: 14px; } h1 { font-size: 1.5rem; } }

/* cropped logo (shared by site + staff headers) */
.logo-crop { display: block; overflow: hidden; width: 140px; height: 92px; flex: none; } .logo-crop img { width: 160px; max-width: none; height: auto; margin: -36px 0 0 -20px; display: block; }

/* Accessibility: skip link, visible keyboard focus, reduced motion */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: #111; color: #fff !important; padding: 10px 16px; border-radius: 3px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 8px; outline: 3px solid #ffd84a; }
#main:focus { outline: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .btn-s:focus-visible, .s-cta:focus-visible { outline: 3px solid #111; outline-offset: 2px; box-shadow: 0 0 0 6px var(--accent, #ffd84a); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* phones: staff pages. Keep content inside the screen, and make the menu one swipeable row instead of a tall block */
@media (max-width: 640px) {
  .split > * { min-width: 0; }
  .card { overflow-x: auto; }
  .topbar .in { gap: 6px 12px; padding: 8px 14px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; flex-basis: 100%; order: 3; scrollbar-width: none; }
  .nav a { white-space: nowrap; padding: 10px 12px; }
  tr[data-d] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  tr[data-d] td { padding: 0; border: 0; width: auto !important; }
  tr[data-d] td:first-child { flex: 1 0 40%; }
  tr[data-d] input[type=time] { width: 128px; }
}
