/* ================= CarSpa HQ — extras on top of the owner portal shell ================= */
.hq-tag { margin-left: auto; padding: 3px 9px; border-radius: 8px; background: var(--accent); color: var(--on-accent) !important; font-weight: 800; letter-spacing: .12em; font-size: .7rem !important; }
.sb-nav { overflow-y: auto; }
.sb-group { margin: 12px 14px 2px; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.sb-group:first-child { margin-top: 0; }
.sb-nav a { min-height: 42px; }
.sb-badge.warn { background: var(--danger); }
.neg { color: var(--danger) !important; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); text-decoration: underline; cursor: pointer; }
.kpis { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* late-requests alert */
.hq-alert { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px 16px; border-radius: var(--radius); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--text); text-decoration: none; }
.hq-alert > i { font-size: 1.5rem; color: var(--danger); flex: none; animation: shake 1.2s ease-in-out 2; }
.hq-alert span:nth-child(2) { flex: 1; min-width: 0; }

/* shop cell (thumb + name) */
.shop-cell { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.shop-cell img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; flex: none; }
.prod-dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 1.05rem; }

/* activity feed */
.feed { display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
.grid-2c > *, .panel { min-width: 0; }
.grid-2c { align-items: start; }
.table-wrap { position: relative; } /* keeps sr-only header labels inside the scroll box */
.feed-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; }
.feed-item.tr-click:hover, .feed-item.tr-click:focus-visible { background: var(--surface); }
.f-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; font-size: 1.05rem; background: var(--surface-2); color: var(--muted); }
.k-request .f-ic { background: var(--warn-soft); color: var(--warn); }
.k-shop .f-ic { background: var(--info-soft); color: var(--info); }
.k-money .f-ic { background: var(--accent-soft); color: var(--accent-text); }
.k-problem .f-ic { background: var(--danger-soft); color: var(--danger); }
.k-people .f-ic { background: var(--success-soft); color: var(--success); }
.k-hq .f-ic { background: color-mix(in srgb, var(--pink) 14%, transparent); color: var(--pink); }
.f-body { flex: 1; min-width: 0; }
.f-body strong { display: block; font-size: .86rem; line-height: 1.3; }
.f-body small { display: block; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item time { font-size: .72rem; color: var(--faint); white-space: nowrap; }

/* horizontal bars (top services) */
.bars { display: grid; gap: 12px; padding-top: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.3fr) 2fr auto; gap: 12px; align-items: center; font-size: .85rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 6px; background: var(--accent); transition: width var(--dur-3) var(--ease-out); }
.bar-val { font-weight: 800; min-width: 2.5ch; text-align: right; }

/* live request lanes */
.req-sum { display: flex; gap: 8px; flex-wrap: wrap; }
.req-sum span { padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.req-sum b { color: var(--text); font-size: 1rem; margin-right: 4px; }
.req-sum .neg b { color: var(--danger); }
.lanes { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .lanes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lane { border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); min-width: 0; }
.lane header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.lane header h2 { margin: 0; font-size: .95rem; flex: 1; }
.lane header span { min-width: 28px; height: 26px; padding: 0 8px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: var(--surface-2); }
.lane-warn header i { color: var(--warn); } .lane-info header i { color: var(--info); } .lane-good header i { color: var(--success); }
.lane-body { display: grid; gap: 10px; padding: 12px; max-height: 70vh; overflow-y: auto; }
.lane-empty { margin: 0; padding: 18px 6px; text-align: center; color: var(--faint); font-size: .85rem; }
.lcard { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: border-color var(--dur-1), transform var(--dur-1) var(--ease-out); }
.lcard:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.lcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lcard.late { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.lc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lc-top strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-age { font-size: .75rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.lc-shop { font-size: .8rem; color: var(--muted); }
.lc-shop img { width: 22px; height: 22px; border-radius: 7px; }
.lc-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--muted); }
.lc-meta .tnum { color: var(--text); font-weight: 700; }
.lc-actions { display: flex; gap: 6px; justify-content: flex-end; }
.lc-actions .btn { min-height: 34px; }

/* toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .search { flex: 1 1 260px; }
.toolbar .sel { flex: 0 1 240px; }

/* wash shop tiles */
.shop-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.shop-tile { border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); overflow: hidden; cursor: pointer; transition: border-color var(--dur-1), transform var(--dur-2) var(--ease-out); }
.shop-tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.shop-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shop-tile.paused .st-media img { filter: grayscale(1) brightness(.6); }
.st-media { position: relative; aspect-ratio: 16 / 6; max-width: 100%; background: var(--surface); }
.st-media img { width: 100%; height: 100%; object-fit: cover; }
.st-state { position: absolute; top: 10px; right: 10px; }
.st-body { padding: 14px 16px 16px; display: grid; gap: 12px; }
.st-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.st-head h3 { margin: 0; font-size: 1.02rem; }
.st-head small { color: var(--muted); font-size: .78rem; }
.st-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
.st-stats span { display: block; font-size: .7rem; color: var(--muted); }
.st-stats b { font-size: .92rem; }
.st-stats small { font-size: .7rem; font-weight: 600; }
.st-reason { margin: 0; display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--danger); }
.st-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* single wash shop */
.shop-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 16px; border-radius: var(--radius-lg); background: var(--bg-elev); border: 1px solid var(--border); }
.shop-head > img { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; flex: none; }
.sh-body { flex: 1 1 320px; min-width: 0; }
.sh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.svc-list { display: grid; gap: 2px; }
.svc-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.svc-list div:last-child { border-bottom: 0; }
.svc-list i { color: var(--accent-text); margin-right: 6px; }

