:root {
    /* Tema Oscuro - Dark Theme (por defecto) */
    --primary-color: #1a1a2e;
    --secondary-color: #e74c3c;
    --accent-color: #4a9eff;
    --background-color: #0f0f1e;
    --text-color: #e0e0e0;
    --text-color-secondary: #b0b0b0;
    --border-color: #2a2a3e;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --card-background: #1a1a2e;
    --card-hover: #222235;
    --input-background: #252540;
    --input-border: #3a3a4e;
}

/* Tema Claro - Light Theme */
body.light-theme {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
    --text-color-secondary: #666;
    --border-color: #dcdde1;
    --success-color: #27ae60;
    --warning-color: #f1c40f;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --card-background: #ffffff;
    --card-hover: #f8f9fa;
    --input-background: #ffffff;
    --input-border: #dcdde1;
}

/* Ajustes específicos para modo claro */
body.light-theme .btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

body.light-theme .btn-primary:hover {
    background-color: #34495e;
    border-color: #34495e;
}

body.light-theme .btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

body.light-theme .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

body.light-theme .btn-warning {
    color: #2c3e50;
}

body.light-theme .text-primary,
body.light-theme .link-primary {
    color: var(--primary-color) !important;
}

body.light-theme .link-primary:hover,
body.light-theme .link-primary:focus {
    color: #34495e !important;
}

body.light-theme a {
    color: var(--primary-color);
}

body.light-theme a:hover {
    color: #34495e;
}

/* Calendario - Modo Claro */
body.light-theme #calendar {
    background: #ffffff;
    border: 1px solid #dcdde1;
}

body.light-theme .fc-header-toolbar {
    background: #1976d2 !important;
    color: white !important;
}

body.light-theme .fc-button {
    background: white !important;
    border: 1px solid #1976d2 !important;
    color: #1976d2 !important;
}

body.light-theme .fc-button:hover {
    background: #e3f2fd !important;
    border-color: #1565c0 !important;
    color: #1565c0 !important;
}

body.light-theme .fc-button-active {
    background: #1976d2 !important;
    border-color: #1976d2 !important;
    color: white !important;
}

body.light-theme .fc-daygrid-day {
    border: 1px solid #e0e0e0 !important;
    background: white !important;
}

body.light-theme .fc-daygrid-day:hover {
    background: #f5f5f5 !important;
}

body.light-theme .fc-day-today {
    background: #e3f2fd !important;
}

body.light-theme .fc-day-today .fc-daygrid-day-number {
    color: #1976d2 !important;
    background: white;
    border: 2px solid #1976d2;
}

body.light-theme .fc-col-header-cell {
    background: #e3f2fd !important;
    color: #1976d2 !important;
}

body.light-theme .fc-event {
    background: #1976d2 !important;
    color: #ffffff !important;
    border-left: 3px solid #1565c0 !important;
}

body.light-theme .fc-event:hover {
    background: #1565c0 !important;
    color: #ffffff !important;
}

/* Asegurar que el texto de los eventos sea blanco en modo claro - FORZAR en todos los casos */
body.light-theme .fc-event-title,
body.light-theme .fc-event-time,
body.light-theme .fc-event-main,
body.light-theme .fc-event-main-frame,
body.light-theme .fc-event-title-container,
body.light-theme .fc-event-title-container *,
body.light-theme .fc-event * {
    color: #ffffff !important;
}

/* También para modo oscuro, asegurar texto blanco en eventos azules */
.fc-event {
    color: #ffffff !important;
}

.fc-event-title,
.fc-event-time,
.fc-event-main,
.fc-event-main-frame,
.fc-event-title-container,
.fc-event-title-container * {
    color: #ffffff !important;
}

/* Estilo para citas sin contacto - Banda roja (visible en modo oscuro y claro) */
.fc-event.appointment-no-contact,
.appointment-no-contact {
    border-left: 5px solid #e74c3c !important;
    border-color: #e74c3c !important;
    box-shadow: -3px 0 0 0 #e74c3c, inset -3px 0 0 0 rgba(231, 76, 60, 0.3) !important;
}

body.light-theme .fc-event.appointment-no-contact,
body.light-theme .appointment-no-contact {
    border-left: 5px solid #e74c3c !important;
    border-color: #e74c3c !important;
    box-shadow: -3px 0 0 0 #e74c3c, inset -3px 0 0 0 rgba(231, 76, 60, 0.3) !important;
}

/* Estilo para citas con consentimiento enviado - Banda verde (visible en modo oscuro y claro) */
.fc-event.appointment-consent-sent,
.appointment-consent-sent {
    border-left: 5px solid #27ae60 !important;
    border-color: #27ae60 !important;
    box-shadow: -3px 0 0 0 #27ae60, inset -3px 0 0 0 rgba(39, 174, 96, 0.3) !important;
}

body.light-theme .fc-event.appointment-consent-sent,
body.light-theme .appointment-consent-sent {
    border-left: 5px solid #27ae60 !important;
    border-color: #27ae60 !important;
    box-shadow: -3px 0 0 0 #27ae60, inset -3px 0 0 0 rgba(39, 174, 96, 0.3) !important;
}

body.light-theme .fc-daygrid-day-number {
    color: #424242 !important;
}

