:root {
  --bg-1: #06121f;
  --bg-2: #0b1e3d;
  --bg-3: #eff6ff;
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(148, 163, 184, 0.22);
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.16);
  --shadow-deep: 0 28px 70px rgba(28, 78, 163, 0.22);
  --accent: #2f6fed;
  --accent-2: #7dd3fc;
  --accent-3: #1d4ed8;
  --success: #10b981;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 28%),
    linear-gradient(180deg, #edf6ff 0%, #f8fbff 28%, #f5f7fb 100%);
}

::selection { background: rgba(47, 111, 237, 0.25); color: #0f172a; }

table th, table td { white-space: nowrap; }
input:focus, select:focus, textarea:focus { outline: none; }

.overflow-x-auto::-webkit-scrollbar { height: 6px; }
.overflow-x-auto::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

.app-shell {
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.ambient-one {
  top: -8rem;
  left: -8rem;
  background: rgba(96, 165, 250, 0.26);
}

.ambient-two {
  right: -8rem;
  top: 12rem;
  background: rgba(96, 165, 250, 0.2);
}

.hero-section {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.12), transparent 24%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 45%, #111827 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 40%);
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(22px);
  background: rgba(6, 18, 31, 0.54);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.nav-shell {
  position: relative;
  z-index: 1;
}

.brand-mark {
  letter-spacing: -0.06em;
}

.brand-badge {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, var(--accent) 0%, #5ea0ff 100%);
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 12px 22px rgba(47,111,237,0.55);
}

.brand-mark em {
  color: #7dd3fc;
  font-style: normal;
}

.nav-link {
  position: relative;
  color: rgba(226,232,240,0.8);
  transition: 0.2s ease;
}

.nav-link:hover { color: white; }

.btn-nav,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  font-weight: 700;
  transition: 0.2s ease;
  transform: translateY(0);
}

.btn-nav {
  padding: 0.7rem 1.1rem;
  font-size: 0.82rem;
}

.btn-nav-solid,
.btn-primary {
  background: linear-gradient(135deg, #2f6fed 0%, #4fa4ff 100%);
  color: white;
  box-shadow: 0 15px 32px rgba(47,111,237,0.35);
}

.btn-nav-solid:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(47,111,237,0.4);
}

.btn-nav-ghost,
.btn-secondary {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.18);
  color: white;
}

.btn-secondary {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148,163,184,0.22);
  color: #e2e8f0;
  padding: 0.9rem 1.4rem;
}

.btn-primary {
  padding: 0.9rem 1.4rem;
}

.stat-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.12);
  min-width: 7rem;
}

.stat-pill strong { font-size: 1.08rem; }

.eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.14);
  color: #2563eb;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.glass-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.11);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-deep);
}

.hero-panel {
  position: relative;
  width: min(100%, 28rem);
  padding: 1rem;
  border-radius: 1.6rem;
  transform: perspective(1400px) rotateX(8deg) rotateY(-10deg);
}

.panel-topbar {
  display: flex;
  gap: 0.45rem;
  padding: 0.3rem 0.2rem 0.8rem;
}

.panel-topbar span {
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
}

.panel-body {
  background: linear-gradient(180deg, rgba(15,23,42,0.7), rgba(15,23,42,0.9));
  border-radius: 1.1rem;
  padding: 1rem;
  border: 1px solid rgba(148,163,184,0.12);
}

.mini-card {
  background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(30,41,59,0.92));
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mini-card.accent {
  background: linear-gradient(135deg, rgba(37,99,235,0.26), rgba(14,116,144,0.24));
}

.mini-card p,
.mini-card span {
  color: #cbd5e1;
  font-size: 0.72rem;
}

.mini-card strong {
  font-size: 1.15rem;
  color: white;
}

.mini-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

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

.chart-lines {
  margin-top: 1rem;
  display: flex;
  align-items: end;
  gap: 0.5rem;
  height: 6.5rem;
  padding: 0.75rem 0.35rem 0;
}

.chart-lines span {
  display: block;
  width: 100%;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(125,211,252,0.9), rgba(47,111,237,0.7));
  box-shadow: 0 12px 24px rgba(47,111,237,0.2);
}

.chart-lines span:nth-child(1) { height: 42%; }
.chart-lines span:nth-child(2) { height: 68%; }
.chart-lines span:nth-child(3) { height: 90%; }

.feature-card {
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 16px 35px rgba(15,23,42,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 45px rgba(15,23,42,0.08);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, rgba(47,111,237,0.12), rgba(125,211,252,0.2));
  color: #2563eb;
  font-weight: 800;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.65rem;
}

