/* =============================================
   LOGIN PAGE — Modern Red Theme
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

html, body {
    height: 100%;
    font-family: 'Inter', 'Roboto', sans-serif;
}

/* ── Animated Background ── */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #1a0505, #2d0a0a, #3d1010);
    overflow: hidden;
}

.login-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220,38,38,0.35) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    animation: floatOrb 8s ease-in-out infinite alternate;
}

.login-bg::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(153,27,27,0.3) 0%, transparent 70%);
    bottom: -120px;
    left: -80px;
    animation: floatOrb 10s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}

/* ── Page Layout ── */
.login-page-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── Card ── */
.login-card {
    display: flex;
    width: 940px;
    max-width: 100%;
    min-height: 560px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 32px 64px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.07);
    backdrop-filter: blur(2px);
}

/* ── Left Panel (Form) ── */
.login-left {
    flex: 0 0 400px;
    max-width: 400px;
    background: rgba(255,255,255,0.97);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 44px 24px;
}

.login-left-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.login-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(220,38,38,0.4);
}

.login-brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a0505;
    letter-spacing: -0.3px;
}

.login-brand-tagline {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
    letter-spacing: 0.3px;
    margin-top: 1px;
}

.login-heading {
    font-size: 26px;
    font-weight: 700;
    color: #1a0505;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.login-subheading {
    font-size: 13.5px;
    color: #6b7280;
    margin-bottom: 30px;
}

/* ── Form Fields ── */
.login-form .form-group {
    position: relative;
    margin-bottom: 18px;
}

.field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s;
}

.login-form .form-control {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 42px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1a0505;
    background: #f9fafb;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    outline: none;
}

.login-form .form-control::placeholder {
    color: #b0b7c3;
}

.login-form .form-control:focus {
    border-color: #ef4444;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

.login-form .form-control:focus + .field-icon,
.login-form .form-group:focus-within .field-icon {
    color: #ef4444;
}

/* ── Sign In Button ── */
.login-form .btn-signin {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 18px rgba(220,38,38,0.45);
    margin-top: 8px;
}

.login-form .btn-signin:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(220,38,38,0.5);
}

.login-form .btn-signin:active {
    transform: translateY(0);
}

/* ── Error message ── */
.login-error {
    min-height: 20px;
    font-size: 12.5px;
    color: #dc2626;
    margin-top: 10px;
    text-align: center;
}

/* ── Support line ── */
.login-support {
    margin-top: 20px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

.login-support strong {
    color: #6b7280;
}

.login-social {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.login-social a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #ef4444;
    text-decoration: none;
    transition: color 0.2s;
}

.login-social a:hover {
    color: #991b1b;
}

/* ── Keyboard toggle ── */
.keyboard-toggle-row {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.keyboard-toggle-row ul.jkeyboard {
    list-style: none;
    margin: 0;
    padding: 0;
}

.keyboard-toggle-row .jkey.layout_switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: 'Inter', sans-serif;
    user-select: none;
}

.keyboard-toggle-row .jkey.layout_switch:hover {
    background: #fff0f0;
    color: #ef4444;
    border-color: #fca5a5;
}

/* ── Right Panel (Banner) ── */
.login-right {
    flex: 1;
    position: relative;
    background: linear-gradient(160deg, #450a0a 0%, #200505 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    display: block;
}

.login-right-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 28px 36px;
    text-align: center;
    background: linear-gradient(160deg, rgba(69,10,10,0.6) 0%, rgba(32,5,5,0.78) 100%);
    overflow: hidden;
}

.login-right-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.25;
    margin-bottom: 10px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.login-right-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    max-width: 300px;
    margin-bottom: 28px;
}

/* ── Phone Mockup ── */
.phone-mockup {
    position: relative;
    margin: 14px auto 16px;
    display: flex;
    justify-content: center;
}

.phone-body {
    width: 160px;
    background: #1a1a1a;
    border-radius: 26px;
    padding: 10px 6px 8px;
    box-shadow:
        0 0 0 2px #333,
        0 20px 50px rgba(0,0,0,0.7),
        0 0 30px rgba(239,68,68,0.2);
    position: relative;
}

.phone-notch {
    width: 44px;
    height: 8px;
    background: #111;
    border-radius: 4px;
    margin: 0 auto 6px;
}

.phone-screen {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    padding-bottom: 4px;
}

/* App header */
.papp-header {
    background: #c81a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    font-size: 9px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}
.papp-logo { font-size: 11px; }
.papp-cart { font-size: 11px; }

/* Banner */
.papp-banner {
    background: linear-gradient(90deg, #fff1f1, #ffe4e4);
    font-size: 7px;
    font-weight: 600;
    color: #c81a1a;
    text-align: center;
    padding: 4px 6px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.2px;
}

/* Category row */
.papp-cats {
    display: flex;
    gap: 3px;
    padding: 5px 6px 3px;
    overflow: hidden;
}
.pcat {
    font-size: 6.5px;
    font-family: 'Inter', sans-serif;
    padding: 2px 6px;
    border-radius: 8px;
    background: #f3f3f3;
    color: #555;
    white-space: nowrap;
    font-weight: 500;
}
.pcat.active {
    background: #c81a1a;
    color: #fff;
}

/* Product items grid */
.papp-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 3px 5px 4px;
}
.pitem {
    background: #fafafa;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}
.pitem-img {
    height: 28px;
    width: 100%;
}
.pi1 { background: linear-gradient(135deg, #ff9a6c, #f56040); }
.pi2 { background: linear-gradient(135deg, #ffd36b, #f5a623); }
.pi3 { background: linear-gradient(135deg, #7ecbcb, #3da8a8); }
.pi4 { background: linear-gradient(135deg, #b7e887, #6ab04c); }

.pitem-name {
    font-size: 7px;
    font-weight: 600;
    color: #222;
    padding: 3px 4px 1px;
    font-family: 'Inter', sans-serif;
}
.pitem-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1px 4px 3px;
}
.pitem-price {
    font-size: 7px;
    font-weight: 700;
    color: #c81a1a;
    font-family: 'Inter', sans-serif;
}
.pitem-add {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    background: #c81a1a;
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: 700;
}

/* Order button */
.papp-order-btn {
    margin: 3px 5px 2px;
    background: linear-gradient(90deg, #ef4444, #991b1b);
    color: #fff;
    font-size: 7.5px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    padding: 5px;
    border-radius: 7px;
    letter-spacing: 0.3px;
}

.phone-home-bar {
    width: 40px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin: 6px auto 0;
}

/* QR floating badge */
.qr-badge {
    position: absolute;
    bottom: -6px;
    right: -22px;
    background: rgba(200,26,26,0.85);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 6px 10px 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.qr-badge span {
    font-size: 7px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

/* ── Feature pills (compact row) ── */
.login-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    max-width: 340px;
    margin-top: 4px;
}
.fpill {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 4px 11px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}
.fpill:hover {
    background: rgba(255,255,255,0.15);
}

/* ── In-panel Footer ── */
.login-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px;
    color: #b0b7c3;
    text-align: center;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.login-footer a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #ef4444;
}

.copyrightheart {
    color: #f87171;
    padding: 0 2px;
}

/* ── Keyboard container ── */
#EngKeyboard, #EngKeyboard1 {
    position: fixed;
    background: #7f1d1d;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    z-index: 9999;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        width: 100%;
        max-width: 440px;
    }

    .login-left {
        flex: none;
        max-width: 100%;
        padding: 40px 32px;
    }

    .login-right {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 32px 24px;
    }

    .login-heading {
        font-size: 22px;
    }
}
