:root {
  --bg: #f4f7f5;
  --panel: #ffffff;
  --ink: #1e2925;
  --muted: #69746f;
  --line: #dfe6e2;
  --accent: #2f7d57;
  --accent-2: #b88723;
  --danger: #a64035;
  --shadow: 0 10px 26px rgba(31, 45, 38, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #063b25, #062f22 58%, #032218);
  color: white;
  padding: 22px 16px;
  z-index: 30;
  box-shadow: 18px 0 45px rgba(3, 34, 24, .18);
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-right: 10px;
  border-radius: 8px;
  background: #f3b33d;
  color: #173b2b;
  font-size: 16px;
}

.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-right: 10px;
  padding: 4px;
  border-radius: 8px;
  background: white;
  vertical-align: middle;
}

.brand {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 26px;
}

.brand span {
  color: #c7d8cf;
  font-size: 14px;
  font-weight: 400;
}

nav {
  display: grid;
  gap: 10px;
}

nav a {
  display: block;
  padding: 10px 12px;
  color: #edf7f1;
  text-decoration: none;
  border-radius: 8px;
}

nav a:hover {
  background: rgba(255, 255, 255, .12);
}

.nav-group summary {
  cursor: pointer;
  color: #c7d8cf;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  padding: 4px 8px;
}

.main {
  margin-left: 260px;
  padding: 18px;
}

.top-ribbon {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -18px -18px 16px;
  padding: 7px 18px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(31, 45, 38, .05);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.top-ribbon button {
  min-height: 32px;
  background: #eef4f0;
  color: var(--ink);
  border: 1px solid var(--line);
}

.platform-ribbon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: stretch;
  align-items: center;
  min-height: 58px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.platform-ribbon-title {
  min-width: 0;
}

.platform-ribbon-title strong {
  display: block;
  color: #071822;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.1;
  text-align: left;
}

.platform-ribbon-title span {
  display: block;
  margin-top: 3px;
  color: #62726b;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.25;
}

.updates-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 26px 28px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(47, 125, 87, .11), rgba(255, 255, 255, .94) 44%),
    var(--panel);
  box-shadow: var(--shadow);
}

.updates-hero h1 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.updates-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.updates-version {
  min-width: 170px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #0b4a31;
  color: #fff;
}

.updates-version span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
}

.updates-version strong {
  font-size: 28px;
}

.updates-timeline {
  display: grid;
  gap: 14px;
}

.updates-release {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.updates-release-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.updates-release-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.updates-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.updates-tag {
  padding: 7px 11px;
  border-radius: 999px;
  background: #e9f5ef;
  color: #0b5a38;
  font-size: 12px;
  font-weight: 800;
}

.updates-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.updates-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid #e4ebe7;
  border-radius: 12px;
  background: #fbfdfc;
}

.updates-item > span {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #e0f4e9;
  color: var(--accent);
}

.updates-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.updates-item strong {
  display: block;
  margin-bottom: 5px;
}

.updates-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .updates-hero,
  .updates-release-head {
    display: grid;
  }

  .updates-version {
    width: 100%;
  }

  .updates-list {
    grid-template-columns: 1fr;
  }
}

.guide-hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: stretch;
  padding: 20px 22px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(47, 125, 87, .12), rgba(255, 255, 255, .96) 48%),
    var(--panel);
  box-shadow: var(--shadow);
}

.guide-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.03;
}

.guide-hero p {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.guide-hero-card {
  min-width: 210px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px;
  border-radius: 11px;
  background: #0b4a31;
  color: #fff;
}

.guide-hero-card strong {
  font-size: 15px;
}

.guide-hero-card span {
  color: rgba(255, 255, 255, .72);
}

.guide-shell {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.guide-start-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.guide-start-strip article {
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbf9);
}

.guide-start-strip strong {
  display: block;
  margin-bottom: 5px;
  color: #0b5a38;
  font-size: 13px;
}

.guide-start-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.guide-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.guide-toolbar label {
  width: min(460px, 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #dbe5df;
  border-radius: 999px;
  background: #f8fbf9;
  color: #61706a;
}

.guide-toolbar svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.guide-toolbar input {
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
}

.guide-toolbar span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.guide-tabbar {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
  scrollbar-width: thin;
}

.guide-tab {
  min-height: 52px;
  min-width: 128px;
  flex: 1 0 auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #33423c;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
}

.guide-tab svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-tab.active {
  color: #047544;
  background: linear-gradient(180deg, #fff, #eef8f2);
  box-shadow: inset 0 -4px 0 #0f8b5a;
}

.guide-panels {
  padding: 20px;
}

.guide-panel[hidden] {
  display: none;
}

.guide-panel-head {
  margin-bottom: 16px;
  border-bottom: 1px solid #e4ebe7;
  padding-bottom: 12px;
}

.guide-panel-head h2 {
  margin-bottom: 5px;
  font-size: 23px;
  line-height: 1.16;
}

.guide-panel-head p {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 16px;
  align-items: start;
}

.guide-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  counter-reset: guide-step;
  list-style: none;
}

.guide-steps li {
  counter-increment: guide-step;
  position: relative;
  padding: 13px 14px 13px 62px;
  border: 1px solid #e4ebe7;
  border-radius: 10px;
  background: #fbfdfc;
}

.guide-steps li::before {
  content: counter(guide-step);
  position: absolute;
  left: 15px;
  top: 14px;
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 999px;
  background: #e0f4e9;
  color: #0b5a38;
  font-weight: 900;
}

.guide-steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.guide-steps span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guide-mini-card,
.guide-menu-map article,
.guide-workflows article,
.guide-role-grid article,
.guide-tip,
.guide-note {
  border: 1px solid #e3ebe6;
  border-radius: 12px;
  background: #fbfdfc;
}

.guide-mini-card {
  padding: 13px;
}

.guide-mini-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.guide-mini-card p,
.guide-menu-map p,
.guide-workflows li,
.guide-role-grid p,
.guide-role-grid li,
.guide-tip p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-mini-card p,
.guide-menu-map p,
.guide-tip p {
  margin: 0;
}

.guide-menu-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guide-menu-map article {
  padding: 13px 14px;
  border-left: 4px solid #1c8b5d;
}

.guide-menu-map strong,
.guide-menu-map span {
  display: block;
}

.guide-menu-map span {
  margin: 4px 0 7px;
  color: #0b5a38;
  font-size: 13px;
  font-weight: 700;
}

.guide-workflows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-workflows article {
  padding: 15px;
}

.guide-workflows h3,
.guide-role-grid h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.guide-workflows ol,
.guide-role-grid ul {
  margin: 0;
  padding-left: 20px;
}

.guide-role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.guide-role-grid article {
  padding: 14px;
}

.guide-role-grid p {
  margin: 0 0 8px;
  font-weight: 700;
}

.guide-note {
  margin-top: 12px;
  padding: 14px;
  background: #f0f8f4;
  font-size: 13px;
}

.guide-approval-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr);
  gap: 16px;
  align-items: start;
}

.guide-approval-flow {
  display: grid;
  gap: 12px;
}

.guide-approval-flow article {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe5df;
  border-radius: 12px;
  background: #fbfdfc;
}

.guide-approval-flow article:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -13px;
  width: 2px;
  height: 13px;
  background: #a9cbbb;
}

.guide-approval-flow article > span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #0b5a38;
  color: #fff;
  font-weight: 900;
}

.guide-approval-flow strong {
  display: block;
  margin-bottom: 4px;
}

.guide-approval-flow p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-approval-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #063b25, #0d6b44);
}

.guide-approval-panel h3 {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  color: #fff;
  font-size: 18px;
}

.guide-approval-panel .guide-mini-card {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
}

.guide-approval-panel .guide-mini-card strong,
.guide-approval-panel .guide-mini-card p {
  color: #fff;
}

.guide-approval-panel .guide-mini-card p {
  color: rgba(255,255,255,.78);
}

.guide-tips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guide-tip {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 13px;
}

.guide-tip > span {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border-radius: 999px;
  background: #13a672;
  box-shadow: 0 0 0 6px #e0f4e9;
}

.guide-snapshot {
  padding: 15px;
  border: 1px solid #d8e4de;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f6faf8);
}

.guide-snapshot > strong {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
}

.guide-flow {
  display: grid;
  gap: 10px;
}

.guide-flow span {
  position: relative;
  padding: 12px 14px;
  border-radius: 10px;
  background: #e9f5ef;
  color: #0b5a38;
  font-weight: 800;
}

.guide-flow span:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -10px;
  width: 2px;
  height: 10px;
  background: #9ccbb6;
}

.snapshot-ribbon,
.snapshot-filters,
.snapshot-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.snapshot-ribbon {
  padding: 10px;
  border-radius: 10px;
  background: #0b4a31;
  color: #fff;
  font-size: 12px;
}

.snapshot-filters {
  margin: 12px 0;
}

.snapshot-filters span {
  flex: 1;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
}

.snapshot-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.snapshot-cards i,
.snapshot-wide,
.snapshot-table span,
.snapshot-signatures i {
  display: block;
  border-radius: 8px;
  background: #eaf1ed;
}

.snapshot-cards i {
  min-height: 62px;
}

.snapshot-wide {
  min-height: 110px;
  margin-top: 10px;
  background: #0b5a38;
}

.snapshot-doc-head {
  align-items: center;
}

.snapshot-doc-head span {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #8ba89a;
  color: #0b5a38;
  font-weight: 900;
}

.snapshot-doc-head em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
  font-size: 12px;
}

.snapshot-line {
  height: 3px;
  margin: 14px 0;
  background: #0b5a38;
}

.snapshot-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 6px;
}

.snapshot-table span {
  min-height: 42px;
  border-radius: 0;
}

.snapshot-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.snapshot-signatures i {
  height: 2px;
  background: #60756a;
}

.guide-snapshot figcaption {
  margin-bottom: 12px;
  color: #0b5a38;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.guide-dashboard-shot {
  background: #eef2f0;
}

.dash-shot-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e1e8e4;
}

.dash-shot-ribbon b {
  flex: 1;
  font-size: 12px;
}

.dash-shot-ribbon span,
.dash-shot-ribbon i {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef4f0;
  color: #0b4a31;
  font-style: normal;
}

.dash-shot-ribbon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.dash-shot-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.dash-shot-controls span {
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dfe7e2;
  color: #51615b;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.dash-shot-controls span:first-child {
  background: #0b4a31;
  color: #fff;
}

.dash-shot-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dash-shot-kpis div {
  min-height: 74px;
  padding: 9px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e1e8e4;
}

.dash-shot-kpis i {
  display: block;
  width: 24px;
  height: 24px;
  margin-bottom: 7px;
  border-radius: 8px;
  background: #dcf8e7;
}

.dash-shot-kpis strong,
.dash-shot-kpis em {
  display: block;
  font-style: normal;
}

.dash-shot-kpis strong {
  color: #61706a;
  font-size: 10px;
}

.dash-shot-kpis em {
  margin-top: 4px;
  color: #07151f;
  font-size: 18px;
  font-weight: 900;
}

.dash-shot-body {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 9px;
  margin-top: 10px;
}

.dash-shot-body section,
.dash-shot-body aside {
  min-height: 104px;
  padding: 12px;
  border-radius: 11px;
  background: #0b5a38;
  color: #fff;
}

.dash-shot-body aside {
  background: #fff;
  color: #1e2925;
  border: 1px solid #e1e8e4;
}

.dash-shot-body b {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
}

.dash-shot-body p {
  height: 10px;
  margin: 8px 0;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
}

.dash-shot-body aside p {
  background: #e8efeb;
}

.guide-grn-shot {
  background: #fffdf8;
  color: #050505;
  font-family: Georgia, "Times New Roman", serif;
}

.grn-shot-head {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
}

.grn-shot-head span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #6b7b72;
  color: #0b5a38;
  font-weight: 900;
}

.grn-shot-head b {
  font-size: 20px;
}

.grn-shot-head em {
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.grn-shot-head small {
  font-size: 10px;
  font-weight: 700;
}

.grn-shot-rule {
  height: 2px;
  margin: 14px 0 11px;
  background: #0b5a38;
}

.guide-grn-shot h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
  font-size: 13px;
}

.guide-grn-shot h4::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #7ba08c;
}

.grn-shot-info,
.grn-shot-table {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  border: 1px solid #cdd8d2;
  border-bottom: 0;
  font-size: 11px;
}

.grn-shot-info span,
.grn-shot-info i,
.grn-shot-table b,
.grn-shot-table span {
  padding: 7px;
  border-bottom: 1px solid #cdd8d2;
  font-style: normal;
}

.grn-shot-info span {
  background: #eef4f0;
  font-weight: 900;
  text-transform: uppercase;
}

.grn-shot-table {
  grid-template-columns: 1.2fr 1.2fr .7fr .9fr;
}

.grn-shot-table b {
  background: #0b5a38;
  color: #fff;
}

.grn-shot-sign {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
  font-size: 11px;
  font-weight: 900;
}

.grn-shot-sign span::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 7px;
  background: #22332b;
}

.guide-menu-shot {
  background: linear-gradient(180deg, #073f2a, #052f21);
  color: #d8ebe2;
}

.menu-shot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.menu-shot-brand span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f0bf48;
  color: #0b3f2a;
  font-weight: 900;
}

.menu-shot-brand b {
  color: #fff;
  text-transform: uppercase;
}

