:root {
  color-scheme: light;
  --blue: #5aa7ff;
  --blue-strong: #2f86ff;
  --green: #46d6a8;
  --cyan: #38c9df;
  --red: #ff7b64;
  --bg-blue: #eef6ff;
  --bg-green: #ecfff7;
  --ink: #172b3a;
  --muted: #6a7f92;
  --soft: rgba(255, 255, 255, 0.56);
  --soft-strong: rgba(255, 255, 255, 0.72);
  --line: rgba(114, 151, 184, 0.18);
  --shadow: 0 22px 60px -36px rgba(58, 126, 188, 0.58);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  font-family: "Geist", "Satoshi", "Outfit", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(90, 167, 255, 0.3), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(70, 214, 168, 0.22), transparent 30rem),
    linear-gradient(135deg, #edf7ff 0%, #f5fbff 48%, #f1fff9 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.28) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.24), transparent 76%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(128, 160, 190, 0.18);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(255,255,255,.62);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(90,167,255,.58);
  box-shadow: 0 0 0 4px rgba(90,167,255,.14);
  background: rgba(255,255,255,.86);
}

label {
  display: grid;
  gap: 7px;
  color: #456173;
  font-size: 13px;
  font-weight: 600;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.glass-card {
  background: linear-gradient(135deg, rgba(255,255,255,.68), rgba(255,255,255,.42));
  border: 1px solid rgba(255,255,255,.76);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.82);
  backdrop-filter: blur(26px) saturate(1.18);
  -webkit-backdrop-filter: blur(26px) saturate(1.18);
}

.ambient {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(44px);
  opacity: .22;
}

.ambient-a {
  left: -16rem;
  bottom: 3rem;
  background: var(--green);
}

.ambient-b {
  right: -14rem;
  top: 5rem;
  background: var(--blue);
}

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  border-radius: 24px;
  padding: 30px;
  text-align: center;
}

.login-panel h1 {
  margin: 14px 0 8px;
  font-size: 28px;
}

.login-panel p {
  margin: 0;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  text-align: left;
}

.app-frame {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  transition: grid-template-columns .24s ease;
}

.app-frame.sidebar-collapsed {
  grid-template-columns: 94px minmax(0, 1fr);
}

.side {
  position: sticky;
  top: 18px;
  height: calc(100dvh - 36px);
  margin: 18px 0 18px 18px;
  padding: 18px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: padding .24s ease, margin .24s ease;
}

.sidebar-collapsed .side {
  padding: 14px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 6px 4px 16px;
}

.sidebar-collapsed .brand-block {
  justify-content: center;
  padding-inline: 0;
}

.sidebar-collapsed .brand-block > div:not(.logo-cube),
.sidebar-collapsed .nav-item > span:last-child,
.sidebar-collapsed .profile-card > span:not(.avatar-face),
.sidebar-collapsed .profile-card > .chev {
  display: none;
}

.brand-block h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.brand-block p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.logo-cube {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  background: linear-gradient(145deg, #2378ff, #5aa7ff 48%, #46d6a8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 18px 28px -22px #2378ff;
}

.logo-cube svg,
.nav-icon svg,
.menu-btn svg,
.icon-button svg,
.search-pill svg,
.chev svg,
.chip-chev svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-cube svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.2;
}

.side-nav {
  display: grid;
  gap: 9px;
  margin-top: 6px;
}

.nav-item {
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 14px;
  color: #425a70;
  background: transparent;
  text-align: left;
  transition: transform .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}

.sidebar-collapsed .nav-item {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 48px;
  padding: 0;
}

.nav-item:hover,
.nav-item.active {
  color: #1274ff;
  background: rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.86);
}

.nav-item:active,
.primary:active,
.ghost:active,
.link-btn:active,
.icon-button:active {
  transform: scale(.98);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #2d86ff;
  background: rgba(90,167,255,.13);
  font-size: 12px;
  font-weight: 800;
}

