/**
 * DSC Admin OTP - Auth System Premium Design v2
 *
 * MCNP (Consorcio Mexicano de Neuropsicofarmacologia)
 * Split-screen: branding panel vibrante + form area premium
 * Responsive: Desktop (>1024) | Tablet (768-1024) | Mobile (<768) | Small (<480)
 *
 * NOTA: SOLO visual. auth-handler.js INTOCABLE.
 *
 * @package DSC_Admin_OTP
 * @since 2.8.1
 * @author Digital Solution Core
 */

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */
:root {
    /* MCNP brand palette */
    --dsc-color-primary: #00a99d;
    --dsc-color-primary-dark: #008a80;
    --dsc-color-primary-darker: #006d65;
    --dsc-color-primary-light: #e6f7f6;
    --dsc-color-primary-lighter: #f0faf9;
    --dsc-color-primary-vivid: #1DBAB4;

    /* Brand panel - MCNP teal vibrante */
    --dsc-brand-start: #007d74;
    --dsc-brand-mid: #00a99d;
    --dsc-brand-end: #1DBAB4;
    --dsc-brand-glow: rgba(29, 186, 180, 0.4);

    /* Neutral palette */
    --dsc-color-text: #1a2332;
    --dsc-color-text-light: #5a6577;
    --dsc-color-text-lighter: #8895a7;
    --dsc-color-border: #dde2e8;
    --dsc-color-border-light: #edf0f4;
    --dsc-color-bg: #f6f8fa;
    --dsc-color-bg-warm: #fafbfc;
    --dsc-color-white: #ffffff;

    /* Status colors */
    --dsc-color-error: #dc3545;
    --dsc-color-error-light: #fce4e6;
    --dsc-color-success: #198754;
    --dsc-color-success-light: #d4edda;
    --dsc-color-warning: #f0ad4e;
    --dsc-color-warning-light: #fff8e6;
    --dsc-color-secondary: #f5a623;

    /* MCNP Blue (logo) for particles */
    --dsc-color-blue: #044F8B;
    --dsc-color-blue-strong: rgba(4, 79, 139, 0.40);
    --dsc-color-blue-mid: rgba(4, 79, 139, 0.25);
    --dsc-color-blue-soft: rgba(4, 79, 139, 0.15);
    --dsc-color-blue-faint: rgba(4, 79, 139, 0.08);

    /* Typography — Helvetica Neue (fuente oficial MCNP) */
    --dsc-font-display: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --dsc-font-body: 'Helvetica Neue', Helvetica, Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --dsc-font-family: var(--dsc-font-body);

    /* Radii */
    --dsc-border-radius: 10px;
    --dsc-radius-sm: 6px;
    --dsc-radius-md: 10px;
    --dsc-radius-lg: 16px;
    --dsc-radius-xl: 20px;
    --dsc-radius-full: 9999px;

    /* Shadows */
    --dsc-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --dsc-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --dsc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --dsc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
    --dsc-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.14);
    --dsc-shadow-input: 0 0 0 3px rgba(0, 169, 157, 0.15);
    --dsc-shadow-glow: 0 0 30px rgba(29, 186, 180, 0.3);

    /* Transitions */
    --dsc-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --dsc-transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --dsc-brand-width: 42%;
}

/* ==========================================================================
   2. Emoji / Flag Support (Twemoji)
   ========================================================================== */
img.emoji,
img.twemoji-flag-option {
    height: 1em;
    width: 1em;
    vertical-align: middle;
    margin-right: 4px;
}

/* ==========================================================================
   3. Animations
   ========================================================================== */
@keyframes dscFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes dscShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

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

@keyframes dscPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

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

@keyframes dsc-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Animated gradient shift on brand panel */
@keyframes dscGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating orb animation */
@keyframes dscFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-10px, -40px) scale(0.95); }
    75% { transform: translate(-30px, -10px) scale(1.02); }
}

@keyframes dscFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-25px, 30px) scale(1.08); }
    66% { transform: translate(20px, -15px) scale(0.96); }
}

@keyframes dscFloat3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, 25px); }
}

/* Logo glow pulse */
@keyframes dscLogoGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(255, 255, 255, 0.1); }
    50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 40px 8px rgba(255, 255, 255, 0.15); }
}

/* Staggered entrance for form elements */
@keyframes dscSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Button shine sweep */
@keyframes dscShine {
    from { left: -100%; }
    to { left: 200%; }
}

/* Ring expand */
@keyframes dscRingExpand {
    0% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* ==========================================================================
   4. Reset & Base
   ========================================================================== */
.dsc-auth-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.dsc-auth-page {
    font-family: var(--dsc-font-body);
    background: var(--dsc-color-bg);
    min-height: 100vh;
    color: var(--dsc-color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    display: flex;
    align-items: stretch;
    padding: 0;
}

/* ==========================================================================
   5. Split-Screen Layout
   ========================================================================== */
.dsc-auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    background: var(--dsc-color-white);
}

/* ==========================================================================
   6. Branding Panel - VIBRANTE MCNP TEAL
   ========================================================================== */
.dsc-auth-branding {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--dsc-brand-width);
    height: 100vh;
    /* Animated gradient - colores MCNP reales */
    background: linear-gradient(
        135deg,
        var(--dsc-brand-start) 0%,
        var(--dsc-brand-mid) 35%,
        var(--dsc-brand-end) 65%,
        var(--dsc-brand-mid) 100%
    );
    background-size: 300% 300%;
    animation: dscGradientShift 12s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

/* Orbe azul 1 (grande, arriba-izquierda) */
.dsc-auth-branding::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -10%;
    width: 55%;
    height: 55%;
    background: radial-gradient(circle, var(--dsc-color-blue-mid) 0%, transparent 70%);
    border-radius: 50%;
    animation: dscFloat1 15s ease-in-out infinite;
    pointer-events: none;
}

/* Orbe azul 2 (mediano, abajo-derecha) */
.dsc-auth-branding::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -15%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, var(--dsc-color-blue-mid) 0%, transparent 65%);
    border-radius: 50%;
    animation: dscFloat2 18s ease-in-out infinite;
    pointer-events: none;
}

/* Branding content */
.dsc-auth-branding-inner {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 40px;
    max-width: 380px;
    animation: dscFadeIn 0.8s ease both;
    animation-delay: 0.2s;
}

