/* ── Page scaffold ───────────────────────────────────────────── */
html, body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #1a472a 0%, #0d2818 55%, #071a0f 100%);
    /* Subtle felt-like texture via radial highlight */
    background-image:
            radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.04) 0%, transparent 60%),
            linear-gradient(160deg, #1a472a 0%, #0d2818 55%, #071a0f 100%);
    padding: 1.5rem;
}

/* ── Login card ──────────────────────────────────────────────── */
.login-card {
    position: relative;
    width: 420px;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    padding: 2.5rem 2.25rem 2.25rem;
    box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.55),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-align: center;
}

/* ── Language selector ─────────────────────────────────────── */
.lang-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: opacity 0.2s, border-color 0.2s;
    text-decoration: none;
}

.lang-option:hover {
    opacity: 0.8;
}

.lang-option.active {
    opacity: 1;
    border-color: rgba(199, 153, 55, 0.7);
}

/* ── Logo ────────────────────────────────────────────────────── */
.login-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    /* Subtle drop shadow to lift the logo off the dark bg */
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

/* ── Page title & subtitle ───────────────────────────────────── */
.login-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    line-height: 1.45;
}

/* ── Form inputs ─────────────────────────────────────────────── */
.login-card .form-label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-align: left;
    display: block;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.6rem;
    color: #ffffff;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.32);
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(199, 153, 55, 0.7); /* --i2 gold */
    box-shadow: 0 0 0 3px rgba(199, 153, 55, 0.18);
    color: #ffffff;
    outline: none;
}

/* Input icon wrapper */
.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .field-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.85rem;
    pointer-events: none;
}

.input-icon-wrap .form-control {
    padding-left: 2.3rem;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.login-card .alert {
    font-size: 0.875rem;
    border-radius: 0.6rem;
    text-align: left;
}

.login-card .alert-danger {
    background: rgba(220, 53, 69, 0.18);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ff8a8a;
}

.login-card .alert-success {
    background: rgba(25, 135, 84, 0.18);
    border: 1px solid rgba(25, 135, 84, 0.4);
    color: #6fd9a8;
}

/* ── Submit button ───────────────────────────────────────────── */
.btn-login {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.7rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #ffffff;
    /* Gold gradient echoing --i2 brand color */
    background: linear-gradient(135deg, #d4a83a 0%, #b8842a 100%);
    box-shadow: 0 4px 16px rgba(199, 153, 55, 0.35);
    cursor: pointer;
    transition: filter 0.2s, box-shadow 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

.btn-login:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 22px rgba(199, 153, 55, 0.5);
}

.btn-login:active {
    transform: translateY(1px);
    filter: brightness(0.95);
}

.btn-login:focus-visible {
    outline: 3px solid rgba(199, 153, 55, 0.7);
    outline-offset: 2px;
}

/* ── Footer note ─────────────────────────────────────────────── */
.login-footer {
    margin-top: 1.75rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}
