:root{
  --bg: #0b0f0d;
  --bg2:#0e1512;
  --panel:#111a16;
  --panel2:#0f1714;
  --card:#101815;
  --border: rgba(255,255,255,.08);

  --text:#eaf2ee;
  --muted: rgba(234,242,238,.65);

  --green:#2ee88f;
  --green2:#19c37d;
  --danger:#ff5c6c;
  --warn:#fbbf24;

  --radius: 16px;
  --radius2: 22px;
  --shadow: 0 20px 60px rgba(0,0,0,.45);
}

*{
    box-sizing:border-box
}

html, body {
    height: 100%;
}


body{
    overflow: hidden;
    margin:0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    color: var(--text);
    background: transparent;
    
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(46,232,143,.18), transparent 55%),
              radial-gradient(circle at 80% 30%, rgba(120,170,255,.12), transparent 55%),
              rgba(7,10,9,1);
  z-index: -1;
}

.app{
  height: 100vh;
}

/* sidebar fixa na esquerda */
.sidebar{
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  overflow: hidden;
  padding: 18px;
  background: rgba(10,14,12,.55);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(10px);
  z-index: 10;
}

/* conteúdo ocupa o resto e faz scroll */
.main{
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;

  margin-left: 260px;        /* espaço da sidebar */
  padding: 18px 18px 28px;
}

/* AUTH */
.auth-bg{min-height:100%; display:flex; align-items:center; justify-content:center; padding:32px;}
.auth-wrap{width:100%; max-width:420px;}
.auth-card{background: rgba(17,26,22,.75); border:1px solid var(--border); border-radius: var(--radius2); padding:22px; box-shadow: var(--shadow); backdrop-filter: blur(10px);}
.brand-mark{width:44px; height:44px; border-radius:14px; background: radial-gradient(circle at 30% 30%, rgba(46,232,143,.9), rgba(25,195,125,.35)), rgba(255,255,255,.06); border:1px solid var(--border);}
.brand-title{font-weight:800; letter-spacing:.2px}
.auth-foot{margin-top:14px; color:var(--muted); font-size:12px; text-align:center}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;      /* centraliza horizontalmente */
  justify-content: center;
  gap: 10px;
  text-align: center;       /* centraliza texto */
}

.brand-logo {
  max-width: 220px;
  height: auto;
}

.brand-sub {
  color: var(--muted);
  font-size: 13px;
}



.form label{display:block; margin:12px 0 6px; color:rgba(255,255,255,.8); font-size:13px;}
.form input{width:100%; padding:12px 12px; border-radius:14px; border:1px solid var(--border); background: rgba(0,0,0,.25); color:var(--text); outline:none;}
.form input:focus{border-color: rgba(46,232,143,.55); box-shadow: 0 0 0 4px rgba(46,232,143,.12);}

.alert{background: rgba(255,92,108,.12); border:1px solid rgba(255,92,108,.25); padding:10px 12px; border-radius:14px; color:#ffd5da; font-size:13px; margin:10px 0;}

.btn{display:inline-flex; align-items:center; justify-content:center; margin-top: 15px; gap:10px; padding:12px 14px; border-radius:14px; border:1px solid var(--border); background: rgba(255,255,255,.06); color:var(--text); cursor:pointer; text-decoration:none; font-weight:650;}
.btn:hover{transform: translateY(-1px); transition: .15s;}
.btn-primary{background: linear-gradient(135deg, rgba(46,232,143,.25), rgba(25,195,125,.10)); border-color: rgba(46,232,143,.35);}
.btn-primary:hover{box-shadow: 0 12px 40px rgba(46,232,143,.12);}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  margin-bottom: 20px;
}

.sidebar-logo {
  max-width: 160px;
  height: auto;
  margin-bottom: 20px;
}

.sidebar .nav{margin-top:14px; display:flex; flex-direction:column; gap:6px;}
.sidebar .nav a{
  padding:10px 12px; border-radius:14px;
  color: rgba(234,242,238,.85); text-decoration:none;
  border:1px solid transparent;
}
.sidebar .nav a:hover{background: rgba(255,255,255,.05); border-color: var(--border);}
.sidebar .nav a.active{background: rgba(46,232,143,.10); border-color: rgba(46,232,143,.25);}

