/* ======================================================
   DISEÑO PREMIUM - PANEL DE CONTROL (ADMIN DASHBOARD)
   ====================================================== */

/* Carga de Fuentes Locales */
@font-face {
    font-family: 'DIN-Bold';
    src: url('../assets/fonts/DIN-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'DIN-Condensed-Bold';
    src: url('../assets/fonts/DIN-Condensed Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'DIN-Regular';
    src: url('../assets/fonts/DIN-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham-Bold';
    src: url('../assets/fonts/Gotham Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

/* Variables Globales */
:root {
    --bg-dark: #070415;
    --neon-cyan: #03ddcb;
    --neon-purple: #b13cfd;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DIN-Regular', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "clig" 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ======================================================
   FONDO DINÁMICO: AURORA GRADIENTS (IDENTIDAD INDEX)
   ====================================================== */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: -2;
    overflow: hidden;
    background: linear-gradient(90deg, #02a093 0%, #832bbd 100%);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 1;
    mix-blend-mode: normal;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
}

.blob-1 {
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle, var(--neon-cyan) 0%, rgba(3, 221, 203, 0) 70%);
    top: -10%;
    left: -10%;
    animation: float-1 25s infinite alternate ease-in-out;
}

.blob-2 {
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle, var(--neon-purple) 0%, rgba(177, 60, 253, 0) 70%);
    bottom: -10%;
    right: -10%;
    animation: float-2 28s infinite alternate ease-in-out;
}

.blob-3 {
    width: 70vw;
    height: 70vh;
    background: radial-gradient(circle, var(--neon-purple) 0%, rgba(177, 60, 253, 0) 70%);
    top: 10%;
    right: -5%;
    animation: float-3 20s infinite alternate ease-in-out;
}

.blob-4 {
    width: 70vw;
    height: 70vh;
    background: radial-gradient(circle, var(--neon-cyan) 0%, rgba(3, 221, 203, 0) 70%);
    bottom: 10%;
    left: -5%;
    animation: float-4 22s infinite alternate ease-in-out;
}

@keyframes float-1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20vw, 15vh) scale(1.1); }
    100% { transform: translate(-10vw, 25vh) scale(0.9); }
}

@keyframes float-2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20vw, -15vh) scale(1.2); }
    100% { transform: translate(15vw, -5vh) scale(0.85); }
}

@keyframes float-3 {
    0% { transform: translate(0, 0) scale(0.9); }
    50% { transform: translate(-15vw, 20vh) scale(1.15); }
    100% { transform: translate(20vw, -15vh) scale(1); }
}

@keyframes float-4 {
    0% { transform: translate(0, 0) scale(1.1); }
    50% { transform: translate(20vw, -20vh) scale(0.9); }
    100% { transform: translate(-15vw, 15vh) scale(1.1); }
}

/* Wrapper del Sitio */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
    padding: 60px 20px;
    background: rgba(7, 4, 21, 0.45);
    backdrop-filter: blur(10px);
}

.admin-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* ======================================================
   CABECERA (HEADER) GLASSMORPHIC
   ====================================================== */
.admin-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    padding: 20px 30px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: none;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3),
                inset 2px 3px 6px rgba(255, 255, 255, 0.25);
    margin-bottom: 28px;
    position: relative;
}

.admin-header::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    padding: 1.5px;
    background: linear-gradient(-48deg, var(--neon-cyan), var(--neon-purple));
    opacity: 0.64;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-self: start;
}

.admin-logo {
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.35));
}

.admin-title {
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 28px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-white);
    justify-self: center;
    text-align: center;
    margin: 0;
}

.leads-count {
    background: rgba(3, 221, 203, 0.15);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(3, 221, 203, 0.3);
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    justify-self: end;
}

/* ======================================================
   BARRA DE CONTROL: BUSCADOR Y FILTROS
   ====================================================== */
