:root{
--bg: #F7F8FA;  
--panel: #FFFFFF;
--ink: #15192B;
--muted: #6B7280;
--line: #E7E9EF;
--navy: #15192B;
--green: #0F9D6E;
--green-soft: #E6F6F0;
--red: #E5484D;
--red-soft: #FCE9EA;
--amber: #D9822B;
--amber-soft: #FBF0E1;
--blue: #3B6FE0;
--blue-soft: #E9EFFC;
--purple: #7C5CE0;
--purple-soft: #F1EEFB;
--radius: 14px;
--shadow: 0 1px 2px rgba(21,25,43,.04), 0 8px 24px rgba(21,25,43,.04);
}
*{box-sizing:border-box; margin:0; padding:0;}
body{
font-family:'Inter', sans-serif;
background:var(--bg);
color:var(--ink);
line-height:1.5;
-webkit-font-smoothing:antialiased;
overflow-x:hidden;
}
.display{font-family:'Space Grotesk', sans-serif;}

/* ===== LAYOUT ===== */
.app{
min-height:100vh;
}
.sidebar{
background:var(--navy);
color:#fff;
padding:32px 24px;
display:flex;
flex-direction:column;
gap:24px;
position:fixed;
top:0;
left:0;
width:260px;
height:100vh;
overflow-y:auto;
z-index:50;
}
.brand{
display:flex;
align-items:center;
gap:10px;
}
.brand-mark{
width:36px; height:36px;
border-radius:10px;
background:var(--green);
display:flex; align-items:center; justify-content:center;
font-weight:700; font-size:18px;
flex-shrink:0;
}
.brand-name{font-family:'Space Grotesk'; font-weight:600; font-size:18px;}
.brand-sub{font-size:12px; color:rgba(255,255,255,.5);}

.nav-label{
font-size:11px;
font-weight:600;
text-transform:uppercase;
letter-spacing:.08em;
color:rgba(255,255,255,.35);
margin-bottom:2px;
margin-top:4px;
}
.nav{display:flex; flex-direction:column; gap:4px;}
.nav a{
color:rgba(255,255,255,.65);
text-decoration:none;
padding:10px 12px;
border-radius:8px;
font-size:14px;
font-weight:500;
display:flex; align-items:center; gap:10px;
transition:.15s;
}
.nav a:hover, .nav a.active{
color:#fff;
background:rgba(255,255,255,.08);
}
.nav .icon{width:18px; text-align:center; font-size:15px;}

.sidebar-foot{
margin-top:auto;
font-size:12px;
color:rgba(255,255,255,.35);
border-top:1px solid rgba(255,255,255,.08);
padding-top:16px;
}

.main{
padding:32px 40px 80px;
max-width:1180px;
margin-left:260px;
}
header.page-head{
margin-bottom:28px;
}
header.page-head h1{
font-family:'Space Grotesk';
font-size:28px;
font-weight:600;
letter-spacing:-0.01em;
}
header.page-head p{
color:var(--muted);
font-size:14px;
margin-top:4px;
}

/* ===== DASHBOARD ===== */
.dashboard{
display:grid;
grid-template-columns: repeat(5, 1fr);
gap:16px;
margin-bottom:32px;
}
.card{
background:var(--panel);
border:1px solid var(--line);
border-radius:var(--radius);
padding:18px 18px 16px;
box-shadow:var(--shadow);
}
.card h3{
font-size:12px;
font-weight:600;
text-transform:uppercase;
letter-spacing:.06em;
color:var(--muted);
margin-bottom:10px;
}
.card span.value{
font-family:'Space Grotesk';
font-size:24px;
font-weight:600;
display:block;
}
.card .icon-badge{
width:32px; height:32px;
border-radius:9px;
display:flex; align-items:center; justify-content:center;
font-size:15px;
margin-bottom:12px;
}
.card.receita .icon-badge{background:var(--green-soft); color:var(--green);}
.card.despesa .icon-badge{background:var(--red-soft); color:var(--red);}
.card.saldo .icon-badge{background:var(--blue-soft); color:var(--blue);}
.card.percentual .icon-badge{background:var(--purple-soft); color:var(--purple);}

.card.receita span.value{color:var(--green);}
.card.despesa span.value{color:var(--red);}
.card.saldo span.value{color:var(--ink);}
.card.percentual span.value{color:var(--purple);}

