/* ===== Dealer CRM demo — Lightning-style theme (neutral chrome, one sober brand colour) ===== */
:root {
  --sf-bg: #f3f3f2; --sf-card: #ffffff; --sf-border: #dddbda; --sf-border-strong: #c9c7c5;
  --sf-text: #181818; --sf-text-2: #444444; --sf-text-3: #706e6b;
  --sf-brand: #1f5aa6; --sf-brand-hover: #174685; --sf-brand-light: #e7eef8;
  --sf-nav: #15294d; --sf-nav-2: #1a3360;
  --sf-success: #2e844a; --sf-warning: #b7791f; --sf-danger: #ba0517; --sf-info: #3f6fb5;
  --sf-radius: .25rem; --sf-shadow: 0 2px 2px 0 rgba(0,0,0,.08); --sf-shadow-lg: 0 8px 16px rgba(0,0,0,.12);
  --sf-path-done: #2e844a; --sf-path-current: #1b2430; --sf-path-todo: #ecebea;
  --sb-w: 244px; --sb-w-collapsed: 66px; --sb-bg: #15294d; --sb-bg-end: #0f1f3a; --sb-accent: #8fb8ee; --sb-text: rgba(255,255,255,.84); --sb-muted: rgba(255,255,255,.5);
}
html, body { height: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--sf-bg); color: var(--sf-text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; font-size: 13px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--sf-brand); text-decoration: none; } a:hover { text-decoration: underline; color: var(--sf-brand-hover); }
h1, h2, h3, h4, h5 { font-weight: 600; color: var(--sf-text); }
.text-muted { color: var(--sf-text-3) !important; } .small-2 { font-size: .75rem; } .fw-600 { font-weight: 600; } .mono { font-variant-numeric: tabular-nums; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cursor-pointer, .clickable { cursor: pointer; } .num { text-align: right; font-variant-numeric: tabular-nums; }
.up { color: var(--sf-success); font-weight: 600; } .down { color: var(--sf-danger); font-weight: 600; }

/* ----- Global header ----- */
.sf-header { height: 52px; min-width: 0; background: #fff; border-bottom: 1px solid var(--sf-border); display: flex; align-items: center; padding: 0 1rem; gap: .75rem; position: sticky; top: 0; z-index: 1030; }
.sf-search { flex: 1; max-width: 640px; min-width: 120px; margin: 0 auto; position: relative; }
.sf-search input { width: 100%; height: 34px; border: 1px solid var(--sf-border); border-radius: 17px; padding: 0 1rem 0 2.3rem; font-size: 13px; background: #fff; }
.sf-search input:focus { outline: none; border-color: var(--sf-brand); box-shadow: 0 0 0 2px var(--sf-brand-light); }
.sf-search .bi-search { position: absolute; left: .9rem; top: 9px; color: var(--sf-text-3); }
.sf-search-results { position: absolute; top: 38px; left: 0; right: 0; background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow-lg); z-index: 1050; max-height: 420px; overflow: auto; }
.sf-search-results .grp { padding: .35rem .75rem; font-size: 11px; text-transform: uppercase; color: var(--sf-text-3); background: #fafaf9; border-bottom: 1px solid var(--sf-border); }
.sf-search-results .row-item { padding: .45rem .75rem; display: flex; gap: .6rem; align-items: center; cursor: pointer; } .sf-search-results .row-item:hover { background: #f3f3f2; }
.sf-header-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.sf-icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--sf-text-2); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; position: relative; }
.sf-icon-btn:hover { background: #f3f3f2; border-color: var(--sf-border); }
.sf-icon-btn .dot { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--sf-danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; font-weight: 600; }
.sf-avatar { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; flex: 0 0 auto; }
.sf-avatar.sm { width: 24px; height: 24px; font-size: 10px; } .sf-avatar.lg { width: 48px; height: 48px; font-size: 17px; } .sf-avatar.xl { width: 64px; height: 64px; font-size: 22px; }
.staff-banner { background: #fff4d6; border-bottom: 1px solid #f3dfb0; color: #7a5208; font-size: 12.5px; padding: .35rem 1rem; display: flex; align-items: center; gap: .6rem; position: sticky; top: 52px; z-index: 1029; }
.staff-banner.real-impersonation { background: #eef1fd; border-bottom-color: #ccd4f7; color: #2a3a8c; }
.tenant-chip { display: inline-flex; align-items: center; gap: .35rem; background: var(--sf-brand-light); color: var(--sf-brand); border: 1px solid #c5d6ee; border-radius: 1rem; padding: .05rem .6rem; font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ----- Page & cards ----- */
.sf-page { padding: .75rem 1rem 3rem; max-width: 1920px; margin: 0 auto; }
.sf-card { background: var(--sf-card); border: 1px solid var(--sf-border); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); }
.sf-card + .sf-card { margin-top: .75rem; }
.sf-card-header { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border-bottom: 1px solid var(--sf-border); flex-wrap: wrap; }
.sf-card-header h3 { font-size: 13px; font-weight: 700; margin: 0; } .sf-card-header .count { color: var(--sf-text-3); font-weight: 400; }
.sf-card-header .actions { margin-left: auto; display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.sf-card-body { padding: .9rem; }
.sf-card-footer { padding: .45rem .9rem; border-top: 1px solid var(--sf-border); font-size: 12px; background: #fafaf9; border-radius: 0 0 var(--sf-radius) var(--sf-radius); }
.sf-icon { width: 32px; height: 32px; border-radius: var(--sf-radius); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; flex: 0 0 auto; }
.sf-icon.lg { width: 40px; height: 40px; font-size: 20px; } .sf-icon.sm { width: 24px; height: 24px; font-size: 12px; border-radius: 3px; }
.sf-page-header { background: var(--sf-card); border: 1px solid var(--sf-border); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); padding: .65rem .9rem; display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.sf-page-header .eyebrow { font-size: 12px; color: var(--sf-text-3); line-height: 1.2; }
.sf-page-header .title { font-size: 18px; font-weight: 700; line-height: 1.25; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.sf-page-header .meta { font-size: 12px; color: var(--sf-text-3); }
.sf-page-header .actions { margin-left: auto; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }

/* ----- Buttons (strict 3 tiers) ----- */
.btn { font-size: 13px; border-radius: var(--sf-radius); padding: .32rem .8rem; }
.btn-sf { background: #fff; border: 1px solid var(--sf-border-strong); color: var(--sf-brand); font-weight: 500; }
.btn-sf:hover { background: #f3f3f2; color: var(--sf-brand-hover); border-color: var(--sf-border-strong); }
.btn-sf.active, .btn-sf:active, .btn-check:checked + .btn-sf { background: var(--sf-brand-light); color: var(--sf-brand); border-color: var(--sf-border-strong); }
.btn-brand { background: var(--sf-brand); border: 1px solid var(--sf-brand); color: #fff; font-weight: 500; }
.btn-brand:hover { background: var(--sf-brand-hover); border-color: var(--sf-brand-hover); color: #fff; }
.btn-brand:disabled, .btn-brand.disabled { background: #9bb3d3; border-color: #9bb3d3; opacity: 1; }
.btn-sf-danger { background: #fff; border: 1px solid var(--sf-border-strong); color: var(--sf-danger); }
.btn-sf-danger:hover { background: #fdeeee; color: var(--sf-danger); }
.btn-xs { padding: .12rem .5rem; font-size: 12px; }
.btn-sf:disabled, .btn-sf-danger:disabled { color: var(--sf-text-3); background: #f8f8f7; opacity: 1; }

/* ----- Badges & pills ----- */
.sf-badge { display: inline-block; padding: .1rem .5rem; border-radius: .75rem; font-size: 11.5px; font-weight: 500; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.sf-badge-neutral { background: #f3f3f2; color: var(--sf-text-2); border-color: #e5e5e5; }
.sf-badge-success { background: #e4f3e8; color: #1f5f34; border-color: #c7e3cf; }
.sf-badge-warning { background: #fbf1dc; color: #7a5208; border-color: #f3dfb0; }
.sf-badge-danger { background: #fde8ea; color: #8e0d1b; border-color: #f6c4c9; }
.sf-badge-info { background: #e8eff8; color: #294b80; border-color: #cddcf0; }
.sf-badge-brand { background: var(--sf-brand-light); color: var(--sf-brand); border-color: #c5d6ee; }
.sim-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; letter-spacing: .2px; color: #6b4e00; background: #fff4d6; border: 1px solid #f3dfb0; border-radius: 3px; padding: 0 5px; line-height: 16px; vertical-align: middle; }
.sim-pill.demo { color: #294b80; background: #e8eff8; border-color: #cddcf0; }
.sf-chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--sf-brand-light); color: var(--sf-brand); border: 1px solid #c5d6ee; border-radius: 1rem; padding: .05rem .55rem; font-size: 12px; } .sf-chip .bi-x { cursor: pointer; }

/* ----- Tables ----- */
.sf-table-wrap { overflow-x: auto; }
.sf-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sf-table th { background: #fafaf9; color: var(--sf-text-2); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--sf-border); border-top: 1px solid var(--sf-border); padding: .45rem .6rem; white-space: nowrap; position: sticky; top: 0; z-index: 1; user-select: none; }
.sf-table th.sortable { cursor: pointer; } .sf-table th.sortable:hover { background: #f3f3f2; } .sf-table th .bi { font-size: 10px; color: var(--sf-text-3); margin-left: 3px; }
.sf-table td { padding: .42rem .6rem; border-bottom: 1px solid #ecebea; vertical-align: middle; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.sf-table td:has(.dropdown-menu) { overflow: visible; } /* the cell clips long text; a cell that holds a Manage / More menu is an action cell and must not clip the menu */
.sf-table tbody tr:hover td { background: #f8f8f7; } .sf-table tbody tr.clickable { cursor: pointer; }
.sf-table td.rownum, .sf-table th.rownum { color: var(--sf-text-3); width: 34px; text-align: center; font-size: 11px; }
.sf-table .form-check-input { margin: 0; } .sf-table-compact td, .sf-table-compact th { padding: .3rem .5rem; }
.sf-list-footer { display: flex; align-items: center; gap: .75rem; padding: .5rem .9rem; border-top: 1px solid var(--sf-border); font-size: 12px; color: var(--sf-text-3); background: #fafaf9; } .sf-list-footer .pager { margin-left: auto; display: flex; gap: .25rem; }
.sf-toolbar { display: flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border-bottom: 1px solid var(--sf-border); flex-wrap: wrap; }
.sf-toolbar .form-control, .sf-toolbar .form-select { font-size: 13px; height: 32px; padding: .25rem .6rem; line-height: 1.4; } .sf-toolbar .form-select { padding-right: 2rem; background-position: right .5rem center; }
.list-search { position: relative; width: 280px; max-width: 100%; }
.list-search .bi-search { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--sf-text-3); pointer-events: none; font-size: 13px; }
.list-search .form-control { padding-left: 2rem; border-radius: 16px; } .list-search .form-control:focus { border-color: var(--sf-brand); box-shadow: 0 0 0 2px var(--sf-brand-light); }
.report-group-row td { background: #f3f3f2 !important; font-weight: 700; }

/* ----- Record page ----- */
.sf-highlights { background: var(--sf-card); border: 1px solid var(--sf-border); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); padding: .8rem 1rem; margin-bottom: .75rem; }
.sf-highlights .top { display: flex; align-items: flex-start; gap: .75rem; } .sf-highlights .eyebrow { font-size: 12px; color: var(--sf-text-3); }
.sf-highlights .name { font-size: 18px; font-weight: 700; line-height: 1.25; } .sf-highlights .subtitle { font-size: 12px; color: var(--sf-text-3); }
.sf-highlights .actions { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.sf-highlights .fields { display: flex; gap: 1.5rem; margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--sf-border); flex-wrap: wrap; }
.sf-highlights .fields .f { min-width: 120px; } .sf-highlights .fields .l { font-size: 11.5px; color: var(--sf-text-3); } .sf-highlights .fields .v { font-size: 13px; font-weight: 500; }
.sf-path { display: flex; align-items: center; gap: .5rem; background: var(--sf-card); border: 1px solid var(--sf-border); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); padding: .6rem .9rem; margin-bottom: .75rem; flex-wrap: wrap; }
.sf-path .steps { display: flex; flex: 1; min-width: 320px; }
.sf-path .step { flex: 1; position: relative; height: 32px; line-height: 32px; text-align: center; font-size: 12.5px; font-weight: 500; background: var(--sf-path-todo); color: var(--sf-text-2); margin-right: 4px; padding: 0 .4rem 0 .8rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-path .step:first-child { border-radius: 16px 0 0 16px; padding-left: .6rem; } .sf-path .step:last-child { border-radius: 0 16px 16px 0; margin-right: 0; }
.sf-path .step::after { content: ''; position: absolute; right: -14px; top: 0; border-left: 14px solid var(--sf-path-todo); border-top: 16px solid transparent; border-bottom: 16px solid transparent; z-index: 2; }
.sf-path .step::before { content: ''; position: absolute; left: 0; top: 0; border-left: 14px solid #fff; border-top: 16px solid transparent; border-bottom: 16px solid transparent; z-index: 1; }
.sf-path .step:first-child::before { display: none; } .sf-path .step:last-child::after { display: none; }
.sf-path .step.done { background: var(--sf-path-done); color: #fff; } .sf-path .step.done::after { border-left-color: var(--sf-path-done); }
.sf-path .step.current { background: var(--sf-path-current); color: #fff; } .sf-path .step.current::after { border-left-color: var(--sf-path-current); }
.sf-path .step.lost { background: var(--sf-danger); color: #fff; } .sf-path .step.lost::after { border-left-color: var(--sf-danger); }
.sf-path .step .bi-check { margin-right: 3px; } .sf-path .path-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.sf-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--sf-border); padding: 0 .9rem; overflow-x: auto; }
.sf-tabs .tab { padding: .55rem .9rem; font-size: 13px; font-weight: 500; color: var(--sf-text-2); border-bottom: 3px solid transparent; cursor: pointer; margin-bottom: -1px; white-space: nowrap; }
.sf-tabs .tab:hover { color: var(--sf-brand); } .sf-tabs .tab.active { color: var(--sf-brand); border-bottom-color: var(--sf-brand); }
.sf-section-title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--sf-text-2); background: #fafaf9; border-top: 1px solid var(--sf-border); border-bottom: 1px solid var(--sf-border); padding: .4rem .9rem; margin: 0 -.9rem .5rem; }
.sf-section-title:first-child { border-top: none; margin-top: -.9rem; }
.sf-field { padding: .3rem 0; border-bottom: 1px solid #ecebea; margin-right: 1.5rem; } .sf-field .l { font-size: 11.5px; color: var(--sf-text-3); line-height: 1.3; }
.sf-field .v { font-size: 13px; min-height: 20px; word-break: break-word; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.sf-field .v .edit-pencil { margin-left: auto; opacity: 0; color: var(--sf-text-3); cursor: pointer; font-size: 12px; } .sf-field:hover .v .edit-pencil { opacity: 1; }
.sf-related .sf-table td { white-space: nowrap; }

/* ----- Activity timeline ----- */
.sf-timeline { position: relative; padding-left: 1.6rem; } .sf-timeline::before { content: ''; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: #e5e5e5; }
.sf-timeline .item { position: relative; padding: .35rem 0 .5rem; } .sf-timeline .item .ic { position: absolute; left: -1.6rem; top: .5rem; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; }
.sf-timeline .item .ttl { font-weight: 600; font-size: 13px; } .sf-timeline .item .meta { font-size: 11.5px; color: var(--sf-text-3); } .sf-timeline .item .body { font-size: 12.5px; color: var(--sf-text-2); margin-top: .15rem; }
.sf-timeline .day { font-size: 11px; font-weight: 700; color: var(--sf-text-3); text-transform: uppercase; letter-spacing: .4px; margin: .6rem 0 .2rem -1.6rem; }
.sf-activity-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ----- KPI tiles ----- */
.sf-kpi { background: var(--sf-card); border: 1px solid var(--sf-border); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); padding: .7rem .9rem; height: 100%; display: flex; flex-direction: column; gap: .15rem; }
.sf-kpi.clickable:hover { border-color: var(--sf-brand); }
.sf-kpi .l { font-size: 11.5px; color: var(--sf-text-3); text-transform: uppercase; letter-spacing: .3px; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.sf-kpi .v { font-size: 22px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; } .sf-kpi .d { font-size: 11.5px; color: var(--sf-text-3); }
.sf-kpi .bar { height: 6px; background: #ecebea; border-radius: 3px; overflow: hidden; margin-top: .4rem; } .sf-kpi .bar > span { display: block; height: 100%; background: var(--sf-brand); border-radius: 3px; }
.sf-progress { height: 8px; background: #ecebea; border-radius: 4px; overflow: hidden; min-width: 60px; } .sf-progress > span { display: block; height: 100%; background: var(--sf-brand); }
.sf-progress.warn > span { background: var(--sf-warning); } .sf-progress.bad > span { background: var(--sf-danger); }
.chart-box { position: relative; width: 100%; } .chart-box canvas { width: 100% !important; }
.net-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: .5rem; }
.net-tile { display: flex; flex-direction: column; gap: .1rem; background: var(--sf-card); border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .5rem .7rem; text-decoration: none; color: var(--sf-text); box-shadow: var(--sf-shadow); min-width: 0; }
.net-tile:hover { text-decoration: none; box-shadow: var(--sf-shadow-lg); border-color: var(--sf-brand); } .net-tile .bi { color: var(--sf-brand); font-size: 15px; }
.net-tile .v { font-weight: 700; font-size: 17px; line-height: 1.1; font-variant-numeric: tabular-nums; } .net-tile .l { font-size: 10.5px; color: var(--sf-text-3); text-transform: uppercase; letter-spacing: .3px; line-height: 1.15; min-height: 24px; }
.net-tile.danger .bi, .net-tile.danger .v { color: var(--sf-danger); } .net-tile.warn .bi, .net-tile.warn .v { color: var(--sf-warning); }
.hbar-row { display: flex; align-items: center; gap: .6rem; padding: .32rem 0; } .hbar-row.clickable:hover .hbar-label { color: var(--sf-brand); }
.hbar-label { flex: 0 0 40%; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hbar-track { flex: 1; height: 12px; background: #eef0f4; border-radius: 6px; overflow: hidden; } .hbar-track > span { display: block; height: 100%; border-radius: 6px; min-width: 2px; }
.hbar-value { flex: 0 0 64px; text-align: right; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; } .hbar-pct { flex: 0 0 40px; text-align: right; color: var(--sf-text-3); font-size: 12px; }
.funnel .step { position: relative; display: flex; align-items: center; gap: .5rem; height: 30px; margin-bottom: 5px; font-size: 12.5px; }
.funnel .step .bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--sf-brand-light); border-left: 3px solid var(--sf-brand); border-radius: 4px; z-index: 0; }
.funnel .step .l, .funnel .step .n, .funnel .step .p { position: relative; z-index: 1; } .funnel .step .l { flex: 1; padding-left: .5rem; } .funnel .step .n { font-weight: 700; font-variant-numeric: tabular-nums; } .funnel .step .p { width: 46px; text-align: right; font-size: 11px; color: var(--sf-text-3); }
.rag { display: inline-block; padding: .05rem .5rem; border-radius: 1rem; font-size: 11.5px; font-weight: 700; color: #fff; } .rag-green { background: #2e844a; } .rag-amber { background: #b7791f; } .rag-red { background: #ba0517; }
.insights { padding-left: 1.1rem; margin: 0; font-size: 12.5px; } .insights li { margin-bottom: .45rem; line-height: 1.4; }

/* ----- Kanban ----- */
.sf-kanban { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .5rem; align-items: flex-start; }
.sf-kanban .col { flex: 0 0 250px; background: #f3f3f2; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); min-height: 200px; }
.sf-kanban .col-head { padding: .5rem .6rem; border-bottom: 1px solid var(--sf-border); background: #fff; border-radius: var(--sf-radius) var(--sf-radius) 0 0; } .sf-kanban .col-head .t { font-weight: 700; font-size: 12.5px; } .sf-kanban .col-head .s { font-size: 11.5px; color: var(--sf-text-3); }
.sf-kanban .col-body { padding: .45rem; display: flex; flex-direction: column; gap: .45rem; min-height: 60px; } .sf-kanban .col.over { outline: 2px dashed var(--sf-brand); outline-offset: -2px; }
.sf-kanban .kcard { background: #fff; border: 1px solid var(--sf-border); border-left: 3px solid var(--sf-brand); border-radius: var(--sf-radius); padding: .45rem .55rem; cursor: grab; box-shadow: var(--sf-shadow); } .sf-kanban .kcard:active { cursor: grabbing; }
.sf-kanban .kcard .n { font-weight: 600; font-size: 12.5px; line-height: 1.3; display: flex; align-items: flex-start; justify-content: space-between; gap: .35rem; } .sf-kanban .kcard .n a { min-width: 0; }
.sf-kanban .kcard .m { font-size: 11.5px; color: var(--sf-text-3); display: flex; justify-content: space-between; margin-top: .2rem; gap: .4rem; } .sf-kanban .kcard.stale { border-left-color: var(--sf-warning); } .sf-kanban .kcard.danger { border-left-color: var(--sf-danger); }

/* ----- Calendar ----- */
.cal-nav { display: flex; align-items: center; gap: .6rem; padding: .5rem .9rem; border-bottom: 1px solid var(--sf-border); flex-wrap: wrap; } .cal-title { font-weight: 700; font-size: 14px; flex: 1; text-align: center; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--sf-border); border: 1px solid var(--sf-border); }
.cal-dow { background: #fafaf9; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--sf-text-3); padding: .3rem .4rem; }
.cal-cell { background: #fff; min-height: 96px; padding: .25rem .35rem; cursor: pointer; } .cal-cell.other { background: #fafaf9; color: var(--sf-text-3); } .cal-cell.today .d { background: var(--sf-brand); color: #fff; border-radius: 50%; } .cal-cell .d { font-size: 12px; font-weight: 600; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.cal-ev { display: block; font-size: 11px; line-height: 1.25; background: #f3f6fb; border-left: 3px solid var(--sf-brand); border-radius: 3px; padding: 2px 5px; margin: 2px 0; color: var(--sf-text); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-ev:hover { text-decoration: none; background: var(--sf-brand-light); } .cal-ev .t { color: var(--sf-text-3); font-variant-numeric: tabular-nums; } .cal-ev .n { font-weight: 600; } .cal-ev .s { color: var(--sf-text-3); margin-left: .3rem; }
.cal-ev.cancelled, .cal-ev.noshow { opacity: .55; text-decoration: line-through; } .cal-ev.done { border-left-color: var(--sf-success); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--sf-border); border: 1px solid var(--sf-border); } .cal-col { background: #fff; min-height: 260px; } .cal-col.today { background: #fbfcfe; }
.cal-col-head { background: #fafaf9; font-size: 12px; padding: .35rem .5rem; border-bottom: 1px solid var(--sf-border); cursor: pointer; } .cal-col .cal-ev { white-space: normal; margin: 3px 4px; }
.cal-day .cal-hour { display: flex; border-bottom: 1px solid #ecebea; min-height: 44px; } .cal-day .h { flex: 0 0 70px; font-size: 11.5px; color: var(--sf-text-3); padding: .3rem .6rem; border-right: 1px solid #ecebea; } .cal-day .evs { flex: 1; padding: .2rem .4rem; display: flex; flex-wrap: wrap; gap: .3rem; } .cal-day .cal-ev { flex: 0 0 auto; white-space: normal; min-width: 180px; }

/* ----- Wizard ----- */
.wiz-steps { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.wiz-step { display: flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--sf-border); border-radius: 1rem; padding: .2rem .7rem .2rem .25rem; font-size: 12px; cursor: pointer; color: var(--sf-text-2); }
.wiz-step .n { width: 22px; height: 22px; border-radius: 50%; background: #ecebea; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.wiz-step.current { border-color: var(--sf-brand); color: var(--sf-brand); font-weight: 600; } .wiz-step.current .n { background: var(--sf-brand); color: #fff; } .wiz-step.done .n { background: var(--sf-success); color: #fff; }
.pick-card { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .6rem .75rem; cursor: pointer; background: #fff; height: 100%; } .pick-card:hover, .pick-card.active { border-color: var(--sf-brand); box-shadow: var(--sf-shadow-lg); } .pick-card.active { background: var(--sf-brand-light); } .pick-card .t { font-weight: 700; font-size: 13px; } .pick-card .d { font-size: 11.5px; color: var(--sf-text-3); }
.step-log .row-step { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid #ecebea; font-size: 12.5px; } .step-log .st { width: 20px; text-align: center; }

/* ----- Forms / modals ----- */
.modal-content { border-radius: var(--sf-radius); border: 1px solid var(--sf-border); font-size: 13px; } .modal-header { padding: .7rem 1rem; background: #fafaf9; border-bottom: 1px solid var(--sf-border); } .modal-title { font-size: 15px; font-weight: 700; } .modal-footer { padding: .55rem 1rem; background: #fafaf9; border-top: 1px solid var(--sf-border); }
.form-label { font-size: 12px; color: var(--sf-text-2); margin-bottom: .15rem; } .form-label .req { color: var(--sf-danger); margin-right: 2px; }
.form-control, .form-select { font-size: 13px; border-radius: var(--sf-radius); border-color: var(--sf-border-strong); padding: .3rem .55rem; } .form-select { padding-right: 2.1rem; }
.form-control:focus, .form-select:focus { border-color: var(--sf-brand); box-shadow: 0 0 0 2px var(--sf-brand-light); } .form-control[readonly] { background: #f8f8f7; }
.form-section { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--sf-text-2); background: #fafaf9; border-top: 1px solid var(--sf-border); border-bottom: 1px solid var(--sf-border); padding: .35rem 1rem; margin: .5rem -1rem .6rem; } .form-section:first-child { margin-top: -1rem; border-top: none; }
.lines-editor .sf-table td { padding: .2rem .25rem; white-space: nowrap; } .lines-editor .form-control-sm, .lines-editor .form-select-sm { font-size: 12.5px; min-width: 90px; }
.check-row { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; border-bottom: 1px solid #ecebea; width: 100%; } .check-row .n { flex: 1; font-size: 12.5px; }
.doc-row { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid #ecebea; } .doc-row .n { flex: 1; }
.mini-stat { display: flex; justify-content: space-between; font-size: 12.5px; padding: .3rem 0; border-bottom: 1px solid #ecebea; } .mini-stat .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.rank { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; background: #f3f3f2; color: var(--sf-text-2); } .rank.r1 { background: #fbf1dc; color: #7a5208; } .rank.r2 { background: #ecebea; color: #444; } .rank.r3 { background: #f6e7dd; color: #7a3d1a; }
.sf-empty { text-align: center; color: var(--sf-text-3); padding: 2rem 1rem; } .sf-empty .bi { font-size: 32px; display: block; margin-bottom: .4rem; opacity: .5; }
.sf-alert-row { display: flex; align-items: flex-start; gap: .6rem; padding: .5rem .9rem; border-bottom: 1px solid #ecebea; } .sf-alert-row .sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: 0 0 auto; }
.sev-critical { background: var(--sf-danger); } .sev-warning { background: var(--sf-warning); } .sev-info { background: var(--sf-info); }
.sf-feed-item { display: flex; gap: .6rem; padding: .45rem .9rem; border-bottom: 1px solid #ecebea; align-items: flex-start; } .sf-feed-item .ic { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex: 0 0 auto; } .sf-feed-item .txt { font-size: 12.5px; } .sf-feed-item .meta { font-size: 11px; color: var(--sf-text-3); }
.sf-tree ul { list-style: none; padding-left: 1.4rem; margin: 0; border-left: 1px dashed #d0cfcd; } .sf-tree > ul { border-left: none; padding-left: 0; } .sf-tree li { margin: .2rem 0; }
.sf-tree .node { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .25rem .6rem .25rem .3rem; } .sf-tree .node .n { font-weight: 600; font-size: 12.5px; } .sf-tree .node .t { font-size: 11px; color: var(--sf-text-3); }
.dropdown-menu { font-size: 13px; border-color: var(--sf-border); box-shadow: var(--sf-shadow-lg); } .dropdown-item { padding: .3rem .9rem; } .dropdown-item.active, .dropdown-item:active { background: var(--sf-brand-light); color: var(--sf-brand); }
.hover-raise { transition: box-shadow .12s; } .hover-raise:hover { box-shadow: var(--sf-shadow-lg); } .sticky-side { position: sticky; top: 64px; } .pointer { cursor: pointer; }
.report-builder .field-list { max-height: 360px; overflow: auto; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .4rem .6rem; background: #fff; } .report-builder .field-list label { display: block; font-size: 12.5px; padding: .1rem 0; cursor: pointer; }
.sf-dash-grid .sf-card { height: 100%; }
.ws-swatch { width: 26px; height: 26px; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--sf-border); cursor: pointer; display: inline-block; } .ws-swatch.active { box-shadow: 0 0 0 2px var(--sf-text); }
.ws-preview { background: var(--sb-bg); border-radius: 8px; padding: .75rem; color: #fff; display: flex; align-items: center; gap: .6rem; } .ws-preview .mark { width: 34px; height: 34px; border-radius: 7px; background: var(--sf-brand); display: flex; align-items: center; justify-content: center; font-weight: 700; } .ws-preview .name { font-weight: 700; } .ws-preview .sub { font-size: 11.5px; opacity: .75; }
.mark.has-logo { background: #fff !important; padding: 3px; box-sizing: border-box; } .mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 3px; }

/* ----- Toasts ----- */
.sf-toasts { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: .5rem; width: min(560px, 92vw); pointer-events: none; }
.sf-busy { position: fixed; inset: 0; z-index: 1990; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: progress; }
.sf-busy-box { background: var(--sf-card); border-radius: .5rem; box-shadow: var(--sf-shadow-lg); padding: 1.4rem 1.6rem; width: min(420px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.sf-busy-bar { width: 100%; height: 8px; margin-top: .35rem; } .sf-busy-bar .progress-bar { transition: width .25s linear; }
.sf-busy-box .t { font-weight: 600; font-size: 15px; } .sf-busy-box .n { font-size: 12.5px; color: var(--sf-text-3); } .sf-busy-box .s { font-size: 12px; color: var(--sf-text-3); }
.sf-toasts > * { pointer-events: auto; }
.sf-toast { display: flex; align-items: flex-start; gap: .7rem; padding: .7rem .9rem; border-radius: var(--sf-radius); color: #fff; box-shadow: var(--sf-shadow-lg); font-size: 13px; animation: sfToastIn .18s ease-out; }
.sf-toast.success { background: #2e844a; } .sf-toast.error { background: #ba0517; } .sf-toast.info { background: #2b3a46; } .sf-toast.sim { background: #7a5208; }
.sf-toast .bi { font-size: 18px; } .sf-toast .close { margin-left: auto; cursor: pointer; opacity: .8; } @media (max-width: 575.98px) { .sf-toast .close { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; margin: -10px -10px -10px auto; } } .sf-toast .t { font-weight: 600; } .sf-toast .b { opacity: .92; }
@keyframes sfToastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ----- Calling center ----- */
.call-pane { display: grid; grid-template-columns: 320px 1fr 340px; gap: .75rem; } .call-pane > .call-team { grid-column: 2 / -1; } .call-queue { max-height: calc(100vh - 220px); overflow: auto; }
.call-queue .q-item { display: flex; gap: .5rem; padding: .5rem .7rem; border-bottom: 1px solid #ecebea; cursor: pointer; align-items: flex-start; } .call-queue .q-item.active { background: var(--sf-brand-light); border-left: 3px solid var(--sf-brand); } .call-queue .q-item:hover { background: #f8f8f7; }
.dialer { text-align: center; padding: 1.2rem .9rem; } .dialer .num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .5px; } .dialer .timer { font-size: 28px; font-weight: 700; color: var(--sf-success); font-variant-numeric: tabular-nums; }
.dialer .pulse { width: 64px; height: 64px; border-radius: 50%; background: var(--sf-success); color: #fff; font-size: 26px; display: inline-flex; align-items: center; justify-content: center; animation: pulse 1.4s infinite; margin: .6rem 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,132,74,.5); } 70% { box-shadow: 0 0 0 16px rgba(46,132,74,0); } 100% { box-shadow: 0 0 0 0 rgba(46,132,74,0); } }
.disp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem; } .disp-grid .btn { text-align: left; }

/* ----- Bay board ----- */
.bay-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.bay { background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .5rem .6rem; min-height: 96px; } .bay.free { background: #f8fbf9; border-style: dashed; } .bay .bn { font-size: 11px; text-transform: uppercase; color: var(--sf-text-3); font-weight: 700; } .bay .veh { font-weight: 700; font-size: 13px; } .bay .m { font-size: 11.5px; color: var(--sf-text-3); }
.sla-timer { font-variant-numeric: tabular-nums; font-weight: 700; } .sla-timer.breached { color: var(--sf-danger); } .sla-timer.risk { color: var(--sf-warning); } .sla-timer.ok { color: var(--sf-success); }

/* ----- Assist panel ----- */
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 1500; border: none; border-radius: 24px; background: var(--sf-brand); color: #fff; padding: .55rem 1rem .55rem .85rem; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: .45rem; box-shadow: 0 6px 18px rgba(0,0,0,.22); } .ai-fab:hover { background: var(--sf-brand-hover); } .ai-fab .bi { font-size: 16px; } body.modal-open .ai-fab { display: none; }
.ai-panel { position: fixed; right: 20px; bottom: 72px; width: min(430px, calc(100vw - 40px)); height: min(640px, calc(100vh - 110px)); background: #fff; border: 1px solid var(--sf-border); border-radius: .5rem; box-shadow: 0 12px 32px rgba(0,0,0,.22); z-index: 1500; display: flex; flex-direction: column; overflow: hidden; }
.ai-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-bottom: 1px solid var(--sf-border); background: #fafaf9; } .ai-logo { width: 32px; height: 32px; border-radius: 50%; background: var(--sf-brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.ai-body { flex: 1; overflow: auto; padding: .8rem .9rem; background: #f6f6f5; } .ai-foot { padding: .6rem .75rem; border-top: 1px solid var(--sf-border); background: #fff; }
.ai-msg { margin-bottom: .7rem; } .ai-msg .bubble { background: #fff; border: 1px solid var(--sf-border); border-radius: .6rem; padding: .55rem .7rem; font-size: 12.8px; line-height: 1.45; } .ai-msg.user { display: flex; flex-direction: column; align-items: flex-end; } .ai-msg.user .bubble { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); }
.ai-msg .meta { font-size: 10.5px; color: var(--sf-text-3); margin: .15rem .3rem 0; } .ai-msg ol, .ai-msg ul { padding-left: 1.1rem; margin-bottom: .3rem; } .ai-actions, .ai-chips { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .5rem; }
.ai-chip { display: inline-block; background: var(--sf-brand-light); color: var(--sf-brand); border: 1px solid #c5d6ee; border-radius: 1rem; padding: .12rem .6rem; font-size: 11.5px; cursor: pointer; } .ai-chip:hover { background: #d6e3f3; }

/* ----- Tour ----- */
.tour-box { position: fixed; right: 20px; bottom: 80px; width: min(380px, calc(100vw - 40px)); background: #fff; border: 1px solid var(--sf-border); border-left: 4px solid var(--sf-brand); border-radius: .4rem; box-shadow: 0 12px 32px rgba(0,0,0,.22); z-index: 1490; padding: .8rem .9rem; }
.tour-box .step { font-size: 11px; text-transform: uppercase; color: var(--sf-text-3); font-weight: 700; } .tour-box h4 { font-size: 14px; margin: .2rem 0; } .tour-box p { font-size: 12.5px; margin: 0 0 .5rem; color: var(--sf-text-2); }

/* ----- Login ----- */
.sf-login { min-height: 100vh; display: flex; align-items: stretch; background: var(--sf-bg); }
.sf-login .left { flex: 0 0 420px; background: linear-gradient(160deg, var(--sf-nav) 0%, var(--sf-brand) 70%, var(--sf-brand-hover) 100%); color: #fff; padding: 3rem 2.5rem; display: flex; flex-direction: column; }
.sf-login .left h1 { color: #fff; font-size: 28px; font-weight: 700; margin-top: 2.2rem; } .sf-login .left p { color: rgba(255,255,255,.85); font-size: 14px; }
.sf-login .left .feature { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1rem; font-size: 13px; color: rgba(255,255,255,.92); } .sf-login .left .feature .bi { font-size: 18px; margin-top: -2px; }
.sf-login .right { flex: 1; padding: 2rem 2.5rem; overflow: auto; }
.sf-login .user-card { background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .65rem .8rem; display: flex; align-items: center; gap: .65rem; cursor: pointer; transition: box-shadow .12s, border-color .12s; height: 100%; }
.sf-login .user-card:hover { border-color: var(--sf-brand); box-shadow: var(--sf-shadow-lg); } .sf-login .user-card .n { font-weight: 600; font-size: 13px; } .sf-login .user-card .t { font-size: 11.5px; color: var(--sf-text-3); }
.sf-login .role-head { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--sf-text-3); margin: 1.25rem 0 .5rem; }
.sf-logo { display: flex; align-items: center; gap: .6rem; } .sf-logo .mark { width: 32px; height: 32px; border-radius: 6px; background: var(--sf-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; letter-spacing: -.5px; } .sf-logo .name { font-weight: 700; font-size: 15px; line-height: 1.1; } .sf-logo .sub { font-size: 10.5px; letter-spacing: .3px; text-transform: uppercase; }

/* ----- Enterprise-grade treatment for the two REAL sign-in screens (dealership + platform owner) ----- */
.sf-login.enterprise { background: #0c1320; }
.sf-login.enterprise .left { flex: 0 0 480px; position: relative; overflow: hidden; padding: 3.2rem 3rem; background: radial-gradient(1200px 600px at 15% -10%, rgba(255,255,255,.08), transparent 60%), linear-gradient(165deg, var(--sf-nav) 0%, var(--sf-brand) 60%, var(--sf-brand-hover) 100%); }
.sf-login.enterprise .left::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; opacity: .5; pointer-events: none; }
.sf-login.enterprise .left::after { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); top: -120px; right: -120px; pointer-events: none; }
.sf-login.enterprise .left > * { position: relative; z-index: 1; }
.sf-login.enterprise .eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 700; color: rgba(255,255,255,.65); margin-top: 2.6rem; }
.sf-login.enterprise .left h1 { font-size: 32px; line-height: 1.18; letter-spacing: -.02em; margin-top: .5rem; }
.sf-login.enterprise .left p.lede { color: rgba(255,255,255,.82); font-size: 14.5px; max-width: 360px; }
.sf-login.enterprise .trust-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.sf-login.enterprise .trust-chip { display: inline-flex; align-items: center; gap: .35rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 100px; padding: .3rem .65rem; font-size: 11px; color: rgba(255,255,255,.9); }
.sf-login.enterprise .left .feature { margin-top: 1.15rem; }
.sf-login.enterprise .left .feature .bi { background: rgba(255,255,255,.12); border-radius: 8px; width: 30px; height: 30px; min-width: 30px; display: flex; align-items: center; justify-content: center; font-size: 15px; margin-top: 0; }
.sf-login.enterprise .right { display: flex; align-items: center; justify-content: center; background: radial-gradient(900px 500px at 85% 10%, var(--sf-brand-light), transparent 55%), var(--sf-bg); }
.sf-login.enterprise .sf-login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 24px 48px -12px rgba(16,24,40,.18); padding: 2.2rem 2.1rem 1.8rem; animation: sfLoginIn .5s cubic-bezier(.16,1,.3,1); }
@keyframes sfLoginIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sf-login.enterprise .sf-login-card { animation: none; } }
.sf-login.enterprise .sf-login-card h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.sf-login.enterprise .sf-login-card .form-label { font-weight: 700; color: var(--sf-text-2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.sf-login.enterprise .sf-login-card .form-control { border-radius: 10px; border: 1.5px solid var(--sf-border); padding: .62rem .8rem; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.sf-login.enterprise .sf-login-card .form-control:focus { border-color: var(--sf-brand); box-shadow: 0 0 0 4px var(--sf-brand-light); }
.sf-login.enterprise .sf-login-card .btn-brand { border-radius: 10px; padding: .68rem 1rem; font-weight: 700; font-size: 14px; letter-spacing: .01em; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 20px -6px rgba(16,24,40,.3); transition: transform .12s ease, box-shadow .12s ease; }
.sf-login.enterprise .sf-login-card .btn-brand:hover:not(:disabled) { transform: translateY(-1px); }
.sf-login.enterprise .footnote { color: var(--sf-text-3); font-size: 11.5px; margin-top: 1.1rem; text-align: center; }
/* platform-owner variant: a deliberately distinct graphite + amber palette (never the tenant brand colour), so it reads instantly as the internal console, not a dealership */
.sf-login.owner-mode .left { background: radial-gradient(1200px 600px at 15% -10%, rgba(255,255,255,.06), transparent 60%), linear-gradient(165deg, #0b1220 0%, #141b2d 55%, #1b2742 100%); }
.sf-login.owner-mode .left::after { background: radial-gradient(circle, rgba(201,162,39,.22), transparent 70%); }
.sf-login.owner-mode .sf-logo .mark { background: linear-gradient(135deg, #c9a227, #8a6d1a); }
.sf-login.owner-mode .eyebrow { color: #e4c565; }
.sf-login.owner-mode .left .feature .bi { color: #e4c565; }
.sf-login.owner-mode .platform-pill { display: inline-flex; align-items: center; gap: .35rem; background: #fdf6e3; color: #8a6d1a; border: 1px solid #efd98a; border-radius: 100px; padding: .3rem .7rem; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; margin-bottom: .9rem; }
.sf-login.owner-mode .right { background: radial-gradient(900px 500px at 85% 10%, #faf6ea, transparent 55%), var(--sf-bg); }
.sf-login.owner-mode .sf-login-card .form-control:focus { border-color: #c9a227; box-shadow: 0 0 0 4px rgba(201,162,39,.16); }
.sf-login.owner-mode .sf-login-card .btn-brand { background: linear-gradient(135deg, #c9a227, #a9811f); border-color: #a9811f; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 20px -6px rgba(201,162,39,.4); }
.sf-login.owner-mode .sf-login-card .btn-brand:hover:not(:disabled) { background: linear-gradient(135deg, #d4ad33, #b58c22); }
@media (max-width: 991.98px) { .sf-login.enterprise .left { display: none; } }

/* ===== Left sidebar navigation ===== */
body.has-sidebar { --sb-current: var(--sb-w); } body.has-sidebar.sb-collapsed { --sb-current: var(--sb-w-collapsed); }
.sb { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sb-current, var(--sb-w)); background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-end) 100%); color: var(--sb-text); display: flex; flex-direction: column; z-index: 1040; transition: width .2s ease, transform .2s ease; overflow: hidden; box-shadow: 2px 0 8px rgba(0,0,0,.12); }
.sb .lbl { white-space: nowrap; overflow: hidden; transition: opacity .15s ease; }
.sb-brand { height: 52px; display: flex; align-items: center; padding: 0 .6rem 0 .85rem; border-bottom: 1px solid rgba(255,255,255,.1); flex: 0 0 auto; gap: .5rem; }
.sb-brand .mark { width: 34px; height: 34px; border-radius: 8px; background: #fff; color: var(--sf-brand); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 auto; }
.sb-brand .lbl { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; } .sb-brand .name { color: #fff; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; } .sb-brand .sub { color: var(--sb-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; overflow: hidden; text-overflow: ellipsis; }
.sb-brand > a { min-width: 0; flex: 0 1 auto; }
.sb-toggle { margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,.18); color: var(--sb-text); width: 28px; height: 28px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: 0 0 auto; } .sb-toggle:hover { background: rgba(255,255,255,.12); color: #fff; } .sb-collapsed .sb-toggle .bi { transform: rotate(180deg); }
.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .5rem .5rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.sb-group { margin-bottom: .35rem; } .sb-group-title { display: flex; align-items: center; justify-content: space-between; padding: .55rem .6rem .25rem; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--sb-muted); cursor: pointer; user-select: none; white-space: nowrap; }
.sb-group-title .bi { font-size: 10px; transition: transform .15s; } .sb-group.closed .sb-group-title .bi { transform: rotate(-90deg); }
.sb-group-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .18s ease; overflow: hidden; } .sb-group.closed .sb-group-items { grid-template-rows: 0fr; } .sb-group-inner { min-height: 0; overflow: hidden; } .sb-group.closed .sb-group-inner { visibility: hidden; transition: visibility 0s .18s; }
.sb-item { display: flex; align-items: center; gap: .65rem; padding: .46rem .65rem; border-radius: 7px; color: var(--sb-text); text-decoration: none; font-size: 13px; font-weight: 500; position: relative; margin: 1px 0; width: 100%; background: transparent; border: none; text-align: left; }
.sb-item .bi { font-size: 16px; width: 20px; text-align: center; flex: 0 0 auto; opacity: .9; } .sb-item:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; } .sb-item.active { background: rgba(255,255,255,.16); color: #fff; }
.sb-item.active::before { content: ''; position: absolute; left: -.5rem; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sb-accent); }
.sb-badge { margin-left: auto; background: #e9b44c; color: #1b2430; font-size: 10.5px; font-weight: 700; border-radius: 9px; padding: 0 6px; line-height: 17px; min-width: 18px; text-align: center; }
.sb-foot { flex: 0 0 auto; border-top: 1px solid rgba(255,255,255,.1); padding: .5rem; } .sb-assist { color: #eef4fb; } .sb-assist .bi { color: var(--sb-accent); }
.sb-user { display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem; border-radius: 7px; color: var(--sb-text); text-decoration: none; } .sb-user:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.sb-user .lbl { display: flex; flex-direction: column; line-height: 1.2; flex: 1; } .sb-user .n { color: #fff; font-weight: 600; font-size: 13px; } .sb-user .t { color: var(--sb-muted); font-size: 11px; } .sb-user .bi-chevron-up { flex: 0 0 auto; font-size: 11px; color: var(--sb-muted); }
.sb-collapsed .sb .lbl, .sb-collapsed .sb-badge, .sb-collapsed .sb-group-title span, .sb-collapsed .sb-group-title .bi { display: none; }
.sb-collapsed .sb-group-title { padding: .4rem 0 .2rem; height: 10px; border-top: 1px solid rgba(255,255,255,.1); margin: .3rem .3rem 0; } .sb-collapsed .sb-group:first-child .sb-group-title { border-top: none; } .sb-collapsed .sb-group.closed .sb-group-items { grid-template-rows: 1fr; } .sb-collapsed .sb-group.closed .sb-group-inner { visibility: visible; }
.sb-collapsed .sb-item { justify-content: center; padding: .55rem 0; } .sb-collapsed .sb-item .bi { width: auto; font-size: 18px; }
.sb-collapsed .sb-brand { padding: .55rem 0 .45rem; height: auto; flex-direction: column; gap: .45rem; justify-content: center; } .sb-collapsed .sb-brand .mark { margin: 0 auto; } .sb-collapsed .sb-brand .sb-toggle { margin: 0; width: 40px; height: 26px; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); }
.sb-foot .dropdown-menu { max-height: min(70vh, 520px); overflow-y: auto; }
.sb-collapsed .sb-foot { padding: .5rem .3rem; } .sb-collapsed .sb-user { justify-content: center; padding: .4rem 0; } .sb-collapsed .sb-item .sb-badge { display: block; position: absolute; top: 4px; right: 8px; min-width: 14px; line-height: 14px; font-size: 9px; padding: 0 3px; }
.sb-edge { position: fixed; top: 64px; left: calc(var(--sb-current, var(--sb-w)) - 13px); width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--sf-border-strong); background: #fff; color: var(--sf-brand); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; z-index: 1045; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: left .2s ease, transform .12s; padding: 0; }
.sb-edge:hover { transform: scale(1.12); background: var(--sf-brand-light); } .sb-collapsed .sb-edge .bi { transform: rotate(180deg); } .sb-edge .bi { transition: transform .2s; }
.sb-tip { position: fixed; transform: translateY(-50%); background: #1b2430; color: #fff; font-size: 12px; font-weight: 500; padding: .3rem .6rem; border-radius: 5px; white-space: nowrap; pointer-events: none; z-index: 1070; box-shadow: 0 4px 12px rgba(0,0,0,.2); } .sb-tip::before { content: ''; position: absolute; left: -5px; top: 50%; transform: translateY(-50%); border: 5px solid transparent; border-left: 0; border-right-color: #1b2430; } .sb-tip-badge { background: #e9b44c; color: #1b2430; border-radius: 8px; padding: 0 5px; font-size: 10.5px; font-weight: 700; margin-left: 4px; }
body.has-sidebar .sf-header { margin-left: var(--sb-current, var(--sb-w)); transition: margin-left .2s ease; } body.has-sidebar .staff-banner { margin-left: var(--sb-current, var(--sb-w)); }
body.has-sidebar .sf-page { margin-left: var(--sb-current, var(--sb-w)); transition: margin-left .2s ease; max-width: none; }
.sb-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1035; }
/* the drawer's own "x" (data-action="sb-close"): desktop has the collapse chevron (.sb-toggle) instead, the phone drawer has this close button instead */
.sb-close { display: none; margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,.18); color: var(--sb-text); width: 40px; height: 40px; border-radius: 8px; align-items: center; justify-content: center; font-size: 16px; flex: 0 0 auto; padding: 0; } .sb-close:hover { background: rgba(255,255,255,.12); color: #fff; }
/* sidebar foot: the person's name and Sign out only (the one account menu is the header avatar's) */
.sb-user-row { display: flex; align-items: center; gap: .25rem; } .sb-user-row .sb-user { flex: 1; min-width: 0; cursor: default; } .sb-user-row .sb-user:hover { background: transparent; color: var(--sb-text); }
.sb-signout { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 7px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--sb-text); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; padding: 0; } .sb-signout:hover { background: rgba(255,255,255,.12); color: #fff; }
@media (min-width: 992px) { .sb-collapsed .sb-user-row { flex-direction: column; gap: .3rem; } .sb-collapsed .sb-user-row .sb-user { flex: none; } }
@media (max-width: 991.98px) { body.has-sidebar { --sb-current: 0px; } .sb { width: var(--sb-w); transform: translateX(-100%); } body.sb-open .sb { transform: none; } body.sb-open .sb-backdrop { display: block; } body.has-sidebar.sb-collapsed .sb .lbl, body.has-sidebar.sb-collapsed .sb-badge, body.has-sidebar.sb-collapsed .sb-group-title span, body.has-sidebar.sb-collapsed .sb-group-title .bi { display: initial; } body.has-sidebar.sb-collapsed .sb-item { justify-content: flex-start; padding: .48rem .65rem; } body.has-sidebar.sb-collapsed .sb-brand { flex-direction: row; height: 52px; padding: 0 .6rem 0 .85rem; justify-content: flex-start; } .sb-edge { display: none; } .sb-brand .sb-toggle { display: none; } .sb-close { display: inline-flex; } .sb-signout { width: 40px; height: 40px; } .sb { bottom: var(--m-nav-h); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; } body.sb-open .sb { visibility: visible; transition-delay: 0s; } .sf-login .left { display: none; } .call-pane { grid-template-columns: 1fr; } .call-pane > .call-team { grid-column: auto; } }
@media (max-width: 1200px) { .sf-highlights .fields .f { min-width: 100px; } .sf-page { padding: .6rem .6rem 3rem; } .call-pane { grid-template-columns: 280px 1fr; } .call-pane > :last-child { grid-column: 1 / -1; } .call-pane > .call-team { grid-column: 1 / -1; } }
.sf-search-toggle, .sf-search-close { display: none; }
@media (max-width: 576px) {
  .sf-header { padding: 0 .5rem; gap: .3rem; } .sf-header-actions { gap: .2rem; } .sf-icon-btn { width: 36px; height: 36px; font-size: 15px; } .sf-header-actions .btn-brand.btn-sm { padding: 0 .5rem; min-width: 36px; }
  .sf-search { display: none; } .sf-search-toggle { display: inline-flex; }
  body.search-open .sf-search { display: flex; position: fixed; top: 52px; left: 0; right: 0; z-index: 1049; margin: 0; max-width: none; background: #fff; padding: .55rem 2.6rem .55rem .75rem; box-shadow: var(--sf-shadow-lg); border-bottom: 1px solid var(--sf-border); } body.search-open .sf-search input { height: 38px; }
  .sf-search-close { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--sf-text-3); font-size: 19px; padding: .25rem; line-height: 1; } body.search-open .sf-search-close { display: block; } .sf-search-results { top: 48px; max-height: calc(100vh - 100px); }
  .sf-page { padding: .5rem .5rem 4.5rem; } .sf-page-header { padding: .6rem .7rem; gap: .5rem; } .sf-page-header .actions { width: 100%; margin-left: 0; } .sf-page-header .title { font-size: 16px; } .sf-card-header .actions { width: 100%; }
  .sf-highlights .top { flex-wrap: wrap; } .sf-highlights .actions { margin-left: 0; width: 100%; justify-content: flex-start; margin-top: .6rem; } .sf-highlights .fields { gap: .6rem 1rem; } .sf-highlights .fields .f { min-width: 44%; flex: 1 1 44%; }
  .sf-path { padding: .5rem .6rem; } .sf-path .steps { min-width: 0; width: 100%; flex: 1 1 100%; overflow-x: auto; } .sf-path .step { flex: 0 0 auto; min-width: 88px; } .sf-path .path-actions { width: 100%; flex-wrap: wrap; margin-top: .5rem; }
  .sf-kpi { padding: .6rem .7rem; } .sf-kpi .v { font-size: 19px; } .sf-kanban { scroll-snap-type: x mandatory; gap: .5rem; } .sf-kanban .col { flex: 0 0 82vw; scroll-snap-align: start; }
  .btn-group { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; } .btn-group:has(.dropdown-menu) { overflow: visible; } /* a scroll container clips its absolutely positioned menu: a group that owns a menu does not scroll */
  @supports not selector(:has(*)) { .btn-group { overflow: visible; } } /* a browser without :has() cannot tell which group owns a menu: none scrolls (a menu that cannot open is worse than a row of buttons that is clipped) */
  .sf-toolbar { padding: .5rem .6rem; } .list-search { width: 100%; }
  .cal-month .cal-cell { min-height: 56px; } .cal-week { grid-template-columns: 1fr; } .cal-week .cal-col { min-height: 0; }
  .modal { padding: 0 !important; } .modal-dialog.modal-dialog-scrollable { position: fixed; left: 0; right: 0; bottom: 0; top: auto; margin: 0; width: 100%; max-width: 100%; max-height: 90dvh; } .modal-dialog-scrollable .modal-content { border-radius: 16px 16px 0 0; border: none; max-height: 90dvh; box-shadow: 0 -10px 34px rgba(0,0,0,.22); }
  .modal-footer { position: sticky; bottom: 0; background: #fff; padding: .7rem 1.1rem calc(.7rem + env(safe-area-inset-bottom, 0px)); } .modal-footer .btn { min-height: 44px; font-size: 14.5px; flex: 1; }
  .form-control, .form-select, .sf-search input { font-size: 16px; } .call-pane { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) { .sf-table { font-size: 12.5px; } .sf-table th, .sf-table td { padding: .42rem .5rem; } .sf-table th.rownum, .sf-table td.rownum { position: sticky; left: 0; z-index: 3; background: #fff; } .sf-table thead th.rownum { background: #fafaf9; } .sf-table th.rownum + th, .sf-table td.rownum + td { position: sticky; left: 34px; z-index: 2; background: #fff; box-shadow: 2px 0 4px rgba(0,0,0,.06); } .sf-table thead th.rownum + th { background: #fafaf9; } .modal-body { padding: .85rem; } .form-section { margin-left: -.85rem; margin-right: -.85rem; padding-left: .85rem; padding-right: .85rem; } }
@media print { .sf-header, .sb, .sb-edge, .ai-fab, .ai-panel, .tour-box, .staff-banner { display: none !important; } body.has-sidebar .sf-page { margin-left: 0; } }

/* ----- Workspace switcher (Sales / Service / All) ----- */
.sb-apps { display: flex; flex-wrap: wrap; gap: 4px; padding: .55rem .6rem .3rem; flex: 0 0 auto; }
.sb-app { flex: 1 1 calc(50% - 4px); display: inline-flex; align-items: center; justify-content: center; gap: .35rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: var(--sb-text); border-radius: 6px; padding: .32rem .2rem; font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1; min-width: 0; }
.sb-app .bi { font-size: 13px; } .sb-app:hover { background: rgba(255,255,255,.14); color: #fff; }
.sb-app.active { background: var(--sf-brand); border-color: var(--sf-brand); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sb-app-more { flex: 1 1 100%; padding: .32rem .45rem; font-weight: 500; color: var(--sb-muted, var(--sb-text)); } .sb-app .lbl { white-space: nowrap; } body.sb-collapsed .sb-app { flex: 0 0 auto; }
body.sb-collapsed .sb-apps { flex-direction: column; padding: .4rem .35rem; } body.sb-collapsed .sb-app { padding: .4rem 0; } body.sb-collapsed .sb-app .lbl { display: none; }
.app-note { display: flex; align-items: center; gap: .5rem; background: var(--sf-brand-light); color: var(--sf-text-2); border: 1px solid #c5d6ee; border-radius: var(--sf-radius); padding: .45rem .75rem; font-size: 12.5px; margin-bottom: .75rem; }
.app-note .bi { color: var(--sf-brand); }

/* ----- Chatter ----- */
.chat-post { background: #fff; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .75rem .9rem; margin-bottom: .6rem; } .chat-post.pinned { border-left: 4px solid var(--sf-warning); }
.chat-head { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; font-size: 13px; } .chat-body { font-size: 13.5px; line-height: 1.5; margin-top: .25rem; white-space: normal; word-break: break-word; }
.chat-body .mention, .chat-comment .mention, .cmsg-text .mention { color: var(--sf-brand); font-weight: 600; text-decoration: none; background: var(--sf-brand-light); border-radius: 4px; padding: 0 .25rem; }
.chat-body .group-mention, .chat-comment .group-mention, .cmsg-text .group-mention { color: #8a4b00; background: #fdeeda; font-weight: 600; border-radius: 4px; padding: 0 .3rem; display: inline-flex; align-items: center; gap: .2rem; }
.chat-body .group-mention i, .chat-comment .group-mention i, .cmsg-text .group-mention i { font-size: 11px; }
.chat-rec { display: inline-flex; align-items: center; gap: .3rem; background: #f3f3f2; border-radius: 1rem; padding: .1rem .55rem .1rem .2rem; text-decoration: none; color: var(--sf-text-2); } .chat-rec:hover { background: var(--sf-brand-light); }
.chat-attach { font-size: 12.5px; margin-top: .4rem; padding: .35rem .55rem; background: #fafaf9; border: 1px dashed var(--sf-border); border-radius: 6px; }
.chat-actions { display: flex; gap: .25rem; align-items: center; margin-top: .4rem; border-top: 1px solid #f0f0ee; padding-top: .3rem; } .chat-actions .btn-link { text-decoration: none; color: var(--sf-text-3); font-size: 12px; padding: .1rem .35rem; } .chat-actions .btn-link:hover, .chat-actions .btn-link.liked { color: var(--sf-brand); }
.chat-comments { margin-top: .4rem; border-left: 2px solid #ecebea; padding-left: .6rem; } .chat-comment { display: flex; gap: .5rem; font-size: 12.5px; padding: .3rem 0; }
.chat-comment-box { display: flex; gap: .4rem; margin-top: .4rem; } .chat-comment-box input { font-size: 13px; }
.chat-composer textarea { resize: vertical; font-size: 13.5px; } .chat-mentions { position: absolute; left: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--sf-border); border-radius: 6px; box-shadow: var(--sf-shadow-lg); min-width: 260px; max-height: 240px; overflow: auto; }
.chat-mention-item { display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem; cursor: pointer; font-size: 13px; } .chat-mention-item:hover { background: var(--sf-brand-light); }
.chat-feed .sf-empty { background: #fff; border: 1px dashed var(--sf-border); border-radius: var(--sf-radius); }
/* ----- Admin: org tree & permission matrix ----- */
.org-tree { overflow-x: auto; } .org-node { padding-left: calc(var(--depth) * 0px); } .org-children { margin-left: 22px; border-left: 2px solid #e5e5e3; padding-left: 10px; }
.org-row { display: flex; align-items: center; gap: .55rem; padding: .4rem .5rem; border-radius: 6px; } .org-row:hover { background: #f6f6f5; } .org-node.focus > .org-row { background: var(--sf-brand-light); outline: 1px solid #c5d6ee; }
.org-node.inactive > .org-row { opacity: .6; } .org-toggle { border: none; background: none; color: var(--sf-text-3); padding: 0; width: 18px; } .org-toggle.invisible { visibility: hidden; } .org-main { flex: 1; min-width: 0; font-size: 13px; } .org-actions { flex: 0 0 auto; }
.perm-matrix th.rot { height: 150px; white-space: nowrap; vertical-align: bottom; padding: 0 .25rem; } .perm-matrix th.rot > div { transform: translate(8px, 0) rotate(-62deg); transform-origin: left bottom; width: 24px; font-size: 11px; font-weight: 600; }
.perm-matrix td { text-align: center; } .perm-matrix td:first-child { text-align: left; } .perm-matrix .scope-row td { padding: .25rem; } .perm-matrix .scope-row select { min-width: 80px; font-size: 11px; }
/* ----- Mobile bottom navigation ----- */
.m-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; background: #fff; border-top: 1px solid var(--sf-border); box-shadow: 0 -4px 16px rgba(0,0,0,.08); padding-bottom: env(safe-area-inset-bottom, 0px); min-height: var(--m-nav-h); }
.m-nav a, .m-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: .45rem 0 .35rem; font-size: 10.5px; font-weight: 600; color: var(--sf-text-3); text-decoration: none; background: none; border: none; min-height: 54px; } .m-nav .bi { font-size: 19px; }
.m-nav a.active { color: var(--sf-brand); } .m-nav a.active .bi { transform: translateY(-1px); }
@media (max-width: 991.98px) { .m-nav { display: flex; } .sf-page { padding-bottom: calc(var(--m-nav-h) + var(--m-lift) + var(--m-float-h)) !important; } .ai-fab { bottom: calc(var(--m-nav-h) + var(--m-lift) + 12px); z-index: 1034; } .ai-panel { bottom: calc(var(--m-nav-h) + var(--m-lift) + 64px); height: min(560px, calc(100vh - 170px - var(--m-lift))); } .tour-box { bottom: 132px; } .sf-toasts { bottom: 76px; } }
/* ----- Mobile polish ----- */
@media (max-width: 767.98px) {
  .sf-page-header .actions { gap: .35rem; } .sf-page-header .actions .btn, .sf-highlights .actions .btn, .sf-home-head .actions .btn { min-height: 40px; } .btn-xs { min-height: 30px; }
  .net-strip { grid-template-columns: repeat(2, 1fr); } .sf-tabs { overflow-x: auto; white-space: nowrap; scrollbar-width: none; } .sf-tabs .tab { flex: 0 0 auto; }
  .wiz-steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .25rem; } .wiz-step { flex: 0 0 auto; }
  .bay-board { grid-template-columns: repeat(2, 1fr); } .dropdown-menu { max-width: 92vw; } #bell-menu { width: 92vw !important; } .sf-login .right { padding: 1.2rem; }
  .perm-matrix th.rot { height: 120px; } .chat-head .ms-auto { width: 100%; margin-left: 0 !important; } .org-children { margin-left: 10px; padding-left: 6px; }
  .sf-card-header { flex-wrap: wrap; } .sf-card-header .actions { width: 100%; margin-left: 0; margin-top: .25rem; }
  /* the path bar is a scrolling strip of 88px stages up to 767.98px, as on a phone (the 576px block above): a phone held sideways or a small tablet squeezed a 12-stage
     job card into stages narrower than a finger (the scroll cue of the strip is the sx-edge rule below) */
  .sf-path .steps { min-width: 0; width: 100%; flex: 1 1 100%; overflow-x: auto; } .sf-path .step { flex: 0 0 auto; min-width: 88px; } .sf-path .path-actions { width: 100%; flex-wrap: wrap; margin-top: .5rem; }
}
@media (max-width: 575.98px) {
  .sf-table.sf-cards thead { display: none; } .sf-table.sf-cards tbody tr { display: block; background: #fff; border: 1px solid var(--sf-border); border-radius: 8px; margin: .5rem .5rem; padding: .35rem 0; }
  .sf-table.sf-cards tbody td { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; border: none; padding: .28rem .7rem; text-align: right; white-space: normal; position: static !important; box-shadow: none !important; }
  .sf-table.sf-cards tbody td::before { content: attr(data-label); color: var(--sf-text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; text-align: left; flex: 0 0 38%; padding-top: 2px; }
  /* the first cell with no label is the row number / select box and is hidden; the message of an empty list (colspan) is also a first cell with no label, and used to lose to this
     rule (specificity 0,4,2 against 0,3,2): a new dealership's empty list showed an empty bar. It is shown, and centred in the card. */
  .sf-table.sf-cards tbody td.rownum, .sf-table.sf-cards tbody td:has(.row-select) { display: none; } .sf-table.sf-cards tbody td:first-of-type:not([data-label]):not([colspan]) { display: none; }
  .sf-table.sf-cards tbody td[colspan] { display: block; text-align: center; max-width: none; } .sf-table.sf-cards tbody td[colspan]::before { display: none; }
  .sf-table.sf-cards tbody td.num { font-variant-numeric: tabular-nums; } .sf-table.sf-cards tbody td:not([data-label]) { justify-content: flex-end; } .sf-table.sf-cards tbody td:not([data-label])::before { content: ''; flex: 0; }
  .bay-board { grid-template-columns: 1fr; } .sf-highlights .fields .f { min-width: 100%; flex-basis: 100%; }
}
.lang-hi body, body.lang-hi { font-family: "Noto Sans Devanagari", "Mangal", "Nirmala UI", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; } body.lang-hi .sf-badge { letter-spacing: 0; }

/* ----- My Day / field / AI calling / billing ----- */
.plan-item { display: flex; align-items: center; gap: .6rem; padding: .45rem .25rem; border-bottom: 1px solid #f0f0ee; } .plan-item.done .plan-main { text-decoration: line-through; color: var(--sf-text-3); }
.plan-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12px; color: var(--sf-text-2); min-width: 44px; } .plan-icon { color: var(--sf-brand); width: 18px; text-align: center; } .plan-main { flex: 1; min-width: 0; font-size: 13px; } .plan-actions { display: flex; gap: .25rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; } .photo-grid.lg { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.photo { margin: 0; } .photo img { width: 100%; border-radius: 6px; border: 1px solid var(--sf-border); display: block; } .photo figcaption { font-size: 10.5px; color: var(--sf-text-3); margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; vertical-align: middle; }
.ai-transcript { background: #f6f6f5; border: 1px solid var(--sf-border); border-radius: 8px; padding: .75rem; max-height: 420px; overflow: auto; }
.ai-line { margin-bottom: .55rem; max-width: 88%; } .ai-line .who { font-size: 10.5px; color: var(--sf-text-3); margin-bottom: .1rem; } .ai-line .txt { background: #fff; border: 1px solid var(--sf-border); border-radius: .6rem; padding: .45rem .65rem; font-size: 13.5px; line-height: 1.5; } .ai-line .gloss { font-size: 11px; color: var(--sf-text-3); margin: .15rem .4rem 0; font-style: italic; }
.ai-line.agent .txt { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); } .ai-line.cust { margin-left: auto; } .ai-line.cust .who { text-align: right; } .ai-line.sys .txt { background: #fff8e6; border-color: #f2d49b; font-size: 12px; }
.live-pill { display: inline-flex; align-items: center; gap: .3rem; background: #ba0517; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; border-radius: 1rem; padding: .12rem .55rem; vertical-align: middle; } .live-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: livepulse 1.2s infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.ai-strip { border-left: 4px solid #7a5af5; } .ai-nba { display: flex; gap: .5rem; align-items: flex-start; background: #faf9ff; border: 1px solid #e6e1fb; border-radius: 6px; padding: .45rem .6rem; height: 100%; font-size: 12.5px; } .ai-nba > .bi { color: #7a5af5; font-size: 16px; margin-top: .1rem; }
.min-w-0 { min-width: 0; } .truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) { .plan-time { min-width: 40px; } .photo-grid { grid-template-columns: repeat(2, 1fr); } .ai-line { max-width: 100%; } }

/* ===================== enterprise scope (v2.0) ===================== */
.x-tabs { overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; }
.x-tabs .tab { text-decoration: none; color: inherit; display: inline-block; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); vertical-align: -1px; margin-right: 2px; }
.swatch.lg { width: 18px; height: 18px; }
.pos-rel { position: relative; } .pres { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #9c9a98; border: 2px solid #fff; vertical-align: 1px; } .pres.pres-online { background: #2e844a; } .pres.pres-away { background: #c97d12; } .pres.abs { position: absolute; right: -1px; bottom: -1px; }
/* announcements */
.ann { display: flex; gap: .7rem; padding: .7rem .9rem; border-bottom: 1px solid var(--sf-border); background: #fff; }
.ann.unread { background: #fbf8f0; } .ann.urgent { border-left: 4px solid #ba0517; } .ann:last-child { border-bottom: 0; }
.ann-ic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.ann-body { min-width: 0; flex: 1; } .ann-head { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; } .ann-text { font-size: 13px; margin: .2rem 0; white-space: pre-line; } .ann-actions { margin-top: .35rem; display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; }
/* chat */
.chat-app { display: grid; grid-template-columns: 320px 1fr; gap: 0; background: #fff; border: 1px solid var(--sf-border); border-radius: 8px; overflow: hidden; height: calc(100vh - 110px); min-height: 520px; }
.clist { border-right: 1px solid var(--sf-border); display: flex; flex-direction: column; min-width: 0; }
.clist-head { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border-bottom: 1px solid var(--sf-border); }
.clist-search { position: relative; padding: .5rem .8rem; } .clist-search .bi-search { position: absolute; left: 1.4rem; top: 50%; transform: translateY(-50%); color: var(--sf-text-3); font-size: 12px; } .clist-search input { padding-left: 1.9rem; }
.clist-items { overflow: auto; flex: 1; }
.citem { display: flex; gap: .6rem; align-items: center; padding: .55rem .8rem; border-bottom: 1px solid #f0efed; color: inherit; text-decoration: none; }
.citem:hover { background: #f6f7f9; } .citem.active { background: var(--sf-brand-light); } .citem.unread .fw-600 { color: var(--sf-brand); }
.clist-foot { padding: .4rem .8rem; border-top: 1px solid var(--sf-border); }
.cthread { display: flex; flex-direction: column; min-width: 0; background: #f7f8fa; }
.cthread-head { display: flex; gap: .6rem; align-items: center; padding: .6rem .9rem; background: #fff; border-bottom: 1px solid var(--sf-border); }
.cthread-msgs { flex: 1; overflow: auto; padding: .8rem 1rem; }
.cthread-empty { margin: auto; text-align: center; padding: 2rem; }
.cday { text-align: center; font-size: 11px; color: var(--sf-text-3); margin: .8rem 0 .4rem; position: relative; } .cday::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--sf-border); z-index: 0; } .cday { } .cday::after { content: attr(data-x); }
.cday { background: transparent; } .cday > * { position: relative; }
.cmsg { display: flex; gap: .5rem; margin-bottom: .55rem; max-width: 78%; } .cmsg.mine { margin-left: auto; flex-direction: row-reverse; } .cmsg.sys { max-width: 100%; justify-content: center; }
.cmsg-body { background: #fff; border: 1px solid var(--sf-border); border-radius: 10px; padding: .45rem .7rem; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.cmsg.mine .cmsg-body { background: #e4edf9; border-color: #cddcf1; } .cmsg.sys .cmsg-body { background: transparent; border: 0; box-shadow: none; color: var(--sf-text-3); font-size: 12px; text-align: center; }
.cmsg-head { font-size: 12px; margin-bottom: .1rem; } .cmsg-text { font-size: 13.5px; word-wrap: break-word; }
.cmsg-foot { display: flex; gap: .25rem; align-items: center; margin-top: .25rem; flex-wrap: wrap; }
.react { border: 1px solid var(--sf-border); background: #fff; border-radius: 12px; font-size: 11px; padding: 0 .4rem; line-height: 18px; cursor: pointer; } .react.on { background: var(--sf-brand-light); border-color: var(--sf-brand); } .react-add { display: none; gap: .15rem; } .cmsg:hover .react-add { display: inline-flex; }
.ccompose { background: #fff; border-top: 1px solid var(--sf-border); padding: .6rem .9rem; position: relative; } .ccompose textarea { resize: none; min-height: 38px; max-height: 140px; }
.ccompose .chat-mentions { position: absolute; bottom: calc(100% - 4px); left: 1rem; right: 1rem; }
.chat-ref { display: inline-flex; align-items: center; gap: .25rem; background: #f1f3f6; border: 1px solid var(--sf-border); border-radius: 4px; padding: 0 .35rem; font-weight: 600; text-decoration: none; color: var(--sf-brand); font-size: 12.5px; } .chat-ref .sf-icon.sm { width: 16px; height: 16px; font-size: 9px; }
@media (max-width: 991.98px) { .chat-app { grid-template-columns: 1fr; height: calc(100vh - 150px); } .chat-app.has-thread .clist { display: none; } .chat-app:not(.has-thread) .cthread { display: none; } .cmsg { max-width: 92%; } }
/* lead inbox / grids */
.avail-grid td.avail-yes { background: #eaf6ee; } .avail-grid td.avail-soon { background: #fdf6e7; } .avail-grid td.avail-no { color: var(--sf-text-3); }
.breakup table { margin-bottom: 0; }
/* add-ons & discount builder */
.addons { display: grid; grid-template-columns: 1fr; gap: .3rem; max-height: 340px; overflow: auto; }
.addon { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--sf-border); border-radius: 6px; padding: .35rem .55rem; cursor: pointer; font-size: 13px; margin: 0; } .addon.on { background: var(--sf-brand-light); border-color: var(--sf-brand); } .addon .t { flex: 1; min-width: 0; } .addon .p { font-weight: 600; }
/* households / kyc */
.hh-member { display: flex; gap: .5rem; align-items: center; border: 1px solid var(--sf-border); border-radius: 6px; padding: .4rem .55rem; background: #fff; } .hh-member.me { border-color: var(--sf-brand); background: var(--sf-brand-light); }
/* catalogue */
.cat-hero { position: relative; color: #fff; padding: 1rem; min-height: 112px; border-radius: 8px 8px 0 0; overflow: hidden; } .cat-hero-ic { position: absolute; right: 12px; bottom: -6px; font-size: 64px; opacity: .25; }
.cat-tile { display: flex; gap: .5rem; align-items: center; border: 1px solid var(--sf-border); border-radius: 6px; padding: .4rem .6rem; min-width: 240px; max-width: 320px; background: #fff; } .cat-tile .bi:first-child { font-size: 20px; color: var(--sf-brand); }
.compare td, .compare th { min-width: 150px; } .compare td:first-child { min-width: 160px; }
/* demo fleet */
.demo-card .sf-progress { height: 8px; }
/* pickup & drop */
.pd-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: .6rem; overflow-x: auto; padding-bottom: .5rem; }
.pd-col { background: #f4f5f7; border-radius: 8px; padding: .5rem; min-height: 200px; } .pd-col-head { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--sf-text-2); margin-bottom: .4rem; display: flex; justify-content: space-between; }
.trip { background: #fff; border: 1px solid var(--sf-border); border-radius: 6px; padding: .5rem .6rem; margin-bottom: .5rem; font-size: 13px; } .trip.live { border-color: #c0603a; box-shadow: 0 0 0 2px rgba(192,96,58,.12); }
/* slots & public booking */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .4rem; }
.slot { border: 1px solid var(--sf-border); background: #fff; border-radius: 6px; padding: .35rem .2rem; font-size: 12.5px; font-weight: 600; display: flex; flex-direction: column; align-items: center; cursor: pointer; } .slot .small-2 { font-weight: 400; color: var(--sf-success); } .slot.full { background: #f6f6f5; color: var(--sf-text-3); cursor: not-allowed; } .slot.full .small-2 { color: var(--sf-danger); } .slot.past { opacity: .5; cursor: not-allowed; } .slot.picked { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); } .slot.picked .small-2 { color: #fff; } .slot-grid.compact .slot { cursor: default; padding: .25rem .1rem; font-size: 11.5px; }
.public-page { padding: 1rem; max-width: 1100px; margin: 0 auto; } .public-wrap .public-head { background: #fff; border: 1px solid var(--sf-border); border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1rem; }
.owner-console-page { background: var(--sf-bg, #f6f6f5); min-height: 100vh; }
.owner-topbar { display: flex; align-items: center; gap: 1rem; background: #fff; border-bottom: 1px solid var(--sf-border); padding: .6rem 1.2rem; position: sticky; top: 0; z-index: 5; }
.owner-topbar-brand { font-weight: 700; color: var(--sf-brand); } .owner-topbar-brand .bi { margin-right: .3rem; }
.owner-topbar-crumb { flex: 1; color: var(--sf-text-2); font-size: 13px; } .owner-topbar-crumb a { color: var(--sf-text-2); }
.owner-topbar-user { display: flex; align-items: center; gap: .6rem; font-size: 13px; color: var(--sf-text-2); }
.owner-body { max-width: 1100px; margin: 0 auto; padding: 1.2rem 1rem 2rem; }
.owner-row { cursor: pointer; } .owner-row:hover { background: #fafaf9; }
.owner-topbar-nav { display: flex; gap: .2rem; }
.owner-topbar-nav a { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 8px; color: var(--sf-text-2); font-size: 12.5px; font-weight: 600; }
.owner-topbar-nav a:hover { background: #f3f3f2; text-decoration: none; } .owner-topbar-nav a.active { background: var(--sf-brand-light); color: var(--sf-brand); }
.owner-org-logo { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; display: inline-flex; }
.owner-org-logo-fallback { align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; }
.owner-org-logo-lg { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; }
.owner-logo-upload { width: 64px; height: 64px; border-radius: 10px; border: 1px dashed var(--sf-border-strong); display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fafaf9; font-size: 22px; }
.owner-logo-upload img { width: 100%; height: 100%; object-fit: cover; }
.owner-perm-details summary { cursor: pointer; list-style: none; width: max-content; } .owner-perm-details summary::-webkit-details-marker { display: none; }
/* bulletins & DVHC */
.bulletin.critical { border-left: 4px solid #ba0517; }
.dvhc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .4rem; }
.dvhc-item { display: flex; gap: .45rem; align-items: center; border: 1px solid var(--sf-border); border-radius: 6px; padding: .35rem .5rem; } .dvhc-item .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; } .dvhc-item.green .dot { background: #2e844a; } .dvhc-item.amber .dot { background: #c97d12; } .dvhc-item.red .dot { background: #ba0517; } .dvhc-item.red { background: #fdf1f1; } .dvhc-item.amber { background: #fdf7ea; }
.dot-lg { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; } .dot-lg.red { background: #ba0517; } .dot-lg.amber { background: #c97d12; } .dot-lg.green { background: #2e844a; }
/* expenses / payments */
.exp-row { display: flex; gap: .6rem; align-items: center; padding: .55rem .9rem; border-bottom: 1px solid var(--sf-border); } .exp-row:last-child { border-bottom: 0; } .exp-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--sf-brand-light); color: var(--sf-brand); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.paylink-preview { border: 1px solid var(--sf-border); border-radius: 12px; padding: 1rem; text-align: center; max-width: 360px; margin: 0 auto; background: #fff; } .pl-brand { font-weight: 700; color: var(--sf-brand); } .pl-amt { font-size: 30px; font-weight: 800; margin: .2rem 0; } .pl-qr { margin: .6rem auto; } .pl-qr .qr { width: 120px; height: 120px; margin: 0 auto .3rem; background: repeating-linear-gradient(90deg, #1b2430 0 6px, #fff 6px 12px), repeating-linear-gradient(0deg, #1b2430 0 6px, #fff 6px 12px); background-blend-mode: difference; border: 6px solid #fff; outline: 1px solid var(--sf-border); }
/* training */
.video { background: #1b2430; color: #fff; border-radius: 8px; min-height: 220px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; overflow: hidden; } .video-inner { text-align: center; } .video .bi { font-size: 56px; opacity: .9; } .video-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255,255,255,.2); } .video-bar span { display: block; height: 100%; background: #c97d12; transition: width .4s; }
/* delivery / signature */
.dl-step { display: flex; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid #f0efed; } .dl-step .bi:first-child { font-size: 18px; color: var(--sf-text-3); } .dl-step.ok .bi:first-child { color: var(--sf-success); }
.sig-pad { border: 1px dashed var(--sf-border-strong); border-radius: 8px; background: #fff; touch-action: none; display: block; } .sig-box { border: 1px solid var(--sf-border); border-radius: 6px; background: #fff; padding: .3rem; } .sig-box img { max-height: 120px; }
/* used cars */
.uc-board .col { min-width: 250px; } .uc-stages { display: flex; flex-direction: column; gap: .3rem; } .uc-stage { font-size: 13px; color: var(--sf-text-3); } .uc-stage.done { color: var(--sf-success); } .uc-stage.current { color: var(--sf-brand); font-weight: 700; }
/* festive */
.fest-head { display: flex; gap: .6rem; padding: .9rem 1rem; color: #fff; background: linear-gradient(135deg, #c97d12, #8a3b1e); border-radius: 8px 8px 0 0; }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .35rem; } .cap-day { border: 1px solid var(--sf-border); border-radius: 6px; padding: .3rem .2rem; text-align: center; font-size: 12px; background: #fff; } .cap-day.risk { background: #fdf1f1; border-color: #ba0517; } .cap-day.muhurat { box-shadow: inset 0 0 0 2px #c97d12; }
/* MIS */
.mis-mail { background: #f3f3f2; padding: 1rem; border-radius: 6px; overflow: auto; } .mis-mail table { background: #fff; }
/* DMS */
.dms-drop { border: 2px dashed var(--sf-border-strong); border-radius: 10px; padding: 1.2rem; text-align: center; background: #fafaf9; display: flex; flex-direction: column; gap: .3rem; align-items: center; } .dms-drop.over { border-color: var(--sf-brand); background: var(--sf-brand-light); }
/* quotes */
.quotes tr.recommended td { background: #eaf6ee; }
/* mobile */
@media (max-width: 575.98px) { .pd-board { grid-auto-columns: 85vw; } .addons { max-height: none; } .cat-tile { min-width: 100%; } .slot-grid { grid-template-columns: repeat(3, 1fr); } .paylink-preview { max-width: 100%; } .x-tabs .tab { padding: .5rem .6rem; } }
/* zoomable map canvas */
.gmap { position: relative; border: 1px solid var(--sf-border); border-radius: 8px; background: #f7f8f6; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.gmap svg { width: 100%; height: 100%; display: block; cursor: grab; } .gmap svg:active { cursor: grabbing; }
.gmap.gm-full { position: fixed; inset: 8px; z-index: 1060; height: auto !important; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.gm-tools { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; }
.gm-tools button { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--sf-border-strong); background: #fff; color: var(--sf-text-2); font-size: 15px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(0,0,0,.08); } .gm-tools button:hover { background: var(--sf-brand-light); } .gm-tools button.active { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); }
.gm-legend { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.92); border: 1px solid var(--sf-border); border-radius: 6px; padding: .3rem .55rem; font-size: 11px; display: flex; gap: .7rem; flex-wrap: wrap; } .gm-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; } .gm-legend i.circle { border-radius: 50%; } .gm-legend i.square { border-radius: 2px; }
.gm-info { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.9); border-radius: 6px; padding: .2rem .5rem; color: var(--sf-text-3); }
.gm-hint { position: absolute; right: 54px; bottom: 10px; color: var(--sf-text-3); background: rgba(255,255,255,.8); padding: .15rem .45rem; border-radius: 6px; }
.gm-tip { position: absolute; z-index: 5; background: #1b2430; color: #fff; font-size: 12px; padding: .3rem .5rem; border-radius: 5px; max-width: 220px; pointer-events: none; }
.gm-pt:hover circle, .gm-pt:hover rect:not(.gm-lbl rect) { filter: brightness(1.1); }
@media (max-width: 575.98px) { .gm-hint { display: none; } .gm-legend { font-size: 10px; gap: .4rem; } }

@media (max-width: 575.98px) { .app-note { display: block; line-height: 1.5; } .app-note .bi { margin-right: .3rem; } }
.gm-info { max-width: calc(100% - 64px); }
@media (max-width: 575.98px) { .gm-info { font-size: 10px; max-width: calc(100% - 60px); } .gm-tools button { width: 30px; height: 30px; font-size: 13px; } }

/* announcements: language chip, collapsible widget, popup */
.ann-lang { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: #1f5aa6; background: var(--sf-brand-light); border-radius: 10px; padding: 1px 7px; vertical-align: middle; } .ann-lang.muted { color: var(--sf-text-3); background: #f0f1f0; font-weight: 500; }
.ann-widget.collapsed .sf-card-body { display: none; } .ann-widget .sf-card-header .actions { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.ann-popup .ann { border-bottom: 1px solid var(--sf-border); } .ann-popup .ann:last-child { border-bottom: 0; } .ann-popup-modal .modal-body { padding: 0; } .ann-popup-modal .modal-footer { flex-wrap: wrap; }
@media (max-width: 575.98px) { .ann-lang { font-size: 10px; } }
/* ---- CTI softphone dock ---- */
.cti-dock { position: fixed; right: 16px; bottom: 16px; z-index: 1490; font-size: 13px; }
.cti-dock .cti-pill { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--sf-border-strong); background: #1b2430; color: #fff; border-radius: 22px; padding: .5rem .9rem; box-shadow: 0 6px 20px rgba(0,0,0,.22); font-weight: 600; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cti-dock.ringing .cti-pill { animation: cti-shake .6s infinite; background: #2e844a; }
.cti-dock.open { width: 380px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--sf-border-strong); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.28); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.cti-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .7rem; background: #1b2430; color: #fff; } .cti-head .sim-pill { background: rgba(255,255,255,.15); color: #ffe7b3; border-color: transparent; } .cti-head-actions { display: flex; gap: .35rem; align-items: center; } .cti-head .cti-status { width: auto; font-size: 12px; padding: .15rem 1.6rem .15rem .5rem; } .cti-head .btn-sf { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.cti-tabs { display: flex; border-bottom: 1px solid var(--sf-border); background: #f7f8f6; } .cti-tabs button { flex: 1; border: 0; background: transparent; padding: .45rem .3rem; font-size: 12px; color: var(--sf-text-2); border-bottom: 2px solid transparent; } .cti-tabs button.active { color: var(--sf-brand); border-bottom-color: var(--sf-brand); font-weight: 600; } .cti-tabs button:disabled { opacity: .45; }
.cti-body { padding: .7rem; overflow: auto; }
.cti-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-bottom: .6rem; } .cti-stats.wide { grid-template-columns: repeat(6, 1fr); } .cti-stats div { background: #f7f8f6; border-radius: 8px; padding: .35rem .4rem; text-align: center; } .cti-stats strong { display: block; font-size: 16px; } .cti-stats span { font-size: 10.5px; color: var(--sf-text-3); text-transform: uppercase; letter-spacing: .02em; }
.cti-dialbox { display: flex; gap: .4rem; margin-bottom: .5rem; } .cti-dialbox input { font-size: 15px; letter-spacing: .04em; }
.cti-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin-bottom: .6rem; } .cti-keypad button { border: 1px solid var(--sf-border); background: #fff; border-radius: 8px; padding: .45rem 0; font-size: 16px; font-weight: 600; color: var(--sf-text-1); } .cti-keypad button:hover { background: var(--sf-brand-light); } .cti-keypad.small button { padding: .25rem 0; font-size: 13px; } .cti-dtmf { grid-column: 1 / -1; text-align: center; min-height: 20px; color: var(--sf-text-2); letter-spacing: .15em; }
.cti-next { border: 1px dashed var(--sf-border-strong); border-radius: 8px; padding: .5rem .6rem; margin-bottom: .5rem; background: #fbfbfa; }
.cti-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; } .cti-actions .btn.active { background: var(--sf-brand); color: #fff; }
.cti-foot { margin-top: .5rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.cti-last { background: #eef7f0; border-radius: 6px; padding: .3rem .5rem; margin-bottom: .5rem; }
.cti-caller { display: flex; align-items: center; gap: .6rem; padding: .5rem; border: 1px solid var(--sf-border); border-radius: 10px; background: #fff; } .cti-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sf-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.cti-context { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; } .cti-context li { font-size: 12px; color: var(--sf-text-2); display: flex; gap: .4rem; align-items: flex-start; } .cti-context li i { color: var(--sf-brand); margin-top: 1px; } .cti-context li.warn, .cti-context li.warn i { color: #b42318; }
.cti-ring { text-align: center; } .cti-ring-label { font-weight: 700; color: #2e844a; margin-bottom: .5rem; display: flex; align-items: center; justify-content: center; gap: .4rem; } .cti-ring .cti-caller { text-align: left; } .cti-answer { display: flex; gap: .6rem; justify-content: center; margin: .8rem 0 .4rem; } .cti-answer .btn { min-width: 130px; }
.cti-pulse { width: 10px; height: 10px; border-radius: 50%; background: #2e844a; display: inline-block; animation: cti-pulse 1s infinite; }
.cti-timer-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; } .cti-timer { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; } .cti-phase { font-weight: 600; color: var(--sf-text-2); display: flex; align-items: center; gap: .4rem; } .cti-live.hold .cti-timer { color: #c97d12; }
.cti-controls { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; margin: .6rem 0 .4rem; } .cti-controls button { border: 1px solid var(--sf-border); background: #fff; border-radius: 8px; padding: .4rem 0; font-size: 11px; color: var(--sf-text-2); display: flex; flex-direction: column; align-items: center; gap: 2px; } .cti-controls button i { font-size: 16px; } .cti-controls button.active { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); } .cti-controls button.end { background: #b42318; color: #fff; border-color: #b42318; } .cti-controls button:disabled { opacity: .45; }
.cti-sim { margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; } .cti-quick { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.cti-disp { display: flex; flex-wrap: wrap; gap: .3rem; } .cti-disp label.active { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); }
.cti-list { list-style: none; margin: 0; padding: 0; } .cti-list li { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--sf-border); } .cti-list li.done { opacity: .6; } .cti-hist-ic { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #eef2f8; color: var(--sf-brand); flex-shrink: 0; } .cti-hist-ic.in { background: #eef7f0; color: #2e844a; } .cti-hist-ic.missed { background: #fdeceb; color: #b42318; }
.cti-status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; } .cti-status-chip { color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 8px; margin-left: .4rem; vertical-align: middle; }
#hdr-cti { position: relative; } #hdr-cti .cti-dot { position: absolute; right: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #9aa0a6; border: 1px solid #fff; } #hdr-cti.ringing { animation: cti-shake .6s infinite; color: #2e844a; }
.min-w-0 { min-width: 0; }
@keyframes cti-pulse { 0% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(.8); opacity: .6; } }
@keyframes cti-shake { 0% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 50% { transform: rotate(0); } 75% { transform: rotate(6deg); } 100% { transform: rotate(0); } }
.ai-fab { bottom: 20px; } body:has(.cti-dock) .ai-fab { bottom: 72px; } body:has(.cti-dock.open) .ai-fab { bottom: 20px; right: 412px; }
@media (max-width: 991.98px) { .cti-dock { right: 10px; bottom: calc(var(--m-nav-h) + var(--m-lift) + 10px); z-index: 1034; } .cti-dock.open, .cti-dock.on-call, .cti-dock.ringing { z-index: 1490; } .cti-dock.open { left: 10px; right: 10px; width: auto; max-height: calc(100vh - 120px - var(--m-lift)); max-height: calc(100dvh - var(--m-nav-h) - var(--m-lift) - 70px); } .cti-stats.wide { grid-template-columns: repeat(3, 1fr); } .cti-controls { grid-template-columns: repeat(3, 1fr); } .cti-head { flex-wrap: wrap; row-gap: .3rem; } body:has(.cti-dock) .ai-fab { bottom: calc(var(--m-nav-h) + var(--m-lift) + 66px); } body:has(.cti-dock.open) .ai-fab { display: none; } }

/* ---- Calling Center · agent view ---- */
.call-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: .5rem .6rem; border-bottom: 1px solid var(--sf-border); } .call-tab { border: 1px solid var(--sf-border); background: transparent; border-radius: 999px; padding: .25rem .6rem; font-size: 12.5px; display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; color: inherit; } .call-tab b { font-weight: 600; background: var(--sf-bg); border-radius: 999px; padding: 0 .4rem; font-size: 11.5px; } .call-tab.active { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); } .call-tab.active b { background: rgba(255,255,255,.22); }
.call-search { position: relative; padding: .4rem .6rem; border-bottom: 1px solid var(--sf-border); } .call-search i { position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%); color: var(--sf-text-3); font-size: 12px; } .call-search input { width: 100%; border: 1px solid var(--sf-border); border-radius: 6px; padding: .35rem .5rem .35rem 1.7rem; font-size: 13px; background: transparent; color: inherit; }
.call-queue .q-item.done { opacity: .62; } .q-av { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--sf-brand-light); color: var(--sf-brand); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; } .q-name { font-weight: 600; font-size: 13.5px; } .q-reason { font-size: 12.5px; } .q-right { margin-left: auto; text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; } .q-due { font-size: 11.5px; color: var(--sf-text-2); white-space: nowrap; } .q-due.over { color: #b42318; font-weight: 600; } .q-done { font-size: 11.5px; color: #2e844a; white-space: nowrap; }
.call-card .cc-head { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem .6rem; flex-wrap: wrap; } .cc-name { font-size: 20px; font-weight: 700; line-height: 1.2; } .cc-phone { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; } .cc-phone a { text-decoration: none; } .cc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; } .cc-chips .chip { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: var(--sf-bg); border: 1px solid var(--sf-border); } .cc-chips .chip.ok { background: #e3f3e8; color: #1e6b3a; border-color: transparent; } .cc-chips .chip.warn { background: #fde8e8; color: #9b1c1c; border-color: transparent; } .cc-ref { text-align: right; font-size: 13px; }
.cc-why { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 0 1.1rem; } .cc-why .w { background: var(--sf-brand-light); border-radius: 8px; padding: .6rem .8rem; min-width: 0; } .call-card .lbl { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--sf-text-3); font-weight: 600; margin-bottom: 2px; }
.cc-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding: .9rem 1.1rem .3rem; align-items: center; } .cc-call { padding: .55rem 1.1rem; font-size: 15.5px; } .cc-call kbd, .call-hint kbd { font-size: 10px; background: rgba(0,0,0,.12); border-radius: 3px; padding: 1px 4px; margin-left: 4px; font-family: inherit; }
.cc-quick { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .35rem 1.1rem .6rem; } .cc-sep { width: 1px; height: 18px; background: var(--sf-border); margin: 0 .3rem; }
.cc-tp { margin: .4rem 1.1rem; border: 1px solid var(--sf-border); border-radius: 8px; padding: .5rem .8rem; } .cc-tp summary { cursor: pointer; font-weight: 600; font-size: 13.5px; } .cc-tp ol { margin: .4rem 0 0; padding-left: 1.2rem; font-size: 13.5px; } .cc-tp li { margin: 2px 0; }
.cc-notes { display: flex; gap: .5rem; align-items: flex-start; padding: .4rem 1.1rem; } .cc-notes textarea { flex: 1; }
.cc-tl { padding: .5rem 1.1rem 1rem; } .tl-row { display: flex; gap: .6rem; align-items: flex-start; padding: .35rem 0; border-bottom: 1px solid var(--sf-border); font-size: 13px; } .tl-row:last-child { border-bottom: 0; } .tl-row > i { color: var(--sf-text-3); margin-top: 2px; } .tl-row .n { flex: 1; min-width: 0; }
.tgt-row { padding: .35rem 0; } .tgt-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 767.98px) { .call-pane.call-agent > .call-list { order: 2; } .call-pane.call-agent > .call-main { order: 1; } .call-pane.call-agent > .call-side { order: 3; } .cc-why { grid-template-columns: 1fr; } .cc-call { width: 100%; justify-content: center; } .call-queue { max-height: 60vh; } }

/* ---- household / org tree, 360 pages, setup studio ---- */
.hh-tree ul { list-style: none; margin: 0; padding: 0; } .hh-tree .tn-children { margin-left: 18px; padding-left: 16px; border-left: 2px solid var(--sf-border); } .hh-tree .tn { position: relative; margin: 6px 0; } .hh-tree .tn-children > .tn::before { content: ""; position: absolute; left: -16px; top: 18px; width: 14px; border-top: 2px solid var(--sf-border); }
.hh-tree .tn-card { display: flex; gap: .6rem; align-items: flex-start; background: var(--sf-card-bg, #fff); border: 1px solid var(--sf-border); border-radius: 8px; padding: .5rem .7rem; } .hh-tree .tn-house > .tn-card { background: var(--sf-brand-light); border-color: transparent; } .hh-tree .tn-body { flex: 1; min-width: 0; } .hh-tree .tn-title { font-weight: 600; font-size: 13.5px; } .hh-tree .tn-sub { font-size: 12px; color: var(--sf-text-2); } .hh-tree .tn-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; } .hh-tree .tn-act { display: flex; gap: 3px; flex: none; align-items: flex-start; } .hh-tree .tn-av { flex: none; }
.hh-tree .tn-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--sf-bg); color: var(--sf-text-2); } .hh-tree .tn-ic.house { background: var(--sf-brand); color: #fff; } .hh-tree .tn-ic.veh { background: #eef0ff; color: #4b55b3; }
.hh-tree .tn-leaf { display: flex; gap: .5rem; align-items: center; font-size: 12.5px; padding: .2rem .4rem; } .hh-tree .tn-leaf > i { color: var(--sf-text-3); } .hh-tree .tn-leaf > span { flex: 1; min-width: 0; }
.hh-tree .tn-toggle { flex: none; width: 18px; height: 18px; border: none; background: none; color: var(--sf-text-3); padding: 0; margin-top: 3px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px; } .hh-tree .tn-toggle:hover { background: var(--sf-bg); } .hh-tree .tn-toggle i { font-size: 12px; }
.ob-org-tree .ob-org-card[draggable="true"] { cursor: grab; } .ob-org-tree .ob-org-card[draggable="true"]:active { cursor: grabbing; } .ob-org-tree .ob-org-card.ob-org-over { outline: 2px dashed var(--sf-brand); outline-offset: 2px; background: var(--sf-brand-light); }
/* item 131: the Team step's table becomes a stack of cards below 576px — same inputs/selects, no markup
   duplication, just CSS reflow (classic "responsive table" technique), scoped to .ob-team-cards only so every
   other .sf-table in the app (plain read-only data, not meant to be cards) is unaffected */
@media (max-width: 575.98px) {
  .ob-team-cards table, .ob-team-cards thead, .ob-team-cards tbody, .ob-team-cards th, .ob-team-cards td, .ob-team-cards tr { display: block; }
  .ob-team-cards thead tr { position: absolute; left: -9999px; top: -9999px; }
  .ob-team-cards tbody tr { border: 1px solid var(--sf-border); border-radius: 8px; padding: .5rem; margin-bottom: .5rem; background: var(--sf-card-bg, #fff); }
  .ob-team-cards tbody td { border: none; padding: .3rem 0; }
  .ob-team-cards tbody td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--sf-text-3); margin-bottom: 2px; }
  /* a sticky Next/Back bar on any wizard (dealership, import, marketing) so it's reachable without scrolling back up */
  .wiz .sf-card-footer { position: sticky; bottom: var(--m-nav-h); z-index: 5; box-shadow: 0 -2px 6px rgba(0,0,0,.06); }
}
.nba { background: var(--sf-card-bg, #fff); border: 1px solid var(--sf-border); border-radius: 8px; margin-bottom: 1rem; } .nba-h { padding: .5rem .8rem; font-weight: 600; font-size: 13.5px; border-bottom: 1px solid var(--sf-border); } .nba-row { display: flex; gap: .6rem; align-items: center; padding: .4rem .8rem; border-bottom: 1px solid var(--sf-border); font-size: 13px; } .nba-row:last-child { border-bottom: 0; } .nba-row .n { flex: 1; min-width: 0; } .nba-row > i { font-size: 15px; } .nba-row.danger > i { color: #b42318; } .nba-row.warn > i { color: #c97d12; } .nba-row.info > i { color: var(--sf-brand); }
.c360-pills { display: flex; flex-wrap: wrap; gap: 4px; } .c360-pills .pill { border: 1px solid var(--sf-border); background: transparent; color: inherit; border-radius: 999px; padding: .2rem .6rem; font-size: 12px; cursor: pointer; } .c360-pills .pill b { font-weight: 600; margin-left: 2px; } .c360-pills .pill.active { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); }
.v-mini { border: 1px solid var(--sf-border); border-radius: 8px; padding: .6rem .8rem; height: 100%; }
.ob-logo-well { width: 72px; height: 72px; border-radius: 10px; border: 1px dashed var(--sf-border); display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--sf-bg); flex: none; } .ob-logo-well img { width: 100%; height: 100%; object-fit: contain; } .ob-logo-well i { font-size: 22px; color: var(--sf-text-3); }
.ss-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1rem; } .ss-step { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem; border: 1px solid var(--sf-border); border-radius: 999px; font-size: 12.5px; color: inherit; text-decoration: none; background: var(--sf-card-bg, #fff); } .ss-step .n { width: 20px; height: 20px; border-radius: 50%; background: var(--sf-bg); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; } .ss-step.done .n { background: #e3f3e8; color: #1e6b3a; } .ss-step.active { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); } .ss-step.active .n { background: rgba(255,255,255,.25); color: #fff; }
.cred-box .mini-stat { padding: .4rem 0; } .cred-form { border: 1px solid var(--sf-border); border-radius: 10px; padding: .7rem .9rem; margin-bottom: 1rem; background: var(--sf-card-bg, #fff); } .cred-form .cred-head { font-size: 13px; margin-bottom: .3rem; }
@media (max-width: 767.98px) { .hh-tree .tn-children { margin-left: 8px; padding-left: 10px; } .hh-tree .tn-children > .tn::before { left: -10px; width: 8px; } .ss-step .l { display: none; } .ss-step.active .l { display: inline; } }

/* ---- creative builder ---- */
.cb-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr) 300px; gap: .75rem; align-items: start; } .cb-panel .form-label { margin-top: .15rem; }
.cb-canvas-wrap { background: repeating-conic-gradient(#e9eef4 0 25%, #f6f8fb 0 50%) 0 0 / 20px 20px; display: flex; justify-content: center; padding: .75rem; } #cb-canvas { width: auto; max-width: 100%; max-height: 70vh; height: auto; border-radius: 6px; box-shadow: 0 6px 24px rgba(27,42,65,.18); background: #fff; }
.cb-formats { display: flex; flex-wrap: wrap; gap: 4px; } .cb-formats .pill { border: 1px solid var(--sf-border); background: transparent; color: inherit; border-radius: 999px; padding: .25rem .65rem; font-size: 12.5px; cursor: pointer; } .cb-formats .pill.active { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); }
.cb-checks .cb-check { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem .8rem; border-bottom: 1px solid var(--sf-border); font-size: 12.5px; } .cb-check:last-child { border-bottom: 0; } .cb-check i { margin-top: 2px; } .cb-check.ok i { color: #2e844a; } .cb-check.warn i { color: #c97d12; } .cb-check.error i { color: #b42318; }
@media (max-width: 1199.98px) { .cb-layout { grid-template-columns: 300px minmax(0, 1fr); } .cb-layout > .cb-right { grid-column: 1 / -1; } }
@media (max-width: 767.98px) { .cb-layout { grid-template-columns: 1fr; } .cb-layout > .cb-center { order: -1; } #cb-canvas { max-height: 60vh; } }
/* ---- Marketing Studio: editor ------------------------------------------------------------------------------------ */
.se-root { display: flex; flex-direction: column; height: calc(100vh - 112px); min-height: 560px; margin: -0.5rem -0.75rem 0; background: #f6f7f9; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); overflow: hidden; }
.se-top { display: flex; align-items: center; gap: .4rem; padding: .4rem .6rem; background: #fff; border-bottom: 1px solid var(--sf-border); flex-wrap: wrap; }
.se-name { max-width: 240px; font-weight: 600; } .se-status { white-space: nowrap; min-width: 110px; } .se-tools { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; margin-left: auto; } .se-sep { width: 1px; height: 22px; background: var(--sf-border); margin: 0 .2rem; }
.se-body { display: grid; grid-template-columns: 340px minmax(0, 1fr) 300px; flex: 1; min-height: 0; }
.se-left { display: grid; grid-template-columns: 64px minmax(0, 1fr); background: #fff; border-right: 1px solid var(--sf-border); min-height: 0; }
.se-rail { display: flex; flex-direction: column; gap: 2px; padding: 6px 4px; border-right: 1px solid var(--sf-border); overflow-y: auto; background: #fafafa; }
.se-rail-btn { border: 0; background: transparent; border-radius: 8px; padding: 7px 2px; font-size: 10px; color: var(--sf-text-2); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; } .se-rail-btn i { font-size: 17px; } .se-rail-btn.active, .se-rail-btn:hover { background: var(--sf-brand-light); color: var(--sf-brand); }
.se-panel { overflow-y: auto; padding: 10px; font-size: 13px; min-width: 0; } .se-right { background: #fff; border-left: 1px solid var(--sf-border); overflow-y: auto; padding: 10px; font-size: 13px; }
.se-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.se-canvas-wrap { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 12px; background: repeating-conic-gradient(#e9eef4 0 25%, #f3f5f8 0 50%) 0 0 / 24px 24px; }
.se-stage { position: relative; margin: auto; } #se-canvas { display: block; box-shadow: 0 6px 24px rgba(0,0,0,.14); background: #fff; touch-action: none; outline: none; max-width: none; }
.se-inline { position: absolute; z-index: 5; resize: none; border: 2px solid #2563eb; border-radius: 4px; padding: 4px 6px; background: rgba(255,255,255,.96); font-family: inherit; line-height: 1.15; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.se-canvasbar { display: flex; align-items: center; gap: .75rem; padding: .3rem .75rem; background: #fff; border-top: 1px solid var(--sf-border); flex-wrap: wrap; }
.se-ph { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--sf-text-2); margin: 6px 0 8px; }
.se-sec { border-top: 1px solid var(--sf-border); padding: 6px 0; } .se-sec > summary { font-weight: 600; cursor: pointer; list-style: none; padding: 4px 0; display: flex; align-items: center; } .se-sec > summary::after { content: '\25BE'; margin-left: auto; color: var(--sf-text-3); } .se-sec:not([open]) > summary::after { content: '\25B8'; } .se-sec-body { padding: 4px 0 6px; }
.se-fld { display: block; margin-bottom: 8px; } .se-lbl { display: block; font-size: 11.5px; color: var(--sf-text-3); margin-bottom: 2px; } .se-smart-head { padding: 4px 0 10px; }
.se-swatches { display: flex; flex-wrap: wrap; gap: 6px; } .se-swatch { display: inline-flex; border: 2px solid transparent; border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; } .se-swatch span { width: 16px; height: 22px; display: inline-block; } .se-swatch span:first-child { border-radius: 5px 0 0 5px; } .se-swatch span:last-child { border-radius: 0 5px 5px 0; } .se-swatch.active, .se-swatch:hover { border-color: var(--sf-brand); }
.se-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--sf-border); display: inline-block; cursor: pointer; padding: 0; } .se-dot.active { box-shadow: 0 0 0 2px var(--sf-brand); }
.se-list { display: flex; flex-direction: column; gap: 4px; } .se-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 1px solid var(--sf-border); background: #fff; border-radius: 6px; padding: 6px 8px; cursor: pointer; width: 100%; } .se-item:hover, .se-item.active { border-color: var(--sf-brand); background: var(--sf-brand-light); } .se-item small { font-size: 11px; } .se-item .btn { align-self: flex-end; margin-top: -22px; }
.se-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.se-tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .se-tpl { border: 2px solid transparent; border-radius: 8px; padding: 4px; background: #fff; text-align: left; cursor: pointer; box-shadow: var(--sf-shadow); } .se-tpl img { width: 100%; border-radius: 4px; background: #eef0f3; display: block; min-height: 60px; } .se-tpl span { display: block; font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .se-tpl.active, .se-tpl:hover { border-color: var(--sf-brand); }
.se-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .se-media-grid.lg { grid-template-columns: repeat(5, minmax(0, 1fr)); } .se-media { border: 2px solid transparent; border-radius: 6px; padding: 2px; background: #fff; cursor: pointer; } .se-media img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f3f3f2; border-radius: 4px; display: block; } .se-media span { display: block; font-size: 10px; color: var(--sf-text-3); } .se-media.active, .se-media:hover { border-color: var(--sf-brand); }
.se-layers { display: flex; flex-direction: column; gap: 2px; } .se-layer { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; } .se-layer:hover { background: #f3f3f2; } .se-layer.active { background: var(--sf-brand-light); border-color: var(--sf-brand); } .se-layer.hidden { opacity: .5; } .se-layer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; } .se-layer-btn { border: 0; background: transparent; padding: 0 3px; color: var(--sf-text-3); font-size: 13px; } .se-layer-btn:hover { color: var(--sf-brand); }
.se-qa { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; } .se-qa-item { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; padding: 4px 6px; border-radius: 6px; background: #fafafa; } .se-qa-item.clickable { cursor: pointer; } .se-qa-item.clickable:hover { background: var(--sf-brand-light); }
.se-ai-log { display: flex; flex-direction: column; gap: 4px; } .se-ai-msg { padding: 6px 8px; border-radius: 8px; background: #f3f3f2; } .se-ai-msg.me { background: var(--sf-brand-light); align-self: flex-end; }
.se-preview { overflow: auto; max-height: 72vh; background: repeating-conic-gradient(#e9eef4 0 25%, #f3f5f8 0 50%) 0 0 / 24px 24px; padding: 12px; } .se-preview-actual { display: inline-block; }
.se-phone { width: 360px; max-width: 100%; margin: auto; background: #fff; border: 10px solid #111; border-radius: 28px; overflow: hidden; } .se-phone.story { background: #000; position: relative; } .se-phone-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; } .se-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--sf-brand); display: inline-block; } .se-phone-cap { padding: 8px 10px; font-size: 13px; } .se-story-cta { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); background: #fff; border-radius: 20px; padding: 6px 18px; font-weight: 600; font-size: 13px; }
.se-fmt-card { display: flex; flex-direction: column; gap: 2px; align-items: center; border: 1px solid var(--sf-border); border-radius: 8px; padding: 10px; cursor: pointer; text-align: center; height: 100%; } .se-fmt-card.has { background: #f8f8f7; } .se-fmt-box { width: 48px; max-height: 60px; background: var(--sf-brand-light); border: 1px solid var(--sf-brand); border-radius: 4px; display: block; margin: 4px 0; }
@media (max-width: 1199.98px) { .se-body { grid-template-columns: 300px minmax(0, 1fr) 260px; } }
@media (max-width: 991.98px) { .se-root { height: auto; min-height: 0; margin: 0; } .se-body { grid-template-columns: 1fr; } .se-center { order: 0; } .se-left { order: 1; grid-template-columns: 1fr; border-right: 0; border-top: 1px solid var(--sf-border); } .se-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--sf-border); } .se-rail-btn { flex: 0 0 auto; min-width: 60px; } .se-right { order: 2; border-left: 0; border-top: 1px solid var(--sf-border); } .se-canvas-wrap { min-height: 50vh; } .se-tools { margin-left: 0; width: 100%; } .se-name { max-width: 100%; flex: 1; } }
/* ---- Marketing Studio: module pages ------------------------------------------------------------------------------ */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; } .st-card { background: #fff; border: 1px solid var(--sf-border); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sf-shadow); } .st-card .st-thumb { background: repeating-conic-gradient(#eef0f3 0 25%, #f6f7f9 0 50%) 0 0 / 20px 20px; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; position: relative; } .st-card .st-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; } .st-card .st-body { padding: 8px 10px; font-size: 12.5px; flex: 1; } .st-card .st-foot { padding: 6px 10px; border-top: 1px solid var(--sf-border); display: flex; gap: 4px; flex-wrap: wrap; } .st-card .st-badge { position: absolute; top: 6px; left: 6px; } .st-card .st-badge-r { position: absolute; top: 6px; right: 6px; }
.st-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; } .st-tpl { border: 2px solid transparent; border-radius: 8px; background: #fff; padding: 6px; text-align: left; cursor: pointer; box-shadow: var(--sf-shadow); display: flex; flex-direction: column; } .st-tpl img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: #eef0f3; display: block; } .st-tpl strong { font-size: 12.5px; margin-top: 4px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .st-tpl small { color: var(--sf-text-3); } .st-tpl:hover { border-color: var(--sf-brand); }
.st-hero { background: linear-gradient(135deg, var(--sf-nav), var(--sf-brand)); color: #fff; border-radius: 10px; padding: 18px 20px; } .st-hero .btn-light { color: var(--sf-brand); font-weight: 600; } .st-hero h2 { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.st-ai { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; } .st-chat { background: #fff; border: 1px solid var(--sf-border); border-radius: 10px; padding: 12px; min-height: 320px; display: flex; flex-direction: column; gap: 8px; } .st-msg { padding: 8px 12px; border-radius: 12px; max-width: 85%; font-size: 13.5px; background: #f3f3f2; } .st-msg.me { background: var(--sf-brand); color: #fff; align-self: flex-end; } .st-msg .small-2 { opacity: .8; }
.st-scenes { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0; } .st-scene { flex: 0 0 150px; border: 2px solid transparent; border-radius: 8px; background: #fff; padding: 4px; box-shadow: var(--sf-shadow); cursor: pointer; } .st-scene img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #eef0f3; border-radius: 4px; display: block; } .st-scene.active { border-color: var(--sf-brand); } .st-scene small { display: block; font-size: 11px; color: var(--sf-text-3); }
.st-timeline { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #e5e7eb; } .st-timeline span { display: block; height: 100%; border-right: 2px solid #fff; } .st-timeline span:nth-child(odd) { background: var(--sf-brand); } .st-timeline span:nth-child(even) { background: #8a5fb8; }
.st-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12.5px; } .st-kv dt { color: var(--sf-text-3); font-weight: 500; } .st-kv dd { margin: 0; }
.st-cal-item { display: block; font-size: 11px; padding: 2px 4px; border-radius: 4px; margin-bottom: 2px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
@media (max-width: 991.98px) { .st-ai { grid-template-columns: 1fr; } }

@media (max-width: 1500px) { .se-tools .btn-sm > i + span, .se-tools .btn-sm:not(.dropdown-toggle):not(#se-zoom-label) { font-size: 12px; } .se-tools > .btn-sm[data-action='se-duplicate'] { display: none; } }
.se-tools .btn-sm { white-space: nowrap; }
/* ---- Marketing Studio: touch & tablet refinements ---- */
@media (pointer: coarse) { .se-rail-btn { padding: 10px 2px; font-size: 11px; } .se-rail-btn i { font-size: 20px; } .se-layer-btn { padding: 4px 6px; font-size: 16px; } .se-dot { width: 28px; height: 28px; } .se-swatch span { width: 20px; height: 28px; } .se-chips .btn-xs, .se-tpl-grid .se-tpl, .se-media { min-height: 36px; } .btn-xs { padding: .3rem .6rem; font-size: 12.5px; } }
@media (min-width: 768px) and (max-width: 991.98px) { .se-body { grid-template-columns: 1fr; } .se-left { grid-template-columns: 72px minmax(0, 1fr); } .se-rail { flex-direction: column; } .se-panel { max-height: 55vh; } .se-right { max-height: 55vh; } .st-ai { grid-template-columns: 1fr; } }
@media (max-width: 767.98px) { .se-panel, .se-right { max-height: none; } .se-top .se-tools .btn-sm { padding: .3rem .5rem; } .se-sep { display: none; } .st-tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } .se-media-grid.lg { grid-template-columns: repeat(3, minmax(0, 1fr)); } .se-phone { width: 100%; border-width: 6px; } .se-preview { max-height: 60vh; } }
/* Studio editor on a phone: one row with Back, the name, Save and "..." (the menu holds undo / redo, zoom, mode, preview, resize, download and the
   rest: the .d-md-none entries in views/studio_editor.js); the desktop toolbar markup is unchanged and shows from 768px */
@media (max-width: 767.98px) {
  .se-top { flex-wrap: nowrap; gap: .3rem; padding: .3rem .4rem; }
  .se-top > a.btn { flex: 0 0 auto; min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
  .se-top .se-name { flex: 1 1 0; min-width: 0; max-width: none; height: 40px; }
  .se-top .se-status { display: none; }
  .se-tools { display: contents; }
  .se-tools > :not([data-action="se-save"]):not(.dropdown) { display: none !important; }
  .se-tools > [data-action="se-save"] { flex: 0 0 auto; height: 40px; }
  .se-tools > .dropdown .btn { height: 40px; min-width: 40px; } .se-tools > .dropdown .dropdown-toggle::after { display: none; }
  .se-tools > .dropdown .dropdown-menu { max-height: 70vh; overflow-y: auto; }
  .se-tools > .dropdown .dropdown-item { padding-top: .5rem; padding-bottom: .5rem; } .se-tools > .dropdown .dropdown-item.disabled { opacity: .45; pointer-events: none; }
}

/* ----- Location targeting picker (views/geo_picker.js) ----- */
.geo-picker { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: .75rem; align-items: start; }
.geo-side { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.geo-search { position: relative; }
.geo-suggest { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin-top: 2px; max-height: 260px; overflow-y: auto; background: var(--sf-card); border: 1px solid var(--sf-border-strong); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow-lg); }
.geo-suggest-item { display: block; width: 100%; padding: .4rem .6rem; background: none; border: 0; border-bottom: 1px solid var(--sf-border); text-align: left; font-size: 13px; color: var(--sf-text); }
.geo-suggest-item:hover, .geo-suggest-item.is-active { background: var(--sf-brand-light); }
.geo-suggest-note { padding: .5rem .6rem; }
/* audience targeting: age, gender, Meta interests (js/views/audience_targeting.js) */
.tg-box { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .6rem .75rem; height: 100%; }
.tg-head { font-weight: 600; font-size: 13px; margin-bottom: .45rem; }
.tg-age { width: auto; min-width: 5.5rem; }
.tg-kind { width: auto; flex: 0 0 auto; }
.tg-results { margin-top: .4rem; max-height: 240px; overflow-y: auto; }
.tg-results:not(:empty) { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); }
.tg-result { display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; border-bottom: 1px solid var(--sf-border); }
.tg-result:last-child { border-bottom: 0; }
.tg-result-text { flex: 1 1 auto; min-width: 0; }
.tg-note { padding: .45rem .6rem; }
.tg-chip { display: inline-flex; align-items: center; gap: .25rem; white-space: normal; }
.tg-x { border: 0; background: none; padding: 0 .1rem; line-height: 1; color: inherit; font-size: 14px; }
.tg-x:hover { color: var(--sf-danger, #ba0517); }
.geo-attrib { padding: .2rem .6rem; text-align: right; font-family: Roboto, Arial, sans-serif; font-size: 12px; color: #5e5e5e; }
.geo-mode { display: flex; gap: .35rem; flex-wrap: wrap; }
.geo-radius-row { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.geo-radius-row input[type=number] { width: 5rem; } .geo-radius-row select { width: 5.5rem; } .geo-radius-row input[type=range] { flex: 1 1 6rem; min-width: 5rem; }
.geo-moving, .geo-pending { padding: .4rem .55rem; background: var(--sf-brand-light); border: 1px solid #c5d6ee; border-radius: var(--sf-radius); font-size: 12.5px; }
.geo-list { display: flex; flex-direction: column; gap: .4rem; max-height: 340px; overflow-y: auto; }
.geo-card { padding: .4rem .5rem; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); background: var(--sf-card); }
.geo-card.is-selected { border-color: var(--sf-brand); box-shadow: inset 0 0 0 1px var(--sf-brand); }
.geo-card-head { display: flex; align-items: center; gap: .4rem; }
.geo-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.geo-name { flex: 1 1 auto; min-width: 0; padding: 0; background: none; border: 0; text-align: left; font-size: 13px; color: var(--sf-text); }
.geo-badges, .geo-actions { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.geo-issue { margin-top: .25rem; color: var(--sf-warning); }
.geo-empty { padding: .9rem; text-align: center; color: var(--sf-text-3); border: 1px dashed var(--sf-border-strong); border-radius: var(--sf-radius); font-size: 12.5px; }
.geo-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 1.4rem; }
.geo-map { height: 440px; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); background: var(--sf-bg); }
.geo-map-note { padding: 1.5rem 1rem; text-align: center; font-size: 12.5px; color: var(--sf-text-2); background: var(--sf-bg); border: 1px dashed var(--sf-border-strong); border-radius: var(--sf-radius); }
/* Population density heatmap over the audience map (views/geo_picker.js). Overlays never take the map's clicks except the switch. */
.geo-map-wrap { position: relative; }
.geo-density-toggle, .geo-density-info, .geo-density-loading, .geo-density-legend { position: absolute; z-index: 2; background: var(--sf-card); border: 1px solid var(--sf-border); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); font-size: 12px; }
.geo-density-toggle { top: 10px; right: 10px; padding: .3rem .6rem; }
.geo-density-toggle .form-check { display: flex; align-items: center; gap: .35rem; padding-left: 2.4em; cursor: pointer; }
.geo-density-toggle .form-check-label { cursor: pointer; color: var(--sf-text); }
.geo-density-info { top: 10px; left: 10px; max-width: 60%; padding: .35rem .6rem; pointer-events: none; color: var(--sf-text); }
.geo-density-sub { color: var(--sf-text-2); font-size: 11px; margin-top: .1rem; }
.geo-density-loading { top: 10px; left: 50%; transform: translateX(-50%); padding: .25rem .6rem; pointer-events: none; color: var(--sf-text-2); white-space: nowrap; }
.geo-density-legend { bottom: 24px; left: 10px; width: 160px; padding: .35rem .55rem; pointer-events: none; color: var(--sf-text-2); }
.geo-density-legend-title { font-weight: 600; color: var(--sf-text); margin-bottom: .2rem; }
.geo-density-legend-bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(0, 0, 255, .6), rgba(0, 255, 0, .7), rgba(255, 255, 0, .85), rgba(255, 0, 0, .95)); }
.geo-density-legend-ends { display: flex; justify-content: space-between; font-size: 11px; margin-top: .1rem; }
.geo-density-filter { display: grid; gap: .3rem; margin-top: .35rem; }
.geo-density-filter .form-select { font-size: 12px; padding-top: .15rem; padding-bottom: .15rem; }
.geo-density-ages { display: flex; align-items: center; gap: .3rem; color: var(--sf-text-2); }
.geo-density-ages .form-select { width: auto; min-width: 4.2rem; }
.geo-density-demo { margin-top: .5rem; padding: .6rem .75rem; border: 1px solid var(--sf-border); border-radius: var(--sf-radius); background: var(--sf-card); font-size: 12px; }
.geo-demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .3rem; }
.geo-demo-split { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--sf-text); margin-bottom: .4rem; }
.geo-demo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }
.geo-demo-rows { display: grid; gap: 3px; margin-bottom: .4rem; }
.geo-demo-row { display: grid; grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1fr) 2.6rem; align-items: center; gap: .35rem; }
.geo-demo-side { display: flex; height: 10px; }
.geo-demo-left { justify-content: flex-end; }
.geo-demo-age { text-align: center; color: var(--sf-text-2); font-variant-numeric: tabular-nums; }
.geo-demo-pct { text-align: right; color: var(--sf-text-2); font-variant-numeric: tabular-nums; }
.geo-demo-bar { display: block; height: 100%; border-radius: 2px; min-width: 1px; }
.geo-demo-m { background: #1f5aa6; }
.geo-demo-f { background: #c0603a; }
.geo-demo-dim { opacity: .25; }
@media (max-width: 767.98px) { .geo-density-info { max-width: calc(100% - 20px); top: auto; bottom: 10px; left: 10px; } .geo-density-legend { bottom: auto; top: 52px; left: 10px; } }
@media (max-width: 767.98px) { .geo-picker { grid-template-columns: minmax(0, 1fr); } .geo-map-wrap { order: -1; } .geo-map { height: 260px; } .geo-list { max-height: none; } }

/* ---------- Creative Studio (views/creative_ai.js): theme variables only; the previews imitate each app on purpose ---------- */
.cai-hero { background: linear-gradient(135deg, var(--sf-brand-light), var(--sf-card, #fff) 60%); }
.cai-ch-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--sf-radius); background: var(--sf-brand-light); color: var(--sf-brand); flex: none; font-size: 1.05rem; }
.cai-ch-icon-lg { width: 44px; height: 44px; font-size: 1.35rem; }
.cai-quick, .cai-pick { padding: .85rem; border: 1px solid var(--sf-border); transition: border-color .15s, box-shadow .15s, transform .15s; cursor: pointer; background: var(--sf-card, #fff); }
.cai-quick:hover, .cai-pick:hover, .cai-card:hover { border-color: var(--sf-brand); box-shadow: var(--sf-shadow); }
.cai-quick:hover { transform: translateY(-1px); }
.cai-pick.is-on { border-color: var(--sf-brand); box-shadow: 0 0 0 2px var(--sf-brand-light) inset; background: var(--sf-brand-light); }
.cai-quick:focus-visible, .cai-pick:focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.cai-snippet { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.6em; }
.cai-assist { border: 1px dashed var(--sf-brand); background: var(--sf-brand-light); }
.cai-steps { list-style: none; display: flex; gap: .5rem; padding: 0; margin: 0; flex-wrap: wrap; }
.cai-step a { display: flex; align-items: center; gap: .5rem; padding: .4rem .8rem .4rem .45rem; border-radius: 999px; border: 1px solid var(--sf-border); color: var(--sf-text-2); text-decoration: none; background: var(--sf-card, #fff); }
.cai-step-n { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: var(--sf-bg); font-size: .8rem; font-weight: 600; }
.cai-step.is-current a { border-color: var(--sf-brand); color: var(--sf-text); font-weight: 600; }
.cai-step.is-current .cai-step-n, .cai-step.is-done .cai-step-n { background: var(--sf-brand); color: #fff; }
.cai-overlay { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .35); backdrop-filter: blur(2px); }
.cai-overlay-card { background: var(--sf-card, #fff); border-radius: calc(var(--sf-radius) * 2); box-shadow: var(--sf-shadow-lg); padding: 1.5rem 2rem; text-align: center; width: min(92vw, 360px); }
.cai-spark { font-size: 2rem; color: var(--sf-brand); animation: cai-pulse 1.4s ease-in-out infinite; }
@keyframes cai-pulse { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cai-spark { animation: none; } .cai-quick:hover { transform: none; } }
.cai-variant { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .6rem .7rem; }
.cai-variant.is-on { border-color: var(--sf-brand); background: var(--sf-brand-light); }
.cai-sticky { position: sticky; top: 72px; }
.cai-pre { white-space: pre-wrap; font-size: .78rem; background: var(--sf-bg); border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .5rem; max-height: 260px; overflow: auto; margin: 0; }
.cai-flow { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; counter-reset: caiflow; }
.cai-flow li { counter-increment: caiflow; padding: .2rem .6rem; border-radius: 999px; border: 1px solid var(--sf-border); color: var(--sf-text-3); }
.cai-flow li::before { content: counter(caiflow) ". "; }
.cai-flow li.is-done { border-color: var(--sf-success, #2e844a); color: var(--sf-success, #2e844a); }
.cai-pickimg { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .25rem; background: var(--sf-card, #fff); }
.cai-pickimg:hover { border-color: var(--sf-brand); }
.cai-pickimg img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--sf-bg); }
.cai-avatar { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: var(--sf-brand); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }
/* phone frame */
.cai-phone { max-width: 330px; margin: 0 auto; border: 8px solid #1f2937; border-radius: 28px; overflow: hidden; background: #fff; box-shadow: var(--sf-shadow); }
.cai-phone-bar { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; }
.cai-wa-bar { background: #075e54; color: #fff; }
.cai-wa-chat { background: #efeae2; min-height: 300px; padding: .8rem .6rem; }
.cai-wa-bubble { background: #fff; border-radius: 0 10px 10px 10px; padding: .45rem .6rem .25rem; max-width: 92%; font-size: .86rem; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); word-wrap: break-word; }
.cai-wa-img img { width: 100%; border-radius: 6px; margin-bottom: .35rem; }
.cai-wa-time { text-align: right; font-size: .66rem; color: #667781; }
.cai-wa-cta { margin-top: .3rem; max-width: 92%; background: #fff; border-radius: 10px; padding: .45rem; text-align: center; color: #027eb5; font-size: .85rem; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); }
.cai-sms-bar { flex-direction: column; background: #f6f6f6; border-bottom: 1px solid #e5e5e5; }
.cai-sms-chat { background: #fff; min-height: 260px; padding: .8rem .7rem; }
.cai-sms-bubble { background: #e9e9eb; color: #111; border-radius: 16px; padding: .5rem .75rem; max-width: 88%; font-size: .86rem; word-wrap: break-word; }
.cai-seg { display: flex; gap: 3px; } .cai-seg span { flex: 1; height: 5px; border-radius: 3px; background: var(--sf-warning, #dd7a01); } .cai-seg span.is-first { background: var(--sf-success, #2e844a); }
/* email */
.cai-email { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); overflow: hidden; background: #fff; }
.cai-email.is-mobile { max-width: 340px; margin: 0 auto; border: 8px solid #1f2937; border-radius: 28px; }
.cai-email-inbox { display: flex; gap: .5rem; align-items: center; padding: .6rem .75rem; border-bottom: 1px solid var(--sf-border); background: var(--sf-bg); }
.cai-email-body { padding: 1rem 1.1rem; font-size: .88rem; color: #222; }
.cai-email-body h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: .6rem; }
.cai-email-img img { width: 100%; border-radius: 4px; margin-bottom: .8rem; }
.cai-email-btn { display: inline-block; background: var(--sf-brand); color: #fff; padding: .55rem 1.2rem; border-radius: var(--sf-radius); font-weight: 600; }
.cai-email-foot { border-top: 1px solid #eee; margin-top: 1rem; padding-top: .6rem; font-size: .72rem; color: #777; }
/* Meta */
.cai-ad { border: 1px solid #dddfe2; border-radius: 8px; background: #fff; max-width: 420px; margin: 0 auto; overflow: hidden; color: #1c1e21; }
.cai-ad-head { display: flex; gap: .5rem; align-items: center; padding: .6rem .7rem; }
.cai-ad-text { padding: 0 .7rem .6rem; white-space: pre-wrap; word-wrap: break-word; }
.cai-ad-media { background: #f0f2f5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cai-ad-media img { width: 100%; height: 100%; object-fit: cover; }
.cai-ad-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem .7rem; background: #f0f2f5; }
.cai-ad-ctabar { display: flex; justify-content: space-between; padding: .55rem .7rem; border-bottom: 1px solid #efefef; font-weight: 600; font-size: .85rem; color: #0095f6; }
/* Google */
.cai-gad { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); padding: .9rem 1rem; background: #fff; font-family: arial, sans-serif; color: #202124; }
.cai-gfav { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: #f1f3f4; font-size: .75rem; font-weight: 700; }
.cai-g-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.35; margin: .15rem 0; }
@media (max-width: 991.98px) { .cai-sticky { position: static; } }

/* ---- AI image placeholder: shimmering card with twinkling stars and an estimated progress bar (views/ad_composer.js) ---- */
.adgen-ph { position: relative; overflow: hidden; border-radius: .5rem; color: #fff; background: linear-gradient(125deg, #241040, #5b2a86, #b84a2c, #6b1d4a, #241040); background-size: 320% 320%; animation: adgen-flow 7s ease-in-out infinite; }
.adgen-ph::before { content: ''; position: absolute; width: 70%; aspect-ratio: 1; left: 15%; top: 18%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 120, .55), rgba(255, 140, 90, .18) 45%, transparent 70%); filter: blur(18px); animation: adgen-glow 4.5s ease-in-out infinite; }
.adgen-ph::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .16) 50%, transparent 70%); transform: translateX(-100%); animation: adgen-shine 2.4s ease-in-out infinite; }
.adgen-star { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle, #fff 0 28%, rgba(255, 228, 150, .65) 42%, transparent 70%); opacity: 0; animation: adgen-twinkle var(--d) ease-in-out var(--dl) infinite; z-index: 1; }
.adgen-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; z-index: 1; opacity: .9; }
.adgen-center i { animation: cai-pulse 2s ease-in-out infinite; text-shadow: 0 0 18px rgba(255, 220, 140, .9); }
.adgen-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: .55rem .7rem .65rem; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); font-size: 12px; }
.adgen-info .row-1 { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.adgen-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.adgen-bar > div { height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #ffd25a, #fff3c4); transition: width .3s linear; }
@keyframes adgen-flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes adgen-glow { 0%, 100% { transform: scale(.9) translate(-4%, 0); opacity: .7; } 50% { transform: scale(1.1) translate(4%, -3%); opacity: 1; } }
@keyframes adgen-shine { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@keyframes adgen-twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .adgen-ph, .adgen-ph::before, .adgen-ph::after, .adgen-center i { animation: none; } .adgen-star { animation: none; opacity: .55; } }
/* priority leads (AI) */
.pr-ai .sf-card-body { border-left: 4px solid #c0603a; }
.pr-calc-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pr-calc-f span { display: block; font-size: 11px; color: var(--sf-text-muted, #5c5c5c); margin-bottom: 2px; }
.pr-calc-out li { margin-bottom: 4px; }
@media (max-width: 760px) { .pr-calc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pr-calc-row .pr-calc-f:last-child { grid-column: span 2; } }

/* WebRTC phone (Browser Phone) in the softphone dock */
.cti-webrtc { position: fixed; z-index: 1490; background: #f6f6f6; overflow: hidden; }
.cti-webrtc iframe { width: 100%; height: 100%; border: 0; display: block; }
.cti-body.cti-phone-body { padding: 0; }
.cti-phone-slot { height: min(540px, calc(100vh - 270px)); min-height: 320px; background: #f6f6f6; }
.cti-phone-foot { padding: .5rem .7rem; border-top: 1px solid var(--sf-border); }
.cti-reg-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #9aa0a6; vertical-align: middle; } .cti-reg-dot.on { background: #2e844a; }
.sim-pill.live-pill { background: #e6f4ea; color: #1e6b3a; border-color: #b7dfc3; }
@media (max-width: 991.98px) { .cti-phone-slot { height: calc(100vh - 310px); min-height: 280px; } }
.cti-real-hint { background: #eef5ff; border: 1px solid #cfe0fb; color: #1b3a6b; border-radius: 8px; padding: .35rem .55rem; margin-bottom: .5rem; } .cti-real-hint a { font-weight: 600; }

/* product master */
.pm-colour { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--sf-border); border-radius: 20px; padding: .25rem .6rem .25rem .3rem; text-decoration: none; color: inherit; background: var(--sf-card); }
.pm-colour .sw { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); flex: none; }
.pm-colour .n { font-weight: 600; } .pm-colour.inactive { opacity: .55; }

/* + Add new on master lookups */
.lk-wrap { display: flex; gap: .35rem; align-items: center; } .lk-wrap select { flex: 1 1 auto; min-width: 0; } .lk-wrap .lk-add { flex: none; white-space: nowrap; }

/* gallery upload + territory hub */
.gal-drop { border: 2px dashed var(--sf-border-strong); border-radius: 10px; padding: .7rem .9rem; background: #fafbfc; margin-bottom: .8rem; } .gal-drop.over { border-color: var(--sf-brand); background: #eef5ff; } .gal-drop.busy { opacity: .6; pointer-events: none; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; } .gal-group + .gal-group { margin-top: .8rem; }
.gal-tile { border: 1px solid var(--sf-border); border-radius: 8px; overflow: hidden; background: #fff; } .gal-tile img, .gal-tile svg, .gal-tile .gal-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; } .gal-meta { display: flex; align-items: center; justify-content: space-between; gap: .3rem; padding: .25rem .4rem; font-size: 11px; color: var(--sf-text-3); }
.gal-sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); vertical-align: middle; }
.terr-branch { padding: .5rem 0; border-top: 1px solid var(--sf-border); } .terr-branch:first-child { border-top: 0; padding-top: 0; }

/* day-zero migration */
.mig-files td { vertical-align: top; } .mig-files .btn-xs { margin-bottom: 2px; } .mig-checks li:last-child { border-bottom: 0 !important; } .mig-checks .bi { font-size: 16px; margin-top: 1px; }

/* technician workbench + hubs */
.tech-list { display: flex; flex-direction: column; gap: .6rem; } .tech-job { border-left: 4px solid var(--sf-border-strong); } .tech-job.running { border-left-color: #1a8a4a; background: linear-gradient(90deg, rgba(26,138,74,.06), transparent 40%); } .tech-actions .btn { flex: 1 1 auto; } @media (min-width: 768px) { .tech-actions .btn { flex: 0 0 auto; } } .hub-embed .sf-table-wrap { max-height: 60vh; }

/* form engine upgrades: searchable lookups, chips, section tabs, locked parent fields */
.lk-search { position: relative; } .lk-hidden { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; padding: 0; border: 0; }
.lk-search:has(select.is-invalid) .lk-q { border-color: #dc3545; } .lk-menu { position: absolute; z-index: 1065; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--sf-border-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 260px; overflow: auto; padding: 4px; }
.lk-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .45rem .6rem; border-radius: 6px; font-size: 13px; } .lk-item:hover, .lk-item:focus { background: #eef3fb; } .lk-create { color: var(--sf-brand); font-weight: 600; border-top: 1px solid var(--sf-border); border-radius: 0 0 6px 6px; } .lk-note { margin-top: 2px; } .lk-locked { opacity: .75; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 38px; padding: 4px 6px; border: 1px solid var(--sf-border-strong); border-radius: 6px; background: #fff; } .chips-wrap:focus-within { border-color: var(--sf-brand); box-shadow: 0 0 0 .2rem rgba(63,111,181,.15); } .chips-wrap.readonly { background: #f6f7f9; }
.chip { display: inline-flex; align-items: center; gap: 2px; background: #eef3fb; color: #1f3b63; border-radius: 999px; padding: 2px 8px; font-size: 12px; line-height: 1.4; } .chip-x { color: #6b7b8f; text-decoration: none; font-weight: 700; padding: 0 2px; } .chip-x:hover { color: #b3261e; } .chip-in { flex: 1 1 120px; min-width: 120px; border: 0; outline: 0; font-size: 14px; padding: 2px 4px; background: transparent; }
.form-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: .75rem; border-bottom: 1px solid var(--sf-border); padding-bottom: 6px; } .form-tab { border: 1px solid var(--sf-border-strong); background: #fff; border-radius: 999px; padding: .3rem .8rem; font-size: 13px; font-weight: 600; color: var(--sf-text-2); } .form-tab.active { background: var(--sf-brand); color: #fff; border-color: var(--sf-brand); }
@media (max-width: 575.98px) { .form-tabs { overflow-x: auto; flex-wrap: nowrap; } .form-tab { white-space: nowrap; } .lk-menu { max-height: 40vh; } }

/* domain forms: KYC vault slots, guided photos, full-page forms, mobile action bar, two-line rows */
.kyc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; } .kyc-slot { display: flex; flex-direction: column; gap: 2px; border: 1px dashed var(--sf-border-strong); border-radius: 8px; padding: 6px; cursor: pointer; background: #fafbfc; min-width: 0; } .kyc-slot.has { border-style: solid; background: #fff; } .kyc-slot:hover { border-color: var(--sf-brand); }
.kyc-thumb { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #eef1f5; color: #8a97a8; font-size: 22px; } .kyc-thumb.kyc-sig { object-fit: contain; background: #fff; } .kyc-lbl { font-size: 11.5px; font-weight: 600; color: var(--sf-text-2); display: flex; justify-content: space-between; align-items: center; gap: 4px; } .check-row .kyc-thumb { width: 44px; aspect-ratio: 1; font-size: 14px; }
.line-pick .form-select-sm { max-width: 100%; } .est-gst { text-align: right; } .q-derived { background: #f6f8fb !important; } .q-addons .btn.active { background: var(--sf-brand); color: #fff; }
.form-page .sf-card { margin-bottom: 84px; } .form-page-bar { position: sticky; bottom: 0; z-index: 1030; display: flex; gap: .5rem; align-items: center; padding: .6rem .9rem; margin: 0 -.25rem; background: #fff; border-top: 1px solid var(--sf-border); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
@media (max-width: 991.98px) { .form-page-bar { position: fixed; left: 0; right: 0; bottom: var(--m-nav-h); margin: 0; z-index: 1039; min-height: var(--m-bar-h); box-sizing: border-box; } .form-page .sf-card { margin-bottom: calc(var(--m-nav-h) + var(--m-bar-h) + var(--m-float-h)); } }
.m-actionbar { display: none; } @media (max-width: 991.98px) { .m-actionbar { display: flex; position: fixed; left: 0; right: 0; bottom: var(--m-nav-h); z-index: 1039; background: #fff; border-top: 1px solid var(--sf-border); box-shadow: 0 -2px 10px rgba(0,0,0,.06); padding: 4px 6px; min-height: var(--m-bar-h); box-sizing: border-box; gap: 4px; } .m-actionbar .btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; font-weight: 600; min-height: 44px; padding: 4px 0; border: 1px solid var(--sf-border); border-radius: 8px; background: #fff; color: var(--sf-text-2); } .m-actionbar .btn .bi { font-size: 16px; } .m-actionbar .btn:disabled { opacity: .45; } .sf-page:has(.m-actionbar) { padding-bottom: calc(var(--m-nav-h) + var(--m-bar-h) + var(--m-float-h)) !important; } }
@media (max-width: 575.98px) { .sf-table.sf-cards tbody tr { padding: .45rem .7rem; } .sf-table.sf-cards tbody td[data-label] { display: inline-flex; padding: 0; text-align: left; font-size: 12px; color: var(--sf-text-3); margin-right: .6rem; } .sf-table.sf-cards tbody td[data-label]::before { display: none; }
  /* a table without the data-m marker keeps the first-four rule: the 5th and later columns are hidden, the first is the title, the second the subtitle */
  .sf-table.sf-cards:not(:has(td[data-m])) tbody td[data-label] ~ td[data-label] ~ td[data-label] ~ td[data-label] ~ td[data-label] { display: none; }
  .sf-table.sf-cards:not(:has(td[data-m])) tbody td[data-label]:not(td[data-label] ~ td[data-label]) { display: flex; width: 100%; font-weight: 600; font-size: 14px; color: var(--sf-text); margin: 0 0 2px; }
  .sf-table.sf-cards:not(:has(td[data-m])) tbody td[data-label] ~ td[data-label]:not(td[data-label] ~ td[data-label] ~ td[data-label]) { display: flex; width: 100%; font-size: 12.5px; color: var(--sf-text-2); margin: 0 0 2px; }
  /* UI.table (js/core/ui.js) puts data-m="1" on the cells of the name column and of the columns the person ticked in the chooser: a table that has any
     shows exactly those cells, in table order (the first is the title, the second the subtitle), whichever column they are */
  .sf-table.sf-cards:has(td[data-m]) tbody td[data-label]:not([data-m]) { display: none; }
  .sf-table.sf-cards:has(td[data-m]) tbody td[data-m]:not(td[data-m] ~ td[data-m]) { display: flex; width: 100%; font-weight: 600; font-size: 14px; color: var(--sf-text); margin: 0 0 2px; }
  .sf-table.sf-cards:has(td[data-m]) tbody td[data-m] ~ td[data-m]:not(td[data-m] ~ td[data-m] ~ td[data-m]) { display: flex; width: 100%; font-size: 12.5px; color: var(--sf-text-2); margin: 0 0 2px; }
  .sf-table.sf-cards tbody td.text-end { display: flex; justify-content: flex-end; }
}
[hidden] { display: none !important; }
.ob-cell-bad { background: rgba(186,5,23,.06) !important; }
.ob-cell-bad input, .ob-cell-bad select { border-color: var(--sf-danger, #ba0517) !important; }

/* A header menu that is open (the account menu with My profile and Sign out, the bell, "+ New") and the search with its results are above the open softphone panel
   (z-index 1490), which used to cover the lower rows of the menu on every width and the whole search on a phone: a telecaller, whose panel is open from the start,
   could not tap Sign out or search. Only while one of them is open, so nothing else changes. */
.sf-header:has(.dropdown-menu.show, .sf-search-results:not([hidden])), body.search-open .sf-header { z-index: 1495; }
/* ===== Phone hardening (390px) =====
   Fixed bars (record action bar, full-page form bar, bottom nav, sticky wizard footer) reserve their own height in --m-*. The softphone
   pill and the Auto Assist button sit above them, never on them, drop under a bottom sheet or the drawer, and every page keeps room for
   them. Wide tables stay inside a scroll container with a visible cue; long menus and tab strips fit the screen. */
:root { --m-nav-h: calc(60px + env(safe-area-inset-bottom, 0px)); --m-bar-h: 60px; --m-lift: 0px; --m-float-h: 64px; }
@media (max-width: 991.98px) {
  body:has(.cti-dock) { --m-float-h: 112px; }
  body:has(.m-actionbar), body:has(.form-page-bar) { --m-lift: var(--m-bar-h); }
  html, body { scroll-padding-bottom: calc(var(--m-nav-h) + var(--m-lift) + 16px); } /* a focused field scrolls clear of the bars, not under them */
  /* a sheet or the drawer is above the idle pill, the open panel and the WebRTC frame: they go under its backdrop (a ringing call never does) */
  body.modal-open .cti-dock.open:not(.on-call):not(.ringing), body.modal-open .cti-dock.open:not(.on-call):not(.ringing) ~ .cti-webrtc, body.sb-open .cti-dock:not(.ringing), body.sb-open .cti-dock:not(.ringing) ~ .cti-webrtc { z-index: 1034; }
  .sb-app { min-height: 40px; font-size: 13px; } .sb-app-more { min-height: 40px; }
  /* Setup: the 17 sections become one scrolling strip (current section first) so the page content starts right under it */
  .col-lg-3:has(+ #setup-body) .list-group { flex-direction: row; gap: 6px; padding: 6px; overflow-x: auto; scrollbar-width: none; }
  .col-lg-3:has(+ #setup-body) .list-group::-webkit-scrollbar { display: none; }
  .col-lg-3:has(+ #setup-body) .list-group-item { flex: 0 0 auto; width: auto; min-height: 40px; padding: .45rem .85rem; white-space: nowrap; border: 1px solid var(--sf-border); border-radius: 999px; }
  .col-lg-3:has(+ #setup-body) .list-group-item.active { order: -1; margin-top: 0; border-color: var(--bs-list-group-active-border-color); }
}
@media (min-width: 992px) {
  /* the full-page form bar is sticky (anywhere from mid-screen to the bottom edge), so its buttons stay clear of the pill / Auto Assist column instead */
  body:has(.ai-fab) .form-page-bar { padding-right: 168px; } body:has(.cti-dock) .form-page-bar { padding-right: 240px; }
}
@media (max-width: 359.98px) {
  /* 320px phones: the Dealer Principal's header (six action buttons) was 22px wider than the screen and clipped the profile menu */
  .sf-header { padding: 0 .25rem; gap: 0; } .sf-header-actions { gap: 0; }
}
@media (max-width: 575.98px) {
  body:has(.wiz) { --m-lift: 52px; }
  /* the header "+ New" is for wider screens: on a phone the page's own New (and the home buttons) are one tap away, and the header keeps search, bell and account */
  .hdr-new { display: none; }
  /* a live call keeps its pill, but at the top edge while a bottom sheet is open (the sheet leaves the top tenth of the screen free) */
  body.modal-open .cti-dock.on-call:not(.open) { bottom: auto; top: 8px; right: 8px; }
  /* Phone cards show four columns: the name and the first ticked ones (the data-m marker UI.table puts on them; a table without the marker shows its
     first four), so a chevron says the whole record is one tap away and the Columns menu says it too. */
  .dropdown-menu:has([data-change="list-col"]) > .small-2:first-child::after { content: " · phone cards show the first 4 ticked"; }
  .sf-table.sf-cards tbody tr.clickable { position: relative; padding-right: 1.9rem; }
  .sf-table.sf-cards tbody tr.clickable::after { content: "\f285"; font-family: bootstrap-icons; position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--sf-text-3); }
  /* inline widths that outgrow a small screen: width:auto selects take the width of their longest option, the report name box is 360px */
  .form-select, .form-control { max-width: 100%; } .sf-page-header .title input.form-control { width: 100% !important; max-width: 360px; }
  /* labour / parts / quotation line editors fit the sheet and keep the remove button in reach */
  .lines-editor .form-control-sm, .lines-editor .form-select-sm { min-width: 58px; font-size: 16px; padding: .25rem .4rem; }
  .lines-editor .sf-table td:last-child, .lines-editor .sf-table th:last-child { position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -2px 0 4px rgba(0,0,0,.08); }
  .lines-editor .sf-table th:last-child { background: #fafaf9; z-index: 4; }
  .lines-editor [data-lines-remove] { min-width: 40px; min-height: 40px; } .lines-editor [data-lines-add] { min-height: 40px; }
}
@media (max-width: 767.98px) {
  /* Every button, pill and tab link of a page or a sheet is 40px to tap, and the label sits in the middle of it (a link is not a <button>: with only a
     min-height its text would hang at the top). :where() keeps the weight at ONE class, so what sizes itself keeps its size (the record and form bars,
     the Studio toolbar, the line editors, the drawer) and a .btn-link (a text link inside a sentence) is left alone. The filter pills of Product master,
     Priority and the call centre set their own padding at two classes (.c360-pills .pill), so they are named too. Desktop is not in this block: its dense
     tables keep their 30px buttons. Up to 767.98px, the width of every other phone rule (a phone held sideways is 576-767px wide: its .btn-xs was 30px);
     the rule is the first of this block, right where it closed the 575.98px block before, so nothing else changes order. */
  :where(.sf-page, .modal) :is(.btn, .pill, .tab, .nav-link, .form-tab, .wiz-step):where(:not(.btn-link)), .c360-pills .pill { min-height: 40px; min-width: 40px; padding-block: calc((40px - 1.5em - 2px) / 2); }
  /* a table with no .sf-table-wrap (about twenty hand-written ones) scrolls inside its parent instead of being clipped by the body */
  :not(.sf-table-wrap):not(.table-responsive):has(> table:not(.sf-cards)) { overflow-x: auto; }
  :is(.sf-table-wrap, .table-responsive, .lines-editor, :has(> table:not(.sf-cards))) { overscroll-behavior-x: contain; }
  :is(.sf-table-wrap, .table-responsive, .lines-editor, :has(> table:not(.sf-cards)))::-webkit-scrollbar { height: 8px; width: 8px; }
  :is(.sf-table-wrap, .table-responsive, .lines-editor, :has(> table:not(.sf-cards)))::-webkit-scrollbar-track { background: #e9ecf1; border-radius: 4px; }
  :is(.sf-table-wrap, .table-responsive, .lines-editor, :has(> table:not(.sf-cards)))::-webkit-scrollbar-thumb { background: #9aa6b8; border-radius: 4px; }
  /* the first column of a wide hand-written table stays put (lists with a # column already pin it above) */
  .sf-table-wrap > .sf-table:not(.sf-cards):not(.perm-matrix):not(:has(th.rownum)) tr > :is(th, td):first-child:not([colspan]) { position: sticky; left: 0; z-index: 2; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; background: #fff; box-shadow: 2px 0 4px rgba(0,0,0,.06); }
  .sf-table-wrap > .sf-table:not(.sf-cards):not(.perm-matrix):not(:has(th.rownum)) thead tr > th:first-child:not([colspan]) { z-index: 4; background: #fafaf9; }
  /* the Edit / Deactivate column of a wide table stays reachable */
  .sf-table-wrap > .sf-table tr > td.text-end:last-child:has(> .btn, > .dropdown), .table-responsive > .table tr > td.text-end:last-child:has(> .btn, > .dropdown) { position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -2px 0 4px rgba(0,0,0,.06); }
  .sf-table-wrap > .sf-table thead th:last-child:empty { position: sticky; right: 0; z-index: 4; background: #fafaf9; box-shadow: -2px 0 4px rgba(0,0,0,.06); }
  .table-responsive > .table thead th:last-child:empty { position: sticky; right: 0; z-index: 4; background: #fff; box-shadow: -2px 0 4px rgba(0,0,0,.06); }
  .table-responsive td .form-control[type="number"] { min-width: 7.5rem; }
  /* Roles & Permissions: pinned permission names, 40px columns, compact vertical role names */
  .perm-matrix { font-size: 12px; }
  .perm-matrix tr > :first-child:not([colspan]) { position: sticky; left: 0; z-index: 3; width: 128px; min-width: 128px !important; max-width: 128px; padding: .3rem .4rem; white-space: normal; background: #fff; box-shadow: 2px 0 4px rgba(0,0,0,.08); }
  .perm-matrix thead tr > th:first-child { z-index: 5; vertical-align: bottom; background: #fafaf9; }
  .perm-matrix th.rot { height: auto; min-width: 44px; padding: .4rem .15rem; vertical-align: bottom; text-align: center; }
  .perm-matrix th.rot > div { writing-mode: vertical-rl; transform: rotate(180deg); transform-origin: 50% 50%; width: auto; height: 112px; margin: 0 auto; white-space: normal; line-height: 1.15; font-size: 11px; }
  .perm-matrix .scope-row select { min-width: 64px; padding: .15rem 1.2rem .15rem .3rem; background-position: right .3rem center; background-size: 10px; }
  .perm-matrix td { padding: .2rem; } .perm-matrix td.text-center { height: 44px; } .perm-matrix .form-check-input { width: 22px; height: 22px; }
}
/* the cue that a strip or table scrolls: its right edge fades while there is more to the right (browsers with scroll-driven animations).
   Elsewhere the strips keep a fixed fade over their end padding and tables rely on the clipped column at the edge and the visible scrollbar. */
@property --sx-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes sx-edge { 0%, 88% { --sx-r: 28px; } 100% { --sx-r: 0px; } }
@media (max-width: 767.98px) {
  @supports not (animation-timeline: scroll()) {
    .sf-tabs, .wiz-steps, .form-tabs, .col-lg-3:has(+ #setup-body) .list-group { padding-right: 28px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  }
  @supports (animation-timeline: scroll()) {
    /* a mask paints nothing outside its box, a menu included: while a row's menu is open (placed against the screen by UI.menuPopper, ui.js) the table drops its fade, or the
       entries that stand out of the table were invisible and could not be tapped (the :is() of the fade below weighs as much as an id, hence !important) */
    :is(.sf-table-wrap, .table-responsive, .lines-editor, :has(> table:not(.sf-cards))):has(.dropdown-menu.show) { -webkit-mask-image: none !important; mask-image: none !important; }
    :is(.sf-table-wrap, .table-responsive, .lines-editor, :has(> table:not(.sf-cards)), .sf-tabs, .wiz-steps, .form-tabs, .sf-path .steps, .col-lg-3:has(+ #setup-body) .list-group) { animation: sx-edge linear both; animation-timeline: scroll(self inline); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--sx-r)),transparent); mask-image: linear-gradient(90deg, #000 calc(100% - var(--sx-r)), transparent); }
  }
}

/* ===== Phone tap targets: nothing a finger has to hit is under 40px (tools/journeys62.js; measured by tools/journeys53.js with VIEWPORT=phone) =====
   The shell block above (<=575.98px) already gives .btn, .pill, .tab, .nav-link, .form-tab and .wiz-step 40px inside a page or a sheet, and the Add user form, the record
   and form bars and the bottom nav size themselves, so this block is only what was still small: the top bar, the softphone pill and the Menu drawer 44px, a form control
   44px (40px in a dense table, a line editor or the permission matrix), and 40px for the path bar stages, a checkbox / radio / switch row, the pencil of an inline edit, the
   dialog's close button, the org chart's toggle, a link that stands on its own (a related record, a phone number, "All pending") and a list-group row. A glyph is never enlarged:
   the hit area is, either by padding with a negative margin that hands the layout back (a field, a card header) or by a row that really is 40px tall (a table cell, a list card).
   A bare checkbox with no label around it (Home > My Tasks) cannot get a hit area from CSS alone: its markup needs a label. */
@media (max-width: 991.98px) {
  /* the Menu drawer (it serves up to the tablet width): every link, the group titles that open and close a group, the brand link; and the softphone pill above the bottom nav */
  .sb-item, .sb-group-title, .sb-brand > a { min-height: 44px; }
  .cti-dock .cti-pill { min-height: 44px; }
  /* every entry of a menu is 40px to tap below the desktop width, whoever drew it (a row's Open wizard / Clone campaign, a design's Download PNG, Users & Hierarchy, the
     Studio editor's More actions): the header menus get the same from UI.TAP_PAD, whose utilities still win where they are set. The label keeps the middle of the row
     (1.5em is its line); the Studio toolbar's own .5rem padding (767.98px block above) is named so that this rule outweighs it. Desktop keeps its dense 29px entries. */
  .dropdown-menu .dropdown-item, .se-tools > .dropdown .dropdown-item { min-height: 40px; padding-block: calc((40px - 1.5em) / 2); }
}
@media (max-width: 767.98px) {
  /* top bar: Search, Notifications and the Account menu */
  .sf-header .sf-icon-btn { width: 44px; height: 44px; }
  .sf-header .persona-toggle { min-width: 44px; min-height: 44px; justify-content: center; }
  /* form controls: 44px, and 40px for the small variants and inside a dense table / line editor / permission matrix (the hidden 1px lookup select and the global search keep their size) */
  .form-control:not(.form-control-sm):not(.form-control-plaintext):not(.lk-hidden):not(.visually-hidden), .form-select:not(.form-select-sm):not(.lk-hidden):not(.visually-hidden), .chip-in { min-height: 44px; }
  .form-control-sm, .form-select-sm { min-height: 40px; }
  /* (the same :not() chain as the 44px rule plus the container, so this one outweighs it: with a shorter chain a control in a table was 44px) */
  :is(.sf-table, .lines-editor, .table-responsive, .perm-matrix) .form-control:not(.form-control-sm):not(.form-control-plaintext):not(.lk-hidden):not(.visually-hidden), :is(.sf-table, .lines-editor, .table-responsive, .perm-matrix) .form-select:not(.form-select-sm):not(.lk-hidden):not(.visually-hidden) { min-height: 40px; }
  .chips-wrap { padding-top: 0; padding-bottom: 0; } .list-search .form-control { border-radius: 22px; }
  /* the path bar: a stage is 40px to tap (the arrow notches grow with it) */
  .sf-path .step { height: 40px; line-height: 40px; } .sf-path .step::before, .sf-path .step::after { border-top-width: 20px; border-bottom-width: 20px; }
  .sf-path .step:first-child { border-radius: 20px 0 0 20px; } .sf-path .step:last-child { border-radius: 0 20px 20px 0; }
  /* the pencil of an inline edit: the glyph stays 12px, its hit area is 40px (the negative margins give the layout back); there is no hover on a phone, so it is shown */
  .sf-field .v .edit-pencil { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -10px -14px -10px auto; opacity: .5; }
  /* a checkbox, a radio and a switch: the row is 40px tall (a one-line label and its box are centred in it), the label's box is the whole row; a check list row (a document, a handover step) is 40px too */
  .form-check:not(.geo-density-toggle *) { min-height: 40px; padding-top: calc((40px - 1.5em) / 2); padding-bottom: calc((40px - 1.5em) / 2); }
  .form-check:not(.geo-density-toggle *) .form-check-label { display: block; padding-block: calc((40px - 1.5em) / 2); margin-block: calc((40px - 1.5em) / -2); }
  .check-row, .doc-row, .addon { min-height: 40px; } /* .addon: a quotation's add-on row (a label around its checkbox) */
  .chk-hit { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; margin: -9px; cursor: pointer; } .chk-hit > .form-check-input { margin: 0; } /* <label class="chk-hit"><input type="checkbox" ...></label>: a checkbox with no text of its own (Home > My Tasks) gets its hit area from the label */
  /* ... and in a table cell (a list's select-all and row boxes, UI.table) the label takes back exactly the cell's padding (.42rem .5rem below 768px): the cell clips, and the row
     below and the scroll box above cut what stood out of it, so with -9px the box was only 38-40 x 37-39px to tap; this way it fills its 40px cell */
  .sf-table :is(th, td) > .chk-hit { margin: -.42rem -.5rem; }
  /* the dialog's close button and the org chart's toggle: a 40px hit area; the margins keep the header and the row as tall and as wide as before */
  .modal-header .btn-close { box-sizing: border-box; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; margin: -9px -8px -9px auto; }
  .org-toggle { box-sizing: border-box; width: 40px; height: 40px; margin: 0 -11px; }
  /* a long badge in a field (a tag such as "Only 1/4 qualification fields known - awaiting first conversation") wraps inside its field instead of pushing the page sideways */
  :is(.sf-field, .sf-highlights .fields) .v .sf-badge { white-space: normal; max-width: 100%; }
  /* a link that stands on its own in a field, a highlight, a stat row, a card header, an announcement, a next-best-action card, a check row, a trip card, a toast, a step of the booking's
     delivery readiness card, the title of a timeline entry or the bold line of a record card (a related record, a phone number, "All pending", the vehicle's owner): its box is 40px+ tall
     (min-height counts the padding: a small-2 line of 15px is 40px too) and 40px wide, an inline-block so that the padding and the width count; the padding is the hit area and the negative
     margin hands the layout back, so the field or the header keeps its height. A link in a table cell is handled below (the cell clips, so the row itself grows); a link in running text (a
     sentence, a timeline entry's body) is left alone. */
  :is(.sf-field .v, .sf-highlights .fields .v, .mini-stat .v, .sf-card-header, .sf-card-header .actions, .ann-head, .ai-nba .min-w-0, .check-row .n, .trip .d-flex, .sf-toast .b, .doc-row .n > div, .sf-timeline .item .ttl, .sf-card-body > .fw-600) > a:not(.btn, .mini-stat, [data-bs-toggle]) { display: inline-block; box-sizing: border-box; min-height: 40px; padding-block: 12px; margin-block: -12px; min-width: 40px; }
  a.mini-stat { min-height: 40px; align-items: center; } .list-group-item-action { min-height: 40px; }
  /* a record's Activity card: views/record.js draws its body as a 760px box with its own scroll bar (for the desktop column beside the details). On a phone the card is the last of the
     page and that box was taller than the screen between the top bar and the bottom bars: a scroll area nested in the page that a thumb cannot tell apart, whose last visible entry was cut
     in two right under the floating buttons (its link's hit area half under Auto Assist). Here the timeline scrolls with the page. */
  .sf-card-body:has(> .sf-timeline) { max-height: none !important; overflow: visible !important; }
  /* the action column of a wide table is sticky (z-index 2 per cell, so every row is a layer of its own): the cell whose menu is open comes to the front, or the next row's cell covers the lower entries of the menu */
  .sf-table-wrap > .sf-table tr > td.text-end:has(.dropdown-menu.show), .table-responsive > .table tr > td.text-end:has(.dropdown-menu.show) { z-index: 6; }
  /* a link in a scrolling table's cell fills its cell: the row is 40px tall (the negative margin takes back the cell's own padding; the cell clips, so padding alone would not give a hit area).
     A list's .sf-cards table is a plain table from 576px (a phone held sideways), so this is its rule there too; under 576px its cards override it below. */
  table td > a:not(.btn) { display: inline-block; box-sizing: border-box; min-width: 40px; min-height: 40px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; line-height: 1.5; padding-block: calc((40px - 1.5em) / 2); margin-block: -.42rem; }
}
@media (max-width: 575.98px) {
  /* a link in a list card (the phone's table) is a 40px row of the card (not the table cell's padded box above: a card's cell has no padding to take back); the card's own vertical padding
     is trimmed, the rows carry it now */
  .sf-table.sf-cards tbody td > a:not(.btn) { display: flex; align-items: center; min-height: 40px; min-width: 40px; padding-block: 0; margin-block: 0; }
  .sf-table.sf-cards tbody tr { padding-top: .1rem; padding-bottom: .1rem; }
}

/* ---------- offline pill (UI.syncOffline): shown only while the browser is offline; it never takes a tap ---------- */
.sf-offline { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 2001; pointer-events: none; display: inline-flex; align-items: center; gap: .35rem; background: #3e3e3c; color: #fff; font-size: 12.5px; font-weight: 600; padding: .3rem .8rem; border-radius: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.25); white-space: nowrap; max-width: calc(100vw - 32px); }
.sf-offline:empty { display: none; }
/* a live dealership written by another tab of this browser (UI.writerBanner): one slim line in the page flow under the header, never fixed or sticky, so it covers no
   bottom bar, action bar or field on a phone or a desktop; "Use here" is a 40px tap target on a phone */
.writer-banner { display: flex; align-items: center; gap: .6rem; padding: .3rem .6rem .3rem 1rem; background: #e8f1fb; border-bottom: 1px solid #c5daf2; color: #1d4f86; font-size: 12.5px; line-height: 1.4; }
body.has-sidebar .writer-banner { margin-left: var(--sb-current, var(--sb-w)); transition: margin-left .2s ease; }
.writer-banner > span { min-width: 0; flex: 1 1 auto; }
.writer-banner > .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 575.98px) { .writer-banner { padding-left: .75rem; } .writer-banner > .btn { min-height: 40px; } }
/* ---------- touch screens, phones and tablets in any orientation ---------- */
/* a field under 16px makes iOS Safari zoom in on focus and stay zoomed (a landscape phone is wider than 576px, so the phone rule above did not reach it); the selectors that
   set a smaller size elsewhere are repeated here so this one, coming last, wins. A mouse keeps the desktop sizes. */
@media (pointer: coarse) {
  .form-control, .form-select, .sf-search input, .sf-toolbar .form-control, .sf-toolbar .form-select, .lines-editor .form-control-sm, .lines-editor .form-select-sm, .chat-comment-box input, .chat-composer textarea,
  .perm-matrix .scope-row select, .cti-dialbox input, .call-search input, .geo-density-filter .form-select, .sf-login.enterprise .sf-login-card .form-control,
  textarea, select, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=button]):not([type=submit]):not([type=reset]):not([type=image]) { font-size: 16px; }
}
/* the map's tools (Zoom in / out, Fit, Cluster, Expand) are 40px to tap on a phone */
@media (max-width: 575.98px) { .gm-tools { gap: 3px; top: 8px; right: 8px; } .gm-tools button { width: 40px; height: 40px; font-size: 16px; } .gm-info { max-width: calc(100% - 64px); } }
/* a checkbox or switch with no label of its own (UI.checkZones marks its holder .chk-zone below 768px): the holder is the 40 x 40 target, a tap on it ticks the box */
@media (max-width: 767.98px) {
  .chk-zone { cursor: pointer; min-width: 40px; min-height: 40px; }
  td.chk-zone, th.chk-zone { height: 40px; }
  div.chk-zone:not(.form-check) { display: flex; align-items: center; justify-content: center; }
  .form-check.chk-zone { display: flex; align-items: center; } .form-check.chk-zone > .form-check-input { float: none; margin-top: 0; }
}
/* the one-time credentials card (Admin > Users > Add user, the platform console): its four buttons stack full width on a phone, the main one first, so none is squeezed */
@media (max-width: 575.98px) {
  .modal-footer:has(#cred-copy) { flex-direction: column-reverse; align-items: stretch; }
  .modal-footer:has(#cred-copy) > .btn { flex: 0 0 auto; width: 100%; margin: .2rem 0; white-space: normal; }
}
/* someone who asked for less motion gets none: no pulsing, shaking or spinning loops and no slide-in transitions (the login card, Creative AI and the ad generator
   already stop theirs above) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

/* Ad previews (js/views/ad_preview.js): platform mock-ups. Every rule is under .adp, so nothing leaks into the app. */
.adp .adp-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.adp .adp-tabs { display: flex; flex-wrap: wrap; gap: .35rem; }
.adp .adp-tabs .btn.active, .adp .adp-device .btn.active { background: var(--sf-brand-light); border-color: var(--sf-brand); color: var(--sf-brand); }
.adp .adp-stage { display: flex; justify-content: center; background: var(--sf-bg); border: 1px solid var(--sf-border); border-radius: .5rem; padding: 1rem .5rem; overflow-x: auto; }
.adp .adp-phone { width: 300px; max-width: 100%; flex: 0 0 auto; border: 10px solid #16181d; border-radius: 34px; background: #16181d; position: relative; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.adp .adp-phone::before { content: ""; position: absolute; top: -2px; left: 50%; transform: translateX(-50%); width: 96px; height: 18px; background: #16181d; border-radius: 0 0 12px 12px; z-index: 2; }
.adp .adp-screen { height: 560px; overflow-y: auto; border-radius: 24px; background: #fff; color: #1c1e21; font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; text-align: left; }
.adp .adp-desktop { width: 100%; max-width: 620px; background: #fff; color: #1c1e21; border-radius: .5rem; box-shadow: 0 2px 10px rgba(0,0,0,.08); overflow: hidden; font: 14px/1.45 Arial, sans-serif; text-align: left; }
.adp .adp-strong { font-weight: 600; }
.adp .adp-muted { color: #65676b; font-size: 12px; }
.adp .adp-up { text-transform: uppercase; color: #65676b; font-size: 11px; }
.adp .adp-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adp .adp-img { display: block; width: 100%; object-fit: cover; background: #111; }
.adp .adp-noimg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; width: 100%; background: #e4e6eb; color: #65676b; font-size: 12px; }
.adp .adp-noimg .bi { font-size: 28px; }
.adp .adp-av { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #1877f2; color: #fff; font-weight: 700; }
.adp .adp-ring { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e1306c; width: 32px; height: 32px; background: #833ab4; }
/* Facebook */
.adp .adp-fb { background: #fff; }
.adp .adp-screen .adp-fb { padding-top: 22px; background: #f0f2f5; }
.adp .adp-fb-head { display: flex; gap: .5rem; align-items: center; padding: .6rem .75rem; background: #fff; }
.adp .adp-fb-text { padding: 0 .75rem .6rem; background: #fff; }
.adp .adp-fb-link { display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; background: #f0f2f5; }
.adp .adp-fb-link-t { flex: 1; min-width: 0; }
.adp .adp-fb-btn { flex: 0 0 auto; background: #e4e6eb; color: #050505; border-radius: 6px; padding: .35rem .7rem; font-weight: 600; font-size: 12px; }
.adp .adp-fb-actions { display: flex; justify-content: space-around; padding: .5rem; color: #65676b; font-weight: 600; font-size: 12px; background: #fff; border-top: 1px solid #ced0d4; }
/* Instagram */
.adp .adp-ig { padding-top: 22px; background: #fff; }
.adp .adp-desktop .adp-ig { padding-top: 0; }
.adp .adp-ig-head { display: flex; gap: .55rem; align-items: center; padding: .55rem .75rem; }
.adp .adp-ig-cta { display: flex; justify-content: space-between; align-items: center; padding: .55rem .75rem; color: #0095f6; font-weight: 600; border-bottom: 1px solid #efefef; }
.adp .adp-ig-icons { display: flex; gap: 1rem; padding: .5rem .75rem; font-size: 20px; }
.adp .adp-ig-cap { padding: 0 .75rem .75rem; }
/* Story */
.adp .adp-story { position: relative; min-height: 100%; height: 560px; background: #111; color: #fff; display: flex; flex-direction: column; }
.adp .adp-story-bars { display: flex; gap: 4px; padding: 26px 10px 6px; }
.adp .adp-story-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.4); }
.adp .adp-story-bars i:first-child { background: #fff; }
.adp .adp-story-head { display: flex; gap: .5rem; align-items: center; padding: 0 10px; }
.adp .adp-story-sp { font-size: 11px; opacity: .8; }
.adp .adp-story-media { flex: 1; display: flex; align-items: center; padding: 8px 0; }
.adp .adp-story-media .adp-img { object-fit: contain; }
.adp .adp-story-cap { padding: 0 14px 8px; font-weight: 600; text-align: center; }
.adp .adp-story-cta { display: flex; flex-direction: column; align-items: center; padding-bottom: 18px; }
.adp .adp-story-cta span { background: #fff; color: #111; border-radius: 16px; padding: .3rem .9rem; font-weight: 600; font-size: 12px; }
/* video creatives in the ad preview: thumbnail + play button, swapped for the player on click; the Reels mock-up */
.adp .adp-vid { position: relative; width: 100%; background: #111; overflow: hidden; }
.adp .adp-vid .adp-img { width: 100%; height: 100%; object-fit: cover; }
.adp .adp-vid video.adp-img { object-fit: contain; }
.adp .adp-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.adp .adp-play:hover, .adp .adp-play:focus-visible { background: rgba(0,0,0,.75); outline: 2px solid #fff; }
.adp .adp-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.adp .adp-story-media .adp-vid { max-height: 100%; }
.adp .adp-reel { position: relative; height: 560px; background: #000; color: #fff; overflow: hidden; }
.adp .adp-reel-media { position: absolute; inset: 0; display: flex; align-items: center; }
.adp .adp-reel-media .adp-vid { height: 100%; aspect-ratio: auto !important; }
.adp .adp-reel-side { position: absolute; right: 8px; bottom: 130px; display: flex; flex-direction: column; gap: 18px; font-size: 22px; text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }
.adp .adp-reel-foot { position: absolute; left: 0; right: 48px; bottom: 0; padding: 10px 12px 16px; background: linear-gradient(transparent, rgba(0,0,0,.65)); pointer-events: none; }
.adp .adp-reel-head { display: flex; gap: .5rem; align-items: center; margin-bottom: 4px; }
.adp .adp-reel-cap { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adp .adp-reel-audio { font-size: 11px; opacity: .9; margin: 4px 0 8px; }
.adp .adp-reel-cta { display: inline-block; background: #fff; color: #111; border-radius: 6px; padding: .25rem .7rem; font-weight: 600; font-size: 12px; }
/* the campaign wizard's video creative panel (js/views/video_creative.js) */
.vc-player { display: block; width: 100%; max-height: 420px; background: #000; border-radius: 8px; }
.vc-player.vc-9-16 { max-width: 260px; margin: 0 auto; }
.vc-drop { border: 2px dashed var(--sf-border, #c9c9c9); border-radius: 10px; padding: 1.5rem 1rem; text-align: center; cursor: pointer; }
.vc-drop.vc-over, .vc-drop:hover, .vc-drop:focus-within { border-color: var(--sf-brand, #0176d3); background: rgba(1,118,211,.04); }
.vc-voices { max-height: 240px; overflow-y: auto; border: 1px solid var(--sf-border, #dddbda); border-radius: 8px; }
.vc-voice { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .45rem .6rem; border: 0; border-bottom: 1px solid var(--sf-border, #eee); background: transparent; text-align: left; }
.vc-voice:last-child { border-bottom: 0; }
.vc-voice.active { background: rgba(1,118,211,.08); box-shadow: inset 3px 0 0 var(--sf-brand, #0176d3); }
.vc-voice .vc-voice-pick { flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; padding: 0; color: inherit; }
/* Google search */
.adp .adp-gs { padding: 26px .85rem 1rem; font-family: Arial, sans-serif; }
.adp .adp-gs-desk { padding: 1rem 1.25rem 1.25rem; }
.adp .adp-gs-bar { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.adp .adp-gs-logo { font-size: 20px; letter-spacing: -1px; }
.adp .adp-gs-q { flex: 1; min-width: 0; border: 1px solid #dfe1e5; border-radius: 20px; padding: .35rem .8rem; color: #202124; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adp .adp-gs-sp { font-weight: 700; font-size: 12px; color: #202124; margin-bottom: .35rem; }
.adp .adp-gs-site { display: flex; gap: .5rem; align-items: center; margin-bottom: .25rem; }
.adp .adp-fav { width: 26px; height: 26px; font-size: 12px; background: #f1f3f4; color: #1a0dab; }
.adp .adp-gs-name { font-size: 13px; color: #202124; }
.adp .adp-gs-url { font-size: 12px; color: #006621; }
.adp .adp-gs-h { color: #1a0dab; font-size: 18px; line-height: 1.3; margin: .2rem 0 .3rem; }
.adp .adp-gs-d { color: #4d5156; font-size: 13px; }
/* WhatsApp */
.adp .adp-wa { display: flex; flex-direction: column; min-height: 100%; height: 560px; }
.adp .adp-wa-head { display: flex; gap: .55rem; align-items: center; padding: 26px .7rem .55rem; background: #075e54; color: #fff; }
.adp .adp-wa-sub { font-size: 11px; opacity: .8; }
.adp .adp-wa-chat { flex: 1; padding: .75rem; background: #ece5dd; }
.adp .adp-wa-bubble { max-width: 88%; background: #fff; border-radius: 0 8px 8px 8px; padding: .35rem .35rem .2rem; box-shadow: 0 1px 1px rgba(0,0,0,.1); }
.adp .adp-wa-img { border-radius: 6px; }
.adp .adp-wa-time { text-align: right; font-size: 10px; color: #667781; }
.adp .adp-wa-btn { border-top: 1px solid #e9edef; margin-top: .25rem; padding-top: .35rem; text-align: center; color: #00a884; font-weight: 600; }
/* SMS */
.adp .adp-sms { display: flex; flex-direction: column; min-height: 100%; height: 560px; }
.adp .adp-sms-head { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 28px .75rem .6rem; border-bottom: 1px solid #e5e5ea; }
.adp .adp-sms-chat { flex: 1; padding: .75rem; }
.adp .adp-sms-bubble { display: inline-block; max-width: 85%; background: #e9e9eb; color: #000; border-radius: 16px; padding: .5rem .75rem; }
/* Email */
.adp .adp-mail { padding-top: 22px; }
.adp .adp-desktop .adp-mail { padding-top: 0; }
.adp .adp-mail-meta { padding: .6rem .75rem; border-bottom: 1px solid #e5e5ea; font-size: 12px; }
.adp .adp-mail-body { padding: .75rem; }
.adp .adp-mail-btn { display: inline-block; margin-top: .6rem; background: var(--sf-brand); color: #fff; border-radius: 6px; padding: .4rem .9rem; font-weight: 600; }

/* AI generation costs (views/ai_wallet.js): the wallet badge and the image resolution picker */
.aiw-badge { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--sf-border); background: var(--sf-card); border-radius: 999px; padding: .25rem .8rem .25rem .6rem; color: var(--sf-text); line-height: 1.15; cursor: pointer; }
.aiw-badge:hover { border-color: var(--sf-brand); }
.aiw-badge .bi { font-size: 1.1rem; color: var(--sf-brand); }
.aiw-badge .aiw-amt { display: block; font-weight: 700; font-size: .95rem; }
.aiw-badge .aiw-sub { display: block; font-size: .7rem; color: var(--sf-text-3); }
.aiw-badge.aiw-low { border-color: var(--sf-warning); background: #fdf5e6; }
.aiw-badge.aiw-low .bi, .aiw-badge.aiw-low .aiw-amt { color: var(--sf-warning); }
.aiw-badge.aiw-empty { border-color: var(--sf-danger); background: #fdecee; }
.aiw-badge.aiw-empty .bi, .aiw-badge.aiw-empty .aiw-amt { color: var(--sf-danger); }
.aiw-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.aiw-res-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .55rem .4rem .5rem; border: 1px solid var(--sf-border); border-radius: 8px; background: var(--sf-card); color: var(--sf-text); text-align: center; }
.aiw-res-card:hover { border-color: var(--sf-brand); }
.aiw-res-card.active { border: 2px solid var(--sf-brand); background: var(--sf-brand-light); padding: calc(.55rem - 1px) calc(.4rem - 1px) calc(.5rem - 1px); }
.aiw-res-big { font-size: 1.1rem; font-weight: 800; }
.aiw-res-price { font-weight: 700; color: var(--sf-brand); }
.aiw-res-tag { font-size: .68rem; color: var(--sf-success); font-weight: 600; }
@media (max-width: 420px) { .aiw-res-card .text-muted { display: none; } }
