.management-actions a,
.management-actions button {
    display: grid;
    place-items: center;
}

.management-actions a {
    color: #354cff;
}

.management-actions button {
    color: #ef4444;
}

.management-actions svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-glyph {
    cursor: pointer;
    border-radius: 7px;
    padding: 6px;
    margin: -6px;
    transition: background .18s ease;
}

.menu-glyph:hover,
.menu-glyph:focus-visible {
    background: #eef3f9;
    outline: none;
}

.app-shell,
.sidebar,
.brand-logo,
.nav-link {
    transition: all .22s ease;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar {
    padding-left: 8px;
    padding-right: 8px;
}

.app-shell.sidebar-collapsed .brand {
    justify-content: center;
    padding: 0 8px;
    margin-left: -8px;
    margin-right: -8px;
}

.app-shell.sidebar-collapsed .brand-logo {
    width: 44px;
    flex-basis: 44px;
    padding: 4px;
}

.app-shell.sidebar-collapsed .brand > div,
.app-shell.sidebar-collapsed .nav-link > span:last-child,
.app-shell.sidebar-collapsed .nav-section {
    display: none;
}

.sidebar-user {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 2px 10px;
    align-items: center;
    margin-top: auto;
    padding: 14px 10px 0;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.sidebar-user .avatar {
    grid-row: 1 / span 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-weight: 800;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
    line-height: 1.3;
}

.sidebar-user small {
    color: #c7d7ff;
    font-size: 11px;
}

.sidebar-user form {
    grid-column: 2;
}

.sidebar-user .link-button {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.app-shell.sidebar-collapsed .sidebar-user {
    display: none;
}

.app-shell.sidebar-collapsed .nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    width: 52px;
    min-height: 52px;
    margin: 4px auto;
    padding: 13px 8px;
}

.app-shell.sidebar-collapsed .nav-icon svg {
    width: 22px;
    height: 22px;
}

.dashboard-metrics .metric {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.dashboard-metrics .metric:hover,
.dashboard-metrics .metric:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(18, 31, 49, .16);
    outline: none;
}

.donut-chart {
    width: 250px;
    height: 250px;
    overflow: visible;
}

.donut-track,
.donut-segment {
    fill: none;
    stroke-width: 16;
}

.donut-track {
    stroke: #edf1f6;
}

.donut-segment {
    stroke: var(--segment-color);
    stroke-dasharray: var(--segment-size) calc(100 - var(--segment-size));
    stroke-dashoffset: var(--segment-offset);
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-width .16s ease, opacity .16s ease;
    cursor: pointer;
}

.donut-chart a:hover .donut-segment,
.donut-chart a:focus .donut-segment {
    stroke-width: 20;
    opacity: .88;
}

.donut-total {
    font-size: 12px;
    font-weight: 800;
    fill: #0b1426;
}

.donut-caption {
    font-size: 5px;
    fill: #718096;
}

.chart-legend a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #67748b;
    border-radius: 5px;
    padding: 3px 5px;
}

.chart-legend a:hover {
    background: #f2f6fb;
    text-decoration: none;
}

.chart-legend a b {
    display: none;
    color: #0b1426;
}

.chart-legend a:hover b,
.chart-legend a:focus b {
    display: inline;
}

.week-column {
    color: inherit;
    text-decoration: none;
    border-radius: 7px;
}

.week-column:hover,
.week-column:focus-visible {
    background: rgba(62, 128, 237, .07);
    text-decoration: none;
    outline: none;
}

.week-column:hover .week-value,
.week-column:focus-visible .week-value {
    display: block;
    background: #0b1426;
    color: #fff;
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 12px;
    z-index: 2;
}

.week-column:hover .week-bar-space i,
.week-column:focus-visible .week-bar-space i {
    background: #145fce;
}

.actions-panel > h3:first-child {
    margin-bottom: 16px;
}

.document-action-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 22px;
}

.document-action-tabs a {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbe2ec;
    border-radius: 9px;
    padding: 11px;
    color: #526079;
}

.document-action-tabs a:hover,
.document-action-tabs a.active {
    border-color: #2874da;
    background: #edf5ff;
    color: #075db8;
    text-decoration: none;
}