.control-bar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 28px;
    margin-bottom: 30px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 14px 25px;
    color: var(--text-white);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(3, 221, 203, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-pill {
    display: flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    font-family: 'DIN-Regular', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-pill.active {
    background: rgba(0, 242, 254, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
    color: var(--neon-cyan);
}

/* ======================================================
   TARJETAS DE PROSPECTOS (LEAD CARDS)
   ====================================================== */
.leads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.lead-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
                inset 0 0 15px rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
    display: grid;
    grid-template-columns: 2fr 3fr 2fr;
    gap: 25px;
    align-items: start;
    transition: border-color 0.4s, box-shadow 0.4s, transform 0.3s;
}

.lead-card:hover {
    border-color: rgba(232, 121, 249, 0.25);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(255, 255, 255, 0.08),
                0 0 30px rgba(232, 121, 249, 0.1);
    transform: translateY(-2px);
}

/* Columna 1: Info General */
.lead-info-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lead-name {
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-white);
    text-shadow: 0 0 8px rgba(255,255,255,0.1);
}

.lead-meta {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lead-meta strong {
    color: var(--neon-cyan);
    font-weight: normal;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    display: inline-block;
    width: 80px;
}

/* Columna 2: Consulta */
.lead-query-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 25px;
    height: 100%;
}

.query-label {
    font-size: 11px;
    color: var(--neon-purple);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'DIN-Bold', sans-serif;
}

.query-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Columna 3: Controles de Acción */
.lead-action-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.status-badge {
    align-self: start;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 11px;
    font-family: 'DIN-Bold', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Colores de badges de estado premium */
.status-nuevo { background: rgba(3, 221, 203, 0.1); color: var(--neon-cyan); border: 1px solid var(--neon-cyan); }
.status-contactado { background: rgba(177, 60, 253, 0.1); color: #df9eff; border: 1px solid var(--neon-purple); }
.status-espera { background: rgba(230, 126, 34, 0.1); color: #ff9f43; border: 1px solid #e67e22; }
.status-agendada { background: rgba(241, 196, 15, 0.1); color: #f1c40f; border: 1px solid #f1c40f; }
.status-link_enviado { background: rgba(26, 188, 156, 0.1); color: #1abc9c; border: 1px solid #1abc9c; }
.status-pago_pendiente { background: rgba(231, 76, 60, 0.1); color: #ff6b6b; border: 1px solid #e74c3c; }
.status-pago_confirmado { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border: 1px solid #2ecc71; box-shadow: 0 0 10px rgba(46, 204, 113, 0.2); }
.status-cliente { background: rgba(46, 204, 113, 0.25); color: #2ecc71; border: 1px solid #2ecc71; box-shadow: 0 0 15px rgba(46, 204, 113, 0.4); }
.status-no_interesado { background: rgba(149, 165, 166, 0.1); color: #95a5a6; border: 1px solid #95a5a6; }
.status-seguimiento { background: rgba(26, 188, 156, 0.2); color: #1abc9c; border: 1px solid #1abc9c; }

.action-form, .client-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    backdrop-filter: blur(5px);
}

.action-select:focus {
    border-color: var(--neon-cyan);
}

.action-select option {
    background: #070415;
    color: var(--text-white);
}

.notes-textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-white);
    font-size: 14px;
    resize: vertical;
    min-height: 70px;
    outline: none;
    transition: border-color 0.3s;
}

.notes-textarea:focus {
    border-color: var(--neon-purple);
}

.btn-row {
    display: flex;
    gap: 10px;
}

.save-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border-radius: 12px;
    padding: 10px;
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 16px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: rgba(3, 221, 203, 0.15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(3, 221, 203, 0.4);
}

.wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.wa-btn:hover {
    background: rgba(46, 204, 113, 0.15);
    border-color: #2ecc71;
    color: #2ecc71;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
}

/* Empty State / Loading */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    color: var(--text-muted);
    font-size: 16px;
    backdrop-filter: blur(15px);
}

/* Responsive */
@media(max-width: 950px) {
    .admin-header {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    
    .logo-container {
        justify-self: center;
    }
    
    .admin-title {
        justify-self: center;
        font-size: 22px;
    }
    
    .leads-count {
        justify-self: center;
    }

    .lead-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lead-query-col {
        border-left: none;
        border-right: none;
        padding: 20px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
}

/* ======================================================
   NUEVOS ESTILOS: TABS DE NAVEGACIÓN Y TOGGLES (FASE 4)
   ====================================================== */
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
    padding: 18px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 15px;
    padding: 12px 24px;
    color: var(--text-muted);
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 16px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    outline: none;
}

.nav-tab:hover, .nav-tab.active {
    background: rgba(177, 60, 253, 0.15);
    color: #df9eff;
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(177, 60, 253, 0.35);
}

/* Switch Toggle para Membresías */
.membership-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px 12px;
}

.toggle-label {
    font-size: 13px;
    color: var(--text-white);
}

.switch-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: #2ecc71;
}

/* MODAL DE CONVERSIÓN (REUTILIZADO) */
.lead-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 4, 21, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
}

.lead-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lead-modal-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.05);
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-modal-overlay.active .lead-modal-card {
    transform: translateY(0);
}

/* Configuración de modalidades de envío: cada control ocupa una fila clara. */
.web-delivery-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
    gap: 18px;
}

.web-delivery-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
}

.web-delivery-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.web-delivery-card-header strong {
    color: var(--text-white);
    font-family: 'DIN-Bold', sans-serif;
    font-size: 17px;
    line-height: 1.25;
}

.web-delivery-toggle {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}

.web-delivery-toggle input { width: 16px; height: 16px; accent-color: var(--neon-cyan); }

.web-delivery-field {
    display: grid;
    gap: 7px;
    color: var(--neon-cyan);
    font-family: 'DIN-Regular', sans-serif;
    font-size: 12px;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.web-delivery-field .lead-input {
    width: 100%;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.web-delivery-field textarea.lead-input {
    min-height: 82px;
    resize: vertical;
    line-height: 1.4;
}

.web-delivery-save {
    align-self: flex-start;
    margin: 0;
    padding: 8px 15px;
}

@media (max-width: 620px) {
    .web-delivery-options { grid-template-columns: 1fr; gap: 14px; }
    .web-delivery-card { padding: 16px; }
    .web-delivery-card-header { align-items: center; }
}

/* Mantiene los formularios largos dentro de la pantalla. */
#productModal .product-modal-card {
    width: min(620px, 100%);
    max-height: min(760px, calc(100dvh - 36px));
    padding: 20px 24px 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#productModal .lead-modal-title {
    flex: 0 0 auto;
    margin: 0;
    padding: 0 42px 12px 0;
}

#productForm {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 5px 4px 0;
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(0, 1.7fr);
    gap: 11px 15px;
}

#productForm > .lead-form-group {
    grid-column: 1 / -1;
    margin: 0;
    gap: 4px;
}

#productForm > .lead-form-group:nth-of-type(1) { grid-column: 1; }
#productForm > .lead-form-group:nth-of-type(2) { grid-column: 2; }
#productForm .form-grid-2 { grid-column: 1 / -1; margin: 0 !important; }
#productForm .lead-input { padding: 8px 12px; }
#productForm textarea.lead-input { min-height: 70px; }
#productForm > .lead-submit-btn {
    grid-column: 1 / -1;
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin: 0 !important;
    box-shadow: 0 -10px 20px rgba(19, 7, 44, .48);
}

