/* Haplo Console, Carbon-inspired UI */
:root {
    --haplo-bg: #f4f4f4;
    --haplo-layer-01: #ffffff;
    --haplo-layer-02: #f4f4f4;
    --haplo-layer-03: #e8e8e8;
    --haplo-text-primary: #161616;
    --haplo-text-secondary: #525252;
    --haplo-text-muted: #6f6f6f;
    --haplo-border: #e0e0e0;
    --haplo-border-strong: #8d8d8d;
    --haplo-blue: #0f62fe;
    --haplo-blue-hover: #0353e9;
    --haplo-blue-active: #002d9c;
    --haplo-green: #24a148;
    --haplo-red: #da1e28;
    --haplo-yellow-bg: #fcf4d6;
    --haplo-yellow-border: #f1c21b;
    --haplo-focus: #0f62fe;
    --haplo-radius: 2px;
    --haplo-sidebar: #161616;
}

.haplo-console,
.haplo-console-login,
.haplo-dashboard,
.haplo-tracking-page,
.haplo-thankyou-tracking {
    font-family: "IBM Plex Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--haplo-text-primary);
    line-height: 1.45;
}

.haplo-console *,
.haplo-console-login *,
.haplo-dashboard *,
.haplo-tracking-page *,
.haplo-thankyou-tracking * {
    box-sizing: border-box;
}

body.haplo-console-standalone {
    margin: 0;
    background: var(--haplo-bg);
    color: var(--haplo-text-primary);
}

body.haplo-console-standalone a {
    color: var(--haplo-blue);
}

/* Brand */
.haplo-brandmark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
}

.haplo-brandmark img {
    display: block;
    width: auto;
    height: 34px;
    max-width: 148px;
}

.haplo-brandmark span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.haplo-brandmark-sidebar {
    margin-bottom: 32px;
}

.haplo-brandmark-sidebar img {
    filter: brightness(0) invert(1);
    height: 30px;
}

.haplo-brandmark-login {
    margin-bottom: 24px;
}

/* Shell */
.haplo-console {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    background: var(--haplo-bg);
}

.haplo-console-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 16px;
    background: var(--haplo-sidebar);
    color: #ffffff;
}

.haplo-console-nav {
    display: grid;
    gap: 2px;
}

.haplo-console-nav button {
    appearance: none !important;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #c6c6c6;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.haplo-console-nav button:hover {
    background: #262626;
    color: #ffffff;
}

.haplo-console-nav button.is-active {
    border-left-color: var(--haplo-blue);
    background: #393939;
    color: #ffffff;
}

.haplo-console-main {
    min-width: 0;
    padding: 32px;
}

.haplo-console-topbar,
.haplo-console-section-header,
.haplo-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.haplo-console-topbar {
    margin-bottom: 24px;
    padding: 24px;
    background: var(--haplo-layer-01);
    border: 1px solid var(--haplo-border);
}

.haplo-console-topbar h1,
.haplo-dashboard-header h1,
.haplo-tracking-card h1,
.haplo-login-card h1 {
    margin: 0 0 8px;
    color: var(--haplo-text-primary);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.haplo-console-topbar p,
.haplo-console-section-header p,
.haplo-dashboard-header p,
.haplo-login-card p {
    margin: 0;
    color: var(--haplo-text-secondary);
    max-width: 720px;
}

.haplo-eyebrow {
    margin: 0 0 8px !important;
    color: var(--haplo-text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.haplo-console-panel {
    display: none;
}

.haplo-console-panel.is-active {
    display: block;
}

.haplo-console-section-header {
    margin-bottom: 16px;
}

.haplo-console-section-header h2,
.haplo-settings-group h3,
.haplo-product-form h3,
.haplo-tracking-summary h2 {
    margin: 0 0 8px;
    color: var(--haplo-text-primary);
    font-size: 20px;
    line-height: 1.25;
    font-weight: 500;
}

.haplo-card,
.haplo-order-card,
.haplo-tracking-card,
.haplo-empty,
.haplo-notice,
.haplo-thankyou-tracking,
.haplo-stat-card,
.haplo-product-row {
    background: var(--haplo-layer-01);
    border: 1px solid var(--haplo-border);
    border-radius: var(--haplo-radius);
    box-shadow: none;
}

/* Login */
.haplo-console-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--haplo-bg);
}

.haplo-login-card {
    width: min(480px, 100%);
    padding: 32px;
    background: var(--haplo-layer-01);
    border: 1px solid var(--haplo-border);
}

.haplo-login-form,
.haplo-product-form,
.haplo-settings-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

/* Form controls */
.haplo-console label,
.haplo-console-login label,
.haplo-dashboard label {
    display: grid;
    gap: 8px;
    color: var(--haplo-text-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.haplo-console input:not([type="checkbox"]),
.haplo-console textarea,
.haplo-console select,
.haplo-console-login input:not([type="checkbox"]),
.haplo-console-login textarea,
.haplo-console-login select,
.haplo-dashboard input:not([type="checkbox"]),
.haplo-dashboard textarea,
.haplo-dashboard select,
.haplo-eta-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--haplo-border-strong) !important;
    border-radius: 0 !important;
    background-color: var(--haplo-layer-02) !important;
    color: var(--haplo-text-primary) !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 48px !important;
    box-shadow: none !important;
    outline: 2px solid transparent !important;
    outline-offset: -2px !important;
}

.haplo-console textarea,
.haplo-console-login textarea,
.haplo-dashboard textarea {
    min-height: 112px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    line-height: 1.5 !important;
    resize: vertical;
}

.haplo-console select,
.haplo-console-login select,
.haplo-dashboard select,
.haplo-eta-select {
    padding-right: 44px !important;
    background-image: linear-gradient(45deg, transparent 50%, #161616 50%), linear-gradient(135deg, #161616 50%, transparent 50%) !important;
    background-position: calc(100% - 18px) 21px, calc(100% - 12px) 21px !important;
    background-size: 6px 6px, 6px 6px !important;
    background-repeat: no-repeat !important;
}

.haplo-console input:focus,
.haplo-console textarea:focus,
.haplo-console select:focus,
.haplo-console-login input:focus,
.haplo-console-login textarea:focus,
.haplo-console-login select:focus,
.haplo-dashboard input:focus,
.haplo-dashboard textarea:focus,
.haplo-dashboard select:focus,
.haplo-eta-select:focus {
    outline-color: var(--haplo-focus) !important;
    border-bottom-color: var(--haplo-focus) !important;
}

.haplo-checkbox-label,
.haplo-day-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 10px !important;
    min-height: 32px;
    color: var(--haplo-text-primary) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

.haplo-checkbox-label input,
.haplo-day-toggle input {
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    border: 1px solid var(--haplo-border-strong) !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    cursor: pointer;
}

.haplo-checkbox-label input:checked,
.haplo-day-toggle input:checked {
    background: var(--haplo-blue) !important;
    border-color: var(--haplo-blue) !important;
    box-shadow: inset 0 0 0 3px #ffffff !important;
}

.haplo-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.haplo-settings-group {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--haplo-border);
    background: #ffffff;
}

.haplo-group-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
}

.haplo-group-heading p {
    margin: 0;
    color: var(--haplo-text-secondary);
    font-size: 14px;
}

.haplo-hours-table {
    display: grid;
    border-top: 1px solid var(--haplo-border);
}

.haplo-hours-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 160px 160px;
    gap: 16px;
    align-items: end;
    padding: 14px 0;
    border-bottom: 1px solid var(--haplo-border);
}

/* Buttons */
.haplo-dashboard-actions,
.haplo-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.haplo-action-button,
.haplo-secondary-button,
.haplo-track-button {
    appearance: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 0 !important;
    border-radius: 0 !important;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 120ms ease, outline-color 120ms ease;
}

.haplo-button-primary,
.haplo-track-button {
    background: var(--haplo-blue) !important;
    color: #ffffff !important;
}

.haplo-button-primary:hover,
.haplo-track-button:hover {
    background: var(--haplo-blue-hover) !important;
}

.haplo-button-done {
    background: var(--haplo-green) !important;
    color: #ffffff !important;
}

.haplo-button-danger {
    background: var(--haplo-red) !important;
    color: #ffffff !important;
}

.haplo-secondary-button {
    background: #393939 !important;
    color: #ffffff !important;
}

.haplo-secondary-button:hover {
    background: #4c4c4c !important;
}

