/* ==========================================================================
   Garage Ghost Owner Dashboard — Design System & Semantic Styles
   Source of truth: Garage Ghost Design Brief & Desktop Frames 4a/4b
   ========================================================================== */
@font-face {
    font-family: "Archivo";
    src: url("/fonts/archivo-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --ground: #f3f2f2;
    --ink: #201e1d;
    --red: #ec3013;
    --red-hover: #dd2b0f;
    --red-text: #ae1800;
    --red-tint: #fff2ef;
    --neutral-100: #f8f4f4;
    --neutral-200: #eae7e7;
    --neutral-300: #d7d3d3;
    --neutral-400: #bab6b6;
    --neutral-500: #9b9797;
    --neutral-700: #605d5d;
    --neutral-800: #444141;
    --color-text-muted: var(--neutral-700);
    --color-border: var(--ink);

    --font-heading: "Archivo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: "Archivo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Base reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
    border-radius: 0 !important;
}

[hidden] {
    display: none !important;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 0;
    color: var(--ink);
}

h1 { font-size: 34px; letter-spacing: -0.02em; }
h2 { font-size: 24px; letter-spacing: -0.01em; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }

p {
    margin: 0 0 12px;
}

a {
    color: var(--red-text);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--red);
}

/* Focus styling */
:focus {
    outline: none;
}

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

/* Shell Layout */
.app-container {
    width: 100%;
    min-height: 100vh;
    background: var(--ground);
    color: var(--ink);
    margin: 0;
    padding: 0;
}

.owner-app {
    width: 100%;
    margin: 0;
    padding: 0;
}

.owner-canvas {
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--ground);
    border: 0;
}

.owner-content-wrapper {
    max-width: 1360px;
    margin: 0 auto;
    width: 100%;
}

/* Header */
.owner-header {
    width: 100%;
    background: var(--ground);
    border-bottom: 2px solid var(--ink);
}

.owner-header-inner {
    max-width: 1360px;
    margin: 0 auto;
    height: 68px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.owner-header-left {
    display: flex;
    align-items: center;
    gap: 34px;
}

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

.ghost-mark {
    width: 26px;
    height: 26px;
    flex: none;
    display: block;
    color: var(--ink);
}

.garage-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--ink);
}

/* Desktop Navigation */
.owner-navigation-desktop {
    display: flex;
    gap: 24px;
    font-size: 17px;
}

.owner-navigation-desktop .nav-item {
    font-size: 17px;
    font-weight: 600;
    color: var(--neutral-700);
    text-decoration: none;
    padding: 4px 0;
    border: none;
    border-bottom: 3px solid transparent;
    display: inline-flex;
    align-items: center;
    background: none;
    min-height: 0;
}

.owner-navigation-desktop .nav-item:hover {
    color: var(--ink);
    background: none;
}

.owner-navigation-desktop .nav-item.active {
    font-weight: 700;
    color: var(--ink);
    border-bottom: 3px solid var(--red);
    background: none;
}

/* Header Right */
.owner-header-right {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 16px;
}

.ghost-status {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
    white-space: nowrap;
}

.ghost-status-square {
    width: 11px;
    height: 11px;
    background: var(--red);
    display: block;
    flex: none;
}

/* Account dropdown */
.account-menu {
    position: relative;
    font-size: 16px;
    color: var(--neutral-700);
}

.account-menu summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    color: var(--neutral-700);
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

.account-menu summary:hover {
    color: var(--ink);
}

.account-menu[open] .account-dropdown {
    display: block;
}

.account-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 50;
    min-width: 180px;
    padding: 12px 16px;
    background: var(--ground);
    border: 2px solid var(--ink);
}

.account-dropdown-link,
.account-dropdown a {
    display: block;
    margin: 8px 0;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.account-dropdown-link:hover,
.account-dropdown a:hover {
    color: var(--red);
}

.logout-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px 0 0;
    border: none;
    border-top: 1px solid var(--neutral-300);
    background: transparent;
    color: var(--ink);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.logout-btn:hover {
    color: var(--red);
}

/* Phone bottom navigation (hidden on desktop) */
.owner-navigation-phone {
    display: none;
}

/* Buttons */
.owner-button,
.owner-btn,
.btn,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-outline-danger {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    min-height: 48px;
    padding: 0 16px;
    border: 2px solid var(--ink);
    background: transparent;
    color: var(--ink);
    border-radius: 0;
    text-align: left;
    box-shadow: none;
    transform: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.owner-button--primary,
.owner-button-primary,
.owner-btn--primary,
.btn-primary {
    background: var(--red);
    color: #ffffff;
    border: 2px solid var(--red);
    min-height: 52px;
    padding: 0 20px;
}

.owner-button--primary:hover,
.owner-button-primary:hover,
.owner-btn--primary:hover,
.btn-primary:hover {
    background: var(--red-hover);
    border-color: var(--red-hover);
    color: #ffffff;
    box-shadow: none;
    transform: none;
}

.owner-button--primary:active,
.owner-button-primary:active,
.owner-btn--primary:active,
.btn-primary:active {
    background: var(--red-text);
    border-color: var(--red-text);
}

.owner-button--secondary,
.owner-btn--secondary,
.btn-secondary,
.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 2px solid var(--ink);
}

.owner-button--secondary:hover,
.owner-btn--secondary:hover,
.btn-secondary:hover,
.btn-outline:hover {
    background: var(--neutral-200);
}

.owner-button--inverse,
.owner-btn--inverse,
.btn-inverse {
    background: var(--ink);
    color: var(--ground);
    border: 2px solid var(--ink);
    min-height: 52px;
}

.owner-button--inverse:hover,
.owner-btn--inverse:hover,
.btn-inverse:hover {
    background: var(--neutral-800);
    border-color: var(--neutral-800);
    color: var(--ground);
}

.owner-button--danger,
.owner-btn--danger,
.btn-outline-danger {
    background: transparent;
    color: var(--red-text);
    border: 2px solid var(--red);
}

.owner-button--danger:hover,
.owner-btn--danger:hover,
.btn-outline-danger:hover {
    background: var(--red-tint);
    color: var(--red-text);
    box-shadow: none;
    transform: none;
}

.owner-button:hover {
    background: var(--neutral-200);
}

.owner-button:disabled,
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Forms & Inputs */
.form-input,
.input,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="time"],
input[type="date"],
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
    caret-color: var(--red);
    background: var(--ground);
    border: 2px solid var(--ink);
    border-radius: 0;
    box-sizing: border-box;
}

