/* Nail Salon Agenda - Estilos principales */

/* Reset básico y configuración */
.nail-salon-agenda * {
    box-sizing: border-box;
}

.nail-salon-agenda {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* Loading state */
.nail-salon-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background-color: #fdf2f8;
}

.nail-salon-loading .text-center {
    text-align: center;
}

.nail-salon-loading .animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Layout principal */
.nail-salon-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fdf2f8;
    min-height: 100vh;
}

.nail-salon-header {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.nail-salon-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nail-salon-header .subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Grid de contenido principal */
.nail-salon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .nail-salon-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Tarjetas */
.nail-salon-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.nail-salon-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nail-salon-card h2 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 2px solid #ec4899;
    padding-bottom: 0.5rem;
}

/* Calendario */
.nail-salon-calendar {
    width: 100%;
}

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

.calendar-nav-btn {
    background: #ec4899;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
    background: #be185d;
    transform: scale(1.05);
}

.calendar-nav-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.calendar-month-year {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-header {
    background: #f9fafb;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
}

.calendar-day {
    background: white;
    padding: 0.75rem;
    min-height: 60px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.calendar-day:hover {
    background: #fef7ff;
}

.calendar-day.other-month {
    background: #f9fafb;
    color: #9ca3af;
}

.calendar-day.selected {
    background: #ec4899;
    color: white;
}

.calendar-day.today {
    background: #fef3c7;
    font-weight: 600;
}

.calendar-day.has-appointments {
    background: #dbeafe;
}

.calendar-day.has-appointments.selected {
    background: #1d4ed8;
}

.calendar-day-number {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.calendar-appointments-indicator {
    width: 6px;
    height: 6px;
    background: #ec4899;
    border-radius: 50%;
    margin-top: auto;
}

.calendar-day.selected .calendar-appointments-indicator {
    background: white;
}

/* Lista de citas */
.appointments-list {
    max-height: 500px;
    overflow-y: auto;
}

.appointment-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid #ec4899;
    transition: all 0.2s ease;
}

.appointment-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.appointment-time {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.appointment-service {
    color: #ec4899;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.appointment-client {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.appointment-price {
    color: #059669;
    font-weight: 600;
    font-size: 0.9rem;
}

.appointment-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.appointment-status.scheduled {
    background: #dbeafe;
    color: #1e40af;
}

.appointment-status.confirmed {
    background: #d1fae5;
    color: #065f46;
}

.appointment-status.completed {
    background: #d4edda;
    color: #155724;
}

.appointment-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.no-appointments {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-appointments-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

/* Botones de acción */
.nail-salon-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.nail-salon-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.875rem;
}

.nail-salon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nail-salon-btn-primary {
    background: #ec4899;
    color: white;
}

.nail-salon-btn-primary:hover {
    background: #be185d;
}

.nail-salon-btn-secondary {
    background: #6b7280;
    color: white;
}

.nail-salon-btn-secondary:hover {
    background: #4b5563;
}

.nail-salon-btn-success {
    background: #10b981;
    color: white;
}

.nail-salon-btn-success:hover {
    background: #059669;
}

.nail-salon-btn-info {
    background: #3b82f6;
    color: white;
}

.nail-salon-btn-info:hover {
    background: #2563eb;
}

.nail-salon-btn-warning {
    background: #f59e0b;
    color: white;
}

.nail-salon-btn-warning:hover {
    background: #d97706;
}

.nail-salon-btn-danger {
    background: #dc2626;
    color: white;
}

.nail-salon-btn-danger:hover {
    background: #b91c1c;
}

/* Modal/Overlay */
.nail-salon-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.nail-salon-modal {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.nail-salon-modal h3 {
    margin: 0 0 1.5rem 0;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Formularios */
.nail-salon-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nail-salon-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nail-salon-form-group label {
    font-weight: 500;
    color: #374151;
}

.nail-salon-form-group input,
.nail-salon-form-group select,
.nail-salon-form-group textarea {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.nail-salon-form-group input:focus,
.nail-salon-form-group select:focus,
.nail-salon-form-group textarea:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.nail-salon-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Notificaciones */
.nail-salon-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.nail-salon-notification.success {
    background: #10b981;
}

.nail-salon-notification.error {
    background: #ef4444;
}

.nail-salon-notification.info {
    background: #3b82f6;
}

.nail-salon-notification.warning {
    background: #f59e0b;
}

/* Chatbot */
.nail-salon-chatbot {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px -3px rgba(236, 72, 153, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px -3px rgba(236, 72, 153, 0.6);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chatbot-header {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    padding: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chatbot-message {
    max-width: 80%;
    padding: 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.chatbot-message.user {
    background: #f3f4f6;
    color: #1f2937;
    align-self: flex-end;
}

.chatbot-message.bot {
    background: #ec4899;
    color: white;
    align-self: flex-start;
}

.chatbot-input {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
}

.chatbot-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.chatbot-input button {
    background: #ec4899;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
}

/* Responsivo */
@media (max-width: 640px) {
    .nail-salon-container {
        padding: 1rem;
    }
    
    .nail-salon-header {
        padding: 1.5rem 1rem;
    }
    
    .nail-salon-header h1 {
        font-size: 2rem;
    }
    
    .nail-salon-btn-group {
        justify-content: stretch;
    }
    
    .nail-salon-btn {
        flex: 1;
        justify-content: center;
    }
    
    .chatbot-window {
        width: calc(100vw - 2rem);
        height: 400px;
        right: -1rem;
    }
    
    .nail-salon-modal {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease;
}

/* Estados de carga específicos */
.nail-salon-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Mejoras de accesibilidad */
.nail-salon-agenda :focus-visible {
    outline: 2px solid #ec4899;
    outline-offset: 2px;
}

.nail-salon-agenda .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* ===== Navegación por Tabs ===== */
.nail-salon-nav-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.nail-salon-tab {
    flex: 1;
    min-width: 120px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nail-salon-tab:hover {
    background: #fdf2f8;
    color: #ec4899;
}

.nail-salon-tab.active {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* ===== Vistas ===== */
.nail-salon-view {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Tablas de Datos ===== */
.data-table {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.data-table thead {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #be185d;
    border-bottom: 2px solid #fbcfe8;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.data-table tr:hover {
    background: #fdf2f8;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Botones pequeños para tablas */
.nail-salon-btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nail-salon-btn-small.nail-salon-btn-secondary {
    background: #6b7280;
    color: white;
}

.nail-salon-btn-small.nail-salon-btn-secondary:hover {
    background: #4b5563;
}

/* Badge de estado */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== Mejoras en appointment-item ===== */
.appointment-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.appointment-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #fdf2f8;
    border-radius: 8px;
}

.appointment-details > div {
    font-size: 14px;
    color: #374151;
}

.appointment-technician {
    color: #7c3aed;
    font-weight: 500;
}

.appointment-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 4px;
}

.appointment-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.appointment-status.scheduled {
    background: #dbeafe;
    color: #1e40af;
}

.appointment-status.confirmed {
    background: #d1fae5;
    color: #065f46;
}

.appointment-status.in_progress {
    background: #e0e7ff;
    color: #3730a3;
}

.appointment-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.appointment-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.appointment-status.no_show {
    background: #f3f4f6;
    color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .nail-salon-nav-tabs {
        padding: 4px;
    }
    
    .nail-salon-tab {
        min-width: 100px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .data-table {
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
}
