/* ==========================================================================
   Shop Job Board — Design System
   Flat, high-contrast, low-decoration style tuned for a fast internal tool
   plus a friendly customer-facing intake flow. Generated with the
   ui-ux-pro-max skill (Flat Design pattern, Inter/Poppins family, blue +
   orange brand pair) and hand-tuned for AA contrast on every badge color.
   ========================================================================== */

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

:root {
  /* Brand */
  --color-primary: #001D25;
  --color-primary-dark: #001D25;
  --color-on-primary: #FFFFFF;
  --color-secondary: #EFD970;
  --color-accent: #EFD970;
  --color-on-accent: #001D25;
  --color-accent-text: #8A6D00;
  --color-accent-tint: #FBF5D6;

  /* Surfaces */
  --color-background: #F6F6F2;
  --color-foreground: #001D25;
  --color-card: #FFFFFF;
  --color-card-foreground: #232323;
  --color-muted: #EEEDE6;
  --color-muted-foreground: #676767;
  --color-border: #DADADA;

  /* Status */
  --color-destructive: #922C2C;
  --color-on-destructive: #FFFFFF;
  --color-success: #337239;
  --color-warning: #BD6B1B;
  --color-ring: #001D25;

  /* Flag badges — all 700-weight shades, verified for white-text AA contrast */
  --flag-appointment_confirmed: #1D4ED8;
  --flag-dropped_off: #0E7490;
  --flag-customer_waiting: #B45309;
  --flag-parts_hold: #B91C1C;
  --flag-needs_authorization: #C2410C;
  --flag-warranty_hold: #6D28D9;
  --flag-insurance_hold: #7E22CE;
  --flag-ready_for_billing: #15803D;
  --flag-urgent: #991B1B;

  /* Type */
  --font-heading: 'Oswald', 'Segoe UI', sans-serif;
  --font-body: 'Montserrat', 'Segoe UI', sans-serif;

  /* Spacing scale — dashboard density (8–32px) with room to breathe on marketing sections */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0, 29, 37, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 29, 37, 0.12);
}

