:root {
  --bg: #eef4fb;
  --bg-2: #f8fbff;
  --surface: rgba(255, 255, 255, 0.42);
  --surface-strong: rgba(255, 255, 255, 0.62);
  --surface-soft: rgba(255, 255, 255, 0.3);
  --line: rgba(106, 133, 182, 0.18);
  --line-strong: rgba(106, 133, 182, 0.28);
  --text: #14304d;
  --muted: #67809b;
  --primary: #4285f4;
  --primary-2: #77a9ff;
  --danger: #eb5f63;
  --ok: #2ab685;
  --warn: #d69932;
  --shadow: 0 20px 60px rgba(120, 145, 180, 0.18);
  --shadow-soft: 0 10px 30px rgba(133, 158, 196, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(90, 161, 255, 0.18), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(157, 212, 255, 0.18), transparent 28%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}
button,
input {
  font: inherit;
}

.container {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.bg-orb {
  position: fixed;
  inset: auto;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.45;
  z-index: 0;
}
.orb-a {
  width: 280px;
  height: 280px;
  top: 70px;
  left: -60px;
  background: rgba(91, 169, 255, 0.28);
}
.orb-b {
  width: 260px;
  height: 260px;
  top: 260px;
  right: -40px;
  background: rgba(179, 198, 255, 0.34);
}
.orb-c {
  width: 220px;
  height: 220px;
  bottom: 50px;
  left: 18%;
  background: rgba(176, 233, 255, 0.24);
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 18px 0 0;
}

.shell-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.page-shell {
  position: relative;
  z-index: 1;
  padding-top: 10px;
  padding-bottom: 10px;
}

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.32) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.glass--strong {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%),
    rgba(255, 255, 255, 0.2);
  border-color: var(--line-strong);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}
.brand:hover {
  color: var(--text);
}
.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.15;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.brand__badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.92), rgba(119, 169, 255, 0.68));
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(66, 133, 244, 0.28);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nav a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.22s ease;
}
.nav a:hover,
.nav a.is-active {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.header-currency {
  min-width: 255px;
  padding: 12px 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}
.header-currency__line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.header-currency__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.header-currency__line strong {
  font-size: 20px;
  line-height: 1;
}
.header-currency__meta {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  line-height: 1.45;
}
.currency-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.currency-state.is-live {
  background: rgba(42, 182, 133, 0.12);
  color: var(--ok);
}
.currency-state.is-fallback {
  background: rgba(214, 153, 50, 0.14);
  color: var(--warn);
}
.currency-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.currency-switcher__item {
  min-height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-weight: 700;
  transition: 0.2s ease;
}
.currency-switcher__item.active,
.currency-switcher__item:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 14px 28px rgba(66, 133, 244, 0.2);
}
.currency-switcher--compact {
  grid-template-columns: repeat(2, 72px);
}

.toast-stack {
  position: fixed;
  top: 92px;
  right: 18px;
  z-index: 45;
  width: min(380px, calc(100% - 20px));
  display: grid;
  gap: 10px;
}
.toast {
  position: relative;
  padding: 16px 18px 16px 16px;
  overflow: hidden;
}
.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}
.toast--error::before {
  background: var(--danger);
}
.toast--warning::before {
  background: var(--warn);
}
.toast--info::before {
  background: var(--primary);
}
.toast__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.toast strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}
.toast p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}
.toast__close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 28px;
  width: 28px;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  box-shadow: none;
}
.toast--hidden {
  opacity: 0;
  transform: translateY(-10px);
}

