/* ===========================
   EKkora • app.css (MVP estável)
   =========================== */

:root{
  --bg:#0b1220;
  --panel:#0f1a2e;
  --card:#0e1a30;
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.65);
  --border:rgba(255,255,255,.10);

  --green:#19c37d;
  --red:#ff4d4d;
  --blue:#4aa3ff;

  --shadow: 0 10px 35px rgba(0,0,0,.35);
  --radius:18px;
}

html[data-theme="light"]{
  --bg:#f7f9ff;
  --panel:#ffffff;
  --card:#ffffff;
  --text:#0b1220;
  --muted:rgba(11,18,32,.65);
  --border:rgba(11,18,32,.10);
  --shadow: 0 10px 35px rgba(15,23,42,.12);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{ color:inherit; text-decoration:none; }

.bg-glow{
  position:fixed; inset:0;
  background:
    radial-gradient(700px 400px at 20% 15%, rgba(25,195,125,.22), transparent 60%),
    radial-gradient(700px 400px at 80% 30%, rgba(74,163,255,.18), transparent 60%),
    radial-gradient(700px 400px at 50% 90%, rgba(255,77,77,.10), transparent 60%);
  pointer-events:none;
  filter: blur(0px);
  opacity:.9;
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  padding:12px 14px;
  border-radius:12px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  user-select:none;
}
.btn:hover{ transform: translateY(-1px); background:rgba(255,255,255,.06); }
.btn:active{ transform: translateY(0px); }
.btn.small{ padding:9px 10px; border-radius:10px; font-size:12px; }

.btn-primary{
  border-color: rgba(25,195,125,.35);
  background: linear-gradient(180deg, rgba(25,195,125,.25), rgba(25,195,125,.12));
}
.btn-primary:hover{ border-color: rgba(25,195,125,.55); }

.btn-danger{
  border-color: rgba(255,77,77,.35);
  background: linear-gradient(180deg, rgba(255,77,77,.22), rgba(255,77,77,.10));
}
.btn-danger:hover{ border-color: rgba(255,77,77,.55); }

.btn-ghost{
  background: transparent;
}

.icon-btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  width:38px; height:38px;
  border-radius:12px;
  cursor:pointer;
}

/* Inputs */
.field{ display:flex; flex-direction:column; gap:8px; margin:0 0 14px; }
.field span{ font-size:12px; color:var(--muted); }
.input, input, select{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
}
.input.small{ padding:10px 10px; }
input::placeholder{ color: rgba(234,240,255,.40); }
html[data-theme="light"] input::placeholder{ color: rgba(11,18,32,.40); }

.muted{ color: var(--muted); }
.hint{ margin:10px 0 0; font-size:12px; color: var(--muted); }
.divider{ height:1px; background: var(--border); margin:16px 0; }

/* Auth */
.auth-wrap{
  min-height:100vh;
  display:grid;
  grid-template-columns: 1fr;
  place-items:center;
  padding:24px;
}
.auth-card{
  width:min(480px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:22px;
}
.brand{ display:flex; gap:14px; align-items:center; margin-bottom:14px; }
.logoMark{
  width:44px; height:44px; border-radius:14px;
  display:grid; place-items:center;
  font-weight:900;
  background: linear-gradient(180deg, rgba(25,195,125,.25), rgba(74,163,255,.10));
  border:1px solid rgba(255,255,255,.10);
}
.brandText h1{ margin:0; font-size:22px; letter-spacing:.2px; }
.brandText p{ margin:2px 0 0; color:var(--muted); font-size:12px; }

.tabs{ display:flex; gap:8px; margin:14px 0 10px; }
.tab{
  flex:1;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  cursor:pointer;
  color: var(--muted);
}
.tab.is-active{
  color: var(--text);
  border-color: rgba(74,163,255,.35);
  background: linear-gradient(180deg, rgba(74,163,255,.18), rgba(74,163,255,.06));
}
.form{ display:none; }
.form.is-visible{ display:block; }
.onboarding.hidden{ display:none; }
.hidden{ display:none !important; }

/* App layout */
.app{
  display:grid;
  grid-template-columns: 280px 1fr;
  min-height:100vh;
}
.sidebar{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border-right:1px solid var(--border);
  padding:18px;
  position:sticky;
  top:0;
  height:100vh;
}
.side-brand{ margin-bottom:14px; }
.nav{ display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.nav-item{
  padding:12px 12px;
  border-radius:12px;
  border:1px solid transparent;
  color: var(--muted);
  background: transparent;
}
.nav-item:hover{ background: rgba(255,255,255,.04); color: var(--text); }
.nav-item.is-active{
  color: var(--text);
  border-color: rgba(25,195,125,.25);
  background: linear-gradient(180deg, rgba(25,195,125,.14), rgba(25,195,125,.05));
}
.side-bottom{ position:absolute; bottom:18px; left:18px; right:18px; display:flex; flex-direction:column; gap:10px; }

.content{
  padding:22px;
}
.topbar{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}
.topbar h2{ margin:0; font-size:22px; }
.topbar p{ margin:6px 0 0; }

.grid{ display:grid; gap:14px; }
.kpis{ grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom:14px; }
.charts{ grid-template-columns: 1.6fr 1fr; margin-bottom:14px; }
.finance-grid{ grid-template-columns: 420px 1fr; }

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}
.card-head{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.card-title{ font-weight:800; }
.card-label{ color: var(--muted); font-size:12px; margin-bottom:8px; }
.kpi{ font-size:22px; font-weight:900; letter-spacing:.2px; }
.sub{ margin-top:6px; font-size:12px; }

.chart-wrap{ width:100%; }

.meta-target{ display:flex; gap:8px; align-items:center; }

.table{ display:flex; flex-direction:column; gap:8px; }
.row{
  display:grid;
  grid-template-columns: 120px 110px 150px 1fr 140px;
  gap:10px;
  padding:10px 10px;
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(255,255,255,.02);
}
.row.head{
  border:none;
  background: transparent;
  color: var(--muted);
  padding:0 10px;
}
.right{ text-align:right; }
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:12px;
}
.badge.income{ border-color: rgba(25,195,125,.35); color: var(--green); }
.badge.expense{ border-color: rgba(255,77,77,.35); color: var(--red); }

.actions-inline{ display:flex; gap:8px; justify-content:flex-end; }
.link-btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
  color: var(--text);
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
}
.link-btn:hover{ background: rgba(255,255,255,.05); }

