/* ============================================================
   FinançasPro — Tema Preto & Dourado Premium
   ============================================================ */

:root {
  --gold-100: #FFF7D6;
  --gold-200: #FFE98A;
  --gold-400: #FFD700;
  --gold-500: #DAA520;
  --gold-600: #B8960C;
  --gold-700: #8B6F08;

  --bg-0: #0a0a0a;
  --bg-1: #111111;
  --bg-2: #1a1a1a;
  --bg-3: #242424;
  --border: rgba(218, 165, 32, 0.18);
  --border-strong: rgba(218, 165, 32, 0.35);

  --text: #f5f5f5;
  --text-dim: #a3a3a3;
  --text-muted: #737373;

  --danger: #ef4444;
  --success: #22c55e;
  --info: #3b82f6;
}

html[data-theme="light"] {
  --bg-0: #fafaf9;
  --bg-1: #ffffff;
  --bg-2: #f5f5f4;
  --bg-3: #e7e5e4;
  --border: rgba(184, 150, 12, 0.25);
  --border-strong: rgba(184, 150, 12, 0.45);
  --text: #0a0a0a;
  --text-dim: #525252;
  --text-muted: #737373;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 0% 0%, rgba(218, 165, 32, 0.06), transparent),
    radial-gradient(900px 500px at 100% 100%, rgba(218, 165, 32, 0.04), transparent),
    var(--bg-0);
}

/* Cards com glassmorphism dourado */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 215, 0, 0.06);
  backdrop-filter: blur(10px);
  transition: transform .2s, border-color .2s;
}
.card:hover { border-color: var(--border-strong); }

.gold-text {
  background: linear-gradient(135deg, var(--gold-200), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s ease;
  user-select: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #0a0a0a;
  border-color: var(--gold-600);
  box-shadow: 0 4px 20px rgba(218, 165, 32, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(218, 165, 32, 0.42); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--bg-2); }
.btn-danger { background: #7f1d1d; color: #fff; border-color: #991b1b; }

.input, select.input, textarea.input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .7rem .9rem;
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.15); }

.label { font-size: .8rem; color: var(--text-dim); margin-bottom: .3rem; display: block; font-weight: 500; }

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  padding: 1.2rem 0.8rem;
  z-index: 30;
  transform: translateX(0);
  transition: transform .3s ease;
}
.sidebar-brand {
  display: flex; align-items: center; justify-content: center;
  padding: 1rem .5rem 1.8rem .5rem;
}
.sidebar-logo {
  width: 100%; max-width: 210px; max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(218, 165, 32, 0.35));
}
.auth-logo {
  max-width: 260px; width: 80%; height: auto;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 8px 30px rgba(218, 165, 32, 0.35));
}
.admin-logo {
  max-width: 180px; height: auto; width: auto; max-height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(218, 165, 32, 0.25));
}
.johanna-app-logo {
  max-width: 140px; max-height: 32px; width: auto; height: auto;
  object-fit: contain;
}
.nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .85rem;
  border-radius: 10px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .15s;
  font-size: .92rem;
  font-weight: 500;
}
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(218, 165, 32, 0.15), transparent);
  color: var(--gold-200);
  border-left: 2px solid var(--gold-500);
}

.main {
  margin-left: 240px;
  padding: 1.5rem 2rem 6rem 2rem;
  min-height: 100vh;
}