@media (max-width: 680px) {
    .lead-modal-overlay {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .lead-modal-card {
        max-height: calc(100dvh - 24px);
        padding: 22px 18px;
        border-radius: 18px;
    }

    #productModal .product-modal-card {
        width: 100%;
        max-height: calc(100dvh - 24px);
        padding: 18px 16px 14px;
    }

    #productForm {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #productForm > .lead-form-group:nth-of-type(1),
    #productForm > .lead-form-group:nth-of-type(2) { grid-column: 1; }

    #productModal .form-grid-2 { grid-template-columns: 1fr !important; gap: 12px !important; }
    #productModal .form-grid-2 .lead-form-group { margin-bottom: 0 !important; }
}

@media (max-height: 720px) and (min-width: 681px) {
    .lead-modal-overlay { padding: 12px; }
    #productModal .product-modal-card { max-height: calc(100dvh - 24px); padding: 16px 22px 14px; }
    #productForm { gap: 9px 13px; }
}

.lead-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

.lead-modal-close:hover {
    color: var(--neon-cyan);
}

.lead-modal-title {
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 28px;
    letter-spacing: 1.5px;
    color: var(--text-white);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.lead-modal-subtitle {
    font-family: 'DIN-Regular', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.lead-form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lead-label {
    font-family: 'DIN-Regular', sans-serif;
    font-size: 13px;
    color: var(--neon-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
}

.lead-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-white);
    font-family: 'DIN-Regular', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.lead-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(3, 221, 203, 0.2);
}

.lead-input option {
    background: #070415;
    color: var(--text-white);
}

select.lead-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2303ddcb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
    cursor: pointer;
}

