:root {
  --bg-kiosk: #fff;
  --surface-kiosk: #000;
  --surface-kiosk-2: #000;
  --accent-in: #000;
  --accent-in-dark: #000;
  --accent-out: #f59e0b;
  --accent-out-dark: #d68a05;
  --text-light: #f1f5f9;
  --muted-light: #fff;

  --bg-admin: #f6f7fb;
  --surface-admin: #ffffff;
  --border: #e3e6ee;
  --text-dark: #101828;
  --muted-dark: #667085;
  --accent-admin: #000;
  --accent-admin-hover: #222;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #b45309;
  --warning-bg: #fffbeb;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-out);
  outline-offset: 2px;
}

.lang-bar {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--border);
}
.lang-bar .btn.active {
  font-weight: 700;
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.mkt-bilingual {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-out-dark);
  margin: -12px 0 24px;
}

.mock-lang {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mock-lang-row {
  display: flex;
  gap: 8px;
}

.mock-lang-chip {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-dark);
}

.mock-lang-chip.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

.mock-lang-card {
  border: 1px solid #000;
  border-radius: 12px;
  padding: 16px;
}

.mock-lang-label {
  font-weight: 700;
  font-size: 16px;
}

.mock-lang-sub {
  font-size: 13px;
  color: var(--muted-dark);
  margin-top: 2px;
}

/* =========================================================
   KIOSK
   ========================================================= */

body.kiosk {
  background: white;
  color: var(--accent-in);
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.kiosk-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kiosk-logo {
  max-width: 300px;
  max-height: 150px;
  object-fit: contain;
  margin-bottom: 8px;
}

.kiosk-business-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-in);
  margin-bottom: 28px;
}

.kiosk-clock-time {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  padding-bottom: 25px;
}

.pin-display {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  min-height: 22px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--accent-in);
  background: transparent;
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: var(--accent-in);
  border-color: var(--accent-in);
}

.pin-error {
  color: #dc2626;
  font-size: 14px;
  height: 18px;
  margin-bottom: 12px;
  text-align: center;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, 84px);
  gap: 16px;
}

.pad button {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  border: 1px solid #2c3c5e;
  background: var(--surface-kiosk);
  color: var(--text-light);
  font-size: 28px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease;
}

.pad button:active {
  transform: scale(0.95);
  background: var(--surface-kiosk-2);
}

.pad button.pad-action {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted-light);
}


/* =========================================================
   EMPLOYEE SCREEN
   ========================================================= */

.employee-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
}

.employee-greeting {
  font-size: 14px;
  color: var(--accent-in);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.employee-name {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.employee-status {
  font-size: 14px;
  color: var(--accent-in);
  margin-bottom: 32px;
}

.clock-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.clock-btn {
  padding: 20px;
  border-radius: 16px;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.clock-btn:active {
  transform: scale(0.98);
}

.clock-btn.in {
  background: var(--accent-in);
}

.clock-btn.in:hover {
  background: var(--accent-out-dark);
}

.clock-btn.out {
  background: var(--accent-out);
}

.clock-btn.out:hover {
  background: var(--accent-out-dark);
}

.clock-btn.disabled {
  background: #000;
  color: #fff;
  cursor: not-allowed;
}

.cancel-link {
  margin-top: 24px;
  background: none;
  border: none;
  color: var(--accent-in);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.confirm-screen {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.confirm-icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.confirm-text {
  font-size: 22px;
  font-weight: 700;
}

.confirm-sub {
  color: var(--accent-in);
  margin-top: 6px;
}

.hidden {
  display: none !important;
}


/* =========================================================
   TASK PICKER
   ========================================================= */

.task-picker {
  width: 100%;
  text-align: left;
  margin-bottom: 24px;
}

.task-picker label {
  display: block;
  font-size: 13px;
  color: var(--accent-in);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-picker select {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #000;
  background: var(--bg-kiosk);
  color: var(--accent-in);
  font-size: 16px;
}


/* =========================================================
   ADMIN
   ========================================================= */

body.admin {
  background: var(--bg-admin);
  color: var(--text-dark);
  min-height: 100vh;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-admin);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.admin-brand img {
  height: 85px;
  max-width: 170px;
  object-fit: contain;
}

.admin-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted-dark);
  font-size: 14px;
  font-weight: 600;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: #eef0fb;
  color: var(--accent-admin);
}

.logout-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted-dark);
}

.admin-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.admin-content h1 {
  font-size: 22px;
  margin: 0 0 20px;
}

.card {
  background: var(--surface-admin);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.card h2 {
  font-size: 16px;
  margin: 0 0 16px;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-dark);
}

.field input,
.field select {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  min-width: 160px;
}

.field select[multiple] {
  min-height: 90px;
}

.field input[type="color"] {
  min-width: 48px;
  width: 48px;
  padding: 3px;
  height: 38px;
}

.btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: var(--accent-admin);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-admin-hover);
}

