/* ==========================================================================
   ACCOUNT — My Bookings (design kit A — mobile-first)
   Loads after css/a-kit.css and reuses its tokens/components only: no new
   color system, no raw hex. Semantic colors the kit doesn't define (danger,
   success) are derived from --accent/--brand via color-mix() rather than
   invented — see the pill/danger-button rules below for the reasoning.
   ========================================================================== */

/* Author rules with an explicit `display` beat the UA [hidden] rule at equal
   specificity (author origin always wins over UA origin). Every view/overlay
   below is toggled via the `hidden` DOM property, so this guard is load-bearing
   — without it, elements with their own `display` stay visible while "hidden". */
[hidden] { display: none !important; }

/* ─── Shared page scaffolding ────────────────────────────────────────────
   .wrap (a-kit.css) already centers at min(1200px, 100% - 40px); this class
   only adds the page's own vertical rhythm. */
.mb-shell { padding: 24px 0 40px; }

.mb-page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.mb-page-title { font-family: var(--serif); font-weight: 600; font-size: var(--t-h2); line-height: 1.1; letter-spacing: -.01em; color: var(--ink); }
.mb-signout-btn { font-size: var(--t-13); font-weight: 500; color: var(--ink-3); }
.mb-signout-btn b { font-weight: 700; color: var(--brand-deep); }

.mb-field { margin-bottom: 18px; }

.mb-label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: var(--t-14);
    font-weight: 600;
}

.mb-optional { color: var(--ink-3); font-weight: 400; font-size: var(--t-12); }

.mb-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--radius-lg);
    color: var(--ink);
    background: var(--card);
    font-family: var(--sans);
    font-size: var(--t-16);
    outline: none;
    transition: border-color var(--d-ui) ease;
}
textarea.mb-input { min-height: 0; padding: 14px 16px; }

.mb-input:focus { border-color: var(--brand); }
.mb-input::placeholder { color: var(--ink-3); }

.mb-phone-wrap {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1.5px solid var(--line-2);
    border-radius: var(--radius-lg);
    background: var(--card);
    transition: border-color var(--d-ui) ease;
}

.mb-phone-wrap:focus-within { border-color: var(--brand); }

.mb-phone-prefix {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 14px;
    border-right: 1.5px solid var(--line-2);
    background: var(--paper);
    color: var(--ink-2);
    font-size: var(--t-16);
    font-weight: 600;
    white-space: nowrap;
}

.mb-phone-input { flex: 1; min-height: 52px; border: none !important; border-radius: 0; }

.mb-error {
    margin-top: 6px;
    color: var(--accent-dark);
    font-size: var(--t-14);
    line-height: 1.5;
}

/* ─── Buttons: reuse the kit's own visual language (see css/a-kit.css .btn) ── */
.mb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-pill);
    font: 700 var(--t-14)/1 var(--sans);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--d-press) var(--ease-out), background-color var(--d-ui) ease, border-color var(--d-ui) ease, color var(--d-ui) ease;
}
.mb-btn:active { transform: scale(.97); }

.mb-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.mb-btn-lg { min-height: 52px; padding: 0 24px; font-size: var(--t-16); }
.mb-btn-block { width: 100%; }

.mb-btn-primary {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 65%, transparent);
}

@media (hover: hover) and (pointer: fine) {
    .mb-btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
    .mb-btn-outline:hover { border-color: var(--brand); color: var(--brand-deep); }
    .mb-btn-ghost:hover { color: var(--ink); }
}

.mb-btn-primary:disabled {
    background: var(--tint);
    color: var(--ink-3);
    box-shadow: none;
    cursor: not-allowed;
}

.mb-btn-outline {
    border-color: var(--line-2);
    background: var(--card);
    color: var(--ink);
}

.mb-btn-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--ink-2);
}

/* Destructive actions: the kit has no red — the confirm sheet's own copy
   ("Cancel this booking" / "Keep booking") and a warm-tinted fill carry the
   signal instead of a hue the design system doesn't define. Text stays
   --ink so it always clears 4.5:1 (an accent-toned text at this weight/size
   does not, measured against --card). */
.mb-btn-danger {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--card));
    color: var(--ink);
}
.mb-btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 16%, var(--card)); border-color: var(--accent-dark); }

.mb-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 6px 0;
    border: none;
    background: none;
    color: var(--ink-3);
    font-family: var(--sans);
    font-size: var(--t-14);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) { .mb-link-btn:hover { color: var(--ink-2); } }

