/* ===== CSS Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #e8ecf1;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    color: #333;
    overflow-x: hidden;
}

a {
    color: #1a6fb5;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0d4f85;
    text-decoration: underline;
}

/* ===== Page Wrapper ===== */
.page-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ===== Left Panel (Banner) ===== */
.left-panel {
    width: 38%;
    background: linear-gradient(165deg, #e6f0f8 0%, #d4e4f1 40%, #c8dae9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.banner-full-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    max-height: 100vh;
}

.badge-link {
    text-decoration: none;
}

.badge-link:hover {
    text-decoration: none;
}

.store-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a1a;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 160px;
}

.store-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.store-badge i {
    font-size: 24px;
    color: #fff;
}

.badge-text {
    display: flex;
    flex-direction: column;
}

.badge-small {
    font-size: 10px;
    opacity: 0.85;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-big {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

/* ===== Right Panel (Login) ===== */
.right-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 40px 20px;
    position: relative;
    overflow-y: auto;
}

/* Language Toggle */
.lang-toggle {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    border: 2px solid #2979c1;
    border-radius: 20px;
    overflow: hidden;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #2979c1;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.lang-btn.active {
    background: #2979c1;
    color: #fff;
}

.lang-btn:hover:not(.active) {
    background: rgba(41, 121, 193, 0.1);
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 15px;
}

.logo-image {
    max-width: 180px;
    height: auto;
}

/* ===== Main Content ===== */
.main-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 680px;
    margin-top: 5px;
}

/* Login Form Section */
.login-form-section {
    flex: 1;
    min-width: 0;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a6fb5;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 14px;
}

.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #252627;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #252627;
    background: #fff;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.form-input::placeholder {
    color: #aaa;
}

.form-input:focus {
    border-color: #2979c1;
    box-shadow: 0 0 0 3px rgba(41, 121, 193, 0.12);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 16px;
    padding: 4px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #555;
}

.forgot-links {
    text-align: right;
    font-size: 13px;
    color: #666;
    margin-bottom: 18px;
}