.btn.secondary {
  background: var(--surface-admin);
  color: var(--text-dark);
  border: 1px solid var(--border);
}

.btn.danger {
  background: var(--danger);
}

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* =========================================================
   TABLES
   ========================================================= */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-dark);
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
}

td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.active {
  background: #ecfdf5;
  color: #047857;
}

.badge.inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.error-msg {
  color: var(--danger);
  background: var(--danger-bg);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.warning-msg {
  color: var(--warning);
  background: var(--warning-bg);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-admin);
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface-admin);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.login-card h1 {
  font-size: 18px;
  margin: 0 0 20px;
  text-align: center;
}

.login-card p.sub {
  text-align: center;
  color: var(--muted-dark);
  font-size: 13px;
  margin-top: -12px;
  margin-bottom: 20px;
}

.login-card .field {
  margin-bottom: 14px;
}

.login-card input {
  width: 100%;
}

.login-card .btn {
  width: 100%;
  margin-top: 8px;
}


/* =========================================================
   TIME / SESSION BLOCKS
   ========================================================= */

.day-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8f9fc;
  font-weight: 600;
  font-size: 13px;
}

.day-total {
  font-family: var(--font-mono);
  color: var(--accent-admin);
}

.session-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.session-row select,
.session-row input[type="datetime-local"] {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.unpaired {
  color: var(--danger);
  font-weight: 600;
}

.muted {
  color: var(--muted-dark);
}

.employee-select-bar {
  margin-bottom: 18px;
}


/* =========================================================
   TABS
   ========================================================= */

.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-dark);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn.active {
  color: var(--accent-admin);
  border-bottom-color: var(--accent-admin);
}


/* =========================================================
   COLORS / PILLS
   ========================================================= */

.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  color: var(--text-dark);
}

.pill .swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}


/* =========================================================
   CUSTOMERS & TASKS
   ========================================================= */

.customer-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}

.customer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f8f9fc;
  border-bottom: 1px solid var(--border);
}

.customer-header .name {
  font-weight: 700;
  flex: 1;
}

.task-list {
  padding: 4px 16px;
}

.task-row,
.subtask-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.task-row:last-child,
.subtask-row:last-child {
  border-bottom: none;
}

.subtask-row {
  margin-left: 26px;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}

.task-row .name,
.subtask-row .name {
  font-weight: 600;
  min-width: 140px;
}

.task-planned {
  font-size: 12px;
  color: var(--muted-dark);
}

.add-task-row {
  padding: 10px 0;
}


/* =========================================================
   WEEKLY GRID
   ========================================================= */

.week-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.week-label {
  font-weight: 700;
  font-size: 15px;
  min-width: 220px;
}

.grid-table th,
.grid-table td {
  text-align: center;
}

.grid-table td.task-cell,
.grid-table th.task-cell {
  text-align: left;
}

.grid-table .hours-zero {
  color: #c1c6d4;
}

.grid-table tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--border);
  border-bottom: none;
}

.search-bar {
  margin-bottom: 16px;
}

.search-bar input {
  width: 100%;
  max-width: 360px;
  padding: 9px 12px 9px 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--surface-admin) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
}

.search-bar input::placeholder {
  color: #9ca3af;
}

.search-bar input:hover {
  border-color: #c9ceda;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent-admin);
}

/* Customer planned-hours badge: "42.5 / 120h" with a thin progress bar. */
.customer-budget {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  min-width: 92px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-dark);
  font-variant-numeric: tabular-nums;
}

.customer-budget .budget-bar {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.customer-budget .budget-bar span {
  display: block;
  height: 100%;
  background: #047857;
}

.customer-budget.over {
  color: var(--danger);
}

.customer-budget.over .budget-bar span {
  background: var(--danger);
}


/* =========================================================
   SYSTEM ADMIN
   ========================================================= */

.seat-usage {
  font-size: 13px;
  color: var(--muted-dark);
}

.seat-usage.full {
  color: var(--danger);
  font-weight: 600;
}


/* =========================================================
   PAY & COMPLIANCE
   ========================================================= */

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-dark);
  padding-bottom: 4px;
}

.cal-day {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-admin);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  min-height: 40px;
}

.cal-day:hover {
  border-color: var(--accent-admin);
}

.cal-day.other-month {
  color: #c1c6d4;
  cursor: default;
}

.cal-day.other-month:hover {
  border-color: var(--border);
}