.haplo-secondary-button:disabled,
.haplo-action-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Store state */
.haplo-store-state {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid currentColor;
    font-size: 13px;
    font-weight: 600;
}

.haplo-store-state.is-open {
    color: var(--haplo-green);
}

.haplo-store-state.is-closed {
    color: var(--haplo-red);
}

.haplo-store-closed-notice {
    margin: 0 0 16px;
    padding: 16px;
    border-left: 4px solid var(--haplo-yellow-border);
    background: var(--haplo-yellow-bg);
    color: var(--haplo-text-primary);
    font-family: "IBM Plex Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 500;
}

/* Orders */
.haplo-dashboard {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.haplo-orders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.haplo-order-card {
    padding: 16px;
}

.haplo-order-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--haplo-border);
}

.haplo-order-card-header h2 {
    margin: 0 0 4px;
    color: var(--haplo-text-primary);
    font-size: 22px;
    line-height: 1.2;
    font-weight: 500;
}

.haplo-order-card-header h2 span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-left: 8px;
    padding: 0 8px;
    background: var(--haplo-layer-02);
    color: var(--haplo-text-secondary);
    font-size: 12px;
    font-weight: 500;
    vertical-align: middle;
}

.haplo-order-card-header p,
.haplo-customer-block p,
.haplo-updated,
.haplo-product-row p {
    margin: 0;
    color: var(--haplo-text-secondary);
}

.haplo-small-link {
    color: var(--haplo-blue);
    font-size: 14px;
    white-space: nowrap;
}

.haplo-customer-block {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}

.haplo-order-items,
.haplo-tracking-summary ul,
.haplo-item-meta {
    list-style: none;
    padding: 0;
    margin: 0;
}

.haplo-order-items {
    display: grid;
    gap: 0;
    margin-bottom: 14px;
    border-top: 1px solid var(--haplo-border);
}

.haplo-order-items > li {
    padding: 12px 0;
    border-bottom: 1px solid var(--haplo-border);
}

.haplo-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 28px;
    margin-right: 8px;
    background: var(--haplo-layer-02);
    color: var(--haplo-text-primary);
    font-weight: 600;
}

.haplo-item-meta {
    margin: 6px 0 0 44px;
    color: var(--haplo-text-secondary);
    font-size: 13px;
}

.haplo-note {
    margin-bottom: 14px;
    padding: 12px;
    border-left: 4px solid var(--haplo-yellow-border);
    background: var(--haplo-yellow-bg);
}

.haplo-order-controls {
    display: grid;
    gap: 12px;
}

.haplo-order-controls label {
    display: grid;
    gap: 8px;
}

/* Menu */
.haplo-menu-grid {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.haplo-product-form,
.haplo-settings-form {
    padding: 16px;
}

.haplo-product-list {
    display: grid;
    gap: 8px;
}

.haplo-products {
    display: grid;
    gap: 8px;
}

.haplo-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
}

.haplo-product-row.is-muted {
    opacity: 0.68;
}

/* Stats */
.haplo-mini-stats,
.haplo-stats-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.haplo-mini-stats span,
.haplo-stat-card {
    padding: 16px;
    background: var(--haplo-layer-01);
    border: 1px solid var(--haplo-border);
    color: var(--haplo-text-secondary);
}

.haplo-mini-stats strong,
.haplo-stat-card strong {
    color: var(--haplo-text-primary);
}

.haplo-stat-card {
    display: grid;
    min-width: 200px;
    gap: 4px;
}

.haplo-stat-card span,
.haplo-stat-card small {
    color: var(--haplo-text-secondary);
}

.haplo-stat-card strong {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.15;
}

/* Messages */
.haplo-message {
    min-height: 24px;
    margin-bottom: 14px;
    color: var(--haplo-text-secondary);
    font-weight: 500;
}

.haplo-message-error,
.haplo-error {
    color: var(--haplo-red);
}

.haplo-message-success {
    color: var(--haplo-green);
}

.haplo-message-info {
    color: var(--haplo-blue);
}

.haplo-empty,
.haplo-notice,
.haplo-thankyou-tracking {
    padding: 16px;
}

/* Tracking */
.haplo-tracking-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px;
}

.haplo-tracking-card {
    padding: 24px;
}

.haplo-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 6px 10px;
    background: var(--haplo-layer-02);
    color: var(--haplo-text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.haplo-live-indicator small {
    color: var(--haplo-text-muted);
    font-weight: 400;
}

.haplo-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--haplo-green);
    box-shadow: 0 0 0 0 rgba(36, 161, 72, 0.45);
    animation: haploLivePulse 1.6s infinite;
}

.haplo-current-status {
    margin: 8px 0;
    color: var(--haplo-text-secondary);
    font-size: 18px;
}

.haplo-current-status strong {
    color: var(--haplo-text-primary);
}

.haplo-eta {
    color: var(--haplo-text-primary);
    font-size: 18px;
    font-weight: 600;
}

.haplo-progress {
    list-style: none;
    display: grid;
    gap: 0;
    margin: 24px 0;
    padding: 0;
    border: 1px solid var(--haplo-border);
}

.haplo-progress li {
    position: relative;
    min-height: 48px;
    padding: 14px 16px 14px 52px;
    border-bottom: 1px solid var(--haplo-border);
    background: #ffffff;
    color: var(--haplo-text-secondary);
    font-weight: 500;
}

.haplo-progress li:last-child {
    border-bottom: 0;
}

.haplo-progress li::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    width: 14px;
    height: 14px;
    border: 2px solid var(--haplo-border-strong);
    border-radius: 50%;
    background: #ffffff;
    transform: translateY(-50%);
}

.haplo-progress li.is-active {
    background: #edf5ff;
    color: var(--haplo-text-primary);
}

.haplo-progress li.is-active::before {
    border-color: var(--haplo-blue);
    background: var(--haplo-blue);
    box-shadow: inset 0 0 0 3px #ffffff;
}

.haplo-tracking-summary {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--haplo-border);
}

.haplo-tracking-summary li {
    padding: 8px 0;
    border-bottom: 1px solid var(--haplo-border);
}

.haplo-live-flash {
    animation: haploLiveFlash 900ms ease;
}

.is-hidden {
    display: none !important;
}

@keyframes haploLivePulse {
    0% { box-shadow: 0 0 0 0 rgba(36, 161, 72, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(36, 161, 72, 0); }
    100% { box-shadow: 0 0 0 0 rgba(36, 161, 72, 0); }
}

@keyframes haploLiveFlash {
    0% { outline: 2px solid transparent; }
    30% { outline: 2px solid var(--haplo-blue); }
    100% { outline: 2px solid transparent; }
}

@media (max-width: 1024px) {
    .haplo-console {
        grid-template-columns: 1fr;
    }

    .haplo-console-sidebar {
        position: relative;
        height: auto;
    }

    .haplo-console-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .haplo-console-nav button {
        text-align: center;
        border-left: 0;
        border-bottom: 3px solid transparent;
    }

    .haplo-console-nav button.is-active {
        border-bottom-color: var(--haplo-blue);
    }

    .haplo-menu-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .haplo-console-main,
    .haplo-dashboard,
    .haplo-tracking-page {
        padding: 16px;
    }

    .haplo-console-topbar,
    .haplo-console-section-header,
    .haplo-dashboard-header,
    .haplo-product-row {
        display: grid;
    }

    .haplo-console-nav {
        grid-template-columns: 1fr;
    }

    .haplo-orders {
        grid-template-columns: 1fr;
    }

    .haplo-dashboard-actions,
    .haplo-buttons {
        display: grid;
        width: 100%;
    }

    .haplo-action-button,
    .haplo-secondary-button,
    .haplo-track-button {
        width: 100%;
    }

    .haplo-form-grid,
    .haplo-hours-row {
        grid-template-columns: 1fr;
    }
}

.haplo-console option,
.haplo-dashboard option,
.haplo-console-login option {
    color: #161616 !important;
    background: #ffffff !important;
}

/* Haplo brand refinement */
:root {
    --haplo-ink: #2B1B14;
    --haplo-tomato: #FF4D2E;
    --haplo-tomato-hover: #e94327;
    --haplo-tomato-active: #b9341f;
    --haplo-blue: var(--haplo-tomato);
    --haplo-blue-hover: var(--haplo-tomato-hover);
    --haplo-blue-active: var(--haplo-tomato-active);
    --haplo-sidebar: var(--haplo-tomato);
}

.haplo-brandmark img {
    height: auto;
    max-height: 44px;
    max-width: 176px;
    object-fit: contain;
}

.haplo-brandmark-sidebar img {
    filter: none;
    max-height: 34px;
    max-width: 136px;
}

.haplo-brandmark-login img {
    max-height: 48px;
    max-width: 190px;
}

.haplo-secondary-button.is-active {
    background: var(--haplo-tomato) !important;
    color: #ffffff !important;
}

.haplo-time-input {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* Delivery zone map */
.haplo-delivery-zone {
    gap: 16px;
}

.haplo-radius-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    background: var(--haplo-ink);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.haplo-delivery-map-wrap {
    position: relative;
    min-height: 360px;
    border: 1px solid var(--haplo-border);
    background: var(--haplo-layer-02);
    overflow: hidden;
}

.haplo-delivery-map {
    width: 100%;
    height: 360px;
    min-height: 360px;
    background: var(--haplo-layer-02);
    z-index: 1;
}

.haplo-map-km-ring {
    pointer-events: none;
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 76px;
    padding: 12px;
    border: 2px solid var(--haplo-tomato);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--haplo-ink);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(43, 27, 20, 0.14);
}

.haplo-leaflet-radius-label {
    background: transparent;
    border: 0;
}

.haplo-leaflet-radius-label span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    min-height: 28px;
    padding: 0 10px;
    border: 2px solid var(--haplo-tomato);
    border-radius: 999px;
    background: #ffffff;
    color: var(--haplo-ink);
    font-family: "IBM Plex Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(43, 27, 20, 0.18);
}

