:root{
  /* --bg:#070A1A; */
  /* --bg: #242424; */
  --bg: #2F3136;
  --bg-radial-1: rgba(109,106,253,.10);
  --bg-radial-2: rgba(77,214,255,.06);

  --surface:#0E1638;
  --surface-2:#0B122E;

  --text:#EAF0FF;
  --muted:#A9B6E6;

  --primary:#6D6AFD;
  --success:#37C97A;
  --danger:#FF4D6D;
  --warning:#FFC857;

  --border:rgba(255,255,255,.10);
  --shadow:0 16px 40px rgba(0,0,0,.45);
  --radius:18px;
}

html, body{ height:100%; }

body{
  background:
    radial-gradient(900px 500px at 20% 10%, var(--bg-radial-1), transparent 60%),
    radial-gradient(700px 450px at 85% 15%, var(--bg-radial-2), transparent 55%),
    var(--bg);
  color: var(--text);
}

a{ color: rgba(109,106,253,.95); }
a:hover{ color: rgba(109,106,253,1); }

/* Buttons (dark): make primary more solid and readable */
body.is-candidato .btn.btn-primary,
body.is-admin .btn.btn-primary{
  background-color: rgba(109,106,253,1) !important; /* use previous hover as default */
  border-color: rgba(109,106,253,1) !important;
  color: rgba(255,255,255,1) !important;
}
body.is-candidato .btn.btn-primary:hover,
body.is-admin .btn.btn-primary:hover{
  background-color: rgba(109,106,253,.92) !important;
  border-color: rgba(109,106,253,.92) !important;
  color: rgba(255,255,255,1) !important;
}

/* Simulado player (dark): ensure the Start button text is white */
body.is-candidato .simulado-root [data-action="start"].btn,
body.is-candidato .simulado-root [data-action="start"].btn-primary{
  color: #ffffff !important;
}
body.is-candidato .btn.btn-primary:focus,
body.is-admin .btn.btn-primary:focus{
  box-shadow: 0 0 0 .2rem rgba(109,106,253,.25) !important;
}

/* Simulados page: differentiate Start buttons by source */
body.is-candidato .btn-start-school{
  background-color: rgba(109,106,253,1) !important;
  border-color: rgba(109,106,253,1) !important;
  color: #fff !important;
}
body.is-candidato .btn-start-school:hover{
  background-color: rgba(109,106,253,.92) !important;
  border-color: rgba(109,106,253,.92) !important;
}
body.is-candidato .btn-start-category{
  background-color: rgba(20,184,166,1) !important;
  border-color: rgba(20,184,166,1) !important;
  color: #fff !important;
}
body.is-candidato .btn-start-category:hover{
  background-color: rgba(20,184,166,.90) !important;
  border-color: rgba(20,184,166,.90) !important;
}

.text-muted{ color: var(--muted)!important; }

h1,h2,h3,.h1,.h2,.h3{ font-weight:800; letter-spacing:-.02em; color: var(--text); }

/* AdminLTE page titles */
body.is-admin .content-header h1,
body.is-admin .content-header .h1,
body.is-admin .content-header h2,
body.is-admin .content-header .h2,
body.is-admin .content-wrapper h1,
body.is-admin .content-wrapper .h1,
body.is-admin .content-wrapper h2,
body.is-admin .content-wrapper .h2,
body.is-candidato .content-header h1,
body.is-candidato .content-wrapper h1{
  color: var(--text)!important;
}
body.is-admin .content-header .breadcrumb,
body.is-admin .content-header .breadcrumb a{
  color: rgba(234,240,255,.72)!important;
}

/* Dashboard subtitle */
body.is-admin .dashboard-subtitle,
body.role-professor .dashboard-subtitle{
  color: rgba(234,240,255,.78)!important;
}

/* Surfaces */
.card,
.modal-content,
.dropdown-menu{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
}

/* Explanation / specialist comment cards (simulado player) */
body.is-candidato .explanation-card{
  background: linear-gradient(180deg, rgba(109,106,253,.16), rgba(255,255,255,.05));
  border: 1px solid rgba(109,106,253,.35);
  border-left-width: 4px;
  border-radius: 14px;
  padding: 1rem 1.05rem;
  color: var(--text);
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
}
body.is-candidato .explanation-card strong{
  color: rgba(234,240,255,1);
  letter-spacing: -.01em;
}
/* Texto do comentário: leve tom "sky" para diferenciar do restante */
body.is-candidato .explanation-card [data-explanation-text]{
  color: #CFE6FF !important;
}
body.is-candidato .explanation-card .text-muted{
  color: rgba(234,240,255,.78) !important;
}
body.is-candidato .explanation-card a{ color: rgba(225,232,255,1); }
body.is-candidato .explanation-card a:hover{ color: rgba(255,255,255,1); }

/* Simulado: opções de questão (aparência tipo lista, com letra em bloco e destaque) */
body.is-candidato .simulado-root .question-option{
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  padding-left: .75rem !important;
  padding-right: .75rem !important;
  color: rgba(234,240,255,.90) !important;
}