/* ---------------------------------------------------------------- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-card-foreground);
  background: var(--color-background);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; color: var(--color-primary-dark); margin: 0 0 var(--space-3); line-height: 1.25; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; margin-top: var(--space-4); }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* Visible, non-removed focus ring everywhere (accessibility requirement) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

.container { max-width: 1080px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-8); }
.muted { color: var(--color-muted-foreground); }
.text-ok { color: var(--color-success); font-weight: 600; }
.text-warn { color: var(--color-warning); font-weight: 600; }
.icon { width: 18px; height: 18px; stroke-width: 2; vertical-align: -4px; }

/* --------------------------------------------------------------- Layout --- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-4); }
.grid-2-wide { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-5); align-items: start; }
.grid-span-2 { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .grid-2-wide { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------- Navigation --- */
.nav { background: var(--color-primary); position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow-sm); }
.nav-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: var(--space-5); padding: var(--space-3) var(--space-4); color: #fff; }
.brand { font-family: var(--font-heading); font-weight: 700; color: #fff; font-size: 1.05rem; letter-spacing: 0.2px; white-space: nowrap; }
.brand:hover { text-decoration: none; opacity: 0.9; }
.nav-links { display: flex; gap: var(--space-4); flex: 1; flex-wrap: wrap; }
.nav-links a { color: rgba(255,255,255,0.85); font-weight: 500; font-size: 0.95rem; padding: var(--space-2) 0; }
.nav-links a:hover, .nav-links a.active { color: #fff; text-decoration: none; border-bottom: 2px solid var(--color-accent); }
.nav-user { display: flex; align-items: center; gap: var(--space-3); color: rgba(255,255,255,0.85); font-size: 0.9rem; white-space: nowrap; }
.nav-user em { color: var(--color-accent); font-style: normal; }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-inner { flex-wrap: wrap; }
  .nav-links { width: 100%; order: 3; gap: var(--space-3); }
}

/* -------------------------------------------------------------- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border); background: #fff; color: var(--color-primary-dark);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
  text-decoration: none;
}
.btn:hover { background: var(--color-muted); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover { background: #E4C94F; border-color: #E4C94F; }
.btn-accent { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); }
.btn-accent:hover { background: #062F3A; }
.btn-danger { background: #fff; border-color: var(--color-destructive); color: var(--color-destructive); }
.btn-danger:hover { background: var(--color-destructive); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-icon { padding: 0; width: 36px; min-height: 36px; }

/* ---------------------------------------------------------------- Cards --- */
.card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-5); margin-bottom: var(--space-4); box-shadow: var(--shadow-sm); }
.card-inner { background: var(--color-muted); border-radius: var(--radius-sm); padding: var(--space-4); margin-top: var(--space-3); }
.banner { display: flex; align-items: center; gap: var(--space-3); background: #FFF7ED; border: 1px solid #FDBA74; color: #9A3412; border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); font-weight: 600; }
.banner .btn { margin-left: auto; }

/* --------------------------------------------------------------- Forms --- */
label { display: block; font-weight: 600; font-size: 0.88rem; color: var(--color-card-foreground); margin-bottom: var(--space-4); }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; font-family: var(--font-body); font-size: 1rem;
  padding: 10px 12px; min-height: 44px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: #fff; color: var(--color-card-foreground); transition: border-color 150ms ease, box-shadow 150ms ease;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0,29,37,0.15); outline: none; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: auto; display: inline-block; margin: 0 8px 0 0; accent-color: var(--color-primary); }
.help-text { font-weight: 400; font-size: 0.82rem; color: var(--color-muted-foreground); margin-top: 4px; }
.error-text { font-weight: 600; font-size: 0.82rem; color: var(--color-destructive); margin-top: 4px; }
.field-error input, .field-error textarea, .field-error select { border-color: var(--color-destructive); }
.inline-form { display: flex; gap: var(--space-4); align-items: flex-end; flex-wrap: wrap; }
.inline-form label { margin-bottom: 0; }
fieldset { border: none; padding: 0; margin: 0 0 var(--space-4); }
legend { font-family: var(--font-heading); font-weight: 600; padding: 0 0 var(--space-2); }

/* --------------------------------------------------------------- Badges --- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2px; white-space: nowrap; }
.badge-outline { background: #fff; border: 1.5px solid var(--color-border); color: var(--color-muted-foreground); }
.flag-checks { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-3) 0; }
.flag-check { display: flex; align-items: center; margin: 0; font-weight: 400; cursor: pointer; }
.flag-check input { margin-right: 8px; }

/* ---------------------------------------------------------------- Flash --- */
.flash { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); margin-bottom: var(--space-4); font-weight: 600; border: 1px solid transparent; }
.flash-success { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.flash-error { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }

/* ---------------------------------------------------------------- Table --- */
.table { width: 100%; border-collapse: collapse; margin-top: var(--space-3); }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); font-size: 0.92rem; }
.table th { font-family: var(--font-heading); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-muted-foreground); }
.table tr:hover td { background: var(--color-muted); }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: var(--space-3); padding: var(--space-2); }
  .table td { border: none; padding: 6px 4px; }
  .table td::before { content: attr(data-label); display: block; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; color: var(--color-muted-foreground); }
}

/* -------------------------------------------------------- Job dashboard --- */
#job-list { display: flex; flex-direction: column; gap: var(--space-3); }
.job-row { display: flex; align-items: center; gap: var(--space-4); background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-3) var(--space-4); }
.job-row.dragging { opacity: 0.5; }
.job-row.drag-over { border-color: var(--color-accent); }
.drag-handle { cursor: grab; color: var(--color-muted-foreground); font-size: 1.3rem; line-height: 1; padding: 4px 6px; touch-action: none; user-select: none; }
.reorder-btns { display: flex; flex-direction: column; gap: 2px; }
.reorder-btns button { width: 28px; height: 22px; padding: 0; font-size: 0.7rem; line-height: 1; min-height: auto; }
.job-main { flex: 1; min-width: 0; }
.job-title { font-family: var(--font-heading); font-weight: 600; color: var(--color-primary-dark); font-size: 1rem; }
.job-sub { font-size: 0.85rem; color: var(--color-muted-foreground); margin-top: 2px; }
.job-flags { display: flex; flex-wrap: wrap; gap: 6px; max-width: 320px; }
.job-source-customer { border-left: 4px solid var(--color-accent); }
@media (max-width: 700px) {
  .job-row { flex-direction: column; align-items: stretch; gap: var(--space-3); }
  .job-flags { max-width: 100%; }
  .job-row > .drag-handle { display: none; }
  .job-row > .reorder-btns { flex-direction: row; align-self: flex-start; gap: var(--space-2); }
  .job-row > .reorder-btns button { width: 44px; height: 44px; font-size: 1rem; }
  .job-row > a.btn { align-self: flex-start; }
}

