/* ============================================================
   ALLI SOLUTIONS — DESIGN SYSTEM v2.0
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand Scale */
  --alli-50:  #EFF7FF;
  --alli-100: #DBEEFF;
  --alli-200: #B8DEFF;
  --alli-300: #7EC3F5;
  --alli-400: #3EA4ED;
  --alli-500: #2476ae;
  --alli-600: #1f6596;
  --alli-700: #19527a;
  --alli-800: #174462;
  --alli-900: #123550;

  /* Sidebar */
  --sidebar-width:               240px;
  --sidebar-bg:                  #1E293B;
  --sidebar-border:              rgba(255,255,255,0.06);
  --sidebar-text:                #94A3B8;
  --sidebar-text-hover:          #CBD5E1;
  --sidebar-text-active:         #FFFFFF;
  --sidebar-icon:                #64748B;
  --sidebar-item-hover:          rgba(255,255,255,0.05);
  --sidebar-item-active-bg:      rgba(36,118,174,0.18);
  --sidebar-item-active-border:  #2476ae;
  --sidebar-section-color:       #475569;

  /* Topbar */
  --topbar-height: 60px;

  /* Layout */
  --content-bg: #F1F5F9;

  /* Cards */
  --card-radius:       10px;
  --card-shadow:       0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06);

  /* Status — Light */
  --status-active-bg:   #D1FAE5;
  --status-active-text: #065F46;
  --status-active-dot:  #10B981;
  --status-pending-bg:  #FEF3C7;
  --status-pending-text:#92400E;
  --status-pending-dot: #F59E0B;
  --status-blocked-bg:  #FEE2E2;
  --status-blocked-text:#991B1B;
  --status-blocked-dot: #EF4444;
  --status-paid-bg:     #F1F5F9;
  --status-paid-text:   #475569;
  --status-paid-dot:    #94A3B8;

  /* Misc */
  --input-radius: 7px;
}

[data-bs-theme="dark"] {
  --content-bg:    #0F172A;
  --sidebar-bg:    #0D1929;

  --status-active-bg:   rgba(16,185,129,0.12);
  --status-active-text: #6EE7B7;
  --status-pending-bg:  rgba(245,158,11,0.12);
  --status-pending-text:#FCD34D;
  --status-blocked-bg:  rgba(239,68,68,0.12);
  --status-blocked-text:#FCA5A5;
  --status-paid-bg:     rgba(100,116,139,0.12);
  --status-paid-text:   #94A3B8;
}

/* ============================================================
   2. BASE & TYPOGRAPHY
   ============================================================ */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Body autenticado com sidebar */
body.alli-body {
  background-color: var(--content-bg);
  padding-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100vh;
}

/* ============================================================
   3. SIDEBAR
   ============================================================ */
.alli-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
  transition: transform 0.25s ease;
}

.alli-sidebar::-webkit-scrollbar      { width: 3px; }
.alli-sidebar::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 7px;
  background: rgba(255,255,255,0.08);
  padding: 4px;
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.sidebar-company {
  color: var(--sidebar-text-active);
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-username {
  color: var(--sidebar-text);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Nav */
.sidebar-nav {
  padding: 10px 0;
  flex: 1;
}

.sidebar-section {
  padding: 14px 16px 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sidebar-section-color);
  user-select: none;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 1px 8px;
  border-radius: 7px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.845rem;
  font-weight: 450;
  transition: background 0.12s ease, color 0.12s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: calc(100% - 16px);
  line-height: 1.4;
}

.sidebar-item:hover {
  background: var(--sidebar-item-hover);
  color: var(--sidebar-text-hover);
  text-decoration: none;
}

.sidebar-item.active {
  background: var(--sidebar-item-active-bg);
  color: var(--sidebar-text-active);
  font-weight: 500;
  position: relative;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 56%;
  background: var(--sidebar-item-active-border);
  border-radius: 0 3px 3px 0;
}

.sidebar-icon {
  width: 16px;
  text-align: center;
  color: var(--sidebar-icon);
  font-size: 0.875rem;
  flex-shrink: 0;
  transition: color 0.12s ease;
}

.sidebar-item:hover  .sidebar-icon,
.sidebar-item.active .sidebar-icon {
  color: var(--alli-400);
}

/* Footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

/* Overlay mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1035;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ============================================================
   4. TOPBAR
   ============================================================ */
.alli-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background-color: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1030;
  gap: 12px;
}

