/* =============================================
   VARIABLES GLOBALES
   ============================================= */
:root {
  --bg-body: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bg-container: #ffffff;
  --text-color: #333333;
  --text-muted: #666666;
  --card-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --input-bg: #fafafa;
  --input-border: #e0e0e0;
  --border-light: rgba(0, 0, 0, 0.1);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

body.dark-mode {
  --bg-body: #121212;
  --bg-container: #1e1e1e;
  --text-color: #f5f5f5;
  --text-muted: #cccccc;
  --card-bg: #252525;
  --input-bg: #2a2a2a;
  --input-border: #444444;
  --border-light: rgba(255, 255, 255, 0.15);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* =============================================
   ESTILOS GENERALES
   ============================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    sans-serif;
  background: var(--bg-body);
  min-height: 100vh;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
}

.container {
  background: var(--bg-container);
  color: var(--text-color);
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 700px;
  padding: 25px;
  animation: fadeIn 0.5s ease-in;
  margin: auto;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   HEADER
   ============================================= */
.header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-light);
}

.header h1 {
  color: var(--text-color);
  font-size: 24px;
  margin-bottom: 5px;
}

.header p {
  color: var(--text-muted);
  font-size: 14px;
}

/* =============================================
   FORMULARIOS
   ============================================= */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--input-border);
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: var(--input-bg);
  color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus,
