:root {
    /* KIGRA brand. Green is the primary; red is reserved for emergency,
       penalties, overdue, enforcement notices, critical alerts. White +
       cream remain the neutral surface. See §12 of the developer
       feedback. */
    --kc-green: #14794d;
    --kc-green-deep: #0d5e3b;
    --kc-green-soft: #c8e8d6;
    --kc-green-tint: rgba(20, 121, 77, 0.08);

    --kc-red: #c93b2d;
    --kc-red-deep: #741d15;
    --kc-red-soft: #f4d4cc;

    /* Brand alias — anything that used `--kc-brand` historically now
       inherits green; emergency-specific surfaces opt back into red. */
    --kc-brand: var(--kc-green);
    --kc-brand-deep: var(--kc-green-deep);

    --kc-clay: #b87059;
    --kc-sand: #fbf9f5;
    --kc-sand-deep: #f1ede4;
    --kc-ink: #1a1f1c;
    --kc-muted: #5e6962;
    --kc-panel: rgba(255, 255, 252, 0.94);
    --kc-panel-strong: #ffffff;
    --kc-border: rgba(20, 121, 77, 0.12);
    --kc-border-strong: rgba(20, 121, 77, 0.22);
    --kc-success: #11734a;
    --kc-warning: #9a5b04;
    --kc-danger: #b42318;
    --kc-shadow-soft: 0 18px 46px rgba(13, 60, 38, 0.07);
    --kc-shadow-strong: 0 28px 70px rgba(13, 60, 38, 0.14);
    --kc-radius-xl: 32px;
    --kc-radius-lg: 24px;
    --kc-radius-md: 18px;
    --kc-radius-sm: 14px;
    --kc-shell-gutter: 22px;
    --kc-mobile-tabbar-height: 88px;
    --kc-safe-area-bottom: 0px;
}

html[data-kc-theme="dark"] {
    --kc-green: #4fce91;
    --kc-green-deep: #b7f4d0;
    --kc-green-soft: rgba(79, 206, 145, 0.24);
    --kc-green-tint: rgba(79, 206, 145, 0.12);
    --kc-red: #ff8f7e;
    --kc-red-deep: #ffc5bb;
    --kc-red-soft: rgba(255, 143, 126, 0.22);
    --kc-clay: #d98d72;
    --kc-sand: #101714;
    --kc-sand-deep: #17221d;
    --kc-ink: #f4fbf6;
    --kc-muted: #b8c8bf;
    --kc-panel: rgba(19, 29, 25, 0.94);
    --kc-panel-strong: #14201b;
    --kc-border: rgba(183, 244, 208, 0.16);
    --kc-border-strong: rgba(183, 244, 208, 0.3);
    --kc-shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.24);
    --kc-shadow-strong: 0 28px 70px rgba(0, 0, 0, 0.34);
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    :root {
        --kc-safe-area-bottom: env(safe-area-inset-bottom);
    }
}

