/* =========================================================
   EmpreenTech UI — Premium Light SaaS (CreativaAiMod)
   Sidebar: Blue clean + Alegreya Sans
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans:wght@400;700;800&display=swap');

:root{
  --brand-purple:#C300D1;
  --brand-neon:#00FF7A;

  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#fbfcff;

  --text:#0b1220;
  --muted:#667085;

  --line:rgba(15,23,42,.10);
  --shadow: 0 12px 30px rgba(15,23,42,.08);
  --shadow-2: 0 18px 60px rgba(15,23,42,.10);

  --r-xl: 22px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 12px;

  --font: "Sora", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  --font-menu: "Alegreya Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background: var(--bg);
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

.bg{
  min-height:100vh;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(195,0,209,.14), transparent 60%),
    radial-gradient(900px 600px at 92% 0%, rgba(0,255,122,.10), transparent 60%),
    radial-gradient(700px 450px at 70% 110%, rgba(37,99,235,.08), transparent 55%),
    linear-gradient(180deg, #f7f8fd 0%, #f4f6fb 60%, #f6f7fb 100%);
}

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

/* Alerts */
.alert{
  border-radius: var(--r-md);
  padding: 12px 14px;
  border:1px solid var(--line);
  font-size: 13px;
  line-height:1.35;
  box-shadow: 0 6px 18px rgba(15,23,42,.04);
}
.alert--danger{ background:#fff1f2; border-color:#fecdd3; color:#9f1239; }
.alert--success{ background:#ecfdf5; border-color:#bbf7d0; color:#166534; }

/* Inputs */
.label{ font-size:12px; color:var(--muted); margin-top:2px; }
.input{
  width:100%;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline:none;
  background:#fff;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.input:focus{
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}
.input::placeholder{ color: rgba(102,112,133,.65); }

/* Buttons */
.btn{
  border:0;
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-weight: 800;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{
  color:#fff;
  background:
    linear-gradient(135deg, rgba(195,0,209,1) 0%,
                           rgba(37,99,235,1) 45%,
                           rgba(0,255,122,1) 120%);
  box-shadow: 0 14px 30px rgba(195,0,209,.18);
}
.btn--primary:hover{ filter: brightness(1.02); box-shadow: 0 16px 36px rgba(195,0,209,.22); }

.btn--light{
  background: #eef2ff;
  color: #1e40af;
  border: 1px solid rgba(59,130,246,.18);
}
.btn--light:hover{ box-shadow: 0 10px 22px rgba(37,99,235,.10); }

.btn--ghost{
  background: transparent;
  color: var(--muted);
  border:1px solid var(--line);
}
.btn--ghost:hover{
  background: rgba(255,255,255,.55);
  color: var(--text);
}

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border:1px solid var(--line);
  background: #fff;
}
.badge--warn{ background:#fffbeb; border-color:#fde68a; color:#92400e; }
.badge--ok{ background:#ecfdf5; border-color:#bbf7d0; color:#166534; }
.badge--info{ background:#ecfeff; border-color:#a5f3fc; color:#155e75; }

/* Cards */
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 16px;
  position: relative;
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(600px 160px at 20% 0%, rgba(37,99,235,.08), transparent 60%),
    radial-gradient(520px 180px at 90% 10%, rgba(0,255,122,.05), transparent 60%);
  opacity:.95;
  pointer-events:none;
}
.card > *{ position:relative; }
.card__head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.card__title{ font-weight: 800; letter-spacing: -.01em; }
.card__value{ font-weight: 800; font-size: 28px; margin-top: 10px; }
.card__hint{ font-size: 12px; color: var(--muted); margin-top: 6px; }
.card__body{ color: var(--muted); margin-top: 10px; }

/* KPI icon */
.kpi-ico{
  width: 36px; height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.75);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.kpi-ico::after{
  content:"";
  width: 18px; height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37,99,235,.95), rgba(99,102,241,.95));
  opacity:.9;
}

/* Tables */
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
  border:1px solid var(--line);
}
.table th, .table td{
  padding: 12px 12px;
  text-align:left;
  font-size: 13px;
}
.table th{ color: var(--muted); font-weight: 800; background: rgba(246,247,251,.7); }
.table tr + tr td{ border-top:1px solid var(--line); }

/* Grids */
.grid{ display:grid; gap: 14px; }
.grid--kpi{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--two{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Auth */
.auth{ display:flex; align-items:center; justify-content:center; min-height:100vh; padding: 26px; }
.auth__card{
  width: min(480px, 100%);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: var(--shadow-2);
  padding: 26px;
}
.auth__subtitle{ color: var(--muted); text-align:center; margin: 10px 0 18px; }
.auth__links{ display:flex; justify-content:center; align-items:center; gap:10px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.auth__links a:hover{ color: rgba(37,99,235,1); }
.footer{ margin-top: 18px; text-align:center; font-size: 12px; color: var(--muted); }
.footer__link:hover{ color: var(--text); }

/* Installer */
.install{ display:flex; align-items:center; justify-content:center; min-height:100vh; padding: 26px; }
.install__card{
  width: min(980px, 100%);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: var(--shadow-2);
  padding: 22px;
}
.install__subtitle{ text-align:center; color: var(--muted); margin: 10px 0 16px; }
.install__panel{
  border: 1px dashed rgba(15,23,42,.18);
  border-radius: var(--r-lg);
  padding: 14px;
  margin: 12px 0;
  background: rgba(255,255,255,.60);
}
.panel__title{ font-weight: 800; margin-bottom: 10px; letter-spacing:-.01em; }

/* App shell */
.app{ min-height:100vh; background: var(--bg); }

/* Brand component */
.et-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(12px) saturate(140%);
}
.et-mark{ width:40px; height:40px; position:relative; }
.et-bar{ position:absolute; bottom:0; width:8px; border-radius:6px; transform-origin: bottom; animation: etGrow .9s ease-out forwards; }
.et-bar.b1{ left:0;  height:16px; opacity:.70; background: rgba(59,130,246,.60); }
.et-bar.b2{ left:13px; height:26px; opacity:.85; background: rgba(99,102,241,.85); }
.et-bar.b3{ left:26px; height:38px; background: rgba(0,255,122,.90); }
.et-dot{
  position:absolute; top:-4px; right:8px;
  width:10px; height:10px; border-radius:999px;
  background: rgba(37,99,235,1);
  box-shadow: 0 0 14px rgba(37,99,235,.25);
  animation: etPulse 1.2s ease-in-out infinite;
}
@keyframes etGrow{ 0%{transform:scaleY(.25);opacity:.35} 100%{transform:scaleY(1);opacity:1} }
@keyframes etPulse{ 0%,100%{transform:scale(1)} 50%{transform:scale(1.12)} }
.et-text{ display:flex; flex-direction:column; line-height:1.05; }
.et-name{ font-size:18px; font-weight:800; letter-spacing:-.02em; text-transform:uppercase; color: var(--text); }
.et-name span{
  background: linear-gradient(135deg, rgba(37,99,235,1), rgba(99,102,241,1), rgba(0,255,122,1));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.et-sub{ margin-top:4px; font-size:10px; letter-spacing:.22em; text-transform:uppercase; color: var(--muted); }

/* Sidebar (blue clean) */
.sidebar{
  position: fixed; left:0; top:0; bottom:0;
  width: 312px;
  padding: 18px;
  border-right: 1px solid rgba(15,23,42,.10);
  background:
    radial-gradient(900px 650px at 20% 10%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(700px 500px at 70% 85%, rgba(99,102,241,.08), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.80) 0%, rgba(255,255,255,.68) 100%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 12px 0 40px rgba(15,23,42,.06);
}
.sidebar::after{
  content:"";
  position:absolute;
  top:18px; bottom:18px; right:-1px;
  width:2px;
  background: linear-gradient(180deg, rgba(59,130,246,.0), rgba(59,130,246,.28), rgba(99,102,241,.22), rgba(0,255,122,.22), rgba(59,130,246,0));
  border-radius: 99px;
  opacity: .9;
  pointer-events:none;
}

.sidebar__top{
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.60);
}

.sidebar__nav{
  margin-top: 12px;
  padding: 10px 8px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.58);
}

.nav__section{
  margin-top: 14px;
  padding: 0 8px;
  font-family: var(--font-menu);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(102,112,133,.90);
}

.nav__item{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  transition: background .12s ease, border-color .12s ease;
}

.nav__item:hover{
  background: rgba(59,130,246,.10);
  border-color: rgba(59,130,246,.16);
}

.nav__item.is-active{
  background: linear-gradient(180deg, rgba(59,130,246,.16), rgba(59,130,246,.10));
  border-color: rgba(59,130,246,.22);
  box-shadow: 0 10px 26px rgba(37,99,235,.12);
}

.nav__icon{
  width: 22px;
  height: 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: rgba(15,23,42,.70);
}
.nav__icon svg{
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .92;
}
.nav__item:hover .nav__icon{ color: rgba(37,99,235,1); }
.nav__item.is-active .nav__icon{ color: rgba(37,99,235,1); }

.nav__label{
  font-family: var(--font-menu);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
}

.sidebar__bottom{
  margin-top:auto;
  padding: 10px 8px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.58);
}
.sidebar__userName{ font-weight: 800; }
.sidebar__userEmail{ font-size: 12px; color: var(--muted); }

/* Main */
.main{ margin-left: 312px; min-height:100vh; display:flex; flex-direction:column; }

/* Topbar */
.topbar{
  position: sticky; top:0; z-index:10;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(246,247,251,.75);
  backdrop-filter: blur(12px) saturate(140%);
  display:flex; align-items:center; justify-content:space-between; gap: 14px;
}
.topbar__left{ display:flex; flex-direction:column; gap:4px; }
.topbar__title{ font-weight: 800; font-size: 18px; letter-spacing:-.01em; }
.topbar__hint{ font-size: 12px; color: var(--muted); }
.content{ padding: 22px; display:flex; flex-direction:column; gap: 16px; }

/* Responsive */
@media (max-width: 980px){
  .grid--kpi{ grid-template-columns: 1fr; }
  .grid--two{ grid-template-columns: 1fr; }
  .sidebar{ position: static; width:auto; }
  .main{ margin-left:0; }
}

/* =========================================================
   Onboarding Overlay — fix spacing, typography, layout
   ========================================================= */

.onboarding{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, .35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

/* quando abrir */
.onboarding[aria-hidden="false"]{
  display: flex;
}

/* Card */
.onboarding__card{
  width: min(560px, 100%);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(15,23,42,.18);
  padding: 16px;
}

/* Título + botões */
.onboarding__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.onboarding__title{
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -.01em;
}

/* Lista */
.onboarding__steps{
  margin: 12px 0 0;
  padding-left: 18px;
  color: rgba(102,112,133,.95);
  line-height: 1.65;
  font-size: 13px;
}

/* mata o "1. 1." que fica feio */
.onboarding__steps li{
  margin: 6px 0;
}
.onboarding__steps li b{
  font-weight: 800;
  margin-right: 6px;
}

/* Rodapé */
.onboarding__foot{
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.08);
}

/* Botões menores dentro do onboarding */
.onboarding .btn{
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}

/* =========================================================
   Sidebar spacing fix (quando overlay aberto, não "cola")
   ========================================================= */
@media (min-width: 981px){
  /* força o card a ficar centralizado MESMO com sidebar fixa */
  .onboarding__card{
    transform: translateX(0);
  }
}

/* garante que o overlay sempre fica acima */
.sidebar{ z-index: 50; }
.onboarding{ z-index: 9999; }