body {
    background-color: #f8f9fa;
    font-family: 'DM Sans', sans-serif;
}

/* Typography - Headers use Zilla Slab */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Zilla Slab', serif;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

/* Navigation and brand styling */
.navbar-brand {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Modern card styling inspired by Stripe/Linear */
.card {
    border: 1px solid #e6e8eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fafbfc;
    border-bottom: 1px solid #e6e8eb;
    font-weight: 500;
}

/* Modern button styling */
.btn {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    border-radius: 6px;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #5469d4;
    border-color: #5469d4;
}

.btn-primary:hover {
    background-color: #4c63d2;
    border-color: #4c63d2;
    transform: translateY(-1px);
}

/* Modern table styling */
.table {
    font-size: 0.9rem;
}

.table th {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e6e8eb;
}

/* Badge styling */
.badge {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    border-radius: 4px;
    padding: 4px 8px;
}

/* Form styling */
.form-control {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: #5469d4;
    box-shadow: 0 0 0 3px rgba(84, 105, 212, 0.1);
}

/* Additional modern styling */
.navbar {
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #e6e8eb;
}

.nav-link {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    color: #374151 !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #5469d4 !important;
}

/* Alert styling */
.flash-wrapper {
    max-width: 960px;
    margin: 0.75rem auto 1.5rem;
    padding: 0 1.25rem;
}

.flash-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 14px;
    border: 1px solid transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    padding: 0.85rem 1.2rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.flash-alert .flash-message {
    flex: 1 1 auto;
}

.flash-close {
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.flash-close:hover,
.flash-close:focus {
    opacity: 1;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.22);
    color: #b45309;
}

.alert-danger {
    background-color: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.22);
    color: #b91c1c;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.raw-text {
    white-space: pre-wrap;
}

.highlight {
    background-color: yellow;  /* Highlight color */
    font-weight: bold;         /* Optional: make text bold */
}

/* Active Accounts drawer table */
.accounts-collection {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.account-row {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid #e4e7ff;
    border-radius: 18px;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.account-row:hover {
    border-color: #d6dcff;
    transform: translateY(-1px);
}

.account-row--open {
    border-color: #605bff;
}

.account-summary {
    display: grid;
    grid-template-columns: minmax(280px, 1.6fr) minmax(480px, 3fr) minmax(160px, auto);
    gap: 1.5rem;
    align-items: stretch;
    padding: 1.75rem 2rem;
}

.account-summary__primary {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.account-index {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef2ff 0%, #dbe4ff 100%);
    color: #3c3dd7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.account-identity {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.account-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: contain;
    background: #f4f6ff;
    padding: 6px;
    box-shadow: inset 0 0 0 1px #e8ecff;
}

.account-logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #4f46e5;
}

.account-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 3px;
    color: #0f172a;
}

.account-domain {
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-domain .fa-info-circle {
    color: #a1a6c7;
    cursor: pointer;
    transition: color 0.2s ease;
}

.account-domain .fa-info-circle:hover {
    color: #4338ca;
}

.account-owned-by {
    font-size: 0.8rem;
    color: #9ca3af;
}

.account-summary__metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 0.75rem;
    width: 100%;
    align-items: stretch;
}

.summary-metric {
    background: linear-gradient(180deg, #fafbff 0%, #f5f7ff 100%);
    border: 1px solid #e1e5ff;
    border-radius: 16px;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: flex-start;
    min-height: 74px;
    box-shadow: none;
}

.summary-metric,
.summary-metric * {
    transition: color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.summary-metric--link {
    display: flex;
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.summary-metric--link:hover,
.summary-metric--link:focus {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.06);
}

.summary-metric .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a90ad;
    font-weight: 600;
}

.summary-metric .value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.summary-metric--activity {
    padding-bottom: 0.7rem;
}

.summary-metric--activity .value {
    font-size: 0.9rem;
}

.summary-metric--activity .value-pill {
    margin-top: 0.25rem;
    align-self: flex-start;
    width: auto;
}

.value-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    background: rgba(67, 56, 202, 0.08);
    color: #1f2937;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
    max-width: 240px;
    white-space: normal;
    border: none;
}

.value-pill::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pill-color, #4b5563);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.value-pill--1 {
    --pill-color: #10b981;
    background: rgba(16, 185, 129, 0.18);
    color: #047857;
}

.value-pill--2 {
    --pill-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.18);
    color: #0369a1;
}

.value-pill--3 {
    --pill-color: #f59e0b;
    background: rgba(245, 158, 11, 0.18);
    color: #92400e;
}

.value-pill--4 {
    --pill-color: #fb923c;
    background: rgba(251, 146, 60, 0.18);
    color: #c2410c;
}

.value-pill--5 {
    --pill-color: #f87171;
    background: rgba(248, 113, 113, 0.2);
    color: #b91c1c;
}

