:root {
  --navy: #0b1730;
  --navy-2: #12284e;
  --blue: #2f6df6;
  --cyan: #42c6e8;
  --ink: #172033;
  --muted: #6e7890;
  --surface: #f5f7fb;
  --card: #ffffff;
  --border: #e6eaf1;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 255px; padding: 26px 18px; color: #fff; background: linear-gradient(180deg, var(--navy), var(--navy-2)); position: fixed; inset: 0 auto 0 0; }
.brand-mark { display: flex; align-items: center; gap: 12px; padding: 4px 10px 28px; }
.brand-mark strong { display: block; font-size: 1.05rem; }
.brand-mark small { display: block; color: #9fb1cf; }
.brand-dot { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 8px 24px rgba(47,109,246,.35); }
.sidebar .nav { gap: 6px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 12px; color: #aebbd1; padding: 11px 13px; border-radius: 10px; font-weight: 500; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .nav-link i { width: 18px; text-align: center; }
.main-panel { margin-left: 255px; width: calc(100% - 255px); }
.topbar { min-height: 96px; padding: 22px 34px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 2px 0 0; font-size: 1.6rem; font-weight: 750; }
.eyebrow { color: var(--blue); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.content-wrap { padding: 32px 34px 48px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #dce8df; background: #f3fbf5; padding: 7px 11px; border-radius: 999px; color: #267840; font-size: .82rem; font-weight: 650; }
.status-pill span { width: 8px; height: 8px; border-radius: 50%; background: #35b75a; box-shadow: 0 0 0 4px rgba(53,183,90,.12); }

.hero-panel { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #10234a, #2459c4 70%, #2f7ef8); box-shadow: 0 18px 40px rgba(24,56,120,.16); }
.hero-panel h2 { margin: 5px 0 9px; font-size: clamp(1.55rem, 3vw, 2.25rem); font-weight: 780; }
.hero-panel p { margin: 0; max-width: 680px; color: rgba(255,255,255,.78); }
.hero-panel .eyebrow { color: #8eddf0; }
.metric-card, .panel-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 7px 22px rgba(31,48,86,.05); }
.metric-card { padding: 22px; min-height: 145px; display: flex; flex-direction: column; }
.metric-card span { color: var(--muted); font-size: .85rem; font-weight: 650; }
.metric-card strong { font-size: 2.25rem; margin: 8px 0 2px; line-height: 1; }
.metric-card small { color: #98a0b1; margin-top: auto; }
.panel-card { padding: 24px; min-height: 100%; }
.panel-title { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 20px; }
.panel-title h3 { margin: 0; font-size: 1.05rem; font-weight: 750; }
.panel-title p { margin: 5px 0 0; color: var(--muted); font-size: .9rem; }
.badge-soft { display: inline-flex; padding: 6px 9px; border-radius: 8px; background: #edf3ff; color: #2b5fd4; font-size: .74rem; font-weight: 750; }
.empty-state { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 10px; color: #8b95a8; text-align: center; }
.empty-state i { font-size: 2rem; color: #b5bfd0; }
.status-row { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid #eef1f5; font-size: .9rem; }
.status-row:last-child { border-bottom: 0; }
.modern-table { margin-bottom: 0; }
.modern-table th { color: #8791a4; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; border-bottom-color: var(--border); }
.modern-table td { padding-top: 15px; padding-bottom: 15px; border-bottom-color: #eef1f5; }
.form-control, .form-select { border-color: #dfe4ec; min-height: 46px; border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: #7aa2ff; box-shadow: 0 0 0 .2rem rgba(47,109,246,.1); }
.btn { border-radius: 10px; font-weight: 650; }
.btn-primary { background: var(--blue); border-color: var(--blue); }

@media (max-width: 900px) {
  .sidebar { width: 78px; padding-inline: 12px; }
  .brand-mark div, .sidebar .nav-link:not(:hover) { font-size: 0; }
  .brand-mark { justify-content: center; padding-inline: 0; }
  .sidebar .nav-link { justify-content: center; }
  .sidebar .nav-link i { font-size: 1.2rem; }
  .main-panel { margin-left: 78px; width: calc(100% - 78px); }
  .topbar, .content-wrap { padding-left: 22px; padding-right: 22px; }
  .status-pill { display: none; }
}

@media (max-width: 620px) {
  .hero-panel { align-items: flex-start; flex-direction: column; }
  .topbar { align-items: flex-start; gap: 12px; }
  .topbar .btn { font-size: 0; }
  .topbar .btn i { font-size: 1rem; }
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(66,198,232,.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(47,109,246,.2), transparent 32%),
    #0b1730;
}
.login-card {
  width: min(440px, 100%);
  padding: 38px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}
.login-card h1 { margin: 6px 0 10px; font-size: 2rem; font-weight: 780; }
.login-card .brand-dot { width: 42px; height: 42px; }

.connection-summary { display: grid; gap: 12px; margin-top: 8px; }
.connection-summary > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid #eef1f5; }
.connection-summary span { color: var(--muted); font-size: .86rem; }
.connection-summary strong { text-align: right; font-size: .86rem; }
.connected-account { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eef1f5; }
.connected-account:last-child { border-bottom: 0; }
.connected-account small { display: block; color: var(--muted); margin-top: 2px; }
.account-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: #1877f2; font-size: 1.15rem; }
