:root {
  --bg: #070a12;
  --bg-soft: #0f1420;
  --card: rgba(15, 20, 32, 0.88);
  --card-strong: #121826;
  --border: rgba(242, 194, 0, 0.16);
  --text: #ecf0f8;
  --muted: #9aa4b2;
  --yellow: #f2c200;
  --yellow-soft: rgba(242, 194, 0, 0.14);
  --green: #2dd4bf;
  --red: #f87171;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(1000px 500px at 10% 0%, rgba(242, 194, 0, 0.1), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(45, 212, 191, 0.08), transparent 55%),
    linear-gradient(180deg, #05070d 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: rgba(9, 12, 20, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  min-height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.sidebar .brand {
  letter-spacing: -0.03em;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.82rem 0.95rem;
  border-radius: 14px;
  color: var(--muted);
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.sidebar-link:hover {
  background: rgba(242, 194, 0, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(242, 194, 0, 0.24), rgba(242, 194, 0, 0.1));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(242, 194, 0, 0.16);
}

.main-shell {
  min-width: 0;
}

.glass-card,
.metric-card,
.panel-card,
.auth-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  border-radius: 20px;
}

.metric-card {
  padding: 1.1rem 1.15rem;
}

.metric-label {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.metric-sub {
  color: var(--muted);
  font-size: 0.9rem;
}

.section-title {
  letter-spacing: -0.04em;
}

.table-darkish {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
}

.table-darkish th {
  color: #cbd5e1;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.table-darkish td {
  vertical-align: middle;
}

.form-control,
.form-select,
.input-glow,
textarea.form-control {
  background: rgba(8, 11, 18, 0.9) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.form-control:focus,
.form-select:focus,
.input-glow:focus,
textarea.form-control:focus {
  border-color: rgba(242, 194, 0, 0.7) !important;
  box-shadow: 0 0 0 0.18rem rgba(242, 194, 0, 0.15) !important;
}

.btn-warning {
  background: var(--yellow) !important;
  border-color: transparent !important;
  color: #141414 !important;
  font-weight: 700;
}

.btn-outline-warning {
  color: var(--yellow) !important;
  border-color: rgba(242, 194, 0, 0.38) !important;
}

.btn-outline-warning:hover {
  background: rgba(242, 194, 0, 0.1) !important;
}

.badge-soft {
  background: rgba(242, 194, 0, 0.12);
  color: #fff;
  border: 1px solid rgba(242, 194, 0, 0.18);
}

.soft-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.page-hero {
  background:
    linear-gradient(135deg, rgba(242, 194, 0, 0.14), rgba(45, 212, 191, 0.08)),
    rgba(8, 11, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero h2,
.page-hero h3 {
  letter-spacing: -0.05em;
}

.alert {
  border-radius: 16px;
}

.calc-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.audit-timeline {
  position: relative;
}

.audit-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.85rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(242, 194, 0, 0.6), rgba(242, 194, 0, 0.05));
}

.audit-item {
  position: relative;
  padding-left: 2.25rem;
}

.audit-item::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  left: 0.55rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(242, 194, 0, 0.12);
}

.text-muted {
  color: var(--muted) !important;
}

@media (max-width: 991.98px) {
  .sidebar {
    width: 100%;
    min-height: auto;
    position: static;
  }
}