.cal-day.weekend-auto {
  background: #f8f9fc;
}

.cal-day.premium {
  background: #eef0fb;
  border-color: var(--accent-admin);
  color: var(--accent-admin);
  font-weight: 700;
}

.cal-day .cal-mult {
  position: absolute;
  bottom: 3px;
  font-size: 9px;
  font-weight: 600;
}

.pay-row input[type="number"],
.pay-row input[type="time"] {
  width: 100%;
}

.pay-row .clock-window-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pay-row td {
  min-width: 90px;
}


/* =========================================================
   SITE FOOTER
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  margin-top: 40px;
}

.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--muted-dark);
}

.site-footer-links {
  display: flex;
  gap: 16px;
}

.site-footer-links a {
  color: var(--muted-dark);
  text-decoration: none;
  font-weight: 600;
}

.site-footer-links a:hover {
  color: var(--accent-admin);
  text-decoration: underline;
}

.site-footer--floating {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface-admin);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  margin-top: 0;
}

.site-footer--floating .site-footer-inner {
  font-size: 12px;
}

.site-footer--kiosk {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: none;
  padding: 10px 16px;
  margin-top: 0;
  text-align: center;
}

.site-footer--kiosk .site-footer-inner {
  justify-content: center;
  font-size: 11px;
  color: #9ca3af;
}

.site-footer--kiosk .site-footer-links a {
  color: #9ca3af;
}


/* =========================================================
   LEGAL / CONTACT PAGES
   ========================================================= */

.mkt-legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.mkt-legal h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.mkt-legal-updated {
  color: var(--muted-dark);
  font-size: 13px;
  margin: 0 0 40px;
}

.mkt-legal h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 40px 0 12px;
}

.mkt-legal h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 8px;
}

.mkt-legal p,
.mkt-legal li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dark);
}

.mkt-legal ul {
  padding-left: 20px;
}

.mkt-legal a {
  color: var(--accent-admin);
}

.mkt-legal-placeholder {
  background: #fffbeb;
  color: var(--warning);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.mkt-contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 480px;
  margin-top: 28px;
}

.mkt-contact-form .field input,
.mkt-contact-form .field textarea {
  width: 100%;
}

.mkt-contact-form textarea {
  resize: vertical;
  font-family: var(--font);
}

.mkt-contact-form .btn {
  align-self: flex-start;
}

.mkt-contact-note {
  font-size: 13px;
  color: var(--muted-dark);
  margin-top: 14px;
}


/* =========================================================
   MARKETING / LANDING PAGE
   ========================================================= */

body.marketing {
  background: var(--bg-admin);
  color: var(--text-dark);
  min-height: 100vh;
}

.mkt-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-admin);
  border-bottom: 1px solid var(--border);
}

.mkt-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mkt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mkt-logo {
  height: 85px;
  width: auto;
  object-fit: contain;
}

.mkt-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.mkt-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mkt-nav-links a:not(.btn) {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.mkt-nav-links a:not(.btn):hover {
  color: var(--accent-admin);
}


/* =========================================================
   MARKETING HERO
   ========================================================= */

.mkt-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 56px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: center;
}

.mkt-hero-visual {
  width: 100%;
}

.mkt-clock {
  background: #000;
  color: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.mkt-clock-time {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.mkt-clock-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-out);
}

.mkt-hero-copy h1 {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  max-width: 15ch;
}

.mkt-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted-dark);
  max-width: 46ch;
  margin: 0 0 28px;
}

.mkt-hero-ctas {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.mkt-text-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* =========================================================
   HOW IT WORKS
   ========================================================= */

.mkt-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}

.mkt-section h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

.mkt-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.mkt-steps li {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mkt-step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-out);
  font-weight: 700;
}

.mkt-steps h3 {
  font-size: 17px;
  margin: 0;
}

.mkt-steps p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-dark);
  margin: 0;
}


/* =========================================================
   MARKETING FEATURES
   ========================================================= */

.mkt-feature {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.mkt-feature.reverse .mkt-feature-copy {
  order: 2;
}

.mkt-feature.reverse .device-frame {
  order: 1;
}

.mkt-feature-copy h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  max-width: 18ch;
}

.mkt-feature-copy p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted-dark);
  max-width: 42ch;
  margin: 0;
}

.device-frame {
  background: var(--surface-admin);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 16px 40px -24px rgba(16, 24, 40, 0.35);
}


/* =========================================================
   MOCK KIOSK
   ========================================================= */

.mock-kiosk {
  background: #fff;
  border: 1px solid #000;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
}

.mock-kiosk .kiosk-logo {
  max-width: 180px;
  max-height: 70px;
  margin-bottom: 12px;
}

