/* Sign-in screen (pages/login.php), shown when no page segment is given. */

.login-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1e2235 0%, #262b45 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-screen.hidden {
    display: none;
}

.login-card {
    background: var(--card);
    border-radius: 16px;
    padding: 36px 34px;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.login-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo .logo-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.login-logo h2 {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text);
}

.login-logo p {
    font-size: var(--fs-2xs);
    color: var(--muted);
}

.login-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.login-card .form-group {
    margin-bottom: 14px;
}

.login-card .form-label {
    font-size: var(--fs-2xs);
    font-weight: 600;
    color: var(--muted);
    display: block;
    margin-bottom: 5px;
}

.login-card .form-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: var(--fs-sm);
    font-family: inherit;
    outline: none;
    background: var(--surface-2);
    color: var(--text);
}

.login-card .form-input:focus {
    border-color: var(--accent);
    background: #fff;
}

.login-btn {
    width: 100%;
    padding: 11px;
    background: var(--accent);
    border: none;
    border-radius: 9px;
    color: #fff;
    font-size: var(--fs-md);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px;
    transition: background .15s;
}

.login-btn:hover {
    background: #2f4cc4;
}

.login-btn:disabled {
    background: #c7cee0;
    cursor: not-allowed;
}

.login-error {
    font-size: var(--fs-xs);
    color: var(--red);
    margin-top: 8px;
    display: none;
}

/* Why the login screen is showing: yesterday's sign-in ran out (login.js). */
.login-note {
    margin: 0 0 14px;
    padding: 9px 12px;
    border: 1px solid var(--warning-line);
    border-radius: var(--r-md);
    background: var(--warning-soft);
    color: var(--warning-ink);
    font-size: var(--fs-xs);
    line-height: 1.45;
}

.login-note[hidden] {
    display: none;
}

/* ─────────────────────────────────────────────────────────────
   The eye on the password box. It sits inside the field, so the
   input keeps the right-hand padding clear for it.
   ───────────────────────────────────────────────────────────── */
.pw-field {
    position: relative;
}
.pw-field .form-input {
    padding-right: 44px;
}
.pw-eye {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--muted, #64748B);
    cursor: pointer;
}
.pw-eye:hover {
    background: rgba(15, 23, 42, .06);
    color: var(--text, #0F172A);
}
.pw-eye:focus-visible {
    outline: 2px solid var(--brand, #3B5BDB);
    outline-offset: 1px;
}

/* The reset gives every svg its own display, which beats the browser's
   rule for [hidden] — so the eye that is off has to be told again. */
.pw-eye svg[hidden] {
    display: none;
}
.pw-eye svg {
    display: block;
}

/* The field fills its form group — on the profile form the input sits in
   a grid cell, where it would otherwise keep its natural width and leave
   the eye stranded out to the right of it. */
.pw-field .form-input {
    width: 100%;
}