/* simulado-player.css define padding com !important em admin/school; sobrescreve aqui */
body.is-candidato .simulado-root.simulado-admin .question-option,
body.is-candidato .simulado-root.simulado-school .question-option{
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

/* app.css adiciona espaçamento entre opções via .question-option + .question-option */
body.is-candidato .simulado-root .question-option + .question-option{
  margin-top: 0 !important;
}
body.is-candidato .simulado-root .question-option:hover{
  background: rgba(109,106,253,.08) !important;
}
body.is-candidato .simulado-root [data-question-options] .question-option:last-child{
  border-bottom: 0 !important;
}

body.is-candidato .simulado-root .question-option-letter{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(234,240,255,.86) !important;
  font-weight: 800;
  flex: 0 0 auto;
}

/* Letra destacada quando marcada/respondida (dark) */
body.is-candidato .simulado-root .question-option.selected .question-option-letter,
body.is-candidato .simulado-root .question-option.correct .question-option-letter,
body.is-candidato .simulado-root .question-option.wrong .question-option-letter,
body.is-candidato .simulado-root .question-option.question-option--answered .question-option-letter{
  background: #3b82f6 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

/* Deselect strong box look when selected: full-row highlight + accent bar */
body.is-candidato .simulado-root .question-option.selected{
  background: rgba(109,106,253,.14) !important;
  border-left: 4px solid rgba(109,106,253,1) !important;
}
body.is-candidato .simulado-root .question-option.correct{
  background: rgba(55,201,122,.12) !important;
  border-left: 4px solid rgba(55,201,122,1) !important;
}
body.is-candidato .simulado-root .question-option.wrong{
  background: rgba(255,77,109,.12) !important;
  border-left: 4px solid rgba(255,77,109,1) !important;
}

/* Simulado summary (Resultado) */
body.is-candidato .simulado-root [data-screen="summary"] .summary-card-item{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  box-shadow: none;
  color: rgba(234,240,255,.92);
}
body.is-candidato .simulado-root [data-screen="summary"] .summary-card-item .label{
  display: block;
  color: rgba(169,182,230,.90);
  font-weight: 600;
  margin-bottom: .15rem;
}
body.is-candidato .simulado-root [data-screen="summary"] .summary-card-item strong{
  color: rgba(234,240,255,.98);
  letter-spacing: -.01em;
}

/* Badge "Resultado" (Bootstrap subtle utilities ficam claras no dark) */
body.is-candidato .simulado-root [data-screen="summary"] .badge.bg-primary-subtle{
  background: rgba(109,106,253,.18) !important;
  border: 1px solid rgba(109,106,253,.30) !important;
}
body.is-candidato .simulado-root [data-screen="summary"] .badge.text-primary-emphasis{
  color: rgba(234,240,255,.92) !important;
}

/* Summary table */
body.is-candidato .simulado-root [data-screen="summary"] .summary-table{
  color: rgba(234,240,255,.90) !important;
}
body.is-candidato .simulado-root [data-screen="summary"] .summary-table thead th{
  background: rgba(255,255,255,.03) !important;
  color: rgba(169,182,230,.90) !important;
  border-bottom-color: rgba(255,255,255,.10) !important;
}
body.is-candidato .simulado-root [data-screen="summary"] .summary-table td,
body.is-candidato .simulado-root [data-screen="summary"] .summary-table th{
  border-top-color: rgba(255,255,255,.08) !important;
}

/* Summary status badges */
body.is-candidato .simulado-root [data-screen="summary"] .badge.bg-secondary-subtle.text-secondary{
  background: rgba(169,182,230,.12) !important;
  border: 1px solid rgba(169,182,230,.22);
  color: rgba(234,240,255,.82) !important;
}
body.is-candidato .simulado-root [data-screen="summary"] .badge.bg-success-subtle.text-success{
  background: rgba(55,201,122,.14) !important;
  border: 1px solid rgba(55,201,122,.28);
  color: rgba(214,255,234,.92) !important;
}
body.is-candidato .simulado-root [data-screen="summary"] .badge.bg-danger-subtle.text-danger{
  background: rgba(255,77,109,.14) !important;
  border: 1px solid rgba(255,77,109,.30);
  color: rgba(255,214,224,.92) !important;
}

/* Buttons */
.btn{ border-radius:999px; font-weight:700; }

/* Default buttons in restricted area (admin + candidato) */
body.is-admin .btn,
body.is-candidato .btn{
  border-radius: 12px;
}

.btn-primary{
  background: var(--primary);
  border-color: var(--primary);
  color: #0b1024;
}
.btn-primary:hover{ filter: brightness(1.05); }

.btn-success{
  background: var(--success);
  border-color: var(--success);
  color: #07140E;
}

/* Outline buttons: keep contrast in dark */
body.is-admin .btn-outline-secondary,
body.is-candidato .btn-outline-secondary{
  background: rgba(255,255,255,.03) !important;
  border-color: rgba(255,255,255,.16) !important;
  color: rgba(234,240,255,.92) !important;
}
body.is-admin .btn-outline-secondary:hover,
body.is-candidato .btn-outline-secondary:hover{
  background: rgba(255,255,255,.07) !important;
  border-color: rgba(109,106,253,.35) !important;
  color: rgba(234,240,255,.96) !important;
}

/* Ensure we beat simulado-player.css (.simulado-root .btn-sim.btn-outline-*) */
body.is-candidato .simulado-root .btn-sim.btn-outline-secondary,
body.is-candidato .simulado-root .btn-sim-sm.btn-outline-secondary{
  background: rgba(255,255,255,.03) !important;
  border-color: rgba(255,255,255,.16) !important;
  color: rgba(234,240,255,.92) !important;
}
body.is-candidato .simulado-root .btn-sim.btn-outline-secondary:hover,
body.is-candidato .simulado-root .btn-sim-sm.btn-outline-secondary:hover{
  background: rgba(255,255,255,.07) !important;
  border-color: rgba(109,106,253,.35) !important;
  color: rgba(234,240,255,.96) !important;
}

body.is-admin .btn-outline-primary,
body.is-candidato .btn-outline-primary{
  background: rgba(109,106,253,.06) !important;
  border-color: rgba(109,106,253,.78) !important;
  color: rgba(234,240,255,.96) !important;
}
body.is-admin .btn-outline-primary:hover,
body.is-candidato .btn-outline-primary:hover{
  background: rgba(109,106,253,.22) !important;
  border-color: rgba(109,106,253,.95) !important;
  color: rgba(234,240,255,1) !important;
}

body.theme-dark.is-candidato .simulado-root .btn-sim.btn-outline-primary,
body.theme-dark.is-candidato .simulado-root .btn-sim-sm.btn-outline-primary{
  background: rgba(109,106,253,.06) !important;
  border-color: rgba(109,106,253,.78) !important;
  color: rgba(234,240,255,.96) !important;
}
body.theme-dark.is-candidato .simulado-root .btn-sim.btn-outline-primary:hover,
body.theme-dark.is-candidato .simulado-root .btn-sim-sm.btn-outline-primary:hover{
  background: rgba(109,106,253,.22) !important;
  border-color: rgba(109,106,253,.95) !important;
  color: rgba(234,240,255,1) !important;
}

/* Simulado nav (Anterior/Próxima): um pouco mais vivos que outros outline */
body.is-candidato .simulado-root [data-action="prev"].btn-outline-primary,
body.is-candidato .simulado-root [data-action="next"].btn-outline-primary{
  background: rgba(109,106,253,.10) !important;
  border-color: rgba(109,106,253,.88) !important;
}
body.is-candidato .simulado-root [data-action="prev"].btn-outline-primary:hover,
body.is-candidato .simulado-root [data-action="next"].btn-outline-primary:hover{
  background: rgba(109,106,253,.28) !important;
  border-color: rgba(109,106,253,1) !important;
}

body.is-admin .btn-outline-warning,
body.is-candidato .btn-outline-warning{
  background: rgba(255,200,87,.14) !important;
  border-color: rgba(255,200,87,.62) !important;
  color: rgba(255,243,214,1) !important;
}
body.is-admin .btn-outline-warning:hover,
body.is-candidato .btn-outline-warning:hover{
  background: rgba(255,200,87,.26) !important;
  border-color: rgba(255,200,87,.82) !important;
  color: rgba(255,251,235,1) !important;
}

/* Forms */
.form-control,
.form-select,
.form-check-input{
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 14px;
}
.form-control::placeholder{ color: rgba(233,241,255,.45); }
.form-control:focus,
.form-select:focus,
.form-check-input:focus{
  border-color: rgba(109,106,253,.75);
  box-shadow: 0 0 0 .25rem rgba(109,106,253,.18);
}

/* Disabled/readonly fields (prevent white background in restricted area) */
.form-control:disabled,
.form-control[readonly],
.form-select:disabled,
.form-select[readonly]{
  background: rgba(255,255,255,.02) !important;
  color: rgba(234,240,255,.70) !important;
  border-color: rgba(255,255,255,.08) !important;
  opacity: 1; /* bootstrap dims disabled; keep readable */
}
.form-check-input:disabled{
  background-color: rgba(255,255,255,.02) !important;
  border-color: rgba(255,255,255,.10) !important;
}

/* Dark restricted areas: normalize field geometry like light mode */
body.is-admin .form-control,
body.is-admin .custom-select,
body.is-admin .form-select,
body.is-candidato .form-control,
body.is-candidato .custom-select,
body.is-candidato .form-select{
  border-radius: 8px !important;
  min-height: calc(1.5em + .75rem + 2px);
  line-height: 1.5;
  padding: .375rem .75rem;
}

body.is-admin textarea.form-control,
body.is-candidato textarea.form-control{
  min-height: 96px;
  height: auto;
}

body.is-admin .form-control-sm,
body.is-admin .custom-select-sm,
body.is-candidato .form-control-sm,
body.is-candidato .custom-select-sm{
  border-radius: 6px !important;
  min-height: calc(1.5em + .5rem + 2px);
  padding: .25rem .5rem;
}

body.is-admin .input-group-text,
body.is-candidato .input-group-text{
  border-radius: 8px !important;
}

body.is-admin .select2-container--default .select2-selection--single,
body.is-candidato .select2-container--default .select2-selection--single{
  border-radius: 8px !important;
  min-height: calc(1.5em + .75rem + 2px) !important;
  border-color: var(--border) !important;
  background: rgba(255,255,255,.03) !important;
}

body.is-admin .select2-container--default .select2-selection--single .select2-selection__rendered,
body.is-candidato .select2-container--default .select2-selection--single .select2-selection__rendered{
  line-height: calc(1.5em + .75rem) !important;
  padding-left: .75rem !important;
  color: var(--text) !important;
}

body.is-admin .select2-container--default .select2-selection--single .select2-selection__arrow,
body.is-candidato .select2-container--default .select2-selection--single .select2-selection__arrow{
  height: calc(1.5em + .75rem + 2px) !important;
}

/* Tables (Bootstrap + AdminLTE/DataTables) */
.table{ color: var(--text); }
.table thead th{
  border-bottom-color: var(--border);
  color: var(--muted);
  background: rgba(255,255,255,.03);
}
.table td, .table th{ border-top-color: var(--border); }
.table-hover tbody tr:hover{ color: var(--text); background: rgba(255,255,255,.03); }

/* DataTables (AdminLTE 3 uses BS4 skin) */
body.is-admin table.dataTable thead th,
body.is-admin table.dataTable thead td{
  background: rgba(255,255,255,.03)!important;
  color: var(--muted)!important;
  border-bottom: 1px solid var(--border)!important;
}

/* Candidate area tables */
body.is-candidato .table thead th,
body.is-candidato .table thead td{
  background: rgba(255,255,255,.03)!important;
  color: rgba(234,240,255,.78)!important;
  border-bottom: 1px solid var(--border)!important;
}
body.is-candidato .table td,
body.is-candidato .table th{
  border-top-color: var(--border)!important;
}

/* Increase contrast inside candidate DataTables */
body.is-candidato table.dataTable,
body.is-candidato table.dataTable td,
body.is-candidato table.dataTable th{
  color: rgba(234,240,255,.92)!important;
}
body.is-candidato table.dataTable tbody td{
  color: rgba(234,240,255,.88)!important;
}
body.is-candidato table.dataTable tbody tr{
  background: transparent!important;
}
body.is-candidato table.dataTable tbody tr:hover{
  background: rgba(255,255,255,.035)!important;
}
body.is-candidato table.dataTable thead th{
  color: rgba(234,240,255,.78)!important;
}

/* DataTables pagination buttons (candidate) */
body.is-candidato .dataTables_wrapper .dataTables_paginate .paginate_button{
  color: rgba(234,240,255,.85)!important;
  border: 1px solid var(--border)!important;
  background: rgba(255,255,255,.02)!important;
  border-radius: 10px;
  margin: 0 .15rem;
}
body.is-candidato .dataTables_wrapper .dataTables_paginate .paginate_button:hover{
  background: rgba(255,255,255,.06)!important;
  border-color: rgba(109,106,253,.35)!important;
  color: var(--text)!important;
}
body.is-candidato .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.is-candidato .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{
  background: rgba(109,106,253,.35)!important;
  border-color: rgba(109,106,253,.55)!important;
  color: var(--text)!important;
}
body.is-candidato .dataTables_wrapper .dataTables_paginate .paginate_button.disabled{
  color: rgba(234,240,255,.35)!important;
  background: rgba(255,255,255,.01)!important;
  border-color: rgba(255,255,255,.06)!important;
}

/* Bootstrap pagination (used in some restricted pages) */
body.is-candidato .pagination .page-link,
body.is-admin .pagination .page-link{
  background: rgba(255,255,255,.02) !important;
  border: 1px solid var(--border) !important;
  color: rgba(234,240,255,.85) !important;
}
body.is-candidato .pagination .page-link:hover,
body.is-admin .pagination .page-link:hover{
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(109,106,253,.35) !important;
  color: var(--text) !important;
}
body.is-candidato .pagination .page-item.active .page-link,
body.is-admin .pagination .page-item.active .page-link{
  background: rgba(109,106,253,.35) !important;
  border-color: rgba(109,106,253,.55) !important;
  color: var(--text) !important;
}
body.is-candidato .pagination .page-item.disabled .page-link,
body.is-admin .pagination .page-item.disabled .page-link{
  color: rgba(234,240,255,.35) !important;
  background: rgba(255,255,255,.01) !important;
  border-color: rgba(255,255,255,.06) !important;
}

/* Ensure history tables don't force light pagination colors */
body.is-candidato .history-table-wrap .pagination .page-link,
body.is-admin .history-table-wrap .pagination .page-link{
  background: rgba(255,255,255,.02) !important;
  border-color: var(--border) !important;
  color: rgba(234,240,255,.85) !important;
}
body.is-candidato .history-table-wrap .pagination .page-item.active .page-link,
body.is-admin .history-table-wrap .pagination .page-item.active .page-link{
  background: rgba(109,106,253,.35) !important;
  border-color: rgba(109,106,253,.55) !important;
  color: var(--text) !important;
}

body.is-admin .dataTables_wrapper .dataTables_filter input,
body.is-admin .dataTables_wrapper .dataTables_length select{
  background: rgba(255,255,255,.03)!important;
  border: 1px solid var(--border)!important;
  color: var(--text)!important;
}
body.is-admin .dataTables_wrapper .dataTables_info,
body.is-admin .dataTables_wrapper .dataTables_paginate{
  color: rgba(234,240,255,.70)!important;
}

body.is-candidato .dataTables_wrapper .dataTables_filter input,
body.is-candidato .dataTables_wrapper .dataTables_length select{
  background: rgba(255,255,255,.03)!important;
  border: 1px solid var(--border)!important;
  color: var(--text)!important;
}
body.is-candidato .dataTables_wrapper .dataTables_info,
body.is-candidato .dataTables_wrapper .dataTables_paginate{
  color: rgba(234,240,255,.70)!important;
}
body.is-admin .page-link{
  background: rgba(255,255,255,.02);
  border-color: var(--border);
  color: var(--text);
}
body.is-admin .page-item.active .page-link{
  background: rgba(109,106,253,.35);
  border-color: rgba(109,106,253,.55);
  color: var(--text);
}
body.is-admin .page-item.disabled .page-link{
  background: rgba(255,255,255,.01);
  border-color: rgba(255,255,255,.06);
  color: rgba(234,240,255,.35);
}

/* Badges / labels (used for Matérias and question counters) */
body.is-admin .badge,
body.is-admin .label,
body.is-admin .tag{
  border-radius: 999px;
  padding: .35em .65em;
  font-weight: 700;
  letter-spacing: .01em;
}
body.is-admin .badge-light,
body.is-admin .bg-light{
  background: rgba(255,255,255,.06)!important;
  border: 1px solid var(--border)!important;
  color: var(--text)!important;
}
body.is-admin .badge-secondary,
body.is-admin .bg-secondary{
  background: rgba(109,106,253,.18)!important;
  border: 1px solid rgba(109,106,253,.35)!important;
  color: var(--text)!important;
}
body.is-admin .badge-pill{ border-radius: 999px; }
body.is-admin .badge-primary,
body.is-admin .bg-primary{
  background: rgba(109,106,253,.30)!important;
  border: 1px solid rgba(109,106,253,.55)!important;
  color: var(--text)!important;
}

/* Buttons that show as white chips (e.g., "Questao 1") */
body.is-admin .btn-light,
body.is-admin .btn-outline-light{
  background: rgba(255,255,255,.06)!important;
  border: 1px solid var(--border)!important;
  color: var(--text)!important;
}
body.is-admin .btn-light:hover,
body.is-admin .btn-outline-light:hover{
  background: rgba(255,255,255,.10)!important;
  color: var(--text)!important;
}

/* Alerts (keep bootstrap semantics, but dark) */
.alert{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
}

/* AdminLTE 3: global dark defaults (admin + candidato) */
body.is-admin .content-wrapper,
body.is-admin .content-header,
body.is-admin .content,
body.is-candidato .content-wrapper,
body.is-candidato .content-header,
body.is-candidato .content{
  background: transparent!important;
}

body.is-admin .content-wrapper,
body.is-admin .content-wrapper .content,
body.is-admin .content-wrapper .content-header,
body.is-admin .content-wrapper p,
body.is-admin .content-wrapper label,
body.is-admin .content-wrapper .info-box-text,
body.is-admin .content-wrapper .info-box-number,
body.is-candidato .content-wrapper,
body.is-candidato .content-wrapper .content,
body.is-candidato .content-wrapper .content-header,
body.is-candidato .content-wrapper p,
body.is-candidato .content-wrapper label,
body.is-candidato .content-wrapper .info-box-text,
body.is-candidato .content-wrapper .info-box-number{
  color: var(--text);
}

/* Navbar + footer */
body.is-admin .main-header.navbar,
body.is-admin .main-footer,
body.is-candidato .main-header.navbar,
body.is-candidato .main-footer{
  background: #0E4C6A!important;
  border-color: var(--border)!important;
  color: var(--text)!important;
}

/* Restricted header topbar (dark theme) */
body.is-candidato.theme-dark .restricted-topbar{
  background: rgba(14, 76, 106, .55);
  border-bottom-color: rgba(255,255,255,.10);
}
body.is-candidato.theme-dark .restricted-topbar,
body.is-candidato.theme-dark .restricted-topbar-link{
  color: rgba(234,240,255,.86);
}
body.is-candidato.theme-dark .restricted-topbar-link:hover{
  color: rgba(234,240,255,1);
}

/* Footer simple model: keep same background as navbar */
body.is-admin .main-footer.app-links-footer.footer-model-simple,
body.is-candidato .main-footer.app-links-footer.footer-model-simple{
  background: #0E4C6A!important;
  border-top: 1px solid rgba(255,255,255,.12) !important;
}
body.is-admin .main-footer.app-links-footer.footer-model-simple a,
body.is-candidato .main-footer.app-links-footer.footer-model-simple a{
  color: rgba(255,255,255,.78) !important;
}
body.is-admin .main-footer.app-links-footer.footer-model-simple a:hover,
body.is-candidato .main-footer.app-links-footer.footer-model-simple a:hover{
  color: rgba(255,255,255,.95) !important;
}
body.is-admin .main-footer.app-links-footer.footer-model-simple .footer-simple-center a,
body.is-candidato .main-footer.app-links-footer.footer-model-simple .footer-simple-center a{
  color: rgba(92, 192, 255, .95) !important;
}
body.is-admin .main-footer.app-links-footer.footer-model-simple .footer-simple-center a:hover,
body.is-candidato .main-footer.app-links-footer.footer-model-simple .footer-simple-center a:hover{
  color: rgba(160, 223, 255, 1) !important;
}
body.is-admin .main-footer.app-links-footer.footer-model-simple .footer-social-icon,
body.is-candidato .main-footer.app-links-footer.footer-model-simple .footer-social-icon{
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.95) !important;
}
body.is-admin .main-footer.app-links-footer.footer-model-simple .footer-social-icon:hover,
body.is-candidato .main-footer.app-links-footer.footer-model-simple .footer-social-icon:hover{
  background: rgba(255,255,255,.16);
  color: rgba(255,255,255,1) !important;
}
body.is-admin .main-header .nav-link,
body.is-admin .main-footer a,
body.is-candidato .main-header .nav-link,
body.is-candidato .main-footer a{ color: rgba(234,240,255,.92)!important; }
body.is-admin .main-header .nav-link:hover,
body.is-admin .main-footer a:hover,
body.is-candidato .main-header .nav-link:hover,
body.is-candidato .main-footer a:hover{ color: rgba(234,240,255,1)!important; }

/* Top-nav layout (no sidebar) */
body.layout-top-nav .content-wrapper{ margin-left: 0!important; }
body.layout-top-nav .main-sidebar{ display:none!important; }
body.layout-top-nav .content-wrapper > .container{ max-width: 1320px; }
body.layout-top-nav .main-header.navbar{ box-shadow: 0 10px 30px rgba(0,0,0,.35); }
body.layout-top-nav .main-header.navbar > .container,
body.layout-top-nav .main-header.navbar > .container-fluid{
  max-width: 1320px;
}
body.layout-top-nav .navbar-brand{ font-weight: 800; letter-spacing: -.02em; color: var(--text)!important; }
body.layout-top-nav .navbar-nav .nav-link{
  padding: .55rem .85rem;
  font-weight: 600;
  border-radius: 999px;
  color: rgba(234,240,255,.92)!important;
}
body.layout-top-nav .navbar-nav .nav-link:hover{
  background: rgba(255,255,255,.05);
}
body.layout-top-nav .navbar-nav .nav-item.active > .nav-link{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

/* Topmenu aligned like front home menu */
body.layout-top-nav .topmenu-home{
  width: 100%;
  justify-content: center;
  gap: .75rem;
}
body.layout-top-nav .topmenu-home .nav-link{
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
}

/* Subtle highlight for external "Site" link in candidate top menu */
body.layout-top-nav .topmenu-home .nav-link-site{
  color: rgba(255,255,255,.70) !important;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
body.layout-top-nav .topmenu-home .nav-link-site:hover{
  color: rgba(255,255,255,.90) !important;
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}

/* Dropdown toggle caret spacing similar to front */
body.layout-top-nav .navbar-nav .dropdown-toggle::after{
  margin-left: .35rem;
}
body.layout-top-nav .navbar-nav .dropdown-menu{
  min-width: 12rem;
  background: rgba(8,12,30,.96) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px;
}
body.layout-top-nav .navbar-nav .dropdown-item{ color: rgba(234,240,255,.9)!important; }
body.layout-top-nav .navbar-nav .dropdown-item:hover{ background: rgba(255,255,255,.05)!important; color: var(--text)!important; }

/* Sidebar - only for /admin (candidato usually uses it too, but if someday it doesn't, we won't force it) */
body.is-admin .main-sidebar,
body.is-admin .main-sidebar .sidebar{
  background:#071225!important;
}
body.is-admin .brand-link{
  border-bottom: 1px solid var(--border)!important;
}
body.is-admin .brand-link,
body.is-admin .brand-link .brand-text{
  color: var(--text)!important;
}

body.is-admin .sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link,
body.is-admin .sidebar-dark-primary .nav-sidebar .nav-link p,
body.is-admin .sidebar-dark-primary .nav-sidebar .nav-link i{
  color: rgba(234,240,255,.90)!important;
}
body.is-admin .sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link:hover{
  background: rgba(255,255,255,.04)!important;
  color: var(--text)!important;
}
body.is-admin .sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active{
  background: rgba(109,106,253,.22)!important;
  color: var(--text)!important;
}

/* Breadcrumb contrast */
body.is-admin .breadcrumb,
body.is-admin .breadcrumb-item,
body.is-admin .breadcrumb-item a,
body.is-candidato .breadcrumb,
body.is-candidato .breadcrumb-item,
body.is-candidato .breadcrumb-item a{
  color: rgba(234,240,255,.72)!important;
}

/* Boxes/cards tone */
body.is-admin .small-box,
body.is-admin .info-box,
body.is-candidato .info-box,
body.is-candidato .small-box{
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Candidate dashboard boxes: reduce height and keep dark */
body.is-candidato .small-box{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02))!important;
  color: var(--text)!important;
}
body.is-candidato .small-box .inner{ padding: .8rem 1rem .6rem!important; }
body.is-candidato .small-box .inner h3{ font-size: 1.6rem!important; margin: 0!important; }
body.is-candidato .small-box .inner p{ margin: .2rem 0 0!important; color: rgba(169,182,230,.9)!important; }
body.is-candidato .small-box .small-box-footer{ padding: .45rem 1rem!important; background: rgba(255,255,255,.02)!important; }

/* Candidate dashboard: background icon positioning (AdminLTE-like) */
body.is-candidato .small-box{ position: relative; overflow: hidden; }
body.is-candidato .small-box .icon{
  position: absolute;
  top: -8px;
  right: 12px;
  left: auto;
  opacity: .16;
  pointer-events: none;
}
body.is-candidato .small-box .icon > i.fa,
body.is-candidato .small-box .icon > i.fab,
body.is-candidato .small-box .icon > i.fad,
body.is-candidato .small-box .icon > i.fal,
body.is-candidato .small-box .icon > i.far,
body.is-candidato .small-box .icon > i.fas,
body.is-candidato .small-box .icon > i.ion{
  font-size: 60px!important;
  line-height: 1;
}
body.is-candidato .small-box .inner{ position: relative; z-index: 1; }
body.is-candidato .small-box .small-box-footer{ position: relative; z-index: 1; }

/* School dashboard (role-professor) - make AdminLTE small-boxes dark and readable */
body.role-professor .small-box{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02))!important;
  border: 1px solid var(--border)!important;
  border-radius: var(--radius)!important;
  color: var(--text)!important;
  box-shadow: var(--shadow);
  min-height: 104px;
}
body.role-professor .small-box .inner{ padding: .85rem 1rem .7rem!important; }
body.role-professor .small-box .inner h3{ color: var(--text)!important; font-size: 1.6rem!important; margin: 0!important; }
body.role-professor .small-box .inner p{ color: rgba(169,182,230,.9)!important; margin: .2rem 0 0!important; }
body.role-professor .small-box .icon{ color: rgba(234,240,255,.14)!important; opacity: 1!important; top: 8px!important; right: 10px!important; }
body.role-professor .small-box .small-box-footer{
  color: rgba(234,240,255,.92)!important;
  background: rgba(255,255,255,.02)!important;
  border-top: 1px solid rgba(255,255,255,.08)!important;
  padding: .45rem 1rem!important;
}

