/* vikta-panel — painel pessoal, mobile-first.
   Tokens emprestados do vikta.dev (--bg/--ink/--muted) pra manter a
   mesma linguagem visual entre os projetos; --panel-accent é a
   identidade própria deste painel (nunca a cor de marca de nenhum
   produto — essa fica só dentro do card dele, via --accent). */

:root {
  --bg: #0a0a0c;
  --bg-raised: #141418;
  --bg-deep: #050506;
  --ink: #f4f3f0;
  --muted: #9a9a9e;
  --muted-soft: #5f5f63;
  --hairline: rgba(255,255,255,0.08);
  --hairline-strong: rgba(255,255,255,0.14);

  --panel-accent: #8b7fff;
  --panel-accent-glow: rgba(139,127,255,0.28);

  --status-ok: #2ed9a8;
  --status-warn: #f5a623;
  --status-danger: #e8412c;
  --status-unknown: #5f5f63;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --radius-card: 20px;
  --radius-control: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3 { margin: 0; font-weight: 700; }

button { font-family: inherit; }

/* ---------- Login ---------- */

.login-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.login-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--panel-accent), #5b4fd6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 22px;
  box-shadow: 0 12px 32px -8px var(--panel-accent-glow);
}

.login-card h1 {
  font-size: 22px;
  letter-spacing: -0.01em;
}

.login-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form input {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  padding: 14px 16px;
  color: var(--ink);
  font-size: 16px;
  text-align: center;
  outline: none;
  transition: border-color .15s ease;
}
.login-form input:focus { border-color: var(--panel-accent); }

.login-form button {
  background: var(--panel-accent);
  color: #0a0a0c;
  border: none;
  border-radius: var(--radius-control);
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
}
.login-form button:active { transform: scale(0.98); }

.login-error {
  color: var(--status-danger);
  font-size: 13px;
  margin: 0;
}

/* ---------- Today ---------- */

.today {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.today-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 24px;
}

.today-date {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  text-transform: capitalize;
}

.icon-btn {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section { margin-bottom: 32px; }

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-hint {
  font-size: 12px;
  color: var(--muted-soft);
  margin: 10px 4px 0;
}

/* Produtos — linha rolável, scroll-snap pra parar centralizado no card */

.product-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px;
  margin: -4px;
  -webkit-overflow-scrolling: touch;
}
.product-row::-webkit-scrollbar { display: none; }

.product-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 220px;
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}

.product-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 6px 0 18px;
}

.product-metric-big {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  margin: 0 0 6px;
  color: var(--accent);
}
.product-metric-big span {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}

.product-metric-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.product-empty {
  font-size: 13px;
  color: var(--muted-soft);
  line-height: 1.5;
  margin: 0;
}

/* Pulso social */

.social-list {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
}
.social-row:last-child { border-bottom: none; }

.social-icon {
  width: 28px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.social-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.social-days {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-ok .social-days { color: var(--status-ok); background: rgba(46,217,168,0.12); }
.status-warn .social-days { color: var(--status-warn); background: rgba(245,166,35,0.12); }
.status-danger .social-days { color: var(--status-danger); background: rgba(232,65,44,0.14); }
.status-unknown .social-days { color: var(--status-unknown); background: rgba(255,255,255,0.06); }

/* Gastos */

.costs-summary {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.costs-total {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
}

.costs-hint {
  font-size: 12px;
  color: var(--muted-soft);
}

/* Telas maiores — nunca o foco, mas não deve quebrar */
@media (min-width: 480px) {
  .product-card { width: 240px; }
}
