/* Login page styles — extends index.css splash frame */

.login-frame {
    max-width: 460px;
}

/* ── Form ────────────────────────────────────────── */
.login-form {
    margin-top: 1.5em;
    text-align: left;
}
.login-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
    text-align: center;
}

.handle-input-wrapper {
    display: flex;
    align-items: stretch;
    border: 1px solid #888;
    background: #fff;
    margin-bottom: 1.2em;
}
.handle-input-wrapper input {
    flex: 1;
    padding: 0.7em 0.8em;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 1.05em;
    min-width: 0;
    color: #181818;
}
.handle-input-wrapper input:focus {
    outline: none;
}
.handle-input-wrapper:focus-within {
    border-color: #8B1A1A;
    box-shadow: 0 0 0 2px rgba(139,26,26,0.15);
}
.handle-suffix {
    display: flex;
    align-items: center;
    padding: 0 0.8em;
    background: #eee;
    border-left: 1px solid #888;
    color: #555;
    font-size: 0.95em;
    white-space: nowrap;
    user-select: none;
}

/* ── Button ──────────────────────────────────────── */
.login-password {
    display: block;
    width: 100%;
    padding: 0.7em 0.8em;
    border: 1px solid #888;
    background: #fff;
    font-family: inherit;
    font-size: 1.05em;
    color: #181818;
    margin-bottom: 1.2em;
    box-sizing: border-box;
}
.login-password:focus {
    outline: none;
    border-color: #8B1A1A;
    box-shadow: 0 0 0 2px rgba(139,26,26,0.15);
}

.login-btn {
    display: block;
    width: 100%;
    padding: 0.75em 1.5em;
    background: #8B1A1A;
    color: #fff;
    border: none;
    font-family: inherit;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}
.login-btn:hover {
    background: #a52222;
}
.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Error ───────────────────────────────────────── */
.login-error {
    background: #fee;
    border: 1px solid #e99;
    color: #a33;
    padding: 0.65em 0.8em;
    margin-bottom: 1em;
    font-size: 0.9em;
    display: none;
    text-align: center;
}

/* ── Phone ─────────────────────────────────────── */
@media (max-width: 600px) {
    body {
        align-items: flex-start;
    }
    .login-frame {
        max-width: 100%;
        margin: 16px 12px;
    }
    .login-frame .splash-title {
        font-size: 1.3em;
        margin-bottom: 0.3em;
    }
    .handle-input-wrapper input,
    .login-password {
        font-size: 16px; /* prevents iOS zoom on focus */
        padding: 0.8em;
    }
    .handle-suffix {
        font-size: 0.85em;
        padding: 0 0.6em;
    }
    .login-btn {
        padding: 0.9em 1.5em;
        font-size: 1em;
    }
    /* Keyboard awareness: ensure focused inputs stay in view */
    .login-form input:focus {
        scroll-margin-bottom: 120px;
    }
}
