:root {
  /* Prime Golfers Corporate Colors - Refined for a high-end luxury dashboard */
  --color-primary-dark: #12181c; /* Deepest Slate Charcoal */
  --color-primary: #1e293b; /* Elegant Dark Slate */
  --color-primary-light: #334155; /* Slate Light */
  --color-accent-gold: #b4c14d; /* Corporate Gold/Lime */
  --color-accent-teal: #0ea5e9; /* Vibrant Sky Blue */
  --color-teal-brand: #0eb39e; /* Signature Teal from FINEbank */

  --color-white: #ffffff;
  --color-white-soft: #f8fafc; /* Ultra clean light background */
  --color-white-mute: #e2e8f0; /* Border gray */

  --color-black: #0f172a; /* Slate 900 for dark text */
  --color-black-soft: #1e293b; /* Slate 800 */
  --color-black-mute: #64748b; /* Slate 500 for muted text */

  /* Semantic Colors - Refined modern palette */
  --color-success: #10b981; /* Modern Emerald green */
  --color-warning: #f59e0b; /* Modern Amber yellow */
  --color-danger: #ef4444; /* Modern Red */
  --color-info: #06b6d4; /* Modern Cyan */

  /* Theme Defaults */
  --color-background: var(--color-white-soft);
  --color-surface: var(--color-white);
  --color-text: var(--color-black);
  --color-text-muted: var(--color-black-mute);
  --color-border: var(--color-white-mute);
  
  /* Theme Custom Overrides helpers */
  --color-sidebar-bg: var(--color-primary-dark);
  --color-input-bg: var(--color-white);
  --color-border-hover: #d1d5db;
  --color-primary-hover: var(--color-primary-dark);

  /* Modern shadows & borders */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.03), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --border-radius-card: 16px;
  --border-radius-sm: 8px;
}

/* Dark Luxury Theme (Landing Page Theme) */

[data-theme="dark"] {
  --color-background: #0b0f17; /* Deep Slate / Near Black */
  --color-surface: #131924; /* Card Background */
  --color-white-soft: #1a2232; /* Hover background / alternate surface */
  --color-white-mute: rgba(255, 255, 255, 0.08); /* Borders */
  
  --color-text: #f8fafc; /* Bright text */
  --color-text-muted: #cbd5e1; /* Muted text */
  --color-border: rgba(255, 255, 255, 0.08); /* Borders */
  
  --color-primary: #10b981; /* Golf Green / Mint Emerald */
  --color-primary-dark: #f8fafc; /* Primary headings color */
  --color-primary-light: #34d399;
  --color-teal-brand: #10b981; 
  --color-accent-gold: #34d399;
  --color-accent-teal: #3b82f6;

  --color-white: #ffffff;
  --color-black: #f8fafc;
  --color-black-soft: #e2e8f0;
  --color-black-mute: #94a3b8;

  --color-sidebar-bg: #0d121c; /* Sidebar background */
  --color-input-bg: #1a2232; /* Input background */
  --color-border-hover: rgba(255, 255, 255, 0.15);
  --color-primary-hover: #059669;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.5);

  /* Overrides for hardcoded white backgrounds in components and pages */
  .card,
  .stat-card,
  .dashboard-card,
  .custom-table,
  .detail-card,
  .breakdown-modal,
  .cal-nav-btn,
  .cal-day-col,
  .palos-delivery-card,
  .modal-body,
  .service-row,
  .form-row-nested,
  .monthly-summary-box,
  .premium-tooltip,
  .annual-card,
  .finanzas-summary-card,
  .gantt-container,
  .sticky-col,
  .sticky-col-2 {
    background-color: var(--color-surface) !important;
    background: var(--color-surface) !important;
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
  }

  /* Sticky table headers and cols in Gantt table */
  .gantt-table th,
  .gantt-table th.sticky-col,
  .gantt-table th.sticky-col-2 {
    background-color: var(--color-white-soft) !important;
    background: var(--color-white-soft) !important;
    color: var(--color-text) !important;
  }

  /* Form inputs, textareas, selects, and inputs in modals and config pages */
  .modal-body input,
  .modal-body select,
  .modal-body textarea,
  .snapshot-date-input,
  .summary-table td.pct {
    background-color: var(--color-input-bg) !important;
    background: var(--color-input-bg) !important;
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
  }

  .modal-body input:focus,
  .modal-body select:focus,
  .modal-body textarea:focus,
  .snapshot-date-input:focus {
    border-color: var(--color-teal-brand) !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15) !important;
  }

  /* Labels and text muted */
  .form-group label,
  .palos-date-label,
  .cal-day-name,
  .cal-event-sub {
    color: var(--color-text-muted) !important;
  }

  /* Tooltips body text */
  .tooltip-body {
    color: var(--color-text) !important;
  }

  /* Hover states and alternate sections */
  .table-body > div:hover,
  .breakdown-table tr:hover td,
  .detail-panel,
  .breakdown-header,
  .breakdown-table th,
  .cal-day-header,
  .form-row-nested:hover,
  .service-row:hover,
  .transaction-row:hover {
    background-color: var(--color-white-soft) !important;
    background: var(--color-white-soft) !important;
  }

  /* Text colors inside specific tables and elements */
  .breakdown-table td,
  .cal-event-name,
  .palos-date-value,
  .detail-card li,
  .summary-table td,
  .compact-annual-table td {
    color: var(--color-text) !important;
  }

  /* Sutil elegant rows in Gantt/Palos table for dark luxury */
  .rented-row {
    background-color: rgba(239, 68, 68, 0.08) !important;
  }
  .maintenance-row {
    background-color: rgba(148, 163, 184, 0.08) !important;
  }
  .available-row {
    background-color: rgba(16, 185, 129, 0.08) !important;
  }
  .row-greenfees {
    background-color: rgba(59, 130, 246, 0.08) !important;
  }
  
  /* Gantt model alternating row backgrounds */
  .gantt-table tbody tr:nth-child(4n + 1) td,
  .gantt-table tbody tr:nth-child(4n + 1) th {
    background-color: rgba(16, 185, 129, 0.04) !important;
  }
  .gantt-table tbody tr:nth-child(4n + 3) td,
  .gantt-table tbody tr:nth-child(4n + 3) th {
    background-color: rgba(59, 130, 246, 0.04) !important;
  }
}

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