.document-action-tabs svg,
.action-badge svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.document-action-tabs strong,
.document-action-tabs small {
    display: block;
}

.document-action-tabs small {
    margin-top: 2px;
    font-size: 10px;
    color: #7a879a;
}

.action-intro {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.action-intro h3,
.action-intro p {
    margin: 0;
}

.action-intro p {
    color: #6b778a;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 4px;
}

.action-badge {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #e5f0ff;
    color: #075db8;
    flex: 0 0 38px;
}

.action-intro.move .action-badge {
    background: #e6f8ee;
    color: #10954b;
}

.document-action-form .form-actions {
    padding-top: 4px;
}

.custody-summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 9px;
    background: #f7f9fc;
    border: 1px solid #e5e9f0;
    border-radius: 9px;
    padding: 12px;
    margin-bottom: 17px;
}

.custody-summary span,
.custody-summary strong {
    display: block;
    font-size: 11px;
}

.custody-summary strong {
    grid-column: 1;
    font-size: 13px;
}

.custody-summary i {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: #075db8;
    font-size: 20px;
}

.custody-summary span:last-child {
    grid-column: 3;
    grid-row: 1 / span 2;
    color: #7a879a;
}

@media (max-width: 720px) {
    .app-shell.sidebar-collapsed .sidebar { display: none; }
    .document-action-tabs { grid-template-columns: 1fr; }
}

.document-list-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0 0 12px;
}

.page-size-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}

.page-size-form select {
    width: auto;
    min-width: 74px;
    padding: 8px 30px 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
}

.documents-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    color: #64748b;
    font-size: 14px;
}

.documents-pagination > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.documents-pagination strong {
    color: #334155;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .documents-pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}

.reference-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(1px);
}

.reference-modal {
    width: min(1120px, 100%);
    max-height: 90vh;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.reference-modal > header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.reference-modal > header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 25px;
}

.reference-modal > header p {
    margin: 3px 0 0;
    color: #64748b;
}

.reference-modal > header strong {
    display: block;
    margin-top: 4px;
    color: #15803d;
    font-size: 13px;
}

.reference-modal > header > a {
    color: #94a3b8;
    font-size: 32px;
    line-height: 1;
    text-decoration: none;
}

.history-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr);
    height: min(650px, calc(90vh - 95px));
    min-height: 0;
}

.history-modal-timeline,
.history-action-panel {
    overflow-y: auto;
    padding: 28px 30px;
}

.history-modal-timeline {
    border-right: 1px solid #e2e8f0;
}

.history-modal-timeline > h3,
.move-update-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 24px;
    color: #172033;
    font-size: 21px;
}

.history-clock,
.move-update-heading {
    color: #0284c7;
}

.history-action-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
    background: #f8fafc;
}

.move-update-heading span {
    color: #0f172a;
    line-height: 1.2;
}

.history-action-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 24px;
    padding: 5px;
    border-radius: 10px;
    background: #e2e8f0;
}

.history-action-tabs a {
    padding: 11px 8px;
    border-radius: 7px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.history-action-tabs a.active {
    color: #075db8;
    background: #fff;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .12);
}

.history-action-form,
.create-document-modal form {
    display: grid;
    gap: 18px;
}

.history-action-form {
    flex: 0 0 auto;
    gap: 18px;
}

.history-action-fields {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 2px 0 0;
    overflow: visible;
}

.history-action-form label,
.create-document-modal label,
.request-document label {
    display: grid;
    gap: 7px;
    color: #263244;
    font-size: 14px;
    font-weight: 700;
}

.history-action-form input,
.history-action-form select,
.history-action-form textarea,
.create-document-modal input,
.create-document-modal textarea,
.request-document textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    background: #fff;
    font: inherit;
}

.history-action-form input:disabled {
    color: #64748b;
    background: #f1f5f9;
}

.history-submit {
    min-height: 48px;
    width: 100%;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .1);
}