.lead-submit-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid var(--neon-cyan);
    background: rgba(3, 221, 203, 0.1);
    color: var(--neon-cyan);
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.lead-submit-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--neon-cyan);
}

/* Toast de Notificación */
.lead-toast {
    position: fixed;
    bottom: -120px;
    left: 30px;
    background: rgba(7, 4, 21, 0.95);
    border: 1px solid var(--neon-cyan);
    border-radius: 15px;
    padding: 15px 25px;
    z-index: 100000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(3, 221, 203, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

.lead-toast.active {
    bottom: 30px;
}

.lead-toast-title {
    font-family: 'DIN-Bold', sans-serif;
    font-size: 15px;
    color: var(--neon-cyan);
    text-align: left;
}

.lead-toast-desc {
    font-family: 'DIN-Regular', sans-serif;
    font-size: 13px;
    color: var(--text-white);
    text-align: left;
}

.lead-toast.toast-error {
    border-color: #e74c3c;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(231, 76, 60, 0.25);
}

.lead-toast.toast-error .lead-toast-title {
    color: #e74c3c;
}

/* ======================================================
   ESTILOS PARA EL MODAL DE EXPEDIENTE (FASE 5)
   ====================================================== */
.expediente-modal-card {
    max-width: 850px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-cyan) rgba(255, 255, 255, 0.05);
}

/* Custom scrollbar for Webkit browsers */
.expediente-modal-card::-webkit-scrollbar {
    width: 6px;
}
.expediente-modal-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.expediente-modal-card::-webkit-scrollbar-thumb {
    background-color: var(--neon-cyan);
    border-radius: 3px;
}

/* Botón de ver expediente en tarjetas de clientes */
.expediente-btn {
    background: rgba(3, 221, 203, 0.08);
    border: 1px solid rgba(3, 221, 203, 0.25);
    color: var(--neon-cyan);
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expediente-btn:hover {
    background: rgba(3, 221, 203, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(3, 221, 203, 0.25);
}

/* Pestañas del modal */
.expediente-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.expediente-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 18px;
    color: var(--text-muted);
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 15px;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.expediente-tab:hover, .expediente-tab.active {
    background: rgba(3, 221, 203, 0.12);
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(3, 221, 203, 0.2);
}

/* Contenido de pestañas */
.expediente-tab-content {
    display: none;
    margin-top: 15px;
}

.expediente-tab-content.active {
    display: block;
}

/* Títulos de secciones en el formulario */
.form-section-title {
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    color: #df9eff; /* Neon purple light */
    text-transform: uppercase;
    margin: 25px 0 15px 0;
    border-bottom: 1px dashed rgba(177, 60, 253, 0.2);
    padding-bottom: 5px;
    text-align: left;
}

/* Grillas del formulario */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Contenedor de línea de tiempo de consultas */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 5px;
}

/* Item de consulta individual */
.consulta-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    transition: all 0.3s ease;
}

.consulta-item:hover {
    border-color: rgba(3, 221, 203, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.consulta-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.timeline-badge {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: var(--bg-dark);
    font-family: 'DIN-Bold', sans-serif;
    font-size: 13px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(3, 221, 203, 0.35);
}

.consulta-header-info {
    flex-grow: 1;
    text-align: left;
}

.consulta-date {
    font-family: 'DIN-Bold', sans-serif;
    font-size: 14px;
    color: var(--text-white);
    margin-bottom: 2px;
}

.consulta-summary-metrics {
    font-size: 12px;
    color: var(--text-muted);
}

.consulta-summary-metrics strong {
    color: var(--neon-cyan);
}

.expand-icon {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.consulta-item-details {
    display: none;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 15px;
    animation: fadeIn 0.3s ease-out;
}

.consulta-item.expanded .consulta-item-details {
    display: block;
}

.consulta-item.expanded .expand-icon {
    transform: rotate(180deg);
    color: var(--neon-cyan);
}

/* Detalle interno de consultas */
.details-section-title {
    font-family: 'DIN-Bold', sans-serif;
    font-size: 12px;
    color: #df9eff;
    text-transform: uppercase;
    margin: 15px 0 8px 0;
    letter-spacing: 0.5px;
    text-align: left;
}

.consulta-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
}

.metric-val {
    font-size: 13px;
    color: var(--text-muted);
    text-align: left;
}

.metric-val strong {
    display: block;
    font-size: 11px;
    color: var(--text-white);
    margin-bottom: 2px;
    font-weight: 500;
}

.metric-val span {
    color: var(--neon-cyan);
    font-family: 'DIN-Bold', sans-serif;
    font-size: 14px;
}

.text-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
    text-align: left;
}

.text-details-grid div {
    font-size: 13px;
}

.text-details-grid strong {
    font-size: 11px;
    color: var(--text-white);
    display: block;
    margin-bottom: 3px;
}

.text-details-grid p {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.consulta-obs-text {
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(177, 60, 253, 0.05);
    border-left: 2px solid var(--neon-purple);
    padding: 10px 15px;
    border-radius: 0 10px 10px 0;
    margin: 5px 0 0 0;
    text-align: left;
    line-height: 1.4;
}

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

/* ======================================================
   RESPONSIVIDAD EXTRA EXPEDIENTE
   ====================================================== */
@media(max-width: 768px) {
    .form-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .consulta-metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
    .text-details-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 480px) {
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   ESTILOS ADICIONALES PARA LA PESTAÑA DE EVOLUCIÓN (FASE 6)
   ====================================================== */
.evolucion-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.evolucion-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.evolucion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--neon-cyan);
    opacity: 0.8;
}

.evolucion-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(3, 221, 203, 0.2);
    transform: translateY(-2px);
}

.evolucion-card-title {
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.evolucion-values {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.evolucion-val-label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.evolucion-val-num {
    font-family: 'DIN-Bold', sans-serif;
    font-size: 20px;
    color: var(--text-white);
}

.evolucion-val-num.current {
    color: var(--neon-cyan);
}

.delta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 12px;
    font-family: 'DIN-Bold', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
}

.delta-positive {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.25);
}

.delta-negative {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.25);
}