ul {
  list-style: none;
}

body {
  min-height: 100vh;
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.5;
  font-family:
    'Plus Jakarta Sans',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* Premium Action Buttons */

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background-color: var(--color-white-soft);
  color: var(--color-black-soft);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.btn-action:hover {
  background-color: var(--color-teal-brand);
  color: white;
  border-color: var(--color-teal-brand);
  box-shadow: 0 4px 12px rgba(14, 179, 158, 0.25);
  transform: translateY(-1px);
}

.btn-action.text-danger {
  color: var(--color-danger);
  border-color: #fee2e2;
  background-color: #fef2f2;
}

.btn-action.text-danger:hover {
  background-color: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

/* Global Mobile Responsiveness for Tables */

@media (max-width: 768px) {
  .table-container,
  .table-responsive,
  table,
  .custom-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

/* Componentes Globales UI */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover, var(--color-primary-dark));
}

.btn-secondary {
  background-color: var(--color-white-mute);
  color: var(--color-text);
}

.btn-secondary:hover {
  background-color: var(--color-border-hover, #d1d5db);
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Tablas */

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 24px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background-color: var(--color-white-soft);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.data-table tbody tr:hover {
  background-color: var(--color-white-soft);
}

/* Formularios */

.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  background-color: var(--color-input-bg, var(--color-white));
  color: var(--color-text);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
  font-family: inherit;
}

.form-group select option {
  background-color: var(--color-surface);
  color: var(--color-text);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-teal-brand, var(--color-primary));
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Modales */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background-color: var(--color-surface);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.25rem;
  color: var(--color-primary-dark);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: var(--color-text);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--color-white-soft);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* 
 * Layout base para la aplicación Prime Golfers
 */

html,
body,
#root {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#root {
  display: flex;
  flex-direction: row; /* Sidebar a la izquierda, contenido a la derecha */
}
.layout-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-background);
}

.sidebar {
  width: 260px;
  background-color: var(--color-sidebar-bg, var(--color-primary-dark));
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
  z-index: 10;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
  padding: 32px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 24px;
}

.sidebar-logo h2 {
  color: var(--color-white);
  font-weight: 800;
  letter-spacing: 1.5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--color-white);
  transform: translateX(4px);
}

.nav-item.active {
  background-color: var(--color-teal-brand);
  color: var(--color-white);
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(14, 179, 158, 0.25);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 60px;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 5;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

.page-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background-color: var(--color-background);
}

/* Dots Globales para Servicios */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.dot-green {
  background-color: #28a745;
}
.dot-blue {
  background-color: #007bff;
}
.dot-yellow {
  background-color: #ffc107;
}
.dot-red {
  background-color: #dc3545;
}
.dot-purple {
  background-color: #6f42c1;
}

.services-cell {
  display: flex;
  gap: 4px;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 8;
  opacity: 0;
  transition: opacity 0.3s;
}

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

/* Responsiveness */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    overflow-y: auto;
    overflow-x: hidden;
    left: -260px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .mobile-menu-btn {
    display: flex;
  }

  .topbar {
    padding: 0 16px;
  }
  
  .topbar > div:last-child {
    gap: 10px;
  }
  
  .page-content {
    padding: 16px;
  }
}

/* Custom CSS for responsive Layout Header/Sidebar */
.topbar-datetime {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-left: 10px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-license {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-actions-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Sidebar updates */
.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
  gap: 6px;
}

/* Sidebar Custom Scrollbar */
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Sidebar Actions (Mobile Only) */
.sidebar-top-actions {
  display: none !important;
  padding: 0 20px 15px;
  justify-content: space-between;
  align-items: center;
}

/* Sidebar License Card (Mobile only) */
.sidebar-license-card {
  margin: 0 16px 20px 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: none;
}

.sidebar-license-plan {
  font-size: 0.85rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sidebar-license-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: bold;
}

.sidebar-license-badge.trial {
  background-color: #f59e0b;
  color: #fff;
}

.sidebar-license-badge.expired {
  background-color: #ef4444;
  color: #fff;
}

.sidebar-license-badge.active {
  background-color: #10b981;
  color: #fff;
}

.sidebar-license-days {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.sidebar-upgrade-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-teal-brand) 0%, #0d9488 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2);
  transition: all 0.2s;
  outline: none;
}

.sidebar-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(13, 148, 136, 0.3);
}

