/* ==================================================
   CSS VARIABLES
================================================== */
:root {
    --brand: #0160ad;
    --brand-dark: #014b87;

    --bg: #f4f7fb;
    --card-bg: #ffffff;
    --text: #333;
    --muted: #666;
    --border: #ccd6e0;
    --error: #c62828;
}

/* ==================================================
   DARK MODE (automatic via system)
================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --card-bg: #111827;
        --text: #e5e7eb;
        --muted: #9ca3af;
        --border: #1f2933;
    }
}

/* ==================================================
   RESET / BASE
================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ==================================================
   LAYOUT
================================================== */
.login-container {
    max-width: 460px;
    margin: auto;
    padding: 40px 20px;
}

.brand {
    text-align: center;
    margin-bottom: 30px;
}

.brand h1 {
    color: var(--brand);
    margin-bottom: 15px;
}

.brand img {
    max-width: 100%;
    height: auto;
}

/* ==================================================
   CARD
================================================== */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* ==================================================
   FORM
================================================== */
label {
    display: block;
    font-weight: 600;
    color: var(--brand);
    margin-bottom: 6px;
}

input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 18px;
    font-size: 1rem;
    background: transparent;
    color: var(--text);
}

input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(1,96,173,.25);
}

button {
    width: 100%;
    padding: 12px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background: var(--brand-dark);
}

/* ==================================================
   ERROR
================================================== */
.error {
    background: rgba(198,40,40,0.15);
    color: var(--error);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* ==================================================
   DIVIDER
================================================== */
.divider {
    text-align: center;
    margin: 22px 0;
    color: var(--muted);
    font-weight: 600;
}

/* ==================================================
   MICROSOFT SSO BUTTON
================================================== */
.sso-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

.sso-button img {
    width: 22px;
    height: 22px;
}

.sso-button:hover {
    background: rgba(1,96,173,0.08);
    transform: translateY(-1px);
}