.haplo-radius-control input[type="range"] {
    appearance: none !important;
    width: 100% !important;
    height: 4px !important;
    min-height: 4px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(90deg, var(--haplo-tomato), var(--haplo-layer-03)) !important;
    outline: 2px solid transparent !important;
    outline-offset: 4px !important;
}

.haplo-radius-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: var(--haplo-tomato);
    box-shadow: 0 0 0 1px var(--haplo-tomato);
    cursor: pointer;
}

.haplo-radius-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: var(--haplo-tomato);
    box-shadow: 0 0 0 1px var(--haplo-tomato);
    cursor: pointer;
}

.haplo-map-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.haplo-console .leaflet-container {
    font-family: "IBM Plex Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.haplo-console .leaflet-control-attribution {
    font-size: 10px;
}

@media (max-width: 720px) {
    .haplo-delivery-map,
    .haplo-delivery-map-wrap {
        min-height: 300px;
        height: 300px;
    }

    .haplo-group-heading {
        display: grid;
    }

    .haplo-map-actions {
        display: grid;
    }
}

/* V0.5: cleaner console, team, courier and customer flow */
.haplo-console-topbar h1,
.haplo-dashboard-header h1,
.haplo-courier-header h1,
.haplo-tracking-card h1,
.haplo-login-card h1 {
    font-weight: 500;
}

.haplo-console-nav {
    gap: 1px;
}

.haplo-console .haplo-console-main select,
.haplo-dashboard select,
.haplo-console-login select,
.haplo-eta-select {
    color-scheme: light;
}

.haplo-order-number {
    margin: -4px 0 16px;
    color: var(--haplo-text-secondary);
    font-size: 15px;
    font-weight: 600;
}

.haplo-order-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.haplo-order-meta-row span,
.haplo-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    background: var(--haplo-layer-02);
    color: var(--haplo-text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.haplo-order-meta-row strong,
.haplo-pill {
    color: var(--haplo-text-primary);
}

.haplo-help-text {
    margin: 0;
    color: var(--haplo-text-secondary);
    font-size: 14px;
}

.haplo-team-grid {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.haplo-team-form {
    display: grid;
    gap: 16px;
    padding: 16px;
}

.haplo-team-list,
.haplo-couriers {
    display: grid;
    gap: 8px;
}

.haplo-courier-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--haplo-layer-01);
    border: 1px solid var(--haplo-border);
}

.haplo-courier-row p {
    margin: 4px 0 0;
    color: var(--haplo-text-secondary);
}

.haplo-courier-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    background: var(--haplo-layer-02);
    color: var(--haplo-text-secondary);
    font-size: 13px;
}

/* Courier console */
.haplo-courier-console {
    min-height: 100vh;
    padding: 20px;
    background: var(--haplo-bg);
    color: var(--haplo-text-primary);
    font-family: "IBM Plex Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.haplo-courier-header {
    display: grid;
    gap: 16px;
    padding: 20px;
    margin: 0 0 16px;
    background: var(--haplo-layer-01);
    border: 1px solid var(--haplo-border);
}

.haplo-courier-header h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 9vw, 42px);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.haplo-courier-header p {
    margin: 0;
    color: var(--haplo-text-secondary);
}

.haplo-courier-meta {
    margin: 0 0 16px;
    padding: 12px 16px;
    background: var(--haplo-layer-01);
    border: 1px solid var(--haplo-border);
    color: var(--haplo-text-secondary);
}

.haplo-courier-orders {
    display: grid;
    gap: 16px;
}

.haplo-courier-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: var(--haplo-layer-01);
    border: 1px solid var(--haplo-border);
}

.haplo-courier-card header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--haplo-border);
}

.haplo-courier-card h2 {
    margin: 0 0 4px;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 500;
}

.haplo-courier-card header p {
    margin: 0;
    color: var(--haplo-text-secondary);
}

/* Chat */
.haplo-tracking-chat,
.haplo-chat-box {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--haplo-border);
}

.haplo-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 12px;
}

.haplo-chat-header h2,
.haplo-chat-header h3 {
    margin: 0 0 4px;
    color: var(--haplo-text-primary);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 500;
}

.haplo-chat-header p {
    margin: 0;
    color: var(--haplo-text-secondary);
    font-size: 14px;
}

.haplo-chat-thread {
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow: auto;
    padding: 12px;
    background: var(--haplo-layer-02);
    border: 1px solid var(--haplo-border);
}

.haplo-chat-empty {
    color: var(--haplo-text-secondary);
    font-size: 14px;
}

.haplo-chat-message {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    background: #ffffff;
    border-left: 3px solid var(--haplo-border-strong);
}

.haplo-chat-message div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--haplo-text-secondary);
    font-size: 12px;
}

.haplo-chat-message strong {
    color: var(--haplo-text-primary);
}

.haplo-chat-message p {
    margin: 0;
    color: var(--haplo-text-primary);
    white-space: pre-wrap;
}

.haplo-chat-customer {
    border-left-color: var(--haplo-tomato);
}

.haplo-chat-courier {
    border-left-color: var(--haplo-green);
}

.haplo-tracking-message-form,
.haplo-courier-message-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.haplo-tracking-message-form textarea,
.haplo-courier-message-form textarea {
    width: 100%;
    min-height: 88px;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--haplo-border-strong);
    border-radius: 0;
    background: var(--haplo-layer-02);
    color: var(--haplo-text-primary);
    font: inherit;
    resize: vertical;
}

.haplo-chat-feedback {
    min-height: 20px;
    margin: 8px 0 0;
    color: var(--haplo-text-secondary);
    font-size: 14px;
}

/* Storefront flow */
body.haplo-storefront-page {
    --haplo-wc-bg: #f4f4f4;
}

body.haplo-storefront-page .woocommerce,
body.haplo-storefront-page .woocommerce-page,
body.haplo-storefront-page .wp-block-woocommerce-cart,
body.haplo-storefront-page .wp-block-woocommerce-checkout {
    font-family: "IBM Plex Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--haplo-text-primary);
}

body.haplo-storefront-page .woocommerce a {
    color: var(--haplo-tomato);
}

body.haplo-storefront-page .woocommerce button.button,
body.haplo-storefront-page .woocommerce a.button,
body.haplo-storefront-page .woocommerce input.button,
body.haplo-storefront-page .woocommerce #respond input#submit,
body.haplo-storefront-page .wc-block-components-button,
body.haplo-storefront-page .wp-element-button {
    min-height: 48px !important;
    padding: 0 20px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--haplo-tomato) !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 48px !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