/* Sidebar Footer (Mobile only) */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background-color: rgba(0, 0, 0, 0.15);
  display: none;
}

.sidebar-user-email {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.sidebar-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-logout-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.sidebar-logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: white;
}

/* Media Queries for responsive topbar/sidebar switching */
@media (max-width: 1024px) {
  .topbar-datetime {
    display: none;
  }
}

@media (max-width: 768px) {
  .topbar-license {
    display: none;
  }
  
  .topbar-actions-group {
    display: none;
  }
  
  .sidebar-top-actions {
    display: flex !important;
  }
  
  .sidebar-license-card {
    display: block;
  }
  
  .sidebar-footer {
    display: block;
    margin-bottom: 20px;
  }
  
  /* Global Responsive Adjustments for Data Tables and Toolbars */
  .table-toolbar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }
  
  .filter-group {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  
  .search-box {
    width: 100% !important;
  }
  
  .search-box input {
    width: 100% !important;
  }
  
  .header-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  /* Force data tables and calendar grids to be horizontally scrollable on mobile */
  .custom-table {
    overflow-x: auto;
    display: block;
    width: 100%;
  }
  
  .custom-table > div,
  .table-header,
  .table-body > div {
    min-width: 900px;
  }
  
  /* Force modal content to not exceed screen width */
  .modal-content, .side-panel {
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  /* Ensure page titles are smaller on mobile */
  .page-title {
    font-size: 1.4rem;
  }
}
/* Dashboard Styling - Cohesive Premium Design System */

.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-container .page-title {
  color: var(--color-black);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 8px;
}

.stat-card {
  background-color: var(--color-surface);
  border-radius: var(--border-radius-card);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-info h3 {
  color: var(--color-black-mute);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  color: var(--color-black);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sections Layout */
.dashboard-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card {
  background-color: var(--color-surface);
  border-radius: var(--border-radius-card);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-black);
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Custom Table Premium Styling */
.custom-table {
  margin-top: 20px;
  border: 1px solid var(--color-border) !important;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background-color: white;
}

.table-header {
  background-color: var(--color-white-soft) !important;
  border-bottom: 1px solid var(--color-border) !important;
  color: var(--color-black-mute) !important;
  font-weight: 700 !important;
  font-size: 0.725rem !important;
  letter-spacing: 0.5px !important;
  padding: 14px 24px !important;
}

.table-body > div {
  transition: background-color 0.2s ease;
}

.table-body > div:hover {
  background-color: #f8fafc !important;
}

/* Service Dot Indicators */
.dot-container {
  display: flex;
  gap: 5px;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0;
}

.dot-green {
  background-color: var(--color-success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.dot-blue {
  background-color: var(--color-accent-teal);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}
.dot-yellow {
  background-color: var(--color-warning);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}
.dot-red {
  background-color: var(--color-danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}
.dot-purple {
  background-color: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* Legend indicators */
.dashboard-legend span {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--color-black-mute) !important;
}

/* Detail Panel for Table Expansion */
.detail-panel {
  background-color: #f8fafc !important;
  border-left: 4px solid var(--color-teal-brand) !important;
  border-bottom: 1px solid var(--color-border) !important;
  padding: 24px !important;
}

.detail-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  background: white;
  padding: 16px;
  transition: border-color 0.2s ease;
}

.detail-card:hover {
  border-color: #cbd5e1;
}

.detail-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 12px;
}

.detail-card li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border);
  color: var(--color-black-soft);
  font-size: 0.825rem;
}

.detail-card li:last-child {
  border-bottom: none;
}

/* INTERACTIVE BREAKDOWN POPUP MODAL */
.breakdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.18s ease-out;
}

.breakdown-modal {
  background-color: white;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.15),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--color-border);
  overflow: hidden;
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  background-color: #f8fafc;
}

.breakdown-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-black);
  margin: 0;
}

.breakdown-close-btn {
  background: none;
  border: none;
  color: var(--color-black-mute);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s;
}

.breakdown-close-btn:hover {
  background-color: var(--color-white-soft);
  color: var(--color-black);
}

.breakdown-body {
  padding: 24px;
  overflow-y: auto;
}

.breakdown-body h3 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-black);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.breakdown-stat-banner {
  background-color: #f0fdf4;
  border: 1px dashed #bbf7d0;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #166534;
  margin-bottom: 20px;
}

.breakdown-stat-banner strong {
  font-size: 1.05rem;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.breakdown-table th {
  padding: 8px 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--color-border);
  text-align: left;
  background-color: #f8fafc;
}

.breakdown-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-black);
  font-weight: 500;
  font-size: 0.775rem;
}

.breakdown-table tr:hover td {
  background-color: #f8fafc;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== WEEKLY CALENDAR ===== */
.cal-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: white;
  color: var(--color-black-mute);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.cal-nav-btn:hover {
  background: var(--color-white-soft);
  border-color: var(--color-teal-brand);
  color: var(--color-teal-brand);
}

.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  min-height: 160px;
}

.cal-day-col {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  background: white;
  transition: border-color 0.2s ease;
}

.cal-day-col:hover {
  border-color: #cbd5e1;
}

.cal-today {
  border-color: var(--color-teal-brand) !important;
  box-shadow: 0 0 0 2px rgba(14, 179, 158, 0.15);
}

.cal-day-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 6px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-white-soft);
}