/* Accent borders based on original bg-* classes */
body.role-professor .small-box.bg-info{ border-color: rgba(77,214,255,.30)!important; background: linear-gradient(180deg, rgba(77,214,255,.10), rgba(255,255,255,.02))!important; }
body.role-professor .small-box.bg-success{ border-color: rgba(55,201,122,.30)!important; background: linear-gradient(180deg, rgba(55,201,122,.10), rgba(255,255,255,.02))!important; }
body.role-professor .small-box.bg-warning{ border-color: rgba(255,200,87,.32)!important; background: linear-gradient(180deg, rgba(255,200,87,.10), rgba(255,255,255,.02))!important; }
body.role-professor .small-box.bg-danger{ border-color: rgba(255,77,109,.32)!important; background: linear-gradient(180deg, rgba(255,77,109,.10), rgba(255,255,255,.02))!important; }

/* Make default AdminLTE cards dark */
body.is-admin .card,
body.is-candidato .card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02))!important;
  border: 1px solid var(--border)!important;
  border-radius: var(--radius)!important;
  box-shadow: var(--shadow);
  color: var(--text)!important;
}
body.is-admin .card-header,
body.is-candidato .card-header{
  background: rgba(255,255,255,.03)!important;
  border-bottom: 1px solid var(--border)!important;
  color: var(--text)!important;
}
body.is-admin .card-body,
body.is-admin .card-footer,
body.is-candidato .card-body,
body.is-candidato .card-footer{
  color: var(--text)!important;
  background: transparent!important;
}