.nav-item.active .nav-icon {
  color: white;
  background: linear-gradient(135deg, #4c98ff, #46d6a8);
  box-shadow: 0 10px 18px -14px rgba(47,134,255,.8);
}

.profile-wrap {
  position: relative;
  margin-top: auto;
}

.profile-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 17px;
  padding: 11px;
  color: var(--ink);
  background: rgba(255,255,255,.5);
  text-align: left;
}

.sidebar-collapsed .profile-card {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 10px;
}

.profile-card small {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 8px;
  color: #1f9f79;
  border-radius: 999px;
  background: rgba(70,214,168,.18);
}

.avatar-face,
.avatar-mini {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 32%, #ffd4b4 0 18%, transparent 19%),
    linear-gradient(#244763 0 45%, #e7f3ff 46%);
}

.avatar-custom {
  background: rgba(255,255,255,.72);
}

.avatar-custom img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar-face {
  width: 46px;
  height: 46px;
}

.avatar-mini {
  width: 32px;
  height: 32px;
}

.chev {
  color: #8aa0b5;
  display: grid;
  place-items: center;
}

.workspace {
  min-width: 0;
  padding: 28px 30px 30px 26px;
}

.top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.title-row,
.top-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.title-row h2 {
  margin: 0;
  font-size: 22px;
}

.menu-btn,
.icon-button {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #4c6579;
  background: rgba(255,255,255,.42);
}

.menu-btn:hover,
.icon-button:hover {
  color: #1274ff;
  background: rgba(255,255,255,.7);
}

.global-search-wrap {
  position: relative;
}

.search-pill {
  width: min(290px, 36vw);
  height: 42px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.56);
  border: 1px solid rgba(255,255,255,.7);
}

.search-pill input {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.search-panel {
  position: absolute;
  z-index: 28;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, 82vw);
  padding: 10px;
  border-radius: 18px;
}

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

.search-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 10px;
}

.search-panel-title small,
.search-panel button small {
  color: var(--muted);
  font-size: 12px;
}

.search-panel button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  padding: 9px 10px;
  color: #38576f;
  background: transparent;
  text-align: left;
}

.search-panel button:hover {
  color: #1274ff;
  background: rgba(255,255,255,.62);
}

.admin-chip {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.chip-chev {
  color: #7e93a8;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.avatar-file-input {
  display: none;
}

.top-account-wrap,
.notification-wrap {
  position: relative;
}

.account-menu,
.notification-panel {
  position: absolute;
  z-index: 30;
  min-width: 238px;
  padding: 10px;
  border-radius: 18px;
}

.top-account-wrap .account-menu,
.notification-panel {
  top: calc(100% + 10px);
  right: 0;
}

.profile-wrap .account-menu {
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
}

.account-menu[hidden],
.notification-panel[hidden] {
  display: none;
}

.account-menu-head {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid rgba(105,135,165,.12);
  margin-bottom: 6px;
}

.account-menu-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.account-menu button,
.notification-panel button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  color: #38576f;
  background: transparent;
  text-align: left;
}

.account-menu button:hover,
.notification-panel button:hover {
  color: #1274ff;
  background: rgba(255,255,255,.62);
}

.account-menu button.danger {
  color: #d95d4f;
}

.notification-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 10px;
}

.notification-title small,
.notification-panel button small {
  color: var(--muted);
  font-size: 12px;
}

.notification-panel button div {
  display: grid;
  gap: 2px;
}

.notify-dot {
  position: absolute;
  top: 6px;
  right: 5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid rgba(255,255,255,.78);
  border-radius: 999px;
  background: #5aa7ff;
  color: white;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #a8b6c8;
}

.status-dot.ok {
  background: var(--green);
}

.status-dot.warn {
  background: #f5b84b;
}

.status-dot.neutral {
  background: #9fb2c4;
}

.dashboard-stack {
  display: grid;
  gap: 18px;
}

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

.stat-card {
  min-height: 168px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 24px 26px;
  transition: transform .24s ease, box-shadow .24s ease;
}