.delta-neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Barra de Progreso de Fases */
.progress-steps-container {
    position: relative;
    padding: 20px 10px 40px 10px;
    margin-bottom: 10px;
}

.progress-line-bg {
    position: absolute;
    top: 34px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    z-index: 1;
}

.progress-line-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    position: relative;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #070415;
    border: 2px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-family: 'DIN-Bold', sans-serif;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.step-node.completed .step-circle {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 12px rgba(3, 221, 203, 0.35);
}

.step-node.active .step-circle {
    background: var(--neon-purple);
    border-color: var(--neon-purple);
    color: var(--text-white);
    box-shadow: 0 0 15px rgba(177, 60, 253, 0.5);
}

.step-label {
    position: absolute;
    bottom: -25px;
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.step-node.active .step-label {
    color: #df9eff;
}

.step-node.completed .step-label {
    color: var(--text-white);
}

/* Galería de Fotos de Evolución */
.evolucion-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.evolucion-photo-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.evolucion-photo-card:hover {
    border-color: rgba(3, 221, 203, 0.2);
    transform: scale(1.02);
}

.evolucion-photo-img-wrapper {
    width: 100%;
    aspect-ratio: 3/4;
    background: rgba(255, 255, 255, 0.01);
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.evolucion-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.evolucion-photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    gap: 8px;
}

.evolucion-photo-meta {
    padding: 10px 12px;
    text-align: left;
}

.evolucion-photo-date {
    font-family: 'DIN-Bold', sans-serif;
    font-size: 12px;
    color: var(--text-white);
}

.evolucion-photo-weight {
    font-size: 11px;
    color: var(--neon-cyan);
    margin-top: 2px;
}

@media(max-width: 768px) {
    .evolucion-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .evolucion-photos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 480px) {
    .evolucion-summary-grid {
        grid-template-columns: 1fr;
    }
    .evolucion-photos-grid {
        grid-template-columns: 1fr;
    }
}

/* --- CATÁLOGO DE PLANES Y ASIGNACIONES (FASE 7) --- */

.plan-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.plan-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.plan-card:hover {
    border-color: rgba(3, 221, 203, 0.15);
    box-shadow: 0 8px 32px 0 rgba(3, 221, 203, 0.05);
    transform: translateY(-2px);
}

.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.plan-type-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-entrenamiento {
    background: rgba(223, 158, 255, 0.1);
    color: #df9eff;
    border: 1px solid rgba(223, 158, 255, 0.2);
}

.badge-nutricion {
    background: rgba(3, 221, 203, 0.1);
    color: var(--neon-cyan);
    border: 1px solid rgba(3, 221, 203, 0.2);
}

.badge-habitos {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.badge-cambio-fisico {
    background: rgba(177, 60, 253, 0.15);
    color: #df9eff;
    border: 1px solid rgba(177, 60, 253, 0.3);
}

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

.plan-action-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.plan-action-btn:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.08);
}

