:root {
  --gc-brand: #22C55E;
  --gc-brand-strong: #16A34A;
  --bg-dark: #0f172a;
  --surface-dark: #1e293b;
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
}

body { 
  background-color: var(--bg-dark); 
  color: var(--text-light); 
  min-height: calc(100vh / var(--fit-zoom, 1)); 
  overflow-x: hidden;
  overflow-y: auto;
}

/* =========================================
   1. APP LAYOUT & SIDEBAR (RCM DESIGN)
   ========================================= */
.app-layout { 
  display: flex; 
  height: calc(100vh / var(--fit-zoom, 1)); 
  width: calc(100vw / var(--fit-zoom, 1)); 
}

.sidebar { 
  width: 260px; 
  background: #0b1120; 
  border-right: 1px solid #1e293b; 
  display: flex; 
  flex-direction: column; 
}

.sidebar-logo { 
  padding: 20px; 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  font-weight: 700; 
  font-size: 16px; 
  border-bottom: 1px solid #1e293b; 
}

.sidebar-logo img { 
  height: 32px; 
  border-radius: 4px; 
}

.sidebar-menu { 
  flex: 1; 
  padding: 20px 15px; 
  overflow-y: auto; 
}

.menu-label { 
  font-size: 11px; 
  text-transform: uppercase; 
  color: #64748b; 
  font-weight: 700; 
  margin: 15px 0 8px 10px; 
  letter-spacing: 0.5px; 
}

.menu-item { 
  display: block; 
  padding: 10px 12px; 
  color: #cbd5e1; 
  text-decoration: none; 
  font-size: 14px; 
  border-radius: 6px; 
  margin-bottom: 4px; 
  transition: background 0.2s, color 0.2s; 
}

.menu-item:hover { 
  background: #1e293b; 
  color: #fff; 
}

.menu-item.active { 
  background: var(--gc-brand-strong); 
  color: #fff; 
  font-weight: 600; 
}

.sidebar-footer { 
  padding: 20px; 
  border-top: 1px solid #1e293b; 
  background: #0f172a; 
}

.agent-profile { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
}

.avatar { 
  width: 36px; 
  height: 36px; 
  background: #334155; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 18px; 
}

/* =========================================
   2. MAIN CONTENT AREA
   ========================================= */
.main-content { 
  flex: 1; 
  overflow-y: auto; 
  background: var(--bg-dark); 
}

.agent-header { 
  background: var(--surface-dark); 
  padding: 20px 40px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  border-bottom: 1px solid #334155; 
  /* position: sticky removida — causava um bug de reflow no Chrome onde
     o conteúdo só aparecia depois de redimensionar a janela ou abrir o
     DevTools. Se quiser reativar depois, teste isoladamente. */
  position: static;
  z-index: 10; 
}

.header-title { 
  font-size: 18px; 
  font-weight: 600; 
  color: #f8fafc; 
}

.agent-status { 
  font-size: 13px; 
  color: var(--success); 
  font-weight: 600; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
}

.agent-container { 
  max-width: 1000px; 
  margin: 40px auto; 
  padding: 0 40px; 
  padding-bottom: 60px;
}

/* =========================================
   3. AUTHENTICATION LOGIN SCREEN
   ========================================= */
.auth-wrapper { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  height: calc(100vh / var(--fit-zoom, 1)); 
  background: #0f172a; 
}

.auth-box { 
  background: #fff; 
  padding: 40px; 
  border-radius: 12px; 
  width: 100%; 
  max-width: 400px; 
  box-shadow: 0 20px 40px rgba(0,0,0,0.4); 
  text-align: center; 
}

.auth-logo { 
  height: 50px; 
  border-radius: 6px; 
  margin-bottom: 20px; 
}

.input-group { 
  margin-bottom: 15px; 
  text-align: left; 
}

.input-group label { 
  display: block; 
  font-size: 12px; 
  font-weight: 600; 
  color: #475569; 
  margin-bottom: 6px; 
  text-transform: uppercase; 
}

.input-group input { 
  width: 100%; 
  padding: 12px; 
  border: 1px solid #cbd5e1; 
  border-radius: 6px; 
  font-size: 14px; 
  background: #f8fafc; 
  color: #1e293b; 
  outline: none; 
}

.input-group input:focus { 
  border-color: var(--gc-brand); 
  background: #fff; 
}

/* =========================================
   4. AGENT TABS & VIEWS
   ========================================= */
.agent-tabs { 
  display: flex; 
  gap: 30px; 
  border-bottom: 2px solid #334155; 
  margin-bottom: 30px; 
}

.agent-tab { 
  padding: 12px 0; 
  font-size: 15px; 
  font-weight: 600; 
  color: var(--text-muted); 
  cursor: pointer; 
  border-bottom: 2px solid transparent; 
  margin-bottom: -2px; 
  transition: color 0.2s; 
}

.agent-tab:hover { 
  color: var(--text-light); 
}

.agent-tab.active { 
  color: var(--gc-brand); 
  border-bottom-color: var(--gc-brand); 
}

