:root {
  --flap-primary: #1B0088;
  --flap-primary-dark: #0F004F;
  --flap-primary-light: rgba(27, 0, 136, 0.08);
  --flap-secondary: #4257E8;
  --flap-accent: #00A6D4;
  --flap-success: #10b981;
  --flap-warning: #f59e0b;
  --flap-danger: #ef4444;
  --flap-text: #1f2937;
  --flap-text-light: #6b7280;
  --flap-border: #e5e7eb;
  --flap-bg: #f9fafb;
  --flap-bg-card: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Barlow Semi Condensed', sans-serif;
  background: var(--flap-bg);
  color: var(--flap-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.flap-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background: linear-gradient(180deg, var(--flap-primary) 0%, #0d0055 100%);
  color: white;
  padding: 24px 20px 80px 20px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.flap-sidebar::-webkit-scrollbar {
  width: 6px;
}

.flap-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

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

.flap-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.flap-sidebar .sidebar-menu-item {
  padding: 10px 14px;
  margin-bottom: 3px;
  margin-left: -10px;
  margin-right: -10px;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  white-space: nowrap;
  border-left: 3px solid transparent;
  position: relative;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border-top: none;
  border-right: none;
  border-bottom: none;
  font-size: 14px;
}

.flap-sidebar .sidebar-menu-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: #00D6CC;
  color: #fff;
  transform: translateX(4px);
}

.flap-sidebar .sidebar-menu-item.active,
.flap-sidebar .sidebar-menu-item:active {
  background: rgba(0, 214, 204, 0.2);
  border-left-color: #00D6CC;
  color: #fff;
}

.flap-sidebar .sidebar-menu-item i {
  font-size: 18px;
  width: 24px;
  opacity: 0.9;
  transition: all 0.25s ease;
}

.flap-sidebar .sidebar-menu-item:hover i {
  opacity: 1;
  color: #00D6CC;
}

/* Itens de administrador mais compactos - 20% menos espaço vertical */
.flap-sidebar .sidebar-admin-section .sidebar-menu-item {
  padding: 8px 14px;
  margin-bottom: 2px;
}

.flap-sidebar .sidebar-admin-section .sidebar-submenu-item {
  padding: 6px 14px 6px 32px;
  margin-bottom: 1px;
}

.flap-sidebar .sidebar-admin-section .sidebar-submenu-container {
  margin-bottom: 2px;
}

.flap-sidebar .sidebar-admin-header {
  padding: 8px 12px;
  margin-bottom: 6px;
}

/* Botão de logout na sidebar */
.sidebar-logout-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logout-btn:hover {
  background: rgba(178,15,56,0.8) !important;
  color: white !important;
  border-color: #B20F38 !important;
}

/* Switch de módulo na sidebar */
.sidebar-module-switch {
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 12px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s;
}

.sidebar-module-switch:hover {
  background: rgba(255,255,255,0.15);
}

.flap-sidebar a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

.flap-sidebar a:hover {
  color: #fff;
}

/* Badge de notificação estilo iPhone */
.sidebar-notification-badge {
  position: absolute;
  top: 6px;
  right: 10px;
  background: linear-gradient(135deg, #ED1650 0%, #B20F38 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(237, 22, 80, 0.4);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 6px rgba(237, 22, 80, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 2px 10px rgba(237, 22, 80, 0.6);
  }
}

/* Submenu da sidebar */
.sidebar-submenu-container {
  margin-bottom: 3px;
}

.sidebar-submenu-container .submenu-arrow {
  transition: transform 0.2s ease;
}

.sidebar-submenu-container [aria-expanded="true"] .submenu-arrow {
  transform: rotate(180deg);
}

.sidebar-submenu-item {
  padding-left: 36px !important;
  font-size: 13px !important;
  background: rgba(0, 0, 0, 0.15) !important;
  border-left: 2px solid rgba(255, 255, 255, 0.1) !important;
  margin-left: 10px !important;
}

.sidebar-submenu-item:hover {
  background: rgba(0, 214, 204, 0.15) !important;
  border-left-color: #00D6CC !important;
}

.sidebar-submenu-item.active {
  background: rgba(0, 214, 204, 0.25) !important;
  border-left-color: #00D6CC !important;
}

.flap-main {
  margin-left: 250px;
  padding: 24px;
  min-height: 100vh;
  background: var(--flap-bg);
}

.flap-brand {
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 28px;
  margin-bottom: 8px;
}

.flap-primary {
  color: var(--flap-primary);
}

.btn {
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-flap {
  background: var(--flap-primary);
  border-color: var(--flap-primary);
  box-shadow: 0 4px 12px rgba(27, 0, 136, 0.25);
}

.btn-flap:hover {
  background: var(--flap-primary-dark);
  border-color: var(--flap-primary-dark);
  color: white !important;
  box-shadow: 0 6px 16px rgba(27, 0, 136, 0.35);
  transform: translateY(-1px);
}

.btn-flap:hover i {
  color: white !important;
}

.btn-flap:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(27, 0, 136, 0.25);
}

.btn-outline-secondary {
  border: 1.5px solid var(--flap-border);
  background: white;
  color: var(--flap-text);
}

.btn-outline-secondary:hover {
  background: #6c757d;
  border-color: #6c757d;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-secondary:hover i {
  color: white !important;
}

.btn-outline-primary {
  border: 1.5px solid #0d6efd;
  background: white;
  color: #0d6efd;
}

.btn-outline-primary:hover {
  background: #0d6efd;
  border-color: #0d6efd;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-primary:hover i {
  color: white !important;
}

.btn-outline-success {
  border: 1.5px solid var(--flap-success);
  background: white;
  color: var(--flap-success);
}

.btn-outline-success:hover {
  background: var(--flap-success);
  border-color: var(--flap-success);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-success:hover i {
  color: white !important;
}

.btn-outline-danger {
  border: 1.5px solid var(--flap-danger);
  background: white;
  color: var(--flap-danger);
}

.btn-outline-danger:hover {
  background: var(--flap-danger);
  border-color: var(--flap-danger);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-danger:hover i {
  color: white !important;
}

.btn-outline-warning {
  border: 1.5px solid var(--flap-warning);
  background: white;
  color: var(--flap-warning);
}

.btn-outline-warning:hover {
  background: var(--flap-warning);
  border-color: var(--flap-warning);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-warning:hover i {
  color: white !important;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 14px;
}

.flap-confidential-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--flap-border);
  padding: 12px 20px;
  font-size: 12px;
  color: var(--flap-text-light);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.flap-login-left {
  background: linear-gradient(135deg, var(--flap-primary) 0%, var(--flap-primary-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.flap-login-left::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10%, -10%); }
}

.flap-login-left .flap-brand {
  font-size: 56px;
  letter-spacing: 2px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.flap-card {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: var(--flap-bg-card);
  transition: var(--transition);
  overflow: hidden;
}

.flap-card:hover {
  box-shadow: var(--shadow-lg);
}

.card {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--flap-bg-card);
}

.card-body {
  padding: 24px;
}

.flap-question-row {
  border: 1.5px solid var(--flap-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
  background: var(--flap-bg-card);
}

.flap-question-row.is-dim {
  opacity: 0.5;
  background: var(--flap-bg);
  border-color: transparent;
}

.flap-question-row.is-selected {
  opacity: 1;
  background: var(--flap-bg-card);
  border-color: var(--flap-primary);
  box-shadow: 0 8px 20px rgba(27, 0, 136, 0.12), 0 0 0 3px var(--flap-primary-light);
  transform: translateY(-2px);
}

.flap-question-row:hover {
  border-color: var(--flap-text-light);
}

/* ===== FORMS & INPUTS ===== */
.form-label {
  font-weight: 600;
  color: var(--flap-text);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-control, .form-select {
  border: 1.5px solid var(--flap-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 15px;
  transition: var(--transition);
  background: var(--flap-bg-card);
  color: var(--flap-text);
}

.form-control:focus, .form-select:focus {
  border-color: var(--flap-primary);
  box-shadow: 0 0 0 3px var(--flap-primary-light);
  outline: none;
  background: white;
}

.form-control::placeholder {
  color: var(--flap-text-light);
  opacity: 0.6;
}

.form-check-input {
  width: 20px;
  height: 20px;
  border: 2px solid var(--flap-border);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.form-check-input:checked {
  background-color: var(--flap-primary);
  border-color: var(--flap-primary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px var(--flap-primary-light);
}

.input-group {
  display: flex;
  gap: 0;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* ===== TABLES ===== */
.table {
  width: 100%;
  margin-bottom: 0;
}

.table thead th {
  background: var(--flap-bg);
  color: var(--flap-text);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border: none;
  border-bottom: 2px solid var(--flap-border);
}

.table tbody td {
  padding: 16px;
  border: none;
  border-bottom: 1px solid var(--flap-border);
  color: var(--flap-text);
  vertical-align: middle;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: var(--flap-bg);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table-responsive {
  border-radius: var(--radius);
  overflow: hidden;
}

/* ===== ALERTS ===== */
.alert {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  border-left: 4px solid;
}

.alert-danger {
  background: #fef2f2;
  border-left-color: var(--flap-danger);
  color: #991b1b;
}

.alert-warning {
  background: #fffbeb;
  border-left-color: var(--flap-warning);
  color: #92400e;
}

.alert-success {
  background: #f0fdf4;
  border-left-color: var(--flap-success);
  color: #166534;
}

/* ===== HEADINGS ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--flap-text);
  font-weight: 700;
  margin-bottom: 16px;
}

.h4 {
  font-size: 24px;
  font-weight: 700;
}

/* ===== UTILITIES ===== */
.text-muted {
  color: var(--flap-text-light) !important;
}

.small {
  font-size: 13px;
}

.fw-semibold {
  font-weight: 600;
}

.fw-bold {
  font-weight: 700;
}

/* ===== ACTION BUTTONS (EDITAR/EXCLUIR) ===== */
.btn-action {
  border-width: 1px;
  border-style: solid;
  transition: all 0.2s ease-in-out;
}

.btn-action.btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
}

.btn-action.btn-outline-secondary:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: #ffffff !important;
}

.btn-action.btn-outline-secondary:hover i {
  color: #ffffff !important;
}

.btn-action.btn-outline-primary {
  color: #0d6efd;
  border-color: #0d6efd;
}

.btn-action.btn-outline-primary:hover {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #ffffff !important;
}

.btn-action.btn-outline-primary:hover i {
  color: #ffffff !important;
}

.btn-action.btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-action.btn-outline-danger:hover {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #ffffff !important;
}

.btn-action.btn-outline-danger:hover i {
  color: #ffffff !important;
}

/* ===== DASHBOARD CARDS ===== */
.dashboard-cta {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid var(--flap-border);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  width: 100%;
  display: block;
}

.dashboard-cta .card-body {
  min-height: 100px;
  display: flex;
  align-items: center;
  width: 100%;
}

.dashboard-cta:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--flap-primary);
}

.dashboard-icon-wrapper {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 0, 136, 0.05);
  border-radius: 12px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.dashboard-cta:hover .dashboard-icon-wrapper {
  background: rgba(27, 0, 136, 0.1);
  transform: scale(1.05);
}

.dashboard-icon-left {
  font-size: 32px;
  transition: transform 0.3s ease;
}

.dashboard-cta:hover .dashboard-icon-left {
  transform: scale(1.1);
}

.dashboard-cta-card {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  background: linear-gradient(135deg, var(--flap-bg-card) 0%, var(--flap-bg) 100%);
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  border: 2px solid transparent;
}

.dashboard-cta-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--flap-primary);
}

.dashboard-cta-card i {
  font-size: 42px;
  color: var(--flap-primary);
  margin-bottom: 16px;
  display: block;
}

.dashboard-cta-card h5 {
  font-size: 18px;
  font-weight: 700;
  color: var(--flap-text);
  margin-bottom: 8px;
}

.dashboard-cta-card p {
  font-size: 14px;
  color: var(--flap-text-light);
  margin: 0;
}

/* ===== BADGES ===== */
.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.badge-primary {
  background: var(--flap-primary-light);
  color: var(--flap-primary);
}

.badge-success {
  background: #d1fae5;
  color: var(--flap-success);
}

.badge-secondary {
  background: #f3f4f6;
  color: var(--flap-text-light);
}

.badge-danger {
  background: #fee2e2;
  color: var(--flap-danger);
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--flap-border);
}

.page-header h1 {
  margin: 0;
  font-size: 28px;
}

/* ===== TABLE HEADER COM GRADIENTE ===== */
.table thead {
  background: linear-gradient(135deg, #0F004F 0%, #1B0088 100%);
}

.table thead tr {
  background: transparent;
}

.table thead th {
  background: transparent;
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.8px;
  border: none;
  padding: 16px 12px;
  vertical-align: middle;
}

.table thead th:first-child {
  border-radius: 8px 0 0 0;
}

.table thead th:last-child {
  border-radius: 0 8px 0 0;
}

/* ===== BOTÕES DE AÇÃO ===== */
/* Botões com texto em telas grandes, apenas ícone em responsivo */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  background-color: white;
  border: 1px solid #B8B8B8;
  transition: all 0.2s;
  gap: 6px;
}

.btn-action:hover {
  background-color: #f8f9fa;
  border-color: #858585;
}

.btn-action .btn-text {
  display: inline;
}

/* Responsivo: esconder texto e mostrar apenas ícone */
@media (max-width: 1300px) {
  .btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    gap: 0;
  }
  .btn-action .btn-text {
    display: none;
  }
}

.btn-action-view { color: #4257E8; }
.btn-action-view:hover { color: #1B0088; }

.btn-action-continue { color: #00B5AD; }
.btn-action-continue:hover { color: #008f89; }

.btn-action-edit { color: #0d6efd; }
.btn-action-edit:hover { color: #0a58ca; }

.btn-action-laudo { color: #6f42c1; }
.btn-action-laudo:hover { color: #59359a; }

.btn-action-laudo-parcial { color: #FFC700; }
.btn-action-laudo-parcial:hover { color: #d4a600; }

.btn-action-history { color: #7000AB; }
.btn-action-history:hover { color: #5a0089; }

.btn-action-delete { color: #B20F38; }
.btn-action-delete:hover { color: #8f0c2d; background-color: #fff5f5; }

/* ===== TOAST NOTIFICATION SYSTEM ===== */
.flap-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.flap-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid;
  animation: flap-toast-in 0.3s ease-out;
  min-width: 300px;
}

.flap-toast.toast-removing {
  animation: flap-toast-out 0.3s ease-in forwards;
}

.flap-toast-success { border-left-color: var(--flap-success); }
.flap-toast-error { border-left-color: var(--flap-danger); }
.flap-toast-warning { border-left-color: var(--flap-warning); }
.flap-toast-info { border-left-color: var(--flap-secondary); }

.flap-toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.flap-toast-success .flap-toast-icon { color: var(--flap-success); }
.flap-toast-error .flap-toast-icon { color: var(--flap-danger); }
.flap-toast-warning .flap-toast-icon { color: var(--flap-warning); }
.flap-toast-info .flap-toast-icon { color: var(--flap-secondary); }

.flap-toast-body {
  flex: 1;
  font-size: 14px;
  color: var(--flap-text);
  line-height: 1.4;
}

.flap-toast-close {
  background: none;
  border: none;
  color: var(--flap-text-light);
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.flap-toast-close:hover { opacity: 1; }

@keyframes flap-toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes flap-toast-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ===== CONFIRM MODAL ===== */
.flap-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: flap-fade-in 0.2s ease;
}

.flap-confirm-box {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 420px;
  width: 90%;
  padding: 32px;
  text-align: center;
  animation: flap-scale-in 0.2s ease;
}

.flap-confirm-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.flap-confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--flap-text);
  margin-bottom: 8px;
}

.flap-confirm-message {
  font-size: 14px;
  color: var(--flap-text-light);
  margin-bottom: 24px;
}

.flap-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

@keyframes flap-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes flap-scale-in {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== FORM LOADING STATE ===== */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
  position: relative;
}

.btn.is-loading .btn-loading-spinner {
  display: inline-block;
}

.btn-loading-spinner {
  display: none;
}

/* ===== HAMBURGER BUTTON ===== */
.flap-hamburger {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: var(--flap-primary);
  color: white;
  font-size: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
}

.flap-hamburger:active {
  transform: scale(0.95);
}

.flap-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.flap-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ===== RESPONSIVE ===== */

/* Sidebar responsivo para telas menores que 1300px */
@media (max-width: 1300px) {
  .flap-sidebar {
    width: 220px;
    padding: 20px 15px 80px 15px;
  }
  .flap-sidebar .sidebar-menu-item {
    font-size: 13px;
    padding: 8px 10px;
  }
  .flap-main {
    margin-left: 220px;
  }
}

/* Sidebar oculto em mobile */
@media (max-width: 768px) {
  .flap-hamburger {
    display: flex;
  }

  .flap-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
  }

  .flap-sidebar.open {
    transform: translateX(0);
  }
  
  .flap-main {
    margin-left: 0;
    padding: 70px 20px 20px 20px;
  }
  
  .dashboard-cta-card {
    padding: 24px 20px;
  }

  .flap-toast-container {
    left: 10px;
    right: 10px;
    max-width: none;
  }

  .flap-toast {
    min-width: auto;
  }
}

/* ========== Contraste Global: Headers e Modais ========== */
/* Modais com header colorido escuro: texto sempre branco */
.modal-header[style*="background: linear-gradient"] .modal-title,
.modal-header[style*="background-color: #1B0088"] .modal-title,
.modal-header[style*="background-color: #0F004F"] .modal-title,
.modal-header.bg-primary .modal-title,
.modal-header.bg-danger .modal-title,
.modal-header.bg-dark .modal-title {
  color: #fff !important;
}
.modal-header[style*="background: linear-gradient"] .btn-close:not(.btn-close-white),
.modal-header[style*="background-color: #1B0088"] .btn-close:not(.btn-close-white),
.modal-header.bg-primary .btn-close:not(.btn-close-white),
.modal-header.bg-danger .btn-close:not(.btn-close-white) {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ========== Animated Dots Spinner (Dashboard buttons) ========== */
.flap-dots-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.flap-dots-spinner span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4257E8;
  animation: flapDotsBounce 1.2s infinite ease-in-out;
}
.flap-dots-spinner span:nth-child(1) { animation-delay: 0s; }
.flap-dots-spinner span:nth-child(2) { animation-delay: 0.2s; }
.flap-dots-spinner span:nth-child(3) { animation-delay: 0.4s; }
@keyframes flapDotsBounce {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   Escopo de dark mode LOCAL (apenas em telas específicas)
   Aplicado via classe `.feedback-dark` no conteúdo da página
   Conduzir Feedback (Pilotos LATAM). NÃO é global.
   ============================================================ */

.feedback-dark {
  --fb-bg: #0f172a;
  --fb-card: #1e293b;
  --fb-text: #e5e7eb;
  --fb-text-muted: #9ca3af;
  --fb-border: #2d3748;
  --fb-accent: #6B7FFF;
  background: var(--fb-bg);
  color: var(--fb-text);
  border-radius: 12px;
  padding: 16px;
}
.feedback-dark .card,
.feedback-dark .flap-card {
  background: var(--fb-card) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-text);
}
.feedback-dark .text-muted { color: var(--fb-text-muted) !important; }
.feedback-dark .table { color: var(--fb-text); }
.feedback-dark .table thead th { background: #263144; color: var(--fb-text); border-color: var(--fb-border); }
.feedback-dark .form-control,
.feedback-dark .form-select {
  background-color: #263144;
  border-color: var(--fb-border);
  color: var(--fb-text);
}
.feedback-dark .form-control::placeholder { color: #64748b; }
.feedback-dark hr { border-color: var(--fb-border); }
.feedback-dark .btn-outline-secondary { color: var(--fb-text); border-color: var(--fb-border); }

/* Skip-link para acessibilidade */
.flap-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1B0088;
  color: white;
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: top 0.2s;
}
.flap-skip-link:focus {
  top: 0;
  color: white;
  outline: 3px solid #FFC700;
}

/* Breadcrumbs customizados */
.flap-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--flap-text-light);
  margin-bottom: 16px;
  padding: 0;
  list-style: none;
}
.flap-breadcrumb li { display: flex; align-items: center; }
.flap-breadcrumb li + li::before {
  content: '›';
  margin: 0 6px;
  color: var(--flap-text-light);
}
.flap-breadcrumb a {
  color: var(--flap-secondary);
  text-decoration: none;
}
.flap-breadcrumb a:hover { text-decoration: underline; }
.flap-breadcrumb li:last-child { color: var(--flap-text); font-weight: 600; }