/* Logo en circulo blanco con glow — GRANDE */
.dsc-auth-branding-logo {
    width: 170px;
    height: 170px;
    object-fit: contain;
    background: var(--dsc-color-white);
    padding: 26px;
    border-radius: 50%;
    margin-bottom: 32px;
    animation: dscLogoGlow 3s ease-in-out infinite;
    display: inline-block;
    filter: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.dsc-auth-branding-title {
    font-family: var(--dsc-font-display);
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.dsc-auth-branding-subtitle {
    font-family: var(--dsc-font-body);
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* Linea decorativa - blanca brillante */
.dsc-auth-branding-line {
    width: 48px;
    height: 3px;
    background: rgba(255, 255, 255, 0.7);
    margin: 24px auto 0;
    border-radius: 3px;
}

/* Anillo azul grande (decorative div) */
.dsc-auth-branding-decoration {
    position: absolute;
    top: 12%;
    right: 6%;
    width: 140px;
    height: 140px;
    border: 2.5px solid var(--dsc-color-blue-mid);
    border-radius: 50%;
    pointer-events: none;
    animation: dscFloat3 10s ease-in-out infinite, dscRingExpand 6s ease-in-out infinite;
}

/* Anillo azul 2 (decoration::before) */
.dsc-auth-branding-decoration::before {
    content: '';
    position: absolute;
    top: 350%;
    left: -180%;
    width: 90px;
    height: 90px;
    border: 2px solid var(--dsc-color-blue-soft);
    border-radius: 50%;
    pointer-events: none;
    animation: dscFloat1 14s ease-in-out infinite;
}

/* Partículas azules flotantes (decoration::after) — zona media-izquierda */
.dsc-auth-branding-decoration::after {
    content: '';
    position: absolute;
    top: 400%;
    left: -400%;
    width: 4px;
    height: 4px;
    background: var(--dsc-color-blue-mid);
    border-radius: 50%;
    pointer-events: none;
    box-shadow:
        40px -80px 0 3px var(--dsc-color-blue-soft),
        -60px 60px 0 4px var(--dsc-color-blue-faint),
        130px 30px 0 2px var(--dsc-color-blue-mid),
        -20px 150px 0 3px var(--dsc-color-blue-faint),
        100px -40px 0 3px var(--dsc-color-blue-soft),
        -100px -30px 0 2px var(--dsc-color-blue-faint),
        180px 120px 0 4px var(--dsc-color-blue-soft);
    animation: dscFloat2 18s ease-in-out infinite;
}

/* Anillo azul inferior-izquierdo via inner::before */
.dsc-auth-branding-inner::before {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -60px;
    width: 100px;
    height: 100px;
    border: 2px solid var(--dsc-color-blue-mid);
    border-radius: 50%;
    pointer-events: none;
    animation: dscFloat2 12s ease-in-out infinite reverse;
}

/* Partículas azules distribuidas por TODO el panel (centradas en inner) */
.dsc-auth-branding-inner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: transparent;
    border-radius: 50%;
    pointer-events: none;
    box-shadow:
        /* Zona superior */
        -120px -350px 0 3px var(--dsc-color-blue-soft),
        80px -300px 0 2px var(--dsc-color-blue-faint),
        -40px -250px 0 4px var(--dsc-color-blue-mid),
        180px -280px 0 2px var(--dsc-color-blue-faint),
        /* Zona superior-izquierda */
        -200px -180px 0 3px var(--dsc-color-blue-mid),
        -160px -100px 0 2px var(--dsc-color-blue-soft),
        /* Zona superior-derecha */
        140px -150px 0 3px var(--dsc-color-blue-soft),
        200px -220px 0 2px var(--dsc-color-blue-faint),
        /* Zona central */
        -180px 0 0 3px var(--dsc-color-blue-faint),
        160px 30px 0 4px var(--dsc-color-blue-faint),
        -80px -40px 0 2px var(--dsc-color-blue-soft),
        100px 60px 0 3px var(--dsc-color-blue-mid),
        /* Zona inferior */
        -150px 150px 0 3px var(--dsc-color-blue-soft),
        120px 200px 0 2px var(--dsc-color-blue-mid),
        -60px 280px 0 3px var(--dsc-color-blue-faint),
        180px 250px 0 4px var(--dsc-color-blue-soft),
        /* Zona más inferior */
        -100px 350px 0 3px var(--dsc-color-blue-mid),
        50px 380px 0 2px var(--dsc-color-blue-faint),
        -200px 300px 0 2px var(--dsc-color-blue-soft),
        140px 330px 0 3px var(--dsc-color-blue-faint);
    animation: dscFloat1 22s ease-in-out infinite;
}

/* Patrón de puntos azules overlay via line::before */
.dsc-auth-branding-line::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: var(--dsc-brand-width);
    height: 100vh;
    background-image: radial-gradient(var(--dsc-color-blue-faint) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

/* Partículas azules en zona inferior del panel */
.dsc-auth-branding-line::after {
    content: '';
    position: fixed;
    bottom: 15%;
    left: 5%;
    width: 4px;
    height: 4px;
    background: transparent;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    box-shadow:
        20px -30px 0 3px var(--dsc-color-blue-soft),
        120px 20px 0 2px var(--dsc-color-blue-faint),
        60px -70px 0 3px var(--dsc-color-blue-mid),
        180px -50px 0 2px var(--dsc-color-blue-faint),
        250px 30px 0 4px var(--dsc-color-blue-soft),
        90px 50px 0 2px var(--dsc-color-blue-faint),
        300px -20px 0 3px var(--dsc-color-blue-faint);
    animation: dscFloat3 16s ease-in-out infinite;
}

/* ==========================================================================
   7. Auth Container (form side)
   ========================================================================== */
.dsc-auth-container {
    width: 100%;
    margin-left: var(--dsc-brand-width);
    min-height: 100vh;
    background: var(--dsc-color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 60px;
    overflow-y: auto;
    position: relative;
    z-index: 2;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
}

/* Sutil accent line en el borde izquierdo del form (donde toca el brand panel) */
.dsc-auth-container::before {
    content: '';
    position: fixed;
    left: var(--dsc-brand-width);
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--dsc-brand-end), var(--dsc-brand-mid), var(--dsc-brand-start));
    z-index: 10;
}

/* Constrain inner content width */
.dsc-auth-container > .dsc-auth-header,
.dsc-auth-container > .dsc-auth-body,
.dsc-auth-container > .dsc-auth-footer {
    width: 100%;
    max-width: 480px;
    animation: dscSlideUp 0.5s ease both;
}

.dsc-auth-container > .dsc-auth-header { animation-delay: 0.15s; }
.dsc-auth-container > .dsc-auth-body { animation-delay: 0.25s; }
.dsc-auth-container > .dsc-auth-footer { animation-delay: 0.35s; }

/* ==========================================================================
   8. Auth Header
   ========================================================================== */
.dsc-auth-header {
    background: transparent;
    padding: 0 0 24px;
    text-align: left;
    border-bottom: none;
    margin-bottom: 28px;
    position: relative;
}

/* Teal accent bar at top of header */
.dsc-auth-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--dsc-color-primary), var(--dsc-color-primary-vivid));
    border-radius: 3px;
}

.dsc-auth-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 20px;
    display: none; /* Hidden on desktop - logo is in branding panel */
}