.menu-shot-row {
  display: grid;
  grid-template-columns: 18px 1fr 16px;
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.menu-shot-row.active {
  background: rgba(255,255,255,.12);
}

.menu-shot-row i {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.menu-shot-row em {
  color: rgba(255,255,255,.7);
  font-style: normal;
}

.menu-shot-sub {
  margin-left: 28px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.menu-shot-sub.active {
  background: #196b4d;
  color: #fff;
  border-left: 3px solid #d7a938;
}

@media (max-width: 1180px) {
  .guide-grid,
  .guide-role-grid {
    grid-template-columns: 1fr;
  }

  .guide-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .guide-hero {
    display: grid;
    padding: 16px;
  }

  .guide-hero-card {
    min-width: 0;
  }

  .guide-hero h1 {
    font-size: 30px;
  }

  .guide-hero p {
    font-size: 14px;
  }

  .guide-panels {
    padding: 14px;
  }

  .guide-card-list,
  .guide-menu-map,
  .guide-workflows,
  .guide-role-grid,
  .guide-tips,
  .guide-start-strip,
  .guide-approval-layout,
  .guide-approval-panel {
    grid-template-columns: 1fr;
  }

  .guide-toolbar {
    display: grid;
  }

  .guide-toolbar span {
    text-align: left;
  }

  .guide-tab {
    min-width: 118px;
    min-height: 50px;
    padding: 10px;
  }

  .guide-panel-head h2 {
    font-size: 21px;
  }
}

.ribbon-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ribbon-tools a {
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sidebar-collapsed .sidebar {
  display: none;
}

.sidebar-collapsed .main {
  margin-left: 0;
}

.sidebar-backdrop {
  display: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.topbar p,
.login-card p {
  color: var(--muted);
  margin: 5px 0 0;
}

.user {
  text-align: right;
  color: var(--muted);
}

.user a {
  display: block;
  margin-top: 4px;
  color: var(--accent);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.action-grid .grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 25px;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px;
  margin-bottom: 18px;
  color: white;
  background: linear-gradient(120deg, #123f6d, #2f7d57);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dashboard-hero span {
  color: #d9e7ef;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 700;
}

.dashboard-hero h2 {
  font-size: 26px;
  margin: 8px 0;
}

.dashboard-hero p {
  max-width: 650px;
  margin: 0;
  color: #eef7f2;
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.compact-panel {
  overflow: hidden;
}

.compact-panel .grid-form {
  grid-template-columns: repeat(2, minmax(130px, 1fr));
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px;
  align-items: end;
}

.grid-form textarea {
  min-height: 52px;
  line-height: 1.35;
  resize: vertical;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.settings-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fbfdfb;
}

.settings-section h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1rem;
}

.setup-workspace {
  display: block;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.people-hero,
.supplier-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.people-hero h2,
.supplier-hero h2 {
  margin: 2px 0 6px;
}

.people-hero p {
  max-width: 920px;
  line-height: 1.32;
}

.people-summary,
.supplier-summary {
  min-width: 170px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef7f2;
  text-align: center;
}

.people-summary strong,
.supplier-summary strong {
  display: block;
  color: var(--green);
  font-size: 1.8rem;
  line-height: 1;
}

.people-summary span,
.supplier-summary span {
  color: var(--muted);
  font-size: .9rem;
}

.sms-workspace .setup-active-head h2 {
  font-size: 26px;
}

.sms-workspace .setup-active-head p {
  max-width: 820px;
}

.sms-top-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sms-card-head,
.setup-form-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.sms-card-head h3,
.setup-form-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.sms-mini-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sms-mini-metrics span {
  min-width: 92px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5faf7;
}

.sms-mini-metrics strong {
  display: block;
  color: var(--green);
  font-size: 15px;
  line-height: 1.1;
}

.sms-mini-metrics small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.inline-action-form {
  padding: 12px 16px 16px;
}

.inline-action-form button {
  width: auto;
  min-height: 42px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sms-settings-stack {
  display: grid;
  gap: 16px;
}

.sms-settings-box {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(31, 45, 38, .035);
}

.sms-settings-box h4 {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--green);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sms-settings-box .grid-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.sms-settings-box.provider .grid-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sms-settings-box label,
.sms-settings-box input,
.sms-settings-box select,
.sms-settings-box textarea {
  min-width: 0;
}

.sms-settings-box .grid-form button:not(.icon-btn) {
  width: auto;
  min-width: 150px;
  justify-self: start;
}

.row-actions .icon-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.sms-note {
  margin: 10px 0 0;
  font-size: 13px;
}

.sms-top-tabs {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.sms-compose-form {
  display: grid;
  gap: 16px;
}

.sms-compose-grid {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(300px, 1.05fr);
  gap: 16px;
  align-items: stretch;
}

.sms-compose-card,
.sms-message-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  min-width: 0;
}

.sms-compose-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.sms-compose-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.sms-contact-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding-right: 3px;
}

.sms-contact-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  cursor: pointer;
}

.sms-contact-option input {
  width: 18px;
  height: 18px;
}

.sms-contact-option strong,
.sms-contact-option small {
  display: block;
}

.sms-contact-option small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 12px;
}

.sms-phone-row {
  display: grid;
  grid-template-columns: minmax(140px, .8fr) minmax(160px, 1fr);
  gap: 12px;
}

.sms-message-card {
  display: grid;
  grid-template-columns: minmax(180px, .6fr) minmax(180px, .6fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: end;
}

.sms-message-card .span-2 {
  grid-column: span 2;
}

.sms-message-card button {
  min-height: 52px;
}

.setup-main {
  min-width: 0;
  padding: 0;
}

.setup-top-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 12px 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 4px 14px rgba(31, 45, 38, .04);
}

.setup-top-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #34413d;
  font-size: 15px;
  font-weight: 850;
}

.setup-top-tabs button:last-child {
  border-right: 0;
}

.setup-top-tabs button.active {
  color: #04734e;
  box-shadow: inset 0 -3px 0 #04734e;
}

.setup-top-tabs svg,
.setup-active-head button svg {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px;
  stroke-width: 2;
}

.setup-tab-panel {
  display: none;
}

.setup-tab-panel.active {
  display: grid;
  gap: 16px;
}

.setup-table-card,
.setup-form-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 61, 46, .05);
}

.setup-active-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 0 2px 2px;
}

.setup-active-head h2 {
  margin: 0 0 6px;
  color: #071822;
  font-size: 26px;
  line-height: 1.12;
  font-weight: 950;
}

.setup-active-head p {
  margin: 0;
  color: #52645d;
  font-size: 16px;
}

.setup-form-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.setup-active-head button {
  width: auto;
  min-height: 46px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.setup-table-card {
  overflow: hidden;
}

.setup-table-card .list-tools {
  padding: 14px 16px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.setup-table-card .list-tools input {
  max-width: 380px;
}

.setup-table-card .table-wrap {
  border: 0;
  border-radius: 0;
}

.setup-form-card {
  padding: 18px;
  border-top: 3px solid var(--accent);
}

.reimbursement-hero {
  display: block;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(242,250,245,.92));
}

.reimbursement-hero-main {
  width: 100%;
}

.reimbursement-hero-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.reimbursement-hero .people-summary {
  min-width: 250px;
}

.reimbursement-metrics {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.reimbursement-hero .metric {
  box-shadow: 0 8px 22px rgba(15, 61, 46, .04);
}

.reimbursement-workspace .setup-top-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reimbursement-workspace .setup-active-head {
  padding: 6px 2px 2px;
}

.reimbursement-workspace .setup-active-head > button {
  background: var(--accent);
  color: #fff;
}

.reimbursement-workspace .setup-tab-panel.active {
  gap: 14px;
}

.reimbursement-form-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 61, 46, .05);
}

.policy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 125, 87, .2);
  border-radius: 8px;
  background: #f2faf5;
  color: #29443a;
  font-size: 14px;
  line-height: 1.45;
}

.policy-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--accent);
}

.reimbursement-policy {
  border-left: 4px solid var(--accent);
}

.reimbursement-policy h2 {
  margin-bottom: 6px;
}

.basic-cost-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,.99), rgba(242,250,245,.93));
}

.basic-cost-hero .people-summary {
  min-width: 250px;
}

.basic-cost-metrics {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.basic-cost-workspace .setup-top-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.basic-cost-workspace .setup-active-head {
  padding: 6px 2px 2px;
}

.basic-cost-workspace .setup-active-head > button {
  background: var(--accent);
  color: #fff;
}

.basic-cost-workspace .setup-tab-panel.active {
  display: block;
}

.basic-cost-form-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 61, 46, .05);
}

.basic-cost-insight-grid,
.basic-cost-analysis-grid {
  display: grid;
  gap: 14px;
}

.basic-cost-insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.basic-cost-analysis-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.basic-cost-analysis-grid .setup-table-card h3 {
  padding: 16px 18px 14px;
  margin: 0;
}

.basic-cost-analysis-grid .setup-table-card .table-wrap,
.basic-cost-analysis-grid .setup-table-card .empty {
  margin: 0 18px 18px;
}

.basic-cost-analysis-grid .setup-table-card th,
.basic-cost-analysis-grid .setup-table-card td {
  padding-left: 18px;
  padding-right: 18px;
}

.basic-cost-insight {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
  border: 1px solid #dbe7e0;
  border-radius: 14px;
  background: #fff;
}

.basic-cost-insight small {
  color: #64736e;
  font-size: 12px;
  font-weight: 800;
}

.basic-cost-insight strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.basic-cost-insight span {
  color: #62716c;
  font-size: 14px;
  line-height: 1.35;
}

.basic-cost-insight.positive strong,
.basic-cost-insight.green strong {
  color: #087a45;
}

.basic-cost-insight.negative strong,
.basic-cost-insight.red strong {
  color: #b3261e;
}

.basic-cost-insight.gold strong {
  color: #b87900;
}

.basic-cost-note {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #d6eadf;
  border-radius: 14px;
  background: #f3fbf6;
  color: #23433a;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .sms-settings-box .grid-form,
  .sms-settings-box.provider .grid-form {
    grid-template-columns: 1fr;
  }

  .setup-top-tabs {
    display: flex;
    overflow-x: auto;
  }

  .setup-top-tabs button {
    min-width: 172px;
    flex: 0 0 auto;
  }

  .setup-active-head {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-active-head h2 {
    font-size: 24px;
  }

  .sms-card-head,
  .setup-form-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .sms-mini-metrics {
    justify-content: flex-start;
  }

  .basic-cost-insight-grid,
  .basic-cost-analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .basic-cost-hero .people-summary {
    width: 100%;
    min-width: 0;
  }

  .basic-cost-insight-grid,
  .basic-cost-analysis-grid {
    grid-template-columns: 1fr;
  }
}

.allocation-box {
  display: grid;
  gap: 10px;
}

.allocation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.grid-form .form-action-row {
  grid-column: 1 / -1;
}

.form-action-row button:not(.icon-btn),
.form-action-row .button-link {
  min-width: 160px;
}

.sale-form-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sale-form-head h2 {
  margin-bottom: 4px;
}

.sale-form-head p {
  margin: 0;
}

.sale-fields {
  grid-template-columns: repeat(4, minmax(165px, 1fr));
}

.sale-total {
  min-width: 190px;
  padding: 12px 16px;
  border: 1px solid #b9dcc9;
  border-radius: 8px;
  background: #eef8f2;
  text-align: right;
}

.sale-total span,
.sale-total strong {
  display: block;
}

.sale-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sale-total strong {
  color: #0f3d2e;
  font-size: 24px;
}

.sale-actions {
  justify-content: flex-end;
}

.sale-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  justify-content: center;
}

.grn-actions {
  justify-content: flex-end;
}

.grn-actions button,
.grn-actions .button-link {
  width: auto;
  min-width: 150px;
  flex: 0 0 auto;
}

.capacity-warning {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid #f2c56b;
  border-radius: 8px;
  background: #fff8e6;
  color: #7a4b00;
  font-size: 13px;
  line-height: 1.45;
}

.required,
.field-error {
  color: var(--danger);
}

.field-error {
  font-size: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

label.is-disabled {
  opacity: .62;
}

input,
select,
button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #f3f6f4;
  color: #7b8782;
  cursor: not-allowed;
}

button {
  border: 0;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button.danger {
  background: var(--danger);
}

button svg,
.button-link svg,
.icon-btn svg,
.top-ribbon svg,
.ribbon-tools svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
  color: white;
  background: var(--accent);
  text-decoration: none;
  border: 0;
  margin: 2px;
  vertical-align: middle;
}

.icon-btn.danger {
  background: var(--danger);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 84px;
}

.list-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.pagination button {
  min-height: 32px;
  padding: 5px 10px;
}

.mini-payment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mini-payment input,
.mini-payment select {
  width: 86px;
  min-height: 34px;
  padding: 6px 8px;
}

.mini-payment select {
  width: 112px;
}

.button-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 9px 12px;
  text-decoration: none;
  font-weight: 700;
}

.button-link.secondary {
  background: #eef4f0;
  color: #0f3d2e;
  border: 1px solid var(--line);
}

.small {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
  margin-right: 6px;
}

.list-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
}

.list-tools input {
  max-width: 360px;
  width: 100%;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-table table,
.compact-panel table {
  min-width: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  min-width: 760px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  background: #eef4f0;
  color: #405049;
  font-size: 12px;
  text-transform: uppercase;
}

.empty,
.alert {
  padding: 12px 14px;
  background: #fff7e6;
  border: 1px solid #efd49f;
  border-radius: 8px;
}

.alert.success {
  background: #eaf7ef;
  border-color: #b9dfc7;
  margin-bottom: 14px;
}

.inline {
  display: flex;
  gap: 4px;
  margin: 0;
}

.inline button {
  min-height: 34px;
  padding: 6px 10px;
}

dialog {
  max-width: 920px;
  width: min(920px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(17, 32, 24, .35);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.modal-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-head button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-width: 92px;
  justify-content: center;
  border-radius: 9px;
}

pre {
  white-space: pre-wrap;
  background: #f5f7f6;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
}

.report-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.report-filter-panel {
  display: flex;
  justify-content: flex-start;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px;
}

.focused-report-actions .period-filter {
  margin-left: auto;
}

.report-catalog-toolbar {
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
}

.report-catalog-toolbar .period-filter {
  margin-left: 0;
}

.report-search-box {
  flex: 1 1 280px;
  max-width: 420px;
  margin-left: auto;
}

.report-search-box input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.report-search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 87, .12);
  outline: 0;
}

.report-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 14px;
}

.report-card[hidden],
.report-search-empty[hidden] {
  display: none !important;
}

.report-search-empty {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 92px;
  display: grid;
  align-items: center;
}

.report-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 12px;
  align-content: start;
  min-height: 138px;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.report-card:hover {
  border-color: rgba(47, 125, 87, .45);
  box-shadow: 0 14px 32px rgba(31, 45, 38, .13);
}

.report-card-icon {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--accent);
  background: #eaf7ef;
  border-radius: 8px;
}

.report-card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-card strong {
  font-size: 17px;
}

.report-card small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.4;
}

.focused-report-actions {
  justify-content: space-between;
  margin-bottom: 16px;
}

.report-export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-link {
  display: inline-flex;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}

.export-excel {
  background: #217346;
}

.export-pdf {
  background: #b53831;
}

.report-result .list-tools > span {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .report-filter-panel,
  .focused-report-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .report-filter-panel .period-filter {
    margin-left: 0;
  }

  .report-catalog {
    grid-template-columns: 1fr;
  }

  .report-period button,
  .report-period .button-link {
    flex: 1 1 120px;
  }
}

@media (max-width: 860px) {
  .sms-compose-grid,
  .sms-message-card,
  .sms-phone-row {
    grid-template-columns: 1fr;
  }

  .sms-message-card .span-2 {
    grid-column: auto;
  }
}

.period-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.period-filter.compact {
  background: rgba(255,255,255,.12);
  padding: 12px;
  border-radius: 8px;
}

.period-filter label {
  color: inherit;
}

.muted {
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
}

.print-doc {
  background: #e6e8ea;
  color: #111;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.34;
}

.print-sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 13mm 14mm;
  background: #fff;
  color: #111;
}

.print-header {
  display: grid;
  grid-template-columns: 72px 1fr minmax(210px, 270px);
  gap: 18px;
  align-items: center;
  border-bottom: 2px solid #145f3a;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.print-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.text-logo {
  display: grid;
  place-items: center;
  border: 1px solid #6f8677;
  background: #fff;
  color: #145f3a;
  border-radius: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .03em;
}

.print-company-block h1,
.print-header h1 {
  margin: 0;
  color: #111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.print-header p {
  margin: 4px 0 0;
  color: #222;
  font-size: 14px;
}

.print-doc-meta {
  display: grid;
  gap: 5px;
  text-align: right;
  font-size: 13px;
}

.print-doc-meta strong {
  display: block;
  margin-bottom: 4px;
  color: #111;
  font-size: 22px;
  line-height: 1.12;
}

.print-doc-meta b {
  font-weight: 700;
}

.print-content {
  display: grid;
  gap: 14px;
}

.print-section {
  break-inside: avoid;
}

.print-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  break-inside: avoid;
}

.print-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: #111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.print-section h2::after {
  content: "";
  flex: 1;
  border-top: 1px solid #145f3a;
  opacity: .7;
}

.print-kv-table,
.print-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}

.print-kv-table th,
.print-kv-table td,
.print-table th,
.print-table td {
  border: 1px solid #cfd8d2;
  padding: 6px 8px;
  vertical-align: top;
}

.print-kv-table th {
  width: 34%;
  background: #eef4f0;
  color: #203a32;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
}

.print-kv-table td {
  color: #111;
}

.print-table th {
  background: #145f3a;
  color: #fff;
  font-weight: 700;
  text-align: left;
}

.print-table td {
  color: #111;
}

.print-number {
  text-align: right !important;
  white-space: nowrap;
}

.print-signature-section {
  margin-top: 28px;
}

.print-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.print-signature {
  min-height: 92px;
  color: #111;
}

.print-signature strong {
  display: block;
  margin-bottom: 20px;
  color: #203a32;
  font-size: 13px;
}

.print-signature i {
  display: block;
  height: 1px;
  margin: 0 0 12px;
  border-top: 1px solid #6f7672;
}

.print-signature p {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: end;
  margin: 9px 0 0;
  color: #111;
  font-size: 12px;
}

.print-signature p::after {
  content: "";
  border-bottom: 1px solid #8c9690;
}

.print-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 9px;
  border-top: 2px solid #145f3a;
  color: #333;
  font-size: 11px;
  font-style: italic;
}

.print-footer span {
  display: block;
}

.print-actions {
  margin-top: 16px;
  text-align: center;
}

.print-actions button {
  width: auto;
  min-width: 160px;
  padding: 10px 18px;
}

.print-table thead {
  display: table-header-group;
}

