:root {
    --primary: #1a1a1a;
    --secondary: #2d2d2d;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #f8f9fa;
    --dark: #1a1a1a;
    --sidebar-width: 250px;
    --sidebar-collapsed: 60px;
}

/* Tema Claro (por defecto) */
:root, [data-theme="light"] {
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --border-color: #e0e0e0;
    --menu-bg: #1a1a1a;
    --menu-text: #ffffff;
}

/* Tema Oscuro - Gris translúcido */
[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --border-color: #404040;
    --menu-bg: #0d1117;
    --menu-text: #ffffff;
    --light: #2d2d2d;
}

/* Tema Azul Claro */
[data-theme="blue"] {
    --text-primary: #1e3a8a;
    --text-secondary: #3b82f6;
    --bg-primary: #eff6ff;
    --bg-secondary: #f0f9ff;
    --border-color: #bfdbfe;
    --menu-bg: #1e40af;
    --menu-text: #ffffff;
}

/* Tema Morado Claro */
[data-theme="purple"] {
    --text-primary: #581c87;
    --text-secondary: #7c3aed;
    --bg-primary: #faf5ff;
    --bg-secondary: #f3e8ff;
    --border-color: #c4b5fd;
    --menu-bg: #7c2d92;
    --menu-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 20px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.logo h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.logo p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.logo-image {
    margin-bottom: 20px;
}

.company-logo {
    max-height: 80px;
    max-width: 200px;
    height: auto;
    width: auto;
}

.logo-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto;
}

.logo-icon {
    font-size: 40px;
    color: white;
}

/* Tema oscuro para login */
[data-theme="dark"] .login-container {
    background: rgba(60, 60, 60, 0.9);
    border: 1px solid rgba(120, 120, 120, 0.3);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select {
    background: rgba(80, 80, 80, 0.8);
    border: 1px solid rgba(120, 120, 120, 0.4);
    color: #e8e8e8;
}

[data-theme="dark"] .form-group label,
[data-theme="dark"] h2 {
    color: #e8e8e8;
}

[data-theme="dark"] .switch-form {
    color: #b8b8b8;
}

[data-theme="dark"] .switch-form a {
    color: #60a5fa;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.95) 0%, rgba(75, 75, 75, 0.9) 100%);
}

/* Tema azul para login */
[data-theme="blue"] .login-container {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    border: 2px solid #60a5fa;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.4);
}

[data-theme="blue"] .form-container {
    background: rgba(30, 64, 175, 0.95);
    border: 2px solid #60a5fa;
}

[data-theme="blue"] .form-group input,
[data-theme="blue"] .form-group select {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid #60a5fa;
    color: #ffffff;
}

[data-theme="blue"] .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="blue"] .form-group label,
[data-theme="blue"] h2 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="blue"] .switch-form {
    color: #ffffff;
}

[data-theme="blue"] .switch-form a {
    color: #93c5fd;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="blue"] .switch-form a:hover {
    color: #bfdbfe;
}

[data-theme="blue"] body {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

[data-theme="blue"] .logo h1,
[data-theme="blue"] .logo p {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Tema azul - Texto negro en Configuración y Reportes */
[data-theme="blue"] #settingsTab .card-body,
[data-theme="blue"] #settingsTab .form-group label,
[data-theme="blue"] #settingsTab .form-group input,
[data-theme="blue"] #settingsTab .form-group select,
[data-theme="blue"] #settingsTab h3 {
    color: #333333 !important;
}

[data-theme="blue"] #settingsTab .form-group small {
    color: #666666 !important;
}

[data-theme="blue"] #reportsTab .card-body,
[data-theme="blue"] #reportsTab .report-card h3,
[data-theme="blue"] #reportsTab .report-card p,
[data-theme="blue"] #reportsTab .form-group label,
[data-theme="blue"] #reportsTab input[type="month"] {
    color: #333333 !important;
}