.form-control:focus {
  outline: none;
  border-color: #667eea;
  background: var(--bg-container);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* =============================================
   CONTRASEÑA
   ============================================= */
.password-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-container input {
  width: 100%;
  padding: 14px 48px 14px 16px !important;
  border: 2px solid var(--input-border);
  border-radius: 12px;
  font-size: 15px;
  background: var(--input-bg);
  color: var(--text-color);
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.password-container input:focus {
  border-color: #667eea;
  background: var(--bg-container);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
  outline: none;
}

.password-container input[type="text"] {
  letter-spacing: normal;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 5;
  padding: 0;
}

.password-toggle:hover {
  background: rgba(102, 126, 234, 0.15);
}
.password-toggle:active {
  transform: translateY(-50%) scale(0.9);
}

.eye-icon {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.eye-icon .eye-outline {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

.eye-icon .eye-pupil {
  fill: var(--text-muted);
  transition: fill 0.3s ease;
}

.eye-icon .eye-slash {
  stroke: var(--text-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.password-toggle.showing .eye-icon .eye-slash {
  opacity: 1;
}
.password-toggle.showing .eye-icon .eye-outline {
  stroke: #764ba2;
}
.password-toggle.showing .eye-icon .eye-pupil {
  fill: #764ba2;
}

.password-toggle:hover .eye-icon .eye-outline {
  stroke: #667eea;
}
.password-toggle:hover .eye-icon .eye-pupil {
  fill: #667eea;
}

.password-toggle.showing:hover .eye-icon .eye-outline,
.password-toggle.showing:hover .eye-icon .eye-slash {
  stroke: #dc3545;
}
.password-toggle.showing:hover .eye-icon .eye-pupil {
  fill: #dc3545;
}

/* =============================================
   BOTONES GENERALES
   ============================================= */
.btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.btn-success {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #333;
}
.btn-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.btn-secondary {
  background: #6c757d;
}
.btn-block {
  display: block;
  width: 100%;
}

/* =============================================
   RELOJ DIGITAL
   ============================================= */
.reloj {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  color: var(--text-color);
  margin: 20px 0;
  padding: 15px;
  background: var(--input-bg);
  border-radius: 15px;
  font-family: "Courier New", monospace;
}

/* =============================================
   TARJETAS
   ============================================= */
.card {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-light);
}

.card h3 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 18px;
  text-align: center;
}

/* =============================================
   INFO ROWS
   ============================================= */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.info-value {
  color: var(--text-color);
  font-weight: 700;
  font-size: 16px;
}

/* =============================================
   NAVEGACIÓN POR TABS
   ============================================= */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 20px 0;
  background: var(--input-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.nav-tab {
  flex: 1 1 auto;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 14px;
}

.nav-tab:hover {
  background: var(--border-light);
}

.nav-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
}

.tab-content {
  animation: fadeIn 0.3s ease-in;
}

/* =============================================
   CHAT
   ============================================= */
.chat-container {
  background: var(--bg-container);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  height: 400px;
  border: 1px solid var(--border-light);
}

.chat-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-header-bar h3 {
  color: white !important;
  margin: 0 !important;
  font-size: 16px !important;
}

.chat-header-bar .chat-select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 12px;
  cursor: pointer;
}

.chat-header-bar .chat-select option {
  background: #667eea;
  color: white;
}

.chat-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background: var(--input-bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-empty-message {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

.mensaje-bubble {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  word-wrap: break-word;
  animation: fadeIn 0.3s;
}

.mensaje-bubble.propio {
  align-self: flex-end;
  background: #667eea;
  color: white;
  border-bottom-right-radius: 5px;
}
.mensaje-bubble.ajeno {
  align-self: flex-start;
  background: var(--bg-container);
  color: var(--text-color);
  border-bottom-left-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.mensaje-nombre {
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 3px;
  opacity: 0.8;
}
.mensaje-texto {
  font-size: 14px;
}
.mensaje-hora {
  font-size: 10px;
  text-align: right;
  margin-top: 3px;
  opacity: 0.7;
}

.chat-input-bar {
  display: flex;
  padding: 10px;
  background: var(--bg-container);
  border-top: 1px solid var(--border-light);
  gap: 8px;
  flex-wrap: wrap;
}

.chat-extra-btn,
.chat-help-btn,
.chat-send-button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.chat-extra-btn {
  background: var(--input-bg);
  color: var(--text-color);
}
.chat-extra-btn:hover {
  background: var(--border-light);
  transform: rotate(180deg);
}

.chat-help-btn {
  background: #ffc107;
  color: white;
  font-weight: bold;
}
.chat-help-btn:hover {
  background: #ff9800;
  transform: scale(1.1);
}

.chat-send-button {
  background: #667eea;
  color: white;
}
.chat-send-button:hover {
  background: #764ba2;
  transform: scale(1.1);
}

.chat-text-input {
  flex: 1;
  min-width: 150px;
  padding: 10px 15px;
  border: 2px solid var(--input-border);
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  background: var(--input-bg);
  color: var(--text-color);
}

.chat-text-input:focus {
  border-color: #667eea;
}

/* =============================================
   AYUDA INICIAL DEL BOT
   ============================================= */
.chat-help-initial {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border: 2px dashed #ffc107;
  border-radius: 15px;
  margin: 10px auto;
  max-width: 95%;
  animation: fadeIn 0.5s ease;
  color: #333;
}

.help-bot-icon {
  font-size: 40px;
  margin-bottom: 10px;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.chat-help-initial h4 {
  color: #333;
  margin-bottom: 8px;
  font-size: 15px;
}
.chat-help-initial p {
  color: #666;
  margin-bottom: 12px;
  font-size: 13px;
}

.help-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}

.help-command-btn {
  background: white;
  border: 2px solid #ffc107;
  border-radius: 20px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  transition: all 0.3s ease;
}

.help-command-btn:hover {
  background: #ffc107;
  color: white;
  transform: translateY(-2px);
}

.help-tip {
  font-size: 11px !important;
  color: #999 !important;
  margin-top: 8px;
  font-style: italic;
}

/* =============================================
   MODAL
   ============================================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  background: var(--bg-container);
  color: var(--text-color);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
  position: relative;
}

.modal-mapa-content {
  max-width: 700px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px 20px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: white !important;
}

.modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
  font-weight: bold;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
  transform: rotate(90deg);
}
.modal-close:active {
  transform: rotate(90deg) scale(0.9);
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  padding: 15px 25px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border-light);
  position: sticky;
  bottom: 0;
  background: var(--bg-container);
  border-radius: 0 0 20px 20px;
}

.modal-footer .btn {
  flex: 1;
  margin: 0;
  padding: 12px;
  font-size: 14px;
}

/* =============================================
   TARJETAS DE TRABAJADORES
   ============================================= */
.trabajador-card {
  background: var(--bg-container);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.trabajador-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.trabajador-info {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  color: var(--text-color);
}

.trabajador-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.trabajador-stats span {
  background: var(--input-bg);
  padding: 4px 8px;
  border-radius: 15px;
  color: var(--text-color);
}

.trabajador-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* =============================================
   BOTONES MINI Y ACCIONES
   ============================================= */
.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
  line-height: 1;
  color: white;
}

.btn-mini:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.btn-mini.btn-horario {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.btn-mini.btn-semana {
  background: #6f42c1;
}
.btn-mini.btn-disponibilidad {
  background: #17a2b8;
}
.btn-mini.btn-desglose {
  background: #6c757d;
}
.btn-mini.btn-exportar-pdf {
  background: #007bff;
}
.btn-mini.btn-ver-mapa {
  background: #007bff;
}
.btn-mini.btn-informe {
  background: #fd7e14;
}

.btn-approve,
.btn-reject {
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  color: white;
}
.btn-approve {
  background: #28a745;
}
.btn-approve:hover {
  background: #218838;
  transform: scale(1.05);
}
.btn-reject {
  background: #dc3545;
}
.btn-reject:hover {
  background: #c82333;
  transform: scale(1.05);
}

.trabajador-actions,
.botones-costes,
.botones-admin-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* =============================================
   PANEL ADMIN
   ============================================= */
.admin-panel-card {
  background: var(--card-bg);
  border: 2px solid #667eea !important;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.admin-stat {
  background: var(--bg-container);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
}

.admin-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.admin-stat-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 5px;
}
.admin-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #667eea;
  display: block;
}
.admin-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 3px;
}

/* =============================================
   MAPA
   ============================================= */
.map-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.map-btn {
  padding: 8px 16px;
  border: 2px solid #667eea;
  background: var(--bg-container);
  color: #667eea;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
}

.map-btn.active {
  background: #667eea;
  color: white;
}
.map-btn:hover {
  background: #667eea;
  color: white;
}

#mapa-ubicaciones {
  height: 300px;
  width: 100%;
  border-radius: 10px;
}

.map-filter {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.map-filter .form-control {
  flex: 1 1 100%;
  min-width: 150px;
}
.map-filter .map-btn {
  flex: 1 1 auto;
  white-space: nowrap;
}

/* =============================================
   COSTES Y PLANTILLAS
   ============================================= */
#costes-container {
  background: var(--input-bg);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}
#costes-container .info-row {
  flex-wrap: wrap;
  gap: 5px;
}

#lista-plantillas {
  background: var(--input-bg);
  border-radius: 10px;
  padding: 10px;
}
#lista-plantillas .btn-mini {
  margin: 3px;
  white-space: normal;
  font-size: 12px;
  padding: 8px 10px;
  height: auto;
}

