/* Sportsale dashboard — single consolidated stylesheet.
   Replaces app.css / order-details.css / connect.css / dashboard-enhancements.css /
   dashboard-v2.css / react-dashboard.css.
   Color rule: blue is reserved for interactive elements (links, buttons, toggles).
   Headings and body text are near-black. */

/* ---------- Fonts ---------- */
@font-face {
    font-family: "Assistant";
    src: url("/assets/fonts/assistant-hebrew.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
    font-family: "Assistant";
    src: url("/assets/fonts/assistant-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
    color-scheme: light;
    --ink: #101828;
    --text-2: #45536a;
    --muted: #66748b;
    --line: #e3e9f1;
    --line-strong: #cfd9e6;
    --bg: #f3f5f9;
    --card: #fff;
    --blue: #145fc2;
    --blue-hover: #0f4c9d;
    --blue-soft: #e9f1fc;
    --blue-ring: rgba(20, 95, 194, .14);
    --green: #067647;
    --green-soft: #ecf9f2;
    --green-line: #b5e2cb;
    --red: #b42318;
    --red-soft: #fef1ef;
    --red-line: #f0b8b1;
    --amber: #8a5300;
    --amber-soft: #fdf5e5;
    --amber-line: #ecd394;
    --navy-chrome-1: #10334f;
    --navy-chrome-2: #0a2033;
    --field: #fff;
    --surface-2: #f7f9fc;
    --surface-blue: #f7faff;
    --chip: #eef2f7;
    --btn-line: var(--btn-line);
    --btn-line-strong: var(--btn-line-strong);
    --topbar-bg: rgba(255, 255, 255, .95);
    --btn-primary-ink: #fff;
    --radius-card: 16px;
    --radius-ctl: 10px;
    --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .05);
    --shadow-pop: 0 18px 50px rgba(10, 28, 50, .22);
    --font: "Assistant", "Segoe UI", system-ui, Arial, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.react-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); background: var(--bg); font-weight: 600; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.react-dashboard h1 { font-size: 22px; font-weight: 700; }
.react-dashboard h2 { font-size: 19px; font-weight: 700; }
.react-dashboard h3 { font-size: 17px; font-weight: 700; }
.react-dashboard h4 { font-size: 15px; font-weight: 700; }
.react-dashboard p { margin: 0; line-height: 1.6; }
.react-dashboard strong { font-weight: 700; }
.react-dashboard b { font-weight: 600; }
[dir="ltr"] { font-variant-numeric: tabular-nums; }

/* Interactive base: blue belongs to things you can press. */
.react-dashboard .dashboard-main a:not(.order-message-icon):not(.customer-message-button):not(.whatsapp-action):not(.review-request-menu-button):not(.customer-review-button) { color: var(--blue); }
.react-dashboard .dashboard-main a:hover:not(.order-message-icon):not(.customer-message-button):not(.whatsapp-action):not(.review-request-menu-button):not(.customer-review-button) { color: var(--blue-hover); }
button { cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
button:not(:disabled):active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; }
.react-dashboard button:disabled,
.react-dashboard input:disabled,
.react-dashboard select:disabled { color: #8994a5; border-color: #dde3ec; background: #eef1f5; box-shadow: none; }
.react-dashboard button:focus-visible,
.react-dashboard a:focus-visible,
.react-dashboard summary:focus-visible,
.react-dashboard [role="button"]:focus-visible { outline: 3px solid var(--blue-ring); outline-offset: 2px; }

summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }
details > summary { list-style: none; }

/* Default action buttons inside panels / action rows */
.actions button, .panel button, .toolbar button, .form-dialog-actions button, .customer-card-details button {
    min-height: 42px;
    border: 1px solid var(--blue);
    border-radius: var(--radius-ctl);
    padding: 9px 15px;
    color: var(--btn-primary-ink);
    background: var(--blue);
    font-weight: 600;
}
.actions button:hover:not(:disabled), .panel button:hover:not(:disabled),
.toolbar button:hover:not(:disabled), .form-dialog-actions button:hover:not(:disabled),
.customer-card-details button:hover:not(:disabled) { background: var(--blue-hover); border-color: var(--blue-hover); }
.panel button.small, .actions button.small, .customer-card-details button.small { min-height: 38px; padding: 7px 13px; font-size: 13px; }
.react-dashboard .secondary,
.actions .secondary, .panel .secondary, .form-dialog-actions .secondary {
    color: var(--blue);
    background: var(--card);
    border: 1px solid var(--btn-line);
}
.react-dashboard .secondary:hover:not(:disabled) { background: var(--blue-soft); border-color: var(--btn-line-strong); color: var(--blue-hover); }
.panel button.small, .actions button.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.danger { color: var(--red) !important; border-color: var(--red-line) !important; background: var(--red-soft) !important; }
.reject-order-button:not(:disabled),
.confirmation-dialog .danger-solid:not(:disabled) { color: #fff !important; border-color: var(--red) !important; background: #c6281d !important; }
.reject-order-button:not(:disabled):hover,
.confirmation-dialog .danger-solid:not(:disabled):hover { border-color: #971d14 !important; background: #a92118 !important; }

/* Loading spinner on buttons */
.is-loading { position: relative; cursor: progress; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.is-loading::before { content: ""; width: 13px; height: 13px; border: 2px solid currentColor; border-inline-start-color: transparent; border-radius: 50%; animation: app-spin .7s linear infinite; }
@keyframes app-spin { to { transform: rotate(360deg); } }

/* Inputs */
.react-dashboard input:not([type="checkbox"]),
.react-dashboard select,
.react-dashboard textarea,
.react-login input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-ctl);
    padding: 9px 12px;
    color: var(--ink);
    background: var(--field);
    outline: 0;
}
.react-dashboard input:focus,
.react-dashboard select:focus,
.react-dashboard textarea:focus,
.react-login input:focus { border-color: #6b9bd8; box-shadow: 0 0 0 3px var(--blue-ring); }
.react-dashboard label { color: var(--text-2); font-size: 12px; font-weight: 600; }

/* Feedback banners */
.notice { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--green-line); border-radius: 12px; color: var(--green); background: var(--green-soft); }
.alert { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--red-line); border-radius: 12px; color: var(--red); background: var(--red-soft); }
.empty { padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--card); color: var(--muted); text-align: center; }
.empty h2 { margin-bottom: 6px; }

/* ---------- Shell ---------- */
.dashboard-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.dashboard-main { min-width: 0; }
.dashboard-content { width: min(1228px, 100%); min-height: calc(100vh - 86px); margin: 28px auto 70px; padding-inline: 24px; }

/* Sidebar (dark chrome) */
.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: 264px;
    height: 100vh;
    padding: 22px 16px 16px;
    color: #fff;
    background: linear-gradient(180deg, var(--navy-chrome-1) 0%, var(--navy-chrome-2) 100%);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: #10334f; background: #fff; font-size: 20px; font-weight: 800; }
