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

:root {
    --p-red: #e31e24;
    --p-red-dark: #c4181e;
    --p-ink: #111827;
    --p-muted: #6b7280;
    --p-line: #e5e7eb;
    --p-bg: #f4f6fb;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

.login-page {
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at 12% 18%, rgba(227, 30, 36, 0.12), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(17, 24, 39, 0.08), transparent 40%),
        var(--p-bg);
    color: var(--p-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-shell {
    width: min(1080px, 100%);
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 24px 80px rgba(17, 24, 39, 0.12);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.92fr);
    overflow: hidden;
    min-height: 640px;
}

.login-form-col {
    padding: clamp(32px, 5vw, 64px);
    display: flex;
    flex-direction: column;
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}
.login-brand img {
    max-width: min(360px, 100%);
    height: auto;
    display: block;
    margin: 0 auto 12px;
}
.login-brand .system-title {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--p-red);
    font-weight: 600;
}

.login-heading {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.login-subheading {
    margin: 8px 0 28px;
    color: var(--p-muted);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 22px;
}
.login-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.login-form .form-control {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid var(--p-line);
    border-radius: 0;
    padding: 8px 0 10px;
    font-size: 15px;
    background: transparent;
    color: var(--p-ink);
    outline: none;
}
.login-form .form-control:focus {
    border-bottom-color: var(--p-red);
}
.password-field { position: relative; }
.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 24px;
    font-size: 13px;
}
.remember-me { display: flex; align-items: center; gap: 8px; color: #4b5563; }
.remember-me input[type="checkbox"] {
    accent-color: var(--p-red);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
.forgot-link { color: var(--p-red); text-decoration: none; font-weight: 600; }
.forgot-link:hover { text-decoration: underline; }

.btn-login,
.btn-payment {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: var(--p-red);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 16px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(227, 30, 36, 0.28);
    text-align: center;
    text-decoration: none;
}
.btn-login:hover, .btn-payment:hover { background: var(--p-red-dark); color: #fff; }
.btn-login:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.login-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 14px;
}
.success-alert {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.lockout-box {
    display: none;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    text-align: center;
}
.lockout-box.is-visible { display: block; }
.lockout-box.is-blocked { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.lockout-timer { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.04em; margin-top: 0.35rem; }
.login-form.is-disabled { opacity: 0.55; pointer-events: none; }

.login-footer {
    margin-top: auto;
    padding-top: 28px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}
.contact-admin { font-size: 13px; color: var(--p-muted); margin: 18px 0 0; text-align: center; }
.contact-admin a { color: var(--p-red); font-weight: 600; text-decoration: none; }

.login-visual {
    background:
        linear-gradient(165deg, #1a1a1a 0%, #2b2b2b 48%, #e31e24 160%);
    color: #fff;
    padding: clamp(28px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.login-visual::before,
.login-visual::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(227, 30, 36, 0.28);
}
.login-visual::before { width: 280px; height: 280px; right: -80px; top: -60px; }
.login-visual::after { width: 180px; height: 180px; left: -50px; bottom: 80px; background: rgba(255,255,255,0.06); }
.visual-kicker {
    position: relative;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
}
.visual-copy h2 {
    position: relative;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    margin: 16px 0 12px;
    font-weight: 700;
}
.visual-copy p {
    position: relative;
    color: rgba(255,255,255,0.78);
    max-width: 36ch;
    font-size: 14px;
}
.visual-stats {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.visual-stat {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 14px;
}
.visual-stat span { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.65); }
.visual-stat strong { display: block; margin-top: 6px; font-size: 18px; }

@media (max-width: 860px) {
    .login-shell { grid-template-columns: 1fr; min-height: auto; }
    .login-visual { min-height: 220px; }
    .visual-stats { display: none; }
}
@media (max-width: 540px) {
    .login-page { padding: 12px; }
    .login-form-col { padding: 28px 22px; }
    .login-heading { font-size: 26px; }
}