/* Tema morado para login */
[data-theme="purple"] .login-container {
    background: rgba(250, 245, 255, 0.95);
    border: 1px solid #c4b5fd;
}

[data-theme="purple"] .form-group input,
[data-theme="purple"] .form-group select {
    background: #f3e8ff;
    border: 1px solid #a78bfa;
    color: #581c87;
}

[data-theme="purple"] .form-group label,
[data-theme="purple"] h2 {
    color: #581c87;
}

[data-theme="purple"] .switch-form {
    color: #7c3aed;
}

[data-theme="purple"] body {
    background: linear-gradient(135deg, #e9d5ff 0%, #c4b5fd 100%);
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.form-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group small {
    color: #666;
    font-size: 0.8rem;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-full-width {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: 1px solid #2980b9;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    border-color: #1f5f8b;
}

.switch-form {
    text-align: center;
    margin-top: 20px;
}

.switch-form a {
    color: var(--secondary);
    text-decoration: none;
}

.messages {
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
}

.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard Styles */
.header {
    background-color: var(--menu-bg);
    color: var(--menu-text);
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
    height: 56px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-toggle span {
    width: 20px;
    height: 2px;
    background: var(--menu-text);
    transition: all 0.3s;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.system-logo {
    height: 40px;
    width: auto;
}

.system-logo + h1 {
    margin: 0;
}

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

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--menu-bg);
    color: var(--menu-text);
    height: calc(100vh - 56px);
    position: fixed;
    top: 56px;
    left: 0;
    padding-top: 20px;
    transition: all 0.3s ease;
    border-right: 1px solid #333;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    color: var(--menu-text);
}

.sidebar-menu li:hover {
    background-color: #333;
}

.sidebar-menu li.active {
    background-color: #444;
    border-right: 3px solid var(--success);
}

.sidebar-menu .icon {
    font-size: 18px;
    min-width: 20px;
}

.sidebar.collapsed .sidebar-menu span {
    display: none;
}

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: 56px;
    padding: 20px;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 56px);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
}

.card {
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    background: linear-gradient(135deg, var(--light), #f0f0f0);
    color: var(--text-primary);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

table td:last-child {
    white-space: nowrap;
}

table .btn-group {
    justify-content: flex-start;
    flex-wrap: wrap;
}

table th {
    background-color: var(--light);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

[data-theme="dark"] table th {
    background-color: #404040;
    color: #ffffff;
    border-bottom: 1px solid #555;
}

[data-theme="dark"] table td {
    color: #ffffff;
    border-bottom: 1px solid #404040;
}

[data-theme="dark"] .card-header {
    background: linear-gradient(135deg, #2d2d2d, #404040);
    color: #ffffff;
}

table td {
    color: var(--text-primary);
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background-color: #ffecd9;
    color: var(--warning);
}

.status-paid {
    background-color: #e6f7ee;
    color: var(--success);
}

.status-overdue {
    background-color: #feeaea;
    color: var(--danger);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: 1px solid #229954;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    border-color: #1e8449;
}

.btn-danger {
    background: #dc3545 !important;
    color: white !important;
    border: 1px solid #dc3545 !important;
}

.btn-danger:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: 1px solid #e67e22;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-color: #d35400;
}

.btn-info {
    background: #17a2b8 !important;
    color: white !important;
    border: 1px solid #17a2b8 !important;
}

.btn-info:hover {
    background: #138496 !important;
    border-color: #117a8b !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: 1px solid #7f8c8d;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    border-color: #6c7b7d;
}

/* Estilos especiales para botones de acción */
.btn-icon {
    min-width: 40px;
    padding: 8px;
    justify-content: center;
}

.btn-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-group .btn {
    margin: 0;
}

/* Animaciones para botones */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-primary:hover {
    animation: pulse 0.3s ease;
}

/* Botones con iconos más grandes */
.btn-lg {
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
}

/* Estilos para botones en tablas */
table .btn {
    margin: 2px;
    min-width: auto;
}

/* Header de mes en historial */
.month-header td {
    background: var(--primary) !important;
    color: white !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 15px !important;
    border: none !important;
}

[data-theme="dark"] .month-header td {
    background: #0d1117 !important;
    color: #ffffff !important;
}

/* Tooltip para detalles de pago */
.payment-tooltip {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary, white) !important;
    border: 2px solid var(--primary, #007bff) !important;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    z-index: 99999 !important;
    min-width: 300px;
    max-width: 400px;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.tooltip-header {
    background: var(--menu-bg, #1a1a1a) !important;
    color: var(--menu-text, white) !important;
    padding: 15px 20px;
    border-radius: 6px 6px 0 0;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
    width: 100% !important;
}

.tooltip-header:active {
    cursor: grabbing;
}

.tooltip-header h4 {
    margin: 0;
    font-size: 16px;
}

.close-tooltip {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
}

.tooltip-body {
    padding: 20px;
    color: var(--text-primary, #333333);
}

.tooltip-body p {
    margin: 10px 0;
    line-height: 1.5;
}

.tooltip-body strong {
    color: var(--primary, #007bff);
}

[data-theme="dark"] .tooltip-body strong {
    color: #60a5fa;
}

/* Estilos específicos para modal de calendario */
.calendar-payment-modal {
    min-width: 350px;
    max-width: 450px;
}

.calendar-payment-modal .form-group label {
    color: var(--text-primary);
    font-weight: 500;
}

.calendar-payment-modal input {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .calendar-payment-modal input {
    background: #404040;
    color: #ffffff;
    border-color: #555;
}

/* Estilos específicos para modal de editar pago */
.edit-payment-modal {
    min-width: 350px;
    max-width: 450px;
}

.edit-payment-modal .form-group label {
    color: var(--text-primary);
    font-weight: 500;
}

.edit-payment-modal input {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .edit-payment-modal input {
    background: #404040;
    color: #ffffff;
    border-color: #555;
}

/* Botones de estado */
.btn-outline-success {
    background: transparent;
    color: var(--success);
    border: 2px solid var(--success);
}

.btn-outline-success:hover {
    background: var(--success);
    color: white;
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--danger);
}

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

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

.modal-content {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.modal-body {
    padding: 20px;
}

.modal-header {
    background: var(--menu-bg, #1a1a1a) !important;
    color: var(--menu-text, white) !important;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
}

.modal-header:active {
    cursor: grabbing;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.modal-header .close,
.modal-header .close-service,
.modal-header .close-payment,
.modal-header .close-company,
.modal-header .close-holiday {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding: 15px 20px 20px 20px;
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
    min-width: 100px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}



.close, .close-service {
    font-size: 24px;
    cursor: pointer;
}

.admin-only {
    display: none;
}

.role-admin .admin-only {
    display: block;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Calendar Styles */
.calendar-legend {
    display: flex;
    gap: 20px;
    font-size: 14px;
    align-items: center;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

#calendar {
    margin-top: 10px;
}

.fc-event {
    font-size: 11px;
    padding: 1px 3px;
}

.fc-daygrid-event {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feriado-day {
    background-color: #f3e5f5 !important;
}

.feriado-day .fc-daygrid-day-number {
    color: #8e44ad;
    font-weight: bold;
}

/* Notificaciones */
.notifications-area {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 5px;
}

.notification-header {
    background: #f39c12;
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.close-notifications {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-service {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.notification-company {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.notification-date {
    font-size: 11px;
    color: #e74c3c;
    font-weight: 500;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 1001;
}

.notification-header-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.dismiss-notification {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dismiss-notification:hover {
    color: #e74c3c;
}

.urgent-notification {
    background-color: #fff5f5 !important;
    border-left: 4px solid #e74c3c;
}

.urgent-badge {
    background: #e74c3c;
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 5px;
    font-weight: bold;
}

.urgent-date {
    color: #e74c3c !important;
    font-weight: bold;
}

/* Reportes */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.report-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.report-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.report-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.report-card .form-group {
    margin-bottom: 15px;
    text-align: left;
}

.report-card input[type="month"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Footer Credit */
.footer-credit {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.footer-credit small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

.footer-credit a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-credit a:hover {
    color: white;
    text-decoration: underline;
}

/* Animación de Pago Exitoso */
.success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(39, 174, 96, 0.4);
    z-index: 999999;
    text-align: center;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.success-animation .emoji {
    font-size: 80px;
    animation: bounce 0.8s ease-in-out infinite;
    display: block;
    margin-bottom: 20px;
}

.success-animation h2 {
    font-size: 28px;
    margin: 0 0 10px 0;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.success-animation p {
    font-size: 18px;
    margin: 0;
    opacity: 0.95;
}

.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    animation: fadeIn 0.3s ease-in;
}

@keyframes successPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(10deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(-5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-8px) rotate(5deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.success-animation.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

.success-overlay.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

/* RESPONSIVE DESIGN - MOBILE OPTIMIZED */
@media (max-width: 768px) {
    /* MODAL DE USUARIO MOBILE - OPTIMIZADO */
    #userModal.payment-tooltip {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 20px) !important;
        max-width: 380px !important;
        min-width: auto !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
    }
    
    #userModal .tooltip-header {
        padding: 12px 15px !important;
        border-radius: 12px 12px 0 0 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }
    
    #userModal .tooltip-header h4 {
        font-size: 14px !important;
        margin: 0 !important;
    }
    
    #userModal .close-tooltip {
        width: 32px !important;
        height: 32px !important;
        font-size: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    #userModal .tooltip-body {
        padding: 15px !important;
        max-height: calc(85vh - 120px) !important;
        overflow-y: auto !important;
    }
    
    #userModal .form-group {
        margin-top: 12px !important;
    }
    
    #userModal .form-group label {
        font-size: 13px !important;
        margin-bottom: 6px !important;
        display: block !important;
    }
    
    #userModal .form-group input,
    #userModal .form-group select {
        width: 100% !important;
        padding: 10px !important;
        font-size: 14px !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 6px !important;
        margin-top: 4px !important;
        box-sizing: border-box !important;
    }
    
    #userModal .form-group small {
        font-size: 11px !important;
        color: var(--text-secondary) !important;
        display: block !important;
        margin-top: 4px !important;
    }
    
    #userModal .tooltip-body > div:last-child {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 20px !important;
        padding-top: 15px !important;
        border-top: 1px solid var(--border-color) !important;
        position: sticky !important;
        bottom: 0 !important;
        background: var(--bg-secondary) !important;
        padding-bottom: 5px !important;
    }
    
    #userModal .tooltip-body .btn {
        width: 100% !important;
        padding: 12px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        border-radius: 6px !important;
        margin: 0 !important;
    }
    
    /* Overlay oscuro para modal */
    #userModal::before {
        content: '' !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: -1 !important;
    }
    
    /* HEADER MOBILE - FIXED */
    .header {
        height: 56px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .header-content {
        padding: 0 8px !important;
        height: 56px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }
    
    .header-left {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .logo-container {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
        flex: 1 !important;
    }
    
    .logo-container h1 {
        font-size: 13px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
    }
    
    .system-logo {
        height: 28px !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
    
    .user-info {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex-shrink: 0 !important;
    }
    
    .user-info span {
        display: none !important;
    }
    
    .user-info .btn {
        padding: 6px 8px !important;
        font-size: 10px !important;
        min-height: 32px !important;
        white-space: nowrap !important;
        border-radius: 4px !important;
    }
    
    .notification-container {
        position: relative !important;
        margin-right: 4px !important;
    }
    
    .notification-badge {
        position: absolute !important;
        top: -6px !important;
        right: -6px !important;
        background: #e74c3c !important;
        color: white !important;
        border-radius: 50% !important;
        width: 16px !important;
        height: 16px !important;
        font-size: 9px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: bold !important;
        z-index: 1001 !important;
    }
    
    .sidebar-toggle {
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 8px !important;
        flex-shrink: 0 !important;
    }
    
    /* SIDEBAR MOBILE */
    .sidebar {
        position: fixed !important;
        top: 56px !important;
        left: -100% !important;
        width: 280px !important;
        height: calc(100vh - 56px) !important;
        z-index: 9999 !important;
        transition: left 0.3s ease !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3) !important;
    }
    
    .sidebar.show {
        left: 0 !important;
    }
    
    .sidebar.collapsed {
        left: -100% !important;
        width: 280px !important;
    }
    
    /* MAIN CONTENT MOBILE */
    .main-content {
        margin-left: 0 !important;
        padding: 10px !important;
        width: 100% !important;
    }
    
    .main-content.expanded {
        margin-left: 0 !important;
    }
    
    /* NOTIFICATIONS MOBILE - FIXED */
    .notifications-area {
        position: fixed !important;
        top: 56px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-height: 70vh !important;
        z-index: 9999 !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-color) !important;
    }
    
    .notification-header {
        background: var(--warning) !important;
        color: white !important;
        padding: 12px 15px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-weight: 500 !important;
        border-radius: 8px 8px 0 0 !important;
    }
    
    .close-notifications {
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 18px !important;
        cursor: pointer !important;
        padding: 0 !important;
        width: 24px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .notifications-list {
        max-height: calc(70vh - 60px) !important;
        overflow-y: auto !important;
    }
    
    .notification-item {
        padding: 12px 15px !important;
        border-bottom: 1px solid var(--border-color) !important;
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
    }
    
    /* LOGIN MOBILE */
    .login-container {
        padding: 20px 15px !important;
        min-height: 100vh !important;
    }
    
    .logo h1 {
        font-size: 1.8rem !important;
        margin-bottom: 8px !important;
    }
    
    .logo p {
        font-size: 1rem !important;
    }
    
    .form-container {
        padding: 20px 15px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* CALENDARIO MOBILE - OPTIMIZADO */
    #calendar {
        font-size: 11px !important;
        margin-top: 5px !important;
    }
    
    /* FullCalendar Toolbar Mobile */
    .fc-toolbar {
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }
    
    .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .fc-toolbar-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin: 0 !important;
    }
    
    .fc-button {
        padding: 8px 12px !important;
        font-size: 12px !important;
        border-radius: 4px !important;
        margin: 0 2px !important;
    }
    
    .fc-button-group {
        display: flex !important;
    }
    
    /* FullCalendar Grid Mobile */
    .fc-daygrid {
        font-size: 10px !important;
    }
    
    .fc-daygrid-day {
        min-height: 35px !important;
    }
    
    .fc-daygrid-day-number {
        font-size: 11px !important;
        padding: 2px !important;
        font-weight: 500 !important;
    }
    
    .fc-col-header-cell {
        padding: 6px 2px !important;
        font-size: 10px !important;
        font-weight: 600 !important;
    }
    
    /* FullCalendar Events Mobile */
    .fc-daygrid-event {
        font-size: 9px !important;
        padding: 1px 3px !important;
        margin: 1px 0 !important;
        border-radius: 2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .fc-event-title {
        font-weight: 500 !important;
    }
    
    /* FullCalendar More Link */
    .fc-daygrid-more-link {
        font-size: 8px !important;
        padding: 1px 2px !important;
        background: #666 !important;
        color: white !important;
        border-radius: 2px !important;
    }
    
    /* Calendar Legend Mobile */
    .calendar-legend {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        font-size: 10px !important;
        margin-bottom: 8px !important;
        padding: 8px !important;
        background: var(--bg-secondary) !important;
        border-radius: 4px !important;
        border: 1px solid var(--border-color) !important;
    }
    
    .legend-dot {
        width: 8px !important;
        height: 8px !important;
        margin-right: 4px !important;
    }
    
    /* FullCalendar Popover Mobile */
    .fc-popover {
        max-width: calc(100vw - 20px) !important;
        font-size: 11px !important;
    }
    
    .fc-popover-header {
        padding: 8px !important;
        font-size: 12px !important;
    }
    
    .fc-popover-body {
        padding: 6px !important;
    }
    
    /* Feriados Mobile */
    .feriado-day {
        background-color: #f3e5f5 !important;
        position: relative !important;
    }
    
    .feriado-day .fc-daygrid-day-number {
        color: #8e44ad !important;
        font-weight: bold !important;
    }
    
    /* TABLAS MOBILE - GESTIÓN OPTIMIZADA */
    .card-body {
        padding: 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Tabla responsive con scroll horizontal */
    table {
        min-width: 700px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }
    
    table th {
        position: sticky !important;
        top: 0 !important;
        background: var(--light) !important;
        z-index: 10 !important;
        padding: 8px 6px !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        border-bottom: 2px solid var(--border-color) !important;
    }
    
    table td {
        padding: 8px 6px !important;
        font-size: 10px !important;
        border-bottom: 1px solid var(--border-color) !important;
        vertical-align: middle !important;
    }
    
    /* Columnas específicas */
    table th:first-child, table td:first-child {
        min-width: 50px !important;
        max-width: 50px !important;
        text-align: center !important;
    }
    
    table th:nth-child(2), table td:nth-child(2) {
        min-width: 120px !important;
        max-width: 150px !important;
        font-weight: 600 !important;
    }
    
    table th:nth-child(3), table td:nth-child(3) {
        min-width: 100px !important;
        max-width: 120px !important;
    }
    
    table th:nth-child(4), table td:nth-child(4) {
        min-width: 150px !important;
        max-width: 200px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    table th:last-child, table td:last-child {
        min-width: 120px !important;
        position: sticky !important;
        right: 0 !important;
        background: var(--bg-secondary) !important;
        box-shadow: -2px 0 4px rgba(0,0,0,0.1) !important;
        z-index: 5 !important;
    }
    
    table th:last-child {
        background: var(--light) !important;
        z-index: 15 !important;
    }
    
    /* Botones en tablas mobile */
    .btn-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        min-width: 100px !important;
    }
    
    .btn-group .btn {
        padding: 4px 6px !important;
        font-size: 9px !important;
        min-height: 28px !important;
        white-space: nowrap !important;
        border-radius: 3px !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Status badges mobile */
    .status-badge {
        padding: 2px 6px !important;
        font-size: 9px !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
    }
    
    /* Botón agregar mobile */
    .card-header .btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }
    
    /* Scroll indicator */
    .card-body::after {
        content: '← Desliza para ver más →' !important;
        position: absolute !important;
        bottom: 5px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 9px !important;
        color: var(--text-secondary) !important;
        background: rgba(255,255,255,0.9) !important;
        padding: 2px 8px !important;
        border-radius: 10px !important;
        border: 1px solid var(--border-color) !important;
        pointer-events: none !important;
        opacity: 0.7 !important;
    }
    
    /* Ocultar scroll indicator cuando no es necesario */
    .card-body:not([data-scrollable])::after {
        display: none !important;
    }
    
    /* TABLA FERIADOS MOBILE - ALTURA LIMITADA */
    #holidaysTab .card-body {
        max-height: 60vh !important;
        overflow-y: auto !important;
        overflow-x: auto !important;
        padding: 6px !important;
        position: relative !important;
    }
    
    #holidaysTable {
        min-width: 600px !important;
    }
    
    #holidaysTable th, #holidaysTable td {
        padding: 6px 4px !important;
        font-size: 9px !important;
    }
    
    #holidaysTable .btn-group .btn {
        padding: 3px 5px !important;
        font-size: 8px !important;
        min-height: 24px !important;
    }
    
    /* Indicador de scroll para tabla feriados */
    #holidaysTab .card-body::before {
        content: '↕ Desliza arriba/abajo para ver más feriados' !important;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(255,255,255,0.95) !important;
        padding: 4px 8px !important;
        font-size: 9px !important;
        color: var(--text-secondary) !important;
        border-bottom: 1px solid var(--border-color) !important;
        text-align: center !important;
        z-index: 20 !important;
        margin-bottom: 5px !important;
    }
    
    /* OVERLAY PARA SIDEBAR */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 480px) {
    /* EXTRA SMALL SCREENS */
    .header-content {
        padding: 0 6px !important;
    }
    
    .header-left {
        gap: 6px !important;
    }
    
    .logo-container {
        gap: 4px !important;
    }
    
    .logo-container h1 {
        font-size: 11px !important;
        max-width: 140px !important;
    }
    
    .system-logo {
        height: 24px !important;
    }
    
    .user-info {
        gap: 3px !important;
    }
    
    .user-info .btn {
        padding: 4px 6px !important;
        font-size: 9px !important;
        min-height: 28px !important;
    }
    
    .sidebar-toggle {
        min-width: 36px !important;
        min-height: 36px !important;
        padding: 6px !important;
    }
    
    .notifications-area {
        left: 6px !important;
        right: 6px !important;
    }
    
    .logo h1 {
        font-size: 1.6rem !important;
    }
    
    .form-container {
        padding: 15px 12px !important;
    }
    
    .form-group input, .form-group select {
        font-size: 16px !important;
    }
    
    /* CALENDARIO EXTRA SMALL */
    .fc-toolbar-title {
        font-size: 14px !important;
    }
    
    .fc-button {
        padding: 6px 8px !important;
        font-size: 10px !important;
    }
    
    .fc-daygrid-day {
        min-height: 30px !important;
    }
    
    .fc-daygrid-day-number {
        font-size: 10px !important;
    }
    
    .fc-daygrid-event {
        font-size: 8px !important;
        padding: 0px 2px !important;
    }
    
    .calendar-legend {
        grid-template-columns: 1fr !important;
        font-size: 9px !important;
    }
    
    .legend-dot {
        width: 6px !important;
        height: 6px !important;
    }
    
    /* TABLAS EXTRA SMALL */
    table {
        min-width: 600px !important;
        font-size: 10px !important;
    }
    
    table th, table td {
        padding: 6px 4px !important;
        font-size: 9px !important;
    }
    
    .btn-group .btn {
        padding: 3px 5px !important;
        font-size: 8px !important;
        min-height: 24px !important;
    }
    
    .status-badge {
        padding: 1px 4px !important;
        font-size: 8px !important;
    }
    
    .card-body::after {
        font-size: 8px !important;
        padding: 1px 6px !important;
    }
    
    /* TABLA FERIADOS COMPACTA */
    #holidaysTab .card-body {
        max-height: 50vh !important;
        overflow-y: auto !important;
        padding: 4px !important;
    }
    
    #holidaysTable {
        min-width: 500px !important;
    }
    
    #holidaysTable th, #holidaysTable td {
        padding: 4px 3px !important;
        font-size: 8px !important;
    }
    
    #holidaysTable .btn-group .btn {
        padding: 2px 4px !important;
        font-size: 7px !important;
        min-height: 20px !important;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .login-container {
        padding: 10px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .form-container {
        padding: 15px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 12px 15px;
    }
    
    .sidebar-menu li {
        padding: 18px 20px;
    }
    
    .close, .close-service, .close-payment, .close-company, .close-holiday {
        min-width: 44px;
        min-height: 44px;
    }
    
    .sidebar-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
}