/* Common AdminLTE components that often stay "light" */
body.is-admin .nav-tabs .nav-link,
body.is-admin .nav-pills .nav-link,
body.is-candidato .nav-tabs .nav-link,
body.is-candidato .nav-pills .nav-link{
  color: rgba(234,240,255,.78)!important;
}
body.is-admin .nav-tabs .nav-link.active,
body.is-admin .nav-pills .nav-link.active,
body.is-candidato .nav-tabs .nav-link.active,
body.is-candidato .nav-pills .nav-link.active{
  background: rgba(109,106,253,.18)!important;
  border-color: var(--border)!important;
  color: var(--text)!important;
}
body.is-admin .list-group-item,
body.is-candidato .list-group-item{
  background: rgba(255,255,255,.02)!important;
  border-color: var(--border)!important;
  color: var(--text)!important;
}
/* Ensure correct-answer highlight stays readable in dark */
body.is-admin .list-group-item-success,
body.is-candidato .list-group-item-success{
  background: rgba(55,201,122,.18)!important;
  border-color: rgba(55,201,122,.35)!important;
  color: var(--text)!important;
}
body.is-admin .callout,
body.is-candidato .callout{
  background: rgba(255,255,255,.03)!important;
  border-color: var(--border)!important;
  color: var(--text)!important;
}