.forgot-links a {
    font-weight: 500;
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #2979c1 0%, #1a6fb5 50%, #1565a8 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover {
    background: linear-gradient(135deg, #1a6fb5 0%, #1565a8 50%, #0d5a9e 100%);
    box-shadow: 0 4px 15px rgba(41, 121, 193, 0.35);
    transform: translateY(-1px);
}

.login-btn:hover::after {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(41, 121, 193, 0.25);
}

/* OR Separator */
.or-separator {
    display: flex;
    align-items: center;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    padding: 0 15px;
    margin-top: 40px;
}

/* QR Code Section */
.qr-section {
    flex-shrink: 0;
    text-align: center;
}

.qr-card {
    border: 1.5px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    background: #fafbfc;
    width: 180px;
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 20px;
    width: 100%;
}

.qr-reload-icon {
    font-size: 28px;
    color: #888;
    margin-bottom: 10px;
}

.qr-load-text {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.qr-loaded {
    text-align: center;
}

.qr-image {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin-bottom: 6px;
    border-radius: 4px;
}

.qr-timer {
    font-size: 13px;
    color: #555;
    margin-bottom: 0;
}

.timer-value {
    color: #c8102e;
    font-weight: 700;
    font-size: 14px;
}

.qr-instruction {
    font-size: 11px;
    color: #888;
    line-height: 1.5;
    margin-top: 8px;
}

/* Create Account */
.create-account {
    margin-top: 18px;
    font-size: 14px;
    color: #555;
    text-align: center;
}

.create-account a {
    font-weight: 600;
    color: #1a6fb5;
}

/* Email Support */
.email-support {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 14px;
    color: #333;
}

.email-icon {
    font-size: 18px;
    color: #3aaf85;
    background: #e6f7f1;
    padding: 8px;
    border-radius: 50%;
}

.email-support strong {
    font-weight: 700;
}

/* Footer Section */
.footer-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
}

.nps-logo-image {
    max-width: 160px;
    height: auto;
    margin-bottom: 6px;
}

.version-text {
    font-size: 11px;
    color: #aaa;
    margin-top: 6px;
}

.copyright-text {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.right-panel {
    animation: fadeIn 0.6s ease-out;
}

.login-form-section {
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

.qr-section {
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

/* ===== Responsive Design ===== */
@media (max-width: 1100px) {
    .main-content {
        flex-direction: column;
        align-items: center;
    }

    .or-separator {
        margin-top: 15px;
        padding: 0;
    }

    .qr-card {
        width: 100%;
        max-width: 280px;
    }
}

/* Mobile QR section - hidden by default (desktop) */
.mobile-qr-section {
    display: none;
}

@media (max-width: 768px) {
    body {
        background: #f5f7fa;
        position: relative;
    }

    body::after {
        content: '';
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 100px;
        background: linear-gradient(to top, #e0eaf5, transparent);
        pointer-events: none;
        z-index: 0;
    }

    .page-wrapper {
        flex-direction: column;
    }

    .left-panel {
        display: none;
    }

    .or-separator,
    .qr-section {
        display: none !important;
    }

    .right-panel {
        padding: 30px 22px 24px;
        width: 100%;
        max-width: 380px;
        margin: 0 auto;
        align-items: stretch;
        position: relative;
        z-index: 1;
    }

    .lang-toggle {
        top: 8px;
        right: 8px;
    }

    .lang-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .logo-section {
        margin-top: 5px;
        margin-bottom: 10px;
    }

    .logo-image {
        max-width: 130px;
    }

    .main-content {
        flex-direction: column;
        max-width: 100%;
        gap: 0;
        margin-top: 0;
    }

    .login-title {
        display: none;
    }

    .login-subtitle {
        font-size: 13px;
        color: #555;
        margin-bottom: 18px;
        text-align: center;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .form-label {
        font-size: 12px;
        font-weight: 600;
        color: #252627;
        margin-bottom: 4px;
    }

    .form-input {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 4px;
    }

    .forgot-links {
        font-size: 12px;
        margin-bottom: 14px;
    }

    .login-btn {
        padding: 11px;
        font-size: 14px;
        border-radius: 20px;
    }

    /* Show mobile QR section */
    .mobile-qr-section {
        display: block;
        margin-top: 14px;
    }

    .mobile-or {
        text-align: center;
        font-size: 13px;
        color: #999;
        font-weight: 600;
        margin-bottom: 12px;
    }

    .mobile-qr-btn {
        width: 100%;
        padding: 11px;
        border: 1.5px solid #ccc;
        border-radius: 20px;
        background: #fff;
        color: #333;
        font-size: 14px;
        font-weight: 600;
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s;
    }

    .mobile-qr-btn:hover {
        background: #f5f5f5;
        border-color: #aaa;
    }

    .mobile-qr-btn i {
        font-size: 16px;
        color: #555;
    }

    .create-account {
        margin-top: 18px;
        font-size: 13px;
    }

    .email-support {
        margin-top: 14px;
        font-size: 13px;
        justify-content: center;
    }

    .email-icon {
        display: none;
    }

    .footer-section {
        margin-top: 20px;
    }

    .nps-logo-image {
        max-width: 80px;
    }

    .version-text {
        font-size: 11px;
        color: #c8102e;
    }

    .copyright-text {
        font-size: 10px;
        color: #1a6fb5;
    }
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.loading-overlay.active {
    display: flex;
    opacity: 1;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.loading-logo {
    width: 120px;
    margin-bottom: 30px;
    animation: loadingPulse 2s ease infinite;
}

@keyframes loadingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.loading-spinner {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.spinner-ring {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e7ef;
    border-top: 4px solid #2979c1;
    border-right: 4px solid #c8102e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    animation: fadeInOut 2.5s ease infinite;
}

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

.loading-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #2979c1;
    border-radius: 50%;
    animation: dotBounce 1.4s ease infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== OTP STANDALONE PAGE ===== */
.otp-body {
    background: #f0f2f5 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    min-height: 100vh;
    padding: 30px 16px;
}

.otp-page {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease;
}

.otp-container {
    width: 100%;
}

.otp-logo {
    text-align: center;
    margin-bottom: 24px;
    margin-top: 0;
}

.otp-logo .otp-logo-image,
.otp-logo img {
    width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    display: inline-block;
}

.otp-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e8ecf0;
}

.otp-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.otp-shield-icon {
    font-size: 22px;
    color: #2979c1;
    margin-top: 2px;
    flex-shrink: 0;
}

.otp-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.otp-card-subtitle {
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}

.otp-form-section {
    text-align: center;
}

.otp-sent-text {
    font-size: 13px;
    color: #555;
    margin-bottom: 16px;
    text-align: left;
}

.otp-input-group {
    margin-bottom: 10px;
}

.otp-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d0d5dd;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: #333;
    outline: none;
    text-align: left;
    letter-spacing: 2px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.otp-input:focus {
    border-color: #2979c1;
    box-shadow: 0 0 0 3px rgba(41, 121, 193, 0.12);
}

.otp-resend-text {
    font-size: 12px;
    color: #888;
    margin-bottom: 14px;
    text-align: right;
}

.otp-resend-timer {
    color: #c8102e;
    font-weight: 700;
}

.otp-alt-link {
    display: block;
    font-size: 13px;
    color: #1a6fb5;
    text-decoration: underline;
    margin-bottom: 20px;
    text-align: left;
}

.otp-alt-link:hover {
    color: #0d4f85;
}

.otp-actions {
    display: flex;
    gap: 12px;
}

.otp-btn {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
}

.otp-btn-cancel {
    background: #fff;
    color: #333;
    border-color: #d0d5dd;
}

.otp-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.otp-btn-continue {
    background: linear-gradient(135deg, #2979c1 0%, #1565a8 100%);
    color: #fff;
    border-color: #2979c1;
}

.otp-btn-continue:hover {
    background: linear-gradient(135deg, #1a6fb5 0%, #0d5a9e 100%);
    box-shadow: 0 4px 14px rgba(41, 121, 193, 0.3);
}

.otp-footer {
    margin-top: 24px;
    text-align: center;
}

.otp-footer .email-support {
    justify-content: center;
    margin-bottom: 16px;
}

.otp-footer .footer-section {
    margin-top: 12px;
}

/* OTP Success */
.otp-success {
    text-align: center;
    padding: 30px 10px;
    animation: fadeInUp 0.5s ease;
}

.otp-success-icon {
    font-size: 56px;
    color: #34d399;
    margin-bottom: 16px;
    animation: successPop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.otp-success h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.otp-success p {
    font-size: 14px;
    color: #666;
}