/* ─── Auth view (signed out) ─────────────────────────────────────────────── */
.mb-auth-view { display: flex; align-items: flex-start; justify-content: center; min-height: calc(100dvh - var(--hdr-h)); padding-top: 8vh; }

.mb-auth-card {
    box-sizing: border-box;
    width: min(420px, 100%);
    margin: 0 12px;
    padding: 28px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-2xl);
    background: var(--card);
    box-shadow: var(--shadow-2);
}

.mb-auth-title { margin-bottom: 8px; font-family: var(--serif); font-weight: 600; font-size: var(--t-h2); line-height: 1.15; letter-spacing: -.01em; color: var(--ink); }
.mb-auth-sub { margin-bottom: 24px; color: var(--ink-2); font-size: var(--t-14); line-height: 1.55; }

.mb-otp-sent-to { margin-bottom: 20px; color: var(--ink-2); font-size: var(--t-14); text-align: center; }
.mb-otp-sent-to strong { color: var(--ink); }

.mb-otp-wrap { margin-bottom: 8px; text-align: center; }

.mb-otp-boxes { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }

.mb-otp-box {
    box-sizing: border-box;
    width: 44px;
    height: 52px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--radius-lg);
    color: var(--ink);
    background: var(--card);
    font-family: var(--sans);
    font-size: var(--t-21);
    font-weight: 800;
    text-align: center;
    outline: none;
    caret-color: var(--brand);
    transition: border-color var(--d-ui) ease, background-color var(--d-ui) ease;
}

.mb-otp-box:focus { border-color: var(--brand); }
.mb-otp-box:not(:placeholder-shown) { border-color: var(--brand); background: var(--tint); }

.mb-otp-timer { margin-top: 8px; color: var(--ink-2); font-size: var(--t-14); }

.mb-otp-actions { display: flex; gap: 10px; margin-top: 20px; }
.mb-otp-actions .mb-btn { flex: 1; }
.mb-otp-actions .mb-btn-ghost { flex: 0 0 auto; }

/* ─── Empty state (signed in, zero bookings) ────────────────────────────── */
.mb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 340px;
    margin: 10vh auto 0;
    padding: 0 16px;
    text-align: center;
}

.mb-empty-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: var(--tint);
    color: var(--brand-deep);
}

.mb-empty-icon svg { width: 32px; height: 32px; }
.mb-empty-title { margin-bottom: 8px; font-family: var(--serif); font-weight: 600; font-size: var(--t-21); color: var(--ink); }
.mb-empty-sub { margin-bottom: 24px; color: var(--ink-2); font-size: var(--t-14); }
.mb-empty-inline { margin: 4vh auto 0; }

/* ─── List view: groups + responsive grid (design A #1440: a list of cards
   reads as a mobile layout stretched wide past ~700px — grid it) ────────── */
.mb-group { margin-bottom: 28px; }
.mb-group:last-child { margin-bottom: 0; }

.mb-group-title {
    margin: 0 4px 12px;
    color: var(--ink);
    font-size: var(--t-18);
    font-weight: 700;
}

.mb-card-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
.mb-history-list { display: grid; grid-template-columns: 1fr; gap: 8px; }

@media (min-width: 1000px) {
    .mb-card-list, .mb-history-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* ─── Booking card (active — always expanded) ───────────────────────────── */
.mb-card {
    box-sizing: border-box;
    padding: 18px 18px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: var(--shadow-1);
}

.mb-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.mb-card-titles { min-width: 0; }
/* Wraps rather than truncates — the appliance name is the card's identity;
   an ellipsis can silently hide the one word that told two bookings apart. */
.mb-card-appliance { color: var(--ink); font-size: var(--t-16); font-weight: 700; line-height: 1.3; }
.mb-card-service { margin-top: 2px; color: var(--ink-2); font-size: var(--t-14); line-height: 1.4; }

.mb-card-ref { font-size: var(--t-12); color: var(--ink-3); margin: -2px 0 6px; letter-spacing: .02em; }

.mb-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--ink-2);
    font-size: var(--t-14);
}

.mb-card-meta svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--ink-3); }

/* ─── Status pill: text always --ink (safe at 4.5:1 everywhere); only the
   dot and the background wash carry the status hue. ───────────────────── */