.print-doc .table-wrap {
  overflow: visible !important;
  border: 0;
  border-radius: 0;
}

.print-doc .table-wrap table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
}

.print-doc table {
  min-width: 0;
}

.print-doc .table-wrap::-webkit-scrollbar {
  display: none;
}

.print-doc .table-wrap th {
  background: #145f3a;
  color: #fff;
  border: 1px solid #cfd8d2;
  padding: 7px 8px;
  text-align: left;
}

.print-doc .table-wrap td {
  border: 1px solid #cfd8d2;
  padding: 7px 8px;
  color: #111;
  vertical-align: top;
}

.print-doc .detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #cfd8d2;
}

.print-doc .detail-grid div {
  border: 0;
  border-right: 1px solid #cfd8d2;
  border-bottom: 1px solid #cfd8d2;
  border-radius: 0;
  background: #fff;
  padding: 8px 10px;
}

.print-doc .detail-grid dt {
  color: #203a32;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.print-doc .detail-grid dd {
  margin: 4px 0 0;
  color: #111;
  overflow-wrap: anywhere;
}

.print-detail-subsection {
  margin-top: 14px;
}

.print-detail-subsection h3 {
  margin: 0 0 7px;
  color: #203a32;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.print-doc.print-list .print-sheet {
  width: 297mm;
  min-height: 210mm;
  padding: 10mm 11mm;
}

.print-doc.print-list .print-header {
  grid-template-columns: 54px minmax(0, 1fr) minmax(150px, 220px);
  gap: 12px;
  padding-bottom: 9px;
  margin-bottom: 12px;
}

.print-doc.print-list .print-logo {
  width: 48px;
  height: 48px;
}

.print-doc.print-list .print-company-block h1,
.print-doc.print-list .print-header h1 {
  font-size: 22px;
}

.print-doc.print-list .print-header p,
.print-doc.print-list .print-doc-meta {
  font-size: 11px;
}

.print-doc.print-list .print-doc-meta strong {
  font-size: 18px;
}

.print-doc.print-list .print-section h2 {
  font-size: 13px;
}

.print-doc.print-list .print-table,
.print-doc.print-list .table-wrap table {
  table-layout: fixed;
  font-size: 8.8px;
  line-height: 1.18;
}

.print-doc.print-list .print-table th,
.print-doc.print-list .print-table td,
.print-doc.print-list .table-wrap th,
.print-doc.print-list .table-wrap td {
  padding: 4px 5px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.print-doc.print-list .print-footer {
  font-size: 9.5px;
}

.detail-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.nested-detail:not(table) {
  display: grid;
  gap: 6px;
  margin: 0;
}

.nested-detail div,
.nested-detail td,
.nested-detail th {
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  font-size: 12px;
}

.nested-detail dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 120px;
  gap: 12px;
  align-items: center;
}

.bar-track {
  height: 14px;
  background: #e8eeeb;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.donut {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}

.donut-ring {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  position: relative;
}

.donut-ring::before {
  content: "";
  position: absolute;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: white;
}

.donut-ring span {
  position: relative;
  font-weight: 700;
  font-size: 22px;
}

.donut p {
  margin: 8px 0;
}

.donut i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 8px;
}

.columns {
  display: flex;
  min-height: 220px;
  align-items: end;
  gap: 22px;
  padding: 20px 6px 0;
}

.column-item {
  display: grid;
  justify-items: center;
  gap: 6px;
  flex: 1;
}

.column-bar {
  width: 52px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #7190ea, #2f7d57);
}

.column-item span {
  color: var(--muted);
  font-size: 12px;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 16%, rgba(47, 125, 87, .18), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(184, 135, 35, .14), transparent 26%),
    linear-gradient(135deg, #eef6f1 0%, #f8fbf9 48%, #eef4f0 100%);
}

.login-shell {
  width: min(900px, 100%);
  min-height: 0;
  height: min(620px, calc(100vh - 32px));
  display: grid;
  grid-template-columns: .88fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(47, 125, 87, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 28px 80px rgba(22, 54, 39, .16);
  backdrop-filter: blur(10px);
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(4, 53, 35, .94), rgba(8, 94, 61, .95)),
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, .18), transparent 24%);
}

.login-brand::before {
  content: none;
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  pointer-events: none;
}

.login-brand > * {
  position: relative;
  z-index: 1;
}

.login-mark {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
  border-radius: 18px;
  background: #f2bd49;
  color: #07351f;
}

.login-mark svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.login-brand span:not(.login-mark) {
  text-align: center;
  color: #cde8d8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-brand h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  text-align: center;
}

.login-brand p {
  max-width: 330px;
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.login-card {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(28px, 4vw, 52px);
  background: #fff;
}

.login-form-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-form-head h2 {
  margin: 6px 0 4px;
  color: #0b1720;
  font-size: clamp(28px, 3.5vw, 38px);
  line-height: 1;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: #56655f;
  font-size: 14px;
  font-weight: 700;
}

.login-card input {
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #d9e3de;
  border-radius: 12px;
  background: #fbfdfc;
  color: #0b1720;
  font: inherit;
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.login-card input:focus {
  border-color: #0f7a4f;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 122, 79, .12);
}

.login-card button {
  min-height: 50px;
  margin-top: 4px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 850;
}

@media (max-width: 760px) {
  .login {
    align-items: start;
    padding: 12px;
    overflow: auto;
  }

  .login-shell {
    width: min(440px, 100%);
    min-height: 0;
    height: auto;
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .login-brand {
    min-height: 0;
    padding: 22px 22px 18px;
  }

  .login-mark {
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
    border-radius: 15px;
  }

  .login-mark svg {
    width: 26px;
    height: 26px;
  }

  .login-brand span:not(.login-mark),
  .login-brand p {
    display: none;
  }

  .login-brand h1 {
    font-size: 30px;
  }

  .login-card {
    padding: 24px 22px 26px;
  }

  .login-form-head h2 {
    font-size: 28px;
  }

  .login-card input {
    min-height: 46px;
  }
}

@media (max-width: 420px) {
  .login {
    padding: 0;
    background: #fff;
  }

  .login-shell {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-brand {
    padding: 20px 18px 16px;
  }

  .login-card {
    padding: 22px 18px 26px;
  }

  .login-form-head span {
    font-size: 11px;
  }

  .login-form-head h2 {
    font-size: 26px;
  }

  .login-card button {
    min-height: 48px;
    font-size: 17px;
  }
}

.dashboard-screen {
  --bg: #f7faf8;
  --panel: #ffffff;
  --ink: #15231f;
  --muted: #60706b;
  --line: #e2ebe6;
  --accent: #08784f;
  --accent-2: #e6a817;
  --danger: #e03131;
  --shadow: 0 8px 24px rgba(0, 63, 45, .07);
  background: linear-gradient(135deg, #f3f8f5 0%, #ffffff 46%, #f6fbf8 100%);
  font-size: 13px;
}

.dashboard-screen .main {
  padding: 0 14px 18px;
}

.dashboard-screen .topbar {
  display: none;
}

.dashboard-screen .sidebar {
  width: 204px;
  padding: 14px 10px 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(18, 154, 103, .72) 0%, rgba(0, 78, 53, .32) 28%, transparent 48%),
    linear-gradient(180deg, #00492e 0%, #003a2b 48%, #002719 100%);
}

.dashboard-screen .main {
  margin-left: 204px;
}

.dashboard-screen .brand {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: center;
  margin: 0 0 15px;
  padding: 0 4px 12px;
  border-bottom: 0;
}

.dashboard-screen .logo-mark {
  width: 34px;
  height: 46px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: #f0b429;
}

.dashboard-screen .logo-mark svg {
  width: 31px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-screen .brand strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  color: white;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.dashboard-screen .brand span {
  color: #ffd873;
  font-size: 11px;
  letter-spacing: 3.2px;
  font-weight: 800;
}

.dashboard-screen nav {
  display: grid;
  gap: 5px;
}

.dashboard-screen nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-screen nav a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-screen nav a.active {
  background: linear-gradient(135deg, #0b965f, #08784f);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.16);
}

.side-card,
.user-card {
  margin-top: 14px;
  padding: 12px;
  border-radius: 9px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.13);
  color: white;
}

.side-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.side-card svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: rgba(255,255,255,.86);
}

.side-card span,
.user-card small {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: 11px;
}

.side-card strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
}

.user-card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0, 126, 82, .42);
}

.avatar,
.profile-dot {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.avatar {
  width: 42px;
  height: 42px;
  background: white;
  color: #08784f;
}

.avatar svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.online {
  color: #77ffbd !important;
}

.version {
  position: absolute;
  bottom: 18px;
  left: 18px;
  color: rgba(255,255,255,.6);
  font-size: 11px;
}

.executive-topbar {
  min-height: 70px;
  margin: 0 -14px 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border-bottom: 1px solid #e4ebe7;
  box-shadow: 0 5px 16px rgba(14, 48, 36, .06);
}

.title-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 0 0 470px;
  min-width: 0;
}

.title-wrap button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1d2a26;
  box-shadow: none;
}

.title-wrap button svg {
  width: 23px;
  height: 23px;
}

.title-wrap strong {
  display: block;
  color: #111d19;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
}

.title-wrap span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  margin-left: auto;
  min-width: 0;
  overflow: visible;
}

.period-tabs {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.chip,
.select-chip {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
  box-shadow: 0 4px 14px rgba(0, 63, 45, .05);
}

.period-tabs .chip {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.period-tabs .chip + .chip {
  border-left: 1px solid var(--line);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.custom-range svg {
  width: 13px;
  height: 13px;
}

.select-chip {
  min-width: 100px;
  justify-content: space-between;
  line-height: 1.1;
}

.select-chip small {
  display: block;
  margin-bottom: 3px;
  color: #81908b;
  font-size: 11px;
  font-weight: 800;
}

.select-chip strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.select-chip svg {
  width: 14px;
  height: 14px;
  color: #7d8b86;
}

.notification,
.profile-dot {
  position: relative;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 0;
  color: var(--ink);
}

.notification svg {
  width: 22px;
  height: 22px;
}

.notification::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid white;
  border-radius: 50%;
  background: #0aa65f;
}

.profile-dot {
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: white;
  border: 2px solid #e5f2ec;
  font-size: 13px;
}

@media (max-width: 1500px) {
  .executive-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .title-wrap {
    flex-basis: 100%;
  }

  .filters {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(135px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.kpi-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 9px;
  min-height: 108px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.kpi-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf7ef;
  color: var(--accent);
}

.kpi-card.down .kpi-icon {
  background: #ffe8e8;
  color: var(--danger);
}

.kpi-card.warn .kpi-icon {
  background: #fff5d9;
  color: #c79217;
}

.kpi-label,
.kpi-card em,
.kpi-trend {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.kpi-value {
  display: block;
  margin: 5px 0 7px;
  font-size: 20px;
  font-weight: 950;
}

.kpi-card.up .kpi-trend {
  color: var(--accent);
}

.kpi-card.down .kpi-trend {
  color: var(--danger);
}

.platform-admin-dashboard {
  display: grid;
  gap: 14px;
}

.platform-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 2px 0 4px;
}

.platform-admin-head h1 {
  margin: 0 0 3px;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.platform-admin-head p {
  margin: 0;
  color: #64736d;
  font-size: 13px;
}

.platform-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.platform-summary-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(10, 39, 27, .05);
}

.platform-summary-card.clickable {
  width: 100%;
  border-color: var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.platform-summary-card.clickable:hover {
  border-color: #b7d6c7;
  box-shadow: 0 12px 28px rgba(10, 39, 27, .09);
  transform: translateY(-1px);
}

.platform-summary-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
}

.platform-summary-icon svg {
  width: 20px;
  height: 20px;
}

.platform-summary-card.green .platform-summary-icon { color: #166534; background: #dcfce7; }
.platform-summary-card.blue .platform-summary-icon { color: #1e40af; background: #dbeafe; }
.platform-summary-card.yellow .platform-summary-icon { color: #92400e; background: #fef3c7; }
.platform-summary-card.purple .platform-summary-icon { color: #6b21a8; background: #f3e8ff; }
.platform-summary-card.red .platform-summary-icon { color: #991b1b; background: #fee2e2; }

.platform-summary-body {
  min-width: 0;
}

.platform-summary-body span {
  display: block;
  color: #53665e;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.platform-summary-body strong {
  display: block;
  margin: 6px 0 4px;
  color: #071822;
  font-size: 25px;
  line-height: 1.04;
  white-space: normal;
  overflow-wrap: anywhere;
}

.platform-summary-body small {
  display: block;
  color: #66766f;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
}

.platform-revenue-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.platform-revenue-strip article {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(47, 138, 84, .08), rgba(255, 255, 255, .96) 45%),
    #fff;
  box-shadow: 0 8px 22px rgba(10, 39, 27, .045);
}

.platform-revenue-strip span {
  display: block;
  color: #53665e;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.platform-revenue-strip strong {
  display: block;
  margin: 5px 0 3px;
  color: #071822;
  font-size: 22px;
  line-height: 1.08;
}

.platform-revenue-strip small {
  color: #66766f;
  font-size: 11px;
  font-weight: 700;
}

.platform-command-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) repeat(4, minmax(190px, .7fr));
  gap: 12px;
}

.platform-command-card,
.platform-stat-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(10, 39, 27, .055);
}

.platform-command-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  min-height: 150px;
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.16), transparent 28%),
    linear-gradient(135deg, #06442f, #117142);
}

.platform-command-copy span {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.platform-command-copy h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 30px;
  line-height: 1.04;
}

.platform-command-copy p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  line-height: 1.45;
}

.platform-command-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 8px;
  align-content: end;
  min-width: 245px;
}

.platform-command-metrics div {
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
}

.platform-command-metrics strong {
  display: block;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.platform-command-metrics span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.platform-stat-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 150px;
  padding: 17px;
  overflow: hidden;
}

.platform-stat-card::after {
  content: "";
  position: absolute;
  inset: auto -22px -34px auto;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: currentColor;
  opacity: .055;
}

.platform-stat-icon,
.platform-mini-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
}

.platform-stat-icon svg,
.platform-mini-icon svg {
  width: 20px;
  height: 20px;
}

