/* ========================================
   LAGUNA SECA - Sistema de Gestão
   Design System & Styles
   ======================================== */

/* Variables */
:root {
  /* Colors */
  --primary: #e94560;
  --primary-dark: #c73e54;
  --primary-light: #ff6b84;
  --secondary: #1a1a2e;
  --secondary-light: #16213e;
  --accent: #0f3460;

  /* Neutrals */
  --bg-primary: #0f0f23;
  --bg-secondary: #16162a;
  --bg-card: rgba(26, 26, 46, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);

  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #6c6c7c;

  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(233, 69, 96, 0.3);

  /* Sizing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 80px;
  --header-height: 70px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(233, 69, 96, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(15, 52, 96, 0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========================================
   APP LAYOUT
   ======================================== */

.app {
  display: flex;
  min-height: 100vh;
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
}

.nav-item {
  margin: 4px 12px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-item a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  transform: scaleY(0);
  transition: var(--transition);
}

.nav-item:hover a,
.nav-item.active a {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.nav-item.active a::before {
  transform: scaleY(1);
}

.nav-item.active a {
  background: rgba(233, 69, 96, 0.1);
}

.nav-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.nav-text {
  font-size: 14px;
  font-weight: 500;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: var(--transition);
}

/* ========================================
   HEADER
   ======================================== */

.header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 15, 35, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  color: var(--text-primary);
}

.page-title {
  font-size: 24px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 280px;
  padding: 10px 16px 10px 44px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* ========================================
   PAGE CONTAINER
   ======================================== */

.page-container {
  padding: 32px;
}

.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.card-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}

.card-link:hover {
  text-decoration: underline;
}

.card-body {
  padding: 24px;
}

/* ========================================
   DASHBOARD
   ======================================== */

.dashboard-grid {
  display: grid;
  gap: 24px;
}

/* KPI Cards */
.kpi-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.kpi-content {
  display: flex;
  flex-direction: column;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.kpi-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Status Pipeline */
.status-pipeline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.status-item {
  flex: 1;
  min-width: 120px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
}

.status-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.status-count {
  font-size: 32px;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

.status-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-item.checkin .status-count {
  color: var(--info);
}

.status-item.orcamento .status-count {
  color: var(--warning);
}

.status-item.aprovado .status-count {
  color: #8b5cf6;
}

.status-item.execucao .status-count {
  color: #f97316;
}

.status-item.finalizado .status-count {
  color: var(--success);
}

/* Alerts List */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-glass);
  border-radius: var(--radius);
  border-left: 3px solid var(--warning);
}

.alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.alert-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.alert-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ========================================
   TABLES
   ======================================== */

.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-glass);
}

.table tbody tr {
  transition: var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--bg-glass);
}

