:root{
  --bg: #0b1220;
  --panel: #0f1b2d;
  --panel-2: #0c1627;
  --border: rgba(148,163,184,.18);
  --text: #e5e7eb;
  --muted: rgba(226,232,240,.72);

  --primary: #38bdf8;
  --primary-2: #0ea5e9;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;

  --radius: 16px;
  --shadow: 0 20px 50px rgba(0,0,0,.35);
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1100px 700px at 20% 0%, rgba(56,189,248,.12), transparent 60%),
              radial-gradient(900px 500px at 90% 20%, rgba(14,165,233,.10), transparent 50%),
              var(--bg);
  color: var(--text);
}

a{ color: inherit; }
.app-body{ overflow-x: hidden; }

/* Layout */
.app-shell{
  min-height: 100vh;
  display: flex;
}

.sidebar{
  width: 280px;
  background: linear-gradient(180deg, rgba(15,27,45,.98), rgba(12,22,39,.98));
  border-right: 1px solid var(--border);
  padding: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 10px 18px 10px;
}
.brand-badge{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(56,189,248,.18);
  border: 1px solid rgba(56,189,248,.25);
  box-shadow: 0 12px 30px rgba(56,189,248,.12);
}
.brand-title{
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.1;
}
.brand-sub{
  font-size: 12px;
  color: var(--muted);
}

.nav-pill{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  text-decoration:none;
  color: rgba(226,232,240,.90);
  border: 1px solid transparent;
}
.nav-pill:hover{
  background: rgba(148,163,184,.06);
  border-color: rgba(148,163,184,.12);
}
.nav-pill.active{
  background: rgba(56,189,248,.14);
  border-color: rgba(56,189,248,.22);
  color: #eaf7ff;
}

.main{
  flex: 1;
  display:flex;
  flex-direction: column;
  min-width: 0;
}

.topbar{
  height: 72px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(15,27,45,.75);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.content{
  padding: 18px 20px 28px;
}

/* Cards e componentes */
.cardx{
  background: linear-gradient(180deg, rgba(15,27,45,.98), rgba(12,22,39,.98));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cardx .cardx-h{
  padding: 18px 18px 0 18px;
}
.cardx .cardx-b{
  padding: 18px;
}

.kpi{
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(148,163,184,.05);
}
.kpi .kpi-label{ color: var(--muted); font-size: 12px; }
.kpi .kpi-value{ font-size: 28px; font-weight: 800; margin-top: 6px; }
.kpi .kpi-icon{
  width: 42px; height: 42px; border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(56,189,248,.16);
  border: 1px solid rgba(56,189,248,.22);
}

.form-control, .form-select{
  background: rgba(2,6,23,.35);
  border: 1px solid rgba(148,163,184,.22);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
}
.form-control:focus, .form-select:focus{
  background: rgba(2,6,23,.45);
  color: var(--text);
  border-color: rgba(56,189,248,.55);
  box-shadow: 0 0 0 .2rem rgba(56,189,248,.12);
}

.btnx{
  border-radius: 14px;
  padding: 11px 14px;
  font-weight: 700;
  border: 1px solid transparent;
}
.btnx-primary{
  background: linear-gradient(180deg, rgba(56,189,248,1), rgba(14,165,233,1));
  color: #05131d;
}
.btnx-primary:hover{ filter: brightness(.98); }
.btnx-ghost{
  background: rgba(148,163,184,.06);
  border-color: rgba(148,163,184,.18);
  color: var(--text);
}
.btnx-ghost:hover{ background: rgba(148,163,184,.10); }

.table{
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(148,163,184,.16);
}
.table thead th{
  color: rgba(226,232,240,.8);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid rgba(148,163,184,.18);
}
.table td{
  color: rgba(226,232,240,.92);
  vertical-align: middle;
}

.badge{
  border-radius: 999px;
  padding: 7px 10px;
}

/* Mobile: sidebar vira offcanvas */
@media (max-width: 991px){
  .sidebar{ display:none; }
  .content{ padding: 14px; }
}