.platform-stat-card.green { color: #166534; }
.platform-stat-card.blue { color: #1e40af; }
.platform-stat-card.yellow { color: #92400e; }
.platform-stat-card.purple { color: #6b21a8; }
.platform-stat-card.red { color: #991b1b; }

.platform-stat-card.green .platform-stat-icon,
.platform-mini-icon.green { background: #dcfce7; color: #166534; }
.platform-stat-card.blue .platform-stat-icon,
.platform-mini-icon.blue { background: #dbeafe; color: #1e40af; }
.platform-stat-card.yellow .platform-stat-icon,
.platform-mini-icon.yellow { background: #fef3c7; color: #92400e; }
.platform-stat-card.purple .platform-stat-icon,
.platform-mini-icon.purple { background: #f3e8ff; color: #6b21a8; }
.platform-stat-card.red .platform-stat-icon,
.platform-mini-icon.red { background: #fee2e2; color: #991b1b; }

.platform-stat-body {
  min-width: 0;
}

.platform-stat-body span,
.platform-mini-card span {
  color: #30443b;
  font-size: 12px;
  line-height: 1.22;
  font-weight: 850;
}

.platform-stat-body strong {
  display: block;
  margin: 7px 0 5px;
  color: #061923;
  font-size: 24px;
  line-height: 1.08;
  word-break: normal;
  overflow-wrap: normal;
}

.platform-stat-body small,
.platform-mini-card small {
  color: #64736d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.32;
}

.platform-stat-visual {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.platform-spark-bars,
.platform-pulse-line {
  display: flex;
  align-items: end;
  gap: 3px;
  min-width: 76px;
  height: 50px;
}

.platform-spark-bars i {
  width: 7px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #8bb3ff, #3b82f6);
}

.platform-pulse-line {
  align-items: center;
}

.platform-pulse-line i {
  width: 14px;
  border-radius: 999px;
  background: #dfeae5;
}

.platform-pulse-line i:nth-child(1) { height: 22px; }
.platform-pulse-line i:nth-child(2) { height: 34px; }
.platform-pulse-line i:nth-child(3) { height: 26px; }
.platform-pulse-line i:nth-child(4) { height: 38px; }
.platform-pulse-line i:nth-child(5) { height: 30px; }
.platform-pulse-line.green i { background: #2f8a54; }
.platform-pulse-line.yellow i { background: #d79012; }
.platform-pulse-line.red i { background: #dc2626; }

.platform-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .9fr);
  gap: 12px;
  align-items: start;
}

.platform-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr);
  gap: 12px;
  align-items: start;
}

.platform-business-list-grid {
  grid-template-columns: 1fr;
}

.platform-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(10, 39, 27, .055);
}

.platform-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.platform-panel-head h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.platform-panel-head span,
.platform-panel-head a {
  color: #66766f;
  font-size: 12px;
  font-weight: 750;
}

.platform-trend-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  min-height: 150px;
  align-items: end;
  padding: 10px 6px 0;
  border-bottom: 1px solid #d9e4df;
  background: linear-gradient(180deg, transparent, rgba(47, 138, 84, .045));
}

.platform-trend-item {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-items: end;
}

.platform-trend-item strong {
  color: #2f8a54;
  font-size: 12px;
}

.platform-trend-item span {
  width: 100%;
  max-width: 38px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #2f8a54, rgba(47, 138, 84, .18));
}

.platform-trend-item small {
  min-height: 30px;
  color: #6b7a74;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}

.platform-status-split {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.platform-donut {
  display: grid;
  place-items: center;
  width: 126px;
  height: 126px;
  border-radius: 50%;
}

.platform-donut span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #fff;
  text-align: center;
}

.platform-donut strong {
  font-size: 23px;
  line-height: 1;
}

.platform-donut small {
  color: #66766f;
  font-size: 11px;
}

.platform-status-legend {
  display: grid;
  gap: 10px;
}

.platform-status-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  color: #32483f;
  font-size: 12px;
}

.platform-status-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.platform-status-legend i.green { background: #2f8a54; }
.platform-status-legend i.gray { background: #9ca3af; }
.platform-status-legend i.orange { background: #f59e0b; }

.platform-action-list,
.platform-alert-list {
  display: grid;
  gap: 8px;
}

.platform-action-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #12221d;
  text-decoration: none;
  background: #fbfdfc;
}

.platform-action-list a > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #166534;
  background: #e7f5ec;
}

.platform-action-list svg {
  width: 17px;
  height: 17px;
}

.platform-action-list strong {
  display: block;
  font-size: 12px;
  line-height: 1.15;
}

.platform-action-list small {
  display: block;
  color: #64736d;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
}

.platform-alert-list a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #13251f;
  text-decoration: none;
  background: #fff;
}

.platform-alert-list a > span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.platform-alert-list a.red > span { background: radial-gradient(circle, #dc2626 0 28%, #fee2e2 30% 100%); }
.platform-alert-list a.yellow > span { background: radial-gradient(circle, #d79012 0 28%, #fef3c7 30% 100%); }
.platform-alert-list a.green > span { background: radial-gradient(circle, #16a34a 0 28%, #dcfce7 30% 100%); }

.platform-alert-list strong {
  display: block;
  font-size: 12px;
}

.platform-alert-list small {
  display: block;
  margin-top: 2px;
  color: #64736d;
  font-size: 11px;
  line-height: 1.3;
}

.platform-alert-modal {
  max-width: min(620px, calc(100vw - 28px));
}

.platform-alert-modal-body {
  max-height: min(58vh, 480px);
  overflow: auto;
}

.platform-list-tools {
  margin-bottom: 10px;
}

.platform-table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}

.platform-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.platform-table th {
  color: #34483f;
  background: #eef5f1;
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.platform-table th,
.platform-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pill.success {
  color: #166534;
  background: #dcfce7;
}

.status-pill.success::before { background: #16a34a; }

.status-pill.muted {
  color: #4b5563;
  background: #eef2f1;
}

.status-pill.muted::before { background: #6b7280; }

.status-pill.danger {
  color: #991b1b;
  background: #fee2e2;
}

.status-pill.danger::before { background: #dc2626; }

.settings-overview-panel {
  overflow: hidden;
}

.settings-overview {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.settings-brand-card,
.settings-summary-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(10, 39, 27, .045);
}

.settings-brand-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #06442f, #147a47);
}

.settings-brand-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  overflow: hidden;
}

.settings-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-brand-mark span {
  color: #fff;
  font-size: 22px;
  font-weight: 950;
}

.settings-brand-card span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, .75);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.settings-brand-card strong {
  display: block;
  color: #fff;
  font-size: 23px;
  line-height: 1.12;
}

.settings-brand-card small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, .8);
  font-size: 12px;
  line-height: 1.35;
}

.settings-summary-card {
  padding: 16px;
}

.settings-summary-card h3 {
  margin: 0 0 12px;
  color: #071822;
  font-size: 15px;
  line-height: 1.2;
}

.settings-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.settings-summary-grid .settings-summary-card {
  display: grid;
  gap: 7px;
  padding: 15px 16px;
}

.settings-summary-grid .settings-summary-card span {
  color: #68776f;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.settings-summary-grid .settings-summary-card strong {
  color: #10231d;
  font-size: 15px;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .settings-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .settings-summary-grid {
    grid-template-columns: 1fr;
  }
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid #edf3ef;
}

.settings-row:first-of-type {
  border-top: 0;
}

.settings-row span {
  color: #68776f;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.settings-row strong {
  min-width: 0;
  color: #10231d;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.executive-grid {
  display: grid;
  grid-template-columns: 2.1fr 1.25fr .95fr 1.1fr;
  gap: 10px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.3fr .75fr .75fr 1.05fr 1.25fr;
  gap: 10px;
  margin-top: 10px;
}

.dashboard-screen .panel {
  padding: 13px;
  margin-bottom: 0;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(0, 63, 45, .055);
  min-width: 0;
}

.span-2 {
  grid-column: span 2;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.panel-head span,
.panel-head a {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.line-chart svg {
  width: 100%;
  min-height: 210px;
}

.line-chart.compact svg {
  min-height: 120px;
}

.line-chart text {
  fill: var(--muted);
  font-size: 10px;
}

.chart-legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chart-legend i {
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 5px;
  border-radius: 999px;
  vertical-align: middle;
}

.chart-legend .green { background: var(--accent); }
.chart-legend .gold { background: var(--accent-2); }
.chart-legend .teal { background: #0f766e; }
.chart-legend .red { background: var(--danger); }

.sales-performance {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.mini-metric,
.ratio-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
}

.mini-metric small,
.mini-metric em,
.ratio-card span,
.electric-grid small,
.electric-ratio span {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.mini-metric strong,
.ratio-card strong {
  display: block;
  font-size: 13px;
  margin: 4px 0;
}

.stack-bar {
  display: flex;
  overflow: hidden;
  height: 17px;
  margin-top: 8px;
  border-radius: 999px;
  background: #eef2ef;
}

.stack-bar i,
.stack-bar b {
  display: block;
}

.stack-bar i { background: var(--accent); }
.stack-bar b { background: var(--danger); }

.util-list {
  display: grid;
  gap: 12px;
}

.util-row {
  display: grid;
  grid-template-columns: 118px 1fr 42px;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  font-weight: 750;
}

.util-row small {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 10px;
}

.bar-bg {
  height: 9px;
  background: #edf2ef;
  overflow: hidden;
  border-radius: 999px;
}

.bar-bg i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar-bg .red { background: var(--danger); }
.bar-bg .orange { background: #f08c00; }
.bar-bg .gold { background: var(--accent-2); }
.bar-bg .green { background: var(--accent); }

.mini-table {
  width: 100%;
  overflow-x: auto;
}

.mini-table table {
  min-width: 0;
}

.mini-table th,
.mini-table td {
  padding: 8px 7px;
  font-size: 11px;
}

.milling-panel {
  display: grid;
  gap: 12px;
}

.milling-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.milling-lower {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}

.gauge {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at center, white 51%, transparent 52%), conic-gradient(var(--accent) 0 82%, #e7eee9 82% 100%);
}

.gauge strong {
  font-size: 19px;
}

.gauge span {
  color: var(--muted);
  font-size: 10px;
}

.donut {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: center;
}

.donut-ring {
  width: 140px;
  height: 140px;
}

.donut-ring::before {
  width: 86px;
  height: 86px;
}

.donut-ring span {
  font-size: 18px;
}

.donut p {
  font-size: 11px;
  font-weight: 750;
}

.alert-list,
.insight-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.alert-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.alert-item strong {
  font-size: 11px;
}

.alert-item span {
  color: var(--muted);
  font-size: 11px;
}

.alert-item time {
  grid-row: span 2;
  color: var(--muted);
  font-size: 10px;
}

.alert-item.danger {
  border-color: #ffd0d0;
  background: #fff8f8;
}

.alert-item.warn {
  border-color: #ffe0b2;
  background: #fff9ef;
}

.alert-item.info {
  border-color: #cde8ff;
  background: #f3f9ff;
}

.alert-item.ok {
  border-color: #c7eed8;
  background: #f4fbf7;
}

.approval-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.approval-summary strong {
  font-size: 30px;
  color: var(--danger);
}

.mini-stat {
  position: relative;
  overflow: hidden;
  min-height: 176px;
}

.mini-stat strong {
  display: block;
  margin-top: 12px;
  font-size: 31px;
}

.mini-stat span {
  color: var(--muted);
  font-size: 12px;
}

.mini-stat > div {
  display: none;
}

.electric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.electric-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.electric-ratio {
  margin-top: 16px;
}

.electric-ratio strong {
  display: block;
  margin: 4px 0 8px;
  font-size: 23px;
}

.mini-bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 52px;
}

.mini-bars i,
.mini-bars b {
  width: 10px;
  border-radius: 5px 5px 0 0;
}

.mini-bars i { background: var(--danger); }
.mini-bars b { background: var(--accent); }
.mini-bars i:nth-child(1) { height: 24px; }
.mini-bars i:nth-child(2) { height: 41px; }
.mini-bars i:nth-child(3) { height: 30px; }
.mini-bars b:nth-child(4) { height: 43px; }
.mini-bars b:nth-child(5) { height: 35px; }
.mini-bars b:nth-child(6) { height: 27px; }

.insight-list {
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.insight-list li {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 7px;
}

.insight-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 900px) {
  .sidebar {
    width: min(82vw, 300px);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }

  .top-ribbon {
    margin: -16px -16px 18px;
  }

  .main {
    margin-left: 0;
    padding: 16px;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(5, 24, 16, .42);
  }

  .sidebar-collapsed .sidebar {
    display: block;
  }

  .metric-grid,
  .grid-form,
  .dashboard-grid,
  .setup-grid,
  .action-grid,
  .action-grid .grid-form {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .donut,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .executive-toolbar,
  .split-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .executive-kpis,
  .executive-grid,
  .kpi-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .progress-list div {
    grid-template-columns: 1fr 1fr 48px;
  }

  .dashboard-screen .main {
    margin-left: 0;
    padding: 12px;
  }

  .dashboard-screen .sidebar {
    width: min(82vw, 300px);
  }

  .executive-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin: -12px -12px 12px;
  }

  .title-wrap {
    flex-basis: 100%;
  }

  .title-wrap strong {
    white-space: normal;
    font-size: 19px;
  }

  .filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .kpi-grid,
  .executive-grid,
  .bottom-grid,
  .milling-top,
  .milling-lower,
  .donut {
    grid-template-columns: 1fr;
  }
}

/* Executive shell adapted from the supplied dashboard HTML. */
.dashboard-screen {
  --bg: #f0f2f5;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #0f3d2e;
  --accent-2: #d4a843;
  --danger: #dc2626;
  --shadow: 0 1px 3px rgba(0,0,0,.05);
  background: #f0f2f5;
  color: #1f2937;
  font-size: 13px;
}

.dashboard-screen .sidebar {
  width: 220px;
  height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #0f3d2e;
  box-shadow: none;
}

.dashboard-screen .main {
  margin-left: 220px;
  min-height: 100vh;
  padding: 0;
}

.dashboard-screen .logo-area {
  display: flex;
  align-items: center;
  grid-template-columns: none;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.dashboard-screen .logo-mark {
  width: 36px;
  height: 36px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  border-radius: 6px;
  background: #d4a843;
  color: #0f3d2e;
}

.dashboard-screen .logo-mark svg {
  width: 22px;
  height: 22px;
}

.dashboard-screen .brand strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.dashboard-screen .brand span {
  display: block;
  margin-top: 1px;
  color: #d4a843;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1px;
}

.dashboard-screen .nav-menu {
  flex: 1;
  display: block;
  padding: 12px 0;
}

.dashboard-screen .nav-item {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 0;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.dashboard-screen .nav-item:hover {
  background: rgba(255,255,255,.05);
  color: #fff;
}

.dashboard-screen .nav-item.active {
  background: #1a5c45;
  color: #fff;
  border-left: 3px solid #d4a843;
  box-shadow: none;
}

.dashboard-screen .nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke-width: 1.9;
}

.dashboard-screen .season-box {
  margin: 16px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: #fff;
}

.dashboard-screen .season-label {
  color: rgba(255,255,255,.5);
  font-size: 10px;
  margin-bottom: 4px;
}

.dashboard-screen .season-value {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.dashboard-screen .user-box {
  margin: 0;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.1);
  border-radius: 0;
  background: transparent;
}

.dashboard-screen .user-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #1a5c45;
  color: #fff;
}

.dashboard-screen .user-avatar svg {
  width: 17px;
  height: 17px;
}

.dashboard-screen .user-name {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-screen .user-role {
  color: rgba(255,255,255,.5);
  font-size: 10px;
}

.dashboard-screen .user-status {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: #4ade80 !important;
  font-size: 10px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}

.dashboard-screen .version {
  position: static;
  margin: 0 16px 14px;
  color: rgba(255,255,255,.5);
  font-size: 10px;
}

.dashboard-screen .executive-topbar {
  min-height: 0;
  margin: 0;
  padding: 10px 18px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 9px 14px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: none;
}

.header-left,
.header-center,
.header-right {
  display: flex;
  align-items: center;
}

.header-left {
  grid-column: 1 / -1;
  gap: 14px;
  min-width: 0;
}

.dashboard-screen .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  box-shadow: none;
}

.dashboard-screen .menu-toggle svg {
  width: 20px;
  height: 20px;
}

.header-title h1 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

.mobile-title {
  display: none;
}

.header-title p {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 12px;
}

.header-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-center {
  grid-column: 1;
  gap: 7px;
  justify-content: flex-start;
  min-width: max-content;
}

.date-pill {
  min-height: 0;
  padding: 6px 13px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.date-pill.active {
  background: #0f3d2e;
  border-color: #0f3d2e;
  color: #fff;
}

.date-pill svg {
  width: 11px;
  height: 11px;
  margin-left: 4px;
  vertical-align: -1px;
}

.dashboard-period-form {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: visible;
  scrollbar-width: none;
}

.dashboard-period-form::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.date-range-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px;
  border: 1px solid #dbe5df;
  border-radius: 22px;
  background: #fff;
  overflow: visible;
  scrollbar-width: none;
}

.date-range-control::-webkit-scrollbar {
  display: none;
}

.date-range-control.active {
  border-color: #0f7a4f;
  box-shadow: 0 0 0 3px rgba(15, 122, 79, .1);
}

.date-range-control.has-error {
  border-color: #b42318;
  margin-bottom: 18px;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .12);
}

.date-range-control label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #65756f;
  font-size: 11px;
  font-weight: 700;
}

.date-range-control input {
  width: 108px;
  min-height: 0;
  padding: 5px 6px;
  border: 0;
  border-radius: 16px;
  background: #f5f8f6;
  color: #111827;
  font-size: 12px;
  outline: 0;
}

.date-range-control button {
  width: auto;
  min-height: 0;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 12px;
}

.date-range-control button:disabled {
  background: #eef3ef;
  color: #98a29d;
  cursor: not-allowed;
  box-shadow: none;
}

.range-error {
  position: absolute;
  left: 12px;
  top: calc(100% + 4px);
  width: calc(100% - 24px);
  color: #b42318;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.header-right {
  grid-column: 2;
  gap: 10px;
  justify-content: flex-end;
  margin: 0;
  overflow: visible;
  min-width: 0;
}

.filter-dropdown {
  position: relative;
  width: 128px;
  flex: 1 1 128px;
  max-width: 176px;
  min-height: 36px;
  color: #374151;
  font-size: 12px;
  z-index: 5;
}

.filter-dropdown > span {
  position: absolute;
  left: 13px;
  top: 6px;
  z-index: 1;
  color: #6b7280;
  font-weight: 600;
  pointer-events: none;
}

.filter-dropdown-trigger {
  width: 100%;
  min-height: 42px;
  padding: 16px 26px 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #dbe5df;
  border-radius: 9px;
  background: linear-gradient(180deg, #fff 0%, #f8fbf9 100%);
  color: #111827;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  cursor: pointer;
}

.filter-dropdown.open,
.filter-dropdown:focus-within {
  z-index: 30;
}

.filter-dropdown.open .filter-dropdown-trigger,
.filter-dropdown-trigger:focus {
  border-color: #0f7a4f;
  box-shadow: 0 0 0 3px rgba(15, 122, 79, .12);
  outline: 0;
}

.filter-dropdown-trigger strong {
  min-width: 0;
  color: #0b1720;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-screen .filter-dropdown-trigger strong {
  margin-top: 1px;
}

.filter-dropdown select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.filter-dropdown-trigger svg {
  position: absolute;
  right: 10px;
  top: 18px;
  width: 10px;
  height: 10px;
  color: #9ca3af;
  pointer-events: none;
}

.filter-dropdown.open .filter-dropdown-trigger svg {
  transform: rotate(180deg);
}

.period-select.open .filter-dropdown-trigger svg {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #dbe5df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(12, 29, 22, .18);
}

.filter-dropdown.open .filter-dropdown-menu {
  display: grid;
  gap: 3px;
}

.period-select {
  position: relative;
  width: 148px;
  flex: 0 0 148px;
  max-width: 148px;
  min-height: 42px;
  color: #374151;
  font-size: 12px;
  z-index: 70;
}

.period-select > span {
  position: absolute;
  left: 13px;
  top: 6px;
  z-index: 1;
  color: #6b7280;
  font-weight: 600;
  pointer-events: none;
}

.period-select select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.period-select.open {
  z-index: 999;
}

.period-select .period-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  z-index: 9999;
  display: none;
  gap: 3px;
  width: 210px;
  max-height: min(320px, calc(100vh - 110px));
  overflow: auto;
}

.period-select.open .period-select-menu {
  display: grid;
}

.dashboard-screen .period-select.open .period-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  display: grid !important;
  width: 210px;
  max-height: min(340px, calc(100vh - 150px));
  overflow: auto;
  z-index: 9999;
}

.filter-dropdown-menu button {
  width: 100%;
  min-height: 0;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #24332c;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.filter-dropdown-menu button:hover,
.filter-dropdown-menu button.active {
  background: #eaf6ef;
  color: #0f5f3a;
}

.auto-code-field {
  gap: 8px;
}

.auto-code-field.is-auto input:not([type="checkbox"]) {
  background: #f4f8f5;
  color: #6b7280;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34554a;
  font-size: 13px;
  font-weight: 700;
}

.inline-check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: #0f7a4f;
}

.notif-btn {
  position: relative;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #fff;
  color: #111827;
}

.notif-btn svg {
  width: 18px;
  height: 18px;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.user-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0f3d2e;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
}

.profile-menu {
  position: relative;
  flex: 0 0 auto;
}

.profile-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-menu summary::marker {
  content: "";
  font-size: 0;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  min-width: 190px;
  padding: 12px;
  display: grid;
  gap: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 61, 46, .16);
}

.profile-menu strong {
  color: #111827;
  font-size: 13px;
}

.profile-menu span {
  color: #6b7280;
  font-size: 11px;
}

.profile-menu a {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef2f0;
  color: #0f3d2e;
  font-weight: 750;
  text-decoration: none;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 24, 17, .48);
}

.confirm-box {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid #dfe8e3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 24, 17, .24);
}

.confirm-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.confirm-box p {
  margin: 0;
  color: #60706b;
}

.confirm-reason {
  margin-top: 14px;
}

.confirm-reason textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.confirm-box div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.confirm-box [data-confirm-cancel] {
  background: #eef4f0;
  color: #1e2925;
}

.dashboard-screen .kpi-grid {
  padding: 20px 24px 0;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.dashboard-screen .kpi-card {
  min-height: 0;
  display: block;
  padding: 14px;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.dashboard-screen .dashboard {
  padding: 18px 22px;
}

.dashboard-screen .kpi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 18px;
}

.dashboard-screen .kpi-row .kpi-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.dashboard-screen .kpi-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.dashboard-screen .kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-screen .kpi-icon svg {
  width: 16px;
  height: 16px;
}

.dashboard-screen .kpi-icon.green { background: #dcfce7; color: #166534; }
.dashboard-screen .kpi-icon.blue { background: #dbeafe; color: #1e40af; }
.dashboard-screen .kpi-icon.yellow { background: #fef3c7; color: #92400e; }
.dashboard-screen .kpi-icon.orange { background: #ffedd5; color: #9a3412; }
.dashboard-screen .kpi-icon.red { background: #fee2e2; color: #991b1b; }
.dashboard-screen .kpi-icon.teal { background: #ccfbf1; color: #115e59; }
.dashboard-screen .kpi-icon.purple { background: #f3e8ff; color: #6b21a8; }

.dashboard-screen .kpi-label {
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
}

.dashboard-screen .kpi-value {
  margin: 0 0 6px;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
}

.dashboard-screen .kpi-unit {
  font-size: .58em;
  font-weight: 750;
  letter-spacing: 0;
  vertical-align: baseline;
}

.dashboard-screen .kpi-change {
  color: #16a34a;
  font-size: 11px;
  font-weight: 650;
}

.dashboard-screen .kpi-change.down {
  color: #dc2626;
}

.dashboard-screen .kpi-vs {
  margin-top: 2px;
  color: #9ca3af;
  font-size: 10px;
}

.dashboard-screen .section-row {
  display: grid;
  gap: 15px;
  margin-bottom: 15px;
}

.dashboard-screen .section-row.three-col {
  grid-template-columns: 1.4fr .9fr .7fr;
}

.dashboard-screen .section-row.four-col {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.dashboard-screen .section-row.bottom-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-screen .section-row.storage-intelligence-row {
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, .9fr);
}

.dashboard-screen .section-row.break-even-row {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-screen .card {
  min-width: 0;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.dashboard-screen .stacked-cards {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dashboard-screen .break-even-card {
  overflow: hidden;
}

.dashboard-screen .break-even {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.9fr);
  gap: 14px;
}

.dashboard-screen .break-even-main {
  padding: 18px;
  border: 1px solid #d6eadf;
  border-radius: 16px;
  background: #f2faf5;
}

.dashboard-screen .break-even-main strong {
  display: block;
  margin: 6px 0;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.05;
}

.dashboard-screen .break-even-main p {
  margin: 0 0 12px;
  color: #53645e;
  line-height: 1.4;
}

.dashboard-screen .break-even-main small {
  color: #64736e;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-screen .break-even-progress {
  height: 12px;
  margin: 10px 0 8px;
  background: #e5eee9;
}

.dashboard-screen .break-even-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-screen .break-even-grid .basic-cost-insight {
  min-height: 126px;
}

.dashboard-screen .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-screen .card-title {
  color: #374151;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-screen .card-dropdown {
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #6b7280;
  font-size: 11px;
}

.dashboard-screen .chart-container {
  min-height: 200px;
}

.dashboard-screen .span-2 {
  grid-column: span 2;
}

.dashboard-screen .storage-command {
  background:
    linear-gradient(135deg, rgba(7, 78, 59, .98), rgba(22, 101, 52, .94)),
    #064e3b;
  border-color: transparent;
  color: #fff;
}

.dashboard-screen .storage-command .card-title,
.dashboard-screen .storage-command .view-link,
.dashboard-screen .storage-command .muted {
  color: #fff;
}

.dashboard-screen .storage-command .view-link {
  opacity: .86;
}

.dashboard-screen .storage-command-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) repeat(3, minmax(110px, 1fr));
  gap: 11px;
}

.dashboard-screen .storage-companion {
  display: grid;
  align-content: start;
  gap: 18px;
}

.dashboard-screen .storage-block + .storage-block {
  border-top: 1px solid #e5ece8;
  padding-top: 18px;
}

.dashboard-screen .storage-lead,
.dashboard-screen .storage-metric {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.11);
  padding: 13px;
}

.dashboard-screen .storage-lead {
  grid-row: span 2;
  display: grid;
  align-content: start;
  gap: 7px;
}

.dashboard-screen .storage-lead small,
.dashboard-screen .storage-metric small {
  color: rgba(255,255,255,.76);
  font-size: 11px;
  font-weight: 700;
}

.dashboard-screen .storage-lead strong {
  font-size: 28px;
  line-height: 1.1;
}

.dashboard-screen .storage-lead span,
.dashboard-screen .storage-metric span {
  color: rgba(255,255,255,.76);
  font-size: 11px;
  line-height: 1.35;
}

.dashboard-screen .storage-metric {
  display: grid;
  gap: 5px;
  align-content: start;
}

.dashboard-screen .storage-metric strong {
  font-size: 15px;
  line-height: 1.2;
}

.dashboard-screen .storage-warehouses,
.dashboard-screen .revenue-mix {
  display: grid;
  gap: 12px;
}

.dashboard-screen .storage-warehouses > div {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
}

.dashboard-screen .storage-warehouses span,
.dashboard-screen .mix-row span {
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-screen .storage-warehouses strong,
.dashboard-screen .mix-row strong {
  color: #111827;
  font-size: 12px;
}

.dashboard-screen .storage-warehouses > div > div {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e8f0eb;
}

.dashboard-screen .storage-warehouses i,
.dashboard-screen .mix-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #22c55e);
}

.dashboard-screen .storage-warehouses small {
  grid-column: 1 / -1;
  color: #6b7280;
  font-size: 11px;
}

.dashboard-screen .mix-row {
  display: grid;
  grid-template-columns: 58px minmax(88px, 1fr) auto;
  gap: 5px 9px;
  align-items: center;
}

.dashboard-screen .mix-row > div {
  overflow: hidden;
  height: 11px;
  border-radius: 999px;
  background: #edf2ef;
}

.dashboard-screen .mix-row small {
  grid-column: 3;
  color: #6b7280;
  font-size: 11px;
  text-align: right;
}

.dashboard-screen .donut p small {
  color: #6b7280;
  font-size: .88em;
  font-weight: 650;
}

.dashboard-screen .mix-row.tone-2 i {
  background: linear-gradient(90deg, #c0841a, #f59e0b);
}

.dashboard-screen .mix-row.tone-3 i {
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}

@media (max-width: 1500px) {
  .dashboard-screen .executive-topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    overflow: visible;
  }

  .header-left {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .header-center,
  .header-right {
    overflow: visible;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .header-right {
    overflow: visible;
  }
}

@media (min-width: 901px) {
  .dashboard-screen .executive-topbar {
    align-items: center;
  }

  .header-left {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .header-center {
    grid-column: 1;
    min-width: max-content;
  }

  .header-right {
    grid-column: 2;
    min-width: 0;
    overflow: visible;
  }
}

@media (max-width: 900px) {
  .dashboard-screen .sidebar {
    width: min(82vw, 300px);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }

  .dashboard-screen .main {
    margin-left: 0;
    padding: 0;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .dashboard-screen .executive-topbar {
    padding: 10px 14px;
    display: grid;
  }

  .header-left,
  .header-center,
  .header-right {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .header-right {
    overflow: visible;
  }

  .header-title h1 {
    font-size: 16px;
  }

  .dashboard-screen .kpi-grid {
    padding: 14px;
    grid-template-columns: 1fr;
  }

  .dashboard-screen .dashboard {
    padding: 14px;
  }

  .dashboard-screen .kpi-row,
  .dashboard-screen .section-row.break-even-row,
  .dashboard-screen .section-row.storage-intelligence-row,
  .dashboard-screen .section-row.three-col,
  .dashboard-screen .section-row.four-col,
  .dashboard-screen .section-row.bottom-row {
    grid-template-columns: 1fr;
  }

  .dashboard-screen .break-even {
    grid-template-columns: 1fr;
  }

  .dashboard-screen .break-even-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-screen .span-2 {
    grid-column: span 1;
  }

  .dashboard-screen .storage-command-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-screen .storage-lead {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* Unified executive sidebar across all pages. Keep this late so old page rules do not distort it. */
.sidebar {
  width: 220px;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #0f3d2e;
  box-shadow: none;
}

.main {
  margin-left: 220px;
  padding-left: 18px;
  padding-right: 18px;
}

.logo-area,
.dashboard-screen .logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.logo-mark,
.dashboard-screen .logo-mark {
  width: 36px;
  height: 36px;
  margin: 0;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #d4a843;
  color: #0f3d2e;
}

.logo-mark svg,
.dashboard-screen .logo-mark svg,
.sidebar svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-mark svg,
.dashboard-screen .logo-mark svg {
  width: 22px;
  height: 22px;
}

.brand,
.dashboard-screen .brand {
  line-height: 1.1;
  margin: 0;
}

.brand strong,
.dashboard-screen .brand strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.brand span,
.dashboard-screen .brand span {
  display: block;
  margin-top: 2px;
  color: #d4a843;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-menu,
.dashboard-screen .nav-menu {
  flex: 1;
  display: block;
  padding: 10px 0;
  overflow: visible;
}

.nav-item,
.dashboard-screen .nav-item {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 0;
  color: rgba(255,255,255,.74);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.nav-item svg,
.dashboard-screen .nav-item svg,
.nav-group summary svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: currentColor;
}

.nav-item:hover,
.dashboard-screen .nav-item:hover {
  background: rgba(255,255,255,.05);
  color: #fff;
}

.nav-item.active,
.dashboard-screen .nav-item.active {
  background: #1a5c45;
  color: #fff;
  border-left: 3px solid #d4a843;
  box-shadow: none;
}

.nav-group {
  margin: 2px 0;
}

.nav-group summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: rgba(255,255,255,.68);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary svg:last-child {
  margin-left: auto;
  width: 13px;
  height: 13px;
  transition: transform .18s ease;
}

.nav-group[open] summary svg:last-child {
  transform: rotate(180deg);
}

.nav-group div {
  padding: 2px 0 6px;
}

.nav-group .nav-item {
  padding-left: 31px;
}

.season-box,
.dashboard-screen .season-box {
  margin: 12px 16px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
}

.season-label,
.dashboard-screen .season-label {
  color: rgba(255,255,255,.5);
  font-size: 10px;
}

.season-value,
.dashboard-screen .season-value {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.user-box,
.dashboard-screen .user-box {
  margin: 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.1);
  border-radius: 0;
  background: transparent;
}

.user-avatar,
.dashboard-screen .user-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #1a5c45;
  color: #fff;
}

.user-avatar svg,
.dashboard-screen .user-avatar svg {
  width: 17px;
  height: 17px;
}

.user-name,
.dashboard-screen .user-name {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.user-role,
.dashboard-screen .user-role {
  color: rgba(255,255,255,.5);
  font-size: 10px;
}

.user-status,
.dashboard-screen .user-status {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #4ade80 !important;
  font-size: 10px;
}

.version,
.dashboard-screen .version {
  position: static;
  margin: 0 16px 14px;
  color: rgba(255,255,255,.5);
  font-size: 10px;
}

.sidebar-collapsed .sidebar,
.sidebar-collapsed.dashboard-screen .sidebar {
  display: none;
}

.sidebar-collapsed .main,
.sidebar-collapsed.dashboard-screen .main {
  margin-left: 0;
}

.insight-modal {
  width: min(640px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #f7fbf8;
  box-shadow: 0 24px 70px rgba(3, 31, 21, .3);
}

.insight-modal::backdrop {
  background: rgba(5, 23, 16, .58);
  backdrop-filter: blur(2px);
}

.insight-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: #fff;
  background: #075f3d;
}

.insight-modal-head span {
  display: block;
  color: #bbf7d0;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.insight-modal-head h2 {
  margin: 4px 0 2px;
  color: #fff;
  font-size: 22px;
  line-height: 1.1;
}

.insight-modal-head p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 13px;
}

.insight-modal-head .icon-btn {
  width: 42px !important;
  height: 42px;
  flex: 0 0 auto;
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  color: #fff;
}

.insight-modal-body {
  max-height: min(500px, calc(100vh - 198px));
  overflow: auto;
  padding: 16px 22px;
}

.insight-modal-body ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insight-modal-body li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid #dbe9e2;
  border-radius: 9px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 6px 18px rgba(15, 61, 46, .05);
}

.insight-modal-body li i {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: #d97706;
  box-shadow: 0 0 0 4px #fef3c7;
}

.insight-modal-body li.danger i {
  background: #dc2626;
  box-shadow: 0 0 0 4px #fee2e2;
}

.insight-modal-body li.warn i {
  background: #d97706;
  box-shadow: 0 0 0 4px #fef3c7;
}

.insight-modal-body li.info i,
.insight-modal-body li.ok i {
  background: #059669;
  box-shadow: 0 0 0 4px #d1fae5;
}

.insight-modal-body li span {
  line-height: 1.42;
}

.insight-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 22px 16px;
  border-top: 1px solid #e3ece7;
  background: #fff;
}

/* Final mobile safety layer. This sits after the unified desktop shell rules so
   phones never keep desktop offsets, widths, or stacking order. */
@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background: var(--bg);
  }

  .main,
  .dashboard-screen .main {
    width: 100%;
    max-width: 100vw;
    margin-left: 0 !important;
    padding: 0 12px 18px !important;
    overflow-x: hidden;
  }

  .dashboard-screen .main {
    padding: 0 0 18px !important;
  }

  .sidebar,
  .dashboard-screen .sidebar {
    display: flex;
    width: min(84vw, 320px) !important;
    max-width: 320px;
    transform: translateX(-105%);
    transition: transform .2s ease;
    z-index: 180 !important;
  }

  .sidebar-collapsed .sidebar,
  .sidebar-collapsed.dashboard-screen .sidebar {
    display: flex;
  }

  .sidebar-open .sidebar,
  .sidebar-open.dashboard-screen .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar-open .sidebar-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 160 !important;
    background: rgba(8, 24, 19, .48);
  }

  .top-ribbon,
  .dashboard-screen .executive-topbar {
    z-index: 80;
  }

  .top-ribbon:not(.executive-topbar) {
    min-height: 62px;
    margin: 0 -12px 16px !important;
    padding: 10px 12px !important;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .top-ribbon:not(.executive-topbar) > strong {
    min-width: 0;
    font-size: 15px;
    line-height: 1.12;
  }

  .ribbon-tools {
    min-width: 0;
    gap: 8px;
    justify-content: flex-end;
  }

  .ribbon-tools > span {
    display: none;
  }

  .ribbon-tools a {
    white-space: nowrap;
    font-size: 14px;
  }

  .dashboard-screen .executive-topbar {
    margin: 0 !important;
    padding: 12px 14px !important;
    border-radius: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .header-left {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .header-user-actions {
    gap: 8px;
  }

  .header-title h1 {
    font-size: 18px;
    line-height: 1.15;
    white-space: normal;
  }

  .header-center,
  .header-right {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .header-center::-webkit-scrollbar,
  .header-right::-webkit-scrollbar {
    display: none;
  }

  .date-pill,
  .filter-dropdown,
  .profile-menu,
  .notif-btn {
    flex: 0 0 auto;
  }

  .filter-dropdown {
    width: 112px;
  }

  .date-range-control {
    flex: 0 0 auto;
  }

  .date-range-control label {
    font-size: 10px;
  }

  .date-range-control input {
    width: 105px;
  }

  .profile-menu > div {
    left: auto;
    right: 0;
  }

  .topbar {
    display: block !important;
    margin: 20px 0 18px;
  }

  .topbar h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .topbar p {
    max-width: 100%;
    margin-top: 8px;
    font-size: 18px;
    line-height: 1.16;
  }

  .panel,
  .card,
  .metric {
    width: 100%;
    max-width: 100%;
    margin: 0 0 16px;
    padding: 16px;
    overflow: hidden;
  }

  .grid-form,
  .stack-form .grid-form,
  .setup-grid,
  .action-grid,
  .action-grid .grid-form {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .panel form,
  .stack-form,
  .grid-form label,
  .panel label {
    width: 100%;
    min-width: 0;
  }

  .panel input,
  .panel select,
  .panel textarea,
  .grid-form input,
  .grid-form select,
  .grid-form textarea,
  .stack-form input,
  .stack-form select,
  .stack-form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  form.grid-form button:not(.icon-btn),
  form.stack-form button:not(.icon-btn),
  .panel > form button:not(.icon-btn) {
    width: 100%;
    max-width: 100%;
  }

  .grn-actions {
    justify-content: flex-start;
  }

  .allocation-box {
    gap: 12px;
  }

  .allocation-head {
    align-items: flex-start;
  }

  .allocation-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
  }

  .allocation-head strong {
    white-space: nowrap;
  }

  .allocation-box .compact-table {
    overflow: visible;
    border-radius: 10px;
  }

  .allocation-box .compact-table table,
  .allocation-box .compact-table thead,
  .allocation-box .compact-table tbody,
  .allocation-box .compact-table tr,
  .allocation-box .compact-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .allocation-box .compact-table thead {
    display: none;
  }

  .allocation-box .compact-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
    background: #f8fbf9;
  }

  .allocation-box .compact-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }

  .allocation-box .compact-table td {
    padding: 0;
    border: 0;
  }

  .allocation-box .compact-table td:last-child {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
  }

  .allocation-box .compact-table label {
    gap: 5px;
    font-size: 12px;
    line-height: 1.2;
  }

  .allocation-box .compact-table input,
  .allocation-box .compact-table select {
    min-height: 42px;
    padding: 8px 9px;
    font-size: 15px;
  }

  .allocation-box .compact-table .icon-btn {
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0;
  }

  .grn-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .grn-actions button:not(.icon-btn),
  .grn-actions .button-link,
  form.stack-form .grn-actions button:not(.icon-btn),
  .panel > form .grn-actions button:not(.icon-btn) {
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-content: center;
  }

  .people-hero,
  .supplier-hero {
    display: grid;
  }

  .people-summary,
  .supplier-summary {
    width: 100%;
  }

  .sale-form-head {
    display: grid;
    align-items: stretch;
  }

  .sale-total {
    min-width: 0;
    text-align: left;
  }

  .sale-actions {
    justify-content: flex-start;
  }

  .grn-actions button:not(.icon-btn),
  .grn-actions .button-link {
    width: auto !important;
    max-width: none;
    min-width: 132px;
    flex: 0 0 auto;
  }

  .inline button,
  .row-actions button,
  .list-tools button,
  .list-tools .button-link,
  button.icon-btn {
    width: auto !important;
    flex: 0 0 auto;
  }

  .list-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .list-tools input,
  .list-tools select {
    flex: 1 1 180px;
    min-width: 0;
    max-width: 100%;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-screen .dashboard {
    padding: 14px 12px 18px !important;
    display: grid;
    justify-items: center;
  }

  .dashboard-screen .kpi-row {
    grid-template-columns: 1fr !important;
    gap: 11px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 520px;
    justify-items: center;
  }

  .dashboard-screen .kpi-row .kpi-card {
    width: 100%;
    min-height: 0;
    padding: 18px;
    text-align: center;
  }

  .dashboard-screen .kpi-header {
    margin-bottom: 12px;
    justify-content: center;
  }

  .dashboard-screen .kpi-value {
    font-size: 24px;
    line-height: 1.2;
  }

  .dashboard-screen .section-row {
    width: 100%;
    max-width: 520px;
    gap: 13px;
    margin-bottom: 13px;
    justify-items: center;
  }

  .dashboard-screen .section-row.three-col,
  .dashboard-screen .section-row.storage-intelligence-row,
  .dashboard-screen .section-row.four-col,
  .dashboard-screen .section-row.bottom-row {
    grid-template-columns: 1fr !important;
  }

  .dashboard-screen .span-2 {
    grid-column: auto;
  }

  .dashboard-screen .storage-command-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-screen .card,
  .dashboard-screen .stacked-cards {
    width: 100%;
    max-width: 520px;
  }

  .dashboard-screen .card {
    padding: 18px;
  }

  .dashboard-screen .card-header {
    align-items: flex-start;
    margin-bottom: 14px;
  }

  .dashboard-screen .sales-performance,
  .dashboard-screen .milling-top,
  .dashboard-screen .electric-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-screen .mini-metric,
  .dashboard-screen .ratio-card {
    width: 100%;
  }

  .dashboard-screen .donut {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
    gap: 16px;
  }

  .dashboard-screen .donut-ring {
    width: min(220px, 68vw);
    height: min(220px, 68vw);
  }

  .dashboard-screen .donut-ring::before {
    width: min(132px, 42vw);
    height: min(132px, 42vw);
  }

  .dashboard-screen .donut p {
    width: 100%;
    max-width: 300px;
  }

  .dashboard-screen .milling-lower {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
  }

  .dashboard-screen .gauge {
    width: min(160px, 50vw);
    height: min(160px, 50vw);
  }

  .dashboard-screen .line-chart.compact {
    width: 100%;
  }

  .dashboard-screen .util-row {
    grid-template-columns: minmax(100px, 1fr) minmax(110px, 1.6fr) 38px;
    width: 100%;
  }

  .dashboard-screen .mini-stat {
    min-height: 0;
    text-align: left;
  }

  .dashboard-screen .insight-list {
    padding-left: 18px;
  }
}

@media (max-width: 640px) {
  .dashboard-screen .dashboard {
    padding: 12px 10px 18px !important;
    justify-items: stretch;
  }

  .dashboard-screen .executive-topbar {
    gap: 9px;
  }

  .dashboard-screen .header-title h1 {
    font-size: 17px;
    line-height: 1.08;
  }

  .dashboard-screen .desktop-title {
    display: none;
  }

  .dashboard-screen .mobile-title {
    display: inline;
  }

  .dashboard-screen .header-center,
  .dashboard-screen .header-right {
    display: flex;
    gap: 7px;
    overflow-x: auto !important;
    overflow-y: visible;
    scrollbar-width: none;
  }

  .dashboard-screen .header-center::-webkit-scrollbar,
  .dashboard-screen .header-right::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .dashboard-screen .profile-menu > div {
    position: fixed;
    top: 78px;
    right: 12px;
    left: auto;
    width: min(280px, calc(100vw - 24px));
    z-index: 260;
    max-height: calc(100vh - 96px);
    overflow: auto;
  }

  .dashboard-screen .date-pill {
    padding: 7px 13px;
  }

  .dashboard-screen .date-range-control {
    flex: 0 0 auto;
    width: max-content;
    max-width: none;
    overflow: visible;
  }

  .dashboard-screen .date-range-control label {
    font-size: 0;
  }

  .dashboard-screen .date-range-control label:first-of-type::before {
    content: "From";
    font-size: 10px;
  }

  .dashboard-screen .date-range-control label:nth-of-type(2)::before {
    content: "To";
    font-size: 10px;
  }

  .dashboard-screen .date-range-control input {
    width: 116px;
    font-size: 11px;
  }

  .dashboard-screen .filter-dropdown {
    width: 124px;
    flex-basis: 124px;
  }

  .dashboard-screen .filter-dropdown select {
    position: absolute;
    inset: 0;
    z-index: 8;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: auto;
  }

  .dashboard-screen .filter-dropdown-menu {
    display: none !important;
  }

  .dashboard-screen .filter-dropdown.open,
  .dashboard-screen .filter-dropdown:focus-within {
    z-index: 5;
  }

  .dashboard-screen .period-select.open,
  .dashboard-screen .period-select:focus-within {
    z-index: 120;
  }

  .dashboard-screen .period-select.open .period-select-menu {
    position: fixed;
    top: var(--dropdown-top, 126px);
    left: var(--dropdown-left, 12px);
    width: min(var(--dropdown-width, 220px), calc(100vw - 24px));
    max-height: min(320px, calc(100vh - 150px));
    overflow: auto;
  }

  .dashboard-screen .filter-dropdown-trigger {
    min-height: 42px;
  }

  .dashboard-screen .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    max-width: none;
    justify-items: stretch;
  }

  .dashboard-screen .kpi-row .kpi-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 4px;
    align-content: center;
    width: auto;
    min-height: 104px;
    padding: 12px;
    text-align: left;
    border-radius: 13px;
  }

  .dashboard-screen .kpi-header {
    display: contents;
    margin: 0;
  }

  .dashboard-screen .kpi-icon {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
  }

  .dashboard-screen .kpi-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .dashboard-screen .kpi-label {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    display: block;
    padding-top: 1px;
    font-size: 11px;
    line-height: 1.18;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .dashboard-screen .kpi-value {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    margin: 0;
    font-size: 23px;
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .dashboard-screen .kpi-unit {
    font-size: .52em;
  }

  .dashboard-screen .kpi-change {
    display: none;
  }

  .dashboard-screen .kpi-vs {
    display: none;
  }

  .dashboard-screen .section-row {
    max-width: none;
    gap: 11px;
    margin-bottom: 11px;
  }

  .dashboard-screen .card,
  .dashboard-screen .stacked-cards {
    max-width: none;
  }

  .dashboard-screen .card {
    padding: 14px;
    border-radius: 13px;
  }

  .dashboard-screen .card-header {
    align-items: center;
    margin-bottom: 11px;
  }

  .dashboard-screen .storage-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-screen .storage-lead {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .dashboard-screen .storage-lead,
  .dashboard-screen .storage-metric {
    padding: 11px;
    border-radius: 10px;
  }

  .dashboard-screen .storage-lead strong {
    font-size: 24px;
  }

  .dashboard-screen .storage-metric strong {
    font-size: 14px;
  }

  .dashboard-screen .sales-performance,
  .dashboard-screen .milling-top,
  .dashboard-screen .electric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-screen .sales-performance .ratio-card {
    grid-column: 1 / -1;
  }

  .dashboard-screen .mini-metric,
  .dashboard-screen .ratio-card {
    min-height: 78px;
    padding: 11px;
    border-radius: 11px;
  }

  .dashboard-screen .mini-metric strong,
  .dashboard-screen .ratio-card strong {
    font-size: 14px;
  }

  .dashboard-screen .milling-lower {
    grid-template-columns: 1fr;
  }

  .dashboard-screen .gauge {
    width: 138px;
    height: 138px;
  }

  .dashboard-screen .donut {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 12px;
    justify-items: stretch;
    text-align: left;
  }

  .dashboard-screen .donut-ring {
    width: 132px;
    height: 132px;
  }

  .dashboard-screen .donut-ring::before {
    width: 82px;
    height: 82px;
  }

  .dashboard-screen .donut p {
    max-width: none;
    align-self: center;
  }

  .dashboard-screen .mini-stat {
    min-height: 118px;
    padding: 14px;
  }

  .dashboard-screen .electric-ratio {
    margin-top: 12px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .dashboard-screen .header-center,
  .dashboard-screen .header-right {
    overflow: visible;
  }

  .dashboard-screen .period-select.open {
    z-index: 240;
  }

  .dashboard-screen .period-select.open .period-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(210px, calc(100vw - 24px));
    max-height: min(340px, calc(100vh - 150px));
    overflow: auto;
    z-index: 260;
  }

  .dashboard-screen .dashboard {
    display: block;
    padding: 16px 18px 22px !important;
  }

  .dashboard-screen .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100%;
    max-width: none;
    gap: 12px;
    justify-items: stretch;
    margin-bottom: 14px;
  }

  .dashboard-screen .kpi-row .kpi-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    width: auto;
    min-height: 108px;
    padding: 16px;
    text-align: left;
  }

  .dashboard-screen .kpi-header {
    display: contents;
    margin: 0;
  }

  .dashboard-screen .kpi-icon {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    align-self: start;
  }

  .dashboard-screen .kpi-icon svg {
    width: 18px;
    height: 18px;
  }

  .dashboard-screen .kpi-label,
  .dashboard-screen .kpi-value,
  .dashboard-screen .kpi-change,
  .dashboard-screen .kpi-vs {
    grid-column: 2;
  }

  .dashboard-screen .kpi-label {
    font-size: 12px;
    line-height: 1.22;
  }

  .dashboard-screen .kpi-value {
    margin: 6px 0 4px;
    font-size: 24px;
    line-height: 1.05;
  }

  .dashboard-screen .kpi-change {
    font-size: 11px;
    line-height: 1.25;
  }

  .dashboard-screen .kpi-vs {
    font-size: 10px;
  }

  .dashboard-screen .section-row {
    width: 100%;
    max-width: none;
    justify-items: stretch;
    gap: 14px;
    margin-bottom: 14px;
  }

  .dashboard-screen .section-row.three-col,
  .dashboard-screen .section-row.storage-intelligence-row,
  .dashboard-screen .section-row.four-col,
  .dashboard-screen .section-row.bottom-row {
    grid-template-columns: 1fr !important;
  }

  .dashboard-screen .card,
  .dashboard-screen .stacked-cards {
    width: 100%;
    max-width: none;
  }

  .dashboard-screen .storage-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-screen .storage-lead {
    grid-column: 1 / -1;
  }

  .dashboard-screen .storage-companion {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-screen .storage-block + .storage-block {
    border-top: 0;
    padding-top: 0;
    border-left: 1px solid #e5ece8;
    padding-left: 14px;
  }

  .dashboard-screen .sales-performance,
  .dashboard-screen .milling-top,
  .dashboard-screen .electric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-screen .sales-performance .ratio-card {
    grid-column: 1 / -1;
  }

  .dashboard-screen .donut {
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    justify-items: stretch;
    gap: 18px;
  }

  .dashboard-screen .donut-ring {
    width: 200px;
    height: 200px;
  }

  .dashboard-screen .donut-ring::before {
    width: 122px;
    height: 122px;
  }
}

@media (max-width: 380px) {
  .allocation-box .compact-table tr,
  .grn-actions {
    grid-template-columns: 1fr;
  }

  .allocation-head {
    display: grid;
  }

  .dashboard-screen .kpi-row {
    grid-template-columns: 1fr !important;
  }

  .dashboard-screen .kpi-row .kpi-card {
    min-height: 0;
  }

  .dashboard-screen .kpi-header {
    align-items: center;
  }

  .dashboard-screen .storage-command-grid,
  .dashboard-screen .sales-performance,
  .dashboard-screen .milling-top,
  .dashboard-screen .electric-grid,
  .dashboard-screen .donut {
    grid-template-columns: 1fr;
  }
}

/* Dashboard responsive polish for in-between devices. Tablet browsers often
   render the same layout with more physical room but smaller perceived text. */
@media (min-width: 641px) and (max-width: 900px) {
  .dashboard-screen .header-title h1 {
    font-size: 21px;
    line-height: 1.12;
  }

  .dashboard-screen .date-range-control label,
  .dashboard-screen .period-select > span,
  .dashboard-screen .filter-dropdown > span {
    font-size: 11px;
  }

  .dashboard-screen .filter-dropdown-trigger strong,
  .dashboard-screen .period-select strong {
    font-size: 14px;
    line-height: 1.04;
  }

  .dashboard-screen .kpi-row {
    gap: 14px;
  }

  .dashboard-screen .kpi-row .kpi-card {
    grid-template-columns: 50px minmax(0, 1fr);
    min-height: 128px;
    padding: 18px;
    column-gap: 14px;
  }

  .dashboard-screen .kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .dashboard-screen .kpi-icon svg {
    width: 21px;
    height: 21px;
  }

  .dashboard-screen .kpi-label {
    font-size: 13px;
    line-height: 1.22;
  }

  .dashboard-screen .kpi-value {
    font-size: 29px;
    line-height: 1.02;
  }

  .dashboard-screen .kpi-change {
    font-size: 12px;
  }

  .dashboard-screen .kpi-vs {
    font-size: 11px;
  }

  .dashboard-screen .card-title {
    font-size: 14px;
  }

  .dashboard-screen .storage-lead small,
  .dashboard-screen .storage-metric small,
  .dashboard-screen .mini-metric small,
  .dashboard-screen .ratio-card small,
  .dashboard-screen .mix-row span,
  .dashboard-screen .mix-row strong,
  .dashboard-screen .util-row,
  .dashboard-screen .insight-list {
    font-size: 12px;
  }

  .dashboard-screen .storage-lead strong {
    font-size: 30px;
  }

  .dashboard-screen .storage-metric strong,
  .dashboard-screen .mini-metric strong,
  .dashboard-screen .ratio-card strong {
    font-size: 16px;
  }
}

@media (min-width: 341px) and (max-width: 380px) {
  .dashboard-screen .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px;
  }

  .dashboard-screen .kpi-row .kpi-card {
    grid-template-columns: 36px minmax(0, 1fr) !important;
    min-height: 88px;
    padding: 10px;
    column-gap: 8px;
    border-radius: 12px;
  }

  .dashboard-screen .kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .dashboard-screen .kpi-icon svg {
    width: 16px;
    height: 16px;
  }

  .dashboard-screen .kpi-label {
    font-size: 10px;
    line-height: 1.15;
  }

  .dashboard-screen .kpi-value {
    font-size: 20px;
  }

  .dashboard-screen .kpi-unit {
    font-size: .5em;
  }
}

/* Setup Lists final polish: kept at the end so global form/button rules cannot
   turn the reference-style tabs into large green action buttons. */
body .setup-workspace {
  display: block !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body .setup-main {
  padding: 0 !important;
  min-width: 0;
}

body .setup-active-head {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
}

body .setup-active-head h2 {
  margin: 0 0 5px;
  color: #071822;
  font-size: 24px;
  font-weight: 820;
  line-height: 1.15;
}

body .setup-active-head p {
  margin: 0;
  color: #42526b;
  font-size: 15px;
  line-height: 1.4;
}

body .setup-active-head button {
  width: auto !important;
  min-height: 42px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 780;
}

body .setup-top-tabs {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid #d8e1dc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(31, 45, 38, .04);
}

body .setup-top-tabs button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px;
  padding: 11px 12px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0 !important;
  border-right: 1px solid #e1e8e4 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #34413d !important;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 740;
  line-height: 1.1;
}

body .setup-top-tabs button:last-child {
  border-right: 0 !important;
}

body .setup-top-tabs button.active {
  color: #04734e !important;
  box-shadow: inset 0 -3px 0 #04734e !important;
}

body .setup-top-tabs svg,
body .setup-active-head button svg {
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 17px !important;
}

body .setup-tab-panel {
  display: none !important;
}

body .setup-tab-panel.active {
  display: grid !important;
  gap: 18px;
}

body .setup-table-card,
body .setup-form-card {
  overflow: hidden;
  border: 1px solid #d8e1dc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 61, 46, .05);
}

body .setup-table-card .empty {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

body .setup-form-card {
  padding: 18px;
  border-top: 3px solid #04734e;
}

body .setup-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

body .setup-form-card h3 {
  margin: 0;
  color: #071822;
  font-size: 18px;
  font-weight: 820;
}

body .setup-form-head button {
  width: auto !important;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #d8e1dc;
  border-radius: 8px;
  background: #eef5f1 !important;
  color: #12372b !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 760;
}

body .setup-form-card .grid-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

body .setup-form-card .grid-form button:not(.icon-btn) {
  width: auto !important;
  min-width: 112px;
  justify-self: end;
  padding-inline: 22px;
}

body .setup-form-card.attention-pulse {
  box-shadow: 0 0 0 3px rgba(4, 115, 78, .16), 0 8px 24px rgba(15, 61, 46, .08);
}

@media (max-width: 900px) {
  body .sms-settings-box .grid-form,
  body .sms-settings-box.provider .grid-form {
    grid-template-columns: 1fr;
  }

  body .sms-settings-box .grid-form button:not(.icon-btn) {
    width: 100%;
    justify-self: stretch;
  }

  body .setup-active-head {
    flex-direction: column;
    align-items: stretch;
  }

  body .setup-top-tabs {
    display: flex !important;
    overflow-x: auto;
  }

  body .setup-top-tabs button {
    min-width: 172px !important;
    flex: 0 0 auto;
  }

  body .setup-form-card .grid-form {
    grid-template-columns: 1fr;
  }

  body .setup-form-card .grid-form button:not(.icon-btn) {
    width: 100% !important;
    justify-self: stretch;
  }

  body .settings-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .settings-brand-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  body .platform-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body .platform-dashboard-grid,
  body .platform-bottom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .platform-business-list-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body .platform-admin-head {
    align-items: stretch;
    flex-direction: column;
  }

  body .platform-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .platform-revenue-strip {
    grid-template-columns: 1fr;
  }

  body .platform-dashboard-grid,
  body .platform-bottom-grid {
    grid-template-columns: 1fr;
  }

  body .platform-status-split {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  body .platform-status-legend {
    width: 100%;
  }

  body .settings-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body .platform-summary-grid {
    grid-template-columns: 1fr;
  }

  body .platform-spark-bars,
  body .platform-pulse-line {
    display: none;
  }

  body .platform-panel {
    padding: 13px;
  }
}

/* Premium Platform Admin dashboard */
.platform-admin-dashboard {
  display: grid;
  gap: 13px;
  max-width: 1680px;
}

.platform-admin-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  padding: 0;
}

.platform-admin-head h1 {
  margin: 0 0 5px;
  color: #071822;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

.platform-admin-head p {
  max-width: 760px;
  margin: 0;
  color: #5f6f68;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.platform-admin-filters {
  justify-items: start;
}

.platform-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.platform-filter-select {
  position: relative;
  display: grid;
  min-width: 150px;
  height: 45px;
  padding: 7px 38px 7px 13px;
  border: 1px solid #dbe4df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(10, 39, 27, .035);
}

.platform-filter-select span {
  color: #6b7a74;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.platform-filter-select select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17251f;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  appearance: none;
}

.platform-filter-select svg {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: #6b7a74;
  pointer-events: none;
}

.platform-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
}

.platform-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  border: 1px solid #dfe7e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(10, 39, 27, .055);
  overflow: hidden;
}

.platform-summary-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -42px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: currentColor;
  opacity: .045;
}

.platform-summary-card.clickable {
  width: 100%;
  border-color: #dfe7e2;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.platform-summary-card.clickable:hover {
  border-color: #b8d7c5;
  box-shadow: 0 14px 34px rgba(10, 39, 27, .09);
  transform: translateY(-1px);
}

.platform-summary-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 17px;
}

.platform-summary-icon svg {
  width: 20px;
  height: 20px;
}

.platform-summary-card.green { color: #166534; }
.platform-summary-card.blue { color: #1e5da8; }
.platform-summary-card.yellow { color: #b77900; }
.platform-summary-card.purple { color: #6b21a8; }
.platform-summary-card.red { color: #a64035; }

.platform-summary-card.green .platform-summary-icon { background: #dcfce7; color: #166534; }
.platform-summary-card.blue .platform-summary-icon { background: #dbeafe; color: #1e5da8; }
.platform-summary-card.yellow .platform-summary-icon { background: #fef3c7; color: #b77900; }
.platform-summary-card.purple .platform-summary-icon { background: #f3e8ff; color: #6b21a8; }
.platform-summary-card.red .platform-summary-icon { background: #fee2e2; color: #a64035; }

.platform-summary-body {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.platform-summary-body span {
  display: block;
  color: #2f4038;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.platform-summary-body strong {
  display: block;
  margin: 6px 0 4px;
  color: #061923;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.money-prefix {
  display: inline-block;
  margin-right: 3px;
  color: #273a31;
  font-size: .52em;
  font-weight: 900;
  line-height: 1;
  vertical-align: .18em;
  letter-spacing: .02em;
}

.platform-summary-body small {
  display: block;
  color: #65756e;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.platform-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .95fr);
  gap: 12px;
  align-items: stretch;
}

.platform-overview-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 1fr);
}

.platform-insight-grid {
  grid-template-columns: minmax(0, 1fr) minmax(330px, .72fr);
}

.platform-bottom-grid,
.platform-business-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.platform-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe7e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(10, 39, 27, .052);
}

.platform-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.platform-panel-head h2 {
  margin: 0;
  color: #101f19;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.platform-panel-head span,
.platform-panel-head a {
  color: #5f6f68;
  font-size: 12px;
  font-weight: 750;
}

.platform-panel-head a {
  color: #176a44;
  text-decoration: none;
}

.platform-revenue-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  min-height: 120px;
  align-items: center;
}

.platform-revenue-metrics div {
  min-width: 0;
  padding: 8px 22px;
  border-left: 1px solid #dfe7e2;
}

.platform-revenue-metrics div:first-child {
  border-left: 0;
  padding-left: 0;
}

.platform-revenue-metrics span,
.platform-wallet-summary span {
  display: block;
  color: #3c5048;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.25;
}

.platform-revenue-metrics strong,
.platform-wallet-summary strong {
  display: block;
  margin: 8px 0 4px;
  color: #071822;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.05;
}

.platform-revenue-metrics small {
  color: #65756e;
  font-size: 11px;
  font-weight: 600;
}

.platform-plan-split {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.platform-donut.small {
  width: 122px;
  height: 122px;
}

.platform-donut.small span {
  width: 72px;
  height: 72px;
}

.platform-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.platform-mini-table th,
.platform-mini-table td {
  padding: 9px 7px;
  border-bottom: 1px solid #e4ece7;
  text-align: left;
}

.platform-mini-table th {
  color: #5b6b64;
  font-size: 11px;
  font-weight: 800;
}

.platform-mini-table td:last-child,
.platform-mini-table th:last-child {
  text-align: right;
}

.platform-country-list,
.platform-wallet-summary {
  display: grid;
  gap: 11px;
}

.platform-country-list div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) auto auto;
  gap: 12px;
  align-items: center;
  color: #1b2d25;
  font-size: 12px;
}

.platform-country-list span {
  font-weight: 800;
}

.platform-country-list i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: #edf3ef;
  overflow: hidden;
}

.platform-country-list b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #11835a, #27ae60);
}

.platform-country-list strong {
  min-width: 24px;
  text-align: right;
}

.platform-country-list small {
  color: #5f6f68;
  text-align: right;
}

.platform-wallet-summary {
  gap: 0;
  overflow: hidden;
  border: 1px solid #dfe7e2;
  border-radius: 12px;
}

.platform-wallet-summary div,
.platform-wallet-summary button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #e4ece7;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
}

.platform-wallet-summary div:last-child {
  border-bottom: 0;
}

.platform-wallet-summary button {
  cursor: pointer;
}

.platform-wallet-summary button:hover {
  background: #f4faf6;
}

.platform-wallet-summary strong {
  margin: 0;
  font-size: 16px;
}

.platform-trend-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  min-height: 160px;
  align-items: end;
  padding: 12px 6px 0;
  border-bottom: 1px solid #d9e4df;
  background: linear-gradient(180deg, transparent, rgba(47, 138, 84, .04));
}

.platform-trend-item {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-items: end;
}

.platform-trend-item strong {
  color: #0d7a4d;
  font-size: 12px;
  font-weight: 850;
}

.platform-trend-item span {
  width: 100%;
  max-width: 42px;
  border-radius: 11px 11px 0 0;
  background: linear-gradient(180deg, #2f8a54, rgba(47, 138, 84, .18));
}

.platform-trend-item small {
  min-height: 28px;
  color: #6b7a74;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}

.platform-status-split {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.platform-donut {
  display: grid;
  place-items: center;
  width: 130px;
  height: 130px;
  border-radius: 50%;
}

.platform-donut span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  text-align: center;
}

.platform-donut strong {
  font-size: 23px;
  font-weight: 850;
  line-height: 1;
}

.platform-donut small {
  color: #66766f;
  font-size: 11px;
}

.platform-status-legend {
  display: grid;
  gap: 11px;
}

.platform-status-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  color: #32483f;
  font-size: 12px;
}

.platform-status-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.platform-status-legend i.green { background: #2f8a54; }
.platform-status-legend i.gray { background: #9ca3af; }
.platform-status-legend i.orange { background: #f59e0b; }

.platform-business-list-grid .platform-panel {
  padding-bottom: 14px;
}

.platform-list-tools {
  margin-bottom: 12px;
}

.platform-table-wrap {
  border: 1px solid #dfe7e2;
  border-radius: 12px;
  overflow: auto;
}

.platform-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.platform-table th,
.platform-table td {
  padding: 14px 14px;
  border-bottom: 1px solid #e6eee9;
  text-align: left;
  vertical-align: middle;
}

.platform-table th {
  background: #f1f7f3;
  color: #2e433a;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.platform-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 1280px) {
  body .platform-admin-head {
    grid-template-columns: 1fr;
  }

  body .platform-filter-bar {
    justify-content: flex-start;
  }

  body .platform-summary-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
  }

  body .platform-overview-grid,
  body .platform-dashboard-grid,
  body .platform-insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body .platform-admin-dashboard {
    gap: 12px;
  }

  body .platform-admin-head h1 {
    font-size: 22px;
  }

  body .platform-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .platform-filter-select {
    min-width: 0;
  }

  body .platform-summary-grid {
    grid-template-columns: 1fr;
  }

  body .platform-summary-card {
    min-height: 92px;
    padding: 15px;
  }

  body .platform-revenue-metrics,
  body .platform-plan-split,
  body .platform-status-split {
    grid-template-columns: 1fr;
  }

  body .platform-revenue-metrics div {
    padding: 13px 0;
    border-left: 0;
    border-bottom: 1px solid #e4ece7;
  }

  body .platform-revenue-metrics div:last-child {
    border-bottom: 0;
  }

  body .platform-country-list div {
    grid-template-columns: 1fr auto;
  }

  body .platform-country-list i,
  body .platform-country-list small {
    grid-column: 1 / -1;
  }
}

/* Final platform dashboard density pass */
.platform-admin-dashboard {
  gap: 13px;
}

.platform-admin-head {
  grid-template-columns: minmax(320px, 1fr) minmax(560px, auto);
  align-items: end;
  gap: 16px;
}

.platform-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(135px, 1fr));
  gap: 8px;
  width: min(760px, 100%);
  justify-self: end;
}

.platform-filter-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  grid-template-rows: auto auto;
  align-content: center;
  row-gap: 2px;
  min-width: 0;
  height: 54px;
  padding: 8px 13px 7px 14px;
  border-radius: 12px;
}

.platform-filter-select span,
.platform-filter-select select {
  grid-column: 1;
}

.platform-filter-select select {
  min-width: 0;
  height: 20px;
  padding: 0;
  color: #061923;
  font-size: 13px;
  line-height: 20px;
}

.platform-filter-select svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: static;
  align-self: center;
  justify-self: end;
  transform: none;
}

.platform-summary-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.platform-summary-card {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  min-height: 88px;
  padding: 13px 14px;
  border-radius: 14px;
}

.platform-summary-card::after {
  width: 74px;
  height: 74px;
  right: -28px;
  bottom: -38px;
}

.platform-summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.platform-summary-icon svg {
  width: 18px;
  height: 18px;
}

.platform-summary-body span {
  font-size: 11px;
  line-height: 1.18;
}

.platform-summary-body strong {
  margin: 4px 0 2px;
  font-size: 22px;
  line-height: 1;
}

.platform-summary-body small {
  font-size: 10px;
  line-height: 1.22;
}

.platform-overview-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
}

.platform-dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
  gap: 12px;
}

.platform-insight-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .75fr);
}

.platform-panel {
  padding: 15px 16px;
  border-radius: 14px;
}

.platform-panel-head {
  margin-bottom: 11px;
}

.platform-trend-bars {
  min-height: 128px;
  gap: 12px;
  padding-top: 4px;
}

.platform-trend-item span {
  max-width: 34px;
}

.platform-status-split {
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 16px;
}

.platform-donut {
  width: 116px;
  height: 116px;
}

.platform-donut span {
  width: 68px;
  height: 68px;
}

.platform-revenue-metrics {
  min-height: 104px;
}

.platform-revenue-metrics div {
  padding: 6px 16px;
}

.platform-country-list div {
  grid-template-columns: minmax(120px, .8fr) minmax(180px, 2fr) 32px 86px;
}

.platform-wallet-summary div,
.platform-wallet-summary button {
  min-height: 42px;
  padding: 10px 13px;
}

@media (max-width: 1280px) {
  body .platform-admin-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body .platform-filter-bar {
    justify-self: stretch;
    width: 100%;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

  body .platform-summary-grid {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
  }

  body .platform-overview-grid,
  body .platform-dashboard-grid,
  body .platform-insight-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, .82fr);
  }
}

@media (max-width: 980px) {
  body .platform-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body .platform-overview-grid,
  body .platform-dashboard-grid,
  body .platform-insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body .platform-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .platform-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .platform-summary-card {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 82px;
    padding: 12px;
  }

  body .platform-summary-icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 520px) {
  body .platform-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Platform dashboard polish: contained plan table and premium compact filters */
.platform-filter-bar {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  width: min(820px, 100%);
}

.platform-filter-select {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  grid-template-rows: 15px 19px;
  align-items: center;
  min-width: 0;
  height: 48px;
  padding: 7px 13px 7px 14px;
  overflow: hidden;
  border: 1px solid #d9e3dd;
  border-radius: 13px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdfc),
    #ffffff;
  box-shadow: 0 8px 18px rgba(10, 39, 27, .045);
}

.platform-filter-select:hover {
  border-color: #bdd7ca;
}

.platform-filter-select:focus-within {
  border-color: #2f8a54;
  box-shadow: 0 0 0 3px rgba(47, 138, 84, .12);
}

.platform-filter-select span {
  grid-column: 1;
  grid-row: 1;
  color: #66766f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.platform-filter-select select {
  grid-column: 1;
  grid-row: 2;
  display: block;
  width: 100%;
  min-width: 0;
  height: 19px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #061923;
  font-size: 13px;
  font-weight: 800;
  line-height: 19px;
  appearance: none;
}

.platform-filter-select svg {
  grid-column: 2;
  grid-row: 1 / 3;
  position: static;
  align-self: center;
  justify-self: end;
  width: 14px;
  height: 14px;
  transform: none;
  color: #6d7b75;
}

.platform-plan-card {
  overflow: hidden;
}

.platform-plan-split {
  grid-template-columns: minmax(104px, 124px) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  align-items: center;
}

.platform-plan-split > * {
  min-width: 0;
}

.platform-plan-split .platform-donut.small {
  width: 108px;
  height: 108px;
}

.platform-plan-split .platform-donut.small span {
  width: 64px;
  height: 64px;
}

.platform-plan-split .platform-donut strong {
  font-size: 19px;
}

.platform-plan-split .platform-donut small {
  font-size: 10px;
}

.platform-mini-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
  font-size: 12px;
}

.platform-mini-table th,
.platform-mini-table td {
  padding: 9px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-mini-table th:nth-child(1),
.platform-mini-table td:nth-child(1) {
  width: 36%;
}

.platform-mini-table th:nth-child(2),
.platform-mini-table td:nth-child(2) {
  width: 25%;
  text-align: center;
}

.platform-mini-table th:nth-child(3),
.platform-mini-table td:nth-child(3) {
  width: 39%;
  text-align: right;
}

@media (max-width: 1280px) {
  body .platform-filter-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body .platform-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .platform-plan-split {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  body .platform-mini-table {
    justify-self: stretch;
  }
}

.platform-admin-dashboard .platform-admin-filters {
  grid-template-columns: 1fr;
  justify-items: start;
  padding: 0;
}

.platform-admin-dashboard .platform-admin-filters .platform-filter-bar {
  justify-self: start;
}

.platform-summary-body .money-prefix,
.platform-revenue-metrics .money-prefix,
.platform-mini-table .money-prefix,
.platform-country-list .money-prefix {
  font-size: .48em;
  vertical-align: .2em;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  body {
    background: white;
  }

  body.print-list .panel form,
  body.print-list .top-ribbon,
  body.print-list .sidebar,
  body.print-list .topbar,
  body.print-list dialog,
  body.print-list .alert,
  body.print-list .panel:has(form):not(:has(table)) {
    display: none !important;
  }

  .sidebar,
  .topbar,
  .list-tools,
  .print-actions,
  button,
  .button-link {
    display: none !important;
  }

  .main {
    margin: 0;
    padding: 0;
  }

  .panel,
  .metric {
    box-shadow: none;
    break-inside: avoid;
  }

  .print-sheet {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
  }

  .print-sheet .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .print-section,
  .print-signature-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-table tr,
  .print-kv-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

}

/* Platform tenant management refinements */
.platform-list-head {
  align-items: flex-start;
  gap: 16px;
}

.platform-list-head .panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.recovery-panel {
  border-top: 3px solid #0f7f54;
}

.recovery-notice {
  border-color: #f0c36d;
  background: #fff8e7;
}

.recovery-notice.success {
  border-color: #b8dec8;
  background: #f0fbf5;
}

.recovery-notice h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.recovery-notice ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #3d5149;
}

.temporary-password {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed #0f7f54;
  border-radius: 12px;
  background: #ffffff;
}

.temporary-password span {
  color: #63736d;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.temporary-password strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 20px;
  color: #092017;
  letter-spacing: .04em;
}

.form-popover {
  position: relative;
}

.form-popover > summary {
  list-style: none;
  cursor: pointer;
}

.form-popover > summary::-webkit-details-marker {
  display: none;
}

.form-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(7, 25, 18, .42);
  backdrop-filter: blur(2px);
}

.form-popover-card {
  position: fixed;
  z-index: 81;
  top: 50%;
  left: 50%;
  display: none;
  width: min(980px, calc(100vw - 32px));
  max-height: min(84vh, 760px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #d7e3dd;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 33, 23, .24);
  transform: translate(-50%, -50%);
}

.form-popover[open] .form-popover-backdrop,
.form-popover[open] .form-popover-card {
  display: block;
}

.form-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e3ebe6;
}

.form-popover-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.form-popover-head span {
  color: #64746d;
  font-size: 14px;
}

.form-popover-card .grid-form {
  margin-top: 0;
}

.platform-filter-bar .platform-filter-dropdown {
  width: 100%;
  max-width: none;
  flex: initial;
  min-height: 48px;
  font-size: 13px;
}

.platform-filter-bar .platform-filter-dropdown > span {
  top: 8px;
  left: 14px;
  color: #64746d;
  font-size: 11px;
  font-weight: 800;
}

.platform-filter-bar .platform-filter-dropdown .filter-dropdown-trigger {
  min-height: 48px;
  padding: 18px 36px 7px 14px;
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
  box-shadow: 0 8px 18px rgba(10, 39, 27, .045);
}

.platform-filter-bar .platform-filter-dropdown .filter-dropdown-trigger strong {
  font-size: 14px;
  font-weight: 850;
}

.platform-filter-bar .platform-filter-dropdown .filter-dropdown-trigger svg {
  top: 19px;
  right: 14px;
  width: 12px;
  height: 12px;
}

.platform-filter-bar .platform-filter-dropdown .filter-dropdown-menu {
  z-index: 90;
  padding: 7px;
  border-radius: 13px;
}

.platform-filter-bar .platform-filter-dropdown .filter-dropdown-menu button {
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .platform-list-head {
    align-items: stretch;
  }

  .platform-list-head .panel-actions {
    justify-content: flex-start;
  }

  .form-popover-card {
    width: calc(100vw - 18px);
    max-height: 88vh;
    padding: 18px;
    border-radius: 15px;
  }
}

/* Platform billing and subscriptions */
.billing-hero {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid #d8e4de;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(39, 174, 96, .07), transparent 34%),
    #ffffff;
  box-shadow: 0 10px 28px rgba(15, 61, 46, .045);
}

.billing-hero-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.billing-hero-main h2 {
  margin: 0 0 5px;
  color: #102326;
  font-size: 24px;
  line-height: 1.15;
}

.billing-hero-main p {
  max-width: 780px;
  margin: 0;
  color: #5d7069;
  font-size: 14px;
  line-height: 1.45;
}

.billing-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #d8e4de;
  border-radius: 999px;
  background: #f1f7f4;
  color: #0d4f36;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.billing-help-btn svg {
  width: 17px;
  height: 17px;
}

.billing-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.billing-metric {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dce8e2;
  border-radius: 14px;
  background: #f8fbf9;
}

.billing-metric.danger {
  border-color: #f2c7c1;
  background: #fff7f6;
}

.billing-metric span {
  display: block;
  color: #5c6d67;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.billing-metric strong {
  display: block;
  margin-top: 5px;
  color: #071e29;
  font-size: 20px;
  line-height: 1.12;
}

.billing-metric strong .money-prefix {
  font-size: .55em;
}

.billing-metric small {
  display: block;
  margin-top: 5px;
  color: #6a7b75;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.billing-help-modal {
  max-width: 850px;
}

.billing-help-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.billing-help-body section {
  padding: 16px;
  border: 1px solid #dbe8e1;
  border-radius: 14px;
  background: #fff;
}

.billing-help-body h3 {
  margin: 0 0 10px;
  color: #0d3f2e;
  font-size: 15px;
}

.billing-help-body ul {
  margin: 0;
  padding-left: 18px;
  color: #31413c;
  font-size: 13px;
  line-height: 1.55;
}

.billing-help-body li + li {
  margin-top: 6px;
}

.billing-help-body dl {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) 1.4fr;
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.billing-help-body dt {
  color: #102326;
  font-weight: 900;
}

.billing-help-body dd {
  margin: 0;
  color: #52645f;
}

.billing-help-body p {
  margin: 0;
  color: #31413c;
  font-size: 13px;
  line-height: 1.55;
}

.setup-hero.compact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  margin-bottom: 16px;
  border: 1px solid #d8e4de;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 61, 46, .045);
}

.setup-hero.compact h2 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.15;
}

.setup-hero.compact p {
  max-width: 760px;
  margin: 0;
  color: #60716b;
  font-size: 14px;
  line-height: 1.45;
}

.setup-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
  min-width: 370px;
}

.setup-hero-metrics span {
  display: block;
  padding: 10px 12px;
  border: 1px solid #dce8e2;
  border-radius: 12px;
  background: #f8fbf9;
  color: #60716b;
  font-size: 12px;
  font-weight: 800;
}

.setup-hero-metrics strong {
  display: block;
  margin-bottom: 2px;
  color: #09242d;
  font-size: 17px;
  line-height: 1.15;
}

.platform-billing-workspace .setup-tab-panel {
  gap: 18px;
}

.platform-billing-workspace .setup-tab-panel > .panel-head {
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid #d8e4de;
  border-radius: 12px;
  background: #fff;
}

.setup-edit-panel {
  padding: 20px;
  border: 1px solid #d8e4de;
  border-top: 3px solid #0f7a4d;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 61, 46, .045);
}

.setup-edit-panel > .panel-head {
  padding: 0 0 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2ebe6;
}

.setup-edit-panel .grid-form {
  margin-top: 0;
}

@media (max-width: 900px) {
  .billing-hero-main {
    flex-direction: column;
  }

  .billing-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-help-body {
    grid-template-columns: 1fr;
  }

  .setup-hero.compact {
    flex-direction: column;
  }

  .setup-hero-metrics {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .dashboard-screen .break-even-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-screen .break-even-main,
  .dashboard-screen .break-even-grid .basic-cost-insight {
    min-height: 0;
    padding: 14px;
  }

  .dashboard-screen .break-even-main strong {
    font-size: 24px;
  }

  .billing-hero {
    padding: 14px;
    border-radius: 14px;
  }

  .billing-hero-main h2 {
    font-size: 21px;
  }

  .billing-metric-strip {
    grid-template-columns: 1fr;
  }
}
