* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 10px;
}

:root {
    --primary-orange: #ff6b35;
    --secondary-orange: #ff8c42;
    --dark-orange: #e55a2b;
    --light-orange: #fff3f0;
    --accent-orange: #ff9500;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-900: #0f172a;
    --purple-500: #8b5cf6;
    --purple-light: #f3f4f6;
    --success-green: #10b981;
    --success-light: #d1fae5;
}

/* Elementos decorativos de fondo */
.bg-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

    .bg-decoration:nth-child(1) {
        top: 10%;
        left: 10%;
        animation-delay: 0s;
    }

    .bg-decoration:nth-child(2) {
        top: 20%;
        right: 10%;
        animation-delay: 2s;
    }

    .bg-decoration:nth-child(3) {
        bottom: 10%;
        left: 20%;
        animation-delay: 4s;
    }

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Patrón de fondo */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: sparkle 20s linear infinite;
}

@keyframes sparkle {
    0% {
        transform: translateX(0) translateY(0);
    }

    100% {
        transform: translateX(-100px) translateY(-100px);
    }
}

/* Contenedor principal  */
.login-container {
    display: flex;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    min-height: 500px;
    z-index: 10;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel izquierdo - Branding */
.branding-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-width: 280px;
}

    .branding-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
        animation: sparkle 20s linear infinite;
    }

.logo-container {
    margin-bottom: 1.5rem;
    z-index: 2;
    position: relative;    
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-tagline {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.features-list {
    list-style: none;
    text-align: left;
    z-index: 2;
    position: relative;
}

    .features-list li {
        margin-bottom: 0.8rem;
        display: flex;
        align-items: center;
        font-size: 0.85rem;
        font-weight: 500;
    }

    .features-list i {
        margin-right: 0.8rem;
        width: 20px;
        color: rgba(255, 255, 255, 0.9);
    }

/* Panel derecho - Login */
.login-panel {
    flex: 1;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    background: var(--white);
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Notificación de actualizaciones */
.update-notification {
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: white;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

    .update-notification:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(255, 107, 53, 0.4);
    }

    .update-notification::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        animation: shine 3s ease-in-out infinite;
    }

@keyframes shine {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.update-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.update-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
    backdrop-filter: blur(10px);
}

.update-title {
    font-weight: 700;
    font-size: 0.85rem;
}

.update-content {
    font-size: 0.8rem;
    opacity: 0.95;
    line-height: 1.4;
    font-weight: 400;
}

/* Formulario */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.2rem;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    font-size: 0.85rem;
}

.form-input {
    width: 100%;
    padding: 0.9rem 0.9rem 0.9rem 2.8rem;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--gray-50);
    font-weight: 500;
    color: var(--gray-900);
}

    .form-input:focus {
        outline: none;
        border-color: var(--primary-orange);
        background: white;
        box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    }


.password-toggle {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 1.0rem;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0.25rem;
    z-index: 2;
    transition: color 0.3s ease;
}

    .password-toggle:hover {
        color: var(--primary-orange);
    }

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    font-weight: 500;
}

    .remember-me input {
        margin-right: 0.5rem;
        accent-color: var(--primary-orange);
    }

.forgot-password {
    color: var(--primary-orange);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 600;
}

    .forgot-password:hover {
        color: var(--dark-orange);
        text-decoration: underline;
    }

.login-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.4);
}

    .login-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }

    .login-button:hover::before {
        left: 100%;
    }

    .login-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(255, 107, 53, 0.5);
    }

    .login-button:active {
        transform: translateY(0);
    }

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    color: var(--gray-600);
    font-size: 0.8rem;
}

.version-info {
    margin-top: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.version-badge {
    background: var(--light-orange);
    color: var(--primary-orange);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

/* Estado de carga */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

    .loading .login-button {
        background: var(--gray-600);
    }

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.logout-devices-option {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    background: var(--light-orange);
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .logout-devices-option:hover {
        border-color: var(--primary-orange);
        background: rgba(255, 107, 53, 0.08);
        transform: translateY(-1px);
    }

.logout-checkbox {
    margin-right: 0.8rem;
    accent-color: var(--primary-orange);
    transform: scale(1.2);
    cursor: pointer;
}

.logout-label {
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin: 0;
    user-select: none;
}

    .logout-label i {
        margin-right: 0.5rem;
        font-size: 0.9rem;
    }

.logout-devices-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,107,53,0.1), transparent);
    transition: left 0.5s;
}

.logout-devices-option:hover::before {
    left: 100%;
}

