:root{
  --bg0:#05060a;
  --bg1:#0a0c12;
  --card: rgba(255,255,255,.07);
  --card2: rgba(255,255,255,.05);
  --stroke: rgba(255,255,255,.12);
  --text:#e9eefc;
  --muted: rgba(233,238,252,.72);
  --muted2: rgba(233,238,252,.55);
  --amber:#f59e0b;
  --amber2:#ffb23f;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --radius: 18px;
  --radius2: 26px;
  --max: 1180px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 18% 12%, rgba(245,158,11,.12), transparent 55%),
    radial-gradient(900px 700px at 88% 28%, rgba(255,180,63,.10), transparent 58%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

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

.shell{
  width:min(var(--max), calc(100% - 28px));
  margin:0 auto;
}

.topbar{
  position:sticky;
  top:0;
  z-index:30;
  backdrop-filter: blur(10px);
  background: rgba(14,16,25,.55);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 220px;
}
.brand-badge{
  width:38px;
  height:38px;
  border-radius: 12px;
  background: radial-gradient(24px 24px at 35% 35%, rgba(255,255,255,.35), rgba(255,255,255,0)),
              linear-gradient(135deg, rgba(245,158,11,.95), rgba(255,180,63,.85));
  box-shadow: 0 10px 30px rgba(245,158,11,.22);
  display:grid;
  place-items:center;
  color:#1a1204;
  font-weight:800;
}
.brand-title{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.brand-title b{ font-size:15px; letter-spacing:.2px; }
.brand-title span{ font-size:12px; color:var(--muted); }

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

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  font-weight:650;
  font-size:13px;
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.btn:active{ transform: translateY(0); }

.btn-primary{
  background: linear-gradient(135deg, var(--amber), var(--amber2));
  border-color: rgba(255,255,255,.18);
  color:#241503;
  box-shadow: 0 12px 35px rgba(245,158,11,.25);
}
.btn-primary:hover{ background: linear-gradient(135deg, #f6a414, #ffbd56); }

.btn-ghost{
  background: rgba(255,255,255,.05);
}

.main{
  padding: 18px 0 44px;
}

.hero-card{
  position:relative;
  border-radius: var(--radius2);
  overflow:hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.hero-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transform: scale(1.02);
  filter: saturate(1.04) contrast(1.06);
}

.hero-overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 520px at 22% 35%, rgba(0,0,0,.82), rgba(0,0,0,.30) 60%, rgba(0,0,0,.55)),
    linear-gradient(180deg, rgba(0,0,0,.38), rgba(0,0,0,.72));
}

.hero-content{
  position:relative;
  z-index:2;
  padding: 22px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 12px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
  color: rgba(233,238,252,.9);
  font-size:12px;
  font-weight:650;
}

.h-title{
  margin: 12px 0 6px;
  font-size: clamp(30px, 6vw, 48px);
  letter-spacing: -.6px;
}
.h-title .accent{
  background: linear-gradient(135deg, var(--amber), var(--amber2));
  -webkit-background-clip: text;
  background-clip:text;
  color: transparent;
  font-weight:850;
}

.h-sub{
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.45;
  font-size: 13px;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-bottom: 12px;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom: 14px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color: rgba(233,238,252,.88);
  font-size: 12px;
  font-weight:650;
}

.hero-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mini-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.glass{
  background: rgba(15,18,30,.52);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 12px 12px;
  backdrop-filter: blur(10px);
}

.kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  color: rgba(233,238,252,.78);
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  padding: 5px 10px;
  border-radius: 999px;
  font-weight:700;
}

.card-title{
  margin: 8px 0 3px;
  font-weight:850;
  letter-spacing:-.2px;
}

.card-desc{
  margin:0;
  color: var(--muted);
  font-size:12.5px;
  line-height:1.35;
}

.voicebar{
  margin-top: 10px;
  display:flex;
  gap:5px;
  align-items:flex-end;
  height: 16px;
}
.voicebar span{
  width: 7px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(245,158,11,.95), rgba(255,180,63,.55));
}
.voicebar span:nth-child(1){ height: 6px; opacity:.55; }
.voicebar span:nth-child(2){ height: 10px; opacity:.7; }
.voicebar span:nth-child(3){ height: 14px; opacity:.95; }
.voicebar span:nth-child(4){ height: 9px; opacity:.75; }
.voicebar span:nth-child(5){ height: 12px; opacity:.9; }

.footer{
  padding: 14px 0 30px;
  text-align:center;
  color: rgba(233,238,252,.45);
  font-size: 12px;
}

/* ---------- AUTH (login / register) ---------- */
.page-auth .main{
  min-height: calc(100vh - 74px);
  display:grid;
  place-items:center;
}

.auth-wrap{
  width:min(520px, 100%);
}

