/* ============================================
   RI Theme — Rastreamento Inteligente
   Sobrescreve AdminLTE 3 / Bootstrap 4
   ============================================ */

:root {
  --ri-primary: #F8BC0E;
  --ri-primary-hover: #D9A200;
  --ri-primary-dark: #9F895E;

  --ri-text-primary: #3F3B37;
  --ri-text-secondary: #6B645D;

  --ri-bg: #FDF8EF;
  --ri-surface: #FFFFFF;
  --ri-surface-alt: #EAE1D4;

  --ri-border: #D8CDB8;

  --ri-success: #2E7D32;
  --ri-warning: #ED6C02;
  --ri-danger: #D32F2F;
}

/* ---------- Texto principal ---------- */
body,
h1, h2, h3, h4, h5, h6,
p, span, li, td, th,
.form-control,
.card-title {
    color: var(--ri-text-primary);
}

/* ---------- Texto secundário ---------- */
.text-muted,
small,
.text-secondary,
.help-block {
    color: var(--ri-text-secondary) !important;
}

/* ---------- Links ---------- */
a {
    color: var(--ri-primary-dark);
}

a:hover {
    color: var(--ri-primary);
}

/* ---------- Paginação ---------- */
.page-item .page-link {
    color: var(--ri-primary-dark);
}

.page-item.active .page-link {
    background-color: var(--ri-primary);
    border-color: var(--ri-primary);
}

/* ---------- Navbar ---------- */
.navbar-light.navbar-white {
    background-color: var(--ri-bg) !important;
}

.navbar-light .navbar-nav .nav-link.active {
    color: var(--ri-primary) !important;
}

/* ---------- Sidebar ---------- */
.sidebar-dark-primary {
    background-color: var(--ri-text-primary) !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--ri-primary) !important;
}

/* ---------- Cards Primary ---------- */
.card-primary.card-outline {
    border-top-color: var(--ri-primary);
}

.card-primary:not(.card-outline) > .card-header {
    background: var(--ri-primary);
}

/* ---------- Buttons Primary ---------- */
.btn-primary,
.bg-primary {
    background-color: var(--ri-primary) !important;
    border-color: var(--ri-primary) !important;
    color: #222 !important;
}

.btn-primary:hover {
    background-color: var(--ri-primary-hover) !important;
    border-color: var(--ri-primary-hover) !important;
}

/* ---------- Input focus ---------- */
.form-control:focus {
    border-color: var(--ri-primary);
    box-shadow: 0 0 0 0.2rem rgba(248, 188, 14, 0.25);
}

/* ---------- Cards / Borders ---------- */
.card,
.modal-content {
    border-color: var(--ri-border);
}

/* ---------- Login card background ---------- */
.login-box .card,
.login-card-body {
    background-color: var(--ri-bg);
}

/* ---------- Tables ---------- */
.table thead {
    background-color: var(--ri-surface-alt);
}

.table td a,
.table td button {
    color: var(--ri-primary-dark);
}

.table td a:hover,
.table td button:hover {
    color: var(--ri-primary);
}

/* ---------- Alerts ---------- */
.alert-success {
    background-color: #E8F5E9;
    color: var(--ri-success);
}

.alert-warning {
    background-color: #FFF3E0;
    color: var(--ri-warning);
}

.alert-danger {
    background-color: #FFEBEE;
    color: var(--ri-danger);
}

/* ---------- Badges ---------- */
.badge-success {
    background-color: var(--ri-success) !important;
}

.badge-warning {
    background-color: var(--ri-warning) !important;
    color: #fff !important;
}

.badge-danger {
    background-color: var(--ri-danger) !important;
}

/* ---------- Select2 highlight ---------- */
.select2-container--bootstrap4 .select2-results__option--highlighted {
    background-color: var(--ri-primary) !important;
}