/* Contenedor principal */
.selection-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    z-index: 10;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del contenedor */
.selection-header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .selection-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
        animation: sparkle 20s linear infinite;
    }

@keyframes sparkle {
    0% {
        transform: translateX(0) translateY(0);
    }

    100% {
        transform: translateX(-100px) translateY(-100px);
    }
}

.header-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.selection-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.selection-subtitle {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

/* Contenido principal */
.selection-content {
    padding: 2.5rem 2rem;
}

/* Botones de modalidad */
.modality-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.modality-option {
    display: block;
    text-decoration: none;
    background: var(--gray-50);
    border: 2px solid var(--gray-100);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

    .modality-option:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
        text-decoration: none;
    }

    .modality-option.administracion {
        border-color: #dc3545;
        color: #dc3545;
    }

        .modality-option.administracion:hover {
            background: linear-gradient(135deg, #dc3545, #c82333);
            color: white;
            border-color: #dc3545;
            box-shadow: 0 15px 35px rgba(220, 53, 69, 0.4);
        }

    .modality-option.punto-venta {
        border-color: #007bff;
        color: #007bff;
    }

        .modality-option.punto-venta:hover {
            background: linear-gradient(135deg, #007bff, #0056b3);
            color: white;
            border-color: #007bff;
            box-shadow: 0 15px 35px rgba(0, 123, 255, 0.4);
        }

    .modality-option.restaurante {
        border-color: #28a745;
        color: #28a745;
    }

        .modality-option.restaurante:hover {
            background: linear-gradient(135deg, #28a745, #1e7e34);
            color: white;
            border-color: #28a745;
            box-shadow: 0 15px 35px rgba(40, 167, 69, 0.4);
        }

.modality-content {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.modality-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.modality-option:hover .modality-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modality-info {
    flex: 1;
}

.modality-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

.modality-description {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.modality-option:hover .modality-description {
    opacity: 1;
}

.modality-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.modality-option:hover .modality-arrow {
    transform: translateX(5px);
}

/* Formulario */
.selection-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--gray-900);
    font-size: 0.95rem;
}

.form-select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-100);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--gray-50);
    font-weight: 500;
    color: var(--gray-900);
    appearance: none;
    cursor: pointer;
    position: relative;
}

    .form-select:focus {
        outline: none;
        border-color: var(--primary-orange);
        background: white;
        box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    }

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
    font-size: 1rem;
    margin-top: 1.0rem;
    pointer-events: none;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0.7rem;
    color: var(--gray-600);
    font-size: 0.8rem;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.form-select:focus + .form-icon + .select-arrow {
    margin-top: 0.7rem;
}

/* Botón de selección */
.select-button {
    width: 100%;
    background: linear-gradient(135deg, var(--purple-500), #7c3aed);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

    .select-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }

    .select-button:hover::before {
        left: 100%;
    }

    .select-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(139, 92, 246, 0.5);
    }

    .select-button:active {
        transform: translateY(0);
    }

    .select-button:disabled {
        background: var(--gray-300);
        color: var(--gray-600);
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

        .select-button:disabled:hover {
            transform: none;
            box-shadow: none;
        }

/* Información adicional */
.info-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--purple-500);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.1rem;
}

.info-content {
    flex: 1;
}