.mock-kiosk-brand {
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.mock-pin-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.mock-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #000;
}

.mock-dot.filled {
  background: #000;
}

.mock-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.mock-pad span {
  padding: 10px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}


/* =========================================================
   MOCK CUSTOMERS
   ========================================================= */

.mock-customers {
  background: #fff;
  border-radius: 12px;
  font-size: 13px;
}

.mock-customer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.mock-customer-row:first-child {
  padding-top: 0;
}

.mock-task-row {
  padding: 8px 0 8px 20px;
  color: var(--muted-dark);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mock-task-row.sub {
  padding-left: 36px;
  font-size: 12px;
}


/* =========================================================
   MOCK CHART
   ========================================================= */

.mock-chart {
  background: #fff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mock-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 50px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.mock-bar-label {
  color: var(--muted-dark);
  text-align: right;
}

.mock-bar {
  height: 14px;
  background: var(--accent-admin);
  border-radius: 4px;
}

.mock-bar-val {
  font-family: var(--font-mono);
}


/* =========================================================
   MOCK PAYROLL
   ========================================================= */

.mock-payroll {
  background: #fff;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.mock-payroll-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.mock-payroll-row:last-child {
  border-bottom: none;
}

.mock-payroll-row.total {
  border-top: 1px solid #000;
  border-bottom: none;
  margin-top: 4px;
  padding-top: 14px;
  font-weight: 700;
}

.mock-payroll-val {
  font-variant-numeric: tabular-nums;
}


/* =========================================================
   PRICING
   ========================================================= */

body.marketing .mkt-pricing {
  width: 100%;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 64px 24px;
}

body.marketing .mkt-pricing-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

body.marketing .mkt-pricing-heading {
  max-width: 600px;
  margin: 0 0 36px;
}

body.marketing .mkt-pricing .mkt-eyebrow {
  display: block;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-out-dark);
}

body.marketing .mkt-pricing-heading h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-dark);
}

body.marketing .mkt-pricing-heading p {
  margin: 0;
  color: var(--muted-dark);
  font-size: 15px;
  line-height: 1.6;
}

body.marketing .mkt-pricing-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

body.marketing .mkt-pricing .pricing-card {
  position: relative;
  min-width: 0;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

body.marketing .mkt-pricing .pricing-card-featured {
  padding: 23px;
  border: 2px solid #000;
}

body.marketing .mkt-pricing .pricing-card-top {
  min-width: 0;
}

body.marketing .mkt-pricing .pricing-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-out);
  color: #000;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.marketing .mkt-pricing .pricing-limit {
  display: block;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--muted-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.marketing .mkt-pricing .pricing-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  color: var(--text-dark);
}

body.marketing .mkt-pricing .pricing-card h3 span {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  color: var(--muted-dark);
}

body.marketing .mkt-pricing .pricing-card p {
  margin: 0;
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.55;
}

body.marketing .mkt-pricing .pricing-btn {
  display: block;
  width: 100%;
  margin-top: 24px;
  text-align: center;
  text-decoration: none;
}

body.marketing .mkt-pricing .pricing-note {
  margin: 22px 0 0;
  text-align: center;
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  body.marketing .mkt-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px; /* room for the "Most popular" badge */
  }

  /* 5 cards in 2 columns: let the last one span the row instead of sitting alone */
  body.marketing .mkt-pricing .pricing-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.marketing .mkt-pricing {
    padding: 48px 24px;
  }

  body.marketing .mkt-pricing-heading h2 {
    font-size: 27px;
  }
}

@media (max-width: 600px) {
  body.marketing .mkt-pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.marketing .mkt-pricing .pricing-card {
    min-height: 0;
    padding: 22px 20px;
  }

  body.marketing .mkt-pricing .pricing-card-featured {
    padding: 21px 19px; /* keeps the 2px border from shifting the layout */
  }

  body.marketing .mkt-pricing .pricing-btn {
    margin-top: 20px;
    padding: 13px 18px; /* bigger tap target */
  }
}

@media (max-width: 420px) {
  body.marketing .mkt-pricing {
    padding: 40px 20px;
  }
}

body.marketing .founding-offer {
  margin-bottom: 36px;
  padding: 30px 32px;
  background: #111;
  color: #fff;
  border-left: 5px solid var(--accent-out);
  border-radius: 14px;
}

body.marketing .founding-offer-label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-out);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

body.marketing .founding-offer h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.2;
}

body.marketing .founding-offer p {
  max-width: 650px;
  margin: 0 0 14px;
  color: #e5e7eb;
  font-size: 15px;
  line-height: 1.6;
}