.cal-day-name {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-black-mute);
}

.cal-day-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-black);
  margin-top: 2px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-day-num-today {
  background: var(--color-teal-brand);
  color: white;
}

.cal-day-body {
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 80px;
}

.cal-event {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: default;
  transition: opacity 0.15s ease;
}

.cal-event:hover {
  opacity: 0.85;
}

.cal-event-reserva {
  background: rgba(14, 179, 158, 0.08);
  border-left: 3px solid var(--color-teal-brand);
}

.cal-event-palos-entrega {
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid #0ea5e9;
}

.cal-event-palos-devolucion {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
}

.cal-event-greenfee {
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid #10b981;
}

.cal-event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.cal-event-content {
  flex: 1;
  min-width: 0;
}

.cal-event-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-sub {
  font-size: 0.63rem;
  color: var(--color-black-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.cal-event-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}

.cal-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.cal-badge-start {
  background: rgba(14, 179, 158, 0.18);
  color: var(--color-teal-brand);
}

.cal-badge-end {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}

.cal-empty {
  flex: 1;
}

.cal-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--color-black-mute);
  font-weight: 600;
}

.cal-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ===== PALOS DELIVERY PANEL ===== */
.palos-delivery-panel {
  border-left: 4px solid var(--color-accent-teal);
}

.palos-delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.palos-delivery-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  background: white;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.palos-delivery-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.palos-urgent {
  border-color: var(--color-danger) !important;
  background: rgba(239, 68, 68, 0.03);
}

.palos-warning {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.03);
}

.palos-delivery-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.palos-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

.palos-badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}

.palos-badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
}

.palos-badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.palos-delivery-dates {
  display: flex;
  align-items: center;
  gap: 10px;
}

.palos-date-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.palos-date-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-black-mute);
}

.palos-date-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-black);
}

.palos-date-arrow {
  font-size: 1.2rem;
  color: var(--color-black-mute);
  flex-shrink: 0;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.table-toolbar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.search-box {
  position: relative;
  width: 300px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.search-box input {
  width: 100%;
  padding: 10px 10px 10px 40px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.filter-group {
  display: flex;
  gap: 16px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-light);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.filter-icon {
  color: var(--color-text-muted);
}

.filter-select {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--color-text-main);
  outline: none;
  cursor: pointer;
}
.legend-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 10px 20px;
  background: var(--color-surface);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.services-cell {
  width: 100px;
  min-width: 100px;
  padding-left: 20px !important;
}

.dot-container {
  display: flex;
  gap: 6px;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Modal Form Specifics */
.form-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-white-mute);
}

.form-section-header h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-primary-dark);
}

.form-row-nested {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  background: var(--color-white-soft);
  padding: 10px;
  border-radius: 8px;
  align-items: center;
}

.form-row-nested input,
.form-row-nested select {
  padding: 8px !important;
  font-size: 0.9rem !important;
}

.text-danger {
  color: var(--color-danger) !important;
}

.detail-row td {
  padding: 0 !important;
  border-bottom: 2px solid var(--color-border) !important;
}

