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

body {
    font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #E7E8ED;
    color: #333;
    line-height: 1.5;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem 2.25rem;
    width: 100%;
    max-width: 360px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    margin-bottom: 1rem;
}

.auth-logo img {
    width: 100px;
    height: auto;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.375rem;
}

.auth-header p {
    color: #666;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: #444;
}

.form-group input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.15s;
}

.form-group input:focus {
    outline: none;
    border-color: #357BBC;
    box-shadow: 0 0 0 3px rgba(53, 123, 188, 0.15);
}

.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s;
    width: 100%;
}

.btn-primary {
    background: #357BBC;
    color: #fff;
}

.btn-primary:hover {
    background: #2a6aa0;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
    margin-top: 0.75rem;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-footer {
    margin-top: 1.25rem;
}

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #888;
    text-decoration: none;
}

.forgot-link:hover {
    color: #357BBC;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    font-size: 0.8rem;
    color: #888;
    text-decoration: none;
}

.auth-links a:hover {
    color: #357BBC;
}

.consent-scopes {
    margin-bottom: 1.5rem;
}

.consent-scopes ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.consent-scopes li {
    margin-bottom: 0.25rem;
}

.consent-buttons {
    display: flex;
    gap: 0.75rem;
}

.consent-buttons .btn {
    flex: 1;
}

.consent-buttons .btn-secondary {
    margin-top: 0;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #999;
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.divider span {
    padding: 0 0.75rem;
}

.idp-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-idp {
    display: block;
    padding: 0.625rem 1.25rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: #374151;
    background: #fff;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn-idp:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.back-link {
    color: #357BBC;
    text-decoration: none;
    font-size: 0.875rem;
}

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

.back-link-container {
    text-align: center;
    margin-top: 1rem;
}

.logout-message {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding: 0 1rem;
    font-size: 0.75rem;
    width: 100%;
    max-width: 360px;
}

.auth-footer a {
    color: #999;
    text-decoration: none;
}

.auth-footer a:hover {
    color: #357BBC;
}

/* MFA */

.auth-card-wide {
    max-width: 420px;
}

.mfa-setup-instructions {
    margin-bottom: 1.5rem;
}

.mfa-setup-instructions p {
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.qr-container {
    text-align: center;
    margin: 1rem 0;
}

.mfa-manual-key {
    text-align: center;
    word-break: break-all;
}

.mfa-manual-key code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.mfa-hint {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 1rem;
}

.recovery-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 1rem 0;
}

.recovery-code {
    display: block;
    background: #f3f4f6;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    letter-spacing: 0.1em;
    font-family: monospace;
}

.home-section {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-bottom: 0.5rem;
}

.home-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.5rem;
}

.mfa-status {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.mfa-status-on {
    color: #166534;
}

.mfa-status-off {
    color: #888;
}