/* --------------------------------------------------------------- Clock ---- */
.clock-buttons { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-3) 0; }
.live-timer { font-family: 'Fira Code', monospace; font-weight: 700; font-size: 1.05rem; color: var(--color-accent-text); }

/* --------------------------------------------------------------- Parts ---- */
.part-row { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; border-bottom: 1px dashed var(--color-border); }
.part-photo { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); flex-shrink: 0; }
.part-desc { flex: 1; min-width: 0; }
.part-edit-form { margin-top: var(--space-3); }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* ------------------------------------------------------- Steps / wizard --- */
.steps { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: var(--space-6); }
.step { display: flex; align-items: center; gap: var(--space-2); color: var(--color-muted-foreground); font-weight: 600; font-size: 0.85rem; }
.step-circle { width: 30px; height: 30px; border-radius: 50%; background: var(--color-muted); color: var(--color-muted-foreground); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-size: 0.85rem; flex-shrink: 0; transition: background 200ms, color 200ms; }
.step.active .step-circle { background: var(--color-primary); color: #fff; }
.step.complete .step-circle { background: var(--color-success); color: #fff; }
.step.active, .step.complete { color: var(--color-card-foreground); }
.step-line { width: 40px; height: 2px; background: var(--color-border); margin: 0 var(--space-2); }
.step-line.complete { background: var(--color-success); }
.step-label { display: none; }
@media (min-width: 560px) { .step-label { display: inline; } }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: fadein 200ms ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.wizard-actions { display: flex; justify-content: space-between; margin-top: var(--space-5); gap: var(--space-3); }

/* --------------------------------------------------------- Customer site -- */
.hero { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%); color: #fff; padding: var(--space-8) var(--space-4); text-align: center; }
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: var(--space-3); }
.hero p { color: rgba(255,255,255,0.85); max-width: 520px; margin: 0 auto var(--space-5); font-size: 1.05rem; }
.hero-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.public-nav { background: var(--color-primary-dark); }
.tracking-code { font-family: 'Fira Code', monospace; font-size: 1.8rem; font-weight: 700; letter-spacing: 3px; color: var(--color-primary); background: var(--color-muted); border: 2px dashed var(--color-primary); border-radius: var(--radius-sm); padding: var(--space-4); text-align: center; margin: var(--space-4) 0; }
.status-timeline { list-style: none; margin: var(--space-4) 0; padding: 0; }
.status-timeline li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-left: 2px solid var(--color-border); padding-left: var(--space-4); margin-left: 14px; position: relative; }
.status-timeline li::before { content: ''; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-border); }
.status-timeline li.reached::before { background: var(--color-success); }
.status-timeline li.current::before { background: var(--color-accent); box-shadow: 0 0 0 4px rgba(239,217,112,0.55); }
.status-timeline li:last-child { border-left: 2px solid transparent; }
.trust-row { display: flex; gap: var(--space-6); justify-content: center; flex-wrap: wrap; margin-top: var(--space-6); color: var(--color-muted-foreground); font-size: 0.85rem; }
.trust-row div { display: flex; align-items: center; gap: 6px; }
.footer-note { text-align: center; color: var(--color-muted-foreground); font-size: 0.85rem; padding: var(--space-6) var(--space-4); }