.detail-panel {
  background-color: var(--color-white-soft);
  padding: 20px;
  border-left: 4px solid var(--color-primary);
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section h4,
.detail-card h4 {
  margin-bottom: 10px;
  color: var(--color-primary-dark);
  font-size: 1.05rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 5px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.detail-card {
  background: var(--color-surface);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.detail-card ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.detail-card li {
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 1px dashed var(--color-white-mute);
}

.detail-card li:last-child {
  border-bottom: none;
}

/* TABLE ALIGNMENT & BUTTONS */
.data-table th,
.data-table td {
  padding: 12px 15px;
  vertical-align: middle;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.services-cell {
  width: 120px;
  min-width: 120px;
}

.btn-icon {
  background: var(--color-white-mute);
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-primary-dark);
}

.btn-icon:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-icon.text-danger {
  color: var(--color-danger);
}

.btn-icon.text-danger:hover {
  background: var(--color-danger);
  color: var(--color-white);
}

.table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

/* --- REDISEÑO PREMIUM DE FORMULARIOS --- */

/* Contenedor General del Formulario en el Modal */
.modal-body {
  padding: 30px !important;
  background-color: #fcfdfe;
}

/* Todos los Inputs, Selects y Textareas */
.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  background-color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  color: #334155;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Efecto de Foco "Glow" Moderno */
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  border-color: #6366f1;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}

/* Estilización especial para Calendarios (Date Inputs) */
.modal-body input[type='date'] {
  position: relative;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

/* Filas de Servicios (Palos, Hoteles, etc.) */
.service-row,
.form-row-nested {
  background: #ffffff !important;
  padding: 18px !important;
  border-radius: 16px !important;
  border: 1px solid #f1f5f9 !important;
  margin-bottom: 15px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.3s ease !important;
  display: grid !important;
  align-items: flex-end !important;
}

.service-row:hover,
.form-row-nested:hover {
  border-color: #e2e8f0 !important;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06) !important;
  transform: scale(1.002);
}

/* Etiquetas (Labels) con estilo Pro */
.form-group label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #64748b !important;
}

/* Botones de acción dentro del formulario */
.btn-link {
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-link:hover {
  filter: brightness(0.8);
  transform: translateX(3px);
}

/* Personalización del Select nativo */
.modal-body select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 45px;
  appearance: none;
}

/* Compact inputs inside grid service rows to ensure numbers fit perfectly */
.service-row input,
.form-row-nested input {
  padding: 8px 12px !important;
  font-size: 0.9rem !important;
}

.service-row select,
.form-row-nested select {
  padding: 8px 35px 8px 12px !important; /* Safe space for the custom arrow */
  font-size: 0.9rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.month-selector {
  display: flex;
  align-items: center;
  gap: 16px;
}

.current-month-label {
  font-weight: 600;
  font-size: 1.1rem;
  min-width: 150px;
  text-align: center;
}

.gantt-container {
  overflow-x: auto;
  overflow-y: auto;
  background: var(--color-white);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  flex-grow: 1;
  width: 100%;
}

.gantt-container::-webkit-scrollbar {
  height: 10px;
}
.gantt-container::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 10px;
}
.gantt-container::-webkit-scrollbar-track {
  background: var(--color-white-soft);
}

.gantt-table {
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
}

.gantt-table th,
.gantt-table td {
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 4px;
}

.gantt-table th {
  background: var(--color-white-soft);
  position: sticky;
  top: 0;
  z-index: 10;
  font-size: 0.8rem;
}

.sticky-col {
  position: sticky;
  left: 0;
  background: var(--color-surface);
  z-index: 11;
  min-width: 250px;
  font-weight: 600;
  font-size: 0.85rem;
}

.sticky-col-2 {
  position: sticky;
  left: 250px;
  background: var(--color-surface);
  z-index: 11;
  min-width: 40px;
  font-weight: 600;
  border-right: 2px solid var(--color-border) !important;
}

.gantt-table th.sticky-col,
.gantt-table th.sticky-col-2 {
  z-index: 12;
  background: var(--color-white-soft);
}

.gantt-col-day {
  min-width: 50px;
  text-align: center;
}

.day-name {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.day-number {
  font-weight: 600;
}

.gantt-cell {
  position: relative;
  height: 30px;
}

.gantt-cell.rented {
  background-color: var(--color-teal-brand); /* Verde/Teal Corporativo */
}

.rental-label {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-black);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.7);
  padding: 1px 4px;
  border-radius: 4px;
  z-index: 5;
  pointer-events: none;
}

/* Modificamos los bg de los modelos basándonos en la foto para que se deslicen horizontalmente */
.gantt-table tbody tr:nth-child(4n + 1) td,
.gantt-table tbody tr:nth-child(4n + 1) th {
  background-color: #e8f5e9;
}

.gantt-table tbody tr:nth-child(4n + 3) td,
.gantt-table tbody tr:nth-child(4n + 3) th {
  background-color: #e3f2fd;
}

.gantt-table tbody tr td.rented {
  background-color: var(--color-teal-brand) !important;
}

.gantt-cell.blocked-cell,
.gantt-table tbody tr td.blocked-cell {
  background-color: #fee2e2 !important;
  border-color: #fca5a5;
}

.gantt-table tbody tr td.blocked-cell:hover {
  background-color: #fecaca !important;
}

.is-today {
  background-color: rgba(255, 193, 7, 0.1) !important; /* Soft gold for today */
}

th.is-today {
  color: var(--color-warning);
}

.gantt-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Filas de Totales */
.row-total td {
  height: 40px;
  font-size: 0.8rem;
}

.rented-row {
  background-color: #fdf2f2;
}
.maintenance-row {
  background-color: #f9fafb;
}
.available-row {
  background-color: #f0fdf4;
}
.row-greenfees {
  background-color: #f8fafc;
  border-top: 2px solid var(--color-border);
}

/* Cuadro Resumen Mensual (Teal) */
.monthly-summary-box {
  background-color: rgba(14, 179, 158, 0.05);
  border: 1px solid var(--color-teal-brand);
  border-radius: 8px;
  padding: 15px;
  min-width: 250px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
}

.summary-table td {
  padding: 5px;
  font-size: 0.85rem;
  font-weight: 600;
}

.summary-table td.val {
  text-align: right;
  font-family: monospace;
  font-size: 1rem;
}

.summary-table td.pct {
  background: white;
  border: 1px solid var(--color-teal-brand);
  color: var(--color-teal-brand);
  text-align: center;
  padding: 8px;
  font-size: 1.2rem;
  border-radius: 4px;
  font-weight: 800;
}

/* Premium Tooltip */
.premium-tooltip {
  position: fixed;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  pointer-events: none;
  min-width: 180px;
  overflow: hidden;
}

.tooltip-header {
  background: var(--color-primary);
  color: white;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.tooltip-body {
  padding: 10px 12px;
  font-size: 0.75rem;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Annual Stats Compact */
.annual-stats-container {
  margin-top: 30px;
  width: 100%;
}

.annual-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.card-header {
  padding: 12px 20px;
  background: var(--color-white-soft);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--color-primary);
}

.compact-table-container {
  padding: 15px;
}

.compact-annual-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.compact-annual-table th {
  background: var(--color-primary);
  color: white;
  padding: 8px;
  text-align: center;
}

.compact-annual-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.compact-annual-table td.m-name {
  font-weight: 700;
  background: var(--color-white-soft);
  text-transform: capitalize;
}

.compact-annual-table td.val {
  text-align: center;
  font-family: monospace;
}

.compact-annual-table td.val.current {
  background-color: rgba(14, 179, 158, 0.1);
  color: var(--color-teal-brand);
  font-weight: 800;
}

.compact-annual-table tfoot td {
  background: var(--color-primary-dark);
  color: white;
  font-weight: 700;
  padding: 8px;
  text-align: center;
}

/* Card Header flex arrangement */
.annual-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 12px 20px;
}

.header-title-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-filter-section {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--color-text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.filter-label {
  user-select: none;
}

/* Switch styling */
.switch-container {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  margin-bottom: 0;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 20px;
}

.switch-slider:before {
  position: absolute;
  content: '';
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch-container input:checked + .switch-slider {
  background-color: var(--color-primary);
}

.switch-container input:checked + .switch-slider:before {
  transform: translateX(18px);
}

/* Date input styling */
.snapshot-date-input {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  outline: none;
  background: white;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.snapshot-date-input:focus:not(:disabled) {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.snapshot-date-input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .gantt-wrapper {
    flex-direction: column;
  }
  .monthly-summary-box {
    width: 100%;
    margin-top: 10px;
  }
  .gantt-container {
    width: 100%;
  }

  .sticky-col {
    min-width: 120px !important;
    max-width: 120px !important;
    font-size: 0.75rem;
    padding: 4px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sticky-col-2 {
    left: 120px !important;
    min-width: 35px !important;
    font-size: 0.7rem;
    padding: 4px !important;
  }
}

/* Custom styling for non-rentable dates as solid grey squares */
.gantt-table tbody tr td.not-rentable-cell {
  background-color: #e2e8f0 !important; /* light mode: slate-200 */
}

[data-theme="dark"] .gantt-table tbody tr td.not-rentable-cell {
  background-color: #1e293b !important; /* dark mode: slate-800 */
}

/* Layout grids for performance and annual comparison tables */
.stats-double-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.stats-triple-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  margin-bottom: 20px;
}

.stats-quad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  margin-bottom: 20px;
}

@media (max-width: 1600px) {
  .stats-quad-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) {
  .stats-triple-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .stats-double-grid,
  .stats-triple-grid,
  .stats-quad-grid {
    grid-template-columns: 1fr;
  }
}
/* Finanzas Page Stylesheet - Cohesive Premium Design System */

.finanzas-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.25s ease;
}

/* Page Header */
.finance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.finance-header h1 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-black);
  letter-spacing: -0.5px;
}

/* KPI Grid: 6 premium cards */
.finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.finance-kpi-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.finance-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

/* Glow effects for highlighted categories */
.finance-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.finance-kpi-card.highlight-emerald::before {
  background-color: #10b981;
}
.finance-kpi-card.highlight-amber::before {
  background-color: #f59e0b;
}
.finance-kpi-card.highlight-coral::before {
  background-color: #ef4444;
}
.finance-kpi-card.highlight-purple::before {
  background-color: #8b5cf6;
}
.finance-kpi-card.highlight-blue::before {
  background-color: #3b82f6;
}
.finance-kpi-card.highlight-teal::before {
  background-color: var(--color-teal-brand);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-black-mute);
  text-transform: uppercase;
  letter-spacing: 0.75px;
}