body.light-theme .fc-more-link {
    color: #1976d2 !important;
}

body.light-theme .fc-more-link:hover {
    color: #1565c0 !important;
}

body.light-theme .fc-timegrid-slot {
    border-color: #e0e0e0 !important;
}

body.light-theme .fc-timegrid-slot-label {
    color: #616161 !important;
}

body.light-theme .fc-timegrid-now-indicator-line {
    border-color: #1976d2 !important;
}

body.light-theme .fc-timegrid-now-indicator-arrow {
    border-color: #1976d2 !important;
}

body.light-theme .fc-daygrid-day-selected {
    background: #e3f2fd !important;
}

body.light-theme .fc-scroller::-webkit-scrollbar-track {
    background: #f5f5f5;
}

body.light-theme .fc-scroller::-webkit-scrollbar-thumb {
    background: #1976d2;
}

body.light-theme .fc-scroller::-webkit-scrollbar-thumb:hover {
    background: #1565c0;
}

/* Widget de Citas de Hoy - Modo Claro */
body.light-theme .today-appointments-widget {
    background: white;
    border: 1px solid #e0e0e0;
}

body.light-theme .today-appointments-header {
    background: #1976d2;
    color: white;
}

body.light-theme .today-appointments-body {
    background: #fafafa;
}

body.light-theme .today-appointment-item {
    background: white;
    border-left: 3px solid #1976d2;
}

body.light-theme .today-appointment-item:hover {
    background-color: #f5f5f5;
}

body.light-theme .today-appointment-time {
    color: #1976d2;
}

body.light-theme .today-appointment-client {
    color: #424242;
}

body.light-theme .today-appointment-artist {
    color: #757575;
}

body.light-theme .today-appointments-empty {
    color: #9e9e9e;
}

body.light-theme .today-appointments-body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

body.light-theme .today-appointments-body::-webkit-scrollbar-thumb {
    background: #1976d2;
}

body.light-theme .today-appointments-body::-webkit-scrollbar-thumb:hover {
    background: #1565c0;
}

/* Pantalla de Login - Modo Claro */
body.light-theme .login-container {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

body.light-theme .login-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

body.light-theme .login-card h2 {
    color: white;
}

body.light-theme .login-logo-fallback {
    color: white;
}

body.light-theme .login-card .form-label {
    color: #ffffff !important;
}

body.light-theme .login-card .form-control {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #2c3e50 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

body.light-theme .login-card .form-control:focus {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border-color: #3498db !important;
}

body.light-theme .login-card .form-control::placeholder {
    color: rgba(44, 62, 80, 0.6) !important;
}

body.light-theme .login-card .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.light-theme .login-card .btn-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.light-theme .login-card .btn-link:hover {
    color: #ffffff !important;
}

/* Modal de Consentimiento Informado Completo - Responsive */
#fullConsentModal .modal-dialog {
    max-width: 95%;
}

#fullConsentModal .modal-body {
    padding: 1rem;
}

.consent-document {
    font-size: 0.95rem;
    line-height: 1.6;
}

.consent-document .card {
    margin-bottom: 1rem;
}

.consent-document .card-header {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.consent-document .card-body {
    padding: 1rem;
}

.consent-document .card-body p {
    margin-bottom: 0.75rem;
    text-align: justify;
}

.consent-document .card-body ul {
    padding-left: 1.5rem;
}

.consent-document .card-body li {
    margin-bottom: 0.5rem;
}

.consent-document img {
    border-radius: 4px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    #fullConsentModal .modal-dialog {
        max-width: 100%;
        margin: 0;
    }
    
    #fullConsentModal .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }
    
    #fullConsentModal .modal-header {
        padding: 0.75rem 1rem;
    }
    
    #fullConsentModal .modal-title {
        font-size: 1rem;
    }
    
    #fullConsentModal .modal-body {
        padding: 0.75rem;
        max-height: calc(100vh - 120px);
    }
    
    .consent-document {
        font-size: 0.85rem;
    }
    
    .consent-document .card-header {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .consent-document .card-body {
        padding: 0.75rem;
    }
    
    .consent-document h3 {
        font-size: 1.25rem;
    }
    
    .consent-document h5 {
        font-size: 0.95rem;
    }
    
    .consent-document .row {
        margin: 0;
    }
    
    .consent-document .col-md-6,
    .consent-document .col-md-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .consent-document img {
        max-height: 300px !important;
    }
    
    #fullConsentModal .modal-footer {
        padding: 0.75rem;
        flex-direction: column;
    }
    
    #fullConsentModal .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Responsive para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    #fullConsentModal .modal-dialog {
        max-width: 90%;
    }
    
    .consent-document {
        font-size: 0.9rem;
    }
    
    .consent-document .card-header {
        font-size: 0.95rem;
    }
    
    .consent-document img {
        max-height: 400px !important;
    }
}

/* Modal de Consentimiento Informado - Mejorar Contraste */
#consentModal .modal-content {
    background-color: var(--card-background);
    color: var(--text-color);
}

#consentModal .modal-header {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

#consentModal .modal-title {
    color: var(--text-color) !important;
    font-weight: 600;
}

#consentModal .modal-body {
    background-color: var(--card-background);
    color: var(--text-color);
}

#consentModal .consent-form {
    color: var(--text-color);
}