.dsc-auth-title {
    font-family: var(--dsc-font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--dsc-color-text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dsc-auth-subtitle {
    font-family: var(--dsc-font-body);
    font-size: 15px;
    color: var(--dsc-color-text-light);
    font-weight: 400;
    line-height: 1.5;
}

/* ==========================================================================
   9. Auth Body
   ========================================================================== */
.dsc-auth-body {
    padding: 0;
    flex: 1;
}

/* ==========================================================================
   10. View System
   ========================================================================== */
.dsc-auth-view {
    display: none;
}

.dsc-auth-view.active {
    display: block;
    animation: dscFadeIn 0.35s ease forwards;
}

.dsc-auth-view.hiding {
    animation: dscFadeOut 0.2s ease forwards;
}

/* ==========================================================================
   11. Selector Options - Cards con impacto
   ========================================================================== */
.dsc-auth-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dsc-auth-option-btn {
    display: flex;
    align-items: center;
    padding: 22px 24px;
    background: var(--dsc-color-white);
    border: 1.5px solid var(--dsc-color-border);
    border-radius: var(--dsc-radius-lg);
    cursor: pointer;
    transition: all var(--dsc-transition-slow);
    text-decoration: none;
    color: var(--dsc-color-text);
    position: relative;
    overflow: hidden;
}

/* Gradiente left-bar al hover */
.dsc-auth-option-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(180deg, var(--dsc-color-primary), var(--dsc-color-primary-vivid));
    transition: width var(--dsc-transition-slow);
}

.dsc-auth-option-btn:hover {
    border-color: var(--dsc-color-primary);
    box-shadow: 0 8px 28px rgba(0, 169, 157, 0.12);
    transform: translateY(-2px);
    background: var(--dsc-color-primary-lighter);
}

.dsc-auth-option-btn:hover::before {
    width: 5px;
}

.dsc-auth-option-btn:active {
    transform: translateY(0);
    box-shadow: var(--dsc-shadow);
}

.dsc-auth-option-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--dsc-color-primary) 0%, var(--dsc-color-primary-vivid) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    transition: all var(--dsc-transition-slow);
    box-shadow: 0 4px 12px rgba(0, 169, 157, 0.25);
}

.dsc-auth-option-btn:hover .dsc-auth-option-icon {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 169, 157, 0.35);
}

.dsc-auth-option-text h3 {
    font-family: var(--dsc-font-body);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--dsc-color-text);
}

.dsc-auth-option-text p {
    font-size: 13px;
    color: var(--dsc-color-text-light);
    font-weight: 400;
}

/* ==========================================================================
   12. Back Button
   ========================================================================== */
.dsc-auth-back {
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dsc-color-text-light);
    cursor: pointer;
    transition: all var(--dsc-transition);
    background: none;
    border: none;
    padding: 8px 14px 8px 10px;
    border-radius: var(--dsc-radius-md);
    margin-left: -10px;
    font-family: var(--dsc-font-body);
}

.dsc-auth-back:hover {
    color: var(--dsc-color-primary);
    background: var(--dsc-color-primary-lighter);
}

.dsc-auth-back svg {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    transition: transform var(--dsc-transition);
}

.dsc-auth-back:hover svg {
    transform: translateX(-4px);
}

/* ==========================================================================
   13. Auth Links
   ========================================================================== */
.dsc-auth-links {
    margin-top: 28px;
    text-align: center;
    font-size: 14px;
    color: var(--dsc-color-text-light);
    padding-top: 22px;
    border-top: 1px solid var(--dsc-color-border-light);
}

.dsc-auth-links a {
    color: var(--dsc-color-primary);
    text-decoration: none;
    font-weight: 700;
    transition: all var(--dsc-transition);
    position: relative;
}

.dsc-auth-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--dsc-color-primary);
    transition: width var(--dsc-transition);
    border-radius: 2px;
}

.dsc-auth-links a:hover {
    color: var(--dsc-color-primary-dark);
}

.dsc-auth-links a:hover::after {
    width: 100%;
}

/* ==========================================================================
   14. Form Elements
   ========================================================================== */
.dsc-form-group {
    margin-bottom: 22px;
}

.dsc-form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--dsc-color-text);
    margin-bottom: 7px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--dsc-font-body);
}

.dsc-form-label .required {
    color: var(--dsc-color-error);
    font-weight: 500;
}

.dsc-form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: var(--dsc-font-body);
    border: 1.5px solid var(--dsc-color-border);
    border-radius: var(--dsc-radius-md);
    transition: all var(--dsc-transition);
    background: var(--dsc-color-bg-warm);
    color: var(--dsc-color-text);
    line-height: 1.4;
}

.dsc-form-input:hover {
    border-color: var(--dsc-color-primary);
    background: var(--dsc-color-white);
}

.dsc-form-input:focus {
    outline: none;
    border-color: var(--dsc-color-primary);
    background: var(--dsc-color-white);
    box-shadow: var(--dsc-shadow-input), var(--dsc-shadow);
}

.dsc-form-input.error {
    border-color: var(--dsc-color-error);
    animation: dscShake 0.4s ease;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.dsc-form-input::placeholder {
    color: var(--dsc-color-text-lighter);
    font-weight: 400;
}

.dsc-form-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--dsc-color-bg);
}

.dsc-form-error {
    font-size: 12px;
    color: var(--dsc-color-error);
    margin-top: 6px;
    display: none;
    font-weight: 500;
    line-height: 1.4;
}

.dsc-form-error.visible {
    display: block;
    animation: dscFadeIn 0.2s ease;
}

.dsc-form-hint {
    font-size: 12px;
    color: var(--dsc-color-text-lighter);
    margin-top: 6px;
    display: block;
    line-height: 1.4;
}

/* ==========================================================================
   15. Form Sections
   ========================================================================== */
.dsc-form-section {
    margin: 30px 0 20px;
    padding: 22px 0 12px;
    border-top: 1.5px solid var(--dsc-color-border-light);
    position: relative;
}

/* Teal accent on section */
.dsc-form-section::after {
    content: '';
    position: absolute;
    top: -1.5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--dsc-color-primary), var(--dsc-color-primary-vivid));
    border-radius: 3px;
}

.dsc-form-section-title {
    font-family: var(--dsc-font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--dsc-color-text);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.dsc-form-section-subtitle {
    font-size: 13px;
    color: var(--dsc-color-text-lighter);
    margin: 0;
    font-weight: 400;
}

.dsc-optional {
    color: var(--dsc-color-text-lighter);
    font-weight: 400;
    font-size: 11px;
    text-transform: none;
}

/* ==========================================================================
   16. Buttons - Con gradiente animado
   ========================================================================== */
.dsc-btn {
    width: 100%;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: var(--dsc-radius-md);
    cursor: pointer;
    transition: all var(--dsc-transition);
    font-family: var(--dsc-font-body);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.dsc-btn-primary {
    background: linear-gradient(135deg, var(--dsc-color-primary) 0%, var(--dsc-color-primary-vivid) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 169, 157, 0.30);
}

/* Shine effect on hover */
.dsc-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: none;
    pointer-events: none;
}

.dsc-btn-primary:hover {
    box-shadow: 0 6px 24px rgba(0, 169, 157, 0.40);
    transform: translateY(-2px);
}

.dsc-btn-primary:hover::before {
    animation: dscShine 0.6s ease forwards;
}

.dsc-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 169, 157, 0.25);
}