.kpi-header svg {
  opacity: 0.6;
}

.finance-kpi-card.highlight-emerald .kpi-header svg {
  color: #10b981;
  opacity: 1;
}
.finance-kpi-card.highlight-amber .kpi-header svg {
  color: #f59e0b;
  opacity: 1;
}
.finance-kpi-card.highlight-coral .kpi-header svg {
  color: #ef4444;
  opacity: 1;
}
.finance-kpi-card.highlight-purple .kpi-header svg {
  color: #8b5cf6;
  opacity: 1;
}
.finance-kpi-card.highlight-blue .kpi-header svg {
  color: #3b82f6;
  opacity: 1;
}
.finance-kpi-card.highlight-teal .kpi-header svg {
  color: var(--color-teal-brand);
  opacity: 1;
}

.kpi-body {
  margin: 12px 0;
  display: flex;
  align-items: center;
}

.kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-black);
  letter-spacing: -0.5px;
}

.kpi-value-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.kpi-footer {
  font-size: 0.7rem;
  color: var(--color-black-mute);
  font-weight: 500;
}

/* Inline balance editor */
.inline-editor {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.inline-editor input {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background-color: var(--color-white-soft);
  color: var(--color-black);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  width: 120px;
  outline: none;
}

.inline-editor input:focus {
  border-color: var(--color-teal-brand);
  background-color: white;
}

.btn-ok {
  background-color: var(--color-teal-brand);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-ok:hover {
  background-color: #0c9e8a;
}

.btn-cancel {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-black-mute);
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-cancel:hover {
  background-color: var(--color-white-soft);
  color: var(--color-black);
}

.btn-edit-inline {
  background-color: var(--color-white-soft);
  border: 1px solid var(--color-border);
  color: var(--color-black);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit-inline:hover {
  background-color: var(--color-border);
}

/* Split Columns Layout */
.finance-split-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

@media (max-width: 992px) {
  .finance-split-container {
    grid-template-columns: 1fr;
  }
}

.form-column {
  display: flex;
  flex-direction: column;
}

.form-column h2,
.feed-column h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-black);
  margin-bottom: 4px;
}

/* Direct Form Styling */
.direct-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-black-mute);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-field input,
.form-field select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background-color: var(--color-white-soft);
  color: var(--color-black);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
}