#consentModal .consent-form h4,
#consentModal .consent-form h5 {
    color: var(--text-color) !important;
    font-weight: 600;
}

#consentModal .card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

#consentModal .card-header {
    background-color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

#consentModal .card-header.bg-primary {
    background-color: var(--accent-color) !important;
    color: white !important;
}

#consentModal .card-header.bg-info {
    background-color: var(--info-color) !important;
    color: white !important;
}

#consentModal .card-header.bg-warning {
    background-color: var(--warning-color) !important;
    color: #1a1a1a !important;
    font-weight: 600;
}

#consentModal .card-body {
    background-color: var(--card-background);
    color: var(--text-color);
}

#consentModal .card-body p {
    color: var(--text-color) !important;
    line-height: 1.6;
}

#consentModal .card-body strong {
    color: var(--text-color);
    font-weight: 600;
}

#consentModal .card-body ul {
    color: var(--text-color);
}

#consentModal .card-body li {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

#consentModal .form-label {
    color: var(--text-color) !important;
    font-weight: 500;
}

#consentModal .form-control {
    background-color: var(--input-background) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--input-border) !important;
}

#consentModal .form-control:focus {
    background-color: var(--input-background) !important;
    color: var(--text-color) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(74, 158, 255, 0.25) !important;
}

#consentModal .form-control::placeholder {
    color: var(--text-color-secondary) !important;
}

#consentModal .form-control[readonly] {
    background-color: var(--input-background) !important;
    color: var(--text-color) !important;
    opacity: 0.8;
}

#consentModal .form-check-label {
    color: var(--text-color) !important;
}

#consentModal .form-check-input {
    background-color: var(--input-background);
    border-color: var(--input-border);
}

#consentModal .form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

#consentModal canvas {
    background-color: white !important;
    border: 2px solid var(--border-color) !important;
}

#consentModal .btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-color);
}

#consentModal .btn-outline-secondary:hover {
    background-color: var(--card-hover);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Ajustes específicos para modo claro */
body.light-theme #consentModal .modal-content {
    background-color: #ffffff;
    color: #2c3e50;
}

body.light-theme #consentModal .card {
    background-color: #ffffff;
    border-color: #dcdde1;
}

body.light-theme #consentModal .card-header {
    background-color: #f8f9fa;
    color: #2c3e50;
}

body.light-theme #consentModal .card-header.bg-primary {
    background-color: #2c3e50 !important;
    color: white !important;
}

body.light-theme #consentModal .card-header.bg-info {
    background-color: #3498db !important;
    color: white !important;
}

body.light-theme #consentModal .card-header.bg-warning {
    background-color: #f1c40f !important;
    color: #2c3e50 !important;
}

body.light-theme #consentModal .card-body {
    background-color: #ffffff;
    color: #2c3e50;
}

body.light-theme #consentModal .form-control {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border-color: #dcdde1 !important;
}

body.light-theme #consentModal .form-control:focus {
    background-color: #ffffff !important;
    border-color: #3498db !important;
}

body.light-theme #consentModal canvas {
    background-color: white !important;
    border-color: #dcdde1 !important;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    padding: 20px;
}

.login-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    color: white;
}

/* Logo del login - Responsive */
.login-logo-container {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-logo {
    max-width: 100%;
    height: auto;
    display: block !important;
    margin: 0 auto;
    object-fit: contain;
    /* Tamaños responsive */
    max-height: 120px; /* Desktop */
    min-height: 60px; /* Altura mínima para asegurar visibilidad */
    width: auto;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent;
    position: relative;
    z-index: 1;
}

.login-logo-fallback {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 30px;
}

/* Media queries para responsive */
@media (max-width: 768px) {
    .login-logo {
        max-height: 100px; /* Tablet */
    }
    
    .login-card {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .login-logo {
        max-height: 80px; /* Móvil */
    }
    
    .login-card {
        padding: 25px 15px;
        border-radius: 10px;
    }
    
    .login-logo-container {
        padding: 15px 0;
        margin-bottom: 25px;
    }
}

@media (min-width: 1200px) {
    .login-logo {
        max-height: 140px; /* Pantallas grandes */
    }
}

.login-card h2 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 30px;
}

/* Estilos específicos para el formulario dentro del login-card */
.login-card .form-label {
    color: #ffffff !important;
    font-weight: 500;
}

.login-card .form-control {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #2c3e50 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.login-card .form-control:focus {
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border-color: #3498db !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25) !important;
}

.login-card .form-control::placeholder {
    color: rgba(44, 62, 80, 0.6) !important;
}

.login-card .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.login-card .btn-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.login-card .btn-link:hover {
    color: #ffffff !important;
}

.login-card .alert {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.login-card .alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Estilos generales - Tema Oscuro */
body {
    background-color: var(--background-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* Asegurar que todos los textos sean claros en tema oscuro */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color) !important;
}

p, span, div, label {
    color: var(--text-color);
}

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

/* Tablas - Tema Oscuro */
.table {
    color: var(--text-color);
    background-color: var(--card-background);
}

.table thead th {
    background-color: var(--primary-color);
    color: #ffffff !important;
    border-color: var(--border-color);
}

.table tbody tr {
    background-color: var(--card-background);
    border-color: var(--border-color);
}

.table tbody tr:hover {
    background-color: var(--card-hover);
}

.table td, .table th {
    border-color: var(--border-color);
}

/* Listas - Tema Oscuro */
.list-group-item {
    background-color: var(--card-background);
    border-color: var(--border-color);
    color: var(--text-color);
}

.list-group-item:hover {
    background-color: var(--card-hover);
}

.list-group-item.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Dropdowns - Tema Oscuro */
.dropdown-menu {
    background-color: var(--card-background);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    color: var(--text-color);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--card-hover);
    color: var(--text-color);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--accent-color);
    color: white;
}

