/* =========================================================
   Finilza Theme — Blush/Lilac DARK (legível e alinhado)
   ========================================================= */

:root{
  /* Base (dark) */
  --bg1: #0b0610;
  --bg2: #07040b;

  /* superfícies */
  --card: rgba(10, 7, 14, .86);
  --card2: rgba(255,255,255,.04);

  --stroke: rgba(255,255,255,.10);

  /* texto (claro) */
  --txt: #f5edf7;
  --muted: rgba(245,237,247,.70);

  /* Accents */
  --p1: #ff5aa5;   /* blush vivo */
  --p2: #8b5cf6;   /* lilac */
  --p3: #ff8a5b;   /* peach */
  --p4: rgba(255, 209, 230, .22); /* blush "aura" */

  /* KPI */
  --pos: #2dd37d;
  --neg: #ff4d5e;

  /* UI */
  --shadow: 0 18px 45px rgba(0,0,0,.45);
  --radius: 18px;

  /* Motion */
  --t-fast: 120ms ease;
}

/* Reset básico */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  min-height: 100vh;

  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--txt);

  background:
    radial-gradient(900px 600px at 10% 10%, var(--p4), transparent 60%),
    radial-gradient(900px 600px at 90% 0%, rgba(139,92,246,.16), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* Layout */
.wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px;
}

/* =========================================================
   Topbar / Branding
   ========================================================= */

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  background: rgba(10, 7, 14, .62);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.topbar__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__logo{
  width: 50px;
  height: 50px;
  border-radius: 14px;

  display: grid;
  place-items: center;

  color: #fff;
  font-weight: 1000;

  background: linear-gradient(135deg, var(--p1), var(--p2));
  box-shadow: var(--shadow);
}

.brand__meta{ min-width: 0; }

.brand__name{
  font-weight: 900;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__tag{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   Nav (desktop)
   ========================================================= */

.nav{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.nav__link{
  text-decoration: none;
  color: var(--txt);

  padding: 10px 12px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);

  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast);
  will-change: transform;
}

.nav__link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
}

.nav__link:active{ transform: translateY(0px); }

.nav__link--quiet{
  color: rgba(245,237,247,.78);
}

/* =========================================================
   Grid / Rows
   ========================================================= */

.grid{ display: grid; gap: 16px; }

.grid--2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px){
  .grid--2{ grid-template-columns: 1fr; }
}

.row{ display: grid; gap: 10px; }

.row--2{ grid-template-columns: 1fr 1fr; }

@media (max-width: 700px){
  .row--2{ grid-template-columns: 1fr; }
}

/* =========================================================
   Cards / Typography
   ========================================================= */

.card{
  background: var(--card);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card__title{
  margin: 0 0 10px;
  font-weight: 900;
}

.muted{ color: var(--muted); }

.kpi{
  margin: 6px 0;
  font-size: 28px;
  font-weight: 950;
}

.kpi--pos{ color: var(--pos); }
.kpi--neg{ color: var(--neg); }

/* =========================================================
   Buttons
   ========================================================= */

.btn{
  border: 0;
  cursor: pointer;

  padding: 11px 14px;
  border-radius: 999px;

  font-weight: 900;
  color: #fff;

  background: linear-gradient(135deg, var(--p1), var(--p2));
  box-shadow: var(--shadow);

  transition: transform var(--t-fast), filter var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }

.btn--ghost{
  background: rgba(255,255,255,.05);
  color: var(--txt);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: none;
}

/* =========================================================
   Inputs
   ========================================================= */

.input,
select{
  width: 100%;
  padding: 11px 12px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);

  color: var(--txt);
  background: rgba(255,255,255,.06);

  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.input::placeholder{
  color: rgba(245,237,247,.55);
}

.input:focus,
select:focus{
  border-color: rgba(139,92,246,.55);
  box-shadow: 0 0 0 4px rgba(139,92,246,.18);
  background: rgba(255,255,255,.08);
}

/* =========================================================
   Table (legível no dark)
   ========================================================= */

.table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.table th{
  font-size: 12px;
  text-align: left;
  color: var(--muted);
  font-weight: 900;
  padding: 0 6px;
}

.table td{
  background: rgba(255,255,255,.06);
  padding: 10px 12px;

  border-top: 1px solid rgba(255,255,255,.10);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.table td:first-child{
  border-left: 1px solid rgba(255,255,255,.10);
  border-radius: 14px 0 0 14px;
}

.table td:last-child{
  border-right: 1px solid rgba(255,255,255,.10);
  border-radius: 0 14px 14px 0;
}

/* garante contraste em textos internos */
.table strong{ color: var(--txt); }
.table .muted{ color: rgba(245,237,247,.65); }

/* =========================================================
   Alerts (dark)
   ========================================================= */

.alert{
  margin: 14px 0;
  padding: 12px 14px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}

.alert--info{ border-color: rgba(139,92,246,.40); }
.alert--warn{ border-color: rgba(255,138,91,.45); }
.alert--critical{ border-color: rgba(255,77,94,.45); }

/* =========================================================
   Footer
   ========================================================= */

.footer{
  color: var(--muted);
  padding-bottom: 40px;
}


.logout-btn{
  width: 44px;
  height: 44px;
  border-radius: 14px;

  display: grid;
  place-items: center;

  text-decoration: none;
  font-weight: 1000;
  font-size: 16px;
  line-height: 1;

  color: var(--txt, #111);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);

  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.logout-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.16);
}

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

/* garante alinhamento bonito com a logo */
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