@media (max-width: 768px) {
  /* Sidebar mobile */
  .sidebar {
    transform: translateX(-100%);
    width: 78%; max-width: 280px;
    z-index: 60;
    padding: 1rem .7rem;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,0.7); }
  .sidebar-brand { padding: .5rem .3rem 1rem .3rem; }
  .sidebar-logo { max-height: 64px; }
  .nav-item { padding: .75rem .8rem; font-size: .95rem; }

  /* Main content */
  .main {
    margin-left: 0;
    padding: 1rem .9rem 7rem .9rem;
  }

  /* Topbar */
  .topbar {
    margin-bottom: 1rem;
    gap: .5rem;
    flex-wrap: wrap;
  }
  .topbar h1 { font-size: 1.3rem; margin: 0; }
  .topbar .row { gap: .6rem; }

  /* Cards */
  .card { border-radius: 14px; }
  .p-5 { padding: 1rem; }
  .p-6 { padding: 1.2rem; }

  /* Stats */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .7rem;
    margin-bottom: 1rem;
  }
  .stat { padding: .9rem .9rem; }
  .stat .label-sm { font-size: .68rem; }
  .stat .value { font-size: 1.3rem; }

  /* Charts */
  .charts {
    grid-template-columns: 1fr;
    gap: .8rem;
    margin-bottom: 1rem;
  }

  /* Transaction rows */
  .tx-row {
    grid-template-columns: 40px 1fr auto;
    gap: .7rem;
    padding: .75rem .9rem;
  }
  .tx-icon { width: 40px; height: 40px; }
  .tx-row > div:nth-child(2) > div:first-child { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45vw; }
  .tx-row > div:nth-child(2) > div:last-child { font-size: .7rem; }
  .tx-amount { font-size: .92rem; }

  /* Buttons */
  .btn { padding: .6rem .9rem; font-size: .85rem; }
  .btn i { width: 16px; height: 16px; }

  /* Inputs */
  .input { padding: .65rem .85rem; font-size: .92rem; }

  /* Modal */
  .modal-backdrop { padding: .5rem; align-items: flex-end; }
  .modal {
    padding: 1.1rem;
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
    width: 100%;
  }

  /* Grid 2 -> stacked em mobile pequeno */
  .grid-2 { grid-template-columns: 1fr; gap: .7rem; }

  /* Johanna floating panel — cobre quase toda a tela em mobile */
  .johanna-panel {
    width: calc(100vw - .8rem);
    right: .4rem; left: .4rem;
    bottom: 4.5rem;
    height: calc(100vh - 5.5rem);
    max-height: calc(100vh - 5.5rem);
    border-radius: 18px;
  }
  .johanna-header { padding: .8rem .9rem; }
  .johanna-header img { width: 38px; height: 38px; }

  /* Toast menos intrusivo em mobile */
  .toast-container { top: .6rem; right: .6rem; left: .6rem; }
  .toast { min-width: 0; font-size: .85rem; }

  /* Auth card */
  .auth-card { padding: 1.8rem 1.2rem; }
  .auth-logo { max-width: 200px; }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
  .sidebar { width: 85%; max-width: none; }
}

/* Backdrop escuro quando a sidebar mobile abre */
@media (max-width: 768px) {
  .sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }
  .sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (min-width: 769px) {
  .sidebar-backdrop { display: none; }
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.topbar h1 { font-size: 1.5rem; margin: 0; }

/* Dashboard cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat { padding: 1.2rem 1.3rem; }
.stat .label-sm { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-size: 1.7rem; font-weight: 700; font-family: 'Plus Jakarta Sans'; margin-top: .35rem; }
.stat .value.pos { color: var(--success); }
.stat .value.neg { color: var(--danger); }
.stat .value.gold { background: linear-gradient(135deg, var(--gold-200), var(--gold-500)); -webkit-background-clip: text; color: transparent; }

.charts { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 900px) { .charts { grid-template-columns: 1fr; } }

.section-title {
  font-size: .85rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: .8rem;
}

/* Transaction list */
.tx-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.tx-row:last-child { border-bottom: none; }
.tx-row.clickable { cursor: pointer; }
.tx-row.clickable:hover { background: var(--bg-2); }
.tx-detail-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.tx-detail-row:last-child { border-bottom: none; }
.tx-detail-row .k { color: var(--text-dim); }
.tx-detail-row .v { color: var(--text); font-weight: 500; text-align: right; }
.tx-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-2);
}
.tx-amount.neg { color: var(--danger); font-weight: 700; }
.tx-amount.pos { color: var(--success); font-weight: 700; }

/* Johanna floating chat — FAB premium */
.johanna-fab {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 64px; height: 64px;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 50;
  border: none;
  overflow: hidden;
  display: grid; place-items: center;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
  box-shadow:
    0 12px 32px -6px rgba(0, 0, 0, 0.55),
    0 4px 12px -2px rgba(0, 0, 0, 0.4);
  animation: johannaFloat 4s ease-in-out infinite;
}

/* Em mobile, um pouco menor pra não dominar a tela */
@media (max-width: 600px) {
  .johanna-fab { width: 58px; height: 58px; bottom: 1rem; right: 1rem; }
  .johanna-tooltip { display: none; }
}


.johanna-fab img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-1);
}

.johanna-fab:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow:
    0 18px 45px -4px rgba(0, 0, 0, 0.6),
    0 6px 18px -2px rgba(218, 165, 32, 0.3);
}

.johanna-fab:active { transform: scale(.98); }