/* Modal */
.modal{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  display:grid; place-items:center;
  padding:18px;
}
.modal-card{
  width:min(520px, 100%);
  background: var(--panel);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:10px;
}
.modal-title{ font-weight:900; }
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:8px; }

.toast{
  position:fixed;
  right:18px; bottom:18px;
  background: rgba(0,0,0,.65);
  border:1px solid rgba(255,255,255,.12);
  color:#fff;
  padding:12px 14px;
  border-radius:14px;
  box-shadow: var(--shadow);
  opacity:0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
  max-width: min(420px, calc(100vw - 40px));
  pointer-events:none;
}
.toast.show{
  opacity:1;
  transform: translateY(0px);
}

/* Responsive */
@media (max-width: 1100px){
  .kpis{ grid-template-columns: repeat(2, 1fr); }
  .charts{ grid-template-columns: 1fr; }
  .finance-grid{ grid-template-columns: 1fr; }
  .app{ grid-template-columns: 1fr; }
  .sidebar{ position:relative; height:auto; }
  .side-bottom{ position:relative; left:0; right:0; bottom:0; margin-top:14px; }
}

/* ===========================
   Logo personalizada
   =========================== */

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
/* ===========================
   LOGIN PREMIUM
   =========================== */

.auth-body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(800px 400px at 20% 20%, rgba(25,195,125,.25), transparent 60%),
    radial-gradient(800px 400px at 80% 80%, rgba(74,163,255,.18), transparent 60%),
    var(--bg);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  text-align: center;
}

.auth-logo img {
  width: 90px;
  margin-bottom: 30px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.4));
  transition: transform .3s ease;
}

.auth-logo img:hover {
  transform: scale(1.05);
}

.auth-card-premium {
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 30px 25px;
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}

.auth-card-premium h2 {
  margin: 0 0 8px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 25px;
}

.auth-card-premium input {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline: none;
  transition: border .2s ease, background .2s ease;
}

.auth-card-premium input:focus {
  border-color: rgba(25,195,125,.5);
  background: rgba(255,255,255,.06);
}

.btn-premium {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  background: linear-gradient(135deg, #19c37d, #0fa968);
  color: #fff;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25,195,125,.4);
}

.tabs {
  display: flex;
  margin-bottom: 20px;
  gap: 10px;
}

.tab {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
}

.tab.is-active {
  background: rgba(25,195,125,.2);
  border-color: rgba(25,195,125,.5);
}

/* ===========================
   LOGIN NÍVEL STRIPE (Premium)
   =========================== */

body.auth-body.stripe{
  margin:0;
  min-height:100vh;
  overflow:hidden;
}

/* ===========================
   PARALLAX BACKGROUND LOGIN
   =========================== */

/* ===========================
   PARALLAX BACKGROUND LOGIN
   =========================== */

.stripe-bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background-image:
    linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.65)),
    url("../bg-login.jpg");

  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* 🔥 efeito parallax */
}

