.category-container {
    padding: 32px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 10px;
    line-height: 1.4;
}

.breadcrumb-link {
    color: var(--lh-brand-primary);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.breadcrumb-link:hover {
    text-decoration: underline;
    color: var(--lh-brand-accent);
}

.breadcrumb-separator {
    color: #94a3b8;
}

.breadcrumb-current {
    color: #64748b;
    font-weight: 500;
}

.category-header {
    margin-bottom: 32px;
}

.category-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.category-icon {
    color: var(--lh-brand-accent);
}

.category-description {
    color: #64748b;
    font-size: 1.125rem;
    line-height: 1.6;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.section-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--lh-brand-accent);
}

.section-icon-wrapper {
    margin-bottom: 16px;
    color: var(--lh-brand-accent);
}

.section-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.section-description {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.section-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.item-chip {
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    color: #475569;
}

/* ── Coming Soon state ───────────────────────────────────────── */
.section-card--coming-soon {
    opacity: 0.55;
    cursor: default;
    position: relative;
}

.section-card--coming-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: #e2e8f0;
}

.coming-soon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #94a3b8;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Entry count badge on section cards */
.section-entry-count-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--lh-brand-accent);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Entry count badge on dashboard category cards — top-right corner overlay */
.category-entry-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--lh-brand-accent);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

@media (max-width: 768px) {
    .category-container {
        padding: 24px 16px;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Subcategory Pages (Detail Pages) ───────────────────────────── */
.entity-container {
    padding: 32px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.entry-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.entry-card--highlighted {
    border-color: var(--lh-brand-accent);
    box-shadow: 0 0 0 4px rgba(139, 174, 63, 0.18);
}

.entry-card:hover {
    border-color: var(--lh-brand-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
}

.entry-nickname {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.entry-ref-number {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 7px;
    letter-spacing: 0;
    white-space: nowrap;
}

.client-entry-card-header {
    flex: 1;
    min-width: 0;
}

.entry-card-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.client-entry-owner-label {
    border: 1px solid #94a3b8;
    border-radius: 4px;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 7px;
}

.client-entry-card-loading {
    color: #64748b;
    font-size: 0.875rem;
    padding: 3px 0;
}

.client-sensitive-field {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    max-width: 100%;
}

.client-sensitive-toggle {
    background: transparent;
    border: 0;
    color: #213a63;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px;
}

.client-sensitive-toggle:focus-visible {
    outline: 2px solid #213a63;
    outline-offset: 2px;
}

.entry-subtitle {
    color: #64748b;
    font-size: 0.9375rem;
    margin-top: 2px;
    line-height: 1.4;
}

.entry-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
    padding-top: 6px;
}

/* Two-column label : value row */
.detail-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: baseline;
    gap: 8px 16px;
    padding: 9px 4px;
    border-bottom: 1px solid #f1f5f9;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
    padding-top: 1px;
}

.detail-value {
    font-size: 1.125rem;
    color: #1e293b;
    font-weight: 400;
    word-break: break-word;
    line-height: 1.5;
}

.detail-value--mono {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 1rem;
}

.detail-value--currency {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #213A63;
}

/* Clickable links inside read-only cards */
.detail-link {
    color: var(--lh-brand-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.detail-link:hover {
    text-decoration: underline;
    color: #213A63;
}

.detail-link-icon {
    font-size: 1rem !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
}


.entry-supporting-details {
    grid-column: 1 / -1;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
}

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

.supporting-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    min-width: 0;
}

.supporting-panel--wide {
    grid-column: 1 / -1;
}

.supporting-panel-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.supporting-panel-content {
    color: #475569;
    font-size: 1rem;
    line-height: 1.5;
    word-break: break-word;
}

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

.banking-detail-value {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.empty-state h3 {
    color: #1e293b;
    margin: 16px 0 8px;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 24px;
}

.lock-warning {
    margin-bottom: 24px;
}

.form-section {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.form-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
}

.client-entry-loading {
    color: #475569;
    padding: 24px 0;
}

.client-entry-form,
.client-entry-group {
    border: 0;
    margin: 0;
    padding: 0;
}

.client-entry-group + .client-entry-group {
    margin-top: 24px;
}

.client-entry-group__title {
    color: #213a63;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 0;
}

.client-entry-grid {
    display: grid;
    gap: 18px 20px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.client-entry-field {
    grid-column: span var(--client-entry-span);
    min-width: 0;
}

.client-entry-label {
    color: #334155;
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.client-entry-required {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 400;
}

.client-entry-control {
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    color: #172033;
    font: inherit;
    font-size: 16px;
    min-height: 46px;
    padding: 10px 12px;
    width: 100%;
}

.client-entry-control:focus {
    border-color: #213a63;
    box-shadow: 0 0 0 3px rgba(33, 58, 99, 0.14);
    outline: 0;
}

.client-entry-control[aria-invalid="true"] {
    border-color: #b42318;
}

.client-entry-control--textarea {
    min-height: 110px;
    resize: vertical;
}

.client-entry-control--monospace {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.client-entry-field-error {
    color: #b42318;
    font-size: 0.8rem;
    min-height: 18px;
    padding-top: 4px;
}

.client-entry-alert {
    border: 1px solid #94a3b8;
    border-radius: 4px;
    color: #334155;
    margin-top: 20px;
    padding: 12px 14px;
}

.client-entry-alert--error {
    background: #fff7f6;
    border-color: #f04438;
    color: #912018;
}

.client-entry-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 22px;
}

.client-entry-button {
    border: 1px solid #213a63;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    min-height: 44px;
    padding: 10px 18px;
}

.client-entry-button--primary {
    background: #213a63;
    color: #fff;
}

.client-entry-button--secondary {
    background: #fff;
    color: #213a63;
}

.client-entry-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

@media (max-width: 768px) {
    .entity-container {
        padding: 24px 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 8px 4px;
    }

    .detail-label {
        font-size: 0.875rem;
    }

    .entry-details.banking-details-grid {
        grid-template-columns: 1fr;
    }

    .supporting-details-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 20px 16px;
    }

    .client-entry-field {
        grid-column: 1 / -1;
    }

    .client-entry-actions {
        flex-direction: column-reverse;
    }

    .client-entry-button {
        width: 100%;
    }
}