.meter{
margin-top:10px;
height:6px;
background:var(--line);
border-radius:99px;
overflow:hidden;
}
.meter-fill{
height:100%;
background:var(--purple);
width:0%;
transition:width .4s ease;
}

/* ===== SECTIONS ===== */
.page{ display:none; }
.page.active{ display:block; animation:fadeIn .2s ease; }
@keyframes fadeIn{ from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:none;} }

.section{
background:var(--panel);
border:1px solid var(--line);
border-radius:var(--radius);
padding:24px;
margin-bottom:24px;
box-shadow:var(--shadow);
}
.section-head{
display:flex;
align-items:center;
justify-content:space-between;
margin-bottom:18px;
gap:12px;
flex-wrap:wrap;
}
.section-head h2{
font-family:'Space Grotesk';
font-size:17px;
font-weight:600;
display:flex; align-items:center; gap:10px;
}
.section-head .tag{
font-size:12px;
color:var(--muted);
background:var(--bg);
border:1px solid var(--line);
padding:4px 10px;
border-radius:99px;
}
.section-sub{
font-size:13px;
color:var(--muted);
margin:-10px 0 18px;
}

/* ===== FORMS ===== */
form.row{
display:grid;
grid-template-columns: 2fr 1fr 1fr auto;
gap:10px;
margin-bottom:18px;
}
form.row.divida-form{
grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr auto;
}
form.row.despesa-form{
grid-template-columns: 1.6fr 1fr 1fr 1fr auto;
}
form.row.fin-row{
grid-template-columns: repeat(3, 1fr);
}
form.row.fin-row-3{
grid-template-columns: 2fr 1fr 1fr;
}
input, select, textarea{
font-family:'Inter';
font-size:14px;
padding:10px 12px;
border:1px solid var(--line);
border-radius:9px;
background:var(--bg);
color:var(--ink);
outline:none;
transition:.15s;
width:100%;
}
textarea{ resize:vertical; min-height:80px; font-family:'Inter'; line-height:1.5; }
input:focus, select:focus, textarea:focus{
border-color:var(--navy);
background:#fff;
box-shadow:0 0 0 3px rgba(21,25,43,.06);
}
input::placeholder, textarea::placeholder{color:#A2A6B5;}

label{
display:block;
font-size:12px;
font-weight:600;
color:var(--muted);
margin-bottom:6px;
}
.field{margin-bottom:14px;}
.field-grid{
display:grid;
grid-template-columns:repeat(2,1fr);
gap:14px;
margin-bottom:14px;
}
.field-grid-3{
display:grid;
grid-template-columns:2fr 1fr 1fr;
gap:14px;
margin-bottom:14px;
}
.field-prefix{position:relative;}
.field-prefix span{
position:absolute; left:12px; top:50%;
transform:translateY(-50%);
font-size:13px; color:var(--muted); font-weight:500;
pointer-events:none;
}
.field-prefix input{padding-left:32px;}

.form-divider{
font-size:11px;
font-weight:600;
text-transform:uppercase;
letter-spacing:.07em;
color:var(--muted);
margin:22px 0 14px;
padding-bottom:8px;
border-bottom:1px solid var(--line);
}

button{
font-family:'Inter';
font-weight:600;
font-size:14px;
border:none;
border-radius:9px;
padding:10px 18px;
cursor:pointer;
transition:.15s;
white-space:nowrap;
}
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible{
outline:2px solid var(--blue);
outline-offset:2px;
}
.btn-primary{
background:var(--navy);
color:#fff;
}
.btn-primary:hover{background:#272D45;}

.btn-secondary{
background:var(--bg);
color:var(--ink);
border:1px solid var(--line);
}
.btn-secondary:hover{background:#EFF1F4;}

.btn-danger-soft{
background:transparent;
color:var(--muted);
font-size:13px;
padding:6px 10px;
}
.btn-danger-soft:hover{color:var(--red); background:var(--red-soft);}

.btn-pago{
background:transparent;
color:var(--green);
border:1px solid var(--green);
font-size:12px;
font-weight:600;
padding:6px 10px;
border-radius:8px;
white-space:nowrap;
}
.btn-pago:hover{background:var(--green-soft);}
.btn-pago.is-pago{
background:var(--green);
color:#fff;
border-color:var(--green);
}
.item-row.despesa-row.pago{ opacity:.6; }
.item-row.despesa-row.pago .item-name{ text-decoration:line-through; }

.btn-row{ display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }

/* ===== LISTS ===== */
.item-list{display:flex; flex-direction:column; gap:8px;}
.item-row{
display:flex;
align-items:center;
justify-content:space-between;
padding:12px 14px;
background:var(--bg);
border:1px solid var(--line);
border-radius:10px;
font-size:14px;
gap:10px;
}
.item-row .item-main{display:flex; align-items:center; gap:12px; min-width:0;}
.item-row .item-dot{
width:8px; height:8px; border-radius:99px; flex-shrink:0;
}
.item-row.receita-row .item-dot{background:var(--green);}
.item-row.despesa-row .item-dot{background:var(--red);}
.item-row .item-name{font-weight:600;}
.item-row .item-meta{color:var(--muted); font-size:12px;}
.item-row .item-value{
font-family:'Space Grotesk';
font-weight:600;
margin-right:8px;
white-space:nowrap;
}
.item-row.receita-row .item-value{color:var(--green);}
.item-row.despesa-row .item-value{color:var(--red);}
.item-row .item-right{display:flex; align-items:center; flex-shrink:0;}

.empty{
text-align:center;
color:var(--muted);
font-size:13px;
padding:24px 0;
}

/* ===== DÍVIDAS ===== */
.divida-card{
border:1px solid var(--line);
border-radius:12px;
padding:16px;
margin-bottom:12px;
background:var(--bg);
}
.divida-card .divida-top{
display:flex;
justify-content:space-between;
align-items:flex-start;
margin-bottom:10px;
gap:10px;
}
.divida-card .divida-top h4{
font-family:'Space Grotesk';
font-size:15px;
font-weight:600;
margin-bottom:4px;
}
.badge{
font-size:11px;
font-weight:600;
padding:3px 9px;
border-radius:99px;
text-transform:uppercase;
letter-spacing:.04em;
}
.badge.alto{background:var(--red-soft); color:var(--red);}
.badge.medio{background:var(--amber-soft); color:var(--amber);}
.badge.baixo{background:var(--green-soft); color:var(--green);}

.divida-stats{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:12px;
font-size:13px;
margin-bottom:10px;
}
.divida-stats .stat-label{color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.04em; margin-bottom:2px;}
.divida-stats .stat-value{font-family:'Space Grotesk'; font-weight:600;}

.progress{
height:8px;
background:var(--line);
border-radius:99px;
overflow:hidden;
}
.progress-fill{
height:100%;
background:var(--green);
transition:width .4s ease;
}

/* ===== PLANO DE AÇÃO (financeiro) ===== */
#planoAcao{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:16px;
}
.prioridade{
border-radius:12px;
padding:16px;
border:1px solid var(--line);
}
.prioridade h3{
font-family:'Space Grotesk';
font-size:14px;
margin-bottom:10px;
display:flex; align-items:center; gap:8px;
}
.prioridade.alta{background:var(--red-soft); border-color:#F6CFD1;}
.prioridade.media{background:var(--amber-soft); border-color:#F3DDC0;}
.prioridade.baixa{background:var(--green-soft); border-color:#C9ECDE;}
.prioridade .dot{width:10px; height:10px; border-radius:99px;}
.prioridade.alta .dot{background:var(--red);}
.prioridade.media .dot{background:var(--amber);}
.prioridade.baixa .dot{background:var(--green);}
.prioridade ul{list-style:none; display:flex; flex-direction:column; gap:8px;}
.prioridade li{
font-size:13px;
background:rgba(255,255,255,.6);
border-radius:8px;
padding:8px 10px;
line-height:1.4;
}
.prioridade .empty{padding:8px 0; font-size:12px;}

/* ===== SELETOR DE MÊS (aba Despesas) ===== */
.month-section{ padding-bottom:18px; }
.month-bar{
display:flex;
align-items:center;
gap:10px;
}
.month-bar-scroll{
display:flex;
gap:8px;
overflow-x:auto;
scroll-behavior:smooth;
padding:2px;
flex:1;
scrollbar-width:thin;
}
.month-bar-scroll::-webkit-scrollbar{ height:6px; }
.month-bar-scroll::-webkit-scrollbar-thumb{ background:var(--line); border-radius:99px; }
.month-nav-btn{
flex-shrink:0;
width:32px; height:32px;
border-radius:9px;
border:1px solid var(--line);
background:var(--bg);
color:var(--ink);
font-size:16px;
font-weight:600;
cursor:pointer;
display:flex; align-items:center; justify-content:center;
transition:.15s;
}
.month-nav-btn:hover{ background:var(--navy); color:#fff; border-color:var(--navy); }
.month-pill{
flex-shrink:0;
position:relative;
padding:9px 16px;
border-radius:9px;
border:1px solid var(--line);
background:var(--bg);
color:var(--muted);
font-family:'Inter';
font-size:13px;
font-weight:600;
cursor:pointer;
transition:.15s;
white-space:nowrap;
}
.month-pill:hover{ color:var(--ink); border-color:var(--navy); }
.month-pill.active{
background:var(--navy);
border-color:var(--navy);
color:#fff;
}
.month-pill .month-dot{
display:inline-block;
width:5px; height:5px;
border-radius:99px;
background:var(--green);
margin-left:6px;
vertical-align:middle;
}
.month-pill.active .month-dot{ background:#fff; }

/* ===== GRÁFICOS ===== */
.graficos{
display:grid;
grid-template-columns:1fr 1fr;
gap:20px;
}
.grafico-box{
border:1px solid var(--line);
border-radius:12px;
padding:16px;
background:var(--bg);
height:280px;
position:relative;
}
.grafico-box h4{
font-family:'Space Grotesk';
font-size:13px;
color:var(--muted);
margin-bottom:8px;
text-transform:uppercase;
letter-spacing:.04em;
}

/* ===== ESPAÇAMENTO COMPACTO (aba Despesas) ===== */
#page-despesas .page-head{ margin-bottom:10px; }
#page-despesas .page-head p{ margin-top:2px; }

#page-despesas .month-section{ padding:10px 14px; margin-bottom:10px; }
#page-despesas .month-section .section-head{ margin-bottom:8px; }
#page-despesas .month-bar{ gap:6px; }
#page-despesas .month-bar-scroll{ gap:5px; padding:0; }
#page-despesas .month-pill{ padding:6px 11px; font-size:12px; }
#page-despesas .month-nav-btn{ width:26px; height:26px; font-size:14px; }

#page-despesas .dashboard{ grid-template-columns: repeat(4, 1fr); gap:8px; margin-bottom:10px; }
#page-despesas .card{ padding:10px 12px 9px; }
#page-despesas .card h3{ margin-bottom:5px; font-size:11px; }
#page-despesas .card span.value{ font-size:19px; }
#page-despesas .card .icon-badge{ width:24px; height:24px; margin-bottom:6px; font-size:12px; }
#page-despesas .meter{ margin-top:6px; height:5px; }

#page-despesas .section{ padding:14px; margin-bottom:10px; }
#page-despesas .section-head{ margin-bottom:8px; }

#page-despesas .graficos{ grid-template-columns:1fr; gap:10px; }
#page-despesas .grafico-box{ height:190px; padding:10px; }
#page-despesas .grafico-box h4{ margin-bottom:4px; }

#page-despesas form.row{ margin-bottom:10px; }
#page-despesas .item-list{ gap:5px; }
#page-despesas .item-row{ padding:10px 12px; }

/* ===== ALERTAS ===== */
.alert{
padding:14px 16px;
border-radius:10px;
font-size:13px;
line-height:1.55;
margin-bottom:18px;
border-left:3px solid;
display:none;
}
.alert.show{display:block;}
.alert.danger{ background:var(--red-soft); color:#8B2018; border-left-color:var(--red); }
.alert.warn{ background:var(--amber-soft); color:#7A4F0E; border-left-color:var(--amber); }
.alert.success{ background:var(--green-soft); color:#0E5E3A; border-left-color:var(--green); }

/* ===== MÉTRICAS (plano de vida) ===== */
.metrics-grid{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:12px;
margin-bottom:18px;
}
.metric-card{
background:var(--bg);
border:1px solid var(--line);
border-radius:10px;
padding:14px 16px;
}
.metric-label{
font-size:11px; font-weight:600; color:var(--muted);
text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px;
}
.metric-value{
font-family:'Space Grotesk'; font-size:19px; font-weight:700;
}
.metric-value.danger{color:var(--red);}
.metric-value.warn{color:var(--amber);}
.metric-value.success{color:var(--green);}
.metric-sub{font-size:11px; color:var(--muted); margin-top:2px;}

/* ===== PRIORIDADES (plano de vida) ===== */
.priority-list{display:flex; flex-direction:column; gap:10px;}
.priority-item{
display:flex; gap:14px;
padding:14px 16px;
border-radius:10px;
border:1px solid var(--line);
background:var(--bg);
position:relative;
overflow:hidden;
}
.priority-item::before{
content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
}
.priority-item.p-urgente::before{background:var(--red);}
.priority-item.p-importante::before{background:var(--amber);}
.priority-item.p-plan::before{background:var(--green);}
.priority-num{
font-family:'Space Grotesk'; font-size:20px; font-weight:700;
color:#C7CAD3; min-width:28px; line-height:1; padding-top:2px;
}
.priority-body{flex:1;}
.priority-tag{
display:inline-block; font-size:10px; font-weight:600;
letter-spacing:.06em; text-transform:uppercase;
padding:2px 8px; border-radius:20px; margin-bottom:6px;
}
.tag-urgente{background:var(--red-soft); color:var(--red);}
.tag-importante{background:var(--amber-soft); color:var(--amber);}
.tag-plan{background:var(--green-soft); color:var(--green);}
.priority-body h3{font-size:14px; font-weight:600; margin-bottom:4px;}
.priority-body p{font-size:13px; color:var(--muted); line-height:1.55;}

/* ===== AÇÕES (checklist) ===== */
.action-group{margin-bottom:20px;}
.action-group-header{
display:flex; align-items:center; gap:8px; margin-bottom:10px;
}
.action-group-header span{
font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.07em;
}
.action-group-header .line{flex:1; height:1px; background:var(--line);}

.action-item{
display:flex; align-items:flex-start; gap:12px;
padding:12px 14px; border-radius:10px;
background:var(--bg); border:1px solid var(--line);
margin-bottom:6px; transition:background .15s;
}
.action-item:hover{background:#EFF1F4;}
.action-check{
width:20px; height:20px; border-radius:50%;
border:1.5px solid #C7CAD3; cursor:pointer; flex-shrink:0;
margin-top:1px; display:flex; align-items:center; justify-content:center;
transition:all .15s; background:#fff;
}
.action-check:hover{border-color:var(--green);}
.action-check.done{background:var(--green); border-color:var(--green);}
.action-check.done::after{
content:''; width:8px; height:5px;
border-left:1.5px solid white; border-bottom:1.5px solid white;
transform:rotate(-45deg) translateY(-1px); display:block;
}
.action-text{font-size:13.5px; line-height:1.5; flex:1;}
.action-text.done{text-decoration:line-through; color:var(--muted);}
.action-meta{font-size:11px; color:var(--muted); margin-top:2px;}

/* ===== DÍVIDAS (ordem de ataque) ===== */
.debt-list{display:flex; flex-direction:column; gap:8px;}
.debt-item{
display:flex; align-items:center; gap:14px;
padding:14px 16px; border-radius:10px;
background:var(--bg); border:1px solid var(--line);
}
.debt-rank{
font-family:'Space Grotesk'; font-size:11px; font-weight:700;
color:var(--muted); min-width:20px;
}
.debt-info{flex:1; min-width:0;}
.debt-name{font-size:13px; font-weight:600;}
.debt-detail{font-size:11px; color:var(--muted); margin-top:1px;}
.debt-juros{font-size:11px; padding:2px 8px; border-radius:20px; font-weight:600; white-space:nowrap;}
.debt-juros.high{background:var(--red-soft); color:var(--red);}
.debt-juros.mid{background:var(--amber-soft); color:var(--amber);}
.debt-juros.low{background:var(--green-soft); color:var(--green);}
.debt-value{font-family:'Space Grotesk'; font-weight:600; white-space:nowrap;}

/* ===== TOAST ===== */
.toast{
position:fixed; bottom:28px; right:28px;
background:var(--navy); color:#fff;
padding:12px 20px; border-radius:10px;
font-size:13px; font-weight:500;
box-shadow:var(--shadow);
opacity:0; transform:translateY(12px);
transition:all .25s ease; pointer-events:none; z-index:100;
}
.toast.show{opacity:1; transform:none;}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px){
.app{grid-template-columns:1fr;}
.sidebar{
    position:relative; height:auto; width:auto; top:auto; left:auto;
    flex-direction:column; align-items:stretch;
    padding:16px 24px;
}
.nav{flex-direction:row; flex-wrap:wrap;}
.sidebar-foot{display:none;}
.main{padding:24px 16px 60px; margin-left:0;}
.main-footer{ position:static; left:auto; right:auto; bottom:auto; box-shadow:none; }
.dashboard{grid-template-columns:repeat(2,1fr);}
form.row, form.row.divida-form, form.row.fin-row, form.row.fin-row-3, form.row.despesa-form{grid-template-columns:1fr; }
.month-bar{ gap:6px; }
.month-nav-btn{ width:28px; height:28px; }
.field-grid, .field-grid-3{grid-template-columns:1fr;}
.divida-stats{grid-template-columns:repeat(2,1fr);}
#planoAcao{grid-template-columns:1fr;}
.graficos{grid-template-columns:1fr;}
.metrics-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:560px){
.dashboard{grid-template-columns:1fr;}
}

@media (prefers-reduced-motion: reduce){
*{transition:none !important;}
}

/* ===== BOTÃO EDITAR DÍVIDA ===== */
.btn-edit{
  background:var(--blue-soft);
  color:var(--blue);
  font-family:'Inter';
  font-size:13px;
  font-weight:600;
  border:none;
  border-radius:8px;
  padding:6px 12px;
  cursor:pointer;
  transition:.15s;
  white-space:nowrap;
}
.btn-edit:hover{
  background:var(--blue);
  color:#fff;
}
.divida-edit-form input,
.divida-edit-form select{
  font-size:13px;
  padding:8px 10px;
}

/* ===== FORM INLINE EDIÇÃO (receitas / despesas) ===== */
.item-row{
  flex-direction:column;
  align-items:stretch;
}
.item-card-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.item-row .item-main,
.item-row .item-right{
  display:flex;
  align-items:center;
}
.item-row .item-right{
  gap:6px;
  flex-shrink:0;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.item-edit-form input,
.item-edit-form select{
  font-size:13px;
  padding:8px 10px;
}
@media(max-width:600px){
  .item-edit-form > div:first-child + div{
    grid-template-columns:1fr !important;
  }
}
@media(max-width:760px){
  .divida-edit-form > div:first-child{
    grid-template-columns:1fr 1fr !important;
  }
}
@media(max-width:480px){
  .divida-edit-form > div:first-child{
    grid-template-columns:1fr !important;
  }
}

/* ===== AUTH SCREEN ===== */
.auth-screen {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(21,25,43,.04), 0 16px 48px rgba(21,25,43,.08);
  padding: 40px 40px 36px;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.auth-logo-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
}
.auth-logo-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.auth-logo-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* TABS */
.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  padding: 9px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: .15s;
}
.auth-tab.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(21,25,43,.08);
}
.auth-tab:hover:not(.active) {
  color: var(--ink);
}

/* FORM */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-hidden { display: none !important; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
}
.auth-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  transition: .15s;
  outline: none;
}
.auth-field input:focus {
  border-color: var(--navy);
  background: #fff;
}
.auth-field input::placeholder { color: #B0B5C3; }

.auth-input-senha {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-senha input { padding-right: 44px; }
.auth-btn-toggle {
  position: absolute; right: 10px;
  background: none; border: none;
  cursor: pointer; font-size: 16px;
  color: var(--muted); padding: 4px;
  line-height: 1;
}
.auth-btn-toggle:hover { color: var(--ink); }

.auth-erro {
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
  min-height: 16px;
  margin: -8px 0;
}

.auth-erro.ok {
  color: var(--green);
}

.auth-btn-submit {
  width: 100%;
  padding: 13px 20px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
  margin-top: 4px;
  letter-spacing: .01em;
}
.auth-btn-submit:hover {
  background: #1e2440;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(21,25,43,.15);
}
.auth-btn-submit:active { transform: none; }

/* AUTH FOOTER */
.auth-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.auth-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

/* ===== MAIN FOOTER ===== */
.main-footer {
  display: none;
  position: fixed;
  left: 260px;
  right: 0;
  bottom: 0;
  text-align: center;
  padding: 12px 24px;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 8px rgba(21,25,43,.04);
  z-index: 40;
}
.main-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.main-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 24px; }
}