.stat-card:hover,
.wide-card:hover,
.mini-panel:hover,
.chart-panel:hover,
.donut-panel:hover {
  transform: translateY(-3px);
}

.stat-label {
  color: #2d86ff;
  font-size: 15px;
  font-weight: 800;
}

.stat-label.green {
  color: #20af86;
}

.stat-label.cyan {
  color: #15aabd;
}

.stat-label.red {
  color: #e76f5a;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 31px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-card small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
}

.up {
  color: #1883ff;
}

.down {
  color: #24a77e;
}

.spark {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 16px;
  width: calc(100% - 52px);
  height: 38px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .9fr);
  gap: 18px;
}

.chart-panel,
.donut-panel,
.wide-card,
.mini-panel {
  border-radius: 20px;
  padding: 22px;
  transition: transform .24s ease;
}

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

.panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.panel-head small,
.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.legend {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  vertical-align: middle;
  margin: 0 6px 0 12px;
}

.legend.blue {
  background: var(--blue-strong);
}

.legend.green {
  background: var(--green);
}

.line-chart {
  width: 100%;
  height: 260px;
}

.grid-lines line {
  stroke: rgba(105,135,165,.14);
}

.line-chart text {
  fill: #6f8397;
  font-size: 12px;
}

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

.donut {
  width: 220px;
  height: 220px;
}

.donut text {
  font-size: 27px;
  font-weight: 800;
  fill: var(--ink);
}

.donut text.sub {
  font-size: 13px;
  font-weight: 500;
  fill: var(--muted);
}

.donut-legend {
  display: grid;
  gap: 16px;
  color: #506579;
}

.donut-legend span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.donut-legend b {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

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

.secret-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  border-radius: 20px;
  padding: 18px 22px;
}

.secret-notice p {
  margin: 5px 0 10px;
  color: var(--muted);
}

.secret-notice code {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  padding: 8px 10px;
  border-radius: 10px;
  color: #1f5d8f;
  background: rgba(90,167,255,.13);
}

.delivery-panel {
  display: grid;
  gap: 16px;
}

.delivery-panel .panel-head {
  margin-bottom: 0;
}

.delivery-panel .panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.delivery-meta span,
.delivery-paths code {
  min-width: 0;
  border-radius: 14px;
  padding: 10px 12px;
  color: #476278;
  background: rgba(255,255,255,.44);
  border: 1px solid rgba(255,255,255,.7);
}

.delivery-meta strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-paths {
  display: grid;
  gap: 8px;
}

.delivery-paths code {
  display: block;
  overflow-x: auto;
}

.config-preview {
  min-height: 360px;
  white-space: pre;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 18px;
}

.customer-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 92px;
  display: grid;
  gap: 8px;
  align-content: center;
  border-radius: 18px;
  padding: 18px 20px;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

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

.inline-tools input {
  width: 280px;
}

.primary,
.ghost,
.link-btn {
  min-height: 38px;
  border-radius: 10px;
  border: 0;
  padding: 0 14px;
  transition: transform .2s ease, filter .2s ease, background .2s ease;
}

.primary {
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, #4c98ff, #46d6a8);
  box-shadow: 0 14px 26px -20px rgba(47,134,255,.85);
}

.primary.small,
.ghost.small {
  min-height: 34px;
  font-size: 13px;
}

.ghost {
  color: #2f75bd;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.78);
}

.ghost.danger {
  color: #d95d4f;
  background: rgba(255,255,255,.54);
  border-color: rgba(255,123,100,.28);
}

.link-btn {
  min-height: 30px;
  padding: 0 8px;
  color: #2f86ff;
  background: transparent;
  font-weight: 700;
}

.link-btn.danger {
  color: #d95d4f;
}

.table-glass {
  overflow-x: auto;
  border-radius: 16px;
  background: rgba(255,255,255,.28);
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -2px 0 14px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.58), rgba(255,255,255,.3));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.66);
}

.bulk-toolbar span {
  margin-right: 2px;
  color: var(--muted);
  font-size: 13px;
}