.form-field input:focus,
.form-field select:focus {
  background-color: white;
  border-color: var(--color-teal-brand);
  box-shadow: 0 0 0 3px rgba(14, 179, 158, 0.1);
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-direct-submit {
  background-color: var(--color-primary-dark);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  box-shadow: var(--shadow-sm);
}

.btn-direct-submit:hover:not(:disabled) {
  background-color: var(--color-teal-brand);
  box-shadow: 0 4px 12px rgba(14, 179, 158, 0.2);
}

.btn-direct-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Feed Column and Transaction List */
.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tabs-container {
  display: inline-flex;
  background-color: var(--color-white-soft);
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
  border: 1px solid var(--color-border) !important;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-black-mute);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-btn.active {
  background-color: white;
  color: var(--color-black);
  box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
  color: var(--color-black);
  background-color: rgba(255, 255, 255, 0.5);
}

.transaction-list-direct {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.transaction-row-direct {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.transaction-row-direct:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: #cbd5e1;
}

.transaction-row-direct .trans-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.transaction-row-direct .trans-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transaction-row-direct .trans-info {
  display: flex;
  flex-direction: column;
}

.transaction-row-direct .trans-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.2;
}

.transaction-row-direct .trans-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  color: var(--color-black-mute);
  margin-top: 2px;
}

.transaction-row-direct .trans-badge {
  background-color: var(--color-white-soft);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.6rem;
}

.transaction-row-direct .trans-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.transaction-row-direct .trans-amount {
  font-size: 0.775rem;
  font-weight: 800;
  text-align: right;
}

.transaction-row-direct .trans-amount.ingreso {
  color: #10b981;
}

.transaction-row-direct .trans-amount.gasto {
  color: var(--color-black);
}

.btn-delete-trans-direct {
  background: none;
  border: none;
  color: var(--color-black-mute);
  padding: 3px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.3;
}

.transaction-row-direct:hover .btn-delete-trans-direct {
  opacity: 1;
}

.btn-delete-trans-direct:hover {
  background-color: #fee2e2;
  color: var(--color-danger);
}

/* INTERACTIVE BREAKDOWN POPUP MODAL */
.breakdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.18s ease-out;
}

.breakdown-modal {
  background-color: white;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.15),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--color-border);
  overflow: hidden;
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  background-color: #f8fafc;
}

.breakdown-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-black);
  margin: 0;
}

.breakdown-close-btn {
  background: none;
  border: none;
  color: var(--color-black-mute);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s;
}

.breakdown-close-btn:hover {
  background-color: var(--color-white-soft);
  color: var(--color-black);
}

.breakdown-body {
  padding: 24px;
  overflow-y: auto;
}

.breakdown-body h3 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-black);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.breakdown-stat-banner {
  background-color: #f0fdf4;
  border: 1px dashed #bbf7d0;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #166534;
  margin-bottom: 20px;
}

.breakdown-stat-banner strong {
  font-size: 1.05rem;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.breakdown-table th {
  padding: 8px 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--color-border);
  text-align: left;
  background-color: #f8fafc;
}

.breakdown-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-black);
  font-weight: 500;
  font-size: 0.775rem;
}

.breakdown-table tr:hover td {
  background-color: #f8fafc;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Charts Grid */
.finance-charts-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}

@media (max-width: 992px) {
  .finance-charts-grid {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--color-black-mute);
  font-size: 0.8rem;
  font-weight: 500;
}

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

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Responsive charts grid and mobile layout fixes */
.finance-charts-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.top-performers-header-box {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-performers-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-performers-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.top-preset-btn {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.top-preset-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.top-preset-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 6px rgba(14, 179, 158, 0.3);
}

.top-date-input {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  color: var(--color-black);
  background: #ffffff;
  outline: none;
  font-weight: 500;
}

.top-date-input:focus {
  border-color: var(--color-primary);
}

.top-performers-primary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

.top-performers-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 24px;
}

.dashboard-card-large {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-card-large:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(14, 179, 158, 0.4);
}

.card-header-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-pill-green {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
}

.stat-pill-red {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
}

.stat-pill-blue {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
}

