/* Bezam team dashboard. The app's look on a big screen: warm paper, white cards with 20 px corners,
   capsule buttons, the brand rose only on actions and live things, plum for depth. System type. */
:root {
  --brand: #E82E5F; --brand-edge: #B81E4A; --brand-soft: #FCE8EC; --plum: #781652; --berry: #C62469;
  --paper: #FBF5F1; --card: #FFFFFF; --ink: #1F1418; --muted: #8A7A80; --line: #EFE3E0; --track: #F5ECE9; --fill: #EADDD9;
  --woman: #C62469; --woman-soft: #FBE3EC; --man: #2E3A59; --man-soft: #E3E8F3;
  --success: #0E8345; --success-soft: #E8F5EC; --amber: #E39B2D; --amber-soft: #FFF0D9; --danger: #D94A3D; --danger-soft: #FBE4E1;
  --r-card: 20px; --side: 236px; --drawer: 560px;
  --shadow: 0 1px 2px rgba(31,20,24,.04), 0 8px 24px rgba(31,20,24,.06);
  --shadow-lg: 0 20px 60px rgba(31,20,24,.18);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #120D0F; --card: #1D1619; --ink: #F6EEF0; --muted: #A8979D; --line: #2E2428; --track: #261E21; --fill: #34292D;
    --brand-soft: #3D1522; --woman-soft: #3A1626; --man-soft: #1B2236; --success-soft: #16301F; --amber-soft: #3A2A12; --danger-soft: #4A1E1A;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, system-ui, sans-serif; background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12px; } .error { color: var(--danger); font-weight: 600; }
h1 { font-size: 30px; line-height: 1.1; margin: 10px 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 15px; margin: 0 0 10px; }
a { color: var(--brand); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; font-weight: 600; background: var(--track); padding: 2px 7px; border-radius: 7px; white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--card); cursor: pointer; font-weight: 600; font-size: 15px; box-shadow: 0 3px 0 var(--fill); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn-wide { width: 100%; height: 54px; margin-top: 12px; font-size: 17px; }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 3px 0 var(--brand-edge); }
.btn-ghost { background: transparent; box-shadow: none; } .btn-ghost:hover { background: var(--track); }
.btn-small { height: 34px; padding: 0 14px; font-size: 13px; box-shadow: 0 2px 0 var(--fill); }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* Gates */
.gate { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(140deg, #E82E5F, #C62469 60%, #781652); }
.gate-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 28px; padding: 36px 30px 30px; box-shadow: var(--shadow-lg); text-align: center; }
.gate-logo { width: 88px; height: 88px; margin: 0 auto 6px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font-size: 44px; box-shadow: 0 6px 0 var(--brand-edge); }
.gate-card .muted { font-size: 15px; margin-bottom: 14px; }

/* Layout */
.app { display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; }
.side { display: flex; flex-direction: column; padding: 20px 14px 16px; gap: 18px; border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; padding: 2px 8px; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); display: grid; place-items: center; font-size: 20px; box-shadow: 0 3px 0 var(--brand-edge); color: #fff; }
.brand-tag.prod { color: #fff; background: var(--danger); }
.brand-tag { margin-left: auto; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--track); padding: 4px 8px; border-radius: 999px; }
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 14px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 14px; font-weight: 600; font-size: 14px; color: var(--muted); }
.nav-item:hover { background: var(--track); color: var(--ink); }
.nav-item.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.nav-ico { width: 22px; text-align: center; }
.nav-count { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--fill); color: var(--ink); padding: 1px 9px; border-radius: 999px; }
.nav-count:empty { display: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 0 8px; font-weight: 600; }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.conn.ok .dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); } .conn.bad .dot { background: var(--danger); }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.me img { width: 34px; height: 34px; border-radius: 50%; background: var(--fill); }
.me-name { font-weight: 700; font-size: 13px; } .me-email { font-size: 11px; color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px 10px; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; margin: 0; }
.mode { display: inline-flex; background: var(--track); border-radius: 999px; padding: 3px; }
.mode button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.mode button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.banner { margin: 0 24px 10px; padding: 10px 14px; border-radius: 14px; background: var(--amber-soft); font-weight: 600; font-size: 13px; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 4px 24px 32px; }
.view.full { padding: 0; }

