:root {
    --gsg-red: #FB071C;
    --gsg-red-light: #ff3d52;
    --gsg-red-dark: #d10516;
    --gsg-white: #ffffff;
    --gsg-gray-50: #fafafa;
    --gsg-gray-100: #f5f5f5;
    --gsg-gray-200: #e5e5e5;
    --gsg-gray-300: #d4d4d4;
    --gsg-gray-400: #a3a3a3;
    --gsg-gray-500: #737373;
    --gsg-gray-600: #525252;
    --gsg-gray-700: #404040;
    --gsg-gray-800: #262626;
    --gsg-gray-900: #171717;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gsg-white);
    color: var(--gsg-gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--gsg-white) 0%, var(--gsg-gray-50) 100%);
}

.auth-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--gsg-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 600px;
}

/* Left Panel - Login Form */
.auth-left-panel {
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.auth-logo-container {
    margin-bottom: 3rem;
}

.auth-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gsg-gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--gsg-gray-500);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.form-group-custom {
    margin-bottom: 1.5rem;
}

.form-label-custom {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gsg-gray-700);
    margin-bottom: 0.5rem;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-custom {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 0.95rem;
    color: var(--gsg-gray-900);
    background: var(--gsg-white);
    border: 1.5px solid var(--gsg-gray-200);
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    line-height: 1.5;
}

.form-input-custom:focus {
    border-color: var(--gsg-red);
    box-shadow: 0 0 0 3px rgba(251, 7, 28, 0.1);
}

.form-input-custom::placeholder {
    color: var(--gsg-gray-400);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gsg-gray-400);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.1rem;
    line-height: 1;
}

.form-input-custom:focus + .form-icon {
    color: var(--gsg-red);
}

.btn-submit-custom {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gsg-white);
    background: var(--gsg-red);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(251, 7, 28, 0.2);
}

.btn-submit-custom:hover:not(:disabled) {
    background: var(--gsg-red-dark);
    box-shadow: 0 6px 16px rgba(251, 7, 28, 0.3);
    transform: translateY(-1px);
}

.btn-submit-custom:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit-custom:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Progress Indicator */
#login-progress-container {
    display: none;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gsg-gray-50);
    border-radius: 16px;
    border: 1px solid var(--gsg-gray-200);
}

#login-progress-container.active {
    display: block;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0 1rem;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gsg-gray-200);
    z-index: 0;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gsg-red) 0%, var(--gsg-red-light) 100%);
    z-index: 1;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(251, 7, 28, 0.3);
}

.progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gsg-white);
    border: 2px solid var(--gsg-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gsg-gray-400);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-circle.active {
    background: var(--gsg-red);
    border-color: var(--gsg-red);
    color: var(--gsg-white);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(251, 7, 28, 0.3);
}

.step-circle.completed {
    background: #10b981;
    border-color: #10b981;
    color: var(--gsg-white);
}

.step-circle.completed::after {
    content: '✓';
    font-size: 1.2rem;
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gsg-gray-500);
    text-align: center;
    font-weight: 500;
    transition: color 0.3s;
    max-width: 100px;
}

.step-circle.active + .step-label,
.step-circle.completed + .step-label {
    color: var(--gsg-red);
    font-weight: 600;
}

.progress-message {
    text-align: center;
    padding: 1rem;
    background: var(--gsg-white);
    border-radius: 12px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-message-text {
    font-size: 0.875rem;
    color: var(--gsg-gray-600);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-message-text i {
    color: var(--gsg-red);
    font-size: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Links and Actions */
.auth-links {
    margin-top: 2rem;
    text-align: center;
}

.auth-link {
    color: var(--gsg-gray-600);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--gsg-red);
}

.auth-link-bold {
    font-weight: 600;
    color: var(--gsg-red);
}

.btn-whatsapp {
    background: #25D366;
    color: var(--gsg-white);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp svg {
    width: 20px;
    height: 20px;
}

.btn-complaints {
    color: var(--gsg-red);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: opacity 0.2s;
}

.btn-complaints:hover {
    opacity: 0.8;
}

.btn-complaints svg {
    width: 20px;
    height: 20px;
}

/* Right Panel - Visual */
.auth-right-panel {
    background: linear-gradient(135deg, var(--gsg-red) 0%, var(--gsg-red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

.auth-right-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.auth-visual-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--gsg-white);
}

.auth-visual-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.auth-visual-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.6;
}

/* Version Badge */
.version-badge {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: var(--gsg-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Form Processing State */
#formlogin.processing {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-custom {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .auth-right-panel {
        display: none;
    }

    .auth-left-panel {
        padding: 3rem 2.5rem;
    }
}

@media (max-width: 768px) {
    #auth {
        padding: 1rem;
    }

    .auth-left-panel {
        padding: 2.5rem 2rem;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .auth-subtitle {
        font-size: 0.875rem;
    }

    .progress-steps {
        padding: 0 0.5rem;
    }

    .step-label {
        font-size: 0.7rem;
        max-width: 80px;
    }
}

@media (max-width: 480px) {
    .auth-left-panel {
        padding: 2rem 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .form-input-custom {
        padding: 0.75rem 0.875rem 0.75rem 2.75rem;
        font-size: 0.875rem;
    }

    .form-icon {
        left: 0.875rem;
        font-size: 1rem;
    }

    .btn-submit-custom {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    .progress-steps {
        padding: 0;
    }

    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .step-label {
        font-size: 0.65rem;
        max-width: 70px;
    }
}

/* Loading State */
.btn-loader {
    display: none;
}

.btn-submit-custom.loading .btn-loader {
    display: inline-block;
}

.btn-submit-custom.loading .btn-text {
    opacity: 0.7;
}