/* Simulados (Área do Aluno): improve contrast for school vs category cards */
body.is-candidato .simulado-card{
  border: 1px solid rgba(255,255,255,.14) !important; /* slightly stronger than default */
}
body.is-candidato .simulado-card--school{
  border-color: rgba(109,106,253,.38) !important;
}
body.is-candidato .simulado-card--category{
  border-color: rgba(22,163,74,.32) !important;
}
body.is-candidato .simulado-card:hover{
  border-color: rgba(255,255,255,.20) !important;
}

/* Simulados (Área do Aluno): stat cards (Total/Finalizados/Ativos/Taxa média)
   The page defines these cards inline with white background; force dark-safe contrast here.
*/
body.is-candidato .sim-stat-card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)) !important;
  border-color: rgba(255,255,255,.16) !important;
  color: rgba(234,240,255,.96) !important;
}
body.is-candidato .sim-stat-card .n{
  color: rgba(234,240,255,1) !important;
}
body.is-candidato .sim-stat-card small,
body.is-candidato .sim-stat-card .text-muted{
  color: rgba(201,214,255,.90) !important;
}

/* Make the origin chips readable in dark */
body.is-candidato .simulado-origin-badge{
  color: rgba(234,240,255,1) !important;
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.16) !important;
}
body.is-candidato .simulado-origin-badge--school{
  background: rgba(109,106,253,.18) !important;
  border-color: rgba(109,106,253,.38) !important;
  color: rgba(234,240,255,1) !important;
}
body.is-candidato .simulado-origin-badge--category{
  background: rgba(20,184,166,.16) !important;
  border-color: rgba(20,184,166,.34) !important;
  color: rgba(234,240,255,1) !important;
}