.dsc-btn-primary:disabled {
    background: var(--dsc-color-border);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.dsc-btn-primary:disabled::before {
    display: none;
}

.dsc-btn-secondary {
    background: transparent;
    color: var(--dsc-color-primary);
    border: 2px solid var(--dsc-color-primary);
}

.dsc-btn-secondary:hover {
    background: var(--dsc-color-primary-lighter);
    border-color: var(--dsc-color-primary-dark);
    transform: translateY(-1px);
}

.dsc-btn-link {
    background: none;
    border: none;
    color: var(--dsc-color-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    width: auto;
    transition: color var(--dsc-transition);
    font-family: var(--dsc-font-body);
}

.dsc-btn-link:hover {
    color: var(--dsc-color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Loading spinner */
.dsc-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.dsc-btn.loading::before {
    display: none;
}

.dsc-btn.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    top: 50%;
    left: 50%;
    margin: -11px 0 0 -11px;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-top-color: white;
    border-radius: 50%;
    animation: dscSpin 0.7s linear infinite;
}

/* ==========================================================================
   17. Password Toggle
   ========================================================================== */
.dsc-password-wrapper {
    position: relative;
}

.dsc-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dsc-color-text-lighter);
    padding: 6px;
    border-radius: var(--dsc-radius-sm);
    transition: all var(--dsc-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsc-password-toggle:hover {
    color: var(--dsc-color-primary);
    background: var(--dsc-color-primary-lighter);
}

/* ==========================================================================
   18. Phone Input Group
   ========================================================================== */
.dsc-phone-input-group {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.dsc-country-code-select {
    flex: 0 0 110px;
    min-width: 110px;
}

.dsc-phone-number-input {
    flex: 1;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin-left: -1.5px;
}

/* ==========================================================================
   19. Country Code Dropdown
   ========================================================================== */
.dsc-country-dropdown {
    position: relative;
    display: inline-block;
}

.dsc-country-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 13px 10px;
    background: var(--dsc-color-bg-warm);
    border: 1.5px solid var(--dsc-color-border);
    border-radius: var(--dsc-radius-md) 0 0 var(--dsc-radius-md);
    cursor: pointer;
    font-size: 14px;
    font-family: var(--dsc-font-body);
    color: var(--dsc-color-text);
    min-width: 95px;
    height: 100%;
    box-sizing: border-box;
    transition: all var(--dsc-transition);
}

.dsc-country-dropdown-btn:hover {
    background: var(--dsc-color-white);
    border-color: var(--dsc-color-primary);
}

.dsc-country-dropdown-btn:focus {
    outline: none;
    border-color: var(--dsc-color-primary);
    box-shadow: var(--dsc-shadow-input);
}

.dsc-country-flag img.emoji {
    height: 20px;
    width: 20px;
}

.dsc-country-code {
    font-weight: 700;
    font-size: 14px;
}

.dsc-dropdown-arrow {
    font-size: 9px;
    color: var(--dsc-color-text-lighter);
    margin-left: auto;
    transition: transform var(--dsc-transition);
}

.dsc-country-dropdown-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: var(--dsc-color-white);
    border: 1.5px solid var(--dsc-color-border);
    border-radius: var(--dsc-radius-md);
    box-shadow: var(--dsc-shadow-lg);
    max-height: 260px;
    overflow-y: auto;
    min-width: 200px;
    margin-top: 4px;
}

.dsc-country-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dsc-country-dropdown-list::-webkit-scrollbar-track {
    background: transparent;
}

.dsc-country-dropdown-list::-webkit-scrollbar-thumb {
    background: var(--dsc-color-border);
    border-radius: 3px;
}

.dsc-country-dropdown-list.open {
    display: block;
    animation: dscFadeIn 0.15s ease;
}

.dsc-country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--dsc-color-text);
    transition: background var(--dsc-transition);
    font-family: var(--dsc-font-body);
}

.dsc-country-option:hover {
    background: var(--dsc-color-primary-lighter);
}

.dsc-country-option.selected {
    background: var(--dsc-color-primary-light);
    font-weight: 700;
    color: var(--dsc-color-primary-dark);
}

.dsc-country-option .flag img.emoji {
    height: 20px;
    width: 20px;
}

/* ==========================================================================
   20. Select Styles (WordPress theme overrides)
   ========================================================================== */
body.dsc-auth-page select,
body.dsc-auth-page select.dsc-form-select,
.dsc-auth-container select,
.dsc-auth-container select.dsc-form-select,
#dsc-reg-country-code,
#dsc-reg-profesion,
#dsc-reg-especialidad,
#dsc-reg-alta-especialidad {
    width: 100%;
    padding: 14px 40px 14px 16px !important;
    font-size: 15px !important;
    font-family: var(--dsc-font-body) !important;
    color: var(--dsc-color-text) !important;
    background-color: var(--dsc-color-bg-warm) !important;
    border: 1.5px solid var(--dsc-color-border) !important;
    border-radius: var(--dsc-radius-md) !important;
    transition: all var(--dsc-transition);
    cursor: pointer;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%235a6577'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 48px !important;
    box-shadow: none !important;
    text-indent: 0 !important;
    -webkit-text-fill-color: var(--dsc-color-text) !important;
    opacity: 1 !important;
}

#dsc-reg-country-code,
.dsc-country-code-select {
    flex: 0 0 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    padding: 14px 30px 14px 12px !important;
    font-size: 15px !important;
}

body.dsc-auth-page select:hover,
.dsc-auth-container select:hover {
    border-color: var(--dsc-color-primary) !important;
    background-color: var(--dsc-color-white) !important;
}

body.dsc-auth-page select:focus,
.dsc-auth-container select:focus,
#dsc-reg-country-code:focus,
#dsc-reg-profesion:focus,
#dsc-reg-especialidad:focus,
#dsc-reg-alta-especialidad:focus {
    outline: none !important;
    border-color: var(--dsc-color-primary) !important;
    box-shadow: var(--dsc-shadow-input) !important;
    background-color: var(--dsc-color-white) !important;
}

body.dsc-auth-page select:disabled,
.dsc-auth-container select:disabled {
    background-color: var(--dsc-color-bg) !important;
    color: var(--dsc-color-text-lighter) !important;
    -webkit-text-fill-color: var(--dsc-color-text-lighter) !important;
    cursor: not-allowed !important;
}

body.dsc-auth-page select option,
.dsc-auth-container select option,
#dsc-reg-country-code option,
#dsc-reg-profesion option,
#dsc-reg-especialidad option,
#dsc-reg-alta-especialidad option {
    padding: 12px !important;
    color: var(--dsc-color-text) !important;
    background-color: var(--dsc-color-white) !important;
    font-size: 15px !important;
}

body.dsc-auth-page select option[value=""],
.dsc-auth-container select option[value=""] {
    color: var(--dsc-color-text-lighter) !important;
}

