/* ═══════════════════════════════════════════════════════════════════
   Expert Globe MIS — styles.css
   Brand: royal indigo #1c12a8 · violet #7c4fd0 · cyan #59c9e8
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --ink:      #1a2036;
  --ink-soft: #5a6178;
  --brand:    #1c12a8;
  --brand-2:  #3524d6;
  --violet:   #7c4fd0;
  --cyan:     #59c9e8;
  --gold:     #e8b931;
  --bg:       #f2f3fa;
  --card:     #ffffff;
  --line:     #e3e5f0;
  --side:     #100c3d;
  --side-2:   #191263;
  --ok:       #1e9e63;
  --warn:     #d98c0f;
  --bad:      #d13c3c;
  --shadow:   0 1px 3px rgba(16,12,61,.08), 0 4px 18px rgba(16,12,61,.07);
  --radius:   12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.45;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
a { color: var(--brand-2); }

/* ── Auth screen ─────────────────────────────────────────────── */
#auth-screen {
  position: fixed; inset: 0; z-index: 50; overflow: auto;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124,79,208,.35), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(89,201,232,.25), transparent 55%),
    linear-gradient(150deg, #0d0b33 0%, #1a1160 55%, #241786 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 430px; background: #fff; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45); overflow: hidden;
}
.auth-head {
  text-align: center; padding: 26px 26px 18px;
  background: linear-gradient(160deg, #f6f4ff, #eef8fc);
  border-bottom: 1px solid var(--line);
}
.auth-head img { width: 86px; height: 86px; border-radius: 20px; box-shadow: var(--shadow); }
.auth-head h1 { font-size: 21px; color: var(--brand); letter-spacing: .5px; margin-top: 10px; }
.auth-head p  { color: var(--ink-soft); font-size: 12.5px; letter-spacing: 1.6px; text-transform: uppercase; margin-top: 2px; }
.auth-body { padding: 22px 26px 26px; }
.auth-body h2 { font-size: 16px; margin-bottom: 4px; }
.auth-sub { color: var(--ink-soft); font-size: 13px; margin-bottom: 14px; }
.auth-body label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin: 10px 0 4px; }
.auth-body input, .auth-body select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: #fbfbfe;
}
.auth-body input:focus, .auth-body select:focus { outline: none; border-color: var(--violet); background: #fff; }
.auth-actions { margin-top: 18px; }
.btn-primary {
  width: auto; padding: 10px 22px; border: none; border-radius: 9px; color: #fff; font-weight: 600;
  background: linear-gradient(135deg, var(--brand-2), var(--violet));
  box-shadow: 0 4px 14px rgba(53,36,214,.35);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary.block { width: 100%; }
.auth-alt { text-align: center; margin-top: 14px; font-size: 13px; color: var(--ink-soft); }
.auth-alt a { cursor: pointer; font-weight: 600; }
.auth-err { background: #fdecec; color: var(--bad); border: 1px solid #f5c9c9; padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; }
.auth-note { background: #eef8fc; color: #17607a; border: 1px solid #cdeaf5; padding: 9px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 10px; }
.auth-foot { text-align: center; padding: 0 26px 20px; color: #9aa0b5; font-size: 11.5px; }

/* ── Shell layout ────────────────────────────────────────────── */
#app-shell { display: flex; min-height: 100vh; }
#sidebar {
  width: 252px; flex-shrink: 0; background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%);
  color: #cfd2ec; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
  scrollbar-width: thin; scrollbar-color: #3a3480 transparent;
}
.side-brand { display: flex; gap: 10px; align-items: center; padding: 16px 14px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-logo { width: 46px; height: 46px; border-radius: 12px; background: #fff; }
.side-brand-txt b { display: block; font-size: 14.5px; color: #fff; letter-spacing: 1px; }
.side-brand-txt span { font-size: 9.6px; letter-spacing: .6px; text-transform: uppercase; color: #8f94c9; }
#side-nav { flex: 1; padding: 8px 0 14px; }
.nav-group { padding: 13px 16px 5px; font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: #7b80b8; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin: 1px 8px;
  border-radius: 8px; color: #cfd2ec; text-decoration: none; font-size: 13.6px;
}
.nav-item .ni { width: 20px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(124,79,208,.45), rgba(53,36,214,.35)); color: #fff; box-shadow: inset 3px 0 0 var(--cyan); }
.nav-item .badge { margin-left: auto; background: var(--violet); color: #fff; border-radius: 20px; font-size: 10.5px; padding: 1px 7px; }
.side-foot { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.08); }
.install-btn {
  width: 100%; margin-bottom: 8px; padding: 8px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
  background: rgba(255,255,255,.08); color: #fff; font-size: 13px;
}
.foot-meta { font-size: 10.5px; color: #7b80b8; line-height: 1.5; }
#side-veil { display: none; }

#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding: 9px 18px;
}
#burger { display: none; }
#crumb { font-weight: 600; font-size: 15px; color: var(--brand); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#crumb small { color: var(--ink-soft); font-weight: 400; }
.top-tools { display: flex; align-items: center; gap: 7px; }
.icon-btn {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font-size: 16px; color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover:not(:disabled) { border-color: var(--violet); color: var(--brand-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: #b8bdd4; }
.sync-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(30,158,99,.18); }
.sync-dot.err { background: var(--bad); box-shadow: 0 0 0 3px rgba(209,60,60,.15); }
#user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 30px; background: #fff; }
#user-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-2), var(--violet));
}
#user-chip .uc-name { font-size: 12.8px; font-weight: 600; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#user-chip .uc-role { display: block; font-size: 10px; color: var(--ink-soft); font-weight: 400; }

#view { padding: 20px 22px 60px; max-width: 1500px; width: 100%; margin: 0 auto; }

/* ── Page furniture ──────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 21px; color: var(--brand); }
.page-head .ph-sub { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.page-head .ph-tools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.series-chip {
  display: inline-block; background: #efeafd; color: var(--violet); border: 1px solid #ddd2f5;
  border-radius: 7px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .5px;
}
.btn {
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font-size: 13.4px; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--violet); color: var(--brand-2); }
.btn.primary { background: linear-gradient(135deg, var(--brand-2), var(--violet)); border: none; color: #fff; box-shadow: 0 3px 10px rgba(53,36,214,.3); }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.danger { color: var(--bad); border-color: #f0caca; }
.btn.danger.armed, .icon-btn.armed { background: var(--bad) !important; color: #fff !important; border-color: var(--bad) !important; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.card h3 { font-size: 15px; color: var(--brand); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card h3 .ct-tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* KPI tiles */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(158px,100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 13px 15px; position: relative; overflow: hidden; cursor: pointer;
}
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--kc, var(--brand-2)); }
.kpi .k-ico { position: absolute; right: 10px; top: 10px; font-size: 20px; opacity: .8; }
.kpi .k-val { font-size: 24px; font-weight: 800; color: var(--ink); margin-top: 4px; }
.kpi .k-lbl { font-size: 11.6px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .7px; }
.kpi .k-foot { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1050px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Tables ──────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table.reg { width: 100%; border-collapse: collapse; font-size: 13.2px; min-width: 640px; }
table.reg th {
  background: linear-gradient(180deg, #f7f7fd, #eef0f9); color: #3b4161; text-align: left;
  padding: 9px 10px; font-size: 11.6px; text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 2px solid var(--line); white-space: nowrap; position: sticky; top: 0;
}
table.reg td { padding: 7px 10px; border-bottom: 1px solid #eef0f7; vertical-align: top; }
table.reg tr:hover td { background: #f8f8ff; }
table.reg input, table.reg select {
  width: 100%; min-width: 84px; border: 1px solid transparent; background: transparent;
  padding: 5px 6px; border-radius: 6px;
}
table.reg input:hover, table.reg select:hover { border-color: var(--line); background: #fff; }
table.reg input:focus, table.reg select:focus { outline: none; border-color: var(--violet); background: #fff; }
table.reg .ref-cell { font-weight: 700; color: var(--brand-2); white-space: nowrap; font-size: 12.4px; }
.note-field { width: 100%; min-width: 170px; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 5px 6px; resize: vertical; min-height: 30px; font-size: 13px; }
.note-field:focus { outline: none; border-color: var(--violet); background: #fff; }
.note-more { font-size: 11.5px; color: var(--brand-2); cursor: pointer; user-select: none; }
.row-del { border: none; background: none; color: #b7bccf; font-size: 15px; padding: 3px 6px; border-radius: 6px; }
.row-del:hover { color: var(--bad); background: #fdecec; }
.row-del.armed { background: var(--bad); color: #fff; }

.status-pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11.6px; font-weight: 700; white-space: nowrap; }
.st-green  { background: #e2f6ec; color: #157a4c; }
.st-amber  { background: #fcf2dc; color: #9a6a08; }
.st-red    { background: #fdeaea; color: #b32e2e; }
.st-blue   { background: #e7f4fb; color: #1668a0; }
.st-violet { background: #efeafd; color: #6a3fc0; }
.st-grey   { background: #eef0f5; color: #5a6178; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filter-bar input[type=search], .filter-bar select {
  padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; min-width: 130px;
}
.filter-bar input[type=search]:focus, .filter-bar select:focus { outline: none; border-color: var(--violet); }
.filter-bar input[type=search] { flex: 1; min-width: 170px; max-width: 340px; }

/* ── Forms / modal ───────────────────────────────────────────── */
#modal-root .modal-veil {
  position: fixed; inset: 0; z-index: 60; background: rgba(13,11,51,.55);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 620px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.4);
  animation: pop .18s backwards;
}
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; color: var(--brand); flex: 1; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.f-grid .wide { grid-column: 1 / -1; }
.f-grid label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 3px; }
.f-grid input, .f-grid select, .f-grid textarea {
  width: 100%; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: #fbfbfe;
}
.f-grid input:focus, .f-grid select:focus, .f-grid textarea:focus { outline: none; border-color: var(--violet); background: #fff; }
.ref-preview { font-size: 12.5px; color: var(--brand-2); font-weight: 700; background: #f2f0fd; border: 1px dashed #cfc2f0; border-radius: 8px; padding: 7px 10px; }

/* ── Document manager ────────────────────────────────────────── */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px,100%), 1fr)); gap: 13px; }
.doc-card { border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.doc-card .dc-head { padding: 10px 12px 8px; border-bottom: 1px solid #eef0f7; }
.doc-card .dc-ref { font-size: 11.4px; font-weight: 800; color: var(--brand-2); letter-spacing: .3px; }
.doc-card .dc-title { font-size: 13.4px; font-weight: 600; margin-top: 2px; line-height: 1.3; }
.doc-card .dc-meta { font-size: 11.3px; color: var(--ink-soft); margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.doc-card .dc-body { padding: 9px 12px; display: flex; align-items: center; gap: 9px; flex: 1; }
.doc-card .dc-fico { font-size: 26px; }
.doc-card .dc-fname { font-size: 12px; color: var(--ink-soft); word-break: break-all; flex: 1; }
.doc-card .dc-empty { font-size: 12.4px; color: #a3a8bf; font-style: italic; flex: 1; }
.doc-card .dc-tools { display: flex; gap: 6px; padding: 0 12px 11px; flex-wrap: wrap; }
.doc-card .dc-tools .btn { padding: 5px 10px; font-size: 12px; }

/* ── Preview overlay (mobile-safe: fixed inset, no vh) ───────── */
.pv-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(10,9,35,.96); display: flex; flex-direction: column; }
.pv-top {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: rgba(0,0,0,.35); color: #fff; flex-shrink: 0;
}
.pv-top .pv-name { flex: 1; font-size: 13.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-top .icon-btn { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.pv-stage { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: none; }
.pv-stage iframe { width: 100%; height: 100%; border: none; background: #fff; }
.pv-load { color: #cfd2ec; font-size: 14px; }
.pv-zoom {
  position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; background: rgba(0,0,0,.5); border-radius: 30px; padding: 6px 10px;
}
.pv-zoom .icon-btn { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }

/* ── Photo boards ────────────────────────────────────────────── */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px,100%), 1fr)); gap: 10px; }
.photo-cell {
  position: relative; border: 1px solid var(--line); border-radius: 10px; background: #f6f7fb;
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.photo-cell img { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.photo-cell .ph-empty { color: #a8adc2; font-size: 12px; text-align: center; padding: 8px; }
.photo-cell .ph-x { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.45); color: #fff; font-size: 13px; }
.photo-cell .ph-x.armed { background: var(--bad); }
.photo-cell .ph-cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(13,11,51,.62); color: #fff; font-size: 10.8px; padding: 3px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recover-btn { position: absolute; bottom: 6px; right: 6px; border: none; background: var(--gold); color: #4d3a00; border-radius: 7px; font-size: 11px; padding: 3px 8px; font-weight: 700; }

/* ── Camera overlay ──────────────────────────────────────────── */
.cam-overlay { position: fixed; inset: 0; z-index: 80; background: #000; }
.cam-overlay video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cam-pill {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6);
  color: #fff; padding: 6px 16px; border-radius: 20px; font-size: 13px;
}
.cam-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center;
  gap: 22px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.cam-shutter { width: 66px; height: 66px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.25); }
.cam-side { width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(255,255,255,.18); color: #fff; font-size: 20px; }

/* ── Charts ──────────────────────────────────────────────────── */
.chart-box svg { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--ink-soft); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* progress bars */
.pbar { height: 9px; background: #edeff6; border-radius: 20px; overflow: hidden; }
.pbar > div { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--brand-2), var(--violet)); }
.pbar.thin { height: 6px; }

/* ── CCTV ────────────────────────────────────────────────────── */
.cctv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px,100%), 1fr)); gap: 14px; }
.cctv-card { background: #12102e; border-radius: 12px; overflow: hidden; border: 1px solid #2a2757; color: #cfd2ec; }
.cctv-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 13px; }
.cctv-head b { color: #fff; }
.cctv-head .ct-tools { margin-left: auto; display: flex; gap: 6px; }
.cctv-stage { aspect-ratio: 16/9; background: #000; display: flex; align-items: center; justify-content: center; position: relative; }
.cctv-stage img, .cctv-stage iframe, .cctv-stage video { width: 100%; height: 100%; object-fit: contain; border: none; }
.cctv-off { color: #6f74a8; font-size: 13px; text-align: center; padding: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: blink 1.2s infinite; display: inline-block; }
@keyframes blink { 50% { opacity: .25; } }

/* ── Toast ───────────────────────────────────────────────────── */
#toast-root { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #23214d; color: #fff; padding: 10px 20px; border-radius: 30px; font-size: 13.4px;
  box-shadow: 0 8px 26px rgba(0,0,0,.35); animation: pop .2s backwards; max-width: 92vw; text-align: center;
}

/* ── Print ───────────────────────────────────────────────────── */
.print-head { display: none; }
@media print {
  #sidebar, #topbar, .ph-tools, .filter-bar, .pb-hide, .row-del, .ct-tools, #side-veil, .dc-tools, #toast-root, #modal-root { display: none !important; }
  #view { padding: 0; max-width: none; }
  body { background: #fff; font-size: 12px; }
  .card, .tbl-wrap { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  .print-head { display: flex; align-items: center; gap: 12px; border-bottom: 3px solid var(--brand); padding-bottom: 10px; margin-bottom: 14px; }
  .print-head img { width: 52px; height: 52px; }
  .print-head .pt b { font-size: 16px; color: var(--brand); }
  table.reg { min-width: 0; }
  table.reg th { position: static; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: auto; transform: translateX(-105%); transition: transform .22s; box-shadow: 6px 0 30px rgba(0,0,0,.35); }
  #sidebar.open { transform: translateX(0); }
  #side-veil.on { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(13,11,51,.45); }
  #burger { display: inline-flex; }
  #view { padding: 14px 12px 70px; }
  #user-chip .uc-name { display: none; }
  .f-grid { grid-template-columns: 1fr; }
}

/* ── Project workspace (v1.1) ────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(255px,100%), 1fr)); gap: 13px; margin-bottom: 18px; }
.cat-card {
  display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 16px; text-decoration: none; color: var(--ink);
  transition: transform .12s, border-color .12s;
}
.cat-card:hover { transform: translateY(-2px); border-color: var(--violet); }
.cat-card .cc-ico { font-size: 26px; }
.cat-card b { font-size: 14.6px; color: var(--brand); }
.cat-card .cc-desc { font-size: 12px; color: var(--ink-soft); min-height: 30px; }
.cat-card .cc-meta { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px,100%), 1fr)); gap: 13px; }
.proj-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; cursor: pointer; }
.proj-card:hover { border-color: var(--violet); }
.proj-card .pc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.proj-card .pc-pno { font-weight: 800; color: var(--violet); font-size: 13px; letter-spacing: .4px; }
.pc-meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.ptabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 14px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.ptab {
  flex-shrink: 0; padding: 6px 13px; border: 1px solid var(--line); border-radius: 20px; background: #fff;
  font-size: 12.6px; font-weight: 600; color: var(--ink-soft); text-decoration: none; white-space: nowrap;
}
.ptab:hover { border-color: var(--violet); color: var(--brand-2); }
.ptab.active { background: linear-gradient(135deg, var(--brand-2), var(--violet)); color: #fff; border-color: transparent; }

.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(215px,100%), 1fr)); gap: 11px; }
.sec-card {
  position: relative; display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 14px; text-decoration: none; color: var(--ink); background: #fbfbfe;
}
.sec-card:hover { border-color: var(--violet); background: #fff; }
.sec-card .sc-num { position: absolute; right: 12px; top: 10px; font-size: 11px; font-weight: 800; color: #c3c8e0; }
.sec-card .sc-ico { font-size: 21px; }
.sec-card b { font-size: 13.4px; color: var(--brand); }
.sec-card .sc-meta { font-size: 11.4px; color: var(--ink-soft); }
.quick-card { text-decoration: none; color: var(--ink); cursor: pointer; }
.quick-card:hover { border-color: var(--violet); }
.quick-card p { font-size: 12.6px; color: var(--ink-soft); }

/* BOQ */
table.boq td.num, table.boq th { white-space: nowrap; }
table.boq .num { text-align: right; }
table.boq .mono { font-family: Consolas, 'Roboto Mono', monospace; font-size: 12.4px; }
.bq-in { width: 84px; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 6px; }
.bq-in:hover { border-color: var(--line); background: #fff; }
.bq-in:focus { outline: none; border-color: var(--violet); background: #fff; }
tr.bq-group td { background: linear-gradient(180deg, #241786, #3524d6); color: #fff; font-size: 12.6px; padding: 7px 10px; }
tr.bq-group td .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
tr.bq-total td { background: #eef0f9; font-weight: 800; border-top: 2px solid var(--brand); }
.ps-in { border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 6px; width: 100%; min-width: 70px; }
.ps-in:hover { border-color: var(--line); background: #fff; }
.ps-in:focus { outline: none; border-color: var(--violet); background: #fff; }

.acct-strip { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.acct-cell { flex: 1 1 130px; padding: 9px 13px; border-right: 1px solid var(--line); background: #fbfbfe; }
.acct-cell:last-child { border-right: none; }
.acct-cell .al { display: block; font-size: 10.6px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-soft); }
.acct-cell .av { font-size: 16.5px; font-weight: 800; color: var(--ink); }

/* photo boards */
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(295px,100%), 1fr)); gap: 14px; }
.pp-board { position: relative; padding: 12px; }
.pp-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 5px; z-index: 2; }
.pp-tools .icon-btn { width: 29px; height: 29px; font-size: 13px; background: rgba(255,255,255,.92); }
.photo-slot {
  border: 1.5px dashed var(--line); border-radius: 10px; background: #f6f7fb; min-height: 185px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;
}
.photo-slot img { width: 100%; max-height: 260px; object-fit: contain; cursor: pointer; }
.photo-slot .ph-empty { color: #a8adc2; font-size: 12.6px; text-align: center; padding: 10px; }
.pp-actions { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.pp-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.pp-lbl { display: block; font-size: 11px; font-weight: 700; color: var(--ink-soft); margin-bottom: 2px; }

/* parties */
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(275px,100%), 1fr)); gap: 12px; }
.party-card { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; background: #fbfbfe; }
.party-card .pt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.party-card .pt-top b { color: var(--brand); font-size: 13.8px; }
.pt-bal { font-size: 11.6px; color: var(--ink-soft); background: #f2f0fd; border-radius: 7px; padding: 5px 9px; margin-top: 7px; }
.pc-tools { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }

@media print { .ptabs, .pp-tools, .pp-actions, .pc-tools { display: none !important; } }

/* ── v1.2 — breadcrumb, marketplace, materials, attendance ──────── */
.crumb-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 8px; color: var(--ink-soft); }
.crumb-bar a { color: var(--brand-2); text-decoration: none; font-weight: 600; }
.crumb-bar a:hover { text-decoration: underline; }
.crumb-bar .cx { color: #b7bccf; }
.crumb-bar .cx-leaf { color: var(--ink); font-weight: 700; }
.back-btn { width: 30px; height: 30px; font-size: 15px; vertical-align: middle; }
.page-head h1 .back-btn { margin-right: 4px; }

/* chip tab bars */
.chip-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.chip-tab { padding: 6px 13px; border: 1px solid var(--line); border-radius: 20px; background: #fff; font-size: 12.6px; font-weight: 600; color: var(--ink-soft); }
.chip-tab:hover { border-color: var(--violet); color: var(--brand-2); }
.chip-tab.active { background: linear-gradient(135deg, var(--brand-2), var(--violet)); color: #fff; border-color: transparent; }

/* marketplace */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px,100%), 1fr)); gap: 15px; }
.mkt-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.mkt-card:hover { transform: translateY(-3px); box-shadow: 0 8px 26px rgba(16,12,61,.14); }
/* v1.83 — a product board shows the WHOLE photograph. Goods for sale must not
   be cropped by the frame: the picture is contained and the space around it is
   filled with a blurred, darkened copy of the same shot. */
.mkt-img { position: relative; height: 188px; background: linear-gradient(135deg, #eef0fb, #e5e0f7); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mkt-img.has-img { background-color: #0e0b2e; }
.mkt-img .mkt-imgph { font-size: 44px; opacity: .55; }
.mkt-img.has-img .mkt-imgph { display: none; }
.mkt-feat { position: absolute; top: 9px; left: 9px; background: var(--gold); color: #4d3a00; font-size: 10.6px; font-weight: 800; padding: 2px 8px; border-radius: 20px; }
.deal-pill { position: absolute; top: 9px; right: 9px; font-size: 10.8px; font-weight: 800; padding: 2px 9px; border-radius: 20px; color: #fff; }
.deal-pill.deal-sale { background: #1e9e63; } .deal-pill.deal-rent { background: #3524d6; } .deal-pill.deal-lease { background: #7c4fd0; }
.lst-cover .deal-pill, .mkt-card .mkt-body .deal-pill { position: static; display: inline-block; }
.mkt-body { padding: 11px 13px 13px; }
.mkt-ref { font-size: 10.8px; color: var(--violet); font-weight: 700; }
.mkt-title { display: block; font-size: 14px; color: var(--brand); margin: 3px 0; line-height: 1.3; }
.mkt-sub { font-size: 12px; color: var(--ink-soft); min-height: 16px; }
.mkt-foot { display: flex; align-items: center; justify-content: space-between; margin: 7px 0 3px; }
.mkt-price { font-size: 16px; font-weight: 800; color: var(--brand-2); }
.mkt-loc { font-size: 11.6px; color: var(--ink-soft); }
.lst-cover { height: 200px; border-radius: 12px; background: linear-gradient(135deg, #eef0fb, #e5e0f7); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.lst-gallery { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.lst-gallery img { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); }

/* materials pool */
.matrix th { font-size: 10.5px; }
.scope-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.scope-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.scope-chip { background: #efeafd; color: var(--violet); border: 1px solid #ddd2f5; border-radius: 6px; font-size: 10.8px; font-weight: 700; padding: 1px 6px; }
.scope-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.scope-opt { display: block; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; cursor: pointer; }
.scope-opt:hover { border-color: var(--violet); background: #fbfbfe; }

@media print { .chip-tabs, .crumb-bar, .back-btn, .mkt-card, .deal-pill { }
  .mkt-card { break-inside: avoid; } }

/* ── v1.3 — CCTV boards, profiles, invoice, orders, library ────── */
.cctv-group-h { font-size: 16px; color: var(--brand); margin: 18px 0 10px; }
.cctv-group-h small { color: var(--ink-soft); font-weight: 400; font-size: 12px; }
.cctv-stage { position: relative; overflow: hidden; }
.cctv-view { width: 100%; height: 100%; object-fit: contain; border: none; transform-origin: center center; touch-action: none; }
.cctv-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; flex-wrap: wrap; background: #0d0b26; }
.cctv-btn {
  min-width: 30px; height: 30px; padding: 0 7px; border: 1px solid #2a2757; border-radius: 8px;
  background: #1a1740; color: #cfd2ec; font-size: 13.5px;
}
.cctv-btn:hover { border-color: var(--violet); color: #fff; }
.cctv-btn.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.cctv-btn.rec { background: var(--bad); border-color: var(--bad); color: #fff; animation: blink 1.2s infinite; }
.cctv-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.cctv-chip { padding: 3px 10px; border-radius: 16px; background: #1a1740; border: 1px solid #2a2757; font-size: 11.5px; color: #9ba0d8; cursor: pointer; }
.cctv-chip.on { background: linear-gradient(135deg, var(--brand-2), var(--violet)); color: #fff; border-color: transparent; }
.cctv-rec { position: absolute; top: 8px; left: 10px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 14px; animation: blink 1.2s infinite; z-index: 2; }

.ref-link { border: none; background: #efeafd; color: var(--violet); border-radius: 6px; font-size: 11px; padding: 2px 5px; cursor: pointer; vertical-align: middle; }
.ref-link:hover { background: var(--violet); color: #fff; }

.lib-board { cursor: pointer; transition: transform .1s, border-color .1s; }
.lib-board:hover { transform: translateY(-2px); border-color: var(--violet); }
.lib-board.active { border: 2px solid var(--violet); background: #faf8ff; }

.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: center; }
.ach-item { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.4px; }
.ach-item:last-child { border-bottom: none; }

.ord-flow { display: inline-flex; gap: 2px; margin-right: 6px; }
.ord-step { color: #c9cde2; font-size: 11px; }
.ord-step.done { color: var(--ok); }
.ord-step.cur { color: var(--brand-2); }

.invoice-sheet { max-width: 860px; margin: 0 auto; padding: 26px 30px; }
.inv-head { display: flex; gap: 14px; align-items: flex-start; border-bottom: 3px solid var(--brand); padding-bottom: 14px; margin-bottom: 14px; }
.inv-head img { width: 62px; height: 62px; border-radius: 14px; }
.inv-head > div:nth-child(2) { flex: 1; }
.inv-meta { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; margin-bottom: 14px; flex-wrap: wrap; }
.inv-qr { display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.inv-sign { display: flex; gap: 20px; justify-content: space-between; margin-top: 26px; font-size: 12.5px; color: var(--ink-soft); flex-wrap: wrap; }
@media print {
  .invoice-sheet { box-shadow: none; border: none; max-width: none; }
  .cctv-bar, .ref-link { display: none !important; }
}

/* ── v1.4 — slideshow, review chip, people boards, profile photos ── */
.mkt-card { position: relative; }
.mkt-review {
  position: absolute; top: 126px; right: 9px; border: none; border-radius: 18px;
  background: rgba(13,11,51,.72); color: #fff; font-size: 11.6px; font-weight: 800; padding: 4px 11px; cursor: pointer;
}
.mkt-review:hover { background: var(--brand-2); }
.ss-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 66px; border: none; border-radius: 12px; font-size: 30px; color: #fff;
  background: rgba(0,0,0,.38); cursor: pointer;
}
.ss-nav:hover { background: rgba(53,36,214,.75); }
.ss-prev { left: 12px; } .ss-next { right: 12px; }
.ss-dots { text-align: center; padding: 9px 0 calc(10px + env(safe-area-inset-bottom)); background: rgba(0,0,0,.35); }
.ss-dot { color: #575d8f; cursor: pointer; font-size: 11px; margin: 0 3px; }
.ss-dot.on { color: var(--cyan); }
.pv-stage img { width: 100%; height: 100%; }

.btn.wa { border-color: #b8e6c8; color: #128c4b; } .btn.wa:hover { background: #128c4b; color: #fff; }
.btn.ms { border-color: #bcd4f5; color: #1465c0; } .btn.ms:hover { background: #1465c0; color: #fff; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(255px,100%), 1fr)); gap: 15px; }
.person-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 15px; overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .13s, box-shadow .13s;
}
.person-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(16,12,61,.13); }
.person-photo {
  height: 150px; background: linear-gradient(135deg, #eef0fb, #e5e0f7); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.person-photo .pp-ph { font-size: 44px; opacity: .5; }
.person-photo.has-img .pp-ph { display: none; }
.person-photo.passport { background-position: center 22%; }
.person-body { padding: 12px 14px 14px; }
.person-body b { color: var(--brand); font-size: 14.6px; }

.profile-photo {
  width: 92px; height: 92px; flex-shrink: 0; border-radius: 16px; border: 2px solid var(--line);
  background: #f2f3fa; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer;
}
.profile-photo.passport { background-position: center 25%; }
.profile-photo .pp-ph { font-size: 34px; opacity: .5; }
.profile-photo.has-img .pp-ph { display: none; }
.profile-photo .pp-cam {
  position: absolute; bottom: -7px; right: -7px; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer;
}
@media print { .mkt-review, .ss-nav, .ss-dots, .pp-cam { display: none !important; } }

/* ── v1.5 — expert photo full-image frames, share rows ─────────── */
/* passport frames show the FULL photo (contain, never cropped) on a taller board */
.person-photo.passport {
  height: 210px; background-size: contain; background-repeat: no-repeat;
  background-position: center; background-color: #eef0fb; position: relative;
}
.profile-photo.passport { background-size: contain; background-repeat: no-repeat; background-color: #eef0fb; }
.pp-zoom {
  position: absolute; bottom: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.94); font-size: 14px; cursor: pointer;
}
.pp-zoom:hover { border-color: var(--violet); }
.share-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.share-row:last-of-type { border-bottom: none; }
@media print { .pp-zoom { display: none !important; } }

/* ── v1.9 — Website CMS + order multi-select ───────────────────── */
.web-toggle{display:flex;align-items:center;gap:10px;padding:9px 4px;border-bottom:1px solid var(--line);font-size:14px}
.web-toggle input{width:18px;height:18px;accent-color:var(--brand-2)}
.web-in{width:100%;padding:8px 10px;border:1.5px solid var(--line);border-radius:8px;background:#fbfbfe}
.web-in:focus{outline:none;border-color:var(--violet)}
.web-list{display:flex;flex-direction:column;gap:8px}
.web-item{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:11px;padding:9px 12px;background:#fff}
.wi-thumb{width:64px;height:46px;border-radius:8px;background:#eef0fb;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
.wi-thumb.has{border:1px solid var(--line)}
.wi-body{flex:1;min-width:0}
.wi-body b{display:block;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wi-body span{font-size:12px;color:var(--ink-soft)}
.wi-tools{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
.ord-check{width:17px;height:17px;accent-color:var(--brand-2);cursor:pointer}

/* ── v1.12 — BOQ visibility fixes, docs columns, attendance sign-in ── */
/* BOQ inputs are always visibly framed (never look like a blank row) */
table.reg input.bq-in, table.reg select.bq-in, .bq-in { border: 1px solid #d8dbea; background: #fff; }
table.reg input.bq-in:hover, table.reg select.bq-in:hover, .bq-in:hover { border-color: var(--violet); }
/* freshly added group/item glows until first edit */
tr.bq-new td { background: #fdf6dd !important; }
tr.bq-new .bq-in { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232,185,49,.25); }
tr.bq-group.bq-new td { background: linear-gradient(180deg, #8a6d00, #b18f10) !important; }
/* editable group name on the indigo band */
table.reg input.bq-gname, .bq-gname {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); color: #fff;
  font-weight: 700; min-width: 200px; width: 60%;
}
table.reg input.bq-gname:hover, table.reg input.bq-gname:focus, .bq-gname:hover, .bq-gname:focus { background: rgba(255,255,255,.22); border-color: #fff; color: #fff; }
tr.bq-group .bq-additem { margin-left: 8px; padding: 2px 8px; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
/* generic docs cell */
.doc-cell { white-space: nowrap; }
.doc-cell .btn.small { padding: 4px 8px; }
/* signature pad */
#sig-pad { border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; width: 100%; height: 180px; display: block; cursor: crosshair; }
.att-mark { font-size: 15px; }

/* ── v1.13 — Marketplace 2.0 ─────────────────────────────────────── */
/* section mega-tabs */
.sec-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.sec-tab {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 13px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; text-align: left;
  position: relative; min-width: 165px; flex: 1 1 165px; max-width: 250px; transition: border-color .15s, box-shadow .15s;
}
.sec-tab:hover { border-color: var(--violet); }
.sec-tab.active { border-color: var(--brand-2); box-shadow: 0 3px 14px rgba(53,36,214,.14); background: linear-gradient(180deg,#f6f5ff,#fff); }
.sec-tab .st-ico { font-size: 24px; }
.sec-tab .st-body b { display: block; font-size: 13.6px; color: var(--ink); }
.sec-tab .st-body small { font-size: 10.8px; color: var(--ink-soft); line-height: 1.25; display: block; }
.sec-tab.admin { border-style: dashed; }
.req-badge {
  position: absolute; top: -7px; right: -7px; background: var(--bad); color: #fff; font-size: 11px;
  font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
/* search hero */
.mkt-hero { position: relative; margin-bottom: 14px; }
.mkt-hero input {
  width: 100%; padding: 12px 16px 12px 42px; border: 2px solid var(--brand-2); border-radius: 12px;
  font-size: 14.5px; background: #fff;
}
.mkt-hero input:focus { outline: none; box-shadow: 0 3px 16px rgba(53,36,214,.16); }
.mkt-hero .mh-hint { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; }
/* filter rail layout */
.mrail-wrap { display: grid; grid-template-columns: 236px 1fr; gap: 14px; align-items: start; }
@media (max-width: 940px) { .mrail-wrap { grid-template-columns: 1fr; } .mrail { position: static; } }
.mrail { position: sticky; top: 10px; }
.mrail-drop { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 4px 12px 8px; margin-bottom: 10px; }
.mrail-drop summary { cursor: pointer; font-weight: 700; font-size: 13px; padding: 7px 0; color: var(--ink); list-style: none; }
.mrail-drop summary::-webkit-details-marker { display: none; }
.mrail-drop summary::after { content: '▾'; float: right; color: var(--ink-soft); }
.mrail-drop[open] summary::after { content: '▴'; }
.mrail-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin: 8px 0 3px; }
.mrail-cb { display: flex; align-items: center; gap: 7px; font-size: 12.8px; padding: 4px 0; cursor: pointer; color: var(--ink); }
.mrail-cb input { width: 15px; height: 15px; accent-color: var(--brand-2); flex-shrink: 0; }
.mrail-n { margin-left: auto; font-size: 11px; color: var(--ink-soft); background: #f0f1f8; border-radius: 8px; padding: 1px 7px; }
.mrail-price { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.mrail-price input { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
/* toolbar: chips + sort */
.mkt-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mchips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mchip {
  display: inline-flex; align-items: center; gap: 6px; background: #eef0fb; border: 1px solid #d9dcf2;
  border-radius: 15px; padding: 4px 6px 4px 11px; font-size: 12.4px; color: var(--brand-2); font-weight: 600;
}
.mchip-x { border: none; background: #fff; color: var(--bad); width: 17px; height: 17px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; font-weight: 800; }
.mchip-x:hover { background: var(--bad); color: #fff; }
.mkt-sort { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); }
.mkt-sort select { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mkt-edu { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 2px; }
.edu-tag { font-size: 10.8px; background: #f2f3fa; border: 1px solid #e3e5f2; color: var(--ink-soft); border-radius: 9px; padding: 2px 7px; white-space: nowrap; }
/* tourism */
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(295px,100%), 1fr)); gap: 14px; }
.tour-card { border: 1px solid var(--line); border-radius: 15px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.tour-media {
  height: 210px; background: #10123a center/contain no-repeat;
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tour-media .mkt-imgph { font-size: 46px; opacity: .8; color: #fff; }
.tour-media.has-img .mkt-imgph { display: none; }
/* inline advert layer — video or cycling photo advert plays inside the board */
.tour-media video, .tour-media .adv-inline {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #10123a;
}
.tour-media .adv-inline { background-position: center; background-repeat: no-repeat; background-size: contain; opacity: 0; transition: opacity .7s; }
.tour-media .adv-inline.on { opacity: 1; }
.tour-play {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; z-index: 2;
  background: rgba(255,255,255,.92); color: var(--brand-2); font-size: 21px; padding-left: 5px;
  box-shadow: 0 4px 18px rgba(0,0,0,.3); transition: transform .15s;
}
.tour-play:hover { transform: scale(1.1); }
.tour-fs {
  position: absolute; top: 9px; right: 9px; z-index: 2; width: 34px; height: 34px; border-radius: 9px; border: none;
  background: rgba(15,16,32,.72); color: #fff; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.tour-fs:hover { background: var(--brand-2); }
.tour-days { position: absolute; left: 10px; bottom: 8px; z-index: 2; background: rgba(10,12,40,.72); color: #fff; font-size: 11.6px; border-radius: 9px; padding: 3px 9px; }
.tour-media:fullscreen, .tour-media:-webkit-full-screen { background: #000; }
.tour-media:fullscreen .adv-inline, .tour-media:fullscreen video { object-fit: contain; }
/* v1.41 — tour media manager (photos + videos, thumbnail & advert pickers) */
.tmm-h { font-weight: 800; font-size: 13.5px; color: var(--brand-2); margin: 12px 0 8px; }
.tmm-none { font-size: 12.5px; color: var(--ink-soft); }
.tmm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px,100%), 1fr)); gap: 10px; }
.tmm-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.tmm-th { height: 96px; background: #eef0fb center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #9ba0c8; }
.tmm-th.vid { background-color: #10123a; color: #fff; background-size: contain; background-repeat: no-repeat; background-position: center; }
.tmm-th.star { box-shadow: inset 0 0 0 3px var(--gold, #e8b931); }
.tmm-acts { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; align-items: center; }
.tmm-acts .btn.small { font-size: 11px; padding: 5px 8px; }
.tmm-cur { font-size: 11px; font-weight: 800; color: #9a6a08; background: #fcf2dc; border-radius: 9px; padding: 3px 8px; }
/* v1.40 — ✕ stops the advert / leaves full screen (no Esc key needed) */
.adv-x {
  position: absolute; top: 9px; right: 50px; z-index: 5; width: 34px; height: 34px; border-radius: 9px; border: none;
  background: rgba(15,16,32,.72); color: #fff; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.adv-x:hover { background: #c8283c; }
.tour-media:fullscreen .adv-x, .tour-media:-webkit-full-screen .adv-x { top: 18px; right: 18px; width: 54px; height: 54px; font-size: 22px; border-radius: 14px; }
.tour-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tour-tags { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.tour-high { display: flex; flex-direction: column; gap: 2px; font-size: 12.2px; color: var(--ink-soft); }
.tour-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; align-items: center; }
/* advert player */
.adv-stage { position: relative; height: 300px; border-radius: 13px; overflow: hidden; background: #10123a; }
.adv-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .9s; background-size: cover; background-position: center;
}
.adv-slide.active { opacity: 1; }
.adv-slide.kb.active { animation: kenburns 3.2s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.13); } }
.adv-text { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; text-align: center; padding: 20px; }
.adv-text b { font-size: 22px; }
.adv-text span { font-size: 14px; opacity: .85; }
.adv-caption { margin-top: 8px; text-align: center; font-size: 13.6px; font-weight: 600; color: var(--brand-2); min-height: 20px; }
/* consult / service boards */
.cex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(285px,100%), 1fr)); gap: 14px; }
.cex-card { border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 13px; display: flex; flex-direction: column; gap: 9px; }
.cex-top { display: flex; gap: 11px; align-items: flex-start; }
.cex-photo {
  width: 62px; height: 62px; border-radius: 50%; background: #eef0fb center/cover no-repeat; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 26px; border: 2px solid #e4e6f4;
}
.cex-photo.has-img .pp-ph { display: none; }
.cex-id { flex: 1; min-width: 0; }
.cex-id b { display: block; font-size: 14.4px; }
.cex-id small { color: var(--ink-soft); font-size: 11.8px; display: block; margin: 1px 0 4px; }
.cex-disc { display: flex; gap: 4px; flex-wrap: wrap; }
.cex-open { flex-shrink: 0; }
.cex-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12.4px; color: var(--ink-soft); }
.slot-meter {
  position: relative; background: #eefaf1; border: 1px solid #cdebd7; border-radius: 10px; padding: 7px 11px;
  font-size: 12.4px; font-weight: 600; color: #157347; overflow: hidden;
}
.slot-meter .slot-bar { position: absolute; inset: 0 auto 0 0; background: rgba(30,158,99,.13); }
.slot-meter span { position: relative; }
.slot-meter.full { background: #fdeeee; border-color: #f2cbcc; color: #b13333; }

/* ── v1.14 — product detail page + payment gateway ───────────────── */
.pdp-card { padding: 18px; }
.pdp-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 22px; }
@media (max-width: 880px) { .pdp-wrap { grid-template-columns: 1fr; } }
.pdp-main {
  height: 460px; border-radius: 14px; background: #0f1020 center/contain no-repeat;
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  position: relative; cursor: zoom-in; overflow: hidden;
}
.pdp-main.has-img .mkt-imgph { display: none; }
.pdp-main .pdp-expand {
  position: absolute; bottom: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 10px;
  border: none; background: rgba(15,16,32,.72); color: #fff; font-size: 17px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
}
.pdp-main .pdp-expand:hover { background: var(--brand-2); }
@media (max-width: 880px) { .pdp-main { height: 320px; } }
.pdp-main .mkt-imgph { font-size: 64px; opacity: .55; color: #fff; }
.pdp-main.has-img .mkt-imgph { display: none; }
.pdp-main .mkt-feat { position: absolute; top: 10px; left: 10px; }
.pdp-main .deal-pill { position: absolute; top: 10px; right: 10px; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.pdp-thumb {
  width: 62px; height: 62px; border-radius: 9px; background: #eef0fb center/cover no-repeat;
  border: 2px solid var(--line); cursor: pointer; transition: border-color .12s;
}
.pdp-thumb:hover, .pdp-thumb.on { border-color: var(--brand-2); }
.pdp-thumb.add { display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--ink-soft); background: #fff; border-style: dashed; }
.pdp-title { font-size: 21px; line-height: 1.3; margin: 4px 0 2px; }
.pdp-subtitle { color: var(--ink-soft); font-size: 13.4px; margin-bottom: 10px; }
.pdp-pricebox {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; background: #faf7f2;
  border: 1px solid #efe6d8; border-radius: 12px; padding: 12px 15px; margin-bottom: 10px;
}
.pdp-price { font-size: 27px; font-weight: 800; color: #c7431f; }
.pdp-unit { font-size: 13px; color: var(--ink-soft); }
.pdp-stock { font-size: 13.2px; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.pdp-stock.ok { background: #eefaf1; border: 1px solid #cdebd7; color: #157347; }
.pdp-stock.out { background: #fdeeee; border: 1px solid #f2cbcc; color: #b13333; font-weight: 700; }
.pdp-qtyrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pdp-qlabel { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.pdp-stepper { display: flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.pdp-stepper button { width: 38px; height: 38px; border: none; background: #f5f6fb; font-size: 17px; cursor: pointer; color: var(--ink); }
.pdp-stepper button:hover { background: var(--brand-2); color: #fff; }
.pdp-stepper input { width: 58px; border: none; text-align: center; font-size: 15px; font-weight: 700; -moz-appearance: textfield; }
.pdp-stepper input::-webkit-outer-spin-button, .pdp-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pdp-stepper input:focus { outline: none; background: #fbfaff; }
.pdp-sub { font-size: 13.4px; color: var(--ink-soft); }
.pdp-sub b { color: var(--brand-2); font-size: 15px; }
.pdp-cta { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pdp-buybtn { flex: 1 1 150px; text-align: center; padding: 12px 14px; font-size: 14.6px; }
.pdp-info { display: flex; flex-direction: column; gap: 5px; font-size: 12.8px; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 10px; margin-bottom: 10px; }
.pdp-seller {
  display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 13px; background: #fbfbfe; margin-bottom: 10px; font-size: 13px;
}
.pdp-seller small { color: var(--ink-soft); }
.pdp-seller .btn { margin-left: auto; }
.pdp-slogo {
  width: 40px; height: 40px; border-radius: 50%; background: var(--brand-2); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}
.pdp-admin { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 12.6px; color: var(--ink-soft); }
/* payment block */
.pay-block h4 { margin-bottom: 8px; }
.pay-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px,100%), 1fr)); gap: 12px; }
.pay-method { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fbfbfe; font-size: 13px; }
.pay-method > b { display: block; margin-bottom: 7px; }
/* v1.42 — accepted-method brand marks */
.pay-strip { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 11px; }
.pay-brands { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pay-ico { width: 46px; height: 29px; border-radius: 5px; display: block; }
.pay-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; }
.pay-safe { display: block; margin-top: 7px; font-size: 11.6px; color: var(--ink-soft); line-height: 1.5; }
.pay-grid { display: flex; flex-direction: column; gap: 5px; }
.pay-grid label { display: block; font-size: 10.8px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.pay-qr { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
.pay-qr small { font-size: 11px; color: var(--ink-soft); }
@media print { .pay-block { break-inside: avoid; } }

/* ── v1.15 — university board · delivery tracking ────────────────── */
.uni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px,100%), 1fr)); gap: 14px; }
.uni-card { border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.uni-top { display: flex; gap: 11px; align-items: flex-start; }
.uni-logo {
  width: 50px; height: 50px; border-radius: 12px; background: #eef0fb center/cover no-repeat; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 26px; border: 1px solid #e4e6f4;
}
.uni-logo.has-img span { display: none; }
.uni-id { flex: 1; min-width: 0; }
.uni-id b { display: block; font-size: 14.6px; line-height: 1.25; }
.uni-id small { color: var(--ink-soft); font-size: 11.8px; }
.uni-field { font-size: 15px; font-weight: 700; color: var(--brand-2); }
.uni-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.uni-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #faf7f2; border: 1px solid #efe6d8; border-radius: 11px; padding: 9px 11px; }
.uni-meta label { display: block; font-size: 10.4px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.uni-meta b { font-size: 13px; }
.uni-desc { font-size: 12.6px; color: var(--ink-soft); line-height: 1.5; }
.uni-req { font-size: 11.6px; display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.uni-req b { font-size: 12px; margin-right: 3px; }
.uni-btns { display: flex; gap: 7px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.uni-btns .btn.primary { flex: 1; }
.uni-doccheck { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
@media (max-width: 620px) { .uni-doccheck { grid-template-columns: 1fr; } .uni-meta { grid-template-columns: 1fr; } }
/* delivery tracking */
.trk-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.trk-stepper { display: flex; justify-content: space-between; position: relative; margin: 6px 0; }
.trk-stepper::before { content: ''; position: absolute; top: 11px; left: 6%; right: 6%; height: 2px; background: var(--line); z-index: 0; }
.trk-step { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; z-index: 1; flex: 1; text-align: center; }
.trk-dot { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--line); color: #c3c8e0; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.trk-step.done .trk-dot { border-color: var(--ok); color: var(--ok); background: #eefaf1; }
.trk-step.cur .trk-dot { border-color: var(--brand-2); color: #fff; background: var(--brand-2); box-shadow: 0 0 0 4px rgba(53,36,214,.15); }
.trk-lbl { font-size: 10.8px; color: var(--ink-soft); max-width: 74px; }
.trk-step.cur .trk-lbl { color: var(--brand-2); font-weight: 700; }
.trk-timeline { display: flex; flex-direction: column; gap: 0; }
.trk-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.trk-item:last-child { border-bottom: none; }
.trk-when { font-size: 12px; color: var(--ink-soft); white-space: nowrap; min-width: 88px; }
.trk-body { font-size: 13px; }

/* ── v1.16 — tour customisation tick-list + live breakdown ───────── */
.tro-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px,100%), 1fr)); gap: 10px; }
.tro-group { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; background: #fbfbfe; }
.tro-group > b { display: block; font-size: 12.8px; margin-bottom: 5px; color: var(--brand-2); }
.tro-group > b + small, .tro-group small { color: var(--ink-soft); }
.tro-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.8px; cursor: pointer; }
.tro-item input { width: 15px; height: 15px; accent-color: var(--brand-2); flex-shrink: 0; }
.tro-item .tro-name { flex: 1; }
.tro-item .tro-price { font-size: 11.6px; color: var(--ink-soft); white-space: nowrap; font-weight: 600; }
.tro-item input:checked ~ .tro-price { color: var(--brand-2); }
.tro-summary { border: 1.5px solid var(--brand-2); border-radius: 13px; padding: 11px 14px; margin-top: 12px; background: linear-gradient(180deg,#f6f5ff,#fff); }
.tro-summary h4 { margin-bottom: 6px; }
.tro-line { display: flex; justify-content: space-between; gap: 12px; font-size: 12.8px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.tro-line:last-of-type { border-bottom: none; }
.tro-line.inc { color: var(--ink-soft); font-size: 12px; }
.tro-line span:last-child { font-family: var(--mono, monospace); white-space: nowrap; }
.tro-total { display: flex; justify-content: space-between; font-size: 15px; margin-top: 6px; padding-top: 7px; border-top: 2px solid var(--brand-2); }
.tro-total b { color: var(--brand-2); font-size: 17px; }

/* ── v1.17 — orders tracking & control ───────────────────────────── */
.issue-pill { font-size: 11.6px; font-weight: 800; border-radius: 10px; padding: 3px 8px; white-space: nowrap; }
.issue-pill.open { background: #fdeeee; border: 1px solid #f2cbcc; color: #b13333; }
.issue-pill.done { background: #eefaf1; border: 1px solid #cdebd7; color: #157347; }
/* shipping schedule strip */
.ship-sched { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px,100%), 1fr)); gap: 10px; background: #fbfbfe; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; }
.ship-sched label { display: block; font-size: 10.4px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 2px; }
.ship-sched b { font-size: 13.4px; }
.ship-sched input { border: 1px solid var(--line); border-radius: 7px; padding: 4px 7px; width: 100%; }
/* shipping route line */
.route-line { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding: 6px 2px 10px; }
.route-pt {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px; min-width: 130px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 2px; background: #fff; font-size: 12.4px; opacity: .65;
}
.route-pt b { font-size: 12.6px; overflow-wrap: anywhere; }
.route-pt small { color: var(--ink-soft); font-size: 11px; }
.route-pt.done { opacity: 1; border-color: #cdebd7; background: #f6fdf8; }
.route-pt.cur { opacity: 1; border-color: var(--brand-2); background: linear-gradient(180deg,#f6f5ff,#fff); box-shadow: 0 3px 12px rgba(53,36,214,.16); }
.route-pt.cur .route-ico { animation: route-pulse 1.6s infinite; display: inline-block; }
@keyframes route-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.route-arrow { align-self: center; color: var(--ink-soft); flex-shrink: 0; }
/* complaints thread */
.iss-item { border: 1px solid var(--line); border-left: 4px solid #c3c8e0; border-radius: 10px; padding: 9px 12px; margin-bottom: 8px; font-size: 13px; }
.iss-item.open { border-left-color: var(--bad); background: #fffafa; }
.iss-item.done { border-left-color: var(--ok); }
.iss-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 4px; }
.iss-head span { font-size: 11.8px; color: var(--ink-soft); }
.iss-res { margin-top: 5px; font-size: 12.6px; color: #157347; background: #f2fbf5; border-radius: 8px; padding: 5px 9px; }

/* ── v1.20 — shopping cart ───────────────────────────────────────── */
.mkt-cartadd {
  position: absolute; right: 10px; bottom: 10px; border: none; border-radius: 16px; padding: 6px 12px;
  font-weight: 800; font-size: 12px; cursor: pointer; background: var(--gold, #e8b931); color: #4d3a00;
  box-shadow: 0 3px 10px rgba(0,0,0,.22);
}
.mkt-cartadd:hover { background: #f5c832; transform: scale(1.06); }
/* v1.22 — gold "add to cart" + visible cart quantities + pagination */
.btn.gold { background: linear-gradient(135deg, #f2c230, #e8b931); border-color: #d8a92a; color: #4d3a00; font-weight: 800; }
.btn.gold:hover { background: #f5c832; }
.cart-line .pdp-stepper input { color: var(--ink); background: #fff; font-weight: 800; opacity: 1; }
.pgr { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.pgr button {
  min-width: 36px; height: 36px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff;
  font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ink); padding: 0 9px;
}
.pgr button:hover { border-color: var(--brand-2); color: var(--brand-2); }
.pgr button.on { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.pgr button:disabled { opacity: .4; cursor: default; }
.pgr .pgr-dots { color: var(--ink-soft); padding: 0 2px; }
.mkt-cartbtn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; align-items: center;
  border: none; border-radius: 10px; padding: 8px 14px; font-weight: 800; font-size: 13px; cursor: pointer;
  background: linear-gradient(135deg, var(--brand-2), var(--violet)); color: #fff;
}
.cart-line { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; margin-bottom: 8px; background: #fbfbfe; }
.cart-info { flex: 1; min-width: 0; }
.cart-info b { display: block; font-size: 13.6px; }
.cart-info small { color: var(--ink-soft); font-size: 11.8px; }

/* ── v1.26 — PDP commerce features ──────────────────────────────── */
.pdp-old { color: var(--ink-soft); font-size: 15px; font-weight: 600; }
.pdp-pct { font-style: normal; background: #fdeeee; color: #b13333; font-weight: 800; font-size: 12.4px; border-radius: 9px; padding: 3px 9px; }
.pdp-promo { background: #fdf6dd; border: 1px solid #ecd9a0; border-radius: 11px; padding: 9px 13px; font-size: 13px; margin-bottom: 10px; color: #8a6d00; }
.pdp-vars { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; font-size: 13px; }
.pdp-var { border: 1.5px solid var(--line); border-radius: 9px; background: #fff; padding: 6px 13px; font-size: 12.6px; font-weight: 700; cursor: pointer; color: var(--ink); }
.pdp-var:hover { border-color: var(--violet); }
.pdp-var.on { border-color: var(--brand-2); color: var(--brand-2); background: #f4f2ff; box-shadow: 0 0 0 1px var(--brand-2); }
.pdp-del { border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; margin-bottom: 10px; background: #fbfbfe; font-size: 13px; }
.pdp-del > b { display: block; font-size: 10.6px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 5px; }
.pd-row { padding: 3px 0; }
.pd-row small { color: var(--ink-soft); }
.pd-chg { border: none; background: none; color: var(--brand-2); font-weight: 800; font-size: 11.4px; cursor: pointer; letter-spacing: .04em; }
.pd-chg:hover { text-decoration: underline; }
.pdp-act { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pd-act {
  flex: 1 1 100px; text-align: center; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  padding: 8px 10px; font-size: 12.2px; font-weight: 800; cursor: pointer; color: var(--ink); text-decoration: none;
}
.pd-act:hover { border-color: var(--brand-2); color: var(--brand-2); }

/* ── v1.18 — BOQ group hover fix · status-select colours · order groups ── */
/* the generic row-hover wash (table.reg tr:hover td) outranks the indigo
   group band and made white text invisible — keep the band on hover */
table.reg tr.bq-group:hover td { background: linear-gradient(180deg, #241786, #3524d6); }
table.reg tr.bq-group.bq-new:hover td { background: linear-gradient(180deg, #8a6d00, #b18f10) !important; }
/* colour-coded editable status selects (match the Assignments pill palette) */
select.st-sel { font-weight: 700; border-radius: 9px; border: 1.5px solid transparent; }
select.st-sel.stc-new { background: #fdf6dd; border-color: #ecd9a0; color: #8a6d00; }
select.st-sel.stc-run { background: #efeaff; border-color: #cfc4f4; color: #4325c7; }
select.st-sel.stc-done { background: #e2f6e9; border-color: #b7e3c6; color: #157347; }
select.st-sel.stc-bad { background: #fdeeee; border-color: #f2cbcc; color: #b13333; }
select.st-sel.stc-info { background: #e8f6fb; border-color: #bfe4f2; color: #127290; }
/* customer group bands in the orders register */
tr.ordgrp td {
  background: linear-gradient(180deg, #1b2559, #2c3a8c); color: #fff; font-size: 12.8px; padding: 8px 12px;
}
table.reg tr.ordgrp:hover td { background: linear-gradient(180deg, #1b2559, #2c3a8c); }
tr.ordgrp b { font-size: 13.4px; }
tr.ordgrp small { color: #c9d0f0; }
tr.ordgrp .og-badge {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 10px;
  padding: 2px 9px; font-size: 11.4px; margin-left: 8px; white-space: nowrap;
}
tr.ordgrp .og-badge.warn { background: #b13333; border-color: #d66; }
.mkt-hero input { padding-right: 128px; }

/* ═══════ v1.43 — currency switcher & exchange-rate card ═══════ */
.cur-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.cur-sw select {
  padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 9px; font-family: inherit;
  font-size: 13px; font-weight: 700; background: #fff; color: var(--brand-2); cursor: pointer; max-width: 190px;
}
.cur-sw select:focus { outline: none; border-color: var(--brand-2); }
.fx-in {
  width: 122px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px;
  font-family: ui-monospace, monospace; font-size: 12.4px; text-align: right;
}
.fx-in:focus { outline: none; border-color: var(--brand-2); }
.fx-alt { color: var(--ink-soft); font-size: .88em; font-weight: 600; white-space: nowrap; }
.pdp-asis { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-soft); font-weight: 600; }

/* v1.45 — currency picker button + list (MIS) */
.cur-pick-btn { background: linear-gradient(135deg, var(--cyan, #59c9e8), #3fa8d8); color: #04283a; border: none; font-weight: 800; box-shadow: 0 3px 12px rgba(89,201,232,.4); }
.cur-pick-btn b { font-size: 14px; letter-spacing: .3px; }
.cur-pick-btn small { font-size: 11.4px; opacity: .85; font-weight: 700; }
.cur-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(205px,100%), 1fr)); gap: 7px; max-height: 46vh; overflow-y: auto; }
.cur-opt { display: flex; align-items: center; gap: 9px; text-align: start; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; padding: 9px 11px; cursor: pointer; font-family: inherit; font-size: 13.2px; color: var(--ink); }
.cur-opt:hover { border-color: var(--brand-2); background: #f6f5ff; }
.cur-opt.on { border-color: var(--brand-2); background: #eef0ff; }
.cur-opt b { min-width: 40px; font-weight: 800; color: var(--brand-2); }
.cur-opt span { flex: 1; color: var(--ink-soft); font-size: 12.4px; }
.cur-opt i { font-style: normal; color: #1e9e63; font-weight: 800; }

/* ── sourcing requests: negotiation room (v1.45) ── */
.src-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; }
@media (max-width: 900px) { .src-grid { grid-template-columns: 1fr; } }
.src-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.src-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px,100%), 1fr)); gap: 9px; }
.src-facts label, .src-blk label, .src-sum label { display: block; font-size: 10.6px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-soft); }
.src-facts b { font-size: 13.4px; overflow-wrap: anywhere; }
.src-blk p { font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.src-phs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.src-ph { width: 96px; height: 72px; border-radius: 10px; border: 1px solid var(--line); background: #eef0fb center/cover no-repeat; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.src-ph:hover { border-color: var(--brand-2); }
.src-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; background: #fbfbfe; border: 1px solid var(--line); border-radius: 12px; padding: 11px; }
.src-sum b { font-size: 16px; }
.src-price { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px,100%), 1fr)); gap: 9px; border-top: 1px dashed var(--line); padding-top: 11px; }
.src-price .wide { grid-column: 1 / -1; }
.src-price label { display: block; font-size: 11px; color: var(--ink-soft); margin-bottom: 3px; }
.src-price input, .src-price select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-family: inherit; font-size: 13px; }
.src-price input:focus, .src-price select:focus { outline: none; border-color: var(--brand-2); }
.src-thread { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; padding: 9px; background: #fbfbfe; border: 1px solid var(--line); border-radius: 12px; }
.src-msg { max-width: 88%; border-radius: 12px; padding: 8px 11px; font-size: 12.8px; line-height: 1.6; }
.src-msg.cust { align-self: flex-start; background: #eef0ff; border: 1px solid #dcdcfa; }
.src-msg.team { align-self: flex-end; background: #f2fbf5; border: 1px solid #cfeeda; }
.src-who { font-size: 10.8px; font-weight: 800; color: var(--brand-2); margin-bottom: 2px; }
.src-who small { font-weight: 600; color: var(--ink-soft); margin-inline-start: 5px; }
.src-txt { white-space: pre-wrap; overflow-wrap: anywhere; }
#src-reply { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-family: inherit; font-size: 13px; resize: vertical; }
#src-reply:focus { outline: none; border-color: var(--brand-2); }

/* v1.46 — country flag beside a currency code. Windows ships no flag glyphs,
   so there it degrades to the two-letter country code — still a clear hint. */
/* Twemoji Country Flags — flag artwork for every platform, including Windows,
   which ships no flag glyphs. 78 KB, loaded only when a flag is drawn.
   Twemoji graphics: CC-BY 4.0 (Twitter, Inc and contributors). */
@font-face {
  font-family: 'Twemoji Country Flags'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/twemoji-flags.woff2') format('woff2');
  unicode-range: U+1F1E6-1F1FF;
}
.cur-flag { font-size: 16px; line-height: 1; font-weight: 800; letter-spacing: .5px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
/* only where the system has no flag glyphs (see flagFontReady) */
.flag-font .cur-flag { font-family: "Twemoji Country Flags", sans-serif; font-weight: 400; }
.cur-opt .cur-flag { font-size: 17px; min-width: 22px; text-align: center; }
.reg .cur-flag { font-size: 15px; }

/* two-letter country badge where flag glyphs are unavailable (Windows) */
.no-flag-emoji .cur-flag { display: inline-flex; align-items: center; justify-content: center;
  min-width: 27px; height: 18px; border-radius: 4px; background: rgba(0,0,0,.12);
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px; }
.no-flag-emoji .cur-opt .cur-flag, .no-flag-emoji .reg .cur-flag { background: #eef0fb; color: var(--brand-2); }


/* ═══════════ v1.48 — fits any screen ══════════════════════════════════════
   Arabic strings run longer than English, and Android's text-scaling setting
   makes every string wider again, so anything that cannot wrap or shrink drags
   the whole page sideways and the layout no longer fits the screen. The page
   itself can never scroll sideways (clip keeps sticky headers working); media
   and tables stay inside their column; long words and refs break; and wide
   registers scroll inside their own frame instead of pushing the page. */
html { max-width: 100%; overflow-x: hidden; overflow-x: clip; }
body { max-width: 100%; overflow-x: clip; }
img, svg, video, canvas, iframe, pre { max-width: 100%; }
h1, h2, h3, h4, h5, p, b, strong, small, span, a, li, td, th, label { overflow-wrap: break-word; }
.tbl-wrap, .reg-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }


/* v1.49 — marketplace boards to the storefront standard ────────────────────
   The boards showed a plain status pill and no obvious way in. They now carry
   the same availability badge, currency flag and action button as Market Globe
   and the website, so staff and customers read one design. */
.stkb { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 14px; white-space: nowrap; }
.stkb.ok { background: #e2f6ec; color: #157a4c; }
.stkb.low { background: #fcf2dc; color: #9a6a08; }
.stkb.out { background: #fdeaea; color: #b32e2e; }
.stkb.dig { background: #efeaff; color: #4325c7; }
.mkt-open { display: block; margin-top: 11px; border-radius: 11px; padding: 10px; text-align: center;
  font-weight: 800; font-size: 13.4px; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--violet)); }
.mkt-card:hover .mkt-open { filter: brightness(1.08); }
/* the listing status sits on the image, clear of the badges above it */
.mkt-state { position: absolute; top: 38px; left: 9px; }
/* add-to-cart moves onto the image so it no longer covers the new button */
.mkt-cartadd { top: 126px; left: 9px; right: auto; bottom: auto; }
.mkt-price .cur-flag { font-size: 15px; vertical-align: -2px; }
.pdp-price .cur-flag { font-size: 20px; vertical-align: -3px; }
/* the switcher's flag was too small to read against the cyan button */
.cur-pick-btn .cur-flag { font-size: 19px; vertical-align: -3px; }


/* v1.50 — Website CMS boards + marketplace add tools ────────────────────────
   The CMS curates the SAME cards the public site renders (see webBoardEditor)
   so what you arrange is what goes live. Colours, radii and gradients mirror
   home.html's .pcard / .ncard / .sec-tile / service blocks on purpose. */
.wb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.wb-head p { font-size: 12.6px; color: var(--ink-soft); margin-top: 4px; }
.wb-head-act { display: flex; gap: 8px; flex-wrap: wrap; }
.wb-cat-h { font-weight: 800; color: var(--brand); font-size: 14.5px; margin: 18px 2px 10px; }
.wb-cat-h small { color: var(--ink-soft); font-weight: 700; }
.wb-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(300px,100%), 1fr)); }
.wb-grid.tiles { grid-template-columns: repeat(auto-fill, minmax(min(230px,100%), 1fr)); }
.wb-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; z-index: 5; }
.wb-t { border: none; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 13px;
  background: rgba(255,255,255,.94); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.wb-t:hover { background: #fff; transform: translateY(-1px); }
.wb-t:disabled { opacity: .35; cursor: default; }
.wb-t.danger { color: #b32e2e; }
.wb-hidden { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-8deg); z-index: 4;
  background: rgba(13,11,51,.85); color: #ffd66b; font-size: 12px; font-weight: 800; padding: 6px 14px;
  border-radius: 20px; white-space: nowrap; pointer-events: none; }
.wb-pcard.off, .wb-ncard.off, .wb-stile.off, .wb-svc.off { opacity: .45; filter: grayscale(.5); }
/* project board — the site's dark .pcard */
.wb-pcard { position: relative; border-radius: 20px; overflow: hidden; min-height: 230px; display: flex;
  align-items: flex-end; color: #fff; box-shadow: 0 8px 26px rgba(16,12,61,.18); }
.wb-part { position: absolute; inset: 0; }
.wb-pico { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 54px; opacity: .8; }
.wb-ptag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.94); color: var(--brand);
  font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 4px 11px; border-radius: 16px; z-index: 3; max-width: 70%; }
.wb-pcap { position: relative; z-index: 2; width: 100%; padding: 56px 16px 14px;
  background: linear-gradient(transparent, rgba(7,5,28,.93) 60%); }
.wb-pcap b { font-size: 16px; display: block; margin-bottom: 3px; }
.wb-pcap span { font-size: 12px; color: #cfd2ea; display: block; }
/* insight board — the site's white .ncard */
.wb-ncard { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(16,12,61,.07); }
.wb-nimg { position: relative; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #fff; }
.wb-ncat { position: absolute; bottom: 8px; left: 10px; background: rgba(255,255,255,.94); color: var(--brand);
  font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 14px; }
.wb-nbody { padding: 12px 14px 14px; }
.wb-ndate { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.wb-nbody b { display: block; font-size: 14px; color: var(--brand); margin: 3px 0; }
.wb-nbody p { font-size: 12.2px; color: var(--ink-soft); }
/* sector tile — the site's .sec-tile */
.wb-stile { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 46px 18px 18px;
  box-shadow: 0 3px 16px rgba(16,12,61,.06); }
.wb-sico { font-size: 26px; margin-bottom: 6px; }
.wb-stile b { display: block; color: var(--brand); font-size: 14.5px; }
.wb-stile span { font-size: 12px; color: var(--ink-soft); }
/* service block */
.wb-svc { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 46px 18px 16px;
  box-shadow: 0 3px 16px rgba(16,12,61,.06); }
.wb-svc-h { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.wb-svc-h b { color: var(--brand); font-size: 15px; }
.wb-svc p { font-size: 12.6px; color: var(--ink-soft); }
.wb-svc small { display: block; margin-top: 7px; color: var(--violet); font-weight: 700; font-size: 11.6px; }
/* marketplace: the permanent "add product" tile + duplicate button */
.mkt-add-tile { border: 2px dashed var(--brand-2); border-radius: 14px; background: #f7f6ff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 240px;
  font-family: inherit; color: var(--brand-2); transition: background .15s, transform .12s; }
.mkt-add-tile:hover { background: #efedff; transform: translateY(-3px); }
.mkt-add-tile .mat-ico { font-size: 40px; font-weight: 800; line-height: 1; }
.mkt-add-tile b { font-size: 15px; }
.mkt-add-tile small { color: var(--ink-soft); font-size: 11.6px; }
.mkt-dup { position: absolute; top: 158px; right: 9px;   /* below the photo-review pill */ border: none; border-radius: 16px; width: 32px; height: 26px;
  cursor: pointer; background: rgba(255,255,255,.92); color: var(--brand-2); font-weight: 800; font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.mkt-dup:hover { background: #fff; }

/* v1.51 — section manager rows + expert/custom boards + map preview ────── */
.ws-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 8px; background: #fff; flex-wrap: wrap; }
.ws-row.off { background: #f6f6fa; }
.ws-row.off .ws-body b { color: var(--ink-soft); }
.ws-ico { font-size: 20px; width: 30px; text-align: center; }
/* v1.87 — Trade Space publish rows: the item's photo as a small square thumb */
.tgs-th { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 9px; background: #eef0fb center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; font-size: 19px; overflow: hidden; }
.ws-body { flex: 1; min-width: 160px; }
.ws-body b { display: block; font-size: 13.6px; color: var(--ink); }
.ws-body span { font-size: 11.8px; color: var(--ink-soft); }
/* expert board — mirrors the site's .xp-card */
.wb-xcard { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 44px 18px 16px;
  box-shadow: 0 4px 20px rgba(16,12,61,.07); display: flex; flex-direction: column; }
.wb-xtop { display: flex; gap: 11px; align-items: center; margin-bottom: 8px; }
.wb-xphoto { width: 52px; height: 52px; border-radius: 50%; background-size: cover; background-position: center;
  flex-shrink: 0; box-shadow: 0 4px 14px rgba(16,12,61,.18); }
.wb-xinit { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 17px;
  background: linear-gradient(135deg, var(--brand-2), var(--violet)); }
.wb-xtop b { display: block; color: var(--brand); font-size: 14.4px; line-height: 1.25; }
/* > div > — otherwise this catches the photo circle (also a span) and its
   display:block silently kills the flex centering of the monogram */
.wb-xtop > div > span { font-size: 11.8px; color: var(--ink-soft); display: block; }
.wb-xyears { margin-left: auto; background: #f4f2ff; color: var(--brand-2); font-weight: 800; font-size: 11px;
  border-radius: 14px; padding: 3px 9px; white-space: nowrap; font-style: normal; }
.wb-xchips { display: flex; gap: 5px; flex-wrap: wrap; margin: 3px 0 7px; }
.wb-xchips span { background: #eef6fb; color: #0f5e7d; font-size: 10.8px; font-weight: 700; border-radius: 12px; padding: 2px 9px; }
.wb-xblurb { font-size: 12.4px; color: var(--ink-soft); line-height: 1.55; }
.wb-xfoot { margin-top: 8px; color: var(--violet); font-weight: 700; font-size: 11.4px; }
/* custom section board */
.wb-csec { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 44px 18px 16px;
  box-shadow: 0 3px 16px rgba(16,12,61,.06); }
.wb-csec.dark { background: linear-gradient(150deg, #0a0822, #171058 70%, #1d1470); color: #e8eaff; border: none; }
.wb-ceye { font-size: 10.6px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan, #59c9e8); }
.wb-csec b { display: block; font-size: 15.5px; margin: 3px 0 5px; }
.wb-csec:not(.dark) b { color: var(--brand); }
.wb-csec p { font-size: 12.4px; opacity: .85; }
.wb-cimg { height: 90px; border-radius: 10px; background-size: cover; background-position: center; margin-top: 10px; }
/* world-map preview — same classes home.html uses, scoped to the app */
.wm-frame { border-radius: 18px; overflow: hidden; box-shadow: 0 14px 44px rgba(4,2,20,.4); }
.wm-svg { width: 100%; height: auto; display: block; }
.wm-lat { fill: none; stroke: rgba(137,146,255,.13); stroke-width: 1; }
line.wm-lat { stroke: rgba(137,146,255,.08); }
.wm-arc { fill: none; stroke: rgba(89,201,232,.5); stroke-width: 1.6; stroke-dasharray: 5 7; animation: wmdash 30s linear infinite; }
@keyframes wmdash { to { stroke-dashoffset: -600; } }
.wm-dot { fill: #e8b931; }
.wm-pt.hq .wm-dot { fill: #59c9e8; }
.wm-halo { fill: rgba(232,185,49,.25); transform-origin: center; transform-box: fill-box; animation: wmpulse 2.6s ease-out infinite; }
.wm-pt.hq .wm-halo { fill: rgba(89,201,232,.3); }
@keyframes wmpulse { 0% { transform: scale(.4); opacity: 1; } 80% { transform: scale(1.7); opacity: 0; } 100% { opacity: 0; } }
.wm-pt text { fill: #e8eaff; font-size: 13px; font-weight: 700; text-anchor: middle; font-family: inherit; }

/* v1.52 — the real world map (CMS preview shares the site's classes) */
.wm-cty { fill: #241d70; stroke: rgba(140,148,255,.35); stroke-width: .6; }
.wm-cty.on { fill: #3d2fa8; stroke: rgba(89,201,232,.85); stroke-width: 1.1; filter: drop-shadow(0 0 6px rgba(89,201,232,.35)); }

/* v1.52 — expert photo circles: robust centering + honest empty state */
.wb-xphoto { display: flex; align-items: center; justify-content: center; overflow: hidden; text-align: center; line-height: 1; }
.wb-xempty { background: #f4f2ff; border: 2px dashed var(--brand-2); font-size: 20px; cursor: help; }

/* v1.53 — Sellers Control Centre + Customer Purchases ─────────────────────── */
.sc-card { margin-bottom: 16px; }
.sc-card.suspended { opacity: .75; border-left: 4px solid #b32e2e; }
.sc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sc-avatar { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--brand-2), var(--violet));
  color: #fff; font-weight: 800; font-size: 19px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sc-avatar.cust { border-radius: 50%; background: linear-gradient(135deg, #1e9e63, #59c9e8); }
.sc-who { flex: 1; min-width: 180px; }
.sc-who b { display: block; font-size: 15.5px; color: var(--brand); }
.sc-who span { font-size: 12px; color: var(--ink-soft); }
.sc-tot { font-size: 13px; color: var(--ink); background: #f5f6fc; border-radius: 12px; padding: 6px 12px; }
.sc-act { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-fin { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; background: #f8f8fd; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.sc-fin small { display: block; font-size: 10.6px; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.sc-fin b { font-size: 15px; color: var(--ink); }
.sc-fin .due b { color: #9a6a08; }
.sc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px,100%), 1fr)); gap: 16px; }
.sc-cols h4 { font-size: 12.6px; color: var(--brand); margin-bottom: 6px; }
.sc-none { color: #a3a8bf; font-size: 12.6px; }
.sc-prow, .sc-srow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 8px;
  border-bottom: 1px solid var(--line); font-size: 12.8px; }
.sc-prow:last-child, .sc-srow:last-child { border-bottom: none; }
.sc-prow a, .sc-srow a { color: var(--brand-2); }
.sc-pr { font-weight: 800; color: var(--brand-2); margin-left: auto; white-space: nowrap; }
.sc-d { color: var(--ink-soft); font-size: 11.6px; min-width: 76px; }
.sc-t { flex: 1; min-width: 140px; }
.sc-inv { font-size: 11.4px; color: var(--violet); font-weight: 700; }
.sc-hist { max-height: 340px; overflow-y: auto; }

/* v1.54 — Experts Gallery pool ───────────────────────────────────────────── */
.gal-sec { margin-bottom: 16px; }
.gal-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.gal-xp { width: 46px; height: 46px; border-radius: 50%; background-size: cover; background-position: center;
  flex-shrink: 0; box-shadow: 0 4px 14px rgba(16,12,61,.18); display: flex; align-items: center; justify-content: center; }
.gal-xi { background: linear-gradient(135deg, var(--brand-2), var(--violet)); color: #fff; font-weight: 800; font-size: 18px; }
.gal-who { flex: 1; min-width: 160px; }
.gal-who b { display: block; color: var(--brand); font-size: 15px; }
.gal-who span { font-size: 11.8px; color: var(--ink-soft); }
.gal-n { font-size: 12.4px; color: var(--ink-soft); background: #f5f6fc; border-radius: 12px; padding: 5px 11px; }
.gal-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(240px,100%), 1fr)); }
.gal-tile { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.gal-tile.feat { border-color: #e8b931; box-shadow: 0 0 0 2px rgba(232,185,49,.35); }
.gal-img { height: 150px; background: linear-gradient(135deg, #eef0fb, #e5e0f7) center/cover; background-size: cover; background-position: center; }
.gal-kind { position: absolute; top: 8px; left: 8px; background: rgba(13,11,51,.78); color: #fff; font-size: 10.4px;
  font-weight: 800; padding: 3px 9px; border-radius: 12px; }
.gal-live { position: absolute; top: 8px; right: 8px; background: var(--gold, #e8b931); color: #4d3a00; font-size: 10.4px;
  font-weight: 800; padding: 3px 9px; border-radius: 12px; }
.gal-cap { padding: 9px 11px 34px; }
.gal-cap b { display: block; font-size: 13px; color: var(--ink); }
.gal-cap span { font-size: 11.6px; color: var(--ink-soft); }
.gal-tools { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 4px; }
.gal-t { border: 1px solid var(--line); border-radius: 8px; width: 30px; height: 28px; cursor: pointer; background: #fff; font-size: 13px; }
.gal-t:hover { border-color: var(--brand-2); }
.gal-t.star { color: #c9cbd8; font-weight: 800; }
.gal-t.star.on { color: #e8b931; background: #fff8e2; border-color: #e8b931; }
.gal-t.danger { color: #b32e2e; }

/* v1.55 — location filter: the ✎ pencil inside the rail summary */
.mrail-edit { border: none; background: #f1f0fb; border-radius: 7px; padding: 2px 8px; cursor: pointer;
  font-size: 12px; color: var(--brand-2); float: right; }
.mrail-edit:hover { background: #e5e2f8; }

/* v1.56 — ↑↓ order controls on the section manager rows */
.ws-ord { display: flex; gap: 4px; }
.ws-ord .wb-t { box-shadow: none; border: 1px solid var(--line); background: #fff; }

/* v1.60 — the conversation room, redesigned */
.sm-head { display: flex; align-items: center; gap: 10px; }
.sm-hav { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--brand-2), var(--violet));
  color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.sm-hwho b { display: block; font-size: 15px; line-height: 1.2; }
.sm-hwho small { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.sm-log { max-height: 52vh; min-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 12px 8px; background: #f7f7fc; border: 1px solid var(--line); border-radius: 14px; }
.sm-day { text-align: center; margin: 4px 0 2px; }
.sm-day span { background: #e8e9f4; color: #6a6f8e; font-size: 10.6px; font-weight: 700; border-radius: 12px; padding: 2px 12px; }
.sm-row { display: flex; gap: 8px; align-items: flex-end; }
.sm-row.us { justify-content: flex-end; }
.sm-av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #59c9e8, #1e9e63);
  color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sm-b { max-width: 76%; border-radius: 16px; padding: 9px 13px; font-size: 13.4px; line-height: 1.55;
  box-shadow: 0 1px 3px rgba(16,12,61,.08); }
.sm-b.them { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.sm-b.us { background: linear-gradient(135deg, var(--brand-2), var(--violet)); color: #fff; border-bottom-right-radius: 5px; }
.sm-b.us small { color: rgba(255,255,255,.75); }
.sm-b.us .sm-ref { background: rgba(255,255,255,.18); border-color: transparent; color: #fff; }
.sm-b small { display: block; font-size: 10px; color: var(--ink-soft); margin-top: 4px; text-align: right; }
.sm-b p { white-space: pre-wrap; overflow-wrap: break-word; }
.sm-empty { text-align: center; color: #a3a8bf; font-size: 13px; padding: 34px 10px; line-height: 2; }
.sm-compose { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.sm-compose textarea { flex: 1; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 14px;
  font-family: inherit; font-size: 13.4px; resize: vertical; }
.sm-compose textarea:focus { outline: none; border-color: var(--brand-2); }
.sm-send { border-radius: 50%; width: 44px; height: 44px; padding: 0; font-size: 17px; flex-shrink: 0; }
.sm-note { font-size: 11.4px; color: var(--ink-soft); margin-top: 6px; }
/* v1.60 — product arrange mode: big arrows on each card */
.mkt-ordbar { position: absolute; inset: auto 0 46% 0; display: flex; justify-content: space-between; padding: 0 8px; z-index: 4; }
.mkt-ordbar button { border: none; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; font-size: 15px;
  background: rgba(13,11,51,.82); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.mkt-ordbar button:hover { background: var(--brand-2); }

/* v1.61 — hidden boards & withdrawn products: the CMS grey language */
.sec-tab.sec-off { opacity: .5; filter: grayscale(.6); position: relative; }
.sec-tab.sec-off::after { content: '🚫 hidden'; position: absolute; top: 6px; right: 8px; font-size: 9.6px;
  font-weight: 800; color: #b32e2e; }
.mkt-card.off { opacity: .55; filter: grayscale(.55); }
.mkt-card.off:hover { opacity: .8; }
.mkt-ribbon { position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%) rotate(-8deg); z-index: 4;
  background: rgba(13,11,51,.85); color: #ffd66b; font-size: 12px; font-weight: 800; padding: 6px 14px;
  border-radius: 20px; white-space: nowrap; pointer-events: none; }
.mkt-wd { position: absolute; top: 190px; right: 9px; border: none; border-radius: 16px; width: 32px; height: 26px;
  cursor: pointer; background: rgba(255,255,255,.92); color: var(--brand-2); font-weight: 800; font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2); z-index: 5; }
.mkt-wd:hover { background: #fff; }

/* v1.62 — Coming Soon teaser boards */
.soon-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(280px,100%), 1fr)); }
.soon-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.soon-card.draft { opacity: .72; border-style: dashed; }
/* v1.64 — the whole photograph, always. The picture is contained inside a
   fixed 4:3 frame; a blurred, darkened copy of it fills whatever space is
   left, so a tall or wide shot is never cropped and the card still reads as
   a solid block rather than a letterboxed grey bar. */
.soon-img { position: relative; aspect-ratio: 4 / 3; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.soon-blur { position: absolute; inset: -10%; background-size: cover; background-position: center;
  filter: blur(20px) saturate(1.3) brightness(.6); transform: scale(1.1); }
.soon-shot { position: relative; display: none; max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain; }
.soon-shot.on { display: block; }
.soon-browse { position: absolute; bottom: 9px; left: 9px; z-index: 2; border: none; cursor: pointer;
  background: rgba(13,11,51,.86); color: #fff; font-family: inherit; font-size: 11px; font-weight: 800;
  padding: 5px 11px; border-radius: 12px; }
.soon-browse:hover { background: var(--brand-2); }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 14px; }
.sp-cell { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; }
.sp-thumb { position: relative; aspect-ratio: 4 / 3; background: #0e0b2e; display: flex;
  align-items: center; justify-content: center; overflow: hidden; }
.sp-cellact { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; align-items: center; }
.sp-cover { font-size: 11.4px; font-weight: 800; color: var(--gold, #e8b931); }
.soon-ph { font-size: 40px; opacity: .85; }
.soon-tag { position: absolute; top: 9px; left: 9px; background: rgba(13,11,51,.8); color: #fff; font-size: 10.2px;
  font-weight: 800; padding: 3px 10px; border-radius: 12px; }
.soon-when { position: absolute; bottom: 9px; right: 9px; background: var(--gold, #e8b931); color: #4d3a00;
  font-size: 11px; font-weight: 800; padding: 3px 11px; border-radius: 12px; }
.soon-body { padding: 11px 13px 13px; }
.soon-cat { font-size: 10.8px; color: var(--violet); font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.soon-body b { display: block; font-size: 14.6px; color: var(--brand); margin: 3px 0; }
.soon-sub { font-size: 12.4px; color: var(--ink-soft); display: block; }
.soon-meta { margin: 8px 0 6px; }
.soon-n { background: #fff8e2; color: #9a6a08; font-size: 11.4px; font-weight: 800; border-radius: 12px; padding: 3px 10px; }
.soon-n0 { font-size: 11.4px; color: #a3a8bf; }
.soon-act { display: flex; gap: 6px; flex-wrap: wrap; }

/* v1.62 — intro band preview inside the CMS (mirrors the site's classes) */
.intro-band { display: grid; grid-template-columns: minmax(0,1.78fr) minmax(0,1fr); gap: 18px; align-items: stretch; }
.ib-film { position: relative; border-radius: 16px; overflow: hidden; background: #0a0822; aspect-ratio: 16/9; }
.ib-film video, .ib-film iframe { width: 100%; height: 100%; display: block; border: 0; object-fit: cover; background: #000; }
.ib-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; color: #fff; font-size: 12px;
  font-weight: 700; background: linear-gradient(transparent, rgba(7,5,28,.82)); }
.ib-board { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ib-btitle { font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: var(--violet); }
.ib-ads { position: relative; flex: 1; border-radius: 16px; overflow: hidden; background: #141038; aspect-ratio: 1/1; }
.ib-ad { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0;
  transition: opacity .6s ease; display: flex; align-items: flex-end; color: #fff; }
.ib-ad.on { opacity: 1; }
.ib-adcap { width: 100%; padding: 40px 14px 14px; background: linear-gradient(transparent, rgba(7,5,28,.9) 62%); }
.ib-adcap span { font-size: 10px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold, #e8b931); }
.ib-adcap b { display: block; font-size: 16.5px; line-height: 1.22; margin: 3px 0; }
.ib-adcap p { font-size: 12px; color: #d3d7f2; }
.ib-empty { border-radius: 16px; background: linear-gradient(150deg, #eef0fb, #e2e5f8); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; color: var(--ink-soft); font-size: 30px; height: 100%; min-height: 180px; }
.ib-empty span { font-size: 12.4px; font-weight: 700; }
.ib-empty.sq { flex: 1; aspect-ratio: 1/1; }
@media (max-width: 900px) { .intro-band { grid-template-columns: 1fr; } .ib-ads { flex: none; } }


/* v1.63 — Source & supplier (staff only) */
.mkt-src { display: block; width: 100%; margin-top: 8px; border: 1px dashed var(--line); border-radius: 10px;
  background: #f7f7fc; color: var(--brand-2); font-family: inherit; font-size: 11.6px; font-weight: 800;
  padding: 6px 9px; cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-src:hover { background: #eef0ff; border-color: var(--brand-2); }
.mkt-src.none { color: var(--ink-soft); font-weight: 700; }
.sup-lead { font-size: 12.4px; color: var(--ink-soft); background: #fff8e2; border: 1px solid #f0e0a8;
  border-radius: 10px; padding: 8px 11px; margin-bottom: 12px; }
.sup-card { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: #fbfbff; }
.sup-book { margin-bottom: 16px; }
.sup-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-bottom: 10px; }
.sup-av { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #6a5acd, #3524d6);
  color: #fff; font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sup-who { flex: 1; min-width: 150px; }
.sup-who b { display: block; font-size: 15px; color: var(--brand); }
.sup-who span { font-size: 12px; color: var(--ink-soft); }
.sup-acts { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }
.sup-act { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 11px; font-size: 12.2px; font-weight: 700; color: var(--brand-2); background: #fff; }
.sup-act:hover { border-color: var(--brand-2); background: #f6f5ff; }
.sup-act.wa { color: #1e9e63; }
.sup-addr, .sup-note { font-size: 12.4px; color: var(--ink-soft); margin-top: 4px; }
.sup-note { background: #fff; border-left: 3px solid var(--line); padding: 6px 10px; border-radius: 0 8px 8px 0; }
.sup-more { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px;
  font-size: 12.4px; color: var(--ink-soft); }
.sup-empty { font-size: 13px; color: #a3a8bf; padding: 10px 0; }
.sup-margin { font-size: 12.6px; color: var(--ink); background: #eef7f1; border: 1px solid #cfe8da;
  border-radius: 10px; padding: 8px 11px; margin-top: 10px; }
.sup-margin em { color: #9a6a08; font-style: normal; }
.sup-sku { font-size: 11.4px; color: var(--violet); font-weight: 700; }

/* v1.64 — Physical stores: the collection network */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 16px; }
.st-card { padding: 14px; }
.st-card.closed { opacity: .68; }
.st-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 11px; }
.st-ph { position: relative; width: 78px; height: 62px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: #0e0b2e; display: flex; align-items: center; justify-content: center; }
.st-phico { font-size: 26px; }
.st-who { flex: 1; min-width: 150px; }
.st-kind { font-size: 10.6px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--violet); }
.st-who b { display: block; font-size: 15px; color: var(--brand); margin: 2px 0; }
.st-ref { font-size: 11.4px; font-weight: 800; color: var(--ink-soft); margin-right: 8px; }
.st-loc { font-size: 12px; color: var(--ink-soft); }
.st-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-bottom: 9px; }
.st-num { background: #f7f7fc; border-radius: 10px; padding: 7px 9px; text-align: center; }
.st-num b { display: block; font-size: 17px; color: var(--brand); }
.st-num span { font-size: 10.4px; color: var(--ink-soft); }
.st-num.warn b { color: #d98c0f; }
.st-bar { height: 6px; border-radius: 4px; background: #eceef8; overflow: hidden; margin-bottom: 10px; }
.st-bar i { display: block; height: 100%; background: var(--brand-2); }
.st-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.st-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 14px; }
.st-filters select, .st-filters input { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px;
  font-family: inherit; font-size: 13px; background: #fff; }
.st-filters input[type=search] { flex: 1; min-width: 180px; }

/* v1.65 — tour packages sit on the product-board chassis */
.mkt-img.tour-media { height: 188px; background-color: #10123a; }
.mkt-card .tour-btns { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; align-items: center; }
.mkt-card .tour-high { display: flex; flex-direction: column; gap: 2px; font-size: 12.1px;
  color: var(--ink-soft); margin: 4px 0 2px; }
.mkt-card .tour-tags { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.mkt-stock.none { color: var(--ink-soft); }

/* v1.67 — intro film link: what the CMS recognised, and the sharing caveat */
.intro-detect { font-size: 12.4px; color: #1e6b46; background: #eefaf3; border: 1px solid #cbead9;
  border-radius: 10px; padding: 8px 11px; margin-top: 10px; line-height: 1.55; word-break: break-all; }
.intro-detect.warn { color: #7a5a00; background: #fff8e6; border-color: #f0dfae; }
.intro-detect code { font-size: 11.6px; background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 5px; }
.intro-detect span { color: var(--ink-soft); }
.intro-note { font-size: 12.4px; color: var(--ink-soft); background: #f7f7fc; border-radius: 10px;
  padding: 9px 11px; margin-top: 9px; line-height: 1.6; }

/* v1.73 — video board preview inside the CMS (mirrors the site's .vh-*) */
.vh-wrap { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.vh-stage { position: relative; background: #0a0822; border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; }
.vh-stage iframe, .vh-stage video { width: 100%; height: 100%; display: block; border: 0; background: #000; object-fit: contain; }
.vh-list { display: flex; flex-direction: column; gap: 9px; overflow-y: auto; max-height: 420px; }
.vh-row { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: #fff;
  border-radius: 12px; padding: 7px; cursor: pointer; text-align: start; font-family: inherit; }
.vh-row.on { border-color: var(--brand-2); box-shadow: 0 5px 15px rgba(53,36,214,.13); }
.vh-th { position: relative; width: 104px; min-width: 104px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg, #171058, #3524d6); display: flex; align-items: center; justify-content: center; }
.vh-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vh-th i { position: absolute; font-style: normal; color: #fff; font-size: 15px; }
.vh-meta { min-width: 0; }
.vh-meta b { display: block; font-size: 13px; color: var(--brand); line-height: 1.3; }
.vh-meta span { font-size: 11.6px; color: var(--ink-soft); }
@media (max-width: 900px) { .vh-wrap { grid-template-columns: 1fr; } }

/* v1.76 — CMS guidance panels: what belongs in a section, said before it is empty */
.cms-guide { background: linear-gradient(150deg, #f6f5ff, #eef0fb); border: 1px solid #ddd9f7; }
.cms-guide h3 { color: var(--brand-2); }
.cms-guide p { font-size: 13.2px; color: var(--ink); line-height: 1.6; margin-bottom: 8px; }
.cms-guide ul { list-style: none; margin: 0; }
.cms-guide li { font-size: 12.8px; color: var(--ink-soft); line-height: 1.62; padding: 4px 0 4px 20px; position: relative; }
.cms-guide li:before { content: '▸'; position: absolute; left: 4px; color: var(--violet); font-weight: 800; }
.cms-guide code { background: rgba(53,36,214,.09); color: var(--brand-2); padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* v1.77 — listing photo housekeeping + the product's embedded film */
.pdp-thumb { position: relative; }
.pdp-tdel, .pdp-tset { position: absolute; width: 19px; height: 19px; border: none; border-radius: 50%;
  cursor: pointer; font-size: 10px; line-height: 1; display: flex; align-items: center; justify-content: center;
  padding: 0; opacity: 0; transition: opacity .14s; }
.pdp-tdel { top: 3px; right: 3px; background: rgba(209,60,60,.92); color: #fff; }
.pdp-tset { top: 3px; left: 3px; background: rgba(13,11,51,.82); color: #fff; }
.pdp-thumb:hover .pdp-tdel, .pdp-thumb:hover .pdp-tset,
.pdp-tdel:focus, .pdp-tset:focus { opacity: 1; }
.pdp-tcover { position: absolute; top: 3px; left: 3px; font-size: 11px; color: var(--gold, #e8b931);
  text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pdp-video { margin-top: 14px; }
.pdp-vtitle { font-size: 11.4px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--violet); margin-bottom: 7px; }

/* v1.78 — feature + thumbnail controls on a product board */
.mkt-star, .mkt-thumbpick { position: absolute; z-index: 3; border: none; cursor: pointer; border-radius: 50%;
  width: 27px; height: 27px; font-size: 13px; line-height: 1; display: flex; align-items: center;
  justify-content: center; background: rgba(255,255,255,.94); box-shadow: 0 2px 8px rgba(16,12,61,.22); padding: 0; }
.mkt-star { top: 158px; left: 9px; color: #b9bdd0; }
.mkt-star.on { background: var(--gold, #e8b931); color: #4d3a00; }
.mkt-star:hover { color: var(--gold, #e8b931); }
.mkt-star.on:hover { filter: brightness(1.07); }
.mkt-thumbpick { top: 190px; left: 9px; font-size: 11px; }
.mkt-thumbpick:hover { background: var(--brand-2); color: #fff; }
.mkt-vplay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); pointer-events: none; }

/* v1.84 — an expert's portfolio of executed work, on their own page */
.xpf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 14px; }
.xpf-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.xpf-card.on { border-color: var(--gold, #e8b931); box-shadow: 0 4px 16px rgba(232,185,49,.22); }
.xpf-img { position: relative; aspect-ratio: 4/3; background: #0e0b2e; display: flex;
  align-items: center; justify-content: center; overflow: hidden; }
.xpf-star { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--gold, #e8b931);
  color: #4d3a00; font-size: 10.4px; font-weight: 800; padding: 3px 10px; border-radius: 12px; }
.xpf-bd { padding: 11px 12px 13px; }
.xpf-bd b { display: block; font-size: 13.8px; color: var(--brand); }
.xpf-bd span { display: block; font-size: 12.2px; color: var(--ink-soft); margin-top: 3px; line-height: 1.5; }
.xpf-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* v1.85 — Trade Network: vendors, catalogue, presentation */
.tnv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 16px; }
.tnv-card { padding: 14px; }
.tnv-card.off { opacity: .65; }
.tnv-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tnv-ph { position: relative; width: 78px; height: 62px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: #0e0b2e; display: flex; align-items: center; justify-content: center; }
.tnv-phico { font-size: 26px; }
.tnv-who { flex: 1; min-width: 150px; }
.tnv-kind { font-size: 10.6px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--violet); }
.tnv-who b { display: block; font-size: 15px; color: var(--brand); margin: 2px 0; }
.tnv-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.tnv-cats span { background: #eef0fb; color: var(--violet); font-size: 10.8px; font-weight: 700;
  border-radius: 10px; padding: 2px 9px; }
.tni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.tni-card { padding: 0; overflow: hidden; }
.tni-card.off { opacity: .6; }
.tni-img { position: relative; aspect-ratio: 4/3; background: linear-gradient(135deg, #eef0fb, #e5e0f7);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tni-img.has-img, .tni-img:has(.soon-shot.on) { background: #0e0b2e; }
.tni-ph { font-size: 38px; opacity: .55; }
.tni-media { position: absolute; bottom: 8px; right: 8px; z-index: 2; background: rgba(13,11,51,.85);
  color: #fff; font-size: 10.6px; font-weight: 800; padding: 3px 9px; border-radius: 11px; }
.tni-bd { padding: 11px 13px 13px; }
.tni-cat { font-size: 10.4px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--violet); }
.tni-bd b { display: block; font-size: 14.2px; color: var(--brand); margin: 3px 0 2px; }
.tni-vendor { display: block; font-size: 12px; color: var(--ink-soft); }
.tni-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
/* the presentation — clean, client-facing */
.tnp .pv-top { background: rgba(10, 8, 34, .92); }
.tnp-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px;
  padding: 16px; max-width: 1200px; margin: 0 auto; width: 100%; overflow: auto; }
.tnp-stage { min-width: 0; }
.tnp-hero { position: relative; aspect-ratio: 4/3; border-radius: 16px; overflow: hidden; background: #0e0b2e;
  display: flex; align-items: center; justify-content: center; }
.tnp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.tnp-th { position: relative; width: 86px; min-width: 86px; aspect-ratio: 4/3; border-radius: 9px; overflow: hidden;
  background: #0e0b2e; cursor: pointer; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; }
.tnp-th.on { border-color: var(--gold, #e8b931); }
.tnp-side { background: #fff; border-radius: 16px; padding: 20px; align-self: start; }
.tnp-side h2 { font-size: 21px; color: var(--brand); margin: 4px 0 8px; }
.tnp-price { font-size: 24px; font-weight: 800; color: var(--brand-2); margin-bottom: 8px; }
.tnp-price small { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.tnp-desc { font-size: 13.4px; color: var(--ink); line-height: 1.65; margin-top: 12px; }
.tnp-net { font-size: 12px; color: var(--ink-soft); margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 900px) { .tnp-body { grid-template-columns: 1fr; } }

/* ═══════════ v1.92 — AI Agents Staff ═══════════ */
.aga-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 16px; }
.aga-card { display: flex; flex-direction: column; gap: 10px; }
.aga-head { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.aga-head b { display: block; font-size: 16px; color: var(--ink); }
.aga-head span { display: block; font-size: 12.4px; color: var(--ink-soft); }
.aga-on { font-size: 10.6px; font-weight: 800; color: #1e9e63; text-transform: uppercase; letter-spacing: .8px; font-style: normal; }
.aga-off { font-size: 10.6px; font-weight: 800; color: #9aa0b8; text-transform: uppercase; letter-spacing: .8px; font-style: normal; }
.aga-duties { display: flex; flex-wrap: wrap; gap: 6px; }
.aga-duties span { font-size: 11.6px; background: #eef0fb; border-radius: 12px; padding: 3px 9px; color: var(--ink-soft); }
.aga-last { font-size: 12.6px; color: var(--ink-soft); margin: 0; }
.aga-last i { display: block; font-size: 11px; opacity: .7; font-style: normal; margin-top: 2px; }
.aga-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.aga-cols { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; margin-top: 14px; align-items: start; }
.aga-approve { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.aga-apphead { display: flex; gap: 8px; align-items: center; }
.aga-apphead b { flex: 1; font-size: 13.4px; }
.aga-approve p { font-size: 12.6px; color: var(--ink-soft); margin: 6px 0; }
.aga-result { background: #f4f5fb; border-radius: 10px; padding: 8px 10px; }
.aga-decided { font-size: 12.2px; color: var(--ink-soft); padding: 4px 0; border-bottom: 1px dashed var(--line); }
.aga-run { display: flex; gap: 9px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.aga-run b { display: block; font-size: 12.8px; }
.aga-run span { display: block; font-size: 12.2px; color: var(--ink-soft); }
.aga-run i { font-size: 11px; opacity: .7; font-style: normal; }
.aga-empty { font-size: 12.8px; color: var(--ink-soft); }
.aga-profile { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; margin-top: 10px; align-items: start; }
.aga-profile > div:first-child { display: flex; flex-direction: column; gap: 14px; }
.aga-idcard { text-align: center; }
.aga-idcard h2 { margin: 8px 0 2px; }
.aga-role { color: var(--ink-soft); font-size: 13px; margin: 0 0 4px; }
.aga-persona { font-size: 12.8px; color: var(--ink-soft); margin: 10px 0; }
.aga-dutyrow { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.aga-kpimini { display: flex; gap: 18px; margin-bottom: 10px; }
.aga-kpimini b { font-size: 20px; display: block; }
.aga-kpimini span { font-size: 11.4px; color: var(--ink-soft); }
.aga-runline { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 12.4px; }
.aga-runline b { display: block; }
.aga-runline span { color: var(--ink-soft); }
.aga-runline i { font-size: 10.8px; opacity: .7; font-style: normal; }
.aga-desk { display: flex; flex-direction: column; min-height: 560px; }
.aga-desk h3 { display: flex; justify-content: space-between; align-items: center; }
.aga-voicetog { font-size: 12px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; color: var(--ink-soft); }
.aga-thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px 2px; max-height: 520px; }
.aga-msg { display: flex; gap: 8px; align-items: flex-end; }
.aga-msg p { background: #eef0fb; border-radius: 14px 14px 14px 4px; padding: 9px 13px; font-size: 13.2px; max-width: 78%; margin: 0; }
.aga-msg.me { justify-content: flex-end; }
.aga-msg.me p { background: linear-gradient(135deg, #3524d6, #7c4fd0); color: #fff; border-radius: 14px 14px 4px 14px; }
.aga-think { opacity: .6; letter-spacing: 3px; }
.aga-inputrow { display: flex; gap: 8px; margin-top: 10px; }
.aga-inputrow input { flex: 1; }
#aga-mic.rec { background: #d13c3c; color: #fff; animation: aga-pulse 1s infinite; }
@keyframes aga-pulse { 50% { opacity: .55; } }
/* the drawn character — it blinks on its own, and .talk (set while speech
   synthesis is playing) swaps the resting mouth for a moving one */
.aga-face { flex-shrink: 0; border-radius: 50%; }
.aga-face .aga-lid { animation: aga-blink 4.6s infinite; }
@keyframes aga-blink { 0%, 93%, 100% { height: 0; } 95%, 98% { height: 9px; } }
.aga-face .aga-mouth-talk { opacity: 0; transform-origin: 50px 56px; }
.aga-face.talk .aga-mouth-talk { animation: aga-talk .32s linear infinite; }
.aga-face.talk .aga-mouth-idle { opacity: 0; }
@keyframes aga-talk { 0%, 100% { opacity: 1; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(.3); } }
@media (max-width: 1000px) { .aga-cols { grid-template-columns: 1fr; } .aga-profile { grid-template-columns: 1fr; } }

/* ═══════════ v1.94 — Avatar Studio + Engineering Office ═══════════ */
.aga-team-h { margin: 22px 0 0; font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-soft); }
/* portrait engine: gentle idle sway; the head group eases toward the pointer */
.aga-face.portrait .aga-p3d { transition: transform .18s ease-out; transform-origin: 50px 46px; animation: aga-sway 7.5s ease-in-out infinite; }
@keyframes aga-sway { 0%, 100% { rotate: 0deg; } 30% { rotate: .7deg; } 70% { rotate: -.7deg; } }
.aga-face.portrait .aga-brows { animation: aga-brow 9s ease-in-out infinite; }
@keyframes aga-brow { 0%, 90%, 100% { transform: translateY(0); } 93%, 96% { transform: translateY(-1.1px); } }
/* fallback mouth flap when the browser gives no word boundaries */
.aga-face.portrait.talk .aga-mouth-path { animation: aga-flap .3s linear infinite; transform-origin: 50px 57px; }
@keyframes aga-flap { 0%, 100% { transform: scaleY(.65); } 50% { transform: scaleY(1.55); } }
/* appearance studio */
.agl-wrap { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: start; }
.agl-preview { text-align: center; }
.agl-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 4px; }
.agl-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.agl-sw.on { border-color: var(--brand2, #3524d6); box-shadow: 0 0 0 2px #fff inset; }
@media (max-width: 700px) { .agl-wrap { grid-template-columns: 1fr; } }
/* workrooms */
.agw-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.agw-head select { max-width: 420px; }
.agw-entry { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.agw-entry b { font-size: 13px; }
.agw-entry p { font-size: 13px; margin: 3px 0; }
.agw-entry i { font-size: 11px; color: var(--ink-soft); font-style: normal; }
.agw-user { width: 30px; height: 30px; border-radius: 50%; background: #eef0fb; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
/* filing cabinet */
.agf-row { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; font-size: 13px; }
.agf-row:hover { background: #f6f7fd; }
.agf-row b { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.agf-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.agf-kind { font-size: 11px; background: #eef0fb; border-radius: 10px; padding: 2px 8px; color: var(--ink-soft); white-space: nowrap; }
.agf-proj { font-size: 11px; background: #e2f6ec; border-radius: 10px; padding: 2px 8px; color: #157a4c; white-space: nowrap; }
.agf-row i { font-size: 11px; color: var(--ink-soft); font-style: normal; white-space: nowrap; }
.agf-meta { display: flex; gap: 8px; align-items: center; font-size: 12.6px; color: var(--ink-soft); margin-bottom: 10px; }
.agf-body { font-size: 13.4px; line-height: 1.55; background: #f7f8fd; border-radius: 12px; padding: 14px 16px; max-height: 420px; overflow-y: auto; }

/* v1.95 — section boards containing department boards */
.aga-team-n { font-size: 11px; font-weight: 700; color: var(--ink-soft); font-style: normal; letter-spacing: 0; text-transform: none; }
.aga-dept { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 0 14px; }
.aga-dept summary { cursor: pointer; padding: 12px 2px; font-weight: 800; font-size: 13.6px; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; }
.aga-dept summary::-webkit-details-marker { display: none; }
.aga-dept summary::after { content: '▾'; margin-left: auto; color: var(--ink-soft); transition: transform .18s; }
.aga-dept:not([open]) summary::after { transform: rotate(-90deg); }
.aga-dept summary i { font-size: 11px; font-weight: 700; color: var(--ink-soft); font-style: normal; }
.aga-dept .aga-board { margin: 0 0 14px; }

/* v1.96 — the Meeting Room */
.mt-row { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; font-size: 13px; }
.mt-row:hover { background: #f6f7fd; }
.mt-row.on { background: #eef0fb; border-radius: 10px; }
.mt-row b { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.mt-row i { font-size: 11px; color: var(--ink-soft); font-style: normal; white-space: nowrap; }
.mt-members { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 4px; }
.mt-ag { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line); font-size: 13.2px; }
.mt-act { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.mt-act b { display: block; font-size: 12.8px; }
.mt-act span { display: block; font-size: 11.8px; color: var(--ink-soft); }
.mt-act > div { flex: 1; min-width: 0; }
.mt-act.late b { color: #d13c3c; }
.mt-act.late em { color: #d13c3c; font-weight: 800; font-style: normal; }
.agw-entry.mt-co p { background: #f4f0fd; border-radius: 10px; padding: 7px 10px; }
.mtm-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.mtm-grp { margin: 8px 0; }
.mtm-grp > b { font-size: 12px; color: var(--ink-soft); }
.mtm-one { display: inline-flex; gap: 5px; align-items: center; margin: 3px 12px 3px 0; font-size: 12.6px; }
.mtm-one i { color: var(--ink-soft); font-style: normal; font-size: 11px; }

/* v1.97 — the Design Lab */
.lab-crew { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 12.6px; }
.lab-crew > b { color: var(--ink-soft); font-size: 11.4px; text-transform: uppercase; letter-spacing: 1px; }
.lab-mem { display: inline-flex; gap: 5px; align-items: center; background: #eef0fb; border-radius: 18px; padding: 3px 10px 3px 4px; font-weight: 600; }
.lab-mem i { font-size: 10.4px; color: var(--violet); font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.lab-mem.dim { opacity: .55; padding: 2px; background: none; }
.lab-sys { text-align: center; font-size: 12px; color: var(--violet); font-weight: 700; margin: 4px 0; }
.lab-chip { display: inline-flex; gap: 5px; align-items: center; background: #f4f0fd; border: 1px solid var(--line); border-radius: 12px; padding: 3px 9px; font-size: 11.8px; margin: 3px 6px 0 0; }
.lab-chip i { color: var(--ink-soft); font-style: normal; font-size: 10.6px; }
.lab-chip button { border: none; background: none; cursor: pointer; color: var(--ink-soft); padding: 0 0 0 2px; }
.lab-pendrow { margin: 8px 0 0; }
.lab-ts { font-size: 10.6px; color: var(--ink-soft); font-style: normal; }

/* v1.98 — the Design Lab tab stands out beside Overview */
.ptab.lab { background: linear-gradient(135deg, #3524d6, #7c4fd0); color: #fff; border-color: transparent; font-weight: 800; }
.ptab.lab.active { box-shadow: 0 0 0 2px #c9befa; }

/* v1.99 — the Drive-folder line on the lab header */
.lab-drive { font-size: 12.4px; color: var(--ink-soft); margin: 10px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lab-drive code { background: #f4f5fb; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: 11.6px; color: var(--ink); }
.lab-drive i { font-style: normal; opacity: .75; }

/* v2.00 — drive folder preview on the lab board */
.lab-drive { display: block; }
.lab-idx { margin-top: 8px; width: 100%; }
.lab-idx-at { font-size: 11.4px; color: var(--ink-soft); margin: 0 0 6px; }
.lab-idx-sub { margin: 6px 0; }
.lab-idx-sub > b { display: block; font-size: 12px; color: var(--ink); margin-bottom: 3px; }

/* v2.02 — photo portraits with lip-sync */
.aga-face.photo { display: inline-block; position: relative; border-radius: 50%; overflow: hidden; border: 2.6px solid #1e9e63; background: #dcdff2; vertical-align: middle; }
.aga-face.photo .aga-p3d { position: absolute; inset: 0; display: block; transition: transform .18s ease-out; }
.agp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.agp-img.on { opacity: 1; }
.agp-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40%; font-weight: 800; color: #7a80a0; }
.agp-inner { position: absolute; background: radial-gradient(closest-side, #3a1712, #1c0a08); border-radius: 50%; opacity: 0; transition: opacity 70ms; }
.agp-mouth { position: absolute; background-repeat: no-repeat; transform-origin: 50% 22%; transition: transform 70ms linear; border-radius: 30%; }
.aga-face.photo.talk .agp-mouth { animation: agp-flap .3s linear infinite; }
.aga-face.photo.talk .agp-inner { opacity: .6; }
@keyframes agp-flap { 0%, 100% { transform: scale(1, .95); } 50% { transform: scale(1.02, 1.6); } }

/* v2.03 — replay + follow-the-voice highlight */
.agmsg-play { border: none; background: none; cursor: pointer; font-size: 13px; padding: 0 3px; opacity: .45; vertical-align: baseline; }
.agmsg-play:hover { opacity: 1; }
.agk { border-radius: 4px; transition: background .12s, color .12s; }
.agk.on { background: linear-gradient(135deg, #3524d6, #7c4fd0); color: #fff; padding: 0 3px; }

/* v2.04 — the Media Studio storyboard */
.md-story { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.md-scene { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; font-size: 12.4px; }
.md-scene > b { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #3524d6, #7c4fd0); color: #fff; align-items: center; justify-content: center; font-size: 12px; margin-right: 6px; }
.md-scene > i { font-style: normal; color: var(--ink-soft); font-size: 11px; }
.md-frame { display: block; font-size: 10.6px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--violet); margin: 4px 0 2px; }
.md-scene p { margin: 3px 0; color: var(--ink); }
.md-vo { color: var(--ink-soft); font-style: italic; }

/* v2.05 — storyboard frames + animatic */
.md-shot { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #232743; margin-bottom: 8px; }
.md-shot.v { aspect-ratio: 9/16; max-height: 220px; margin-inline: auto; width: auto; min-width: 110px; }
.md-shotimg { position: absolute; inset: 0; background-repeat: no-repeat; background-size: cover; background-position: center; }
.md-shot > i { position: absolute; left: 6px; bottom: 4px; font-size: 9.6px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); font-style: normal; }
.md-shotup { position: absolute; top: 4px; right: 4px; border: none; background: rgba(10,8,30,.55); color: #fff; border-radius: 8px; cursor: pointer; font-size: 12px; padding: 2px 6px; }
#md-player { position: fixed; inset: 0; z-index: 3000; background: rgba(8,6,26,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; }
.md-stage { position: relative; width: min(760px, 92vw); aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #232743; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.md-stage.v { width: auto; height: min(70vh, 560px); aspect-ratio: 9/16; }
.md-stage .md-shot { position: absolute; inset: 0; aspect-ratio: auto; margin: 0; border-radius: 0; }
.md-scn { position: absolute; top: 10px; left: 12px; color: #fff; font-size: 12px; background: rgba(10,8,30,.55); border-radius: 10px; padding: 2px 9px; z-index: 2; }
.md-vo-line { color: #e8e9f8; font-size: 15px; max-width: 700px; text-align: center; min-height: 22px; margin: 0; }
.md-bar { width: min(760px, 92vw); height: 5px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.md-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3524d6, #7c4fd0); transition: width .4s; }

/* v2.06 — generated clips in the storyboard */
.md-shotvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.md-clipbadge { position: absolute; top: 4px; left: 4px; font-size: 9.6px; font-weight: 800; color: #fff; background: rgba(30,158,99,.85); border-radius: 8px; padding: 2px 7px; font-style: normal; z-index: 2; }

/* v2.07 — the play control shows and stops the active reading */
.agmsg-play.playing { opacity: 1; color: #d13c3c; animation: aga-pulse 1.1s infinite; }

/* ── v2.13 — Media Studio: preview board + skill sessions ── */
.md-prev{display:flex;gap:12px;align-items:flex-start;padding:10px 0;border-top:1px solid var(--line)}
.md-prev:first-of-type{border-top:0}
.md-prev-v{width:300px;max-width:46%;border-radius:10px;background:#000}
.md-prev-i{display:flex;flex-direction:column;gap:3px;font-size:12.8px}
.md-prev-i b{font-size:13px}
.md-sess-live{border:1px dashed var(--brand);border-radius:10px;padding:10px;font-size:13px}
@media(max-width:760px){.md-prev{flex-direction:column}.md-prev-v{max-width:100%;width:100%}}

/* ── v2.22 — pause/resume for the reading voice ── */
.agmsg-stop { border: none; background: none; cursor: pointer; font-size: 12px; padding: 0 2px; opacity: .5; vertical-align: baseline; display: none; }
.agmsg-stop:hover { opacity: 1; }
.agmsg-play.playing + .agmsg-stop, .agmsg-play.paused + .agmsg-stop { display: inline; }
.agmsg-play.paused { opacity: 1; color: #1c9b52; }

/* ── v2.30 — Research & Academia ── */
.ra-path { font-size: 12px; color: var(--ink-soft); display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.ra-up { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12.8px; cursor: pointer; }
.ra-up span { color: var(--ink-soft); } .ra-up i { font-style: normal; font-size: 12px; white-space: nowrap; }
.ra-up:hover, .ra-desk:hover { background: #f6f7fd; }
.ra-desk { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.ra-desk span { font-size: 22px; line-height: 1; } .ra-desk p { margin: 2px 0 0; font-size: 12.4px; color: var(--ink-soft); }
.ra-bar { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 6px 0; }
.ra-bar span { display: block; height: 100%; background: linear-gradient(90deg, #3524d6, #7c4fd0); }
.ra-stages { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 12px; }
.ra-stages span { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer; }
.ra-stages span.done { background: #e8f7ee; border-color: #1e9e63; color: #1e9e63; }
.ra-stages span.now { background: #3524d6; border-color: #3524d6; color: #fff; font-weight: 600; }
.ra-pre { white-space: pre-wrap; font-family: inherit; font-size: 12.8px; background: #f6f7fd; border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 360px; overflow: auto; }
@media (max-width: 700px) { .ra-up { grid-template-columns: 1fr; gap: 2px; } }

/* ── v2.32 — expert scope + the numbered report ── */
.aga-scope { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; font-size: 12.2px; color: var(--ink-soft); text-align: left; }
.rpt { font-size: 13px; color: #1b1f33; }
.rpt-cover { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid #1c12a8; padding-bottom: 10px; margin-bottom: 12px; font-size: 12px; }
.rpt-logo { width: 76px; height: 76px; border-radius: 14px; flex: none; object-fit: cover; }
.rpt-co { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rpt-co b { font-size: 19px; letter-spacing: .04em; color: #1c12a8; line-height: 1.1; }
.rpt-co i { font-style: normal; font-size: 10.5px; letter-spacing: .18em; font-weight: 700; color: #7c4fd0; }
.rpt-co span { color: #5a5f83; margin-top: 3px; } .rpt-co em { font-style: normal; font-size: 10.5px; color: #5a5f83; }
.rpt-no { flex: none; text-align: right; font-size: 15px; font-weight: 700; color: #1c12a8; }
.rpt-no small { display: block; font-size: 9.5px; letter-spacing: .14em; font-weight: 600; color: #5a5f83; }
.rpt-brand { font-size: 10.5px; color: #5a5f83; text-align: center; margin-top: 6px; }
@media print { .rpt { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .rpt-cover, .rpt-kpis, .rpt table.reg tr { break-inside: avoid; } }
@media (max-width: 600px) { .rpt-cover { flex-wrap: wrap; } .rpt-co { flex: 1 1 100%; order: 3; } .rpt-no { flex: 1 1 auto; } .rpt-co b { font-size: 17px; } }
.rpt h2 { margin: 6px 0 2px; } .rpt h3 { margin: 14px 0 6px; color: #1c12a8; } .rpt-meta { color: #5a5f83; font-size: 12px; }
.rpt-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0; }
.rpt-kpis div { border: 1px solid #e3e5f2; border-radius: 10px; padding: 8px; text-align: center; } .rpt-kpis b { display: block; font-size: 20px; color: #1c12a8; } .rpt-kpis span { font-size: 11px; color: #5a5f83; }
.rpt-kpis .bad b { color: #d13c3c; } .rpt-kpis .warn b { color: #d98c0f; }
.rpt-foot { font-size: 11.5px; color: #5a5f83; border-top: 1px solid #e3e5f2; padding-top: 8px; margin-top: 14px; overflow-wrap: anywhere; }

/* ── v2.34 EG-MIS DC — Drive folders ── */
.egdc-btn, .egdc-table .btn, .page-head .ph-tools a.btn { text-decoration: none; }
.egdc-btn { white-space: nowrap; }
.egdc-table td { vertical-align: top; }
.egdc-n { font-family: Consolas, monospace; color: var(--ink-soft); white-space: nowrap; }
.egdc-grp td { background: #f3f4fa; }
.egdc-subs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.egdc-subs span { font-size: 11px; background: #eef0fa; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--ink-soft); }
.egdc-act { white-space: nowrap; }
.egdc-intro { font-size: 13px; line-height: 1.55; }
.egdc-intro code { background: #f3f4fa; padding: 1px 5px; border-radius: 4px; }
.egdc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.egdc-chips .btn { text-decoration: none; }

/* ── v2.35 BOQ — three levels, collapsible sections, task search ── */
tr.bq-group td .bq-tg { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 6px; width: 24px; height: 22px; cursor: pointer; font-size: 12px; line-height: 1; }
tr.bq-group td .bq-tg:hover { background: rgba(255,255,255,.28); }
tr.bq-group .bq-count { color: #c7c9ea; font-weight: 500; font-size: 11px; letter-spacing: .04em; }
tr.bq-sub td { background: #eef1fb; font-weight: 600; }
tr.bq-sub .bq-subname { min-width: 190px; width: 70%; font-weight: 600; background: transparent; }
tr.bq-sub .bq-additem { margin-left: 8px; padding: 2px 8px; }
table.reg.boq td.bq-n { color: var(--ink-soft); font-size: 11.5px; text-align: right; padding-right: 6px; }
.bq-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.bq-q { flex: 1 1 220px; min-width: 180px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }
.bq-q:focus { outline: none; border-color: var(--violet); }
.bq-hint { font-size: 12px; color: var(--ink-soft); }
table.reg tr.bq-sub input.bq-subname { background: transparent; border-color: transparent; font-weight: 600; }
table.reg tr.bq-sub input.bq-subname:hover, table.reg tr.bq-sub input.bq-subname:focus { background: #fff; border-color: var(--violet); }
table.reg tr.bq-sub:hover td { background: #e6eaf8; }
.bq-addkid { margin-left: 6px; padding: 0 7px; opacity: .35; }
tr:hover .bq-addkid, .bq-addkid:focus { opacity: 1; }
table.reg.boq td.bq-empty { color: var(--ink-soft); padding: 16px; text-align: center; }
tr.bq-group td .bq-tg:disabled { opacity: .45; cursor: default; }
@media print {
  .bq-tg, .bq-bar { display: none !important; }
  tr.bq-group td, tr.bq-sub td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bq-card, .bq-card .tbl-wrap { break-inside: auto; }       /* a long bill flows across pages instead of jumping to page 2 */
  table.boq tr { break-inside: avoid; }
  tr.bq-group, tr.bq-sub { break-after: avoid; }
}

/* v2.37 — the document desk: live document cards in the chat and the cabinet */
.agdoc { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 2px; padding: 10px 12px; background: #fff; border: 1px solid #d9dcf3; border-left: 4px solid var(--brand); border-radius: 10px; box-shadow: 0 1px 2px rgba(16,12,61,.06); }
.agdoc-ic { font-size: 24px; line-height: 1; flex-shrink: 0; }
.agdoc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.agdoc-main b { font-size: 12px; letter-spacing: .02em; color: var(--brand); overflow-wrap: anywhere; }
.agdoc-name { font-size: 13.4px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.agdoc-st { display: block; font-style: normal; font-size: 12px; color: var(--ink-soft); }
.agdoc-st.ok { color: var(--ok); }
.agdoc-st.warn { color: var(--warn); }
.agdoc-st.bad { color: var(--bad); }
.agdoc-wait { color: var(--warn); }
.aga-warn { color: var(--warn); }
.agdoc-st.run::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--violet); vertical-align: middle; animation: aga-pulse 1.1s infinite; }
.agdoc-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.agdoc-btns .btn { text-decoration: none; }
.agdoc-gone { font-size: 12px; color: var(--ink-soft); font-style: italic; }
.agdoc-block .agdoc { margin: 0 0 12px; }
.agdoc-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--violet); margin: 14px 0 6px; }
.agmsg-doc { border: none; background: none; cursor: pointer; font-size: 13px; padding: 0 3px; opacity: .45; vertical-align: baseline; }
.agmsg-doc:hover { opacity: 1; }
.agf-docst { font-weight: 400; }
@media (max-width: 640px) { .agdoc { padding: 9px 10px; } .agdoc-ic { font-size: 20px; } }
/* a long file title (documents carry long ones) must never widen the one-column profile past the screen */
@media (max-width: 1000px) { .aga-profile { grid-template-columns: minmax(0, 1fr); } .aga-profile > div { min-width: 0; } }