.hero,
.panel,
.auth-card,
.auth-side,
.stat-card,
.toolbar-note {
  padding: 22px;
}
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.compact-hero {
  align-items: center;
}
.hero h1,
.panel h2,
.auth-card h1,
.auth-side h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
}
.panel h2,
.auth-side h2 {
  font-size: 24px;
}
.lead {
  max-width: 760px;
  margin: 10px 0 0;
  line-height: 1.65;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.panel,
.toolbar-note {
  margin-bottom: 18px;
}
.toolbar-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.toolbar-note--stacked {
  align-items: flex-start;
  flex-direction: column;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.ghost-link {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}
.ghost-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
}

.grid {
  display: grid;
  gap: 16px;
}
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}
.two-col {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.feature-split {
  align-items: start;
}
.stat-card {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.stat-card span,
.stat-card small {
  display: block;
  color: var(--muted);
}
.stat-card strong {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.actions-row,
.inline-form,
.stack-form {
  display: flex;
  gap: 12px;
}
.actions-row {
  flex-wrap: wrap;
  align-items: center;
}
.inline-form {
  align-items: center;
}
.stack-form {
  flex-direction: column;
}
.compact {
  display: inline-flex;
}
.compact-form input {
  max-width: 170px;
}
.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
.grid-form button {
  grid-column: 1 / -1;
}
.search-form {
  width: min(520px, 100%);
  justify-content: flex-end;
}
.search-form input {
  flex: 1;
}
.form-panel {
  margin-top: 0;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}
.field-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

input {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(113, 139, 175, 0.22);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
input:focus {
  border-color: rgba(66, 133, 244, 0.5);
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.12);
  background: rgba(255, 255, 255, 0.82);
}
input::placeholder {
  color: #91a3b6;
}

button,
.button-link,
.filter-link {
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease,
    background 0.18s ease;
}
button,
.button-link {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 16px 30px rgba(66, 133, 244, 0.24);
}
button:hover,
.button-link:hover {
  transform: translateY(-1px);
  text-decoration: none;
}
.button-secondary {
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}
button.danger {
  background: linear-gradient(135deg, #ef7b7d, var(--danger));
  box-shadow: 0 16px 30px rgba(235, 95, 99, 0.2);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(113, 139, 175, 0.14);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(113, 139, 175, 0.12);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.22);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge.pending {
  background: rgba(214, 153, 50, 0.14);
  color: var(--warn);
}
.badge.approved,
.badge.executed {
  background: rgba(42, 182, 133, 0.14);
  color: var(--ok);
}
.badge.rejected,
.badge.failed,
.badge.disabled {
  background: rgba(235, 95, 99, 0.14);
  color: var(--danger);
}

.priority-badge.priority-critical {
  background: rgba(66, 133, 244, 0.12);
  color: var(--primary);
}
.priority-badge.priority-high {
  background: rgba(42, 182, 133, 0.12);
  color: var(--ok);
}
.priority-badge.priority-medium {
  background: rgba(214, 153, 50, 0.12);
  color: var(--warn);
}
.priority-badge.priority-low {
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
}
.priority-badge.priority-background {
  background: rgba(103, 128, 155, 0.12);
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-link {
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}
.filter-link.inactive {
  background: rgba(255, 255, 255, 0.3);
  color: var(--muted);
  box-shadow: none;
}
.filter-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

.muted {
  color: var(--muted);
}
.tiny-text {
  font-size: 12px;
  line-height: 1.45;
}
.inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rationale {
  min-width: 260px;
  max-width: 440px;
  color: var(--muted);
  line-height: 1.55;
}
.price-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.price-stack strong {
  color: var(--text);
  font-weight: 700;
}
.price-stack small {
  color: var(--muted);
  line-height: 1.35;
}
.priority-display {
  display: flex;
  align-items: center;
  gap: 12px;
}
.priority-display--stacked {
  align-items: flex-start;
}
.priority-display strong {
  display: block;
  margin-bottom: 4px;
}
.priority-panel--clean {
  padding: 18px;
}
.priority-summary {
  padding: 16px 18px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.36);
}
.priority-summary strong {
  display: block;
  margin-bottom: 8px;
}
.priority-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.priority-list {
  display: grid;
  gap: 10px;
}
.priority-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(113, 139, 175, 0.12);
}
.priority-row__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.priority-row__range {
  font-weight: 700;
}
.priority-row__right {
  color: var(--muted);
  line-height: 1.5;
}

.help-band {
  display: grid;
  gap: 14px;
}
.help-band--soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.36));
}
.help-band__content {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.help-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}
.help-pill--muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.34);
}

.alert {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 14px;
}
.alert.error {
  background: rgba(235, 95, 99, 0.1);
  border: 1px solid rgba(235, 95, 99, 0.22);
  color: #c94a4f;
}

.chart-panel {
  padding-top: 10px;
  color: var(--primary);
}
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}
.json-block {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}

.auth-layout {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: center;
}
.auth-card,
.auth-side {
  padding: 28px;
}
.auth-card {
  max-width: 460px;
}

@media (max-width: 1080px) {
  .stats-grid,
  .two-col,
  .grid-form,
  .auth-layout,
  .priority-row {
    grid-template-columns: 1fr;
  }

  .hero,
  .panel-head,
  .shell-header__inner,
  .toolbar-note {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-form,
  .header-right,
  .header-currency {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100%, calc(100% - 20px));
  }
  .page-shell {
    padding-top: 18px;
  }
  .hero,
  .panel,
  .auth-card,
  .auth-side,
  .stat-card,
  .toolbar-note {
    padding: 18px;
  }
  .nav {
    width: 100%;
  }
  .nav a {
    flex: 1 1 auto;
    text-align: center;
  }
  th,
  td {
    padding: 12px 10px;
  }
  .currency-switcher--compact {
    grid-template-columns: 1fr 1fr;
  }
  .toast-stack {
    top: 76px;
    right: 10px;
  }
}