body.marketing .founding-offer-note {
  color: var(--accent-out);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

/* Discounted price display */
body.marketing .discount-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

body.marketing .mkt-pricing .discount-price h3 {
  margin: 0;
}

body.marketing .original-price {
  color: var(--muted-dark);
  font-size: 13px;
  text-decoration: line-through;
}

body.marketing .discount-tag {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 5px;
  background: #fef3c7;
  color: #92400e;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* Founding price duration note */
body.marketing .mkt-pricing .pricing-card .founding-duration {
  margin: 0 0 12px;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}

/* Mobile layout */
@media (max-width: 600px) {
  body.marketing .founding-offer {
    padding: 24px 20px;
  }

  body.marketing .founding-offer h2 {
    font-size: 23px;
  }

  body.marketing .discount-price {
    gap: 7px;
  }
}

/* =========================================================
   KIOSK CTA
   ========================================================= */

.mkt-kiosk-cta {
  background: #000;
  color: #fff;
  padding: 64px 24px;
  text-align: center;
}

.mkt-kiosk-cta h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 10px;
}

.mkt-kiosk-cta p {
  color: #c7c7c7;
  margin: 0 0 28px;
  font-size: 14px;
}

.mkt-kiosk-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.mkt-kiosk-prefix {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #9ca3af;
  background: #111;
  border: 1px solid #333;
  border-right: none;
  padding: 11px 10px 11px 14px;
  border-radius: 8px 0 0 8px;
}

.mkt-kiosk-form input {
  font-family: var(--font-mono);
  font-size: 14px;
  width: 260px;
  height: 37px;
  padding: 1px 10px;
  border: 1px solid #333;
  border-right: none;
  background: #111;
  color: #fff;
  min-width: 160px;
}

.mkt-kiosk-form input::placeholder {
  color: #666;
}

.mkt-kiosk-form .btn {
  border-radius: 0 8px 8px 0;
  background: var(--accent-out);
  color: #000;
  font-weight: 700;
}

.mkt-kiosk-form .btn:hover {
  background: var(--accent-out-dark);
}

.mkt-kiosk-error {
  color: var(--accent-out);
  font-size: 13px;
  margin-top: 12px;
}


/* =========================================================
   OLD MARKETING FOOTER
   ========================================================= */

.mkt-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted-dark);
}

.mkt-footer a {
  color: var(--muted-dark);
}


/* =========================================================
   MARKETING RESPONSIVE
   ========================================================= */

@media (max-width: 950px) {
  .mkt-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .mkt-nav-inner {
    padding: 14px 20px;
  }

  .mkt-nav-links {
    gap: 12px;
  }

  .mkt-nav-links a:not(.btn) {
    display: none;
  }

  .mkt-logo {
    height: 65px;
  }

  .mkt-hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
    gap: 32px;
  }

  .mkt-hero-visual {
    max-width: 300px;
  }

  .mkt-hero-copy h1 {
    font-size: 32px;
    max-width: none;
  }

  .mkt-lede {
    font-size: 16px;
  }

  .mkt-steps {
    grid-template-columns: 1fr;
  }

  .mkt-feature,
  .mkt-feature.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .mkt-feature.reverse .mkt-feature-copy,
  .mkt-feature.reverse .device-frame {
    order: initial;
  }

  .mkt-feature-copy h2 {
    max-width: none;
  }

  .mkt-pricing {
    padding: 48px 24px;
  }

  .mkt-pricing-heading h2 {
    font-size: 27px;
  }
}

