/* ZA - Sistema de Registro de Horas - Estilos CSS */

:root {
  --firmax-brown: rgb(93, 79, 75);
  --firmax-orange: rgb(233, 131, 0);
  --firmax-beige: rgb(241, 227, 187);
  --firmax-light: #ffffff;
  --firmax-gray: #f8f9fa;
  --firmax-dark: #343a40;
  --firmax-success: #28a745;
  --firmax-warning: #ffc107;
  --firmax-danger: #dc3545;
  --firmax-info: #17a2b8;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* RESET Y BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(
    135deg,
    var(--firmax-beige) 0%,
    var(--firmax-gray) 100%
  );
  min-height: 100vh;
  color: var(--firmax-dark);
  line-height: 1.6;
}

/* LOGIN STYLES */
#loginSection {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--firmax-brown) 0%,
    rgba(93, 79, 75, 0.8) 100%
  );
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
}

.login-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-header {
  margin-bottom: 2rem;
}

.login-header .logo-placeholder {
  width: 60px;
  height: auto;
  /* height: 60px; */
  background: linear-gradient(
    135deg,
    var(--firmax-orange),
    rgba(233, 131, 0, 0.8)
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-sm);
}

.login-header .company-name {
  font-size: 2rem;
  font-weight: 300;
  color: var(--firmax-brown);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: #6c757d;
  font-size: 0.9rem;
}

