/* STUDY_GLOBAL_DESIGN_SYSTEM_ENTERPRISE_V1 */

:root{
  --study-bg:#081225;
  --study-bg-secondary:#0F172A;
  --study-card:#13203A;
  --study-card-hover:#1A2A4A;
  --study-border:#22304D;
  --study-primary:#6B1D2B;
  --study-primary-hover:#8F2D3F;
  --study-cta:#F59E0B;
  --study-cta-hover:#FACC15;
  --study-success:#22C55E;
  --study-warning:#F59E0B;
  --study-error:#EF4444;
  --study-info:#94A3B8;
  --study-text:#FFFFFF;
  --study-muted:#CBD5E1;
  --study-radius:12px;
  --study-font:Inter,Poppins,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  --study-gradient:linear-gradient(135deg,#081225 0%,#0F172A 50%,#13203A 100%);
}

html,
body{
  background:var(--study-gradient) !important;
  color:var(--study-text) !important;
  font-family:var(--study-font) !important;
}

body *{
  box-sizing:border-box;
}

/* Base textual */
h1{font-size:32px !important;font-weight:700 !important;color:var(--study-text) !important}
h2{font-size:24px !important;font-weight:700 !important;color:var(--study-text) !important}
h3{font-size:20px !important;font-weight:600 !important;color:var(--study-text) !important}
h4{font-size:18px !important;font-weight:600 !important;color:var(--study-text) !important}

p,
li,
td,
span,
small,
label,
.muted,
.description,
.subtitle{
  color:var(--study-muted) !important;
}

strong,
b{
  color:var(--study-text) !important;
}

/* Estruturas e superfícies */
main,
.main,
.content,
.container,
.wrap,
.app,
.layout{
  color:var(--study-text) !important;
}

/* Sidebar/Menu lateral */
aside,
.sidebar,
.side,
.menu,
nav.sidebar{
  background:var(--study-bg) !important;
  border-color:var(--study-border) !important;
}

aside a,
.sidebar a,
.side-nav a,
.nav a,
.menu a,
nav a{
  color:var(--study-muted) !important;
  border-radius:8px !important;
  transition:all .25s ease !important;
}

aside a:hover,
.sidebar a:hover,
.side-nav a:hover,
.nav a:hover,
.menu a:hover,
nav a:hover{
  background:rgba(107,29,43,.20) !important;
  color:var(--study-text) !important;
}

aside a.active,
.sidebar a.active,
.side-nav a.active,
.nav a.active,
.menu a.active,
nav a.active,
[aria-current="page"]{
  background:var(--study-primary) !important;
  color:var(--study-text) !important;
}

/* Cards, painéis, módulos */
.card,
.panel,
.box,
.module,
.group,
.section,
.stat,
.kpi,
.hero,
.hero-card,
.next-card,
.quick,
.guide,
article,
section.ds-card,
[data-card],
[class*="card"],
[class*="panel"]{
  background:var(--study-card) !important;
  border:1px solid var(--study-border) !important;
  border-radius:12px !important;
  color:var(--study-text) !important;
  box-shadow:0 8px 32px rgba(0,0,0,.25),0 0 0 1px rgba(255,255,255,.03) !important;
}

.card:hover,
.panel:hover,
.box:hover,
.module:hover,
.group:hover,
.section:hover,
article:hover,
[data-card]:hover{
  background:var(--study-card-hover) !important;
  border-color:var(--study-cta) !important;
  transform:translateY(-2px);
  transition:all .25s ease;
}

/* Botões */
button,
.btn,
.button,
.action,
a.btn,
a.button,
a.action,
input[type="button"],
input[type="submit"]{
  background:var(--study-primary) !important;
  color:var(--study-text) !important;
  border:1px solid transparent !important;
  border-radius:8px !important;
  font-weight:700 !important;
  transition:all .25s ease !important;
}

button:hover,
.btn:hover,
.button:hover,
.action:hover,
a.btn:hover,
a.button:hover,
a.action:hover,
input[type="button"]:hover,
input[type="submit"]:hover{
  background:var(--study-primary-hover) !important;
}

/* CTA: laranja só em destaque pontual */
.cta,
.btn-cta,
.button-cta,
[data-variant="cta"]{
  background:var(--study-cta) !important;
  color:var(--study-text) !important;
}

.cta:hover,
.btn-cta:hover,
.button-cta:hover,
[data-variant="cta"]:hover{
  background:var(--study-cta-hover) !important;
  color:var(--study-bg) !important;
}

/* Secundários */
.secondary,
.btn.secondary,
.button.secondary,
a.secondary{
  background:transparent !important;
  border:1px solid var(--study-border) !important;
  color:var(--study-muted) !important;
}

/* Remover laranja dominante inline/antigo */
[style*="background:#ff"],
[style*="background: #ff"],
[style*="background-color:#ff"],
[style*="background-color: #ff"],
[style*="orange"],
[style*="rgb(255, 128"],
[style*="rgb(255,128"],
[style*="#ff812f"],
[style*="#ff8b3d"]{
  background:var(--study-card) !important;
  color:var(--study-text) !important;
  border-color:var(--study-border) !important;
}

/* Badges/status */
.badge,
.tag,
.pill,
.status-badge,
[class*="badge"],
[class*="tag"],
[class*="pill"]{
  border-radius:999px !important;
  border:1px solid rgba(148,163,184,.20) !important;
  background:rgba(148,163,184,.15) !important;
  color:var(--study-info) !important;
}

.badge-success,
.success,
.ok,
.acerto,
.correct,
[data-status="success"],
[data-status="ok"]{
  background:rgba(34,197,94,.15) !important;
  color:var(--study-success) !important;
}

.badge-processing,
.processing,
.processando,
.pending,
.pendente,
[data-status="processing"],
[data-status="pending"]{
  background:rgba(245,158,11,.15) !important;
  color:var(--study-cta) !important;
}

.badge-error,
.error,
.erro,
.danger,
.incorrect,
[data-status="error"]{
  background:rgba(239,68,68,.15) !important;
  color:var(--study-error) !important;
}

/* Tabelas */
table{
  width:100%;
  border-collapse:collapse;
  color:var(--study-text) !important;
}

thead,
th{
  background:var(--study-card) !important;
  color:var(--study-text) !important;
}

td,
th{
  border-bottom:1px solid var(--study-border) !important;
  padding:12px !important;
}

tr:hover{
  background:rgba(245,158,11,.05) !important;
}

/* Formulários */
input,
select,
textarea{
  background:var(--study-bg-secondary) !important;
  border:1px solid var(--study-border) !important;
  color:var(--study-text) !important;
  border-radius:8px !important;
}

input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus{
  outline:none !important;
  border-color:var(--study-cta) !important;
  box-shadow:0 0 0 2px rgba(245,158,11,.25) !important;
}

/* Progress */
.progress,
.progress-bar,
[class*="progress"]{
  background:var(--study-border) !important;
  border-radius:999px !important;
  overflow:hidden !important;
}

.progress > div,
.progress-bar > div,
[class*="progress"] > div{
  background:linear-gradient(90deg,var(--study-cta),var(--study-cta-hover)) !important;
}

/* Listas de dados */
.data-row,
.list-row,
.item-row,
.row-card{
  background:var(--study-bg-secondary) !important;
  border:1px solid var(--study-border) !important;
  border-radius:12px !important;
  color:var(--study-text) !important;
}

/* Ícones */
svg,
.icon,
[class*="icon"]{
  color:var(--study-info) !important;
  stroke-width:1.5px;
}

.active svg,
.active .icon,
a.active svg{
  color:var(--study-cta) !important;
}

/* Responsivo */
@media(max-width:980px){
  .layout,
  .app{
    grid-template-columns:1fr !important;
  }

  aside,
  .sidebar{
    width:100% !important;
    border-right:0 !important;
    border-bottom:1px solid var(--study-border) !important;
  }

  nav,
  .nav,
  .side-nav,
  .grid,
  .cards,
  .modules{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:560px){
  nav,
  .nav,
  .side-nav,
  .grid,
  .cards,
  .modules,
  .status-grid{
    grid-template-columns:1fr !important;
  }

  h1{font-size:28px !important}
  h2{font-size:24px !important}
  h3{font-size:20px !important}

  main,
  .main,
  .content{
    padding:16px !important;
  }
}