/* SECTION BUTTON */
.nav-section{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor:pointer;
  text-align:left;
}

.nav-section:hover{
  background: rgba(255,255,255,.06);
}

.nav-chevron{
  font-size:12px;
  opacity:.8;
  transition: transform .22s ease;
}

/* GROUP (COLLAPSE ANIMATION) */
.nav-group{
  overflow:hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height .28s ease, opacity .22s ease, transform .22s ease;
  margin:6px 0 10px 0;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,.06);
}

.nav-group.is-open{
  opacity: 1;
  transform: translateY(0);
}

/* indent links inside group */
.nav-group a{
  display:block;
  padding-left: 12px;
}


.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 16px; border-radius: var(--radius2);
  background: rgba(17,26,22,.55); border:1px solid var(--border);
  backdrop-filter: blur(10px);
}
.topbar .title{font-size:16px; font-weight:800;}
.topbar .meta{display:flex; gap:12px; align-items:center; color:var(--muted); font-size:13px;}
.pill{display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid var(--border); background: rgba(255,255,255,.04); color:rgba(234,242,238,.8); font-size:12px;}

.grid{
  display:grid; gap:14px; margin-top:14px;
  grid-template-columns: repeat(12, 1fr);
}
.card{
  grid-column: span 3;
  background: rgba(16,24,21,.60);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.card .kpi{display:flex; align-items:flex-end; justify-content:space-between;}
.card .kpi .label{color:var(--muted); font-size:12px;}
.card .kpi .value{font-size:22px; font-weight:900;}
.card .trend{margin-top:8px; color:rgba(46,232,143,.85); font-size:12px;}

.panel{
  background: rgba(16,24,21,.60);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 16px;
  margin-top: 14px;
}
.h1{margin:0 0 10px; font-size:18px; font-weight:900;}

.table{width:100%; border-collapse:separate; border-spacing:0; overflow:hidden; border-radius: 16px; border:1px solid var(--border);}
.table th,.table td{padding:12px; text-align:left; font-size:13px;}
.table th{color:rgba(234,242,238,.75); background: rgba(255,255,255,.04); border-bottom:1px solid var(--border);}
.table td{border-bottom:1px solid rgba(255,255,255,.05); color:rgba(234,242,238,.9);}
.table tr:last-child td{border-bottom:none;}

.doc{padding:14px; border-radius:16px; background: rgba(0,0,0,.20); border:1px solid var(--border); color:rgba(234,242,238,.85);}

/* ===== Toast / Flash Message ===== */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  max-width: 420px;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  z-index: 9999;

  background: rgba(18, 28, 24, 0.95);
  border: 1px solid rgba(46, 232, 143, 0.35);
  color: #eafff4;

  box-shadow:
    0 10px 30px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,.03);

  animation: toast-in .35s ease-out;
}

.toast-success {
  border-color: rgba(46,232,143,.55);
}

.toast-info {
  border-color: rgba(90,160,255,.55);
}

.toast-error {
  border-color: rgba(255,90,90,.55);
  color: #ffecec;
}

.currency-toggle{
  display:inline-flex;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow:hidden;
}
.cur-btn{
  appearance:none;
  border:0;
  background: transparent;
  color: rgba(234,242,238,.85);
  padding:8px 12px;
  font-size:12px;
  cursor:pointer;
  transition: all .18s ease;
}
.cur-btn:hover{ background: rgba(255,255,255,.06); }
.cur-btn.active{
  background: rgba(46,232,143,.14);
  color: #fff;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Responsivo */
@media (max-width: 980px){
  .sidebar{ display:none; }
  .main{ margin-left: 0; }
  .card{ grid-column: span 6; }
}

@media (max-width: 560px){
  .card{grid-column: span 12;}
  .main{padding:14px;}
}