.table td {
  font-size: 14px;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.badge-checkin {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.badge-orcamento {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-aprovado {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.badge-execucao {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.badge-finalizado {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-pago {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-pendente {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-parcial {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-ativo {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-inativo {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
}

/* Action Buttons */
.action-btns {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.form-select {
  cursor: pointer;
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

.form-select option {
  background-color: var(--bg-secondary) !important;
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  padding: 10px;
}

/* Força estilo dark em todos os selects do sistema */
select {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

select option {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ========================================
   MODALS
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"] {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  width: 98%;
  max-width: 1600px;
  max-height: 95vh;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--danger);
  border-color: var(--danger);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ========================================
   TOAST
   ======================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2000;
}

.toast {
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlide 0.3s ease;
  min-width: 300px;
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--info);
}

.toast-icon {
  font-size: 20px;
}

.toast-message {
  flex: 1;
  font-size: 14px;
}

/* ========================================
   FINANCE SUMMARY
   ======================================== */

.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.finance-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.finance-card.pago {
  border-top: 3px solid var(--success);
}

.finance-card.pendente {
  border-top: 3px solid var(--danger);
}

.finance-card.parcial {
  border-top: 3px solid var(--warning);
}

.finance-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.finance-value {
  font-size: 28px;
  font-weight: 800;
}

.finance-card.pago .finance-value {
  color: var(--success);
}

.finance-card.pendente .finance-value {
  color: var(--danger);
}

.finance-card.parcial .finance-value {
  color: var(--warning);
}

/* ========================================
   ALERTS TIMELINE
   ======================================== */

.alerts-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-glass);
  border-radius: var(--radius);
  border-left: 3px solid var(--warning);
}

.timeline-date {
  min-width: 80px;
  text-align: center;
}

.timeline-day {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.timeline-month {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.timeline-content {
  flex: 1;
}

.timeline-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition-fast);
}

.pagination-btn:hover,
.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
  .kpi-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .search-box input {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .page-container {
    padding: 16px;
  }

  .header {
    padding: 0 16px;
  }

  .kpi-cards {
    grid-template-columns: 1fr;
  }

  .finance-summary {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .page-actions {
    flex-wrap: wrap;
  }

  .search-box {
    display: none;
  }

  .modal {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-danger {
  color: var(--danger);
}

.text-info {
  color: var(--info);
}

.text-muted {
  color: var(--text-muted);
}

.mt-4 {
  margin-top: 24px;
}

.mb-4 {
  margin-bottom: 24px;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
}

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   MODAL SELECT COMPONENT
   ======================================== */

.modal-select-input {
  position: relative;
}

.modal-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-select-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.modal-select-option:hover {
  background: rgba(233, 69, 96, 0.1);
  border-color: var(--primary);
}

.modal-select-option.selected {
  background: rgba(233, 69, 96, 0.15);
  border-color: var(--primary);
}

.option-icon {
  font-size: 24px;
  width: 32px;
  text-align: center;
}

.option-content {
  flex: 1;
}

.option-label {
  font-weight: 500;
  font-size: 14px;
}

.option-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.option-check {
  color: var(--success);
  font-weight: bold;
  font-size: 18px;
}

/* Variáveis extras */
:root {
  --surface: var(--bg-secondary);
  --surface-hover: var(--bg-glass);
}

/* ========================================
   BULK ACTIONS BAR
   ======================================== */

.bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.15), rgba(15, 52, 96, 0.2));
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  margin-bottom: 16px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bulk-info {
  font-weight: 600;
  color: var(--primary-light);
}

.bulk-info span {
  font-size: 20px;
  font-weight: 800;
}

.bulk-buttons {
  display: flex;
  gap: 12px;
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Table Checkbox */
.table th input[type="checkbox"],
.table td input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.table tbody tr.selected {
  background: rgba(233, 69, 96, 0.1);
}

/* Edit Button Style */
.action-btn.edit-btn:hover {
  background: var(--info);
  border-color: var(--info);
}

/* Filter group adjustments */
.page-actions {
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group .form-input[type="date"] {
  width: 140px;
}

/* ========================================
   Custom Scrollbar (Global & Testado)
   ======================================== */
::-webkit-scrollbar {
  width: 10px;
  /* Largura elegante */
  height: 10px;
  /* Altura para scroll horizontal */
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  /* Fundo escuro */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  /* Cor sutil inativo */
  border-radius: 5px;
  border: 2px solid var(--bg-primary);
  /* Borda para efeito de espaçamento */
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
  /* Destaque ao passar o mouse */
}

/* Compatibilidade Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-primary);
}

/* ========================================
   Custom Number Input Spinners (Global)
   ======================================== */
:root {
  color-scheme: dark;
  /* Garante controles nativos escuros */
}

/* ========================================
   Custom Number Input Spinners (Global)
   ======================================== */
:root {
  color-scheme: dark;
  /* Garante controles nativos escuros */
}

/* Remove estilo padrão do Firefox */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
  /* Standard property */
}

/* Estilização Webkit (Chrome, Edge, Safari) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: inner-spin-button !important;
  opacity: 0.2;
  /* Discreto por padrão */
  height: 100%;
  /* Ocupa toda altura */
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  cursor: pointer;
  transition: opacity 0.2s;
  /* Filtro para garantir contraste em fundo escuro se necessário */
  filter: invert(1);
}

input[type="number"]:hover::-webkit-inner-spin-button,
input[type="number"]:hover::-webkit-outer-spin-button {
  opacity: 1;
  /* Totalmente visível ao passar o mouse */
  background: var(--bg-secondary);
  /* Fundo sutil */
}

/* ========================================
   Custom Checkbox (Global)
   ======================================== */
input[type="checkbox"] {
  accent-color: var(--primary);
  /* Usa a cor primária do tema */
  width: 16px;
  height: 16px;
  cursor: pointer;
  filter: brightness(0.9);
}

input[type="checkbox"]:checked {
  filter: brightness(1);
}

/* ========================================
   TABS (Abas)
   ======================================== */

.tabs-container {
  width: 100%;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600; /* Aumentado peso */
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  background: rgba(233, 69, 96, 0.2); /* Hover mais visível */
  border-color: var(--primary);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff !important; /* Força branco */
  box-shadow: 0 4px 10px rgba(233, 69, 96, 0.4); /* Glow para destaque */
}

/* Row Styles for Tables */
.row-warning {
  background: rgba(245, 158, 11, 0.1) !important;
}

.row-danger {
  background: rgba(239, 68, 68, 0.1) !important;
}

.text-danger {
  color: var(--danger) !important;
  font-weight: 600;
}

.text-success {
  color: var(--success) !important;
}

/* Status badges for Contas */
.status-pago {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-vencido {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* ========================================
   TABLES
   ======================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: rgba(15, 15, 35, 0.6);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table td {
  color: var(--text-primary);
}

.action-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
  opacity: 0.7;
}

.action-btn:hover {
  background: var(--bg-glass);
  opacity: 1;
  transform: scale(1.1);
}

.btn-icon.small {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

/* ========================================
   MÓDULO PÁTIO (OPERACIONAL)
   ======================================== */

.patio-flow-monitor {
  display: flex;
  gap: 15px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.patio-flow-card {
  min-width: 160px;
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.patio-flow-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kanban-board {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 20px; /* Espaço para a barra de rolagem */
}

.kanban-col {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
  min-height: 500px;
  min-width: 300px; /* Largura mínima para evitar esmagamento */
  flex: 0 0 300px; /* Fixa largura */
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
}

.kanban-col-header {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  color: white;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-cards {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.patio-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  transition: var(--transition-fast);
}

.patio-card:active {
  cursor: grabbing;
}

.patio-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.mechanic-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.mechanic-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}

/* Tabs UI helper */
.tabs-container {
  display: flex;
  flex-direction: column;
}

.tabs-header {
  display: flex;
  gap: 5px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Responsividade Pátio */
@media (max-width: 1200px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }
}