.form-input:hover,
.input:hover {
    border-color: var(--ink);
}

.form-input:focus,
.input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--red);
    outline: 2px solid var(--red);
    outline-offset: 0;
}

textarea.form-input,
textarea.input {
    min-height: 90px;
    resize: vertical;
}

.form-group,
.field,
.detail-group {
    margin-bottom: 20px;
}

.form-group label,
.field > label,
.detail-group label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neutral-700);
    margin-bottom: 6px;
}

/* Reg Plate */
.reg-plate {
    display: inline-block;
    border: 2px solid var(--ink);
    padding: 3px 8px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink);
    background: transparent;
}

.reg-plate--large,
.reg-plate-detail {
    border: 3px solid var(--ink);
    padding: 8px 12px;
    font-size: 30px;
}

/* Common Page Layouts */
.today-page,
.texts-page,
.customers-page,
.setup-page,
.owner-page {
    padding: 0 32px 32px;
    background: var(--ground);
}

.owner-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 0 20px;
    border-bottom: 2px solid var(--ink);
}

.owner-page-heading h1 {
    font-size: 34px;
    letter-spacing: -0.02em;
}

.owner-page-heading span {
    color: var(--neutral-700);
    font-weight: 600;
}

/* Today — reassurance first, then the calls which genuinely need the owner. */
.today-band {
    display: none;
    background: var(--ink);
    color: var(--ground);
    padding: 14px 18px;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s ease;
}

.today-band:hover {
    background: var(--neutral-800);
}

.today-clean-state-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 4px;
}

.today-clean-state-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.today-answer {
    padding: 26px 0 24px;
    border-bottom: 2px solid var(--ink);
}

.today-answer h2 {
    max-width: 720px;
    font-size: 31px;
    letter-spacing: -0.02em;
}

.today-breakdown {
    display: grid;
    gap: 2px;
    margin-top: 14px;
    color: var(--neutral-800);
    font-size: 16px;
}

.today-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    padding-top: 28px;
}

.today-column h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

.today-attention-list,
.today-bookings {
    border-top: 2px solid var(--ink);
}

.today-attention-row,
.today-booking-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 2px solid var(--neutral-300);
}

.today-attention-name,
.today-booking-job {
    font-size: 17px;
    font-weight: 700;
}

.today-attention-copy p,
.today-booking-meta,
.today-quiet {
    margin: 4px 0 0;
    color: var(--neutral-700);
    font-size: 16px;
}

.today-row-actions,
.owner-call-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: none;
}

.today-row-actions .owner-button {
    min-height: 48px;
}

.today-over-limit {
    border-left: 4px solid var(--red);
    padding-left: 14px;
    background: var(--red-tint);
}

.today-booking-row {
    align-items: center;
    color: var(--ink);
    text-decoration: none;
}

.today-booking-row:hover {
    background: var(--neutral-200);
    color: var(--ink);
}

.today-booking-copy {
    min-width: 0;
    flex: 1;
}

.today-texts-link {
    display: none;
    min-height: 48px;
    align-items: center;
    margin-top: 18px;
    font-size: 17px;
    font-weight: 700;
}

.owner-call-panel {
    width: 452px;
}

.call-panel-overlay {
    background: rgba(32, 30, 29, 0.08);
}

.owner-panel-subtitle,
.owner-panel-phone,
.owner-panel-job {
    display: block;
    margin-top: 4px;
    color: var(--neutral-700);
    font-size: 16px;
}

.owner-panel-section {
    padding: 0 0 22px;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--ink);
}

.owner-panel-section h3 {
    margin-bottom: 12px;
}

.owner-panel-name {
    font-size: 22px;
    font-weight: 800;
}

.owner-call-panel-actions {
    padding: 18px 24px;
    border-top: 2px solid var(--ink);
}

/* Section active toggle */
.section.active {
    display: block;
}

/* Confirm Dialog / Modal */
.confirm-dialog,
dialog {
    width: min(440px, calc(100vw - 36px));
    padding: 24px;
    background: var(--ground);
    color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: none;
}

.confirm-dialog::backdrop,
dialog::backdrop {
    background: rgba(32, 30, 29, 0.25);
}

.confirm-dialog h2,
dialog h2 {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 12px;
}

.confirm-dialog p,
dialog p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--neutral-800);
    margin-bottom: 20px;
}