/* Badges - Tema Oscuro */
.badge {
    color: white;
}

.badge.bg-secondary {
    background-color: var(--text-color-secondary) !important;
}

.badge.bg-light {
    background-color: var(--input-background) !important;
    color: var(--text-color) !important;
}

/* Input Groups - Tema Oscuro */
.input-group-text {
    background-color: var(--input-background);
    border-color: var(--input-border);
    color: var(--text-color);
}

/* Pagination - Tema Oscuro */
.page-link {
    background-color: var(--card-background);
    border-color: var(--border-color);
    color: var(--text-color);
}

.page-link:hover {
    background-color: var(--card-hover);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Breadcrumb - Tema Oscuro */
.breadcrumb {
    background-color: var(--card-background);
}

.breadcrumb-item a {
    color: var(--accent-color);
}

.breadcrumb-item.active {
    color: var(--text-color-secondary);
}

/* Clases de Bootstrap con color primario - Ajustadas para tema oscuro */
.text-primary {
    color: var(--accent-color) !important;
}

.link-primary {
    color: var(--accent-color) !important;
}

.link-primary:hover,
.link-primary:focus {
    color: #3a8eef !important;
}

/* Asegurar que todos los botones pequeños también sean visibles */
.btn-sm.btn-primary,
.btn-sm.btn-outline-primary {
    font-weight: 500;
}

.btn-xs.btn-primary,
.btn-xs.btn-outline-primary {
    font-weight: 500;
}

/* Links y enlaces en general */
a {
    color: var(--accent-color);
}

a:hover {
    color: #3a8eef;
}

/* Asegurar visibilidad de textos en cards y modales */
.card .text-muted,
.modal .text-muted {
    color: var(--text-color-secondary) !important;
}

/* Navbar */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    color: white !important;
    font-size: 1.3rem;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: white !important;
}

.nav-link.active {
    color: white !important;
    font-weight: bold;
    background-color: rgba(255,255,255,0.1);
    border-radius: 5px;
}

/* Cards - Tema Oscuro */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--card-background);
    height: 100%;
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    background: var(--card-hover);
}

.card-header {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    font-weight: 600;
    color: var(--text-color);
}

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

.card-footer {
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    color: var(--text-color);
}

/* Botones */
.btn {
    border-radius: 5px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: 1px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: #3a8eef;
    border-color: #3a8eef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 158, 255, 0.3);
}

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

.btn-success:hover {
    background-color: #229954;
}

.btn-warning {
    background-color: var(--warning-color);
    color: #1a1a1a;
    font-weight: 600;
}

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

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

.bg-purple {
    background-color: #9b59b6 !important;
    color: white;
}