@media (max-width: 600px) {
  .mkt-pricing-grid {
    grid-template-columns: 1fr;
  }

  body.marketing .mkt-pricing .pricing-card {
    min-height: 0;
  }

  .pricing-card {
    min-height: 0;
  }

  .mkt-kiosk-form {
    max-width: 100%;
  }

  .mkt-kiosk-form input {
    width: 100%;
    flex: 1 1 100%;
    border-right: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .mkt-kiosk-form .btn {
    width: 100%;
    border-radius: 8px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media (max-width: 420px) {
  body.kiosk {
    padding: 16px;
  }

  .pad {
    grid-template-columns: repeat(3, 72px);
    gap: 12px;
  }

  .pad button {
    width: 72px;
    height: 72px;
    font-size: 24px;
  }

  .kiosk-clock-time {
    font-size: 34px;
  }

  .employee-card {
    padding: 32px 22px;
  }

  .mkt-hero {
    padding-left: 20px;
    padding-right: 20px;
  }

  .mkt-feature,
  .mkt-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .mkt-pricing {
    padding-left: 20px;
    padding-right: 20px;
  }
}


/* =========================================================
   ADMIN UI CLEANUP + RESPONSIVE
   Paste at the very bottom of style.css (it overrides earlier rules).
   ========================================================= */

/* ---------- shared building blocks ---------- */

/* Filter row: fields share the width evenly and wrap cleanly. */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px 14px;
  align-items: end;
}

.filter-bar .field input,
.filter-bar .field select {
  width: 100%;
  min-width: 0;
}

.filter-bar > .btn {
  height: 40px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.card-head h2 {
  margin: 0;
}

.card-note {
  margin: -6px 0 14px;
  font-size: 13px;
  line-height: 1.5;
}

.card-narrow {
  max-width: 460px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-form .field input {
  width: 100%;
  min-width: 0;
}

.stack-form .btn {
  align-self: flex-start;
}

.rules {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
}

.success-msg {
  color: #047857;
  background: #ecfdf5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-dark);
  margin-bottom: 10px;
  cursor: pointer;
}

.check-row input {
  margin-top: 2px;
  flex-shrink: 0;
}

.tab-bar {
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  white-space: nowrap;
}

.tab-bar--inline {
  margin: 0;
  border-bottom: none;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  min-width: 520px;
}

/* ---------- analytics ---------- */

#taskFilterList {
  max-height: 260px;
  overflow-y: auto;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfd;
}

#chartArea {
  margin-top: 12px;
  overflow-x: auto;
}

/* Bar chart keeps a readable minimum size and scrolls sideways on phones. */
#chartArea > svg {
  min-width: 520px;
}

#plannedTable {
  overflow-x: auto;
}

#plannedTable table {
  min-width: 480px;
}

/* ---------- payroll ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat {
  background: var(--surface-admin);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-dark);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-sub {
  font-size: 12px;
  color: var(--warning);
  margin-top: 4px;
}

.stat-value + .stat-sub {
  color: var(--muted-dark);
}

.share {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-bar {
  flex: 1;
  min-width: 60px;
  height: 8px;
  background: #eef0f5;
  border-radius: 999px;
  overflow: hidden;
}

.share-bar span {
  display: block;
  height: 100%;
  background: var(--accent-admin);
  border-radius: 999px;
}

.share-pct {
  width: 38px;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted-dark);
}

.grid-table .share-col {
  min-width: 150px;
  text-align: left;
}

/* By-task payroll view: every customer is its own table, so give them all the
   same fixed column widths. Otherwise each table sizes its columns to its own
   content and the columns drift out of line from one customer to the next. */
.grid-table.breakdown-table {
  table-layout: fixed;
  min-width: 760px;
}

.breakdown-table col.col-hours { width: 90px; }
.breakdown-table col.col-break { width: 120px; }
.breakdown-table col.col-labor { width: 170px; }
.breakdown-table col.col-share { width: 200px; }

.breakdown-table td.task-cell {
  overflow-wrap: anywhere;
}

.link-btn {
  margin-left: 8px;
  padding: 2px 0;
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--accent-admin);
}

.breakdown-block + .breakdown-block {
  margin-top: 24px;
}

.breakdown-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.breakdown-head h3 {
  margin: 0;
  font-size: 15px;
}

.breakdown-total {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- pay settings ---------- */

#payTable {
  min-width: 760px;
}

/* ---------- touch / focus polish ---------- */

.btn,
.logout-btn,
.tab-btn {
  min-height: 38px;
}

.btn.small {
  min-height: 32px;
}

.field input:focus-visible,
.field select:focus-visible {
  border-color: var(--accent-admin);
}

/* ---------- tablet and below ---------- */

@media (max-width: 900px) {
  .admin-content {
    padding: 24px 16px 48px;
  }

  .admin-topbar {
    padding: 12px 16px;
  }
}

/* ---------- phones ---------- */