body.haplo-storefront-page .woocommerce button.button:hover,
body.haplo-storefront-page .woocommerce a.button:hover,
body.haplo-storefront-page .woocommerce input.button:hover,
body.haplo-storefront-page .wc-block-components-button:hover,
body.haplo-storefront-page .wp-element-button:hover {
    background: var(--haplo-tomato-hover) !important;
    color: #ffffff !important;
}

body.haplo-storefront-page .woocommerce input.input-text,
body.haplo-storefront-page .woocommerce textarea,
body.haplo-storefront-page .woocommerce select,
body.haplo-storefront-page .wc-block-components-text-input input,
body.haplo-storefront-page .wc-block-components-textarea,
body.haplo-storefront-page .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
    min-height: 48px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--haplo-border-strong) !important;
    border-radius: 0 !important;
    background: var(--haplo-layer-02) !important;
    color: var(--haplo-text-primary) !important;
    font-family: inherit !important;
    box-shadow: none !important;
}

body.haplo-storefront-page .woocommerce input:focus,
body.haplo-storefront-page .woocommerce textarea:focus,
body.haplo-storefront-page .woocommerce select:focus,
body.haplo-storefront-page .wc-block-components-text-input input:focus {
    outline: 2px solid var(--haplo-tomato) !important;
    outline-offset: -2px !important;
}

body.haplo-storefront-page .woocommerce ul.products li.product,
body.haplo-storefront-page .woocommerce-page ul.products li.product,
body.haplo-storefront-page .wc-block-grid__product {
    padding: 16px !important;
    border: 1px solid var(--haplo-border) !important;
    background: #ffffff !important;
    text-align: left !important;
}

body.haplo-storefront-page .woocommerce ul.products li.product .price,
body.haplo-storefront-page .woocommerce div.product p.price,
body.haplo-storefront-page .woocommerce div.product span.price {
    color: var(--haplo-ink) !important;
    font-weight: 700 !important;
}

body.haplo-storefront-page .woocommerce-message,
body.haplo-storefront-page .woocommerce-info,
body.haplo-storefront-page .woocommerce-error,
body.haplo-storefront-page .wc-block-components-notice-banner {
    border: 1px solid var(--haplo-border) !important;
    border-left: 4px solid var(--haplo-tomato) !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: var(--haplo-text-primary) !important;
    box-shadow: none !important;
}

body.haplo-storefront-page .woocommerce-cart-form,
body.haplo-storefront-page .cart_totals,
body.haplo-storefront-page .woocommerce-checkout-review-order,
body.haplo-storefront-page .woocommerce-billing-fields,
body.haplo-storefront-page .woocommerce-shipping-fields,
body.haplo-storefront-page .woocommerce-additional-fields {
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--haplo-border);
}

.haplo-checkout-delivery {
    margin: 20px 0;
    padding: 16px;
    border: 1px solid var(--haplo-border);
    border-left: 4px solid var(--haplo-tomato);
    background: #ffffff;
}

.haplo-checkout-delivery h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 500;
    color: var(--haplo-text-primary);
}

.haplo-checkout-delivery p {
    color: var(--haplo-text-secondary);
}

.haplo-delivery-check-result {
    min-height: 22px;
    margin: 12px 0 0;
    font-weight: 600;
}

.haplo-delivery-check-result.is-success {
    color: var(--haplo-green);
}

.haplo-delivery-check-result.is-error {
    color: var(--haplo-red);
}

.haplo-delivery-check-result.is-info {
    color: var(--haplo-text-secondary);
}

@media (max-width: 1024px) {
    .haplo-console-nav {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .haplo-team-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .haplo-courier-console {
        padding: 12px;
    }

    .haplo-courier-card header,
    .haplo-chat-header,
    .haplo-courier-row {
        display: grid;
    }
}

.haplo-brandmark-tracking {
    margin: 0 0 20px;
}

.haplo-brandmark-tracking img {
    max-height: 44px;
    max-width: 168px;
}


/* V0.6 fixes and brand polish */
.haplo-console input::placeholder,
.haplo-console textarea::placeholder,
.haplo-console-login input::placeholder,
.haplo-console-login textarea::placeholder,
.haplo-dashboard input::placeholder,
.haplo-dashboard textarea::placeholder {
    color: var(--haplo-text-secondary) !important;
    opacity: 1 !important;
}

.haplo-brandmark-sidebar img {
    max-height: 44px;
    max-width: 168px;
}

.haplo-console-sidebar {
    box-shadow: inset -1px 0 0 rgba(0,0,0,0.08);
}

.haplo-console-nav button {
    color: rgba(255,255,255,0.88) !important;
}

.haplo-console-nav button:hover,
.haplo-console-nav button.is-active {
    background: rgba(255,255,255,0.18) !important;
    color: #ffffff !important;
}

.haplo-mini-stats span {
    display: grid;
    gap: 4px;
    min-width: 152px;
}

.haplo-mini-stats small {
    color: var(--haplo-text-secondary);
    font-size: 12px;
    line-height: 1.25;
}

.haplo-mini-stats strong {
    font-size: 22px;
    line-height: 1.1;
}

.haplo-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.haplo-product-row-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.haplo-product-thumb {
    width: 72px;
    height: 72px;
    border: 1px solid var(--haplo-border);
    background: var(--haplo-layer-02);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.haplo-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.haplo-product-thumb span {
    padding: 8px;
    text-align: center;
    color: var(--haplo-text-secondary);
    font-size: 12px;
    line-height: 1.3;
}

.haplo-image-field {
    display: grid;
    gap: 12px;
}

.haplo-image-preview {
    width: 100%;
    max-width: 220px;
    border: 1px solid var(--haplo-border);
    background: var(--haplo-layer-02);
    padding: 8px;
}

.haplo-image-preview img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.haplo-product-options-fields {
    margin: 24px 0;
    display: grid;
    gap: 16px;
}

.haplo-option-group {
    display: grid;
    gap: 8px;
}

.haplo-option-group > label > span {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 600;
}

.haplo-option-checks {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.haplo-help-text {
    color: var(--haplo-text-secondary);
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 720px) {
    .haplo-product-row {
        align-items: stretch;
        flex-direction: column;
    }

    .haplo-product-row-main {
        width: 100%;
    }
}


/* V0.7 layout fixes for orders header and mini stats */
.haplo-console-panel[data-haplo-panel="orders"] .haplo-console-section-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.haplo-console-panel[data-haplo-panel="orders"] .haplo-mini-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
    gap: 12px;
    justify-content: start;
}

.haplo-console-panel[data-haplo-panel="orders"] .haplo-mini-stats > span {
    display: grid;
    gap: 6px;
    padding: 16px;
    min-width: 0;
    background: var(--haplo-layer-01);
    border: 1px solid var(--haplo-border);
    color: var(--haplo-text-secondary);
}

.haplo-console-panel[data-haplo-panel="orders"] .haplo-mini-stats > span strong {
    display: block;
    color: var(--haplo-text-primary);
    font-size: 28px;
    line-height: 1.1;
    font-weight: 600;
}

.haplo-console-panel[data-haplo-panel="orders"] .haplo-mini-stats > span small {
    color: var(--haplo-text-secondary);
    font-size: 12px;
    line-height: 1.3;
}

.haplo-console-panel[data-haplo-panel="orders"] .haplo-mini-stats > span .woocommerce-Price-amount,
.haplo-console-panel[data-haplo-panel="orders"] .haplo-mini-stats > span .woocommerce-Price-currencySymbol,
.haplo-console-panel[data-haplo-panel="orders"] .haplo-mini-stats > span .amount,
.haplo-console-panel[data-haplo-panel="orders"] .haplo-mini-stats > span bdi,
.haplo-console-panel[data-haplo-panel="orders"] .haplo-mini-stats > span span {
    display: inline !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.haplo-console-panel[data-haplo-panel="orders"] .haplo-empty {
    max-width: 480px;
}


/* V0.8 courier/chat/history fixes */
.haplo-brandmark-courier img {
    max-height: 52px;
    max-width: 176px;
}

.haplo-courier-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.haplo-card-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    color: var(--haplo-text-secondary);
    font-size: 13px;
}

.haplo-card-status-row > span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
}

.haplo-status-badge {
    padding: 0 10px;
    background: var(--haplo-layer-02);
    color: var(--haplo-text-primary);
    border: 1px solid var(--haplo-border);
    font-weight: 600;
}

.haplo-status-badge-haplo-accepted,
.haplo-status-badge-haplo-preparing,
.haplo-status-badge-haplo-ready,
.haplo-status-badge-haplo-out {
    border-color: rgba(255, 77, 46, 0.4);
    background: rgba(255, 77, 46, 0.10);
}

.haplo-status-badge-completed {
    border-color: rgba(36, 161, 72, 0.4);
    background: rgba(36, 161, 72, 0.12);
}

.haplo-status-badge-cancelled,
.haplo-status-badge-failed,
.haplo-status-badge-refunded {
    border-color: rgba(218, 30, 40, 0.35);
    background: rgba(218, 30, 40, 0.08);
}

.haplo-restaurant-message-form,
.haplo-tracking-message-form,
.haplo-courier-message-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.haplo-restaurant-message-form textarea,
.haplo-tracking-message-form textarea,
.haplo-courier-message-form textarea {
    width: 100%;
    min-height: 88px;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--haplo-border-strong);
    border-radius: 0;
    background: var(--haplo-layer-02);
    color: var(--haplo-text-primary);
    font: inherit;
    resize: vertical;
}

