/* ═══════════════════════════════════════════════════════════
   COGNVOX — Design System Clean / Minimalista
   ═══════════════════════════════════════════════════════════ */

:root {
  --primary: #2563eb;
  --primary-light: #eff6ff;
  --primary-hover: #1d4ed8;
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(0,0,0,.07), 0 2px 12px rgba(0,0,0,.04);
  --shadow-md: 0 4px 20px rgba(37,99,235,.10);
  --border: #e5e7eb;
  --bg: #f8fafc;
  --text: #111827;
  --text-muted: #6b7280;
  --green: #16a34a; --green-bg: #f0fdf4;
  --orange: #f59e0b; --orange-bg: #fffbeb;
  --red: #dc2626; --red-bg: #fef2f2;
  --purple: #7c3aed; --purple-bg: #f5f3ff;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #2563eb;
  --sidebar-hover: rgba(255,255,255,.06);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  z-index: 1000;
  transition: transform .25s ease;
  overflow: hidden;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 16px 16px;
  min-height: var(--topbar-h);
}
.brand-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.brand-text { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .5px; }

.sidebar-divider { height: 1px; background: rgba(255,255,255,.07); margin: 0 16px; }

.sidebar-nav {
  list-style: none; padding: 12px 8px; margin: 0; flex: 1; overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  color: rgba(255,255,255,.3); text-transform: uppercase;
  padding: 4px 8px; margin-top: 8px;
}
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--sidebar-text); text-decoration: none;
  font-weight: 500; font-size: 13.5px;
  transition: all .15s;
  position: relative;
}
.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover); color: #fff;
}
.sidebar-nav .nav-link.active {
  background: var(--primary); color: #fff;
}
.sidebar-nav .nav-link i { font-size: 16px; width: 18px; flex-shrink: 0; }

.badge-count {
  margin-left: auto;
  background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 700;
  border-radius: 20px; padding: 1px 7px;
  min-width: 20px; text-align: center;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 8px;
}
.user-info {
  flex: 1; display: flex; align-items: center; gap: 9px;
  text-decoration: none; overflow: hidden;
  border-radius: 8px; padding: 6px 8px;
  transition: background .15s;
}
.user-info:hover { background: var(--sidebar-hover); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary);
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-details { overflow: hidden; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--sidebar-text); }
.logout-btn {
  padding: 8px; border-radius: 8px; color: var(--sidebar-text);
  text-decoration: none; transition: all .15s; flex-shrink: 0;
}
.logout-btn:hover { background: var(--sidebar-hover); color: #ef4444; }

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 20px; gap: 12px;
  z-index: 990;
  transition: left .25s;
}
.sidebar-toggle { display: none; border: none; background: none; font-size: 22px; color: var(--text-muted); cursor: pointer; padding: 4px; }
.topbar-breadcrumb { flex: 1; }
.topbar-title { font-size: 15px; font-weight: 600; color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.topbar-btn { font-size: 13px; font-weight: 500; }
.topbar-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 17px;
  transition: all .15s; position: relative;
}
.topbar-icon-btn:hover { background: var(--bg); color: var(--primary); }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; border: 2px solid #fff;
}