.bulk-toolbar strong {
  color: var(--blue-strong);
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 16px;
  background: rgba(255,255,255,.36);
}

.pagination-bar > span,
.pagination-bar label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pagination-bar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination-bar select {
  min-height: 34px;
  padding: 0 28px 0 10px;
  border-radius: 10px;
  font-size: 13px;
}

.pager-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pager-btn {
  min-width: 36px;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 10px;
  padding: 0 10px;
  color: #38607e;
  background: rgba(255,255,255,.52);
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.pager-btn:hover:not(:disabled),
.pager-btn.active {
  color: white;
  background: linear-gradient(135deg, #4c98ff, #46d6a8);
  box-shadow: 0 12px 22px -18px rgba(47,134,255,.85);
}

.pager-btn:active:not(:disabled) {
  transform: scale(.97);
}

.pager-btn:disabled {
  cursor: not-allowed;
  color: #9aacbd;
  background: rgba(255,255,255,.28);
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(110,145,180,.13);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  white-space: nowrap;
}

th {
  color: #7a8da1;
  font-weight: 700;
}

.check-cell {
  width: 42px;
  min-width: 42px;
  padding-right: 6px;
}

.table-check {
  width: 18px;
  height: 18px;
  min-height: 18px;
  display: inline-block;
  margin: 0;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--blue-strong);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

.compact th,
.compact td {
  padding: 10px 12px;
  font-size: 12px;
}

.mono {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.ok {
  color: #19a77e;
  background: rgba(70,214,168,.16);
}

.status-pill.bad {
  color: #e86555;
  background: rgba(255,123,100,.15);
}

.status-pill.warn {
  color: #b7791f;
  background: rgba(255, 193, 92, .18);
}

.status-pill.neutral {
  color: #4281bf;
  background: rgba(90,167,255,.14);
}

.audit-raw {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

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

.wide {
  grid-column: 1 / -1;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
}

.settings-form button {
  align-self: end;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  padding: 0 13px;
  color: #52708a;
  background: transparent;
  font-weight: 800;
}

.tab-btn:hover,
.tab-btn.active {
  color: #1274ff;
  background: rgba(255,255,255,.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.result-box {
  min-height: 320px;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100% - 44px));
  padding: 13px 16px;
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1280px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-grid,
  .split-grid,
  .quad-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .app-frame,
  .app-frame.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .side {
    position: relative;
    top: 0;
    height: auto;
    margin: 12px;
  }

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

  .sidebar-collapsed .brand-block {
    justify-content: flex-start;
    padding: 6px 4px 16px;
  }

  .sidebar-collapsed .brand-block > div:not(.logo-cube),
  .sidebar-collapsed .nav-item > span:last-child,
  .sidebar-collapsed .profile-card > span:not(.avatar-face),
  .sidebar-collapsed .profile-card > .chev {
    display: block;
  }

  .sidebar-collapsed .nav-item {
    grid-template-columns: 28px 1fr;
    justify-items: stretch;
    padding: 0 14px;
  }

  .sidebar-collapsed .profile-card {
    grid-template-columns: 46px 1fr auto;
    justify-items: stretch;
    padding: 11px;
  }

  .workspace {
    padding: 12px;
  }

  .top-line,
  .top-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .search-pill {
    width: 100%;
  }

  .global-search-wrap,
  .search-panel {
    width: 100%;
  }

  .stat-grid,
  .settings-form,
  .form-grid,
  .delivery-meta,
  .secret-notice {
    grid-template-columns: 1fr;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

@media (max-width: 520px) {
  .side-nav {
    grid-template-columns: 1fr;
  }

  .stat-card,
  .chart-panel,
  .donut-panel,
  .wide-card,
  .mini-panel {
    padding: 16px;
  }

  .inline-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-tools input,
  .inline-tools button {
    width: 100%;
  }

  .pagination-bar,
  .pager-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .pager-controls,
  .pagination-bar label,
  .pagination-bar select,
  .pager-btn {
    width: 100%;
  }

  .customer-metrics {
    grid-template-columns: 1fr;
  }
}