.info-title {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.info-text {
    color: var(--gray-600);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Footer */
.selection-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
    color: var(--gray-600);
    font-size: 0.85rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

    .back-link:hover {
        color: var(--dark-orange);
        background: var(--light-orange);
        text-decoration: none;
        transform: translateX(-3px);
    }

    .back-link i {
        margin-right: 0.5rem;
    }

/* Tablets y pantallas medianas (768px - 1200px) */
@media (max-width: 1200px) {
    .login-container {
        max-width: 800px;
        min-height: 480px;
    }

    .branding-panel {
        padding: 1.8rem 1.2rem;
        min-width: 250px;
    }

    .logo-icon {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }

    .logo-text {
        font-size: 1.8rem;
    }

    .features-list li {
        font-size: 0.8rem;
        margin-bottom: 0.7rem;
    }

    .login-panel {
        padding: 1.8rem 1.2rem;
    }

    .login-title {
        font-size: 1.6rem;
    }
}

/* Pantallas HD y similares (hasta 1024px) */
@media (max-width: 1024px) {
    body {
        padding: 15px;
    }

    .login-container {
        max-width: 700px;
        min-height: 450px;
    }

    .branding-panel {
        padding: 1.5rem 1rem;
        min-width: 220px;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }

    .logo-text {
        font-size: 1.6rem;
    }

    .logo-tagline {
        font-size: 0.85rem;
    }

    .features-list {
        display: none; /* Ocultar en pantallas más pequeñas */
    }

    .login-panel {
        padding: 1.5rem 1rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .update-notification {
        padding: 0.8rem 1rem;
        margin-bottom: 1.2rem;
    }

    .update-title {
        font-size: 0.8rem;
    }

    .update-content {
        font-size: 0.75rem;
    }
}

/* Tablets en orientación vertical (hasta 900px) */
@media (max-width: 900px) {
    .login-container {
        max-width: 600px;
        min-height: 400px;
    }

    .branding-panel {
        min-width: 200px;
        padding: 1.2rem 0.8rem;
    }

    .logo-container {
        margin-bottom: 1rem;
    }

    .features-list {
        display: none;
    }
}

/* Móviles - Diseño vertical */
@media (max-width: 768px) {
    .logo-desktop { display: none !important; }
    .logo-mobile  { display: block !important; }

    .logo-tagline {
        color: var(--primary-orange);
        text-shadow: none;
        opacity: 1;
    }
    body {
        /* background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); */
        padding: 1rem;
        min-height: 100vh;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }

        body::before {
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(100,116,139,0.1)"/></svg>') repeat;
            animation: sparkle 20s linear infinite;
            z-index: 1;
        }

    .bg-decoration {
        width: 120px;
        height: 120px;
        background: rgba(100, 116, 139, 0.08);
        z-index: 1;
    }

    .login-container {
        flex-direction: column;
        margin: 0;
        min-height: auto;
        max-width: 400px;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        background: white;
        border: 1px solid var(--gray-100);
        position: relative;
        z-index: 10;
    }

    .branding-panel {
        padding: 1.5rem 1rem 0.8rem;
        min-height: auto;
        flex: none;
        background: transparent;
        border-radius: 0;
        text-align: center;
        min-width: auto;
    }

        .branding-panel::before {
            display: none;
        }

    .logo-container {
        margin-bottom: 0;
    }

    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
        margin: 0 auto 0.5rem;
        background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
        color: white;
        border: none;
    }

    .logo-text {
        font-size: 1.4rem;
        margin-bottom: 0.2rem;
        color: var(--gray-900);
        text-shadow: none;
    }

    .logo-tagline {
        font-size: 0.8rem;
        margin-bottom: 0;
        color: var(--gray-600);
        text-shadow: none;
    }

    .features-list {
        display: none;
    }

    .login-panel {
        flex: 1;
        background: white;
        padding: 0.8rem 1rem 1.5rem;
        margin: 0;
        border-radius: 0;
        min-height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        box-shadow: none;
    }

    .login-header {
        margin-bottom: 1.2rem;
        text-align: center;
    }

    .login-title {
        font-size: 1.4rem;
        color: var(--gray-900);
    }

    .login-subtitle {
        font-size: 0.85rem;
        color: var(--gray-600);
    }

    .update-notification {
        display: none;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.4rem;
    }

    .form-input {
        padding: 0.9rem 0.8rem 0.9rem 2.6rem;
        font-size: 16px; /* Evita zoom en iOS */
        border-radius: 10px;
        min-height: 44px;
        border: 2px solid var(--gray-300);
        background: var(--gray-50);
    }

    .form-icon {
        left: 0.8rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }

    .password-toggle {
        right: 0.8rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }

    .login-options {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.2rem;
        font-size: 0.8rem;
    }

    .login-button {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px;
        border-radius: 10px;
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .login-footer {
        margin-top: 0;
        padding-top: 0.8rem;
        font-size: 0.7rem;
        text-align: center;
        border-top: 1px solid var(--gray-100);
    }

    .version-info {
        gap: 0.3rem;
        justify-content: center;
        margin-top: 0.4rem;
    }

    .version-badge {
        padding: 0.15rem 0.4rem;
        font-size: 0.65rem;
    }

    .logout-devices-option {
        padding: 0.7rem;
        font-size: 0.8rem;
    }

    .logout-label {
        font-size: 0.8rem;
    }

    .logout-checkbox {
        transform: scale(1.1);
    }

    .selection-container {
        max-width: 100%;
        border-radius: 16px;
    }

    .selection-header {
        padding: 1.5rem 1rem;
    }

    .header-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .selection-title {
        font-size: 1.5rem;
    }

    .selection-subtitle {
        font-size: 0.9rem;
    }

    .selection-content {
        padding: 2rem 1.5rem;
    }

    .modality-option {
        padding: 1.2rem;
    }

    .modality-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .modality-name {
        font-size: 1.1rem;
    }

    .modality-description {
        font-size: 0.85rem;
    }

    .form-select {
        padding: 0.9rem 0.9rem 0.9rem 2.8rem;
    }

    .form-icon {
        left: 0.9rem;
    }

    .select-arrow {
        right: 0.9rem;
    }

    .info-card {
        padding: 0.8rem;
    }

    .info-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .login-container {
        max-width: 100%;
        border-radius: 12px;
    }

    .branding-panel {
        padding: 1.2rem 0.8rem 0.5rem;
    }

    .login-panel {
        padding: 0.6rem 0.8rem 1.2rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .login-title {
        font-size: 1.2rem;
    }

    .login-header {
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 0.8rem;
    }

    .form-input {
        padding: 0.8rem 0.7rem 0.8rem 2.4rem;
        min-height: 42px;
    }

    .form-icon {
        left: 0.7rem;
        margin-top: 0.7rem;
    }

    .password-toggle {
        right: 0.7rem;
        margin-top: 0.7rem;
    }

    .login-options {
        margin-bottom: 1rem;
        font-size: 0.75rem;
    }

    .login-button {
        min-height: 42px;
        margin-bottom: 0.8rem;
        font-size: 0.9rem;
    }

    .selection-header {
        padding: 1.2rem 0.8rem;
    }

    .selection-content {
        padding: 1.5rem 1rem;
    }

    .modality-content {
        flex-direction: column;
        text-align: center;
    }

    .modality-icon {
        margin-right: 0;
        margin-bottom: 0.8rem;
    }

    .modality-arrow {
        display: none;
    }

    .form-select {
        padding: 0.8rem 0.8rem 0.8rem 2.6rem;
        font-size: 16px; /* Evita zoom en iOS */
    }

    .form-icon {
        left: 0.8rem;
    }

    .select-arrow {
        right: 0.8rem;
    }

    .select-button {
        padding: 0.9rem 1.5rem;
        min-height: 48px;
    }
}

/* Animaciones de entrada */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================= */
/* ESTILOS PARA LOS BANDERINES TRIANGULARES CHILENOS */
/* ========================================= */

/* Container de banderines - solo visible cuando body tiene la clase 'show-banderines' */
.banderines-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

/* Mostrar banderines cuando el body tiene la clase */
body.show-banderines .banderines-container {
    opacity: 1;
    visibility: visible;
}

/* Hilo principal de la guirnalda - ESTÁTICO, SIN ANIMACIÓN */
.banderines-string {
    position: absolute;
    top: 25px;
    left: -50px;
    width: calc(100% + 100px);
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, #654321 10%, #654321 90%, transparent 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    /* SIN ANIMACIÓN - la cuerda permanece fija */
}

/* Banderines triangulares individuales - SOLO ELLOS SE MUEVEN */
.banderines-flag {
    position: absolute;
    top: 29px; /* Justo debajo de la cuerda */
    width: 55px;
    height: 80px;
    transform-origin: top center;
    animation: triangularFlagWave 4s ease-in-out infinite;
    z-index: 1000;
}

    /* Posiciones distribuidas uniformemente con delays únicos */
    .banderines-flag:nth-child(2) {
        left: 6%;
        animation-delay: 0s;
    }

    .banderines-flag:nth-child(3) {
        left: 14%;
        animation-delay: -0.6s;
    }

    .banderines-flag:nth-child(4) {
        left: 22%;
        animation-delay: -1.2s;
    }

    .banderines-flag:nth-child(5) {
        left: 30%;
        animation-delay: -0.3s;
    }

    .banderines-flag:nth-child(6) {
        left: 38%;
        animation-delay: -0.9s;
    }

    .banderines-flag:nth-child(7) {
        left: 46%;
        animation-delay: -1.5s;
    }

    .banderines-flag:nth-child(8) {
        left: 54%;
        animation-delay: -0.2s;
    }

    .banderines-flag:nth-child(9) {
        left: 62%;
        animation-delay: -0.8s;
    }

    .banderines-flag:nth-child(10) {
        left: 70%;
        animation-delay: -1.1s;
    }

    .banderines-flag:nth-child(11) {
        left: 78%;
        animation-delay: -0.5s;
    }

    .banderines-flag:nth-child(12) {
        left: 86%;
        animation-delay: -1.4s;
    }

/* Animación realista para banderines triangulares ondeando al viento */
@keyframes triangularFlagWave {
    0%, 100% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateZ(0px);
    }

    15% {
        transform: rotateX(-5deg) rotateY(12deg) rotateZ(2deg) translateZ(3px);
    }

    30% {
        transform: rotateX(3deg) rotateY(-8deg) rotateZ(-1deg) translateZ(-2px);
    }

    45% {
        transform: rotateX(-2deg) rotateY(15deg) rotateZ(3deg) translateZ(4px);
    }

    60% {
        transform: rotateX(4deg) rotateY(-6deg) rotateZ(-0.5deg) translateZ(-1px);
    }

    75% {
        transform: rotateX(-3deg) rotateY(10deg) rotateZ(1.5deg) translateZ(2px);
    }

    90% {
        transform: rotateX(1deg) rotateY(-4deg) rotateZ(-1.5deg) translateZ(-1px);
    }
}

/* Diseño de la bandera chilena en forma triangular */
.chile-triangle-flag {
    width: 100%;
    height: 100%;
    position: relative;
    /* Clip path para crear forma triangular de banderín */
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 55%, 0 80%);
    transform-style: preserve-3d;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

    /* Fondo base con las franjas blanca (arriba) y roja (abajo) */
    .chile-triangle-flag::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, white 0%, white 35%, #D52B1E 35%, #D52B1E 100% );
        clip-path: inherit;
        z-index: 1;
    }

/* Cuadrado azul superior izquierdo (donde va la estrella) */
.chile-blue-square {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 35%;
    background: #0039A6;
    z-index: 2;
}

/* Estrella blanca en el cuadrado azul */
.chile-star {
    position: absolute;
    top: 8px;
    left: 9px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    z-index: 3;
}

/* Pequeño conector que une cada banderín a la cuerda */
.banderines-flag::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: #654321;
    border-radius: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 1002;
}

/* Botón de toggle para desarrolladores */
.banderines-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1003;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    font-size: 1.4rem;
}

    .banderines-toggle:hover {
        background: #e55a2b;
        transform: scale(1.1);
    }

