/* ============================================
   MODERN LOGIN PAGE - DUAL PANEL DESIGN
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    background: #f8f9fa;
}

/* ============================================
   WRAPPER - FULL SCREEN LAYOUT
   ============================================ */
.login-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* ============================================
   LEFT PANEL - PROMOTIONAL CONTENT
   ============================================ */
.left-panel {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Animated gradient background */
.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: floatBackground 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatBackground {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 15px) scale(1.05); }
}

.left-content {
    position: relative;
    z-index: 2;
    width: min(700px, calc(100% - 80px));
    color: white;
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo Section */
.logo-section {
    margin-bottom: 44px;
}

.brand-logo {
    width: 190px;
    height: auto;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.2));
}

/* Promo Content */
.promo-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 26px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)); }
}

.promo-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 35px;
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: featureSlideIn 0.6s ease-out forwards;
    opacity: 0;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes featureSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.feature-item svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #fff;
}

.feature-item span {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.98);
}

/* Mobile application download */
.mobile-app-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 136px;
    align-items: center;
    gap: 34px;
    margin-top: 0;
    padding: 30px 32px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 22px;
    box-shadow: 0 14px 36px rgba(31, 24, 74, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-app-copy {
    min-width: 0;
}

.mobile-app-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.mobile-app-copy h2 {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.2;
}

.mobile-app-copy p {
    max-width: 390px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    line-height: 1.55;
}

.store-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.store-badges a {
    display: inline-flex;
    border-radius: 7px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badges a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.store-badges a:focus-visible,
.app-qr-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
}

.store-badges img {
    display: block;
    width: 124px;
    height: auto;
}

.app-qr-link {
    width: 136px;
    justify-self: end;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.app-qr-frame {
    display: block;
    margin-bottom: 9px;
    padding: 8px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(31, 24, 74, 0.18);
}

.app-qr-frame img {
    display: block;
    width: 120px;
    height: 120px;
}

.mobile-store-links {
    display: none;
}

/* Decorative Circles - REMOVED */

/* ============================================
   RIGHT PANEL - LOGIN FORM
   ============================================ */
.right-panel {
    flex: 0 0 500px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
}

.right-content {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LOGIN BOX
   ============================================ */
.login-box {
    animation: boxSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes boxSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 15px;
    color: #6b7280;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.form-group label svg {
    color: #667eea;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.input-wrapper input:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.08);
    transform: translateY(-1px);
}

.input-wrapper input::placeholder {
    color: #9ca3af;
}

/* Password Toggle Button */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #6b7280;
    transition: all 0.2s;
    border-radius: 6px;
}

.toggle-password:hover {
    background: #f3f4f6;
    color: #667eea;
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

/* Form Footer */
.form-footer {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.forgot-password-link {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    transition: all 0.2s;
}

.forgot-password-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-login,
.btn-verify {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* Gradient shift on hover */
.btn-login::before,
.btn-verify::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before,
.btn-verify:hover::before {
    left: 100%;
}

.btn-login:hover,
.btn-verify:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.btn-login:active,
.btn-verify:active {
    transform: translateY(-1px);
}

.btn-login:disabled,
.btn-verify:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Back Button */
.btn-back {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: #f9fafb;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-back:hover {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
}

.btn-back:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   SPINNER
   ============================================ */
.spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}

.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ============================================
   SMS VERIFICATION
   ============================================ */
.sms-header,
.forgot-header {
    text-align: center;
    margin-bottom: 40px;
}

.sms-icon,
.forgot-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.sms-icon svg,
.forgot-icon svg {
    color: white;
    width: 32px;
    height: 32px;
}

.sms-header h2,
.forgot-header h2 {
    font-size: 24px;
    color: #111827;
    margin-bottom: 8px;
    font-weight: 700;
}

.sms-header p,
.forgot-header p {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.5;
}

/* SMS Code Inputs */
.sms-code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}

.sms-input {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #111827;
}

.sms-input:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.08);
    transform: scale(1.05);
}

.sms-input.filled {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

/* ============================================
   MESSAGES
   ============================================ */
.error-message {
    margin-top: 16px;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.error-message::before {
    content: "⚠️";
    font-size: 18px;
}

.success-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: successSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

@keyframes successSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.success-message::before {
    content: "✓";
    font-size: 18px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   FOOTER
   ============================================ */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.login-footer p {
    font-size: 13px;
    color: #9ca3af;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1100px) {
    .left-panel {
        display: none;
    }
    
    .right-panel {
        flex: 1;
    }

    .mobile-store-links {
        display: block;
        margin-top: 28px;
        padding-top: 20px;
        border-top: 1px solid #e5e7eb;
        text-align: center;
    }

    .mobile-store-links p {
        margin-bottom: 12px;
        color: #6b7280;
        font-size: 13px;
        font-weight: 600;
    }

    .mobile-store-links .store-badges {
        justify-content: center;
    }

    .mobile-store-links .store-badges img {
        filter: invert(1);
    }

    .mobile-store-links .store-badges a:focus-visible {
        outline-color: #667eea;
    }
}

@media (max-width: 600px) {
    .right-panel {
        padding: 24px 20px;
    }
    
    .right-content {
        max-width: 100%;
    }
    
    .login-header h2 {
        font-size: 28px;
    }
    
    .sms-input {
        width: 48px;
        height: 56px;
        font-size: 20px;
    }
    
    .sms-code-inputs {
        gap: 8px;
    }

    .mobile-store-links .store-badges img {
        width: min(132px, 36vw);
    }
}

@media (max-height: 820px) and (min-width: 1101px) {
    .left-content {
        width: min(660px, calc(100% - 56px));
    }

    .logo-section {
        margin-bottom: 24px;
    }

    .promo-title {
        margin-bottom: 12px;
    }

    .promo-subtitle {
        margin-bottom: 20px;
    }

    .feature-list {
        gap: 10px;
    }

    .feature-item {
        padding: 10px 14px;
    }

    .mobile-app-card {
        gap: 26px;
        padding: 22px 24px;
    }
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */
#loginBox,
#smsBox,
#forgotPasswordBox {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
