/* =============================================
   STEPPER - ESTILOS CUSTOM
   ============================================= */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --primary-bg: #eef2ff;
    --sidebar-bg: #1e1b4b;
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8fafc;
    overflow: hidden;
}

/* =============================================
   SIDEBAR
   ============================================= */

.sidebar-stepper {
    background: var(--sidebar-bg);
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.sidebar-logo {
    font-size: 2.5rem;
    color: var(--primary-light);
}

.stepper-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stepper-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.stepper-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.stepper-item.active {
    background: rgba(99, 102, 241, 0.25);
}

.stepper-item.completed {
    background: rgba(34, 197, 94, 0.15);
}

.stepper-circle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.25s ease;
}

.stepper-item.active .stepper-circle {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
}

.stepper-item.completed .stepper-circle {
    background: #22c55e;
    color: #fff;
}

.stepper-item.completed .stepper-circle span::after {
    content: '✓';
}

.stepper-item.completed .stepper-circle span {
    font-size: 0;
}

.stepper-item.completed .stepper-circle span::after {
    font-size: 0.85rem;
}

.stepper-text {
    display: flex;
    flex-direction: column;
}

.stepper-text strong {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.25s;
}

.stepper-text small {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
}

.stepper-item.active .stepper-text strong {
    color: #fff;
}

.stepper-item.active .stepper-text small {
    color: var(--primary-light);
}

.stepper-item.completed .stepper-text strong {
    color: rgba(255, 255, 255, 0.9);
}

/* =============================================
   CONTENT AREA
   ============================================= */

.content-area {
    background: #f8fafc;
    overflow: hidden;
}

.content-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.step-panel {
    display: none;
    animation: fadeInPanel 0.3s ease;
}

.step-panel.active {
    display: block;
}

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

/* =============================================
   CARDS
   ============================================= */

.card-empleado, .card-categoria, .card-servicio, .card-pago {
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary);
    transition: all 0.2s ease;
}

.card-empleado:hover, .card-categoria:hover,
.card-servicio:hover, .card-pago:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.card-resumen {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.card-resumen .card-title {
    color: var(--primary);
    font-size: 0.95rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

/* =============================================
   FORMS
   ============================================= */

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

/* =============================================
   BUTTONS
   ============================================= */

.btn-siguiente {
    background: var(--primary);
    border-color: var(--primary);
    padding: 8px 28px;
    font-weight: 600;
}

.btn-siguiente:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-finalizar {
    background: #22c55e;
    border-color: #22c55e;
    padding: 8px 28px;
    font-weight: 600;
}

.btn-finalizar:hover {
    background: #16a34a;
    border-color: #16a34a;
}

/* =============================================
   FINISH ICON
   ============================================= */

.finish-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: pulseFinish 2s infinite;
}

.finish-icon i {
    font-size: 2.5rem;
    color: #fff;
}

@keyframes pulseFinish {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(34, 197, 94, 0); }
}

/* =============================================
   TABLE
   ============================================= */

#tablaHorarios th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

#tablaHorarios td {
    vertical-align: middle;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .sidebar-stepper {
        min-height: auto;
        padding: 1rem !important;
    }

    .stepper-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
    }

    .stepper-item {
        flex-direction: column;
        min-width: 70px;
        text-align: center;
        padding: 8px;
    }

    .stepper-text small {
        display: none;
    }

    body {
        overflow: auto;
    }
}

/* =============================================
   ALERT / TOAST
   ============================================= */

#alertContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert-custom {
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.4s ease;
}

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