.confirm-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Drawer / Panel */
.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    background: rgba(32, 30, 29, 0.15);
}

.drawer-content {
    width: 452px;
    max-width: 100%;
    height: 100%;
    border-left: 4px solid var(--ink);
    background: var(--ground);
    color: var(--ink);
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.booking-panel-overlay {
    background: transparent;
    pointer-events: none;
    z-index: 1000;
    padding: 0;
    align-items: stretch;
    justify-content: flex-end;
    backdrop-filter: none;
}

.booking-panel-overlay .drawer-content {
    pointer-events: auto;
    max-height: none;
    border-radius: 0;
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 2px solid var(--ink);
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    margin: 0;
    color: var(--ink);
    font-size: 22px;
}

.drawer-body {
    flex: 1;
    padding: 22px 24px;
    overflow: auto;
}

.owner-panel-close {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: 2px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.owner-panel-close-back {
    display: none;
}

.owner-panel-close:hover {
    background: var(--neutral-200);
}

.booking-detail-panel .drawer-body {
    padding: 0;
}

.thin-import-summary,
.job-detail-identity,
.job-detail-customer,
.job-detail-facts,
.job-detail-section {
    padding: 20px 22px;
    border-bottom: 2px solid var(--ink);
}

.thin-import-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 700;
}

.thin-import-mark {
    width: 12px;
    height: 12px;
    flex: none;
    background: var(--ink);
}

.job-detail-identity,
.job-detail-section,
.fill-in-later {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.job-detail-identity .reg-plate {
    border-width: 3px;
    padding: 8px 12px;
    font-size: 30px;
    letter-spacing: 0.05em;
}

.job-car-description,
.job-detail-title,
.job-customer-name {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
}

.job-detail-title {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
}

.job-detail-customer,
.job-contact-actions,
.job-detail-facts,
.job-detail-action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.job-detail-customer {
    justify-content: space-between;
}

.job-contact-actions .owner-button {
    min-width: 72px;
}

.job-detail-facts {
    align-items: flex-start;
    gap: 24px;
}

.job-detail-fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.job-detail-fact span,
.job-detail-label,
.calendar-source-label {
    color: var(--neutral-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.job-detail-fact strong {
    color: var(--ink);
    font-size: 18px;
}

.job-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    color: var(--neutral-800);
    font-size: 16px;
    line-height: 1.5;
}

.job-message + .job-message {
    padding-top: 12px;
    border-top: 2px solid var(--neutral-300);
}

.fill-in-later .owner-button {
    width: 100%;
    min-height: 50px;
}

.job-detail-actions {
    padding: 20px 22px;
    border-top: 2px solid var(--ink);
}

.job-detail-action-buttons .owner-button {
    flex: 1;
}

.drawer-body label {
    color: var(--neutral-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.detail-value {
    color: var(--ink);
}

.detail-notes,
.message-full {
    border: 0;
    border-left: 4px solid var(--neutral-400);
    background: transparent;
    color: var(--ink);
    padding-left: 14px;
    font-size: 16px;
    line-height: 1.5;
}

/* Diary styles */
.diary-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding: 26px 32px 20px;
    flex-wrap: wrap;
}

.diary-toolbar-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1 1 320px;
}

.diary-toolbar h1,
.diary-toolbar h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.mobile-diary-title {
    display: none;
}

.diary-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.diary-summary {
    color: var(--neutral-800);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    word-break: break-word;
}

.desktop-diary-grid {
    display: grid;
    border-top: 2px solid var(--ink);
}

.diary-corner,
.diary-day-heading {
    border-bottom: 2px solid var(--ink);
    padding: 10px 12px;
}

.diary-day-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 2px solid var(--neutral-300);
    font-size: 17px;
    font-weight: 800;
}

.diary-day-heading.over-limit-header {
    background: var(--red-tint);
    border-left: 4px solid var(--red);
}

.diary-weekend-shut {
    background: var(--neutral-200);
    color: var(--neutral-700);
}

.diary-day-count {
    color: var(--neutral-700);
    font-size: 14px;
    font-weight: 400;
}

.diary-day-count.over-capacity {
    color: var(--red-text);
    font-weight: 700;
}

.diary-time {
    padding: 12px;
    border-bottom: 2px solid var(--neutral-300);
    font-size: 16px;
    font-weight: 700;
    color: var(--neutral-700);
}

.diary-slot {
    appearance: none;
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border: 0;
    border-left: 2px solid var(--neutral-300);
    border-bottom: 2px solid var(--neutral-300);
    text-align: left;
    background: transparent;
    color: var(--neutral-700);
    font-size: 14px;
    cursor: pointer;
}

.diary-slot:hover {
    background: var(--neutral-200);
}

.diary-slot:focus-visible {
    background: var(--neutral-200);
    outline: 2px solid var(--red);
    outline-offset: -2px;
}

.diary-slot:has(.diary-job.is-selected) {
    background: var(--neutral-200);
    border-left: 4px solid var(--ink);
}

.diary-slot-dimmed {
    background: var(--neutral-200);
    border-left: 2px solid var(--neutral-300);
    cursor: default;
}

.diary-weekend-shut-slot {
    background: var(--neutral-200);
    cursor: default;
}

.diary-slot-non-work {
    background: repeating-linear-gradient(45deg, var(--ground), var(--ground) 6px, var(--neutral-200) 6px, var(--neutral-200) 8px);
    border-left: 2px solid var(--neutral-700);
    cursor: default;
}

.diary-non-work {
    background: repeating-linear-gradient(45deg, var(--ground), var(--ground) 6px, var(--neutral-200) 6px, var(--neutral-200) 8px);
    border-left: 2px solid var(--neutral-700);
    cursor: pointer;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 2px 4px;
    border-radius: 2px;
}

.diary-non-work:hover {
    filter: brightness(0.97);
}

.diary-slot-stack {
    display: grid;
}

.diary-slot-stack > * + * {
    border-top: 1px solid var(--neutral-300);
    margin-top: 8px;
    padding-top: 8px;
}

.diary-job,
.diary-import {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--ink);
    text-decoration: none;
}

.diary-job-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.diary-job-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 15px;
    color: var(--neutral-800);
}

