:root {
  /* Next Levels brand palette (from logo): navy #202868, light blue #93bce4 */
  --navy: #202868; --navy-2: #2e3a8c; --gold: #93bce4; --bg: #f4f6fa;
  --card: #ffffff; --text: #1c2733; --muted: #6b7a8c; --line: #e3e8ee;
  --green: #1e8e5a; --red: #c0392b; --amber: #b7791f; --blue: #2563a8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
h1 { font-size: 22px; } h2 { font-size: 18px; margin-bottom: 12px; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #182052, var(--navy) 55%, #2e3a8c); }
.login-card { background: var(--card); padding: 40px; border-radius: 14px; width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center; }
.login-card h1 { margin: 12px 0 4px; color: var(--navy); }
.login-card form { margin-top: 22px; text-align: left; }
.brand-mark { width: 54px; height: 54px; border-radius: 12px; background: var(--navy); color: var(--gold);
  font-weight: 800; font-size: 20px; display: inline-flex; align-items: center; justify-content: center; }
.brand-mark.small { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; margin-right: 8px; }

label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { width: 100%; padding: 9px 11px; margin-top: 5px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(37,99,168,.35); border-color: var(--blue); }
textarea { min-height: 70px; resize: vertical; }

.btn { padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); }
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 700; }
.btn.gold:hover { background: #a7c9ec; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.danger { color: var(--red); }
.btn.full { width: 100%; margin-top: 6px; }
.error { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* Topbar */
.topbar { display: flex; align-items: center; gap: 18px; background: var(--navy); color: #fff;
  padding: 10px 22px; position: sticky; top: 0; z-index: 50; flex-wrap: wrap; }
.brand { font-weight: 700; display: flex; align-items: center; white-space: nowrap; }
#nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
#nav a { color: rgba(255,255,255,.75); text-decoration: none; padding: 7px 12px; border-radius: 7px;
  font-size: 14px; font-weight: 600; }
#nav a:hover { color: #fff; }
#nav a.active { background: rgba(147,188,228,.22); color: #cfe2f5; }
/* v7.29 grouped menus */
.nav-group { position: relative; }
.nav-group-btn { background: none; border: 0; color: rgba(255,255,255,.75); padding: 7px 12px; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer; }
.nav-group-btn:hover, .nav-group.open .nav-group-btn { color: #fff; background: rgba(255,255,255,.08); }
.nav-group.active .nav-group-btn { background: rgba(147,188,228,.22); color: #cfe2f5; }
.nav-caret { font-size: 10px; opacity: .7; }
.nav-menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; min-width: 200px; background: var(--navy); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 6px; z-index: 95; box-shadow: 0 12px 28px rgba(0,0,0,.35); flex-direction: column; gap: 2px; }
.nav-group.open .nav-menu { display: flex; }
.nav-menu a { display: block; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.whoami { font-size: 13px; color: rgba(255,255,255,.85); }
.bell { position: relative; background: none; border: none; font-size: 19px; cursor: pointer; color: #fff; }
.bell-count { position: absolute; top: -6px; right: -8px; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 700; border-radius: 9px; padding: 1px 5px; }

.notif-panel { position: fixed; right: 18px; top: 56px; width: 380px; max-height: 65vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.2); z-index: 60; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.notif-item.unread { background: #eef5fc; }
.notif-item .when { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

main { padding: 24px; max-width: 1280px; margin: 0 auto; }

/* Cards & tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.card-head h2 { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  padding: 8px 10px; border-bottom: 2px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: #f8fafc; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* Status pills */
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pill.gray { background: #eceff3; color: var(--muted); }
.pill.blue { background: #e3edf8; color: var(--blue); }
.pill.amber { background: #fbf0da; color: var(--amber); }
.pill.green { background: #e2f4ea; color: var(--green); }
.pill.navy { background: #e2e8f2; color: var(--navy); }
.pill.red { background: #f9e5e2; color: var(--red); }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 26px; font-weight: 800; color: var(--navy); margin-top: 6px; }
.stat .value.green { color: var(--green); }

/* Forms grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,36,64,.5); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; padding: 26px; width: 100%; max-width: 640px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.modal h2 { color: var(--navy); }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy);
  color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 14px; z-index: 200; box-shadow: 0 8px 30px rgba(0,0,0,.3); }

.timeline { font-size: 13px; line-height: 1.9; }
.timeline .done { color: var(--green); }
.timeline .todo { color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; font-size: 13.5px; margin: 10px 0; }
.detail-grid div b { color: var(--muted); font-weight: 600; font-size: 12px; display: block; }

/* v2 additions */
.ball-banner { display:flex; align-items:center; gap:14px; background:#eef5fc; border:1px solid #c6dcf1;
  border-radius:12px; padding:14px 18px; margin-bottom:16px; flex-wrap:wrap; }
.ball-banner .who { font-weight:800; color:var(--navy); }
.ball-banner .gate { color:var(--red); font-weight:600; font-size:13px; }
.tracks { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; margin:14px 0; }
.track { border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fff; }
.track .t-label { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin-bottom:5px; }
.tabs { display:flex; gap:4px; border-bottom:2px solid var(--line); margin:16px 0 14px; flex-wrap:wrap; }
.tabs button { border:none; background:none; padding:9px 14px; font-size:13.5px; font-weight:700; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; }
.tabs button.active { color:var(--navy); border-bottom-color:var(--gold); }
.comment { border-left:3px solid var(--line); padding:6px 12px; margin:8px 0; font-size:13.5px; }
.comment .who { font-weight:700; font-size:12.5px; }
.comment .when { color:var(--muted); font-size:11.5px; }
.task-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); font-size:13.5px; flex-wrap:wrap; }
.ledger td:last-child { text-align:right; font-variant-numeric:tabular-nums; }
.chip-row { display:flex; gap:8px; flex-wrap:wrap; margin:6px 0; }
.file-row { display:flex; gap:10px; align-items:center; padding:6px 0; font-size:13.5px; border-bottom:1px solid var(--line); }
.subhead { font-size:14px; font-weight:800; color:var(--navy); margin:16px 0 8px; }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:18px; } @media (max-width:900px){ .two-col{grid-template-columns:1fr;} }
.tree-doc { border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin-bottom:10px; background:#fff; }
.tree-prac { margin:8px 0 4px 14px; padding-left:12px; border-left:2px solid var(--line); }
.overdue { color: var(--red); font-weight:700; }

/* Jessica's finance dashboard */
.mtile-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-bottom:18px; }
.mtile { border-radius:14px; padding:22px 18px; cursor:pointer; color:#fff; min-height:120px; display:flex;
  flex-direction:column; justify-content:center; align-items:center; text-align:center; font-weight:700;
  transition:transform .12s, box-shadow .12s; border:none; }
.mtile:hover { transform:translateY(-3px); box-shadow:0 10px 26px rgba(32,40,104,.25); }
.mtile .mtile-num { font-size:40px; font-weight:800; line-height:1.1; }
.mtile .mtile-label { font-size:13.5px; margin-top:6px; opacity:.92; }
.mtile.navy { background:linear-gradient(135deg,#202868,#2e3a8c); }
.mtile.blue { background:linear-gradient(135deg,#4a7fb5,#93bce4); }
.mtile.amber { background:linear-gradient(135deg,#b7791f,#dba94e); }
.mtile.red { background:linear-gradient(135deg,#a63325,#c0392b); }
.mtile.green { background:linear-gradient(135deg,#166b44,#1e8e5a); }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.cal-head { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); text-align:center; padding:4px 0; font-weight:700; }
.cal-cell { border:1px solid var(--line); border-radius:10px; min-height:92px; padding:6px 7px; background:#fff;
  cursor:pointer; font-size:11.5px; transition:border-color .1s; overflow:hidden; }
.cal-cell:hover { border-color:var(--navy); }
.cal-cell.other { background:#f6f8fb; opacity:.55; }
.cal-cell.today { outline:2px solid var(--gold); }
.cal-cell .dnum { font-weight:800; font-size:12.5px; color:var(--navy); margin-bottom:3px; }
.cal-ev { display:block; border-radius:5px; padding:1px 5px; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:600; }
.cal-ev.inflow { background:#e2f4ea; color:#166b44; }
.cal-ev.outflow { background:#f9e5e2; color:#a63325; }
.cal-ev.prod { background:#e3edf8; color:#2563a8; }
.cal-ev.home { background:#eef5fc; color:#202868; }
.cal-ev.bill { background:#efe9f8; color:#7c3aed; }
.cal-ev.paid { opacity:.5; text-decoration:line-through; }

/* ============ dark mode (per-user toggle in the topbar) ============ */
body.dark {
  --bg: #10141f; --card: #1a2030; --text: #e5e9f2; --muted: #97a3b8; --line: #2c3550;
  --green: #43c98a; --red: #e0705e; --amber: #d9a441; --blue: #6fabe8;
}
body.dark input, body.dark select, body.dark textarea { background: #131826; color: var(--text); border-color: var(--line); }
body.dark .btn { background: #242c42; color: var(--text); border-color: var(--line); }
body.dark .btn.primary { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
body.dark .btn.gold { background: var(--gold); color: #10141f; }
body.dark .btn.danger { color: var(--red); }
body.dark .card, body.dark .stat, body.dark .login-card { background: var(--card); }
body.dark .modal { background: var(--card); color: var(--text); }
body.dark .notif-panel { background: var(--card); }
body.dark .notif-item.unread { background: #232d47; }
body.dark tr:hover td { background: #212942; }
body.dark .ball-banner { background: #1f2a45; border-color: #33436b; }
body.dark .track, body.dark .tree-doc, body.dark .cal-cell { background: #1f2637; }
body.dark .cal-cell.other { background: #171c2a; }
body.dark .cal-ev.home { background: #26355a; color: #b9d2ef; }
body.dark .cal-ev.bill { background: #2f2547; color: #c4a8f0; }
body.dark pre { background: #131826 !important; }
body.dark .empty { color: var(--muted); }
body.dark h1, body.dark h2 { color: var(--text); }
body.dark .modal h2, body.dark .login-card h1 { color: var(--gold); }
.theme-btn { background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px;
  padding: 4px 9px; cursor: pointer; font-size: 14px; }
.theme-btn:hover { border-color: #fff; }
body.dark .stat .value { color: #cdd9ec; }
body.dark .stat .value.green { color: var(--green); }
body.dark .ledger td b { color: var(--text); }
/* login logo swaps with theme: navy logo on light, white-letter logo (light blue arrows) on dark */
.login-logo-dark { display: none; }
body.dark .login-logo-light { display: none; }
body.dark .login-logo-dark { display: inline; }
body.dark .login-card svg[aria-label="NEXA"] { fill: #e5e9f2; }

/* v5.31: every list is sortable — headings look/feel clickable */
table th:not(:empty) { cursor: pointer; user-select: none; }
table th:not(:empty):hover { text-decoration: underline; }

/* ============ v5.47: Leads redesign — calm, focused, one thing at a time ============ */
.lead-list { display: flex; flex-direction: column; }
.lead-row { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .12s; border-radius: 10px; }
.lead-row:hover { background: #f8fafc; }
.lead-row:last-child { border-bottom: none; }
.lead-row .lr-main { flex: 1; min-width: 0; }
.lead-row .lr-name { font-weight: 700; font-size: 15px; }
.lead-row .lr-sub { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-row .lr-meta { display: flex; align-items: center; gap: 12px; flex: none; }
.lead-row .lr-due { font-size: 12.5px; font-weight: 700; color: #c2410c; }
.lead-row .lr-next { font-size: 12.5px; color: var(--muted); }
.lead-row .lr-chev { color: var(--muted); font-size: 16px; opacity: .5; }
.lead-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.lead-filters .lf { border: 1px solid var(--line); background: transparent; border-radius: 20px; padding: 5px 13px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .12s; }
.lead-filters .lf:hover { border-color: var(--blue); color: var(--text); }
.lead-filters .lf.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.lead-filters .lf b { font-weight: 800; }

/* Lead detail — the focused workspace */
.ld-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ld-head h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -.01em; }
.ld-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.ld-contact { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ld-contact a { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 20px;
  padding: 5px 13px; font-size: 12.5px; font-weight: 600; color: var(--text); text-decoration: none; transition: border-color .12s; }
.ld-contact a:hover { border-color: var(--blue); }
.ld-step { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 10px; }
.ld-focus { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--card); }
.ld-focus .lf-title { font-size: 16px; font-weight: 700; }
.ld-focus .lf-due { font-size: 12px; color: var(--muted); }
.ld-script { font-size: 14px; line-height: 1.65; margin: 12px 0 16px; white-space: pre-wrap; font-family: inherit; }
.ld-outcomes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ld-later { border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; overflow: hidden; }
.ld-later-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; font-size: 13.5px; }
.ld-later-row:hover { background: #f8fafc; }
.ld-later-row .muted { margin-left: auto; font-size: 12px; }
details.ld-more { border-top: 1px solid var(--line); margin-top: 16px; }
details.ld-more summary { list-style: none; cursor: pointer; padding: 13px 2px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); display: flex; align-items: center; gap: 8px; }
details.ld-more summary::-webkit-details-marker { display: none; }
details.ld-more summary::after { content: '›'; margin-left: auto; font-size: 16px; transition: transform .15s; }
details.ld-more[open] summary::after { transform: rotate(90deg); }
details.ld-more summary:hover { color: var(--text); }
details.ld-more .ld-more-body { padding: 2px 2px 14px; }
.btn.green { color: var(--green); border-color: rgba(30,142,90,.45); }
.btn.green:hover { border-color: var(--green); }
body.dark .lead-row:hover, body.dark .ld-later-row:hover { background: #212942; }
body.dark .ld-focus { background: #1f2637; }

/* ============ v5.49: Kriston's pipeline board (kanban) ============ */
.pipe-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 10px;
  overflow-x: auto; padding-bottom: 6px; align-items: start; }
.pipe-col { background: #f2f5f9; border: 1px solid var(--line); border-radius: 12px; min-height: 120px;
  display: flex; flex-direction: column; max-height: 480px; }
.pipe-cards { overflow-y: auto; }
.pipe-col-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px;
  font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pipe-col-head .n { background: #e0e6ee; border-radius: 10px; padding: 1px 8px; font-size: 11.5px; color: var(--text); }
.pipe-cards { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; }
.pipe-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  cursor: pointer; transition: border-color .12s, transform .12s; }
.pipe-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.pipe-card .pc-name { font-weight: 700; font-size: 13.5px; }
.pipe-card .pc-sub { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.pipe-card .pc-ball { font-size: 11.5px; margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.pipe-card .pc-ball .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pipe-card .pc-foot { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.pipe-card.exc { border-left: 3px solid var(--red); }
.pipe-card.done { opacity: .6; }
.pipe-age { font-size: 10.5px; font-weight: 800; border-radius: 9px; padding: 1px 7px; background: #eceff3; color: var(--muted); }
.pipe-age.warn { background: #fbf0da; color: var(--amber); }
.pipe-age.late { background: #f9e5e2; color: var(--red); }
.pipe-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 16px 8px 20px; }
body.dark .pipe-col { background: #171c2b; }
body.dark .pipe-col-head .n { background: #242c42; }
body.dark .pipe-age { background: #242c42; }

/* ============ v5.53: client-facing presentation page (commonsku-style, Next Levels navy) ============ */
.pres-wrap { max-width: 1040px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pres-banner { background: linear-gradient(120deg, #182052, var(--navy) 60%, #2e3a8c); color: #fff;
  display: flex; align-items: center; gap: 18px; padding: 22px 26px; }
.pres-logo { background: #fff; border-radius: 10px; padding: 10px 14px; flex: none; }
.pres-logo img { height: 42px; display: block; }
.pres-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pres-title b { font-size: 21px; }
.pres-title span { font-size: 13px; opacity: .85; letter-spacing: .03em; }
.pres-wordmark { height: 34px; margin-left: auto; opacity: .95; }
.pres-intro { padding: 18px 26px 0; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; }
.pres-item { display: flex; gap: 26px; padding: 26px; border-bottom: 8px solid var(--bg); }
.pres-item:last-of-type { border-bottom: none; }
.pres-imgs { width: 320px; flex: none; }
.pres-main { width: 100%; height: 300px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pres-noimg { display: flex; align-items: center; justify-content: center; font-size: 48px; color: var(--muted); }
.pres-thumbs { display: flex; gap: 8px; margin-top: 8px; justify-content: center; flex-wrap: wrap; }
.pres-thumbs img { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.pres-thumbs img:hover { border-color: var(--navy); }
.pres-info { flex: 1; min-width: 0; }
.pres-info h3 { font-size: 19px; margin-bottom: 8px; }
.pres-desc { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; color: var(--text); }
.pres-sec { font-size: 16px; font-weight: 700; margin: 16px 0 6px; }
.pres-price { width: 100%; border: 1px solid var(--line); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.pres-price th { width: 52px; text-transform: uppercase; font-size: 11px; padding: 8px 10px; border-bottom: 0; }
.pres-price td { text-align: right; padding: 8px 12px; border-bottom: 0; font-variant-numeric: tabular-nums; }
.pres-price tr:first-child { background: #f6f8fb; }
.pres-comment { width: 100%; margin-top: 14px; min-height: 54px; }
.pres-clientnote { margin-top: 12px; font-size: 13.5px; color: var(--amber); background: #fbf0da55; border-radius: 8px; padding: 8px 12px; }
.pres-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 26px; background: #f6f8fb;
  font-size: 13px; color: var(--muted); line-height: 1.6; }
.pres-actionbar { position: sticky; bottom: 0; max-width: 1040px; margin: 12px auto 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; display: flex; align-items: center; gap: 10px;
  justify-content: flex-end; box-shadow: 0 -6px 24px rgba(15,36,64,.08); }
.pres-actionbar .muted { margin-right: auto; }
@media (max-width: 760px) { .pres-item { flex-direction: column; } .pres-imgs { width: 100%; } .pres-wordmark { display: none; } }
body.dark .pres-wrap, body.dark .pres-main, body.dark .pres-thumbs img { background: var(--card); }
body.dark .pres-price tr:first-child, body.dark .pres-footer { background: #1f2637; }

/* v5.55 — drag & drop: upload labels light up as drop targets; file links are draggable out */
label.drop-hot { outline: 2px dashed var(--blue); outline-offset: 3px; border-radius: 8px; background: #eef5fc; }
body.dark label.drop-hot { background: #1f2a45; }
.file-row a { cursor: grab; }
.file-row a:active { cursor: grabbing; }

/* v5.47 (merged) — form-protection shake: outside clicks on a form modal wiggle instead of closing */
@keyframes nexa-shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-7px)} 45%{transform:translateX(6px)} 70%{transform:translateX(-4px)} 90%{transform:translateX(2px)} }
#modal.shake { animation: nexa-shake .35s ease; }

/* v5.58 — client Approve & Pay: full-screen proof viewer + invoice/pay screen */
.overlay { position: fixed; inset: 0; background: rgba(15,36,64,.72); z-index: 120; display: flex; align-items: center; justify-content: center; padding: 18px; }
.overlay.hidden { display: none; }
.overlay-panel { background: #fff; border-radius: 16px; width: min(1100px, 100%); height: min(92vh, 900px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.overlay-panel.pay { width: min(640px, 100%); height: auto; max-height: 92vh; }
.overlay-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e2e8f0; color: var(--navy); }
.overlay-stage { flex: 1; overflow: auto; background: #1f2937; display: flex; align-items: center; justify-content: center; }
.overlay-stage img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; background: #fff; }
.overlay-stage img.zoomed { max-width: none; max-height: none; width: auto; cursor: zoom-out; align-self: flex-start; margin: auto; }
.overlay-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.overlay-foot { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid #e2e8f0; }
.overlay-foot .actions { margin: 0; }
.pay-body { padding: 18px; overflow: auto; }
.pay-body .ledger tr.faded td { color: #94a3b8; }
.pay-body .ledger tr.total td { font-size: 16px; border-top: 2px solid var(--navy); padding-top: 8px; }
.banner-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.method-toggle { margin-top: 14px; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; padding: 12px 10px; border-radius: 12px; border: 2px solid #cbd5e1; background: #fff; font-size: 14.5px; font-weight: 600; color: var(--navy); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.seg button small { font-weight: 500; color: #64748b; font-size: 12px; }
.seg button.on { border-color: var(--navy); background: #eef3fb; box-shadow: 0 0 0 3px rgba(32,40,104,.12); }
#nexa-overlay .overlay-panel.shake { animation: nexa-shake .35s ease; }
body.dark .overlay-panel { background: var(--card); color: var(--text); }
body.dark .overlay-head, body.dark .overlay-foot { border-color: #334155; }
body.dark .seg button { background: var(--card); color: var(--text); border-color: #475569; }
body.dark .seg button.on { background: #1e293b; border-color: var(--gold); }
body.dark .banner-ok { background: #064e3b; color: #d1fae5; border-color: #065f46; }
.pdf-pages { width: 100%; height: 100%; overflow: auto; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pdf-page { background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.4); cursor: zoom-in; max-width: 100%; height: auto; }
.pdf-page.zoomed { max-width: none; width: auto !important; cursor: zoom-out; }
.pdf-label { color: #cbd5e1; font-size: 12px; margin-bottom: 8px; }
.paygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.paygrid.one { grid-template-columns: 1fr; }
.paybtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; border-radius: 14px; border: 2px solid var(--navy); background: var(--navy); color: #fff; cursor: pointer; text-decoration: none; font-family: inherit; }
.paybtn span { font-size: 15px; font-weight: 600; }
.paybtn b { font-size: 22px; }
.paybtn small { font-size: 11.5px; opacity: .85; text-align: center; }
.paybtn.ach { background: #0f7a4f; border-color: #0f7a4f; }
.paybtn:hover { filter: brightness(1.08); }
.paybtn:disabled { opacity: .6; cursor: wait; }
@media (max-width: 560px) { .paygrid { grid-template-columns: 1fr; } }
.tpl-type { margin: 18px 0 8px; color: var(--navy); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tpl-card { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; cursor: pointer; background: #fff; transition: transform .12s, box-shadow .12s; }
.tpl-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,36,64,.14); }
.tpl-thumb { aspect-ratio: 4 / 3; background: #f1f5f9; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tpl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpl-pdf { font-weight: 700; color: #64748b; letter-spacing: .1em; }
.tpl-meta { padding: 8px 10px; }
.tpl-code { font-weight: 700; color: var(--navy); font-size: 15px; letter-spacing: .02em; }
body.dark .tpl-card { background: var(--card); border-color: #334155; }
body.dark .tpl-thumb { background: #1e293b; }
/* v5.58 — two-sided template previews */
.flip { position: relative; width: 100%; height: 100%; perspective: 900px; }
.flip-inner { width: 100%; height: 100%; transition: transform .55s cubic-bezier(.4,.1,.2,1); transform-style: preserve-3d; }
.flip:hover .flip-inner { transform: rotateY(180deg); }
.flip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; backface-visibility: hidden; }
.flip .flip-b { transform: rotateY(180deg); }
.flip-hint { position: absolute; right: 6px; bottom: 6px; background: rgba(32,40,104,.85); color: #fff; font-size: 10.5px; padding: 2px 7px; border-radius: 999px; pointer-events: none; }
.flip-view { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; }
.flip-card { position: relative; flex: 1; width: 100%; max-width: 900px; perspective: 1600px; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.35,.1,.2,1); }
.flip-card.turned { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; display: flex; align-items: center; justify-content: center; }
.flip-face img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 34px rgba(0,0,0,.45); background: #fff; }
.flip-back { transform: rotateY(180deg); }
.flip-ctl { display: flex; gap: 8px; align-items: center; }
@media (prefers-reduced-motion: reduce) { .flip-inner, .flip-card { transition: none; } }
.cons-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cons-tile { border: 2px solid #e2e8f0; border-radius: 12px; padding: 12px 10px; text-align: center; cursor: pointer; transition: transform .1s, border-color .1s; background: #fff; }
.cons-tile:hover { transform: translateY(-2px); }
.cons-tile.on { border-color: var(--navy); background: #eef3fb; box-shadow: 0 0 0 3px rgba(32,40,104,.1); }
.cons-tile .ct-num { font-size: 22px; font-weight: 800; color: var(--navy); }
.cons-tile .ct-name { font-size: 12.5px; color: #475569; margin-top: 2px; }
body.dark .cons-tile { background: var(--card); border-color: #334155; }
body.dark .cons-tile.on { background: #1e293b; border-color: var(--gold); }
body.dark .cons-tile .ct-name { color: #94a3b8; }
.help-topic { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 14px; margin: 8px 0; background: #fff; }
.help-topic summary { cursor: pointer; font-weight: 700; color: var(--navy); font-size: 15px; list-style: none; display: flex; align-items: center; gap: 8px; }
.help-topic summary::before { content: '›'; display: inline-block; transition: transform .15s; color: #93bce4; font-size: 20px; }
.help-topic[open] summary::before { transform: rotate(90deg); }
.help-topic ol { margin: 10px 0 4px; padding-left: 22px; }
.help-topic li { margin: 6px 0; line-height: 1.45; }
.help-go { margin-left: 6px; vertical-align: middle; }
.help-tip { background: #eef3fb; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-top: 8px; }
.help-rule { background: #fff7ed; color: #9a3412; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-top: 8px; }
body.dark .help-topic { background: var(--card); border-color: #334155; }
body.dark .help-tip { background: #1e293b; }
body.dark .help-rule { background: #3b2a1a; color: #fdba74; }
.drop-hot { outline: 3px dashed var(--gold); outline-offset: 4px; border-radius: 10px; background: rgba(212,175,55,.07); }
/* v5.58 — mobile: the tab bar collapses into a ☰ menu instead of eating the screen */
.nav-burger { display: none; }
@media (max-width: 860px) {
  .topbar { flex-wrap: nowrap; align-items: center; gap: 8px; padding: 8px 12px; }
  .brand svg { display: none; }
  .brand img { height: 24px !important; }
  .nav-burger { display: block; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 8px;
    font-size: 20px; padding: 6px 12px; margin-left: auto; cursor: pointer; }
  #nav { display: none; }
  body.nav-open #nav { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; position: fixed; top: 52px; left: 0; right: 0;
    background: var(--navy); padding: 10px 14px 16px; z-index: 90; box-shadow: 0 14px 28px rgba(0,0,0,.35);
    max-height: calc(100vh - 52px); overflow-y: auto; }
  body.nav-open #nav a { padding: 12px 14px; font-size: 16px; border-radius: 10px; }
  body.nav-open #nav .nav-group-btn { display: block; width: 100%; text-align: left; padding: 12px 14px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.55); cursor: default; }
  body.nav-open #nav .nav-caret { display: none; }
  body.nav-open #nav .nav-menu { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 6px 10px; background: transparent; }
  .topbar-right { gap: 6px; }
  .topbar-right .whoami { display: none; }
  .topbar-right #logout { display: none; } /* moved into the menu on mobile */
  body.nav-open .topbar-right { }
  /* content breathing room */
  #content { padding: 12px; }
}
body.nav-open .nav-burger { background: rgba(147,188,228,.35); }
@media (max-width: 860px) {
  body.nav-open #nav .nav-mobile-foot { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.8); font-size: 13px; }
}
.nav-mobile-foot { display: none; }
@media (max-width: 860px) { body.nav-open #nav .nav-mobile-foot { display: flex; } }
/* v6.0 — NEXA chat */
#nexa-fab { position: fixed; right: 18px; bottom: 18px; z-index: 95; width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, #202868, #3b5bd1); color: #fff; border: 0; font-size: 22px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(32,40,104,.45); transition: transform .12s; }
#nexa-fab:hover { transform: scale(1.08); }
#nexa-panel { position: fixed; right: 18px; bottom: 84px; z-index: 96; width: 380px; max-width: calc(100vw - 24px);
  height: 520px; max-height: calc(100vh - 120px); background: #0f1c3f; border-radius: 16px; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,.5); border: 1px solid #2c3a6b; }
#nexa-panel.hidden { display: none; }
.nexa-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; color: #fff; border-bottom: 1px solid #2c3a6b; }
#nexa-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.nexa-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; }
.nexa-me { align-self: flex-end; background: #3b5bd1; color: #fff; border-bottom-right-radius: 4px; }
.nexa-her { align-self: flex-start; background: #1e293b; color: #e2e8f0; border-bottom-left-radius: 4px; }
.nexa-thinking { animation: nexapulse 1.2s infinite; }
@keyframes nexapulse { 50% { opacity: .45; } }
.nexa-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #2c3a6b; }
.nexa-input textarea { flex: 1; background: #1e293b; color: #fff; border: 1px solid #2c3a6b; border-radius: 10px; padding: 9px 11px; font-size: 14px; resize: none; }
@media (max-width: 860px) { #nexa-panel { right: 8px; left: 8px; width: auto; } }
.nexa-listening { background: #b91c1c !important; color: #fff; animation: nexapulse .9s infinite; }
/* v6.0 — NEXA mobile fixes */
#nexa-fab { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
body.nav-open #nexa-fab, body.nav-open #nexa-panel { display: none; } /* never float over the ☰ menu */
@media (max-width: 860px) {
  #nexa-panel { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); height: min(520px, 68vh); }
  #nexa-fab { width: 50px; height: 50px; font-size: 20px; }
}
/* v6.0 — the orb */
#nexa-fab { display: flex; align-items: center; justify-content: center; padding: 0; overflow: hidden;
  background: radial-gradient(circle at 34% 30%, #2c3e8f, #131b45 72%); }
#nexa-fab canvas { width: 54px; height: 54px; }
/* v6.0 — full-screen NEXA */
#nexa-full { position: fixed; inset: 0; z-index: 96; background: radial-gradient(120% 90% at 50% 38%, #16224e 0%, #0b1230 55%, #070c22 100%);
  display: flex; flex-direction: column; color: #e2e8f0; }
#nexa-full.hidden { display: none; }
.nexa-full-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.nexa-view { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.nexa-view.hidden { display: none; }
#nexa-orb-big { width: min(56vh, 78vw, 480px); height: min(56vh, 78vw, 480px); cursor: pointer; }
.nexa-greet { font-size: 26px; font-weight: 500; letter-spacing: .01em; margin-top: 6px; font-family: Georgia, 'Times New Roman', serif; }
.nexa-caption { max-width: min(620px, 86vw); text-align: center; font-size: 14.5px; line-height: 1.55; color: #b9c6e2; margin-top: 14px;
  max-height: 130px; overflow-y: auto; white-space: pre-wrap; }
.nexa-hint { color: #64748b; font-size: 13px; margin-top: 16px; }
.nexa-tabs { display: flex; justify-content: center; gap: 64px; padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(148,163,184,.12); }
.nexa-tab { background: none; border: 0; color: #64748b; font-size: 19px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.nexa-tab span { font-size: 11.5px; }
.nexa-tab.active { color: #93bce4; }
#nexa-view-chat { justify-content: flex-end; }
#nexa-view-chat #nexa-log { flex: 1; width: min(720px, 100%); align-self: center; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
#nexa-view-chat .nexa-input { width: min(720px, 100%); align-self: center; border-top: 1px solid rgba(148,163,184,.12); }
body.nexa-open #nexa-fab { display: none; }
@media (max-width: 860px) { #nexa-full { z-index: 120; } .nexa-tabs { gap: 48px; } }

/* v6.1 — promo intake card + item editors */
.promo-intake { display:grid; grid-template-columns:1fr 1fr; gap:18px; font-size:13px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; margin:10px 0 4px; }
.promo-intake > div > div { margin:2px 0; }
@media (max-width:760px) { .promo-intake { grid-template-columns:1fr; } }
.deco-row, .charge-row { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:4px; }
.deco-row input, .deco-row select, .charge-row input, .charge-row select { margin:0; font-size:12.5px; padding:5px 7px; }
.line-total { font-size:12.5px; margin-top:6px; padding:6px 8px; background:var(--bg-soft, rgba(147,188,228,.12)); border-radius:7px; display:inline-block; }
.pres-deco { font-size:13px; margin-top:6px; } .pres-deco div { margin:2px 0; }
.pres-charges { width:auto; margin-top:6px; font-size:13px; } .pres-charges td { padding:3px 10px 3px 0; }
/* v6.7 — comment thread tabs */
.filter-pills { display:flex; gap:6px; flex-wrap:wrap; }
.pill-btn { border:1px solid var(--line); background:transparent; color:var(--muted); border-radius:20px; padding:4px 11px; font-size:12px; font-weight:600; cursor:pointer; }
.pill-btn.on { background:var(--navy, #202868); color:#fff; border-color:var(--navy, #202868); }
.pill-btn b { font-weight:800; }

/* v6.30: stage stepper */
.stepper { display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin:12px 0 4px; font-size:12px; }
.stepper .step { padding:4px 10px; border-radius:999px; border:1px solid var(--line); color:var(--muted); background:transparent; white-space:nowrap; }
.stepper .step.done { color:var(--green); border-color:var(--green); }
.stepper .step.cur { background:var(--navy); color:#fff; border-color:var(--navy); font-weight:700; }
.stepper .step.cur.red { background:#b91c1c; border-color:#b91c1c; }
.stepper .step.cur.amber { background:var(--amber); border-color:var(--amber); } /* v7.17: released but not paid */
.stepper .step-sep { color:var(--muted); font-size:11px; }

/* v6.43: My settings — Apple-style settings sheet */
.ms-page { max-width: 860px; margin: 0 auto; }
.ms-head { margin: 4px 0 20px; } .ms-head h1 { margin: 0 0 2px; } .ms-head p { margin: 0; font-size: 13.5px; }
.ms-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; margin-bottom: 18px; }
.ms-row { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.ms-left h2 { margin: 0 0 8px; font-size: 16px; color: var(--navy); }
.ms-left p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.ms-flag { display: inline-block; margin-top: 10px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #fff4e5; color: #9a5b00; border: 1px solid #f3d9a4; }
.ms-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.ms-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ms-seg-opt { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; font-weight: 400; color: var(--text); transition: border-color .15s, background .15s; }
.ms-seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.ms-seg-opt b { font-size: 14px; color: var(--navy); } .ms-seg-opt span { font-size: 12.5px; color: var(--muted); }
.ms-seg-opt.on { border-color: var(--navy); background: #f2f5fc; box-shadow: 0 0 0 3px rgba(32,40,104,.08); }
.ms-toggles { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ms-toggle { display: grid; grid-template-columns: 34px 1fr 46px; align-items: center; gap: 12px; padding: 13px 16px; margin: 0; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400; color: var(--text); }
.ms-toggle:last-child { border-bottom: 0; } .ms-toggle:hover { background: #f8fafc; }
.ms-ico { font-size: 18px; text-align: center; }
.ms-text { display: flex; flex-direction: column; gap: 1px; } .ms-text b { font-size: 14px; } .ms-text small { font-size: 12.5px; color: var(--muted); }
.ms-toggle input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.ms-toggle i { width: 44px; height: 26px; border-radius: 999px; background: #d5dbe3; position: relative; transition: background .18s; justify-self: end; }
.ms-toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .18s; }
.ms-toggle input:checked + i { background: #34c759; } .ms-toggle input:checked + i::after { left: 21px; }
.ms-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; }
.ms-list { margin: 4px 0 0; padding-left: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ms-list li { padding: 11px 16px; font-size: 14px; border-bottom: 1px solid var(--line); } .ms-list li:last-child { border-bottom: 0; }
.ms-list li::before { content: '✓'; color: #34c759; font-weight: 700; margin-right: 10px; }
body.dark .ms-seg-opt.on { background: #1d2452; } body.dark .ms-toggle:hover { background: #161b3a; } body.dark .ms-toggle i { background: #3a4260; }
@media (max-width: 720px) { .ms-row { grid-template-columns: 1fr; gap: 16px; } .ms-seg { grid-template-columns: 1fr; } .ms-card { padding: 20px; } }

/* v7.01: full-screen artwork zoom (proof approval + templates) */
.zoom-layer { position: fixed; inset: 0; z-index: 10000; background: rgba(15,23,42,.96); display: flex; flex-direction: column; }
.zoom-bar { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 10px; flex: none; }
.zoom-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; display: flex; }
.zoom-scroll img { margin: auto; max-width: none; background: #fff; box-shadow: 0 10px 34px rgba(0,0,0,.5); user-select: none; -webkit-user-drag: none; }

/* v7.06: brand assets + product artwork */
.asset-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; }
.asset-thumb { width: 36px; height: 36px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; flex: none; }
.asset-ico { display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.art-slot { margin-top: 4px; }
.art-img { max-width: 220px; max-height: 160px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: block; }
.art-pdf { font-size: 12.5px; }
.pres-art .art-img { max-width: 100%; max-height: 260px; }
#eo-table { width: 100%; table-layout: fixed; }
#eo-table input { margin: 0; width: 100%; min-width: 0 !important; box-sizing: border-box; }
#eo-table th:nth-child(1) { width: 30%; } #eo-table th:nth-child(2) { width: 22%; } #eo-table th:nth-child(6) { width: 44px; }
.art-slot label.btn { display: inline-flex !important; width: auto !important; }
.art-slot .art-img { min-width: 60px; min-height: 40px; }
#eo-table tr.eo-del td { opacity: .45; text-decoration: line-through; }

/* v7.18: superseded artwork files */
.file-row.file-old { opacity: .55; }
.file-row.file-old a { text-decoration: line-through; }
.pill.gray { background: var(--line); color: var(--muted); }

/* v7.20 SAGE search in the product picker */
.sage-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:10px; }
.sage-card { border:1px solid var(--line); border-radius:10px; padding:8px; background:#fff; display:flex; flex-direction:column; }
.sage-card:has(.sage-detail:not([style*="display: none"])) { grid-column:1 / -1; }
.sage-thumb { height:120px; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:32px; background:#fafafa; border-radius:8px; }
.sage-thumb img { max-height:120px; max-width:240px; object-fit:contain; }
.sage-name { font-weight:700; font-size:12.5px; line-height:1.25; margin-top:6px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.sage-detail { border-top:1px solid var(--line); margin-top:8px; padding-top:8px; }
.sage-tiers { border-collapse:collapse; font-size:12px; margin-bottom:4px; }
.sage-tiers th, .sage-tiers td { padding:2px 8px 2px 0; text-align:right; }
.sage-tiers th { color:var(--muted); font-weight:600; }
.sage-tiers td:first-child, .sage-tiers th:first-child { text-align:left; }

/* v7.22 SAGE product search page + product page */
.ss-layout { display:grid; grid-template-columns:230px 1fr; gap:14px; align-items:start; }
.ss-rail { padding:14px; position:sticky; top:70px; }
.ss-facet { margin-top:10px; }
.ss-facet-h { font-size:11px; font-weight:800; letter-spacing:.04em; color:var(--muted); margin:8px 0 4px; }
.ss-facet label { display:flex; align-items:center; gap:6px; font-size:12.5px; margin:0; padding:2px 0; font-weight:500; cursor:pointer; }
.ss-facet input { width:auto; margin:0; }
.ss-bar { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; font-size:13.5px; }
.ss-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }
.ss-list { display:flex; flex-direction:column; gap:8px; }
.ss-tile { display:flex; flex-direction:column; background:#fff; border:1px solid var(--line); border-radius:10px; overflow:hidden; text-decoration:none; color:inherit; transition:box-shadow .15s, transform .15s; }
.ss-tile:hover { box-shadow:0 6px 18px rgba(0,0,0,.09); transform:translateY(-1px); }
.ss-list .ss-tile { flex-direction:row; align-items:center; }
.ss-thumb { height:190px; background:#f4f4f4; display:flex; align-items:center; justify-content:center; font-size:36px; }
.ss-list .ss-thumb { width:120px; height:100px; flex:none; }
.ss-thumb img { max-height:100%; max-width:100%; object-fit:contain; mix-blend-mode:multiply; }
.ss-body { padding:10px 12px 12px; display:flex; flex-direction:column; gap:2px; }
.ss-name { font-weight:700; font-size:13.5px; line-height:1.25; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.ss-price { font-weight:700; font-size:13.5px; margin-top:4px; }
.ss-pager { display:flex; justify-content:center; align-items:center; gap:12px; margin:16px 0 4px; }
.ss-prod { display:grid; grid-template-columns:minmax(260px,420px) 1fr; gap:24px; align-items:start; }
.ss-main-img { height:340px; background:#fafafa; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:48px; }
.ss-main-img img { max-height:100%; max-width:100%; object-fit:contain; mix-blend-mode:multiply; }
.ss-thumbs { display:flex; gap:8px; margin-top:8px; overflow-x:auto; }
.ss-thumbs img { width:64px; height:64px; object-fit:contain; border:1px solid var(--line); border-radius:8px; background:#fff; cursor:pointer; }
.ss-meta { display:grid; grid-template-columns:1fr 1fr; gap:4px 16px; font-size:13px; }
.ss-tiers { width:100%; border-collapse:collapse; margin-top:18px; font-size:13.5px; }
.ss-tiers th { text-align:left; padding:8px 10px; background:#f5f6f8; font-weight:700; width:130px; }
.ss-tiers td { padding:8px 10px; border-bottom:1px solid var(--line); }
.ss-details { display:grid; grid-template-columns:1fr; margin-top:18px; font-size:13px; }
.ss-dl { display:grid; grid-template-columns:170px 1fr; gap:10px; padding:7px 0; border-bottom:1px solid var(--line); }
.ss-dt { font-weight:700; }
@media (max-width: 900px) { .ss-layout { grid-template-columns:1fr; } .ss-rail { position:static; } .ss-prod { grid-template-columns:1fr; } .ss-dl { grid-template-columns:1fr; } }

.ss-tile.ss-archived { opacity:.55; }

.lib-thumb { position:relative; flex:none; }
.lib-thumb-tools { display:flex; justify-content:space-between; gap:6px; font-size:11px; margin-top:2px; }
.lib-thumb-tools a { text-decoration:none; }

/* v7.26 client-facing sales order */
.so-banner { padding:12px 26px; font-size:13.5px; border-bottom:1px solid var(--line); }
.so-banner.green { background:#e2f4ea; color:var(--green); }
.so-banner.amber { background:#fbf0da; color:var(--amber); }
.so-imgs { width:200px; flex:none; }
.so-item .pres-main { max-height:200px; }
.so-totals { padding:16px 26px; display:flex; flex-direction:column; gap:6px; border-bottom:1px solid var(--line); }
.so-totals > div:first-child { display:flex; justify-content:space-between; font-size:16px; }
.so-approve { max-width:1040px; margin:14px auto 0; }

/* v7.28 one-button project page */
.next-box { border:2px solid var(--gold); border-radius:12px; padding:12px 16px; margin:4px 0 16px; background:#fffdf7; }
.next-label { font-size:10.5px; font-weight:800; letter-spacing:.08em; color:var(--gold); margin-bottom:6px; }
body.dark .next-box { background:var(--card); }

/* v7.33 artwork previews */
.art-pdf-wrap { display:inline-block; position:relative; width:220px; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#fff; text-decoration:none; }
.art-pdf-frame { width:220px; height:160px; border:0; pointer-events:none; display:block; }
.art-pdf-wrap .art-pdf { display:block; font-size:12px; padding:6px 8px; border-top:1px solid var(--line); }
.art-vector { display:inline-block; padding:14px 16px; border:1px dashed var(--line); border-radius:8px; font-size:12.5px; text-decoration:none; background:#fafafa; }