/* Blocks */
.block { background: var(--card); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 28px; letter-spacing: -0.03em; line-height: 1.1; } .kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi.rose b { color: var(--brand); } .kpi.plum b { color: var(--plum); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 0; background: var(--card); padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: var(--shadow); color: var(--muted); }
.chip.on { background: var(--ink); color: var(--paper); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--track); color: var(--muted); white-space: nowrap; }
.badge.done { background: var(--success-soft); color: var(--success); } .badge.doing { background: var(--amber-soft); color: #9A5D0A; }
.badge.woman { background: var(--woman-soft); color: var(--woman); } .badge.man { background: var(--man-soft); color: var(--man); }
.badge.rose { background: var(--brand-soft); color: var(--brand); } .badge.bad { background: var(--danger-soft); color: var(--danger); }
.empty { color: var(--muted); padding: 32px 24px; text-align: center; background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); font-weight: 600; }
.search { height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--card); box-shadow: var(--shadow); outline: none; min-width: 260px; }

/* Tables */
.table-wrap { overflow: auto; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--track); }
.who { display: flex; align-items: center; gap: 10px; } .who b { display: block; } .who span { font-size: 12px; color: var(--muted); }
.av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: block; }
.av.lg { width: 120px; height: 120px; } .av.md { width: 56px; height: 56px; }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 6px; }
.fn-row { display: grid; grid-template-columns: 170px 1fr 48px; gap: 10px; align-items: center; font-weight: 600; font-size: 13px; }
.fn-bar { height: 22px; border-radius: 8px; background: var(--track); overflow: hidden; } .fn-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--berry)); border-radius: 8px; }
.fn-row b { text-align: right; }

/* Map */
.map { width: 100%; height: 100%; min-height: 520px; background: var(--track); }
.map-wrap { position: relative; height: 100%; }
.map-panel { position: absolute; top: 14px; left: 14px; z-index: 500; background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--shadow-lg); width: 290px; max-height: calc(100% - 28px); overflow: auto; }
.map-panel h3 { margin-bottom: 6px; }
.city-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.city-row:last-child { border: 0; }
.dot2 { display: inline-flex; gap: 4px; } .dot2 i { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.dot2 .w { background: var(--woman-soft); color: var(--woman); } .dot2 .m { background: var(--man-soft); color: var(--man); }
.citypin { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 4px 12px rgba(0,0,0,.25); }

/* Kanban of matches */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 230px; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--track); border-radius: 18px; padding: 10px; min-height: 200px; }
.col-head { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 4px 4px 10px; }
.col-head span:last-child { margin-left: auto; color: var(--muted); }
.mcard { background: var(--card); border-radius: 14px; padding: 10px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; }
.mcard:hover { box-shadow: var(--shadow-lg); }
.pair { display: flex; align-items: center; } .pair .av { width: 34px; height: 34px; border: 2px solid var(--card); } .pair .av + .av { margin-left: -10px; }
.mcard-names { font-weight: 700; font-size: 13px; margin-left: 8px; } .mcard-meta { font-size: 11px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; }
.score { font-weight: 800; color: var(--brand); }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: var(--drawer); max-width: 100vw; background: var(--paper); box-shadow: var(--shadow-lg); z-index: 1000; display: flex; flex-direction: column; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-body { overflow: auto; padding: 18px 20px 30px; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 999; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13px; } .kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; font-weight: 600; }
.bubbles { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.bubble { padding: 5px 10px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 12px; font-weight: 700; }
.parts { display: flex; flex-direction: column; gap: 7px; }
.part { display: grid; grid-template-columns: 130px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; font-weight: 600; }
.part .bar { height: 10px; background: var(--track); border-radius: 6px; overflow: hidden; } .part .bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.part b { text-align: right; font-variant-numeric: tabular-nums; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.tl .d { position: relative; } .tl .d::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.tl .d::after { content: ""; position: absolute; left: 7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid var(--paper); }
.tl .b { padding-bottom: 12px; font-size: 13px; } .tl .b b { display: block; }

/* Journey */
.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.stage { background: var(--card); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); position: relative; }
.stage-n { position: absolute; top: 14px; right: 16px; font-weight: 800; color: var(--fill); font-size: 26px; }
.stage-e { font-size: 30px; } .stage h3 { margin: 6px 0 4px; } .stage p { margin: 4px 0; font-size: 13px; color: var(--muted); }
.stage .rule { margin-top: 8px; font-size: 12px; font-weight: 600; background: var(--brand-soft); color: var(--brand); padding: 6px 10px; border-radius: 10px; }
.stage .count { margin-top: 10px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); }