.diary-job-reg {
    display: inline-block;
    border: 2px solid var(--ink);
    padding: 1px 4px;
    font-size: 14px;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--neutral-700);
}

.diary-legend {
    padding: 16px 32px 26px;
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
    color: var(--neutral-700);
}

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

.legend-mark-car {
    width: 14px;
    height: 14px;
    background: var(--neutral-100);
    border-left: 4px solid var(--ink);
    display: block;
}

.legend-mark-overlimit {
    width: 14px;
    height: 14px;
    background: var(--red-tint);
    border-left: 4px solid var(--red);
    display: block;
}

.legend-mark-calendar {
    width: 14px;
    height: 14px;
    background: var(--neutral-200);
    border-left: 4px solid var(--neutral-500);
    display: block;
}

.legend-instruction {
    margin-left: auto;
}

.mobile-diary {
    display: none;
}

.mobile-day-summary {
    padding: 14px 0;
}

.mobile-day-summary.over-limit-header {
    margin: 0 -18px;
    padding: 14px 18px;
    background: var(--red-tint);
    border-left: 4px solid var(--red);
}

.mobile-room,
.mobile-diary-shut {
    padding: 14px 0;
    margin: 0;
    color: var(--neutral-700);
    border-bottom: 2px solid var(--neutral-300);
    font-size: 16px;
    font-weight: 600;
}

.mobile-diary-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 0;
    border-bottom: 2px solid var(--neutral-300);
}

.mobile-diary-calendar-row {
    background: repeating-linear-gradient(45deg, var(--ground), var(--ground) 6px, var(--neutral-200) 6px, var(--neutral-200) 8px);
    padding-inline: 8px;
}

/* Setup Section Rail Layout */
.setup-workspace {
    display: grid;
    grid-template-columns: 268px 1fr;
}

.setup-rail {
    border-right: 2px solid var(--ink);
    padding: 28px 0 40px;
}

.setup-rail-title {
    padding: 0 28px 18px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--neutral-700);
}

.setup-rail-items {
    display: flex;
    flex-direction: column;
}

