/* Shared palette for every portal page. Keep component colours in these tokens. */
:root {
    --accent-ink: #111111;
    --accent-hover: #333333;
    --accent-soft: #f3f3f3;
    --bg: #ffffff;
    --bg-gray: #f4f4f4;
    --surface: #ffffff;
    --surface-soft: rgba(248, 248, 248, .92);
    --text: #111111;
    --text-soft: #555555;
    --text-muted: #666666;
    --line: #d9d9d9;
    --line-strong: #777777;
    --primary-soft: var(--accent-soft);

    /* Compatibility with existing component variable names. */
    --green: var(--accent-ink);
    --lime: var(--accent-soft);
    --lime-bright: #e8e8e8;
    --bg-green: #f5f5f5;
    --green-soft: #f2f2f2;

    --success: #222222;
    --success-bg: #f0f0f0;
    --warning: #333333;
    --warning-bg: #fafafa;
    --danger: #111111;
    --danger-bg: #f4f4f4;
    --info: #444444;
    --info-bg: #f5f5f5;
    --shadow-soft: 0 18px 55px rgba(0, 0, 0, .06);
    --shadow-nav: 0 12px 34px rgba(0, 0, 0, .07);
}

::selection {
    color: #ffffff;
    background: #111111;
}

input[type="checkbox"],
input[type="radio"],
progress {
    accent-color: var(--accent-ink);
}

.btn:focus-visible,
.nav-link:focus-visible,
.brand:focus-visible,
.mobile-menu-button:focus-visible,
[href]:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 3px;
}

.btn--primary:hover {
    color: #ffffff;
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.message::before {
    content: "i";
    display: grid;
    place-items: center;
    left: 16px;
    width: 20px;
    height: 20px;
    border: 1px solid #999999;
    border-radius: 50%;
    color: #111111;
    background: #ffffff;
    box-shadow: none;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.message.success::before {
    content: "✓";
    color: #ffffff;
    background: #111111;
    border-color: #111111;
}

.message.warning {
    border-style: dashed;
}

.message.warning::before {
    content: "!";
    border-radius: 4px;
    background: #ffffff;
}

.message.error {
    border-color: #111111;
    border-left-width: 3px;
}

.message.error::before {
    content: "×";
    color: #ffffff;
    background: #111111;
    border-color: #111111;
}

/* Status text stays explicit; borders and fills also distinguish the states. */
.resident-application__status.is-approved,
.cad-status-pill.is-approved {
    color: #111111;
    background: #f0f0f0;
    border-color: #777777;
}

.resident-application__status.is-processed,
.cad-status-pill.is-processed {
    color: #ffffff;
    background: #111111;
    border-color: #111111;
}

.resident-application__status.is-processed::before,
.cad-status-pill.is-processed::before {
    background: currentColor;
}

.resident-application__status.is-returned,
.resident-notification-card__status.is-returned,
.cad-status-pill.is-returned {
    color: #111111;
    background: #ffffff;
    border-color: #777777;
    border-style: dashed;
}

.errorlist,
.inline-error,
.client-inline-error {
    font-weight: 500;
}
