.registry-page, .registry-preview { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.registry-header { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 16px 24px; }
.registry-heading { flex: 1 1 400px; min-width: 0; }
.registry-breadcrumb { font-size: 12px; color: var(--dd-muted, #67736e); margin-bottom: 9px; }
.registry-breadcrumb span { margin: 0 8px; }
.registry-heading h1 { margin: 0; font-size: 25px; font-weight: 650; line-height: 1.3; color: var(--dd-text, #21352b); }
.registry-heading h1 i { font-size: 21px; color: var(--dd-primary, #24523d); margin-right: 6px; }
.registry-heading p { margin: 7px 0 0; font-size: 14px; color: var(--dd-muted, #67736e); line-height: 1.55; }
.registry-source { flex: 1 0 100%; margin: 0; padding-top: 12px; border-top: 1px solid var(--dd-border, #dce3dd); font-size: 13px; color: var(--dd-muted, #67736e); line-height: 1.5; }
.registry-source i { margin-right: 5px; }
.registry-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.registry-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 14px; border: 1px solid var(--dd-border, #dce3dd); border-radius: var(--dd-radius-sm, 8px); background: #fff; color: var(--dd-text, #21352b); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; text-decoration: none; }
.registry-btn:hover { border-color: var(--dd-primary, #24523d); background: #f5f8f5; }
.registry-btn--primary { background: var(--dd-primary, #24523d); border-color: var(--dd-primary, #24523d); color: #fff; }
.registry-btn--primary:hover { background: #1b412f; color: #fff; }
.registry-btn--small { min-height: 36px; padding: 6px 10px; font-size: 12px; }
.registry-btn:disabled { opacity: .5; cursor: default; }
.registry-page :is(button, a, input, select, textarea):focus-visible, .registry-preview :is(button, a, input):focus-visible, .registry-panel:focus-visible { outline: 2px solid #307452; outline-offset: 3px; }
.registry-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; padding: 16px; border: 1px solid var(--dd-border, #dce3dd); border-radius: var(--dd-radius, 12px); background: #fff; }
.registry-field { display: flex; flex-direction: column; gap: 6px; min-width: 170px; flex: 0 1 220px; margin: 0; }
.registry-field > span { font-size: 12px; font-weight: 600; color: var(--dd-muted, #67736e); }
.registry-field--search { flex: 1 1 340px; }
.registry-input, .registry-textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid var(--dd-border, #dce3dd); border-radius: 8px; color: var(--dd-text, #21352b); background: #fff; font: inherit; font-size: 13px; }
.registry-textarea { resize: vertical; min-height: 78px; }
.registry-check { min-height: 42px; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; cursor: pointer; }
.registry-check input { width: 16px; height: 16px; accent-color: var(--dd-primary, #24523d); }
.registry-results { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--dd-muted, #67736e); }
.registry-results strong { color: var(--dd-text, #21352b); font-weight: 650; }
.registry-panel { min-width: 0; overflow-x: auto; border: 1px solid var(--dd-border, #dce3dd); border-radius: var(--dd-radius, 12px); background: #fff; }
.registry-table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 13px; }
.registry-table th { padding: 12px 14px; text-align: left; background: #f3f6f2; border-bottom: 1px solid var(--dd-border, #dce3dd); color: #5a6b60; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.registry-table td { padding: 13px 14px; border-bottom: 1px solid #e8ede7; vertical-align: top; }
.registry-table tbody tr:last-child td { border-bottom: 0; }
.registry-table tbody tr:hover { background: #f8faf7; }
.registry-person { font-weight: 600; color: var(--dd-primary, #24523d); text-decoration: none; }
.registry-person:hover { text-decoration: underline; }
.registry-table .registry-input { min-height: 38px; padding: 7px 9px; }
.registry-panel--note { padding: 16px; }
.registry-alert { padding: 13px 16px; border: 1px solid #ecd9ba; border-radius: 8px; background: #fffaf0; color: #77551e; font-size: 13px; line-height: 1.5; }
.registry-alert--error { border-color: #ebc8c5; background: #fff7f6; color: #923d35; }
.registry-loading { display: flex; align-items: center; gap: 10px; padding: 22px 16px; border: 1px solid var(--dd-border, #dce3dd); border-radius: 12px; background: #fff; color: #67736e; font-size: 14px; }
.registry-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #dce3dd; border-top-color: #24523d; animation: registry-spin .8s linear infinite; }
@keyframes registry-spin { to { transform: rotate(360deg); } }
.registry-state, .registry-status-chip, .registry-note-chip { display: inline-flex; padding: 4px 8px; border-radius: 6px; background: #edf4ed; color: #315f3e; font-size: 11px; font-weight: 600; white-space: nowrap; }
.registry-status-chip--ended, .registry-status-chip--closed { background: #f0f2f1; color: #606a65; }
.registry-status-chip--death, .registry-status-chip--expired, .registry-note-chip--important, .registry-status-chip--important { background: #fff0ed; color: #9b4a3c; }
.registry-status-chip--open, .registry-status-chip--unknown, .registry-state--draft { background: #fff6e6; color: #8a652a; }
.registry-person-name, .registry-strong { font-weight: 600; }
.registry-muted-small { margin-top: 4px; font-size: 11px; color: #758177; }
.registry-details-row td { padding-top: 0; background: #fafcf9; color: #66756b; font-size: 12px; line-height: 1.55; }
.registry-detail-label { font-weight: 600; }
.registry-preview-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.registry-preview-header h1 { font-size: 22px; font-weight: 650; margin: 0 0 5px; }
.registry-preview-header p { font-size: 13px; color: #67736e; margin: 0; }
.registry-document { box-sizing: border-box; padding: 28px 32px; border: 1px solid #dce3dd; border-radius: 10px; background: #fff; color: #1f2933; overflow-x: auto; }
.registry-document-header { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 17px; border-bottom: 1px solid #aebcb1; font-size: 12px; line-height: 1.6; }
.registry-issuer strong { display: block; font-size: 15px; font-weight: 650; margin-bottom: 3px; }
.registry-document-meta { text-align: right; white-space: nowrap; color: #5b6860; }
.registry-document-title { margin: 22px 0 18px; }
.registry-document-title h2 { margin: 0 0 6px; font-size: 21px; font-weight: 650; }
.registry-document-title p { margin: 3px 0; font-size: 12px; color: #5b6860; }
.registry-document-scope { padding-top: 5px; }
.registry-document table { width: 100%; border-collapse: collapse; font-size: 11px; line-height: 1.45; }
.registry-document th { text-align: left; padding: 9px 8px; background: #eef2ee; font-weight: 650; border: 1px solid #c6d0c7; }
.registry-document td { padding: 9px 8px; vertical-align: top; border: 1px solid #d5dcd5; white-space: pre-wrap; overflow-wrap: anywhere; }
.registry-document .official-note, .registry-document .official-warning { padding: 11px 13px; margin: 14px 0; border: 1px solid #d5dcd5; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.registry-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 55px; margin-top: 36px; font-size: 11px; text-align: center; }
.registry-signature-line { border-bottom: 1px solid #9ea99f; height: 30px; margin-bottom: 7px; }
.registry-footer-note { padding-top: 15px; font-size: 11px; color: #647067; line-height: 1.5; }
@media (max-width: 700px) {
    .registry-header, .registry-preview-header { gap: 13px; }
    .registry-heading { flex-basis: 100%; }
    .registry-heading h1 { font-size: 22px; }
    .registry-actions { width: 100%; }
    .registry-actions .registry-btn { flex: 1 1 auto; }
    .registry-toolbar { padding: 12px; gap: 12px; }
    .registry-field { flex: 1 1 150px; min-width: 0; }
    .registry-field--search { flex-basis: 100%; }
    .registry-document { padding: 20px 16px; }
    .registry-document-header { flex-wrap: wrap; gap: 12px; }
    .registry-document-meta { text-align: left; }
    .registry-document table { min-width: 760px; }
}
@media (prefers-reduced-motion: reduce) { .registry-spinner { animation: none; } }
@media print {
    @page registry-sheet { size: A4 landscape; margin: 12mm; }
    .registry-document { page: registry-sheet; border: 0 !important; border-radius: 0 !important; padding: 0 !important; overflow: visible !important; box-shadow: none !important; }
    .registry-document table { min-width: 0 !important; table-layout: fixed; font-size: 9px; }
    .registry-document th, .registry-document td { padding: 6px; }
    .registry-document th { background: #f0f2f0 !important; }
    .registry-document-header { display: flex; flex-wrap: nowrap; break-inside: avoid; }
    .registry-document-meta { text-align: right; }
    .registry-document-title, .registry-document-footer { break-inside: avoid; }
    .registry-document-title h2 { font-size: 17px; }
    .registry-document thead { display: table-header-group; }
    .registry-document tbody { break-inside: auto; }
    .registry-document tr { break-inside: avoid; }
    .registry-document table { break-inside: auto !important; }
    .registry-preview-header, .registry-toolbar, .no-print { display: none !important; }
}

.registry-table .registry-empty { padding: 28px 16px; text-align: center; color: #758177; }
