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

body.login-page {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--bg);
    font-family: var(--font-body);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.login-shell {
    width: 100%;
    max-width: 400px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    justify-content: center;
}

.login-brand .brand-mark {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #3b82f6, var(--accent-dark));
    color: white;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
}

.login-brand h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.login-brand p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    min-width: 0;
}

.login-error {
    background: var(--red-tint);
    color: var(--red);
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-field {
    margin-bottom: 14px;
}

.login-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.login-field input[type="text"],
.login-field input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.12s, box-shadow 0.12s;
}

.login-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-submit {
    width: 100%;
    margin-top: 8px;
    padding: 11px 16px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.12s;
}

.login-submit:hover {
    background: var(--accent-dark);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-subtle);
}

.ms-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 13px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
    font-family: var(--font-body);
}

.ms-btn:hover {
    background: var(--surface-hover, var(--bg));
    border-color: var(--border-strong, var(--accent));
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.ms-btn:active {
    opacity: 0.92;
}

.ms-logo {
    flex-shrink: 0;
    width: 21px;
    height: 21px;
}