/* HEADER */
.header {
  background: linear-gradient(
    135deg,
    var(--firmax-brown) 0%,
    rgba(93, 79, 75, 0.95) 100%
  );
  color: white;
  padding: 1rem 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-placeholder {
  width: 40px;
  height: auto;
  /* height: 40px; */
  background: linear-gradient(
    135deg,
    var(--firmax-orange),
    rgba(233, 131, 0, 0.8)
  );
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  box-shadow: var(--shadow-sm);
}

.company-name {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 1px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(
    135deg,
    var(--firmax-orange),
    rgba(233, 131, 0, 0.8)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-normal);
  font-size: 0.85rem;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* MAIN LAYOUT */
.main-container {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 2rem;
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
}

/* LEFT PANEL */
.left-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* DASHBOARD COMPACTO */
.dashboard-card {
  background: white;
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--firmax-orange);
}

.dashboard-title {
  color: var(--firmax-brown);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hours-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

.hours-item {
  text-align: center;
  padding: 0.5rem;
  background: linear-gradient(
    135deg,
    var(--firmax-beige),
    rgba(241, 227, 187, 0.5)
  );
  border-radius: 6px;
  transition: var(--transition-normal);
}

.hours-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.hours-number {
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.15rem;
  font-family: "Courier New", monospace;
}

.hours-label {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 500;
}

/* FORM SECTION */
.form-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  flex: 1;
}

.form-title {
  color: var(--firmax-brown);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-icon {
  width: 20px;
  height: 20px;
  background: var(--firmax-orange);
  border-radius: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

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

.form-label {
  font-weight: 500;
  color: var(--firmax-brown);
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.form-control {
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: var(--transition-normal);
  background: white;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-control:focus {
  outline: none;
  border-color: var(--firmax-orange);
  box-shadow: 0 0 0 3px rgba(233, 131, 0, 0.1);
}

.form-control:disabled {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

.form-row-3 .form-control {
  font-size: 0.8rem;
  padding: 0.65rem;
}

/* TIME INPUT SIMPLE */
.time-input-container {
  position: relative;
  max-width: 120px;
}

.time-input-simple {
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 1px;
  background: rgba(241, 227, 187, 0.3);
  border: 2px solid var(--firmax-orange);
  width: 100%;
  max-width: 120px;
}

.time-input-simple:focus {
  background: white;
  box-shadow: 0 0 0 3px rgba(233, 131, 0, 0.2);
}

.time-input-simple.error {
  border-color: var(--firmax-danger);
  background: rgba(220, 53, 69, 0.1);
}

.time-help {
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* BOTONES GENERALES */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--firmax-orange),
    rgba(233, 131, 0, 0.9)
  );
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(
    135deg,
    rgba(233, 131, 0, 0.9),
    var(--firmax-orange)
  );
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* RIGHT PANEL */
.right-panel {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.records-header {
  background: linear-gradient(
    135deg,
    var(--firmax-brown),
    rgba(93, 79, 75, 0.9)
  );
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.records-title {
  font-size: 1.2rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.records-filters {
  padding: 1rem 1.5rem;
  background: var(--firmax-gray);
  border-bottom: 1px solid #dee2e6;
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 120px;
}

.filter-label {
  font-size: 0.8rem;
  color: var(--firmax-brown);
  font-weight: 500;
}

.filter-control {
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: var(--transition-fast);
}

.filter-control:focus {
  outline: none;
  border-color: var(--firmax-orange);
  box-shadow: 0 0 0 2px rgba(233, 131, 0, 0.1);
}

.records-content {
  flex: 1;
  overflow-y: auto;
  max-height: 500px;
}

/* LOADING */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #6c757d;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--firmax-orange);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* NO RECORDS */
.no-records {
  text-align: center;
  padding: 3rem 2rem;
  color: #6c757d;
}

.no-records-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* TABLE */
.records-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.records-table th {
  background: var(--firmax-beige);
  color: var(--firmax-brown);
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  border-bottom: 2px solid var(--firmax-brown);
  position: sticky;
  top: 0;
  z-index: 10;
}

.records-table th:nth-child(1) {
  width: 12%;
} /* Fecha */
.records-table th:nth-child(2) {
  width: 22%;
} /* Cliente */
.records-table th:nth-child(3) {
  width: 26%;
} /* Proyecto */
.records-table th:nth-child(4) {
  width: 28%;
} /* Actividad */
.records-table th:nth-child(5) {
  width: 10%;
} /* Tiempo */
.records-table th:nth-child(6) {
  width: 12%;
} /* Estado */
.records-table th:nth-child(7) {
  width: 12%;
} /* Acciones */

.records-table tbody tr {
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
}

.records-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.8rem;
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
  vertical-align: middle;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.record-date {
  font-weight: 500;
  color: var(--firmax-brown);
}

.record-time {
  font-weight: bold;
  color: var(--firmax-orange);
  font-family: "Courier New", monospace;
}

.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-active {
  background: rgba(40, 167, 69, 0.1);
  color: var(--firmax-success);
}

.status-review {
  background: rgba(255, 193, 7, 0.1);
  color: var(--firmax-warning);
}

.status-approved {
  background: rgba(0, 123, 255, 0.1);
  color: #007bff;
}

.facturable-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.facturable-si {
  background: rgba(40, 167, 69, 0.1);
  color: var(--firmax-success);
}

.facturable-no {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

.record-actions {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.action-btn {
  padding: 0.3rem;
  border: 1px solid;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  font-weight: bold;
  min-width: 26px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-edit {
  background: var(--firmax-orange);
  color: white;
  border-color: var(--firmax-orange);
}

.action-edit:hover {
  background: rgba(233, 131, 0, 0.8);
  transform: scale(1.05);
}

.action-edit::before {
  content: "✎";
  font-size: 0.8rem;
  color: white;
}

.action-delete {
  background: var(--firmax-danger);
  color: white;
  border-color: var(--firmax-danger);
}

.action-delete:hover {
  background: rgba(220, 53, 69, 0.8);
  transform: scale(1.05);
}

.action-delete::before {
  content: "×";
  font-size: 1rem;
  color: white;
  font-weight: bold;
}

/* PAGINATION */
.pagination {
  padding: 1rem 1.5rem;
  background: var(--firmax-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #dee2e6;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--firmax-brown);
  display: flex;
  gap: 2rem;
}

.total-hours {
  font-weight: 600;
  color: var(--firmax-orange);
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.page-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  background: white;
  color: var(--firmax-brown);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
  background: var(--firmax-beige);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.page-info {
  margin: 0 1rem;
  font-size: 0.8rem;
  color: var(--firmax-brown);
}

/* ALERTS */
.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(40, 167, 69, 0.1);
  color: var(--firmax-success);
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.alert-error {
  background: rgba(220, 53, 69, 0.1);
  color: var(--firmax-danger);
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-warning {
  background: rgba(255, 193, 7, 0.1);
  color: var(--firmax-warning);
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.alert-info {
  background: rgba(23, 162, 184, 0.1);
  color: var(--firmax-info);
  border: 1px solid rgba(23, 162, 184, 0.2);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .main-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .left-panel {
    order: 2;
  }

  .right-panel {
    order: 1;
    height: 60vh;
  }
}

@media (max-width: 768px) {
  .main-container {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .hours-summary {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 1rem;
  }

  .company-name {
    font-size: 1.2rem;
  }

  .records-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem;
    margin: 1rem;
  }

  .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .records-table {
    font-size: 0.75rem;
  }

  .records-table th,
  .records-table td {
    padding: 0.5rem 0.25rem;
  }
}

/* =================================
   Estilos de la vista de fichas y calendario
   ================================= */

/* View Tabs */
.view-tabs {
  display: flex;
  background: var(--firmax-brown);
  border-radius: 12px 12px 0 0;
}

.tab-btn {
  flex: 1;
  padding: 1rem 2rem;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab-btn:first-child {
  border-radius: 12px 0 0 0;
}

.tab-btn:last-child {
  border-radius: 0 12px 0 0;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.tab-btn.active {
  background: white;
  color: var(--firmax-brown);
  font-weight: 600;
}

.tab-icon {
  font-size: 1.1rem;
}

/* Calendar Controls */
.calendar-controls {
  padding: 1.5rem;
  background: var(--firmax-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.calendar-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.calendar-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-btn {
  background: var(--firmax-orange);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background 0.3s;
  min-width: 40px;
}

.nav-btn:hover {
  background: rgba(233, 131, 0, 0.8);
}

.period-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--firmax-brown);
  margin: 0 1rem;
  white-space: nowrap;
}

.view-controls {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.view-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--firmax-brown);
  background: white;
  color: var(--firmax-brown);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s;
  font-weight: 500;
}

.view-btn:hover {
  background: var(--firmax-beige);
}

.view-btn.active {
  background: var(--firmax-brown);
  color: white;
}

.weekend-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--firmax-brown);
  font-weight: 500;
}

.weekend-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid #dee2e6;
  min-height: 400px;
}

.calendar-grid.with-weekend {
  grid-template-columns: repeat(7, 1fr);
}

.day-column {
  border-right: 1px solid #dee2e6;
  background: white;
  display: flex;
  flex-direction: column;
}

.day-column:last-child {
  border-right: none;
}

.day-header {
  background: var(--firmax-beige);
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  color: var(--firmax-brown);
  border-bottom: 2px solid var(--firmax-brown);
  font-size: 0.9rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.day-content {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  overflow-y: auto;
}

/* Service Items in Calendar */
.service-item-calendar {
  border-radius: 6px;
  padding: 0.4rem;
  font-size: 0.7rem;
  line-height: 1.2;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  min-height: 45px;
}

.service-item-calendar:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.service-item-calendar.selected {
  border: 2px solid var(--firmax-orange);
  box-shadow: 0 0 0 2px rgba(233, 131, 0, 0.2);
}

.service-header-calendar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.service-time-calendar {
  font-weight: bold;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
}

.service-actions-calendar {
  display: flex;
  gap: 0.2rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.service-item-calendar:hover .service-actions-calendar {
  opacity: 1;
}

.action-btn-calendar {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: white;
  font-weight: bold;
}

.action-edit-calendar {
  background: var(--firmax-orange);
}

.action-edit-calendar:hover {
  background: rgba(233, 131, 0, 0.8);
}

.action-delete-calendar {
  background: #dc3545;
}

.action-delete-calendar:hover {
  background: rgba(220, 53, 69, 0.8);
}

.service-info-calendar {
  font-size: 0.65rem;
  line-height: 1.1;
}

.service-client-calendar {
  font-weight: 600;
  margin-bottom: 0.1rem;
  color: inherit;
}

.service-project-calendar {
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 0.1rem;
}

.service-activity-calendar {
  color: rgba(0, 0, 0, 0.6);
  font-style: italic;
}

.status-indicator-calendar {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Detail Panel */
.detail-panel {
  padding: 1.5rem;
  background: var(--firmax-gray);
  border-top: 1px solid #dee2e6;
  display: none;
}

.detail-panel.active {
  display: block;
}

.detail-title {
  color: var(--firmax-brown);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.detail-content {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid var(--firmax-orange);
  box-shadow: var(--shadow-sm);
}

/* Responsive Calendar */
@media (max-width: 1024px) {
  .calendar-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .calendar-stats {
    justify-content: center;
    flex-wrap: wrap;
  }

  .calendar-navigation {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid.with-weekend {
    grid-template-columns: 1fr;
  }

  .tab-btn {
    padding: 0.8rem 1rem;
    font-size: 0.8rem;
  }

  .service-item-calendar {
    font-size: 0.65rem;
    min-height: 40px;
  }
}

/* =================================
   MODAL DE REPORTES
   ================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--firmax-brown);
  color: white;
  border-radius: 12px 12px 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background 0.3s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 1.5rem;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.report-card {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
}

.report-card:hover:not(.disabled) {
  border-color: var(--firmax-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.report-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fa;
}

.report-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.report-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--firmax-brown);
  margin-bottom: 0.5rem;
}

.report-description {
  font-size: 0.85rem;
  color: #6c757d;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }
}
/* =================================
   MODAL DE FILTROS DE REPORTES - AGREGAR AL FINAL
   ================================= */

.report-filters-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--firmax-brown);
}

.filter-control {
    padding: 0.6rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: border-color 0.3s;
    background: white;
}

.filter-control:focus {
    outline: none;
    border-color: var(--firmax-orange);
    box-shadow: 0 0 0 2px rgba(233, 131, 0, 0.1);
}

.report-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-filter {
    padding: 0.7rem 1.5rem;
    border: 1px solid #dee2e6;
    background: white;
    color: var(--firmax-brown);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-filter:hover {
    background: var(--firmax-beige);
}

.btn-filter.primary {
    background: var(--firmax-orange);
    color: white;
    border-color: var(--firmax-orange);
}

.btn-filter.primary:hover {
    background: rgba(233, 131, 0, 0.8);
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .report-actions {
        flex-direction: column;
    }
}

/* =================================
   LOGIN CENTRADO CONDICIONAL
   ================================= */

/* Solo aplicar estilos de centrado cuando el login está visible */
#loginSection:not([style*="display: none"]) {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  background: linear-gradient(135deg, var(--firmax-brown) 0%, rgba(93, 79, 75, 0.8) 100%) !important;
}

/* Contenedores cuando login está visible */
#loginSection:not([style*="display: none"]) .login-container {
  position: relative !important;
  transform: none !important;
  margin: 0 !important;
}

#loginSection:not([style*="display: none"]) .login-card {
  position: relative !important;
  transform: none !important;
  margin: 0 !important;
}

/* Cuando el login está oculto, asegurar que no interfiera */
#loginSection[style*="display: none"] {
  display: none !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Clase helper para forzar recentrado solo cuando sea necesario */
.force-center {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 10000 !important;
}