/* Stronger accent rail in dark (helps scanning) */
body.is-candidato .simulado-card--school::before{
  background: linear-gradient(180deg, rgba(109,106,253,1), rgba(109,106,253,.35)) !important;
}
body.is-candidato .simulado-card--category::before{
  background: linear-gradient(180deg, rgba(20,184,166,1), rgba(20,184,166,.30)) !important;
}

/* Restricted areas: softer elevation for boxes and tables */
body.is-admin .card,
body.is-admin .small-box,
body.is-admin .info-box,
body.is-admin .table-responsive,
body.is-admin div.dataTables_wrapper,
body.is-candidato .card,
body.is-candidato .small-box,
body.is-candidato .info-box,
body.is-candidato .table-responsive,
body.is-candidato div.dataTables_wrapper{
  box-shadow: 0 4px 10px rgba(0,0,0,.16) !important;
}

body.is-admin .table-responsive,
body.is-candidato .table-responsive{
  box-shadow: 0 0 0 0 transparent !important;
}

/* DataTables wrapper: no border/elevation in any profile */
body div.dataTables_wrapper{
  box-shadow: none !important;
  border: 0 !important;
}

body.is-admin .table,
body.is-candidato .table{
  box-shadow: 0 0 0 0 transparent !important;
}

/* Histórico: remove elevação da tabela/wrapper no tema escuro */
body.is-candidato .history-table-wrap,
body.is-candidato .history-table-wrap.table-responsive,
body.is-candidato .history-table-wrap .dataTables_wrapper,
body.is-admin .history-table-wrap,
body.is-admin .history-table-wrap.table-responsive,
body.is-admin .history-table-wrap .dataTables_wrapper{
  box-shadow: none !important;
}