@supports (padding-bottom: constant(safe-area-inset-bottom)) {
    :root {
        --kc-safe-area-bottom: constant(safe-area-inset-bottom);
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    padding: 0;
}

html[data-kc-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(79, 206, 145, 0.11), transparent 32%),
        radial-gradient(circle at top right, rgba(255, 143, 126, 0.08), transparent 28%),
        linear-gradient(180deg, #0b1110 0%, #121a17 100%);
}

html {
    background: #f4f7f1;
    /* Keep horizontal overflow on html (not body) so `position: sticky`
       descendants of body still see body as a clean (non-scrolling)
       container — sticky topbar relies on this in iOS Safari. */
    overflow-x: hidden;
    scroll-padding-bottom: 24px;
    scroll-padding-top: 84px;
}

body {
    /* §12 — neutral cream surface with a faint green wash. Used to be
       a red gradient that made every screen feel urgent; red is now
       reserved for emergency / penalty / overdue surfaces only. */
    background:
        radial-gradient(circle at top left, rgba(20, 121, 77, 0.07), transparent 32%),
        radial-gradient(circle at top right, rgba(20, 121, 77, 0.04), transparent 28%),
        linear-gradient(180deg, #fbfaf6 0%, #f3f1ea 100%);
    color: var(--kc-ink);
    font-family: Aptos, Candara, "Trebuchet MS", sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
}

body::before {
    background:
        radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.6), transparent 26%),
        linear-gradient(135deg, rgba(20, 121, 77, 0.03), transparent 38%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: -1;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

.app-frame {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: 310px minmax(0, 1fr);
    margin: 0 auto;
    max-width: 1540px;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 22px clamp(16px, 2vw, 28px) 30px;
}

.app-shell--guest .app-frame {
    display: block;
    max-width: 1300px;
}

.app-main,
.content-area,
.section-stack,
.status-list,
.health-list,
.detail-list,
.login-panel,
.login-feature-list,
.page-head__intro,
.app-footer__brand,
.app-footer__meta,
.shell-sidebar,
.shell-drawer__nav {
    display: flex;
    flex-direction: column;
}

.app-main,
.content-area,
.section-stack,
.login-panel,
.login-feature-list,
.status-list,
.health-list,
.detail-list,
.shell-sidebar {
    gap: 18px;
}

.app-main {
    min-width: 0;
    min-height: calc(100vh - (var(--kc-shell-gutter) * 2));
    min-height: calc(100dvh - (var(--kc-shell-gutter) * 2));
}

.content-area {
    min-width: 0;
}

.content-area--guest {
    padding-top: 4px;
}

.card,
.hero-card,
.metric,
.info-banner,
.login-card,
.login-feature,
.status-tile,
.table-wrap,
.empty-state,
.app-footer,
.shell-sidebar,
.shell-drawer,
.shell-topbar {
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius-lg);
    box-shadow: var(--kc-shadow-soft);
}

.card,
.metric,
.info-banner,
.login-card,
.status-tile,
.table-wrap,
.empty-state {
    background: var(--kc-panel-strong);
    padding: 20px;
}

.hero-card {
    /* §12 — calm neutral surface with a faint green wash, not the
       red-leaning gradient that read as "alert" on every page. */
    background: linear-gradient(145deg, #ffffff 0%, #f1f7f2 100%);
    padding: 26px;
}

/* Opt-in danger hero for emergency, penalties, enforcement pages. */
.hero-card--danger {
    background: linear-gradient(145deg, #fff5f3 0%, #fde2dc 100%);
    border-color: rgba(201, 59, 45, 0.22);
}

.button,
.badge,
.status-chip,
.shell-chip,
.meta-pill {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.badge,
.meta-pill {
    /* §12 — generic kicker pills are now green-tinted. Emergency/penalty
       pills opt back into red via .badge--danger / .meta-pill--danger. */
    background: var(--kc-green-tint);
    border-radius: 999px;
    color: var(--kc-green-deep);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    padding: 8px 12px;
    text-transform: uppercase;
}

.meta-pill {
    background: rgba(17, 115, 74, 0.1);
    color: var(--kc-success);
}

.meta-pill--warn {
    background: rgba(154, 91, 4, 0.12);
    color: var(--kc-warning);
}

.meta-pill--neutral {
    background: var(--kc-green-tint);
    color: var(--kc-green-deep);
}

.meta-pill--soft {
    background: rgba(184, 112, 89, 0.12);
    color: var(--kc-clay);
}

/* Red-context badges + pills: emergency, penalties, overdue. */
.badge--danger,
.meta-pill--danger {
    background: rgba(20, 121, 77, 0.10);
    color: var(--kc-red-deep);
}

.button {
    /* §12 — primary buttons are KIGRA green. Use .button--danger or
       .emergency-button for red-context actions only. */
    background: linear-gradient(135deg, var(--kc-green) 0%, var(--kc-green-deep) 100%);
    border: 0;
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    gap: 8px;
    min-height: 48px;
    padding: 12px 18px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.button:hover,
.button:focus-visible {
    box-shadow: 0 16px 32px rgba(13, 60, 38, 0.22);
    filter: saturate(1.04);
    transform: translateY(-1px);
}

/* Red-context button: emergency, revoke, decline, dispute reject. */
.button--danger,
.emergency-button,
.button.emergency-button {
    background: linear-gradient(135deg, var(--kc-red) 0%, var(--kc-red-deep) 100%);
}
.button--danger:hover,
.button--danger:focus-visible,
.emergency-button:hover,
.emergency-button:focus-visible {
    box-shadow: 0 16px 32px rgba(116, 29, 21, 0.22);
}

.button:disabled {
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
    opacity: 0.54;
    transform: none;
}

.button--ghost {
    background: var(--kc-green-tint);
    color: var(--kc-green-deep);
}

.inline-link--button {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.inline-link {
    color: var(--kc-green-deep);
    font-weight: 700;
    text-decoration: none;
}

.inline-link:hover,
.inline-link:focus-visible {
    text-decoration: underline;
}

.page-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px 4px 0;
}

.page-head__intro {
    gap: 6px;
}

.page-kicker,
.detail-label,
.login-panel__eyebrow,
.shell-section-label {
    /* §12 — kicker text uses the KIGRA green so labels feel calm instead
       of alarmed. Detail labels in red contexts inherit naturally via
       parent colour. */
    color: var(--kc-green-deep);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-head h1,
.card h2,
.hero-card h2,
.login-card h2 {
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0;
}

.page-head h1 {
    font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.page-head p,
.form-hint,
.brand-subcopy,
.shell-link__copy span,
.shell-subtitle,
.login-panel__lead,
.login-subtitle,
.status-tile p,
.card p,
.info-banner p {
    color: var(--kc-muted);
}

.page-head p {
    font-size: 0.92rem;
    margin: 0;
    max-width: 54rem;
}

.page-kicker {
    font-size: 0.7rem;
}

.page-actions,
.toolbar,
.search-form,
.inline-form,
.button-group,
.launch-grid,
.hero-actions,
.shell-topbar__left,
.shell-topbar__right,
.shell-sidebar__brand,
.shell-sidebar__user,
.shell-drawer__brand,
.shell-drawer__user,
.shell-link,
.db-actions,
.db-tags {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar {
    justify-content: space-between;
}

.search-form,
.inline-form {
    align-items: end;
}

.search-form > div,
.inline-form > div {
    min-width: 180px;
}

.shell-sidebar {
    background:
        linear-gradient(180deg, rgba(255, 253, 251, 0.9), rgba(241, 248, 244, 0.84)),
        linear-gradient(160deg, rgba(255, 255, 255, 0.2), transparent);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    gap: 20px;
    max-height: calc(100vh - (var(--kc-shell-gutter) * 2));
    max-height: calc(100dvh - (var(--kc-shell-gutter) * 2));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px;
    position: -webkit-sticky;
    position: sticky;
    scrollbar-gutter: stable;
    top: var(--kc-shell-gutter);
}

html[data-kc-theme="dark"] .card,
html[data-kc-theme="dark"] .metric,
html[data-kc-theme="dark"] .info-banner,
html[data-kc-theme="dark"] .login-card,
html[data-kc-theme="dark"] .status-tile,
html[data-kc-theme="dark"] .table-wrap,
html[data-kc-theme="dark"] .empty-state,
html[data-kc-theme="dark"] .shell-topbar,
html[data-kc-theme="dark"] .shell-drawer,
html[data-kc-theme="dark"] .app-footer {
    background: var(--kc-panel-strong);
}

html[data-kc-theme="dark"] .hero-card {
    background: linear-gradient(145deg, #15221c 0%, #101a16 100%);
}

html[data-kc-theme="dark"] .shell-sidebar {
    background:
        linear-gradient(180deg, rgba(20, 32, 27, 0.95), rgba(15, 25, 21, 0.92)),
        linear-gradient(160deg, rgba(79, 206, 145, 0.08), transparent);
}

html[data-kc-theme="dark"] input,
html[data-kc-theme="dark"] select,
html[data-kc-theme="dark"] textarea {
    background-color: #0e1713;
    border-color: rgba(183, 244, 208, 0.18);
    color: var(--kc-ink);
}

html[data-kc-theme="dark"] input::placeholder,
html[data-kc-theme="dark"] textarea::placeholder {
    color: rgba(184, 200, 191, 0.72);
}

.shell-sidebar__brand,
.shell-drawer__brand {
    align-items: center;
    gap: 14px;
}

.shell-sidebar__brand img,
.shell-drawer__brand img {
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(116, 29, 21, 0.16);
    height: 56px;
    object-fit: cover;
    width: 56px;
}

.shell-sidebar__brand-copy strong,
.shell-drawer__brand-copy strong {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.shell-sidebar__brand-copy span,
.shell-drawer__brand-copy span {
    color: var(--kc-muted);
    font-size: 0.9rem;
}

.shell-sidebar__user,
.shell-drawer__user {
    background: linear-gradient(135deg, rgba(241, 248, 244, 0.98), rgba(228, 244, 234, 0.94));
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 20px;
    padding: 14px;
}

.shell-sidebar__user {
    align-items: center;
}

.shell-drawer__user {
    align-items: flex-start;
    gap: 12px;
}

.shell-sidebar__avatar,
.shell-drawer__avatar,
.shell-avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--kc-red) 0%, var(--kc-red-deep) 100%);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    letter-spacing: 0.08em;
    overflow: hidden;
    width: 42px;
}

/* When the user-card row is wrapped in <a> for residents, keep the visual
   identical to the unlinked version but add a subtle hover lift. */
a.shell-sidebar__user--link,
a.shell-drawer__user--link {
    color: inherit;
    text-decoration: none;
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
a.shell-sidebar__user--link:hover,
a.shell-drawer__user--link:hover,
a.shell-sidebar__user--link:focus-visible,
a.shell-drawer__user--link:focus-visible {
    border-color: rgba(20, 121, 77, 0.22);
    box-shadow: 0 12px 24px rgba(67, 22, 14, 0.10);
    transform: translateY(-1px);
    outline: none;
}
a.shell-avatar--link {
    text-decoration: none;
}

.shell-sidebar__user-copy strong,
.shell-drawer__user-copy strong {
    display: block;
}

.shell-sidebar__user-copy span,
.shell-drawer__user-copy span {
    color: var(--kc-muted);
    font-size: 0.88rem;
}

.shell-sidebar__group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shell-sidebar__footer {
    margin-top: auto;
}

.shell-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shell-link {
    align-items: flex-start;
    background: rgba(255, 255, 252, 0.7);
    border: 1px solid transparent;
    border-radius: 18px;
    color: var(--kc-ink);
    gap: 14px;
    min-width: 0;
    padding: 14px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.shell-link:hover,
.shell-link:focus-visible {
    background: #ffffff;
    border-color: rgba(20, 121, 77, 0.18);
    box-shadow: 0 14px 26px rgba(13, 60, 38, 0.07);
    transform: translateY(-1px);
}

.shell-link.is-active {
    /* §12 — active nav uses the KIGRA green wash. */
    background: linear-gradient(135deg, rgba(20, 121, 77, 0.14), rgba(220, 240, 230, 0.98));
    border-color: rgba(20, 121, 77, 0.22);
    box-shadow: inset 0 0 0 1px rgba(20, 121, 77, 0.10);
}

.shell-link--logout {
    background: rgba(255, 247, 244, 0.88);
}

.shell-link__icon,
.mobile-tab__icon {
    color: var(--kc-green-deep);
    display: grid;
    flex: 0 0 auto;
    place-items: center;
}

.shell-link__icon svg,
.mobile-tab__icon svg,
.shell-menu-button svg {
    display: block;
    height: 22px;
    width: 22px;
}

.shell-link__copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.shell-link__copy strong {
    display: block;
    font-size: 0.98rem;
}

.shell-link__copy span {
    font-size: 0.84rem;
    line-height: 1.45;
}

.shell-topbar {
    align-items: center;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 252, 0.95);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 10px 16px;
    /* Sticky topbar: stays pinned to the viewport top as the user scrolls.
       NOTE: do NOT add a transform here — `transform: translateZ(0)` on the
       sticky element itself triggers a Safari iOS bug where sticky tracking
       silently breaks once the page has scrolled past the element's natural
       position. Modern browsers handle backdrop-filter without that hack. */
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 25;
}

.shell-topbar__left,
.shell-topbar__right {
    min-width: 0;
}

.shell-titlebox {
    min-width: 0;
}

.shell-title {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.shell-subtitle {
    font-size: 0.78rem;
    margin-top: 1px;
}

.shell-chip {
    background: rgba(20, 121, 77, 0.08);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 999px;
    color: var(--kc-red-deep);
    font-size: 0.76rem;
    font-weight: 900;
    min-height: 34px;
    padding: 8px 12px;
    white-space: nowrap;
}

.shell-chip--soft {
    background: rgba(255, 255, 255, 0.66);
    color: var(--kc-muted);
}

.shell-signout,
.shell-drawer__logout {
    color: var(--kc-red-deep);
    font-weight: 800;
    text-decoration: none;
}

.shell-alert {
    align-items: center;
    background: rgba(20, 121, 77, 0.08);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 16px;
    color: var(--kc-red-deep);
    display: inline-flex;
    height: 44px;
    justify-content: center;
    position: relative;
    text-decoration: none;
    width: 44px;
}

.shell-alert__icon {
    display: grid;
    place-items: center;
}

.shell-alert__icon svg {
    display: block;
    height: 22px;
    width: 22px;
}

.shell-alert__badge {
    align-items: center;
    background: var(--kc-danger);
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    display: none;
    font-size: 0.68rem;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    min-width: 22px;
    padding: 0 6px;
    position: absolute;
    right: -6px;
    top: -6px;
}

.shell-alert__badge.is-visible {
    display: inline-flex;
}

.shell-menu-button {
    align-items: center;
    background: rgba(20, 121, 77, 0.08);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 16px;
    color: var(--kc-red-deep);
    cursor: pointer;
    display: none;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 44px;
}

.shell-tool-button {
    align-items: center;
    background: rgba(20, 121, 77, 0.08);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 16px;
    color: var(--kc-red-deep);
    cursor: pointer;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    width: 44px;
}

.shell-tool-button svg {
    display: block;
    height: 22px;
    width: 22px;
}

.shell-overlay {
    background: rgba(29, 14, 10, 0.42);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.2s ease;
    z-index: 70;
}

.shell-drawer {
    background:
        linear-gradient(180deg, rgba(241, 248, 244, 0.98), rgba(255, 245, 241, 0.96)),
        linear-gradient(160deg, rgba(255, 255, 255, 0.18), transparent);
    display: none;
    height: 100vh;
    height: 100dvh;
    left: 0;
    max-width: 360px;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px;
    position: fixed;
    top: 0;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
    width: min(88vw, 360px);
    z-index: 80;
}

.shell-drawer__nav {
    gap: 18px;
    margin-top: 18px;
}

.shell-drawer__logout {
    margin-top: 4px;
}

body.drawer-open .shell-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.drawer-open .shell-drawer {
    transform: translateX(0);
}

.app-footer {
    align-items: center;
    background: rgba(241, 248, 244, 0.86);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 8px;
    padding: 18px 20px;
}

.app-footer__brand strong {
    display: block;
    margin-bottom: 4px;
}

.app-footer span {
    color: var(--kc-muted);
}

.app-footer__meta {
    gap: 4px;
    text-align: right;
}

.login-stage {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    min-height: calc(100vh - 170px);
    padding: 10px 0 20px;
}

.login-stage > * {
    min-width: 0;
}

.login-side {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 26%),
        linear-gradient(150deg, #0d5e3b 0%, #14794d 50%, #1c9560 100%);
    border-radius: var(--kc-radius-xl);
    box-shadow: var(--kc-shadow-strong);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
    padding: clamp(28px, 3vw, 38px);
    position: relative;
}

.login-side::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 58%);
    content: "";
    height: 260px;
    position: absolute;
    right: -34px;
    top: -36px;
    width: 260px;
}

.login-side .badge {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.login-side h1 {
    font-size: clamp(2.5rem, 4vw, 4.3rem);
    line-height: 0.95;
    margin: 0;
    max-width: 10.5ch;
    position: relative;
    z-index: 1;
}

.login-subtitle {
    font-size: 1.02rem;
    margin: 0;
    max-width: 42rem;
    position: relative;
    z-index: 1;
}

.login-feature-list {
    position: relative;
    z-index: 1;
}

.login-feature {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.login-feature span {
    color: rgba(255, 243, 239, 0.84);
}

.login-status-grid,
.card-grid,
.compact-grid,
.form-grid,
.split-grid,
.dashboard-grid,
.dashboard-hero,
.hero-stat-grid,
.stat-grid {
    display: grid;
    gap: 16px;
}

.login-status-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    position: relative;
    z-index: 1;
}

.status-tile {
    background: rgba(255, 255, 255, 0.96);
}

.login-card {
    padding: 28px;
}

.login-card h2 {
    font-size: 1.95rem;
    margin: 10px 0 8px;
}

.login-panel__lead {
    margin: 0 0 18px;
}

.auth-error {
    background: rgba(20, 121, 77, 0.1);
    border: 1px solid rgba(20, 121, 77, 0.18);
    border-radius: 16px;
    color: var(--kc-red-deep);
    margin-bottom: 16px;
    padding: 14px 16px;
}

.status-list,
.health-list,
.detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.status-list li,
.health-list li,
.detail-list li {
    background: rgba(241, 248, 244, 0.8);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 16px;
    padding: 14px;
}

.health-list strong,
.detail-list strong {
    display: block;
    margin-bottom: 6px;
}

.detail-list span,
.health-list span {
    color: var(--kc-muted);
}

.launch-grid {
    gap: 14px;
}

.launch-card {
    background: rgba(255, 247, 243, 0.84);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 18px;
    color: var(--kc-red-deep);
    flex: 1 1 220px;
    min-height: 132px;
    padding: 18px;
    text-decoration: none;
}

.launch-card strong {
    display: block;
    margin-bottom: 6px;
}

.launch-card span {
    color: var(--kc-muted);
    display: block;
}

.launch-card:hover,
.launch-card:focus-visible {
    border-color: rgba(20, 121, 77, 0.16);
    box-shadow: 0 14px 26px rgba(67, 22, 14, 0.08);
}

.hero-actions {
    margin-top: 20px;
}

.dashboard-hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.dashboard-grid,
.split-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
}

.compact-grid,
.form-grid,
.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 8px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(20, 121, 77, 0.16);
    border-radius: var(--kc-radius-sm);
    color: var(--kc-ink);
    min-height: 48px;
    padding: 13px 15px;
    width: 100%;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(20, 121, 77, 0.58);
    box-shadow: 0 0 0 4px rgba(20, 121, 77, 0.1);
    outline: none;
}

.info-banner {
    align-items: flex-start;
    display: flex;
    gap: 12px;
}

.info-banner--warn {
    border-color: rgba(154, 91, 4, 0.22);
}

.table-wrap {
    overflow: auto;
    padding: 0;
}

.data-table {
    border-collapse: collapse;
    min-width: 860px;
    width: 100%;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid rgba(20, 121, 77, 0.08);
    padding: 15px 16px;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: rgba(255, 246, 242, 0.94);
    color: var(--kc-red-deep);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table strong {
    display: block;
}

.mono {
    font-family: Consolas, "Courier New", monospace;
}

.status-chip {
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
    gap: 6px;
    min-height: 30px;
    padding: 6px 11px;
}

.status-chip--ok {
    background: rgba(17, 115, 74, 0.1);
    color: var(--kc-success);
}

.status-chip--warn {
    background: rgba(154, 91, 4, 0.12);
    color: var(--kc-warning);
}

.status-chip--danger {
    background: rgba(180, 35, 24, 0.12);
    color: var(--kc-danger);
}

.status-chip--soft {
    background: rgba(116, 29, 21, 0.08);
    color: var(--kc-red-deep);
}

.notice-banner {
    background: rgba(17, 115, 74, 0.1);
    border: 1px solid rgba(17, 115, 74, 0.18);
    border-radius: 18px;
    color: var(--kc-success);
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
    padding: 14px 16px;
}

.notice-banner--warn {
    background: rgba(154, 91, 4, 0.1);
    border-color: rgba(154, 91, 4, 0.2);
    color: var(--kc-warning);
}

.notice-banner--error {
    background: rgba(201, 59, 45, 0.1);
    border-color: rgba(201, 59, 45, 0.18);
    color: var(--kc-red-deep);
}

.section-note {
    color: var(--kc-muted);
    margin: 0;
}

.guest-pass-card,
.scan-desk-panel,
.scan-desk-result,
.guest-verify-card,
.guest-pass-board__card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.guest-pass-card__head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.guest-pass-card__head h2,
.guest-verify-card h1,
.guest-pass-board__hero h1 {
    font-size: 1.45rem;
    line-height: 1.08;
    margin: 10px 0 6px;
}

.guest-pass-card__head p,
.guest-verify-card > p,
.guest-pass-board__hero p {
    color: var(--kc-muted);
    margin: 0;
}

.guest-pass-card__grid {
    margin-top: -4px;
}

.guest-pass-card__meta {
    color: var(--kc-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guest-pass-card__qr {
    align-items: center;
}

.guest-pass-card__qr img,
.guest-pass-board__qr img {
    background: #fff;
    border: 1px solid rgba(20, 121, 77, 0.12);
    border-radius: 24px;
    margin: 0 auto;
    max-width: 280px;
    padding: 14px;
    width: 100%;
}

.guest-pass-form__timed {
    align-items: start;
}

.guest-pass-board,
.guest-verify-shell {
    display: grid;
    place-items: center;
}

.guest-pass-board__card,
.guest-verify-card {
    background: linear-gradient(145deg, rgba(241, 248, 244, 0.98), rgba(255, 242, 236, 0.96));
    border: 1px solid var(--kc-border);
    border-radius: 28px;
    box-shadow: var(--kc-shadow-soft);
    max-width: 760px;
    padding: 26px;
    width: 100%;
}

.guest-pass-board__card {
    max-width: 560px;
}

.guest-pass-board__brand {
    align-items: center;
    display: flex;
    gap: 12px;
}

.guest-pass-board__brand img {
    height: 52px;
    object-fit: contain;
    width: 52px;
}

.guest-pass-board__brand span {
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guest-pass-board__hero {
    text-align: center;
}

.guest-pass-board__hero .status-chip {
    margin: 0 auto;
}

.guest-pass-board__meta {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guest-pass-board__actions {
    justify-content: center;
}

.guest-verify-card {
    text-align: center;
}

.guest-verify-card .status-chip {
    align-self: center;
}

.guest-verify-actions {
    margin-top: 6px;
    text-align: left;
}

.scan-desk-result {
    margin-top: 18px;
}

.scan-desk-grid,
.scan-desk-result__summary {
    display: grid;
    gap: 18px;
}

.scan-desk-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.scan-desk-form,
.scan-camera-card,
.scan-desk-result__aside,
.scan-desk-result__latest {
    display: flex;
    flex-direction: column;
}

.scan-desk-form,
.scan-camera-card {
    gap: 16px;
}

.scan-camera-card {
    background: linear-gradient(180deg, rgba(241, 248, 244, 0.96), rgba(250, 239, 234, 0.92));
    border: 1px solid var(--kc-border);
    border-radius: 24px;
    min-height: 100%;
    padding: 18px;
}

.scan-camera-card.is-active {
    border-color: rgba(20, 121, 77, 0.3);
    box-shadow: 0 22px 56px rgba(20, 121, 77, 0.12);
}

.scan-camera-card.is-disabled {
    opacity: 0.88;
}

.scan-camera-card__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scan-camera-card__copy span,
.scan-camera-card__status,
.scan-desk-result__latest span {
    color: var(--kc-muted);
}

.scan-camera-card__preview {
    align-items: center;
    background:
        radial-gradient(circle at top, rgba(20, 121, 77, 0.14), transparent 44%),
        linear-gradient(180deg, rgba(35, 26, 24, 0.96), rgba(73, 28, 21, 0.98));
    border-radius: 20px;
    display: grid;
    min-height: 240px;
    overflow: hidden;
    place-items: center;
    position: relative;
}

.scan-camera-card__preview::after {
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 24px;
    content: "";
    height: min(68vw, 180px);
    max-height: 180px;
    max-width: 180px;
    pointer-events: none;
    position: absolute;
    width: min(68vw, 180px);
}

.scan-camera-card__preview video {
    display: block;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    width: 100%;
}

.scan-desk-result__summary {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
}

.scan-desk-result__aside {
    gap: 14px;
}

.scan-desk-result__qr {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 253, 252, 0.98), rgba(252, 241, 236, 0.94));
    border: 1px solid var(--kc-border);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    padding: 14px;
}

.scan-desk-result__qr img {
    background: #fff;
    border-radius: 20px;
    max-width: 180px;
    padding: 12px;
    width: 100%;
}

.scan-desk-result__photo {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 253, 252, 0.98), rgba(252, 241, 236, 0.94));
    border: 1px solid var(--kc-border);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    min-height: 240px;
    overflow: hidden;
    padding: 12px;
}

.scan-desk-result__photo img {
    aspect-ratio: 4 / 5;
    border-radius: 20px;
    display: block;
    height: 100%;
    max-height: 280px;
    object-fit: cover;
    width: 100%;
}

.scan-desk-result__photo--empty {
    color: var(--kc-muted);
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    text-align: center;
}

.scan-desk-result__photo--empty strong {
    color: var(--kc-ink);
    font-size: 1.1rem;
}

.scan-desk-result__latest {
    background: rgba(241, 248, 244, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 20px;
    gap: 6px;
    padding: 14px;
}

.scan-desk-result__latest strong {
    color: var(--kc-ink);
}

/* Glanceable gate verdict — big colour-flooded banner a guard can read at arm's length, day or night. */
.scan-verdict {
    align-items: center;
    border-radius: 24px;
    color: #fff;
    display: flex;
    gap: 18px;
    margin-top: 18px;
    padding: 20px 22px;
}

.scan-verdict__icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    display: flex;
    flex: 0 0 auto;
    font-size: 2rem;
    font-weight: 900;
    height: 64px;
    justify-content: center;
    line-height: 1;
    width: 64px;
}

.scan-verdict__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.scan-verdict__headline {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

.scan-verdict__detail {
    font-size: 0.98rem;
    opacity: 0.95;
}

.scan-verdict--ok {
    background: linear-gradient(135deg, #1f9d57, #0f6f3c);
    box-shadow: 0 18px 44px rgba(15, 111, 60, 0.32);
}

.scan-verdict--bad {
    background: linear-gradient(135deg, #d4382b, #8e1b12);
    box-shadow: 0 18px 44px rgba(142, 27, 18, 0.34);
}

.scan-verdict--warn {
    background: linear-gradient(135deg, #d98a1f, #9a5b00);
    box-shadow: 0 18px 44px rgba(154, 91, 0, 0.3);
}

.scan-verdict--info {
    background: linear-gradient(135deg, #2f6db2, #234f80);
    box-shadow: 0 18px 44px rgba(35, 79, 128, 0.3);
}

/* Anti-passback / re-entry caution strip shown above the action buttons. */
.scan-passback-warn {
    align-items: center;
    background: rgba(217, 138, 31, 0.12);
    border: 1px solid rgba(154, 91, 0, 0.35);
    border-radius: 16px;
    color: #7a4a00;
    display: flex;
    gap: 10px;
    margin: 12px 0;
    padding: 12px 14px;
}

.scan-passback-warn strong {
    color: #5f3a00;
}

@media (max-width: 640px) {
    .scan-verdict {
        gap: 14px;
        padding: 16px;
    }

    .scan-verdict__icon {
        font-size: 1.6rem;
        height: 52px;
        width: 52px;
    }

    .scan-verdict__headline {
        font-size: 1.25rem;
    }
}

.card--soft {
    background: linear-gradient(180deg, rgba(241, 248, 244, 0.95), rgba(250, 240, 234, 0.9));
}

.request-summary-grid,
.request-filter-form,
.request-list,
.request-card__meta,
.request-type-grid,
.request-create-grid,
.request-priority-list,
.request-thread,
.request-attachment-list {
    display: grid;
    gap: 16px;
}

.request-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
}

.request-filter-card,
.request-thread-card,
.request-create-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.request-filter-form {
    align-items: end;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(180px, 1fr)) auto;
}

.request-filter-form__actions {
    display: flex;
    gap: 10px;
}

.request-home-chip {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(20, 121, 77, 0.14);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 18px;
    max-width: 440px;
    padding: 16px 18px;
}

.request-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.request-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.request-card:hover {
    border-color: rgba(20, 121, 77, 0.2);
    box-shadow: 0 24px 60px rgba(67, 21, 12, 0.12);
    transform: translateY(-3px);
}

.request-card__top {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.request-card__top h3,
.request-view-hero h2 {
    font-size: 1.4rem;
    line-height: 1.08;
    margin: 12px 0 6px;
}

.request-card__top p,
.request-view-hero p {
    color: var(--kc-muted);
    margin: 0;
}

.request-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.priority-chip {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    min-height: 32px;
    padding: 0 12px;
    text-transform: uppercase;
}

.priority-chip--urgent {
    background: rgba(180, 35, 24, 0.12);
    color: var(--kc-danger);
}

.priority-chip--high {
    background: rgba(154, 91, 4, 0.12);
    color: var(--kc-warning);
}

.priority-chip--medium {
    background: rgba(20, 121, 77, 0.1);
    color: var(--kc-red-deep);
}

.priority-chip--low {
    background: rgba(17, 115, 74, 0.1);
    color: var(--kc-success);
}

.request-card__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-type-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.request-type-option input,
.request-priority-option input {
    left: -9999px;
    position: absolute;
}

.request-type-option {
    position: relative;
}

.request-type-option__card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 241, 235, 0.88));
    border: 1px solid rgba(20, 121, 77, 0.12);
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 148px;
    padding: 18px;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.request-type-option__card strong {
    color: var(--kc-ink);
    font-size: 1rem;
}

.request-type-option__card span {
    color: var(--kc-muted);
    line-height: 1.55;
}

.request-type-option input:checked + .request-type-option__card {
    border-color: rgba(20, 121, 77, 0.46);
    box-shadow: 0 20px 46px rgba(20, 121, 77, 0.12);
    transform: translateY(-2px);
}

.request-create-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.request-priority-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-priority-option {
    position: relative;
}

.request-priority-option span {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 121, 77, 0.12);
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    font-weight: 800;
    justify-content: center;
    min-height: 52px;
    padding: 0 14px;
    transition: border-color 180ms ease, background 180ms ease;
}

.request-priority-option input:checked + span {
    background: rgba(20, 121, 77, 0.1);
    border-color: rgba(20, 121, 77, 0.42);
    color: var(--kc-red-deep);
}

.request-view-hero,
.request-thread-card__head,
.request-message__head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.request-view-hero__meta {
    display: grid;
    gap: 12px;
    min-width: 240px;
}

.request-view-hero__meta strong {
    display: block;
}

.request-description {
    color: var(--kc-ink);
    line-height: 1.7;
    margin: 0;
}

.request-thread {
    gap: 14px;
}

.request-message {
    background: linear-gradient(180deg, rgba(255, 253, 252, 0.98), rgba(251, 243, 238, 0.92));
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.request-message--internal {
    background: linear-gradient(180deg, rgba(255, 249, 240, 0.98), rgba(252, 238, 225, 0.92));
}

.request-message__head span,
.request-attachment span {
    color: var(--kc-muted);
}

.request-message p {
    margin: 0;
    white-space: pre-wrap;
}

.request-toggle {
    align-items: center;
    display: flex;
    gap: 10px;
}

.request-sidebar {
    min-width: 0;
}

.request-attachment-list {
    gap: 12px;
}

.request-attachment {
    background: rgba(241, 248, 244, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 14px 16px;
    text-decoration: none;
}

.request-attachment strong {
    color: var(--kc-ink);
}

.maintenance-summary-grid,
.maintenance-filter-form,
.maintenance-list,
.maintenance-card__meta,
.maintenance-log-list,
.maintenance-inline-list {
    display: grid;
    gap: 16px;
}

.maintenance-side-list,
.maintenance-view-hero,
.maintenance-view-hero__meta,
.maintenance-log__head {
    display: flex;
    gap: 16px;
}

.maintenance-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
}

.maintenance-filter-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.maintenance-filter-form {
    align-items: end;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(180px, 1fr)) auto;
}

.maintenance-filter-form__actions {
    display: flex;
    gap: 10px;
}

.maintenance-layout,
.maintenance-create-layout {
    align-items: start;
}

.maintenance-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.maintenance-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.maintenance-card:hover {
    border-color: rgba(20, 121, 77, 0.2);
    box-shadow: 0 24px 60px rgba(67, 21, 12, 0.12);
    transform: translateY(-3px);
}

.maintenance-card__top {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.maintenance-card__top h3,
.maintenance-view-hero h2 {
    font-size: 1.42rem;
    line-height: 1.08;
    margin: 12px 0 6px;
}

.maintenance-card__top p,
.maintenance-view-hero p,
.maintenance-side-copy,
.maintenance-log span,
.maintenance-side-item span,
.maintenance-inline-card span {
    color: var(--kc-muted);
    margin: 0;
}

.maintenance-card__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.maintenance-side-list {
    flex-direction: column;
}

.maintenance-side-item,
.maintenance-inline-card {
    background: rgba(241, 248, 244, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 14px 16px;
    text-decoration: none;
}

.maintenance-side-item strong,
.maintenance-inline-card strong {
    color: var(--kc-ink);
}

.maintenance-view-hero,
.maintenance-log__head {
    align-items: flex-start;
    justify-content: space-between;
}

.maintenance-view-hero__meta {
    flex-direction: column;
    min-width: 240px;
}

.maintenance-view-hero__meta strong {
    display: block;
}

.maintenance-log-list,
.maintenance-inline-list {
    gap: 12px;
}

.maintenance-log {
    background: linear-gradient(180deg, rgba(255, 253, 252, 0.98), rgba(251, 243, 238, 0.92));
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.maintenance-log p {
    margin: 0;
    white-space: pre-wrap;
}

.payment-channel-card,
.payment-submission-card {
    background: rgba(241, 248, 244, 0.82);
    border: 1px solid rgba(20, 121, 77, 0.12);
    border-radius: 20px;
    padding: 18px;
}

.payment-channel-card,
.payment-submission-card,
.payment-submission-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.payment-channel-card__grid,
.payment-submission-card__meta,
.payment-confirm-grid {
    display: grid;
    gap: 16px;
}

.payment-channel-card__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-channel-card p,
.payment-submission-card__head p,
.payment-submission-card__copy,
.payment-submission-card span {
    color: var(--kc-muted);
    margin: 0;
}

.payment-submission-card__head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.payment-submission-card__head h3 {
    font-size: 1.2rem;
    line-height: 1.08;
    margin: 10px 0 6px;
}

.payment-submission-card__amount {
    color: var(--kc-red-deep);
    font-size: 1.4rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.payment-submission-card__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-confirm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.login-page--simple .content-area--guest {
    display: grid;
    min-height: calc(100vh - 128px);
    place-items: center;
    padding: 16px 0 40px;
}

.login-screen {
    display: grid;
    min-height: calc(100vh - 148px);
    place-items: center;
    width: 100%;
}

.login-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: min(100%, 420px);
}

.login-brandmark {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: center;
}

.login-logo {
    height: 72px;
    object-fit: contain;
    width: 72px;
}

.login-brandcopy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-brandcopy strong {
    font-size: 1.02rem;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.login-brandcopy span {
    color: var(--kc-muted);
    font-size: 0.92rem;
}

.login-simple-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--kc-border);
    border-radius: 28px;
    box-shadow: var(--kc-shadow-strong);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
}

.login-title {
    font-size: clamp(2rem, 5vw, 2.35rem);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 0.98;
    margin: 0;
}

.login-note {
    color: var(--kc-muted);
    margin: -8px 0 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-form__row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-link-row {
    display: flex;
    justify-content: center;
}

.login-link {
    color: var(--kc-red-deep);
    font-weight: 800;
    text-decoration: none;
}

.login-install-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-install-ios {
    background: rgba(241, 248, 244, 0.88);
    border: 1px solid var(--kc-border);
    border-radius: 16px;
    padding: 14px 16px;
}

.login-install-ios strong {
    display: block;
    margin-bottom: 4px;
}

.login-install-ios span {
    color: var(--kc-muted);
    display: block;
    line-height: 1.55;
}

.access-hero {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.access-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.access-hero__copy h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    margin: 0;
    max-width: 14ch;
}

.access-hero__copy p {
    margin: 0;
    max-width: 54rem;
}

.access-hero__actions {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.access-hero__stat,
.access-summary-card,
.access-side-item {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(20, 121, 77, 0.12);
    border-radius: 20px;
}

.access-hero__stat {
    padding: 18px;
}

.access-hero__stat strong,
.access-summary-card strong {
    display: block;
    font-size: 2rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    margin-top: 8px;
}

.access-hero__stat span,
.access-summary-card span {
    color: var(--kc-red-deep);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.access-summary-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.access-summary-card {
    padding: 18px;
}

.access-summary-card p {
    color: var(--kc-muted);
    line-height: 1.6;
    margin: 10px 0 0;
}

.access-summary-card--ready {
    background: linear-gradient(160deg, rgba(255, 248, 237, 0.98), rgba(255, 255, 255, 0.92));
}

.access-summary-card--sent {
    background: linear-gradient(160deg, rgba(255, 245, 232, 0.98), rgba(255, 255, 255, 0.92));
}

.access-summary-card--active {
    background: linear-gradient(160deg, rgba(241, 250, 245, 0.98), rgba(255, 255, 255, 0.92));
}

.access-summary-card--review {
    background: linear-gradient(160deg, rgba(228, 244, 234, 0.98), rgba(255, 255, 255, 0.92));
}

.access-layout {
    align-items: start;
}

.access-toolbar {
    gap: 16px;
}

.access-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.access-filter-pill {
    align-items: center;
    background: rgba(255, 247, 243, 0.84);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 999px;
    color: var(--kc-red-deep);
    display: inline-flex;
    gap: 10px;
    min-height: 42px;
    padding: 10px 14px;
    text-decoration: none;
}

.access-filter-pill strong {
    background: rgba(20, 121, 77, 0.1);
    border-radius: 999px;
    color: var(--kc-red-deep);
    font-size: 0.82rem;
    min-width: 28px;
    padding: 4px 8px;
    text-align: center;
}

.access-filter-pill.is-active {
    background: linear-gradient(135deg, rgba(20, 121, 77, 0.14), rgba(255, 236, 229, 0.98));
    border-color: rgba(20, 121, 77, 0.16);
    box-shadow: 0 14px 26px rgba(67, 22, 14, 0.08);
}

.access-card-list,
.access-side-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.access-card {
    gap: 16px;
}

.access-card--warning {
    background: linear-gradient(180deg, rgba(241, 248, 244, 0.98), rgba(255, 246, 239, 0.94));
}

.access-card--success {
    background: linear-gradient(180deg, rgba(252, 255, 253, 0.98), rgba(243, 250, 246, 0.94));
}

.access-card--danger {
    background: linear-gradient(180deg, rgba(241, 248, 244, 0.98), rgba(228, 244, 234, 0.94));
}

.access-card__top,
.access-card__actions {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.access-card__titlebox {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.access-card__titlebox h3 {
    font-size: 1.5rem;
    letter-spacing: -0.04em;
    line-height: 1.02;
    margin: 0;
}

.access-card__titlebox p {
    color: var(--kc-muted);
    margin: 0;
}

.access-card__grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.access-card__grid strong {
    display: block;
    line-height: 1.45;
}

.access-card__note {
    color: var(--kc-muted);
    line-height: 1.65;
    margin: 0;
}

.access-card__actions {
    align-items: center;
}

.access-side-card h3 {
    margin: 0 0 14px;
}

.access-side-item {
    padding: 14px;
}

.access-side-item strong {
    display: block;
    margin-bottom: 6px;
}

.access-side-item span {
    color: var(--kc-muted);
    line-height: 1.6;
}

.records-hero {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
}

.records-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.records-hero__copy h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    margin: 0;
    max-width: 14ch;
}

.records-hero__copy p {
    margin: 0;
    max-width: 56rem;
}

.records-actions {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.records-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
}

.records-summary-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.records-summary-card,
.records-history-item {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(20, 121, 77, 0.12);
    border-radius: 20px;
}

.records-summary-card {
    padding: 18px;
}

.records-summary-card span {
    color: var(--kc-red-deep);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.records-summary-card strong {
    display: block;
    font-size: 2rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    margin-top: 8px;
}

.records-summary-card--soft {
    background: linear-gradient(160deg, rgba(255, 248, 239, 0.98), rgba(255, 255, 255, 0.92));
}

.records-summary-card--highlight {
    background: linear-gradient(160deg, rgba(241, 248, 244, 0.98), rgba(255, 255, 255, 0.92));
}

.records-history-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.records-history-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.records-history-item__top {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.records-history-item span,
.records-history-item p {
    color: var(--kc-muted);
}

.records-history-item p {
    line-height: 1.6;
    margin: 0;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.notification-card {
    background: var(--kc-panel-strong);
    border: 1px solid var(--kc-border);
    border-radius: 22px;
    box-shadow: var(--kc-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.notification-card--unread {
    border-color: rgba(20, 121, 77, 0.18);
    box-shadow: 0 18px 36px rgba(116, 29, 21, 0.1);
}

.notification-card__head,
.notification-card__meta,
.notification-card__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.notification-card__title {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0;
}

.notification-card__time,
.notification-card__message,
.notification-card__meta span {
    color: var(--kc-muted);
}

.notification-card__message {
    line-height: 1.65;
    margin: 0;
}

.messaging-hero,
.messaging-status-grid,
.messaging-grid,
.messaging-two-col,
.messaging-three-col,
.messaging-queue-list {
    display: grid;
    gap: 18px;
}

.messaging-hero {
    align-items: stretch;
    background:
        radial-gradient(circle at top right, rgba(20, 121, 77, 0.16), transparent 30%),
        radial-gradient(circle at 8% 12%, rgba(17, 115, 74, 0.13), transparent 28%),
        linear-gradient(145deg, rgba(241, 248, 244, 0.98), rgba(228, 244, 234, 0.96));
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    overflow: hidden;
}

.messaging-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
}

.messaging-hero__copy h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -0.045em;
    line-height: 1.04;
    margin: 0;
}

.messaging-hero__copy p {
    color: var(--kc-muted);
    font-size: 1.03rem;
    line-height: 1.7;
    margin: 0;
    max-width: 48rem;
}

.messaging-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.messaging-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.messaging-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
}

.messaging-panel__head {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
}

.messaging-panel__head h2 {
    font-size: 1.45rem;
    margin: 10px 0 8px;
}

.messaging-panel__head p {
    line-height: 1.65;
    margin: 0;
    max-width: 46rem;
}

.messaging-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.messaging-three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.messaging-test-row {
    align-items: end;
    background: rgba(241, 248, 244, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 22px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(180px, 1fr) auto;
    padding: 16px;
}

.messaging-test-row--sms {
    grid-template-columns: minmax(150px, 0.45fr) minmax(220px, 1fr) auto;
}

.messaging-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.messaging-mini-stats span {
    background: rgba(20, 121, 77, 0.08);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 999px;
    color: var(--kc-red-deep);
    font-size: 0.86rem;
    font-weight: 900;
    padding: 9px 12px;
}

.messaging-queue-list {
    grid-template-columns: 1fr;
}

.messaging-queue-card {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.32fr);
}

.messaging-queue-card h3 {
    font-size: 1.12rem;
    line-height: 1.2;
    margin: 12px 0 8px;
}

.messaging-queue-card p {
    line-height: 1.65;
    margin: 0;
}

.messaging-queue-card__side {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.82), transparent 30%),
        rgba(241, 248, 244, 0.86);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.messaging-queue-card__side span {
    color: var(--kc-red-deep);
    font-weight: 950;
}

.messaging-queue-card__side strong {
    color: var(--kc-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.kv-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 20px;
}

.empty-state {
    align-items: flex-start;
    border-style: dashed;
    color: var(--kc-muted);
}

.mobile-tabbar {
    display: none;
}

.mobile-tab {
    align-items: center;
    border-radius: 18px;
    color: var(--kc-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-width: 0;
    padding: 10px 6px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.mobile-tab__text {
    display: block;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-tab.is-active {
    background: linear-gradient(135deg, rgba(20, 121, 77, 0.12), rgba(255, 235, 228, 0.98));
    color: var(--kc-red-deep);
}

.mobile-tab:active {
    transform: translateY(1px);
}

@media (max-width: 1180px) {
    :root {
        --kc-shell-gutter: 0px;
        --kc-mobile-tabbar-height: calc(84px + var(--kc-safe-area-bottom));
    }

    html {
        scroll-padding-bottom: calc(var(--kc-mobile-tabbar-height) + 24px);
    }

    body.drawer-open {
        left: 0;
        overflow: hidden;
        position: fixed;
        right: 0;
        touch-action: none;
        width: 100%;
    }

    .app-frame {
        grid-template-columns: 1fr;
        padding-bottom: calc(24px + var(--kc-mobile-tabbar-height));
        padding-top: 16px;
    }

    .shell-sidebar {
        display: none;
    }

    .shell-drawer {
        height: calc(var(--kc-real-vh, 1vh) * 100);
        max-height: calc(var(--kc-real-vh, 1vh) * 100);
        display: block;
    }

    .shell-menu-button {
        display: inline-flex;
    }

    .shell-topbar {
        top: 14px;
    }

    .dashboard-hero,
    .dashboard-grid,
    .split-grid,
    .login-stage,
    .access-hero,
    .records-hero,
    .records-layout {
        grid-template-columns: 1fr;
    }

    .mobile-tabbar {
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        background: rgba(241, 248, 244, 0.94);
        border-top: 1px solid rgba(20, 121, 77, 0.1);
        bottom: 0;
        box-shadow: 0 -18px 40px rgba(67, 22, 14, 0.12);
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        left: 0;
        min-height: var(--kc-mobile-tabbar-height);
        padding: 10px 10px calc(12px + var(--kc-safe-area-bottom));
        /* `position: fixed` pins to the viewport ONLY if no ancestor has a
           transform/filter/perspective applied. We've also removed the
           translateY in kc-fade-in on .app-shell to keep that promise. The
           explicit inset values (top/bottom/left/right) keep us safe even
           when the OS chrome (iOS Safari URL bar) changes height. */
        position: fixed;
        right: 0;
        z-index: 65;
    }

    .app-shell--signed-in .content-area {
        padding-bottom: 0;
    }

    .app-shell--signed-in .app-footer {
        margin-bottom: 0;
    }
}

@media (max-width: 860px) {
    .page-head,
    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .shell-topbar {
        align-items: center;
        flex-direction: row;
        gap: 10px;
        padding: 8px 12px;
        top: 0;
    }

    .page-head h1,
    .page-kicker {
        display: none;
    }

    .page-head p {
        font-size: 0.88rem;
    }

    .shell-signout {
        display: none;
    }

    .shell-topbar__left {
        flex: 1 1 auto;
        flex-wrap: nowrap;
        gap: 10px;
        overflow: hidden;
    }

    .shell-topbar__right {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 8px;
        justify-content: flex-end;
        margin-left: auto;
    }

    .shell-titlebox {
        overflow: hidden;
    }

    .shell-title {
        font-size: 1.02rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .shell-subtitle {
        display: none;
    }

    .shell-chip {
        display: none;
    }

    .app-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .access-hero__actions {
        grid-template-columns: 1fr;
    }

    .app-footer__meta {
        text-align: left;
    }

    .db-stats,
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .guest-pass-board__meta {
        grid-template-columns: 1fr;
    }

    .guest-pass-card__head {
        flex-direction: column;
    }

    .scan-desk-grid,
    .scan-desk-result__summary {
        grid-template-columns: 1fr;
    }

    .request-summary-grid,
    .maintenance-summary-grid,
    .request-card__meta,
    .maintenance-card__meta,
    .request-priority-list,
    .payment-submission-card__meta {
        grid-template-columns: 1fr 1fr;
    }

    .request-filter-form,
    .maintenance-filter-form,
    .request-create-grid,
    .payment-channel-card__grid,
    .payment-confirm-grid {
        grid-template-columns: 1fr;
    }

    .request-view-hero,
    .request-thread-card__head,
    .request-message__head,
    .maintenance-view-hero,
    .maintenance-log__head,
    .payment-submission-card__head {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .app-frame {
        padding-left: 14px;
        padding-right: 14px;
        padding-top: 8px;
    }

    .card,
    .metric,
    .info-banner,
    .hero-card,
    .login-card,
    .status-tile,
    .shell-drawer,
    .app-footer {
        border-radius: 20px;
    }

    .shell-topbar {
        border-radius: 0;
        min-height: 48px;
        padding: 6px 10px;
    }

    .card,
    .metric,
    .info-banner,
    .login-card,
    .status-tile,
    .empty-state {
        padding: 18px;
    }

    .shell-menu-button,
    .shell-tool-button,
    .shell-alert,
    .shell-avatar {
        border-radius: 14px;
        flex: 0 0 auto;
        height: 38px;
        min-height: 38px;
        width: 38px;
    }

    .shell-menu-button svg,
    .shell-tool-button svg,
    .shell-alert svg {
        height: 20px;
        width: 20px;
    }

    .login-side {
        border-radius: 24px;
        padding: 24px;
    }

    .login-side h1 {
        max-width: none;
    }

    .login-shell {
        width: 100%;
    }

    .login-logo {
        height: 60px;
        width: 60px;
    }

    .login-simple-card {
        border-radius: 24px;
        padding: 22px;
    }

    .shell-chip,
    .shell-chip--soft,
    .shell-signout {
        display: none;
    }

    .access-card__top,
    .access-card__actions {
        flex-direction: column;
    }

    .data-table {
        min-width: 700px;
    }

    .db-stats {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1181px) {
    body.drawer-open {
        overflow: auto;
    }

    .shell-overlay,
    .shell-drawer,
    .mobile-tabbar {
        display: none !important;
    }
}

.guest-pass-preview {
    display: grid;
    gap: 24px;
}

.guest-pass-preview__panel {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.guest-pass-preview__copy {
    background:
        linear-gradient(160deg, #0d5e3b 0%, #14794d 55%, #1c9560 100%),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 36%);
    border: 1px solid rgba(200, 232, 214, 0.22);
    border-radius: 32px;
    box-shadow: 0 28px 80px rgba(13, 60, 38, 0.24);
    color: #f0fbf3;
    padding: 28px;
    position: sticky;
    top: 112px;
}

.guest-pass-preview__copy h1 {
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.05;
    margin: 14px 0 12px;
}

.guest-pass-preview__copy > p {
    color: rgba(240, 251, 243, 0.86);
    margin: 0;
}

.guest-pass-preview__facts {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr;
    margin-top: 24px;
}

.guest-pass-preview__fact {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 94px;
    padding: 16px;
}

.guest-pass-preview__fact span {
    color: rgba(240, 251, 243, 0.82);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.guest-pass-preview__fact strong {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.35;
}

.guest-pass-preview__actions {
    margin-top: 22px;
}

.guest-pass-preview__note {
    color: rgba(240, 251, 243, 0.78);
    font-size: 0.92rem;
    margin-top: 18px !important;
}

.guest-pass-preview__frame {
    background:
        linear-gradient(180deg, #ffffff 0%, #f1f7f3 100%),
        radial-gradient(circle at top right, rgba(20, 121, 77, 0.08), transparent 24%);
    border: 1px solid rgba(20, 121, 77, 0.16);
    border-radius: 36px;
    box-shadow: var(--kc-shadow-strong);
    padding: 18px;
}

.guest-pass-preview__frame-inner {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 24%),
        linear-gradient(180deg, rgba(18, 14, 13, 0.96), rgba(42, 18, 16, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 18px;
}

.guest-pass-preview__frame img {
    border-radius: 22px;
    display: block;
    height: auto;
    width: 100%;
}

.home-hero {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.home-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-hero__copy h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    margin: 0;
}

.home-hero__copy p {
    margin: 0;
    max-width: 56rem;
}

.home-hero__meta,
.home-mini-meta,
.home-person-card__top,
.home-panel-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.home-panel-head {
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.home-panel-head h2 {
    margin: 0;
}

.home-panel-head h3 {
    margin: 0;
}

.home-panel-head p {
    color: var(--kc-muted);
    line-height: 1.6;
    margin: 8px 0 0;
}

.profile-hero,
.profile-hero__stats,
.profile-form-grid,
.profile-member-grid {
    display: grid;
    gap: 18px;
}

.profile-hero {
    align-items: stretch;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.profile-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
}

.profile-hero__copy p {
    font-size: 1.03rem;
    margin: 0;
    max-width: 42rem;
}

.profile-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-form-card {
    overflow: hidden;
}

.profile-form-card .home-panel-head {
    margin-bottom: 18px;
}

.profile-form-grid,
.profile-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-form-grid > div,
.profile-member-grid > article {
    min-width: 0;
}

.profile-form-card form {
    gap: 20px;
}

.profile-form-grid > div {
    background: rgba(243, 250, 246, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.10);
    border-radius: 20px;
    padding: 16px;
}

.profile-member-grid .home-person-card {
    background: linear-gradient(160deg, rgba(247, 252, 249, 0.98), rgba(255, 255, 255, 0.94));
}

.profile-member-grid .button-group {
    margin-top: auto;
}

.content-hero,
.content-hero__stats,
.content-card-list,
.content-card__meta {
    display: grid;
    gap: 18px;
}

.content-hero {
    align-items: stretch;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.content-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
}

.content-hero__copy p {
    font-size: 1.03rem;
    margin: 0;
    max-width: 46rem;
}

.content-hero__stats {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.content-filter-card,
.content-form-card,
.content-body-card {
    overflow: hidden;
}

.content-filter-form {
    align-items: end;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.content-filter-form__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.content-card-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.content-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
}

.content-card__top {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.content-card__top h3 {
    font-size: 1.28rem;
    margin: 12px 0 8px;
}

.content-card__top p {
    margin: 0;
}

.content-card__meta {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.content-card__meta div {
    background: rgba(241, 248, 244, 0.86);
    border: 1px solid rgba(20, 121, 77, 0.10);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
}

.content-card__meta span {
    color: var(--kc-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.content-card__meta strong {
    font-size: 0.98rem;
    line-height: 1.45;
}

.content-body {
    color: var(--kc-ink);
    font-size: 1rem;
    line-height: 1.82;
    white-space: normal;
}

.content-body + .button-group {
    margin-top: 18px;
}

.engagement-confirm-card,
.engagement-hero {
    overflow: hidden;
}

.engagement-confirm-copy {
    color: var(--kc-muted);
    line-height: 1.65;
    margin: 0;
}

.engagement-confirm-empty {
    box-shadow: none;
    padding: 16px;
}

.engagement-list {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.engagement-person-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
}

.engagement-person-card__head {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.engagement-person-card__head strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1.25;
}

.engagement-person-card__head span:not(.status-chip) {
    color: var(--kc-muted);
    display: block;
    font-size: 0.92rem;
    margin-top: 6px;
    overflow-wrap: anywhere;
}

.meeting-hero,
.meeting-hero__stats,
.meeting-card-list,
.meeting-card__meta {
    display: grid;
    gap: 18px;
}

.meeting-hero {
    align-items: stretch;
    background:
        radial-gradient(circle at top right, rgba(20, 121, 77, 0.16), transparent 30%),
        linear-gradient(145deg, rgba(252, 255, 253, 0.98), rgba(228, 244, 234, 0.96));
    grid-template-columns: minmax(0, 1.16fr) minmax(280px, 0.84fr);
}

.meeting-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
}

.meeting-hero__copy h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -0.04em;
    line-height: 1.04;
    margin: 0;
}

.meeting-hero__copy p {
    font-size: 1.03rem;
    margin: 0;
    max-width: 48rem;
}

.meeting-hero__stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.meeting-card-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.meeting-card {
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
    overflow: hidden;
    text-decoration: none;
}

.meeting-card::before {
    background: linear-gradient(90deg, var(--kc-red), rgba(184, 112, 89, 0.22));
    content: "";
    height: 5px;
    margin: -20px -20px 0;
}

.meeting-card__top {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.meeting-card__top h3 {
    font-size: 1.26rem;
    line-height: 1.2;
    margin: 12px 0 8px;
}

.meeting-card__top p {
    color: var(--kc-muted);
    line-height: 1.6;
    margin: 0;
}

.meeting-card__meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meeting-card__meta div {
    background: rgba(241, 248, 244, 0.84);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 14px;
}

.meeting-card__meta span {
    color: var(--kc-muted);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.meeting-card__meta strong {
    font-size: 1rem;
    line-height: 1.36;
}

.meeting-form-card,
.meeting-body-card,
.meeting-attendance-panel {
    overflow: hidden;
}

.meeting-add-resident {
    align-items: end;
    background: rgba(241, 248, 244, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 22px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 0.7fr) minmax(180px, 1fr) auto;
    margin-top: 18px;
    padding: 16px;
}

.meeting-attendance-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.meeting-attendance-row {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 20px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.15fr);
    padding: 16px;
}

.meeting-attendance-row strong {
    display: block;
    font-size: 1.04rem;
    margin-top: 10px;
}

.meeting-attendance-row p {
    color: var(--kc-muted);
    line-height: 1.55;
    margin: 6px 0 0;
}

.meeting-attendance-row__form {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(140px, 0.7fr) minmax(160px, 1fr) auto;
}

.meeting-profile-card {
    overflow: hidden;
}

.meeting-profile-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.meeting-profile-item {
    align-items: center;
    background: rgba(241, 248, 244, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 18px;
    color: inherit;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 13px;
    text-decoration: none;
}

.meeting-profile-item strong {
    display: block;
    line-height: 1.25;
}

.meeting-profile-item span:not(.status-chip) {
    color: var(--kc-muted);
    display: block;
    font-size: 0.88rem;
    margin-top: 4px;
}

.meeting-profile-empty {
    box-shadow: none;
    margin-top: 16px;
    padding: 16px;
}

.market-hero,
.market-hero__stats,
.market-feature-grid,
.market-grid,
.market-interest-grid,
.market-review-list {
    display: grid;
    gap: 18px;
}

.market-hero {
    align-items: stretch;
    background:
        radial-gradient(circle at top right, rgba(17, 115, 74, 0.14), transparent 30%),
        radial-gradient(circle at 8% 8%, rgba(20, 121, 77, 0.13), transparent 28%),
        linear-gradient(145deg, rgba(241, 248, 244, 0.98), rgba(255, 242, 236, 0.96));
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    overflow: hidden;
}

.market-hero--form {
    grid-template-columns: 1fr;
}

.market-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
}

.market-hero__copy h2,
.market-view-hero__copy h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -0.045em;
    line-height: 1.04;
    margin: 0;
}

.market-hero__copy p,
.market-view-hero__copy p {
    font-size: 1.03rem;
    line-height: 1.7;
    margin: 0;
    max-width: 50rem;
}

.market-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.market-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.market-card {
    background: var(--kc-panel-strong);
    border: 1px solid var(--kc-border);
    border-radius: 26px;
    box-shadow: var(--kc-shadow-soft);
    color: inherit;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    text-decoration: none;
}

.market-card:hover,
.market-card:focus-visible,
.market-interest-summary:hover,
.market-interest-summary:focus-visible {
    border-color: rgba(20, 121, 77, 0.18);
    box-shadow: 0 18px 42px rgba(67, 22, 14, 0.1);
}

.market-card__image,
.market-gallery-empty,
.market-review-card__image {
    align-items: center;
    background:
        radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.72), transparent 28%),
        linear-gradient(135deg, rgba(20, 121, 77, 0.16), rgba(17, 115, 74, 0.12));
    color: var(--kc-red-deep);
    display: flex;
    font-size: 2rem;
    font-weight: 950;
    justify-content: center;
    min-height: 220px;
    overflow: hidden;
    text-transform: uppercase;
}

.market-card__image img,
.market-gallery-main img,
.market-thumb-strip img,
.market-review-card__image img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.market-card__body,
.market-card--feature {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.market-card__body {
    flex: 1;
    padding: 18px;
}

.market-card--feature {
    padding: 14px;
}

.market-card--feature .market-card__image {
    border-radius: 22px;
    min-height: 190px;
}

.market-card h3,
.market-card--feature strong,
.market-interest-summary h3,
.market-review-card h3 {
    font-size: 1.18rem;
    line-height: 1.22;
    margin: 0;
}

.market-card p,
.market-card--feature p,
.market-interest-summary p,
.market-review-card p {
    color: var(--kc-muted);
    line-height: 1.62;
    margin: 0;
}

.market-price,
.market-card__foot strong {
    color: var(--kc-red-deep);
    font-size: 1.2rem;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.market-card__foot {
    align-items: flex-end;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: auto;
}

.market-card__foot span {
    color: var(--kc-muted);
    font-size: 0.92rem;
    text-align: right;
}

.market-filter-form {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(140px, 0.75fr)) auto;
}

.market-form-card {
    overflow: hidden;
}

.market-thumb-strip {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    margin-top: 14px;
}

.market-thumb-strip img {
    aspect-ratio: 1;
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 16px;
    object-fit: cover;
    width: 100%;
}

.market-view-hero {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    overflow: hidden;
}

.market-view-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
}

.market-view-hero__price {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.76), transparent 34%),
        linear-gradient(145deg, rgba(241, 248, 244, 0.95), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 190px;
    padding: 20px;
}

.market-view-hero__price span {
    color: var(--kc-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.market-view-hero__price strong {
    color: var(--kc-red-deep);
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    letter-spacing: -0.05em;
    line-height: 1;
}

.market-view-hero__price p {
    color: var(--kc-muted);
    line-height: 1.6;
    margin: 0;
}

.market-gallery-card {
    overflow: hidden;
}

.market-gallery-main,
.market-gallery-empty {
    border-radius: 24px;
    min-height: 420px;
    overflow: hidden;
}

.market-interest-list {
    display: grid;
    gap: 12px;
}

.market-interest-card {
    align-items: center;
    background: rgba(241, 248, 244, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 20px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 1fr);
    padding: 16px;
}

.market-interest-card strong {
    display: block;
    font-size: 1.04rem;
    margin-top: 10px;
}

.market-interest-card p {
    color: var(--kc-muted);
    line-height: 1.55;
    margin: 8px 0 0;
}

.market-contact-line {
    color: var(--kc-red-deep);
    font-size: 0.92rem;
    font-weight: 800;
    margin-top: 10px;
}

.market-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.market-contact-actions .button {
    flex: 1 1 8rem;
}

.market-interest-form {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(120px, 0.7fr) minmax(150px, 1fr) auto;
}

.market-interest-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.market-interest-summary {
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
    text-decoration: none;
}

.market-review-list {
    grid-template-columns: 1fr;
}

.market-review-card {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: 180px minmax(0, 1fr) minmax(260px, 0.72fr);
}

.market-review-card__image {
    border-radius: 20px;
    min-height: 170px;
}

.market-review-card__body,
.market-review-card__actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.access-watch-hero {
    gap: 1.5rem;
    justify-content: space-between;
}

.access-watch-list {
    display: grid;
    gap: 1rem;
}

.access-watch-card {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.access-watch-card h2 {
    font-size: clamp(1.25rem, 2vw, 1.9rem);
    margin: 0.75rem 0 0.4rem;
}

.access-watch-card p {
    color: var(--kc-muted);
    line-height: 1.55;
    margin: 0;
}

.access-watch-note {
    background: rgba(20, 121, 77, 0.08);
    border: 1px solid rgba(20, 121, 77, 0.14);
    border-radius: 18px;
    color: var(--kc-red-deep);
    display: grid;
    gap: 0.35rem;
    font-weight: 800;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
}

.access-watch-card__actions {
    background: rgba(255, 248, 238, 0.72);
    border: 1px solid rgba(125, 38, 30, 0.1);
    border-radius: 22px;
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.access-watch-inline-actions {
    align-items: center;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.access-watch-inline-actions input[type='number'] {
    max-width: 7rem;
}

.emergency-hero,
.emergency-view-hero,
.emergency-panic-hero {
    gap: 1.5rem;
    justify-content: space-between;
}

.emergency-hero {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.72), transparent 24%),
        linear-gradient(135deg, rgba(93, 20, 13, 0.96) 0%, rgba(201, 59, 45, 0.92) 58%, rgba(255, 156, 110, 0.78) 100%);
    color: #fff;
}

.emergency-hero p,
.emergency-panic-hero p,
.emergency-view-hero p {
    max-width: 66ch;
}

.emergency-hero .metric {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.26);
    color: #fff;
}

.emergency-button {
    background: linear-gradient(135deg, #7d1b12 0%, #d93025 100%);
    box-shadow: 0 18px 38px rgba(125, 27, 18, 0.25);
}

.emergency-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.emergency-card {
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.emergency-card:hover,
.emergency-card:focus-visible {
    box-shadow: 0 24px 58px rgba(89, 22, 14, 0.16);
    transform: translateY(-3px);
}

.emergency-card h2,
.emergency-view-hero h2,
.emergency-panic-hero h2 {
    font-size: clamp(1.55rem, 3vw, 2.6rem);
    line-height: 1.04;
    margin: 0.75rem 0 0.4rem;
}

.emergency-card p {
    color: var(--kc-muted);
    line-height: 1.55;
    margin: 0;
}

.emergency-panic-hero {
    background:
        radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.52), transparent 25%),
        linear-gradient(135deg, #5c140d 0%, #b7261a 54%, #f6a14f 100%);
    color: #fff;
}

.emergency-panic-card {
    display: grid;
    gap: 1.25rem;
}

.emergency-panic-card__button {
    align-items: center;
    background:
        radial-gradient(circle at center, rgba(217, 48, 37, 0.2), transparent 54%),
        rgba(255, 248, 238, 0.74);
    border: 1px solid rgba(217, 48, 37, 0.16);
    border-radius: 30px;
    display: grid;
    justify-items: center;
    min-height: 260px;
    padding: 2rem;
    text-align: center;
}

.emergency-panic-button {
    align-items: center;
    aspect-ratio: 1;
    background: radial-gradient(circle at 30% 25%, #ff8a76, #d93025 44%, #6f170f 100%);
    border: 8px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    box-shadow: 0 30px 70px rgba(111, 23, 15, 0.32), inset 0 10px 24px rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 950;
    justify-content: center;
    max-width: 240px;
    padding: 1.2rem;
    text-align: center;
    text-transform: uppercase;
    width: min(62vw, 240px);
}

.emergency-panic-card__button p {
    color: var(--kc-red-deep);
    font-weight: 900;
    margin: 1rem 0 0;
}

.emergency-location-panel {
    align-items: center;
    background: rgba(255, 248, 238, 0.88);
    border: 1px solid rgba(125, 38, 30, 0.12);
    border-radius: 22px;
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
}

.emergency-location-panel span {
    color: var(--kc-muted);
    font-weight: 700;
}

.emergency-view-hero {
    background:
        radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.7), transparent 24%),
        linear-gradient(135deg, rgba(255, 248, 238, 0.94), rgba(255, 236, 215, 0.9));
}

.emergency-view-hero__code {
    background: #fff;
    border: 1px solid rgba(125, 38, 30, 0.12);
    border-radius: 24px;
    box-shadow: var(--kc-shadow-soft);
    display: grid;
    gap: 0.4rem;
    min-width: min(100%, 240px);
    padding: 1.25rem;
}

.emergency-view-hero__code span,
.emergency-recipient-list span {
    color: var(--kc-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.emergency-view-hero__code strong {
    color: var(--kc-red-deep);
    font-size: 1.35rem;
}

.emergency-recipient-list {
    display: grid;
    gap: 0.6rem;
    margin-top: 1rem;
}

.emergency-recipient-list div {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(125, 38, 30, 0.08);
    border-radius: 16px;
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem;
}

.support-hero,
.support-view-hero {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 245, 206, 0.62), transparent 24%),
        radial-gradient(circle at 92% 10%, rgba(217, 48, 37, 0.28), transparent 30%),
        linear-gradient(135deg, #4b180f 0%, #9c2d20 52%, #f1b25e 100%);
    color: #fff;
    gap: 1.5rem;
    justify-content: space-between;
    overflow: hidden;
}

.support-hero p,
.support-view-hero p {
    color: rgba(255, 248, 238, 0.88);
    max-width: 68ch;
}

.support-hero .metric {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.support-campaign-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.support-campaign-card {
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
    overflow: hidden;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.support-campaign-card:hover,
.support-campaign-card:focus-visible {
    box-shadow: 0 24px 58px rgba(89, 22, 14, 0.14);
    transform: translateY(-3px);
}

.support-campaign-card h2,
.support-view-hero h2 {
    font-size: clamp(1.55rem, 3vw, 2.6rem);
    line-height: 1.04;
    margin: 0.75rem 0 0.4rem;
}

.support-campaign-card p {
    color: var(--kc-muted);
    line-height: 1.55;
    margin: 0;
}

.support-progress,
.support-progress-card {
    display: grid;
    gap: 0.75rem;
}

.support-progress__bar {
    background: rgba(125, 38, 30, 0.1);
    border-radius: 999px;
    height: 13px;
    overflow: hidden;
}

.support-progress__bar span {
    background: linear-gradient(90deg, #14794d, #4eb586);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 10px;
}

.support-progress__meta {
    align-items: center;
    color: var(--kc-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: space-between;
}

.support-progress__meta strong {
    color: var(--kc-red-deep);
    font-size: 1.05rem;
}

.support-view-hero__aside {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 26px;
    display: grid;
    gap: 0.35rem;
    min-width: min(100%, 260px);
    padding: 1.25rem;
}

.support-view-hero__aside span,
.support-view-hero__aside small {
    color: rgba(255, 248, 238, 0.78);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.support-view-hero__aside strong {
    font-size: clamp(1.55rem, 4vw, 2.4rem);
    letter-spacing: -0.04em;
}

.support-form-card,
.support-pledge-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(152, 210, 181, 0.12), transparent 26%),
        rgba(255, 255, 255, 0.9);
}

.support-pledge-list,
.support-campaign-mini-list {
    display: grid;
    gap: 0.85rem;
}

.support-pledge-card {
    border: 1px solid rgba(125, 38, 30, 0.08);
    border-radius: 22px;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.support-campaign-mini {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(125, 38, 30, 0.08);
    border-radius: 18px;
    color: inherit;
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.support-campaign-mini:hover,
.support-campaign-mini:focus-visible {
    box-shadow: var(--kc-shadow-soft);
    transform: translateY(-2px);
}

.support-campaign-mini small {
    color: var(--kc-muted);
    font-weight: 800;
}

.event-hero,
.event-view-hero {
    background:
        radial-gradient(circle at 10% 16%, rgba(255, 255, 255, 0.58), transparent 24%),
        radial-gradient(circle at 88% 12%, rgba(200, 232, 214, 0.34), transparent 28%),
        linear-gradient(135deg, #0d5e3b 0%, #14794d 45%, #1c9560 100%);
    color: #fff;
    gap: 1.5rem;
    justify-content: space-between;
    overflow: hidden;
}

.event-hero p,
.event-view-hero p {
    color: rgba(240, 251, 243, 0.88);
    max-width: 70ch;
}

.event-hero .metric {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.event-card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.event-card {
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.event-card:hover,
.event-card:focus-visible {
    box-shadow: 0 24px 58px rgba(89, 22, 14, 0.14);
    transform: translateY(-3px);
}

.event-card h2,
.event-view-hero h2 {
    font-size: clamp(1.55rem, 3vw, 2.6rem);
    line-height: 1.04;
    margin: 0.75rem 0 0.4rem;
}

.event-card p {
    color: var(--kc-muted);
    line-height: 1.55;
    margin: 0;
}

.event-progress,
.event-progress-card {
    display: grid;
    gap: 0.75rem;
}

.event-progress__bar {
    background: rgba(125, 38, 30, 0.1);
    border-radius: 999px;
    height: 13px;
    overflow: hidden;
}

.event-progress__bar span {
    background: linear-gradient(90deg, #0d5e3b, #14794d, #4eb586);
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 10px;
}

.event-progress__meta {
    align-items: center;
    color: var(--kc-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: space-between;
}

.event-progress__meta strong {
    color: var(--kc-red-deep);
    font-size: 1.05rem;
}

.event-view-hero__aside {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 26px;
    display: grid;
    gap: 0.35rem;
    min-width: min(100%, 250px);
    padding: 1.25rem;
}

.event-view-hero__aside span,
.event-view-hero__aside small {
    color: rgba(255, 248, 238, 0.78);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.event-view-hero__aside strong {
    font-size: clamp(1.55rem, 4vw, 2.4rem);
    letter-spacing: -0.04em;
}

.event-form-card,
.event-rsvp-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(217, 48, 37, 0.1), transparent 26%),
        rgba(255, 255, 255, 0.9);
}

.event-rsvp-list,
.event-highlight-row {
    display: grid;
    gap: 0.85rem;
}

.event-rsvp-card,
.event-highlight-row article {
    border: 1px solid rgba(125, 38, 30, 0.08);
    border-radius: 22px;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.event-highlight-row {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 1rem;
}

.event-highlight-row article {
    background: rgba(255, 255, 255, 0.74);
    gap: 0.45rem;
}

.event-highlight-row span {
    color: var(--kc-muted);
    font-weight: 800;
}

.home-hero__stats,
.home-signal-grid,
.home-people-grid {
    display: grid;
    gap: 16px;
}

.home-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-hero__stat,
.home-signal-card,
.home-person-card {
    background: rgba(241, 248, 244, 0.88);
    border: 1px solid rgba(20, 121, 77, 0.12);
    border-radius: 22px;
    box-shadow: var(--kc-shadow-soft);
}

.home-hero__stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: space-between;
    min-height: 132px;
    padding: 18px;
}

.home-hero__stat span,
.home-signal-card span,
.home-person-card__meta span {
    color: var(--kc-muted);
}

.home-hero__stat strong {
    font-size: 1.55rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    line-height: 1.02;
}

.home-signal-grid,
.home-people-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.home-signal-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    padding: 18px;
    text-decoration: none;
}

.home-signal-card span {
    color: var(--kc-red-deep);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-signal-card strong {
    font-size: 1.9rem;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.home-signal-card p,
.home-person-card p {
    color: var(--kc-muted);
    line-height: 1.6;
    margin: 0;
}

.home-signal-card--warn {
    background: linear-gradient(160deg, rgba(255, 247, 240, 0.98), rgba(255, 255, 255, 0.94));
}

.home-signal-card--bad {
    background: linear-gradient(160deg, rgba(255, 241, 239, 0.98), rgba(255, 255, 255, 0.94));
}

.home-signal-card--ok {
    background: linear-gradient(160deg, rgba(245, 252, 248, 0.98), rgba(255, 255, 255, 0.94));
}

.home-signal-card:hover,
.home-signal-card:focus-visible,
.home-person-card:hover,
.home-person-card:focus-visible {
    border-color: rgba(20, 121, 77, 0.16);
    box-shadow: 0 16px 32px rgba(67, 22, 14, 0.08);
}

.home-person-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
    padding: 18px;
}

.home-person-card__top {
    align-items: flex-start;
    justify-content: space-between;
}

.home-person-card__top strong {
    display: block;
    font-size: 1.08rem;
    line-height: 1.2;
    margin-bottom: 6px;
}

.home-person-card__meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-person-card__meta div {
    background: rgba(241, 248, 244, 0.84);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
}

.home-person-card__meta strong {
    font-size: 0.98rem;
    line-height: 1.45;
}

.staff-filter-grid {
    align-items: end;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.staff-summary-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.staff-summary-card,
.staff-queue-pill {
    text-decoration: none;
}

.staff-summary-card {
    background: rgba(241, 248, 244, 0.88);
    border: 1px solid rgba(20, 121, 77, 0.12);
    border-radius: 22px;
    box-shadow: var(--kc-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    padding: 18px;
}

.staff-summary-card span {
    color: var(--kc-red-deep);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.staff-summary-card strong {
    font-size: 2rem;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.staff-summary-card p,
.staff-record-card__note {
    color: var(--kc-muted);
    line-height: 1.6;
    margin: 0;
}

.staff-summary-card--active {
    background: linear-gradient(160deg, rgba(228, 244, 234, 0.98), rgba(255, 255, 255, 0.94));
    border-color: rgba(20, 121, 77, 0.22);
    box-shadow: 0 20px 42px rgba(67, 21, 12, 0.08);
}

.staff-filter-grid__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.staff-queue-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.staff-queue-pill {
    align-items: center;
    background: rgba(255, 247, 243, 0.84);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 999px;
    color: var(--kc-red-deep);
    display: inline-flex;
    gap: 10px;
    min-height: 42px;
    padding: 10px 14px;
}

.staff-queue-pill strong {
    background: rgba(20, 121, 77, 0.1);
    border-radius: 999px;
    font-size: 0.82rem;
    min-width: 28px;
    padding: 4px 8px;
    text-align: center;
}

.staff-queue-pill.is-active {
    background: linear-gradient(135deg, rgba(20, 121, 77, 0.14), rgba(255, 236, 229, 0.98));
    border-color: rgba(20, 121, 77, 0.16);
    box-shadow: 0 14px 26px rgba(67, 22, 14, 0.08);
}

.staff-record-list {
    display: grid;
    gap: 18px;
}

.staff-record-card,
.staff-verify-card {
    background: var(--kc-panel-strong);
    border: 1px solid var(--kc-border);
    border-radius: 24px;
    box-shadow: var(--kc-shadow-soft);
    padding: 22px;
}

.staff-record-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.staff-record-card__top,
.staff-profile-hero__identity {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.staff-record-card__identity {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.staff-record-card__identity strong {
    font-size: 1.15rem;
}

.staff-record-card__identity span,
.staff-profile-hero__identity p,
.staff-verify-card > p {
    color: var(--kc-muted);
}

.staff-record-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.staff-record-card__details,
.staff-profile-hero__facts,
.staff-verify-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.staff-record-card__details div,
.staff-profile-hero__facts div,
.staff-verify-grid div {
    background: rgba(241, 248, 244, 0.84);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
}

.staff-record-card__details span,
.staff-profile-hero__facts span,
.staff-verify-grid span {
    color: var(--kc-muted);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.staff-record-card__details strong,
.staff-profile-hero__facts strong,
.staff-verify-grid strong {
    font-size: 1rem;
    line-height: 1.4;
}

.staff-record-card__note {
    margin-top: -2px;
}

.staff-profile-hero {
    display: grid;
    gap: 20px;
}

.staff-profile-hero__photo {
    align-items: center;
    background: linear-gradient(135deg, var(--kc-red) 0%, var(--kc-red-deep) 100%);
    border: 4px solid rgba(255, 255, 255, 0.62);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(67, 22, 14, 0.16);
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 2rem;
    font-weight: 900;
    height: 112px;
    justify-content: center;
    overflow: hidden;
    width: 112px;
}

.staff-profile-hero__photo img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.staff-profile-hero__identity > div:last-child {
    flex: 1;
}

.staff-profile-hero__identity h2 {
    margin-bottom: 8px;
}

.staff-profile-hero__identity .request-card__chips {
    margin-top: 14px;
}

.staff-verify-page {
    display: grid;
    min-height: calc(100vh - 180px);
    place-items: center;
}

.staff-verify-card {
    max-width: 860px;
    width: 100%;
}

.staff-verify-card h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.06;
    margin: 16px 0 10px;
}

.directory-hero,
.directory-hero__stats,
.directory-grid,
.directory-review-grid,
.directory-interest-list,
.directory-checkbox-grid {
    display: grid;
    gap: 18px;
}

.directory-hero {
    align-items: stretch;
    background:
        radial-gradient(circle at top right, rgba(20, 121, 77, 0.16), transparent 30%),
        radial-gradient(circle at 10% 10%, rgba(152, 210, 181, 0.28), transparent 28%),
        linear-gradient(145deg, rgba(252, 255, 253, 0.98), rgba(228, 244, 234, 0.96));
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    overflow: hidden;
}

.directory-hero--profile {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
}

.directory-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
}

.directory-hero__copy h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -0.045em;
    line-height: 1.04;
    margin: 0;
}

.directory-hero__copy p {
    font-size: 1.03rem;
    line-height: 1.7;
    margin: 0;
    max-width: 50rem;
}

.directory-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-profile-preview {
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.86), transparent 30%),
        linear-gradient(145deg, rgba(241, 248, 244, 0.96), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    min-height: 220px;
    padding: 24px;
    text-align: center;
}

.directory-profile-preview strong {
    font-size: 1.25rem;
    font-weight: 950;
    line-height: 1.2;
}

.directory-profile-preview span {
    color: var(--kc-muted);
    line-height: 1.5;
}

.directory-avatar {
    align-items: center;
    background:
        radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.68), transparent 32%),
        linear-gradient(135deg, var(--kc-red), var(--kc-red-deep));
    border: 3px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    box-shadow: 0 16px 34px rgba(67, 22, 14, 0.12);
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1rem;
    font-weight: 950;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.directory-avatar--large {
    border-radius: 28px;
    font-size: 2rem;
    height: 104px;
    width: 104px;
}

.directory-filter-form {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.45fr) auto;
}

.directory-filter-form--simple {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.directory-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.directory-card,
.directory-review-card {
    background: var(--kc-panel-strong);
    border: 1px solid var(--kc-border);
    border-radius: 26px;
    box-shadow: var(--kc-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
    padding: 20px;
}

.directory-card:hover,
.directory-card:focus-within,
.directory-review-card:hover,
.directory-review-card:focus-within {
    border-color: rgba(20, 121, 77, 0.18);
    box-shadow: 0 18px 42px rgba(67, 22, 14, 0.1);
}

.directory-card__head {
    align-items: center;
    display: flex;
    gap: 14px;
}

.directory-card__head h3,
.directory-review-card h3,
.directory-interest-card h3,
.directory-choice-panel h3 {
    font-size: 1.15rem;
    line-height: 1.2;
    margin: 0;
}

.directory-card__head p,
.directory-review-card p,
.directory-choice-panel p {
    color: var(--kc-muted);
    line-height: 1.55;
    margin: 6px 0 0;
}

.directory-card__body {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.directory-card__body div {
    background: rgba(241, 248, 244, 0.84);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 13px;
}

.directory-card__body span {
    color: var(--kc-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.directory-card__body strong {
    line-height: 1.38;
}

.directory-card__note {
    color: var(--kc-muted);
    line-height: 1.65;
    margin: 0;
}

.directory-chip-list,
.directory-contact-list,
.directory-toggle-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.directory-chip-list span,
.directory-contact-list a {
    background: rgba(20, 121, 77, 0.08);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 999px;
    color: var(--kc-red-deep);
    font-size: 0.86rem;
    font-weight: 900;
    padding: 9px 12px;
    text-decoration: none;
}

.directory-contact-list a {
    background: rgba(17, 115, 74, 0.1);
    color: var(--kc-success);
}

.directory-form-card {
    overflow: hidden;
}

.directory-choice-panel {
    background:
        radial-gradient(circle at top right, rgba(20, 121, 77, 0.09), transparent 28%),
        rgba(241, 248, 244, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 22px;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 18px;
}

.directory-choice-panel--stack {
    grid-template-columns: 1fr;
}

.directory-checkbox-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.directory-check-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(20, 121, 77, 0.1);
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    min-height: 54px;
    padding: 12px 14px;
}

.directory-check-card span {
    font-weight: 900;
}

.directory-review-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.directory-inline-form {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.directory-interest-list {
    grid-template-columns: 1fr;
}

.directory-interest-card {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.35fr);
}

.directory-interest-card__main,
.directory-interest-card__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.directory-interest-card__form {
    background: rgba(241, 248, 244, 0.72);
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 22px;
    padding: 16px;
}

@media (max-width: 980px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .profile-hero,
    .content-hero,
    .meeting-hero,
    .messaging-hero,
    .market-hero,
    .market-view-hero,
    .directory-hero,
    .emergency-hero,
    .emergency-view-hero,
    .emergency-panic-hero,
    .support-hero,
    .support-view-hero,
    .event-hero,
    .event-view-hero,
    .access-watch-card,
    .profile-form-grid,
    .profile-member-grid {
        grid-template-columns: 1fr;
    }

    .guest-pass-preview__panel {
        grid-template-columns: 1fr;
    }

    .guest-pass-preview__copy {
        position: static;
    }
}

@media (max-width: 640px) {
    .home-hero__stats,
    .home-person-card__meta {
        grid-template-columns: 1fr;
    }

    .guest-pass-preview__copy,
    .guest-pass-preview__frame {
        border-radius: 24px;
    }

    .guest-pass-preview__frame-inner {
        border-radius: 20px;
        padding: 12px;
    }

    .guest-pass-preview__copy {
        padding: 22px;
    }

    .guest-pass-preview__facts {
        grid-template-columns: 1fr;
    }

    .request-summary-grid,
    .request-card__meta,
    .request-priority-list {
        grid-template-columns: 1fr;
    }

    .staff-record-card__top,
    .staff-profile-hero__identity {
        align-items: flex-start;
        flex-direction: column;
    }

    .staff-record-card__details,
    .staff-profile-hero__facts,
    .staff-verify-grid {
        grid-template-columns: 1fr;
    }

    .content-card__top {
        flex-direction: column;
    }

    .meeting-card__top,
    .meeting-profile-item,
    .engagement-person-card__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .meeting-card__meta,
    .meeting-add-resident,
    .meeting-attendance-row,
    .meeting-attendance-row__form,
    .messaging-grid,
    .messaging-two-col,
    .messaging-three-col,
    .messaging-test-row,
    .messaging-test-row--sms,
    .messaging-queue-card,
    .market-filter-form,
    .directory-filter-form,
    .directory-choice-panel,
    .directory-inline-form,
    .directory-interest-card,
    .directory-interest-card__form,
    .market-interest-card,
    .market-interest-form,
    .market-review-card,
    .access-watch-inline-actions {
        grid-template-columns: 1fr;
    }

    .market-feature-grid,
    .messaging-status-grid,
    .market-hero__stats,
    .directory-hero__stats,
    .emergency-hero .hero-stat-grid,
    .support-hero .hero-stat-grid,
    .event-hero .hero-stat-grid,
    .access-watch-hero .hero-stat-grid {
        grid-template-columns: 1fr;
    }

    .emergency-panic-card__button {
        min-height: 220px;
        padding: 1.25rem;
    }

    .market-gallery-main,
    .market-gallery-empty {
        min-height: 300px;
    }

    .market-card__foot {
        align-items: flex-start;
        flex-direction: column;
    }

    .market-card__foot span {
        text-align: left;
    }

    .profile-form-grid > div {
        padding: 14px;
    }
}

/* ==========================================================================
   Polish layer (motion, microinteractions, toasts, empty-state illustrations)
   --------------------------------------------------------------------------
   Additive — kept at end of file so nothing above is overridden unless
   intentional. Designed to make the app feel native: subtle press feedback,
   gentle card lift, page fade-in, friendly empty states.
   ========================================================================== */

/* Respect reduced-motion preference globally. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Page fade-in on first paint — gentle, fast.
   IMPORTANT: this animation must NOT touch `transform`. The `.app-shell`
   contains the `position: fixed` mobile tab-bar; any non-`none` transform
   value on the element turns it into the containing block for fixed
   descendants, which would pin the tab-bar to the bottom of the document
   instead of the viewport. Opacity-only fade keeps things clean. */
@keyframes kc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.app-shell {
    animation: kc-fade-in 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* Buttons feel responsive: scale on press, lift on hover. */
.button,
.button--ghost,
.shell-menu-button,
.shell-alert,
.shell-avatar {
    transition: transform 0.16s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.16s ease,
                filter 0.16s ease;
    will-change: transform;
}

.button:active,
.button--ghost:active,
.shell-menu-button:active,
.shell-alert:active {
    transform: scale(0.97);
}

@media (hover: hover) {
    .button:hover {
        transform: translateY(-1px);
    }
    .card:hover,
    .launch-card:hover,
    .home-signal-card:hover,
    .access-card:hover,
    .guest-pass-card:hover,
    .access-filter-pill:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 36px rgba(116, 29, 21, 0.10);
        transition: transform 0.18s ease, box-shadow 0.18s ease;
    }
}

.card,
.launch-card,
.home-signal-card,
.access-card,
.guest-pass-card,
.access-filter-pill {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Form fields feel awake on focus. */
input:not([type="file"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--kc-red) !important;
    box-shadow: 0 0 0 3px rgba(20, 121, 77, 0.18);
}

/* Hero cards: subtle radial texture that doesn't fight the gradient already there. */
.hero-card {
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: '';
    position: absolute;
    inset: -40% -10% auto auto;
    width: 60%;
    height: 200%;
    background:
        radial-gradient(closest-side, rgba(20, 121, 77, 0.10), transparent 70%);
    pointer-events: none;
    transform: rotate(-12deg);
    opacity: 0.9;
}
.hero-card > * {
    position: relative;
    z-index: 1;
}

/* Notice banners get a subtle slide-in. */
.notice-banner {
    animation: kc-fade-in 0.28s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* Status chips: gentle pulse on warn/danger to draw the eye once. */
@keyframes kc-pulse-once {
    0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0); }
    50%      { box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.10); }
}
.status-chip--danger {
    animation: kc-pulse-once 1.6s ease-in-out 1;
}

/* Skeleton shimmer for loading states (utility — reuse anywhere). */
@keyframes kc-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.kc-skeleton {
    background: linear-gradient(
        90deg,
        rgba(184, 112, 89, 0.10) 0%,
        rgba(184, 112, 89, 0.22) 50%,
        rgba(184, 112, 89, 0.10) 100%
    );
    background-size: 200% 100%;
    animation: kc-shimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
    color: transparent !important;
    user-select: none;
    pointer-events: none;
}

/* ---------- Toast notifications ---------- */
.kc-toast-host {
    position: fixed;
    bottom: calc(108px + env(safe-area-inset-bottom));  /* clear of mobile tab bar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: min(96vw, 480px);
}
@media (min-width: 920px) {
    .kc-toast-host {
        bottom: 24px;
        right: 24px;
        left: auto;
        transform: none;
        align-items: flex-end;
    }
}
.kc-toast {
    background: rgba(29, 14, 10, 0.92);
    backdrop-filter: blur(12px);
    color: #fff;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 16px 40px rgba(29, 14, 10, 0.32);
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: auto;
    animation: kc-toast-in 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    display: flex;
    align-items: center;
    gap: 10px;
}
.kc-toast--success { background: linear-gradient(135deg, #15824f, #0e6840); }
.kc-toast--error   { background: linear-gradient(135deg, #c93b2d, #8a1d12); }
.kc-toast--leaving { animation: kc-toast-out 0.22s ease-in both; }
.kc-toast__icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
}
@keyframes kc-toast-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes kc-toast-out {
    to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

/* ---------- Empty state illustration polish ---------- */
.empty-state {
    text-align: center;
    align-items: center;
}
.empty-state__art {
    margin: 4px auto 14px;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    color: var(--kc-clay);
    opacity: 0.85;
}
.empty-state__art svg {
    width: 100%;
    height: 100%;
}
.empty-state strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 4px;
}
.empty-state p,
.empty-state span {
    color: var(--kc-muted);
    margin: 0;
    max-width: 38ch;
}
.empty-state .button,
.empty-state .button--ghost {
    margin-top: 14px;
}

/* ---------- View Transitions for navigation (progressive enhancement) ---------- */
@supports (view-transition-name: none) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 200ms;
    }
}

/* ==========================================================================
   Login arrival — atmosphere + entrance motion
   --------------------------------------------------------------------------
   Targets the .login-page--simple body class so we don't perturb signed-in
   pages. Adds a warm radial atmosphere, a subtle floating decoration, and
   staggered entrance animations for the logo, brandcopy, and card.
   ========================================================================== */

body.login-page--simple {
    background:
        radial-gradient(60% 50% at 78% 18%, rgba(20, 121, 77, 0.18), transparent 70%),
        radial-gradient(46% 40% at 12% 86%, rgba(184, 112, 89, 0.22), transparent 70%),
        linear-gradient(180deg, #fdf6f1 0%, #faece4 100%);
    background-attachment: fixed;
}

/* A pair of soft floating discs that drift slowly behind the card.
   Pure decoration — clipped behind the form and ignored by readers. */
body.login-page--simple .content-area--guest::before,
body.login-page--simple .content-area--guest::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
    animation: kc-login-float 22s ease-in-out infinite alternate;
}
body.login-page--simple .content-area--guest::before {
    width: 360px;
    height: 360px;
    top: -80px;
    right: -60px;
    background: radial-gradient(closest-side, rgba(20, 121, 77, 0.32), transparent 70%);
}
body.login-page--simple .content-area--guest::after {
    width: 420px;
    height: 420px;
    bottom: -120px;
    left: -100px;
    background: radial-gradient(closest-side, rgba(184, 112, 89, 0.30), transparent 70%);
    animation-delay: -6s;
}

@keyframes kc-login-float {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(20px, -16px, 0); }
}

/* Make sure the form sits above the decorations. */
body.login-page--simple .login-screen,
body.login-page--simple .login-shell {
    position: relative;
    z-index: 1;
}

/* Staggered entrance — logo first, then brandcopy, then the card. */
@keyframes kc-arrival-up {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes kc-arrival-pop {
    0%   { opacity: 0; transform: translateY(8px) scale(0.92); }
    65%  { transform: translateY(-2px) scale(1.04); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

body.login-page--simple .login-brandmark {
    animation: kc-arrival-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 60ms both;
}
body.login-page--simple .login-brandcopy {
    animation: kc-arrival-up 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 220ms both;
}
body.login-page--simple .login-simple-card {
    animation: kc-arrival-up 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) 320ms both;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 24px 48px rgba(116, 29, 21, 0.12),
        0 4px 12px rgba(116, 29, 21, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
body.login-page--simple .login-simple-card:focus-within {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 32px 64px rgba(116, 29, 21, 0.18),
        0 6px 18px rgba(116, 29, 21, 0.08);
}

/* Logo: a soft glow ring behind it. */
body.login-page--simple .login-logo {
    border-radius: 18px;
    box-shadow:
        0 0 0 1px rgba(20, 121, 77, 0.10),
        0 14px 32px rgba(20, 121, 77, 0.18);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body.login-page--simple .login-shell:hover .login-logo {
    transform: rotate(-3deg) scale(1.04);
}

/* Title: subtle gradient on the headline — premium without shouting. */
body.login-page--simple .login-title {
    background: linear-gradient(135deg, #1f120e 0%, #741d15 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Submit button: warm glow on hover for that "tap me" affordance. */
body.login-page--simple .login-form .button[type="submit"] {
    box-shadow: 0 12px 28px rgba(116, 29, 21, 0.18);
}
body.login-page--simple .login-form .button[type="submit"]:hover {
    box-shadow: 0 18px 36px rgba(116, 29, 21, 0.26);
}

/* Link row: a subtle pill rather than a flat link. */
body.login-page--simple .login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(20, 121, 77, 0.08);
    transition: background-color 0.2s ease, transform 0.2s ease;
}
body.login-page--simple .login-link:hover {
    background: rgba(20, 121, 77, 0.15);
    transform: translateY(-1px);
}

/* Subtle reduce-motion override. */
@media (prefers-reduced-motion: reduce) {
    body.login-page--simple .content-area--guest::before,
    body.login-page--simple .content-area--guest::after {
        animation: none;
    }
}

/* ==========================================================================
   Sunset Luxe — hero modifier + sidebar status badges
   ========================================================================== */

/* Hero modifier: rich burgundy → bronze → copper gradient with ivory text.
   Use as `<section class="hero-card hero-card--luxe">…</section>`. */
.hero-card--luxe {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(232, 200, 138, 0.22), transparent 60%),
        linear-gradient(160deg, #2c0c0e 0%, #581c1c 30%, #944626 65%, #ce824e 100%);
    border: 1px solid rgba(212, 173, 111, 0.28);
    color: #fdf4ec;
    position: relative;
    overflow: hidden;
}

/* Override the original .hero-card::before red glow with a champagne lustre. */
.hero-card--luxe::before {
    background: radial-gradient(closest-side, rgba(253, 235, 200, 0.16), transparent 70%);
    inset: -30% -10% auto auto;
}

/* Subtle gold edge at the very top — premium signifier. */
.hero-card--luxe::after {
    background: linear-gradient(90deg, transparent 0%, #d4ad6f 16%, #f0d8a4 50%, #d4ad6f 84%, transparent 100%);
    content: '';
    height: 2px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

.hero-card--luxe h1,
.hero-card--luxe h2,
.hero-card--luxe h3,
.hero-card--luxe strong {
    color: #fdf4ec;
}

.hero-card--luxe p,
.hero-card--luxe span,
.hero-card--luxe .detail-label {
    color: rgba(253, 244, 232, 0.82);
}

.hero-card--luxe .badge {
    background: rgba(253, 244, 232, 0.12);
    color: #f0d8a4;       /* champagne */
    border: 1px solid rgba(240, 216, 164, 0.34);
}

.hero-card--luxe .meta-pill,
.hero-card--luxe .meta-pill--soft,
.hero-card--luxe .meta-pill--neutral,
.hero-card--luxe .meta-pill--warn {
    background: rgba(253, 244, 232, 0.10);
    border: 1px solid rgba(253, 244, 232, 0.18);
    color: #fdf4ec;
}

.hero-card--luxe .meta-pill--warn {
    background: rgba(212, 173, 111, 0.20);
    color: #f0d8a4;
}

.hero-card--luxe .home-hero__stat {
    background: rgba(253, 244, 232, 0.08);
    border: 1px solid rgba(240, 216, 164, 0.22);
    color: #fdf4ec;
}

.hero-card--luxe .home-hero__stat span {
    color: rgba(253, 244, 232, 0.74);
}

.hero-card--luxe .home-hero__stat strong {
    color: #fdf4ec;
}

.hero-card--luxe .button {
    background: linear-gradient(135deg, #f0d8a4, #d4ad6f);
    color: #2c0c0e;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.hero-card--luxe .button:hover {
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.hero-card--luxe .button--ghost {
    background: rgba(253, 244, 232, 0.10);
    border: 1px solid rgba(240, 216, 164, 0.34);
    color: #fdf4ec;
}

.hero-card--luxe .inline-link {
    color: #f0d8a4;
}

/* Big-statement variant: a single status sentence directly under the
   greeting — used on dashboard heroes. The luxe-tinted text color only
   applies INSIDE .hero-card--luxe so the resident dashboard (now a
   calm green hero) reads naturally. */
.kc-hero-luxe__statement {
    display: block;
    font-size: 1.08rem;
    line-height: 1.4;
    margin: 8px 0 0;
    max-width: 56ch;
    color: var(--kc-ink);
}
.hero-card--luxe .kc-hero-luxe__statement {
    color: rgba(253, 244, 232, 0.86);
}

/* ---------- Sidebar status badges ---------- */

/* Each .shell-link can carry a count chip at its right edge to surface
   activity without forcing the resident to open the section. */
.shell-link {
    position: relative;
}

.shell-link__badge {
    align-items: center;
    align-self: flex-start;
    background: linear-gradient(135deg, var(--kc-red), var(--kc-red-deep));
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(116, 29, 21, 0.24);
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 900;
    justify-content: center;
    letter-spacing: 0.02em;
    margin-left: auto;
    min-width: 22px;
    padding: 3px 8px;
    text-align: center;
}

.shell-link__badge--dot {
    background: var(--kc-red);
    height: 10px;
    min-width: 10px;
    padding: 0;
    width: 10px;
}

.shell-link__badge--ok {
    background: linear-gradient(135deg, #11734a, #0e6840);
    box-shadow: 0 4px 10px rgba(14, 104, 64, 0.24);
}

.shell-link.is-active .shell-link__badge {
    box-shadow: 0 6px 14px rgba(116, 29, 21, 0.32);
}

/* ---------- Collapsible sidebar / drawer sections ----------
   Sections render as native <details>/<summary> so the disclosure is
   keyboard-accessible by default. We hide the UA marker and replace it with
   a chevron that rotates on open. The shell-link list lives inside the
   details and only takes space when expanded — that's what stops the rail
   from scrolling forever when a section has many items. */

.shell-sidebar__group--collapsible,
.shell-drawer__group--collapsible {
    border-radius: 14px;
    padding: 0;
    transition: background 0.18s ease;
}

.shell-sidebar__group--collapsible[open],
.shell-drawer__group--collapsible[open] {
    background: rgba(241, 248, 244, 0.55);
}

.shell-sidebar__group--collapsible > summary,
.shell-drawer__group--collapsible > summary,
.shell-sidebar__group-toggle,
.shell-drawer__group-toggle {
    align-items: center;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    list-style: none;
    padding: 8px 10px;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}

/* Strip the default marker triangle across browsers. */
.shell-sidebar__group--collapsible > summary::-webkit-details-marker,
.shell-drawer__group--collapsible > summary::-webkit-details-marker {
    display: none;
}
.shell-sidebar__group--collapsible > summary::marker,
.shell-drawer__group--collapsible > summary::marker {
    content: '';
    display: none;
}

.shell-sidebar__group--collapsible > summary:hover,
.shell-drawer__group--collapsible > summary:hover,
.shell-sidebar__group--collapsible > summary:focus-visible,
.shell-drawer__group--collapsible > summary:focus-visible {
    background: rgba(255, 244, 238, 0.95);
    color: var(--kc-red-deep);
    outline: none;
}

.shell-sidebar__group-chevron,
.shell-drawer__group-toggle .shell-sidebar__group-chevron {
    color: rgba(20, 121, 77, 0.55);
    display: inline-flex;
    flex: 0 0 auto;
    transition: transform 0.18s ease, color 0.15s ease;
}

.shell-sidebar__group--collapsible[open] > summary .shell-sidebar__group-chevron,
.shell-drawer__group--collapsible[open] > summary .shell-sidebar__group-chevron {
    transform: rotate(180deg);
    color: var(--kc-red-deep);
}

/* Tighter spacing inside an open section — the nav already has its own gap. */
.shell-sidebar__group--collapsible[open] > .shell-nav,
.shell-drawer__group--collapsible[open] > .shell-nav {
    margin-top: 8px;
    padding-bottom: 4px;
}

/* Pinned (always-visible) sections drop the header so they read as a plain
   block at the top of the rail. */
.shell-sidebar__group--pinned,
.shell-drawer__group--pinned {
    padding: 0;
}

/* Highlight a collapsible section header when it contains the active link
   even while collapsed — gives users a hint that the page they're on lives
   inside this group. */
.shell-sidebar__group--collapsible:has(.shell-link.is-active) > summary .shell-section-label,
.shell-drawer__group--collapsible:has(.shell-link.is-active) > summary .shell-section-label {
    color: var(--kc-red-deep);
}

/* Dark shell navigation: the sidebar, mobile drawer, and bottom nav need
   dedicated contrast so section modules never inherit pale daytime surfaces. */
html[data-kc-theme="dark"] .shell-sidebar,
html[data-kc-theme="dark"] .shell-drawer {
    background:
        linear-gradient(180deg, rgba(11, 18, 15, 0.98), rgba(16, 28, 23, 0.96)),
        linear-gradient(150deg, rgba(79, 206, 145, 0.12), transparent 44%);
    border-color: rgba(183, 244, 208, 0.18);
    color: var(--kc-ink);
}

html[data-kc-theme="dark"] .shell-sidebar__brand-copy strong,
html[data-kc-theme="dark"] .shell-drawer__brand-copy strong,
html[data-kc-theme="dark"] .shell-sidebar__user-copy strong,
html[data-kc-theme="dark"] .shell-drawer__user-copy strong {
    color: #f7fff9;
}

html[data-kc-theme="dark"] .shell-sidebar__brand-copy span,
html[data-kc-theme="dark"] .shell-drawer__brand-copy span,
html[data-kc-theme="dark"] .shell-sidebar__user-copy span,
html[data-kc-theme="dark"] .shell-drawer__user-copy span {
    color: rgba(205, 225, 214, 0.82);
}

html[data-kc-theme="dark"] .shell-sidebar__user,
html[data-kc-theme="dark"] .shell-drawer__user {
    background:
        linear-gradient(135deg, rgba(24, 53, 38, 0.92), rgba(13, 24, 20, 0.96));
    border-color: rgba(183, 244, 208, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-kc-theme="dark"] a.shell-sidebar__user--link:hover,
html[data-kc-theme="dark"] a.shell-drawer__user--link:hover,
html[data-kc-theme="dark"] a.shell-sidebar__user--link:focus-visible,
html[data-kc-theme="dark"] a.shell-drawer__user--link:focus-visible {
    border-color: rgba(79, 206, 145, 0.34);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}

html[data-kc-theme="dark"] .shell-link {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(183, 244, 208, 0.10);
    color: #f7fff9;
}

html[data-kc-theme="dark"] .shell-link__copy strong {
    color: #f7fff9;
}

html[data-kc-theme="dark"] .shell-link__copy span {
    color: rgba(205, 225, 214, 0.76);
}

html[data-kc-theme="dark"] .shell-link__icon,
html[data-kc-theme="dark"] .mobile-tab__icon {
    color: #78e6ad;
}

html[data-kc-theme="dark"] .shell-link:hover,
html[data-kc-theme="dark"] .shell-link:focus-visible {
    background: rgba(79, 206, 145, 0.13);
    border-color: rgba(79, 206, 145, 0.34);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

html[data-kc-theme="dark"] .shell-link.is-active {
    background:
        linear-gradient(135deg, rgba(79, 206, 145, 0.28), rgba(22, 75, 49, 0.92));
    border-color: rgba(126, 230, 173, 0.48);
    box-shadow:
        inset 0 0 0 1px rgba(183, 244, 208, 0.12),
        0 14px 30px rgba(0, 0, 0, 0.24);
}

html[data-kc-theme="dark"] .shell-link--logout {
    background: rgba(255, 143, 126, 0.10);
    border-color: rgba(255, 143, 126, 0.18);
    color: #ffd4ce;
}

html[data-kc-theme="dark"] .shell-drawer__logout {
    color: #ffd4ce;
}

html[data-kc-theme="dark"] .shell-sidebar__group--collapsible,
html[data-kc-theme="dark"] .shell-drawer__group--collapsible {
    border: 1px solid rgba(183, 244, 208, 0.08);
}

html[data-kc-theme="dark"] .shell-sidebar__group--collapsible[open],
html[data-kc-theme="dark"] .shell-drawer__group--collapsible[open] {
    background: rgba(79, 206, 145, 0.065);
}

html[data-kc-theme="dark"] .shell-sidebar__group--collapsible > summary,
html[data-kc-theme="dark"] .shell-drawer__group--collapsible > summary,
html[data-kc-theme="dark"] .shell-sidebar__group-toggle,
html[data-kc-theme="dark"] .shell-drawer__group-toggle {
    color: #b7f4d0;
}

html[data-kc-theme="dark"] .shell-section-label {
    color: #9beebb;
}

html[data-kc-theme="dark"] .shell-sidebar__group-chevron,
html[data-kc-theme="dark"] .shell-drawer__group-toggle .shell-sidebar__group-chevron {
    color: rgba(183, 244, 208, 0.74);
}

html[data-kc-theme="dark"] .shell-sidebar__group--collapsible > summary:hover,
html[data-kc-theme="dark"] .shell-drawer__group--collapsible > summary:hover,
html[data-kc-theme="dark"] .shell-sidebar__group--collapsible > summary:focus-visible,
html[data-kc-theme="dark"] .shell-drawer__group--collapsible > summary:focus-visible {
    background: rgba(79, 206, 145, 0.14);
    color: #f7fff9;
}

html[data-kc-theme="dark"] .shell-sidebar__group--collapsible[open] > summary .shell-sidebar__group-chevron,
html[data-kc-theme="dark"] .shell-drawer__group--collapsible[open] > summary .shell-sidebar__group-chevron,
html[data-kc-theme="dark"] .shell-sidebar__group--collapsible:has(.shell-link.is-active) > summary .shell-section-label,
html[data-kc-theme="dark"] .shell-drawer__group--collapsible:has(.shell-link.is-active) > summary .shell-section-label {
    color: #f7fff9;
}

html[data-kc-theme="dark"] .mobile-tabbar {
    background: rgba(9, 17, 14, 0.94);
    border-top-color: rgba(183, 244, 208, 0.18);
    box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.34);
}

html[data-kc-theme="dark"] .mobile-tab {
    color: rgba(205, 225, 214, 0.78);
}

html[data-kc-theme="dark"] .mobile-tab.is-active {
    background: linear-gradient(135deg, rgba(79, 206, 145, 0.20), rgba(24, 53, 38, 0.96));
    color: #f7fff9;
}

/* ---------- Resident card hero stage (residents/my_card.php) ----------
   Designed to make the PNG access card the unmistakable centerpiece of the
   page: ample whitespace around it, a real drop-shadow so it floats, and a
   max-width that lets the card breathe on tablet/desktop without ballooning
   to absurd sizes. On phone it goes nearly edge-to-edge. */

.resident-card-stage {
    background: radial-gradient(circle at 30% 0%, rgba(206, 130, 78, 0.10), transparent 55%),
                linear-gradient(180deg, rgba(255, 247, 240, 0.6), rgba(244, 236, 226, 0.4));
    border: 1px solid rgba(20, 121, 77, 0.08);
    border-radius: 28px;
    padding: 28px 18px 28px;
    margin-bottom: 20px;
}

.resident-card-stage__hero {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.resident-card-stage__hero--wide {
    max-width: 640px;
}

.resident-card-stage__frame {
    background: #fff;
    border-radius: 32px;
    box-shadow:
        0 30px 60px rgba(67, 22, 14, 0.22),
        0 6px 16px rgba(67, 22, 14, 0.10);
    display: block;
    max-width: 460px;
    overflow: hidden;
    padding: 0;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    width: 100%;
}

.resident-card-stage__frame:hover,
.resident-card-stage__frame:focus-visible {
    box-shadow:
        0 38px 74px rgba(67, 22, 14, 0.28),
        0 10px 22px rgba(67, 22, 14, 0.14);
    outline: none;
    transform: translateY(-2px);
}

.resident-card-stage__frame img {
    aspect-ratio: 2 / 3;
    display: block;
    height: auto;
    width: 100%;
}

.resident-card-stage__meta {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resident-card-stage__meta p {
    color: var(--kc-muted);
    font-size: 0.92rem;
    margin: 0;
}

.resident-card-stage__actions {
    flex-wrap: wrap;
    justify-content: center;
}

.resident-card-stage__hint {
    color: var(--kc-muted);
    font-size: 0.85rem;
    margin: 0;
}

.resident-phone-card {
    aspect-ratio: 2 / 3;
    background:
        radial-gradient(circle at 22% 9%, rgba(255, 234, 178, 0.24), transparent 27%),
        radial-gradient(circle at 80% 92%, rgba(255, 180, 102, 0.34), transparent 31%),
        linear-gradient(160deg, #2c0c0e 0%, #611f1f 54%, #c97b47 100%);
    border: 1px solid rgba(255, 231, 190, 0.28);
    border-radius: 34px;
    box-shadow:
        0 30px 70px rgba(67, 22, 14, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    color: #fffaf3;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 440px;
    overflow: hidden;
    padding: 24px;
    position: relative;
    text-align: left;
    width: min(100%, 440px);
}

.resident-phone-card__shine {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 34%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.resident-phone-card__top,
.resident-phone-card__brand,
.resident-phone-card__identity,
.resident-phone-card__foot {
    align-items: center;
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.resident-phone-card__top {
    justify-content: space-between;
}

.resident-phone-card__brand img {
    border-radius: 14px;
    height: 48px;
    object-fit: cover;
    width: 48px;
}

.resident-phone-card__brand strong,
.resident-phone-card__brand span,
.resident-phone-card__name span,
.resident-phone-card__name strong,
.resident-phone-card__name small,
.resident-phone-card__foot span,
.resident-phone-card__foot strong {
    display: block;
}

.resident-phone-card__brand strong {
    font-size: 0.98rem;
    line-height: 1.1;
}

.resident-phone-card__brand span,
.resident-phone-card__name span,
.resident-phone-card__foot span {
    color: rgba(255, 238, 203, 0.78);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.resident-phone-card__status {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 238, 203, 0.26);
    border-radius: 999px;
    color: #ffeecb;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 7px 10px;
    white-space: nowrap;
}

.resident-phone-card__identity {
    flex-direction: column;
    margin-top: 8px;
    text-align: center;
}

.resident-phone-card__photo {
    align-items: center;
    background: #1d0708;
    border: 8px solid #f0d8a4;
    border-radius: 999px;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
    color: #f0d8a4;
    display: flex;
    font-size: 3.1rem;
    font-weight: 900;
    height: 168px;
    justify-content: center;
    letter-spacing: 0;
    overflow: hidden;
    width: 168px;
}

.resident-phone-card__photo img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.resident-phone-card__name {
    min-width: 0;
    width: 100%;
}

.resident-phone-card__name strong {
    color: #fff;
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1.05;
    margin-top: 5px;
    overflow-wrap: anywhere;
    text-align: center;
    text-transform: uppercase;
}

.resident-phone-card__name small {
    color: rgba(255, 238, 203, 0.84);
    font-size: 0.9rem;
    line-height: 1.3;
    margin: 8px auto 0;
    max-width: 28ch;
    text-align: center;
}

.resident-phone-card__qr-panel {
    align-items: center;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
    display: flex;
    justify-content: center;
    margin: auto auto 0;
    padding: 18px;
    position: relative;
    z-index: 1;
}

.resident-phone-card__qr {
    aspect-ratio: 1;
    display: block;
    height: auto;
    max-width: 100%;
    width: 230px;
}

.resident-phone-card__qr-missing {
    align-items: center;
    aspect-ratio: 1;
    color: var(--kc-red-deep);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    width: 230px;
}

.resident-phone-card__qr-missing span {
    color: var(--kc-muted);
    font-size: 0.78rem;
    margin-top: 6px;
}

.resident-phone-card__foot {
    border-top: 1px solid rgba(255, 238, 203, 0.28);
    justify-content: center;
    margin-top: 2px;
    padding-top: 14px;
    text-align: center;
}

.resident-phone-card__foot strong {
    color: #f0d8a4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.88rem;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .resident-card-stage {
        border-radius: 22px;
        padding: 18px 10px 22px;
    }
    .resident-card-stage__frame {
        border-radius: 24px;
        max-width: 340px;
    }
    .resident-phone-card {
        border-radius: 28px;
        max-width: 360px;
        padding: 18px;
    }
    .resident-phone-card__photo {
        height: 142px;
        width: 142px;
    }
    .resident-phone-card__name strong {
        font-size: 1.45rem;
    }
    .resident-phone-card__qr,
    .resident-phone-card__qr-missing {
        width: 205px;
    }
}

/* --- S7: Documents hub + recurrence --- */
.filter-tab-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0 12px;
}
.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--kc-surface-2, #f1f7f3);
    color: var(--kc-ink-2, #2b3b34);
    border: 1px solid rgba(20, 121, 77, 0.18);
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.filter-tab:hover {
    background: #e3f0e8;
    border-color: rgba(20, 121, 77, 0.32);
}
.filter-tab--active {
    background: linear-gradient(135deg, #14794d, #1c9560);
    color: #f0fbf3;
    border-color: transparent;
}
.content-card--featured {
    border: 1px solid rgba(20, 121, 77, 0.35);
    box-shadow: 0 12px 32px rgba(13, 94, 59, 0.12);
    background: linear-gradient(180deg, #f3fbf6, #ffffff);
}
.content-card__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* --- S8: Reports bar chart + audit table --- */
.kc-bars {
    display: grid;
    gap: 10px;
}
.kc-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 160px;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
}
.kc-bar-label {
    font-weight: 700;
    color: var(--kc-ink-2, #1f2a25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kc-bar-track {
    background: rgba(20, 121, 77, 0.10);
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
}
.kc-bar-fill {
    background: linear-gradient(90deg, #14794d, #4eb586);
    height: 100%;
    border-radius: inherit;
}
.kc-bar-value {
    color: var(--kc-muted, #6b766f);
    font-size: 0.86rem;
    text-align: right;
}
@media (max-width: 640px) {
    .kc-bar-row {
        grid-template-columns: 1fr;
    }
    .kc-bar-value {
        text-align: left;
    }
}

.kc-table th {
    color: var(--kc-ink-2, #1f2a25);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}
.kc-table td {
    font-size: 0.9rem;
    color: var(--kc-ink, #15201b);
}

/* --- KC Combobox: searchable dropdown --- */
.kc-combobox {
    position: relative;
}
.kc-combobox__search {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(20, 121, 77, 0.18);
    border-radius: 14px;
    background: #ffffff;
    font: inherit;
    color: var(--kc-ink, #15201b);
}
.kc-combobox__search:focus {
    outline: none;
    border-color: rgba(20, 121, 77, 0.6);
    box-shadow: 0 0 0 3px rgba(20, 121, 77, 0.12);
}
.kc-combobox__list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid rgba(20, 121, 77, 0.18);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(13, 60, 38, 0.12);
    list-style: none;
    margin: 0;
    padding: 4px;
    z-index: 50;
}
.kc-combobox__list[hidden] { display: none !important; }
.kc-combobox__list li {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.94rem;
    color: var(--kc-ink, #15201b);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}
.kc-combobox__list li:hover,
.kc-combobox__list li.is-active {
    background: rgba(20, 121, 77, 0.10);
    color: var(--kc-green-deep, #0d5e3b);
}
.kc-combobox__list li[hidden] { display: none; }
.kc-combobox__list li small {
    color: var(--kc-muted, #6b766f);
    font-size: 0.78rem;
}
.kc-combobox__list--empty::before {
    content: "No matches — try a different word.";
    display: block;
    padding: 12px;
    color: var(--kc-muted, #6b766f);
    font-size: 0.88rem;
    text-align: center;
}

/* --- Severity colour chips (re-usable) --- */
.severity-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.severity-chip--low { background: rgba(20, 121, 77, 0.10); color: #0d5e3b; }
.severity-chip--medium { background: rgba(154, 91, 4, 0.12); color: #8a4a00; }
.severity-chip--high { background: rgba(201, 59, 45, 0.14); color: #a23021; }
.severity-chip--critical { background: linear-gradient(135deg, rgba(201, 59, 45, 0.20), rgba(120, 20, 14, 0.22)); color: #71160c; }

/* --- Filter chip row (re-usable) --- */
.kc-filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 14px;
}
.kc-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--kc-surface-2, #f1f7f3);
    color: var(--kc-ink-2, #2b3b34);
    border: 1px solid rgba(20, 121, 77, 0.18);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.kc-filter-chip:hover { background: #e3f0e8; }
.kc-filter-chip--active {
    background: linear-gradient(135deg, #14794d, #1c9560);
    color: #f0fbf3;
    border-color: transparent;
}
.kc-filter-chip__count {
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
    padding: 0 8px;
    font-size: 0.74rem;
    color: inherit;
}