.mb-status-pill {
    --pill-bg: var(--paper);
    --pill-dot: var(--ink-3);
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    background: var(--pill-bg);
    color: var(--ink);
    font-size: var(--t-12);
    font-weight: 700;
    white-space: nowrap;
}

.mb-status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--pill-dot);
}

.mb-status-pill.is-pending    { --pill-bg: var(--paper); --pill-dot: var(--ink-3); }
.mb-status-pill.is-confirmed  { --pill-bg: var(--tint); --pill-dot: var(--brand); }
.mb-status-pill.is-assigned   { --pill-bg: var(--tint); --pill-dot: var(--brand); }
.mb-status-pill.is-onway      { --pill-bg: color-mix(in srgb, var(--accent) 16%, var(--card)); --pill-dot: var(--accent); }
.mb-status-pill.is-inprogress { --pill-bg: color-mix(in srgb, var(--accent) 16%, var(--card)); --pill-dot: var(--accent); }
.mb-status-pill.is-onhold      { --pill-bg: color-mix(in srgb, var(--warning) 22%, var(--card)); --pill-dot: var(--warning); }
.mb-status-pill.is-partspending { --pill-bg: color-mix(in srgb, var(--warning) 22%, var(--card)); --pill-dot: var(--warning); }
.mb-status-pill.is-rescheduled  { --pill-bg: color-mix(in srgb, var(--warning) 22%, var(--card)); --pill-dot: var(--warning); }
.mb-status-pill.is-completed  { --pill-bg: var(--tint); --pill-dot: var(--brand); }
.mb-status-pill.is-cancelled  { --pill-bg: var(--line); --pill-dot: var(--ink-3); }
.mb-status-pill.is-unknown    { --pill-bg: var(--paper); --pill-dot: var(--ink-3); }

/* "Live" states get a soft pulse on the dot — a real-time signal, not decoration. */
.motion .mb-status-pill.is-onway::before,
.motion .mb-status-pill.is-inprogress::before {
    animation: mb-pill-pulse 1.8s ease-out infinite;
}
.rm .mb-status-pill.is-onway::before,
.rm .mb-status-pill.is-inprogress::before { animation: none; }

@keyframes mb-pill-pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
    70%  { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}

.mb-status-next {
    margin-bottom: 12px;
    color: var(--ink-2);
    font-size: var(--t-13);
    line-height: 1.5;
}

.mb-card-amount {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}

.mb-card-amount-label { color: var(--ink-3); font-size: var(--t-12); }
.mb-card-amount-value { color: var(--ink); font-size: var(--t-18); font-weight: 800; }

/* flex-wrap + 47% basis: 2 buttons sit side by side as before; a 3rd
   (Reschedule alongside View details/Cancel) wraps to its own full-width
   row instead of squeezing three labels into ~100px each at 375px. */
.mb-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-card-actions .mb-btn { flex: 1 1 47%; }

.mb-card-complaint-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 4px;
    padding: 0;
    border: none;
    background: none;
    color: var(--ink-3);
    font: 600 var(--t-13)/1.3 var(--sans);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) { .mb-card-complaint-link:hover { color: var(--brand-deep); } }

.mb-complaint-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    background: var(--tint);
    color: var(--brand-deep);
    font-size: var(--t-12);
    font-weight: 700;
}
.mb-complaint-pill svg { width: 12px; height: 12px; }

.mb-card-confirm {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--tint);
    color: var(--brand-deep);
    font-size: var(--t-13);
    line-height: 1.5;
}

/* ─── History rows (collapsed by default) ───────────────────────────────── */
.mb-history-row {
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
    align-self: start;
}

.mb-history-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border: none;
    background: none;
    color: inherit;
    font-family: var(--sans);
    text-align: left;
    cursor: pointer;
}

.mb-history-summary-titles { flex: 1; min-width: 0; }
.mb-history-appliance { color: var(--ink); font-size: var(--t-14); font-weight: 700; line-height: 1.3; }
.mb-history-date { margin-top: 1px; color: var(--ink-3); font-size: var(--t-12); }

.mb-history-chevron { flex-shrink: 0; width: 18px; height: 18px; color: var(--ink-3); transition: transform var(--d-ui) ease; }
.mb-history-row.is-expanded .mb-history-chevron { transform: rotate(180deg); }

.mb-history-detail {
    display: none;
    padding: 0 14px 14px;
    border-top: 1px solid var(--line);
}