.feature-card p {
  color: #475569;
  line-height: 1.7;
}

.auth-shell {
  padding: 5rem 1rem;
}

.auth-card {
  max-width: 26rem;
  margin: 0 auto;
  border-radius: 1.8rem;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.auth-badge {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(59,130,246,0.08);
  color: #2563eb;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  margin-bottom: 1rem;
}

.auth-google-btn,
.input-field {
  width: 100%;
  border-radius: 0.95rem;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(255,255,255,0.7);
}

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 700;
  color: #334155;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  transition: 0.2s ease;
}

.auth-google-btn:hover {
  background: rgba(255,255,255,0.94);
  transform: translateY(-1px);
}

.input-field {
  padding: 0.8rem 0.9rem;
  color: #0f172a;
  box-shadow: inset 0 1px 2px rgba(15,23,42,0.02);
}

.site-footer {
  position: relative;
  background: linear-gradient(180deg, #091827 0%, #071322 100%);
  border-top: 1px solid rgba(148,163,184,0.12);
}

.footer-link {
  color: rgba(226,232,240,0.72);
  transition: 0.2s ease;
}

.footer-link:hover { color: white; }

.footer-badge {
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.74rem;
}

.dashboard-shell {
  min-height: calc(100vh - 5rem);
}

.dashboard-main {
  position: relative;
}

.kicker {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2563eb;
  font-weight: 800;
  margin-bottom: 0.7rem;
}

.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.primary-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #2f6fed, #5e9efc);
  color: white;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(47,111,237,0.26);
  transition: transform 0.2s ease;
}

.primary-chip:hover { transform: translateY(-2px); }

.info-card,
.panel-card,
.table-card {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 1.4rem;
  box-shadow: 0 24px 42px rgba(15,23,42,0.05);
}

.info-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover,
.panel-card:hover,
.table-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px rgba(15,23,42,0.08);
}

.info-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(47,111,237,0.9), rgba(125,211,252,0.5));
}

.info-card-primary {
  background: linear-gradient(135deg, rgba(47,111,237,0.08), rgba(125,211,252,0.08));
}

.label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.value {
  margin-top: 0.55rem;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}

.value.small {
  font-size: 1.2rem;
}

.inline-link {
  display: inline-block;
  margin-top: 0.8rem;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
}

.panel-card,
.table-card {
  padding: 1.2rem 1.25rem;
}

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

.panel-head h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.panel-head span {
  font-size: 0.72rem;
  color: #2563eb;
  font-weight: 700;
  background: rgba(47,111,237,0.08);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mini-metrics div {
  padding: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(15,23,42,0.03), rgba(59,130,246,0.04));
  border: 1px solid rgba(148,163,184,0.1);
}

.mini-metrics strong {
  display: block;
  font-size: 1.4rem;
  color: #0f172a;
}

.mini-metrics span {
  display: block;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.74rem;
}

.table-card table {
  border-collapse: collapse;
}

.table-card thead {
  background: rgba(248,250,252,0.9);
}

.table-card th,
.table-card td {
  border-bottom: 1px solid rgba(148,163,184,0.12);
}

.row-item {
  transition: background 0.2s ease;
}