.setup-rail-item {
    padding: 14px 28px;
    font-size: 17px;
    font-weight: 400;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.setup-rail-item:hover {
    background: var(--neutral-200);
}

.setup-rail-item.active {
    font-weight: 700;
    background: var(--neutral-200);
    border-left: 4px solid var(--red);
}

.setup-rail-marker {
    width: 10px;
    height: 10px;
    background: var(--red);
    display: block;
    flex: none;
}

.setup-panel {
    padding: 32px 36px 28px;
}

.setup-save-bar {
    padding: 20px 36px;
    border-top: 2px solid var(--ink);
    background: var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.setup-save-bar[hidden] {
    display: none;
}

.setup-save-text {
    font-size: 16px;
    font-weight: 700;
}

.setup-save-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Phase 8 Setup sections */
.phase8-setup .setup-workspace { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.phase8-setup .setup-panel h2 { font-size: 32px; line-height: 1.1; margin: 0 0 10px; letter-spacing: -0.02em; }
.phase8-setup .setup-help { color: var(--neutral-800); font-size: 17px; line-height: 1.5; margin: 0 0 24px; }
.setup-calendar-band { background: var(--red-tint); border-left: 4px solid var(--red); padding: 18px; font-size: 17px; line-height: 1.5; margin: 20px 0; }
.setup-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.setup-hours-grid, .setup-hours-row { display: grid; grid-template-columns: 1.2fr 1.1fr repeat(3, minmax(110px, 1fr)); gap: 12px; align-items: center; }
.setup-hours-head { border-bottom: 2px solid var(--ink); padding: 0 0 10px; font-size: 16px; }
.setup-hours-row { border-bottom: 1px solid var(--neutral-300); min-height: 68px; }
.setup-hours-day { font-weight: 800; font-size: 17px; }
.setup-state-toggle { min-height: 48px; text-align: left; background: transparent; border: 2px solid var(--ink); color: var(--ink); font: inherit; font-weight: 700; padding: 0 12px; }
.setup-hours-row input[type="time"] { width: 100%; min-height: 48px; box-sizing: border-box; border: 2px solid var(--ink); background: var(--ground); color: var(--ink); font: inherit; padding: 0 10px; }
.setup-hours-shut { color: var(--neutral-700); font-size: 16px; }
.setup-hours-row .setup-hours-shut { display: none; }
.setup-hours-row.is-shut input[type="time"] { display: none; }
.setup-hours-row.is-shut .setup-hours-shut { display: flex; align-items: center; }
.setup-hours-row.has-error { background: var(--red-tint); border-left: 4px solid var(--red); padding-left: 8px; }
.setup-hours-row.has-error input[type="time"] { border-color: var(--red); }
.phase8-stepper input { width: 72px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 34px; font-weight: 800; text-align: center; }
.phase8-stepper .capacity-button { width: 56px; height: 56px; }
.special-date-form { display: grid; grid-template-columns: 1fr 160px 1fr auto; gap: 12px; margin-bottom: 24px; }
.special-date-form input, .special-date-form select { min-height: 48px; box-sizing: border-box; border: 2px solid var(--ink); background: var(--ground); color: var(--ink); font: inherit; padding: 0 10px; }
.special-date-row, .setup-service-head, .setup-service-row, .setup-user-row { display: grid; gap: 12px; align-items: center; border-bottom: 1px solid var(--neutral-300); padding: 14px 0; font-size: 17px; }
.special-date-row { grid-template-columns: 1.4fr 1fr auto; }
.setup-service-head, .setup-service-row { grid-template-columns: 1.4fr 1fr 1fr; }
.setup-service-head { font-weight: 800; border-bottom: 2px solid var(--ink); }
.setup-user-row { grid-template-columns: 1fr 130px 1.4fr auto; }
.setup-detail-summary { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin-bottom: 22px; }
.setup-detail-summary p { border-bottom: 1px solid var(--neutral-300); font-size: 17px; line-height: 1.5; margin: 0; padding: 14px 0; }
.setup-detail-summary p:last-child { border-bottom: 0; }
.phase8-mobile-summary { display: none; }
.phase8-mobile-back { display: none; }
.phase8-capacity-summary { align-items: center; color: var(--ink); display: flex; justify-content: center; text-decoration: none; }
.setup-inline-error { border-left: 4px solid var(--red); background: var(--red-tint); color: var(--red-text); font-size: 17px; line-height: 1.5; margin-bottom: 20px; padding: 14px 18px; }
.phase8-setup form label { display: grid; gap: 6px; font-weight: 700; margin: 14px 0; }
.phase8-setup form input, .phase8-setup form select { min-height: 48px; box-sizing: border-box; border: 2px solid var(--ink); background: var(--ground); color: var(--ink); font: inherit; padding: 0 10px; }

/* ==========================================================================
   Responsive Breakpoints
   Phone: max-width: 899px
   Desktop: min-width: 900px
   ========================================================================== */

@media (max-width: 899px) {
    /* Workshop phone baseline: primary content remains readable at arm's length. */
    .owner-page,
    .drawer-content,
    .owner-page p,
    .drawer-content p,
    .today-booking-job,
    .job-detail-title,
    .customer-name-heading,
    .customer-row-name {
        font-size: max(17px, 1rem);
    }

    .owner-page,
    .drawer-content,
    .today-booking-copy,
    .job-detail-section,
    .customer-details-panel {
        overflow-wrap: anywhere;
    }

    .owner-header-inner {
        height: 58px;
        padding: 0 18px;
    }

    .owner-navigation-desktop,
    .owner-header-right {
        display: none;
    }

    .owner-content-wrapper {
        padding-bottom: 96px;
    }

    .phase8-setup .setup-workspace { display: block; border: 0; }
    .phase8-desktop-workspace { display: none; }
    .phase8-mobile-summary { display: block; }
    .phase8-setup.is-mobile-edit .phase8-desktop-workspace { display: block; }
    .phase8-setup.is-mobile-edit .phase8-mobile-summary { display: none; }
    .phase8-mobile-back { color: var(--ink); display: inline-block; font-size: 17px; font-weight: 700; margin: 4px 0 22px; text-decoration: none; }
    .phase8-mobile-section { border-bottom: 2px solid var(--ink); display: flex; flex-direction: column; gap: 14px; padding: 20px 0; }
    .phase8-mobile-hours { display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
    .phase8-mobile-hours > div { display: flex; justify-content: space-between; gap: 12px; }
    .phase8-all-link { color: var(--ink); font-weight: 700; font-size: 17px; text-decoration: none; }
    .phase8-setup .setup-rail { display: none; }
    .phase8-setup .setup-panel { padding: 0; }
    .phase8-setup .setup-panel h2 { font-size: 20px; }
    .setup-hours-head { display: none; }
    .setup-hours-row { grid-template-columns: 1fr auto; gap: 10px; padding: 14px 0; }
    .setup-hours-row input[type="time"] { grid-column: span 1; }
    .setup-hours-shut { grid-column: span 2; }
    .special-date-form, .special-date-row, .setup-user-row { grid-template-columns: 1fr; }
    .setup-service-head, .setup-service-row { grid-template-columns: 1fr auto; }
    .setup-service-head strong:last-child, .setup-service-row span:last-child { display: none; }
    .setup-save-bar { padding: 18px; align-items: flex-start; flex-direction: column; }
}

@media (max-width: 899px) {
    .today-page,
    .texts-page,
    .customers-page,
    .setup-page,
    .diary-page,
    .owner-page {
        padding: 0 18px 96px;
    }

    .today-page-heading {
        padding: 18px 0;
        border-bottom: 0;
    }

    .today-page-heading h1 {
        font-size: 24px;
    }

    .today-band {
        display: block;
        margin: 0 -18px;
        padding: 14px 18px;
    }

    .today-answer {
        padding: 22px 0;
    }

    .today-answer h2 {
        font-size: 31px;
    }

    .today-columns {
        display: block;
        padding-top: 24px;
    }

    .today-column + .today-column {
        margin-top: 30px;
    }

    .today-attention-row,
    .today-booking-row {
        padding: 14px 0;
    }

    .today-attention-row {
        display: block;
    }

    .today-row-actions {
        margin-top: 14px;
    }

    .today-row-actions .owner-button {
        flex: 1;
    }

    .today-texts-link {
        display: flex;
    }

    /* Fixed bottom navigation for phone */
    .owner-navigation-phone {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 62px;
        z-index: 100;
        background: var(--ground);
        border-top: 2px solid var(--ink);
    }

    .phone-nav-item {
        flex: 1;
        min-width: 48px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 2px;
        font-size: 13px;
        font-weight: 600;
        color: var(--ink);
        text-decoration: none;
        background: transparent;
        border-right: 2px solid var(--ink);
        white-space: nowrap;
    }

    .phone-nav-item:last-child {
        border-right: none;
    }

    .phone-nav-item:hover {
        background: var(--neutral-200);
    }

    .phone-nav-item.active {
        background: var(--ink);
        color: var(--ground);
        font-weight: 800;
    }

    /* Mobile Diary */
    .diary-toolbar {
        align-items: center;
        padding: 18px 0;
        gap: 14px;
    }

    .desktop-diary-title,
    .diary-summary,
    .diary-toolbar-actions .owner-button-secondary {
        display: none;
    }

    .mobile-diary-title {
        display: block;
        font-size: 28px;
    }

    .diary-toolbar-actions {
        margin-left: auto;
    }

    .diary-toolbar-actions .owner-button-primary {
        min-height: 52px;
        padding: 12px 16px;
    }

    .desktop-diary-grid,
    .diary-legend {
        display: none;
    }

    .mobile-diary {
        display: block;
        padding: 0 18px 96px;
    }

    .day-strip {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        border: 2px solid var(--ink);
        margin: 18px 0;
    }

    .day-strip button {
        min-height: 56px;
        border: 0;
        border-right: 2px solid var(--ink);
        background: transparent;
        font-weight: 700;
        font-size: 15px;
        color: var(--ink);
    }

    .day-strip button:last-child {
        border-right: 0;
    }

    .day-strip button.active {
        background: var(--ink);
        color: var(--ground);
    }

    .mobile-day {
        display: none;
    }

    .mobile-day.active-day {
        display: block;
    }

    .mobile-day h2 {
        margin: 0;
        padding: 14px 0 5px;
        border-bottom: 0;
        font-size: 20px;
        font-weight: 800;
    }

    .mobile-capacity {
        margin: 0;
        padding: 0 0 14px;
        border-bottom: 2px solid var(--ink);
        color: var(--neutral-700);
        font-size: 14px;
        font-weight: 700;
    }

    .mobile-capacity.over-capacity {
        color: var(--red-text);
    }

    .mobile-time-slot {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 10px;
        padding: 14px 0;
        border-bottom: 2px solid var(--neutral-300);
    }

    .mobile-slot-time {
        font-size: 16px;
        font-weight: 800;
    }

    /* Setup on Mobile */
    .setup-workspace {
        display: block;
    }

    .setup-rail {
        display: none;
    }

    .setup-panel {
        padding: 18px 0;
    }

    /* Drawer on mobile */
    .drawer-content {
        width: 100%;
        border-left: 0;
    }

    .drawer-overlay {
        background: var(--ground);
    }

    .booking-panel-overlay {
        background: var(--ground);
        pointer-events: auto;
    }

    .owner-panel-close-back {
        display: inline;
    }

    .owner-panel-close-x {
        display: none;
    }

    .job-detail-customer {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .job-contact-actions {
        width: 100%;
    }

    .job-contact-actions .owner-button {
        flex: 1;
    }

    .owner-call-panel-actions {
        padding: 18px;
    }

    /* Phone Customers */
    .customers-page {
        padding: 0 18px 96px;
    }

    .customers-page:has(.customer-details-pane[data-selected-customer-id]:not([data-selected-customer-id=""])) .customer-heading {
        display: none;
    }

    .customer-workspace {
        grid-template-columns: 1fr;
        border-bottom: none;
    }

    .customer-workspace:has(.customer-details-pane[data-selected-customer-id]:not([data-selected-customer-id=""])) .customer-list-pane {
        display: none;
    }

    .customer-workspace:not(:has(.customer-details-pane[data-selected-customer-id]:not([data-selected-customer-id=""]))) .customer-details-pane {
        display: none;
    }

    .customer-list-pane {
        border-right: none;
        border-bottom: 2px solid var(--ink);
    }

    .customer-details-top-bar {
        display: flex;
        align-items: center;
        border-bottom: 2px solid var(--ink);
        background: var(--ground);
    }

    .customer-back-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 14px 18px;
        border-bottom: none;
    }

    .customer-actions-row {
        flex-direction: column;
    }

    .customer-action-btn {
        width: 100%;
        min-height: 52px;
    }

    .customer-edit-btn {
        width: 100%;
        min-height: 52px;
    }

    .customer-edit-car-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .customer-remove-car-btn {
        grid-column: 1 / -1;
    }
}

@media (min-width: 900px) and (max-width: 1100px) {
    .owner-header-inner {
        padding: 0 16px;
        gap: 16px;
    }

    .owner-header-left {
        gap: 16px;
    }

    .owner-navigation-desktop {
        gap: 14px;
        font-size: 15px;
    }

    .owner-navigation-desktop .nav-item {
        font-size: 15px;
    }

    .owner-header-right {
        gap: 14px;
        font-size: 15px;
    }

    .ghost-status {
        gap: 6px;
        font-size: 14px;
    }

    .garage-name {
        font-size: 17px;
    }

    .diary-toolbar {
        padding: 20px 16px 14px;
        gap: 16px;
        flex-wrap: wrap;
    }

    .diary-toolbar h1,
    .desktop-diary-title {
        font-size: 24px;
    }

    .diary-summary {
        font-size: 14px;
        margin-right: 6px;
    }

    .diary-toolbar-actions {
        gap: 6px;
    }

    .diary-toolbar-actions .owner-button {
        padding: 0 10px;
        font-size: 14px;
        min-height: 44px;
    }

    .diary-day-heading {
        padding: 8px 6px;
        font-size: 14px;
    }

    .diary-day-count {
        font-size: 12px;
    }

    .diary-time {
        padding: 8px 4px;
        font-size: 14px;
    }

    .diary-slot {
        padding: 6px;
        font-size: 13px;
        min-height: 64px;
    }

    .today-page,
    .texts-page,
    .customers-page,
    .setup-page,
    .owner-page,
    .diary-page {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Customers Screen */
.customer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 0 20px;
    border-bottom: 2px solid var(--ink);
}

.customer-workspace {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
    min-height: calc(100vh - 160px);
    border-bottom: 2px solid var(--ink);
}

.customer-list-pane {
    border-right: 2px solid var(--ink);
    display: flex;
    flex-direction: column;
    background: var(--ground);
}

.customer-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px;
    border-bottom: 2px solid var(--ink);
    background: var(--ground);
}

.customer-search-indicator {
    font-size: 13px;
    font-weight: 600;
    color: var(--neutral-700);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.customer-search-indicator.htmx-request {
    opacity: 1;
}

.customer-search-input {
    flex: 1;
    min-height: 48px;
    padding: 0 14px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--ground);
    color: var(--ink);
}

.customer-search-clear {
    min-height: 48px;
    padding: 0 16px;
    font-weight: 700;
}

.customer-search.cars-search {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.cars-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.cars-search-input-wrapper .customer-search-input {
    width: 100%;
    flex: 1;
}

.cars-search-input-wrapper .customer-search-indicator {
    position: absolute;
    right: 14px;
    pointer-events: none;
}

.cars-search-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.cars-mot-filter {
    flex: 1;
    min-height: 44px;
    padding: 0 12px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--ground);
    color: var(--ink);
    cursor: pointer;
}

.cars-search-clear {
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* MOT Status & Defect Badges */
.customer-mot-badge {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border: 1px solid var(--ink) !important;
    color: var(--ink) !important;
    background: var(--neutral-100) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.customer-mot-badge.valid {
    border-color: #047857 !important;
    color: #065f46 !important;
    background: #ecfdf5 !important;
}

.customer-mot-badge.soon {
    border-color: #b45309 !important;
    color: #92400e !important;
    background: #fffbeb !important;
}

.customer-mot-badge.overdue {
    border-color: var(--red) !important;
    color: var(--red-text) !important;
    background: var(--red-tint) !important;
}

.customer-mot-badge.unknown {
    border-color: var(--neutral-400) !important;
    color: var(--neutral-700) !important;
    background: var(--neutral-200) !important;
}

.customer-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
}

.customer-empty-state {
    padding: 32px 18px;
    color: var(--neutral-700);
    font-size: 16px;
    text-align: center;
}

.customer-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    min-height: 64px;
    border: none;
    border-bottom: 2px solid var(--neutral-300);
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
    color: var(--ink);
}

.customer-row:hover {
    background: var(--neutral-200);
}

.customer-row.selected {
    background: var(--neutral-200);
    border-left: 4px solid var(--ink);
    padding-left: 14px;
}

.customer-row-name {
    font-weight: 700;
    font-size: 17px;
    color: var(--ink);
}

.customer-row-phone {
    font-size: 15px;
    color: var(--neutral-700);
}

/* Customer Details Pane */
.customer-details-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--ground);
    overflow-y: auto;
}

.customer-empty-details {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--neutral-700);
    font-size: 17px;
    padding: 40px;
}

.customer-details-panel {
    display: flex;
    flex-direction: column;
}

.customer-back-link {
    font-weight: 800;
    font-size: 17px;
    color: var(--ink);
    text-decoration: none;
}

.customer-back-link:hover {
    background: var(--neutral-200);
}

@media (min-width: 900px) {
    .customer-details-top-bar {
        display: none;
    }

    .customer-back-link {
        display: none;
    }
}

.customer-summary {
    padding: 24px 24px 20px;
    border-bottom: 2px solid var(--ink);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.customer-name-heading {
    font-weight: 800;
    font-size: 30px;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
}

.customer-provisional-note {
    font-size: 16px;
    color: var(--neutral-700);
}

.customer-contact-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 17px;
    color: var(--neutral-800);
}

.customer-contact-link {
    color: var(--neutral-800);
    text-decoration: underline;
}

.customer-contact-link:hover {
    color: var(--ink);
}

.customer-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.customer-action-btn {
    flex: 1;
    min-width: 100px;
    min-height: 50px;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
}

.customer-edit-btn {
    min-height: 50px;
    font-size: 16px;
    font-weight: 700;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
}

/* Customer Cars Block */
.customer-cars-block {
    padding: 20px 24px;
    border-bottom: 2px solid var(--ink);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-section-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neutral-700);
}