.value-pill--unknown {
    --pill-color: #9ca3af;
    background: rgba(148, 163, 184, 0.16);
    color: #4b5563;
}

.value-sub {
    font-size: 0.78rem;
    font-weight: 500;
    color: #98a2c3;
}

.account-summary__actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    justify-content: flex-end;
    align-self: center;
}

.summary-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4338ca;
    transition: color 0.2s ease;
}

.summary-link:hover {
    color: #312e81;
    text-decoration: none;
}

.initiatives-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.initiatives-toolbar__note {
    font-size: 0.85rem;
    color: #94a3b8;
}

.initiatives-table-card--domain {
    margin-top: 0;
}

.initiatives-table--domain .program-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.2rem;
}

.initiatives-table--domain .table-subline {
    font-size: 0.75rem;
    color: #94a3b8;
}

.account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(84, 105, 212, 0.3);
    background: linear-gradient(135deg, rgba(84, 105, 212, 0.12) 0%, rgba(84, 105, 212, 0.22) 100%);
    color: #363ec9;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.account-toggle:hover {
    background: linear-gradient(135deg, rgba(84, 105, 212, 0.18) 0%, rgba(84, 105, 212, 0.28) 100%);
}

.account-toggle i {
    transition: transform 0.2s ease;
}

.account-row--open .account-toggle {
    background: #4338ca;
    border-color: #4338ca;
    color: #ffffff;
}

.account-row--open .account-toggle i {
    transform: rotate(180deg);
}

