:root {
  font-synthesis: none;
  --navy: #07182e;
  --deep: #091f3e;
  --gold: #d99c30;
  --gold2: #f3cc7c;
  --blue: #2877ef;
  --green: #1ca779;
  --red: #db5260;
  --orange: #dd9a31;
  --text: #122c4b;
  --muted: #74869e;
  --paper: #eef3fa;
  --card: #fff;
  --line: #dbe4ef;
  --soft: #f5f8fd;
  --shadow: 0 10px 30px rgba(18, 53, 96, 0.075), 0 2px 5px rgba(16, 43, 80, 0.03);
  --chart: #153c75;
  --card-navy: #092245;
  --nav-width: 238px;
  --radius: 17px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 14px;
  min-height: 100vh;
  transition:
    background 0.25s,
    color 0.25s;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
a {
  color: inherit;
}
svg {
  flex-shrink: 0;
}
body.dark {
  --paper: #071429;
  --card: #112441;
  --line: #2b4361;
  --soft: #0d1d35;
  --text: #eaf2ff;
  --muted: #9caec6;
  --shadow: 0 6px 25px rgba(0, 0, 0, 0.17);
  --chart: #123660;
  background: var(--paper);
  color: var(--text);
}
.app {
  min-height: 100vh;
}
.layout {
  display: flex;
  min-height: 100vh;
  direction: ltr;
}
.sidebar {
  position: sticky;
  top: 0;
  width: var(--nav-width);
  flex-shrink: 0;
  height: 100vh;
  overflow: auto;
  background: linear-gradient(175deg, #0a2344 0%, #071a32 45%, #07152c 100%);
  color: #d8e5fa;
  padding: 22px 13px 16px;
  z-index: 24;
  scrollbar-width: thin;
  scrollbar-color: #1e4267 transparent;
  box-shadow: 4px 0 30px rgba(2, 17, 41, 0.16);
}
.side-logo {
  height: 142px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #284462;
  margin: 0 6px 15px;
}
.side-logo img {
  max-width: 160px;
  height: 127px;
  object-fit: contain;
}
.side-group {
  font-size: 10px;
  text-transform: uppercase;
  color: #7793b5;
  letter-spacing: 2px;
  margin: 18px 16px 8px;
  text-align: start;
}
.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #d4e3f4;
  padding: 11px 12px;
  width: 100%;
  display: flex;
  gap: 11px;
  align-items: center;
  justify-content: flex-start;
  text-align: start;
  border-radius: 10px;
  margin: 2px 0;
  font-weight: 600;
  min-height: 41px;
  transition: 0.15s;
}
.nav-btn:hover {
  background: #133454;
  color: #fff;
}
.nav-btn.selected {
  background: linear-gradient(110deg, #dfaa49, #ffdf91);
  color: #14213a;
  box-shadow: 0 3px 12px #d6a64a44;
}
.nav-btn .nav-ic {
  display: flex;
}
.nav-btn svg {
  width: 18px;
  height: 18px;
}
.nav-label {
  flex: 1;
}
.side-foot {
  margin: 17px 4px 0;
  padding: 13px;
  border-top: 1px solid #294461;
  text-align: start;
}
.small-muted {
  color: #819ab4;
  font-size: 11px;
}
.stage {
  width: calc(100% - var(--nav-width));
  min-width: 0;
}
.topbar {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 26px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 11px rgba(10, 37, 76, 0.03);
}
.topbar .search-wrap {
  max-width: 570px;
  flex: 1;
  position: relative;
}
.searchbox {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 10px 14px;
  color: var(--muted);
}
.searchbox input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  flex: 1;
  color: var(--text);
  font-size: 12px;
}
.search-results {
  position: absolute;
  top: 51px;
  inset-inline: 0;
  background: var(--card);
  z-index: 31;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 15px;
  padding: 8px;
}
.search-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
}
.search-option:hover {
  background: var(--soft);
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(125deg, #c9dcef, #869fbf);
  color: #112544;
  font-weight: 800;
  border: 2px solid var(--card);
  box-shadow: 0 2px 6px #04172c18;
  flex-shrink: 0;
}
.avatar.gold {
  background: linear-gradient(135deg, #fce7b4, #dba44b);
}
.avatar.blue {
  background: linear-gradient(135deg, #d5edff, #559cea);
}
.avatar.rose {
  background: linear-gradient(135deg, #ffe0e0, #e5a3ac);
}
.profile-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 155px;
}
.profile-caption {
  font-size: 10px;
  color: var(--muted);
}
.icon-btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  width: 37px;
  height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  position: relative;
}
.icon-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.dot {
  position: absolute;
  right: -3px;
  top: -4px;
  background: #e85856;
  color: white;
  font-size: 9px;
  min-width: 16px;
  height: 16px;
  border-radius: 100px;
  display: grid;
  place-items: center;
}
.status-pill {
  background: var(--soft);
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.online {
  color: #06ba80;
}
.main {
  padding: 18px 24px 40px;
  max-width: 1920px;
  margin: auto;
}
.hero {
  min-height: 132px;
  background: linear-gradient(100deg, #06152a 5%, #103764 54%, #071a30 100%);
  border-radius: 19px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 24px rgba(3, 24, 49, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 34px;
  color: white;
  margin-bottom: 14px;
  border: 1px solid #375175;
}
.hero:before {
  content: '';
  position: absolute;
  inset: -165px auto auto -110px;
  width: 600px;
  height: 340px;
  border: 2px solid #ca9a4b5b;
  border-radius: 55%;
  transform: rotate(-17deg);
}
.hero:after {
  content: '';
  position: absolute;
  width: 430px;
  height: 100%;
  left: 0;
  top: 0;
  background: radial-gradient(ellipse at 15% 40%, #d9a44828, transparent 75%);
}
.hero h1 {
  font-size: 26px;
  margin: 0 0 9px;
  font-weight: 800;
}
.hero p {
  color: #b8cee8;
  margin: 0;
  font-size: 12px;
  max-width: 670px;
  line-height: 1.8;
}
.hero .eyebrow {
  letter-spacing: 1px;
  color: #ecca89;
  font-size: 11px;
  margin-bottom: 6px;
}
.hero-logo {
  height: 92px;
  width: 98px;
  object-fit: contain;
  opacity: 0.83;
  z-index: 2;
  filter: drop-shadow(0 2px 12px #b09b6d22);
}
.page-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 13px 0;
}
.pills {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  padding: 10px 13px;
  font-weight: 650;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  transition: 0.17s;
}
.btn:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.btn.primary {
  background: linear-gradient(105deg, #dfa640, #f6d790);
  color: #182842;
  border: 1px solid #d9a846;
  box-shadow: 0 4px 14px #b97d2540;
}
.btn.darkbtn {
  background: linear-gradient(120deg, #154d94, #082a56);
  color: white;
  border-color: #234f8b;
}
.btn.tiny {
  padding: 7px 11px;
  min-height: 30px;
  font-size: 11px;
}
.btn.active {
  background: var(--deep);
  color: #fff;
  border-color: #3564a0;
}
body.dark .btn.active {
  background: #22548c;
}
.btn.ghost {
  background: transparent;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card.pad {
  padding: 17px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 13px;
}
.kpi {
  padding: 17px 16px;
  min-height: 115px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
}
.kpi .num {
  font-size: 25px;
  font-weight: 830;
  letter-spacing: -0.8px;
  margin: 7px 0 5px;
  text-align: start;
}
.kpi .k-label {
  font-size: 12px;
  font-weight: 730;
}
.kpi .delta {
  font-size: 10px;
  font-weight: 750;
  color: #0e9e68;
}
.kpi .delta.down {
  color: #db5063;
}
.kpi-icon {
  border-radius: 13px;
  background: #f7e8c8;
  color: #b98521;
  height: 43px;
  width: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.dark .kpi-icon {
  background: #423823;
  color: #f4c56a;
}
.kpi-icon svg {
  width: 22px;
  height: 22px;
}
.section-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 13px;
}
.section-grid > .span-3 {
  grid-column: span 3;
}
.section-grid > .span-4 {
  grid-column: span 4;
}
.section-grid > .span-5 {
  grid-column: span 5;
}
.section-grid > .span-6 {
  grid-column: span 6;
}
.section-grid > .span-7 {
  grid-column: span 7;
}
.section-grid > .span-8 {
  grid-column: span 8;
}
.section-grid > .span-9 {
  grid-column: span 9;
}
.section-grid > .span-12 {
  grid-column: span 12;
}
.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 14px;
}
.section-hd h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.section-hd small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}
.section-hd .aux {
  display: flex;
  gap: 6px;
}
.sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
  line-height: 1.5;
}
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
}
.legend b {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-inline-end: 5px;
}
.chartsvg {
  width: 100%;
  height: auto;
  max-height: 238px;
  display: block;
}
.bar-mini {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 58px;
}
.bar-mini div {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #efd18a, #dba238);
  min-height: 4px;
}
.donut {
  width: 152px;
  height: 152px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  background: conic-gradient(#287df0 0 42%, #f0b541 42% 72%, #20ab7a 72% 89%, #ed6671 89% 100%);
}
.donut:before {
  content: '';
  height: 104px;
  width: 104px;
  background: var(--card);
  border-radius: 50%;
  position: absolute;
}
.donut > div {
  text-align: center;
  z-index: 2;
}
.donut strong {
  font-size: 24px;
  display: block;
}
.donut span {
  font-size: 10px;
  color: var(--muted);
}
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: space-between;
}
.legend-row {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  font-size: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.legend-row:last-child {
  border: none;
}
.circle {
  display: inline-block;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  margin-inline-end: 6px;
}
.table-wrap {
  overflow: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: start;
}
.tbl thead {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
}
.tbl th,
.tbl td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line);
}
.tbl td {
  font-size: 11px;
}
.tbl tbody tr:hover {
  background: var(--soft);
}
.tbl tbody tr:last-child td {
  border-bottom: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 50px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}
.badge.green {
  background: #e1f7ee;
  color: #07865d;
}
.badge.blue {
  background: #e3edff;
  color: #1761c3;
}
.badge.gold {
  background: #fff0cf;
  color: #a36b0a;
}
.badge.red {
  background: #ffeaed;
  color: #bb3549;
}
.badge.gray {
  background: #edf0f6;
  color: #667a93;
}
body.dark .badge.green {
  background: #143d35;
  color: #6fe0a6;
}
body.dark .badge.blue {
  background: #203e68;
  color: #7caff8;
}
body.dark .badge.gold {
  background: #4b3925;
  color: #f4cb6c;
}
body.dark .badge.red {
  background: #572b39;
  color: #f99ca8;
}
body.dark .badge.gray {
  background: #304059;
  color: #c4d1e2;
}
.progress {
  height: 7px;
  border-radius: 12px;
  background: var(--line);
  overflow: hidden;
  min-width: 85px;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2a7bea, #74b0fa);
  border-radius: inherit;
}
.progress.green > span {
  background: linear-gradient(90deg, #15a77c, #55d1aa);
}
.progress.gold > span {
  background: linear-gradient(90deg, #bd8626, #f1c568);
}
.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.metric-item:last-child {
  border: 0;
}
.metric-item .dim {
  color: var(--muted);
}
.stat-accent {
  font-size: 28px;
  font-weight: 850;
}
.quad {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.mini-tile {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
}
.mini-tile strong {
  display: block;
  font-size: 21px;
  margin: 5px 0;
}
.mini-tile small {
  font-size: 10px;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  width: max-content;
  max-width: 100%;
  flex-wrap: wrap;
}
.tab {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 9px 17px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}
.tab.on {
  background: linear-gradient(100deg, #dba144, #f4d089);
  color: #152543;
  box-shadow: 0 3px 8px #c6a46344;
}
body.dark .tab.on {
  color: #091f3b;
}
.flex {
  display: flex;
  gap: 12px;
  align-items: center;
}
.space-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.title-line {
  font-size: 19px;
  font-weight: 850;
  margin: 0 0 11px;
}
.muted {
  color: var(--muted);
}
.positive {
  color: #14a275;
}
.negative {
  color: #e65861;
}
.label-top {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}
.extra-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.actions-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
.actions-strip > .btn {
  flex: 1;
  min-width: 120px;
}
.row-click {
  cursor: pointer;
}
.row-click:hover {
  background: var(--soft);
}
.tree-panel {
  overflow: auto;
  padding: 15px 20px 23px;
  background: linear-gradient(160deg, var(--card), var(--soft));
  min-height: 425px;
}
.tree-root {
  width: 255px;
  margin: 5px auto 0;
  position: relative;
}
.tree-root:after {
  content: '';
  width: 2px;
  height: 34px;
  position: absolute;
  bottom: -34px;
  left: 50%;
  background: #daa342;
}
.tree-level {
  display: flex;
  justify-content: space-around;
  gap: 24px;
  min-width: 770px;
  position: relative;
  margin: 32px auto 0;
  width: max-content;
}
.tree-level:before {
  content: '';
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #dea641;
}
.tree-node {
  width: 220px;
  border: 1px solid #bda05f;
  border-radius: 14px;
  padding: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  cursor: pointer;
}
.tree-level > .tree-node:before {
  content: '';
  position: absolute;
  top: -32px;
  left: 50%;
  height: 32px;
  width: 2px;
  background: #dca43c;
}
.tree-node .avatar {
  margin: -32px auto 5px;
  width: 51px;
  height: 51px;
  border: 3px solid #d6a13a;
}
.tree-node .node-title {
  font-weight: 820;
  font-size: 13px;
}
.tree-node .node-role {
  color: #bc8a32;
  font-size: 10px;
}
.tree-node .node-metrics {
  display: flex;
  gap: 10px;
  justify-content: center;
  font-size: 11px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.tree-node.featured {
  background: linear-gradient(130deg, #0d3263, #0a1d3d);
  color: white;
  border: 2px solid #e4b04f;
}
.tree-node.featured .node-metrics {
  border-color: #436088;
}
.tree-node.featured .node-role {
  color: #f5cf7e;
}
.tree-small-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 8px;
}
.tree-leaf {
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  text-align: center;
  min-width: 108px;
}
.trophy-stage {
  background: linear-gradient(145deg, #06182e, #10345e);
  border: 1px solid #355276;
  color: #fff;
  min-height: 225px;
  border-radius: 16px;
  position: relative;
  padding: 18px;
  overflow: hidden;
}
.trophy-stage:before {
  content: '';
  position: absolute;
  width: 520px;
  height: 300px;
  background: radial-gradient(ellipse, #dca74427, transparent 67%);
  top: -120px;
  right: 22%;
}
.podium {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 18px;
  height: 186px;
  position: relative;
}
.winner {
  text-align: center;
  width: 160px;
  position: relative;
}
.winner .avatar {
  width: 57px;
  height: 57px;
  margin: auto;
  border: 3px solid #e9bd66;
}
.winner strong {
  display: block;
  font-size: 13px;
  margin: 7px 0 3px;
}
.winner small {
  color: #e4c787;
}
.winner .base {
  background: linear-gradient(120deg, #b9cbe3, #507aac);
  border-radius: 9px 9px 0 0;
  margin-top: 8px;
  padding: 10px 0;
  color: #fff;
  font-weight: 900;
  font-size: 26px;
}
.winner.first .base {
  background: linear-gradient(120deg, #cd9539, #ffdf8d);
  height: 76px;
  color: #39230b;
}
.winner.second .base {
  height: 52px;
}
.winner.third .base {
  height: 40px;
  background: linear-gradient(130deg, #bd855e, #f0b891);
}
.trophy-emblem {
  font-size: 42px;
  filter: drop-shadow(0 0 15px #ffc6538b);
}
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  overflow-x: auto;
}
.kanban-col {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px;
  min-height: 350px;
}
.kanban-hd {
  display: flex;
  justify-content: space-between;
  font-weight: 750;
  border-bottom: 3px solid var(--blue);
  padding: 8px 5px 13px;
}
.task-card {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  margin: 9px 0;
  box-shadow: 0 3px 8px #0925410a;
  font-size: 11px;
}
.task-card b {
  display: block;
  margin-bottom: 7px;
}
.task-card .sub {
  margin: 4px 0 9px;
}
.task-card .cardfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}
.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.agent {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.agent .avatar {
  width: 58px;
  height: 58px;
  font-size: 20px;
}
.agent b {
  margin: 8px 0;
}
.agent .sub {
  margin: 4px 0;
}
.agent .agent-metrics {
  width: 100%;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 12px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}
.step-box {
  padding: 15px 10px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  text-align: center;
}
.step-box strong {
  display: block;
  font-size: 21px;
  margin: 9px 0;
}
.step-box small {
  font-size: 11px;
  color: var(--muted);
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.settings-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
}
.settings-card strong {
  display: block;
  margin: 9px 0;
}
.toggle {
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 10px;
  background: var(--soft);
}
.modal-cover {
  position: fixed;
  inset: 0;
  background: #031426aa;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--card);
  color: var(--text);
  border-radius: 20px;
  width: min(540px, 100%);
  border: 1px solid var(--line);
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 25px 60px #01091855;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-body {
  padding: 22px;
}
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-weight: 750;
  font-size: 12px;
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #cb9b45;
}
.drawer-cover {
  position: fixed;
  inset: 0;
  background: #03162987;
  z-index: 75;
}
.drawer {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  height: 100%;
  overflow: auto;
  width: min(470px, 95vw);
  background: var(--card);
  box-shadow: -20px 0 40px #0003;
  padding: 24px;
}
.drawer hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 17px 0;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 110;
  background: #102a4b;
  color: white;
  box-shadow: 0 12px 30px #0005;
  padding: 14px 19px;
  border-radius: 12px;
  border: 1px solid #436488;
  max-width: 390px;
  font-size: 12px;
}
.mobile-showcase {
  display: flex;
  align-items: start;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}
.phone {
  background: #081626;
  padding: 9px;
  width: 308px;
  min-height: 550px;
  border: 4px solid #b19a73;
  border-radius: 37px;
  box-shadow: 0 16px 40px #03132330;
  flex-shrink: 0;
}
.phone-screen {
  position: relative;
  border-radius: 27px;
  background: var(--soft);
  color: var(--text);
  min-height: 528px;
  max-height: 560px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone-head {
  background: linear-gradient(130deg, #081d39, #173d6e);
  color: #fff;
  padding: 15px 16px 16px;
  text-align: center;
}
.phone-head .phone-notch {
  background: #020b15;
  border-radius: 15px;
  width: 89px;
  height: 17px;
  margin: -7px auto 10px;
}
.phone-content {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
}
.phone-nav {
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 3px;
  justify-content: space-around;
  padding: 7px 5px;
}
.phone-nav button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding: 4px;
}
.phone-nav button.is-on {
  color: #c78c28;
}
.phone-nav svg {
  height: 17px;
  width: 17px;
}
.phone-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 12px;
  margin-bottom: 9px;
}
.phone-card strong {
  font-size: 12px;
}
.phone-card small {
  color: var(--muted);
  font-size: 10px;
}
.phone-kpi {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.phone-kpi .phone-card {
  margin-bottom: 0;
  padding: 12px 8px;
}
.phone-kpi b {
  display: block;
  font-size: 20px;
  margin: 6px 0;
}
.phone-card button {
  font-size: 10px;
  min-height: 30px;
  padding: 7px;
}
.phone-show-aside {
  max-width: 380px;
}
.phone-show-aside .card {
  margin: 10px 0;
}
.notif-list {
  display: grid;
  gap: 9px;
}
.notif {
  border: 1px solid var(--line);
  padding: 13px;
  border-radius: 11px;
  background: var(--soft);
  font-size: 12px;
}
.notif small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.emptybox {
  text-align: center;
  padding: 29px 15px;
  color: var(--muted);
}
.footnote {
  margin: 22px 0 8px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}
.skeleton {
  height: 10px;
  background: linear-gradient(90deg, var(--line), var(--soft), var(--line));
  border-radius: 30px;
}
.float-help {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(100deg, #dfa348, #f5d68d);
  border: 1px solid #d99e39;
  border-radius: 50%;
  width: 51px;
  height: 51px;
  display: grid;
  place-items: center;
  color: #14243d;
  box-shadow: 0 10px 25px #aa702d6b;
  z-index: 39;
}
body.dark .float-help {
  box-shadow: 0 10px 25px #0007;
}
.assistant-bubble {
  position: fixed;
  right: 25px;
  bottom: 88px;
  width: min(350px, calc(100vw - 40px));
  z-index: 60;
  overflow: hidden;
}
.assistant-bubble .card {
  box-shadow: 0 18px 45px #0003;
}
.assistant-msg {
  background: var(--soft);
  border-radius: 10px;
  padding: 11px;
  margin: 11px 0;
  font-size: 12px;
}
.split-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.chart-label {
  fill: var(--muted);
  font: 10px Arial;
}
.hide {
  display: none !important;
}
@media (max-width: 1370px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .section-grid > .span-3 {
    grid-column: span 6;
  }
  .section-grid > .span-4 {
    grid-column: span 6;
  }
  .agent-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tree-small-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1010px) {
  :root {
    --nav-width: 75px;
  }
  .sidebar {
    padding: 12px 6px;
  }
  .side-logo {
    height: 75px;
    margin: 0 0 12px;
  }
  .side-logo img {
    height: 60px;
    max-width: 65px;
    object-fit: contain;
  }
  .side-group,
  .side-foot,
  .nav-label {
    display: none;
  }
  .nav-btn {
    justify-content: center;
    padding: 11px;
  }
  .stage {
    min-width: 0;
  }
  .main {
    padding: 14px;
  }
  .topbar {
    padding: 0 14px;
  }
  .section-grid > .span-5,
  .section-grid > .span-7,
  .section-grid > .span-8,
  .section-grid > .span-9 {
    grid-column: span 12;
  }
  .section-grid > .span-6 {
    grid-column: span 6;
  }
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  :root {
    --nav-width: 0px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 238px;
    transform: translateX(-101%);
    transition: transform 0.2s;
    z-index: 88;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar.open .side-logo {
    height: 125px;
  }
  .sidebar.open .side-logo img {
    max-width: 165px;
    height: 112px;
  }
  .sidebar.open .nav-label,
  .sidebar.open .side-foot,
  .sidebar.open .side-group {
    display: block;
  }
  .sidebar.open .nav-btn {
    justify-content: flex-start;
  }
  .stage {
    width: 100%;
  }
  .mobile-menu {
    display: flex !important;
  }
  .topbar {
    height: 58px;
    gap: 8px;
    padding: 0 10px;
  }
  .topbar .search-wrap {
    max-width: 100%;
  }
  .profile-trigger .who,
  .topbar .status-pill {
    display: none;
  }
  .profile-trigger {
    min-width: 0;
  }
  .topbar .profile-trigger .avatar {
    width: 28px;
    height: 28px;
  }
  .hero {
    min-height: 125px;
    padding: 20px;
  }
  .hero h1 {
    font-size: 19px;
  }
  .hero-logo {
    height: 68px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .kpi .num {
    font-size: 19px;
  }
  .kpi {
    min-height: 93px;
    padding: 12px;
  }
  .kpi-icon {
    height: 34px;
    width: 34px;
  }
  .section-grid {
    display: block;
  }
  .section-grid > .card {
    margin-bottom: 10px;
  }
  .agent-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .donut-wrap {
    gap: 10px;
  }
  .donut {
    width: 115px;
    height: 115px;
  }
  .donut:before {
    width: 81px;
    height: 81px;
  }
  .donut strong {
    font-size: 18px;
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .page-toolbar {
    align-items: flex-start;
  }
  .phone {
    width: min(310px, 96vw);
  }
  .footer-note {
    display: none;
  }
}
@media (min-width: 681px) {
  .mobile-menu {
    display: none !important;
  }
}
/* ---- application layer ---- */
:root {
  color-scheme: light;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
body.dark {
  color-scheme: dark;
  color: var(--text);
}
html[dir='rtl'] .stage,
html[dir='rtl'] .nav-btn,
html[dir='rtl'] .side-foot,
html[dir='rtl'] .side-group {
  direction: rtl;
}
html[dir='ltr'] .stage,
html[dir='ltr'] .nav-btn {
  direction: ltr;
}
.side-group,
.side-foot {
  text-align: start;
}
.side-logo {
  height: auto;
  padding: 4px 0 12px;
}
.nav-btn .count {
  background: #db5260;
  color: #fff;
  font-size: 10px;
  border-radius: 20px;
  padding: 1px 7px;
}
.hero h1 {
  display: flex;
  gap: 10px;
  align-items: center;
}
.hero > div {
  position: relative;
  z-index: 2;
}
.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}
.kpi .num {
  direction: inherit;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.kpi-text {
  min-width: 0;
}
.kpi .delta {
  color: var(--muted);
}
.kpi .delta.down {
  color: var(--muted);
}
.kpi-icon {
  flex-shrink: 0;
}
.grow {
  flex: 1;
  min-width: 0;
}
.w35 {
  width: 35%;
}
.block {
  display: block;
}
.center {
  text-align: center;
}
.mt {
  margin-top: 10px;
}
.my {
  margin: 10px 0;
}
.full {
  width: 100%;
}
.tinytext {
  font-size: 10px;
}
.big {
  font-size: 18px;
  margin: 8px 0;
}
.roomname {
  font-size: 14px !important;
}
.w35 .progress {
  margin-top: 7px;
}
.legend b.dot-gold {
  background: #e6ae44;
}
.legend b.dot-blue {
  background: #2d81ef;
}
.gridline {
  stroke: var(--line);
  stroke-dasharray: 3 4;
}
.report-note {
  white-space: pre-wrap;
}
.legend-row span {
  min-width: 0;
}
.donut-wrap {
  justify-content: center;
}
.donut strong {
  font-size: 22px;
}
td .btn {
  margin: 2px;
}
.tbl td {
  vertical-align: middle;
}
.filter {
  font-weight: 400;
  min-width: 170px;
}
.arena-hero {
  background: linear-gradient(140deg, #0b2348, #08192f);
  color: #fff;
}
.arena-hero h2 {
  margin: 2px 0;
  font-size: 24px;
}
.arena-hero .sub {
  color: #a9c5e2;
}
.arena-left {
  font-size: 11px;
  border: 1px solid #47617a;
  border-radius: 10px;
  padding: 10px 13px;
}
.arena-hero .trophy-stage {
  margin-top: 16px;
  border: 0;
}
.k-todo {
  border-color: #8da1b8;
}
.k-progress {
  border-color: #367ce4;
}
.k-review {
  border-color: #e4b457;
}
.k-completed {
  border-color: #1ca67c;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 9px;
}
.tree-head {
  padding: 19px 19px 0;
}
.org-tree,
.org-tree ul {
  display: flex;
  justify-content: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 34px 0 0;
  position: relative;
}
.org-tree {
  width: max-content;
  min-width: 100%;
}
.org-tree li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.org-tree ul:before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  height: 17px;
  width: 2px;
  background: #dca43c;
}
.org-tree ul > li:before {
  content: '';
  position: absolute;
  top: -17px;
  left: 50%;
  height: 17px;
  width: 2px;
  background: #dca43c;
}
.org-tree ul > li:after {
  content: '';
  position: absolute;
  top: -17px;
  left: -9px;
  right: -9px;
  height: 2px;
  background: #dca43c;
}
.org-tree ul > li:only-child:after {
  display: none;
}
.org-tree ul > li:first-child:after {
  inset-inline-start: 50%;
}
.org-tree ul > li:last-child:after {
  inset-inline-end: 50%;
}
.tree-node {
  width: 190px;
  margin-top: 18px;
}
.org-tree ul > li > .tree-node {
  margin-top: 0;
  padding-top: 34px;
}
.org-tree ul > li > .tree-node .avatar {
  margin-top: 0;
}
.org-tree > li > .tree-node {
  padding-top: 34px;
}
.org-tree > li > .tree-node .avatar {
  margin-top: 0;
}
.notif-pop {
  position: fixed;
  inset-inline-end: 20px;
  top: 74px;
  width: min(380px, calc(100vw - 40px));
  max-height: 75vh;
  overflow: auto;
  z-index: 50;
  box-shadow: 0 20px 55px #0003;
}
.notif.read {
  opacity: 0.6;
}
.phone-logo {
  height: 49px;
  width: 70px;
  object-fit: contain;
}
.phone-head h3 {
  margin: 5px 0 1px;
  font-size: 16px;
}
.navy {
  background: linear-gradient(115deg, #0b2a52, #184982) !important;
  color: #fff;
}
.navy small {
  color: #bfcfe7;
}
.navy h3 {
  font-size: 15px;
  margin: 6px 0;
}
.portal {
  max-width: 720px;
  margin: auto;
  padding-bottom: 80px;
}
.portal .phone-card {
  padding: 16px;
}
.portal .phone-card strong {
  font-size: 14px;
}
.portal-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 26px;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(8px + var(--safe-b));
}
.portal-nav button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
}
.portal-nav .is-on {
  color: #c78c28;
  font-weight: 700;
}
.connection {
  border: 1px solid var(--red);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
  color: var(--red);
  font-size: 12px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: radial-gradient(circle at 75% 10%, #164377, #071a33 62%);
}
.login {
  width: min(430px, 100%);
  background: var(--card);
  color: var(--text);
  border: 1px solid #37517566;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 25px 70px #0006;
}
.login .login-logo {
  background: linear-gradient(160deg, #0a2344, #071a32);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding: 14px;
  margin-bottom: 18px;
}
.login .login-logo img {
  height: 120px;
}
.login h1 {
  font-size: 22px;
  margin: 0 0 6px;
}
.login p {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 16px;
}
.login form {
  display: grid;
  gap: 13px;
}
.login .actions {
  margin-top: 16px;
  justify-content: center;
}
label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
}
.login input,
dialog input,
dialog select,
dialog textarea {
  width: 100%;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  outline: none;
}
.login input:focus,
dialog input:focus,
dialog select:focus,
dialog textarea:focus {
  border-color: #cb9b45;
}
:focus-visible {
  outline: 2px solid #cb9b45;
  outline-offset: 2px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--text);
  padding: 0;
  width: min(620px, calc(100vw - 24px));
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 25px 60px #01091855;
}
dialog::backdrop {
  background: #031426aa;
  backdrop-filter: blur(3px);
}
dialog > .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
}
dialog > .head h2 {
  margin: 0;
  font-size: 17px;
}
dialog > :not(.head) {
  margin: 16px 22px;
}
dialog .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
dialog .wide {
  grid-column: 1/-1;
}
dialog textarea {
  min-height: 86px;
}
dialog .form-grid + * {
  margin-top: 12px;
}
.checks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 6px;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.checks input {
  width: 17px;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.form .actions {
  justify-content: flex-end;
}
.error {
  color: var(--red);
  font-size: 12px;
  min-height: 1em;
  margin: 0;
}
.notice {
  font-size: 12px;
  color: var(--muted);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  margin-bottom: 12px;
}
#toast {
  position: fixed;
  bottom: calc(25px + var(--safe-b));
  left: 25px;
  z-index: 110;
  background: #102a4b;
  color: #fff;
  box-shadow: 0 12px 30px #0005;
  padding: 14px 19px;
  border-radius: 12px;
  border: 1px solid #436488;
  max-width: min(390px, calc(100vw - 50px));
  font-size: 12px;
  display: none;
}
.loading {
  text-align: center;
  margin-top: 30vh;
  color: var(--muted);
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 17px;
}
.panel h2 {
  font-size: 14px;
  margin: 0 0 14px;
}
.panel table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 11px;
}
.panel th,
.panel td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}
.panel th {
  color: var(--muted);
  background: var(--soft);
}
.kpi-label {
  font-size: 11px;
  color: var(--muted);
}
.kpi-number {
  font-size: 20px;
  font-weight: 800;
}
.grid.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.item {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 12px;
}
.item strong {
  display: block;
}
.item p {
  color: var(--muted);
  margin: 4px 0 8px;
}
.mobile-menu {
  display: none;
}
.menu-cover {
  display: none;
}
@media (max-width: 680px) {
  .mobile-menu {
    display: inline-flex !important;
  }
  .menu-cover.on {
    display: block;
    position: fixed;
    inset: 0;
    background: #03162987;
    z-index: 87;
  }
  .hero h1 {
    font-size: 18px;
  }
  .hero p {
    font-size: 11px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi .num {
    font-size: 16px;
  }
  .kpi-icon {
    display: none;
  }
  .donut-wrap {
    flex-wrap: wrap;
  }
  dialog .form-grid {
    grid-template-columns: 1fr;
  }
  .tab {
    padding: 8px 11px;
  }
  .kanban {
    grid-template-columns: repeat(4, 250px);
  }
  .quad {
    grid-template-columns: 1fr 1fr;
  }
  .topbar .langbtn {
    display: none;
  }
  .login .login-logo img {
    height: 90px;
  }
  .portal-nav {
    gap: 8px;
    justify-content: space-around;
  }
}
@media (max-width: 1010px) and (min-width: 681px) {
  .side-logo img {
    height: 52px;
  }
}
@media screen {
  #invoice-print {
    display: none;
  }
}
@media print {
  body {
    background: #fff;
    color: #000;
  }
  #root,
  dialog,
  #toast {
    display: none !important;
  }
  #invoice-print {
    display: block;
    padding: 30px;
    color: #000;
    font-family: Arial, sans-serif;
  }
  #invoice-print .print-logo {
    background: #07182e;
    border-radius: 12px;
    padding: 10px;
    width: 150px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #invoice-print img {
    width: 130px;
    height: auto;
  }
  #invoice-print h1 {
    font-size: 24px;
  }
  #invoice-print .company {
    white-space: pre-wrap;
    color: #333;
  }
  #invoice-print table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
  }
  #invoice-print td,
  #invoice-print th {
    border-bottom: 1px solid #ccc;
    padding: 8px;
    text-align: start;
  }
}
.kpi .num {
  overflow-wrap: normal;
  font-size: 20px;
}
.kpi {
  overflow: visible;
}
.donut-wrap {
  flex-wrap: wrap;
  gap: 14px;
}
.donut-wrap .grow {
  min-width: 140px;
}
.span-3 .donut {
  width: 130px;
  height: 130px;
}
.span-3 .donut:before {
  width: 90px;
  height: 90px;
}
a.btn {
  text-decoration: none;
}
@media (max-width: 680px) {
  .sidebar:not(.open) {
    box-shadow: none;
  }
}
.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}
.linklike {
  background: none;
  border: 0;
  padding: 0;
  color: var(--red);
  text-decoration: underline;
}
/* iOS zooms the page when a focused field is smaller than 16px. */
@media (pointer: coarse) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}
