/* VEXTUS ERP — base styles. Colours come from the approved mockup (TZ-02, section 2). */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-ext-wght.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-wght.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-600.woff2") format("woff2");
}

:root,
[data-theme="dark"] {
  --page: #001427; --page-text: #EAF3FA; --page-muted: #9DBBD3;
  --card: #06274A; --inset: rgba(0, 20, 39, 0.45); --hero: #0A4174;
  --nav: #001D39; --nav-text: #EAF3FA; --nav-muted: #49769F;
  --border: rgba(123, 189, 232, 0.16); --text: #EAF3FA; --muted: #9DBBD3;
  --track: rgba(189, 216, 233, 0.12); --accent2: #4E8EA2; --bar: #49769F; --bar-hi: #7BBDE8;
  --link: #7BBDE8; --pill-on: #7BBDE8; --pill-on-text: #001D39;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  --good: #4FC79A; --warn: #F0B954; --bad: #F07A6E;
  --field: rgba(0, 20, 39, 0.55);
  color-scheme: dark;
}
[data-theme="dusk"] {
  --page: #49769F; --page-text: #FFFFFF; --page-muted: #E3EEF6;
  --card: #EEF4F9; --inset: #FFFFFF; --hero: #001D39;
  --nav: #001D39; --nav-text: #EAF3FA; --nav-muted: #49769F;
  --border: rgba(0, 29, 57, 0.10); --text: #001D39; --muted: #3D6384;
  --track: rgba(0, 29, 57, 0.08); --accent2: #4E8EA2; --bar: #1D3D61; --bar-hi: #4E8EA2;
  --link: #0A4174; --pill-on: #7BBDE8; --pill-on-text: #001D39;
  --shadow: 0 14px 30px rgba(0, 29, 57, 0.28);
  --good: #1E8A63; --warn: #A86A12; --bad: #C2453A;
  --field: #FFFFFF;
  color-scheme: light;
}
[data-theme="light"] {
  --page: #E9F2F9; --page-text: #001D39; --page-muted: #3D6384;
  --card: #FFFFFF; --inset: #F4F9FC; --hero: #0A4174;
  --nav: #FFFFFF; --nav-text: #001D39; --nav-muted: #BDD8E9;
  --border: #D5E6F2; --text: #001D39; --muted: #3D6384;
  --track: #E4EEF6; --accent2: #4E8EA2; --bar: #49769F; --bar-hi: #7BBDE8;
  --link: #0A4174; --pill-on: #0A4174; --pill-on-text: #FFFFFF;
  --shadow: 0 10px 26px rgba(10, 65, 116, 0.10);
  --good: #1E8A63; --warn: #A86A12; --bad: #C2453A;
  --field: #F4F9FC;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--bar-hi); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.vx-shell { max-width: 1400px; margin: 0 auto; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 22px; }

/* Header / navigation */
.vx-nav {
  display: flex; align-items: center; gap: 18px;
  background: var(--nav); color: var(--nav-text);
  border: 1px solid var(--border); border-radius: 22px;
  padding: 14px 20px; box-shadow: var(--shadow);
}
.vx-logo { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-right: 10px; color: inherit; text-decoration: none; flex: none; }
.vx-logo__word { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 26px; letter-spacing: 0.28em; line-height: 1; padding-left: 0.28em; }
.vx-logo__rule { width: 64px; height: 1px; background: var(--nav-muted); }
.vx-menu { position: relative; display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; min-width: 0; scrollbar-width: none; }
.vx-menu::-webkit-scrollbar { display: none; }
.vx-pill {
  flex: none; text-decoration: none; padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; border: 1px solid var(--border); color: var(--nav-text); white-space: nowrap;
}
.vx-pill:hover { border-color: var(--bar-hi); color: var(--nav-text); }
.vx-pill[aria-current="page"] { background: var(--pill-on); color: var(--pill-on-text); border-color: transparent; font-weight: 700; }

.vx-themes { display: flex; gap: 4px; background: var(--track); border-radius: 999px; padding: 4px; margin: 0; flex: none; }
.vx-themes button {
  width: 36px; height: 36px; border: 0; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: transparent; color: var(--nav-text);
}
.vx-themes button[aria-pressed="true"] { background: var(--pill-on); color: var(--pill-on-text); }

.vx-profile { position: relative; flex: none; }
.vx-profile > summary { list-style: none; cursor: pointer; }
.vx-profile > summary::-webkit-details-marker { display: none; }
.vx-avatar {
  width: 40px; height: 40px; border-radius: 999px; background: var(--accent2); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.vx-profile__menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; min-width: 230px;
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.vx-profile__name { font-weight: 800; }
.vx-profile__role { font-size: 13px; color: var(--muted); }
.vx-profile__menu a, .vx-profile__menu button {
  display: block; width: 100%; text-align: left; text-decoration: none; background: var(--track);
  border: 0; border-radius: 10px; padding: 9px 12px; font-weight: 600; color: var(--text); cursor: pointer;
}
.vx-profile__menu form { margin: 0; }

/* Page heading */
.vx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.vx-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--page-muted); }
.vx-title { margin: 6px 0 0; font-size: 30px; font-weight: 800; color: var(--page-text); line-height: 1.15; }