/* Notif Dropdown */
.notif-wrapper { position: relative; }
.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 320px; background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  display: none; overflow: hidden; z-index: 1100;
}
.notif-dropdown.show { display: block; }
.notif-header {
  padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 13px;
}
.notif-all { font-size: 12px; color: var(--primary); text-decoration: none; }
.notif-empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px; }
.notif-item {
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-unread { background: var(--primary-light); }
.notif-title { font-weight: 600; font-size: 12.5px; }
.notif-msg { font-size: 12px; color: var(--text-muted); }

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
  transition: margin-left .25s;
}
.main-content > *:not(.flash-container) { padding: 24px; }
.flash-container { padding: 16px 24px 0; }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 24px;
}
.page-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.page-subtitle { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.page-header-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── CARDS / PANELS ──────────────────────────────────────── */
.card-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.panel-title { font-size: 14px; font-weight: 600; margin: 0; }
.panel-body { padding: 18px; }
.panel-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ── KPI CARDS ───────────────────────────────────────────── */
.kpi-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border-radius: var(--radius);
  border: 1px solid transparent;
}
.kpi-blue { background: var(--primary-light); border-color: #bfdbfe; }
.kpi-orange { background: var(--orange-bg); border-color: #fde68a; }
.kpi-purple { background: var(--purple-bg); border-color: #ddd6fe; }
.kpi-green { background: var(--green-bg); border-color: #bbf7d0; }

.kpi-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.kpi-blue .kpi-icon { background: var(--primary); color: #fff; }
.kpi-orange .kpi-icon { background: var(--orange); color: #fff; }
.kpi-purple .kpi-icon { background: var(--purple); color: #fff; }
.kpi-green .kpi-icon { background: var(--green); color: #fff; }

.kpi-value { font-size: 28px; font-weight: 800; line-height: 1; }
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* ── TABLES ──────────────────────────────────────────────── */
.table-clean thead th {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted);
  border-bottom: 1px solid var(--border); padding: 10px 16px;
  background: var(--bg);
}
.table-clean tbody td { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid #f3f4f6; }
.table-clean tbody tr:last-child td { border-bottom: none; }
.table-clean tbody tr:hover { background: var(--bg); }
.table-row-inactive { opacity: .55; }

/* ── BADGES ──────────────────────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
}
.status-aberta { background: #dbeafe; color: #1e40af; }
.status-em_andamento { background: #fef9c3; color: #854d0e; }
.status-pendente { background: #fde8d8; color: #9a3412; }
.status-concluida { background: #dcfce7; color: #166534; }
.status-cancelada { background: #fee2e2; color: #991b1b; }

.priority-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
}
.priority-baixa { background: #d1fae5; color: #065f46; }
.priority-normal { background: #dbeafe; color: #1e40af; }
.priority-alta { background: #fef3c7; color: #92400e; }
.priority-urgente { background: #fee2e2; color: #991b1b; }

.role-badge {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
}
.role-admin { background: #ede9fe; color: #5b21b6; }
.role-user { background: #dbeafe; color: #1e40af; }
.role-viewer { background: #f3f4f6; color: #374151; }

.status-indicator {
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
}
.status-indicator::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; display: inline-block;
}
.status-indicator.active::before { background: var(--green); }
.status-indicator.inactive::before { background: #9ca3af; }
.status-indicator.active { color: var(--green); }
.status-indicator.inactive { color: #9ca3af; }

/* ── PROTOCOL CODE ───────────────────────────────────────── */
.protocol-code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px; background: var(--bg); color: var(--primary);
  padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border);
}

/* ── FORMS ───────────────────────────────────────────────── */
.form-control, .form-select {
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13.5px; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.input-group-text {
  background: var(--bg); border-color: var(--border); color: var(--text-muted);
}
.input-group > .form-control { border-left: none; }
.form-label { font-size: 13.5px; margin-bottom: 5px; }
.required-label::after { content: ' *'; color: var(--red); }

/* ── UPLOAD AREA ─────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 32px; text-align: center;
  cursor: pointer; transition: all .2s;
  background: var(--bg);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary); background: var(--primary-light);
}
.upload-icon { font-size: 36px; color: var(--primary); opacity: .7; margin-bottom: 8px; display: block; }
.file-item {
  display: flex; align-items: center; padding: 8px 12px;
  background: var(--bg); border-radius: 8px; margin-top: 6px;
  border: 1px solid var(--border); font-size: 13px;
}

/* ── PRIORITY SELECTOR ───────────────────────────────────── */
.priority-selector { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.priority-option {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; border-radius: 8px; cursor: pointer;
  border: 2px solid var(--border); font-size: 12px; font-weight: 500;
  transition: all .15s; text-align: center;
}
.priority-option:hover { border-color: var(--primary); }
.priority-option.active.priority-low { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.priority-option.active.priority-normal { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.priority-option.active.priority-high { border-color: var(--orange); background: var(--orange-bg); color: var(--orange); }
.priority-option.active.priority-urgent { border-color: var(--red); background: var(--red-bg); color: var(--red); }

/* ── SIGNATURE BOX ───────────────────────────────────────── */
.signature-box {
  background: var(--primary-light); border: 1px solid #bfdbfe;
  border-radius: 8px; padding: 10px 12px;
  display: flex; align-items: center;
}
.signature-notice {
  background: var(--primary-light); border-radius: 8px;
  padding: 10px 12px; display: flex; align-items: flex-start;
}

/* ── DEMAND DETAIL ───────────────────────────────────────── */
.demand-content {
  font-size: 14px; line-height: 1.8; color: var(--text);
  white-space: pre-wrap; word-wrap: break-word;
}
.info-list { margin: 0; }
.info-list dt { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-top: 12px; }
.info-list dd { margin: 3px 0 0; }

/* ── TIMELINE ────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot {
  position: absolute; left: -21px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-content {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
}
.timeline-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.timeline-user { font-size: 13px; }
.timeline-time { font-size: 12px; }
.timeline-action { font-size: 13.5px; }
.timeline-comment {
  margin-top: 6px; padding: 8px 10px;
  background: #fff; border-radius: 6px; border: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}

/* ── FILE ATTACHMENT ─────────────────────────────────────── */
.file-attachment {
  display: flex; align-items: center;
  padding: 10px 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
}
.file-name { font-size: 13px; font-weight: 500; }
.file-size { font-size: 11.5px; }

/* ── EVENTS ──────────────────────────────────────────────── */
.event-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.event-item:last-child { border-bottom: none; }
.event-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.event-title { font-size: 13.5px; font-weight: 500; }
.event-time { font-size: 12px; }

/* ── AGENDA LEGEND ───────────────────────────────────────── */
.agenda-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── PARTICIPANTS GRID ───────────────────────────────────── */
.participants-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.participant-option input { display: none; }
.participant-label {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 10px; border: 2px solid var(--border); border-radius: 20px;
  cursor: pointer; font-size: 13px; transition: all .15s;
}
.participant-label:hover { border-color: var(--primary); }
.participant-cb:checked + .participant-label {
  border-color: var(--primary); background: var(--primary-light); color: var(--primary);
}
.participant-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── NOTIFICATIONS ───────────────────────────────────────── */
.notif-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.notif-row:hover { background: var(--bg); }
.notif-row-unread { background: var(--primary-light); }
.notif-row-icon { font-size: 18px; flex-shrink: 0; padding-top: 2px; }
.notif-row-title { font-size: 13.5px; font-weight: 600; }
.notif-row-msg { font-size: 13px; }
.notif-row-time { font-size: 11.5px; }

/* ── DEPT CARDS ──────────────────────────────────────────── */
.dept-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.dept-icon { font-size: 28px; color: var(--primary); flex-shrink: 0; }
.dept-name { font-size: 14.5px; }

/* ── PROFILE ─────────────────────────────────────────────── */
.profile-avatar-lg {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 32px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.user-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  background: var(--primary); border-color: var(--primary);
  font-weight: 500; border-radius: 8px;
}
.btn-primary:hover, .btn-primary:focus { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); border-radius: 8px; font-weight: 500; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-secondary { border-radius: 8px; font-weight: 500; }
.btn-xs { font-size: 12px; padding: 3px 8px; border-radius: 6px; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; color: var(--text-muted);
}
.empty-state i { font-size: 48px; opacity: .3; display: block; margin-bottom: 12px; }
.empty-state p { font-size: 14px; margin-bottom: 12px; }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-body {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-container { width: 100%; max-width: 420px; }
.login-card {
  background: #fff; border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-brand { text-align: center; margin-bottom: 32px; }
.login-icon {
  width: 60px; height: 60px; border-radius: 14px;
  background: var(--primary); color: #fff; font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.login-title { font-size: 26px; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.login-subtitle { font-size: 14px; color: var(--text-muted); margin: 0; }
.login-footer { text-align: center; margin-top: 20px; }
.toggle-pw { cursor: pointer; border-left: none !important; }

/* ── TOAST ───────────────────────────────────────────────── */
#toastContainer {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast-item {
  background: #1e293b; color: #fff;
  padding: 10px 18px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: fadeInUp .25s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── TRAVEL & ACCOMMODATION ──────────────────────────────── */

/* Status badges (shared between travel and accommodation) */
.travel-status-badge {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
}
.travel-status-solicitado  { background: #dbeafe; color: #1e40af; }
.travel-status-em_analise  { background: #fef9c3; color: #854d0e; }
.travel-status-aprovado    { background: #d1fae5; color: #065f46; }
.travel-status-reservado   { background: #ede9fe; color: #5b21b6; }
.travel-status-cancelado   { background: #fee2e2; color: #991b1b; }
.travel-status-concluido   { background: #f0fdf4; color: #166534; }

/* Transport badge */
.transport-badge {
  font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border); display: inline-block;
}

/* Route cell */
.route-cell { display: flex; align-items: center; font-size: 13.5px; font-weight: 500; }

/* Transport selector */
.transport-selector { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 575px) { .transport-selector { grid-template-columns: repeat(3, 1fr); } }
.transport-option input { display: none; }
.transport-label {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: 12px; font-weight: 500; transition: all .15s; text-align: center;
}
.transport-label:hover { border-color: var(--primary); }
.transport-label.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.transport-icon { font-size: 24px; }

/* Seat selector */
.seat-selector { display: flex; flex-direction: column; gap: 6px; }
.seat-option input { display: none; }
.seat-label {
  display: block; padding: 8px 12px; border: 2px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .15s;
}
.seat-label:hover { border-color: var(--primary); }
.seat-label.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* Room selector */
.room-selector { display: flex; flex-direction: column; gap: 6px; }
.room-option input { display: none; }
.room-label {
  display: block; padding: 8px 12px; border: 2px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .15s;
}
.room-label:hover { border-color: var(--primary); }
.room-label.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* Counter button */
.btn-counter { cursor: pointer; }

/* Route visual (detail page) */
.route-visual {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 0;
}
.route-point { flex: 1; }
.route-point-dot {
  width: 12px; height: 12px; border-radius: 50%; margin-bottom: 6px;
}
.origin-dot { background: var(--green); }
.dest-dot { background: var(--red); }
.route-line {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.route-line-bar {
  width: 100%; height: 2px; background: linear-gradient(to right, var(--green), var(--red));
  border-radius: 2px;
}
.route-plane-icon {
  position: absolute; font-size: 20px;
  background: #fff; padding: 0 6px;
}

/* Detail stat boxes */
.detail-stat {
  text-align: center; padding: 14px 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px;
}
.detail-stat-icon { font-size: 18px; margin-bottom: 4px; }
.detail-stat-val { font-size: 15px; font-weight: 700; word-break: break-all; }
.detail-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Check-in / Check-out visual */
.checkin-checkout {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 24px;
}
.checkin-block, .checkout-block { flex: 1; }
.nights-block { text-align: center; }
.checkin-label { text-transform: uppercase; letter-spacing: .5px; }

/* Hotel visual */
.hotel-visual { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.hotel-dest-badge {
  display: inline-flex; align-items: center;
  background: var(--primary-light); border: 1px solid #bfdbfe;
  border-radius: 10px; padding: 8px 14px;
}
.hotel-name { font-size: 15px; }

/* Nights preview (form) */
.nights-preview {
  background: var(--primary-light); border: 1px solid #bfdbfe;
  border-radius: 8px; padding: 10px 14px;
  display: flex; align-items: center;
  font-weight: 600; color: var(--primary);
}

/* ── FULLCALENDAR OVERRIDES ──────────────────────────────── */
.fc-toolbar-title { font-size: 16px !important; font-weight: 700 !important; }
.fc-button-primary {
  background: var(--primary) !important; border-color: var(--primary) !important;
  font-size: 13px !important; border-radius: 7px !important;
}
.fc-button-primary:hover { background: var(--primary-hover) !important; }
.fc-button-active { background: var(--primary-hover) !important; }
.fc-event { border-radius: 5px !important; font-size: 12px !important; border: none !important; }
.fc-day-today { background: var(--primary-light) !important; }

/* ── SIDEBAR OVERLAY ─────────────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 999;
}

/* ══ RESPONSIVE ══════════════════════════════════════════════ */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show { display: block; }
  .topbar { left: 0; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 575px) {
  .main-content > *:not(.flash-container) { padding: 16px; }
  .flash-container { padding: 12px 16px 0; }
  .page-header { flex-direction: column; }
  .kpi-value { font-size: 22px; }
  .login-card { padding: 28px 22px; }
}

/* ── VEÍCULOS ──────────────────────────────────────────────── */

/* Vehicle type badge (table) */
.vehicle-type-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; border: 1.5px solid;
}
.vtype-sedan    { background:#eff6ff; color:#2563eb; border-color:#bfdbfe; }
.vtype-suv      { background:#f0fdf4; color:#16a34a; border-color:#bbf7d0; }
.vtype-van      { background:#fffbeb; color:#d97706; border-color:#fde68a; }
.vtype-truck    { background:#fff7ed; color:#ea580c; border-color:#fed7aa; }
.vtype-motorcycle { background:#fdf4ff; color:#9333ea; border-color:#e9d5ff; }

/* Vehicle type badge large (detail) */
.vehicle-type-badge-lg {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; padding: 8px 18px;
  border-radius: 12px; border: 2px solid;
}

/* Vehicle selector grid */
.vehicle-selector { grid-template-columns: repeat(5, 1fr) !important; }
@media (max-width: 575px) { .vehicle-selector { grid-template-columns: repeat(3, 1fr) !important; } }

/* Vehicle type visual */
.vehicle-type-visual {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--bg); border-radius: 10px;
  border: 1px solid var(--border);
}

/* ── LINKED CARDS ──────────────────────────────────────────── */
.linked-card {
  transition: all .15s; background: var(--bg);
}
.linked-card:hover {
  border-color: var(--primary) !important;
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.linked-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 13px;
}
.bg-orange  { background: #f97316; }
.bg-purple  { background: #8b5cf6; }
.bg-teal    { background: #0d9488; }

/* Route dots for vehicle form */
.route-dot-origin .bi { color: #16a34a; }
.route-dot-dest   .bi { color: #dc2626; }

/* ── Status badges — módulos de viagem, reembolso ─────────────────────────── */
.status-solicitado  { background: #dbeafe; color: #1d4ed8; }
.status-em_analise  { background: #fef9c3; color: #92400e; }
.status-aprovado    { background: #dcfce7; color: #166534; }
.status-reservado   { background: #e0e7ff; color: #3730a3; }
.status-concluido   { background: #f0fdf4; color: #15803d; }
.status-em_uso      { background: #fff7ed; color: #c2410c; }
.status-rejeitado   { background: #fee2e2; color: #991b1b; }
.status-pago        { background: #d1fae5; color: #065f46; }
.status-cancelado   { background: #f3f4f6; color: #4b5563; }

/* ── Stat cards (reembolso e outros módulos) ─────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 4px;
}
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--text-primary); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ── Soft background helpers ─────────────────────────────────────────────── */
.bg-primary-soft  { background: #dbeafe; }
.bg-warning-soft  { background: #fef9c3; }
.bg-success-soft  { background: #dcfce7; }
.bg-info-soft     { background: #e0f2fe; }
.bg-danger-soft   { background: #fee2e2; }

/* ── Status badges — módulos de viagem, reembolso ─────────────────────────── */
.status-solicitado  { background: #dbeafe; color: #1d4ed8; }
.status-em_analise  { background: #fef9c3; color: #92400e; }
.status-aprovado    { background: #dcfce7; color: #166534; }
.status-reservado   { background: #e0e7ff; color: #3730a3; }
.status-concluido   { background: #f0fdf4; color: #15803d; }
.status-em_uso      { background: #fff7ed; color: #c2410c; }
.status-rejeitado   { background: #fee2e2; color: #991b1b; }
.status-pago        { background: #d1fae5; color: #065f46; }
.status-cancelado   { background: #f3f4f6; color: #4b5563; }

/* ── Stat cards (reembolso e outros módulos) ─────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 4px;
}
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--text-primary); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ── Soft background helpers ─────────────────────────────────────────────── */
.bg-primary-soft  { background: #dbeafe; }
.bg-warning-soft  { background: #fef9c3; }
.bg-success-soft  { background: #dcfce7; }
.bg-info-soft     { background: #e0f2fe; }
.bg-danger-soft   { background: #fee2e2; }