@media (max-width: 720px) {
  /* Top bar: logo and log out on one row, nav scrolls sideways under them. */
  .admin-topbar {
    padding: 10px 14px;
    gap: 8px;
  }

  .admin-brand {
    order: 1;
  }

  .admin-brand img {
    height: 48px;
    max-width: 130px;
  }

  .logout-btn {
    order: 2;
    margin-left: auto;
  }

  .admin-nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .admin-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-nav a {
    white-space: nowrap;
    padding: 8px 12px;
  }

  .lang-bar {
    padding: 8px 14px;
  }

  .admin-content {
    padding: 18px 12px 40px;
  }

  .admin-content h1 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .card {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow-x: auto;
  }

  /* 16px inputs stop iOS from zooming the page on focus. */
  .field input,
  .field select,
  .task-picker select {
    font-size: 16px;
  }

  .form-row .field {
    flex: 1 1 100%;
  }

  .form-row .field input,
  .form-row .field select {
    width: 100%;
    min-width: 0;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  /* The select-style fields and the action button take the full row. */
  .filter-bar .field:first-child,
  .filter-bar > .btn {
    grid-column: 1 / -1;
  }

  .action-row .btn {
    flex: 1 1 100%;
  }

  .stat-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat {
    padding: 14px;
  }

  .stat-value {
    font-size: 20px;
  }

  .card-head {
    align-items: flex-start;
  }

  /* Week picker */
  .week-controls {
    gap: 8px;
  }

  .week-label {
    order: -1;
    flex: 1 1 100%;
    min-width: 0;
    text-align: center;
  }

  .week-controls .btn {
    flex: 1;
  }

  .search-bar input {
    max-width: none;
  }

  /* Customers & tasks */
  .customer-header {
    flex-wrap: wrap;
  }

  .task-row .name,
  .subtask-row .name {
    min-width: 0;
    flex: 1 1 100%;
  }

  .session-row {
    gap: 8px;
  }

  .session-row > span,
  .session-row select,
  .session-row input[type="datetime-local"] {
    max-width: 100%;
  }

  /* Calendar */
  .calendar-grid {
    gap: 4px;
  }

  .cal-day {
    min-height: 36px;
    font-size: 12px;
  }

  .login-card {
    margin: 16px;
    padding: 24px 20px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   BILLING
   ========================================================= */

.bill-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.bill-customer {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
}

.bill-prepared {
  font-size: 13px;
}

.bill-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 2px solid var(--border);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.grid-table .rate-source {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-dark);
}

/* Print: just the bill, no navigation or controls. */
@media print {
  body.billing {
    background: #fff;
  }

  body.billing .admin-topbar,
  body.billing .lang-bar,
  body.billing .site-footer,
  body.billing .no-print {
    display: none !important;
  }

  body.billing .admin-content {
    max-width: none;
    padding: 0;
  }

  body.billing .card {
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
  }

  body.billing .stat {
    break-inside: avoid;
  }

  body.billing .breakdown-block {
    break-inside: avoid;
  }

  body.billing .table-scroll {
    overflow: visible;
  }

  body.billing .table-scroll table {
    min-width: 0;
  }
}


/* =========================================================
   RATE PANEL (Customers & Tasks > Rates)
   A searchable employee dropdown, then one employee's Pay and Bill rates
   for the customer and each task. Inputs carry a "$" prefix (visual only).
   ========================================================= */
.rate-panel {
  padding: 14px 16px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-admin);
}

.rate-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.rate-toolbar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-dark);
}

.rate-toolbar .es-count {
  font-size: 13px;
}

/* Beat ".table-scroll table { min-width: 520px }" so the grid hugs its content. */
.table-scroll .rate-matrix {
  width: auto;
  min-width: 0;
}

.rate-matrix th {
  white-space: nowrap;
}

.rate-matrix td {
  padding: 6px 4px;
}

.rate-matrix td.task-cell {
  white-space: nowrap;
  padding-right: 24px;
}

.rate-matrix td.rate-sub-task {
  padding-left: 22px;
}

.rate-matrix th.rate-col,
.rate-matrix td.rate-col {
  width: 140px;
  min-width: 140px;
  padding: 6px 8px;
  text-align: left;
}

.rate-matrix tr.rate-row-customer td {
  border-bottom: 2px solid var(--border);
}

/* "$" prefix: drawn in front of the input, never part of the value. */
.rate-money {
  position: relative;
  width: 124px;
}

.rate-money::before {
  content: "$";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--muted-dark);
  pointer-events: none;
}

.rate-matrix .rate-money .rate-input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px 8px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  background: var(--surface-admin);
}

.rate-matrix .rate-money .rate-input::placeholder {
  color: #9ca3af;
}

.rate-matrix .rate-money .rate-input:focus {
  outline: none;
  border-color: var(--accent-admin);
}

.rate-matrix .rate-input:disabled {
  opacity: 0.5;
}

.rate-matrix .rate-input.saved {
  border-color: #047857;
  background: #ecfdf5;
}


/* =========================================================
   SEARCHABLE EMPLOYEE DROPDOWN (Rates panel)
   ========================================================= */
.emp-select {
  position: relative;
  min-width: 240px;
}

.emp-select .es-toggle {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-admin);
  color: var(--text-dark);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.emp-select.open .es-toggle,
.emp-select .es-toggle:hover {
  border-color: var(--accent-admin);
}

.emp-select .es-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emp-select .es-caret {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted-dark);
}

.emp-select .es-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 340px;
  padding: 6px;
  background: var(--surface-admin);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px -12px rgba(16, 24, 40, 0.3);
}

.emp-select .es-panel.hidden {
  display: none;
}