.customer-no-cars {
    font-size: 16px;
    color: var(--neutral-700);
}

.customer-cars-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.customer-car-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.customer-car-desc {
    font-size: 16px;
    color: var(--ink);
}

.mot-due-soon {
    color: var(--red-text);
    font-weight: 700;
}

.mot-due-normal {
    color: var(--neutral-800);
}

/* History Block */
.customer-history-block {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-history-list {
    display: flex;
    flex-direction: column;
}

.customer-history-empty {
    padding: 24px 0;
    color: var(--neutral-700);
    font-size: 16px;
    text-align: center;
}

.customer-history-row {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-top: 2px solid var(--neutral-300);
}

.customer-history-row:first-child {
    border-top: 2px solid var(--ink);
}

.customer-history-date {
    width: 72px;
    min-width: 72px;
    font-size: 15px;
    font-weight: 700;
    color: var(--neutral-700);
    line-height: 1.3;
}

.customer-history-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.customer-history-title {
    font-weight: 700;
    font-size: 17px;
    color: var(--ink);
}

.customer-history-desc {
    font-size: 15px;
    color: var(--neutral-700);
    line-height: 1.45;
}

/* Modals & Dialogs for Customers */
.customer-modal {
    width: 600px;
    max-width: 95vw;
    background: var(--ground);
    border: 2px solid var(--ink);
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.customer-vehicles-section {
    margin-top: 20px;
    border-top: 2px solid var(--ink);
    padding-top: 18px;
}

.customer-vehicles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.customer-vehicles-label {
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
}

.car-rows-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.customer-edit-car-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.2fr 80px 130px auto;
    gap: 8px;
    align-items: center;
    background: var(--neutral-200);
    padding: 10px;
    border: 2px solid var(--ink);
}

.car-reg-input {
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.customer-remove-car-btn {
    min-height: 44px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 700;
}

.owner-button--destructive-outline {
    background: transparent;
    color: var(--ink);
    border: 2px solid var(--ink);
}

.owner-button--destructive-outline:hover {
    background: var(--red-hover);
    color: #fff;
    border-color: var(--red-hover);
}

.owner-form-error {
    background: var(--red-tint);
    border: 2px solid var(--red);
    color: var(--red-text);
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 700;
}

.owner-form-error:empty {
    display: none;
}

.modal-actions-row {
    padding-top: 24px;
    border-top: 2px solid var(--neutral-300);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   Texts Page (Phase 7 redesign)
   ========================================================================== */

.texts-page {
    max-width: 800px;
    margin: 0 auto;
}

.text-intro {
    padding: 18px 0;
    border-bottom: 2px solid var(--ink);
    font-size: 17px;
    line-height: 1.45;
    color: var(--neutral-800);
}

.texts-list {
    display: flex;
    flex-direction: column;
}

.text-entry {
    padding: 18px 0;
    border-bottom: 2px solid var(--neutral-300);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
}

.text-entry.text-empty-state {
    color: var(--neutral-700);
    font-size: 16px;
    padding: 24px 0;
}

.text-entry.text-failed-card {
    background: var(--red-tint);
    border-bottom: 2px solid var(--red);
    padding: 18px;
    margin: 16px 0;
    gap: 12px;
}

.text-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.text-entry-title {
    font-weight: 700;
    font-size: 17px;
    color: var(--ink);
}

.text-failed-title {
    font-weight: 800;
    font-size: 18px;
    color: var(--ink);
}

.text-entry-time {
    font-size: 14px;
    font-weight: 700;
    color: var(--neutral-700);
    flex-shrink: 0;
}

.text-entry-message {
    font-size: 16px;
    line-height: 1.5;
    color: var(--neutral-800);
}

.text-failed-body {
    font-size: 16px;
    line-height: 1.45;
    color: var(--ink);
}

.text-failed-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.text-action-btn {
    flex: 1;
    min-height: 48px;
    font-size: 16px;
    font-weight: 700;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

@media (max-width: 899px) {
    .texts-page {
        max-width: 100%;
        padding: 0 18px 96px;
    }

    .text-entry.text-failed-card {
        margin: 12px -18px;
        padding: 18px;
    }

    .text-failed-actions {
        flex-direction: row;
    }

    .customers-page {
        max-width: 100%;
        padding: 0 18px 96px;
        overflow-x: hidden;
    }

    .customer-workspace {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        border-bottom: none;
    }

    .customer-workspace:has(.customer-details-pane[data-selected-customer-id]:not([data-selected-customer-id=""])) .customer-list-pane {
        display: none;
    }

    .customer-workspace:not(:has(.customer-details-pane[data-selected-customer-id]:not([data-selected-customer-id=""]))) .customer-details-pane {
        display: none;
    }

    .customer-list-pane {
        border-right: none;
        border-bottom: 2px solid var(--ink);
        width: 100%;
        max-width: 100%;
    }

    .customer-details-pane {
        width: 100%;
        max-width: 100%;
    }

    .job-detail-facts {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        align-items: start;
    }

    .job-detail-action-buttons {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

    .job-detail-action-buttons .owner-button {
        flex: 1;
    }
}

/* Booking Drawer Form Layout */
.drawer-form-row {
    display: flex;
    gap: 16px;
}

.drawer-form-col {
    flex-grow: 1;
}

.form-input-spaced {
    margin-top: 8px;
}

.drawer-footer-cancel {
    margin-right: 12px;
}
