/* SUPERMERXI executive system: shared surfaces, hierarchy, depth and controls. */
:root {
  --navy-950: #081323;
  --navy-900: #10233c;
  --navy-800: #193957;
  --red-600: #c61e40;
  --surface-0: #eaf0f6;
  --surface-1: #f5f8fc;
  --surface-2: #fff;
  --stroke: #d5dfe9;
  --text-strong: #142943;
  --text-muted: #586d84;
  --shadow-card:
    0 2px 3px #152c4810, 0 10px 24px #152c4810, 0 24px 50px #152c4806;
  --shadow-raised:
    0 3px 5px #10233c12, 0 17px 30px #10233c16, 0 35px 55px #10233c0a;
  --shadow-inset: inset 0 1px 0 #fff, inset 0 -1px 0 #17335308;
  --round-card: 22px;
  --space-section: 24px;
  color: var(--text-strong);
  background: var(--surface-0);
}
body {
  background:
    radial-gradient(ellipse at 78% -5%, #ccd9eb80, transparent 48%),
    linear-gradient(150deg, #f0f4f8, #e8eef5);
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1.55;
}
.shell {
  grid-template-columns: 248px minmax(0, 1fr);
}
.sidebar {
  padding: 28px 17px 22px;
  background:
    radial-gradient(ellipse at 0 0, #24456060, transparent 48%),
    linear-gradient(165deg, #10223b 0%, #091323 78%);
  box-shadow: 10px 0 30px #09132318;
  border-right: 1px solid #fff1;
}
.sidebar .brand {
  font-size: 23px;
  gap: 12px;
  letter-spacing: -0.07em;
}
.sidebar .brand img {
  width: 39px;
  height: 39px;
  filter: drop-shadow(0 4px 7px #0003);
}
.sidebar .brand small {
  letter-spacing: 0.16em;
  font-size: 8px;
  color: #c1cddd;
}
.sidebar .nav {
  margin-top: 31px;
  gap: 5px;
}
.sidebar .nav a {
  position: relative;
  border-radius: 12px;
  padding: 11px 13px;
  color: #c1ccdc;
  font-size: 13px;
  font-weight: 600;
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.sidebar .nav a:hover {
  background: #ffffff0b;
  color: #fff;
  transform: translateX(2px);
}
.sidebar .nav a.active {
  background: linear-gradient(110deg, #d72a4a, #b91737);
  color: #fff;
  box-shadow:
    inset 0 1px #ff9aa55c,
    0 2px 3px #0002,
    0 8px 20px #c51b3b35;
  border: 1px solid #ee6b8059;
}
.sidebar .nav a.active::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 3px;
  background: #ffb1bf;
}
.sidebar .nav .icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.65;
}
.side-bottom {
  border-top: 1px solid #ffffff12;
  padding-top: 20px;
}
.private-tag {
  color: #c5d1df;
}
.side-note {
  color: #a3b4ca;
  font-size: 10px;
}
.profile {
  background: #ffffff06;
  border: 1px solid #ffffff0c;
  border-radius: 13px;
  padding: 11px;
}
.profile strong {
  font-size: 12px;
}
.profile small {
  color: #bccadd;
  font-size: 11px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 78px;
  background: linear-gradient(110deg, #f9fbfdf2, #f0f5fcf2);
  padding: 18px 32px;
  border-bottom: 1px solid #cfdae7;
  box-shadow: 0 3px 10px #17334b04;
  backdrop-filter: none;
}
.breadcrumb {
  font-size: 12px;
  color: #566b83;
}
.breadcrumb span {
  color: #203b58;
}
.top-right {
  gap: 18px;
}
.clock {
  font-size: 11px;
  color: #65798e;
}
.topbar .button {
  box-shadow: none;
}
#content,
.bigdata main {
  max-width: 1690px;
  margin-inline: auto;
  padding: 30px 32px 48px;
}
h1,
h2,
h3 {
  color: var(--text-strong);
  font-weight: 730;
}
h1 {
  font-size: clamp(28px, 2.4vw, 39px);
  letter-spacing: -0.045em;
  line-height: 1.13;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 15px;
}
.eyebrow,
.workspace-kicker {
  font-size: 9px;
  letter-spacing: 0.17em;
  font-weight: 750;
  text-transform: uppercase;
  color: #a82a43;
}
.workspace-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
}
.workspace-kicker .icon {
  width: 13px;
  height: 13px;
}
.page-head,
.bigdata .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 29px;
  margin: 0 0 25px;
  border: 1px solid #d0dce9;
  border-radius: 24px;
  background: linear-gradient(
    118deg,
    #ffffffeb 0%,
    #edf3faef 65%,
    #dce7f4de 100%
  );
  box-shadow: var(--shadow-card), var(--shadow-inset);
}
.page-head::after,
.bigdata .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: 3%;
  top: -100px;
  background:
    radial-gradient(ellipse at 35% 22%, #fff8, transparent 47%),
    linear-gradient(140deg, #ccdae95c, #9db5ce21);
  box-shadow:
    inset 1px 1px 1px #fff8,
    inset -14px -16px 25px #7899b00a,
    14px 18px 35px #6e91b00b;
  pointer-events: none;
}
.page-head p,
.bigdata .hero p {
  max-width: 72ch;
  color: #587087;
  font-size: 13px;
  margin-bottom: 0;
}
.page-head h1 {
  margin-bottom: 11px;
}
.page-head .actions {
  justify-content: flex-end;
  flex-shrink: 0;
}
.page-head.detail {
  align-items: center;
}
.page-head.detail .client-hero {
  align-items: center;
}
.page-head .avatar {
  box-shadow: 0 5px 12px #23415b15;
  border: 1px solid #fff;
}
.stats {
  gap: 18px;
  margin-bottom: 25px;
}
.stat {
  padding: 24px;
  border: 1px solid #cfdae7;
  border-radius: var(--round-card);
  background: linear-gradient(130deg, #fff, #eef4fa);
  box-shadow: var(--shadow-card), var(--shadow-inset);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-raised), var(--shadow-inset);
}
.stat-top {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.025em;
  color: #506981;
  min-height: 22px;
}
.stat-top > .icon {
  width: 29px;
  height: 29px;
  padding: 6px;
  border-radius: 9px;
  box-sizing: content-box;
  background: #e8eff7;
  color: #285273;
  border: 1px solid #fff;
  box-shadow: 0 2px 5px #24456110;
}
.stat-value {
  font-size: clamp(26px, 2.3vw, 36px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.25;
  margin: 14px 0 9px;
  font-variant-numeric: tabular-nums;
  color: #15314d;
  overflow-wrap: anywhere;
}
.stat small {
  font-size: 11px;
  line-height: 1.6;
  color: #64798e;
}
.stats:not(.history-stats) > .stat:first-child {
  color: #fff;
  background:
    radial-gradient(ellipse at 100% 0, #48769566, transparent 80%),
    linear-gradient(135deg, #112942, #1e4261);
  border: 1px solid #2b4e6b;
  box-shadow:
    inset 0 1px #abc9e643,
    0 4px 7px #0b1e3226,
    0 16px 31px #102a4521;
}
.stats:not(.history-stats) > .stat:first-child .stat-top,
.stats:not(.history-stats) > .stat:first-child small {
  color: #d0deec;
}
.stats:not(.history-stats) > .stat:first-child .stat-value {
  color: #fff;
}
.stats:not(.history-stats) > .stat:first-child .icon {
  background: #ffffff12;
  color: #e8f1fb;
  border-color: #ffffff20;
}
.history-stats {
  grid-template-columns: 1fr 1fr 1.15fr;
}
.history-stats .stat {
  padding: 20px 23px;
  min-height: 139px;
}
.history-stats .stat-value {
  font-size: 30px;
  margin: 11px 0 5px;
}
.history-stats .stat:last-child {
  background:
    radial-gradient(ellipse at 100% 0, #496b8e66, transparent 70%),
    linear-gradient(125deg, #132a44, #213e5c);
  border-color: #355470;
  box-shadow:
    inset 0 1px #91a9c233,
    0 7px 19px #142d4922;
}
.history-stats .stat:last-child .stat-top,
.history-stats .stat:last-child small {
  color: #d3e1ef;
}
.history-stats .stat:last-child .stat-value {
  color: white;
}
.history-stats .stat:last-child::after {
  content: "";
  position: absolute;
  right: 23px;
  top: 25px;
  width: 7px;
  height: 7px;
  background: #e04b63;
  box-shadow: 0 0 0 5px #ee708413;
  border-radius: 50%;
}
.period-stats {
  padding: 22px 24px;
  gap: 18px;
}
.period-stats .stat {
  min-height: 152px;
}
.period-stats .stat:first-child {
  border-top: 3px solid #d32b48 !important;
}
.panel,
.box,
.valuation-box,
.valuation-chart-wrap {
  border: 1px solid #cedae6;
  border-radius: var(--round-card);
  background: linear-gradient(130deg, #fdfefe, #f3f7fb);
  box-shadow: var(--shadow-card), var(--shadow-inset);
  margin-bottom: 24px;
}
.panel {
  overflow: hidden;
}
.panel-head {
  position: relative;
  padding: 23px 25px;
  border-bottom: 1px solid #d9e3ee;
  background: linear-gradient(100deg, #f9fbfd, #edf3f9);
  box-shadow: inset 0 1px 0 #fff;
  align-items: center;
}
.panel-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 23px;
  bottom: 23px;
  width: 3px;
  background: #be2542;
  border-radius: 0 3px 3px 0;
}
.panel-head h2 {
  font-size: 17px;
  margin: 0 0 4px;
}
.panel-head p {
  font-size: 11px;
  color: #60798f;
  margin: 0;
}
.panel-body {
  padding: 23px 25px;
}
.columns {
  gap: 24px;
}
.columns > div {
  min-width: 0;
}
.filters {
  padding: 15px 17px;
  background: linear-gradient(110deg, #f9fbfd, #e9f0f7);
  border: 1px solid #ccd9e6;
  box-shadow:
    inset 0 1px #fff,
    0 6px 16px #26445d07;
  border-radius: 16px;
  margin-bottom: 17px;
  gap: 12px;
}
.search {
  background: #fff;
  border: 1px solid #cbd8e6;
  box-shadow: inset 0 1px 3px #132f4906;
}
.search input {
  box-shadow: none;
}
.filters select {
  max-width: 270px;
}
.button,
button {
  border-radius: 11px;
  font-weight: 650;
  transition:
    transform 0.17s,
    background 0.17s,
    box-shadow 0.17s;
}
.button {
  padding: 10px 15px;
  font-size: 12px;
  min-height: 39px;
  border: 1px solid #c8d6e4;
  background: linear-gradient(145deg, #fff, #edf3f8);
  color: #25435f;
  box-shadow:
    inset 0 1px #fff,
    0 2px 3px #17365308,
    0 5px 10px #17365305;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px #18375216;
  filter: none;
}
.button.primary {
  color: #fff;
  border-color: #c12442;
  background: linear-gradient(120deg, #d82b4b, #b91938);
  box-shadow:
    inset 0 1px #ff899a70,
    0 3px 5px #8d15241d,
    0 8px 18px #bd21422b;
}
.button.primary:hover {
  background: linear-gradient(120deg, #e23555, #c61e40);
  box-shadow:
    inset 0 1px #ffa0af70,
    0 5px 7px #8d15242b,
    0 12px 22px #bd214233;
}
.button.ghost {
  box-shadow: none;
  background: #ffffff80;
}
.button.sm {
  min-height: 33px;
  padding: 7px 11px;
  font-size: 11px;
}
.button:disabled,
button:disabled {
  transform: none;
  box-shadow: none;
  opacity: 0.5;
}
.actions {
  gap: 8px;
}
input,
select,
textarea {
  background: linear-gradient(170deg, #fff, #fcfdff);
  border: 1px solid #c4d3e2;
  border-radius: 10px;
  box-shadow: inset 0 1px 3px #223f5a06;
  color: #213f5a;
  min-height: 40px;
  font-size: 13px;
}
label {
  font-weight: 600;
  color: #4a637c;
}
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #bc234125;
  outline-offset: 1px;
  border-color: #bd3150;
}
:focus-visible {
  outline: 3px solid #b72446;
  outline-offset: 4px;
}
.period-form {
  gap: 10px;
}
.period-form label {
  font-size: 10px;
  letter-spacing: 0.03em;
}
.period-form select,
.period-form input {
  min-height: 41px;
  padding: 9px 12px;
}
.badge {
  font-size: 10px;
  border-radius: 7px;
  padding: 5px 8px;
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px #fff9;
}
.badge.green {
  color: #00634d;
  background: #dcefe8;
}
.badge.amber {
  color: #745005;
  background: #fff0c9;
}
.badge.red {
  color: #9f1d38;
  background: #fde4e9;
}
.table-wrap,
.scroll {
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #a9bdd1 #edf2f7;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
th {
  padding: 13px 18px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #eaf1f8;
  color: #546d86;
  white-space: normal;
  border-bottom: 1px solid #d8e2ed;
}
td {
  padding: 16px 18px;
  vertical-align: middle;
  font-size: 12px;
  border-bottom: 1px solid #e1e9f1;
  background: #fbfdff;
  overflow-wrap: anywhere;
}
td small {
  font-size: 10px;
  line-height: 1.6;
  color: #657d93;
}
tbody tr:nth-child(even) td {
  background: #f4f8fc;
}
tbody tr:hover td {
  background: #eaf2fa;
}
.has-actions td:last-child,
.has-actions th:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  box-shadow: -7px 0 11px #23466308;
  min-width: 135px;
}
.has-actions th:last-child {
  z-index: 2;
}
.has-actions td:last-child .actions {
  flex-wrap: wrap;
}
.cell-name {
  font-weight: 700;
  color: #17334e;
}
.table-footer {
  padding: 16px 21px;
  background: #edf3f9;
  border-top: 1px solid #dce5ef;
  font-size: 10px;
  color: #5a728b;
}
.empty {
  background: radial-gradient(ellipse at center, #fff, #ecf3f9);
  border: 1px dashed #b8cbdc;
  border-radius: 17px;
  padding: 42px 26px;
  color: #536f89;
}
.empty-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #dae7f3);
  border: 1px solid #fff;
  box-shadow:
    inset 0 1px #fff,
    0 6px 12px #2b50651a,
    0 17px 23px #2b506507;
}
.empty-icon .icon {
  width: 25px;
  height: 25px;
  color: #47708e;
}
.empty h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.empty p {
  max-width: 48ch;
  margin: 0 auto 20px;
  font-size: 12px;
}
.empty-inline {
  padding: 30px;
  color: #5f7891;
  text-align: center;
  font-size: 12px;
}
.notice-box {
  border: 1px solid #cddcea;
  border-left: 3px solid #385e7b;
  border-radius: 12px;
  background: linear-gradient(120deg, #f5f9fd, #e9f1f9);
  font-size: 12px;
  line-height: 1.7;
  box-shadow: inset 0 1px #fff;
}
.loading {
  border-radius: 18px;
  background: linear-gradient(110deg, #f2f6fb, #e0eaf5, #f2f6fb);
  padding: 30px;
  color: #56728d;
  box-shadow: var(--shadow-card);
}
dialog {
  padding: 0;
  border: 1px solid #cbd9e6;
  border-radius: 24px;
  box-shadow:
    0 8px 20px #0a1b3533,
    0 35px 90px #0a1b3544;
  max-width: min(760px, calc(100vw - 28px));
  max-height: calc(100dvh - 40px);
  background: #f6f9fc;
}
dialog::backdrop {
  background: #0b1c3673;
  backdrop-filter: blur(3px);
}
.modal-head {
  background: linear-gradient(125deg, #fff, #e8f0f8);
  border-bottom: 1px solid #d2deea;
  padding: 23px 26px;
}
.modal-body {
  padding: 24px 26px;
}
.modal-foot {
  padding: 18px 26px;
  background: #eaf1f8;
  border-top: 1px solid #d2deea;
}
.form-grid {
  gap: 18px;
}
.valuation-tabs,
.finance-tabs,
.inventory-tabs,
.intelligence-tabs,
.executive-tabs {
  padding: 7px;
  background: linear-gradient(125deg, #f8fbfe, #e3ecf5);
  border: 1px solid #c8d7e5;
  border-radius: 16px;
  box-shadow:
    inset 0 1px #fff,
    0 5px 14px #1b3c5608;
  gap: 5px;
  margin-bottom: 24px;
}
.valuation-tab,
.finance-tab,
.inventory-tab,
.intelligence-tab,
.executive-tab {
  font-size: 11px;
  border-radius: 11px;
  padding: 10px 13px;
}
.valuation-tab.active,
.finance-tab.active,
.inventory-tab.active,
.intelligence-tab.active,
.executive-tab.active {
  color: #fff;
  background: linear-gradient(130deg, #17354e, #0f233b);
  box-shadow:
    inset 0 1px #88a6bf40,
    0 3px 7px #10243b29;
}
.valuation-kpis {
  gap: 17px;
}
.valuation-kpis article {
  border-radius: 20px;
  background: linear-gradient(140deg, #fff, #e9f1f9);
  border: 1px solid #ccdbe7;
  box-shadow: var(--shadow-card), var(--shadow-inset);
  padding: 22px;
}
.valuation-kpis article:first-child {
  background: linear-gradient(140deg, #17314e, #244864);
  color: #fff;
  border-color: #345570;
}
.valuation-kpis article:first-child small,
.valuation-kpis article:first-child span,
.valuation-kpis article:first-child strong {
  color: #e6f0fa;
}
.valuation-kpis article strong {
  font-size: 25px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.valuation-kpis article small {
  font-size: 9px;
  line-height: 1.7;
}
.valuation-kpis article span {
  font-size: 10px;
}
.valuation-box {
  padding: 23px;
}
.valuation-box h2 {
  font-size: 17px;
}
.valuation-box h3 {
  font-size: 14px;
}
.valuation-disclaimer {
  border-radius: 15px;
  background: #e9f0f7;
  border-color: #c8d8e7;
  font-size: 10px;
  color: #5d758b;
}
.executive-card,
.executive-kpis article {
  border-radius: 20px !important;
  background: linear-gradient(140deg, #fff, #e9f2f9) !important;
  border: 1px solid #cad9e7 !important;
  box-shadow: var(--shadow-card), var(--shadow-inset) !important;
}
.executive-card strong {
  font-variant-numeric: tabular-nums;
}
.executive-notes {
  padding: 23px;
}
.executive-notes p {
  font-size: 12px;
}
.premium-chart {
  padding: 26px 28px;
  background: linear-gradient(180deg, #fcfeff, #f0f6fb);
}
.premium-chart svg {
  max-height: 320px;
}
.premium-chart text {
  font-size: 12px;
  fill: #5c7891;
}
.chart-grid {
  stroke: #d4e1ed;
  stroke-dasharray: 3 5;
}
.chart-line {
  stroke: #c32344;
  stroke-width: 3;
  filter: drop-shadow(0 3px 3px #bd234433);
}
.chart-point {
  stroke: #c32344;
  stroke-width: 3;
  fill: #fff;
  filter: drop-shadow(0 2px 2px #294a641a);
}
.chart-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 5px 14px;
  font-size: 11px;
  color: #4e6b85;
}
.chart-readout strong {
  font-size: 12px;
  color: #173b59;
}
.chart-readout span {
  color: #7b263e;
  font-weight: 650;
}
.premium-chart summary {
  font-size: 10px;
  color: #486c8c;
  margin-top: 12px;
}
.premium-chart details {
  padding-top: 6px;
  border-top: 1px solid #d9e4ee;
}
.country-map {
  padding: 15px;
  background: linear-gradient(145deg, #fff, #eaf2f9);
  border-radius: 16px;
  border: 1px solid #d9e4ee;
}
.metric-bar progress {
  height: 9px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px #163b5520;
}
.metric-bar strong {
  font-size: 12px;
}
.metric-bar span {
  font-size: 12px;
  color: #59738c;
}
.bigdata .hero {
  margin-bottom: 22px;
}
.bigdata .hero .eyebrow {
  margin: 0 0 10px;
}
.bigdata .hero h1 {
  font-size: 38px;
}
.bigdata #period {
  padding: 13px 15px;
  background: #ffffff90;
  border: 1px solid #d1deea;
  border-radius: 15px;
  box-shadow:
    inset 0 1px #fff,
    0 7px 16px #254c6608;
}
.bigdata #period input {
  max-width: 145px;
  font-size: 12px;
}
.bigdata #period label {
  font-size: 10px;
}
.bigdata #period button {
  border: 1px solid #c12442;
  background: linear-gradient(120deg, #d72a49, #b81b38);
  box-shadow:
    inset 0 1px #ffb2be55,
    0 5px 12px #be234424;
  border-radius: 10px;
  font-size: 12px;
  padding: 11px 15px;
}
.bigdata #tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 15px;
  overflow: visible;
}
.bigdata #tabs .area-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 19px 16px;
  border: 1px solid #cbd9e7;
  border-radius: 18px;
  background: linear-gradient(125deg, #fff, #edf4fa);
  box-shadow: var(--shadow-card), var(--shadow-inset);
  white-space: normal;
  min-height: 100px;
  color: #1d3d59;
}
.area-tile .area-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(140deg, #fff, #dce9f5);
  border: 1px solid #fff;
  border-radius: 12px;
  box-shadow: 0 4px 9px #1a3f5712;
}
.area-tile .area-icon .icon {
  width: 22px;
  height: 22px;
}
.area-tile strong {
  font-size: 12px;
  display: block;
  font-weight: 750;
  line-height: 1.4;
}
.area-tile small {
  font-size: 9px;
  letter-spacing: 0;
  color: #657b90;
  line-height: 1.6;
  margin-top: 5px;
}
.bigdata #tabs .area-tile[aria-selected="true"] {
  background:
    radial-gradient(ellipse at 90% 0, #42698a70, transparent 85%),
    linear-gradient(130deg, #102a44, #214661);
  color: #fff;
  border-color: #315b7c;
  box-shadow:
    inset 0 1px #c4e0f13d,
    0 5px 8px #102b4520,
    0 15px 27px #102b4519;
}
.area-tile[aria-selected="true"] small {
  color: #cfdfed;
}
.area-tile[aria-selected="true"] .area-icon {
  background: #ffffff10;
  border-color: #ffffff25;
  box-shadow: inset 0 1px #ffffff20;
  color: #fff;
}
.bigdata #tabs .area-tile:hover {
  transform: translateY(-3px);
}
.secondary-tools {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 17px;
}
.secondary-menu {
  position: relative;
  margin: 0;
  font-size: 10px;
  z-index: 3;
}
.secondary-menu summary {
  cursor: pointer;
  padding: 9px 0;
  color: #5b7188;
}
.secondary-menu > div {
  position: absolute;
  top: 35px;
  left: 0;
  display: grid;
  gap: 6px;
  width: 260px;
  background: #f7fbff;
  border: 1px solid #c7d6e5;
  border-radius: 15px;
  box-shadow: var(--shadow-raised);
  padding: 12px;
}
.secondary-menu button {
  font-size: 11px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 9px 12px;
  color: #31516f;
}
.secondary-menu button:hover {
  background: #e2ecf7;
}
.technical-access {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 9px 0;
  font-size: 10px;
  color: #58728b;
}
.technical-access .icon {
  width: 14px;
  height: 14px;
}
.bigdata #message {
  font-size: 10px;
  color: #57738b;
  margin: 10px 0 16px;
}
.bigdata .box {
  padding: 25px;
  background: linear-gradient(125deg, #fbfdff, #edf4fa);
  margin-bottom: 23px;
}
.bigdata .box > h2 {
  font-size: 17px;
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid #d2dfec;
}
.bigdata .box > p {
  font-size: 12px;
}
.bigdata .cards {
  gap: 16px;
}
.bigdata .card {
  border-radius: 19px;
  border: 1px solid #ccdae7;
  background: linear-gradient(130deg, #fff, #e7f0f9);
  box-shadow: var(--shadow-card), var(--shadow-inset);
}
.bigdata .card strong {
  font-size: 30px;
  color: #193d5c;
}
.bigdata .card span {
  color: #5b768d;
  font-size: 10px;
}
.bigdata .stat {
  min-height: 165px;
}
.bigdata .topbar .button {
  font-size: 10px;
}
.bigdata .box .empty-inline {
  padding: 28px 20px;
}
.bigdata footer {
  font-size: 10px;
  color: #6a8198;
}
.bigdata .sidebar .nav {
  display: grid;
}
.bigdata .sidebar .nav a {
  margin: 0;
}
@media (min-width: 1800px) {
  .shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }
  #content,
  .bigdata main {
    padding: 38px 42px 56px;
  }
  .page-head,
  .bigdata .hero {
    padding: 32px 34px;
  }
  .stat {
    padding: 27px;
  }
  .panel-head {
    padding: 25px 30px;
  }
  .stats {
    gap: 22px;
  }
  .columns {
    gap: 28px;
  }
  .bigdata #tabs .area-tile {
    padding: 22px;
    min-height: 110px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 215px minmax(0, 1fr);
  }
  #content,
  .bigdata main {
    padding: 23px 20px 35px;
  }
  .sidebar {
    padding: 24px 12px;
  }
  .sidebar .brand {
    font-size: 21px;
  }
  .sidebar .nav a {
    padding: 10px;
    font-size: 12px;
  }
  .page-head,
  .bigdata .hero {
    padding: 23px;
  }
  .bigdata #tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats.history-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .history-stats .stat-value {
    font-size: 25px;
  }
  .history-stats .stat {
    padding: 18px;
  }
  .period-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .period-stats .stat {
    padding: 19px;
  }
  .period-stats .stat-value {
    font-size: 27px;
  }
  .valuation-kpis article strong {
    font-size: 21px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 17px 15px 12px;
    border-right: 0;
  }
  .sidebar .brand {
    font-size: 21px;
  }
  .sidebar .brand img {
    width: 32px;
    height: 32px;
  }
  .sidebar .brand small {
    font-size: 7px;
  }
  .sidebar .nav,
  .bigdata .sidebar .nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin: 17px 0 0;
    padding: 0 0 5px;
    scrollbar-width: thin;
    scrollbar-color: #476079 transparent;
  }
  .sidebar .nav a {
    padding: 10px 12px;
    flex-shrink: 0;
    font-size: 11px;
    border-radius: 10px;
  }
  .sidebar .nav a.active {
    transform: none;
  }
  .sidebar .nav .icon {
    width: 16px;
    height: 16px;
  }
  .sidebar .nav a.active::before {
    display: none;
  }
  .side-bottom {
    display: none;
  }
  .topbar {
    height: 58px;
    padding: 13px 17px;
  }
  .topbar .clock {
    display: none;
  }
  .topbar .breadcrumb {
    font-size: 10px;
  }
  .top-right {
    gap: 9px;
  }
  .top-right #user {
    font-size: 10px;
  }
  #content,
  .bigdata main {
    padding: 18px 13px 30px;
  }
  .page-head,
  .bigdata .hero {
    padding: 22px 20px;
    border-radius: 20px;
    display: block;
    margin-bottom: 20px;
  }
  .page-head h1 {
    font-size: 28px;
    line-height: 1.15;
  }
  .page-head p {
    font-size: 11px;
  }
  .page-head .actions {
    margin-top: 19px;
    justify-content: flex-start;
  }
  .page-head .actions .button {
    flex: 0 1 auto;
  }
  .workspace-kicker {
    font-size: 8px;
  }
  .page-head > .badge {
    margin-top: 18px;
  }
  .stats.history-stats,
  .stats.period-stats {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .history-stats .stat {
    min-height: 112px;
    padding: 19px 21px;
  }
  .history-stats .stat-value {
    font-size: 31px;
  }
  .history-stats .stat-top {
    font-size: 10px;
  }
  .history-stats .stat small {
    font-size: 10px;
  }
  .stats {
    gap: 13px;
  }
  .stat {
    padding: 21px;
  }
  .stat-value {
    font-size: 31px;
  }
  .period-stats {
    padding: 18px;
    gap: 13px;
  }
  .period-stats .stat {
    min-height: 120px;
    padding: 20px 22px;
  }
  .period-stats .stat-value {
    font-size: 32px;
  }
  .panel {
    border-radius: 20px;
  }
  .panel-head {
    padding: 21px;
    gap: 17px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .panel-head p {
    font-size: 10px;
  }
  .panel-head::before {
    top: 20px;
    bottom: 20px;
  }
  .period-form {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
    align-items: end;
    gap: 10px;
  }
  .period-form label {
    min-width: 0;
  }
  .period-form label:has(input[type="date"]):not([hidden]) {
    grid-column: 1/-1;
  }
  .period-form select {
    max-width: 100%;
    padding: 10px;
    font-size: 12px;
  }
  .period-form .button {
    height: 41px;
  }
  .columns {
    display: block;
  }
  .filters {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 13px;
    gap: 10px;
  }
  .filters .search {
    width: 100%;
  }
  .filters select {
    max-width: 100%;
    width: 100%;
  }
  .search input {
    font-size: 12px;
  }
  .table-footer {
    padding: 14px 17px;
  }
  .has-actions td:last-child {
    max-width: 175px;
    min-width: 125px;
    padding-inline: 10px;
  }
  .has-actions td:last-child .button {
    font-size: 10px;
    padding: 7px 8px;
  }
  .has-actions .actions {
    gap: 5px;
  }
  .premium-chart {
    padding: 20px 14px;
  }
  .premium-chart svg {
    min-width: 550px;
  }
  .premium-chart {
    overflow: auto;
  }
  .chart-readout {
    min-width: 280px;
    display: block;
  }
  .chart-readout span {
    display: block;
    margin-top: 6px;
  }
  .valuation-tabs,
  .finance-tabs,
  .inventory-tabs,
  .intelligence-tabs,
  .executive-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 6px;
    border-radius: 13px;
    gap: 4px;
  }
  .valuation-tab,
  .finance-tab,
  .inventory-tab,
  .intelligence-tab,
  .executive-tab {
    flex-shrink: 0;
    padding: 9px 11px;
    font-size: 10px;
    white-space: nowrap;
  }
  .valuation-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .valuation-kpis article {
    padding: 17px 15px;
    border-radius: 17px;
  }
  .valuation-kpis article strong {
    font-size: 21px;
  }
  .valuation-kpis article span {
    font-size: 9px;
  }
  .valuation-kpis article small {
    font-size: 8px;
  }
  .valuation-box {
    padding: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 13px;
  }
  .modal-body,
  .modal-head {
    padding: 22px 20px;
  }
  .modal-foot {
    padding: 16px 20px;
  }
  .modal-head h2 {
    font-size: 18px;
  }
  dialog {
    max-width: calc(100vw - 24px);
    border-radius: 20px;
    max-height: calc(100dvh - 26px);
  }
  .bigdata .hero h1 {
    font-size: 31px;
  }
  .bigdata .hero p {
    font-size: 11px;
  }
  .bigdata #period {
    margin-top: 20px;
    padding: 13px;
    gap: 9px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .bigdata #period label {
    min-width: 0;
  }
  .bigdata #period input {
    width: 100%;
    max-width: 100%;
    font-size: 11px;
  }
  .bigdata #period button {
    grid-column: 1/-1;
  }
  .bigdata #tabs {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }
  .bigdata #tabs .area-tile {
    display: block;
    padding: 15px 12px;
    border-radius: 17px;
    min-height: 141px;
  }
  .area-tile .area-icon {
    width: 33px;
    height: 33px;
    margin-bottom: 11px;
    border-radius: 10px;
  }
  .area-tile .area-icon .icon {
    width: 18px;
    height: 18px;
  }
  .area-tile strong {
    font-size: 11px;
  }
  .area-tile small {
    font-size: 9px;
    line-height: 1.5;
    margin-top: 5px;
  }
  .secondary-tools {
    display: block;
    margin-bottom: 13px;
  }
  .secondary-menu summary {
    font-size: 10px;
    padding: 9px 0;
  }
  .technical-access {
    font-size: 10px;
  }
  .bigdata .box {
    padding: 21px 18px;
    border-radius: 20px;
  }
  .bigdata .box > h2 {
    font-size: 16px;
  }
  .bigdata .stats,
  .bigdata .cards {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .bigdata .stat {
    min-height: 135px;
  }
  .bigdata .bigdata-grid {
    display: block;
  }
  .bigdata .box .stats {
    margin-bottom: 10px;
  }
  .bigdata .country-map {
    padding: 10px;
  }
  .bigdata .country-map svg {
    min-width: 0;
  }
  .bigdata .topbar .button {
    padding: 7px 8px;
    min-height: 30px;
  }
  .bigdata .topbar #user {
    display: none;
  }
  .bigdata #message {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .stat:hover,
  .sidebar .nav a:hover,
  .bigdata #tabs .area-tile:hover,
  .button:hover {
    transform: none !important;
  }
  dialog::backdrop {
    backdrop-filter: none;
  }
}
.today-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
  gap: 22px;
  padding: 0 24px 24px;
  align-items: start;
}
.today-workbench.no-ledger {
  grid-template-columns: 1fr;
}
.today-visual {
  min-width: 0;
  border: 1px solid #cbdbea;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #fff, #edf5fc);
  box-shadow:
    inset 0 1px #fff,
    0 6px 18px #21445c0a;
}
.today-visual .premium-chart {
  padding: 20px 17px;
}
.today-visual .premium-chart svg {
  min-width: 0;
  width: 100%;
  height: auto;
  max-height: none;
}
.today-visual .chart-readout {
  display: block;
  font-size: 10px;
}
.today-visual .chart-readout span {
  display: block;
  font-size: 10px;
  margin-top: 5px;
}
.today-visual .premium-chart text {
  font-size: 15px;
}
.today-ledger {
  min-width: 0;
  background: linear-gradient(130deg, #fff, #f0f6fc);
  border: 1px solid #cbdbea;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    inset 0 1px #fff,
    0 7px 18px #21445c0b;
}
.ledger-heading {
  padding: 19px 19px 15px;
  background: linear-gradient(120deg, #edf5fc, #f8fbfe);
  border-bottom: 1px solid #d6e3f0;
}
.ledger-heading h3 {
  font-size: 14px;
  margin: 0 0 5px;
}
.ledger-heading small {
  font-size: 9px;
  color: #647d94;
}
.today-ledger-scroll {
  max-height: 370px;
  overflow: auto;
}
.purchase-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px;
  border-bottom: 1px solid #e1eaf3;
  background: #fafdff;
}
.purchase-row:nth-child(even) {
  background: #f0f6fc;
}
.purchase-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  background: linear-gradient(140deg, #ffe5eb, #f2ccd6);
  border: 1px solid #fff;
  border-radius: 11px;
  box-shadow:
    inset 0 1px #fff,
    0 4px 8px #7d355712;
  color: #93344e;
  font-size: 10px;
  font-weight: 750;
}
.purchase-main {
  min-width: 0;
  flex: 1;
}
.purchase-main strong {
  font-size: 11px;
  display: block;
  overflow-wrap: anywhere;
}
.purchase-main small,
.purchase-main time {
  display: block;
  font-size: 9px;
  color: #6b8196;
  line-height: 1.7;
}
.purchase-value {
  text-align: right;
  flex-shrink: 0;
}
.purchase-value strong {
  display: block;
  font-size: 14px;
  color: #163d5b;
  margin-bottom: 7px;
  letter-spacing: -0.025em;
}
.purchase-value .button {
  font-size: 9px;
  min-height: 28px;
  padding: 5px 8px;
}
.today-ledger .table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 13px 15px;
  font-size: 9px;
}
.today-ledger .table-footer .button {
  font-size: 9px;
  min-height: 28px;
  padding: 5px 8px;
}
.dashboard-updated {
  font-size: 9px;
  color: #6b8198;
  padding: 0 26px 18px;
}
.today-board > .notice-box {
  margin: 0 24px 20px;
}
.today-visual > .empty {
  border: 0;
  border-radius: 0;
  padding: 34px 23px;
}
.today-visual > .empty h3 {
  font-size: 15px;
}
.today-visual > .empty p {
  font-size: 11px;
  margin-bottom: 0;
}
@media (min-width: 1800px) {
  .today-workbench {
    gap: 26px;
    padding: 0 28px 28px;
  }
  .today-visual .premium-chart {
    padding: 25px;
  }
  .purchase-row {
    padding: 21px;
  }
  .purchase-main strong {
    font-size: 12px;
  }
  .purchase-value strong {
    font-size: 17px;
  }
  .today-ledger-scroll {
    max-height: 435px;
  }
}
@media (max-width: 1100px) {
  .today-workbench {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 20px 20px;
  }
  .today-visual .premium-chart text {
    font-size: 12px;
  }
}
@media (max-width: 760px) {
  .today-workbench {
    display: block;
    padding: 0 17px 18px;
  }
  .today-visual {
    margin-bottom: 17px;
  }
  .today-visual .premium-chart {
    overflow: auto;
    min-width: 0;
    padding: 17px 11px;
  }
  .today-visual .premium-chart svg {
    min-width: 520px;
  }
  .today-visual .premium-chart text {
    font-size: 12px;
  }
  .today-visual .chart-readout {
    min-width: 0;
  }
  .purchase-row {
    padding: 16px 13px;
    gap: 9px;
  }
  .purchase-avatar {
    width: 29px;
    height: 29px;
    font-size: 9px;
    border-radius: 9px;
  }
  .purchase-main strong {
    font-size: 11px;
  }
  .purchase-main small,
  .purchase-main time {
    font-size: 9px;
  }
  .purchase-value strong {
    font-size: 13px;
  }
  .today-ledger-scroll {
    max-height: 430px;
  }
  .dashboard-updated {
    font-size: 8px;
    padding: 0 20px 17px;
  }
}
.premium-chart svg text {
  font-size: 16px;
}
.today-visual .premium-chart svg text {
  font-size: 21px;
}
@media (max-width: 760px) {
  .premium-chart svg text {
    font-size: 18px;
  }
  .today-visual .premium-chart svg text {
    font-size: 18px;
  }
}
/* Source status messages can be long on narrow screens. */
.bigdata .badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Purchase detail keeps commercial columns readable on narrow screens. */
.purchase-order-detail .table-wrap table{min-width:640px}.purchase-order-detail td{min-width:96px;overflow-wrap:normal}.purchase-order-detail td:first-child{min-width:160px}.purchase-order-detail .row{align-items:flex-start;flex-wrap:wrap}


.automation-layout{grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr);align-items:start}.automation-layout .table-wrap{max-height:640px;overflow:auto}.automation-layout table{min-width:760px}.automation-layout td:first-child{min-width:180px}.automation-layout td:last-child{min-width:160px}.automation-layout th{position:sticky;top:0;z-index:2;background:#e9f1f8}.automation-layout .table-wrap:focus-visible{outline:2px solid var(--red);outline-offset:3px}@media(max-width:1000px){.automation-layout{grid-template-columns:minmax(0,1fr)}.automation-layout .table-wrap{max-height:480px}}
