/* ProfitPOD — styles (ported from the design export) */
:root {
  --bg: #0a0c10;
  --bg-side: #0d1015;
  --card: #161a21;
  --input: #0d1015;
  --text: #f5f6f8;
  --muted: #8b93a1;
  --muted-2: #c3c9d1;
  --dim: #6b7280;
  --dimmer: #5b6472;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.1);
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --accent-soft-2: rgba(52, 211, 153, 0.14);
  --up: #34d399;
  --down: #f87171;
}

* { box-sizing: border-box; font-family: "Plus Jakarta Sans", Helvetica, Arial, sans-serif; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }
a { color: #6ee7b7; text-decoration: none; }
a:hover { color: var(--accent); }
button { font-family: inherit; }

.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--bg-side);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 24px 16px; gap: 28px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 4px 8px; }
.brand-logo { height: 30px; width: auto; display: block; }
.sidebar .brand-logo { height: 42px; }
.brand-badge {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, #34d399, #22c55e);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: var(--bg);
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.2px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label {
  padding: 0 8px; margin-bottom: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--dimmer);
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 500;
  color: var(--muted); background: transparent; border: none; text-align: left;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-item.active { font-weight: 700; color: var(--text); background: var(--accent-soft); }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: #3a4150; flex-shrink: 0; }
.nav-item.active .nav-dot { background: var(--accent); }

.store-card {
  margin-top: auto; padding: 14px; border-radius: 16px; background: var(--card);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px;
}
.store-card .label { font-size: 12px; color: var(--muted); }
.store-card .row { display: flex; align-items: center; gap: 8px; }
.store-swatch { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); }
.store-logo { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.store-name { font-size: 13px; font-weight: 600; }

/* ---------- Main ---------- */
.main { flex: 1; padding: 28px 36px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.page { display: flex; flex-direction: column; gap: 24px; }
.page[hidden] { display: none; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.page-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
}

/* ---------- Date picker ---------- */
.date-controls { display: flex; align-items: center; gap: 10px; position: relative; }
.date-chip {
  display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text);
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--line); display: flex; align-items: center;
  justify-content: center; font-size: 15px; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); }