/* Algorithm */
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rule-card { border-radius: 16px; padding: 14px; background: var(--danger-soft); } .rule-card b { display: block; margin-bottom: 4px; } .rule-card span { font-size: 13px; }
.weights { display: flex; height: 40px; border-radius: 12px; overflow: hidden; margin: 8px 0 12px; }
.weights div { display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }
.sim { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 14px; align-items: start; }
.sim select { width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 0 10px; margin-bottom: 10px; }
.sim-person { text-align: center; } .sim-person .av { margin: 6px auto; }
.verdict { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; color: var(--brand); line-height: 1; }
.verdict.no { color: var(--danger); font-size: 22px; }

/* Screens */
.cat { margin-bottom: 26px; scroll-margin-top: 10px; }
.cat-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.cat-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 22px; flex: none; }
.cat-title { font-weight: 800; font-size: 17px; } .cat-sum { color: var(--muted); font-size: 13px; max-width: 760px; }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.phones { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.phone { margin: 0; }
.phone button { border: 0; padding: 0; background: #000; border-radius: 26px; overflow: hidden; cursor: zoom-in; display: block; width: 100%; aspect-ratio: 1206 / 2622; box-shadow: var(--shadow-lg); }
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone button.missing { background: var(--track); } .phone button.missing::after { content: "capture missing"; color: var(--muted); font-weight: 700; }
.phone figcaption { font-size: 12px; font-weight: 600; margin-top: 8px; } .phone figcaption small { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.lb { position: fixed; inset: 0; background: rgba(10,6,8,.88); z-index: 2000; display: flex; align-items: center; justify-content: center; gap: 20px; }
.lb img { max-height: 90vh; max-width: 42vw; border-radius: 30px; } .lb-text { color: #fff; max-width: 360px; } .lb-text b { font-size: 20px; display: block; margin-bottom: 8px; }
.lb .btn { position: absolute; } .lb .close { top: 20px; right: 20px; } .lb .prev { left: 20px; } .lb .next { right: 20px; }

/* Roadmap */
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.area h3 { display: flex; align-items: center; gap: 8px; } .area h3 .badge { margin-left: auto; }
.item { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: start; }
.item:last-child { border: 0; } .item .ck { font-size: 15px; } .item small { display: block; color: var(--muted); }
.progress { height: 14px; display: flex; gap: 3px; margin: 10px 0 6px; } .progress i { flex: 1; border-radius: 4px; background: var(--track); }
.progress i.done { background: var(--success); } .progress i.doing { background: var(--amber); }
.log { display: flex; flex-direction: column; } .log .tl .b small { color: var(--muted); display: block; }

/* Culture + docs */
.teips { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.teip { background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 13px; }
.teip b { display: block; font-size: 14px; } .teip span { color: var(--muted); font-size: 12px; }
.doc { max-width: 900px; } .doc h1 { font-size: 26px; } .doc h2 { margin-top: 26px; font-size: 20px; } .doc h3 { margin-top: 18px; }
.doc table { margin: 10px 0; font-size: 13px; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.doc p, .doc li { font-size: 14px; line-height: 1.6; } .doc blockquote { border-left: 3px solid var(--brand); margin: 10px 0; padding: 4px 14px; color: var(--muted); }
.doc-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; } .side { display: none; } .grid2, .grid3, .sim { grid-template-columns: 1fr; }
}

.badge.verified { background: #e3f1fb; color: #1a8fdb; }
.tick { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #1a8fdb; color: #fff; font-size: 10px; font-weight: 800; vertical-align: 1px; }