.btn-outline-primary {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

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

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

/* Quick Actions */
.quick-actions {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.quick-actions .btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 1.2rem;
}

.quick-actions .btn:hover {
    transform: scale(1.1);
}

/* Stats Cards - Tema Oscuro */
.stats-card {
    background: var(--card-background);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    background: var(--card-hover);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.stats-label {
    color: var(--text-color-secondary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cuadrículas de Contabilidad - Mejorar contraste */
.stats-card.bg-primary,
.stats-card.bg-success {
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.stats-card.bg-primary .stats-number,
.stats-card.bg-success .stats-number {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 2.5rem;
}

.stats-card.bg-primary .stats-label,
.stats-card.bg-success .stats-label {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

/* Asegurar contraste en modo claro */
body.light-theme .stats-card.bg-primary {
    background-color: #1976d2 !important;
    border-color: rgba(255, 255, 255, 0.3);
}

body.light-theme .stats-card.bg-success {
    background-color: #27ae60 !important;
    border-color: rgba(255, 255, 255, 0.3);
}

body.light-theme .stats-card.bg-primary .stats-number,
body.light-theme .stats-card.bg-success .stats-number {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

body.light-theme .stats-card.bg-primary .stats-label,
body.light-theme .stats-card.bg-success .stats-label {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Asegurar contraste en modo oscuro */
.stats-card.bg-primary {
    background-color: #1976d2 !important;
}

.stats-card.bg-success {
    background-color: #27ae60 !important;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Contact Directory */
.contact-directory {
    min-height: 400px;
}

.contact-list {
    overflow-y: auto;
    max-height: 400px;
    padding: 10px;
}

.contact-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    color: var(--text-color);
}

.contact-item:hover {
    background-color: var(--card-hover);
}

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

/* Search Container */
.search-container {
    margin-bottom: 20px;
}

.search-container .input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.search-container .form-control {
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
}

.search-container .form-control:focus {
    box-shadow: none;
    border-color: var(--accent-color);
}

.search-container .btn {
    padding: 12px 20px;
}

/* Modal Styles - Tema Oscuro */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    background-color: var(--card-background);
    color: var(--text-color);
}

/* ============================================
   SOLUCIÓN GENERAL: TODOS LOS MODALES POR ENCIMA DEL CALENDARIO
   ============================================ */

/* Asegurar que TODOS los modales de Bootstrap estén por encima del calendario */
.modal {
    z-index: 9999 !important;
    position: fixed !important;
}

.modal.show {
    z-index: 9999 !important;
}

.modal.fade.show {
    z-index: 9999 !important;
}

.modal-dialog {
    z-index: 10000 !important;
    position: relative !important;
}

.modal-content {
    z-index: 10001 !important;
    position: relative !important;
}

/* Asegurar que el backdrop del modal esté por encima del calendario */
.modal-backdrop {
    z-index: 9998 !important;
}

.modal-backdrop.show {
    z-index: 9998 !important;
}

.modal-backdrop.fade.show {
    z-index: 9998 !important;
}

/* Asegurar que FullCalendar y todos sus elementos tengan z-index bajo */
.fc {
    z-index: 1 !important;
    position: relative !important;
}

.fc-view-harness {
    z-index: 1 !important;
    position: relative !important;
}

.fc-scroller {
    z-index: 1 !important;
    position: relative !important;
}

.fc-daygrid {
    z-index: 1 !important;
    position: relative !important;
}

.fc-timegrid {
    z-index: 1 !important;
    position: relative !important;
}

.fc-view {
    z-index: 1 !important;
    position: relative !important;
}

.fc-daygrid-view {
    z-index: 1 !important;
    position: relative !important;
}

.fc-timegrid-view {
    z-index: 1 !important;
    position: relative !important;
}

.fc-scrollgrid {
    z-index: 1 !important;
    position: relative !important;
}

.fc-col-header {
    z-index: 1 !important;
    position: relative !important;
}

.fc-daygrid-body {
    z-index: 1 !important;
    position: relative !important;
}

.fc-timegrid-body {
    z-index: 1 !important;
    position: relative !important;
}

/* Asegurar que el contenedor del calendario también tenga z-index bajo */
#calendar {
    z-index: 1 !important;
    position: relative !important;
}

/* Asegurar que cualquier elemento dentro del calendario tenga z-index bajo */
#calendar * {
    position: relative !important;
}

#calendar .fc {
    z-index: 1 !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 15px 15px 0 0;
}

.modal-title {
    font-weight: 600;
    color: var(--text-color);
}

.modal-body {
    padding: 25px;
    background-color: var(--card-background);
    color: var(--text-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 0 0 15px 15px;
}

/* Form Styles - Tema Oscuro */
.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-control, .form-select {
    border: 1px solid var(--input-border);
    border-radius: 5px;
    padding: 10px 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: var(--input-background);
    color: var(--text-color);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 158, 255, 0.25);
    background-color: var(--input-background);
    color: var(--text-color);
}

.form-control::placeholder {
    color: var(--text-color-secondary);
}

/* Inputs en modales y cards */
.modal .form-control,
.modal .form-select,
.card .form-control,
.card .form-select {
    background-color: var(--input-background);
    color: var(--text-color);
    border-color: var(--input-border);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Tattoos List in Profile */
.tattoos-list {
    max-height: 400px;
    overflow-y: auto;
}

.tattoos-list .card {
    margin-bottom: 10px;
}

/* Scrollbar Styles - Tema Oscuro */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--card-background);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Alerts - Tema Oscuro */
.alert {
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 15px 20px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Notificaciones en modo oscuro - Mejor contraste */
.alert-success {
    background-color: rgba(46, 204, 113, 0.25);
    color: #2ecc71;
    border: 2px solid rgba(46, 204, 113, 0.5);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.alert-success .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.25);
    color: #e74c3c;
    border: 2px solid rgba(231, 76, 60, 0.5);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

.alert-danger .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.25);
    color: #3498db;
    border: 2px solid rgba(52, 152, 219, 0.5);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.alert-info .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.25);
    color: #f39c12;
    border: 2px solid rgba(243, 156, 18, 0.5);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

.alert-warning .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

/* Notificaciones en modo claro - Asegurar visibilidad */
body.light-theme .alert-success {
    background-color: rgba(39, 174, 96, 0.15);
    color: #27ae60;
    border: 2px solid rgba(39, 174, 96, 0.4);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

body.light-theme .alert-danger {
    background-color: rgba(231, 76, 60, 0.15);
    color: #c0392b;
    border: 2px solid rgba(231, 76, 60, 0.4);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

body.light-theme .alert-info {
    background-color: rgba(52, 152, 219, 0.15);
    color: #2980b9;
    border: 2px solid rgba(52, 152, 219, 0.4);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

body.light-theme .alert-warning {
    background-color: rgba(243, 156, 18, 0.15);
    color: #d68910;
    border: 2px solid rgba(243, 156, 18, 0.4);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .quick-actions {
        right: 10px;
        bottom: 10px;
    }

    .quick-actions .btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    .stats-card {
        margin-bottom: 15px;
    }

    .stats-number {
        font-size: 2rem;
    }

    .chart-container {
        height: 250px;
    }

    .contact-directory {
        min-height: 300px;
    }

    .contact-list {
        max-height: 300px;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .nav-link {
        padding: 0.5rem !important;
        font-size: 0.9rem;
    }

    .modal-dialog {
        margin: 10px;
    }

    .modal-body {
        padding: 15px;
    }

    .card-body {
        padding: 15px;
    }

    .login-card {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 10px;
    }

    .stats-number {
        font-size: 1.8rem;
    }

    .chart-container {
        height: 200px;
    }

    .quick-actions .btn {
        width: 44px;
        height: 44px;
    }

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

    h2 {
        font-size: 1.5rem;
    }
}

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

.section {
    animation: fadeIn 0.3s ease-out;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Empty States - Tema Oscuro */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-color-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
    color: var(--text-color-secondary);
}

/* Print Styles */
@media print {
    .navbar,
    .quick-actions,
    .btn,
    .modal {
        display: none !important;
    }
}

/* ============================================
   CALENDAR STYLES - Professional & Responsive
   Corporate Blue & White Design
   ============================================ */

/* Calendar Container - Tema Oscuro */
#calendar {
    padding: 15px;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

/* FullCalendar Header - Tema Oscuro */
.fc-header-toolbar {
    margin-bottom: 1rem !important;
    padding: 0.75rem 1rem !important;
    background: var(--primary-color) !important;
    border-radius: 6px !important;
    color: var(--text-color) !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    border: 1px solid var(--border-color) !important;
}

.fc-toolbar-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    margin: 0 !important;
}

.fc-button {
    background: var(--card-background) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
}

.fc-button:hover {
    background: var(--card-hover) !important;
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
}

.fc-button:active {
    background: var(--input-background) !important;
}

.fc-button-active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: white !important;
}

.fc-button:focus {
    outline: 2px solid #64b5f6 !important;
    outline-offset: 2px !important;
}

/* Calendar Grid - Tema Oscuro */
.fc-daygrid-day {
    border: 1px solid var(--border-color) !important;
    transition: background 0.2s ease;
    overflow: hidden !important;
    position: relative !important;
    background: var(--card-background) !important;
}

.fc-daygrid-day-frame {
    overflow: hidden !important;
    position: relative !important;
}

.fc-daygrid-day-events {
    overflow: hidden !important;
    position: relative !important;
}

.fc-daygrid-day:hover {
    background: var(--card-hover) !important;
}

.fc-day-today {
    background: rgba(74, 158, 255, 0.1) !important;
}

.fc-day-today .fc-daygrid-day-number {
    color: var(--accent-color) !important;
    font-weight: 600 !important;
    background: var(--accent-color);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-color);
    color: white !important;
}

/* Day Headers - Tema Oscuro */
.fc-col-header-cell {
    background: var(--primary-color) !important;
    border: none !important;
    padding: 0.5rem 0.25rem !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border-color) !important;
}

.fc-col-header-cell-cushion {
    padding: 0.25rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Events - Tema Oscuro */
.fc-event {
    border: none !important;
    border-radius: 4px !important;
    padding: 0.25rem 0.5rem !important;
    margin: 1px 0 !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    background: var(--accent-color) !important;
    color: white !important;
    border-left: 3px solid var(--accent-color) !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Avisos rojos y verdes - Mayor prioridad para modo oscuro */
.fc-event.appointment-no-contact {
    border-left: 5px solid #e74c3c !important;
    border-color: #e74c3c !important;
    box-shadow: -3px 0 0 0 #e74c3c, inset -3px 0 0 0 rgba(231, 76, 60, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.fc-event.appointment-consent-sent {
    border-left: 5px solid #27ae60 !important;
    border-color: #27ae60 !important;
    box-shadow: -3px 0 0 0 #27ae60, inset -3px 0 0 0 rgba(39, 174, 96, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.fc-event:hover {
    background: #3a8eef !important;
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.4) !important;
    z-index: 10 !important;
    transform: scale(1.02);
}

.fc-event-title {
    font-weight: 500 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    display: block !important;
}

.fc-event-time {
    font-weight: 500 !important;
    font-size: 0.7rem !important;
    opacity: 0.95;
    margin-right: 0.25rem;
}

/* Event Custom Class */
.fc-event-custom {
    border-left: 3px solid #1565c0 !important;
}

/* Prevent events from overflowing */
.fc-daygrid-event {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.fc-event-main {
    max-width: 100% !important;
    overflow: hidden !important;
}

.fc-event-main-frame {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Day Cell Custom */
.fc-day-custom {
    transition: background 0.2s ease;
}

/* More Link - Tema Oscuro */
.fc-more-link {
    color: var(--accent-color) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-size: 0.75rem !important;
}

.fc-more-link:hover {
    color: #3a8eef !important;
    text-decoration: underline !important;
}

/* Time Grid (Week/Day View) - Tema Oscuro */
.fc-timegrid-slot {
    border-color: var(--border-color) !important;
    height: 2.5rem !important;
}

.fc-timegrid-slot-label {
    font-size: 0.7rem !important;
    color: var(--text-color-secondary) !important;
    padding: 0.25rem !important;
}

.fc-timegrid-now-indicator-line {
    border-color: var(--accent-color) !important;
    border-width: 2px !important;
}

.fc-timegrid-now-indicator-arrow {
    border-color: var(--accent-color) !important;
}

/* Selected Day - Tema Oscuro */
.fc-daygrid-day-selected {
    background: rgba(74, 158, 255, 0.15) !important;
}

/* Scrollbar */
.fc-scroller::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.fc-scroller::-webkit-scrollbar-track {
    background: var(--card-background);
    border-radius: 3px;
}

.fc-scroller::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.fc-scroller::-webkit-scrollbar-thumb:hover {
    background: #3a8eef;
}

/* Day Grid Day Number - Tema Oscuro */
.fc-daygrid-day-number {
    font-size: 0.875rem !important;
    padding: 0.5rem !important;
    color: var(--text-color) !important;
    font-weight: 500 !important;
}

/* Responsive Design - Mobile First */
@media (max-width: 992px) {
    #calendar {
        padding: 10px;
    }
    
    .fc-header-toolbar {
        padding: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .fc-toolbar-title {
        font-size: 1.1rem !important;
    }
    
    .fc-button {
        font-size: 0.8rem !important;
        padding: 0.35rem 0.6rem !important;
    }
    
    .fc-col-header-cell {
        background: var(--primary-color) !important;
        color: var(--text-color) !important;
        padding: 0.4rem 0.15rem !important;
        font-size: 0.7rem !important;
    }
    
    .fc-col-header-cell-cushion {
        padding: 0.15rem !important;
    }
    
    .fc-daygrid-day-number {
        font-size: 0.8rem !important;
        padding: 0.4rem !important;
    }
    
    .fc-event {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .fc-event-title {
        font-size: 0.7rem !important;
    }
    
    .fc-event-time {
        font-size: 0.65rem !important;
    }
}

@media (max-width: 768px) {
    #calendar {
        padding: 8px;
        border-radius: 6px;
    }
    
    .fc-header-toolbar {
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .fc-toolbar-title {
        font-size: 1rem !important;
        text-align: center;
        width: 100%;
        order: 1;
    }
    
    .fc-toolbar-chunk {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .fc-button-group {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.35rem;
        order: 2;
    }
    
    .fc-button {
        flex: 1 1 auto;
        min-width: 70px;
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
    }
    
    .fc-prev-button,
    .fc-next-button,
    .fc-today-button {
        flex: 0 0 auto;
        min-width: 50px;
    }
    
    .fc-col-header-cell {
        background: var(--primary-color) !important;
        color: var(--text-color) !important;
        padding: 0.35rem 0.1rem !important;
        font-size: 0.65rem !important;
    }
    
    .fc-col-header-cell-cushion {
        padding: 0.1rem !important;
        font-size: 0.65rem !important;
    }
    
    .fc-daygrid-day-number {
        font-size: 0.75rem !important;
        padding: 0.3rem !important;
    }
    
    .fc-day-today .fc-daygrid-day-number {
        width: 24px;
        height: 24px;
        font-size: 0.7rem !important;
    }
    
    .fc-event {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.3rem !important;
        margin: 0.5px 0 !important;
        line-height: 1.2 !important;
    }
    
    .fc-event-title {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }
    
    .fc-event-time {
        font-size: 0.6rem !important;
    }
    
    .fc-timegrid-slot {
        height: 2rem !important;
    }
    
    .fc-timegrid-slot-label {
        font-size: 0.65rem !important;
        padding: 0.15rem !important;
    }
}

@media (max-width: 576px) {
    #calendar {
        padding: 5px;
        border-radius: 4px;
    }
    
    .fc-header-toolbar {
        padding: 0.4rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .fc-toolbar-title {
        font-size: 0.9rem !important;
    }
    
    .fc-button {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.4rem !important;
        min-width: 60px;
    }
    
    .fc-col-header-cell {
        background: var(--primary-color) !important;
        color: var(--text-color) !important;
        padding: 0.3rem 0.05rem !important;
        font-size: 0.6rem !important;
    }
    
    .fc-col-header-cell-cushion {
        padding: 0.05rem !important;
        font-size: 0.6rem !important;
    }
    
    .fc-daygrid-day-number {
        font-size: 0.7rem !important;
        padding: 0.25rem !important;
    }
    
    .fc-day-today .fc-daygrid-day-number {
        width: 22px;
        height: 22px;
        font-size: 0.65rem !important;
    }
    
    .fc-event {
        font-size: 0.6rem !important;
        padding: 0.1rem 0.25rem !important;
        line-height: 1.1 !important;
    }
    
    .fc-event-title {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
    }
    
    .fc-event-time {
        font-size: 0.55rem !important;
    }
    
    .fc-timegrid-slot {
        height: 1.75rem !important;
    }
    
    .fc-timegrid-slot-label {
        font-size: 0.6rem !important;
    }
}

/* Tablet specific adjustments */
@media (min-width: 577px) and (max-width: 992px) {
    .fc-col-header-cell {
        background: var(--primary-color) !important;
        color: var(--text-color) !important;
        font-size: 0.7rem !important;
    }
    
    .fc-event {
        font-size: 0.7rem !important;
    }
    
    .fc-event-title {
        font-size: 0.7rem !important;
    }
}

/* Animation for calendar load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#calendar {
    animation: fadeIn 0.5s ease-out;
}

/* Card wrapper for calendar */
#appointments-section .card {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

#appointments-section .card:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

#appointments-section .card-body {
    padding: 0;
}

/* Today's Appointments Widget - Floating - Tema Oscuro */
.today-appointments-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 280px;
    max-height: 400px;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.today-appointments-header {
    background: var(--primary-color);
    color: var(--text-color);
    padding: 0.6rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.today-appointments-header h6 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.today-appointments-header .btn-close {
    opacity: 0.9;
    filter: brightness(0) invert(1);
}

.today-appointments-header .btn-close:hover {
    opacity: 1;
}

.today-appointments-body {
    padding: 0.5rem;
    max-height: 350px;
    overflow-y: auto;
    background: var(--card-background);
}

.today-appointment-item {
    background: var(--input-background);
    border-left: 3px solid var(--accent-color);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.today-appointment-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translateX(2px);
    background-color: var(--card-hover);
    cursor: pointer;
}

.today-appointment-time {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.today-appointment-client {
    font-size: 0.8rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.today-appointment-artist {
    font-size: 0.7rem;
    color: var(--text-color-secondary);
}

.today-appointments-empty {
    text-align: center;
    padding: 1rem;
    color: var(--text-color-secondary);
    font-size: 0.8rem;
}

.today-appointments-body::-webkit-scrollbar {
    width: 6px;
}

.today-appointments-body::-webkit-scrollbar-track {
    background: var(--card-background);
    border-radius: 3px;
}

.today-appointments-body::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.today-appointments-body::-webkit-scrollbar-thumb:hover {
    background: #3a8eef;
}

/* Notificación de Cumpleaños - Estilo mejorado */
.birthday-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 350px;
    width: auto;
    min-width: 280px;
    background: var(--card-background);
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.birthday-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--accent-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.birthday-notification-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.birthday-notification-title i {
    font-size: 1.1rem;
}

.birthday-notification-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

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

.birthday-notification-body {
    padding: 1rem;
    background: var(--card-background);
}

.birthday-notification-text {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 500;
}

.birthday-client-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
    max-height: 120px;
    overflow-y: auto;
}

.birthday-client-item {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

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

.birthday-client-item strong {
    color: var(--accent-color);
    font-weight: 600;
}

.birthday-client-item em {
    color: var(--text-color-secondary);
    font-style: italic;
}

.birthday-notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.birthday-notification-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

/* Tema claro para notificación de cumpleaños */
body.light-theme .birthday-notification {
    background: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

body.light-theme .birthday-notification-body {
    background: #ffffff;
}

body.light-theme .birthday-notification-text {
    color: var(--text-color);
}

body.light-theme .birthday-client-item {
    color: var(--text-color);
    border-bottom-color: var(--border-color);
}

/* Responsive adjustments for widget */
@media (max-width: 768px) {
    .today-appointments-widget {
        width: 240px;
        max-height: 350px;
        bottom: 15px;
        left: 15px;
    }
    
    .today-appointments-header {
        padding: 0.5rem 0.6rem;
    }
    
    .today-appointments-header h6 {
        font-size: 0.8rem;
    }
    
    .birthday-notification {
        top: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
        min-width: 260px;
    }
    
    .today-appointment-item {
        padding: 0.4rem;
    }
    
    .today-appointment-time {
        font-size: 0.7rem;
    }
    
    .today-appointment-client {
        font-size: 0.75rem;
    }
    
    .today-appointment-artist {
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .today-appointments-widget {
        width: 200px;
        max-height: 300px;
        bottom: 10px;
        left: 10px;
    }
    
    .today-appointments-header h6 {
        font-size: 0.75rem;
    }
    
    .today-appointment-time {
        font-size: 0.65rem;
    }
    
    .today-appointment-client {
        font-size: 0.7rem;
    }
    
    .today-appointment-artist {
        font-size: 0.6rem;
    }
}

/* ============================================
   SOLUCIÓN: Hacer visible el modal de Google OAuth para grabación
   ============================================ */

/* Forzar visibilidad de elementos de Google OAuth */
iframe[src*="accounts.google.com"],
iframe[src*="oauth"],
iframe[id*="google"],
iframe[name*="google"],
div[id*="google-oauth"],
div[class*="google-oauth"],
div[id*="gsi"],
div[class*="gsi"],
div[data-google-oauth],
.gsi-frame,
#gsi_*,
[id^="gsi_"],
[class^="gsi_"] {
    z-index: 99999 !important;
    position: fixed !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    pointer-events: auto !important;
    transform: none !important;
    will-change: auto !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
}

/* Asegurar que los overlays de Google OAuth sean visibles */
body > iframe[src*="accounts.google.com"],
body > iframe[src*="oauth"],
body > div[id*="google"],
body > div[class*="google-oauth"] {
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Forzar visibilidad de popups de Google */
iframe[src*="accounts.google.com"] {
    z-index: 99999 !important;
    position: fixed !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    border: 3px solid #4285f4 !important;
    box-shadow: 0 0 20px rgba(66, 133, 244, 0.5) !important;
}

/* Asegurar que cualquier elemento relacionado con OAuth sea visible */
*[id*="oauth"],
*[class*="oauth"],
*[data-oauth],
*[name*="oauth"] {
    z-index: 99999 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}