body.dsc-auth-page .dsc-auth-container select:not(.no-override),
body.dsc-auth-page .dsc-form-group select:not(.no-override) {
    color: var(--dsc-color-text) !important;
    -webkit-text-fill-color: var(--dsc-color-text) !important;
}

/* ==========================================================================
   21. OTP Inputs - Premium feel
   ========================================================================== */
.dsc-otp-container {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 32px 0;
}

.dsc-otp-input {
    width: 56px;
    height: 68px;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    font-family: var(--dsc-font-body);
    border: 2px solid var(--dsc-color-border);
    border-radius: 14px;
    transition: all var(--dsc-transition);
    background: var(--dsc-color-bg-warm);
    color: var(--dsc-color-text);
    caret-color: var(--dsc-color-primary);
}

.dsc-otp-input:hover {
    border-color: var(--dsc-color-primary);
}

.dsc-otp-input:focus {
    outline: none;
    border-color: var(--dsc-color-primary);
    background: var(--dsc-color-white);
    box-shadow: var(--dsc-shadow-input), 0 4px 12px rgba(0, 169, 157, 0.10);
    transform: scale(1.06) translateY(-2px);
}

.dsc-otp-input.filled {
    background: var(--dsc-color-primary-light);
    border-color: var(--dsc-color-primary);
    color: var(--dsc-color-primary-dark);
    box-shadow: 0 4px 12px rgba(0, 169, 157, 0.12);
}

.dsc-otp-input.error {
    border-color: var(--dsc-color-error);
    background: var(--dsc-color-error-light);
    animation: dscShake 0.4s ease;
}

.dsc-otp-info {
    text-align: center;
    margin-bottom: 8px;
}

.dsc-otp-info p {
    font-size: 14px;
    color: var(--dsc-color-text-light);
    margin-bottom: 4px;
    line-height: 1.5;
}

.dsc-otp-info strong {
    color: var(--dsc-color-primary-dark);
    font-weight: 700;
}

.dsc-otp-resend {
    text-align: center;
    margin-top: 20px;
}

.dsc-otp-timer {
    font-size: 14px;
    color: var(--dsc-color-text-lighter);
}

/* ==========================================================================
   22. Checkboxes
   ========================================================================== */
.dsc-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dsc-checkbox-input {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--dsc-color-primary);
    flex-shrink: 0;
    cursor: pointer;
}

.dsc-checkbox-label {
    font-size: 13px;
    color: var(--dsc-color-text-light);
    line-height: 1.55;
    font-weight: 400;
}

.dsc-checkbox-label a {
    color: var(--dsc-color-primary);
    font-weight: 700;
    text-decoration: none;
}

.dsc-checkbox-label a:hover {
    color: var(--dsc-color-primary-dark);
    text-decoration: underline;
}

/* ==========================================================================
   23. AJAX Validation Status Icons
   ========================================================================== */
.dsc-input-with-status {
    position: relative;
}

.dsc-input-with-status .dsc-form-input {
    padding-right: 45px;
}

.dsc-input-status {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsc-input-status.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--dsc-color-border);
    border-top-color: var(--dsc-color-primary);
    border-radius: 50%;
    animation: dsc-spin 0.7s linear infinite;
}

.dsc-input-status.valid::after {
    content: '\2713';
    color: var(--dsc-color-success);
    font-size: 18px;
    font-weight: bold;
}

.dsc-input-status.invalid::after {
    content: '\2717';
    color: var(--dsc-color-error);
    font-size: 18px;
    font-weight: bold;
}

.dsc-form-input.is-valid {
    border-color: var(--dsc-color-success);
}

.dsc-form-input.is-invalid {
    border-color: var(--dsc-color-error);
}

/* ==========================================================================
   24. RFC Validation
   ========================================================================== */
.dsc-input-with-validation {
    position: relative;
    display: flex;
    align-items: center;
}

.dsc-input-with-validation .dsc-form-input {
    flex: 1;
    padding-right: 42px;
}

.dsc-validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
}

.dsc-validation-icon.validating { color: var(--dsc-color-primary); }
.dsc-validation-icon.success { color: var(--dsc-color-success); }
.dsc-validation-icon.error { color: var(--dsc-color-error); }

.dsc-form-success {
    display: block;
    font-size: 12px;
    color: var(--dsc-color-success);
    margin-top: 5px;
    font-weight: 500;
}

.dsc-form-success.visible { display: block; }
.dsc-form-input.success { border-color: var(--dsc-color-success); }

.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--dsc-color-border);
    border-top-color: var(--dsc-color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ==========================================================================
   25. Alerts
   ========================================================================== */
.dsc-alert {
    padding: 14px 18px;
    border-radius: var(--dsc-radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    border-left: 4px solid transparent;
}

.dsc-alert-error {
    background: var(--dsc-color-error-light);
    color: #8b1a25;
    border-left-color: var(--dsc-color-error);
}

.dsc-alert-success {
    background: var(--dsc-color-success-light);
    color: #0e5132;
    border-left-color: var(--dsc-color-success);
}

.dsc-alert-info {
    background: var(--dsc-color-primary-light);
    color: var(--dsc-color-primary-darker);
    border-left-color: var(--dsc-color-primary);
}

/* ==========================================================================
   26. Success View
   ========================================================================== */
.dsc-auth-success {
    text-align: center;
    padding: 50px 20px;
}

.dsc-auth-success-icon {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, var(--dsc-color-success) 0%, #157347 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: dscPulse 0.6s ease;
    box-shadow: 0 8px 32px rgba(25, 135, 84, 0.30);
}

.dsc-auth-success-icon svg {
    width: 44px;
    height: 44px;
    color: white;
}

.dsc-auth-success h2 {
    font-family: var(--dsc-font-display);
    font-size: 28px;
    color: var(--dsc-color-text);
    margin-bottom: 8px;
    font-weight: 700;
}

.dsc-auth-success p {
    font-size: 15px;
    color: var(--dsc-color-text-light);
    margin-bottom: 20px;
}

/* ==========================================================================
   26b. Registration Success (Thank You Page)
   ========================================================================== */
.dsc-reg-success {
    text-align: center;
    padding: 30px 16px 20px;
}

.dsc-reg-success-icon {
    width: 76px;
    height: 76px;
    background: linear-gradient(135deg, var(--dsc-color-success) 0%, #157347 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: dscPulse 0.6s ease;
    box-shadow: 0 8px 32px rgba(25, 135, 84, 0.30);
}

.dsc-reg-success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.dsc-reg-success-title {
    font-family: var(--dsc-font-display);
    font-size: 24px;
    color: var(--dsc-color-text);
    margin-bottom: 6px;
    font-weight: 700;
}

.dsc-reg-success-subtitle {
    font-size: 14px;
    color: var(--dsc-color-text-light);
    margin-bottom: 20px;
}

/* CTA Box */
.dsc-reg-cta-box {
    background: linear-gradient(135deg, rgba(0, 169, 157, 0.08) 0%, rgba(29, 186, 180, 0.04) 100%);
    border: 1px solid rgba(0, 169, 157, 0.20);
    border-radius: var(--dsc-radius-md);
    padding: 16px 18px;
    margin-bottom: 18px;
    text-align: left;
}

.dsc-reg-cta-box p {
    font-size: 13.5px;
    color: var(--dsc-color-text);
    line-height: 1.6;
    margin: 0;
}

.dsc-reg-cta-box strong {
    color: var(--dsc-color-primary-dark);
}

/* App Download */
.dsc-reg-app-download {
    background: #e8f4fd;
    border-radius: var(--dsc-radius-md);
    padding: 16px;
    margin-bottom: 18px;
}

.dsc-reg-app-title {
    font-size: 14px;
    color: var(--dsc-color-blue);
    font-weight: 600;
    margin-bottom: 12px;
}

.dsc-reg-app-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.dsc-reg-store-btn img {
    height: 42px;
    width: auto;
    transition: transform 0.2s ease;
}

.dsc-reg-store-btn:hover img {
    transform: scale(1.05);
}

/* Instructions */
.dsc-reg-instructions {
    background: var(--dsc-color-bg-warm);
    border: 1px solid var(--dsc-color-border-light);
    border-radius: var(--dsc-radius-md);
    padding: 14px 16px;
    margin-bottom: 20px;
    text-align: left;
}

.dsc-reg-instruction-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--dsc-color-text);
    padding: 6px 0;
}

.dsc-reg-instruction-item + .dsc-reg-instruction-item {
    border-top: 1px solid var(--dsc-color-border-light);
}

.dsc-reg-step-num {
    min-width: 24px;
    height: 24px;
    background: var(--dsc-color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Action Buttons */
.dsc-reg-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dsc-reg-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--dsc-color-primary) 0%, var(--dsc-color-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--dsc-radius-md);
    font-family: var(--dsc-font-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--dsc-transition);
    box-shadow: 0 4px 16px rgba(0, 169, 157, 0.25);
}

.dsc-reg-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 169, 157, 0.35);
    color: white;
    text-decoration: none;
}