.plan-action-btn.edit-btn:hover {
    border-color: rgba(3, 221, 203, 0.3);
    color: var(--neon-cyan);
}

.plan-action-btn.delete-btn:hover {
    border-color: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.plan-card-title {
    font-family: 'DIN-Bold', sans-serif;
    font-size: 17px;
    color: var(--text-white);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.plan-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Asignaciones de Planes en el Expediente */

.asignacion-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.asignacion-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

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

.asignacion-status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.state-activo {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.state-pausado {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.state-finalizado {
    background: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.2);
}

@media(max-width: 576px) {
    .plan-catalog-grid {
        grid-template-columns: 1fr;
    }
    .form-grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* ======================================================
   ESTILOS DE LA FICHA / PLAN DE CAMBIO FÍSICO (PDF EXPORT)
   ====================================================== */
.pdf-print-template-wrapper {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 800px;
    z-index: -1000;
}

.pdf-print-template {
    width: 800px;
    background: #ffffff;
    color: #000000;
    font-family: 'DIN-Regular', system-ui, -apple-system, sans-serif;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Ficha Page Container for html2pdf page break preservation */
.pdf-page {
    position: relative;
    width: 100%;
    min-height: 1050px; /* Letter aspect ratio height */
    padding: 30px;
    box-sizing: border-box;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header */
.pdf-header {
    display: flex;
    width: 100%;
    height: 90px;
    background: #ffffff;
    border-bottom: 2px solid #000000;
    margin-bottom: 20px;
    align-items: stretch;
    overflow: hidden;
}

.pdf-header-left {
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 15px;
}

.pdf-header-logo {
    height: 65px;
    max-width: 100%;
    object-fit: contain;
}

.pdf-header-right {
    width: 75%;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    clip-path: polygon(25px 0, 100% 0, 100% 100%, 0 100%);
    margin-left: -20px;
}

.pdf-header-quote {
    font-family: 'Gotham-Bold', 'DIN-Bold', sans-serif;
    font-size: 16px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.pdf-header-quote span {
    color: var(--neon-cyan);
}

.pdf-header-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    text-align: right;
    color: rgba(255, 255, 255, 0.9);
}

.pdf-header-contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

/* Patient Name Bar */
.pdf-patient-bar {
    background: #000000;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin-bottom: 20px;
}

.pdf-patient-name {
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 24px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0;
}

.pdf-patient-meta {
    font-size: 14px;
    font-family: 'DIN-Regular', sans-serif;
    font-weight: bold;
}

/* Physical Stats */
.pdf-stats-section {
    margin-bottom: 25px;
    padding: 0 10px;
}

.pdf-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 50px;
    row-gap: 8px;
}

.pdf-stat-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 4px;
    font-size: 14px;
}

.pdf-stat-label {
    font-family: 'DIN-Regular', sans-serif;
    color: #333333;
}

.pdf-stat-value {
    font-family: 'DIN-Bold', sans-serif;
    font-weight: bold;
    color: #000000;
}

/* Sections & Tables */
.pdf-section-header {
    background: #b13cfd; /* Purple */
    color: #ffffff;
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 18px;
    letter-spacing: 1.5px;
    padding: 8px 20px;
    text-transform: uppercase;
    margin-bottom: 15px;
    margin-top: 15px;
}

.pdf-comida-header {
    background: #03ddcb; /* Cyan */
    color: #ffffff;
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 15px;
    letter-spacing: 1px;
    padding: 6px 15px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 12px;
}

.pdf-table th {
    border: 1px solid #000000;
    padding: 6px 8px;
    font-family: 'DIN-Bold', sans-serif;
    font-weight: bold;
    text-align: left;
    background: #f9f9f9;
}

.pdf-table td {
    border: 1px solid #000000;
    padding: 6px 8px;
    vertical-align: top;
    line-height: 1.4;
}

/* Exercise Box */
.pdf-exercise-container {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.pdf-exercise-img-wrapper {
    width: 180px;
    height: 180px;
    border: 1px solid #cccccc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f9f9f9;
    flex-shrink: 0;
}

.pdf-exercise-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pdf-exercise-desc {
    font-size: 13px;
    line-height: 1.5;
    flex-grow: 1;
}

/* Text Lists */
.pdf-list-text {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
    padding-left: 10px;
}

.pdf-list-text ol, .pdf-list-text ul {
    padding-left: 20px;
    margin-top: 5px;
}

.pdf-list-text li {
    margin-bottom: 6px;
}

/* Footer Slanted Decor */
.pdf-footer {
    position: relative;
    height: 60px;
    background: #000000;
    margin-top: auto;
    overflow: hidden;
}

.pdf-footer-text {
    position: absolute;
    left: 20px;
    bottom: 15px;
    color: #ffffff;
    font-family: 'DIN-Condensed-Bold', sans-serif;
    font-size: 20px;
    letter-spacing: 2px;
}

.pdf-footer-shapes {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    transform: skewX(-35deg) translateX(45px);
}

.pdf-shape-cyan {
    flex: 1;
    background: #03ddcb;
}

.pdf-shape-purple {
    flex: 1;
    background: #b13cfd;
}

.pdf-shape-black {
    flex: 1;
    background: #070415;
}

/* Modal Meals Table */
.modal-meals-table th {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--neon-cyan) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 8px !important;
    font-weight: normal;
    text-align: left;
}
.modal-meals-table td {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 2px !important;
    background: transparent !important;
    color: var(--text-white) !important;
}


/* Botón de Diagnóstico */
#btnRunDiagnostics {
    width: auto !important;
    height: 36px !important;
    box-sizing: border-box !important;
    padding: 0 20px !important;
    margin: 0 !important;
    font-size: 14px !important;
    background: rgba(3, 221, 203, 0.1) !important;
    border: 1px solid var(--neon-cyan) !important;
    color: var(--neon-cyan) !important;
    font-family: 'DIN-Condensed-Bold', sans-serif !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

#btnRunDiagnostics:hover {
    background: var(--neon-cyan) !important;
    color: #070415 !important;
    box-shadow: 0 0 15px var(--neon-cyan) !important;
}

#btnTogglePaymentMode {
    width: auto !important;
    height: 36px !important;
    box-sizing: border-box !important;
    padding: 0 18px !important;
    margin: 0 !important;
    font-size: 13px !important;
    background: rgba(3, 221, 203, 0.1) !important;
    border: 1px solid var(--neon-cyan) !important;
    color: var(--neon-cyan) !important;
    font-family: 'DIN-Condensed-Bold', sans-serif !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

#btnTogglePaymentMode:hover {
    background: var(--neon-cyan) !important;
    color: #070415 !important;
    box-shadow: 0 0 15px var(--neon-cyan) !important;
}

/* ======================================================
   AUTOMATION MODULE STYLES (FASE 15)
   ====================================================== */
.automation-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 22px;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.01);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.automation-card:hover {
    border-color: rgba(3, 221, 203, 0.25);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(3, 221, 203, 0.02);
}

.automation-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.badge-bienvenida {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.2);
}