.emp-select .es-search {
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: var(--surface-admin);
}

.emp-select .es-search:focus {
  outline: none;
  border-color: var(--accent-admin);
}

.emp-select .es-list {
  max-height: 240px;
  overflow-y: auto;
}

.emp-select .es-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
}

.emp-select .es-option.active {
  background: #f3f4f6;
}

.emp-select .es-option.selected .es-name {
  font-weight: 700;
}

.emp-select .es-tag {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted-dark);
}

.emp-select .es-empty {
  padding: 8px;
  font-size: 13px;
  color: var(--muted-dark);
}

@media (max-width: 600px) {
  .emp-select {
    min-width: 0;
    width: 100%;
  }
}


/* =========================================================
   MULTI-SELECT DROPDOWN (Employees > Assigned customers)
   ========================================================= */
.multi-select {
  position: relative;
  min-width: 200px;
}

.multi-select .ms-toggle {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-admin);
  color: var(--text-dark);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.multi-select.open .ms-toggle,
.multi-select .ms-toggle:hover {
  border-color: var(--accent-admin);
}

.multi-select .ms-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select .ms-caret {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted-dark);
}

.multi-select .ms-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 320px;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  background: var(--surface-admin);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px -12px rgba(16, 24, 40, 0.3);
}

.multi-select .ms-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dark);
  cursor: pointer;
}

.multi-select .ms-option:hover {
  background: #f3f4f6;
}

.multi-select .ms-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.multi-select .ms-empty {
  padding: 8px;
  font-size: 13px;
  color: var(--muted-dark);
}

/* =========================================================
   LANDING PAGE ADDITIONS
   Append to the end of style.css (after the existing marketing/mock rules)
   ========================================================= */

.mock-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.mock-tab {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-dark);
  background: #fff;
}

.mock-tab.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

.mock-payroll-wrap,
.mock-ts {
  background: #fff;
  border-radius: 12px;
}

.mock-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.mock-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-dark);
}

.mock-btn.primary {
  background: #000;
  border-color: #000;
  color: #fff;
}

.mock-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.mock-chip {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-admin);
  color: var(--text-dark);
}

.mock-subhead {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-dark);
  margin: 10px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Planned vs actual rows */
.mock-pva {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px 14px;
  align-items: center;
  font-size: 12px;
}

.mock-pva-name { font-weight: 600; }

.mock-pva-num {
  font-family: var(--font-mono);
  color: var(--muted-dark);
  white-space: nowrap;
}

.mock-pva-diff {
  font-family: var(--font-mono);
  font-weight: 700;
  text-align: right;
}

.mock-pva-diff.over  { color: var(--warning); }
.mock-pva-diff.under { color: #047857; }

/* Weekly timesheet grid */
.mock-ts-grid {
  display: grid;
  grid-template-columns: minmax(110px, 2fr) repeat(5, 1fr);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.mock-ts-grid > span {
  padding: 9px 4px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-mono);
}

.mock-ts-head {
  color: var(--muted-dark);
  font-size: 11px;
}

.mock-ts-grid .mock-ts-label {
  text-align: left;
  font-family: var(--font);
  color: var(--text-dark);
  padding-left: 0;
  padding-right: 8px;
}

.mock-ts-empty { color: var(--border); }

.mock-ts-grid .total {
  font-weight: 700;
  border-bottom: none;
  border-top: 1px solid #000;
}

/* "Details" rules grid */
.mkt-section-lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted-dark);
  max-width: 60ch;
  margin: -14px 0 28px;
}

.mkt-rules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-admin);
  overflow: hidden;
}

.mkt-rule {
  padding: 22px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mkt-rule:nth-child(4n)      { border-right: none; }
.mkt-rule:nth-last-child(-n+4) { border-bottom: none; }

.mkt-rule h3 {
  font-family: var(--font-display);
  font-size: 15px;
  margin: 0 0 8px;
}

.mkt-rule p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted-dark);
  margin: 0;
}

@media (max-width: 950px) {
  .mkt-rules { grid-template-columns: repeat(2, 1fr); }
  .mkt-rule,
  .mkt-rule:nth-child(4n)        { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .mkt-rule:nth-child(2n)        { border-right: none; }
  .mkt-rule:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 600px) {
  .mkt-rules { grid-template-columns: 1fr; }
  .mkt-rule,
  .mkt-rule:nth-child(2n),
  .mkt-rule:nth-child(4n)        { border-right: none; border-bottom: 1px solid var(--border); }
  .mkt-rule:last-child           { border-bottom: none; }
  .mock-pva { grid-template-columns: 1fr auto auto; }
  .mock-pva-name { grid-column: 1 / -1; }
}