/* ── Brand Kit MRTI: mesma paleta do hub sistema.grupomrti.com.br ── */
:root {
  --sidebar-w: 252px;
  --bg:        #0a110b;
  --bg-2:      #0e1610;
  --bg-3:      #162018;
  --ink:       #f4ecd8;
  --ink-dim:   #a89977;
  --gold:      #f5cf4a;
  --gold-2:    #d4af37;
  --gold-3:    #9c7a25;
  --line:      rgba(245, 207, 74, .18);
  --line-s:    rgba(245, 207, 74, .40);
}

body {
  background: #f0f4f1;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: .9rem;
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
#sidebar {
  width: var(--sidebar-w) !important;
  background: var(--bg) !important;
  border-right: 1px solid var(--line);
  padding: 0 !important;
}

.sidebar-logo {
  padding: 1.2rem 1rem 1rem;
  border-bottom: 1px solid var(--line);
}
.sidebar-logo img {
  width: 132px;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 10px rgba(245, 207, 74, .08));
}
.sidebar-tagline {
  text-align: center;
  padding: .6rem .8rem 0;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink);
  line-height: 1.4;
}
.sidebar-tagline .dim { color: var(--ink-dim); font-weight: 400; }
.sidebar-subtag {
  text-align: center;
  font-size: 9px;
  letter-spacing: .1em;
  color: rgba(244, 236, 216, .3);
  padding-bottom: .9rem;
}

#sidebar .empresa-switcher { padding: .8rem 1rem 0; }
#sidebar .empresa-switcher .btn {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: .78rem;
}
#sidebar .empresa-switcher .btn:hover,
#sidebar .empresa-switcher .btn:focus {
  border-color: var(--line-s);
  color: var(--gold);
}

.nav-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold-3);
  padding: 1rem 1rem .3rem;
}

#sidebar nav.nav { padding: .3rem 0; }
#sidebar nav.nav .nav-link {
  display: flex; align-items: center; gap: .55rem;
  color: rgba(244, 236, 216, .55) !important;
  padding: .5rem 1rem !important;
  font-size: .82rem;
  font-weight: 400;
  border-radius: 0 !important;
  position: relative;
  transition: color .12s, background .12s;
}
#sidebar nav.nav .nav-link:hover {
  color: rgba(244, 236, 216, .85) !important;
  background: rgba(255, 255, 255, .03);
}
#sidebar nav.nav .nav-link.active {
  color: var(--gold) !important;
  font-weight: 500;
  background: rgba(245, 207, 74, .07) !important;
}
#sidebar nav.nav .nav-link.active::before {
  content: '';
  position: absolute; left: 0; top: 0;
  width: 2px; height: 100%;
  background: var(--gold);
}
#sidebar nav.nav .nav-link i { font-size: .9rem; opacity: .8; width: 1rem; text-align: center; }

#sidebar hr { border-color: var(--line) !important; opacity: 1; margin: .5rem 1rem; }

/* ── User box ── */
#sidebar .user-box {
  padding: .85rem 1rem;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: .65rem;
}
#sidebar .u-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-3), var(--gold-2));
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  color: var(--bg); flex-shrink: 0;
}
#sidebar .u-info { flex: 1; min-width: 0; }
#sidebar .u-name {
  font-size: .78rem; font-weight: 500;
  color: rgba(244, 236, 216, .7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#sidebar .u-role {
  font-size: 9px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-3);
}
#sidebar .u-logout {
  font-size: .95rem; color: rgba(244, 236, 216, .35) !important;
  padding: .3rem; border-radius: 3px; flex-shrink: 0;
  transition: color .15s, background .15s;
}
#sidebar .u-logout:hover { color: #f87171 !important; background: rgba(255, 60, 60, .08); }

/* ══════════════════════════════════════════
   MAIN / CARDS / TABLE / BADGES / BUTTONS
══════════════════════════════════════════ */
#main-content { background: #f0f4f1 !important; }

.card {
  border: none;
  border-radius: 6px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .07), 0 0 0 1px rgba(0, 0, 0, .04);
}
.card-header {
  background: #f7faf7;
  border-bottom: 1px solid #e5ece5;
  font-weight: 600; color: #2d4435;
  font-size: .84rem; letter-spacing: .01em;
}

.table th {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .18em;
  color: #5a7a62; background: #f4f8f4;
  border-bottom: 2px solid #ddeadd;
}
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fcf8; }

.badge-ativo, .badge.bg-success    { background: #dcfce7 !important; color: #166534 !important; }
.badge-inativo, .badge.bg-danger   { background: #fee2e2 !important; color: #991b1b !important; }
.badge-pendente, .badge.bg-warning { background: #fef3c7 !important; color: #92400e !important; }

.btn-primary {
  background: var(--gold-2); border-color: var(--gold-2);
  color: var(--bg); font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--gold); border-color: var(--gold);
  color: var(--bg);
}
.btn-primary:active {
  background: var(--gold-3) !important; border-color: var(--gold-3) !important;
  color: #fff !important;
}
.btn-outline-primary { border-color: var(--gold-2); color: var(--gold-3); }
.btn-outline-primary:hover {
  background: var(--gold-2); border-color: var(--gold-2);
  color: var(--bg);
}

.form-control:focus, .form-select:focus {
  border-color: rgba(212, 175, 55, .5);
  box-shadow: 0 0 0 .2rem rgba(212, 175, 55, .12);
}
.form-check-input:checked {
  background-color: var(--gold-2);
  border-color: var(--gold-2);
}

.alert { border-radius: 4px; font-size: .86rem; }
.alert-success { border-left: 3px solid #059669; background: #f0fdf4; color: #166534; border-top: none; border-right: none; border-bottom: none; }
.alert-danger  { border-left: 3px solid #dc2626; }
.alert-warning { border-left: 3px solid var(--gold-2); background: #fffbeb; color: #92400e; }
.alert-info    { border-left: 3px solid #0891b2; }

a { color: #7a6010; }
a:hover { color: var(--gold-2); }

.nav-link.active { font-weight: 600; }
.table-sm td, .table-sm th { vertical-align: middle; }
.text-end-num { text-align: right; font-variant-numeric: tabular-nums; }
