:root {
    --app-primary: #1f5d50;
    --app-primary-dark: #17463c;
    --app-accent: #f4c95d;
    --app-surface: #ffffff;
    --app-background: #f3f5f4;
    --app-text: #1f2a2a;
    --app-muted: #5c6b6b;
    --app-border: #d7dfdc;
}

body.app-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(244, 201, 93, 0.28), transparent 32%),
        linear-gradient(180deg, #f9faf9 0%, var(--app-background) 100%);
    color: var(--app-text);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--app-text);
}

.app-brand-mark {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, var(--app-primary), var(--app-primary-dark));
    color: #fff;
    font-weight: 700;
}

.hero-card,
.auth-card {
    padding: 2rem;
    border: 1px solid rgba(31, 93, 80, 0.08);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
}

.status-panel {
    padding: 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--app-border);
    background: linear-gradient(180deg, rgba(31, 93, 80, 0.05), rgba(31, 93, 80, 0.02));
}

.status-item {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.875rem;
    color: var(--app-muted);
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--app-primary);
    box-shadow: 0 0 0 0.25rem rgba(31, 93, 80, 0.14);
}

.dashboard-tile {
    height: 100%;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(31, 93, 80, 0.08);
}

.admin-context-card {
    min-width: 15rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(31, 93, 80, 0.06), rgba(31, 93, 80, 0.02));
    border: 1px solid rgba(31, 93, 80, 0.12);
}

.admin-user-list {
    display: grid;
    gap: 1rem;
}

.admin-user-card {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(31, 93, 80, 0.1);
    background: #fff;
}

.consent-group.border-danger {
    border-color: var(--bs-danger) !important;
}

@media (max-width: 767.98px) {
    .hero-card,
    .auth-card {
        padding: 1.25rem;
        border-radius: 1rem;
    }
}

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

.territory-card {
    padding: 1.15rem;
    border-radius: 1rem;
    border: 1px solid rgba(31, 93, 80, 0.12);
    background: #fff;
    box-shadow: 0 0.75rem 1.5rem rgba(31, 42, 42, 0.04);
}

.territory-meta dt {
    font-weight: 600;
}

.territory-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.territory-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(31, 93, 80, 0.08);
    color: var(--app-primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.territory-chip-muted {
    background: rgba(92, 107, 107, 0.12);
    color: var(--app-muted);
}

.territory-summary .dashboard-tile {
    min-height: 7rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.territory-map-panel,
.territory-side-panel {
    height: 100%;
    padding: 1.15rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(31, 93, 80, 0.12);
}

.territory-map {
    min-height: 24rem;
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(31, 93, 80, 0.12);
}

.territory-map .leaflet-control-attribution {
    font-size: 0.68rem;
}

@media (max-width: 767.98px) {
    .territory-map {
        min-height: 19rem;
    }
}
.congregation-admin-list {
    display: grid;
    gap: 1rem;
}

.congregation-admin-card {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(31, 93, 80, 0.1);
    background: #fff;
}

.congregation-stat-tile {
    min-height: 6.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.congregation-admin-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.congregation-table th,
.congregation-table td {
    vertical-align: middle;
}

.congregation-table tbody tr:hover {
    background: rgba(31, 93, 80, 0.03);
}

.congregation-form-card {
    position: sticky;
    top: 6rem;
}

@media (max-width: 1199.98px) {
    .congregation-form-card {
        position: static;
    }
}

.app-brand-logo {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-block;
    flex: 0 0 auto;
}

.app-brand-title {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--app-text);
}

.public-hero-card {
    overflow: hidden;
}

.legal-links-card {
    background: rgba(255, 255, 255, 0.96);
}

.legal-link-tile {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(31, 93, 80, 0.12);
    background: #fff;
    color: var(--app-text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.legal-link-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(31, 42, 42, 0.06);
    border-color: rgba(31, 93, 80, 0.24);
}

.legal-link-tile span {
    color: var(--app-muted);
}

.legal-doc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.legal-section {
    scroll-margin-top: 6.5rem;
}

.legal-list {
    padding-left: 1.25rem;
}

.legal-list li + li {
    margin-top: 0.75rem;
}