/* ==========================================================================
   SISTEMA DE DISEÑO CSS - CENTRO DE BELLEZA (KARLA)
   ========================================================================== */

/* --- Variables Globales (Tokens de Diseño) --- */
:root {
    /* Paleta de Colores (Modo Claro) */
    --primary-hue: 243;
    --primary-sat: 75%;
    
    --primary: hsl(var(--primary-hue), var(--primary-sat), 59%); /* Indigo */
    --primary-hover: hsl(var(--primary-hue), var(--primary-sat), 52%);
    --primary-light: hsl(var(--primary-hue), var(--primary-sat), 96%);
    
    --accent: hsl(330, 81%, 60%); /* Pink/Rose */
    --accent-hover: hsl(330, 81%, 52%);
    --accent-light: hsl(330, 81%, 96%);

    --success: hsl(142, 71%, 45%);
    --success-light: hsl(142, 71%, 95%);
    --warning: hsl(38, 92%, 50%);
    --warning-light: hsl(38, 92%, 95%);
    --danger: hsl(0, 84%, 60%);
    --danger-light: hsl(0, 84%, 97%);
    --info: hsl(200, 95%, 48%);
    --info-light: hsl(200, 95%, 95%);

    /* Neutros */
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    
    /* Tipografía */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-premium: 0 20px 25px -5px rgba(79, 70, 229, 0.04), 0 10px 10px -5px rgba(79, 70, 229, 0.02);

    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Radios de borde */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* --- Reset y Estilos Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0;
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Estructura de Layout (Mobile First) --- */
.app-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    position: relative;
}

.logo-glow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent);
    filter: blur(8px);
    border-radius: var(--radius-full);
    top: 6px;
    left: -6px;
}

.app-nav {
    display: none; /* Se esconde en móvil, se abre mediante barra o responsive */
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 6px 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    border-radius: var(--radius-full);
}

.app-content-wrapper {
    min-height: calc(100vh - 140px);
    padding: 40px 0;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.app-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-pwa-badge {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Botones --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.15);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-app);
    border-color: var(--text-muted);
}

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* --- Tarjetas (Cards) --- */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* --- Formularios (Inputs Premium) --- */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    transition: color var(--transition-fast);
}

.form-control {
    font-family: var(--font-sans);
    font-size: 15px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

/* --- Notificaciones Toast --- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
    width: 100%;
}

.toast {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--success);
}
.toast-error {
    border-left: 4px solid var(--danger);
}
.toast-warning {
    border-left: 4px solid var(--warning);
}
.toast-info {
    border-left: 4px solid var(--info);
}

/* --- Badges / Etiquetas --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

/* --- Loader --- */
.loader-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

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

/* --- Responsive Media Queries --- */
@media (min-width: 768px) {
    .app-nav {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }

    .footer-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* --- Vista Home / Landing Page --- */
.hero-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    padding: 20px 0 60px 0;
}

.hero-content {
    flex: 1;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px auto;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.hero-visual {
    flex: 1;
    position: relative;
    width: 100%;
    max-width: 460px;
}

.visual-card-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, rgba(236, 72, 153, 0.08) 50%, transparent 100%);
    filter: blur(24px);
    z-index: 1;
}

.visual-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

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

.visual-body h3 {
    margin-bottom: 12px;
}

.visual-body p {
    color: var(--text-secondary);
    margin: 0;
}

/* Catálogo de Servicios */
.services-section {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.service-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-details h3 {
    margin-bottom: 12px;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 20px;
}

.service-price {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.service-duration {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Promoción PWA */
.pwa-promo-section {
    padding: 60px 0 20px 0;
}

.pwa-promo-card {
    background: linear-gradient(135deg, #4f46e5 0%, #ec4899 100%);
    border-radius: var(--radius-lg);
    padding: 48px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    overflow: hidden;
}

.pwa-promo-card::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -50px;
    right: -100px;
}

.pwa-promo-info {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.pwa-promo-info h2 {
    color: #ffffff;
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.pwa-promo-info p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
}

.pwa-promo-info .btn-primary {
    background-color: #ffffff;
    color: var(--primary);
}

.pwa-promo-info .btn-primary:hover {
    background-color: var(--bg-app);
}

.pwa-promo-badge {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Adaptación para pantallas medianas/grandes */
@media (min-width: 768px) {
    .hero-section {
        flex-direction: row;
        padding: 60px 0 100px 0;
        text-align: left;
    }

    .hero-content {
        text-align: left;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        margin-left: 0;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pwa-promo-card {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* --- Componentes UI: Tablas y Administración --- */
.page-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title-group h1 {
    font-size: 28px;
    margin: 0 0 4px 0;
}

.page-title-group p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 14px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.table th {
    background-color: var(--bg-app);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.5);
}

.table-actions {
    display: flex;
    gap: 8px;
}

/* Alert Alert-info/danger */
.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Formularios de edición compactos */
.form-card {
    max-width: 600px;
    margin: 0 auto;
}