.johanna-tooltip {
  position: fixed;
  bottom: 2.5rem; right: 6rem;
  background: var(--bg-1);
  color: var(--text);
  padding: .55rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  font-size: .8rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: all .25s cubic-bezier(.2,.8,.2,1);
  z-index: 49;
}
.johanna-tooltip::after {
  content: '';
  position: absolute;
  right: -6px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 6px solid var(--border-strong);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.johanna-fab:hover + .johanna-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@keyframes johannaFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Quando o painel está aberto, para a animação pra não distrair */
.johanna-fab.panel-open {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .johanna-fab { animation: none; }
}

.johanna-panel {
  position: fixed;
  bottom: 5.5rem; right: 1.5rem;
  width: 400px; max-width: calc(100vw - 2rem);
  height: 600px; max-height: calc(100vh - 7rem);
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(218,165,32,.15);
  display: none;
  flex-direction: column;
  z-index: 49;
  overflow: hidden;
}
.johanna-panel.open { display: flex; animation: slideUp .25s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.johanna-header {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .7rem;
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.08), transparent 60%);
}
.johanna-header img {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold-500);
}
.johanna-header .title { font-weight: 700; font-size: 1rem; }
.johanna-header .subtitle { font-size: .72rem; color: var(--text-dim); }
.johanna-header .actions { display:flex; gap:.25rem; }
.johanna-header .actions button {
  width: 34px; height: 34px; border-radius: 10px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-dim); cursor: pointer;
  display: grid; place-items: center; transition: all .15s;
}
.johanna-header .actions button:hover { color: var(--gold-400); background: var(--bg-2); border-color: var(--border); }

.johanna-tabs {
  display: flex; background: var(--bg-2); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.johanna-tabs .jtab {
  flex: 1; padding: .65rem .8rem; text-align: center;
  font-size: .82rem; font-weight: 500; color: var(--text-dim);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all .15s;
}
.johanna-tabs .jtab:hover { color: var(--text); }
.johanna-tabs .jtab.active { color: var(--gold-200); border-bottom-color: var(--gold-500); background: var(--bg-1); }

.johanna-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: .6rem;
  scroll-behavior: smooth;
}
.johanna-messages::-webkit-scrollbar { width: 6px; }
.johanna-messages::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.johanna-empty {
  margin: auto; text-align: center; padding: 1.5rem;
  color: var(--text-dim); font-size: .88rem;
}
.johanna-empty img { width: 80px; height: 80px; border-radius: 50%; border: 2px solid var(--gold-500); margin-bottom: 1rem; object-fit: cover; }
.johanna-empty h4 { margin: .3rem 0 .3rem; color: var(--text); font-family: 'Plus Jakarta Sans'; }

.msg-time { font-size: .65rem; color: var(--text-muted); margin-top: .15rem; padding: 0 .2rem; }
.msg.user + .msg-time { text-align: right; }
.day-separator {
  text-align: center; font-size: .72rem; color: var(--text-muted);
  padding: .5rem 0; position: relative;
  text-transform: uppercase; letter-spacing: .08em;
}
.day-separator::before, .day-separator::after {
  content: ''; position: absolute; top: 50%; width: 35%; height: 1px; background: var(--border);
}
.day-separator::before { left: 0; }
.day-separator::after { right: 0; }

.archive-day {
  margin-bottom: 1rem; border-radius: 12px; border: 1px solid var(--border);
  overflow: hidden;
}
.archive-day-header {
  padding: .7rem .9rem; background: var(--bg-2); cursor: pointer;
  display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .85rem;
  transition: background .15s;
}
.archive-day-header:hover { background: var(--bg-3); }
.archive-day-header .count { margin-left:auto; font-size:.72rem; color:var(--text-dim); font-weight:500; }
.archive-day-content { padding: .8rem; display: none; flex-direction: column; gap: .5rem; background: var(--bg-1); }
.archive-day.open .archive-day-content { display: flex; }
.archive-day .chevron { transition: transform .2s; }
.archive-day.open .chevron { transform: rotate(90deg); }
.msg {
  max-width: 85%;
  padding: .7rem .9rem;
  border-radius: 14px;
  font-size: .9rem;
  line-height: 1.45;
  word-wrap: break-word;
}
.msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: #0a0a0a;
  border-bottom-right-radius: 4px;
}
.msg.assistant {
  align-self: flex-start;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  display: flex; gap: .55rem; align-items: flex-start;
}
.msg.assistant img.avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--gold-500); flex-shrink: 0;
}
.msg.assistant .content { flex: 1; }

.johanna-input {
  padding: .8rem;
  border-top: 1px solid var(--border);
  display: flex; gap: .5rem; align-items: center;
}
.johanna-input input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 24px; padding: .65rem 1rem; color: var(--text); outline: none;
}
.johanna-input input:focus { border-color: var(--gold-500); }
.johanna-input button {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--bg-2); color: var(--gold-400); cursor: pointer;
  display: grid; place-items: center;
  transition: all .15s;
}
.johanna-input button:hover { background: var(--gold-500); color: #0a0a0a; }
.johanna-input button.recording { background: var(--danger); color: #fff; animation: pulseRed 1s infinite; }
@keyframes pulseRed { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.6);} 50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } }

/* Popup banner de avisos globais */
.announce-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 1rem;
  animation: fadeIn .2s ease;
}
.announce-overlay.open { display: flex; }
.announce-popup {
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  animation: popupIn .3s cubic-bezier(.2, .8, .2, 1);
}
@keyframes popupIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.announce-popup .banner {
  padding: 1rem 1.3rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #0a0a0a;
}
.announce-popup .banner.info { background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; }
.announce-popup .banner.success { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; }
.announce-popup .banner.warning { background: linear-gradient(135deg, #facc15, #ca8a04); }
.announce-popup .banner.maintenance { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; }
.announce-popup .banner.novelty { background: linear-gradient(135deg, var(--gold-200), var(--gold-600)); }
.announce-popup .banner svg { flex-shrink: 0; }
.announce-popup .body {
  padding: 1.5rem 1.3rem 1rem;
}
.announce-popup h2 {
  margin: 0 0 .6rem;
  font-size: 1.3rem;
  font-family: 'Plus Jakarta Sans';
  color: var(--text);
}
.announce-popup p {
  color: var(--text-dim);
  line-height: 1.55;
  font-size: .92rem;
  margin: 0 0 1.2rem;
  white-space: pre-wrap;
}
.announce-popup .actions {
  display: flex;
  gap: .5rem;
  padding: 0 1.3rem 1.3rem;
}
.announce-popup .actions .btn { flex: 1; justify-content: center; }

/* Action preview card — confirmação antes de lançar */
.action-preview {
  align-self: stretch;
  background: linear-gradient(180deg, rgba(218, 165, 32, 0.06), rgba(218, 165, 32, 0.02));
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: .9rem 1rem;
  margin: .4rem 0;
  animation: fadeIn .25s ease;
}
.action-preview.confirming { opacity: .55; pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.action-preview .pv-head {
  display: flex; align-items: center; gap: .7rem;
  padding-bottom: .65rem;
  border-bottom: 1px dashed var(--border);
  margin-bottom: .65rem;
}
.action-preview .pv-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-2);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.action-preview .pv-icon i { width: 22px; height: 22px; }
.action-preview .pv-title { flex: 1; min-width: 0; }
.action-preview .pv-kind {
  font-size: .7rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600;
}
.action-preview .pv-amount {
  font-size: 1.35rem; font-weight: 800;
  font-family: 'Plus Jakarta Sans';
  letter-spacing: -.01em;
  margin-top: .1rem;
}
.action-preview .pv-body {
  font-size: .82rem;
  display: flex; flex-direction: column; gap: .35rem;
}
.action-preview .pv-row {
  display: flex; justify-content: space-between; gap: .6rem;
}
.action-preview .pv-row span { color: var(--text-dim); }
.action-preview .pv-row b { color: var(--text); font-weight: 600; text-align: right; }
.action-preview .pv-actions {
  display: flex; gap: .5rem; margin-top: .8rem;
}
.action-preview .pv-actions .btn {
  flex: 1; justify-content: center; padding: .6rem .8rem;
}
.action-preview .pv-done {
  display: flex; align-items: center; gap: .5rem;
  padding: .3rem 0; font-size: .88rem;
}

/* Johanna thinking pulse */
.thinking img, .johanna-thinking img {
  animation: goldPulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6);
}
@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6); }
  50% { box-shadow: 0 0 0 14px rgba(255, 215, 0, 0); }
}

/* Login/Auth */
.auth-wrap {
  min-height: 100vh;
  display: grid; place-items: center; padding: 1rem;
  background:
    radial-gradient(1000px 600px at 50% 0%, rgba(218, 165, 32, 0.1), transparent),
    var(--bg-0);
}
.auth-card {
  width: 100%; max-width: 420px;
  padding: 2.5rem 2rem;
  text-align: center;
}
.auth-card .brand {
  font-size: 2.2rem; font-weight: 800; font-family: 'Plus Jakarta Sans';
  background: linear-gradient(135deg, var(--gold-200), var(--gold-500));
  -webkit-background-clip: text; color: transparent;
  margin-bottom: .3rem;
}
.auth-card .tag { color: var(--text-dim); margin-bottom: 1.8rem; font-size: .9rem; }
.auth-card .input-group { text-align: left; margin-bottom: 1rem; }
.auth-switch { color: var(--text-dim); font-size: .88rem; margin-top: 1rem; }
.auth-switch a { color: var(--gold-400); cursor: pointer; text-decoration: none; font-weight: 600; }