.badge-pago {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border-color: rgba(52, 152, 219, 0.2);
}

.badge-medicion {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
    border-color: rgba(241, 196, 15, 0.2);
}

.badge-renovacion {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.2);
}

.badge-tip {
    background: rgba(155, 93, 229, 0.15);
    color: #b13cfd;
    border-color: rgba(155, 93, 229, 0.2);
}

/* Switches para activar/desactivar automatizaciones */
.automation-switch-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.automation-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.automation-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.automation-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.automation-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .automation-slider {
    background-color: var(--neon-cyan);
}

input:checked + .automation-slider:before {
    transform: translateX(20px);
}

/* ======================================================
   NOTIFICATIONS MODULE STYLES (FASE 16)
   ====================================================== */
.notification-container {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.notif-bell-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    outline: none;
}

.notif-bell-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(3, 221, 203, 0.3);
    box-shadow: 0 0 10px rgba(3, 221, 203, 0.15);
}

.bell-icon-svg {
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.25));
}

.notif-bell-btn:hover .bell-icon-svg {
    color: var(--neon-cyan) !important;
    filter: drop-shadow(0 0 6px var(--neon-cyan));
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 9.5px;
    font-family: 'DIN-Bold', sans-serif;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px #ff4757;
    padding: 0 4px;
    box-sizing: border-box;
    border: 1px solid #070415;
}