.row-item:hover {
  background: rgba(148,163,184,0.04);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status-badge.success { background: rgba(16,185,129,0.12); color: #047857; }
.status-badge.failed { background: rgba(239,68,68,0.12); color: #b91c1c; }
.status-badge.pending { background: rgba(245,158,11,0.12); color: #b45309; }

.theme-dark {
  color-scheme: dark;
}

.theme-dark body,
.theme-dark .app-shell {
  background: linear-gradient(180deg, #020b16 0%, #0f172a 100%);
  color: #e2e8f0;
}

.theme-dark .topbar {
  background: rgba(2, 6, 23, 0.72);
  border-color: rgba(148,163,184,0.12);
}

.theme-dark .nav-link,
.theme-dark .btn-nav-ghost,
.theme-dark .btn-secondary {
  color: #cbd5e1;
}

.theme-dark .brand-mark span,
.theme-dark .brand-mark em {
  color: white;
}

.theme-dark .info-card,
.theme-dark .panel-card,
.theme-dark .table-card,
.theme-dark .feature-card,
.theme-dark .auth-card,
.theme-dark .product-card,
.theme-dark .user-sidebar,
.theme-dark .empty-card,
.theme-dark .alert-box {
  background: rgba(15,23,42,0.8);
  border-color: rgba(148,163,184,0.12);
  box-shadow: 0 24px 40px rgba(2,6,23,0.45);
}

.theme-dark .value,
.theme-dark .panel-head h2,
.theme-dark .mini-metrics strong,
.theme-dark .auth-card h1,
.theme-dark .auth-card label,
.theme-dark .page-topbar h1,
.theme-dark .product-card h3,
.theme-dark .sidebar-link,
.theme-dark .balance-pill,
.theme-dark .filter-chip {
  color: #f8fafc;
}

.theme-dark .label,
.theme-dark .mini-metrics span,
.theme-dark .auth-card p,
.theme-dark .auth-card .text-slate-500,
.theme-dark .table-card th,
.theme-dark .table-card td,
.theme-dark .table-card .text-slate-400,
.theme-dark .product-meta span,
.theme-dark .empty-card,
.theme-dark .alert-box,
.theme-dark .sidebar-header span {
  color: #cbd5e1 !important;
}

.theme-dark .table-card thead {
  background: rgba(15,23,42,0.9);
}

.theme-dark .input-field,
.theme-dark .auth-google-btn {
  background: rgba(15,23,42,0.8);
  border-color: rgba(148,163,184,0.14);
  color: #e2e8f0;
}

.theme-dark .site-footer {
  background: linear-gradient(180deg, #030d1c 0%, #020b16 100%);
}

.theme-dark .sidebar-link {
  background: rgba(148,163,184,0.04);
}

.theme-dark .sidebar-link.active,
.theme-dark .filter-chip.active {
  background: rgba(47,111,237,0.16);
  color: #dbeafe;
  border-color: rgba(59,130,246,0.26);
}

.theme-dark .balance-pill {
  background: rgba(14,116,144,0.12);
  border-color: rgba(125,211,252,0.2);
}

.user-sidebar {
  width: 100%;
  background: rgba(255,255,255,0.78);
  border-right: 1px solid rgba(148,163,184,0.12);
  border-radius: 1.4rem 0 0 1.4rem;
  margin: 1.25rem 0 1.25rem 1.25rem;
  min-height: 32rem;
  box-shadow: 0 18px 40px rgba(15,23,42,0.04);
}

.sidebar-header {
  padding: 1.1rem 1.2rem 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #64748b;
  font-weight: 800;
}

.sidebar-link {
  display: block;
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  color: #475569;
  font-weight: 700;
  background: rgba(148,163,184,0.02);
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.sidebar-link:hover {
  background: rgba(47,111,237,0.06);
  border-color: rgba(47,111,237,0.1);
  color: #0f172a;
}

.sidebar-link.active {
  background: rgba(47,111,237,0.08);
  border-color: rgba(47,111,237,0.1);
  color: #1d4ed8;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.86rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(148,163,184,0.12);
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-chip.active {
  background: linear-gradient(135deg, rgba(47,111,237,0.12), rgba(125,211,252,0.18));
  color: #1d4ed8;
  border-color: rgba(47,111,237,0.2);
}

.product-card,
.empty-card,
.alert-box {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 1.4rem;
  box-shadow: 0 20px 40px rgba(15,23,42,0.04);
}

.product-card {
  padding: 1.15rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 40px rgba(15,23,42,0.06);
}

.product-meta {
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.product-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.8rem;
}

.price {
  font-size: 1.4rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 0.8rem;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
  border: 1px solid rgba(125,211,252,0.25);
  background: rgba(125,211,252,0.08);
}

.empty-card,
.alert-box {
  padding: 1.15rem 1.2rem;
  color: #475569;
}

.alert-box.error { border-color: rgba(239,68,68,0.24); background: rgba(254,242,242,0.9); color: #b91c1c; }
.alert-box.warn { border-color: rgba(245,158,11,0.26); background: rgba(255,251,235,0.9); color: #b45309; }

@media (max-width: 768px) {
  .user-sidebar {
    width: 100%;
    margin: 0 0 1rem 0;
    min-height: auto;
    border-radius: 1.2rem;
  }
}

@media (max-width: 640px) {
  .hero-section { padding-top: 1rem; }
  .hero-panel { transform: none; }
  .auth-card { padding: 1.35rem; }
  .page-topbar { flex-direction: column; align-items: flex-start; }
  .mini-metrics { grid-template-columns: 1fr; }
  .btn-primary, .btn-secondary, .btn-nav { width: auto; }
} 