.mb-history-row.is-expanded .mb-history-detail { display: block; padding-top: 12px; }
.mb-history-detail .mb-card-service { margin-bottom: 8px; }

.mb-show-older-btn {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    padding: 12px;
    border: 1.5px dashed var(--line-2);
    border-radius: var(--radius-lg);
    background: none;
    color: var(--brand-deep);
    font-family: var(--sans);
    font-size: var(--t-14);
    font-weight: 700;
    cursor: pointer;
}
@media (min-width: 1000px) { .mb-show-older-btn { grid-column: 1 / -1; } }

@media (hover: hover) and (pointer: fine) { .mb-show-older-btn:hover { border-color: var(--brand); background: var(--tint); } }

/* ─── Skeleton loading ───────────────────────────────────────────────────── */
.mb-skeleton-wrap { display: flex; flex-direction: column; gap: 12px; }

.mb-skeleton-card {
    height: 120px;
    border-radius: var(--radius-xl);
    background: linear-gradient(90deg, var(--line) 25%, var(--paper) 37%, var(--line) 63%);
    background-size: 400% 100%;
    animation: mb-shimmer 1.4s ease infinite;
}
.mb-skeleton-card--sm { height: 56px; }

.rm .mb-skeleton-card { animation-duration: 2.2s; }

@keyframes mb-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ─── Load error banner ──────────────────────────────────────────────────── */
.mb-load-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 8vh auto 0;
    padding: 24px 20px;
    max-width: 340px;
    text-align: center;
}

.mb-load-error p { margin: 0; color: var(--ink-2); font-size: var(--t-14); }

/* ─── Bottom sheets (complaint / cancel / reschedule) — same drawer as the
   kit's own .sheet, scoped to this file's existing selectors. ───────────── */
.mb-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(6, 30, 28, .42);
}

.mb-sheet {
    box-sizing: border-box;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 51;
    width: 100%;
    max-height: min(88dvh, 640px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    background: var(--card);
    box-shadow: 0 -20px 48px -20px rgba(6, 30, 28, .4);
}

.mb-sheet-handle { width: 40px; height: 4px; margin: 2px auto 14px; border-radius: 2px; background: var(--line-2); }

.mb-sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.mb-sheet-title { margin: 0; font: 700 var(--t-18)/1.3 var(--sans); color: var(--ink); }

.mb-sheet-close {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
}

.mb-sheet-close svg { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) { .mb-sheet-close:hover { background: var(--paper); color: var(--ink); } }

.mb-sheet-context { margin-bottom: 16px; color: var(--ink-2); font-size: var(--t-14); line-height: 1.5; }

.mb-sheet-categories { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

.mb-sheet-category-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--t-14);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--d-ui) ease, background-color var(--d-ui) ease;
}

@media (hover: hover) and (pointer: fine) { .mb-sheet-category-btn:hover { border-color: var(--brand); } }

.mb-sheet-category-radio {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--line-2);
    border-radius: 50%;
}

.mb-sheet-category-radio::after {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand);
    transform: scale(0);
    transition: transform var(--d-ui) ease;
}

.mb-sheet-category-btn.is-selected {
    border-color: var(--brand);
    background: var(--tint);
}

.mb-sheet-category-btn.is-selected .mb-sheet-category-radio { border-color: var(--brand); }
.mb-sheet-category-btn.is-selected .mb-sheet-category-radio::after { transform: scale(1); }

.mb-sheet-textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--radius-lg);
    color: var(--ink);
    background: var(--card);
    font-family: var(--sans);
    font-size: var(--t-14);
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color var(--d-ui) ease;
}

.mb-sheet-textarea:focus { border-color: var(--brand); }

.mb-sheet-char-count {
    display: block;
    margin-top: 4px;
    color: var(--ink-3);
    font-size: var(--t-12);
    text-align: right;
}

.mb-sheet-submit { margin-top: 6px; }

@media (min-width: 1000px) {
    .mb-sheet {
        left: auto;
        right: max(20px, calc((100vw - 1200px) / 2));
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        width: 420px;
        max-height: min(80dvh, 680px);
        border-radius: var(--radius-2xl);
    }
}

/* ─── Confirm dialog (cancel booking / delete address) ──────────────────── */
.mb-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 52;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 30, 28, .42);
}

.mb-confirm-dialog {
    box-sizing: border-box;
    width: min(340px, 100%);
    padding: 24px;
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: var(--shadow-2);
    text-align: center;
}