.history-submit.update { background: #16a34a; }
.history-submit.move { background: #2563eb; }

.history-modal .timeline-purpose {
    color: #075db8;
    font-size: 13px;
    text-decoration: none;
}

.create-document-modal {
    width: min(560px, 100%);
    max-height: 94vh;
    overflow-y: auto;
}

.create-document-modal > header {
    padding: 25px 30px 15px;
    border-bottom: 0;
    background: #fff;
}

.create-document-modal form {
    padding: 8px 30px 28px;
}

.create-document-modal label small {
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
}

.create-document-modal footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 5px;
}

.create-document-modal footer > div {
    display: flex;
    gap: 10px;
}

.modal-draft-button {
    border: 0;
    color: #475569;
    background: transparent;
    text-decoration: underline;
    cursor: pointer;
}

.locked-document,
.request-document {
    padding: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.receipt-acknowledgement,
.transfer-awaiting {
    padding: 22px;
    border-radius: 12px;
}

.receipt-acknowledgement {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
}

.receipt-icon,
.transfer-awaiting > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 50%;
    color: #fff;
    background: #16a34a;
    font-size: 21px;
    font-weight: 800;
}

.receipt-acknowledgement h3,
.transfer-awaiting h3 {
    margin: 0 0 9px;
    color: #166534;
    font-size: 19px;
}

.receipt-acknowledgement p,
.transfer-awaiting p {
    margin: 0 0 18px;
    color: #3f6250;
    line-height: 1.6;
}

.acknowledge-receipt-button {
    width: 100%;
    min-height: 48px;
    border-color: #16a34a;
    color: #fff;
    background: #16a34a;
}

.acknowledge-receipt-button:hover {
    border-color: #15803d;
    background: #15803d;
}

.transfer-awaiting {
    border: 1px solid #fde68a;
    background: #fffbeb;
}

.transfer-awaiting > span {
    background: #d97706;
}

.transfer-awaiting h3 { color: #92400e; }
.transfer-awaiting p { margin-bottom: 0; color: #78350f; }

.move-transit-note {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    color: #1e3a8a;
    background: #eff6ff;
}

.move-transit-note span {
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 820px) {
    .reference-modal-backdrop { padding: 8px; }
    .history-modal-body { display: block; overflow-y: auto; }
    .history-modal-timeline { overflow: visible; }
    .history-action-panel { min-height: 0; overflow: visible; }
    .history-modal-timeline { border-right: 0; border-bottom: 1px solid #e2e8f0; }
    .create-document-modal footer { align-items: stretch; flex-direction: column; }
    .create-document-modal footer > div { justify-content: flex-end; }
}

[hidden] { display: none !important; }

.bulk-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #075db8;
    background: #eff6ff;
}

.bulk-action-bar > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bulk-action-bar small {
    color: #b45309;
    font-weight: 600;
}

.bulk-check-icon { font-size: 20px; }

.bulk-update-button,
.bulk-move-button {
    min-height: 40px;
    padding: 8px 16px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.bulk-update-button { background: #16a34a; }
.bulk-move-button { background: #2563eb; }

.documents-table tbody tr.is-selected {
    background: #eff6ff;
}

.documents-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0b6ee7;
    cursor: pointer;
}

.bulk-action-modal {
    width: min(540px, 100%);
    max-height: 92vh;
    overflow-y: auto;
}

.bulk-action-modal > header {
    align-items: center;
    padding: 20px 24px;
    background: #fff;
}

.bulk-action-modal > header h2 { font-size: 21px; }

.bulk-action-modal > header button {
    padding: 0;
    border: 0;
    color: #94a3b8;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.bulk-action-modal form {
    display: grid;
    gap: 17px;
    padding: 22px 24px 24px;
}

.bulk-action-modal label,
.bulk-current-user {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.bulk-action-modal input,
.bulk-action-modal select,
.bulk-action-modal textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.bulk-current-user > div {
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
}

.bulk-modal-summary {
    padding: 12px 14px;
    border-radius: 7px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 14px;
}

.bulk-action-modal footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 6px;
}

.bulk-submit {
    padding: 10px 17px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.bulk-submit.update { background: #16a34a; }
.bulk-submit.move { background: #2563eb; }

body.modal-open { overflow: hidden; }

.form-stack .checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    color: #1e40af;
    background: #eff6ff;
}

.form-stack .checkbox-label input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.form-stack .permission-checkbox {
    align-items: flex-start;
    border-color: #bfdbfe;
    background: #f0f7ff;
}

.form-stack .permission-checkbox input { margin-top: 2px; flex: 0 0 18px; }
.form-stack .permission-checkbox span { display: grid; gap: 3px; }
.form-stack .permission-checkbox strong { color: #1e3a8a; font-size: 13px; }
.form-stack .permission-checkbox small { color: #64748b; font-size: 11px; font-weight: 500; line-height: 1.4; }
.user-permissions-heading { display: grid; gap: 3px; margin-top: 3px; padding-top: 14px; border-top: 1px solid #dbe4f0; }
.user-permissions-heading strong { color: #172033; font-size: 14px; }
.user-permissions-heading small { color: #64748b; font-size: 11px; line-height: 1.4; }
.form-stack .complaint-permission-checkbox { border-color: #93c5fd; background: #eff6ff; box-shadow: inset 3px 0 0 #2563eb; }

.admin-delete-document {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff7f7;
}

.admin-delete-document h3 {
    margin: 0 0 6px;
    color: #991b1b;
    font-size: 15px;
}

.admin-delete-document p {
    margin: 0 0 13px;
    color: #7f1d1d;
    font-size: 12px;
    line-height: 1.5;
}

.delete-document-button {
    width: 100%;
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.delete-document-button:hover {
    border-color: #b91c1c;
    background: #b91c1c;
}

.delete-document-button svg {
    width: 17px;
    height: 17px;
}

.document-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    white-space: nowrap;
    text-decoration: none;
}

.document-sort-link:hover,
.document-sort-link.active {
    color: #075db8;
    text-decoration: none;
}

.document-sort-link span {
    color: #94a3b8;
    font-size: 12px;
}

.document-sort-link.active span { color: #075db8; }

.draft-continue-link {
    color: #7c3aed;
    font-weight: 700;
}

.document-number-feedback {
    display: block;
    min-height: 18px;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.document-number-feedback:empty { display: none; }
.document-number-feedback.checking { color: #64748b; }
.document-number-feedback.available { color: #15803d; }
.document-number-feedback.duplicate { color: #b91c1c; }

input[data-document-number-check].is-available {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

input[data-document-number-check].is-duplicate {
    border-color: #dc2626;
    background: #fff7f7;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.document-search .live-search-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    pointer-events: none;
}

.document-search.is-searching input {
    padding-right: 82px;
    border-color: #93b4ed;
}

.document-search.is-searching > span {
    color: #075db8;
}

.notification-search-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.notification-search {
    width: min(560px, 100%);
}

.notification-search-clear {
    min-height: 42px;
    white-space: nowrap;
}

.notification-results-count {
    margin-left: auto;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

form[data-notification-read] {
    display: grid;
    justify-items: end;
    gap: 3px;
}

form[data-notification-read] button:disabled {
    cursor: wait;
    opacity: .65;
}

.notification-read-status {
    max-width: 180px;
    color: #b91c1c !important;
    font-size: 11px;
    text-align: right;
}

.notification-read-label {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

/* Cheque issuance and complaints review */
.cheque-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cheque-summary strong { font-size: 1.45rem; }
.cheque-table td:nth-child(6) { white-space: nowrap; font-weight: 700; }
.title-deed-status.issued { background: #dcfce7; color: #08783f; }
.cheque-modal { width: min(780px, calc(100vw - 32px)); }

.complaint-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.complaint-panel .table-wrap { overflow-x: auto; }
.complaint-table { min-width: 1240px; }
.complaint-table td { vertical-align: top; }
.complaint-table td:nth-child(5) { min-width: 280px; max-width: 390px; }
.complaint-table td small { display: block; margin-top: 5px; color: #65758b; line-height: 1.4; }
.complaint-recurrent-row { background: #fffbeb; }
.recurrent-badge { display: inline-flex; align-items: center; width: fit-content; margin: 7px 0 0 8px; padding: 3px 9px; border-radius: 999px; background: #fff0c2; color: #9a5a00; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.document-tabs .recurrent-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #fff0c2; color: #8a5100; font-size: .72rem; }
.complaint-recurrence-note { margin: 14px 2px 0; color: #65758b; font-size: .86rem; }
.complaint-detail-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 22px; margin-bottom: 22px; }
.complaint-detail-grid .panel, .complaint-technical-details { margin: 0; }
.complaint-detail-wide { grid-column: 1 / -1; }
.complaint-detail-wide dd { white-space: normal; line-height: 1.65; }
.complaint-technical-details { margin-top: 22px; }
.complaint-technical-details .button { margin-top: 18px; }
.complaint-record-head > div > .recurrent-badge { margin-left: 10px; }
.complaint-priority { display: inline-flex; align-items: center; width: fit-content; padding: 4px 10px; border-radius: 999px; background: #e8eef8; color: #334155; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.complaint-priority.low { background: #edf7ee; color: #237247; }
.complaint-priority.high { background: #fff0c2; color: #8a5100; }
.complaint-priority.urgent { background: #fee2e2; color: #b91c1c; }
.complaint-escalated { color: #b91c1c !important; font-weight: 800; }
.complaint-open-case { min-height: 34px; padding: 7px 12px; color: #075bc2; white-space: nowrap; }
.complaint-case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: start; }
.complaint-case-main { min-width: 0; }
.complaint-action-panel { position: sticky; top: 82px; max-height: calc(100vh - 104px); padding: 24px; overflow-y: auto; }
.complaint-action-panel > h2 { margin: 4px 0 18px; }
.complaint-action-form, .complaint-assign-form { margin: 0 0 16px; padding: 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.complaint-action-form label, .complaint-assign-form label { font-size: .82rem; font-weight: 800; }
.complaint-action-form textarea, .complaint-assign-form textarea { margin-top: 7px; background: #fff; }
.complaint-action-form .button, .complaint-assign-form .button { width: 100%; }
.complaint-action-form.success { border-color: #bbf7d0; background: #f0fdf4; }
.complaint-action-form.danger { border-color: #fecaca; background: #fff7f7; }
.complaint-action-form .button-success { border-color: #16a34a; background: #16a34a; color: #fff; }
.complaint-resolution { margin: 0 0 22px; padding: 24px; border-left: 4px solid #16a34a; }
.complaint-resolution h2 { margin: 4px 0 10px; }
.complaint-resolution p { line-height: 1.65; }
.complaint-history { margin-top: 0; }
.complaint-technical-details { margin-top: 22px; padding: 20px 24px; }
.complaint-technical-details summary { cursor: pointer; color: #172033; font-weight: 800; }
.complaint-technical-details[open] summary { margin-bottom: 18px; }

@media (max-width: 1050px) {
  .cheque-summary, .complaint-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .complaint-detail-grid { grid-template-columns: 1fr; }
  .complaint-case-layout { grid-template-columns: 1fr; }
  .complaint-action-panel { position: static; max-height: none; }
}

@media (max-width: 620px) {
  .cheque-summary, .complaint-summary { grid-template-columns: 1fr; }
  .recurrent-badge { margin-left: 0; }
}

@media (max-width: 640px) {
    .notification-search-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .notification-search {
        flex: 1 1 100%;
    }

    .notification-search-clear {
        flex: 1;
    }

    .notification-results-count {
        align-self: center;
    }
}

.create-document-modal button[type="submit"]:disabled,
.form-panel button[type="submit"]:disabled {
    cursor: not-allowed;
    opacity: .48;
    filter: grayscale(.2);
}

.timeline-entry { min-width: 0; }

.timeline-entry-details {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    margin-top: 10px;
}

.timeline-entry-details > div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 7px;
    background: #f8fafc;
}

.timeline-entry-details .timeline-field-title {
    flex: 0 0 auto;
    color: #334155;
    font-size: 12px;
    font-weight: 800 !important;
    line-height: 1.45;
}

.timeline-entry-details .timeline-field-value {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #334155;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

.timeline-entry-details > .created-detail-wide {
    grid-column: 1 / -1;
}

.mfa-success-page {
    position: relative;
}

.mfa-verified-pane {
    position: relative;
}

.mfa-accepted-form {
    display: grid;
    gap: 24px;
    opacity: .68;
}

.mfa-accepted-form label {
    display: grid;
    gap: 8px;
    color: #3e4a5c;
    font-size: 14px;
    font-weight: 700;
}

.mfa-accepted-form input {
    height: 58px;
    text-align: center;
    color: #166534;
    font-size: 24px;
    letter-spacing: .35em;
    background: #f0fdf4;
}

.mfa-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(3px);
}

.mfa-success-card {
    width: min(430px, 100%);
    padding: 38px 38px 32px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 22px;
    text-align: center;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .3);
    animation: mfa-success-enter .28s ease-out both;
}

.mfa-success-icon {
    width: 78px;
    height: 78px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #16a34a;
    box-shadow: 0 12px 28px rgba(22, 163, 74, .25);
    font-size: 42px;
    font-weight: 800;
}

.mfa-success-card h1 {
    margin: 0 0 9px;
    color: #0f172a;
    font-size: 28px;
}

.mfa-success-card > p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.mfa-success-progress {
    height: 6px;
    margin: 26px 0 13px;
    overflow: hidden;
    border-radius: 999px;
    background: #dcfce7;
}

.mfa-success-progress span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #16a34a;
    transform-origin: left;
    animation: mfa-success-progress 2s linear both;
}

.mfa-success-card .mfa-success-redirect {
    margin-bottom: 22px;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
}

.mfa-success-card .button {
    width: 100%;
    min-height: 48px;
}

@keyframes mfa-success-enter {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mfa-success-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .mfa-success-card,
    .mfa-success-progress span { animation: none; }
}

@media (max-width: 720px) {
    .mfa-success-card { padding: 32px 24px 26px; }
    .timeline-entry-details { grid-template-columns: 1fr; }
    .timeline-entry-details > .created-detail-wide { grid-column: auto; }
    .sidebar-user { display: none; }
    .bulk-action-bar,
    .bulk-action-bar > div { align-items: stretch; flex-direction: column; }
    .bulk-action-bar > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Title deed register */
.assigned-title-deed-notice {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
    padding: 14px 17px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
}

.assigned-title-deed-notice > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: #dbeafe;
}

.assigned-title-deed-notice svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.assigned-title-deed-notice div { display: grid; gap: 2px; }
.assigned-title-deed-notice small { color: #475569; }

.title-deed-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.title-deed-summary a {
    min-height: 110px;
    padding: 20px 22px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    color: #475569;
}

.title-deed-summary a:nth-child(2) { border-left-color: #f59e0b; }
.title-deed-summary a:nth-child(3) { border-left-color: #16a34a; }
.title-deed-summary a:hover { text-decoration: none; transform: translateY(-1px); }
.title-deed-summary span { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; }
.title-deed-summary strong { display: block; margin-top: 8px; color: #0f172a; font-size: 28px; }

.title-deed-actions { grid-template-columns: minmax(300px, 520px) 1fr auto; }
.title-deed-panel { overflow: hidden; }
.title-deed-table td { vertical-align: middle; }
.title-deed-table td small { display: block; margin-top: 4px; color: #64748b; white-space: nowrap; }
.title-deed-table td:nth-child(3) span { white-space: nowrap; }

.title-deed-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
}

.title-deed-status.released { background: #dcfce7; color: #166534; }
.assigned-user-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.title-deed-modal {
    display: flex;
    width: min(820px, calc(100vw - 28px));
    max-height: calc(100vh - 30px);
    flex-direction: column;
}

.title-deed-modal > header { flex: 0 0 auto; padding: 20px 26px; }
.title-deed-modal > header h2 { font-size: 24px; }
.title-deed-modal-kicker {
    display: block;
    margin-bottom: 3px;
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.title-deed-modal > form {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 0;
}

.title-deed-form-scroll {
    min-height: 0;
    padding: 22px 26px 26px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.title-deed-form-section + .title-deed-form-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #e2e8f0;
}

.title-deed-form-section > header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.title-deed-form-section > header > span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 900;
}

.title-deed-form-section > header h3 { margin: 0 0 2px; color: #172033; font-size: 16px; }
.title-deed-form-section > header p { margin: 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.title-deed-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.title-deed-form-grid label { display: grid; align-content: start; gap: 7px; color: #1e293b; font-weight: 700; }
.title-deed-form-grid input, .title-deed-form-grid select { min-height: 44px; background: #fff; }
.title-deed-form-grid label > small { color: #64748b; font-size: 11px; font-weight: 500; line-height: 1.4; }
.title-deed-field-label { display: flex; align-items: baseline; gap: 4px; min-height: 18px; }
.title-deed-field-label em {
    margin-left: auto;
    color: #64748b;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    text-transform: uppercase;
}

.title-deed-form-error { margin-bottom: 18px; }
.assignment-section {
    margin-right: -8px;
    margin-left: -8px;
    padding-right: 8px;
    padding-left: 8px;
}

.recorded-by-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 16px;
    margin-top: 20px;
    padding: 15px 17px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
}

.recorded-by-summary span { grid-row: 1 / 3; align-self: center; color: #64748b; font-size: 13px; font-weight: 700; }
.recorded-by-summary strong { color: #1e3a8a; }
.recorded-by-summary small { color: #64748b; }

.title-deed-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex: 0 0 auto;
    padding: 15px 26px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, .04);
}

.title-deed-form-footer p { display: grid; gap: 2px; margin: 0; }
.title-deed-form-footer p strong { color: #172033; font-size: 13px; }
.title-deed-form-footer p span { color: #64748b; font-size: 11px; }
.title-deed-form-footer > div { display: flex; gap: 10px; }
.title-deed-form-footer .button { min-height: 43px; justify-content: center; }
.title-deed-record-head code { display: block; margin-top: 7px; color: #64748b; font-family: inherit; }
.title-deed-detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 24px; align-items: start; }
.title-deed-details, .title-deed-release-panel { padding: 26px; }
.title-deed-details dl, .title-deed-release-panel dl { display: grid; gap: 0; margin: 18px 0 0; }

.title-deed-details dl div,
.title-deed-release-panel dl div {
    display: grid;
    grid-template-columns: minmax(150px, .65fr) minmax(0, 1.35fr);
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid #edf2f7;
}

.title-deed-details dt, .title-deed-release-panel dt { color: #475569; font-weight: 800; }
.title-deed-details dd, .title-deed-release-panel dd { margin: 0; color: #172033; }
.title-deed-details dd small { display: block; margin-top: 4px; color: #64748b; }
.title-deed-release-panel > h2 { margin: 4px 0 8px; color: #111827; }
.title-deed-release-panel > p { margin: 0 0 20px; color: #64748b; line-height: 1.55; }

.title-deed-reassign {
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}

.title-deed-reassign h3 { margin: 0 0 4px; color: #1e3a8a; font-size: 16px; }
.title-deed-reassign p { margin: 0 0 12px; color: #64748b; font-size: 13px; line-height: 1.45; }
.title-deed-reassign form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.title-deed-reassign select, .title-deed-reassign .button { min-height: 43px; }

.release-email-note {
    display: grid;
    gap: 4px;
    padding: 13px 15px;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534;
    font-size: 13px;
}

.release-email-note.muted { border-color: #e2e8f0; background: #f8fafc; color: #64748b; }
.release-email-note.local { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.local-test-banner { margin-bottom: 20px; }
.local-test-banner strong { margin-right: 4px; }
.title-deed-release-button { width: 100%; justify-content: center; }

.release-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 420;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(8, 20, 42, .68);
    backdrop-filter: blur(4px);
}

.release-confirm-dialog {
    width: min(500px, 100%);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(4, 15, 35, .35);
    animation: mfa-success-enter .24s ease-out both;
}

.release-confirm-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #e8f1ff;
    color: #075db8;
    font-size: 28px;
    font-weight: 900;
}

.release-confirm-kicker {
    color: #075db8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.release-confirm-dialog h2 {
    margin: 5px 0 7px;
    color: #0f172a;
    font-size: 25px;
}

.release-confirm-intro {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.release-confirm-summary {
    display: grid;
    gap: 0;
    margin: 20px 0 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.release-confirm-summary-row {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.release-confirm-summary-row:last-child { border-bottom: 0; }
.release-confirm-summary-row strong { color: #475569; font-size: 13px; }
.release-confirm-summary-row span { min-width: 0; color: #172033; font-size: 13px; overflow-wrap: anywhere; }

.release-confirm-email {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid #bbf7d0;
    border-radius: 11px;
    background: #f0fdf4;
    color: #166534;
}

.release-confirm-email strong { font-size: 13px; }
.release-confirm-email span { font-size: 12px; line-height: 1.5; }
.release-confirm-email.local { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.release-confirm-email.muted { border-color: #e2e8f0; background: #f8fafc; color: #64748b; }

.release-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
    margin-top: 20px;
}

.release-confirm-actions .button {
    min-height: 46px;
    justify-content: center;
}

.release-confirm-submit:disabled {
    cursor: wait;
    opacity: .72;
}

.process-record-delete {
    margin-top: 24px;
}

.process-record-delete form {
    max-width: 360px;
}

.delete-confirm-dialog {
    border-color: #fecaca;
}

.delete-confirm-icon {
    background: #fee2e2;
    color: #dc2626;
}

.delete-confirm-kicker {
    color: #b91c1c;
}

.delete-confirm-reference {
    display: grid;
    gap: 4px;
    margin: 20px 0 12px;
    padding: 13px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
}

.delete-confirm-reference strong {
    color: #64748b;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.delete-confirm-reference span {
    color: #172033;
    font-size: 14px;
    font-weight: 800;
}

.delete-confirm-warning {
    display: grid;
    gap: 4px;
    padding: 13px 15px;
    border: 1px solid #fecaca;
    border-radius: 11px;
    background: #fff7f7;
    color: #991b1b;
}

.delete-confirm-warning strong { font-size: 13px; }
.delete-confirm-warning span { font-size: 12px; line-height: 1.5; }

.delete-confirm-phrase {
    display: grid;
    gap: 7px;
    margin-top: 16px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.delete-confirm-phrase input {
    min-height: 44px;
    border-color: #fca5a5;
    background: #fff;
    text-transform: uppercase;
}

.delete-confirm-phrase input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.delete-confirm-phrase input.is-confirmed {
    border-color: #dc2626;
    background: #fff7f7;
}

.delete-confirm-submit {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.delete-confirm-submit:hover:not(:disabled) {
    border-color: #b91c1c;
    background: #b91c1c;
}

.delete-confirm-submit:disabled {
    cursor: not-allowed;
    opacity: .46;
}

.release-complete-mark {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 16px 0 8px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 28px;
    font-weight: 900;
}

.release-notes { margin-top: 18px; padding: 14px; border-radius: 10px; background: #f8fafc; line-height: 1.55; }
.title-deed-history { margin-top: 24px; padding: 26px; }
.title-deed-history .timeline { margin-top: 20px; }

@media (max-width: 980px) {
    .title-deed-detail-grid { grid-template-columns: 1fr; }
    .title-deed-actions { grid-template-columns: 1fr auto; }
    .title-deed-actions .document-search { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .title-deed-summary { grid-template-columns: 1fr; gap: 10px; }
    .title-deed-summary a { min-height: auto; }
    .title-deed-actions { grid-template-columns: 1fr; }
    .title-deed-modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
    .title-deed-modal > header { padding: 17px 18px; }
    .title-deed-modal > header h2 { font-size: 21px; }
    .title-deed-modal > header p { font-size: 12px; line-height: 1.4; }
    .title-deed-form-scroll { padding: 18px; }
    .title-deed-form-grid { grid-template-columns: 1fr; }
    .title-deed-form-section > header { align-items: flex-start; }
    .recorded-by-summary { grid-template-columns: 1fr; }
    .recorded-by-summary span { grid-row: auto; }
    .title-deed-form-footer { padding: 12px 18px; }
    .title-deed-form-footer p { display: none; }
    .title-deed-form-footer > div { width: 100%; }
    .title-deed-form-footer .button { flex: 1; }
    .title-deed-details dl div, .title-deed-release-panel dl div { grid-template-columns: 1fr; gap: 5px; }
    .title-deed-reassign form { grid-template-columns: 1fr; }
    .release-confirm-dialog { padding: 24px 18px 20px; border-radius: 16px; }
    .release-confirm-summary-row { grid-template-columns: 1fr; gap: 3px; }
    .release-confirm-actions { grid-template-columns: 1fr; }
}