.agent-view { 
  display: none; 
  animation: fadeIn 0.3s ease; 
}

.agent-view.active { 
  display: block; 
}

/* =========================================
   5. REQUEST CARDS (FLEET ALERTS)
   ========================================= */
.request-card { 
  background: var(--surface-dark); 
  border: 1px solid #334155; 
  border-radius: 12px; 
  margin-bottom: 20px; 
  overflow: hidden; 
  box-shadow: 0 10px 25px rgba(0,0,0,0.3); 
}

.req-header { 
  padding: 16px 24px; 
  background: #1e293b; 
  border-bottom: 1px solid #334155; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.req-body { 
  padding: 24px; 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 15px; 
  font-size: 14px; 
}

.req-actions { 
  padding: 20px 24px; 
  background: #0f172a; 
  border-top: 1px solid #334155; 
  display: flex; 
  gap: 12px; 
  justify-content: flex-end; 
}

.btn-propose { 
  background: var(--gc-brand-strong); 
  color: #fff; 
  border: none; 
  padding: 10px 20px; 
  border-radius: 6px; 
  font-weight: 600; 
  cursor: pointer; 
  transition: background 0.2s; 
}

.btn-propose:hover { 
  background: #15803d; 
}

/* =========================================
   6. BADGES
   ========================================= */
.badge-pending { 
  background: #fef3c7; 
  color: #92400e; 
  padding: 4px 12px; 
  border-radius: 20px; 
  font-size: 12px; 
  font-weight: 600; 
}

.status-badge { 
  padding: 6px 14px; 
  border-radius: 20px; 
  font-size: 12px; 
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: 0.5px; 
}

.bg-waiting { background: #fef3c7; color: #92400e; }
.bg-approved { background: #dcfce7; color: #166534; }
.bg-confirmed { background: #e2e8f0; color: #334155; }
.bg-pending { background: #e0e7ff; color: #3730a3; }

/* =========================================
   7. DATA TABLE (DATABASE VIEW FOR BOOKINGS)
   ========================================= */
.data-table-container {
  width: 100%;
  overflow-x: auto;
  background: var(--surface-dark);
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.gc-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.gc-data-table th {
  background: #1e293b;
  color: #cbd5e1;
  font-weight: 600;
  padding: 12px 15px;
  border-bottom: 2px solid #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}

.gc-data-table td {
  padding: 14px 15px;
  border-bottom: 1px solid #334155;
  color: #f8fafc;
  vertical-align: middle;
}

.gc-data-table tbody tr:hover {
  background: #0f172a;
}

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

.table-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.table-badge.confirmed { 
  background: #dcfce7; 
  color: #166534; 
}

.table-badge.pending { 
  background: #fef3c7; 
  color: #92400e; 
}

.table-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.table-btn:hover { 
  background: #1d4ed8; 
}

.action-flex {
  display: flex;
  gap: 8px;
}

/* =========================================
   8. ANIMATIONS
   ========================================= */
@keyframes fadeIn { 
  from { opacity: 0; transform: translateY(5px); } 
  to { opacity: 1; transform: translateY(0); } 
}

/* =========================================
   9. MODULE SYSTEM & MOCKUPS
   ========================================= */
.app-module { 
  display: none; 
  animation: fadeIn 0.2s ease-in; 
}

.app-module.active { 
  display: block; 
}

/* Dashboard Stat Cards */
.stat-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
  gap: 20px; 
}

.stat-card { 
  background: var(--surface-dark); 
  padding: 24px; 
  border: 1px solid #334155; 
  border-radius: 8px; 
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-value { 
  font-size: 32px; 
  font-weight: 700; 
  margin-top: 12px; 
}

.stat-label { 
  font-size: 13px; 
  color: var(--text-muted); 
  text-transform: uppercase; 
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* =========================================
   10. DATE RANGE FILTER (Upcoming Bookings)
   ========================================= */
.date-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 15px;
  margin-bottom: 20px;
  background: var(--surface-dark);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 15px 20px;
  flex-wrap: wrap;
}

.date-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.date-filter-group label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.date-filter-group input[type="date"] {
  padding: 8px 10px;
  background: #0f172a;
  border: 1px solid #475569;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
}

/* =========================================
   11. RESPONSIVE — abaixo de 900px (tablet/celular)
   ========================================= */
@media (max-width: 900px) {
  .app-layout { flex-direction: column; height: auto; min-height: calc(100vh / var(--fit-zoom, 1)); }
  .sidebar { width: 100%; height: auto; flex-direction: row; overflow-x: auto; }
  .sidebar-menu { display: flex; padding: 10px; overflow-x: auto; }
  .menu-label { display: none; }
  .sidebar-footer { display: none; }

  .agent-container { padding: 0 16px; margin: 20px auto; }
  .agent-header { padding: 15px 16px; }

  .req-body { grid-template-columns: 1fr; }
  .req-actions { flex-direction: column; }

  .data-table-container { font-size: 12px; }

  .date-filter-bar { flex-direction: column; align-items: stretch; }
}