/* Sistema de Vacaciones Tinto — estilos (portado del web app original) */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh; padding: 20px; line-height: 1.6; color: #1a1a1a;
}
.container {
  max-width: 480px; margin: 0 auto; background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px); border-radius: 24px; padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,.1); border: 1px solid rgba(255,255,255,.2);
}
.container-wide {
  max-width: 1200px; margin: 0 auto; background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px); border-radius: 24px; padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,.1); border: 1px solid rgba(255,255,255,.2);
}
.header { text-align: center; margin-bottom: 32px; }
.header h1 { font-size: 28px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.header p { color: #666; font-size: 16px; }

.form-group { margin-bottom: 24px; }
.form-label { display: block; font-weight: 600; color: #374151; margin-bottom: 8px; font-size: 14px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px; border: 2px solid #e5e7eb; border-radius: 12px;
  font-size: 16px; transition: all .3s ease; background: #fff; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,.1);
}
.form-textarea { resize: vertical; min-height: 100px; }

.btn-primary {
  width: 100%; background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); color: #fff;
  border: none; padding: 14px 24px; border-radius: 12px; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: all .3s ease; text-decoration: none; display: inline-block; text-align: center;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(102,126,234,.3); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  display: inline-block; padding: 12px 20px; background: rgba(102,126,234,.1); color: #667eea;
  text-decoration: none; border-radius: 10px; font-weight: 500; transition: all .3s ease; border: 2px solid transparent; cursor: pointer; font-family: inherit; font-size: 15px;
}
.btn-secondary:hover { background: rgba(102,126,234,.2); border-color: #667eea; }

.alert { padding: 16px 20px; border-radius: 12px; margin-bottom: 24px; font-weight: 500; }
.alert-success { background: linear-gradient(135deg,#d1fae5 0%,#a7f3d0 100%); color: #065f46; border: 1px solid #10b981; }
.alert-error { background: linear-gradient(135deg,#fee2e2 0%,#fecaca 100%); color: #991b1b; border: 1px solid #ef4444; }
.hidden { display: none !important; }

.divider { height: 1px; background: linear-gradient(90deg,transparent,#e5e7eb,transparent); margin: 32px 0; }
.link-section { text-align: center; padding-top: 16px; }

.stats-card { background: linear-gradient(135deg,#f8fafc 0%,#f1f5f9 100%); border-radius: 16px; padding: 24px; margin: 0; border: 1px solid #e2e8f0; }
.stats-number { font-size: 32px; font-weight: 700; color: #667eea; margin-bottom: 4px; }
.stats-label { color: #64748b; font-weight: 500; }

.table { width: 100%; border-collapse: collapse; margin-top: 16px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,.05); }
.table th { background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); color: #fff; padding: 16px 12px; text-align: left; font-weight: 600; font-size: 14px; }
.table td { padding: 16px 12px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.table tr:hover { background: #f8fafc; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.status-pending { background: #fef3c7; color: #d97706; }
.status-approved { background: #d1fae5; color: #059669; }
.status-rejected { background: #fee2e2; color: #dc2626; }

.request-card { background:#fff; border-radius: 16px; padding: 24px; margin: 20px 0; box-shadow: 0 4px 12px rgba(0,0,0,.1); border: 1px solid #e5e7eb; }
.action-buttons { display: flex; gap: 12px; margin: 24px 0; justify-content: center; flex-wrap: wrap; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 9999; }
.modal-overlay.show { display: flex; }
.modal-card { background: #fff; border-radius: 16px; padding: 24px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-card h3 { margin-bottom: 8px; color: #111827; }
.modal-card p { color: #4b5563; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.modal-large { max-width: 900px; text-align: left; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid #e5e7eb; }
.btn-close { background: #f3f4f6; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; transition: all .2s ease; }
.btn-close:hover { background: #e5e7eb; transform: scale(1.1); }

/* Calendario */
.calendar-container { background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 4px 12px rgba(0,0,0,.1); margin: 24px 0; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid #e5e7eb; }
.calendar-title { font-size: 22px; font-weight: 700; color: #1a1a1a; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 16px; }
.calendar-day-header { text-align: center; font-weight: 600; color: #64748b; padding: 12px 8px; font-size: 14px; }
.calendar-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; padding: 12px 8px; font-size: 15px; position: relative; transition: all .2s ease; min-height: 80px; }
.calendar-day:hover { transform: scale(1.05); z-index: 10; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.calendar-day.empty { background: transparent; }
.calendar-day.normal { background: #f8fafc; border: 1px solid #e2e8f0; }
.calendar-day.weekend { background: #fef3c7; border: 1px solid #fde68a; }
.calendar-day.holiday { background: #fee2e2; border: 1px solid #fecaca; }
.calendar-day.vacation { background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); color: #fff; border: none; font-weight: 600; }
.calendar-day.extra { background: linear-gradient(135deg,#10b981 0%,#059669 100%); color: #fff; border: none; font-weight: 600; }
.calendar-day.free { background: #dcfce7; border: 1px solid #86efac; }
.day-number { font-weight: 700; margin-bottom: 6px; font-size: 16px; }
.day-value { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.1); }
.calendar-day.vacation .day-value, .calendar-day.extra .day-value { background: rgba(255,255,255,.3); }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; padding-top: 24px; border-top: 2px solid #e5e7eb; justify-content: center; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-box { width: 24px; height: 24px; border-radius: 6px; border: 1px solid #e5e7eb; }
.year-selector { display: flex; gap: 12px; margin-bottom: 24px; justify-content: center; flex-wrap: wrap; }
.year-btn { padding: 8px 16px; border-radius: 8px; border: 2px solid #e5e7eb; background: #fff; cursor: pointer; font-weight: 600; transition: all .3s ease; }
.year-btn.active { background: #667eea; color: #fff; border-color: #667eea; }

/* Spinner */
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .calendar-container { padding: 20px; }
  .calendar-grid { gap: 4px; }
  .calendar-day { min-height: 60px; font-size: 13px; padding: 8px 4px; }
  .day-number { font-size: 14px; }
  .day-value { font-size: 10px; padding: 2px 6px; }
  .legend { flex-direction: column; gap: 8px; align-items: flex-start; }
}
@media (max-width: 480px) {
  .container { padding: 24px; margin: 10px; border-radius: 16px; }
  .container-wide { padding: 20px; margin: 10px; border-radius: 16px; }
  .header h1 { font-size: 24px; }
  .calendar-container { padding: 16px; }
  .calendar-title { font-size: 18px; }
  .calendar-day-header { font-size: 12px; padding: 10px 4px; }
  .calendar-grid { gap: 3px; }
  .calendar-day { min-height: 50px; padding: 6px 2px; }
  .day-number { font-size: 13px; }
}