.haplo-restaurant-message-form textarea:focus,
.haplo-tracking-message-form textarea:focus,
.haplo-courier-message-form textarea:focus {
    outline: 2px solid var(--haplo-focus);
    outline-offset: -2px;
    border-bottom-color: var(--haplo-focus);
}

.haplo-restaurant-message-form textarea:disabled,
.haplo-tracking-message-form textarea:disabled,
.haplo-courier-message-form textarea:disabled,
.haplo-action-button:disabled,
.haplo-secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.haplo-chat-restaurant {
    border-left-color: var(--haplo-ink);
}

.haplo-order-history .haplo-order-card {
    border-left: 3px solid var(--haplo-border-strong);
}

@media (max-width: 720px) {
    .haplo-courier-header {
        grid-template-columns: 1fr;
    }
}


.haplo-brandmark-tracking img {
    max-height: 52px;
    max-width: 180px;
}

.haplo-current-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 10px;
    background: var(--haplo-layer-02);
    border: 1px solid var(--haplo-border);
}

.haplo-current-status strong {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    background: rgba(255, 77, 46, 0.12);
    color: var(--haplo-ink);
    font-weight: 700;
}


/* V0.9: WooCommerce storefront, preloaded images, courier management and final tracking */
.haplo-tracking-card.is-final .haplo-live-dot {
    background: var(--haplo-green);
    box-shadow: none;
}

.haplo-courier-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.haplo-danger-link {
    color: #da1e28 !important;
    border-color: #da1e28 !important;
    background: transparent !important;
}

.haplo-danger-link:hover {
    color: #ffffff !important;
    background: #da1e28 !important;
}

.haplo-preloaded-images {
    display: grid;
    gap: 10px;
}

.haplo-preloaded-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
}

.haplo-preloaded-image {
    appearance: none !important;
    display: grid;
    gap: 8px;
    padding: 8px !important;
    border: 1px solid var(--haplo-border) !important;
    background: var(--haplo-layer-01) !important;
    color: var(--haplo-text-primary) !important;
    cursor: pointer;
    text-align: left;
    font-family: inherit !important;
    box-shadow: none !important;
}

.haplo-preloaded-image:hover,
.haplo-preloaded-image.is-selected {
    outline: 2px solid var(--haplo-tomato) !important;
    outline-offset: -2px;
}

.haplo-preloaded-image img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #fff7f4;
}

.haplo-preloaded-image span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

/* Make WooCommerce feel like Haplo immediately after plugin upload */
body.haplo-storefront-page {
    background: #f4f4f4 !important;
    color: #161616 !important;
    font-family: Inter, "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body.haplo-storefront-page .site,
body.haplo-storefront-page #page,
body.haplo-storefront-page .site-content,
body.haplo-storefront-page .content-area,
body.haplo-storefront-page main,
body.haplo-storefront-page .entry-content {
    background: #f4f4f4 !important;
}

.haplo-storefront-brandbar {
    max-width: 1180px;
    margin: 0 auto 24px;
    padding: 18px 20px;
    background: var(--haplo-tomato);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.haplo-storefront-brand-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.haplo-storefront-brand-left img {
    width: auto;
    height: 42px;
    max-width: 150px;
    object-fit: contain;
    display: block;
}

.haplo-storefront-brand-left strong {
    display: block;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 650;
}

.haplo-storefront-brand-left span {
    display: block;
    color: rgba(255,255,255,0.84);
    font-size: 13px;
    line-height: 1.3;
}

.haplo-storefront-state {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    background: rgba(255,255,255,0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 650;
}

.haplo-storefront-state.is-closed {
    background: #2b1b14;
}

body.haplo-storefront-page .woocommerce,
body.haplo-storefront-page .woocommerce-page {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

body.haplo-storefront-page .woocommerce-products-header,
body.haplo-storefront-page .product,
body.haplo-storefront-page .woocommerce-cart-form,
body.haplo-storefront-page .cart_totals,
body.haplo-storefront-page .woocommerce-checkout,
body.haplo-storefront-page .woocommerce-order,
body.haplo-storefront-page .woocommerce-account .woocommerce-MyAccount-content,
body.haplo-storefront-page .woocommerce-account .woocommerce-MyAccount-navigation {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: none !important;
}

body.haplo-storefront-page .woocommerce-products-header {
    padding: 24px !important;
    margin-bottom: 16px !important;
}

body.haplo-storefront-page h1,
body.haplo-storefront-page h2,
body.haplo-storefront-page h3,
body.haplo-storefront-page .product_title,
body.haplo-storefront-page .woocommerce-products-header__title {
    color: #161616 !important;
    font-weight: 500 !important;
    letter-spacing: -0.02em;
}

body.haplo-storefront-page .woocommerce-result-count,
body.haplo-storefront-page .woocommerce-product-details__short-description,
body.haplo-storefront-page .product_meta,
body.haplo-storefront-page .woocommerce-privacy-policy-text,
body.haplo-storefront-page .woocommerce-shipping-destination {
    color: #525252 !important;
}

body.haplo-storefront-page .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 16px !important;
    margin: 0 !important;
}

body.haplo-storefront-page .woocommerce ul.products::before,
body.haplo-storefront-page .woocommerce ul.products::after {
    display: none !important;
}

body.haplo-storefront-page .woocommerce ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 0 16px !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    display: grid !important;
    gap: 12px !important;
    overflow: hidden;
}

body.haplo-storefront-page .woocommerce ul.products li.product a img {
    width: 100% !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin: 0 !important;
    background: #fff7f4;
}

body.haplo-storefront-page .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.haplo-storefront-page .woocommerce ul.products li.product .price,
body.haplo-storefront-page .woocommerce ul.products li.product .button {
    margin-left: 16px !important;
    margin-right: 16px !important;
}

body.haplo-storefront-page .woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 0 !important;
    margin-top: 4px !important;
    color: #161616 !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 650 !important;
}

body.haplo-storefront-page .woocommerce .price,
body.haplo-storefront-page .woocommerce-Price-amount {
    color: var(--haplo-ink) !important;
    font-weight: 650 !important;
}

body.haplo-storefront-page .woocommerce a.button,
body.haplo-storefront-page .woocommerce button.button,
body.haplo-storefront-page .woocommerce input.button,
body.haplo-storefront-page .woocommerce #respond input#submit,
body.haplo-storefront-page .wc-block-components-button,
body.haplo-storefront-page .wp-element-button {
    min-height: 48px !important;
    border-radius: 0 !important;
    border: 1px solid var(--haplo-tomato) !important;
    background: var(--haplo-tomato) !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-weight: 650 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 18px !important;
}

body.haplo-storefront-page .woocommerce a.button:hover,
body.haplo-storefront-page .woocommerce button.button:hover,
body.haplo-storefront-page .woocommerce input.button:hover,
body.haplo-storefront-page .wc-block-components-button:hover,
body.haplo-storefront-page .wp-element-button:hover {
    background: var(--haplo-tomato-hover) !important;
    border-color: var(--haplo-tomato-hover) !important;
    color: #ffffff !important;
}

body.haplo-storefront-page .woocommerce .single_add_to_cart_button,
body.haplo-storefront-page .woocommerce button[name="woocommerce_checkout_place_order"] {
    width: 100%;
}

body.haplo-storefront-page .woocommerce div.product {
    padding: 24px !important;
}

body.haplo-storefront-page .woocommerce div.product div.images img {
    background: #fff7f4;
    border: 1px solid #e0e0e0;
}

body.haplo-storefront-page .woocommerce div.product form.cart {
    display: grid;
    gap: 16px;
}

body.haplo-storefront-page .woocommerce div.product form.cart div.quantity {
    float: none !important;
    margin: 0 !important;
}

body.haplo-storefront-page .woocommerce table.shop_table {
    border-radius: 0 !important;
    border: 1px solid #e0e0e0 !important;
    background: #ffffff !important;
}

body.haplo-storefront-page .woocommerce table.shop_table th,
body.haplo-storefront-page .woocommerce table.shop_table td {
    border-top: 1px solid #e0e0e0 !important;
    padding: 16px !important;
}

body.haplo-storefront-page .woocommerce form .form-row label,
body.haplo-storefront-page .woocommerce label {
    color: #161616 !important;
    font-size: 13px !important;
    font-weight: 650 !important;
}

body.haplo-storefront-page .woocommerce input.input-text,
body.haplo-storefront-page .woocommerce textarea,
body.haplo-storefront-page .woocommerce select,
body.haplo-storefront-page .select2-container--default .select2-selection--single,
body.haplo-storefront-page .wc-block-components-text-input input,
body.haplo-storefront-page .wc-block-components-textarea,
body.haplo-storefront-page .wc-block-components-select select {
    min-height: 48px !important;
    border: 0 !important;
    border-bottom: 1px solid #8d8d8d !important;
    border-radius: 0 !important;
    background: #f4f4f4 !important;
    color: #161616 !important;
    box-shadow: none !important;
    padding: 0 14px !important;
    font-family: inherit !important;
}

body.haplo-storefront-page .woocommerce textarea,
body.haplo-storefront-page .wc-block-components-textarea {
    min-height: 112px !important;
    padding-top: 12px !important;
}

body.haplo-storefront-page .woocommerce input.input-text:focus,
body.haplo-storefront-page .woocommerce textarea:focus,
body.haplo-storefront-page .woocommerce select:focus,
body.haplo-storefront-page .select2-container--open .select2-selection--single {
    outline: 2px solid var(--haplo-tomato) !important;
    outline-offset: -2px !important;
    border-bottom-color: var(--haplo-tomato) !important;
}

body.haplo-storefront-page .woocommerce-info,
body.haplo-storefront-page .woocommerce-message,
body.haplo-storefront-page .woocommerce-error,
body.haplo-storefront-page .wc-block-components-notice-banner {
    border-radius: 0 !important;
    border: 1px solid #e0e0e0 !important;
    border-left: 4px solid var(--haplo-tomato) !important;
    background: #ffffff !important;
    color: #161616 !important;
    box-shadow: none !important;
}

body.haplo-storefront-page #add_payment_method #payment,
body.haplo-storefront-page .woocommerce-cart #payment,
body.haplo-storefront-page .woocommerce-checkout #payment {
    border-radius: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
}