.sidebar-brand p { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.sidebar-brand small { color: #a3bed7; font-size: 12px; }
.sidebar-nav { display: grid; gap: 5px; margin-top: 18px; }
.sidebar-link, .sidebar-logout {
    width: 100%;
    min-height: 46px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 11px;
    padding: 10px 12px;
    color: #c3d3e3;
    background: transparent;
    text-align: right;
    font-weight: 600;
}
.sidebar-link:hover, .sidebar-link.active { color: #fff; background: rgba(255,255,255,.11); }
.sidebar-link.active { box-shadow: inset -3px 0 #5ea3ec; }
.sidebar-link > span:first-child, .sidebar-logout > span:first-child { display: grid; place-items: center; }
.sidebar-link svg, .sidebar-logout svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-link strong { min-width: 24px; padding: 2px 7px; border-radius: 99px; color: #fff; background: #1f6fc4; text-align: center; font-size: 11px; font-weight: 700; }
.sidebar-link-copy { display: grid; min-width: 0; line-height: 1.2; }
.sidebar-link-copy b { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-link-copy small { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 10px; font-weight: 600; }
.sidebar-item-subtitle { overflow: hidden; color: #86a2bd; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-item-subtitle.attention { color: #9bcfff; }
.sidebar-pending { color: #f2c66d; }
.connect-menu-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.connect-menu-status.connected { color: #74dba5; }
.connect-menu-status.connecting { color: #f1c56c; }
.connect-menu-status.disconnected { color: #ff9292; }
.sidebar-footer { display: grid; gap: 9px; margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-contacts { display: grid; gap: 5px; padding: 0 4px 6px; }
.sidebar-contacts > strong { color: #8ca7c0; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.sidebar-contacts a { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 9px; color: #d7e4f0; background: rgba(255,255,255,.055); text-decoration: none; }
.sidebar-contacts a:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-contacts a span { display: grid; min-width: 0; line-height: 1.2; }
.sidebar-contacts a span strong { overflow: hidden; font-size: 10.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-contacts a b { color: #9cc3e6; font-size: 10.5px; font-weight: 500; }
.sidebar-contacts a small { overflow: hidden; color: #7e9ab4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 6px; }
.sidebar-user > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--navy-chrome-1); background: #d9e9fb; font-weight: 800; }
.sidebar-user div { display: grid; min-width: 0; }
.sidebar-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sidebar-user small { color: #9cb6cd; font-size: 11px; }
.sidebar-logout { grid-template-columns: 24px minmax(0,1fr); color: #e2ebf4; }
.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-credit { padding: 3px 8px 0; color: #a3bed7; text-decoration: none; font-size: 11px; }
.sidebar-credit:hover { color: #fff; }
.sidebar-footer .release-info { display: block; margin: 0; padding: 0 8px; color: #7490b0; font-size: 10px; }
.sidebar-backdrop { display: none; }

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px clamp(22px, 3vw, 42px);
    color: var(--ink);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 18px rgba(24, 48, 76, .04);
    backdrop-filter: blur(12px);
}
.topbar-brand { display: grid; gap: 1px; min-width: 0; }
.topbar-brand h1 { font-size: 21px; }
.topbar-brand > span { color: var(--muted); font-size: 12px; }
.mobile-business-name { display: none; }
.topbar-navigation { display: none; align-items: center; gap: 6px; }
.mobile-menu-button, .mobile-back-button { display: none; }
.header-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--green-line); border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 600; }
.header-status span { width: 7px; height: 7px; border-radius: 50%; background: #17a56b; box-shadow: 0 0 0 4px rgba(23,165,107,.12); }

/* ---------- Shared blocks ---------- */
.view-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 44px; margin: 0 0 16px; animation: app-view-in .2s ease both; }
.view-intro > div { display: grid; gap: 2px; }
.view-intro p { max-width: 650px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.section-kicker { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

.panel { margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--card); box-shadow: var(--shadow-card); padding: 20px 22px; }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.toolbar form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.toolbar small { color: var(--muted); font-size: 11px; max-width: 240px; }
.new-shipment-button { box-shadow: 0 4px 14px rgba(20, 95, 194, .18); white-space: nowrap; }
.sync-form button { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); background: var(--card); border: 1px solid var(--btn-line); }
.sync-form button:hover:not(:disabled) { background: var(--blue-soft); border-color: var(--btn-line-strong); color: var(--blue-hover); }

.unread-badge { display: inline-flex; align-items: center; min-height: 21px; padding: 2px 8px; border-radius: 999px; color: var(--btn-primary-ink); background: var(--blue); font-size: 10px; font-weight: 700; line-height: 1; }

/* Sync progress */
.sync-progress-panel { display: grid; gap: 9px; margin: -4px 0 18px; padding: 14px 16px; border: 1px solid #cfe0f2; border-radius: 14px; background: var(--surface-blue); box-shadow: var(--shadow-card); }
.sync-progress-panel > div:first-child { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px 12px; }
.sync-progress-panel strong { color: var(--ink); font-size: 13px; }
.sync-progress-panel span { min-width: 0; color: var(--muted); font-size: 12px; }
.sync-progress-panel b { color: var(--ink); font-size: 12px; direction: ltr; font-weight: 700; }
.sync-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e2ecf7; }
.sync-progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #145fc2, #4f9ae8); transition: width .45s ease; }

/* ---------- Orders view ---------- */
.order-filter-panel {
    position: sticky;
    top: 90px;
    z-index: 15;
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(260px, 1.6fr);
    align-items: end;
    gap: 12px 14px;
    padding: 15px 18px;
}
.order-filter-head { display: grid; gap: 1px; }
.order-filter-panel h2 { font-size: 15px; }
.order-filter-panel small { color: var(--muted); font-size: 11px; }
.order-filter-panel label { margin: 0; }
.source-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.panel button.source-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 14px; border: 1px solid var(--btn-line); border-radius: 999px; background: var(--card); color: var(--blue); font-size: 13px; font-weight: 600; white-space: nowrap; }
.panel button.source-chip:hover:not(.active) { background: var(--blue-soft); color: var(--blue-hover); border-color: var(--btn-line-strong); }
.panel button.source-chip.active { background: var(--blue); border-color: var(--blue); color: var(--btn-primary-ink); }
.source-chip b { font-size: 11px; font-weight: 700; opacity: .78; }
.chips-divider { align-self: stretch; border-inline-start: 1px solid var(--line-strong); margin-inline: 3px; }
.panel button.status-chip { border-color: var(--amber-line); color: var(--amber); background: var(--amber-soft); }
.panel button.status-chip:hover:not(.active) { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); filter: brightness(.97); }
.panel button.status-chip.active { border-color: var(--amber); background: var(--amber); color: #fff; }
:root[data-theme="dark"] .panel button.status-chip.active { color: #221803; }

.orders { display: grid; gap: 14px; animation: app-fade-in .22s ease; }
.orders-divider { display: flex; align-items: center; gap: 12px; margin: 8px 0 -2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.orders-divider::before, .orders-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line-strong); }
.order-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--card);
    box-shadow: var(--shadow-card);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.order-card:hover { border-color: var(--line-strong); box-shadow: 0 10px 28px rgba(16,24,40,.09); }
.order-card.is-expanded { border-color: var(--btn-line); box-shadow: 0 14px 34px rgba(16,24,40,.1); }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 108px; padding: 18px 20px; cursor: pointer; outline: 0; user-select: none; }
.order-head:focus-visible { box-shadow: inset 0 0 0 3px var(--blue-ring); border-radius: var(--radius-card); }
.order-identity { display: grid; align-content: center; gap: 4px; min-width: 0; }
.order-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.order-number-row { display: flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; }
.order-head h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.source-order-link { color: var(--blue); text-decoration: none; }
.source-order-link:hover { color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px; }

/* Source chips — semantic identity colors, never link-blue */
.source { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 9px; border-radius: 7px; color: #315268; background: #ecf2f7; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.source-superpharm { color: #0d6a42; background: #e8f6ef; }
.source-wolt { color: #53439e; background: #efecfb; }
.source-istore { color: #0e6674; background: #e6f5f8; }
.source-manual { color: #5b6675; background: #eef1f5; }

.order-glance { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 13px; color: var(--muted); }
.order-glance small { color: var(--muted); font-size: 12px; }
.order-glance span { color: var(--text-2); font-size: 12px; }
.order-glance strong { color: var(--ink); font-size: 13px; font-weight: 700; }
.order-glance .order-customer-link { color: var(--blue); font-size: 12px; font-weight: 600; text-decoration: none; }
.order-glance .order-customer-link:hover { color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px; }
.customer-history-badge { padding: 2px 7px; border-radius: 999px; font-size: 10px !important; font-weight: 700 !important; }
.customer-history-badge.new { color: var(--text-2); background: var(--chip); }
.customer-history-badge.returning { color: #7a4f00; background: #fcf1d4; }

.order-tracking-row { display: flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; color: var(--muted); font-size: 11px; }
.order-tracking-row > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.order-tracking-row b { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .03em; text-overflow: ellipsis; }
.order-tracking-link { min-width: 0; color: var(--blue); text-decoration: underline; text-decoration-color: #b7cee8; text-underline-offset: 3px; }
.order-tracking-link b { color: inherit; }
.order-tracking-link:hover { color: var(--blue-hover); text-decoration-color: currentColor; }

.source-status { display: inline-flex; width: fit-content; margin-top: 5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: #f5f7f9; color: var(--text-2); font-size: 11px; }
.source-status-paid { border-color: var(--green-line); background: var(--green-soft); color: var(--green); }
.source-status-waiting, .source-status-shipping { border-color: #d9d8f5; background: #eceafd; color: #45418f; }
.source-status-shipped, .source-status-completed { border-color: #c4ecca; background: #e5f7e8; color: #23713a; }
.source-status-cancelled { border-color: var(--red-line); background: var(--red-soft); color: var(--red); }

.order-open-hint { width: fit-content; display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--blue); font-size: 11.5px; font-weight: 600; transition: color .16s ease; }
.order-head:hover .order-open-hint { color: var(--blue-hover); }

.order-head-tools { position: relative; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.order-message-icon, .customer-message-button { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid var(--green-line); border-radius: var(--radius-ctl); color: var(--green); background: var(--green-soft); transition: background .16s ease, border-color .16s ease; }
.order-message-icon:hover, .customer-message-button:hover { border-color: #86cda6; background: #e0f4e9; }
.order-message-icon svg, .customer-message-button svg { width: 20px; height: 20px; fill: currentColor; }

/* Status pills */
.status { height: max-content; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: #f2f5f8; color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-pending_approval, .status-observed, .status-payment_wait { border-color: #d9d8f5; background: #eceafd; color: #45418f; }
.status-missing_details, .status-translation_required { border-color: var(--amber-line); background: var(--amber-soft); color: var(--amber); }
.status-processing { border-color: #a9c9e9; background: #e9f3fd; color: #175a9d; }
.status-label_download_failed, .status-tracking_sync_failed, .status-rejected { border-color: var(--red-line); background: var(--red-soft); color: var(--red); }
.status-tracking_sync_required, .status-ready_to_print, .status-label_ready, .status-printed { border-color: #86d3d8; background: #e7f8f9; color: #086970; }
.status-shipped, .status-completed, .status-complete { border-color: #c4ecca; background: #e5f7e8; color: #23713a; }
.status-cancelled { border-color: #d3d9e1; background: #f2f3f5; color: #6b7280; }
.status-risk_review { border-color: var(--red); background: var(--red); color: #fff; }

/* Order card body */
.order-card-body { padding: 0 20px 20px; border-top: 1px solid var(--line); animation: app-body-in .2s cubic-bezier(.2,.72,.2,1) both; }
.customer { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0; padding: 14px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.customer > span { color: var(--text-2); }
.customer b { color: var(--muted); font-weight: 600; }
.customer-wide { flex-basis: 100%; }
.customer-name { color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.customer-profile-link { color: var(--blue); }
.customer-profile-link:hover { color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px; }
.customer-detail-link { color: var(--blue); font-weight: 500; text-decoration: none; }
.customer-detail-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.phone-link { font-variant-numeric: tabular-nums; letter-spacing: .015em; }
.customer-empty { align-items: center; color: var(--muted); }
.customer-empty strong { color: var(--ink); }
.translation-note { display: inline-block; margin-inline-start: 6px; color: var(--muted); font-weight: 400; }
.original-address { font-size: 12px; }

.order-card-body > details { padding-top: 12px; }
.order-card-body > details > summary,
.order-more-actions summary,
.customer-history summary { display: flex; align-items: center; min-height: 34px; color: var(--blue); font-weight: 600; }
.order-card-body > details > summary:hover,
.order-more-actions summary:hover,
.customer-history summary:hover { color: var(--blue-hover); }

.order-items { list-style: none; margin: 6px 0 0; padding: 0; }
.order-items .order-item { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.order-items .order-item:last-child { border-bottom: 0; }
.product-image { width: 54px; height: 54px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-ctl); background: var(--card); }
.product-image-placeholder { display: grid; place-items: center; background: #f4f7fb; font-size: 20px; }
.product-name { display: grid; gap: 2px; min-width: 0; color: var(--text-2); }
.product-name small { color: var(--muted); font-size: 11px; }
.item-pricing { display: grid; gap: 1px; min-width: 8.5rem; color: var(--ink); font-size: 12px; text-align: left; }
.item-pricing span:first-child { color: var(--muted); }
.item-pricing span:last-child { color: var(--ink); font-size: 14px; font-weight: 700; }
.manual-order-empty { margin: 10px 0 0; padding: 11px 12px; border-radius: var(--radius-ctl); color: var(--muted); background: var(--surface-2); font-size: 12px; }
.order-total-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.order-total-row strong { color: var(--ink); font-size: 18px; font-weight: 700; }

.order-progress { display: grid; gap: 7px; margin-top: 14px; padding: 12px 14px; border: 1px solid #cfe0f6; border-radius: 11px; background: var(--surface-blue); }
.order-progress p { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; color: var(--text-2); font-size: 13px; }
.order-progress p strong { color: var(--ink); }
.order-progress p span { flex-basis: 100%; }
.order-progress .job-failed { color: var(--red); }
.order-progress .job-failed strong { color: var(--red); }
.job-completed { color: var(--green); }
.job-failed { color: var(--red); }
.job-pending, .job-running, .job-queued { color: var(--amber); }

.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-top: 15px; }
.actions form { display: flex; gap: 6px; margin: 0; }
.action-with-help { display: grid; gap: 4px; min-width: min(390px, 100%); max-width: 420px; }
.action-with-help small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.reject-action small { color: #8e352e; }
.cancel-action { background: var(--card) !important; color: var(--red) !important; border: 1px solid var(--red-line) !important; }
.cancel-action:hover:not(:disabled) { background: var(--red-soft) !important; }
.whatsapp-action { align-self: stretch; display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 10px 14px; border-radius: 11px; background: #157347; color: #fff !important; font-weight: 600; text-decoration: none; }
.whatsapp-action:hover { background: #0f5c38; }
.label-download { display: inline-flex; align-items: center; color: var(--blue); font-weight: 600; }
.order-more-actions { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.order-more-grid { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.order-more-grid a, .order-more-grid button { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border: 1px solid var(--btn-line); border-radius: var(--radius-ctl); background: var(--card); color: var(--blue); font-weight: 600; text-decoration: none; }
.order-more-grid a:hover, .order-more-grid button:hover { background: var(--blue-soft); color: var(--blue-hover); }

/* Copy buttons */
.copy-order-id, .copy-tracking-number, .copy-tracking-link { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text-2); background: var(--card); }
.copy-order-id { width: 30px; height: 30px; }
.copy-tracking-number { width: 27px; height: 27px; }
.copy-tracking-link { width: 40px; min-width: 40px; }
.copy-order-id svg { width: 15px; height: 15px; fill: currentColor; }
.copy-tracking-number svg { width: 14px; height: 14px; fill: currentColor; }
.copy-tracking-link svg { width: 18px; height: 18px; fill: currentColor; }
.copy-order-id:hover, .copy-tracking-number:hover, .copy-tracking-link:hover { color: var(--blue); border-color: #a9c8e9; background: var(--surface-blue); }
.is-copied { border-color: #69b58c !important; background: #edf9f2 !important; color: #157347 !important; }
.copy-feedback { position: absolute; inset-block-end: calc(100% + 5px); inset-inline-start: 50%; transform: translateX(50%); padding: 3px 8px; border-radius: 6px; color: #fff; background: #16273c; font-size: 10px; line-height: 1.3; white-space: nowrap; z-index: 5; }
.copy-feedback:empty { display: none; }

/* Order ••• menu (popover / mobile sheet) */
.order-action-menu { position: relative; padding: 0; border: 0; }
.order-action-trigger { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); background: var(--card); color: var(--blue); font-size: 15px; font-weight: 700; letter-spacing: 1px; line-height: 1; }
.order-action-menu.is-open .order-action-trigger, .order-action-trigger:hover { border-color: #8eb4df; background: var(--blue-soft); color: var(--blue-hover); }
.order-menu-backdrop { position: fixed; inset: 0; z-index: 58; width: 100%; height: 100%; border: 0; background: transparent; cursor: default; }
.order-action-popover { position: absolute; inset-inline-end: 0; top: calc(100% + 7px); z-index: 59; display: grid; width: min(330px, calc(100vw - 48px)); gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-pop); animation: app-menu-in .16s ease both; }
.order-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 2px 10px; border-bottom: 1px solid var(--line); }
.order-menu-heading > div { display: grid; gap: 1px; }
.order-menu-heading span { color: var(--muted); font-size: 11px; }
.order-menu-heading strong { color: var(--ink); font-size: 14px; font-weight: 700; }
.order-menu-close { display: grid !important; width: 32px; min-height: 32px !important; padding: 0 !important; place-items: center; border: 1px solid var(--line-strong) !important; border-radius: 9px; background: var(--card) !important; color: var(--text-2) !important; font-size: 19px; }
.order-action-popover form { display: grid; margin: 0; }
.order-menu-section { display: grid; gap: 2px; }
.order-menu-section + .order-menu-section { border-top: 1px solid var(--line); padding-top: 9px; }
.menu-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    width: 100%;
    min-height: 48px;
    padding: 7px 8px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
    text-align: start;
    text-decoration: none;
}
.react-dashboard .dashboard-main a.menu-row { color: var(--ink); }
.menu-row:hover:not(:disabled) { background: var(--blue-soft); }
.menu-row:hover:not(:disabled) .menu-row-copy > span { color: var(--blue-hover); }
.menu-row:disabled { color: #98a2b3; background: transparent; }
.menu-row-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 10px; color: var(--blue); background: var(--card); }
.menu-row-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-row:disabled .menu-row-icon { color: #98a2b3; background: #f7f9fb; }
.menu-row-copy { display: grid; gap: 0; min-width: 0; }
.menu-row-copy > span { transition: color .14s ease; }
.menu-row-copy small { overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.menu-row:disabled .menu-row-copy small { color: #a8b0bd; }
.menu-row-whatsapp .menu-row-icon { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
.menu-row-whatsapp .menu-row-icon svg { fill: currentColor; stroke: none; }
.menu-row-whatsapp:hover:not(:disabled) { background: var(--green-soft); }
.menu-row-whatsapp:hover:not(:disabled) .menu-row-copy > span { color: var(--green); }
.menu-row-copied .menu-row-icon { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
.menu-row-copied .menu-row-copy small { color: var(--green); }
.menu-row.is-loading::before { margin-inline-start: 4px; }
.tracking-dialog-form { display: grid; gap: 8px; margin-top: 18px; }

/* Warnings inside cards */
.phone-completion-warning { display: grid; gap: 4px; margin: 10px 0; padding: 12px; border: 1px solid var(--red-line); border-radius: 11px; color: #8f261e; background: #fff5f3; }
.phone-completion-warning strong { color: #8f261e; font-size: 13px; }
.phone-completion-warning span { font-size: 12px; }
.phone-completion-warning a { width: fit-content; margin-top: 4px; color: var(--green) !important; font-size: 12px; font-weight: 700; }
.address-hebrew-warning { display: grid; gap: 4px; margin: 10px 0; padding: 12px; border: 1px solid var(--amber-line); border-radius: 11px; color: #7a5410; background: var(--amber-soft); }
.address-hebrew-warning strong { color: #7a5410; font-size: 13px; }
.address-hebrew-warning span { font-size: 12px; }
.phone-rule-hint { color: var(--muted); font-size: 10px; font-weight: 400; }

/* ---------- Customers view ---------- */
.customer-filter-panel { display: grid; grid-template-columns: minmax(170px, .7fr) minmax(280px, 1.5fr); align-items: end; gap: 18px; padding: 15px 20px; }
.customer-filter-panel > div { display: grid; gap: 2px; }
.customer-filter-panel h2 { font-size: 15px; }
.customer-filter-panel small { color: var(--muted); font-size: 11px; }
.customer-directory { display: grid; grid-template-columns: 1fr; gap: 10px; animation: app-fade-in .22s ease; }
.customer-card { scroll-margin-top: 110px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-card); transition: border-color .18s ease, box-shadow .18s ease; }
.customer-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(16,24,40,.08); }
.customer-row { display: flex; align-items: center; min-height: 68px; padding: 8px 10px 8px 12px; }
.customer-row-toggle { flex: 1; display: grid; grid-template-columns: 38px minmax(170px,1fr) minmax(70px,.35fr) minmax(90px,.45fr); align-items: center; gap: 11px; min-height: 54px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: right; }
.customer-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: var(--radius-ctl); color: var(--blue); background: var(--blue-soft); font-size: 16px; font-weight: 700; }
.customer-row-identity, .customer-row-count, .customer-row-spend { display: grid; gap: 1px; min-width: 0; }
.customer-row-identity > span { display: flex; align-items: center; min-width: 0; gap: 7px; }
.customer-row-identity .unread-badge { flex: 0 0 auto; }
.customer-row-identity strong { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.customer-row-toggle:hover .customer-row-identity strong { color: var(--blue); }
.open-order-badge { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 21px; padding: 2px 8px; border: 1px solid var(--amber-line); border-radius: 999px; color: var(--amber); background: var(--amber-soft); font-size: 10px; font-weight: 700; line-height: 1; white-space: nowrap; }
.customer-card-details button.open-order-jump { min-height: 26px; margin-inline-start: 8px; padding: 2px 10px; border: 1px solid var(--amber-line); border-radius: 999px; color: var(--amber); background: var(--amber-soft); font-size: 11px; font-weight: 700; }
.customer-card-details button.open-order-jump:hover:not(:disabled) { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); filter: brightness(.96); }
.customer-row-subtitle { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; color: var(--muted); font-size: 11px; }
.customer-row-subtitle span { overflow: hidden; text-overflow: ellipsis; }
.customer-row-subtitle i { color: #a4afbe; font-style: normal; }
.customer-row-subtitle time { flex: 0 0 auto; color: var(--text-2); font-weight: 600; }
.customer-row-count small, .customer-row-spend small { color: var(--muted); font-size: 10px; }
.customer-row-count strong, .customer-row-spend strong { color: var(--ink); font-size: 13px; font-weight: 700; }
.customer-card.is-expanded .customer-row { border-bottom: 1px solid var(--line); background: var(--surface-blue); }
.customer-contact-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.customer-review-button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 10px; border: 1px solid var(--green-line); border-radius: var(--radius-ctl); color: var(--green) !important; background: var(--green-soft); font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.customer-review-button:hover { border-color: #86cda6; background: #e0f4e9; }
.customer-review-button svg { width: 17px; height: 17px; fill: currentColor; }

.customer-card-details { padding: 17px 19px 18px; animation: app-body-in .2s ease both; }
.customer-profile-heading { display: flex; align-items: center; justify-content: space-between; }
.customer-card h3 { margin: 0 0 4px; font-size: 18px; }
.customer-type-badge { display: inline-flex; padding: 3px 8px; border-radius: 999px; color: var(--text-2); background: var(--chip); font-size: 10px; font-weight: 700; }
.customer-type-badge.returning { color: #7a4f00; background: #fcf1d4; }
.customer-profile-layout { display: grid; grid-template-columns: minmax(250px,.72fr) minmax(0,1.35fr); gap: 16px; margin: 16px 0; }
.customer-contact-panel, .customer-address-book { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.customer-profile-layout h4 { margin: 0 0 10px; }
.customer-edit-form { display: grid; gap: 9px; }
.customer-edit-form label, .address-form-grid label, .manual-order-fields label { display: grid; gap: 4px; }
.customer-contact-list { display: grid; gap: 7px; margin: 14px 0; }
.customer-contact-list a { width: fit-content; max-width: 100%; overflow: hidden; color: var(--blue); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.customer-contact-list a:hover { color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px; }
.address-book-title { display: flex; justify-content: space-between; gap: 12px; }
.address-book-title h4 { margin-bottom: 1px; }
.address-book-title small { color: var(--muted); }
.address-list { display: grid; gap: 9px; margin-top: 12px; }
.address-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.address-card > div { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; }
.address-card a { flex-basis: 100%; color: var(--blue); text-decoration: none; }
.address-card a:hover { color: var(--blue-hover); }
.address-label { color: var(--ink); font-size: 12px; font-weight: 700; }
.protected-address { padding: 2px 7px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 700; }
.address-card details { min-width: 70px; }
.address-card summary, .add-address summary { color: var(--blue); font-size: 12px; font-weight: 600; }
.address-card summary:hover, .add-address summary:hover { color: var(--blue-hover); }
.address-card details[open] { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); }
.address-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin: 10px 0; }
.address-form-grid .wide { grid-column: 1 / -1; }
.delete-address-form { margin-top: 8px; }
.add-address { margin-top: 11px; padding: 10px 12px; border: 1px dashed #b9cce1; border-radius: 11px; background: var(--surface-blue); }
.customer-metrics { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.customer-metrics span { flex: 1; display: grid; color: var(--muted); font-size: 11px; }
.customer-metrics strong { color: var(--ink); font-size: 16px; }
.customer-history { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.customer-history ol { margin: 8px 0 0; padding: 0; list-style: none; }
.customer-history li { border-bottom: 1px solid var(--line); }
.customer-history li:last-child { border-bottom: 0; }
.customer-history li a { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; color: var(--ink); text-decoration: none; }
.customer-history li a:hover { color: var(--blue); }
.customer-history li span { display: grid; }
.customer-history li span:last-child { justify-items: end; }
.customer-history li b, .customer-history li strong { font-weight: 600; }
.customer-history small { color: var(--muted); font-size: 10px; }

/* ---------- Dialogs ---------- */
.form-dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(7,25,45,.55); backdrop-filter: blur(4px); }
.form-dialog-card { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 24px; border: 0; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-pop); }
.form-dialog-heading { display: flex; justify-content: space-between; gap: 18px; }
.form-dialog-heading h2 { margin: 3px 0; font-size: 21px; }
.form-dialog-heading p { margin: 0; color: var(--muted); }
.dialog-close { width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); color: var(--text-2); background: var(--card); font-size: 22px; }
.dialog-close:hover { color: var(--ink); border-color: #b3c2d4; }
.form-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-dialog-actions form { margin: 0; }
.address-selector { display: grid; gap: 6px; margin: 20px 0 10px; }
.selected-address, .missing-address, .pickup-confirmation { display: grid; gap: 4px; margin: 10px 0 20px; padding: 14px; border: 1px solid #cfe0f2; border-radius: 12px; background: var(--surface-blue); }
.selected-address span { color: var(--muted); font-size: 12px; }
.missing-address { border-color: var(--amber-line); background: #fff9eb; }
.missing-address p { margin: 0; color: #725719; }
.pickup-confirmation { color: var(--green); border-color: var(--green-line); background: #f0faf5; }
.manual-order-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 20px; }
.manual-order-fields .wide { grid-column: 1 / -1; }
.manual-order-address-title { margin: 20px 0 0; font-size: 15px; }

.confirmation-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius-card); color: var(--ink); background: transparent; box-shadow: var(--shadow-pop); }
.confirmation-dialog::backdrop { background: rgba(8,25,44,.5); backdrop-filter: blur(3px); }
.confirmation-dialog-card { padding: 24px; border-radius: var(--radius-card); background: var(--card); }
.confirmation-dialog-card h2 { margin: 0 0 8px; }
.confirmation-dialog-card p { margin: 0 0 22px; color: var(--muted); }
.confirmation-dialog-actions { display: flex; justify-content: flex-start; gap: 9px; }
.confirmation-dialog-actions button { min-width: 96px; min-height: 42px; padding: 10px 16px; border: 1px solid var(--blue); border-radius: var(--radius-ctl); background: var(--blue); color: var(--btn-primary-ink); font-weight: 600; }
.confirmation-dialog-actions button:hover:not(:disabled) { background: var(--blue-hover); }
.confirmation-dialog-actions .secondary { border: 1px solid var(--btn-line); background: var(--card); color: var(--blue); }
.confirmation-dialog-actions .secondary:hover { background: var(--blue-soft); }

/* ---------- Connections view ---------- */
.connections-panel { padding: 0; }
.connections-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.connections-title h2 { margin: 0; }
.connections-title-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.connection-health-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.connection-health-badge.has-issues { color: var(--red); background: var(--red-soft); border: 1px solid var(--red-line); }
.connection-health-badge.healthy { color: var(--green); background: var(--green-soft); border: 1px solid var(--green-line); }
.sync-interval-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.sync-interval-form label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sync-interval-form select { min-height: 38px; width: auto; padding: 6px 10px; }

.connect-downloads { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 16px 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.connect-downloads-copy { display: grid; gap: 2px; }
.connect-downloads-copy strong { color: var(--ink); font-size: 14px; }
.connect-downloads-copy span { color: var(--muted); font-size: 12px; }
.connect-download-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.connect-download-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid var(--btn-line); border-radius: var(--radius-ctl); color: var(--blue); background: var(--card); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.connect-download-button:hover { background: var(--blue-soft); color: var(--blue-hover); border-color: var(--btn-line-strong); }

.system-readiness { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 22px 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.system-chip { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.system-chip.ready { color: var(--green); background: var(--green-soft); }
.system-chip.not-ready { color: var(--amber); background: var(--amber-soft); }
.preflight-form { margin: 0 0 0 auto; }
.compact-error { margin: 8px 22px 0; color: var(--red); font-size: 12px; }
.connection-timeline { margin: 0 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.connection-timeline summary { width: max-content; color: var(--blue); font-size: 12px; font-weight: 600; }
.connection-timeline summary:hover { color: var(--blue-hover); }
.connection-timeline ol { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 11px 0 0; padding: 0; list-style: none; }
.connection-timeline li { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 7px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-blue); }
.connection-timeline li strong { grid-column: 2; color: var(--muted); font-size: 10px; }
.timeline-marker { display: grid; grid-row: 1 / span 2; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: #d53d35; font-weight: 700; }
.connection-timeline li.passed .timeline-marker { background: #189a61; }
.connection-timeline li.pending .timeline-marker { background: #d09b22; }

.connections { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 16px 22px 18px; }
.connection-card { display: grid; align-content: start; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); transition: border-color .16s ease, box-shadow .16s ease; }
.connection-card:hover { border-color: var(--line-strong); box-shadow: 0 6px 16px rgba(16,24,40,.06); }
.connection-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.connection-heading strong { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.connection-heading > span { color: var(--muted); font-size: 11px; }
.connection-card small { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #d09b22; }
.dot.connected { background: #1a9b60; }
.dot.error { background: #d53d35; }
.connection-error { margin: 5px 0 0; color: var(--red); font-size: 12px; word-break: break-word; }
.connection-capability { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.manual-sync-form { margin-top: 10px; }
.connect-help { margin: 0 22px 22px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-blue); color: var(--text-2); font-size: 13px; }
.connect-help summary { color: var(--blue); font-weight: 600; }
.connect-help summary:hover { color: var(--blue-hover); }
.connect-help p { margin: 10px 0 0; }
.pairing-panel { text-align: center; border-color: #8bb8f4; background: var(--surface-blue); }
.pairing-code { display: inline-block; direction: ltr; letter-spacing: .18em; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 700; padding: .7rem 1rem; border: 1px dashed #3978c8; border-radius: 12px; background: var(--card); color: var(--ink); user-select: all; }

/* ---------- Settings + Activity ---------- */
.notification-settings { display: flex; align-items: center; flex-wrap: wrap; gap: 11px 20px; }
.notification-settings > div { margin-inline-end: auto; }
.notification-settings h2 { margin: 0 0 3px; }
.notification-settings small, .notification-example { color: var(--muted); }
.notification-settings label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-ctl); background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.notification-settings input { width: 18px; height: 18px; min-height: 0; accent-color: var(--blue); }
.notification-example { font-size: 12px; }
.settings-form-panel { padding: 20px 22px; }
.settings-panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.settings-panel-heading h2 { margin: 0; font-size: 17px; }
.settings-panel-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.settings-panel-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--text-2); background: var(--chip); }
.settings-panel-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-form-panel label { display: grid; gap: 5px; }
.settings-form-panel textarea { min-height: 118px; resize: vertical; line-height: 1.6; }
.settings-form-panel button { align-self: end; }
.admin-form { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)) auto; align-items: end; gap: 8px; }
.password-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)) auto; align-items: end; gap: 8px; }
.review-request-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px 14px; }
.review-request-form label { grid-row: span 2; }
.review-request-form small { color: var(--muted); }
.review-request-form code { color: var(--ink); background: var(--chip); border-radius: 5px; padding: 1px 5px; }

.activity-panel { padding: 20px 22px; }
.jobs { list-style: none; margin: 10px 0 0; padding: 0; }
.jobs li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.jobs li:last-child { border-bottom: 0; }
.jobs li > span { display: grid; gap: 2px; }
.jobs li > span small { color: var(--muted); font-size: 11px; font-weight: 400; }
.jobs li > strong { flex: 0 0 auto; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.jobs .job-completed { color: var(--green); background: var(--green-soft); }
.jobs .job-failed { color: var(--red); background: var(--red-soft); }
.jobs .job-pending, .jobs .job-running, .jobs .job-queued { color: var(--amber); background: var(--amber-soft); }

/* ---------- Login ---------- */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(150deg, #0e2a47, #1b5c9e); font-family: var(--font); }
.login-card { width: min(420px, 100%); background: #fff; padding: 34px; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.login-card .eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.login-card h1 { margin: 5px 0; font-size: 24px; }
.login-card > p:not(.eyebrow) { color: var(--muted); margin: 0 0 24px; }
.login-card label { display: grid; gap: 7px; margin: 14px 0; color: var(--text-2); font-weight: 600; font-size: 13px; }
.login-card button { width: 100%; min-height: 46px; border: 0; border-radius: 11px; background: var(--blue); color: #fff; font-weight: 700; }
.login-card button:hover { background: var(--blue-hover); }

/* ---------- Animations ---------- */
@keyframes app-view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes app-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes app-body-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes app-menu-in { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes app-sheet-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .dashboard-shell { display: block; }
    .app-sidebar {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(300px, 86vw);
        transform: translateX(105%);
        transition: transform .24s ease;
        box-shadow: -24px 0 60px rgba(6,22,40,.24);
        padding-top: max(22px, env(safe-area-inset-top));
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }
    body.sidebar-open { overflow: hidden; }
    body.sidebar-open .app-sidebar, .app-sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; width: 100%; height: 100%; border: 0; background: rgba(8,25,44,.38); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
    body.sidebar-open .sidebar-backdrop, .sidebar-backdrop.is-open { display: block; opacity: 1; pointer-events: auto; }
    .topbar { min-height: 66px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
    .topbar-navigation { display: flex; }
    .mobile-menu-button, .mobile-back-button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--blue); background: var(--card); font-size: 20px; cursor: pointer; }
    .mobile-menu-button svg, .mobile-back-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
    .mobile-business-name { display: block; margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; }
    .topbar-brand h1 { font-size: 19px; }
    .topbar-brand > span { display: none; }
    .dashboard-content { margin-top: 20px; }
    .order-filter-panel { top: 80px; }
    .connection-timeline ol { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .connections { grid-template-columns: 1fr; }
    .order-head-tools { max-width: 48%; }
}

@media (max-width: 800px) {
    .order-more-grid > * { width: 100%; justify-content: center; }
    .connections-title { align-items: stretch; flex-direction: column; }
    .sync-interval-form { align-items: stretch; }
    .connect-downloads { align-items: stretch; flex-direction: column; }
    .connect-download-actions { width: 100%; }
    .connect-download-button { flex: 1; }
    .order-menu-backdrop { z-index: 78; background: rgba(8,25,44,.38); backdrop-filter: blur(2px); }
    .order-action-popover {
        position: fixed;
        inset: auto 10px max(10px, env(safe-area-inset-bottom));
        z-index: 79;
        width: auto;
        max-height: calc(100vh - 36px);
        overflow-y: auto;
        padding: 16px;
        border-radius: 20px;
        animation: app-sheet-in .22s cubic-bezier(.22,.75,.25,1) both;
    }
    .notification-settings { align-items: flex-start; }
    .notification-settings > div { flex-basis: 100%; }
}

@media (max-width: 640px) {
    body { font-size: 14px; }
    .react-dashboard h1 { font-size: 19px; }
    .react-dashboard button, .react-dashboard input, .react-dashboard select, .react-dashboard textarea, .react-login input { font-size: 16px; }
    .topbar { gap: 9px; padding-inline: max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-left)); }
    .mobile-menu-button, .mobile-back-button { width: 40px; height: 40px; }
    .topbar-brand h1 { overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
    .header-status { padding: 6px 8px; font-size: 10px; }
    .dashboard-content { margin: 16px auto 50px; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
    .view-intro { align-items: flex-start; gap: 14px; margin-bottom: 13px; }
    .view-intro p { max-width: 240px; font-size: 12px; line-height: 1.4; }
    .view-intro .toolbar { flex: 0 0 auto; }
    .new-shipment-button { min-height: 42px; padding: 8px 12px; }
    .sync-form { display: grid; justify-items: end; }
    .sync-form small { display: none; }
    .sync-progress-panel { margin-bottom: 14px; padding: 12px 13px; }
    .sync-progress-panel > div:first-child { grid-template-columns: 1fr auto; gap: 2px 10px; }
    .sync-progress-panel span { grid-column: 1 / -1; grid-row: 2; font-size: 11px; }
    .order-filter-panel { position: sticky; top: 62px; grid-template-columns: 1fr; gap: 9px; padding: 11px 12px; border-radius: 14px; box-shadow: 0 8px 22px rgba(16,24,40,.1); }
    .order-filter-head { display: none; }
    .source-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 1px 12px 3px; scrollbar-width: none; }
    .source-chips::-webkit-scrollbar { display: none; }
    .source-chip { min-height: 38px; flex: 0 0 auto; }
    .orders { gap: 12px; }
    .order-head { min-height: 120px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; padding: 15px 14px; gap: 10px; }
    .order-identity { gap: 3px; }
    .order-head h2 { font-size: 17px; }
    .order-head-tools { display: grid; grid-template-columns: auto auto; align-items: start; justify-items: end; max-width: 132px; gap: 6px; }
    .order-head-tools .status { grid-column: 1 / -1; grid-row: 1; max-width: 132px; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; }
    .order-message-icon, .order-action-menu { grid-row: 2; }
    .order-message-icon { width: 36px; height: 36px; }
    .order-action-trigger { width: 36px; height: 36px; }
    .order-glance { display: grid; justify-items: start; gap: 2px; }
    .customer-history-badge { width: fit-content; }
    .order-card-body { padding: 0 14px 15px; }
    .customer { display: grid; gap: 8px; padding: 12px; }
    .order-items .order-item { grid-template-columns: 46px minmax(0,1fr); }
    .order-items .order-item .item-pricing { grid-column: 2; min-width: 0; text-align: right; }
    .product-image { width: 46px; height: 46px; }
    .actions { display: grid; gap: 10px; }
    .actions > *, .actions form, .actions a, .actions button { width: 100%; }
    .actions button, .actions a { min-height: 44px; }
    .action-with-help { max-width: none; }
    .customer-filter-panel { grid-template-columns: 1fr; gap: 10px; }
    .customer-directory { gap: 10px; }
    .customer-row { min-height: 64px; padding: 6px 8px; }
    .customer-row-toggle { grid-template-columns: 36px minmax(0,1fr) 58px; gap: 8px; }
    .customer-avatar { width: 36px; height: 36px; }
    .customer-row-spend { display: none; }
    .customer-row-count { justify-items: end; }
    .customer-card-details { padding: 14px 12px 16px; }
    .customer-review-button span { display: none; }
    .customer-review-button { width: 38px; padding: 0; justify-content: center; }
    .customer-profile-layout { grid-template-columns: 1fr; }
    .customer-contact-panel, .customer-address-book { padding: 13px; }
    .address-card { grid-template-columns: 1fr; }
    .address-form-grid { grid-template-columns: 1fr; }
    .address-form-grid .wide { grid-column: auto; }
    .manual-order-fields { grid-template-columns: 1fr; }
    .manual-order-fields .wide { grid-column: auto; }
    .form-dialog-card { padding: 18px; border-radius: 16px; }
    .form-dialog-actions { display: grid; }
    .form-dialog-actions > *, .form-dialog-actions form, .form-dialog-actions button { width: 100%; }
    .connection-timeline ol { grid-template-columns: 1fr; }
    .admin-form, .password-form { grid-template-columns: 1fr; }
    .review-request-form { grid-template-columns: 1fr; }
    .review-request-form label { grid-row: auto; }
}

@media (max-width: 430px) {
    .header-status { display: none; }
    .view-intro p { max-width: 205px; }
    .order-head { grid-template-columns: minmax(0,1fr) 112px; }
    .order-head-tools { max-width: 112px; }
    .status { max-width: 112px; }
    .customer-row-toggle { grid-template-columns: 36px minmax(0,1fr); }
    .customer-row-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Dark theme ----------
   The bundle resolves the chosen theme ("auto" follows the device) and stamps
   data-theme="dark" / "light" on <html>; only the dark stamp changes tokens. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e8edf5;
    --text-2: #b6c1d1;
    --muted: #8d99ac;
    --line: #232e3c;
    --line-strong: #314052;
    --bg: #0d131b;
    --card: #161e29;
    --field: #1b2532;
    --surface-2: #1b2431;
    --surface-blue: #182434;
    --chip: #243043;
    --btn-line: #33507a;
    --btn-line-strong: #40639a;
    --topbar-bg: rgba(17, 24, 33, .93);
    --btn-primary-ink: #0c1624;
    --blue: #5aa2f0;
    --blue-hover: #85baf5;
    --blue-soft: #17304a;
    --blue-ring: rgba(90, 162, 240, .25);
    --green: #4ac08a;
    --green-soft: #132a1f;
    --green-line: #1f4733;
    --red: #f28075;
    --red-soft: #321a1b;
    --red-line: #5d2823;
    --amber: #e2ae54;
    --amber-soft: #2d2413;
    --amber-line: #57431c;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .3);
    --shadow-pop: 0 18px 50px rgba(0, 0, 0, .6);
}
[data-theme="dark"] .react-dashboard button:disabled,
[data-theme="dark"] .react-dashboard input:disabled,
[data-theme="dark"] .react-dashboard select:disabled { color: #6c7889; border-color: #2a3542; background: #1a2230; }
[data-theme="dark"] .menu-row:disabled { color: #6c7889; background: transparent; }
[data-theme="dark"] .menu-row:disabled .menu-row-icon { color: #6c7889; background: #1a2230; }
[data-theme="dark"] .status { border-color: var(--line-strong); background: #1e2836; color: var(--text-2); }
[data-theme="dark"] .status-pending_approval, [data-theme="dark"] .status-observed, [data-theme="dark"] .status-payment_wait,
[data-theme="dark"] .source-status-waiting, [data-theme="dark"] .source-status-shipping { border-color: #3b3a6e; background: #232345; color: #b9b7f4; }
[data-theme="dark"] .status-missing_details, [data-theme="dark"] .status-translation_required { border-color: var(--amber-line); background: var(--amber-soft); color: var(--amber); }
[data-theme="dark"] .status-processing { border-color: #274a6e; background: #16293d; color: #7db4e8; }
[data-theme="dark"] .status-label_download_failed, [data-theme="dark"] .status-tracking_sync_failed, [data-theme="dark"] .status-rejected,
[data-theme="dark"] .source-status-cancelled { border-color: var(--red-line); background: var(--red-soft); color: var(--red); }
[data-theme="dark"] .status-tracking_sync_required, [data-theme="dark"] .status-ready_to_print, [data-theme="dark"] .status-label_ready, [data-theme="dark"] .status-printed { border-color: #1c4a4e; background: #10282b; color: #5ec6cd; }
[data-theme="dark"] .status-shipped, [data-theme="dark"] .status-completed, [data-theme="dark"] .status-complete,
[data-theme="dark"] .source-status-shipped, [data-theme="dark"] .source-status-completed { border-color: #1f4733; background: #132a1f; color: #4ac08a; }
[data-theme="dark"] .status-cancelled { border-color: #33404f; background: #1c2530; color: #8d99ac; }
[data-theme="dark"] .status-risk_review { border-color: #b42318; background: #b42318; color: #fff; }
[data-theme="dark"] .source-status { border-color: var(--line); background: #1c2530; color: var(--text-2); }
[data-theme="dark"] .source-status-paid { border-color: var(--green-line); background: var(--green-soft); color: var(--green); }
[data-theme="dark"] .source { color: #9fb3c4; background: #24303e; }
[data-theme="dark"] .source-superpharm { color: #58c491; background: #13291f; }
[data-theme="dark"] .source-wolt { color: #a99bf0; background: #262043; }
[data-theme="dark"] .source-istore { color: #5bbecd; background: #10282c; }
[data-theme="dark"] .source-manual { color: #97a3b3; background: #232d39; }
[data-theme="dark"] .customer-history-badge.returning, [data-theme="dark"] .customer-type-badge.returning { color: var(--amber); background: var(--amber-soft); }
[data-theme="dark"] .phone-completion-warning { border-color: var(--red-line); background: var(--red-soft); color: #f0a49c; }
[data-theme="dark"] .phone-completion-warning strong { color: #f0a49c; }
[data-theme="dark"] .address-hebrew-warning { color: var(--amber); }
[data-theme="dark"] .address-hebrew-warning strong { color: var(--amber); }
[data-theme="dark"] .missing-address { border-color: var(--amber-line); background: var(--amber-soft); }
[data-theme="dark"] .missing-address p { color: var(--amber); }
[data-theme="dark"] .selected-address, [data-theme="dark"] .pickup-confirmation { border-color: var(--line-strong); }
[data-theme="dark"] .pickup-confirmation { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
[data-theme="dark"] .sync-progress-track { background: #223041; }
[data-theme="dark"] .connection-timeline li { border-color: var(--line); background: var(--surface-2); }
[data-theme="dark"] .add-address { border-color: #3a4c63; background: var(--surface-blue); }
[data-theme="dark"] .pairing-code { border-color: #4b81c9; }
[data-theme="dark"] .review-request-form code { color: var(--ink); background: var(--chip); }
[data-theme="dark"] .header-status span { box-shadow: 0 0 0 4px rgba(74, 192, 138, .15); }
[data-theme="dark"] .form-dialog-backdrop { background: rgba(0, 0, 0, .6); }
[data-theme="dark"] .confirmation-dialog::backdrop { background: rgba(0, 0, 0, .6); }
[data-theme="dark"] .order-menu-backdrop { background: transparent; }
@media (max-width: 800px) {
    [data-theme="dark"] .order-menu-backdrop { background: rgba(0, 0, 0, .55); }
}
[data-theme="dark"] .whatsapp-action, [data-theme="dark"] .review-request-menu-button { background: #157347; }
[data-theme="dark"] .tracking-edit-menu, [data-theme="dark"] .tracking-dialog-form input { border-color: var(--line-strong); }

/* The login page keeps its committed light look in every theme. */
.login-card h1 { color: #101828; }
.login-card .eyebrow { color: #66748b; }
.login-card > p:not(.eyebrow) { color: #66748b; }
.login-card label { color: #45536a; }
.login-card input { border: 1px solid #cfd9e6; background: #fff; color: #101828; }
.login-card button { background: #145fc2; }
.login-card button:hover { background: #0f4c9d; }
.login-card .alert { border: 1px solid #f0b8b1; color: #b42318; background: #fef1ef; }

/* Appearance selector (settings) */
.theme-options { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-form-panel button.theme-option { min-height: 40px; padding: 8px 20px; border: 1px solid var(--btn-line); border-radius: 999px; background: var(--card); color: var(--blue); font-weight: 600; }
.settings-form-panel button.theme-option:hover:not(.active) { background: var(--blue-soft); color: var(--blue-hover); }
.settings-form-panel button.theme-option.active { background: var(--blue); border-color: var(--blue); color: var(--btn-primary-ink); }