.mb-confirm-title { margin: 0 0 4px; color: var(--ink); font-size: var(--t-18); font-weight: 700; }
.mb-confirm-sub { margin: 0 0 20px; color: var(--ink-2); font-size: var(--t-14); }
.mb-confirm-error { margin: -10px 0 16px; color: var(--accent-dark); font-size: var(--t-14); }

.mb-confirm-actions { display: flex; flex-direction: column; gap: 8px; }
.mb-confirm-actions .mb-btn { width: 100%; }

@media (min-width: 640px) {
    .mb-confirm-actions { flex-direction: row-reverse; }
}

/* ══════════════════════════════════════════════════════════════════════════
   ACCOUNT AREA — tab bar (Bookings | Profile | Addresses)
   ══════════════════════════════════════════════════════════════════════════ */
.mb-tabbar {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    border-radius: var(--radius-pill);
    background: var(--tint);
}
@media (min-width: 1000px) { .mb-tabbar { max-width: 420px; } }

.mb-tab {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 10px 4px;
    border: none;
    border-radius: var(--radius-pill);
    background: none;
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: var(--t-14);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--d-ui) ease, color var(--d-ui) ease;
}

.mb-tab.is-active {
    background: var(--card);
    color: var(--brand-deep);
    box-shadow: var(--shadow-1);
}

@media (hover: hover) and (pointer: fine) { .mb-tab:hover:not(.is-active) { color: var(--ink); } }

.mb-tabpanel { min-width: 0; }

/* ─── Profile tab ────────────────────────────────────────────────────────── */
.mb-profile-card {
    padding: 6px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: var(--shadow-1);
}
@media (min-width: 1000px) { .mb-profile-card, .mb-address-list { max-width: 560px; } }

.mb-profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 0;
}

.mb-profile-row + .mb-profile-row { border-top: 1px solid var(--line); }

.mb-profile-row-main { min-width: 0; }
.mb-profile-label { margin-bottom: 3px; color: var(--ink-3); font-size: var(--t-12); }
.mb-profile-value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink); font-size: var(--t-16); font-weight: 700; }

.mb-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: var(--tint);
    color: var(--brand-deep);
    font-size: var(--t-12);
    font-weight: 700;
}
.mb-verified-badge svg { width: 10px; height: 10px; }

.mb-profile-note { margin: 0 0 12px; color: var(--ink-3); font-size: var(--t-12); line-height: 1.5; }

.mb-profile-edit-form { padding: 4px 0 16px; border-top: 1px solid var(--line); }
.mb-profile-edit-actions { display: flex; gap: 8px; margin-top: 2px; }
.mb-profile-edit-actions .mb-btn { flex: 1; }

.mb-profile-confirm {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--tint);
    color: var(--brand-deep);
    font-size: var(--t-12);
}

/* ─── Addresses tab ──────────────────────────────────────────────────────── */
.mb-address-toolbar { margin-bottom: 12px; }

.mb-address-list { display: flex; flex-direction: column; gap: 10px; }

.mb-address-card {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-1);
}

.mb-address-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.mb-address-label { color: var(--ink); font-size: var(--t-14); font-weight: 700; }

.mb-address-default {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--tint);
    color: var(--brand-deep);
    font-size: var(--t-12);
    font-weight: 700;
    vertical-align: middle;
}

.mb-address-line { color: var(--ink-2); font-size: var(--t-14); line-height: 1.4; }
.mb-address-city { margin-top: 2px; color: var(--ink-3); font-size: var(--t-12); }

.mb-address-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.mb-address-actions .mb-link-btn { min-height: 32px; padding: 0; font-size: var(--t-12); }

.mb-link-btn-danger { color: var(--accent-dark); }
@media (hover: hover) and (pointer: fine) { .mb-link-btn-danger:hover { color: var(--accent-dark); text-decoration-thickness: 2px; } }

.mb-address-form {
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
}

.mb-address-form-title { margin: 0 0 12px; color: var(--ink); font-size: var(--t-16); font-weight: 700; }

.mb-addr-default-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--ink-2);
    font-size: var(--t-14);
}

/* select uses the same field chrome as text inputs; native OS arrow kept
   (no custom chevron) so the indicator never depends on a hardcoded color. */
select.mb-input { padding-right: 14px; }

@media (min-width: 640px) {
    .mb-card { padding: 20px 22px 18px; }
}