body.haplo-storefront-page #add_payment_method #payment div.payment_box,
body.haplo-storefront-page .woocommerce-cart #payment div.payment_box,
body.haplo-storefront-page .woocommerce-checkout #payment div.payment_box {
    background: #f4f4f4 !important;
    color: #161616 !important;
}

body.haplo-storefront-page .haplo-product-options-fields {
    padding: 16px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
}

@media (max-width: 768px) {
    .haplo-storefront-brandbar {
        margin-bottom: 16px;
        display: grid;
    }

    .haplo-storefront-brand-left img {
        height: 34px;
        max-width: 124px;
    }

    body.haplo-storefront-page .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }

    body.haplo-storefront-page .woocommerce div.product {
        padding: 16px !important;
    }
}


/* V0.10 Haplo storefront alignment and brand system pass */
:root {
    --haplo-brand-tomato: #ff4d2e;
    --haplo-brand-ink: #2b1b14;
    --haplo-brand-cream: #fff4ef;
    --haplo-brand-surface: #ffffff;
    --haplo-brand-bg: #f7f4f2;
}

body.haplo-storefront-page {
    --wp--preset--color--vivid-cyan-blue: var(--haplo-brand-tomato) !important;
    --wp--preset--color--luminous-vivid-orange: var(--haplo-brand-tomato) !important;
    --wp--preset--color--black: var(--haplo-brand-ink) !important;
    --ast-global-color-0: var(--haplo-brand-tomato) !important;
    --ast-global-color-1: var(--haplo-brand-ink) !important;
    --ast-global-color-2: var(--haplo-brand-ink) !important;
    --global-palette1: var(--haplo-brand-tomato) !important;
    --global-palette2: var(--haplo-brand-ink) !important;
    --e-global-color-primary: var(--haplo-brand-tomato) !important;
    --e-global-color-secondary: var(--haplo-brand-ink) !important;
    background: var(--haplo-brand-bg) !important;
    color: var(--haplo-brand-ink) !important;
    accent-color: var(--haplo-brand-tomato) !important;
}

/* Tracking top alignment */
.haplo-tracking-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 24px;
}

.haplo-tracking-topline .haplo-brandmark-tracking {
    display: flex;
    align-items: center;
    margin: 0 !important;
    flex: 0 0 auto;
}

.haplo-tracking-topline .haplo-brandmark-tracking img {
    display: block;
    height: 52px;
    max-height: 52px;
    width: auto;
    max-width: 170px;
}

.haplo-tracking-topline .haplo-live-indicator {
    display: inline-flex;
    align-items: center;
    align-self: center;
    min-height: 36px;
    margin: 0 !important;
    padding: 0 14px;
    background: var(--haplo-layer-02);
    border: 1px solid var(--haplo-border);
    color: var(--haplo-text-primary);
    white-space: nowrap;
}

.haplo-tracking-card.is-final .haplo-live-indicator {
    background: #f2f7f2;
    border-color: #c8e6c9;
    color: #0e6027;
}

/* Brandbar: no more floating/misaligned logo + status */
.haplo-storefront-brandbar {
    width: min(1180px, calc(100% - 32px));
    max-width: 1180px;
    margin: 16px auto 24px !important;
    padding: 12px 16px !important;
    background: var(--haplo-brand-surface) !important;
    color: var(--haplo-brand-ink) !important;
    border: 1px solid rgba(43, 27, 20, 0.12) !important;
    border-left: 6px solid var(--haplo-brand-tomato) !important;
    box-shadow: 0 8px 24px rgba(43, 27, 20, 0.06) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
}

.haplo-storefront-brand-left {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-width: 0 !important;
}

.haplo-storefront-logo,
.haplo-storefront-brand-left img {
    display: block !important;
    width: auto !important;
    height: 52px !important;
    max-height: 52px !important;
    max-width: 170px !important;
    object-fit: contain !important;
    flex: 0 0 auto !important;
}