.costes-detalle-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--input-bg);
  border-radius: 10px;
  padding: 10px;
}
.costes-detalle-item {
  background: var(--bg-container);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.costes-nombre {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-color);
}
.costes-linea {
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 0;
}
.costes-total {
  margin-top: 10px;
  padding: 10px;
  background: var(--border-light);
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  font-size: 16px;
  color: var(--text-color);
}

/* =============================================
   SEMANA Y HORARIOS
   ============================================= */
.semana-fila {
  background: var(--input-bg);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}
.semana-fila .form-control {
  padding: 8px 10px;
  font-size: 13px;
  width: auto;
}
.semana-fila .semana-horas1,
.semana-fila .semana-horas2 {
  display: flex;
  gap: 6px;
  align-items: center;
}
.semana-acciones {
  display: flex;
  gap: 5px;
  margin-left: auto;
}

/* =============================================
   NOTIFICACIONES
   ============================================= */
.notificacion {
  padding: 12px 18px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation:
    deslizarEntrada 0.3s ease,
    desvanecerSalida 0.5s ease 3s forwards;
  max-width: 300px;
}
.notificacion.exito {
  background: #28a745;
}
.notificacion.error {
  background: #dc3545;
}
.notificacion.info {
  background: #007bff;
}

@keyframes deslizarEntrada {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes desvanecerSalida {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* =============================================
   BOTÓN MODO OSCURO
   ============================================= */
.btn-modo {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #333;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.2s;
}
.btn-modo:hover { transform: scale(1.1); }
body.dark-mode .btn-modo { background: #2c3e50; color: #f1c40f; }

/* Variables de modo oscuro */
:root { --bg-container: #fff; --text-color: #333; --card-bg: #f5f7fa; }
body.dark-mode { --bg-container: #1e1e1e; --text-color: #f5f5f5; --card-bg: #252525; }
body.dark-mode .container { background: var(--bg-container); color: var(--text-color); }
body.dark-mode .card { background: var(--card-bg); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 800px) {
  .dashboard-container {
    padding: 15px;
    border-radius: 15px;
  }
  .reloj {
    font-size: 32px;
  }
  .btn {
    padding: 12px;
    font-size: 14px;
  }
  .chat-container {
    height: 350px;
  }
  .nav-tab {
    font-size: 12px;
    padding: 8px 6px;
  }
  .admin-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .admin-stat {
    padding: 12px;
  }
  .admin-stat-value {
    font-size: 18px;
  }
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }
  .modal-header {
    padding: 15px 20px;
  }
  .modal-body {
    padding: 15px 20px;
  }
  .modal-footer {
    padding: 12px 20px;
    flex-wrap: wrap;
  }
  .modal-footer .btn {
    flex: 1 1 100%;
  }
  .card {
    padding: 15px;
  }
  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .chat-input-bar {
    flex-wrap: wrap;
  }
  .chat-text-input {
    min-width: 100%;
    order: -1;
  }
  #mapa-ubicaciones {
    height: 250px;
  }
  .map-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .btn-modo {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }
  .chat-extra-btn,
  .chat-help-btn,
  .chat-send-button {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .modal-close {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }
  .trabajador-actions .btn-mini,
  .botones-admin-acciones .btn-mini,
  .botones-costes .btn-mini {
    width: 100%;
    justify-content: center;
  }
  .semana-acciones .btn-mini {
    padding: 6px 8px;
    font-size: 11px;
  }
  .password-toggle {
    width: 32px;
    height: 32px;
  }
  .eye-icon {
    width: 18px;
    height: 18px;
  }
  .map-filter .form-control {
    flex: 1;
  }
  .map-filter .map-btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 600px) and (max-width: 900px) {
  #mapa-ubicaciones {
    height: 350px;
  }
}

@media (min-width: 900px) {
  #mapa-ubicaciones {
    height: 400px;
  }
  .container {
    padding: 30px;
  }
}

/* =============================================
   UTILIDADES
   ============================================= */
.hidden {
  display: none !important;
}
.text-center {
  text-align: center;
}