/* Responsive para banderines triangulares */
@media (max-width: 768px) {
    .banderines-container {
        height: 90px;
    }

    .banderines-string {
        top: 18px;
        height: 3px;
    }

    .banderines-flag {
        top: 21px;
        width: 42px;
        height: 65px;
    }

    .chile-star {
        font-size: 12px;
        top: 9px;
        left: 11px;
    }

    .banderines-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .banderines-container {
        height: 75px;
    }

    .banderines-flag {
        width: 35px;
        height: 55px;
    }

    .chile-star {
        font-size: 10px;
        top: 7px;
        left: 9px;
    }

    .banderines-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    /* Mostrar solo banderines impares (1, 3, 5, 7, 9, 11) */
    .banderines-flag:nth-child(3), /* 2do banderín */
    .banderines-flag:nth-child(5), /* 4to banderín */
    .banderines-flag:nth-child(7), /* 6to banderín */
    .banderines-flag:nth-child(9), /* 8vo banderín */
    .banderines-flag:nth-child(11) { /* 10mo banderín */
        display: none;
    }
}

@media (max-width: 480px) {
    /* En móviles muy pequeños, mostrar aún menos */
    .banderines-flag:nth-child(3), /* 2do banderín */
    .banderines-flag:nth-child(5), /* 4to banderín */
    .banderines-flag:nth-child(7), /* 6to banderín */
    .banderines-flag:nth-child(9), /* 8vo banderín */
    .banderines-flag:nth-child(11) { /* 10mo banderín */
        display: none;
    }
}



@media (min-width: 1280px) and (max-width: 1366px) {
    .login-container {
        min-height: 520px;
    }

    .login-header {
        margin-bottom: 1.2rem;
    }

    .branding-panel {
        padding: 2rem 1.4rem;
        min-width: 300px;
    }

    .login-panel {
        padding: 2rem 1.6rem;
    }

    .form-input {
        padding: 0.9rem 0.9rem 0.9rem 2rem;
    }

    .login-button {
        padding: 0.8rem 1.5rem;
    }
}


@media (min-width: 1200px) and (max-height: 800px) {
    .login-container {
        min-height: 480px;
    }

    .branding-panel {
        padding: 1.3rem 1.1rem;
    }

    .login-panel {
        padding: 1.3rem 1.1rem;
    }

    .logo-container {
        margin-bottom: 1.2rem;
    }

    .update-notification {
        margin-bottom: 0.9rem;
    }

    .form-group {
        margin-bottom: 0.9rem;
        position: relative;
    }
}