/* ------------------------------------------------------- Sidebar shell --- */
.app-shell { display: flex; align-items: stretch; min-height: 100vh; background: var(--color-background); }
.sidebar { width: 240px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--color-border); padding: var(--space-4) var(--space-3); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-weight: 700; color: var(--color-primary-dark); padding: var(--space-2) var(--space-2) var(--space-5); font-size: 1.02rem; text-decoration: none; }
.sidebar-brand:hover { text-decoration: none; }
.sidebar-section-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--color-muted-foreground); font-weight: 700; margin: var(--space-4) var(--space-2) var(--space-2); }
.sidebar-section-label:first-of-type { margin-top: 0; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--color-card-foreground); font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.sidebar-link:hover { background: var(--color-muted); text-decoration: none; }
.sidebar-link.active { background: var(--color-accent); color: var(--color-on-accent); }
.sidebar-link .icon { width: 16px; height: 16px; }
.sidebar-footer { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-topbar { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--color-border); background: #fff; }
.main-inner { padding: var(--space-5); max-width: 1200px; }

/* --------------------------------------------------- Overview elements --- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-5); }
.stat-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-4); }
.stat-card-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--color-muted-foreground); font-weight: 600; }
.stat-value { font-family: var(--font-heading); font-size: 1.9rem; font-weight: 700; color: var(--color-primary-dark); margin-top: 6px; }
.stat-sub { font-size: 0.78rem; color: var(--color-muted-foreground); margin-top: 2px; }
.stat-card.stat-warn .stat-value { color: var(--color-warning); }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.quick-action-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: var(--space-5) var(--space-3); background: var(--color-muted); border-radius: var(--radius-sm); border: 1px solid var(--color-border); font-weight: 700; color: var(--color-card-foreground); text-align: center; cursor: pointer; }
.quick-action-tile:hover { background: var(--color-muted); text-decoration: none; }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; min-height: 0; }
  .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--color-border); flex-direction: row; flex-wrap: wrap; align-items: center; padding: var(--space-2) var(--space-3); }
  .sidebar-brand { padding: var(--space-2); }
  .sidebar-section-label { display: none; }
  .sidebar-link { margin-bottom: 0; }
  .sidebar-footer { margin-top: 0; padding-top: 0; border-top: none; margin-left: auto; }
  .stat-grid, .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------- Dashboard: polish v2 --- */
.stat-card-link { text-decoration: none; display: block; transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease; }
.stat-card-link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--color-primary); }
.stat-card-link.stat-active .stat-card { border-color: var(--color-primary); background: var(--color-accent-tint); }
.stat-icon-badge { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; }

.job-row { transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease; border-left: 4px solid transparent; }
.job-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--color-border); }
.job-row.urgency-urgent { border-left-color: var(--color-destructive); }
.job-row.urgency-hold { border-left-color: var(--color-warning); }
.job-row.urgency-ready { border-left-color: var(--color-success); }
.job-row[data-id] { animation: rowFadeIn 220ms ease both; }
@keyframes rowFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.tech-avatar { width: 26px; height: 26px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; font-family: var(--font-heading); flex-shrink: 0; vertical-align: -7px; margin-right: 6px; }
.tech-avatar-placeholder { width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--color-border); display: inline-flex; align-items: center; justify-content: center; color: var(--color-muted-foreground); font-size: 0.65rem; flex-shrink: 0; vertical-align: -7px; margin-right: 6px; }
.time-logged-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; color: var(--color-muted-foreground); background: var(--color-muted); border-radius: 999px; padding: 2px 8px; }

.badge.badge-urgent { animation: urgentPulse 2s ease-in-out infinite; }
@keyframes urgentPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(153,27,27,0.4); } 50% { box-shadow: 0 0 0 4px rgba(153,27,27,0); } }

.reorder-btns button, .drag-handle { transition: background 120ms ease, color 120ms ease; }
.job-row .btn-sm:hover { transform: none; }