.stat-pill-pax {
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.chart-clickable-hint {
  font-size: 0.75rem;
  color: var(--color-black-mute);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8fafc;
  border-radius: 8px;
  margin-top: 10px;
}

.recharts-bar-rectangle {
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.recharts-bar-rectangle:hover {
  filter: brightness(1.12);
}

.transaction-row-direct .trans-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.transaction-row-direct .trans-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1100px) {
  .top-performers-primary-grid,
  .top-performers-secondary-grid,
  .finance-charts-subgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .finance-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .top-performers-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Top Palos 5 + Resto styles */
.resto-palos-section {
  margin-top: 14px;
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.resto-palos-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(248, 250, 252, 0.85);
  user-select: none;
  transition: background 0.2s ease;
}

.resto-palos-header:hover {
  background: rgba(139, 92, 246, 0.08);
}

.resto-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: var(--color-white-soft);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.15s ease;
}

.resto-item-row:hover {
  border-color: #8b5cf6;
  background-color: rgba(139, 92, 246, 0.04);
  transform: translateX(2px);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
}

.rank-badge-top {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.rank-badge-resto {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.expanded-section {
  background-color: #f0f4f8;
  border-left: 6px solid var(--color-accent-gold);
  border-bottom: 1px solid var(--color-border);
  margin: 0;
  padding: 20px;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.08);
}

.inline-tarifa-form {
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(26, 37, 43, 0.03);
  border-radius: 8px;
  margin-bottom: 15px;
  align-items: center;
}

.inline-tarifa-form input {
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.tarifas-list {
  padding: 0 20px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tarifa-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tarifa-item:hover {
  border-color: var(--color-primary);
  transform: translateX(5px);
}

.row-active {
  background-color: rgba(26, 37, 43, 0.02);
}

.btn-icon {
  background: rgba(26, 37, 43, 0.05);
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-primary);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(26, 37, 43, 0.1);
  transform: scale(1.05);
}

.btn-icon.active {
  background: var(--color-accent-gold);
  color: var(--color-primary-dark);
  box-shadow: 0 4px 8px rgba(180, 193, 77, 0.3);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Responsive grid and forms for mobile */
.config-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.add-service-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.add-campo-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: flex-end;
}

@media (max-width: 992px) {
  .config-sections-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .add-service-form {
    grid-template-columns: 1fr;
  }
  
  .add-campo-form {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}
.facturacion-clientes-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.creator-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 30px;
  align-items: start;
}

.creator-left-pane {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding-right: 20px;
}

@media (max-width: 1024px) {
  .creator-grid {
    grid-template-columns: 1fr;
  }
  .creator-left-pane {
    border-right: none;
    padding-right: 0;
    margin-bottom: 20px;
  }
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.nuevo-doc-card {
  padding: 30px !important;
}

.lines-list {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 5px;
}

.totals-box-card {
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.totals-box-card:hover {
  border-color: var(--color-teal-brand) !important;
  box-shadow: var(--shadow-sm);
}

.tab-buttons .btn {
  font-size: 0.85rem;
  padding: 8px 16px;
  font-weight: 600;
  text-transform: none;
}

.text-muted {
  color: var(--color-text-muted);
}
.page-subtitle {
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Premium Form Control styling for inline inputs */
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: var(--color-white);
  color: var(--color-text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 111, 80, 0.1);
}
.facturacion-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--border-radius-card);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-teal-brand);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 4px;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--color-black-mute);
  margin-top: 2px;
}

/* Badges for service types */
.badge-type {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-type.golf {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.badge-type.alojamiento {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge-type.transfer {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.badge-type.adicional {
  background-color: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-align: center;
}

.status-badge.pagado {
  background-color: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.pendiente {
  background-color: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-success {
  color: #10b981;
  font-weight: 600;
}

.text-danger {
  color: #ef4444;
  font-weight: 600;
}

/* Bulk Action Bar Styles */
.bulk-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  padding: 16px 24px;
  border-radius: var(--border-radius-card);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-teal-brand);
  margin-bottom: 20px;
  animation: slideInDown 0.3s ease forwards;
}

.bulk-action-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-row {
  background-color: rgba(14, 179, 158, 0.05) !important;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.admin-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  align-items: start;
}

.admin-nav-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-nav-btn:hover {
  background: var(--color-white-soft);
  color: var(--color-primary);
}

.admin-nav-btn.active {
  background: var(--color-primary);
  color: white;
}

.admin-content-pane {
  flex: 1;
}

.admin-card {
  padding: 30px;
}

.admin-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.admin-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 24px;
  margin-bottom: 12px;
}

/* Form layout for custom theme customizer */
.branding-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.logo-upload-wrapper {
  margin-top: 8px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Modals inputs styling */
.form-control:focus {
  outline: none;
  border-color: var(--color-teal-brand) !important;
  box-shadow: 0 0 0 3px rgba(14, 179, 158, 0.15);
}

.text-warning {
  color: #d97706;
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}
.login-container {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: #0b0f17; /* Deep Slate / Near Black */
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  color: #f8fafc;
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 15% 50%, rgba(16, 185, 129, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(52, 211, 153, 0.15), transparent 25%);
  z-index: 1;
}

.login-glass-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  background: rgba(19, 25, 36, 0.75); /* Glass Surface */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08); /* Border Glow */
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-circle {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #10b981, #34d399);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.login-logo-circle svg {
  width: 32px;
  height: 32px;
}

.login-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.login-header p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

.login-error-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  color: #ef4444;
  margin-bottom: 24px;
  font-size: 0.9rem;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.login-error-alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-input-group input {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  color: #f8fafc;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.login-input-group input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.login-submit-btn {
  margin-top: 10px;
  background: #10b981;
  color: #0b0f17;
  border: 1px solid #10b981;
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(16, 117, 85, 0.35);
}

.login-submit-btn:hover:not(:disabled) {
  background: #059669;
  border-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
}

.login-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border-top-color: #0b0f17;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-mode-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}

.mode-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #94a3b8;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-btn.active {
  background: #10b981;
  color: #0b0f17;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.mode-btn:hover:not(.active) {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.04);
}

.login-config-toggle {
  text-align: center;
}

.config-toggle-btn {
  transition: opacity 0.2s ease;
}

.config-toggle-btn:hover {
  opacity: 0.85;
}

.login-config-form {
  animation: slideDownFade 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-footer {
  margin-top: 32px;
  text-align: center;
}

.login-footer p {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}
