/* KAIZON Platform — blue engineering theme (navy sidebar, white workspace, orange accent from the K mark). */
@font-face {
  font-family: "Lexend";
  src: url("/assets/fonts/lexend-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --navy-950: #06142f;
  --navy-900: #0a1f47;
  --navy-800: #0f2d63;
  --navy-700: #16407f;
  --blue: #1463ff;
  --blue-600: #0f55e0;
  --sky: #3ea8ff;
  --orange: #ff9a1f;
  --bg: #eef3fa;
  --card: #ffffff;
  --line: #dbe4f0;
  --line-2: #e9eff7;
  --text: #0f1e3a;
  --muted: #5b6b85;
  --good: #12a150;
  --bad: #d93d42;
  --font: "Lexend", "Segoe UI", system-ui, sans-serif;
  --r-lg: 18px;
  --r-md: 12px;
  --shadow: 0 1px 2px rgba(15, 30, 58, .06), 0 8px 24px rgba(15, 30, 58, .06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.2vw, 50px); font-weight: 700; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.hidden { display: none !important; }
.ico { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

#demo-banner { background: #fff4df; color: #8a5300; text-align: center; font-size: 13px; padding: 6px 16px; border-bottom: 1px solid #f5d9a8; }

/* ---------------------------------------------------------------- brand lockup */
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand img { width: 52px; height: auto; display: block; }
.brand .word { display: flex; flex-direction: column; line-height: 1; }
.brand .word b { font-size: 26px; font-weight: 800; letter-spacing: .03em; transform: skewX(-10deg); transform-origin: left bottom;
  background: linear-gradient(180deg, #ffffff 0%, #dfe7f3 55%, #aebdd4 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .word b sup { font-size: 10px; -webkit-text-fill-color: #dfe7f3; margin-left: 2px; }
.brand .word small { font-size: 9.5px; letter-spacing: .26em; color: #c8d6ee; margin-top: 6px; font-weight: 500; }
.brand.dark .word b { background: linear-gradient(180deg, #13306a, #0a1f47); -webkit-background-clip: text; background-clip: text; }
.brand.dark .word b sup { -webkit-text-fill-color: #13306a; }
.brand.dark .word small { color: var(--navy-700); }
.brand.lg img { width: 84px; }
.brand.lg .word b { font-size: 44px; }
.brand.lg .word small { font-size: 11px; }

/* ---------------------------------------------------------------- buttons & fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  background: linear-gradient(180deg, #2a78ff, var(--blue-600)); color: #fff; font: 600 14px var(--font);
  padding: 11px 20px; border-radius: 10px; cursor: pointer; box-shadow: 0 6px 16px rgba(20, 99, 255, .25); }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: #b9c8de; }
.btn.light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35); box-shadow: none; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f1c4c6; box-shadow: none; }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.lg { padding: 14px 22px; font-size: 16px; border-radius: 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; font-weight: 500; }
input, select { width: 100%; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: 14px var(--font); }
input:focus, select:focus { border-color: var(--blue); outline: 3px solid rgba(20, 99, 255, .15); outline-offset: 0; }
.field { position: relative; display: flex; align-items: center; }
.field > .ico { position: absolute; left: 14px; color: #7286a6; pointer-events: none; }
.field input { padding-left: 44px; height: 50px; border-radius: 12px; }
.field .peek { position: absolute; right: 8px; background: none; border: 0; color: #7286a6; cursor: pointer; padding: 8px; border-radius: 8px; display: grid; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text); margin: 0; font-weight: 400; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.err { color: var(--bad); font-size: 13px; min-height: 1.2em; margin-top: 10px; }
.linkish { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; font-weight: 500; }

.tag { display: inline-block; font: 600 11px var(--font); padding: 3px 9px; border-radius: 99px; background: #eef2f8; color: var(--muted); text-transform: capitalize; }
.tag.good { background: #e3f6ea; color: #0b7a3c; }
.tag.bad { background: #fde8e8; color: #b42318; }
.tag.warn { background: #fff1d6; color: #925a00; }
.tag.info { background: #e3efff; color: #0f55e0; }

/* ---------------------------------------------------------------- product tiles (the signature element) */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px;
  min-height: 150px; padding: 18px 12px 16px; border-radius: 14px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #1f4f9e 0%, var(--navy-800) 45%, var(--navy-900) 100%);
  border: 1px solid #2b5aa8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 22px rgba(10, 31, 71, .22); }
.tile::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--sky), transparent); }
.tile.orange::after { background: linear-gradient(90deg, transparent, var(--orange), transparent); }
a.tile:hover, button.tile:hover { text-decoration: none; border-color: var(--sky); }
button.tile { font: inherit; cursor: pointer; }
.tile .ico { width: 48px; height: 48px; color: #7fd0ff; margin-bottom: 6px; filter: drop-shadow(0 0 6px rgba(62, 168, 255, .55)); }
.tile.orange .ico { color: #ffc46b; filter: drop-shadow(0 0 6px rgba(255, 154, 31, .5)); }
.tile .nm { font-weight: 750; font-size: 15px; line-height: 1.15; letter-spacing: .02em; }
.tile .nm span { display: block; font-size: 11px; font-weight: 600; opacity: .8; letter-spacing: .1em; }
.tile .sub { font-size: 11.5px; color: #b9cbe8; line-height: 1.3; }
.tile.sead { background: radial-gradient(120% 90% at 50% 0%, #c0343d 0%, #8f1d26 50%, #5e1018 100%); border-color: #d9545c; }
.tile.sead .ico { color: #ffd6d8; filter: none; }
.tile.sead::after { background: linear-gradient(90deg, transparent, #ffb3b8, transparent); }
.tile.sead .sub { color: #ffd0d3; }
.tile.review { background: radial-gradient(120% 90% at 50% 0%, #4d3fcf 0%, #2c2390 50%, #1b1660 100%); border-color: #6a5be6; }
.tile .badge { position: absolute; top: 9px; right: 9px; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); color: #e8f1ff; }
.tile .badge.on { background: #16a34a; color: #fff; }
.tile.locked .ico, .tile.locked .nm { opacity: .75; }
.tiles.compact { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.tiles.compact .tile { min-height: 92px; padding: 12px 6px; border-radius: 12px; }
.tiles.compact .tile .ico { width: 32px; height: 32px; margin-bottom: 4px; }
.tiles.compact .tile .nm { font-size: 11px; }
.tiles.compact .tile .nm span { font-size: 9.5px; }

/* ---------------------------------------------------------------- public pages */
.pub-top { background: var(--navy-950); }
.pub-bar { max-width: 1200px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pub-top nav { display: flex; align-items: center; gap: 18px; }
.pub-top nav a:not(.btn) { color: #c8d6ee; }
.hero { position: relative; color: #fff; background: var(--navy-950) url("/assets/hero-frame.svg") center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 20, 47, .92) 0%, rgba(6, 20, 47, .55) 55%, rgba(6, 20, 47, .15) 100%); }
.hero .in { position: relative; max-width: 1200px; margin: 0 auto; padding: 72px 16px 56px; }
.hero h1 { max-width: 640px; border-left: 4px solid var(--sky); padding-left: 18px; }
.verbs { color: #d6e2f5; font-size: 17px; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 28px 22px; }
.verbs span + span::before { content: "|"; color: #6f8bb8; margin-right: 14px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 40px 22px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
section.block { padding: 56px 0; }
section.block h2 { font-size: 26px; }
.app-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); margin-top: 18px; }
.app-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; display: flex; gap: 14px; box-shadow: var(--shadow); }
.app-card .tile { min-height: 0; width: 64px; height: 64px; flex: none; padding: 0; border-radius: 12px; }
.app-card .tile .ico { width: 34px; height: 34px; margin: 0; }
.app-card .body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.app-card h3 { margin: 0; }
.app-card .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; }
.price { font-weight: 700; }
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 18px; }
.steps > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.steps .ico { width: 30px; height: 30px; color: var(--blue); margin-bottom: 10px; }
.fb-frame { max-width: 500px; margin-top: 16px; }
.fb-frame iframe { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; max-width: 100%; display: block; }
footer.pub { background: var(--navy-950); color: #9fb2d3; font-size: 13px; padding: 28px 0; }
footer.pub .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer.pub a { color: #cfe0ff; }

/* ---------------------------------------------------------------- sign-in split */
.split { display: grid; grid-template-columns: 1.25fr 1fr; min-height: 100vh; background: var(--navy-950); }
.split .art { position: relative; color: #fff; background: var(--navy-950) url("/assets/hero-frame.svg") center / cover no-repeat; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 36px 40px; overflow: hidden; }
.split .art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 20, 47, .45) 0%, rgba(6, 20, 47, .2) 40%, rgba(6, 20, 47, .9) 100%); }
.split .art > * { position: relative; }
.split .art h1 { font-size: clamp(30px, 3.4vw, 48px); border-left: 4px solid var(--sky); padding-left: 18px; margin-bottom: 8px; }
.split .art h3 { font-size: 15px; margin-bottom: 12px; }
.split .pane { background: linear-gradient(160deg, #e9f1fd 0%, #d7e6fb 100%); display: grid; place-items: center; padding: 32px 20px; }
.signin { width: 100%; max-width: 470px; background: #fff; border-radius: 26px; padding: 34px 34px 26px; box-shadow: 0 30px 60px rgba(10, 31, 71, .18); }
.signin .head { text-align: center; margin-bottom: 18px; }
.signin .head .brand { margin-bottom: 18px; }
.signin h2 { font-size: 24px; margin-bottom: 4px; }
.signin form > * + * { margin-top: 12px; }
.signin .between { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.oauth button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; font: 600 14px var(--font); color: var(--text); cursor: pointer; box-shadow: 0 2px 6px rgba(15, 30, 58, .05); }
.oauth button:hover { border-color: #b9c8de; }
.oauth img { width: 18px; height: 18px; }
.signin .swap { text-align: center; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.signin .swap button { font-weight: 600; }
@media (max-width: 920px) {
  .split { grid-template-columns: 1fr; }
  .split .art { padding: 22px 18px 26px; }
  .split .art .pitch, .split .art .suite { display: none; }
  .split .pane { padding: 0 12px 28px; background: var(--navy-950); }
  .signin { padding: 26px 20px 22px; border-radius: 20px; }
}

/* ---------------------------------------------------------------- app shell (account + admin) */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%); color: #d7e3f7; padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: 0 6px; }
.side .brand img { width: 46px; }
.side .brand .word b { font-size: 23px; }
.side .brand .word small { font-size: 7.5px; letter-spacing: .2em; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav a, .side nav button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: #d7e3f7; font: 500 14.5px var(--font); background: none; border: 0; cursor: pointer; text-align: left; width: 100%; }
.side nav a:hover, .side nav button:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.side nav a.on { background: linear-gradient(180deg, #2a78ff, var(--blue-600)); color: #fff; box-shadow: 0 6px 16px rgba(20, 99, 255, .35); }
.side .group { font-size: 12px; color: #7f95bb; padding: 0 14px; margin: 6px 0 -2px; }
.side .foot { margin-top: auto; font-size: 12px; color: #7f95bb; padding: 0 8px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 5; }
.topbar .title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 650; }
.topbar .title .ico { width: 24px; height: 24px; color: var(--navy-700); }
.topbar .spacer { flex: 1; }
.topbar .iconbtn { background: none; border: 0; color: var(--navy-700); padding: 8px; border-radius: 10px; cursor: pointer; display: grid; }
.topbar .iconbtn:hover { background: var(--bg); }
.topbar .iconbtn .ico { width: 22px; height: 22px; }
.who { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, #2a78ff, var(--navy-800)); color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.who .n { font-weight: 600; font-size: 14px; line-height: 1.2; }
.who .o { font-size: 12px; color: var(--muted); }
#menu-btn { display: none; }
.content { padding: 24px; max-width: 1440px; width: 100%; }
@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(6, 20, 47, .5); }
  #menu-btn { display: grid; }
  .topbar { padding: 0 12px; }
  .who .meta { display: none; }
  .content { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* ---------------------------------------------------------------- dashboard blocks */
.greet { position: relative; overflow: hidden; border-radius: var(--r-lg); color: #fff; padding: 22px 26px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(90deg, var(--navy-900) 0%, rgba(10, 31, 71, .92) 40%, rgba(10, 31, 71, .25) 100%), var(--navy-900) url("/assets/hero-frame.svg") right 35% / 65% auto no-repeat; margin-bottom: 18px; }
.greet .disc { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.greet .disc img { width: 42px; }
.greet h1 { font-size: clamp(22px, 2.4vw, 28px); margin: 0; }
.greet p { margin: 2px 0 0; color: #cfe0f8; }
.greet .date { margin-left: auto; display: flex; align-items: center; gap: 10px; background: rgba(6, 20, 47, .55); border: 1px solid rgba(255, 255, 255, .18); padding: 10px 14px; border-radius: 12px; line-height: 1.25; }
.greet .date .ico { width: 26px; height: 26px; color: #9fd2ff; }
.dash-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1180px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.stack { min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.stack > .card + .card, .card.gap { margin-top: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; }
.card-head h2 .ico { color: var(--blue); width: 22px; height: 22px; }
.card-head input, .card-head select { width: auto; min-width: 170px; padding: 8px 10px; }
.prof { display: flex; gap: 14px; align-items: center; }
.prof .avatar { width: 52px; height: 52px; font-size: 18px; }
.prof .n { font-weight: 650; }
.prof .d { font-size: 13px; color: var(--muted); line-height: 1.45; }
.lic-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.lic-row:last-child { border-bottom: 0; }
.lic-row .mini { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #eaf1ff; color: var(--blue); flex: none; }
.lic-row .mini .ico { width: 22px; height: 22px; }
.lic-row .t { flex: 1; min-width: 0; }
.lic-row .t b { display: block; font-weight: 600; font-size: 14px; }
.lic-row .t small { color: var(--muted); font-size: 12.5px; }
.redeem { display: flex; gap: 10px; }
.redeem input { letter-spacing: .1em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .redeem { flex-direction: column; } }

.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.kpi .bub { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: #e7f0ff; color: var(--blue); flex: none; }
.kpi .bub .ico { width: 26px; height: 26px; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi .v { font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .s { color: var(--muted); font-size: 12px; }
.cols { display: grid; gap: 18px; grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 980px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 210px; padding-top: 18px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 54px; border-radius: 8px 8px 2px 2px; min-height: 3px; background: linear-gradient(180deg, var(--sky), var(--blue)); }
.bar .amt { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar .mo { font-size: 12px; color: var(--muted); }
.split-list { list-style: none; margin: 0; padding: 0; }
.split-list li { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 8px 0; font-size: 14px; }
.split-list .track { grid-column: 1 / -1; height: 7px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.split-list .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--sky)); border-radius: 4px; }
.split-list.orange .track i { background: linear-gradient(90deg, #ff7a0f, #ffc24a); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 9px 10px; background: #f5f8fc; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .sub { color: var(--muted); font-size: 12.5px; }
td input { padding: 7px 9px; max-width: 120px; }
.empty { color: var(--muted); text-align: center; padding: 28px 10px; }
.form-row { display: grid; gap: 10px; grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr auto; align-items: end; }
.form-row label { margin-top: 0; }
@media (max-width: 980px) { .form-row { grid-template-columns: 1fr 1fr; } }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); font-size: 13px; gap: 8px; flex-wrap: wrap; }
#occ-pos-sel + #occ-pos { margin-top: 8px; }
.locked-note { max-width: 480px; margin: 40px auto; text-align: center; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy-900); color: #fff; padding: 11px 18px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(6, 20, 47, .3); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: #8f1d26; }
@media (max-width: 560px) {
  .brand .word b { font-size: 21px; }
  .brand img { width: 42px; }
  .pub-top nav a:not(.btn) { display: none; }
  .greet .date { margin-left: 0; }
  .hero .in { padding-top: 44px; }
}
@media (max-width: 560px) {
  .tiles:not(.compact) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tiles:not(.compact) .tile { min-height: 128px; padding: 14px 8px; }
  .tiles:not(.compact) .tile .ico { width: 38px; height: 38px; }
  .tiles:not(.compact) .tile .nm { font-size: 13.5px; }
  .greet { padding: 18px; }
}

/* ---------------------------------------------------------------- community feed */
.feed-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 680px) 320px; justify-content: center; align-items: start; }
@media (max-width: 1100px) {
  .feed-grid { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
  .feed-grid > *, .feed-col > * { min-width: 0; max-width: 100%; }
  .feed-col { display: contents; }
  .composer { order: 0; }
  .feed-side { order: 1; margin-top: 14px; }
  .feed-tabs { order: 2; }
  #feed { order: 3; }
  .feed-more { order: 4; }
  .feed-side .card:last-child { display: none; }
  .feed-side .person:nth-child(n+4) { display: none; }
}
.feed-col { min-width: 0; }
.feed-side { position: sticky; top: 86px; }
@media (max-width: 1100px) { .feed-side { position: static; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
textarea { width: 100%; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font: 15px/1.5 var(--font); color: var(--text); background: #f7f9fd; }
textarea:focus { border-color: var(--blue); outline: 3px solid rgba(20, 99, 255, .15); background: #fff; }
.composer-row { display: flex; gap: 12px; align-items: flex-start; }
.composer-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.composer-actions .count { margin-left: auto; font-size: 12.5px; }
.composer-actions .btn:last-child { margin-left: auto; }
.composer-actions .count + .btn { margin-left: 0; }
.photo-btn { cursor: pointer; }
.photo-btn .ico { color: #12a150; }
.photo-btn:focus-within { outline: 3px solid var(--sky); }
.photo-preview { position: relative; margin: 12px 0 0 52px; display: inline-block; }
.photo-preview img { max-height: 220px; max-width: 100%; border-radius: 12px; display: block; border: 1px solid var(--line); }
.photo-preview .remove { position: absolute; top: 6px; right: 6px; background: rgba(6, 20, 47, .7); color: #fff; border: 0; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; }
.feed-tabs { display: flex; gap: 6px; margin: 18px 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px; }
.feed-tabs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 8px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; }
.feed-tabs button[aria-selected="true"] { background: linear-gradient(180deg, #2a78ff, var(--blue-600)); color: #fff; }
#feed { display: flex; flex-direction: column; gap: 14px; }
.feed-empty { text-align: center; color: var(--muted); }
.feed-more { text-align: center; margin: 16px 0; }
.post { padding: 16px 18px 6px; }
.post-head { display: flex; align-items: center; gap: 12px; }
.post-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.post-who small { color: var(--muted); font-size: 12.5px; }
.post-menu { display: flex; }
.iconbtn { background: none; border: 0; color: #6b7d99; padding: 7px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.iconbtn:hover { background: var(--bg); color: var(--text); }
.iconbtn .ico { width: 19px; height: 19px; }
.post-body { margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.post-body a, .bubble a { word-break: break-all; }
.post-photo { display: block; margin: 0 -18px 10px; background: #0a1f47; }
.post-photo img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.post-stats { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; min-height: 20px; }
.post-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-2); margin-top: 8px; padding: 4px 0; }
.act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: none; border: 0; padding: 9px; border-radius: 9px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; }
.act:hover { background: var(--bg); }
.act.on { color: #e0245e; }
.comments { border-top: 1px solid var(--line-2); padding: 12px 0 10px; display: flex; flex-direction: column; gap: 10px; }
.comment, .comment-new { display: flex; gap: 10px; align-items: flex-start; }
.comment .avatar, .comment-new .avatar, .person .avatar { width: 34px; height: 34px; font-size: 12.5px; }
.bubble { background: #f1f5fb; border-radius: 14px; padding: 8px 12px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.bubble small { color: var(--muted); font-size: 12px; }
.comment-new { align-items: center; }
.comment-new input { border-radius: 99px; padding: 9px 14px; background: #f7f9fd; }
.post-edit textarea { margin: 12px 0 8px; background: #fff; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.person { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.person:last-child { border-bottom: 0; }
.person .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.person .t b { font-size: 14px; font-weight: 600; }
.person .t small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }
dialog { border: 0; border-radius: 18px; padding: 24px; width: min(440px, calc(100% - 32px)); box-shadow: 0 30px 60px rgba(6, 20, 47, .35); color: var(--text); }
dialog::backdrop { background: rgba(6, 20, 47, .55); }
dialog .check { display: flex; padding: 8px 0; }
@media (max-width: 560px) {
  .post { padding: 14px 14px 4px; }
  .post-photo { margin: 0 -14px 10px; }
  .photo-preview { margin-left: 0; }
  .post-head .btn.sm { padding: 6px 9px; }
  .post-head .btn.sm .ico { display: none; }
}

/* ---------------------------------------------------------------- shared projects */
.head-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.head-tools input, .head-tools select { width: auto; min-width: 160px; padding: 9px 11px; }
.small { font-size: 13px; }
.proj-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.proj-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: #fff; }
.proj-card:hover { text-decoration: none; border-color: var(--sky); box-shadow: 0 8px 22px rgba(20, 99, 255, .1); }
.proj-top { display: flex; gap: 12px; align-items: flex-start; }
.proj-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #7fd0ff;
  background: radial-gradient(120% 90% at 50% 0%, #1f4f9e 0%, var(--navy-800) 60%, var(--navy-900) 100%); }
.proj-ico .ico { width: 24px; height: 24px; }
.proj-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.proj-name b { font-weight: 650; }
.proj-name small { color: var(--muted); font-size: 12.5px; }
.progress { display: flex; align-items: center; gap: 10px; }
.progress .track { flex: 1; height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.progress .track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--sky)); }
.progress .pct { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.progress.light .track { background: rgba(255, 255, 255, .18); }
.proj-meta { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.proj-meta span { display: inline-flex; align-items: center; gap: 5px; }
.proj-meta .ico { width: 15px; height: 15px; }
.proj-meta .when { margin-left: auto; }
.tag.st-planning { background: #eef2f8; color: #3c4f70; }
.tag.st-in_progress { background: #e3efff; color: #0f55e0; }
.tag.st-for_review { background: #fff1d6; color: #925a00; }
.tag.st-completed { background: #e3f6ea; color: #0b7a3c; }
.tag.st-on_hold { background: #fde8e8; color: #b42318; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state > .ico { width: 44px; height: 44px; color: #9fb2d3; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
dialog textarea { background: #fff; }
.dlg-actions .spacer { flex: 1; }

.proj-hero { border-radius: var(--r-lg); color: #fff; padding: 22px 26px; display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-end;
  background: linear-gradient(90deg, var(--navy-900) 0%, rgba(10, 31, 71, .93) 50%, rgba(10, 31, 71, .4) 100%), var(--navy-900) url("/assets/hero-frame.svg") right 40% / 60% auto no-repeat; }
.proj-hero-main { flex: 1; min-width: 260px; }
.proj-hero .back { color: #9fd2ff; font-size: 13px; }
.proj-hero h1 { font-size: clamp(22px, 2.6vw, 30px); margin: 6px 0 10px; }
.proj-hero .facts { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; color: #cfe0f8; font-size: 14px; }
.proj-hero .desc { color: #cfe0f8; margin: 12px 0 0; max-width: 70ch; white-space: pre-wrap; }
.proj-hero-side { width: 220px; display: flex; flex-direction: column; gap: 8px; }
.proj-hero-side .big-pct { font-size: 40px; font-weight: 750; line-height: 1; }
.proj-hero-side small { color: #9fb2d3; }
.proj-tabs { margin: 18px 0; max-width: 520px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.inline-field input { width: 90px; padding: 8px 10px; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.tl-item:last-child { border-bottom: 0; }
.tl-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e7f0ff; color: var(--blue); flex: none; }
.tl-dot .ico { width: 17px; height: 17px; }
.tl-item.k-file .tl-dot { background: #e3f6ea; color: #0b7a3c; }
.tl-item.k-member .tl-dot { background: #f0ebff; color: #5b3fd0; }
.tl-item.k-status .tl-dot { background: #fff1d6; color: #925a00; }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-head small { color: var(--muted); }
.tl-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.file-name { display: inline-flex; align-items: center; gap: 8px; text-align: left; color: var(--text); font-weight: 500; }
.file-name .ico { color: var(--blue); }
.invite { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin-bottom: 4px; }
@media (max-width: 720px) { .invite { grid-template-columns: 1fr; } }
#team .person select { width: auto; padding: 6px 8px; }
#team .person .btn { margin-left: 6px; }

/* ---------------------------------------------------------------- dashboard extras (from the mockup) */
.kpi .grow { flex: 1; min-width: 0; }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--sky)); border-radius: 3px; }
.proj-link { font-weight: 600; color: var(--text); }
.progress.mini { display: inline-flex; width: 120px; }
.act-row { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); color: var(--text); }
.act-row:last-child { border-bottom: 0; }
.act-row:hover { text-decoration: none; }
.act-row .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.act-row .t b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-row .t small { color: var(--muted); font-size: 12px; }
.donut-wrap { display: flex; gap: 18px; align-items: center; }
.donut { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.donut > span { width: 78px; height: 78px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.donut b { font-size: 26px; }
.donut small { color: var(--muted); font-size: 12px; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; gap: 7px; font-size: 13.5px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend span { flex: 1; }
.explore { margin-top: 18px; border-radius: var(--r-lg); color: #fff; padding: 22px;
  background: linear-gradient(160deg, rgba(10, 31, 71, .55), var(--navy-900) 75%), var(--navy-900) url("/assets/hero-frame.svg") center / cover no-repeat; }
.explore h3 { font-size: 18px; }
.explore p { color: #cfe0f8; font-size: 14px; }

/* ---------------------------------------------------------------- shell extras: search, bell, products dropdown, collapse */
.top-search { display: flex; align-items: center; gap: 8px; margin: 0 0 0 12px; background: #f1f5fb; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; width: min(360px, 32vw); color: var(--muted); }
.top-search input { border: 0; background: none; padding: 9px 0; outline: none; }
.top-search input:focus { outline: none; }
.top-search:focus-within { border-color: var(--blue); background: #fff; }
.top-search kbd { font: 11px var(--font); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 980px) { .top-search { display: none; } }
.bell-wrap { position: relative; }
.bell { position: relative; }
.badge-dot { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; border-radius: 8px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); width: 330px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 40px rgba(6, 20, 47, .18); padding: 12px; z-index: 40; }
.pop-title { display: block; margin: 2px 4px 8px; }
.pop-row { display: flex; flex-direction: column; padding: 8px; border-radius: 8px; color: var(--text); font-size: 14px; }
.pop-row:hover { background: var(--bg); text-decoration: none; }
.pop-row small { color: var(--muted); font-size: 12px; }
.who { color: var(--text); }
.who:hover { text-decoration: none; }
.side nav .dd .chev { width: 16px; height: 16px; margin-left: auto; transition: transform .15s; }
.side nav .dd[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sub-nav { display: none; flex-direction: column; gap: 2px; margin: 0 0 4px 18px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .12); }
.sub-nav.open { display: flex; }
.side nav .sub-nav a { padding: 7px 10px; font-size: 13.5px; }
.side nav .sub-nav a .ico { width: 17px; height: 17px; color: #7fd0ff; }
.side .foot { display: flex; flex-direction: column; gap: 8px; }
.collapse-btn { display: flex; align-items: center; gap: 12px; background: none; border: 0; color: #9fb2d3; font: 500 13.5px var(--font); padding: 8px 6px; cursor: pointer; border-radius: 8px; }
.collapse-btn:hover { background: rgba(255, 255, 255, .07); }
.ver { font-size: 11.5px; color: #6f86ad; }
@media (min-width: 981px) {
  body.side-collapsed .shell { grid-template-columns: 76px 1fr; }
  body.side-collapsed .side { padding: 20px 10px; }
  body.side-collapsed .side .lbl, body.side-collapsed .side .group, body.side-collapsed .side .brand .word, body.side-collapsed .side .chev { display: none; }
  body.side-collapsed .side nav a, body.side-collapsed .side nav button, body.side-collapsed .collapse-btn { justify-content: center; padding: 11px 0; }
  body.side-collapsed .sub-nav { margin-left: 0; padding-left: 0; border: 0; }
  body.side-collapsed .collapse-btn .ico { transform: rotate(180deg); }
}

/* ---------------------------------------------------------------- messages */
.chat-content { padding-bottom: 16px; }
.chat { display: grid; grid-template-columns: 330px minmax(0, 1fr); height: calc(100vh - 68px - 40px); min-height: 460px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
body:has(#demo-banner) .chat { height: calc(100vh - 68px - 40px - 31px); }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line-2); }
.chat-list-head h2 { margin: 0; font-size: 18px; }
.people-search { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.conv-list { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 11px; align-items: center; width: 100%; padding: 11px 14px; background: none; border: 0; border-bottom: 1px solid var(--line-2); text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.conv:hover { background: #f5f8fc; }
.conv.on { background: #e9f1ff; }
.conv .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conv .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.conv b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.conv .snip { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .snip { color: var(--text); font-weight: 600; }
.conv .count { background: var(--blue); color: #fff; border-radius: 10px; min-width: 20px; height: 20px; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.avatar.proj { border-radius: 12px; color: #7fd0ff; background: radial-gradient(120% 90% at 50% 0%, #1f4f9e 0%, var(--navy-800) 60%, var(--navy-900) 100%); }
.avatar.proj .ico { width: 20px; height: 20px; }
.chat-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); min-height: 64px; }
.thread-title { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.thread-title .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.thread-title small { color: var(--muted); font-size: 12.5px; }
.back-btn { display: none; }
.thread-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: #f7f9fd; }
.thread-empty { margin: auto; text-align: center; color: var(--muted); }
.thread-empty .ico { width: 46px; height: 46px; color: #9fb2d3; }
.msg { max-width: min(560px, 78%); display: flex; flex-direction: column; align-self: flex-start; }
.msg .b { background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 9px 13px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .b { background: linear-gradient(180deg, #2a78ff, var(--blue-600)); color: #fff; border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg.mine .b a { color: #fff; text-decoration: underline; }
.msg .at { color: var(--muted); font-size: 11px; margin: 2px 6px 4px; }
.msg .who { color: var(--muted); font-size: 12px; margin: 0 6px 2px; }
.thread-compose { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line-2); align-items: flex-end; }
.thread-compose textarea { background: #f7f9fd; border-radius: 20px; padding: 10px 16px; }
.thread-compose .btn { border-radius: 50%; width: 44px; height: 44px; padding: 0; flex: none; }
.pad { padding: 14px; }
.center { text-align: center; margin: auto; }
@media (max-width: 860px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 68px - 32px); }
  .chat .chat-thread { display: none; }
  .chat.open .chat-list { display: none; }
  .chat.open .chat-thread { display: flex; }
  .back-btn { display: grid; }
}
@media (max-width: 560px) {
  .who { padding-left: 0; border-left: 0; }
  .topbar { gap: 6px; }
  .topbar .title { font-size: 17px; }
  .proj-grid { grid-template-columns: minmax(0, 1fr); }
  .head-tools { width: 100%; }
  .head-tools input, .head-tools select { flex: 1; min-width: 0; }
}