.account-drawer {
    border-top: 1px solid #e8ebff;
    padding: 1.25rem 1.75rem 1.75rem;
    background: linear-gradient(180deg, #f7f8ff 0%, #ffffff 100%);
}

.drawer-banner {
    background: rgba(96, 91, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #2f2fa6;
}

.drawer-banner a {
    font-weight: 600;
    color: #4338ca;
}

.account-drawer__grid {
    display: grid;
    gap: 1.1rem;
    margin-top: 1.35rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.drawer-card {
    background: linear-gradient(180deg, #ffffff 0%, #fdfdff 100%);
    border: 1px solid #e4e7ff;
    border-radius: 18px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.drawer-card h6 {
    font-size: 0.92rem;
    margin: 0;
    color: #1f2937;
}

.drawer-card-group--split {
    grid-column: 1 / -1;
    display: grid;
    gap: 1.1rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.drawer-card--textarea {
    gap: 0.65rem;
}

.drawer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.86rem;
    color: #334155;
}

.drawer-list a {
    color: #3c3dd7;
    font-weight: 600;
}

.drawer-sublist {
    list-style: none;
    padding-left: 0;
    margin: 0.35rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.drawer-sublist li {
    color: #4b5563;
}

.drawer-card textarea {
    font-size: 0.86rem;
    width: 100%;
    background: #f6f7ff;
    border: 1px solid #dbe1ff;
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    resize: vertical;
    min-height: 88px;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.drawer-card textarea:disabled {
    color: #475569;
    opacity: 1;
}

.drawer-card textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

.drawer-card .btn {
    align-self: flex-start;
    margin-top: 0.35rem;
}

.drawer-card--textarea .btn {
    align-self: flex-end;
    margin-top: auto;
}

/* Domain details page */
.account-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f7f8ff 100%);
    border: 1px solid #e4e7ff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.account-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.account-hero__breadcrumb a {
    color: #4338ca;
}

.account-hero__title {
    font-size: 2rem;
    margin: 0.35rem 0 0.25rem;
}

.account-hero__subtitle {
    margin: 0;
    color: #6b7280;
}

.account-hero__tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.tag--info {
    background: rgba(79, 70, 229, 0.12);
    color: #4338ca;
}

.tag--gold {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

.tag--muted {
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
}

.account-hero__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

.account-hero__actions form {
    margin: 0;
}

.account-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.summary-chip {
    background: #ffffff;
    border: 1px solid #e4e7ff;
    border-radius: 16px;
    padding: 1rem 1.2rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.summary-chip__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7c82a4;
    font-weight: 600;
}

.summary-chip__value {
    font-size: 1.05rem;
    color: #0f172a;
    font-weight: 600;
}

.account-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.account-section {
    padding: 1.75rem 2rem;
    background: #ffffff;
    border: 1px solid #e4e7ff;
    border-radius: 20px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
}

.account-body .card {
    border-radius: 18px;
    border: 1px solid #e4e7ff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.account-body .card-header {
    background: linear-gradient(135deg, #f9faff 0%, #ffffff 100%);
    border-bottom: 1px solid #e4e7ff;
}

.account-body .card-header h4 {
    margin: 0;
}

.domain-page .summary-chip,
.domain-page .account-section,
.domain-page .account-body .card,
.domain-page .initiatives-table-card,
.domain-page .initiatives-table-card:hover,
.domain-page .initiative-form-card,
.domain-page .card,
.domain-page .card:hover {
    box-shadow: none;
}

.domain-page .account-section,
.domain-page .summary-chip,
.domain-page .account-body .card,
.domain-page .initiatives-table-card,
.domain-page .initiative-form-card {
    border-color: #e4e7ff;
}

.account-body .card-body {
    background: #ffffff;
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.section-subtitle {
    margin: 0.25rem 0 0;
    color: #64748b;
}

.section-meta {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.section-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.initiative-form-card {
    border: 1px solid #e8ebff;
    border-radius: 16px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.initiative-form-card h4 {
    margin-bottom: 1rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

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

.initiative-card {
    border: 1px solid #e5e9ff;
    border-radius: 18px;
    padding: 1.25rem 1.4rem;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.initiative-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.initiative-card__header h5 {
    margin: 0 0 0.5rem;
}

.initiative-card__meta {
    font-size: 0.75rem;
    color: #94a3b8;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pill--stage {
    background: rgba(99, 102, 241, 0.12);
    color: #4c51bf;
}

.pill--stage-default {
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
}

.pill--stage-planned {
    background: rgba(59, 130, 246, 0.16);
    color: #2563eb;
}

.pill--stage-requested {
    background: rgba(147, 51, 234, 0.16);
    color: #7c3aed;
}

.pill--stage-in-progress {
    background: rgba(14, 165, 233, 0.16);
    color: #0284c7;
}

.pill--stage-complete {
    background: rgba(34, 197, 94, 0.18);
    color: #15803d;
}

.pill--stage-declined {
    background: rgba(248, 113, 113, 0.18);
    color: #dc2626;
}

.initiative-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
    margin: 0;
}

.initiative-summary dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.initiative-summary dd {
    margin: 0;
    font-weight: 600;
    color: #1f2937;
}

.initiative-details {
    margin: 0;
    color: #475569;
}

.initiative-edit {
    border-top: 1px solid #e5e9ff;
    padding-top: 1rem;
}

.initiative-edit summary {
    cursor: pointer;
    font-weight: 600;
    color: #4338ca;
    margin-bottom: 0.75rem;
}

.initiative-edit summary::-webkit-details-marker {
    display: none;
}

.initiative-edit summary:after {
    content: '▾';
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.initiative-edit[open] summary:after {
    content: '▴';
}

.initiative-edit form:not(:last-child) {
    margin-bottom: 0.75rem;
}

.initiative-edit .form-inline {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 992px) {
    .account-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-hero__actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .account-hero__actions form {
        flex: none;
    }
}

/* Initiatives index */
.initiatives-page {
    padding-bottom: 3rem;
}

.initiatives-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.initiatives-hero h1 {
    margin-bottom: 0.35rem;
}

.initiatives-hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.initiatives-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.initiatives-page .summary-chip {
    box-shadow: none;
    border: 1px solid #e4e7ff;
}

.initiatives-filters {
    background: #ffffff;
    border: 1px solid #e4e7ff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: none;
    margin-bottom: 2rem;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filters-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.initiatives-table-card {
    background: #ffffff;
    border: 1px solid #e4e7ff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: none;
}

.initiatives-table thead th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #7c82a4;
    border-top: none;
}

.initiatives-table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.initiatives-table td .table-subline {
    font-size: 0.75rem;
    color: #94a3b8;
}

.contact-cell div + .table-subline {
    margin-top: 0.1rem;
}

.initiative-details-cell {
    max-width: 240px;
}

.details-snippet {
    color: #475569;
    font-size: 0.85rem;
    white-space: pre-wrap;
    max-height: 4.5rem;
    overflow: hidden;
}

.contacts-table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.contacts-table {
    width: 100%;
    margin-bottom: 0;
}

.contacts-table .contact-name {
    font-weight: 600;
    color: #111827;
}

.contacts-table .contacts-badge {
    background: rgba(99, 102, 241, 0.08);
    color: #4338ca;
    border-radius: 999px;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
}

.contacts-table-wrapper {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #e4e7ff;
    border-radius: 14px;
    padding: 0.5rem;
    background: #fff;
}

.proximity-alert {
    margin-bottom: 1.5rem;
}

.proximity-matches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.25rem 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.selected-contact-meta {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.selected-contact-meta span {
    display: inline;
    color: inherit;
}

.meta-subline {
    font-size: 0.8rem;
    color: #94a3b8;
}

.initiative-summary .meta-subline {
    margin-top: 0.15rem;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .filters-actions {
        justify-content: flex-start;
    }

    .initiatives-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 1200px) {
    .account-summary {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .account-summary__actions {
        justify-content: flex-start;
    }

    .account-summary__metrics {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
}

@media (max-width: 768px) {
    .accounts-collection {
        gap: 1.1rem;
    }

    .account-summary {
        padding: 1.25rem;
    }

    .summary-metric {
        min-height: auto;
        padding: 0.65rem 0.8rem;
    }

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