.dsc-reg-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    background: transparent;
    color: var(--dsc-color-text-light);
    border: 1.5px solid var(--dsc-color-border);
    border-radius: var(--dsc-radius-md);
    font-family: var(--dsc-font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--dsc-transition);
}

.dsc-reg-btn-secondary:hover {
    border-color: var(--dsc-color-primary);
    color: var(--dsc-color-primary);
    background: var(--dsc-color-primary-lighter);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .dsc-reg-success { padding: 20px 12px 16px; }
    .dsc-reg-success-icon { width: 64px; height: 64px; margin-bottom: 16px; }
    .dsc-reg-success-icon svg { width: 34px; height: 34px; }
    .dsc-reg-success-title { font-size: 20px; }
    .dsc-reg-store-btn img { height: 36px; }
    .dsc-reg-app-buttons { gap: 8px; }
}

/* ==========================================================================
   27. Actualizar Perfil - Info Banner
   ========================================================================== */
.dsc-auth-header-info {
    margin-bottom: 24px !important;
    padding: 16px 18px !important;
    background: var(--dsc-color-warning-light) !important;
    border-radius: var(--dsc-radius-md) !important;
    border-left: 4px solid var(--dsc-color-warning) !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

/* ==========================================================================
   28. File Input
   ========================================================================== */
.dsc-file-input-wrapper {
    position: relative;
    width: 100%;
}

.dsc-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.dsc-file-input-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--dsc-color-bg-warm);
    border: 2px dashed var(--dsc-color-border);
    border-radius: var(--dsc-radius-md);
    transition: all var(--dsc-transition);
}

.dsc-file-input-wrapper:hover .dsc-file-input-display {
    border-color: var(--dsc-color-primary);
    background: var(--dsc-color-primary-lighter);
}

.dsc-file-input-text {
    color: var(--dsc-color-text-lighter);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.dsc-file-input-text.has-file {
    color: var(--dsc-color-text);
    font-weight: 600;
}

.dsc-file-input-text.uploading {
    color: var(--dsc-color-secondary);
    font-style: italic;
}

.dsc-file-input-text.uploading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid var(--dsc-color-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: dscSpin 0.7s linear infinite;
    vertical-align: middle;
}

.dsc-file-input-text.uploaded {
    color: var(--dsc-color-success);
    font-weight: 600;
}

.dsc-file-input-wrapper.uploading .dsc-file-input { pointer-events: none; }

.dsc-file-input-wrapper.uploading .dsc-file-input-display {
    border-color: var(--dsc-color-secondary);
    background: rgba(245, 166, 35, 0.04);
}

.dsc-file-input-wrapper .dsc-file-input-display.uploaded {
    border-color: var(--dsc-color-success);
    background: rgba(25, 135, 84, 0.04);
}

.dsc-file-input-btn {
    background: linear-gradient(135deg, var(--dsc-color-primary) 0%, var(--dsc-color-primary-vivid) 100%);
    color: white;
    padding: 8px 18px;
    border-radius: var(--dsc-radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--dsc-font-body);
    white-space: nowrap;
}

.dsc-file-input:focus + .dsc-file-input-display {
    border-color: var(--dsc-color-primary);
    box-shadow: var(--dsc-shadow-input);
}

.dsc-file-upload-progress { margin-top: 8px; display: none; }
.dsc-file-upload-progress.active { display: block; }

.dsc-file-progress-bar {
    height: 4px;
    background: var(--dsc-color-border-light);
    border-radius: 2px;
    overflow: hidden;
}

.dsc-file-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dsc-color-primary), var(--dsc-color-primary-vivid));
    width: 0%;
    transition: width 0.3s ease;
}

.dsc-file-progress-text {
    font-size: 12px;
    color: var(--dsc-color-text-lighter);
    margin-top: 4px;
}

.dsc-file-uploaded {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--dsc-color-primary-lighter);
    border: 1.5px solid var(--dsc-color-primary);
    border-radius: var(--dsc-radius-md);
    margin-top: 8px;
}

.dsc-file-uploaded-icon { color: var(--dsc-color-primary); }

