/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #f4f4f4;
    --panel-bg: #ffffff;
    --primary: #002656;
    --primary-hover: #001d42;
    --accent: #c41230;
    --accent-hover: #a30f28;
    --green: #4a8c5c;
    --text: #232222;
    --text-muted: #5a5a5a;
    --border: #d8d4cf;
    --radius: 6px;
}

body {
    font-family: "Host Grotesk", "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

.login-card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 2rem 2rem 1.25rem;
    border-bottom: 3px solid var(--accent);
}

.login-logo {
    height: 36px;
    width: auto;
    margin-bottom: 0.75rem;
}

.login-header h1 {
    font-family: "Host Grotesk", "Jost", sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.02em;
}

.login-subtitle {
    font-family: "Jost", "Host Grotesk", sans-serif;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    font-weight: 400;
    letter-spacing: 0.03em;
}

/* SSO section */
.sso-section {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.sso-prompt {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.ms-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.5rem;
    background: var(--panel-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ms-login-btn:hover {
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.15);
    background: #f8f9fa;
}

.ms-login-btn svg {
    flex-shrink: 0;
}

/* Info box */
.sso-info {
    padding: 0.75rem 2rem 1.25rem;
    border-top: 1px solid var(--border);
}

.sso-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* Message */
.auth-message {
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
}

.auth-message.error {
    color: var(--accent);
    background: #fdf0f2;
    border: 1px solid #f5c6ce;
}

.auth-message.success {
    color: var(--green);
    background: #f0f8f2;
    border: 1px solid #c8e6c9;
}

/* Footer */
.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ── Access Denied page ── */
.denied-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.denied-section {
    padding: 2rem;
    text-align: center;
}

.denied-section h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.denied-section p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.denied-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.denied-actions a {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-back-login {
    background: var(--primary);
    color: #fff;
}

.btn-back-login:hover {
    background: var(--primary-hover);
}

@media (max-width: 480px) {
    .sso-section {
        padding: 1.5rem 1.25rem 1.25rem;
    }
    .login-header {
        padding: 1.5rem 1.25rem 1rem;
    }
}