/* Badges */
.badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600;
}
.badge.trial { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge.active { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge.blocked { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge.exempt { background: rgba(218, 165, 32, 0.2); color: var(--gold-200); }

/* Toast */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  padding: .8rem 1.2rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border-strong);
  color: var(--text); box-shadow: 0 10px 40px rgba(0,0,0,0.4); min-width: 250px;
  animation: slideIn .25s ease;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* Utilities */
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: .8rem; }
.spacer { flex: 1; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.p-4 { padding: 1rem; } .p-5 { padding: 1.3rem; } .p-6 { padding: 1.7rem; }
.flex { display: flex; } .flex-col { flex-direction: column; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

.mobile-toggle {
  display: none;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: .55rem .7rem;
  cursor: pointer;
  color: var(--gold-400);
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.mobile-toggle i { width: 22px; height: 22px; }
.mobile-toggle:hover { background: var(--bg-3); color: var(--gold-200); }
@media (max-width: 768px) { .mobile-toggle { display: inline-flex; } }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 60; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-1); border: 1px solid var(--border-strong); border-radius: 18px;
  width: 100%; max-width: 500px; padding: 1.5rem; max-height: 90vh; overflow-y: auto;
}
.modal h2 { margin-top: 0; }

/* Hero de instalação da Johanna no dashboard */
.install-hero {
  position: relative;
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.3rem;
  background: linear-gradient(135deg, rgba(218,165,32,.12), rgba(218,165,32,.02) 60%), var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 12px 30px -10px rgba(218,165,32,.25), inset 0 1px 0 rgba(255,215,0,.08);
  transition: opacity .2s;
}
.install-hero img {
  width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid var(--gold-500);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(218,165,32,.4);
}
.install-hero .txt { flex: 1; min-width: 0; }
.install-hero .t {
  font-weight: 700; font-size: 1.02rem; font-family: 'Plus Jakarta Sans';
  background: linear-gradient(135deg,var(--gold-200),var(--gold-500));
  -webkit-background-clip: text; color: transparent;
}
.install-hero .s { font-size: .82rem; color: var(--text-dim); margin-top: .2rem; }
.install-hero .hero-close {
  position: absolute; top: .5rem; right: .5rem;
  width: 26px; height: 26px; border-radius: 6px;
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; display: grid; place-items: center;
}
.install-hero .hero-close:hover { color: var(--text); background: var(--bg-2); }

@media (max-width: 600px) {
  .install-hero { flex-wrap: wrap; gap: .8rem; padding: 1rem; }
  .install-hero .txt { flex: 1 1 60%; }
  .install-hero .btn { flex: 1 1 100%; justify-content: center; }
}

/* Item "Baixar Johanna" do menu */
.install-nav-item {
  background: linear-gradient(135deg, rgba(218,165,32,.1), rgba(218,165,32,.02));
  border: 1px dashed var(--border-strong);
}
.install-nav-item:hover {
  background: linear-gradient(135deg, rgba(218,165,32,.18), rgba(218,165,32,.04));
  border-style: solid;
}

/* "Como instalar" modal */
.how-tabs {
  display: flex; gap: .4rem; margin-bottom: 1rem;
  background: var(--bg-2); padding: .3rem; border-radius: 12px;
}
.how-tab {
  flex: 1; padding: .6rem .5rem; border-radius: 9px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-dim); font-size: .82rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  transition: all .15s;
}
.how-tab:hover { color: var(--text); }
.how-tab.active {
  background: var(--bg-1);
  color: var(--gold-200);
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.how-content {
  background: var(--bg-2);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid var(--border);
}
.how-step {
  display: flex; align-items: flex-start; gap: .9rem;
  padding: .65rem 0; border-bottom: 1px dashed var(--border);
}
.how-step:last-child { border-bottom: none; padding-bottom: 0; }
.how-step:first-child { padding-top: 0; }
.how-step .num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #0a0a0a; display: grid; place-items: center; font-weight: 800; font-size: .85rem;
}
.how-step .content {
  flex: 1; display: flex; align-items: flex-start; gap: .6rem;
  font-size: .88rem; line-height: 1.45; padding-top: .15rem;
}
.how-step .content b { color: var(--gold-200); font-weight: 600; }

/* PWA install banner */
.install-banner {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  background: var(--bg-1); border: 1px solid var(--gold-500);
  padding: .8rem 1.2rem; border-radius: 14px;
  display: none; align-items: center; gap: .8rem; z-index: 40;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  max-width: 90vw;
}
.install-banner.show { display: flex; }
