/* =====================================================================
   Prime Car — Showroom settings page (2026-10-22): section nav + setting rows.
   View: app/Views/_showroom/settings/index.php. Classes are prefixed st-.
   ===================================================================== */
.st-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.st-nav { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 24px; background: var(--pc-surface); box-shadow: var(--pc-shadow-sm); }
[data-mode="dark"] .st-nav { box-shadow: none; border: 1px solid var(--pc-line); }
.st-nav a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px; border-radius: 14px; color: var(--pc-body); text-decoration: none; font-weight: 500; font-size: 14px; white-space: nowrap; }
.st-nav a .icon { width: 19px; height: 19px; flex: none; }
.st-nav a:hover { background: var(--pc-surface-2); color: var(--pc-ink); }
.st-nav a.is-on { background: var(--pc-dark); color: #fff; font-weight: 600; }
[data-mode="dark"] .st-nav a.is-on { background: var(--pc-ink); color: var(--pc-canvas); }
.st-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.st-sec { padding: 22px 24px; scroll-margin-top: 18px; }
.st-head { margin-bottom: 10px; }
.st-head h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
.st-head p { margin: 3px 0 0; font-size: 13px; color: var(--pc-muted); line-height: 1.6; }

/* one setting = name + what it does | control */
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: 8px 24px; align-items: center; padding: 14px 0; border-top: 1px solid var(--pc-line); }
.st-row__t b { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.st-row__t span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--pc-muted); line-height: 1.55; }
.st-row__c { min-width: 0; }
.st-row__c > .input, .st-row__c > .select { width: 100%; }
.st-unit { display: flex; align-items: stretch; border-radius: 14px; background: var(--pc-surface-2); border: 1px solid var(--pc-line); overflow: hidden; }
.st-unit:focus-within { border-color: var(--pc-primary-100); box-shadow: 0 0 0 3px var(--pc-primary-050); }
.st-unit .input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.st-unit span { flex: none; display: grid; place-items: center; min-width: 54px; padding: 0 12px; font-size: 12.5px; font-weight: 600; color: var(--pc-muted); background: var(--pc-surface); border-inline-start: 1px solid var(--pc-line); }
.st-group { display: flex; align-items: center; gap: 9px; margin: 24px 0 4px; font-size: 13px; font-weight: 700; color: var(--pc-ink); }
.st-group .icon { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--pc-surface-2); flex: none; }
.st-head + .st-group { margin-top: 12px; }
.st-actions { display: flex; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--pc-line); margin-top: 4px; }
.st-actions--sticky { position: sticky; bottom: 88px; z-index: 3; background: var(--pc-surface); margin-inline: -24px; padding: 14px 24px 2px; }
.st-note { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; color: var(--pc-muted); }

/* account header */
.st-me { display: flex; align-items: center; gap: 14px; padding: 2px 0 18px; margin-bottom: 8px; border-bottom: 1px solid var(--pc-line); }
.st-me__av { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: none; background: var(--pc-primary-050); color: var(--pc-primary-600); font-weight: 700; font-size: 18px; }
.st-me__t { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.st-me__t b { font-size: 17px; font-weight: 700; }
.st-me__mail { text-align: end; font-size: 12px; color: var(--pc-muted); line-height: 1.5; }
.st-me__mail bdi { display: block; font-size: 13.5px; color: var(--pc-ink); font-weight: 600; }

/* on/off switch */
.st-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.st-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.st-switch i { position: relative; width: 46px; height: 26px; border-radius: 13px; background: var(--pc-line-strong); transition: background .15s; flex: none; }
.st-switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: inset-inline-start .15s; }
.st-switch input:checked + i { background: var(--pc-ok-ink); }
.st-switch input:checked + i::after { inset-inline-start: 23px; }
.st-switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--pc-primary-100); }
.st-switch .st-switch__off { display: none; }
.st-switch input:not(:checked) ~ .st-switch__on { display: none; }
.st-switch input:not(:checked) ~ .st-switch__off { display: inline; }

/* appearance: three equal mode buttons, the label never wraps */
.st-modes { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 460px; }
.st-modes .th-mode { justify-content: center; white-space: nowrap; }

/* administration shortcuts */
.st-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 6px; }
.st-tool { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--pc-surface-2); color: var(--pc-ink); text-decoration: none; transition: background .15s; }
.st-tool:hover { background: var(--pc-primary-050); }
.st-tool__ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--pc-surface); flex: none; }
.st-tool__t { flex: 1; min-width: 0; }
.st-tool__t b { display: block; font-size: 14px; font-weight: 600; }
.st-tool__t span { display: block; font-size: 12px; color: var(--pc-muted); line-height: 1.45; }
.st-tool__go { width: 18px; height: 18px; color: var(--pc-muted); flex: none; }
:root[dir="ltr"] .st-tool__go { transform: scaleX(-1); }

@media (max-width: 1024px) {
    .st-wrap { grid-template-columns: 1fr; gap: 14px; }
    .st-nav { position: sticky; top: 0; z-index: 5; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 6px; border-radius: 18px; }
    .st-nav::-webkit-scrollbar { display: none; }
    .st-nav a { flex: none; min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13px; }
}
@media (max-width: 760px) {
    .st-sec { padding: 18px 16px; scroll-margin-top: 64px; }
    .st-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 0; }
    .st-me { flex-wrap: wrap; }
    .st-me__mail { flex-basis: 100%; text-align: start; }
    .st-actions .btn { width: 100%; justify-content: center; }
    .st-actions--sticky { margin-inline: -16px; padding-inline: 16px; bottom: 84px; }
    .st-modes { max-width: none; }
}

