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

:root {
    --primary: #1a73e8;
    --primary-dark: #0b5ed7;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border-light: rgba(0, 0, 0, 0.08);
}

/* RESET */
* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

/* body {
    margin: 0;
    font-family: 'Inter', sans-serif;

    background:
        radial-gradient(circle at top left, rgba(26, 115, 232, 0.25), transparent 40%),
        radial-gradient(circle at bottom right, rgba(79, 156, 255, 0.2), transparent 40%),
        url('../img/background.png') no-repeat center center fixed;
    background-size: cover;

    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;

    overflow-y: auto;
} */

body {
    margin: 0;
    font-family: 'Inter', sans-serif;

    background: url('../img/background.webp') center/cover no-repeat;

    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(26, 115, 232, 0.25), transparent 40%),
        radial-gradient(circle at bottom right, rgba(79, 156, 255, 0.2), transparent 40%);
}

/* ===========================
   MAIN LAYOUT
=========================== */
.login-container {
    display: grid;
    grid-template-columns: 1.15fr 1fr;

    max-width: 1200px;
    width: 100%;

    padding: 5px 56px;
    gap: 64px;

    align-items: center;
}

/* ===========================
   BRAND SECTION
=========================== */
.brand-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.brand-logo {
    width: 260px;
    margin-bottom: 36px;
}

.brand-section h1 {
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
}

.brand-section p {
    font-size: 1.15rem;
    opacity: 0.9;
}

/* ===========================
   LOGIN CARD
=========================== */
.login-card {
    background: rgba(255, 255, 255, 0.88);
    /* backdrop-filter: blur(18px); */
    /* reduced */
    backdrop-filter: blur(8px);
    will-change: transform;

    border-radius: 20px;
    padding: 25px 36px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);

    animation: fadeUp 0.6s ease;

    max-height: calc(100vh - 25px);
    overflow-y: auto;
}

/* Scrollbar */
.login-card::-webkit-scrollbar {
    width: 6px;
}

.login-card::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
}

/* ===========================
   CARD HEADER
=========================== */
.card-header {
    text-align: center;
}

.card-header img {
    width: 55%;
    margin-bottom: 14px;
}

.card-header h2.realm-title {
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.3px;
    line-height: 1.25;
    margin: 0;
    word-break: break-word;
}

/* ===========================
   DIVIDER
=========================== */
.divider {
    height: 1px;
    margin: 22px 0 28px;
    background: linear-gradient(to right,
            transparent,
            rgba(0, 0, 0, 0.15),
            transparent);
}

/* ===========================
   FORM
=========================== */
.form-group {
    margin-bottom: 20px;
}

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

/* ===========================
   INPUTS
=========================== */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #9ca3af;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px 14px 14px 46px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: rgba(249, 250, 251, 0.9);
    font-size: 16px;
    /* iOS zoom fix */
    transition: all 0.25s ease;
}

input::placeholder {
    color: #9ca3af;
}

input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(26, 115, 232, 0.18),
        0 6px 18px rgba(26, 115, 232, 0.15);
}

/* ===========================
   ERROR
=========================== */
.error-text {
    font-size: 0.75rem;
    color: #dc2626;
    margin-bottom: 16px;
}

/* ===========================
   OPTIONS ROW
=========================== */
.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    margin-bottom: 26px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.forgot-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ===========================
   BUTTON
=========================== */
.login-button {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    cursor: pointer;

    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;

    font-size: 1rem;
    font-weight: 600;

    box-shadow: 0 12px 30px rgba(26, 115, 232, 0.45);
    transition: all 0.25s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(26, 115, 232, 0.55);
}

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

/* ===========================
   FOOTER
=========================== */
.footer-info {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 30px;
}

.footer-info span {
    display: block;
    margin-top: 10px;
    opacity: 0.7;
}

.secure-text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.secure-text svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

/* ===========================
   ANIMATION
=========================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   RESPONSIVE
=========================== */

/* Tablets / small laptops */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 32px;
    }

    .brand-section {
        align-items: center;
        text-align: center;
    }

    .brand-logo {
        width: 200px;
    }

    .brand-section h1 {
        font-size: 2.6rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    body {
        align-items: flex-start;
        padding: 24px 0;
    }

    .login-container {
        padding: 20px;
        gap: 24px;
    }

    .login-card {
        padding: 28px 22px;
        border-radius: 16px;
        max-height: none;
    }

    .brand-section h1 {
        font-size: 2.1rem;
    }
}

/* ===========================
   MODERN SOCIAL ICONS
=========================== */
.social-providers {
    margin-top: 28px;
}

.social-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.social-divider span {
    padding: 0 12px;
    letter-spacing: 0.3px;
    font-weight: 400;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

/* Brand-specific hover glow (optional) */
.social-icon.google:hover {
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.2);
}

.social-icon.facebook:hover {
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.2);
}

.social-icon.github:hover {
    box-shadow: 0 8px 20px rgba(36, 41, 47, 0.15);
}

.social-icon.microsoft:hover {
    box-shadow: 0 8px 20px rgba(0, 120, 215, 0.2);
}

.social-icon.apple:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.social-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Fallback text icon */
.icon-fallback {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
}

/* Registration section spacing */
.registration-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
}

/* Registration text */
.registration-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Registration link styling */
.register-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 6px;
    transition: all 0.3s ease;
}

.register-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .registration-section {
        margin-top: 20px;
        padding-top: 16px;
    }

    .registration-text {
        font-size: 0.85rem;
    }
}

/* Fix for the Email field layout*/
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
/* ===========================
   PROTOCOLS BAR — below login card
=========================== */
.baar-protocols-bar {
    margin-top: 10px;
    padding: 0;
    font-size: 0.62rem;
    letter-spacing: 0.07em;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    font-weight: 400;
    opacity: 0.85;
    text-transform: uppercase;
}

/* ===========================
   BRAND SECTION H1 tighter spacing
=========================== */
.brand-section h1 {
    line-height: 1.1;
    margin-bottom: 10px;
}