.auth-card{
  background: rgba(15,18,30,.55);
  border:1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.auth-head{
  margin-bottom: 12px;
}
.auth-head h2{
  margin:0;
  font-size: 18px;
  letter-spacing: -.2px;
}
.auth-head p{
  margin:6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.form-row{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin: 10px 0;
}

label{
  font-size: 12px;
  color: rgba(233,238,252,.78);
  font-weight: 700;
}

input{
  width:100%;
  padding: 11px 12px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline:none;
}
input:focus{
  border-color: rgba(245,158,11,.55);
  box-shadow: 0 0 0 3px rgba(245,158,11,.18);
}

.form-actions{
  margin-top: 12px;
  display:flex;
  gap:10px;
  align-items:center;
}

.hint-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(233,238,252,.65);
}
.hint-row a{ color: rgba(233,238,252,.85); }

.alert{
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(233,238,252,.9);
  font-size: 12.5px;
}

@media (min-width: 860px){
  .hero-content{ padding: 28px; }
  .hero-grid{
    grid-template-columns: 1fr;
  }
  .mini-grid{
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- APP SHELL (panel autenticado) ---------- */
.app-body {
  --app-bg: #080b12;
  --app-surface: #111722;
  --app-surface-2: #171e2b;
  --app-line: rgba(255,255,255,.09);
  --app-accent: #f6ad2f;
  min-height: 100%;
  background: radial-gradient(900px 500px at 78% -10%, rgba(246,173,47,.11), transparent 60%), var(--app-bg);
  color: #f4f7fb;
}
.app-body a:hover { text-decoration: none; }
.app-shell { display:grid; grid-template-columns:248px minmax(0,1fr); min-height:100vh; }
.sidebar { position:sticky; top:0; height:100vh; padding:24px 18px; background:#0c1018; border-right:1px solid var(--app-line); }
.sidebar .brand { min-width:0; padding:0 8px 22px; border-bottom:1px solid var(--app-line); }
.brand-icon { display:grid; place-items:center; width:42px; height:42px; flex:0 0 42px; border-radius:13px; background:linear-gradient(145deg,#ffc454,#e58a12); box-shadow:0 10px 24px rgba(245,158,11,.2); }
.brand-name { font-size:18px; font-weight:850; }
.brand-sub { margin-top:2px; color:#aab4c4; font-size:12px; }
.nav { display:flex; flex-direction:column; gap:5px; margin-top:22px; }
.nav-item { display:flex; align-items:center; gap:11px; min-height:44px; padding:10px 12px; border:1px solid transparent; border-radius:11px; color:#aab4c4; font-size:13px; font-weight:650; transition:.18s ease; }
.nav-item:hover { color:#fff; background:rgba(255,255,255,.045); }
.nav-item.nav-active { color:#fff; background:rgba(246,173,47,.1); border-color:rgba(246,173,47,.2); }
.nav-icon { display:grid; place-items:center; width:20px; color:var(--app-accent); font-size:17px; }
.nav-item .badge { margin-left:auto; padding:3px 7px; border-radius:999px; background:rgba(255,255,255,.07); color:#8994a5; font-size:9px; text-transform:uppercase; }
.nav-logout { margin-top:14px; border-top-color:var(--app-line); border-radius:0 0 11px 11px; }
.app-shell > .main { min-width:0; padding:0; }
.app-shell .topbar { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:74px; padding:14px clamp(20px,4vw,48px); background:rgba(8,11,18,.84); border-bottom:1px solid var(--app-line); backdrop-filter:blur(14px); }
.topbar-left,.topbar-right { display:flex; align-items:center; gap:12px; }
.topbar-brand { display:none; font-size:18px; font-weight:850; }
.topbar-brand span { color:var(--app-accent); }
.store-pill { display:flex; align-items:center; gap:8px; color:#d9dfeb; font-size:13px; font-weight:700; }
.store-pill span { color:var(--app-accent); }
.app-shell .page { width:min(1320px,100%); margin:0 auto; padding:36px clamp(20px,4vw,48px) 56px; }
.dashboard-heading { display:flex; justify-content:space-between; margin-bottom:24px; }
.dashboard-heading h1,.page-head h1,.page-header h1 { margin:3px 0 7px; font-size:clamp(25px,3vw,34px); letter-spacing:-.7px; }
.dashboard-heading p { max-width:680px; margin:0; color:#aab4c4; font-size:14px; line-height:1.55; }
.dashboard-heading .eyebrow { color:var(--app-accent); font-size:11px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
.app-body .grid { display:grid; gap:16px; }
.app-body .grid.kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
.app-body .grid.two { grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr); margin-top:20px; }
.app-body .card { margin-bottom:20px; padding:20px; border:1px solid var(--app-line); border-radius:16px; background:linear-gradient(145deg,rgba(23,30,43,.96),rgba(15,20,30,.96)); box-shadow:0 16px 40px rgba(0,0,0,.2); }
.app-body .grid .card { margin-bottom:0; }
.kpi { min-height:152px; }
.kpi-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.kpi-label { color:#b7c0ce; font-size:13px; font-weight:700; }
.kpi-ico,.quick-ico { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:rgba(246,173,47,.1); }
.kpi-value { margin-top:19px; font-size:29px; font-weight:850; letter-spacing:-.6px; }
.kpi-note,.card-sub,.quick-desc,.muted,.tl-sub { color:#a5afbf; font-size:13px; }
.kpi-note { margin-top:6px; }
.card-head { margin-bottom:15px; }
.card-title { margin:0; font-size:15px; font-weight:800; }
.card-sub { margin-top:4px; }
.quick { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.quick-item { display:flex; align-items:center; gap:12px; min-width:0; padding:14px; border:1px solid var(--app-line); border-radius:13px; background:rgba(255,255,255,.025); transition:.18s ease; }
.quick-item:hover { transform:translateY(-1px); border-color:rgba(246,173,47,.28); background:rgba(246,173,47,.045); }
.quick-txt { min-width:0; }
.quick-name { font-size:13px; font-weight:780; }
.quick-desc { margin-top:3px; line-height:1.35; }
.quick-go,.quick-tag { margin-left:auto; color:var(--app-accent); }
.quick-tag { padding:4px 7px; border-radius:999px; background:rgba(255,255,255,.06); color:#8994a5; font-size:9px; text-transform:uppercase; }
.voice-bubble { padding:17px 18px; border:1px solid rgba(246,173,47,.17); border-radius:13px; background:rgba(246,173,47,.055); }
.voice-title { margin-bottom:9px; font-size:14px; font-weight:800; }
.voice-list { margin:0; padding-left:20px; color:#b9c2d0; font-size:13px; line-height:1.8; }
.voice-status { display:flex; align-items:center; gap:9px; margin-top:16px; color:#c4ccd8; font-size:13px; }
.voice-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:17px; }
.voice-actions .btn-primary,.voice-actions .btn-ghost { width:100%; min-height:48px; padding:12px 16px; }
.pulse { width:8px; height:8px; border-radius:50%; background:var(--app-accent); box-shadow:0 0 0 5px rgba(246,173,47,.1); }
.activity { margin-top:20px; padding-top:16px; padding-bottom:16px; }
.activity .card-head { margin-bottom:10px; }
.activity-empty { display:flex; align-items:center; gap:10px; min-height:34px; color:#a5afbf; font-size:13px; }
.timeline { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.tl-item { display:flex; gap:11px; padding:13px; border-radius:12px; background:rgba(255,255,255,.025); }
.tl-dot { width:8px; height:8px; flex:0 0 8px; margin-top:5px; border-radius:50%; background:var(--app-accent); }
.tl-title { font-size:13px; font-weight:750; }
.tl-sub { margin-top:4px; line-height:1.45; }
.app-body .page-head,.app-body .page-header,.app-body .hrow { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.app-body .page-head h1,.app-body .page-header h1 { margin-top:0; }
.app-body .table-wrap { max-width:100%; overflow-x:auto; }
.app-body .table { width:100%; border-collapse:collapse; }
.app-body .table th,.app-body .table td { padding:13px 12px; border-bottom:1px solid var(--app-line); text-align:left; font-size:13px; }
.app-body .table th { color:#8f9bad; font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
.app-body .row,.app-body .actions,.app-body .td-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.app-body select { padding:10px 12px; border:1px solid var(--app-line); border-radius:10px; background:#111722; color:#fff; }

@media (max-width:1050px) {
  .app-body .grid.kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .app-body .grid.two { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .app-shell { display:block; padding-bottom:72px; }
  .sidebar { position:fixed; z-index:50; top:auto; right:0; bottom:0; left:0; width:auto; height:72px; padding:8px; border-top:1px solid var(--app-line); border-right:0; background:rgba(10,14,21,.96); overflow-x:auto; }
  .sidebar .brand { display:none; }
  .nav { flex-direction:row; gap:4px; width:max-content; min-width:100%; margin:0; }
  .nav-item { flex-direction:column; justify-content:center; gap:2px; min-width:66px; height:55px; padding:5px 7px; font-size:9px; }
  .nav-icon { font-size:16px; }
  .nav-item .badge { display:none; }
  .nav-logout { margin:0; border-top-color:transparent; border-radius:11px; }
  .app-shell .topbar { min-height:64px; padding:11px 16px; }
  .topbar-brand { display:block; }
  .store-pill { font-size:11px; }
  .topbar-right .btn-ghost { display:none; }
  .topbar-right .btn { padding:8px 10px; }
  .app-shell .page { padding:24px 16px 36px; }
  .quick,.timeline { grid-template-columns:1fr; }
  .voice-actions { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .app-body .grid.kpis { grid-template-columns:1fr 1fr; gap:10px; }
  .app-body .card { padding:16px; }
  .kpi { min-height:137px; }
  .kpi-value { font-size:25px; }
  .dashboard-heading h1 { font-size:25px; }
  .dashboard-heading p { font-size:13px; }
  .store-pill { display:none; }
  .topbar-right .btn-primary { font-size:12px; }
  .voice-bubble { padding:15px; }
  .voice-actions .btn-primary,.voice-actions .btn-ghost { min-height:50px; }
  .app-body .page-head,.app-body .page-header,.app-body .hrow { align-items:flex-start; flex-direction:column; }
}