.dsc-file-uploaded-name {
    flex: 1;
    font-size: 13px;
    color: var(--dsc-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.dsc-file-uploaded-remove {
    background: none;
    border: none;
    color: var(--dsc-color-error);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    border-radius: 4px;
    transition: all var(--dsc-transition);
}

.dsc-file-uploaded-remove:hover {
    color: #b02a37;
    background: var(--dsc-color-error-light);
}

/* ==========================================================================
   29. Modals - Glassmorphism
   ========================================================================== */
.dsc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 20, 30, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.dsc-modal {
    background: var(--dsc-color-white);
    border-radius: var(--dsc-radius-xl);
    box-shadow: var(--dsc-shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.04);
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dsc-modal-overlay.active .dsc-modal {
    transform: scale(1) translateY(0);
}

.dsc-modal-header {
    padding: 28px 28px 16px;
    text-align: center;
    border-bottom: 1px solid var(--dsc-color-border-light);
}

.dsc-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.dsc-modal-icon.warning {
    background-color: var(--dsc-color-warning-light);
    color: #c68a08;
}

.dsc-modal-icon.info {
    background-color: var(--dsc-color-primary-light);
    color: var(--dsc-color-primary);
}

.dsc-modal-icon svg { width: 28px; height: 28px; }

.dsc-modal-title {
    font-family: var(--dsc-font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--dsc-color-text);
    margin: 0;
}

.dsc-modal-body { padding: 20px 28px; }

.dsc-modal-body p {
    color: var(--dsc-color-text-light);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 6px;
    text-align: center;
}

.dsc-modal-email {
    font-weight: 800;
    color: var(--dsc-color-primary);
    word-break: break-all;
}

.dsc-modal-footer {
    padding: 16px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dsc-modal-btn {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--dsc-radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--dsc-transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-family: var(--dsc-font-body);
}

.dsc-modal-btn-primary {
    background: linear-gradient(135deg, var(--dsc-color-primary), var(--dsc-color-primary-vivid));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 169, 157, 0.25);
}

.dsc-modal-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 169, 157, 0.35);
    transform: translateY(-1px);
}

.dsc-modal-btn-secondary {
    background-color: var(--dsc-color-bg);
    color: var(--dsc-color-text);
}

.dsc-modal-btn-secondary:hover {
    background-color: var(--dsc-color-border-light);
}

.dsc-modal-btn-outline {
    background-color: transparent;
    color: var(--dsc-color-text-light);
    border: 1.5px solid var(--dsc-color-border);
}

.dsc-modal-btn-outline:hover {
    background-color: var(--dsc-color-bg);
}

/* ==========================================================================
   30. Footer
   ========================================================================== */
.dsc-auth-footer {
    text-align: center;
    padding: 24px 0 0;
    margin-top: auto;
    font-size: 12px;
    color: var(--dsc-color-text-lighter);
    background: transparent;
    border-top: 1px solid var(--dsc-color-border-light);
}

.dsc-auth-footer a {
    color: var(--dsc-color-primary);
    text-decoration: none;
}

/* ==========================================================================
   31. Accessibility
   ========================================================================== */
.dsc-form-input:focus-visible,
.dsc-btn:focus-visible,
.dsc-auth-option-btn:focus-visible {
    outline: 3px solid var(--dsc-color-primary);
    outline-offset: 2px;
}

.dsc-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   32. Embedded Mode
   ========================================================================== */
.dsc-auth-embedded-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
}

.dsc-auth-container.dsc-auth-embedded {
    box-shadow: var(--dsc-shadow-md);
    border: 1px solid var(--dsc-color-border-light);
    background: var(--dsc-color-white);
    border-radius: var(--dsc-radius-lg);
}

.dsc-auth-embedded .dsc-auth-header { padding: 24px 24px 16px; }
.dsc-auth-embedded .dsc-auth-header .dsc-auth-title { font-size: 22px; }
.dsc-auth-embedded .dsc-auth-header .dsc-auth-logo { max-height: 50px; display: block; }
.dsc-auth-embedded .dsc-auth-body { padding: 0 24px 24px; }

.dsc-embedded-message { text-align: center; padding: 30px 20px; }

.dsc-embedded-message p {
    color: var(--dsc-color-text-light);
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.dsc-embedded-message .dsc-btn {
    display: inline-block;
    text-decoration: none;
}

/* ==========================================================================
   33. Scrollbar
   ========================================================================== */
.dsc-auth-container::-webkit-scrollbar { width: 6px; }
.dsc-auth-container::-webkit-scrollbar-track { background: transparent; }
.dsc-auth-container::-webkit-scrollbar-thumb { background: var(--dsc-color-border); border-radius: 3px; }
.dsc-auth-container::-webkit-scrollbar-thumb:hover { background: var(--dsc-color-text-lighter); }

/* ==========================================================================
   34. Responsive - Tablet (<=1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    :root {
        --dsc-brand-width: 0%;
    }

    body.dsc-auth-page {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .dsc-auth-wrapper {
        flex-direction: column;
        align-items: center;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        background: linear-gradient(
            160deg,
            var(--dsc-brand-start) 0%,
            var(--dsc-brand-mid) 50%,
            var(--dsc-brand-end) 100%
        );
        background-size: 200% 200%;
        animation: dscGradientShift 12s ease infinite;
    }

    .dsc-auth-branding {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 36px 24px 28px;
        background: transparent;
        animation: none;
        flex-shrink: 0;
    }

    .dsc-auth-branding::before,
    .dsc-auth-branding::after {
        opacity: 0.7;
    }

    .dsc-auth-branding-inner { max-width: 500px; padding: 0; }

    .dsc-auth-branding-logo {
        width: 130px;
        height: 130px;
        padding: 20px;
        margin-bottom: 16px;
    }

    .dsc-auth-branding-title { font-size: 26px; }
    .dsc-auth-branding-subtitle { font-size: 14px; margin-bottom: 8px; }

    .dsc-auth-branding-inner::before {
        display: none;
    }

    /* Anillo decorativo sutil en mobile */
    .dsc-auth-branding-decoration {
        width: 80px;
        height: 80px;
        border-width: 1.5px;
        top: 8%;
        right: 8%;
        opacity: 0.4;
    }

    /* Partículas redistribuidas para panel mobile (más corto y ancho) */
    .dsc-auth-branding-inner::after {
        box-shadow:
            -130px -80px 0 2px var(--dsc-color-blue-soft),
            100px -60px 0 3px var(--dsc-color-blue-faint),
            -50px 20px 0 2px var(--dsc-color-blue-mid),
            130px 40px 0 2px var(--dsc-color-blue-faint),
            -100px -30px 0 3px var(--dsc-color-blue-soft),
            70px -90px 0 2px var(--dsc-color-blue-faint),
            -80px 70px 0 3px var(--dsc-color-blue-mid),
            120px -20px 0 2px var(--dsc-color-blue-soft),
            -30px -100px 0 2px var(--dsc-color-blue-faint),
            50px 80px 0 3px var(--dsc-color-blue-soft),
            -120px 50px 0 2px var(--dsc-color-blue-faint),
            140px 70px 0 2px var(--dsc-color-blue-mid);
    }

    .dsc-auth-branding-decoration::after {
        top: 200%;
        left: -300%;
        box-shadow:
            40px 20px 0 2px var(--dsc-color-blue-faint),
            -30px 60px 0 3px var(--dsc-color-blue-soft),
            80px -20px 0 2px var(--dsc-color-blue-faint),
            -60px -40px 0 2px var(--dsc-color-blue-soft),
            110px 50px 0 3px var(--dsc-color-blue-faint);
    }

    .dsc-auth-container {
        margin-left: 0;
        width: 100%;
        max-width: 560px;
        min-height: 0;
        border-radius: var(--dsc-radius-xl) var(--dsc-radius-xl) 0 0;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.10);
        padding: 36px 40px;
        flex: 1;
        justify-content: flex-start;
        margin-top: -16px;
        overflow-y: auto;
    }

    .dsc-auth-container::before { display: none; }

    /* Ocultar partículas inferiores en tablet/mobile */
    .dsc-auth-branding-line::after { display: none; }

    .dsc-auth-container > .dsc-auth-header,
    .dsc-auth-container > .dsc-auth-body,
    .dsc-auth-container > .dsc-auth-footer {
        max-width: 480px;
    }

    .dsc-auth-header { text-align: center; }
    .dsc-auth-header::after { left: 50%; transform: translateX(-50%); }
    .dsc-auth-logo { display: none; }
}