.topbar-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.topbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--bs-body-color);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  font-size: 0.875rem;
}
.topbar-btn:hover { background: var(--bs-tertiary-bg); }

#bd-theme,
#selectCustomerMobileBtn {
  background: var(--alli-500);
  color: #ffffff;
  border-color: var(--alli-600);
  width: 40px;
}
#bd-theme::after,
#selectCustomerMobileBtn::after { display: none; }
#bd-theme:hover,
#selectCustomerMobileBtn:hover { background: var(--alli-600); }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 4px;
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--bs-body-color);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 500;
  transition: background 0.12s;
  white-space: nowrap;
}
.topbar-user:hover { background: var(--bs-tertiary-bg); }

.topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--bs-body-color);
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ============================================================
   5. PAGE CONTENT HELPERS
   ============================================================ */
.page-wrapper {
  padding: 28px 28px 40px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bs-border-color);
}

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bs-body-color);
  margin: 0;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
  margin-top: 3px;
  margin-bottom: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   6. KPI / STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--card-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-icon.blue  { background: var(--alli-50);  color: var(--alli-600); }
.stat-icon.amber { background: #FEF3C7; color: #D97706; }
.stat-icon.red   { background: #FEE2E2; color: #DC2626; }
.stat-icon.green { background: #D1FAE5; color: #059669; }
.stat-icon.slate { background: #F1F5F9; color: #64748B; }

[data-bs-theme="dark"] .stat-icon.blue  { background: rgba(36,118,174,0.15); color: var(--alli-300); }
[data-bs-theme="dark"] .stat-icon.amber { background: rgba(245,158,11,0.15); color: #FCD34D; }
[data-bs-theme="dark"] .stat-icon.green { background: rgba(16,185,129,0.15); color: #6EE7B7; }
[data-bs-theme="dark"] .stat-icon.red   { background: rgba(220,38,38,0.15);  color: #FCA5A5; }
[data-bs-theme="dark"] .stat-icon.slate { background: rgba(100,116,139,0.15); color: #94A3B8; }

.stat-content { flex: 1; min-width: 0; }

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--bs-body-color);
  letter-spacing: -0.025em;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  margin-top: 4px;
  font-weight: 500;
}

/* ============================================================
   7. CARDS
   ============================================================ */
.card {
  border-radius: var(--card-radius) !important;
  border-color: var(--bs-border-color) !important;
  box-shadow: var(--card-shadow);
}

.card-header {
  font-size: 0.875rem;
  font-weight: 600;
  border-bottom-color: var(--bs-border-color) !important;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.card-body { padding: 16px 18px; }

/* ============================================================
   FOOTER
   ============================================================ */
.alli-footer {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 100;
  padding: 14px 16px;
  background: var(--bs-body-bg);
  border-top: 1px solid var(--bs-border-color);
}

body.alli-body {
  padding-bottom: 48px;
}

/* ============================================================
   ACTION CARDS (operator_table)
   ============================================================ */
.alli-action-card {
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
  user-select: none;
}
.alli-action-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}
.alli-action-card:active {
  transform: translateY(0);
}
.alli-action-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   8. STATUS BADGES
   ============================================================ */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: default;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-status.ativo    { background: var(--status-active-bg);   color: var(--status-active-text);  }
.badge-status.ativo::before    { background: var(--status-active-dot);  }
.badge-status.pendente { background: var(--status-pending-bg);  color: var(--status-pending-text); }
.badge-status.pendente::before { background: var(--status-pending-dot); }
.badge-status.bloqueado{ background: var(--status-blocked-bg);  color: var(--status-blocked-text); }
.badge-status.bloqueado::before{ background: var(--status-blocked-dot); }
.badge-status.pago     { background: var(--status-paid-bg);     color: var(--status-paid-text);    }
.badge-status.pago::before     { background: var(--status-paid-dot);    }

/* ============================================================
   9. TABELAS
   ============================================================ */
.alli-table { font-size: 0.875rem; }

.alli-table thead th,
.alli-table tfoot th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
  border-bottom: 2px solid var(--bs-border-color) !important;
  border-top: none !important;
  padding: 10px 14px;
  white-space: nowrap;
  text-align: left;
}

.alli-table tbody td {
  padding: 11px 14px;
  vertical-align: middle;
  border-color: var(--bs-border-color) !important;
  color: var(--bs-body-color);
}

.alli-table tbody tr { transition: background 0.1s; }
.alli-table tbody tr:hover { background-color: var(--bs-tertiary-bg) !important; }

/* Remove bordas laterais pesadas */
.alli-table.table-bordered > :not(caption) > * > * {
  border-width: 0 0 1px 0 !important;
}
.alli-table.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: transparent;
}

/* Paginação DataTables */
.dataTables_paginate,
.dt-paging {
  padding-bottom: 10px;
}

@media (max-width: 991.98px) {
  .dt-paging .page-link,
  .dataTables_paginate .paginate_button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* ============================================================
   10. BOTÕES
   ============================================================ */
.btn {
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 7px;
  transition: all 0.13s ease;
}

.btn-sm { border-radius: 6px; font-size: 0.8rem; }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

/* Alli brand button */
.color-alli {
  --bs-btn-color:                #fff;
  --bs-btn-bg:                   var(--alli-500);
  --bs-btn-border-color:         var(--alli-500);
  --bs-btn-hover-color:          #fff;
  --bs-btn-hover-bg:             var(--alli-600);
  --bs-btn-hover-border-color:   var(--alli-600);
  --bs-btn-focus-shadow-rgb:     36, 118, 174;
  --bs-btn-active-color:         #fff;
  --bs-btn-active-bg:            var(--alli-700);
  --bs-btn-active-border-color:  var(--alli-700);
  --bs-btn-disabled-color:       #fff;
  --bs-btn-disabled-bg:          var(--alli-500);
  --bs-btn-disabled-border-color:var(--alli-500);
}

/* ============================================================
   11. FORMULÁRIOS
   ============================================================ */
.form-control,
.form-select {
  border-radius: var(--input-radius) !important;
  font-size: 0.875rem;
  border-color: var(--bs-border-color);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--alli-400);
  box-shadow: 0 0 0 3px rgba(36,118,174,0.12);
}

.form-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bs-body-color);
  margin-bottom: 5px;
}

.form-text { font-size: 0.775rem; }

.form-floating > .form-control:focus ~ label { color: var(--alli-600); }

/* Search com ícone */
.search-wrap { position: relative; }
.search-wrap .form-control { padding-left: 36px; }
.search-wrap .search-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Form sizes */
.form-cad    { max-width: 600px; padding: 1rem; }
.form-signin { max-width: 330px; padding: 1rem; }

.form-signin .form-floating:focus-within { z-index: 2; }
.form-signin input[type="email"]    { margin-bottom: -1px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; }
.form-signin input[type="password"] { margin-bottom: 10px; border-top-left-radius: 0; border-top-right-radius: 0; }

.form-control-dark { border-color: var(--bs-gray); }
.form-control-dark:focus { border-color: #fff; box-shadow: 0 0 0 .25rem rgba(255,255,255,.25); }

/* ============================================================
   12. MODAIS
   ============================================================ */
.modal-content {
  border-radius: 12px !important;
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
  padding: 15px 20px;
  border-bottom-color: var(--bs-border-color);
}

.modal-title { font-size: 0.975rem; font-weight: 600; }
.modal-body  { padding: 20px; }
.modal-footer{ padding: 13px 20px; border-top-color: var(--bs-border-color); }
.btn-close   { filter: unset; opacity: unset; }

.doc-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* Fix do Select2 dentro de modais — texto de busca visível + largura adequada */
.modal .select2-selection--multiple .select2-search--inline {
  float: none;
}
.modal .select2-selection--multiple .select2-search__field {
  color: #111 !important;
  min-width: 120px;
  padding-left: 4px !important;
  margin: 3px 0 !important;
  font-weight: 500;
  caret-color: #111;
}
[data-bs-theme="dark"] .modal .select2-selection__choice {
  background-color: #3a3f44;
  color: #fff;
}

/* ============================================================
   13. LOGIN PAGE
   ============================================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
}

/* Lado esquerdo — marca */
.login-brand {
  width: 42%;
  background: linear-gradient(145deg, var(--alli-700) 0%, var(--alli-500) 55%, #3EA4ED 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 350px; height: 350px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.login-brand::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 280px; height: 280px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.login-brand-logo {
  width: 200px;
  height: auto;
  object-fit: contain;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.login-brand-title {
  color: #fff;
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.login-brand-subtitle {
  color: rgba(255,255,255,0.68);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.65;
  position: relative;
  z-index: 1;
  max-width: 260px;
}

/* Lado direito — formulário */
.login-form-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background-color: var(--bs-body-bg);
}

.login-form-inner {
  width: 100%;
  max-width: 380px;
}

.login-form-logo {
  max-width: 270px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.login-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-body-color);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.login-form-subtitle {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

.login-form-inner .form-floating {
  margin-bottom: 12px;
}

.login-form-inner .form-floating .form-control {
  border-radius: 8px !important;
}

.btn-login {
  width: 100%;
  padding: 11px;
  font-size: 0.925rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 8px;
  margin-top: 4px;
}

.btn-forgot {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 0.83rem;
  color: var(--alli-500);
  text-decoration: none;
  transition: color 0.12s;
}
.btn-forgot:hover { color: var(--alli-700); text-decoration: underline; }

.login-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
}

/* Login alerts */
.errLogin {
  background-color: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 0.855rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.errLogin p, .okLogin p { margin: 0; }

.okLogin {
  background-color: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 0.855rem;
  font-weight: 500;
  margin-bottom: 16px;
}

/* ============================================================
   14. MISC
   ============================================================ */
.text-small { font-size: 85%; }
.requerido  { color: #EF4444; }

.photo-preview {
  width: 150px;
  height: 200px;
  border: 2px dashed var(--bs-border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
  background-color: var(--bs-tertiary-bg);
  cursor: pointer;
  transition: border-color 0.15s;
}
.photo-preview:hover       { border-color: var(--alli-500); }
.photo-preview img         { width: 100%; height: 100%; object-fit: cover; }
.photo-preview span        { color: var(--bs-secondary-color); font-size: 0.78rem; text-align: center; padding: 8px; }

/* iziToast */
.iziToast-title   { font-size: 0.93rem  !important; font-weight: 600 !important; }
.iziToast-message { font-size: 0.855rem !important; }

/* Bootstrap SVG icons */
.bi                              { vertical-align: -0.125em; fill: currentColor; }
.bi-mode .bi                     { width: 1em; height: 1em; }
.bi-mode .dropdown-menu .active .bi    { display: block !important; }
.bd-mode-toggle                  { z-index: 1500; }
.bd-mode-toggle .bi              { width: 1em; height: 1em; }
.bd-mode-toggle .dropdown-menu .active .bi { display: block !important; }

/* ============================================================
   15. RESPONSIVO
   ============================================================ */
@media (max-width: 991.98px) {
  body.alli-body {
    padding-left: 0;
  }

  .alli-sidebar {
    transform: translateX(-100%);
    z-index: 1045;
  }

  .alli-sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 0 0 60px rgba(0,0,0,0.4);
  }

  .alli-topbar {
    left: 0;
  }

  .alli-footer {
    left: 0;
  }

  /* Esconde o select de contratante e seu container Select2 no mobile */
  #selectCustomer,
  #selectCustomer + .select2-container {
    display: none !important;
  }

  .sidebar-toggle { display: flex; }

  .login-brand { display: none; }
  .login-form-area { padding: 32px 24px; }
}

@media (max-width: 575.98px) {
  .page-wrapper { padding: 20px 16px 32px; }
  .stat-value   { font-size: 1.4rem; }
  .page-title   { font-size: 1.1rem; }
}