.stripe-blob{
  position:absolute;
  width:520px;
  height:520px;
  border-radius: 999px;
  filter: blur(50px);
  opacity:.55;
  transform: translate3d(0,0,0);
  animation: blobMove 12s ease-in-out infinite;
  background: radial-gradient(circle at 30% 30%, rgba(25,195,125,.35), transparent 60%);
}

.stripe-blob.b1{ top:-180px; left:-160px; animation-delay: 0s; }
.stripe-blob.b2{
  right:-200px; top:-120px;
  background: radial-gradient(circle at 30% 30%, rgba(74,163,255,.30), transparent 60%);
  animation-delay: -4s;
}
.stripe-blob.b3{
  left: 25%; bottom:-220px;
  width:620px; height:620px;
  background: radial-gradient(circle at 30% 30%, rgba(25,195,125,.22), transparent 60%);
  animation-delay: -7s;
}

@keyframes blobMove{
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(40px, -25px) scale(1.05); }
  100% { transform: translate(0,0) scale(1); }
}

/* “noise” bem leve (sem imagem externa) */
.stripe-noise{
  position:absolute;
  inset:0;
  opacity:.08;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.04) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* layout */
.stripe-wrap{
  position:relative;
  z-index:1;
  min-height:100vh;
  display:grid;
  place-items:center;
  padding: 34px 18px;
}

.stripe-header{
  width:min(460px, 100%);
  text-align:center;
  margin-bottom:14px;
  animation: fadeUp .6s ease both;
}

@keyframes fadeUp{
  from{ opacity:0; transform: translateY(10px); }
  to{ opacity:1; transform: translateY(0); }
}

.stripe-logo{
  width:84px;
  height:84px;
  margin: 0 auto 14px;
  border-radius: 22px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(16px);
}

.stripe-logo img{
  width:64px;
  height:64px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}

.stripe-title{
  margin:0;
  font-size:24px;
  letter-spacing:.2px;
}

.stripe-sub{
  margin:8px 0 0;
  font-size:13px;
  color: var(--muted);
}

/* card glass */
.stripe-card{
  width:min(460px, 100%);
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  box-shadow: 0 24px 90px rgba(0,0,0,.42);
  backdrop-filter: blur(20px);
  padding: 18px;
  animation: fadeUp .65s ease both;
}

.stripe-tabs{
  display:flex;
  gap:10px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.10);
  margin-bottom: 12px;
}

.stripe-tab{
  flex:1;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}

.stripe-tab:hover{
  background: rgba(255,255,255,.05);
  color: var(--text);
  transform: translateY(-1px);
}

.stripe-tab.is-active,
.tab.is-active{ /* mantém compatível com seu auth.js */
  background: linear-gradient(180deg, rgba(25,195,125,.18), rgba(25,195,125,.08));
  border-color: rgba(25,195,125,.35);
  color: var(--text);
}

.stripe-form{
  margin-top: 8px;
}

.stripe-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin: 0 0 12px;
}

.stripe-field span{
  font-size:12px;
  color: var(--muted);
}

.stripe-field input{
  width:100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}

.stripe-field input:focus{
  border-color: rgba(25,195,125,.45);
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

.stripe-btn{
  width:100%;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(25,195,125,.25);
  cursor:pointer;
  color:#fff;
  background: linear-gradient(135deg, rgba(25,195,125,.95), rgba(15,169,104,.95));
  box-shadow: 0 16px 40px rgba(25,195,125,.18);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:700;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.stripe-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(25,195,125,.28);
  filter: brightness(1.02);
}

.stripe-btn:active{
  transform: translateY(0px);
}

.stripe-btn-arrow{
  opacity:.9;
  transform: translateX(0);
  transition: transform .12s ease;
}
.stripe-btn:hover .stripe-btn-arrow{
  transform: translateX(3px);
}

.stripe-hint{
  margin: 12px 0 0;
  font-size:12px;
  color: var(--muted);
  text-align:center;
}

.stripe-foot{
  width:min(460px, 100%);
  margin-top: 14px;
  text-align:center;
  color: var(--muted);
  font-size:12px;
  animation: fadeUp .7s ease both;
}

.stripe-mini{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(16px);
}

.stripe-mini .dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background: rgba(25,195,125,.95);
  box-shadow: 0 0 0 6px rgba(25,195,125,.12);
}

/* responsivo */
@media (max-width: 420px){
  .stripe-title{ font-size:22px; }
  .stripe-logo{ width:78px; height:78px; }
  .stripe-logo img{ width:58px; height:58px; }
}

/* ===== LOGO GLOBAL SAAS ===== */

.logoWrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logoWrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Remove visual antigo da letra */
.logoMark {
  display: none;
}

/* ====== Logo com imagem (mantém seu tema atual) ====== */
.logoWrap{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.logoWrap img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}