/* ---------- rev 2: one section at a time, profile picture, lists inside settings ---------- */
.st-sec[hidden] { display: none !important; }
.st-actions--sticky { position: static; margin-inline: 0; padding: 16px 0 0; }

/* profile picture: photo or the default car face */
.st-me { align-items: center; }
.st-pic { position: relative; flex: none; width: 84px; height: 84px; }
.st-pic__img { display: block; width: 84px; height: 84px; border-radius: 26px; object-fit: cover; background: var(--pc-surface-2); overflow: hidden; }
.st-pic__img.is-face { display: grid; place-items: center; background: linear-gradient(160deg, var(--pc-surface-2), var(--pc-canvas)); }
.st-pic__img.is-face .primo { width: 70px; height: 70px; margin-top: 4px; }
.st-pic__up { position: absolute; inset-inline-end: -6px; bottom: -6px; margin: 0; }
.st-pic__btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--pc-dark); color: #fff; box-shadow: 0 0 0 3px var(--pc-surface), var(--pc-shadow-sm); }
[data-mode="dark"] .st-pic__btn { background: var(--pc-ink); color: var(--pc-canvas); }
.st-pic__btn .icon { width: 16px; height: 16px; }
.st-pic__btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.st-pic__btn:focus-within { box-shadow: 0 0 0 3px var(--pc-primary-100); }
.st-pic__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: -4px 0 6px; font-size: 12px; color: var(--pc-muted); }
.st-pic__bar form { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* sidebar profile chip shows the same picture */
.sr-me__av { overflow: hidden; padding: 0; }
.sr-me__pic { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.sr-me__pic.is-face { background: var(--pc-surface-2); }
.sr-me__pic.is-face .primo { width: 34px; height: 34px; margin-top: 2px; }

/* dynamic lists as a settings section */
.st-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 8px; }
.st-list { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--pc-surface-2); color: var(--pc-ink); text-decoration: none; transition: background .15s; min-width: 0; }
.st-list:hover { background: var(--pc-primary-050); }
.st-list__ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--pc-surface); flex: none; }
.st-list__ic .icon { width: 19px; height: 19px; }
.st-list__t { flex: 1; min-width: 0; }
.st-list__t b { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.st-list__t span { display: block; font-size: 11.5px; color: var(--pc-muted); line-height: 1.4; }
.st-list__n { flex: none; min-width: 32px; height: 26px; padding: 0 9px; border-radius: 13px; display: grid; place-items: center; background: var(--pc-surface); font-size: 12px; font-weight: 700; color: var(--pc-body); }
.st-add { margin-top: 16px; }
.st-add > summary { display: inline-flex; list-style: none; }
.st-add[open] > summary { margin-bottom: 10px; }
.st-add > summary::-webkit-details-marker { display: none; }
/* one list's values inside the frame: the shared editor sits in a card */
.st-main--values { background: var(--pc-surface); border-radius: var(--sd-r, 28px); padding: 20px 22px; box-shadow: var(--pc-shadow-sm); }
[data-mode="dark"] .st-main--values { box-shadow: none; border: 1px solid var(--pc-line); }
.st-main--values > .card { box-shadow: none !important; border: 0 !important; padding-inline: 0 !important; }
@media (max-width: 760px) {
    .st-pic, .st-pic__img { width: 72px; height: 72px; }
    .st-pic__img { border-radius: 22px; }
    .st-pic__img.is-face .primo { width: 60px; height: 60px; }
    .st-lists { grid-template-columns: 1fr; }
    .st-main--values { padding: 16px; }
}

/* ---------- staff pictures in lists, chat, boards (helpers.php staff_av, Showroom::avatar) ---------- */
[data-theme="showroom"] .av--pic { padding: 0 !important; overflow: hidden; background: var(--pc-surface-2) !important; color: var(--pc-body) !important; box-shadow: none; }
[data-theme="showroom"] .av--pic .av__pic { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
[data-theme="showroom"] .av--pic .av__pic.is-face .primo { width: 92%; height: 92%; margin-top: 6%; }
[data-theme="showroom"] .av--pic .av__pic.is-initials { font-size: 10px; font-weight: 700; color: var(--pc-body); }
[data-theme="showroom"] .av.av--xs.av--pic { width: 30px; height: 30px; border-radius: 10px; flex: none; }
[data-theme="showroom"] .chat-av.av--pic { background: var(--pc-surface-2) !important; }
/* the luxury face sits on a warm tint, the accountant face on a cool one */
[data-theme="showroom"] .av--pic .av__pic.is-lux, [data-theme="showroom"] .st-pic__img.is-lux, [data-theme="showroom"] .sr-me__pic.is-lux { background: linear-gradient(160deg, #F6EBD2, #E9D6AE) !important; }
[data-mode="dark"][data-theme="showroom"] .av--pic .av__pic.is-lux, [data-mode="dark"][data-theme="showroom"] .st-pic__img.is-lux, [data-mode="dark"][data-theme="showroom"] .sr-me__pic.is-lux { background: linear-gradient(160deg, #3A3122, #2A2418) !important; }
[data-theme="showroom"] .av--pic .av__pic.is-desk, [data-theme="showroom"] .st-pic__img.is-desk, [data-theme="showroom"] .sr-me__pic.is-desk { background: linear-gradient(160deg, #E4EEF0, #D3E2E6) !important; }
[data-mode="dark"][data-theme="showroom"] .av--pic .av__pic.is-desk, [data-mode="dark"][data-theme="showroom"] .st-pic__img.is-desk, [data-mode="dark"][data-theme="showroom"] .sr-me__pic.is-desk { background: linear-gradient(160deg, #22302F, #1A2524) !important; }
[data-theme="showroom"] .rp-rep__av.av--pic, [data-theme="showroom"] .sd-task__av.av--pic { overflow: hidden; padding: 0; }