/* Dropdown de Alertas */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 340px;
    background: rgba(7, 4, 21, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.02);
    overflow: hidden;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1010;
}

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

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.01);
}

.notif-dropdown-header span {
    font-family: 'DIN-Bold', sans-serif;
    font-size: 14px;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notif-clear-btn {
    background: none;
    border: none;
    color: var(--neon-cyan);
    font-size: 11.5px;
    font-family: 'DIN-Condensed-Bold', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.notif-clear-btn:hover {
    color: #df9eff;
    text-shadow: 0 0 8px rgba(223, 158, 255, 0.4);
}

.notif-dropdown-list {
    max-height: 380px;
    overflow-y: auto;
}

.notif-empty {
    padding: 30px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
}

/* Item de Notificación */
.notif-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease;
    cursor: pointer;
    text-align: left;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.notif-item-title {
    font-family: 'DIN-Bold', sans-serif;
    font-size: 13px;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-item-body {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.notif-item-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 2px;
}

/* Decoración por tipo de Alerta */
.notif-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.dot-lead { background: var(--neon-cyan); box-shadow: 0 0 6px var(--neon-cyan); }
.dot-pago { background: #3498db; box-shadow: 0 0 6px #3498db; }
.dot-convertido { background: #2ecc71; box-shadow: 0 0 6px #2ecc71; }
.dot-stock { background: #e67e22; box-shadow: 0 0 6px #e67e22; }
.dot-vencido { background: #e74c3c; box-shadow: 0 0 6px #e74c3c; }

/* ======================================================
   RESPONSIVE GLOBAL — admin.css base (768 y 480px)
   ====================================================== */

@media (max-width: 768px) {
    .site-wrapper {
        padding: 24px 12px;
    }
    .admin-header {
        padding: 14px 16px;
    }
    /* Botones sub-tabs: permitir que bajen a segunda línea */
    .filter-pill {
        white-space: nowrap;
    }
    /* Tabla general con scroll horizontal */
    .leads-table,
    .lead-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .site-wrapper {
        padding: 14px 10px;
    }
    /* Header: logo más pequeño */
    .admin-logo {
        height: 36px !important;
    }
    .admin-title {
        font-size: 15px !important;
    }
    /* Botones principales más compactos */
    .lead-submit-btn {
        padding: 10px 14px !important;
        font-size: 13px !important;
    }
}
