/* ============================================================
   DealAccess — Bootstrap 5 Overrides & Custom Styles
   ============================================================ */

/* ── Bootstrap primary brand ──────────────────────────────── */
:root {
  --bs-primary:      #2563eb;
  --bs-primary-rgb:  37,99,235;
  --bs-body-bg:      #f1f5f9;
  --bs-body-font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --lpr-sb-bg:       #0f172a;
  --lpr-sb-w:        260px;
}

body:not(.auth-body) { background: var(--bs-body-bg); }

/* ============================================================
   SIDEBAR — fixed on lg+, offcanvas on mobile
   ============================================================ */
.lpr-sidebar {
  background: var(--lpr-sb-bg) !important;
  width: var(--lpr-sb-w) !important;
  border-right: 1px solid rgba(255,255,255,.06) !important;
  scrollbar-width: thin;
  scrollbar-color: #1e293b transparent;
}

@media (min-width: 992px) {
  .lpr-sidebar {
    position: fixed !important;
    top: 0; left: 0;
    height: 100vh !important;
    transform: none !important;
    visibility: visible !important;
    z-index: 1029;
  }
  .lpr-main { margin-left: var(--lpr-sb-w); }
}

.lpr-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav group label */
.lpr-nav-group {
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: #475569; padding: 14px 16px 5px; margin: 0;
}

/* Nav links */
.lpr-nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 16px;
  color: #94a3b8; font-size: 13.5px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .14s, color .14s;
}
.lpr-nav-link i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.lpr-nav-link:hover { background: #1e293b; color: #e2e8f0; text-decoration: none; }
.lpr-nav-link.active {
  background: rgba(37,99,235,.18);
  color: #93c5fd;
  border-left-color: #2563eb;
  font-weight: 600;
}

/* User avatar */
.lpr-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #2563eb; color: #fff;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.lpr-topbar {
  min-height: 60px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07) !important;
  flex-shrink: 0;
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-card {
  border-left: 4px solid var(--bs-primary) !important;
  border-top: none !important; border-right: none !important; border-bottom: none !important;
  transition: transform .15s, box-shadow .15s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.11) !important; }
.kpi-value { font-size: 2rem; font-weight: 800; color: var(--bs-primary); line-height: 1; }
.kpi-label { font-size: 12.5px; color: #64748b; font-weight: 500; margin-bottom: 6px; }

.kpi-success { border-left-color: #16a34a !important; }
.kpi-success .kpi-value { color: #16a34a; }
.kpi-warning { border-left-color: #d97706 !important; }
.kpi-warning .kpi-value { color: #d97706; }
.kpi-danger  { border-left-color: #dc2626 !important; }
.kpi-danger  .kpi-value { color: #dc2626; }
.kpi-info    { border-left-color: #0ea5e9 !important; }
.kpi-info    .kpi-value { color: #0ea5e9; }

/* ============================================================
   TABLES
   ============================================================ */
.table > thead > tr > th {
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .45px;
  color: #64748b; white-space: nowrap;
}
.table > tbody > tr > td { vertical-align: middle; }

/* ============================================================
   FORMS — override Bootstrap to match brand
   ============================================================ */
.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.15);
}

/* ============================================================
   LICENSE PLATE — Mercosul Brasil (CSS only, no HTML change)
   ============================================================ */
.plate {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  color: #111827;
  font-weight: 900;
  font-family: "Courier New", monospace;
  letter-spacing: 3px;
  border: 2.5px solid #003087;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  padding: 0 10px 4px;
  min-width: 110px;
  text-align: center;
  text-transform: uppercase;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  line-height: 1.4;
}
.plate::before {
  content: "\2605  BRASIL  \2605";
  display: block;
  width: calc(100% + 20px);
  margin-left: -10px;
  margin-bottom: 3px;
  padding: 2px 0;
  background: #003087;
  color: #fff;
  font-size: 7px;
  letter-spacing: 2px;
  font-weight: 800;
  font-family: Arial, sans-serif;
  text-align: center;
  line-height: 1.6;
}

/* ============================================================
   PATIO BOARD
   ============================================================ */
.patio-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px,1fr));
  gap: 16px;
}
.patio-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  transition: box-shadow .2s;
}
.patio-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.patio-card.patio-alert { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.2); }
.patio-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.patio-card h2 { font-size: 16px; margin-bottom: 3px; }
.patio-stay { font-size: 1.7rem; font-weight: 800; color: var(--bs-primary); white-space: nowrap; }
.patio-details { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 13px; color: #374151; }
.patio-warning { margin-top: 12px; background: #fef3c7; color: #92400e; border-radius: 8px; padding: 8px 12px; font-weight: 700; font-size: 13px; }
@media (max-width: 575.98px) { .patio-details { grid-template-columns: 1fr; } }

/* ============================================================
   AUTH LAYOUT
   ============================================================ */
body.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f2d5a 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}

/* ============================================================
   RESULT PLATE — grande (Recepcao/Resultado)
   ============================================================ */
.result-plate {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  color: #111827;
  font-weight: 900;
  font-family: "Courier New", monospace;
  letter-spacing: 8px;
  border: 3px solid #003087;
  border-radius: 12px;
  overflow: hidden;
  font-size: 2.5rem;
  padding: 0 24px 14px;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  margin: 12px 0 20px;
}
.result-plate::before {
  content: "\2605  BRASIL  \2605";
  display: block;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-bottom: 8px;
  padding: 4px 0;
  background: #003087;
  color: #fff;
  font-size: 11px;
  letter-spacing: 2.5px;
  font-weight: 800;
  font-family: Arial, sans-serif;
  text-align: center;
  line-height: 1.5;
}

/* ============================================================
   MISC HELPERS
   ============================================================ */
.fs-7 { font-size: .8125rem !important; }
.page-main { padding: 28px; flex: 1; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767.98px) { .page-main { padding: 16px; } }
@media (max-width: 575.98px) { .page-main { padding: 12px; } }