/* -------------------------------------------------- Clock status banner --- */
.clock-status-banner { display: flex; align-items: center; gap: 12px; border-radius: var(--radius-sm); padding: 14px 16px; margin: 12px 0 16px; border: 1.5px solid; }
.clock-status-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.clock-status-running { background: #ECFDF5; border-color: #6EE7B7; color: #065F46; }
.clock-status-running .clock-status-dot { background: #059669; animation: dotPulse 1.6s ease-in-out infinite; }
.clock-status-stopped { background: var(--color-muted); border-color: var(--color-border); color: var(--color-muted-foreground); }
.clock-status-stopped .clock-status-dot { background: var(--color-muted-foreground); }
@keyframes dotPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(5,150,105,0.5); } 50% { box-shadow: 0 0 0 6px rgba(5,150,105,0); } }
.live-timer-big { font-family: 'Fira Code', monospace; font-weight: 700; font-size: 1.4rem; margin-top: 2px; }

.btn-current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; cursor: default; }
.btn-current:hover { background: var(--color-primary); }

/* ------------------------------------------------- Schedule strip -------- */
.schedule-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-2); }
.schedule-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--space-3) var(--space-2); border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border); background: var(--color-muted);
  color: var(--color-card-foreground); text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}
.schedule-day:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); background: #fff; border-color: var(--color-primary); }
.schedule-day-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--color-muted-foreground); }
.schedule-day-date { font-size: 0.78rem; color: var(--color-muted-foreground); }
.schedule-day-count { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--color-primary-dark); margin-top: 2px; }
.schedule-day-sub { font-size: 0.7rem; color: var(--color-muted-foreground); }
.schedule-day-today { background: var(--color-accent-tint); border-color: var(--color-primary); }
.schedule-day-today .schedule-day-label { color: var(--color-primary); }
.schedule-day-active { border-color: var(--color-accent); background: var(--color-accent-tint); }
.schedule-day-active .schedule-day-count { color: var(--color-accent-text); }
@media (max-width: 700px) {
  .schedule-strip { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------- Date picker ----- */
input.js-datepicker, input.js-datetimepicker { cursor: pointer; background-image: none; }
.flatpickr-calendar {
  font-family: var(--font-body);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}
.flatpickr-calendar.arrowTop:before, .flatpickr-calendar.arrowTop:after { border-bottom-color: var(--color-border); }
.flatpickr-months { padding-top: var(--space-2); }
.flatpickr-months .flatpickr-month { color: var(--color-primary-dark); fill: var(--color-primary-dark); }
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year { font-family: var(--font-heading); font-weight: 600; color: var(--color-primary-dark); }
.flatpickr-weekdays { background: var(--color-muted); }
span.flatpickr-weekday { font-family: var(--font-heading); font-weight: 700; color: var(--color-muted-foreground); text-transform: uppercase; font-size: 0.7rem; }
.flatpickr-day { border-radius: var(--radius-sm); font-weight: 500; }
.flatpickr-day.today { border-color: var(--color-accent); }
.flatpickr-day:hover, .flatpickr-day.today:hover { background: var(--color-muted); border-color: var(--color-border); }
.flatpickr-day.selected, .flatpickr-day.selected:hover {
  background: var(--color-primary); border-color: var(--color-primary); color: #fff;
}
.flatpickr-day.selected.today { box-shadow: 0 0 0 2px var(--color-accent) inset; }
.flatpickr-time input:hover, .flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus, .flatpickr-time .flatpickr-am-pm:focus { background: var(--color-muted); }
.flatpickr-day.inRange { background: var(--color-accent-tint); border-color: rgba(255,255,255,0.85); box-shadow: -5px 0 0 var(--color-accent-tint), 5px 0 0 var(--color-accent-tint); }
.numInputWrapper:hover { background: var(--color-muted); }
.flatpickr-current-month .numInputWrapper span.arrowUp:after { border-bottom-color: var(--color-primary-dark); }
.flatpickr-current-month .numInputWrapper span.arrowDown:after { border-top-color: var(--color-primary-dark); }

/* ------------------------------------------------ Brand refinements -------- */
h1, h2, h3, h4 { letter-spacing: 0.3px; }
.sidebar-brand, .brand { letter-spacing: 0.6px; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1.05rem; }
.clock-buttons { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.clock-buttons form { margin: 0; }
.btn-primary.btn-current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* -------------------------------------------------------------- Timeline --- */
.timeline-compose { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; margin-bottom: var(--space-5); }
.timeline-compose textarea { margin-top: 0; }
.timeline { position: relative; }
.tl-day { font-family: var(--font-heading); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--color-muted-foreground); margin: var(--space-4) 0 var(--space-2); padding-bottom: 4px; border-bottom: 1px solid var(--color-border); }
.tl-item { display: flex; gap: var(--space-3); padding: var(--space-2) 0; align-items: flex-start; }
.tl-avatar { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; font-family: var(--font-heading); flex-shrink: 0; }
.tl-body { min-width: 0; flex: 1; }
.tl-meta { font-size: 0.85rem; }
.tl-msg { font-size: 0.93rem; overflow-wrap: anywhere; }
.tl-event .tl-msg { color: var(--color-muted-foreground); }
.tl-comment .tl-body { background: var(--color-accent-tint); border: 1px solid #EFE2A3; border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); }
.tl-comment .tl-msg { color: var(--color-card-foreground); }

/* ------------------------------------------------------------- Reports ----- */
.quick-ranges { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.total-row td { border-top: 2px solid var(--color-border); background: var(--color-muted); }

/* ----------------------------------------------------------- Signature pad -- */
.sig-pad { position: relative; margin: var(--space-2) 0 var(--space-3); }
.sig-pad canvas { display: block; width: 100%; height: 180px; background: #fff; border: 1.5px dashed var(--color-muted-foreground); border-radius: var(--radius-sm); touch-action: none; cursor: crosshair; }
.sig-pad.signed canvas { border-style: solid; border-color: var(--color-primary); }
.sig-pad .sig-clear { position: absolute; top: 8px; right: 8px; }
.sig-pad .sig-hint { position: absolute; left: 14px; bottom: 10px; font-size: .8rem; color: var(--color-muted-foreground); pointer-events: none; }
.sig-pad.signed .sig-hint { display: none; }
.sig-msg { color: var(--color-destructive); font-weight: 600; font-size: .85rem; min-height: 1.2em; }
.sig-img { max-width: 320px; width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #fff; display: block; }

/* ---------------------------------------------------- Customer lookup ------- */
.lookup { position: relative; }
.lookup-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 2px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); max-height: 300px; overflow-y: auto; }
.lookup-item { display: block; width: 100%; text-align: left; padding: 10px 14px; background: #fff; border: 0; border-bottom: 1px solid var(--color-border); cursor: pointer; font: inherit; color: var(--color-card-foreground); }
.lookup-item:last-child { border-bottom: 0; }
.lookup-item:hover, .lookup-item:focus { background: var(--color-accent-tint); outline: none; }
.lookup-item small { display: block; color: var(--color-muted-foreground); font-size: .78rem; }
.lookup-bikes { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 var(--space-3); }
.lookup-banner { background: var(--color-accent-tint); border: 1px solid #E9D98A; border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); font-size: .9rem; }

.auth-terms { font-size: .78rem; line-height: 1.55; color: var(--color-muted-foreground); margin: var(--space-2) 0 var(--space-4); text-align: justify; }

/* ------------------------------------------------------- Flag picker ------- */
.flag-edit { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; border: 1.5px dashed var(--color-muted-foreground); background: #fff; color: var(--color-muted-foreground); font: 600 .75rem var(--font-body); cursor: pointer; }
.flag-edit:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-accent-tint); }
.flag-edit .icon { width: 13px; height: 13px; }
.flag-pop { position: absolute; z-index: 60; width: min(360px, calc(100vw - 16px)); display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.flag-chip { border: 2px solid var(--c); background: #fff; color: var(--c); font: 700 .78rem var(--font-body); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.flag-chip.on { background: var(--c); color: #fff; }
.flag-chip.on::before { content: "\2713 "; }
.flag-chip:disabled { opacity: .6; cursor: progress; }
.flag-pop-msg { width: 100%; font-size: .78rem; color: var(--color-muted-foreground); }
.flag-save-status { color: var(--color-success); font-weight: 600; margin-left: 6px; }