.date-pop {
  position: absolute; top: 48px; right: 44px; z-index: 20; background: var(--card);
  border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; display: flex;
  gap: 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); width: 340px;
}
.preset-list { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.preset {
  padding: 9px 10px; border-radius: 9px; font-size: 13px; font-weight: 600;
  cursor: pointer; background: transparent; color: var(--muted-2); border: none; text-align: left;
}
.preset:hover { background: rgba(255, 255, 255, 0.04); }
.preset.active { background: var(--accent-soft-2); color: var(--accent); }
.pop-divider { width: 1px; background: rgba(255, 255, 255, 0.08); }
.hr { height: 1px; background: rgba(255, 255, 255, 0.08); margin: 4px 0; }
.custom-col { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.custom-col .lbl { font-size: 12px; font-weight: 600; }
.field-label { font-size: 11.5px; color: var(--muted); }
input[type="date"], input[type="text"], input[type="number"], input.txt, select {
  background: var(--input); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 10px; color: var(--text); font-size: 12.5px; outline: none; width: 100%;
}
input:disabled { background: var(--bg); color: var(--dimmer); cursor: not-allowed; }
.btn {
  border: none; cursor: pointer; font-weight: 700; border-radius: 10px;
  padding: 10px 16px; font-size: 13.5px; background: var(--accent); color: var(--bg);
}
.btn:disabled { background: rgba(255, 255, 255, 0.06); color: var(--dimmer); cursor: not-allowed; }
.btn-ghost { background: var(--card); border: 1px solid var(--line-2); color: var(--text); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-sm { padding: 9px; font-size: 12.5px; }

/* ---------- KPI grid ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 8px;
}
.kpi .k-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .k-value { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.kpi .k-delta { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.kpi .k-delta .vs { color: var(--dim); font-weight: 500; }
.kpi .k-label { display: flex; align-items: center; gap: 5px; }
.kpi-info { color: var(--dim); font-size: 12px; cursor: help; }
.kpi-info:hover { color: var(--muted-2); }
.donut-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 180px; color: var(--muted); font-size: 13px; text-align: center;
}

/* ---------- Dashboard split ---------- */
.dash-split { display: grid; grid-template-columns: 1.05fr 1.35fr; gap: 16px; align-items: stretch; }
.panel { padding: 22px; display: flex; flex-direction: column; gap: 18px; }

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 220px; height: 220px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.donut-hole {
  width: 120px; height: 120px; border-radius: 50%; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.donut-hole .t { font-size: 10.5px; color: var(--muted); }
.donut-hole .v { font-size: 16px; font-weight: 800; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; flex: 1; min-width: 220px; }
.legend .li { display: flex; flex-direction: column; gap: 2px; }
.legend .li .name { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend .li .swatch { width: 8px; height: 8px; border-radius: 50%; }
.legend .li .amt { font-size: 13.5px; font-weight: 700; }

/* ---------- Tables ---------- */
.tbl-wrap { padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { text-align: left; color: var(--muted); font-size: 12px; }
th { padding: 6px 8px; font-weight: 500; }
td { padding: 10px 8px; }
tbody tr { border-top: 1px solid var(--line); }
.tbl-plat { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.logo-box {
  width: 20px; height: 20px; border-radius: 5px; background: #fff; display: flex;
  align-items: center; justify-content: center; padding: 2px; flex-shrink: 0;
}
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.muted-cell { color: var(--muted-2); }
.total-row { border-top: 1px solid var(--line-2); font-weight: 700; }

/* ---------- Expenses ---------- */
.exp-actions { display: flex; align-items: center; gap: 10px; position: relative; }
.pop {
  position: absolute; top: 48px; right: 0; z-index: 20; background: var(--card);
  border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; display: flex;
  flex-direction: column; gap: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); width: 230px;
}
.form-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.form-title { font-size: 14.5px; font-weight: 700; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld .cap { font-size: 12px; color: var(--muted); }
.fld input.big, .fld select.big { font-size: 13.5px; padding: 10px 12px; border-radius: 10px; }
.type-toggle { display: flex; gap: 8px; }
.type-btn {
  flex: 1; text-align: center; padding: 10px; border-radius: 10px; font-size: 13px;
  font-weight: 600; cursor: pointer; background: var(--input); color: var(--muted);
  border: 1px solid var(--line-2);
}
.type-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; background: var(--card); color: var(--muted); border: 1px solid var(--line);
}
.chip.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.exp-table-card { padding: 8px 10px; overflow: auto; }
.exp-table-card table { font-size: 13.5px; }
.exp-table-card th, .exp-table-card td { padding: 12px 14px; }
.right { text-align: right; }
.badge {
  font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); color: var(--muted-2);
}
.badge.recurring { background: var(--accent-soft-2); color: var(--accent); }
.link-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.06); color: var(--muted-2); font-size: 12px; font-weight: 600;
  cursor: pointer; border: none;
}
.link-btn:hover { color: var(--text); }
tfoot td { border-top: 1px solid var(--line-2); font-weight: 700; }
.exp-table-card .sub { font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.exp-table-card .unit { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.form-hint {
  font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; line-height: 1.5;
}
.fld .cap .opt { color: var(--dimmer); font-weight: 500; }
.btn-danger { background: rgba(248, 113, 113, 0.14); color: #fca5a5; margin-right: auto; }
.btn-danger:hover { background: rgba(248, 113, 113, 0.22); }

/* ---------- Orders ---------- */
.orders-card { padding: 8px 10px; overflow-x: auto; }
.orders-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.orders-table th, .orders-table td { padding: 12px 14px; vertical-align: top; }
.orders-table thead tr { text-align: left; color: var(--muted); font-size: 12px; }
.orders-table tbody tr { border-top: 1px solid var(--line); }
.orders-table .nowrap { white-space: nowrap; }
.orders-table tfoot td { border-top: 1px solid var(--line-2); font-weight: 700; }
.orders-table .sub { font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.oi-cell { min-width: 220px; }
.oi { display: flex; align-items: flex-start; gap: 8px; padding: 2px 0; }
.oi + .oi { margin-top: 2px; }
.oi-qty {
  flex-shrink: 0; min-width: 18px; text-align: center; font-size: 11px; font-weight: 700;
  color: var(--muted-2); background: rgba(255, 255, 255, 0.06); border-radius: 5px; padding: 1px 5px;
}
.oi-name { color: var(--muted-2); line-height: 1.4; }
.bolt { color: #fbbf24; margin-right: 3px; cursor: help; font-size: 12px; }

/* ---------- Fees ---------- */
.fees-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.provider { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.provider .head { display: flex; align-items: center; justify-content: space-between; }
.provider .id { display: flex; align-items: center; gap: 10px; }
.provider .logo-lg {
  width: 34px; height: 34px; border-radius: 10px; background: #fff; display: flex;
  align-items: center; justify-content: center; padding: 6px;
}
.provider .logo-lg img { width: 100%; height: 100%; object-fit: contain; }
.provider .name { font-size: 15px; font-weight: 700; }
.provider .stats { display: flex; gap: 24px; }
.provider .stat .cap { font-size: 12px; color: var(--muted); }
.provider .stat .v { font-size: 22px; font-weight: 800; }
.pill-btn {
  padding: 7px 14px; border-radius: 9px; background: rgba(255, 255, 255, 0.06);
  color: var(--muted-2); font-size: 12.5px; font-weight: 600; cursor: pointer; border: none;
}
.provider-note { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---------- Integrations ---------- */
.integ-group { display: flex; flex-direction: column; gap: 14px; }
.integ-group .g-title { font-size: 16px; font-weight: 700; }
.integ-group .g-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.integ-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.integ-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; position: relative; border-radius: 16px; }
.integ-card .top { display: flex; align-items: center; justify-content: space-between; }
.integ-logo { width: 40px; height: 40px; border-radius: 11px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 7px; }
.integ-logo img { width: 100%; height: 100%; object-fit: contain; }
.installed-badge {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent);
  color: var(--accent); font-size: 12px; font-weight: 700; display: flex;
  align-items: center; justify-content: center;
}
.integ-card .i-name { font-size: 14.5px; font-weight: 700; }
.integ-card .i-status { font-size: 12.5px; font-weight: 700; }
.integ-card .i-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.integ-card .i-account {
  font-size: 12px; color: var(--muted-2); background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2); border-radius: 8px; padding: 6px 9px;
}
.integ-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.integ-btn {
  text-align: center; padding: 9px; border-radius: 9px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; border: none; width: 100%;
}
.integ-btn.connect { background: var(--accent); color: var(--bg); }
.integ-btn.disconnect { background: rgba(255, 255, 255, 0.06); color: var(--muted-2); }

/* ---------- Subscription ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { position: relative; padding: 22px; display: flex; flex-direction: column; gap: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.plan.active { background: rgba(52, 211, 153, 0.06); border: 1px solid var(--accent); }
.plan .current-tag {
  position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft-2); padding: 4px 10px; border-radius: 999px;
}
.plan .p-name { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.plan .p-price { display: flex; align-items: baseline; gap: 6px; }
.plan .p-price .amt { font-size: 32px; font-weight: 800; }
.plan .p-price .per { font-size: 13px; color: var(--muted); }
.plan .p-desc { font-size: 13px; color: var(--muted-2); line-height: 1.5; }
.plan .p-btn { text-align: center; padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; border: none; background: var(--accent); color: var(--bg); margin-top: 4px; }
.plan.active .p-btn { background: rgba(255, 255, 255, 0.06); color: var(--dim); cursor: default; }
.features-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.feature { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted-2); }
.check {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft-2);
  color: var(--accent); font-size: 11px; font-weight: 800; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---------- Demo badge / warnings / ad placeholder / errors ---------- */
.tag-demo {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  color: #fbbf24; background: rgba(251, 191, 36, 0.14);
  padding: 4px 10px; border-radius: 999px;
}
.warn-bar {
  background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fcd34d; border-radius: 12px; padding: 10px 14px; font-size: 12.5px; font-weight: 600;
}
.ad-placeholder .ph-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 18px; color: var(--muted);
}
.ph-icon { font-size: 30px; opacity: 0.8; }
.ph-title { font-size: 14px; font-weight: 700; color: var(--muted-2); }
.ph-text { font-size: 12.5px; color: var(--muted); line-height: 1.55; max-width: 380px; }

.integ-card.disabled { opacity: 0.72; }
.integ-btn:disabled { background: rgba(255, 255, 255, 0.05); color: var(--dimmer); cursor: not-allowed; }
.integ-btn.ghost { background: rgba(255, 255, 255, 0.06); color: var(--muted-2); }
.integ-form-row { display: flex; gap: 8px; }
.integ-form-row .integ-btn { flex: 1; }
.integ-err {
  font-size: 11.5px; color: #fca5a5; background: rgba(248, 113, 113, 0.12);
  border-radius: 8px; padding: 7px 10px; line-height: 1.4;
}

.error-box {
  background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 8px;
}
.eb-title { font-size: 16px; font-weight: 800; color: #fca5a5; }
.eb-detail { font-size: 13.5px; color: var(--muted-2); }
.eb-hint { font-size: 12.5px; color: var(--muted); }
.eb-hint code {
  background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
}

/* ---------- Sync indicator (centered task card) ---------- */
.sync-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 5vh; pointer-events: none;
}
.sync-overlay[hidden] { display: none; }
.sync-stack {
  width: min(400px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: auto; animation: sync-in 0.2s ease-out;
}
.sync-card {
  background: var(--card); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}
.sync-overlay.done .sync-card { border-color: rgba(52, 211, 153, 0.35); }
.sync-head { display: flex; align-items: center; gap: 10px; }
.sync-h { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.2; }
.sync-tasks { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.sync-task {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 6px; border-radius: 10px;
}
.sync-task:hover { background: rgba(255, 255, 255, 0.02); }
.sync-logo {
  width: 34px; height: 34px; border-radius: 9px; background: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sync-logo img { width: 22px; height: 22px; object-fit: contain; }
.sync-tmeta { flex: 1; min-width: 0; }
.st-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.st-desc {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-badge {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: rgba(52, 211, 153, 0.16); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
@keyframes sync-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; flex-shrink: 0;
}
.spinner.sm { width: 16px; height: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sync-check {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: rgba(52, 211, 153, 0.16); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}
/* Zeroed KPIs gently pulse while the real numbers load in. */
@keyframes kpiPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.28; } }
.kpi-loading .k-value { animation: kpiPulse 1.1s ease-in-out infinite; }

/* ---------- Auth (login / signup) ---------- */
.auth-bg {
  min-height: 100vh; width: 100%; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; padding: 32px 30px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.auth-brand .brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.2px; }
.auth-title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.auth-sub { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-bottom: 18px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.auth-field input {
  background: var(--input); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 11px 13px; color: var(--text); font-size: 14px; outline: none;
  transition: border-color 0.12s;
}
.auth-field input::placeholder { color: var(--dimmer); }
.auth-field input:focus { border-color: var(--accent); }
.auth-submit {
  margin-top: 4px; border: none; cursor: pointer; border-radius: 10px;
  padding: 12px; font-size: 14px; font-weight: 700;
  background: var(--accent); color: var(--bg); transition: filter 0.12s;
}
.auth-submit:hover:not(:disabled) { filter: brightness(1.05); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-consent {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 2px 0 2px; font-size: 12.5px; line-height: 1.45;
  color: var(--muted); cursor: pointer;
}
.auth-consent input[type="checkbox"] {
  width: 16px; height: 16px; margin: 1px 0 0; flex-shrink: 0;
  accent-color: var(--accent); cursor: pointer;
}
.auth-consent a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.auth-consent a:hover { color: var(--text); }

.auth-toggle {
  margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted);
}
.auth-toggle button {
  background: none; border: none; cursor: pointer; padding: 0 0 0 4px;
  color: var(--accent); font-weight: 700; font-size: 13px; font-family: inherit;
}
.auth-toggle button:hover { color: #6ee7b7; }

.auth-error {
  font-size: 12.5px; color: #fca5a5; background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.28); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 14px; line-height: 1.45;
}
.auth-notice {
  font-size: 12.5px; color: var(--accent); background: var(--accent-soft-2);
  border: 1px solid rgba(52, 211, 153, 0.28); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 14px; line-height: 1.45;
}
.auth-dev {
  margin-top: 14px; background: none; border: none; cursor: pointer;
  color: var(--dimmer); font-size: 11.5px; font-family: inherit; text-align: center;
}
.auth-dev:hover { color: var(--muted); }

.auth-legal {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, #232833);
  font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center;
}
.auth-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.auth-legal a:hover { color: var(--text, #f5f6f8); }

.logout-btn { margin-top: 10px; width: 100%; }
.logout-btn:hover { color: var(--down); }

/* ---------- Account page ---------- */
.profile-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 22px;
}
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #34d399, #22c55e); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
}
.profile-name { font-size: 16px; font-weight: 700; }
.profile-email { font-size: 13px; color: var(--muted); margin-top: 2px; }
.profile-card .btn-danger { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-split { grid-template-columns: 1fr; }
  .integ-grid, .plans-grid { grid-template-columns: 1fr 1fr; }
  .fees-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .store-card { margin-top: 0; }
  .main { padding: 20px; }
  .kpi-grid, .integ-grid, .plans-grid, .features-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