.haplo-storefront-title strong,
.haplo-storefront-brand-left strong {
    color: var(--haplo-brand-ink) !important;
    display: block !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.haplo-storefront-title span,
.haplo-storefront-brand-left span {
    color: rgba(43, 27, 20, 0.66) !important;
    display: block !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 2px 0 0 !important;
}

.haplo-storefront-state {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 34px !important;
    padding: 0 14px !important;
    background: #f2f7f2 !important;
    border: 1px solid #c8e6c9 !important;
    color: #0e6027 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

.haplo-storefront-state > span {
    width: 8px !important;
    height: 8px !important;
    border-radius: 999px !important;
    background: #24a148 !important;
    display: inline-block !important;
}

.haplo-storefront-state.is-closed {
    background: #fff1f1 !important;
    border-color: #ffd7d9 !important;
    color: #a2191f !important;
}

.haplo-storefront-state.is-closed > span {
    background: #da1e28 !important;
}

/* De-WooCommerce the cart and checkout hero look */
body.haplo-storefront-page.woocommerce-cart .entry-title,
body.haplo-storefront-page.woocommerce-checkout .entry-title,
body.haplo-storefront-page.woocommerce-cart .page-title,
body.haplo-storefront-page.woocommerce-checkout .page-title,
body.haplo-storefront-page.woocommerce-cart .woocommerce-products-header,
body.haplo-storefront-page.woocommerce-checkout .woocommerce-products-header,
body.haplo-storefront-page.woocommerce-cart .ast-archive-description,
body.haplo-storefront-page.woocommerce-checkout .ast-archive-description,
body.haplo-storefront-page.woocommerce-cart .page-header,
body.haplo-storefront-page.woocommerce-checkout .page-header {
    display: none !important;
}

body.haplo-storefront-page .woocommerce,
body.haplo-storefront-page .woocommerce-page,
body.haplo-storefront-page .entry-content,
body.haplo-storefront-page .site-main,
body.haplo-storefront-page main {
    color: var(--haplo-brand-ink) !important;
}

body.haplo-storefront-page a,
body.haplo-storefront-page .woocommerce a,
body.haplo-storefront-page .woocommerce-Price-amount,
body.haplo-storefront-page .price,
body.haplo-storefront-page .amount {
    color: var(--haplo-brand-ink) !important;
}

body.haplo-storefront-page .woocommerce ul.products li.product,
body.haplo-storefront-page .wc-block-grid__product,
body.haplo-storefront-page .woocommerce-cart-form,
body.haplo-storefront-page .cart_totals,
body.haplo-storefront-page .woocommerce-checkout,
body.haplo-storefront-page .woocommerce-order,
body.haplo-storefront-page .woocommerce-message,
body.haplo-storefront-page .woocommerce-info,
body.haplo-storefront-page .woocommerce-error,
body.haplo-storefront-page .wc-block-components-notice-banner {
    border-radius: 0 !important;
    border-color: rgba(43, 27, 20, 0.14) !important;
}

body.haplo-storefront-page .woocommerce a.button,
body.haplo-storefront-page .woocommerce button.button,
body.haplo-storefront-page .woocommerce input.button,
body.haplo-storefront-page .woocommerce #respond input#submit,
body.haplo-storefront-page .wc-block-components-button,
body.haplo-storefront-page .wp-element-button,
body.haplo-storefront-page .checkout-button,
body.haplo-storefront-page #place_order,
body.haplo-storefront-page .single_add_to_cart_button {
    background: var(--haplo-brand-tomato) !important;
    color: #ffffff !important;
    border: 1px solid var(--haplo-brand-tomato) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

body.haplo-storefront-page .woocommerce a.button:hover,
body.haplo-storefront-page .woocommerce button.button:hover,
body.haplo-storefront-page .woocommerce input.button:hover,
body.haplo-storefront-page .wc-block-components-button:hover,
body.haplo-storefront-page .wp-element-button:hover,
body.haplo-storefront-page .checkout-button:hover,
body.haplo-storefront-page #place_order:hover,
body.haplo-storefront-page .single_add_to_cart_button:hover {
    background: var(--haplo-brand-ink) !important;
    border-color: var(--haplo-brand-ink) !important;
    color: #ffffff !important;
}

body.haplo-storefront-page input[type="radio"],
body.haplo-storefront-page input[type="checkbox"] {
    accent-color: var(--haplo-brand-tomato) !important;
}

body.haplo-storefront-page input:focus,
body.haplo-storefront-page textarea:focus,
body.haplo-storefront-page select:focus,
body.haplo-storefront-page .select2-container--open .select2-selection--single,
body.haplo-storefront-page .wc-block-components-text-input input:focus {
    outline: 2px solid var(--haplo-brand-tomato) !important;
    outline-offset: -2px !important;
    border-color: var(--haplo-brand-tomato) !important;
    box-shadow: none !important;
}

/* Common cart/checkout progress plugins and theme steppers */
body.haplo-storefront-page [class*="step"] .active,
body.haplo-storefront-page [class*="step"].active,
body.haplo-storefront-page [class*="step"].is-active,
body.haplo-storefront-page [class*="step"] .is-active,
body.haplo-storefront-page [class*="progress"] .active,
body.haplo-storefront-page [class*="progress"].active,
body.haplo-storefront-page [class*="wizard"] .active,
body.haplo-storefront-page [class*="wizard"].active,
body.haplo-storefront-page .wpmc-step-item.current .wpmc-step-number,
body.haplo-storefront-page .wpmc-step-item.current,
body.haplo-storefront-page .wcf-embed-checkout-form .wcf-current,
body.haplo-storefront-page .cartflows_step_active,
body.haplo-storefront-page .cartflows-step-active {
    background-color: var(--haplo-brand-tomato) !important;
    border-color: var(--haplo-brand-tomato) !important;
    color: #ffffff !important;
}

body.haplo-storefront-page [class*="step"] a,
body.haplo-storefront-page [class*="progress"] a,
body.haplo-storefront-page [class*="wizard"] a {
    color: var(--haplo-brand-ink) !important;
}

body.haplo-storefront-page .woocommerce-info,
body.haplo-storefront-page .woocommerce-message,
body.haplo-storefront-page .wc-block-components-notice-banner.is-success {
    border-left: 4px solid var(--haplo-brand-tomato) !important;
}

@media (max-width: 720px) {
    .haplo-tracking-topline,
    .haplo-storefront-brandbar {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .haplo-tracking-topline .haplo-live-indicator,
    .haplo-storefront-state {
        width: 100% !important;
        justify-content: flex-start !important;
    }
}


/* V0.11 tracking page receipt look */
.haplo-tracking-page {
    max-width: 860px;
}

.haplo-tracking-card {
    position: relative;
    padding: 28px;
    background: #fffdfa;
    border: 1px solid #e6dbcf;
    box-shadow: 0 16px 40px rgba(43, 27, 20, 0.06);
}

.haplo-tracking-card::before,
.haplo-tracking-card::after {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    height: 10px;
    background-image: radial-gradient(circle, rgba(43, 27, 20, 0.12) 2px, transparent 2px);
    background-size: 14px 10px;
    background-repeat: repeat-x;
    pointer-events: none;
}

.haplo-tracking-card::before {
    top: -5px;
}

.haplo-tracking-card::after {
    bottom: -5px;
}

.haplo-tracking-topline {
    margin-bottom: 20px;
}

.haplo-tracking-topline .haplo-live-indicator {
    background: #fff8f2;
    border-color: #ead7c4;
    color: var(--haplo-brand-ink);
}

.haplo-tracking-card h1 {
    margin-bottom: 4px;
}

.haplo-tracking-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.haplo-order-number {
    margin: 0;
    color: var(--haplo-text-secondary);
    font-size: 18px;
    font-weight: 600;
}

.haplo-receipt-meta {
    min-width: 240px;
    padding: 14px 16px;
    border: 1px solid #eadfce;
    background: #fff;
}

.haplo-receipt-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px dashed #dccdbc;
    font-size: 14px;
}

.haplo-receipt-meta-row:last-child {
    border-bottom: 0;
}

.haplo-receipt-meta-row span {
    color: var(--haplo-text-secondary);
}

.haplo-receipt-meta-row strong {
    color: var(--haplo-text-primary);
    font-weight: 700;
    text-align: right;
}

.haplo-receipt-status {
    color: var(--haplo-brand-tomato) !important;
}

.haplo-progress {
    margin: 20px 0 24px;
    border: 1px solid #eadfce;
    background: #fff;
}

.haplo-progress li {
    background: #fff;
    border-bottom: 1px dashed #dccdbc;
}

.haplo-progress li.is-active {
    background: #fff6f1;
}

.haplo-tracking-summary.haplo-receipt-panel {
    margin-top: 0;
    padding: 0;
    border-top: 0;
    border: 1px solid #eadfce;
    background: #fff;
}

.haplo-receipt-panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px;
    border-bottom: 1px dashed #dccdbc;
}

.haplo-receipt-panel-header h2 {
    margin: 0;
}

.haplo-receipt-panel-header span {
    color: var(--haplo-text-secondary);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.haplo-receipt-lines {
    padding: 0 20px;
}

.haplo-receipt-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed #e4d5c5;
    font-size: 15px;
}

.haplo-receipt-line span:last-child {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.haplo-receipt-line-head {
    color: var(--haplo-text-secondary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.haplo-receipt-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 20px;
    background: #fff8f2;
}

.haplo-receipt-total span {
    color: var(--haplo-text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.haplo-receipt-total strong {
    color: var(--haplo-text-primary);
    font-size: 28px;
    line-height: 1.1;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.haplo-tracking-chat {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eadfce;
}

@media (max-width: 720px) {
    .haplo-tracking-header,
    .haplo-receipt-panel-header,
    .haplo-receipt-line,
    .haplo-receipt-total {
        display: grid;
        grid-template-columns: 1fr;
    }

    .haplo-receipt-meta {
        min-width: 0;
        width: 100%;
    }
}


/* V0.12 placeholder visibility fix for tracking chat */
.haplo-tracking-card textarea,
.haplo-tracking-card input,
.haplo-tracking-page textarea,
.haplo-tracking-page input,
.haplo-tracking-message-form textarea {
    color: var(--haplo-text-primary) !important;
}

.haplo-tracking-card textarea::placeholder,
.haplo-tracking-card input::placeholder,
.haplo-tracking-page textarea::placeholder,
.haplo-tracking-page input::placeholder,
.haplo-tracking-message-form textarea::placeholder {
    color: var(--haplo-text-secondary) !important;
    opacity: 1 !important;
}


/* V0.13 logo variants by context */
.haplo-brandmark-storefront,
.haplo-brandmark-tracking,
.haplo-brandmark-courier,
.haplo-brandmark-sidebar,
.haplo-brandmark-login {
    display: inline-flex;
    align-items: center;
}

.haplo-brandmark-storefront img {
    display: block;
    height: 44px;
    width: auto;
    max-width: 160px;
}

.haplo-brandmark-tracking img {
    display: block;
    height: 52px;
    width: auto;
    max-width: 170px;
}

.haplo-brandmark-courier img {
    display: block;
    height: 42px;
    width: auto;
    max-width: 148px;
}

.haplo-storefront-brand-left .haplo-brandmark-storefront {
    flex: 0 0 auto;
}


/* V0.14 cleanup: receipt dots, order-received details and kitchen dashboard */
.haplo-tracking-card::before,
.haplo-tracking-card::after {
    display: none !important;
    content: none !important;
}

/* WooCommerce order received/customer details should not show awkward theme icons/columns */
body.haplo-storefront-page .woocommerce-order-received .woocommerce-customer-details,
body.haplo-storefront-page .woocommerce-customer-details {
    width: min(900px, calc(100% - 32px)) !important;
    margin: 32px auto !important;
    padding: 24px !important;
    background: #fffdfa !important;
    border: 1px solid #eadfce !important;
    box-shadow: 0 12px 32px rgba(43, 27, 20, 0.05) !important;
}

body.haplo-storefront-page .woocommerce-customer-details .woocommerce-column,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-column--billing-address,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-column--shipping-address {
    width: 100% !important;
    float: none !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
}

body.haplo-storefront-page .woocommerce-customer-details .woocommerce-column__title,
body.haplo-storefront-page .woocommerce-customer-details h2 {
    margin: 0 0 14px !important;
    color: var(--haplo-brand-ink) !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    text-align: left !important;
}

body.haplo-storefront-page .woocommerce-customer-details address,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-customer-details--phone,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-customer-details--email {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--haplo-brand-ink) !important;
    font-style: normal !important;
    line-height: 1.75 !important;
}

body.haplo-storefront-page .woocommerce-customer-details address::before,
body.haplo-storefront-page .woocommerce-customer-details address::after,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-column::before,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-column::after,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-column--billing-address::before,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-column--billing-address::after,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-customer-details--phone::before,
body.haplo-storefront-page .woocommerce-customer-details .woocommerce-customer-details--email::before {
    display: none !important;
    content: none !important;
}

body.haplo-storefront-page .woocommerce-order-details,
body.haplo-storefront-page .woocommerce-table--order-details {
    width: min(900px, calc(100% - 32px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Kitchen dashboard, tablet-first */
.haplo-kitchen-screen {
    max-width: none !important;
    min-height: 100vh;
    margin: 0 !important;
    padding: 24px !important;
    background: #f7f2ee !important;
}

.haplo-kitchen-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: var(--haplo-brand-ink, #2B1B14) !important;
    color: #ffffff !important;
}

.haplo-kitchen-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.haplo-kitchen-brand .haplo-brandmark img {
    display: block;
    height: 42px;
    max-width: 150px;
    width: auto;
}

.haplo-kitchen-brand h1,
.haplo-kitchen-brand p,
.haplo-kitchen-brand .haplo-eyebrow {
    color: #ffffff !important;
    margin: 0 !important;
}

.haplo-kitchen-brand h1 {
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.haplo-kitchen-brand .haplo-eyebrow {
    opacity: 0.7;
    margin-bottom: 4px !important;
}

.haplo-kitchen-topbar .haplo-dashboard-actions {
    justify-content: flex-end;
}

.haplo-kitchen-topbar .haplo-secondary-button {
    background: rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
    outline-color: transparent !important;
}

.haplo-kitchen-topbar .haplo-secondary-button:hover,
.haplo-kitchen-topbar .haplo-secondary-button.is-active {
    background: var(--haplo-brand-tomato, #ff4d2e) !important;
    color: #ffffff !important;
}

.haplo-kitchen-topbar .haplo-store-state {
    background: #ffffff !important;
    color: var(--haplo-brand-ink, #2B1B14) !important;
    padding: 0 12px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
}

.haplo-kitchen-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.haplo-kitchen-stats > div {
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #eadfce;
    box-shadow: 0 10px 24px rgba(43, 27, 20, 0.04);
}

.haplo-kitchen-stats span {
    display: block;
    margin-bottom: 6px;
    color: var(--haplo-text-secondary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.haplo-kitchen-stats strong {
    display: block;
    color: var(--haplo-brand-ink, #2B1B14);
    font-size: 34px;
    line-height: 1.05;
    font-weight: 800;
}

.haplo-kitchen-stats strong .woocommerce-Price-amount,
.haplo-kitchen-stats strong .woocommerce-Price-currencySymbol,
.haplo-kitchen-stats strong bdi {
    color: inherit !important;
    font: inherit !important;
}

.haplo-kitchen-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0 12px;
}

.haplo-kitchen-section-title h2 {
    margin: 0;
    color: var(--haplo-brand-ink, #2B1B14);
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
}

.haplo-kitchen-section-title p {
    margin: 0;
    color: var(--haplo-text-secondary);
}

.haplo-kitchen-screen .haplo-orders {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
}

.haplo-kitchen-screen .haplo-order-card {
    border: 1px solid #eadfce !important;
    background: #ffffff !important;
    box-shadow: 0 14px 32px rgba(43, 27, 20, 0.06);
}

.haplo-kitchen-screen .haplo-empty {
    max-width: none;
    min-height: 160px;
    display: grid;
    place-items: center;
    background: #ffffff !important;
    border: 1px dashed #d9c7b7 !important;
    color: var(--haplo-text-secondary) !important;
    font-size: 18px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .haplo-kitchen-topbar,
    .haplo-kitchen-section-title {
        display: grid;
        align-items: stretch;
    }

    .haplo-kitchen-stats {
        grid-template-columns: 1fr;
    }

    .haplo-kitchen-screen .haplo-orders {
        grid-template-columns: 1fr;
    }
}


/* V0.15 courier fixes and logo context polish */
.haplo-courier-console,
.haplo-courier-card,
.haplo-courier-card * {
    -webkit-font-smoothing: antialiased;
}

.haplo-courier-console textarea,
.haplo-courier-message-form textarea,
.haplo-courier-card textarea {
    color: var(--haplo-text-primary) !important;
    -webkit-text-fill-color: var(--haplo-text-primary) !important;
    background: var(--haplo-layer-02) !important;
    caret-color: var(--haplo-tomato) !important;
}

.haplo-courier-console textarea::placeholder,
.haplo-courier-message-form textarea::placeholder,
.haplo-courier-card textarea::placeholder {
    color: var(--haplo-text-secondary) !important;
    -webkit-text-fill-color: var(--haplo-text-secondary) !important;
    opacity: 1 !important;
}

.haplo-courier-console textarea:disabled,
.haplo-courier-message-form textarea:disabled,
.haplo-courier-card textarea:disabled {
    color: var(--haplo-text-secondary) !important;
    -webkit-text-fill-color: var(--haplo-text-secondary) !important;
    opacity: 1 !important;
}

.haplo-brandmark-courier img {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    object-fit: contain;
    border-radius: 14px;
}

.haplo-brandmark-storefront img {
    filter: none !important;
}

.haplo-brandmark-sidebar img,
.haplo-brandmark-tracking img,
.haplo-brandmark-login img {
    filter: none !important;
}

.haplo-courier-card [data-courier-action="status"]:disabled {
    cursor: not-allowed;
    opacity: 0.55 !important;
}
