.page-shell {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 1440px;
    padding: 28px;
}

.brand {
    align-items: center;
    display: flex;
    gap: 10px;
    text-decoration: none;
}

.brand-symbol,
.worklist-icon {
    align-items: center;
    background: #1769aa;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.people-mobile-nav {
    display: none;
}

.toolbar {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.toolbar-title,
.toolbar-actions {
    align-items: center;
    display: flex;
    gap: 12px;
}

.toolbar-heading h1 {
    font-size: 28px;
    margin: 0;
}

.record-count,
.section-label,
.search-status,
.form-note,
.field-note,
.helptext {
    color: #697586;
}

.button-link,
.button-secondary,
button,
input[type="submit"] {
    background: #1769aa;
    border: 1px solid #1769aa;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    text-decoration: none;
}

.button-secondary,
.menu-panel button {
    background: #fff;
    color: #1769aa;
}

button:hover,
.button-link:hover,
.button-secondary:hover {
    border-color: #0f517f;
    text-decoration: none;
}

input,
select,
textarea {
    border: 1px solid #cbd5df;
    border-radius: 8px;
    box-sizing: border-box;
    color: #1f2933;
    font: inherit;
    min-height: 38px;
    padding: 8px 10px;
}

textarea {
    min-height: 94px;
}

.form,
form.form,
.auth-panel {
    display: grid;
    gap: 12px;
}

.auth-panel,
.profile-card,
.share-card,
.delete-card,
.document-card,
.list-tile {
    background: #fff;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    padding: 18px;
}

.message-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.message {
    background: #eef8f7;
    border: 1px solid #b7dcd8;
    border-radius: 8px;
    color: #23423f;
    padding: 10px 12px;
}

.message.error {
    background: #fff1f1;
    border-color: #efb5b5;
    color: #8f2929;
}

.contacts-table {
    background: #fff;
    border-collapse: collapse;
    border-radius: 8px;
    box-shadow: 0 0 0 1px #d7dde3;
    overflow: hidden;
    width: 100%;
}

.contacts-table th,
.contacts-table td {
    border-bottom: 1px solid #e1e7ec;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.contacts-table th {
    background: #eef3f7;
    color: #384655;
    font-size: 12px;
    text-transform: uppercase;
}

.row-actions {
    position: relative;
}

.namecards-worklist-tile.active {
    border-color: #1769aa;
    box-shadow: inset 0 0 0 1px #1769aa;
}

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

.public-emergency {
    background: #fff;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    padding: 20px;
}

.public-emergency-header {
    align-items: center;
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.public-emergency-header img {
    border-radius: 8px;
    height: 96px;
    object-fit: cover;
    width: 96px;
}

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

.emergency-grid div {
    border-top: 1px solid #e1e7ec;
    padding-top: 10px;
}

.emergency-grid .wide {
    grid-column: 1 / -1;
}

.emergency-grid dt {
    color: #697586;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.emergency-grid dd {
    margin: 5px 0 0;
}

@media (max-width: 800px) {
    body.has-app-sidebar {
        padding-left: 0;
    }

    .has-app-sidebar .topbar {
        bottom: auto;
        min-height: auto;
        position: sticky;
        width: 100%;
    }

    .nav {
        display: none;
    }

    .topbar.is-open .nav,
    .nav.is-open {
        display: flex;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .page-shell {
        padding: 16px;
    }

    .people-mobile-nav {
        background: #fff;
        border: 1px solid #d7dde3;
        border-radius: 8px;
        display: grid;
        gap: 4px;
        grid-template-columns: repeat(4, 1fr);
        margin-bottom: 12px;
        padding: 4px;
    }

    .people-mobile-nav a {
        border-radius: 6px;
        color: #384655;
        font-size: 13px;
        font-weight: 800;
        padding: 8px 4px;
        text-align: center;
    }

    .toolbar,
    .toolbar-title,
    .toolbar-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }
}