/* Cards */
.vx-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  padding: 20px 22px; box-shadow: var(--shadow);
}
.vx-card h2 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.vx-muted { color: var(--muted); }
.vx-soon { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.vx-soon ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.vx-badge {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: var(--track); color: var(--muted);
}

/* Login */
.vx-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.vx-login__card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.vx-login__brand { display: flex; justify-content: center; color: var(--page-text); }
.vx-login__brand .vx-logo__word { font-size: 34px; }
.vx-login__brand .vx-logo__rule { width: 84px; background: var(--bar); }
.vx-form { display: flex; flex-direction: column; gap: 16px; }
.vx-field { display: flex; flex-direction: column; gap: 6px; }
.vx-field label { font-size: 14px; font-weight: 700; }
.vx-field input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--field); font-size: 16px;
}
.vx-field input:focus { outline: 2px solid var(--bar-hi); outline-offset: 0; border-color: transparent; }
.vx-error { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.vx-button {
  border: 0; border-radius: 999px; padding: 12px 18px; cursor: pointer;
  background: var(--pill-on); color: var(--pill-on-text); font-weight: 800; font-size: 15px;
}
.vx-button:hover { filter: brightness(1.05); }

/* Phones and narrow windows */
@media (max-width: 1000px) {
  .vx-nav { flex-wrap: wrap; }
  .vx-menu { order: 3; flex-basis: 100%; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .vx-shell { padding: 12px 16px 32px; gap: 16px; }
  .vx-nav { padding: 12px 14px; gap: 12px; border-radius: 18px; }
  .vx-logo__word { font-size: 22px; }
  .vx-logo__rule { width: 52px; }
  .vx-menu { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
  .vx-themes { margin-left: auto; }
  .vx-themes button { width: 32px; height: 32px; }
  .vx-avatar { width: 36px; height: 36px; }
  .vx-title { font-size: 24px; }
  .vx-card { padding: 16px; border-radius: 18px; }
}

/* ---- UI-2: dashboard and projects ---- */
.vx-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.row-2 { grid-row: span 2; }
.vx-card { display: flex; flex-direction: column; gap: 14px; }
.vx-card h2 { margin: 0; }
.vx-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.vx-sub { font-size: 13px; color: var(--muted); }
.vx-strong { font-weight: 800; color: var(--text); }
.vx-big { font-size: 20px; font-weight: 800; }
.c-good { color: var(--good); } .c-warn { color: var(--warn); } .c-bad { color: var(--bad); } .c-none { color: var(--muted); }
.bg-good { background: var(--good); } .bg-warn { background: var(--warn); } .bg-bad { background: var(--bad); } .bg-none { background: var(--track); }
.vx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 99px; flex: none; }
.vx-link { font-size: 13px; font-weight: 700; color: var(--link); text-decoration: none; }
.vx-link:hover { text-decoration: underline; }

.vx-segment { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 5px; }
.vx-segment a { text-decoration: none; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text); white-space: nowrap; }
.vx-segment a[aria-current="true"] { background: var(--pill-on); color: var(--pill-on-text); }
.vx-segment--small { background: var(--track); border: 0; border-radius: 10px; padding: 3px; gap: 4px; }
.vx-segment--small a { padding: 6px 12px; border-radius: 8px; font-size: 13px; }

.vx-hero { background: var(--hero); color: #FFFFFF; border: 0; }
.vx-hero .vx-hero__muted { color: #BDD8E9; }
.vx-hero__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vx-hero__spend { font-size: 38px; font-weight: 800; line-height: 1.05; }
.vx-hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vx-hero__stat { background: rgba(189, 216, 233, 0.10); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.vx-hero__stat span:first-child { font-size: 12px; color: #BDD8E9; }
.vx-hero .up-good { color: #9FE3C4; } .vx-hero .up-bad { color: #FFB4AA; }
.vx-ring { position: relative; flex: none; }
.vx-ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; text-align: center; }

.vx-bars { display: flex; gap: 10px; align-items: stretch; height: 200px; }
.vx-bars__axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); padding-bottom: 2px; min-width: 34px; text-align: right; }
.vx-bars__plot { flex: 1 1 auto; display: flex; gap: 6px; align-items: flex-end; border-bottom: 1px solid var(--border); }
.vx-bars__col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.vx-bars__col span { font-size: 11px; font-weight: 700; white-space: nowrap; }
.vx-bars__bar { width: 100%; max-width: 26px; border-radius: 8px 8px 4px 4px; background: var(--bar); }
.vx-bars__bar.is-hi { background: var(--bar-hi); }
.vx-bars__days { display: flex; gap: 6px; padding-left: 44px; font-size: 11px; color: var(--muted); }
.vx-bars__days span { flex: 1 1 0; text-align: center; min-width: 0; }
.vx-bars__pair { display: flex; gap: 3px; align-items: flex-end; justify-content: center; width: 100%; height: 100%; }
.vx-bars__pair .vx-bars__bar { max-width: 14px; }

.vx-meter { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.vx-meter > div { height: 100%; border-radius: 99px; background: var(--accent2); }
.vx-meter--lg { height: 10px; }
.vx-source { display: flex; flex-direction: column; gap: 6px; }
.vx-source__top { display: flex; justify-content: space-between; font-size: 14px; gap: 8px; }
.vx-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; font-size: 13px; color: var(--muted); }

.vx-kpi-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 52px; gap: 10px; align-items: center; font-size: 14px; }
.vx-kpi-row > span:first-child { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-kpi-row > span:last-child { text-align: right; font-weight: 800; }

.vx-budget { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 22px; }
.vx-legend { display: flex; justify-content: space-between; font-size: 14px; gap: 10px; }
.vx-tiles { display: flex; gap: 10px; }
.vx-tile { flex: 1 1 0; background: var(--track); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.vx-tile span:first-child { font-size: 12px; color: var(--muted); }
.vx-tile span:last-child { font-size: 17px; font-weight: 800; }

.vx-split-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) 40px 64px; gap: 8px; align-items: center; font-size: 13px; }
.vx-split-row > span:nth-child(2) { font-weight: 600; }
.vx-split-row > span:nth-child(n+3) { text-align: right; }
.vx-split-row > span:last-child { font-weight: 800; }

.vx-status-row { display: grid; grid-template-columns: 14px 86px minmax(0, 1fr) 70px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; color: inherit; text-decoration: none; }
.vx-status-row:hover { background: var(--track); }
.vx-status-row b { font-size: 14px; }
.vx-status-row .vx-note { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vx-alerts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.vx-alert { border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--inset); }
.vx-alert__level { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.vx-alert__text { font-size: 14px; font-weight: 700; }
.vx-empty { color: var(--muted); font-size: 14px; margin: 0; }

/* Projects */
.vx-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.vx-search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 0 16px; min-width: 240px; }
.vx-search input { border: 0; background: transparent; padding: 11px 0; outline: none; width: 100%; font-size: 14px; }
.vx-filter a { display: inline-flex; align-items: center; gap: 6px; }
.vx-filter small { font-weight: 600; opacity: 0.7; }
.vx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.vx-pcard { gap: 16px; }
.vx-pcard__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.vx-pcard__name { display: flex; align-items: center; gap: 10px; }
.vx-pcard__name h2 { font-size: 19px; }
.vx-pcard__name a { color: inherit; text-decoration: none; }
.vx-pcard__name a:hover { text-decoration: underline; }
.vx-team { display: flex; }
.vx-team span { width: 30px; height: 30px; border-radius: 999px; background: var(--accent2); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; border: 2px solid var(--card); margin-left: -8px; }
.vx-team span:first-child { margin-left: 0; }
.vx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vx-stats > div { background: var(--inset); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.vx-stats > div span:first-child { font-size: 12px; color: var(--muted); }
.vx-stats > div span:last-child { font-size: 17px; font-weight: 800; }
.vx-progress { display: flex; flex-direction: column; gap: 6px; }
.vx-progress__top { display: flex; justify-content: space-between; font-size: 13px; }
.vx-pcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; }
.vx-pcard__foot span { overflow: hidden; text-overflow: ellipsis; }

.vx-table-wrap { overflow-x: auto; }
.vx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vx-table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.vx-table td { padding: 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.vx-table tr:last-child td { border-bottom: 0; }
.vx-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--track); color: var(--muted); }
.vx-back { font-size: 14px; font-weight: 700; color: var(--page-muted); text-decoration: none; }
.vx-back:hover { color: var(--page-text); }

@media (max-width: 1000px) {
  .vx-grid { grid-template-columns: minmax(0, 1fr); }
  .vx-grid > * { grid-column: auto !important; grid-row: auto !important; }
}
@media (max-width: 600px) {
  .vx-hero__spend { font-size: 30px; }
  .vx-segment a { padding: 8px 12px; }
  .vx-bars { height: 160px; }
  .vx-bars__col span { display: none; }
  .vx-search { min-width: 0; flex: 1 1 100%; }
  .vx-cards { grid-template-columns: minmax(0, 1fr); }
}

/* ---- UI-3: metrics ---- */
.vx-mtiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.vx-mtile { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.vx-mtile__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.vx-mtile__value { font-size: 22px; font-weight: 800; }
.vx-mtile__delta { font-size: 12px; font-weight: 700; }
.vx-mtile__delta span { font-weight: 500; color: var(--muted); }
.vx-projects-filter { flex-wrap: wrap; align-self: flex-start; }
.vx-line-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding-left: 52px; }
.vx-line { display: flex; gap: 10px; }
.vx-line .vx-bars__axis { height: 220px; min-width: 42px; }
.vx-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.vx-table th[scope="row"] { font-weight: 700; text-align: left; padding: 10px; border-bottom: 1px solid var(--border); }
.vx-table td.num, .vx-table th.num { text-align: right; }
@media (max-width: 1100px) { .vx-mtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .vx-mtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vx-mtile__value { font-size: 18px; }
  .vx-line .vx-bars__axis { height: 160px; }
}

/* ---- UI-4: tasks ---- */
.vx-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.vx-col { background: var(--inset); border: 1px solid var(--border); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.vx-col__head { display: flex; justify-content: space-between; align-items: center; }
.vx-col__head h2 { margin: 0; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--text); }
.vx-count { font-size: 13px; font-weight: 800; background: var(--track); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.vx-task { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.vx-task.is-late { border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.vx-task__top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.vx-task h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.vx-task h3 a { color: var(--text); text-decoration: none; }
.vx-task h3 a:hover { text-decoration: underline; }
.vx-task__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.vx-person { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.vx-person span { width: 24px; height: 24px; border-radius: 999px; background: var(--accent2); color: #FFFFFF; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.vx-late { color: var(--bad); font-weight: 800; }
.vx-move { margin: 0; }
.vx-move button { width: 100%; border: 1px solid var(--border); background: var(--track); color: var(--text); border-radius: 10px; padding: 8px; font-weight: 700; font-size: 13px; cursor: pointer; }
.vx-move button:hover { border-color: var(--bar-hi); }
.vx-stat-line { display: flex; gap: 16px; font-size: 14px; color: var(--page-muted); flex-wrap: wrap; }
.vx-stat-line b { color: var(--page-text); font-size: 18px; }
.vx-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.vx-select { background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: 14px; }
.vx-form-card { max-width: 720px; }
.vx-field select, .vx-field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--field); font-size: 15px; }
.vx-field textarea { resize: vertical; }
.vx-field .errorlist { margin: 0; padding: 0; list-style: none; color: var(--bad); font-size: 13px; font-weight: 600; }
.vx-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vx-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.vx-button--ghost { background: var(--track); color: var(--text); text-decoration: none; display: inline-block; }
.vx-button--danger { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.vx-desc { white-space: pre-wrap; margin: 0; line-height: 1.55; }
@media (max-width: 900px) { .vx-board { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .vx-row { grid-template-columns: minmax(0, 1fr); } }
.vx-seg-btn { border: 0; background: transparent; cursor: pointer; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text); }
.vx-seg-btn[aria-current="true"] { background: var(--pill-on); color: var(--pill-on-text); }
.vx-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 14px; }
.vx-dl dt { color: var(--muted); }
.vx-dl dd { margin: 0; font-weight: 600; }

/* ---- UI-5: points ---- */
.vx-rank { display: grid; grid-template-columns: 26px 36px minmax(0, 1.4fr) minmax(0, 1fr) 52px 44px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; color: inherit; text-decoration: none; }
.vx-rank:hover { background: var(--track); }
.vx-rank.is-on { background: var(--track); border-color: var(--bar-hi); }
.vx-rank__place { font-weight: 800; color: var(--muted); text-align: center; }
.vx-rank__place.is-gold { color: var(--warn); }
.vx-rank__who { display: flex; flex-direction: column; min-width: 0; }
.vx-rank__who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-rank__points { text-align: right; font-size: 17px; }
.vx-rank__delta { text-align: right; font-size: 13px; font-weight: 800; }
.vx-history { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; padding: 6px 0; border-top: 1px solid var(--border); }
.vx-history:first-of-type { border-top: 0; }
.vx-history--hero { border-color: rgba(189, 216, 233, 0.15); font-size: 13px; color: #EAF3FA; }
@media (max-width: 600px) {
  .vx-rank { grid-template-columns: 22px 32px minmax(0, 1fr) 44px 38px; gap: 8px; padding: 8px; }
  .vx-rank__bar { display: none; }
}

/* ---- UI-6: knowledge ---- */
.vx-kb-item { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; color: inherit; text-decoration: none; }
.vx-kb-item:hover { border-color: var(--bar-hi); }
.vx-kb-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--track); color: var(--bar-hi); display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 11px; font-weight: 800; }
.vx-kb-main { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.vx-kb-main b { font-size: 15px; }
.vx-kb-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vx-step { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: inherit; text-decoration: none; font-size: 14px; }
.vx-step__mark { width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: none; color: var(--muted); }
.vx-step.is-done .vx-step__mark { background: var(--good); border-color: var(--good); color: #FFFFFF; }
.vx-step.is-done span:last-child { color: var(--muted); }
.vx-video { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #000; }
.vx-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vx-prose { line-height: 1.65; font-size: 15px; }
.vx-prose p { margin: 0 0 12px; }
.vx-kb-image { max-width: 100%; border-radius: 14px; border: 1px solid var(--border); display: block; }
.vx-file { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; color: inherit; text-decoration: none; background: var(--inset); }
.vx-file:hover { border-color: var(--bar-hi); }
.vx-question { border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.vx-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vx-option { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--track); cursor: pointer; font-size: 14px; }
.vx-field input[type="file"] { padding: 10px; border: 1px dashed var(--border); border-radius: 12px; background: var(--field); }
.vx-field ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
@media (max-width: 600px) {
  .vx-row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vx-kb-item { flex-wrap: wrap; }
  .vx-kb-tags { justify-content: flex-start; }
}

/* ---- 4th theme "Tun" (owner's sample): near-black page, glass cards, blue glow, left icon sidebar ---- */
[data-theme="night"] {
  --page: #07090C; --page-text: #EEF3F8; --page-muted: #8D9AA9;
  --card: rgba(255, 255, 255, 0.045); --inset: rgba(255, 255, 255, 0.035); --hero: #12202D;
  --nav: rgba(255, 255, 255, 0.04); --nav-text: #DCE5EE; --nav-muted: #3A4A5A;
  --border: rgba(255, 255, 255, 0.08); --text: #EEF3F8; --muted: #8D9AA9;
  --track: rgba(255, 255, 255, 0.07); --accent2: #4E8EA2; --bar: #2C4A63; --bar-hi: #7BBDE8;
  --link: #8CCBF0; --pill-on: rgba(123, 189, 232, 0.16); --pill-on-text: #EAF6FF;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  --good: #5BD3A3; --warn: #F2C266; --bad: #F2857A;
  --field: rgba(255, 255, 255, 0.05);
  --glow: 0 0 18px rgba(123, 189, 232, 0.35);
  color-scheme: dark;
}
[data-theme="night"] body {
  background:
    radial-gradient(900px 600px at 0% -10%, rgba(78, 142, 162, 0.16), transparent 60%),
    radial-gradient(800px 600px at 100% 110%, rgba(73, 118, 159, 0.14), transparent 60%),
    #07090C;
  background-attachment: fixed;
}

/* Glass cards */
[data-theme="night"] .vx-card,
[data-theme="night"] .vx-mtile,
[data-theme="night"] .vx-col,
[data-theme="night"] .vx-task {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) 55%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
[data-theme="night"] .vx-hero {
  background:
    radial-gradient(420px 260px at 85% 0%, rgba(123, 189, 232, 0.22), transparent 70%),
    linear-gradient(160deg, #1A2B3B, #0D1620 70%);
  border: 1px solid rgba(123, 189, 232, 0.18);
}
[data-theme="night"] .vx-segment { background: rgba(255, 255, 255, 0.04); }
[data-theme="night"] .vx-segment a[aria-current="true"] { box-shadow: inset 0 0 0 1px rgba(123, 189, 232, 0.35); }
[data-theme="night"] svg path[stroke="var(--bar-hi)"],
[data-theme="night"] .vx-bars__bar.is-hi { filter: drop-shadow(0 0 6px rgba(123, 189, 232, 0.55)); }
[data-theme="night"] .vx-button { background: linear-gradient(135deg, #7BBDE8, #4E8EA2); color: #06121C; box-shadow: var(--glow); }

/* Left icon sidebar */
.vx-ico { display: none; }
[data-theme="night"] .vx-shell { max-width: none; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 24px; align-items: start; padding: 20px 24px 40px 20px; }
[data-theme="night"] .vx-nav {
  position: sticky; top: 20px; height: calc(100vh - 40px); flex-direction: column; flex-wrap: nowrap; justify-content: flex-start;
  gap: 18px; padding: 18px 10px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(18px);
}
[data-theme="night"] .vx-logo { padding: 0; }
[data-theme="night"] .vx-logo__word { font-size: 0; letter-spacing: 0; padding: 0; }
[data-theme="night"] .vx-logo__word::before { content: "V"; font-size: 30px; color: #BDD8E9; text-shadow: var(--glow); }
[data-theme="night"] .vx-logo__word::after { content: "VEXTUS"; display: block; font-size: 10px; letter-spacing: 0.24em; padding-left: 0.24em; margin-top: 2px; color: var(--muted); font-family: Manrope, sans-serif; font-weight: 700; }
[data-theme="night"] .vx-logo__rule { display: none; }
[data-theme="night"] .vx-menu { flex-direction: column; flex-wrap: nowrap; gap: 6px; flex: 1 1 auto; overflow: visible; align-items: stretch; margin: 0; padding: 0; order: 0; flex-basis: auto; }
[data-theme="night"] .vx-pill {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 0; border-radius: 14px;
  font-size: 10.5px; font-weight: 700; color: var(--muted); position: relative; white-space: normal; text-align: center;
}
[data-theme="night"] .vx-pill:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
[data-theme="night"] .vx-pill[aria-current="page"] { background: rgba(123, 189, 232, 0.12); color: #EAF6FF; }
[data-theme="night"] .vx-pill[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: #7BBDE8; box-shadow: var(--glow); }
[data-theme="night"] .vx-ico { display: block; width: 22px; height: 22px; }
[data-theme="night"] .vx-themes { flex-direction: column; margin: 0; }
[data-theme="night"] .vx-nav { z-index: 20; }  /* above the glass cards, so the profile menu is not hidden */
[data-theme="night"] .vx-profile__menu { left: calc(100% + 14px); right: auto; top: auto; bottom: 0; background: #10161D; }

@media (max-width: 760px) {
  [data-theme="night"] .vx-shell { display: flex; padding: 12px 14px 96px; }
  /* backdrop-filter would make the fixed bottom bar stick to the header instead of the screen */
  [data-theme="night"] .vx-nav { position: static; width: 100%; height: auto; flex-direction: row; flex-wrap: nowrap; padding: 10px 14px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  [data-theme="night"] .vx-logo__word::after { display: none; }
  [data-theme="night"] .vx-themes { flex-direction: row; margin-left: auto; }
  [data-theme="night"] .vx-menu {
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30; flex-direction: row; justify-content: space-around;
    padding: 6px; margin: 0; overflow: visible; order: 0; flex-basis: auto;
    border-radius: 20px; background: rgba(12, 16, 22, 0.9); border: 1px solid var(--border); backdrop-filter: blur(18px);
  }
  [data-theme="night"] .vx-pill { flex: 1 1 0; padding: 8px 2px; }
  [data-theme="night"] .vx-pill[aria-current="page"]::before { left: 25%; right: 25%; top: -6px; bottom: auto; width: auto; height: 3px; }
  [data-theme="night"] .vx-profile__menu { left: auto; right: 0; top: calc(100% + 10px); bottom: auto; }
}

/* ---- TZ-03 K-1: leads ---- */
.vx-leads-table td { vertical-align: top; }
.vx-lead-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 520px; }
.vx-select--sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.vx-input-sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--field); width: 120px; }
.vx-btn-sm { border: 0; border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 13px; cursor: pointer; background: var(--pill-on); color: var(--pill-on-text); }
.vx-lf-reason, .vx-lf-amount { display: none; }
.vx-lead-form:has(select[name="status"] option[value="unqualified"]:checked) .vx-lf-reason { display: inline-block; }
.vx-lead-form:has(select[name="status"] option[value="sold"]:checked) .vx-lf-amount { display: inline-block; }
.vx-lead-error { font-size: 12px; font-weight: 700; margin-top: 4px; }
.vx-lead-history { margin-top: 6px; font-size: 12px; }
.vx-lead-history summary { cursor: pointer; }
.vx-lead-history ul { margin: 6px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 3px; white-space: normal; }
.vx-leads-table td.vx-lead-status { white-space: normal; min-width: 280px; }

/* ---- TZ-03 K-2: client cabinet ---- */
.cab-preview { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-size: 14px; font-weight: 700; }
.cab-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cab-pill { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--inset); border: 1px solid var(--border); }
.cab-pill b { display: block; font-size: 15px; }
.cab-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cab-lead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 0; border-top: 1px solid var(--border); align-items: center; }
.cab-lead:first-of-type { border-top: 0; }
.cab-lead small { color: var(--muted); }
@media (max-width: 760px) { .cab-status { grid-template-columns: minmax(0, 1fr); } .cab-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Four theme buttons + avatar must fit one row on small phones */
@media (max-width: 420px) {
  .vx-nav { gap: 8px; }
  .vx-logo__word { font-size: 19px; letter-spacing: 0.22em; }
  .vx-themes { gap: 2px; padding: 3px; }
  .vx-themes button { width: 30px; height: 30px; }
  .vx-themes button svg { width: 16px; height: 16px; }
  .vx-avatar { width: 32px; height: 32px; font-size: 12px; }
}

/* ---- TZ-04 M-1: finance ---- */
.vx-messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.vx-message { padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; background: var(--track); }
.vx-message--success { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.vx-message--error { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.vx-checks ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.vx-checks label { display: flex; gap: 8px; align-items: center; font-weight: 500; }

/* TZ-05 Q-1: survey card in the client cabinet */
.vx-survey__scores { display: flex; flex-wrap: wrap; gap: 8px; }
.vx-survey__score { min-width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--track); color: inherit; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.vx-survey__score:hover:not(:disabled) { background: var(--pill-on); color: var(--pill-on-text); border-color: var(--pill-on); }
.vx-survey__score:disabled { opacity: .55; cursor: default; }
.vx-survey textarea { width: 100%; border-radius: 12px; border: 1px solid var(--border); background: var(--track); color: inherit; font: inherit; padding: 10px 12px; resize: vertical; }
.vx-spark { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.vx-spark span { width: 8px; border-radius: 3px 3px 1px 1px; background: var(--track); min-height: 3px; }
.vx-spark span.bg-good { background: var(--good); }
.vx-spark span.bg-warn { background: var(--warn); }
.vx-spark span.bg-bad { background: var(--bad); }