/* ==========================================================================
   35. Responsive - Mobile (<768px)
   ========================================================================== */
@media (max-width: 768px) {
    .dsc-auth-branding {
        padding: 28px 20px 24px;
    }

    .dsc-auth-branding-logo {
        width: 130px;
        height: 130px;
        padding: 20px;
        margin-bottom: 12px;
    }

    .dsc-auth-branding-title { font-size: 22px; margin-bottom: 6px; }
    .dsc-auth-branding-subtitle { font-size: 13px; margin-bottom: 6px; }
    .dsc-auth-branding-line { display: none; }

    .dsc-auth-container {
        padding: 26px 24px 12px;
        border-radius: var(--dsc-radius-lg) var(--dsc-radius-lg) 0 0;
    }

    .dsc-auth-header { padding: 0 0 18px; margin-bottom: 20px; }
    .dsc-auth-options { gap: 10px; }
    .dsc-auth-option-btn { padding: 14px 16px; }

    .dsc-auth-container > .dsc-auth-header,
    .dsc-auth-container > .dsc-auth-body,
    .dsc-auth-container > .dsc-auth-footer { max-width: 100%; }

    .dsc-auth-title { font-size: 22px; }
    .dsc-auth-subtitle { font-size: 13px; }

    /* Footer compacto para que quepa en una pantalla */
    .dsc-auth-footer {
        padding: 10px 0 0;
        margin-top: 12px;
    }

    .dsc-auth-links {
        margin-top: 18px;
        padding-top: 14px;
    }

    .dsc-form-group { margin-bottom: 18px; }
    .dsc-form-section { margin: 22px 0 14px; padding: 16px 0 8px; }
    .dsc-form-section-title { font-size: 16px; }

    .dsc-otp-input { width: 48px; height: 58px; font-size: 22px; }
    .dsc-otp-container { gap: 10px; }

    .dsc-modal { width: 94%; border-radius: var(--dsc-radius-lg); }
    .dsc-modal-header { padding: 24px 20px 14px; }
    .dsc-modal-body { padding: 16px 20px; }
    .dsc-modal-footer { padding: 14px 20px 24px; }
}

/* ==========================================================================
   36. Responsive - Small Mobile (<480px)
   ========================================================================== */
@media (max-width: 480px) {
    .dsc-auth-branding {
        padding: 20px 16px 18px;
    }

    .dsc-auth-branding::before,
    .dsc-auth-branding::after { opacity: 0.5; }

    .dsc-auth-branding-logo {
        width: 110px;
        height: 110px;
        padding: 16px;
        margin-bottom: 10px;
    }

    .dsc-auth-branding-title { font-size: 20px; }
    .dsc-auth-branding-subtitle { font-size: 12px; margin-bottom: 6px; }
    .dsc-auth-branding-line { display: none; }

    .dsc-auth-container {
        padding: 22px 20px 12px;
        border-radius: var(--dsc-radius-md) var(--dsc-radius-md) 0 0;
    }

    .dsc-auth-header { padding: 0 0 14px; margin-bottom: 18px; }
    .dsc-auth-title { font-size: 20px; }
    .dsc-auth-subtitle { font-size: 13px; }
    .dsc-form-input { padding: 12px 14px; font-size: 14px; }
    .dsc-btn { padding: 13px 20px; font-size: 14px; }

    /* Footer compacto */
    .dsc-auth-footer {
        padding: 10px 0 0;
        margin-top: 12px;
        font-size: 11px;
    }

    .dsc-otp-container { gap: 8px; margin: 24px 0; }
    .dsc-otp-input { width: 44px; height: 52px; font-size: 20px; border-radius: 10px; }

    .dsc-phone-input-group { flex-direction: column; gap: 8px; }

    .dsc-phone-number-input {
        border-top-left-radius: var(--dsc-radius-md) !important;
        border-bottom-left-radius: var(--dsc-radius-md) !important;
        margin-left: 0;
    }

    .dsc-country-dropdown-btn {
        border-radius: var(--dsc-radius-md);
        width: 100%;
    }

    .dsc-country-code-select { flex: none; width: 100%; }

    .dsc-form-section { margin: 18px 0 12px; padding: 14px 0 6px; }
    .dsc-form-section-title { font-size: 15px; }

    .dsc-form-select { padding: 12px 36px 12px 14px; font-size: 14px; }

    .dsc-auth-option-btn { padding: 14px 16px; }
    .dsc-auth-option-icon { width: 40px; height: 40px; border-radius: 12px; margin-right: 14px; }
    .dsc-auth-option-text h3 { font-size: 15px; }
    .dsc-auth-option-text p { font-size: 12px; }

    .dsc-auth-embedded-wrapper { padding: 10px; }
    .dsc-auth-embedded .dsc-auth-header { padding: 20px 16px 12px; }
    .dsc-auth-embedded .dsc-auth-body { padding: 0 16px 20px; }
}

/* ==========================================================================
   37. Responsive - Tiny (<360px)
   ========================================================================== */
@media (max-width: 360px) {
    .dsc-auth-branding {
        padding: 16px 14px 14px;
    }

    .dsc-auth-branding-logo {
        width: 96px;
        height: 96px;
        padding: 14px;
        margin-bottom: 8px;
    }

    .dsc-auth-branding-title { font-size: 17px; }
    .dsc-auth-branding-subtitle { font-size: 11px; margin-bottom: 4px; }

    .dsc-auth-container { padding: 18px 16px 10px; }
    .dsc-auth-title { font-size: 18px; }
    .dsc-form-input { padding: 11px 12px; font-size: 14px; }
    .dsc-btn { padding: 12px 18px; font-size: 14px; }

    .dsc-auth-footer {
        padding: 8px 0 0;
        margin-top: 8px;
        font-size: 10px;
    }

    .dsc-otp-container { gap: 6px; }
    .dsc-otp-input { width: 40px; height: 48px; font-size: 18px; border-radius: 8px; }

    .dsc-modal { width: 96%; }
    .dsc-modal-title { font-size: 18px; }
}

/* ==========================================================================
   38. Print
   ========================================================================== */
@media print {
    body.dsc-auth-page { background: white; }
    .dsc-auth-branding { display: none; }

    .dsc-auth-container {
        box-shadow: none;
        border: 1px solid #ccc;
        margin-left: 0;
    }

    .dsc-auth-container::before { display: none; }
    .dsc-btn, .dsc-auth-footer, .dsc-auth-back { display: none; }
}
