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

:root {
    --brand: #C4601B;
    --brand-dark: #a74912;
    --brand-light: #f8e4d6;
    --brand-glow: rgba(196, 96, 27, 0.15);
    --text-primary: #1a1a1a;
    --text-secondary: #64748b;
    --border: #e8e8e8;
    --bg: #fafaf9;
    --radius: 14px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.login-container {
    display: flex;
    min-height: 100vh;
}

/* ── Left Panel (Banner) ── */
.banner-section {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #FFF7F0 0%, #FDEEE3 40%, #f9dcc4 100%);
}

.banner-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.06;
    animation: changeImage 12s ease-in-out infinite;
}

@keyframes changeImage {
    0%, 45% { background-image: url('/images/illustrations/qrcodescan.png'); }
    50%, 95% { background-image: url('/images/illustrations/restoscan.png'); }
    100% { background-image: url('/images/illustrations/qrcodescan.png'); }
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 48px;
    max-width: 420px;
}

.banner-content .logo {
    width: 100px;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.banner-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 16px;
}

.banner-content p {
    font-size: 0.9rem;
    color: var(--brand);
    line-height: 1.7;
    margin-bottom: 24px;
}

.banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--brand-glow);
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Right Panel (Form) ── */
.form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 100vh;
    background: var(--bg);
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ── Alerts ── */
.alert {
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: none;
    padding: 14px 16px;
    font-size: 0.85rem;
}

.alert-danger {
    background: #fef2f2;
    color: #c62828;
    border-left: 3px solid #ef4444;
}

/* ── Google Button ── */
.social-login {
    margin-bottom: 24px;
}

.social-buttons {
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 12px;
    padding: 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    text-decoration: none;
}

.social-btn:hover {
    border-color: #d0d0d0;
    background: #fafafa;
    text-decoration: none;
    color: var(--text-primary);
}

.social-btn img {
    width: 20px;
    height: 20px;
}

.social-btn i {
    font-size: 18px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 24px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

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

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 0.82rem;
}

.required {
    color: var(--brand);
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    transition: all 0.2s ease;
    outline: none;
    color: var(--text-primary);
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: #c0c0c0;
}

/* ── Remember / Forgot ── */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    border-radius: 4px;
}

.remember label {
    margin: 0;
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.forgot-link {
    font-size: 0.82rem;
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--brand-dark);
    text-decoration: none;
}

/* ── Submit Button ── */
.login-button {
    width: 100%;
    padding: 14px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(196, 96, 27, 0.3);
}

.login-button:hover {
    background: var(--brand-dark);
    box-shadow: 0 6px 24px rgba(196, 96, 27, 0.35);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    background: #d5d5d5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.login-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ── Security Badge ── */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    color: #b0b0b0;
    font-size: 0.72rem;
}

.security-badge i {
    font-size: 12px;
}

/* ── Register Link ── */
.register-link {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.register-link p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.register-link a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.register-link a:hover {
    color: var(--brand-dark);
    text-decoration: none;
}

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

    .banner-section {
        display: none;
    }

    .form-section {
        padding: 24px 20px;
        min-height: auto;
        align-items: flex-start;
        padding-top: 48px;
    }

    .login-card {
        max-width: 100%;
    }

    .login-header h2 {
        font-size: 1.4rem;
    }

    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .forgot-link {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 20px 16px;
        padding-top: 32px;
    }

    .login-header h2 {
        font-size: 1.3rem;
    }

    input[type="email"],
    input[type="password"] {
        font-size: 16px; /* Prevents iOS zoom */
    }
}