/* booking modal */
.hq-two { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .hq-two { grid-template-columns: 1.3fr 1fr; } }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tl li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; padding-bottom: 14px; font-size: .85rem; }
.tl li::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--border); }
.tl li:last-child::before { display: none; }
.tl i { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-size: .9rem; }
.tl time { grid-column: 2; font-size: .74rem; color: var(--faint); }
.mini-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.mini-kpis div { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.mini-kpis span { display: block; font-size: .72rem; color: var(--muted); }
.mini-kpis b { font-size: 1.05rem; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }

/* RTL */
[dir="rtl"] .hq-tag { margin-left: 0; margin-right: auto; }
[dir="rtl"] .bar-val { text-align: left; }
[dir="rtl"] .svc-list i { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .st-state { right: auto; left: 10px; }
[dir="rtl"] .tl li::before { left: auto; right: 13px; }
[dir="rtl"] .req-sum b { margin-right: 0; margin-left: 4px; }

/* ---------- catalog editors (wash shops, products) ---------- */
.edit-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.edit-grid .span-all { grid-column: 1 / -1; }
.f-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.f-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 480px) { .f-grid { grid-template-columns: minmax(0, 1fr); } }
.mkt-set { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.lbl { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.cover-preview { aspect-ratio: 16 / 10; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px dashed var(--border-strong); }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.cover-empty i { font-size: 2.2rem; }
.pick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gal-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.gal-thumb, .gal-add { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 12px; overflow: hidden; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-thumb .icon-btn { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; min-height: 0; background: rgba(0, 0, 0, .65); color: #fff; border-color: transparent; }
.gal-add { display: grid; place-content: center; justify-items: center; gap: 4px; border: 1px dashed var(--border-strong); color: var(--muted); font-size: .78rem; font-weight: 600; text-align: center; padding: 4px; }
.gal-add i { font-size: 1.3rem; }
.svc-add { min-width: 220px; }
.svc-edit { display: grid; gap: 10px; }
.svc-row { display: grid; gap: 0 10px; align-items: end; grid-template-columns: 74px minmax(0, 2fr) minmax(0, 1.2fr) 90px 110px 44px; padding: 10px 12px 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.svc-row .field { margin-bottom: 10px; }
.svc-row .field label { font-size: .72rem; }
.sr-icon { position: relative; }
.sr-icon .icon-select { padding-left: 34px; color: transparent; }
.sr-icon .icon-select option { color: var(--text); }
.sr-icon-prev { position: absolute; left: 12px; bottom: 13px; font-size: 1.25rem; color: var(--accent-text); pointer-events: none; }
.sr-rm { margin-bottom: 10px; }
@media (max-width: 760px) { .svc-row { grid-template-columns: 90px minmax(0, 1fr) 44px; grid-template-areas: "icon name rm" "type type type" "mins price price"; } .sr-icon { grid-area: icon; } .sr-name { grid-area: name; } .sr-rm { grid-area: rm; } .sr-type { grid-area: type; } .sr-mins { grid-area: mins; } .sr-price { grid-area: price; } }
.switch-row { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex: none; width: 46px; height: 26px; border-radius: 13px; background: var(--surface-3); position: relative; transition: background var(--dur-2); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform var(--dur-2) var(--ease-out); }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(20px); background: var(--on-accent); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.edit-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; justify-content: flex-end; padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.hq-gallery { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; }
.hq-gallery img { width: 140px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; flex: none; }

/* marketplace management */
.prod-dot { overflow: hidden; }
.prod-dot img { width: 100%; height: 100%; object-fit: cover; }
.prod-table td { vertical-align: middle; }
.mini-in { width: 96px; min-height: 40px; padding: 0 10px; text-align: center; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper .mini-in { width: 72px; }
.stepper .icon-btn { width: 36px; height: 36px; min-height: 0; }
.row-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.row-actions .btn { white-space: nowrap; }
.row-hidden td { opacity: .55; }
.row-hidden td:last-child { opacity: 1; }
.prod-edit { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .prod-edit { grid-template-columns: 200px minmax(0, 1fr); } }
.pe-art { aspect-ratio: 1; max-width: 100%; border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; font-size: 4.4rem; }
.pe-art img { width: 100%; height: 100%; object-fit: cover; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 44px; padding: 2px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.color-row select { flex: 1; min-width: 0; }
[dir="rtl"] .gal-thumb .icon-btn { right: auto; left: 4px; }
[dir="rtl"] .sr-icon .icon-select { padding-left: 12px; padding-right: 34px; }
[dir="rtl"] .sr-icon-prev { left: auto; right: 12px; }
@media (max-width: 720px) {
  .prod-table { min-width: 0 !important; }
  .prod-table thead { display: none; }
  .prod-table, .prod-table tbody { display: block; }
  .prod-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 12px 16px; padding: 14px; border-bottom: 1px solid var(--border); }
  .prod-table td { display: block; padding: 0; border: 0; }
  .prod-table td:first-child, .prod-table .td-actions { grid-column: 1 / -1; }
  .prod-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: .7rem; color: var(--muted); }
  .prod-table td:nth-child(4) { grid-column: 1 / -1; grid-row: 2; }
  .prod-table .row-actions { justify-content: flex-start; }
}
