html,
body {
    background: #f4f7f5;
    color: #17211b;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* Document audit drawer */
.document-audit-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3200;
    background: rgba(15, 23, 42, 0.42);
}

.document-audit-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3201;
    display: flex;
    flex-direction: column;
    width: min(70vw, 1320px);
    min-width: 720px;
    background: var(--daka-surface, #fff);
    box-shadow: -12px 0 28px rgba(15, 23, 42, 0.18);
    outline: none;
}

.document-audit-header,
.document-audit-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
}

.document-audit-header {
    justify-content: space-between;
}

.document-audit-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 24px;
    font-weight: 700;
}

.document-audit-header button,
.document-audit-footer button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-width: 30px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #475569;
}

.document-audit-header button:hover,
.document-audit-footer button:hover:not(:disabled) {
    border-color: #94a3b8;
    background: #f8fafc;
}

.document-audit-search {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 320px;
    height: 28px;
    margin: 0 16px 12px;
    padding: 0 8px;
    border: 1px solid var(--daka-primary, #0f8f5f);
    border-radius: 6px;
    background: #fff;
    color: #64748b;
}

.document-audit-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #0f172a;
    font: inherit;
}

.document-audit-table-wrap {
    flex: 1;
    overflow: auto;
    padding: 0 16px;
}

.document-audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.document-audit-table th,
.document-audit-table td {
    height: 32px;
    padding: 6px 12px;
    border: 1px solid #d7dde5;
    vertical-align: top;
}

.document-audit-table th {
    background: #eef2f6;
    color: #111827;
    font-weight: 700;
    text-align: left;
}

.document-audit-table td.center {
    text-align: center;
    white-space: nowrap;
}

.document-audit-table td.detail {
    white-space: pre-line;
}

.document-audit-empty {
    height: 72px;
    color: #64748b;
    text-align: center;
}

.document-audit-empty.error {
    color: #b91c1c;
}

.document-audit-footer {
    justify-content: space-between;
    border-top: 1px solid #e5e7eb;
}

.document-audit-pager {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.document-audit-pager select {
    height: 30px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}

.document-audit-pager button:disabled {
    opacity: 0.45;
}

.document-audit-close {
    min-width: 80px !important;
    border-color: var(--daka-primary, #0f8f5f) !important;
    background: var(--daka-primary, #0f8f5f) !important;
    color: #fff !important;
    font-weight: 700;
}

@media (max-width: 900px) {
    .document-audit-drawer {
        width: 100vw;
        min-width: 0;
    }

    .document-audit-search {
        width: auto;
    }
}

a,
.btn-link {
    color: #176b45;
}

.btn-primary {
    background-color: #176b45;
    border-color: #176b45;
    color: #fff;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #58a979;
}

.content {
    padding-top: 1.5rem;
}

h1:focus {
    outline: none;
}

h1,
h2 {
    letter-spacing: 0;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #c62828;
}

.validation-message {
    color: #c62828;
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "Có lỗi hệ thống.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.page-header {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    margin-bottom: 1.5rem;
}

.eyebrow {
    color: #567064;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.page-header h1 {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.1;
    margin: 0;
}

.page-description {
    color: #52665a;
    max-width: 860px;
}

.summary-panel,
.metric-card,
.table-shell,
.module-card,
.risk-list article,
.checklist-panel,
.doc-list {
    background: #ffffff;
    border: 1px solid #d9e3dd;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 35, 24, 0.06);
}

.summary-panel {
    display: grid;
    gap: 0.25rem;
    padding: 1rem;
}

.summary-panel span {
    color: #617369;
    font-size: 0.82rem;
}

.summary-panel strong {
    font-size: 1.3rem;
}

.dashboard-grid,
.module-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-card,
.module-card,
.risk-list article {
    padding: 1rem;
}

.metric-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.progress-track {
    background: #e8efe9;
    border-radius: 999px;
    height: 0.55rem;
    margin: 0.8rem 0;
    overflow: hidden;
}

.progress-fill {
    background: #2f8d5b;
    height: 100%;
}

.status-line {
    color: #176b45;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.work-section {
    margin-top: 1.75rem;
}

.section-title {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.section-title h2 {
    font-size: 1.2rem;
    margin: 0;
}

.section-title p {
    color: #617369;
    margin: 0;
}

.table-shell {
    overflow-x: auto;
}

.table-shell table {
    border-collapse: collapse;
    min-width: 860px;
    width: 100%;
}

.table-shell th,
.table-shell td {
    border-bottom: 1px solid #e4ece7;
    padding: 0.8rem;
    text-align: left;
    vertical-align: top;
}

.table-shell th {
    color: #51665b;
    font-size: 0.82rem;
    font-weight: 700;
}

.table-shell td span {
    color: #687b70;
    display: block;
    font-size: 0.86rem;
}

.status-pill {
    background: #e5f3eb;
    border-radius: 999px;
    color: #176b45;
    display: inline-block;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
}

.module-card {
    color: #17211b;
    display: grid;
    gap: 0.35rem;
    min-height: 150px;
    text-decoration: none;
}

.module-card:hover {
    border-color: #7eb08c;
}

.module-card span {
    color: #176b45;
    font-weight: 800;
}

.module-card small {
    color: #617369;
}

.risk-list {
    display: grid;
    gap: 0.8rem;
}

.risk-list span {
    color: #9a4b16;
    font-weight: 700;
}

.risk-list p,
.metric-card p,
.module-card p {
    color: #52665a;
    margin-bottom: 0;
}

.landing-page {
    color: #102018;
    display: grid;
    gap: 1rem;
}

.landing-hero,
.landing-section {
    background: #ffffff;
    border: 1px solid #d7e1db;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(12, 30, 20, 0.05);
}

.landing-hero {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    padding: 1rem;
}

.landing-hero-content {
    align-content: center;
    display: grid;
    gap: 0.75rem;
}

.landing-eyebrow {
    color: #0d7a3f;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0;
    text-transform: uppercase;
}

.landing-hero h1,
.landing-section h2,
.landing-module-card h3 {
    margin: 0;
}

.landing-hero h1 {
    font-size: 2.15rem;
    line-height: 1.1;
}

.landing-hero p,
.landing-section-title span,
.landing-module-card p,
.landing-module-card small,
.landing-demo-panel p,
.landing-wbs-row span,
.landing-evidence p {
    color: #53665b;
}

.landing-hero p {
    margin: 0;
    max-width: 760px;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.landing-primary-action,
.landing-secondary-action {
    border-radius: 4px;
    font-weight: 800;
    padding: 0.55rem 0.8rem;
    text-decoration: none;
}

.landing-primary-action {
    background: #0b8f47;
    color: #ffffff;
}

.landing-secondary-action {
    border: 1px solid #a9b8af;
    color: #123321;
}

.landing-status-card {
    background: #f5faf7;
    border: 1px solid #c9dbd1;
    border-radius: 4px;
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
}

.landing-status-card > span,
.landing-status-row span {
    color: #66766e;
    font-size: 0.78rem;
}

.landing-status-card > strong {
    color: #0b7e3f;
    font-size: 2.25rem;
    line-height: 1;
}

.landing-status-card p {
    margin: 0;
}

.landing-status-row {
    align-items: center;
    border-top: 1px solid #d8e5de;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding-top: 0.45rem;
}

.landing-status-row b {
    overflow-wrap: anywhere;
    text-align: right;
}

.landing-status-row.warning b {
    color: #b42318;
}

.landing-section {
    display: grid;
    gap: 0.8rem;
    padding: 0.9rem;
}

.landing-section-title {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.landing-section-title.compact {
    align-items: start;
}

.landing-module-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.landing-module-card,
.landing-wbs-row,
.landing-demo-panel,
.landing-evidence article {
    background: #fbfdfb;
    border: 1px solid #d9e4de;
    border-radius: 4px;
    padding: 0.75rem;
}

.landing-module-card {
    display: grid;
    gap: 0.45rem;
}

.landing-module-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.landing-module-head span {
    background: #e9f5ee;
    border: 1px solid #c8ddcf;
    border-radius: 999px;
    color: #11673b;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.16rem 0.45rem;
}

.landing-progress-track {
    background: #e7ece9;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
}

.landing-progress-fill {
    background: linear-gradient(90deg, #0b8f47, #4fb879);
    height: 100%;
}

.landing-two-column {
    align-items: start;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.landing-wbs-list,
.landing-account-list,
.landing-evidence-grid {
    display: grid;
    gap: 0.5rem;
}

.landing-wbs-row {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.landing-wbs-row .landing-progress-track {
    grid-column: 1 / -1;
}

.landing-demo-panel {
    display: grid;
    gap: 0.7rem;
}

.landing-demo-panel code,
.landing-evidence code {
    background: #edf4ef;
    border: 1px solid #d0ded5;
    border-radius: 3px;
    padding: 0.08rem 0.25rem;
}

.landing-account-row {
    align-items: center;
    border-bottom: 1px solid #e5ede8;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0.35rem 0;
}

.landing-account-row:last-child {
    border-bottom: 0;
}

.landing-account-row span {
    color: #506158;
    font-size: 0.82rem;
}

.landing-evidence-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.module-card-link,
.module-overview-card {
    color: inherit;
    text-decoration: none;
}

.module-overview-header {
    align-items: center;
}

.module-header-action {
    align-self: start;
    justify-self: end;
}

.module-summary-card strong {
    color: #0b7e3f;
}

.module-status-layout {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.module-progress-summary,
.module-side-list,
.module-detail-grid article,
.module-overview-card {
    background: #ffffff;
    border: 1px solid #d9e4de;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(12, 30, 20, 0.05);
}

.module-progress-summary {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 1rem;
}

.module-progress-summary h2,
.module-side-list h2,
.module-detail-grid h2,
.module-overview-card h3 {
    margin: 0;
}

.module-progress-summary p,
.module-side-list li,
.module-detail-grid li,
.module-detail-grid p,
.module-overview-card p,
.module-overview-card small,
.module-header-links span {
    color: #53665b;
}

.module-pie {
    align-items: center;
    aspect-ratio: 1;
    background: conic-gradient(#0b8f47 0 var(--done), #e6ece8 var(--done) 100%);
    border-radius: 50%;
    display: grid;
    flex: 0 0 auto;
    height: 78px;
    justify-items: center;
    position: relative;
}

.module-pie::after {
    background: #ffffff;
    border-radius: 50%;
    content: "";
    height: 62%;
    position: absolute;
    width: 62%;
}

.module-pie strong {
    color: #0b6f3a;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.module-pie.large {
    height: 136px;
}

.module-pie.large strong {
    font-size: 1.65rem;
}

.module-side-list,
.module-detail-grid article {
    padding: 1rem;
}

.module-side-list ul,
.module-detail-grid ul {
    display: grid;
    gap: 0.55rem;
    margin: 0.75rem 0 0;
    padding-left: 1.1rem;
}

.module-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.module-overview-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.module-overview-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.module-overview-card:hover {
    border-color: #7eb08c;
}

.module-overview-card-head {
    align-items: center;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: auto minmax(0, 1fr);
}

.module-overview-card-head span {
    color: #0d7a3f;
    font-weight: 800;
}

.module-done-open,
.module-header-links,
.landing-burndown-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.module-done-open b {
    background: #eef5f0;
    border: 1px solid #d3e2d9;
    border-radius: 999px;
    color: #244334;
    font-size: 0.78rem;
    padding: 0.22rem 0.48rem;
}

.module-header-links {
    margin-top: 0.6rem;
}

.module-header-links a {
    color: #176b45;
    font-weight: 800;
}

.module-doc-list span {
    border-radius: 4px;
}

.landing-burndown-chart {
    align-items: end;
    background: #f7faf8;
    border: 1px solid #d9e4de;
    border-radius: 4px;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(8, minmax(42px, 1fr));
    height: 230px;
    margin-top: 0.7rem;
    padding: 0.85rem 0.7rem 0.55rem;
}

.landing-burndown-column {
    align-items: stretch;
    display: grid;
    gap: 0.35rem;
    height: 100%;
    min-width: 0;
}

.landing-burndown-column small {
    color: #53665b;
    font-size: 0.72rem;
    overflow-wrap: anywhere;
    text-align: center;
}

.landing-burndown-bars {
    align-items: end;
    display: flex;
    gap: 0.18rem;
    justify-content: center;
    min-height: 0;
}

.landing-burnbar {
    border-radius: 3px 3px 0 0;
    display: block;
    min-height: 8px;
    width: 12px;
}

.landing-burnbar.planned,
.landing-burndown-legend i.planned {
    background: #91a79a;
}

.landing-burnbar.actual,
.landing-burndown-legend i.actual {
    background: #0b8f47;
}

.landing-burndown-legend {
    color: #53665b;
    font-size: 0.82rem;
    margin-top: 0.6rem;
}

.landing-burndown-legend i {
    border-radius: 2px;
    display: inline-block;
    height: 10px;
    margin-right: 0.3rem;
    width: 10px;
}

.landing-burndown-legend strong {
    color: #173f29;
}

.checklist-panel {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
}

.checklist-panel label {
    align-items: center;
    display: flex;
    gap: 0.6rem;
}

.doc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1rem;
}

.doc-list span {
    background: #eef5f0;
    border: 1px solid #d9e6dc;
    border-radius: 999px;
    color: #244334;
    padding: 0.35rem 0.65rem;
}

.uat-page {
    color: #102018;
    display: grid;
    gap: 1rem;
}

.uat-header {
    align-items: stretch;
}

.uat-alert-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.uat-alert-grid article,
.uat-plan-table,
.uat-check-row {
    background: #ffffff;
    border: 1px solid #d9e4de;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(12, 30, 20, 0.05);
}

.uat-alert-grid article {
    display: grid;
    gap: 0.45rem;
    padding: 0.9rem;
}

.uat-alert-grid h2,
.uat-alert-grid p,
.uat-check-main p {
    margin: 0;
}

.uat-alert-grid p,
.uat-check-main p,
.uat-check-main small,
.uat-plan-row span {
    color: #53665b;
}

.uat-plan-table {
    overflow: hidden;
}

.uat-plan-row {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(150px, 0.8fr) minmax(210px, 1fr) minmax(160px, 0.75fr) minmax(220px, 1.1fr);
    padding: 0.7rem 0.85rem;
}

.uat-plan-row + .uat-plan-row {
    border-top: 1px solid #e1e8e4;
}

.uat-plan-row.header {
    background: #f1f7f4;
    color: #183b29;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.uat-filter-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.uat-filter-strip a {
    border: 1px solid #b8c7be;
    border-radius: 999px;
    color: #183b29;
    font-weight: 800;
    padding: 0.35rem 0.65rem;
    text-decoration: none;
}

.uat-filter-strip a.active {
    background: #0b8f47;
    border-color: #0b8f47;
    color: #ffffff;
}

.uat-module-section {
    gap: 0.7rem;
}

.uat-checklist {
    display: grid;
    gap: 0.7rem;
}

.uat-check-row {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 118px minmax(0, 1fr);
    padding: 0.85rem;
}

.uat-check-row.checked {
    border-color: #74aa83;
    background: #f5fbf7;
}

.uat-check-cell {
    align-content: start;
    display: grid;
    gap: 0.45rem;
    justify-items: start;
}

.uat-check-cell input {
    height: 22px;
    width: 22px;
}

.uat-check-cell span {
    color: #244334;
    font-size: 0.8rem;
    font-weight: 800;
}

.uat-check-main {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.uat-check-title,
.uat-note-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: space-between;
}

.uat-check-title span {
    background: #eef5f0;
    border: 1px solid #d4e2da;
    border-radius: 999px;
    color: #244334;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.18rem 0.45rem;
}

.uat-note-row {
    justify-content: flex-start;
}

.uat-note-row input {
    border: 1px solid #cbd8d1;
    border-radius: 4px;
    flex: 1 1 360px;
    min-height: 38px;
    min-width: 220px;
    padding: 0.45rem 0.6rem;
}

.uat-note-row button {
    background: #183b29;
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    font-weight: 800;
    min-height: 38px;
    padding: 0.45rem 0.7rem;
}

.uat-note-composer {
    display: grid;
    gap: 0.8rem;
    max-width: 980px;
}

.uat-note-meta {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 180px minmax(220px, 320px);
}

.uat-note-meta label,
.uat-note-actions {
    display: grid;
    gap: 0.3rem;
}

.uat-note-meta label span,
.uat-note-actions span {
    color: #486354;
    font-size: 0.78rem;
    font-weight: 700;
}

.uat-note-meta select,
.uat-note-meta input,
.uat-note-composer textarea {
    border: 1px solid #cbd8d1;
    border-radius: 4px;
    color: #183b29;
    font: inherit;
    min-width: 0;
    padding: 0.55rem 0.65rem;
}

.uat-note-composer textarea {
    min-height: 148px;
    resize: vertical;
    width: 100%;
}

.uat-note-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.uat-note-actions button {
    background: #0b8f47;
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    font-weight: 800;
    min-height: 42px;
    padding: 0.55rem 0.8rem;
}

.uat-note-actions button:disabled {
    background: #9fb3a8;
    cursor: not-allowed;
}

.uat-fixed-checklist {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.uat-open-issues {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.uat-fixed-checklist article {
    background: #ffffff;
    border: 1px solid #cfe0d6;
    border-left: 4px solid #0b8f47;
    border-radius: 6px;
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.8rem;
}

.uat-open-issues article {
    background: #fffaf0;
    border: 1px solid #efd6a8;
    border-left: 4px solid #c27300;
    border-radius: 6px;
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.8rem;
}

.uat-fixed-checklist article div {
    align-items: start;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.uat-open-issues article div {
    align-items: start;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.uat-fixed-checklist p {
    margin: 0;
}

.uat-open-issues p {
    margin: 0;
}

.uat-fixed-checklist small {
    color: #486354;
    line-height: 1.45;
}

.uat-open-issues small {
    color: #5d4b2b;
    line-height: 1.45;
}

.uat-fixed-checklist article div span {
    color: #486354;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
}

.uat-open-issues article div span {
    background: #f3dfb8;
    border-radius: 999px;
    color: #5d3b00;
    flex: 0 0 auto;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 0.18rem 0.5rem;
}

.uat-note-history {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.uat-note-history article,
.access-log-row {
    border: 1px solid #d5e2db;
    border-radius: 6px;
    min-width: 0;
}

.uat-note-history article {
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
}

.uat-note-history p {
    margin: 0;
}

.uat-note-history small,
.landing-evidence-grid small {
    color: #486354;
    line-height: 1.45;
}

.misa-dashboard {
    display: grid;
    gap: 0.65rem;
}

.misa-dashboard-tabs {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    min-height: 42px;
    overflow-x: auto;
    padding: 0 0.45rem;
}

.misa-dashboard-tabs button {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #111827;
    cursor: pointer;
    font-weight: 650;
    min-height: 42px;
    padding: 0 0.85rem;
    white-space: nowrap;
}

.misa-dashboard-tabs button.active {
    border-bottom-color: var(--df-logo-green);
    color: var(--df-logo-green-dark);
}

.misa-dashboard-filterbar {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--df-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 70px;
    padding: 0.75rem 0.9rem;
}

.misa-dashboard-filterbar h1 {
    font-size: 1.35rem;
    line-height: 1.15;
    margin: 0;
}

.misa-dashboard-filterbar span {
    color: var(--df-muted);
    display: block;
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

.misa-dashboard-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.misa-dashboard-quickfilter {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--df-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.45rem 0.65rem;
}

.misa-dashboard-quickfilter span {
    color: var(--df-muted);
    font-size: 0.82rem;
    font-weight: 700;
    margin-right: 0.15rem;
}

.misa-dashboard-quickfilter button {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1f2937;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 650;
    height: 28px;
    padding: 0 0.7rem;
}

.misa-dashboard-quickfilter button.active {
    background: #e8f5ee;
    border-color: var(--df-logo-green);
    color: var(--df-logo-green-dark);
}

.misa-dashboard-summary {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.misa-dashboard-card {
    background: #ffffff;
    border: 1px solid var(--df-border);
    display: grid;
    gap: 0.25rem;
    min-height: 88px;
    padding: 0.7rem 0.8rem;
}

.misa-dashboard-card span,
.misa-dashboard-card small {
    color: var(--df-muted);
}

.misa-dashboard-card strong {
    color: #0f172a;
    font-size: 1.45rem;
    line-height: 1.1;
}

.misa-dashboard-card.primary {
    border-top: 3px solid #047857;
}

.misa-dashboard-card.warning {
    border-top: 3px solid #b45309;
}

.misa-dashboard-card.neutral {
    border-top: 3px solid #2563eb;
}

.misa-dashboard-card.success {
    border-top: 3px solid #16a34a;
}

.misa-dashboard-layout {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
}

.misa-dashboard-layout.compact {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.misa-dashboard-main {
    min-height: 270px;
}

.misa-dashboard-bars {
    display: grid;
}

.misa-dashboard-bar-row {
    align-items: center;
    border-bottom: 1px solid var(--df-border);
    color: inherit;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(170px, 0.9fr) minmax(180px, 1.4fr) minmax(220px, 0.9fr);
    min-height: 54px;
    padding: 0.55rem 0.75rem;
    text-decoration: none;
}

.misa-dashboard-bar-row:hover {
    background: #f5faf7;
}

.misa-dashboard-bar-row strong,
.misa-dashboard-bar-row span {
    display: block;
}

.misa-dashboard-bar-row span {
    color: var(--df-muted);
    font-size: 0.82rem;
}

.misa-dashboard-bar-meter {
    background: #eef2f7;
    display: flex;
    height: 10px;
    overflow: hidden;
}

.misa-dashboard-bar-meter i {
    display: block;
    min-width: 0;
}

.misa-dashboard-bar-meter .open {
    background: #b45309;
}

.misa-dashboard-bar-meter .draft {
    background: #2563eb;
}

.misa-dashboard-bar-meter .posted {
    background: #16a34a;
}

.misa-dashboard-bar-numbers {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.misa-dashboard-watchlist {
    display: grid;
    list-style: none;
    margin: 0;
    padding: 0;
}

.misa-dashboard-watchlist li {
    border-bottom: 1px solid var(--df-border);
    display: grid;
    gap: 0.2rem;
    min-height: 52px;
    padding: 0.6rem 0.75rem;
}

.misa-dashboard-watchlist a {
    color: var(--df-logo-green-dark);
    font-weight: 750;
    text-decoration: none;
}

.misa-dashboard-watchlist span {
    color: var(--df-muted);
    font-size: 0.84rem;
}

.misa-dashboard-selectionbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0.45rem 0.65rem;
}

.misa-dashboard-selectionbar span {
    color: #1f2937;
    font-size: 0.84rem;
    margin-right: 0.25rem;
}

.misa-dashboard-selectionbar button {
    background: #ffffff;
    border: 1px solid #aab4bd;
    color: #111827;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    height: 28px;
    padding: 0 0.7rem;
}

.misa-dashboard-selectionbar button.link {
    border-color: transparent;
    color: var(--df-logo-green-dark);
    padding-left: 0.2rem;
}

.misa-dashboard-selectionbar button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.misa-dashboard-detail-preview {
    background: #ffffff;
    border-top: 1px solid var(--df-border);
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem;
}

.misa-dashboard-detail-preview > div:first-child {
    display: grid;
    gap: 0.15rem;
}

.misa-dashboard-detail-preview span,
.misa-dashboard-detail-preview p {
    color: var(--df-muted);
    margin: 0;
}

.misa-dashboard-detail-preview dl {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.misa-dashboard-detail-preview dl div {
    background: #f7faf9;
    border: 1px solid var(--df-border);
    display: grid;
    gap: 0.15rem;
    min-height: 48px;
    padding: 0.45rem 0.55rem;
}

.misa-dashboard-detail-preview dt {
    color: var(--df-muted);
    font-size: 0.78rem;
}

.misa-dashboard-detail-preview dd {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.misa-dashboard-quicklinks {
    display: grid;
}

.misa-dashboard-quicklinks a {
    border-bottom: 1px solid var(--df-border);
    color: inherit;
    display: grid;
    gap: 0.2rem;
    min-height: 52px;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
}

.misa-dashboard-quicklinks a:hover {
    background: #f5faf7;
}

.misa-dashboard-quicklinks strong {
    color: var(--df-logo-green-dark);
}

.misa-dashboard-quicklinks span {
    color: var(--df-muted);
    font-size: 0.84rem;
}

@media (max-width: 1100px) {
    .misa-dashboard-summary,
    .misa-dashboard-layout,
    .misa-dashboard-layout.compact {
        grid-template-columns: 1fr;
    }

    .misa-dashboard-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .misa-dashboard-filterbar {
        align-items: stretch;
        flex-direction: column;
    }

    .misa-dashboard-actions {
        justify-content: flex-start;
    }

    .misa-dashboard-summary {
        grid-template-columns: 1fr;
    }

    .misa-dashboard-detail-preview dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .misa-dashboard-bar-row {
        grid-template-columns: 1fr;
    }

    .misa-dashboard-bar-numbers {
        justify-content: flex-start;
    }
}

.uat-image-upload {
    border: 1px dashed #b9c4cf;
    display: grid;
    gap: 6px;
    margin-top: 10px;
    padding: 10px;
}

.uat-image-upload label {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.uat-image-upload span {
    font-weight: 700;
}

.uat-image-upload small,
.uat-upload-status {
    color: #64748b;
    margin: 0;
}

.uat-attachment-gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 14px;
}

.uat-attachment-gallery article {
    border: 1px solid #d8e0e7;
    display: grid;
    gap: 6px;
    padding: 10px;
}

.uat-attachment-gallery img {
    aspect-ratio: 16 / 10;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    object-fit: contain;
    width: 100%;
}

.uat-attachment-gallery p,
.uat-attachment-gallery small {
    margin: 0;
}

.uat-row-attachments {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.uat-row-attachments img {
    background: #f8fafc;
    border: 1px solid #d8e0e7;
    height: 48px;
    object-fit: cover;
    width: 72px;
}

.access-log-page {
    background: #eef4f0;
    color: #183b29;
    display: grid;
    gap: 1rem;
    min-height: 100vh;
    padding: 1rem;
}

.access-log-table {
    display: grid;
    gap: 0.45rem;
}

.access-log-row {
    background: #ffffff;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 158px minmax(180px, 1.2fr) minmax(120px, 0.7fr) 124px minmax(180px, 1fr);
    padding: 0.65rem;
}

.access-log-row.header {
    background: #f1f7f4;
    color: #183b29;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.access-log-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .page-header {
        grid-template-columns: 1fr;
    }

    .landing-hero,
    .landing-two-column,
    .module-status-layout,
    .module-progress-summary {
        grid-template-columns: 1fr;
    }

    .landing-burndown-chart {
        grid-template-columns: repeat(4, minmax(52px, 1fr));
        height: 260px;
    }

    .landing-section-title,
    .landing-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .uat-note-composer,
    .uat-note-meta,
    .uat-note-actions,
    .uat-open-issues,
    .uat-fixed-checklist,
    .uat-note-history,
    .access-log-row {
        grid-template-columns: 1fr;
    }

    .uat-note-actions,
    .uat-open-issues article div,
    .uat-fixed-checklist article div {
        align-items: stretch;
        flex-direction: column;
    }

    .uat-plan-row,
    .uat-check-row {
        grid-template-columns: 1fr;
    }

    .section-title {
        align-items: start;
        flex-direction: column;
    }
}

:root {
    --df-green-900: #163f2b;
    --df-green-800: #1a5c2e;
    --df-green-700: #197347;
    --df-green-600: #019160;
    --df-ink: #18231d;
    --df-muted: #617369;
    --df-border: #dfe7e2;
    --df-surface: #ffffff;
    --df-page: #f5f7f6;
    --df-blue: #0066cc;
}

.app-shell {
    background: var(--df-page);
    color: var(--df-ink);
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.app-sidebar {
    background: var(--df-green-900);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
    padding: 0.75rem;
}

.app-brand {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    gap: 0.75rem;
    min-height: 60px;
    padding: 0.25rem 0.5rem 0.85rem;
}

.app-brand-mark {
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    color: var(--df-green-900);
    display: inline-flex;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.app-brand strong,
.app-brand small {
    display: block;
}

.app-brand small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.app-nav {
    display: grid;
    gap: 0.25rem;
    padding-top: 0.75rem;
}

.app-nav-item {
    align-items: center;
    border-left: 3px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.84);
    display: grid;
    font-weight: 600;
    gap: 0.55rem;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 40px;
    padding: 0.35rem 0.55rem;
    text-decoration: none;
}

.app-nav-item:hover,
.app-nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.app-nav-item.active {
    border-left-color: #ffffff;
}

.app-nav-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.app-nav-item em {
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.72rem;
    font-style: normal;
}

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    height: 58px;
    justify-content: space-between;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-topbar strong,
.app-topbar span {
    display: block;
}

.app-context {
    color: var(--df-muted);
    font-size: 0.78rem;
}

.app-top-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.app-status {
    background: #e9f4ee;
    border: 1px solid #cde3d5;
    border-radius: 999px;
    color: var(--df-green-800);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
}

.app-content {
    min-width: 0;
    padding: 1rem;
}

.app-page-header,
.module-titlebar {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.app-page-header h1,
.module-titlebar h1 {
    font-size: 1.55rem;
    line-height: 1.2;
    margin: 0;
}

.app-page-header p,
.module-titlebar p {
    color: var(--df-muted);
    margin: 0.25rem 0 0;
    max-width: 780px;
}

.app-eyebrow {
    color: var(--df-green-700);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 0.2rem;
    text-transform: uppercase;
}

.app-header-actions,
.module-title-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.app-kpi-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.app-kpi-card,
.app-panel,
.module-surface {
    background: #ffffff;
    border: 1px solid var(--df-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 35, 24, 0.05);
}

.app-kpi-card {
    display: grid;
    gap: 0.25rem;
    min-height: 110px;
    padding: 0.9rem;
}

.app-kpi-card span,
.app-kpi-card small {
    color: var(--df-muted);
}

.app-kpi-card strong {
    font-size: 1.65rem;
}

.app-work-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
}

.app-panel {
    min-width: 0;
    overflow: hidden;
}

.app-panel-title {
    align-items: center;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 0.9rem;
}

.app-panel-title h2 {
    font-size: 1rem;
    margin: 0;
}

.app-panel-title span {
    color: var(--df-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.app-task-list {
    display: grid;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-task-list li {
    align-items: center;
    border-bottom: 1px solid var(--df-border);
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 46px;
    padding: 0 0.9rem;
}

.module-surface {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 90px);
    overflow: hidden;
}

.module-titlebar {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.9rem 1rem;
}

.daka-tabs {
    background: #ffffff;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    flex: 0 0 auto;
    min-height: 40px;
    overflow-x: auto;
    padding: 0 0.5rem;
}

.daka-tab {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #52655a;
    cursor: pointer;
    font-weight: 700;
    min-height: 40px;
    padding: 0 0.85rem;
    white-space: nowrap;
}

.daka-tab:hover {
    background: #f6f8f7;
    color: var(--df-ink);
}

.daka-tab.active {
    border-bottom-color: var(--df-green-600);
    color: var(--df-green-600);
}

.daka-tab.disabled {
    color: #9aa8a1;
    cursor: not-allowed;
}

.daka-toolbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    flex: 0 0 auto;
    gap: 1rem;
    justify-content: space-between;
    min-height: 50px;
    padding: 0 0.85rem;
}

.daka-toolbar-left,
.daka-toolbar-right {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}

.daka-toolbar-period {
    color: #43554a;
    font-weight: 700;
    white-space: nowrap;
}

.daka-toolbar-button,
.daka-action,
.daka-icon-button {
    align-items: center;
    border: 1px solid #cfd9d3;
    border-radius: 6px;
    display: inline-flex;
    font-weight: 700;
    gap: 0.35rem;
    justify-content: center;
    min-height: 32px;
    padding: 0 0.75rem;
}

.daka-toolbar-button,
.daka-action {
    background: #ffffff;
    color: #27372e;
    text-decoration: none;
}

.daka-action.primary {
    background: var(--df-green-600);
    border-color: var(--df-green-600);
    color: #ffffff;
}

.daka-icon-button {
    background: #ffffff;
    color: #52655a;
    padding: 0;
    width: 32px;
}

.daka-search {
    border: 1px solid #cfd9d3;
    border-radius: 6px;
    height: 32px;
    min-width: 240px;
    padding: 0 0.7rem;
}

.daka-grid-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 320px;
    min-width: 0;
}

.daka-grid-scroll {
    --daka-grid-vertical-track-offset: var(--df-grid-header-height, 34px);
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: scroll;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    scrollbar-color: #87939d #edf1f4;
    scrollbar-width: auto;
}

.daka-grid-scroll:has(.daka-grid-group-header) {
    --daka-grid-vertical-track-offset: calc(32px + var(--df-grid-header-height, 34px));
}

.daka-grid-scroll::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.daka-grid-scroll::-webkit-scrollbar-track {
    background: #edf1f4;
}

.daka-grid-scroll::-webkit-scrollbar-track:vertical {
    margin-top: var(--daka-grid-vertical-track-offset);
}

.daka-grid-scroll::-webkit-scrollbar-thumb {
    background: #87939d;
    border: 2px solid #edf1f4;
    border-radius: 999px;
}

.daka-grid {
    border-collapse: collapse;
    min-width: 1040px;
    width: 100%;
}

.daka-grid th,
.daka-grid td {
    border: 1px solid var(--df-border);
    font-size: 0.82rem;
    padding: 0.55rem 0.65rem;
}

.daka-grid th {
    background: #f1f5f3;
    color: #45564c;
    font-weight: 800;
    position: sticky;
    top: 0;
    z-index: 1;
}

.daka-grid tbody tr {
    cursor: pointer;
}

.daka-grid tbody tr:hover {
    background: #eef6ff;
}

.daka-grid tbody tr.selected {
    background: #e2f0ff;
}

.daka-grid-check {
    text-align: center;
    width: 42px;
}

.daka-grid-sortable {
    cursor: pointer;
}

.daka-grid-sort {
    color: var(--df-muted);
    font-size: 0.68rem;
    margin-left: 0.35rem;
}

.daka-grid-link {
    color: var(--df-blue);
    font-weight: 700;
}

.daka-grid-footer td {
    background: #f4f7f5;
    font-weight: 800;
    position: sticky;
    bottom: 0;
}

.daka-grid-pager {
    align-items: center;
    background: #ffffff;
    border-top: 1px solid var(--df-border);
    display: flex;
    flex: 0 0 42px;
    justify-content: space-between;
    padding: 0 0.85rem;
}

.daka-grid-pager-controls {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem;
    min-width: 0;
}

.daka-grid-page-status {
    color: var(--df-ink);
    font-size: 0.78rem;
    font-weight: 800;
    margin: 0 0.35rem;
    white-space: nowrap;
}

.daka-grid-page-size {
    align-items: center;
    color: var(--df-muted);
    display: flex;
    font-size: 0.76rem;
    gap: 0.35rem;
    margin-right: 0.25rem;
}

.daka-grid-page-size select {
    background: #ffffff;
    border: 1px solid #cfd9d3;
    border-radius: 5px;
    color: var(--df-ink);
    height: 28px;
    min-width: 58px;
    padding: 0 0.25rem;
}

.daka-grid-pager button {
    background: #ffffff;
    border: 1px solid #cfd9d3;
    border-radius: 5px;
    margin-left: 0.3rem;
    min-height: 28px;
    min-width: 28px;
}

.daka-grid-pager button.active {
    background: #f4f7f5;
    font-weight: 800;
}

.daka-grid-pager button:disabled {
    color: #8b9b92;
    cursor: not-allowed;
}

.placeholder-body {
    align-items: start;
    background: #f8faf9;
    border: 1px dashed #c8d5cd;
    border-radius: 8px;
    color: var(--df-muted);
    display: grid;
    gap: 0.35rem;
    margin: 1rem;
    padding: 1rem;
}

.placeholder-body strong {
    color: var(--df-ink);
}

.form-surface .daka-tabs {
    border-top: 1px solid var(--df-border);
}

.form-commandbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.65rem 0.9rem;
}

.form-commandbar span {
    color: var(--df-muted);
    flex: 1 1 220px;
    font-size: 0.82rem;
    line-height: 1.35;
    margin-left: 0;
}

.voucher-header-grid {
    background: #ffffff;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0.9rem;
}

.voucher-header-grid label {
    display: grid;
    gap: 0.25rem;
}

.voucher-header-grid label span {
    color: var(--df-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.voucher-header-grid input {
    background: #f9fbfa;
    border: 1px solid #cfd9d3;
    border-radius: 6px;
    color: var(--df-ink);
    height: 34px;
    padding: 0 0.65rem;
}

.voucher-body {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr) 300px;
    min-height: 0;
}

.voucher-summary {
    background: #fbfcfb;
    border-left: 1px solid var(--df-border);
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
}

.voucher-summary-panel {
    background: #fbfcfb;
    border-left: 1px solid var(--df-border);
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
}

.voucher-summary-panel label {
    align-items: center;
    border-bottom: 1px solid #e7eee9;
    display: flex;
    justify-content: space-between;
    min-height: 32px;
}

.voucher-summary-panel span,
.voucher-summary-panel p {
    color: var(--df-muted);
}

.voucher-summary strong {
    font-size: 1rem;
}

.voucher-summary div {
    align-items: center;
    border-bottom: 1px solid #e7eee9;
    display: flex;
    justify-content: space-between;
    min-height: 32px;
}

.voucher-summary span,
.voucher-summary p {
    color: var(--df-muted);
}

.voucher-summary p {
    font-size: 0.82rem;
    margin: 0;
}

.report-card-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    padding: 1rem;
}

.report-card {
    background: #ffffff;
    border: 1px solid var(--df-border);
    border-radius: 8px;
    display: grid;
    gap: 0.4rem;
    min-height: 150px;
    padding: 0.9rem;
}

.report-card span {
    color: var(--df-green-700);
    font-size: 0.78rem;
    font-weight: 800;
}

.report-card strong {
    font-size: 1rem;
}

.report-card p {
    color: var(--df-muted);
    margin: 0;
}

.report-card a {
    align-self: end;
    color: var(--df-blue);
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        min-height: auto;
        position: static;
    }

    .app-brand {
        min-height: 48px;
        padding-bottom: 0.55rem;
    }

    .app-nav {
        display: flex;
        gap: 0.4rem;
        overflow-x: auto;
        padding-bottom: 0.35rem;
        scroll-padding-inline: 0.75rem;
    }

    .app-nav-item {
        flex: 0 0 132px;
        grid-template-columns: 30px minmax(0, 1fr);
        min-height: 38px;
    }

    .app-nav-item.active {
        order: -1;
    }

    .app-kpi-grid,
    .app-work-grid {
        grid-template-columns: 1fr;
    }

    .app-topbar,
    .app-page-header,
    .module-titlebar,
    .daka-toolbar {
        align-items: stretch;
        flex-direction: column;
        height: auto;
        padding-bottom: 0.75rem;
        padding-top: 0.75rem;
    }

    .daka-toolbar-left,
    .daka-toolbar-right {
        flex-wrap: wrap;
    }

    .app-header-actions,
    .module-title-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .daka-search {
        min-width: min(100%, 260px);
    }

    .voucher-header-grid,
    .voucher-body,
    .report-index-layout,
    .report-link-grid {
        grid-template-columns: 1fr;
    }

    .voucher-summary {
        border-left: 0;
        border-top: 1px solid var(--df-border);
    }
}

/* MISA-style compact filter drawer for accounting document lists. */
.misa-filter-drawer {
    border-radius: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 16px 16px 0;
    width: min(420px, calc(100vw - 16px));
}

.misa-filter-drawer.compact {
    width: min(420px, calc(100vw - 16px));
}

.misa-filter-drawer-header {
    min-height: 36px;
    padding: 0 0 10px;
}

.misa-filter-drawer-header strong {
    font-size: 22px;
    line-height: 1.1;
}

.misa-filter-drawer-body {
    align-content: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
    overflow: auto;
    padding: 0 0 12px;
}

.misa-filter-primary-fields {
    align-content: start;
    display: grid;
    gap: 11px;
}

.misa-filter-control {
    align-content: start;
    display: grid;
    gap: 5px;
}

.misa-filter-control input,
.misa-filter-control select {
    height: 28px;
    min-height: 28px;
}

.misa-filter-date-grid {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.misa-filter-checkline {
    align-items: center;
    display: grid;
    gap: 7px;
    grid-template-columns: 14px minmax(0, 1fr);
    margin-top: 0;
}

.misa-filter-checkline span {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.misa-filter-info-icon {
    color: var(--df-text-muted);
    flex: 0 0 auto;
}

.misa-filter-drawer.compact .misa-filter-section-title,
.misa-filter-drawer.compact .misa-filter-column-picker,
.misa-filter-drawer.compact .misa-filter-fields {
    display: none;
}

.misa-filter-drawer-actions {
    margin: 0 -16px;
    padding: 10px 16px;
}

@media (max-width: 640px) {
    .misa-filter-drawer,
    .misa-filter-drawer.compact {
        width: 100vw;
    }

    .misa-filter-date-grid {
        grid-template-columns: 1fr;
    }
}

/* Archive-aligned ERP skin: dense MISA-like layout using DakaFood logo colors. */
:root {
    --df-logo-red: #d9001b;
    --df-logo-green: #008f45;
    --df-logo-green-dark: #006f35;
    --df-logo-green-light: #e9f7ef;
    --df-ink: #17211b;
    --df-muted: #5d6a62;
    --df-border: #cfd8d2;
    --df-border-strong: #aebbb3;
    --df-surface: #ffffff;
    --df-page: #eef2ef;
    --df-panel: #f7f9f8;
    --df-blue: #0071c8;
}

body {
    background: var(--df-page);
}

.app-shell {
    background: var(--df-page);
    grid-template-columns: 212px minmax(0, 1fr);
}

.app-sidebar {
    background: #f7faf8;
    border-right: 1px solid var(--df-border);
    color: var(--df-ink);
    padding: 0;
}

.app-brand {
    background: #ffffff;
    border-bottom: 3px solid var(--df-logo-green);
    gap: 0.6rem;
    min-height: 54px;
    padding: 0.45rem 0.7rem;
}

.app-brand-logo {
    border: 1px solid rgba(217, 0, 27, 0.22);
    border-radius: 8px;
    height: 38px;
    object-fit: cover;
    width: 38px;
}

.app-brand strong {
    color: var(--df-logo-red);
    font-size: 1rem;
    line-height: 1.1;
}

.app-brand small {
    color: var(--df-logo-green-dark);
}

.app-nav {
    gap: 0;
    padding: 0.35rem 0.35rem 0.75rem;
}

.app-nav-footer {
    align-items: center;
    border-top: 1px solid var(--df-border);
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding: 0.55rem 0.7rem 0.75rem;
}

.app-nav-item {
    border-left: 3px solid transparent;
    border-radius: 3px;
    color: #24372d;
    font-size: 0.9rem;
    font-weight: 650;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    min-height: 34px;
    padding: 0.25rem 0.45rem;
}

.app-nav-item:hover {
    background: #edf4ef;
    color: var(--df-logo-green-dark);
}

.app-nav-item.active {
    background: #ffffff;
    border-left-color: var(--df-logo-red);
    box-shadow: inset 0 0 0 1px #dbe4de;
    color: var(--df-logo-green-dark);
}

.app-nav-icon {
    background: #e4eee8;
    border-radius: 4px;
    color: var(--df-logo-green-dark);
    font-size: 0.68rem;
    height: 22px;
    width: 22px;
}

.app-nav-item.active .app-nav-icon {
    background: var(--df-logo-green);
    color: #ffffff;
}

.app-topbar {
    background: linear-gradient(90deg, var(--df-logo-green-dark), var(--df-logo-green));
    border-bottom: 0;
    color: #ffffff;
    height: 48px;
    padding: 0 0.9rem;
}

.app-topbar .app-context {
    color: rgba(255, 255, 255, 0.8);
}

.app-topbar strong {
    font-size: 0.98rem;
    line-height: 1.15;
}

.app-status {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    color: var(--df-logo-green-dark);
    padding: 0.2rem 0.5rem;
}

.app-content {
    padding: 0.75rem;
}

.app-page-header,
.module-surface,
.app-panel,
.app-kpi-card {
    border-radius: 3px;
    box-shadow: none;
}

.app-page-header {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--df-border);
    border-left: 4px solid var(--df-logo-red);
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.app-page-header h1,
.module-titlebar h1 {
    font-size: 1.25rem;
}

.app-page-header p,
.module-titlebar p {
    max-width: 920px;
}

.app-eyebrow {
    color: var(--df-logo-green-dark);
    font-size: 0.7rem;
}

.app-kpi-grid {
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}

.app-kpi-card {
    border: 1px solid var(--df-border);
    min-height: 78px;
    padding: 0.65rem 0.75rem;
}

.app-kpi-card strong {
    color: var(--df-logo-green-dark);
    font-size: 1.35rem;
}

.app-work-grid {
    gap: 0.65rem;
}

.app-panel {
    border: 1px solid var(--df-border);
}

.app-panel-title {
    background: #f7f9f8;
    min-height: 38px;
    padding: 0 0.75rem;
}

.app-task-list li {
    min-height: 38px;
}

.module-surface {
    border-color: var(--df-border);
    min-height: calc(100vh - 72px);
}

.module-titlebar {
    align-items: center;
    background: #f4f6f5;
    border-bottom: 1px solid var(--df-border);
    padding: 0.65rem 0.75rem;
}

.module-titlebar p {
    font-size: 0.86rem;
}

.daka-tabs {
    background: #ffffff;
    min-height: 34px;
    padding: 0 0.45rem;
}

.daka-tab {
    border-bottom-width: 3px;
    font-size: 0.86rem;
    min-height: 34px;
    padding: 0 0.7rem;
}

.daka-tab.active {
    border-bottom-color: var(--df-logo-green);
    color: var(--df-logo-green-dark);
}

.daka-toolbar {
    background: #fbfcfb;
    gap: 0.55rem;
    min-height: 40px;
    padding: 0.35rem 0.65rem;
}

.daka-toolbar-left,
.daka-toolbar-right {
    gap: 0.35rem;
}

.daka-toolbar-button,
.daka-action,
.daka-icon-button {
    border-color: var(--df-border-strong);
    border-radius: 4px;
    font-size: 0.86rem;
    min-height: 28px;
    padding: 0 0.62rem;
}

.daka-action.primary {
    background: var(--df-logo-green);
    border-color: var(--df-logo-green);
}

.daka-action.primary:hover {
    background: var(--df-logo-green-dark);
}

.daka-search {
    border-color: var(--df-border-strong);
    border-radius: 4px;
    height: 28px;
}

.daka-grid-shell {
    min-height: 300px;
}

.daka-grid th,
.daka-grid td {
    border-color: #d7dfda;
    font-size: 0.78rem;
    padding: 0.4rem 0.55rem;
}

.daka-grid th {
    background: #edf2ef;
    color: #263b30;
}

.daka-grid tbody tr:nth-child(even) {
    background: #fbfcfb;
}

.daka-grid tbody tr:hover,
.daka-grid tbody tr.selected {
    background: #e7f4ed;
}

.daka-grid-link {
    color: var(--df-blue);
}

.daka-grid-footer td {
    background: #edf2ef;
}

.daka-grid-pager {
    flex-basis: 34px;
    padding: 0 0.65rem;
}

.form-surface .module-titlebar {
    background: #f1f3f2;
}

.form-commandbar {
    background: #ffffff;
    min-height: 38px;
    padding: 0.45rem 0.65rem;
}

.voucher-header-grid {
    background: #f7f9f8;
    gap: 0.55rem 0.75rem;
    padding: 0.7rem;
}

.voucher-header-grid label span {
    font-size: 0.74rem;
}

.voucher-header-grid input {
    border-color: #c9d4cd;
    border-radius: 3px;
    height: 30px;
}

.voucher-body {
    grid-template-columns: minmax(0, 1fr) 280px;
}

.voucher-summary {
    background: #fbfcfb;
}

.voucher-summary div {
    min-height: 28px;
}

.report-card-grid {
    background: #ffffff;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    padding: 0.75rem;
}

.report-card {
    border-radius: 3px;
    min-height: 126px;
    padding: 0.75rem;
}

.report-card span {
    color: var(--df-logo-green-dark);
}

.report-catalog-surface {
    min-height: calc(100vh - 74px);
}

.misa-report-catalog {
    border-radius: 0;
    box-shadow: none;
}

.misa-report-catalog .module-titlebar {
    background: #ffffff;
    min-height: 44px;
    padding: 0.4rem 0.75rem;
}

.misa-report-catalog .module-titlebar h1 {
    font-size: 1.04rem;
}

.misa-report-catalog .module-titlebar p:not(.app-eyebrow) {
    display: none;
}

.misa-report-catalog .daka-toolbar {
    background: #eef1f3;
    min-height: 46px;
    padding: 0.35rem 0.75rem;
}

.misa-report-catalog .report-index-layout {
    display: grid;
    gap: 12px;
    grid-template-columns: 220px minmax(0, 1fr);
    padding: 10px 12px 14px;
}

.misa-report-catalog .report-parameter-panel {
    display: none;
}

.misa-report-catalog .report-category-rail {
    align-self: start;
    background: #fff;
    border: 1px solid #d4dde5;
    border-radius: 8px;
    display: flex;
    min-height: 160px;
}

.misa-report-catalog .report-index-list {
    background: #fff;
    border: 1px solid #d4dde5;
    border-radius: 8px;
    padding: 0.5rem 0.75rem 0.75rem;
}

.misa-report-catalog .report-section {
    border-color: #d0d6db;
    border-radius: 6px;
}

.misa-report-catalog .report-section h2 {
    background: #ffffff;
    min-height: 40px;
}

.report-index-layout {
    display: grid;
    flex: 1 1 auto;
    gap: 0;
    grid-template-columns: 240px minmax(0, 1fr) 300px;
    min-height: 0;
}

.report-category-rail {
    background: #f4f7f5;
    border-right: 1px solid var(--df-border);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.65rem;
}

.report-category-rail button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #273b31;
    display: flex;
    font: inherit;
    justify-content: space-between;
    min-height: 34px;
    padding: 0 0.55rem;
    text-align: left;
}

.report-category-rail button:hover,
.report-category-rail button.active {
    background: #e3f1e8;
    color: #0c6b34;
}

.report-category-rail strong {
    color: #68766f;
    font-size: 0.76rem;
}

.report-index-list {
    background: #f8faf9;
    min-height: 0;
    overflow: auto;
    padding: 0.8rem 1rem 1.2rem;
}

.report-section {
    background: #ffffff;
    border: 1px solid var(--df-border);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.report-section h2 {
    background: #f3f6f4;
    border-bottom: 1px solid var(--df-border);
    color: #15271d;
    font-size: 0.92rem;
    margin: 0;
    padding: 0.6rem 0.75rem;
}

.report-link-grid {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.25rem 0.65rem;
}

.report-link-grid a,
.report-link-disabled {
    align-items: center;
    background: transparent;
    border-bottom: 1px solid #edf2ef;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    color: #273b31;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    font: inherit;
    min-height: 36px;
    padding: 0.2rem 0.45rem;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.report-link-grid a:hover {
    background: #f4fbf6;
    color: var(--df-logo-green);
}

.report-link-disabled {
    color: #66766e;
    cursor: pointer;
}

.report-link-disabled:hover {
    background: #fff9ed;
    color: #59421b;
}

.report-link-grid a span,
.report-link-disabled span {
    color: #e2a500;
    font-size: 0.85rem;
}

.report-link-grid a strong,
.report-link-disabled strong {
    font-size: 0.82rem;
    font-weight: 650;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-link-grid a small,
.report-link-disabled small {
    color: #66766e;
    font-size: 0.72rem;
}

.report-catalog-params {
    border-left: 1px solid var(--df-border);
    border-radius: 0;
    border-right: 0;
    border-top: 0;
}

.report-empty-state {
    color: #66766e;
    padding: 2rem;
    text-align: center;
}

.app-assist-rail {
    display: grid;
    gap: 0.35rem;
    position: fixed;
    right: 10px;
    top: 48%;
    z-index: 30;
}

.app-assist-rail button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #9ccbb0;
    border-radius: 999px;
    color: var(--df-logo-green-dark);
    display: inline-flex;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.app-assist-rail button:first-child {
    border-color: #9fbce0;
    color: #0066c2;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        border-right: 0;
    }

    .app-brand {
        border-bottom-width: 1px;
    }

    .app-nav {
        background: #ffffff;
        display: flex;
        gap: 0.35rem;
        overflow-x: auto;
        padding: 0.45rem 0.55rem;
        scroll-padding-inline: 0.55rem;
    }

    .app-nav-item {
        flex: 0 0 122px;
    }

    .app-nav-item.active {
        order: -1;
    }

    .app-topbar {
        align-items: stretch;
        height: auto;
        min-height: 48px;
        padding: 0.55rem 0.75rem;
    }

    .app-page-header,
    .module-titlebar,
    .daka-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .module-title-actions,
    .app-header-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .app-assist-rail {
        display: none;
    }

    .voucher-header-grid,
    .voucher-body {
        grid-template-columns: 1fr;
    }

    .daka-grid-pager {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
        height: auto;
        min-height: 56px;
        padding-bottom: 0.45rem;
        padding-top: 0.45rem;
    }

    .daka-grid-pager-controls {
        flex-wrap: wrap;
    }
}

/* Archive deep-polish shell: module strips, side panels, voucher context and report parameter drawer */
.module-snapshot-strip {
    background: #ffffff;
    border-bottom: 1px solid var(--df-border);
    display: grid;
    gap: 0.45rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.45rem 0.65rem;
}

.module-snapshot-strip div {
    background: #f7f9f8;
    border: 1px solid #d6e0da;
    border-radius: 3px;
    display: grid;
    gap: 0.18rem;
    min-height: 44px;
    padding: 0.45rem 0.55rem;
}

.module-snapshot-strip span {
    color: #51645a;
    font-size: 0.72rem;
    font-weight: 650;
}

.module-snapshot-strip strong {
    color: var(--df-logo-green-dark);
    font-size: 1rem;
}

.module-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
}

.module-workspace.has-detail-panel {
    grid-template-columns: minmax(0, 1fr) 286px;
}

.module-grid-region {
    min-width: 0;
}

.module-side-panel,
.report-parameter-panel {
    background: #fbfcfb;
    border-left: 1px solid var(--df-border);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.75rem;
}

.module-side-title {
    align-items: center;
    border-bottom: 1px solid #dbe4de;
    display: flex;
    justify-content: space-between;
    min-height: 32px;
    padding-bottom: 0.45rem;
}

.module-side-title strong {
    color: #14251b;
    font-size: 0.94rem;
}

.module-side-title span {
    background: #e4eee8;
    border-radius: 3px;
    color: var(--df-logo-green-dark);
    font-size: 0.7rem;
    font-weight: 750;
    padding: 0.15rem 0.35rem;
}

.module-side-panel label,
.report-parameter-panel label {
    display: grid;
    gap: 0.25rem;
}

.module-side-panel label span,
.report-parameter-panel label span {
    color: #58675f;
    font-size: 0.72rem;
    font-weight: 700;
}

.module-side-panel input,
.report-parameter-panel input {
    background: #ffffff;
    border: 1px solid #cbd7d0;
    border-radius: 3px;
    height: 28px;
    padding: 0 0.45rem;
}

.module-side-panel p {
    border-top: 1px solid #dbe4de;
    color: #566760;
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0;
    padding-top: 0.55rem;
}

.module-side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: auto;
}

.voucher-context-strip {
    align-items: stretch;
    background: #fbfcfb;
    border-bottom: 1px solid var(--df-border);
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 150px repeat(4, minmax(0, 1fr));
    padding: 0.45rem 0.65rem;
}

.voucher-context-strip > strong {
    align-items: center;
    color: var(--df-logo-green-dark);
    display: flex;
    font-size: 0.86rem;
}

.voucher-context-strip div {
    background: #ffffff;
    border: 1px solid #d9e2dd;
    border-radius: 3px;
    display: grid;
    gap: 0.12rem;
    padding: 0.36rem 0.5rem;
}

.voucher-context-strip span {
    color: #5a6a62;
    font-size: 0.7rem;
    font-weight: 700;
}

.voucher-context-strip b {
    color: #12231a;
    font-size: 0.82rem;
}

.voucher-bottom-strip {
    align-items: center;
    background: #2b2f2d;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    min-height: 34px;
    padding: 0.35rem 0.65rem;
}

.voucher-bottom-strip div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.voucher-bottom-strip span,
.voucher-bottom-strip strong {
    font-size: 0.78rem;
}

.voucher-bottom-strip b {
    color: #bde8cc;
    margin-right: 0.2rem;
}

.report-viewer-surface {
    overflow: hidden;
}

.misa-report-viewer {
    border-radius: 0;
    box-shadow: none;
    min-height: calc(100vh - 62px);
}

.misa-report-viewer .module-titlebar {
    background: #ffffff;
    min-height: 64px;
    padding: 0.5rem 0.75rem;
}

.misa-report-viewer .module-titlebar p:not(.app-eyebrow) {
    display: none;
}

.misa-report-viewer .report-viewer-layout {
    display: block;
    min-height: calc(100vh - 126px);
}

.misa-report-viewer .report-paper-area {
    background: #ffffff;
    min-height: calc(100vh - 126px);
    overflow: auto;
    padding: 0.55rem 0.75rem 0.75rem;
}

.misa-report-viewer .report-toolbar-strip,
.misa-report-viewer .report-parameter-panel {
    display: none;
}

.misa-report-viewer .report-paper {
    border: 0;
    margin-top: 0;
    min-height: calc(100vh - 150px);
    padding: 0.45rem 0 0;
}

.misa-report-viewer .daka-grid-shell {
    min-height: calc(100vh - 320px);
}

.report-viewer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 292px;
    min-height: calc(100vh - 172px);
}

.report-paper-area {
    background: #eef3f0;
    min-width: 0;
    padding: 0.65rem;
}

.report-toolbar-strip {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--df-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    min-height: 34px;
    padding: 0.35rem 0.55rem;
}

.report-toolbar-strip span {
    color: #34463d;
    font-size: 0.78rem;
    font-weight: 650;
}

.report-paper {
    background: #ffffff;
    border: 1px solid var(--df-border);
    margin-top: 0.65rem;
    min-height: 640px;
    padding: 0.75rem;
}

.report-status-message {
    background: #f2f8f4;
    border: 1px solid #cde2d4;
    border-radius: 4px;
    color: #1f4a31;
    font-size: 0.82rem;
    font-weight: 650;
    margin-bottom: 0.65rem;
    padding: 0.55rem 0.65rem;
}

.report-status-message.error {
    background: #fff3f1;
    border-color: #edc2bc;
    color: #9a2b20;
}

.report-heading {
    display: grid;
    gap: 0.2rem;
    justify-items: center;
    padding: 0.3rem 0 0.8rem;
    text-align: center;
}

.report-heading span,
.report-heading p {
    color: #49594f;
    font-size: 0.78rem;
    margin: 0;
}

.report-heading strong {
    color: #102318;
    font-size: 1.02rem;
    text-transform: uppercase;
}

.report-option-list {
    border-top: 1px solid #dbe4de;
    display: grid;
    gap: 0.45rem;
    padding-top: 0.55rem;
}

.report-option-list label {
    align-items: center;
    color: #39493f;
    display: flex;
    flex-direction: row;
    font-size: 0.78rem;
    gap: 0.4rem;
}

@media (max-width: 980px) {
    .module-snapshot-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-workspace.has-detail-panel,
    .report-viewer-layout {
        grid-template-columns: 1fr;
    }

    .module-side-panel,
    .report-parameter-panel {
        border-left: 0;
        border-top: 1px solid var(--df-border);
    }

    .voucher-context-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .voucher-context-strip > strong {
        grid-column: 1 / -1;
    }

    .voucher-bottom-strip {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }
}

/* Shared MISA parity primitives for module-by-module UI work. */
.daka-grid-rowno {
    color: #52635a;
    text-align: center;
    width: 42px;
}

.daka-grid-empty-row td {
    color: #66766e;
    font-style: italic;
    height: 82px;
    text-align: center;
}

.module-filter-strip {
    background: #f8faf9;
    border-bottom: 1px solid var(--df-border);
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0.5rem 0.65rem;
}

.module-filter-strip label,
.misa-import-body label {
    display: grid;
    gap: 0.22rem;
}

.module-filter-strip span,
.misa-import-body label span {
    color: #58675f;
    font-size: 0.72rem;
    font-weight: 750;
}

.module-filter-strip input,
.misa-import-body input,
.misa-import-body select {
    background: #ffffff;
    border: 1px solid #cbd7d0;
    border-radius: 3px;
    height: 28px;
    min-width: 0;
    padding: 0 0.45rem;
    width: 100%;
}

.voucher-grid-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.voucher-option-row {
    align-items: center;
    background: #f8faf9;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    flex-wrap: wrap;
    gap: 1.15rem;
    min-height: 34px;
    padding: 0.35rem 0.65rem;
}

.voucher-option-row span {
    color: #34463d;
    font-size: 0.82rem;
}

.voucher-option-row span::before {
    border: 1px solid #8aa194;
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 12px;
    margin-right: 0.35rem;
    position: relative;
    top: 1px;
    width: 12px;
}

.voucher-option-row b {
    color: #14251b;
    font-weight: 700;
}

.misa-document-surface .module-titlebar {
    min-height: 50px;
}

.misa-document-surface .voucher-header-grid {
    grid-template-columns: 128px minmax(210px, 1fr) 118px minmax(160px, 0.72fr);
}

.misa-document-surface .voucher-header-grid label {
    align-items: center;
    display: contents;
}

.misa-document-surface .voucher-header-grid label span {
    align-self: center;
    color: #263b30;
    font-size: 0.78rem;
    font-weight: 700;
}

.misa-document-surface .voucher-header-grid label:first-child span::after {
    color: var(--df-logo-red);
    content: " *";
}

.misa-document-surface .voucher-summary {
    padding-bottom: 4.25rem;
}

.misa-document-surface .voucher-summary b {
    font-variant-numeric: tabular-nums;
}

.misa-modal-backdrop,
.misa-import-backdrop {
    align-items: center;
    background: rgba(12, 24, 17, 0.45);
    display: flex;
    inset: 0;
    justify-content: center;
    overflow: auto;
    padding: 1rem;
    position: fixed;
    z-index: 80;
}

.misa-import-dialog {
    background: #ffffff;
    border: 1px solid #bcc9c1;
    border-radius: 5px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    max-height: min(760px, calc(100vh - 2rem));
    max-width: 1080px;
    min-height: 560px;
    overflow: hidden;
    width: min(1080px, 100%);
}

.misa-record-dialog {
    background: #ffffff;
    border: 1px solid #bcc9c1;
    border-radius: 5px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: calc(100vh - 24px);
    max-width: calc(100vw - 24px);
    min-height: 0;
    overflow: hidden;
    width: auto;
}

.misa-import-header,
.misa-import-footer {
    align-items: center;
    background: #f3f6f4;
    border-bottom: 1px solid var(--df-border);
    display: flex;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 0.75rem;
}

.misa-import-footer {
    border-bottom: 0;
    border-top: 1px solid var(--df-border);
    gap: 0.45rem;
    justify-content: flex-end;
}

.misa-import-header strong {
    color: #13241b;
    font-size: 1rem;
}

.misa-import-steps {
    background: #ffffff;
    border-bottom: 1px solid var(--df-border);
    display: grid;
    gap: 0.35rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0.55rem 0.75rem;
}

.misa-import-steps > span {
    background: #eef3ef;
    border: 1px solid #cfdad3;
    border-radius: 4px;
    color: #314239;
    font-size: 0.78rem;
    font-weight: 750;
    min-width: 0;
    overflow: hidden;
    padding: 0.35rem 0.45rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-import-steps > span.active,
.misa-import-steps > span.done {
    background: #e7f6ed;
    border-color: #93c9a3;
    color: #0c6b2d;
}

.misa-import-steps > span.warning {
    background: #fff7ed;
    border-color: #f5bd73;
    color: #9a5a00;
}

.misa-import-step {
    display: grid;
    gap: 0.2rem;
    justify-items: center;
    text-align: center;
}

.misa-import-step span {
    align-items: center;
    background: #cfd8d2;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.misa-import-step.active span,
.misa-import-step.done span {
    background: var(--df-logo-green);
}

.misa-import-step strong {
    color: #1f3027;
    font-size: 0.82rem;
}

.misa-import-step small {
    color: #627269;
    font-size: 0.72rem;
}

.misa-import-body {
    background: #f8faf9;
    display: grid;
    flex: 1 1 auto;
    gap: 0.6rem;
    grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
    overflow: auto;
    padding: 0.75rem;
}

.misa-record-body {
    align-content: start;
    align-items: start;
    background: #ffffff;
    display: grid;
    flex: 0 1 auto;
    gap: 10px 14px;
    grid-auto-rows: min-content;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: calc(100vh - 124px);
    overflow: auto;
    padding: 14px;
}

.misa-record-body label {
    align-content: start;
    align-self: start;
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.misa-record-body label span {
    color: #273b31;
    font-size: 0.76rem;
    font-weight: 750;
}

.misa-record-body label.required span::after {
    color: var(--df-logo-red);
    content: " *";
}

.misa-record-body label.misa-record-checkbox {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    grid-column: 1 / -1;
}

.misa-record-body label.misa-record-checkbox input[type="checkbox"] {
    flex: 0 0 auto;
    height: 16px;
    margin: 0;
    width: 16px;
}

.misa-record-body fieldset.misa-record-field {
    border: 0;
    grid-column: 1 / -1;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.misa-record-body fieldset.misa-record-field > legend {
    color: #273b31;
    font-size: 0.76rem;
    font-weight: 750;
    margin-bottom: 0.35rem;
}

.misa-record-body fieldset.misa-record-field.required > legend::after {
    color: var(--df-logo-red);
    content: " *";
}

.misa-record-radio-group {
    align-items: center;
    display: flex;
    gap: 1.4rem;
    min-height: 30px;
}

.misa-record-body label.misa-record-radio-option {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
}

.misa-record-body label.misa-record-radio-option input[type="radio"] {
    accent-color: var(--df-logo-green);
    flex: 0 0 auto;
    height: 16px;
    margin: 0;
    width: 16px;
}

.misa-record-body input,
.misa-record-body textarea {
    background: #ffffff;
    border: 1px solid #aebfb5;
    border-radius: 3px;
    min-width: 0;
    padding: 0 0.5rem;
}

.misa-record-body input:focus,
.misa-record-body textarea:focus,
.misa-import-body input:focus {
    border-color: var(--df-logo-green);
    box-shadow: 0 0 0 1px rgba(19, 137, 63, 0.16);
    outline: none;
}

.misa-record-body input {
    height: 30px;
}

.misa-record-body textarea {
    min-height: 64px;
    padding: 0.45rem 0.5rem;
    resize: vertical;
}

.misa-import-body input[type="file"] {
    align-items: center;
    display: flex;
    height: auto;
    min-height: 30px;
    padding: 0.25rem 0.45rem;
}

.misa-import-panel {
    background: #ffffff;
    border: 1px solid #d4ded8;
    border-radius: 4px;
    min-width: 0;
    padding: 0.6rem;
}

.misa-import-file-panel,
.misa-import-settings-panel {
    display: grid;
    gap: 0.5rem;
}

.misa-import-map-panel,
.misa-import-result-panel,
.misa-import-preview-panel {
    display: grid;
    gap: 0.5rem;
}

.misa-import-result-panel,
.misa-import-preview-panel {
    grid-column: 1 / -1;
}

.misa-import-panel-title,
.misa-import-file-meta {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    min-width: 0;
}

.misa-import-panel-title span,
.misa-import-file-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-import-panel-title strong,
.misa-import-file-meta span:last-child {
    color: #146b32;
    flex: 0 0 auto;
    font-size: 0.78rem;
}

.misa-import-map-grid {
    border: 1px solid #e1e7e3;
    display: grid;
    max-height: 184px;
    overflow: auto;
}

.misa-import-map-row {
    align-items: center;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1.2fr);
    min-height: 28px;
    padding: 0.25rem 0.45rem;
}

.misa-import-map-row + .misa-import-map-row {
    border-top: 1px solid #edf1ee;
}

.misa-import-map-row strong {
    border-radius: 3px;
    justify-self: start;
    padding: 0.12rem 0.35rem;
}

.misa-import-map-row strong.mapped {
    background: #e8f7ed;
    color: #0d6c2d;
}

.misa-import-map-row strong.missing {
    background: #fff4e6;
    color: #a15c00;
}

.misa-import-result-scroll,
.misa-import-preview-scroll {
    border: 1px solid #dbe3de;
    max-height: 210px;
    overflow: auto;
}

.misa-import-result-grid,
.misa-import-preview-grid {
    border-collapse: collapse;
    font-size: 0.78rem;
    min-width: 680px;
    width: 100%;
}

.misa-import-result-grid th,
.misa-import-result-grid td,
.misa-import-preview-grid th,
.misa-import-preview-grid td {
    border-bottom: 1px solid #e3e9e5;
    border-right: 1px solid #edf1ee;
    height: 26px;
    padding: 0.25rem 0.45rem;
    text-align: left;
    white-space: nowrap;
}

.misa-import-result-grid th,
.misa-import-preview-grid th {
    background: #edf3ef;
    color: #1f3328;
    font-weight: 750;
    position: sticky;
    top: 0;
    z-index: 1;
}

.misa-import-badge {
    border-radius: 3px;
    display: inline-flex;
    font-weight: 760;
    line-height: 1;
    padding: 0.25rem 0.4rem;
}

.misa-import-badge.valid,
.misa-import-badge.imported {
    background: #e2f6e8;
    color: #0b6a2e;
}

.misa-import-badge.error {
    background: #ffe9e6;
    color: #a12d21;
}

.misa-import-badge.skipped {
    background: #eef1f4;
    color: #53606a;
}

.misa-import-empty {
    color: #65736b;
    margin: 0;
}

.misa-import-status {
    background: #eef8f1;
    border-top: 1px solid #cfe5d6;
    color: #0d6c2d;
    padding: 0.45rem 0.75rem;
}

.misa-import-status.error {
    background: #fff1ee;
    border-top-color: #f3c4bc;
    color: #a12d21;
}

.misa-import-note {
    background: #ffffff;
    border: 1px dashed #b8c8be;
    border-radius: 4px;
    grid-column: 1 / -1;
    padding: 0.8rem;
}

.misa-import-note p {
    color: #58675f;
    margin: 0.3rem 0 0;
}

.employee-record-dialog {
    background: #ffffff;
    border: 1px solid #b7bcc2;
    border-radius: 4px;
    box-sizing: border-box;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    margin: auto;
    height: auto;
    max-height: calc(100vh - 24px);
    max-width: calc(100vw - 24px);
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    width: min(680px, calc(100vw - 24px));
}

.employee-record-dialog *,
.employee-record-dialog *::before,
.employee-record-dialog *::after {
    box-sizing: border-box;
}

.employee-dialog-header {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #d8dde2;
    display: flex;
    flex: 0 0 auto;
    gap: 0.75rem;
    justify-content: space-between;
    min-height: 52px;
    min-width: 0;
    padding: 0 1rem;
    position: relative;
}

.employee-title-row,
.employee-dialog-tools {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.7rem;
    margin-left: auto;
    min-width: 0;
}

.employee-title-row strong {
    flex: 0 0 auto;
    color: #1f2933;
    font-size: 1.18rem;
    white-space: nowrap;
}

.employee-title-row label,
.employee-checkline,
.employee-radio-field label {
    align-items: center;
    color: #3b4650;
    display: inline-flex;
    font-size: 0.78rem;
    gap: 0.35rem;
}

.employee-title-row input,
.employee-checkline input,
.employee-radio-field input {
    height: 15px;
    margin: 0;
    width: 15px;
}

.employee-form-main,
.employee-tab-panel {
    display: grid;
    flex: 0 0 auto;
    gap: 0.55rem 0.85rem;
    grid-template-columns: 120px minmax(180px, 1fr) 92px minmax(140px, 0.7fr) 120px;
    min-width: 0;
    padding: 0.8rem 1rem 0.7rem;
}

.employee-form-main {
    background: #ffffff;
}

.employee-field {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.employee-field span,
.employee-radio-field legend {
    color: #26343c;
    font-size: 0.74rem;
    font-weight: 700;
}

.employee-field.required > span::after {
    color: #d9001b;
    content: " *";
}

.employee-field input {
    background: #ffffff;
    border: 1px solid #aeb7c1;
    border-radius: 2px;
    color: #101820;
    font-size: 0.78rem;
    height: 26px;
    min-width: 0;
    padding: 0 0.42rem;
    width: 100%;
}

.employee-field input:disabled {
    background: #f2f4f6;
    color: #59636d;
}

.employee-field input.number {
    text-align: right;
}

.employee-wide {
    grid-column: span 2;
}

.employee-radio-field {
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.employee-radio-field legend {
    flex: 0 0 100%;
    padding: 0;
}

.employee-tab-strip {
    align-items: end;
    background: #ffffff;
    border-bottom: 1px solid #ccd3da;
    display: flex;
    flex: 0 0 auto;
    gap: 0;
    min-width: 0;
    overflow: hidden;
    padding: 0 1rem;
}

.employee-tab-strip button {
    background: #f3f7fa;
    border: 1px solid #ccd3da;
    border-bottom: 0;
    color: #3d4a54;
    cursor: pointer;
    flex: 0 1 auto;
    font-size: 0.78rem;
    height: 30px;
    margin: 0 0 -1px;
    min-width: 0;
    overflow: hidden;
    padding: 0 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-tab-strip button.active {
    background: #ffffff;
    color: var(--df-logo-green-dark);
    font-weight: 700;
}

.employee-tab-panel {
    align-content: start;
    border-bottom: 1px solid #e0e5e9;
    flex: 1 1 auto;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    min-height: 142px;
    min-width: 0;
    overflow: auto;
}

.employee-tab-panel .employee-wide {
    grid-column: span 2;
}

.employee-checkline {
    align-self: end;
    min-height: 26px;
}

.employee-dialog-footer {
    align-items: center;
    background: #ffffff;
    display: grid;
    flex: 0 0 auto;
    gap: 0.45rem;
    grid-template-columns: auto 1fr auto auto;
    min-height: 52px;
    min-width: 0;
    padding: 0 1rem;
}

.employee-dialog-footer .misa-secondary-button {
    background: #ffffff;
    border-color: #aeb7c1;
    color: #1f2933;
}

@media (max-width: 980px) {
    .module-filter-strip,
    .misa-document-surface .voucher-header-grid,
    .misa-record-body,
    .misa-import-body,
    .misa-import-steps,
    .employee-form-main,
    .employee-tab-panel {
        grid-template-columns: 1fr;
    }

    .misa-document-surface .voucher-header-grid label {
        display: grid;
    }

    .employee-record-dialog {
        height: auto;
        max-height: calc(100vh - 16px);
        min-height: 0;
        width: calc(100vw - 16px);
    }

    .employee-dialog-header,
    .employee-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .employee-dialog-header {
        gap: 0.45rem;
        padding: 0.75rem;
    }

    .employee-dialog-tools {
        position: absolute;
        right: 0.75rem;
        top: 0.75rem;
    }

    .employee-wide,
    .employee-tab-panel .employee-wide {
        grid-column: auto;
    }

    .employee-dialog-footer {
        grid-template-columns: 1fr;
        padding-bottom: 0.75rem;
        padding-top: 0.75rem;
    }
}

/* Opening balance declaration hub, 2026-05-31. */
.opening-balance-hub {
    background: #f3f5f7;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 26px 28px;
}

.opening-balance-hub-header h1 {
    color: #151515;
    font-size: 24px;
    margin: 0;
}

.opening-balance-hub-header p:last-child {
    color: #64748b;
    margin: 6px 0 0;
}

.opening-balance-hub-status {
    background: #fff8e1;
    border: 1px solid #f3d78b;
    border-radius: 4px;
    color: #7c5c08;
    margin-top: 16px;
    max-width: 980px;
    padding: 10px 12px;
}

.opening-balance-hub-status.error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #b91c1c;
}

.opening-balance-card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    margin-top: 22px;
    max-width: 1120px;
}

.opening-balance-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgb(15 23 42 / 6%);
    color: #101820;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font: inherit;
    gap: 10px;
    justify-content: flex-start;
    min-height: 156px;
    padding: 18px;
    text-align: left;
}

.opening-balance-card:hover,
.opening-balance-card:focus-visible {
    border-color: #76be83;
    box-shadow: 0 6px 16px rgb(35 150 58 / 14%);
    outline: none;
}

.opening-balance-card-icon {
    align-items: center;
    background: #e8f6ea;
    border: 1px solid #addab4;
    border-radius: 6px;
    color: #26953c;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    height: 44px;
    justify-content: center;
    width: 52px;
}

.opening-balance-card-title {
    color: #101820;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    min-height: 40px;
}

.opening-balance-card-summary {
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.opening-balance-card-status {
    background: #f4f6f8;
    border-radius: 999px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
}

.opening-balance-card-status.available {
    background: #e8f6ea;
    color: #1f7a34;
}

.opening-balance-card-action {
    color: #0078d4;
    font-size: 12px;
    font-weight: 700;
    margin-top: auto;
}

.opening-balance-card:disabled {
    cursor: wait;
    opacity: 0.75;
}

.opening-balance-hub-note {
    color: #64748b;
    font-size: 12px;
    margin: 16px 0 0;
    max-width: 980px;
}

@media (max-width: 1100px) {
    .opening-balance-card-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 700px) {
    .opening-balance-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Six opening-balance entry screens, 2026-06-01. */
.opening-entry-page {
    background: #f0f1f3;
    color: #111;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    height: calc(100vh - 52px);
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.opening-entry-header {
    align-items: flex-start;
    display: flex;
    flex: 0 0 102px;
    justify-content: space-between;
    padding: 16px 16px 10px;
}

.opening-entry-title-row {
    align-items: center;
    display: flex;
    gap: 12px;
}

.opening-entry-title-row h1 {
    color: #202020;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.opening-entry-title-row a {
    color: #2078c7;
    font-size: 12px;
    text-decoration: none;
}

.opening-entry-filters {
    align-items: center;
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.opening-entry-filters label {
    align-items: center;
    color: #333;
    display: flex;
    font-size: 12px;
    gap: 8px;
}

.opening-entry-filters select {
    background: #fff;
    border: 1px solid #aeb7c1;
    height: 25px;
    min-width: 78px;
    padding: 0 24px 0 8px;
}

.opening-entry-header-right {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.opening-entry-window-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.opening-entry-primary-actions {
    align-items: center;
    display: flex;
    gap: 18px;
}

.opening-start-link {
    background: transparent;
    border: 0;
    color: #1976c9;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}

.opening-split-action {
    position: relative;
}

.opening-split-action .misa-split-main,
.opening-split-action .misa-split-toggle {
    align-items: center;
    background: #21a43b;
    border: 1px solid #21a43b;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 30px;
    justify-content: center;
}

.opening-split-action .misa-split-main {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-top-left-radius: 16px;
    border-top-right-radius: 0;
    min-width: 92px;
    padding: 0 14px;
}

.opening-split-action .misa-split-toggle {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 16px;
    border-top-left-radius: 0;
    border-top-right-radius: 16px;
    min-width: 30px;
    padding: 0 8px;
}

.opening-split-action .misa-split-main:disabled,
.opening-split-action .misa-split-toggle:disabled {
    cursor: default;
    opacity: 0.6;
}

.opening-split-action .misa-split-menu {
    min-width: 230px;
}

.opening-split-action .misa-split-menu button {
    background: #ffffff;
    border: 0;
    color: #111827;
    cursor: pointer;
    font-size: 12px;
    height: 28px;
    justify-content: flex-start;
    padding: 0 10px;
    text-align: left;
    white-space: nowrap;
    width: 100%;
}

.opening-split-action .misa-split-menu button:hover {
    background: #eaf5ed;
}

.opening-entry-toolbar {
    align-items: center;
    background: #fff;
    border: 0;
    display: flex;
    flex: 0 0 50px;
    justify-content: space-between;
    min-height: 50px;
    margin: 0 16px;
    padding: 8px 18px;
}

.opening-entry-toolbar-left,
.opening-entry-toolbar-right {
    align-items: center;
    display: flex;
    gap: 8px;
}

.opening-entry-search {
    align-items: center;
    border: 1px solid #b8c1cb;
    display: flex;
    height: 25px;
    margin-left: 4px;
    width: 230px;
}

.opening-entry-search input {
    border: 0;
    flex: 1 1 auto;
    font-size: 12px;
    font-style: italic;
    height: 23px;
    min-width: 0;
    padding: 0 8px;
}

.opening-entry-search span {
    color: #9aa3ad;
    padding-right: 8px;
}

.opening-toolbar-drop {
    background: transparent;
    border: 0;
    color: #6b7280;
    cursor: pointer;
    font-size: 22px;
    height: 28px;
    line-height: 24px;
    width: 26px;
}

.opening-bulk-button {
    background: #ffffff;
    border: 1px solid #b9c2cb;
    border-radius: 16px;
    color: #7a838d;
    font-size: 12px;
    font-weight: 600;
    height: 28px;
    min-width: 146px;
    padding: 0 16px;
}

.opening-bulk-action {
    display: inline-flex;
    position: relative;
}

.opening-bulk-menu {
    left: 0;
    min-width: 178px;
    right: auto;
}

.opening-bulk-menu button {
    align-items: center;
    background: #ffffff;
    border: 0;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    height: 28px;
    justify-content: flex-start;
    padding: 0 10px;
    text-align: left;
    white-space: nowrap;
    width: 100%;
}

.opening-bulk-menu button:hover:not(:disabled) {
    background: #eaf5ed;
}

.opening-bulk-menu button:disabled {
    color: #9aa3ad;
    cursor: default;
}

.opening-toolbar-icon {
    background: transparent;
    border: 0;
    color: #9aa3ad;
    cursor: pointer;
    font-size: 24px;
    height: 28px;
    width: 28px;
}

.opening-toolbar-icon.excel {
    color: #5a8f55;
    font-size: 18px;
}

.opening-toolbar-drop:disabled,
.opening-bulk-button:disabled,
.opening-toolbar-icon:disabled {
    cursor: default;
    opacity: 0.55;
}

.opening-entry-page .misa-data-grid-shell {
    background: #fff;
    flex: 1 1 auto;
    margin: 0 16px;
    min-height: 0;
}

.opening-entry-page .misa-data-grid-scroll {
    max-height: none;
}

.opening-entry-page .misa-data-grid {
    min-width: 1180px;
}

.opening-entry-page .misa-data-grid th,
.opening-entry-page .misa-data-grid td {
    height: 27px;
    padding: 3px 8px;
}

.opening-entry-page .misa-grid-cell-input {
    border-color: #c8d0d8;
    height: 22px;
}

.opening-entry-page .misa-grid-footer td {
    background: #f6f7fa;
}

.opening-entry-rowbar {
    align-items: center;
    background: #ffffff;
    display: flex;
    flex: 0 0 44px;
    gap: 8px;
    margin: 0 16px;
    padding: 8px 0 8px 0;
}

.opening-entry-rowbar button {
    background: #ffffff;
    border: 1px solid #9da7b1;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    height: 26px;
    padding: 0 12px;
}

.opening-entry-commandbar {
    align-items: center;
    background: #2f3338;
    color: #e5e7eb;
    display: flex;
    flex: 0 0 52px;
    gap: 10px;
    justify-content: flex-end;
    padding: 0 16px;
}

.opening-entry-commandbar span {
    color: #d1d5db;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opening-entry-commandbar button {
    border: 1px solid #636b74;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    height: 32px;
    min-width: 52px;
    padding: 0 14px;
}

.opening-entry-commandbar button.secondary {
    background: #25292e;
}

.opening-entry-commandbar button.primary {
    background: #1f8f3a;
    border-color: #1f8f3a;
}

.opening-entry-commandbar button.strong {
    background: #21a43b;
    border-color: #21a43b;
}

.opening-entry-commandbar button:disabled {
    cursor: default;
    opacity: 0.5;
}

@media (max-width: 900px) {
    .opening-entry-header {
        flex-basis: auto;
        flex-direction: column;
        gap: 12px;
    }

    .opening-entry-header-right {
        align-items: flex-start;
        width: 100%;
    }

    .opening-entry-toolbar {
        align-items: flex-start;
        flex-basis: auto;
        flex-direction: column;
        gap: 8px;
    }

    .opening-entry-toolbar-left,
    .opening-entry-toolbar-right,
    .opening-entry-filters {
        flex-wrap: wrap;
    }
}

/* Shared Excel import wizard follows MISA ASP help flow: source, mapping, validate, result. */
.misa-import-backdrop {
    background: rgba(15, 18, 21, 0.42);
    padding: 1.25rem;
    z-index: 1300;
}

.misa-import-dialog {
    background: #f4f5f8;
    border: 1px solid #b7bcc2;
    border-radius: 0;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
    color: #1b1f23;
    font-size: 12px;
    height: min(668px, calc(100vh - 2.5rem));
    max-height: none;
    max-width: none;
    min-height: min(560px, calc(100vh - 2.5rem));
    width: min(1040px, calc(100vw - 2.5rem));
}

.misa-import-header {
    background: #f4f5f8;
    border-bottom: 0;
    min-height: 54px;
    padding: 0 1.3rem;
}

.misa-import-header h2 {
    color: #0f1720;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.misa-import-window-actions {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.misa-icon-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #727a82;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.35rem;
    font-weight: 500;
    height: 28px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.misa-icon-button:hover {
    color: #20272d;
}

.misa-import-steps {
    background: #f4f5f8;
    border-bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.45rem 3rem 1.25rem;
    position: relative;
}

.misa-import-steps::before {
    background: #bfc4ca;
    content: "";
    height: 2px;
    left: 6.8rem;
    position: absolute;
    right: 6.8rem;
    top: 20px;
}

.misa-import-steps > span {
    align-items: center;
    background: transparent;
    border: 0;
    color: #a5abb1;
    display: grid;
    font-size: 0.7rem;
    gap: 0.35rem;
    justify-items: center;
    min-width: 0;
    overflow: visible;
    padding: 0;
    position: relative;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    z-index: 1;
}

.misa-import-steps > span strong {
    align-items: center;
    background: #f4f5f8;
    border: 2px solid #c5cbd1;
    border-radius: 999px;
    color: #a3aab1;
    display: inline-flex;
    font-size: 0.95rem;
    height: 28px;
    justify-content: center;
    line-height: 1;
    width: 28px;
}

.misa-import-steps > span b {
    color: inherit;
    font-size: 0.72rem;
    line-height: 1.1;
}

.misa-import-steps > span.active,
.misa-import-steps > span.done {
    background: transparent;
    border: 0;
    color: #169637;
}

.misa-import-steps > span.active strong,
.misa-import-steps > span.done strong {
    border-color: #25a63a;
    color: #179337;
}

.misa-import-body {
    background: #ffffff;
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1.35rem 1.45rem;
}

.misa-import-source-layout {
    display: grid;
    gap: 1.9rem;
    grid-template-columns: minmax(360px, 0.95fr) minmax(340px, 1.05fr);
    min-height: 330px;
}

.misa-import-source-left {
    border-right: 1px solid #d8dde2;
    display: grid;
    gap: 0.5rem;
    padding-right: 1.9rem;
    align-content: start;
}

.misa-import-file-drop {
    border: 1px solid #d0d6db;
    min-height: 76px;
    padding: 0.35rem;
    position: relative;
}

.misa-import-file-label {
    align-items: center;
    display: flex;
    gap: 0.9rem;
    min-height: 20px;
}

.misa-import-file-label strong {
    color: #20262d;
    font-weight: 800;
}

.misa-import-file-label span,
.misa-import-drop-hint {
    color: #8f989f;
    font-size: 0.72rem;
}

.misa-import-drop-hint {
    align-items: center;
    background: #f8fafb;
    border: 1px solid #cfd5db;
    display: flex;
    font-style: italic;
    height: 40px;
    justify-content: center;
    margin-top: 0.35rem;
}

.misa-import-file-drop input[type="file"] {
    cursor: pointer;
    height: 100%;
    inset: 0;
    opacity: 0;
    padding: 0;
    position: absolute;
    width: 100%;
}

.misa-import-template-links {
    display: flex;
    gap: 1rem;
}

.misa-import-template-links button,
.misa-import-check-summary button,
.misa-import-finish-summary button {
    background: transparent;
    border: 0;
    color: #1b75bb;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.misa-import-source-fields {
    align-items: end;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 138px 144px;
    margin-top: 0.25rem;
}

.misa-import-body label {
    display: grid;
    gap: 0.25rem;
}

.misa-import-body label span,
.misa-import-source-fields span {
    color: #26313a;
    font-size: 0.74rem;
    font-weight: 800;
}

.misa-import-body input,
.misa-import-body select {
    border: 1px solid #b9c2ca;
    border-radius: 0;
    color: #20262d;
    font-size: 0.75rem;
    height: 28px;
    padding: 0 0.45rem;
}

.misa-import-methods {
    border: 1px solid #d0d6db;
    display: grid;
    gap: 0.48rem;
    margin: 0.55rem 0 0;
    padding: 0.5rem 0.55rem 0.7rem;
    width: 154px;
}

.misa-import-methods legend {
    color: #20262d;
    font-size: 1rem;
    padding: 0 0.1rem;
}

.misa-import-methods label {
    align-items: center;
    color: #30363d;
    display: flex;
    gap: 0.38rem;
}

.misa-import-methods input[type="radio"] {
    accent-color: #28a33e;
    height: 15px;
    width: 15px;
}

.misa-import-tips {
    color: #222930;
    padding: 0.25rem 1rem 0 1.5rem;
}

.misa-import-tips h3 {
    font-size: 1rem;
    margin: 0 0 0.65rem;
}

.misa-import-tips ul {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding-left: 1.25rem;
}

.misa-import-tips li::marker {
    color: #25a63a;
}

.misa-import-step-toolbar {
    align-items: center;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(220px, 1fr) 210px auto;
    margin-bottom: 1rem;
}

.misa-import-step-toolbar strong {
    color: #20262d;
    font-size: 0.95rem;
    max-width: 340px;
}

.misa-import-step-toolbar input {
    height: 30px;
}

.misa-secondary-button,
.misa-primary-button {
    align-items: center;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    min-width: 72px;
    padding: 0 0.9rem;
    text-decoration: none;
}

.misa-secondary-button {
    background: #36393f;
    border: 1px solid #6d747c;
    color: #ffffff;
}

.misa-import-step-toolbar .misa-secondary-button {
    background: #ffffff;
    border-color: #9aa4ad;
    border-radius: 18px;
    color: #242c34;
    justify-self: end;
    min-width: 140px;
}

.misa-primary-button {
    background: #28a33e;
    border: 1px solid #28a33e;
    color: #ffffff;
}

.misa-primary-button:disabled,
.misa-secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.54;
}

.misa-import-table-scroll {
    border: 0;
    max-height: none;
    overflow: auto;
}

.misa-import-map-table,
.misa-import-info-table,
.misa-import-result-grid {
    border-collapse: collapse;
    font-size: 0.75rem;
    min-width: 850px;
    width: 100%;
}

.misa-import-map-table th,
.misa-import-map-table td,
.misa-import-info-table th,
.misa-import-info-table td,
.misa-import-result-grid th,
.misa-import-result-grid td {
    border-bottom: 1px solid #d7dce1;
    border-right: 1px solid #edf0f2;
    height: 32px;
    padding: 0.32rem 0.6rem;
    text-align: left;
    white-space: nowrap;
}

.misa-import-map-table th,
.misa-import-info-table th,
.misa-import-result-grid th {
    background: #eef1f4;
    color: #27313a;
    font-weight: 800;
    position: sticky;
    top: 0;
    z-index: 1;
}

.misa-import-map-table th:first-child,
.misa-import-map-table td:first-child {
    text-align: center;
    width: 140px;
}

.misa-import-map-table select {
    background: #ffffff;
    min-width: 210px;
    width: 100%;
}

.misa-import-check-summary {
    align-items: start;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    margin-bottom: 1rem;
}

.misa-import-check-summary p,
.misa-import-finish-summary p {
    font-size: 0.82rem;
    margin: 0;
}

.misa-import-check-summary label {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.misa-import-check-summary select {
    min-width: 110px;
}

.misa-import-finish-summary {
    margin-top: 4.4rem;
    padding-left: 0.6rem;
}

.misa-import-finish-summary button,
.misa-import-finish-summary a {
    margin-left: 0.65rem;
}

.misa-import-check-summary .ok,
.misa-import-finish-summary .ok {
    color: #28a33e;
}

.misa-import-check-summary .error,
.misa-import-finish-summary .error {
    color: #ff3030;
}

.misa-import-finish-summary .warning {
    color: #a66b00;
}

.misa-import-badge {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.misa-import-badge.valid,
.misa-import-badge.imported {
    background: transparent;
    color: #1b9a36;
}

.misa-import-badge.error {
    background: transparent;
    color: #ff3030;
}

.misa-import-info-modal {
    align-items: center;
    background: rgba(15, 18, 21, 0.32);
    display: flex;
    inset: 0;
    justify-content: center;
    position: absolute;
    z-index: 3;
}

.misa-import-info-dialog {
    background: #ffffff;
    border: 2px solid #b7bcc2;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    height: min(560px, calc(100% - 2rem));
    max-width: min(760px, calc(100% - 2rem));
    min-width: min(720px, calc(100% - 2rem));
}

.misa-import-info-dialog header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 46px;
    padding: 0 1rem;
}

.misa-import-info-dialog h3 {
    font-size: 1rem;
    margin: 0;
}

.misa-import-info-dialog > input {
    margin: 0 1rem 0.8rem;
    width: 200px;
}

.misa-import-info-dialog .misa-import-table-scroll {
    flex: 1 1 auto;
    margin: 0 1rem;
}

.misa-import-info-dialog footer {
    align-items: center;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    min-height: 54px;
    padding: 0 1rem;
}

.misa-import-info-dialog footer .misa-secondary-button {
    background: #ffffff;
    border-color: #9aa4ad;
    color: #1f2933;
}

.misa-import-status {
    background: #eef8f1;
    border-top: 1px solid #c7e4d0;
    color: #0f7d34;
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 0.42rem 1.35rem;
}

.misa-import-status.error {
    background: #fff1ee;
    border-top-color: #f3c4bc;
    color: #b42318;
}

.misa-import-footer {
    background: #303238;
    border-top: 0;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.35rem 0.8rem;
}

.misa-import-footer .misa-primary-button:last-child {
    margin-left: auto;
}

@media (max-width: 980px) {
    .misa-import-dialog {
        height: calc(100vh - 1rem);
        min-height: 0;
        width: calc(100vw - 1rem);
    }

    .misa-import-steps {
        gap: 0.45rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .misa-import-steps::before {
        content: none;
    }

    .misa-import-source-layout,
    .misa-import-step-toolbar,
    .misa-import-check-summary {
        grid-template-columns: 1fr;
    }

    .misa-import-source-left {
        border-right: 0;
        padding-right: 0;
    }

    .misa-import-source-fields {
        grid-template-columns: 1fr;
    }

    .misa-import-info-dialog {
        min-width: 0;
        width: calc(100% - 1rem);
    }
}

/* PM sign-off readiness: icon actions and collapsible MISA-style navigation. */
.daka-action-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.95rem;
    justify-content: center;
    line-height: 1;
    min-width: 1rem;
}

.daka-action-label {
    min-width: 0;
}

.daka-action.icon-only {
    min-width: 30px;
    padding: 0;
    width: 30px;
}

.daka-action.icon-only .daka-action-icon {
    font-size: 1rem;
    min-width: 0;
}

.daka-toolbar-button {
    cursor: pointer;
}

.daka-toolbar-button:disabled,
.daka-action:disabled,
.daka-icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.app-shell {
    transition: grid-template-columns 160ms ease;
}

.app-brand {
    position: relative;
}

.app-shell.nav-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
}

.app-nav-toggle {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--df-border);
    border-radius: 4px;
    color: var(--df-logo-green-dark);
    cursor: pointer;
    display: inline-flex;
    font-size: 1.05rem;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    margin-left: auto;
    width: 28px;
}

.app-nav-toggle:hover {
    background: var(--df-logo-green-light);
}

.app-nav-svg {
    height: 18px;
    width: 18px;
}

.app-nav-icon {
    color: var(--df-logo-green-dark);
}

.app-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-shell.nav-collapsed .app-sidebar {
    overflow-x: hidden;
}

.app-shell.nav-collapsed .app-brand {
    justify-content: center;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.app-shell.nav-collapsed .app-brand > div {
    display: none;
}

.app-shell.nav-collapsed .app-brand-logo {
    height: 34px;
    width: 34px;
}

.app-shell.nav-collapsed .app-nav-toggle {
    margin-left: 0;
}

.app-shell.nav-collapsed .app-nav-footer {
    justify-content: center;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.app-shell.nav-collapsed .app-nav {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.app-shell.nav-collapsed .app-nav-item {
    border-left: 0;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 38px;
    padding: 0.25rem 0;
}

.app-shell.nav-collapsed .app-nav-label,
.app-shell.nav-collapsed .app-nav-item em {
    display: none;
}

.app-shell.nav-collapsed .app-nav-icon {
    height: 30px;
    width: 30px;
}

.app-shell-toast {
    background: #ffffff;
    border: 1px solid #b8d7c4;
    border-radius: 4px;
    bottom: 12px;
    box-shadow: 0 8px 22px rgba(20, 36, 27, 0.16);
    color: #1e3c2b;
    font-size: 0.82rem;
    font-weight: 650;
    max-width: 360px;
    padding: 0.55rem 0.7rem;
    position: fixed;
    right: 12px;
    z-index: 50;
}

@media (max-width: 980px) {
    .app-shell.nav-collapsed {
        grid-template-columns: 1fr;
    }

    .app-shell.nav-collapsed .app-brand > div,
    .app-shell.nav-collapsed .app-nav-label {
        display: block;
    }

    .app-shell.nav-collapsed .app-brand {
        justify-content: flex-start;
    }

    .app-shell.nav-collapsed .app-nav-toggle {
        margin-left: auto;
        position: static;
    }

    .app-shell.nav-collapsed .app-nav-item {
        border-left: 3px solid transparent;
        flex: 0 0 122px;
        grid-template-columns: 28px minmax(0, 1fr);
        justify-items: stretch;
        padding: 0.25rem 0.45rem;
    }
}

/* Customer demo presentation hotfix, 2026-05-22.
   Keep the service-backed/read-only contract, but make shared ERP screens compact,
   legible, and less distracting for in-person review. */
.app-shell {
    background: #edf2ef;
}

.app-content {
    padding: 0.55rem 0.65rem;
}

.app-assist-rail {
    display: none;
}

.module-surface {
    border-color: #c3d0c8;
    min-height: calc(100vh - 62px);
}

.module-titlebar {
    background: #ffffff;
    gap: 0.75rem;
    min-height: 48px;
    padding: 0.48rem 0.7rem;
}

.module-titlebar > div:first-child {
    min-width: 0;
}

.module-titlebar h1 {
    color: #14251b;
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.18;
}

.module-titlebar p {
    font-size: 0.78rem;
    line-height: 1.25;
    max-width: none;
}

.module-titlebar .app-eyebrow {
    color: #587066;
    font-size: 0.66rem;
    margin-bottom: 0.08rem;
}

.form-surface.misa-document-surface .module-titlebar {
    background: #f8faf9;
    min-height: 46px;
}

.form-surface.misa-document-surface .module-titlebar h1 {
    font-size: 1.08rem;
}

.form-commandbar {
    gap: 0.38rem;
    min-height: 36px;
    padding: 0.35rem 0.55rem;
}

.form-commandbar span {
    color: #4f6157;
    font-size: 0.76rem;
}

.daka-action,
.daka-toolbar-button,
.daka-icon-button {
    min-height: 26px;
}

.voucher-option-row {
    align-items: stretch;
    background: #f6f8f7;
    gap: 0.35rem;
    min-height: auto;
    padding: 0.35rem 0.55rem;
}

.voucher-option-row span {
    background: #ffffff;
    border: 1px solid #d1ddd6;
    border-radius: 4px;
    color: #54665d;
    display: inline-flex;
    font-size: 0.76rem;
    gap: 0.28rem;
    min-height: 24px;
    padding: 0.18rem 0.45rem;
}

.voucher-option-row span::before {
    content: none;
}

.voucher-option-row b {
    color: #14251b;
}

.voucher-context-strip {
    align-items: center;
    background: #ffffff;
    gap: 0.35rem;
    grid-template-columns: 132px repeat(auto-fit, minmax(150px, 220px));
    min-height: 40px;
    padding: 0.38rem 0.55rem;
}

.voucher-context-strip > strong {
    color: #0d6a36;
    font-size: 0.82rem;
    white-space: nowrap;
}

.voucher-context-strip div {
    gap: 0.04rem;
    min-height: 31px;
    padding: 0.22rem 0.42rem;
}

.voucher-context-strip span {
    font-size: 0.66rem;
}

.voucher-context-strip b {
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-document-surface .voucher-context-strip + .daka-tabs {
    display: none;
}

.daka-tabs {
    min-height: 31px;
}

.daka-tab {
    font-size: 0.8rem;
    min-height: 31px;
    padding: 0 0.62rem;
}

.voucher-header-grid {
    background: #fbfcfb;
    gap: 0.42rem 0.6rem;
    padding: 0.52rem 0.6rem;
}

.misa-document-surface .voucher-header-grid {
    grid-template-columns: 120px minmax(180px, 1fr) 108px minmax(150px, 0.82fr);
}

.voucher-header-grid input {
    background: #ffffff;
    height: 28px;
}

.voucher-body {
    grid-template-columns: minmax(0, 1fr) 252px;
}

.voucher-summary {
    background: #ffffff;
    gap: 0.42rem;
    padding: 0.7rem;
}

.voucher-summary strong {
    font-size: 0.92rem;
}

.voucher-summary div {
    min-height: 26px;
}

.voucher-summary span,
.voucher-summary p {
    font-size: 0.76rem;
}

.voucher-summary b {
    font-size: 0.86rem;
}

.daka-grid-shell {
    min-height: 260px;
}

.daka-grid {
    min-width: 960px;
}

.daka-grid th,
.daka-grid td {
    font-size: 0.76rem;
    padding: 0.34rem 0.46rem;
}

.daka-grid-empty-row td {
    height: 52px;
}

.daka-grid-pager {
    flex-basis: 32px;
    font-size: 0.78rem;
}

.voucher-bottom-strip {
    min-height: 30px;
}

.module-snapshot-strip,
.module-filter-strip {
    padding: 0.38rem 0.55rem;
}

.module-workspace.has-detail-panel {
    grid-template-columns: minmax(0, 1fr) 264px;
}

.module-side-panel,
.report-parameter-panel {
    padding: 0.65rem;
}

@media (min-width: 1280px) {
    .form-surface.misa-document-surface .module-titlebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (max-width: 980px) {
    .voucher-context-strip,
    .misa-document-surface .voucher-header-grid,
    .voucher-body,
    .module-workspace.has-detail-panel {
        grid-template-columns: 1fr;
    }

    .voucher-context-strip > strong {
        white-space: normal;
    }

    .voucher-summary {
        border-left: 0;
        border-top: 1px solid var(--df-border);
    }
}

/* MISA list grid phase, 2026-05-22. */
.daka-toolbar-right {
    margin-left: auto;
}

.misa-bulk-button {
    border-radius: 18px;
    min-width: 168px;
}

.daka-search-wrap {
    display: inline-flex;
    min-width: 230px;
    position: relative;
}

.daka-grid th {
    overflow: visible;
}

.daka-grid-head-cell {
    align-items: center;
    display: flex;
    gap: 0.35rem;
    justify-content: space-between;
    min-width: 0;
    position: relative;
}

.daka-grid-head-cell > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.daka-grid-filter-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #607069;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 20px;
    height: 20px;
    justify-content: center;
    padding: 0;
    width: 20px;
}

.daka-grid-filter-button:hover,
.daka-grid-filter-button.active {
    background: #e0eee5;
    color: #008c3a;
}

.daka-grid-filter-popover {
    background: #ffffff;
    border: 1px solid #bdc8c1;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    color: var(--df-ink);
    display: grid;
    gap: 0.45rem;
    left: 0.3rem;
    min-width: 320px;
    padding: 0.65rem;
    position: absolute;
    text-align: left;
    top: calc(100% - 1px);
    z-index: 18;
}

.daka-grid-filter-popover label {
    display: grid;
    gap: 0.3rem;
}

.daka-grid-filter-popover span {
    color: #263b30;
    font-size: 0.76rem;
    font-weight: 700;
}

.daka-grid-filter-popover input,
.daka-grid-filter-popover select {
    background: #ffffff;
    border: 1px solid #c3cec8;
    border-radius: 0;
    color: var(--df-ink);
    font: inherit;
    min-height: 28px;
    padding: 0.22rem 0.45rem;
}

.daka-grid-filter-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

.daka-grid-filter-actions button {
    background: #ffffff;
    border: 1px solid #b8c4bd;
    color: var(--df-ink);
    font-weight: 700;
    min-height: 28px;
    padding: 0.18rem 0.7rem;
}

.daka-grid-filter-actions button.primary {
    background: #23952f;
    border-color: #23952f;
    color: #ffffff;
}

@media (max-width: 980px) {
    .daka-toolbar-right {
        margin-left: 0;
    }

    .daka-search-wrap,
    .daka-search-wrap .daka-search {
        min-width: 100%;
        width: 100%;
    }

    .daka-grid-filter-popover {
        min-width: 260px;
    }
}

/* MISA dense ledger list + full-screen voucher phase, 2026-05-23. */
.module-surface.misa-ledger-list {
    border-radius: 0;
    box-shadow: none;
    min-height: calc(100vh - 62px);
}

.misa-ledger-list .module-titlebar {
    background: #ffffff;
    min-height: 42px;
    padding: 0.36rem 0.65rem;
}

.misa-ledger-list .module-titlebar h1 {
    font-size: 1.02rem;
}

.misa-ledger-list .module-titlebar .app-eyebrow {
    font-size: 0.65rem;
    margin-bottom: 0.04rem;
}

.misa-ledger-list .daka-tabs {
    min-height: 32px;
    padding: 0 0.45rem;
}

.misa-ledger-list .daka-tab {
    font-size: 0.8rem;
    min-height: 32px;
    padding: 0 0.62rem;
}

.misa-ledger-list .daka-toolbar {
    background: #ffffff;
    min-height: 36px;
    padding: 0.22rem 0.55rem;
}

.misa-ledger-list .daka-toolbar-period {
    font-size: 0.8rem;
}

.misa-ledger-list .daka-search {
    height: 26px;
    min-width: 270px;
}

.misa-ledger-list .module-workspace {
    flex: 1 1 auto;
    min-height: 0;
}

.misa-ledger-list .module-grid-region {
    display: flex;
    min-height: 0;
}

.misa-ledger-list .daka-grid-shell {
    border-top: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.misa-ledger-list .daka-grid th,
.misa-ledger-list .daka-grid td {
    font-size: 0.76rem;
    padding: 0.32rem 0.45rem;
}

.misa-ledger-list .daka-grid-pager {
    flex-basis: 32px;
    min-height: 32px;
}

.form-surface.misa-document-surface {
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 100vh;
    inset: 0;
    min-height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100vw;
    z-index: 1000;
}

.misa-document-surface .module-titlebar {
    background: #f4f5f7;
    border-bottom: 1px solid #cfd5d8;
    flex: 0 0 auto;
    min-height: 54px;
    order: 0;
    padding: 0.45rem 0.85rem;
}

.misa-document-surface .module-titlebar .app-eyebrow,
.misa-document-surface .module-titlebar p:not(.app-eyebrow) {
    display: none;
}

.misa-document-surface .module-titlebar h1 {
    color: #0f1720;
    font-size: 1.42rem;
    font-weight: 800;
    line-height: 1.15;
}

.misa-document-surface .voucher-option-row,
.misa-document-surface .voucher-context-strip,
.misa-document-surface .voucher-header-grid,
.misa-document-surface .daka-tabs,
.misa-document-surface .report-status-message {
    flex: 0 0 auto;
}

.misa-document-surface .voucher-option-row {
    display: none;
}

.misa-document-surface .voucher-context-strip {
    border-bottom: 0;
    grid-template-columns: 132px repeat(3, minmax(160px, 1fr));
}

.misa-document-surface .voucher-header-grid {
    background: #f5f6f9;
    border-bottom: 0;
    grid-template-columns: 116px minmax(240px, 1fr) 116px minmax(148px, 0.36fr);
    padding: 0.48rem 0.8rem 0.7rem;
}

.misa-document-surface .voucher-header-grid label span {
    color: #111827;
    font-size: 0.74rem;
}

.misa-document-surface .voucher-header-grid input {
    background: #ffffff;
    border-color: #aeb9c2;
    border-radius: 0;
    color: #111827;
    height: 26px;
}

.misa-document-surface .voucher-body {
    background: #ffffff;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.misa-document-surface .voucher-grid-panel {
    min-height: 0;
    overflow: hidden;
}

.misa-document-surface .voucher-grid-panel .daka-grid-shell {
    border-top: 0;
    min-height: 0;
}

.misa-document-surface .voucher-summary {
    display: none;
}

.misa-document-surface .voucher-bottom-strip {
    background: #ffffff;
    border-top: 1px solid #d5d9dd;
    color: #1f2933;
    flex: 0 0 auto;
    min-height: 26px;
    order: 98;
    padding: 0.15rem 0.85rem;
}

.misa-document-surface .voucher-bottom-strip b {
    color: #0f7d34;
}

.misa-document-surface .form-commandbar {
    background: #303238;
    border-bottom: 0;
    border-top: 1px solid #25272b;
    color: #ffffff;
    flex: 0 0 46px;
    gap: 0.45rem;
    justify-content: flex-end;
    min-height: 46px;
    order: 99;
    padding: 0.45rem 0.8rem;
}

.misa-document-surface .form-commandbar > span {
    color: #ffffff;
    flex: 1 1 auto;
    margin-right: auto;
    opacity: 0.88;
}

.misa-document-surface .form-commandbar .daka-action {
    background: #3b3d42;
    border-color: #6c7078;
    color: #ffffff;
    min-width: 64px;
}

.misa-document-surface .form-commandbar .daka-action.primary {
    background: #2ca43a;
    border-color: #2ca43a;
    color: #ffffff;
}

.misa-document-surface .form-commandbar .daka-action:disabled {
    opacity: 0.54;
}

@media (max-width: 980px) {
    .misa-document-surface .voucher-context-strip,
    .misa-document-surface .voucher-header-grid {
        grid-template-columns: 1fr;
    }

    .misa-document-surface .form-commandbar {
        align-items: stretch;
        flex-wrap: wrap;
        height: auto;
    }

    .misa-document-surface .form-commandbar > span {
        flex-basis: 100%;
    }
}

/* MISA lookup textbox phase, 2026-05-22. */
.misa-lookup {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
    width: 100%;
}

.misa-lookup .misa-lookup-value {
    border-right: 1px solid #aeb9c2;
    min-width: 0;
    width: 100%;
}

.misa-lookup.open .misa-lookup-value {
    border-color: #29a137;
}

.misa-lookup-panel {
    background: #ffffff;
    border: 1px solid #aeb9c2;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
    max-width: calc(100vw - 16px);
    padding: 0;
    position: fixed;
    z-index: 2600;
}

.misa-lookup-filter {
    border: 0;
    border-bottom: 1px solid #d2d8dd;
    box-sizing: border-box;
    height: 30px;
    padding: 0.28rem 0.5rem;
    width: 100%;
}

.misa-lookup-table-wrap {
    overflow: auto;
}

.misa-lookup-actions {
    align-items: center;
    border-top: 1px solid #d2d8dd;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 6px 8px;
}

.misa-lookup-actions button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #aeb9c2;
    border-radius: 3px;
    color: #1f2937;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    gap: 5px;
    min-height: 28px;
    padding: 0 10px;
}

.misa-lookup-actions button:hover:not(:disabled),
.misa-lookup-actions button:focus-visible {
    background: #eaf7ed;
    border-color: #29a137;
    color: #16752b;
}

.misa-lookup-actions button:disabled {
    cursor: default;
    opacity: 0.55;
}

.misa-lookup-table {
    border-collapse: collapse;
    font-size: 0.76rem;
    min-width: 680px;
    width: 100%;
}

.misa-lookup-table th,
.misa-lookup-table td {
    border-bottom: 1px solid #e0e4e8;
    padding: 0.34rem 0.52rem;
    text-align: left;
    white-space: nowrap;
}

.misa-lookup-table th {
    background: #eef1f4;
    color: #1f2a33;
    font-weight: 800;
    position: static;
    top: auto;
}

.misa-lookup-table tbody tr {
    cursor: pointer;
}

.misa-lookup-table tbody tr:hover {
    background: #eaf5fd;
}

.misa-document-surface .voucher-header-grid .misa-lookup input {
    border-radius: 0;
    height: 26px;
}

@media (max-width: 980px) {
    .misa-lookup-panel {
        max-width: calc(100vw - 16px);
    }
}

/* MISA UI architecture v2. Dense list/grid/full-screen form foundation. */

.misa-list-page {
    background: #ffffff;
    color: #111827;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    height: calc(100vh - 4px);
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.misa-list-heading {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.misa-list-tabs {
    align-items: stretch;
    background: #f6f8fa;
    border-top: 3px solid #138342;
    border-bottom: 1px solid #d5dce2;
    display: flex;
    flex: 0 0 36px;
    gap: 0;
    padding-left: 12px;
}

.misa-list-tabs button {
    background: transparent;
    border: 0;
    border-right: 1px solid #dde3e8;
    color: #111827;
    cursor: pointer;
    font-size: 12px;
    min-width: 72px;
    padding: 0 12px;
}

.misa-list-tabs button.active {
    background: #eaf5ed;
    border-bottom: 2px solid #0f8f3a;
    color: #064f24;
    font-weight: 700;
}

.misa-list-tabs button:disabled {
    color: #7b8790;
    cursor: not-allowed;
}

.misa-list-toolbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #d8dee4;
    display: flex;
    flex: 0 0 44px;
    gap: 10px;
    justify-content: space-between;
    padding: 7px 12px;
}

.misa-toolbar-left,
.misa-toolbar-right {
    align-items: center;
    display: flex;
    gap: 6px;
    min-width: 0;
}

.misa-toolbar-left {
    flex: 1 1 auto;
}

.misa-toolbar-right {
    flex: 0 1 auto;
    justify-content: flex-end;
}

.misa-quick-icons {
    align-items: center;
    display: inline-flex;
    gap: 4px;
}

.misa-toolbar-icon-strip,
.misa-header-actions {
    align-items: center;
    display: inline-flex;
    gap: 4px;
    min-width: 0;
}

.misa-header-actions {
    margin-left: 4px;
}

.misa-split-action {
    display: inline-flex;
    position: relative;
}

.misa-list-toolbar button.misa-split-main {
    border-bottom-right-radius: 0;
    border-right: 0;
    border-top-right-radius: 0;
}

.misa-list-toolbar button.misa-split-toggle {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    min-width: 24px;
    padding: 0 6px;
}

.misa-list-toolbar button.misa-split-toggle.icon-only {
    display: none;
}

.misa-split-menu {
    background: #ffffff;
    border: 1px solid #aab4bd;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.18);
    display: grid;
    min-width: 168px;
    padding: 4px;
    position: absolute;
    right: 0;
    top: calc(100% + 3px);
    z-index: 30;
}

.misa-list-toolbar .misa-split-menu button {
    background: #ffffff;
    border: 0;
    border-radius: 2px;
    color: #111827;
    justify-content: flex-start;
    white-space: nowrap;
    width: 100%;
}

.misa-list-toolbar .misa-split-menu button:hover {
    background: #eaf5ed;
}

.misa-list-toolbar button,
.misa-grid-pager button,
.misa-command-bar button,
.misa-action-col button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #aab4bd;
    border-radius: 3px;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    gap: 4px;
    height: 28px;
    justify-content: center;
    padding: 0 10px;
}

.misa-list-toolbar button.icon-only {
    min-width: 30px;
    padding: 0;
    width: 30px;
}

.misa-list-toolbar button.dropdown-action {
    border-radius: 14px;
    padding: 0 11px;
}

.misa-caret {
    font-size: 11px;
    line-height: 1;
}

.misa-list-toolbar button.primary,
.misa-command-bar button.primary {
    background: #20a53a;
    border-color: #20a53a;
    color: #ffffff;
}

.misa-list-toolbar button:disabled,
.misa-grid-pager button:disabled,
.misa-command-bar button:disabled,
.misa-action-col button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.misa-selection-toolbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #d8dee4;
    display: none;
    flex: 0 0 40px;
    gap: 8px;
    min-height: 40px;
    padding: 6px 12px;
}

/* Paint selection actions from the browser-native checkbox state immediately.
   The is-active class remains the server-authoritative state after the circuit responds. */
.misa-selection-toolbar.is-active,
.misa-list-page:has(.misa-data-grid .misa-check input[type="checkbox"]:checked) > .misa-selection-toolbar {
    display: flex;
}

/* A checked row paints the compatible command immediately; the server-owned
   data-selection-workflow then confirms the same accounting gate after the callback. */
.misa-selection-toolbar.is-document-workflow button[data-selection-action="bulk-post"],
.misa-selection-toolbar.is-document-workflow button[data-selection-action="bulk-unpost"],
.misa-selection-toolbar.is-document-workflow button[data-selection-action="bulk-delete"] {
    display: none;
}

.misa-list-page:has(.misa-data-grid .misa-check input[type="checkbox"]:checked) > .misa-selection-toolbar {
    visibility: visible;
}

.misa-selection-toolbar[data-selection-workflow="post"] button[data-selection-action="bulk-post"],
.misa-selection-toolbar[data-selection-workflow="post"] button[data-selection-action="bulk-delete"],
.misa-list-page:has([data-grid-surface-role="list-main"] tr[data-selection-workflow="post"] input[type="checkbox"]:checked):not(:has([data-grid-surface-role="list-main"] tr[data-selection-workflow]:not([data-selection-workflow="post"]) input[type="checkbox"]:checked))
    > .misa-selection-toolbar.is-document-workflow button[data-selection-action="bulk-post"],
.misa-list-page:has([data-grid-surface-role="list-main"] tr[data-selection-workflow="post"] input[type="checkbox"]:checked):not(:has([data-grid-surface-role="list-main"] tr[data-selection-workflow]:not([data-selection-workflow="post"]) input[type="checkbox"]:checked))
    > .misa-selection-toolbar.is-document-workflow button[data-selection-action="bulk-delete"] {
    display: inline-flex;
}

.misa-selection-toolbar[data-selection-workflow="unpost"] button[data-selection-action="bulk-unpost"],
.misa-list-page:has([data-grid-surface-role="list-main"] tr[data-selection-workflow="unpost"] input[type="checkbox"]:checked):not(:has([data-grid-surface-role="list-main"] tr[data-selection-workflow]:not([data-selection-workflow="unpost"]) input[type="checkbox"]:checked))
    > .misa-selection-toolbar.is-document-workflow button[data-selection-action="bulk-unpost"] {
    display: inline-flex;
}

.misa-selection-count {
    color: #1f2937;
    font-size: 13px;
    white-space: nowrap;
}

.misa-selection-count strong {
    color: #111827;
}

.misa-selection-divider {
    background: #cfd6dd;
    height: 22px;
    width: 1px;
}

.misa-selection-toolbar button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #aab4bd;
    border-radius: 4px;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 5px;
    height: 28px;
    justify-content: center;
    padding: 0 12px;
}

.misa-selection-toolbar button.primary {
    background: #ffffff;
    border-color: #aab4bd;
    color: #111827;
}

.misa-selection-toolbar button.danger {
    color: #dc2626;
}

.misa-selection-toolbar button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.misa-selection-clear {
    border-color: transparent !important;
    color: #008a45 !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

.misa-table-settings-backdrop {
    background: rgba(15, 23, 42, 0.45);
    inset: 0;
    position: fixed;
    z-index: 80;
}

.misa-table-settings-panel {
    background: #ffffff;
    box-shadow: -10px 0 26px rgba(15, 23, 42, 0.2);
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    height: 100vh;
    max-width: min(780px, 100vw);
    min-width: min(720px, 100vw);
    padding: 18px 16px 14px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 81;
}

.misa-table-settings-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.misa-table-settings-header strong {
    color: #111827;
    font-size: 18px;
}

.misa-table-settings-header button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    font-size: 26px;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.misa-table-settings-search {
    align-items: center;
    border: 1px solid #00a36c;
    border-radius: 5px;
    display: inline-flex;
    height: 30px;
    margin-bottom: 10px;
    max-width: 260px;
    padding: 0 8px;
}

.misa-table-settings-search input {
    border: 0;
    font-size: 12px;
    min-width: 0;
    outline: 0;
    width: 100%;
}

.misa-table-settings-search span {
    color: #6b7280;
}

.misa-table-settings-grid {
    border: 1px solid #cfd6dd;
    min-height: 0;
    overflow: auto;
}

.misa-table-settings-row {
    display: grid;
    grid-template-columns: 44px 44px minmax(160px, 1.15fr) minmax(180px, 1fr) 96px;
    min-width: 680px;
}

.misa-table-settings-row.header {
    background: #e8eef1;
    color: #111827;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.misa-table-settings-row > * {
    align-items: center;
    border-bottom: 1px solid #cfd6dd;
    border-right: 1px dotted #bfc7cf;
    display: flex;
    min-height: 32px;
    min-width: 0;
    overflow: hidden;
    padding: 4px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-table-settings-row.dragging > * {
    background: #e8f7ef;
}

.misa-table-settings-panel.is-reordering {
    cursor: grabbing;
    user-select: none;
}

.misa-table-settings-panel.is-reordering .misa-table-settings-row:not(.header) > * {
    transition: background-color 0.12s ease;
}

.misa-table-settings-row input[type="text"],
.misa-table-settings-row input:not([type]) {
    border: 1px solid transparent;
    height: 24px;
    width: 100%;
}

.misa-table-settings-row input[type="number"] {
    border: 1px solid transparent;
    height: 24px;
    text-align: right;
    width: 100%;
}

.misa-table-settings-row input:focus {
    border-color: #00a36c;
    outline: 0;
}

.misa-table-settings-drag {
    justify-content: center;
}

.misa-drag-handle {
    align-items: center;
    background: transparent;
    border: 0;
    cursor: grab;
    display: inline-flex;
    height: 24px;
    justify-content: center;
    padding: 0;
    width: 24px;
}

.misa-drag-handle:active {
    cursor: grabbing;
}

.misa-drag-handle .daka-icon {
    color: #667085;
    height: 16px;
    width: 16px;
}

.misa-table-settings-visible {
    justify-content: center;
}

.misa-table-settings-actions {
    align-items: center;
    border-top: 1px solid #cfd6dd;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr auto auto;
    padding-top: 14px;
}

.misa-table-settings-actions button {
    background: #ffffff;
    border: 1px solid #c9d1d9;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    height: 30px;
    padding: 0 16px;
}

.misa-table-settings-actions button.primary {
    background: #00a36c;
    border-color: #00a36c;
    color: #ffffff;
}

.misa-global-search {
    align-items: center;
    border: 1px solid #28a745;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 24px;
    height: 28px;
    min-width: 280px;
}

.misa-global-search input {
    border: 0;
    font-size: 12px;
    height: 26px;
    min-width: 0;
    padding: 0 8px;
}

.misa-global-search span {
    color: #6b7280;
    text-align: center;
}

.misa-filter-row {
    background: #f7faf9;
    border-bottom: 1px solid #d8dee4;
    display: grid;
    flex: 0 0 auto;
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    padding: 7px 12px;
}

.misa-filter-row label,
.misa-form-fields label,
.misa-form-side label {
    display: grid;
    gap: 2px;
}

.misa-filter-row span,
.misa-form-fields span,
.misa-form-side span {
    color: #111827;
    font-size: 11px;
    font-weight: 700;
}

.misa-list-workspace {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.misa-list-master-grid {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.misa-list-workspace.has-detail-panel .misa-list-master-grid {
    flex: 1 1 auto;
}

.misa-list-workspace.detail-collapsed .misa-list-master-grid {
    flex-basis: auto;
}

.misa-list-detail-splitter {
    align-items: center;
    background: #dfe4e8;
    border-bottom: 1px solid #cbd2d9;
    border-top: 1px solid #cbd2d9;
    cursor: row-resize;
    display: flex;
    flex: 0 0 18px;
    justify-content: center;
    outline: 0;
    touch-action: none;
    user-select: none;
}

.misa-list-detail-splitter:hover,
.misa-list-detail-splitter:focus-visible,
.misa-list-workspace.is-detail-resizing .misa-list-detail-splitter {
    background: #cbd8df;
    box-shadow: inset 0 1px #aebdc6, inset 0 -1px #aebdc6;
}

.misa-list-workspace.is-detail-resizing,
.misa-list-workspace.is-detail-resizing * {
    cursor: row-resize !important;
    user-select: none !important;
}

.misa-list-detail-splitter button {
    align-items: center;
    background: #eef2f5;
    border: 1px solid #d2dae0;
    border-radius: 12px;
    color: #374151;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    height: 18px;
    justify-content: center;
    line-height: 1;
    min-width: 54px;
    padding: 0;
}

.misa-list-detail-panel {
    background: #ffffff;
    border-top: 1px solid #d8dee4;
    display: flex;
    flex: 0 0 var(--misa-detail-panel-height, 300px);
    flex-direction: column;
    max-height: calc(100% - 140px);
    min-height: 140px;
    overflow: hidden;
}

.misa-list-detail-title {
    align-items: center;
    border-bottom: 1px solid #d8dee4;
    display: flex;
    flex: 0 0 36px;
    gap: 10px;
    padding: 0 12px;
}

.misa-list-detail-title strong {
    font-size: 13px;
}

.misa-list-detail-title span {
    color: #6b7280;
}

.misa-list-detail-panel .misa-data-grid {
    min-width: 980px;
}

.misa-dialog-backdrop {
    align-items: center;
    background: rgba(15, 23, 42, 0.28);
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 100;
}

.misa-tgxq-dialog {
    background: #ffffff;
    border: 1px solid #cbd2d9;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
    display: flex;
    flex-direction: column;
    max-height: min(620px, calc(100vh - 40px));
    width: min(560px, calc(100vw - 32px));
}

.misa-tgxq-dialog header,
.misa-tgxq-dialog footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
}

.misa-tgxq-dialog header {
    border-bottom: 1px solid #d8dee4;
}

.misa-tgxq-dialog header strong {
    font-size: 16px;
}

.misa-tgxq-dialog header button,
.misa-tgxq-dialog footer button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #aab4bd;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 600;
    height: 30px;
    justify-content: center;
    min-width: 72px;
    padding: 0 12px;
}

.misa-tgxq-dialog header button {
    border: 0;
    font-size: 20px;
    min-width: 30px;
}

.misa-tgxq-dialog footer {
    border-top: 1px solid #d8dee4;
    gap: 8px;
    justify-content: flex-end;
}

.misa-tgxq-dialog footer button.primary {
    background: #20a53a;
    border-color: #20a53a;
    color: #ffffff;
}

.misa-tgxq-body {
    display: grid;
    gap: 14px;
    overflow: auto;
    padding: 14px;
}

.misa-tgxq-body p {
    margin: 0;
}

.misa-tgxq-fields {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 120px;
}

.misa-tgxq-fields label,
.misa-tgxq-currencies label {
    display: grid;
    gap: 4px;
}

.misa-tgxq-fields input,
.misa-tgxq-fields select {
    border: 1px solid #aab4bd;
    height: 30px;
    padding: 0 8px;
}

.misa-tgxq-currencies {
    border: 1px solid #d8dee4;
    display: grid;
    gap: 8px;
    padding: 10px;
}

.misa-tgxq-currencies label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.misa-tgxq-note {
    background: #f7faf9;
    border-left: 3px solid #20a53a;
    color: #374151;
    padding: 10px 12px;
}

.misa-filter-row input,
.misa-form-fields input,
.misa-form-side input,
.misa-form-titlebar select,
.misa-form-currency select {
    background: #ffffff;
    border: 1px solid #aeb8c2;
    border-radius: 0;
    color: #111827;
    font-size: 12px;
    height: 24px;
    min-width: 0;
    padding: 0 7px;
}

.misa-filter-row input[type="date"],
.misa-form-fields input[type="date"],
.misa-form-side input[type="date"],
.misa-record-body input[type="date"] {
    cursor: pointer;
}

.misa-filter-row button {
    align-self: end;
    background: #ffffff;
    border: 1px solid #aeb8c2;
    color: #111827;
    cursor: pointer;
    font-size: 12px;
    height: 24px;
    padding: 0 10px;
}

.misa-filter-popover {
    background: #ffffff;
    border: 1px solid #9ea9b4;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.16);
    display: grid;
    gap: 10px;
    left: 62px;
    max-height: min(520px, calc(100vh - 128px));
    overflow: auto;
    padding: 10px;
    position: absolute;
    top: 84px;
    width: min(720px, calc(100% - 88px));
    z-index: 30;
}

.misa-filter-drawer-backdrop {
    background: rgba(15, 23, 42, 0.42);
    inset: 0;
    position: fixed;
    z-index: 45;
}

.misa-filter-drawer {
    background: #ffffff;
    box-shadow: -10px 0 26px rgba(15, 23, 42, 0.22);
    color: #111827;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    max-width: calc(100vw - 24px);
    min-width: 360px;
    padding: 18px 14px 0;
    position: fixed;
    right: 0;
    top: 0;
    width: min(430px, 32vw);
    z-index: 46;
}

.misa-filter-drawer-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
}

.misa-filter-drawer-header strong {
    font-size: 20px;
    line-height: 1.2;
}

.misa-filter-drawer-body {
    display: grid;
    gap: 12px;
    min-height: 0;
    overflow: auto;
    padding-bottom: 16px;
}

.misa-filter-primary-fields {
    display: grid;
    gap: 10px;
}

.misa-filter-control {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.misa-filter-control span,
.misa-filter-checkline span,
.misa-filter-section-title {
    color: #111827;
    font-size: 12px;
    font-weight: 700;
}

.misa-filter-control em {
    color: #ef4444;
    font-style: normal;
}

.misa-filter-control input,
.misa-filter-control select {
    background: #ffffff;
    border: 1px solid #aeb8c2;
    border-radius: 4px;
    color: #111827;
    font-size: 12px;
    height: 28px;
    min-width: 0;
    padding: 0 8px;
    width: 100%;
}

.misa-filter-control input:focus,
.misa-filter-control select:focus {
    border-color: #00a36c;
    outline: 0;
}

.misa-filter-date-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.misa-filter-checkline {
    align-items: flex-start;
    display: grid;
    gap: 7px;
    grid-template-columns: 14px minmax(0, 1fr);
}

.misa-filter-checkline input {
    height: 14px;
    margin-top: 1px;
    width: 14px;
}

.misa-filter-checkline span {
    font-weight: 400;
    line-height: 1.35;
}

.misa-filter-section-title {
    border-top: 1px solid #d8dee4;
    padding-top: 10px;
}

.misa-filter-drawer .misa-filter-column-picker {
    border-bottom: 0;
    grid-template-columns: 1fr;
    max-height: 180px;
    padding-bottom: 0;
}

.misa-filter-drawer .misa-filter-fields {
    grid-template-columns: 1fr;
}

.misa-filter-drawer .misa-filter-field {
    border-color: #cfd6dd;
    border-radius: 4px;
}

.misa-filter-drawer.compact {
    width: min(420px, 32vw);
}

.misa-filter-drawer.compact .misa-filter-section-title,
.misa-filter-drawer.compact .misa-filter-column-picker,
.misa-filter-drawer.compact .misa-filter-fields {
    display: none;
}

.misa-filter-drawer-actions {
    align-items: center;
    border-top: 1px solid #d8dee4;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin: 0 -14px;
    padding: 12px 14px;
}

.misa-filter-drawer-actions button {
    background: #ffffff;
    border: 1px solid #c9d1d9;
    border-radius: 4px;
    color: #111827;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    height: 30px;
    padding: 0 14px;
}

.misa-filter-drawer-actions button.primary {
    background: #00a36c;
    border-color: #00a36c;
    color: #ffffff;
}

.misa-filter-header,
.misa-filter-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.misa-filter-header strong {
    font-size: 13px;
}

.misa-filter-close {
    background: transparent;
    border: 0;
    color: #111827;
    cursor: pointer;
    font-size: 18px;
    height: 24px;
    line-height: 1;
    padding: 0;
    width: 24px;
}

.misa-filter-column-picker {
    border-bottom: 1px solid #d8dee4;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    max-height: 132px;
    overflow: auto;
    padding-bottom: 8px;
}

.misa-filter-column-option {
    align-items: center;
    display: flex;
    gap: 6px;
    min-width: 0;
}

.misa-filter-column-option input {
    flex: 0 0 auto;
    height: 14px;
    width: 14px;
}

.misa-filter-column-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-filter-fields {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.misa-filter-field {
    border: 1px solid #d8dee4;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 7px;
}

.misa-filter-field-title {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.misa-filter-field-title button {
    background: transparent;
    border: 0;
    color: #007c41;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    padding: 0;
}

.misa-filter-fields label,
.misa-filter-field {
    display: grid;
    gap: 3px;
}

.misa-filter-fields span,
.misa-filter-field-title span {
    color: #111827;
    font-size: 11px;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-filter-fields input {
    background: #ffffff;
    border: 1px solid #aeb8c2;
    color: #111827;
    font-size: 12px;
    height: 26px;
    min-width: 0;
    padding: 0 7px;
}

.misa-filter-checklist {
    border-top: 1px solid #edf1f4;
    display: grid;
    gap: 2px;
    max-height: 164px;
    min-height: 34px;
    overflow: auto;
    padding-top: 5px;
}

.misa-filter-value-option {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    min-height: 22px;
}

.misa-filter-value-option input {
    height: 14px;
    padding: 0;
    width: 14px;
}

.misa-filter-value-option span {
    color: #111827;
    font-size: 12px;
    font-weight: 400;
}

.misa-filter-value-option small {
    color: #64748b;
    font-size: 11px;
}

.misa-filter-empty,
.misa-filter-more {
    color: #64748b;
    font-size: 11px;
    padding: 4px 0;
}

.misa-filter-actions {
    justify-content: flex-end;
}

.misa-filter-actions button {
    background: #ffffff;
    border: 1px solid #aeb8c2;
    color: #111827;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    height: 26px;
    padding: 0 12px;
}

.misa-filter-actions button:first-child {
    background: #20a53a;
    border-color: #20a53a;
    color: #ffffff;
}

.misa-list-status,
.misa-form-status {
    background: #ecfdf3;
    border-bottom: 1px solid #b7e0c1;
    color: #065f2b;
    flex: 0 0 auto;
    padding: 6px 12px;
}

.misa-list-status.error,
.misa-form-status.error {
    background: #fff1f1;
    border-color: #f1b8b8;
    color: #9f1239;
}

.misa-data-grid-shell {
    background: #ffffff;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.misa-data-grid-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.misa-data-grid {
    border-collapse: collapse;
    font-size: 12px;
    min-width: 1120px;
    table-layout: fixed;
    width: 100%;
}

.misa-data-grid col.misa-row-no-col {
    width: 34px;
}

.misa-data-grid col.misa-check-col {
    width: 34px;
}

.misa-data-grid col.misa-action-col-width {
    width: 136px;
}

.misa-data-grid col.misa-row-delete-col-width {
    width: 28px;
}

.misa-data-grid th,
.misa-data-grid td {
    border-bottom: 1px solid #cfd6dd;
    border-right: 1px dotted #bfc7cf;
    height: 27px;
    line-height: 18px;
    overflow: hidden;
    padding: 3px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-data-grid th {
    background: #e8eef1;
    color: #111827;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 4;
}

.misa-data-grid tbody tr:hover {
    background: #eaf6ff;
}

.misa-data-grid tr.selected {
    background: #dceffc;
}

.misa-data-grid tr.misa-tree-parent td {
    font-weight: 700;
}

.misa-tree-cell {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    max-width: 100%;
    padding-left: calc(var(--tree-depth, 0) * 18px);
}

.misa-tree-toggle {
    border: 1px solid transparent;
    color: #6b7280;
    display: inline-flex;
    flex: 0 0 12px;
    font-size: 11px;
    height: 12px;
    justify-content: center;
    line-height: 10px;
    width: 12px;
}

.misa-tree-toggle.has-children {
    background: #ffffff;
    border-color: #b8c2cc;
    color: #374151;
}

.misa-tree-code {
    color: #005fb8;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.misa-grid-cell-input {
    background: #ffffff;
    border: 1px solid #aeb8c2;
    border-radius: 0;
    box-sizing: border-box;
    color: #111827;
    font-size: 12px;
    height: 23px;
    min-width: 0;
    padding: 0 6px;
    width: 100%;
}

.misa-grid-cell-input.numeric {
    text-align: right;
}

.misa-grid-head-cell {
    align-items: center;
    display: flex;
    gap: 5px;
    justify-content: space-between;
    min-width: 0;
}

.misa-grid-head-cell span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.misa-grid-filter-button {
    background: transparent;
    border: 0;
    color: #4b5563;
    cursor: pointer;
    height: 20px;
    padding: 0;
    width: 18px;
}

.misa-grid-filter-button.active {
    color: #0f8f3a;
    font-weight: 800;
}

.misa-column-filter {
    background: #ffffff;
    border: 1px solid #9ea9b3;
    box-sizing: border-box;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
    display: grid;
    gap: 7px;
    left: 6px;
    min-width: 268px;
    padding: 8px;
    position: absolute;
    top: calc(100% - 1px);
    width: max(268px, calc(100% + 96px));
    z-index: 30;
}

.misa-column-filter label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.misa-column-filter label span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-column-filter select,
.misa-column-filter input {
    border: 1px solid #aeb8c2;
    box-sizing: border-box;
    display: block;
    font-size: 12px;
    height: 26px;
    min-width: 0;
    padding: 0 6px;
    width: 100%;
}

.misa-column-filter-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.misa-column-filter-actions button {
    background: #ffffff;
    border: 1px solid #aeb8c2;
    height: 26px;
}

.misa-column-filter-actions button.primary {
    background: #20a53a;
    border-color: #20a53a;
    color: #ffffff;
}

.misa-column-filter:has(.misa-column-filter-values) {
    max-height: min(480px, calc(100vh - 140px));
    min-width: 340px;
    width: max(340px, calc(100% + 132px));
}

.misa-column-filter-values {
    display: grid;
    gap: 6px;
    min-height: 0;
}

.misa-column-filter-value-toolbar {
    align-items: center;
    color: var(--df-text-secondary, #475467);
    display: flex;
    font-size: 12px;
    gap: 8px;
    justify-content: space-between;
}

.misa-column-filter-value-toolbar > div {
    display: flex;
    gap: 4px;
}

.misa-column-filter-value-toolbar button {
    background: transparent;
    border: 0;
    color: var(--df-brand-primary, #0b7a4b);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    min-height: 24px;
    padding: 0 4px;
}

.misa-column-filter-value-list {
    border: 1px solid var(--df-border-default, #d0d5dd);
    display: grid;
    max-height: 220px;
    min-height: 72px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.misa-column-filter label.misa-column-filter-value {
    align-items: center;
    border-bottom: 1px solid var(--df-border-subtle, #e4e7ec);
    cursor: pointer;
    display: grid;
    gap: 8px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    min-height: 30px;
    padding: 4px 7px;
}

.misa-column-filter label.misa-column-filter-value:last-child {
    border-bottom: 0;
}

.misa-column-filter label.misa-column-filter-value:hover {
    background: var(--df-surface-hover, #f3f8f5);
}

.misa-column-filter label.misa-column-filter-value input[type="checkbox"] {
    accent-color: var(--df-brand-primary, #0b7a4b);
    height: 16px;
    margin: 0;
    min-height: 16px;
    padding: 0;
    width: 16px;
}

.misa-column-filter label.misa-column-filter-value span {
    font-weight: 500;
}

.misa-column-filter label.misa-column-filter-value small {
    color: var(--df-text-muted, #667085);
    font-variant-numeric: tabular-nums;
}

.misa-column-filter-value-empty {
    color: var(--df-text-muted, #667085);
    font-style: italic;
    padding: 12px;
    text-align: center;
}

.misa-row-no,
.misa-check {
    text-align: center;
    width: 34px;
}

.misa-action-col {
    background: #ffffff;
    box-sizing: border-box;
    max-width: 136px;
    min-width: 136px;
    overflow: visible;
    padding-left: 4px;
    padding-right: 4px;
    position: sticky;
    right: 0;
    text-align: center;
    width: 136px;
    z-index: 5;
}

.misa-data-grid th.misa-action-col {
    background: #e8eef1;
    z-index: 12;
}

.misa-row-delete-col {
    background: #ffffff;
    box-sizing: border-box;
    max-width: 28px;
    min-width: 28px;
    padding: 0;
    position: sticky;
    right: 0;
    text-align: center;
    width: 28px;
    z-index: 6;
}

.misa-data-grid th.misa-row-delete-col {
    background: #e8eef1;
    z-index: 13;
}

.misa-grid-footer .misa-row-delete-col {
    background: #f1f4f6;
    z-index: 11;
}

button.misa-row-delete-button {
    -webkit-appearance: none;
    appearance: none;
    align-items: center;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    border-style: none !important;
    border-width: 0 !important;
    border-radius: 50%;
    box-shadow: none !important;
    color: #596673;
    cursor: pointer;
    display: inline-flex;
    font-size: 0;
    height: 16px;
    justify-content: center;
    min-width: 0;
    opacity: 0.52;
    line-height: 0;
    outline: 0;
    overflow: visible;
    padding: 0;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    visibility: visible;
    width: 16px;
}

button.misa-row-delete-button:hover:not(:disabled) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #a52a2a;
    opacity: 0.82;
}

button.misa-row-delete-button:focus-visible {
    background: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 1px solid rgba(0, 137, 90, 0.3);
    outline-offset: 1px;
}

button.misa-row-delete-button:disabled {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.28 !important;
}

.misa-grid-footer .misa-action-col {
    background: #f1f4f6;
    z-index: 10;
}

.misa-data-grid td.misa-action-col.is-action-menu-open {
    z-index: 30;
}

.misa-row-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    isolation: isolate;
    justify-content: center;
    min-height: 24px;
    min-width: 0;
    position: relative;
    width: 100%;
}

.misa-row-actions.open {
    align-items: center;
    flex-wrap: nowrap;
    row-gap: 0;
    z-index: 31;
}

.misa-action-col a,
.misa-grid-link {
    color: #006fbb;
    font-weight: 600;
    text-decoration: none;
}

.misa-row-actions a,
.misa-row-actions button {
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
}

.misa-row-actions a {
    align-items: center;
    border: 1px solid transparent;
    display: inline-flex;
    height: 24px;
    padding: 0 5px;
}

.misa-row-actions button {
    height: 24px;
    padding: 0 5px;
}

.misa-row-actions .misa-row-primary-action,
.misa-row-actions .misa-row-action-toggle {
    background: transparent;
    border: 0;
    color: #006fbb;
    font-weight: 700;
}

.misa-row-actions .misa-row-primary-action {
    min-width: 44px;
    overflow: hidden;
    padding: 0 4px;
    text-overflow: ellipsis;
}

.misa-row-actions .misa-row-action-toggle {
    flex: 0 0 22px;
    width: 22px;
}

.misa-row-actions .misa-row-action-dropdown {
    background: #ffffff;
    border: 1px solid #c3ccd4;
    box-sizing: border-box;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    max-width: 180px;
    min-width: 132px;
    padding: 4px 0;
    position: absolute;
    right: 8px;
    text-align: left;
    top: 24px;
    transform: translateZ(0);
    z-index: 40;
}

.misa-row-actions.drop-up .misa-row-action-dropdown {
    bottom: 24px;
    top: auto;
}

.misa-row-actions:not(.open) .misa-row-action-dropdown {
    display: none;
}

.misa-row-actions.open .misa-row-action-dropdown {
    position: absolute;
}

.misa-row-action-dropdown a,
.misa-row-action-dropdown button {
    align-items: center;
    background: #ffffff;
    border: 0;
    color: #1f2933;
    display: flex;
    font-weight: 500;
    min-width: 0;
    height: 28px;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0 10px;
    text-decoration: none;
    text-overflow: ellipsis;
    width: 100%;
}

.misa-row-action-dropdown a:hover,
.misa-row-action-dropdown button:hover:not(:disabled) {
    background: #eaf6ff;
}

.misa-grid-footer td {
    background: #f1f4f6;
    font-weight: 800;
    position: sticky;
    bottom: 0;
    z-index: 3;
}

.misa-grid-empty-row td {
    color: #6b7280;
    font-style: italic;
    text-align: center;
}

.misa-grid-pager {
    align-items: center;
    background: #ffffff;
    border-top: 1px solid #d8dee4;
    display: flex;
    flex: 0 0 38px;
    justify-content: space-between;
    padding: 5px 12px;
}

.misa-grid-pager-controls {
    align-items: center;
    display: flex;
    gap: 6px;
}

.misa-grid-pager-controls label {
    align-items: center;
    display: flex;
    gap: 5px;
}

.misa-grid-pager-controls select {
    border: 1px solid #aeb8c2;
    height: 26px;
}

.misa-grid-pager button.active {
    background: #e5edf4;
    font-weight: 800;
}

.misa-fullscreen-form {
    background: #ffffff;
    color: #111827;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    inset: 0;
    min-height: 0;
    overflow: hidden;
    position: fixed;
    z-index: 1500;
}

.misa-form-titlebar {
    align-items: center;
    background: #f0f2f4;
    border-top: 3px solid #148a3b;
    display: flex;
    flex: 0 0 42px;
    justify-content: space-between;
    padding: 0 12px;
}

.misa-form-title-left,
.misa-form-icons {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.misa-form-titlebar h1 {
    font-size: 22px;
    line-height: 1;
    margin: 0;
}

.misa-form-icons button.active {
    background: #eaf7ed;
    border-radius: 4px;
    color: #16752b;
}

.misa-form-titlebar button,
.misa-form-back {
    background: transparent;
    border: 0;
    color: #1f2937;
    cursor: pointer;
    font-size: 20px;
    height: 28px;
    padding: 0 5px;
}

.misa-form-titlebar select {
    border-color: #0f8f3a;
    min-width: 280px;
}

.misa-form-head {
    background: #eef0f3;
    display: grid;
    flex: 0 0 auto;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 260px;
    padding: 8px 14px 14px;
}

.misa-form-fields {
    display: grid;
    gap: 6px var(--daka-form-field-column-gap);
    grid-template-columns: repeat(2, minmax(0, var(--daka-field-text-width)));
    justify-content: start;
}

.misa-form-fields label.wide {
    grid-column: 1 / -1;
}

.misa-form-side {
    display: grid;
    gap: 6px;
}

.misa-form-total {
    display: grid;
    gap: 3px;
    justify-items: end;
    margin-top: 3px;
}

.misa-form-total b {
    font-size: 32px;
    line-height: 1;
}

.misa-form-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 10px;
    font-size: 13px;
    color: var(--daka-text-muted, #5d6b7a);
}

.misa-form-summary-row b {
    font-size: 15px;
    color: var(--daka-text-strong, #0f172a);
}

.misa-form-summary-row--emphasis {
    font-weight: 700;
    color: var(--daka-primary, #008a5b);
}

.misa-form-summary-row--emphasis b {
    font-size: 22px;
}

.misa-form-grid-tabs {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #d8dee4;
    display: flex;
    flex: 0 0 34px;
    gap: 3px;
    padding: 0 14px;
}

.misa-form-grid-tabs button {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 12px;
    height: 34px;
    padding: 0 12px;
}

.misa-form-grid-tabs button.active {
    border-bottom-color: #0f8f3a;
    color: #064f24;
    font-weight: 800;
}

.misa-form-currency {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.misa-form-exchange-rate-label {
    white-space: nowrap;
}

.misa-form-currency .misa-form-exchange-rate-input {
    background: #ffffff;
    border: 1px solid var(--df-border-strong, #aeb8c2);
    border-radius: var(--df-radius-sm, 4px);
    color: var(--df-text-primary, #111827);
    font-size: 12px;
    height: var(--df-control-height-sm, 28px);
    min-height: var(--df-control-height-sm, 28px);
    padding: 0 7px;
    text-align: right;
    width: 118px;
}

.misa-form-grid {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.misa-form-grid .misa-data-grid {
    min-width: 960px;
}

.misa-attachment-box {
    background: #ffffff;
    flex: 0 0 84px;
    padding: 8px 18px;
}

.misa-attachment-title {
    align-items: center;
    display: flex;
    gap: 8px;
}

.misa-attachment-title span:last-child {
    color: #6b7280;
}

.misa-attachment-drop {
    align-items: center;
    border: 1px solid #b8c2cc;
    color: #8a949e;
    display: flex;
    font-style: italic;
    height: 40px;
    justify-content: center;
    margin-top: 6px;
    max-width: 280px;
}

.misa-command-bar {
    align-items: center;
    background: #303238;
    color: #ffffff;
    display: flex;
    flex: 0 0 40px;
    justify-content: space-between;
    padding: 5px 8px;
}

.misa-command-note {
    color: #e5e7eb;
}

.misa-command-actions {
    display: flex;
    gap: 7px;
}

.misa-command-action-wrap {
    display: inline-flex;
    position: relative;
}

.misa-command-bar button {
    background: #3c3f45;
    border-color: #6b7078;
    color: #ffffff;
    min-width: 62px;
}

.misa-command-bar button.primary {
    min-width: 108px;
}

.misa-command-bar .misa-command-caret {
    border-left: 0;
    min-width: 28px;
    padding: 0;
}

.misa-command-bar .misa-command-action-wrap > button:first-child:not(:only-child) {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.misa-command-bar .misa-command-caret {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.misa-command-menu {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    bottom: 34px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    min-width: 136px;
    padding: 4px;
    position: absolute;
    right: 0;
    z-index: 80;
}

.misa-command-menu button {
    background: #ffffff;
    border: 0;
    color: #111827;
    justify-content: flex-start;
    min-width: 100%;
    width: 100%;
}

.misa-command-menu button:hover:not(:disabled) {
    background: #eaf5ed;
}

.purchase-voucher-form {
    background: #ffffff;
    font-size: 12px;
}

.purchase-voucher-titlebar h1 {
    font-size: 22px;
    font-weight: 800;
}

.purchase-voucher-modebar {
    align-items: center;
    background: #eef0f3;
    border-bottom: 1px solid #cfd6dd;
    display: flex;
    flex: 0 0 34px;
    gap: 12px;
    padding: 0 14px;
}

.purchase-voucher-modebar select {
    background: #ffffff;
    border: 1px solid #aeb8c2;
    color: #111827;
    font-size: 12px;
    height: 24px;
    min-width: 170px;
    padding: 0 7px;
}

.purchase-voucher-radio {
    align-items: center;
    display: inline-flex;
    gap: 5px;
    white-space: nowrap;
}

.purchase-voucher-radio input {
    accent-color: #20a53a;
    height: 14px;
    width: 14px;
}

.purchase-voucher-radio.muted {
    color: #4b5563;
}

.sales-stock-issue-preview {
    align-items: center;
    display: flex;
    gap: 6px;
    margin-left: auto;
    white-space: nowrap;
}

.sales-stock-issue-preview span {
    color: #4b5563;
}

.sales-stock-issue-preview strong {
    border-left: 1px solid #aeb8c2;
    padding-left: 6px;
}

.sales-stock-issue-panel {
    align-items: end;
    background: #f7f8fa;
    border-bottom: 1px solid #cfd6dd;
    display: grid;
    gap: 10px 14px;
    grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) minmax(260px, 1fr);
    padding: 8px 14px;
}

.sales-stock-issue-panel label {
    display: grid;
    gap: 4px;
}

.sales-stock-issue-panel input {
    background: #eef0f3;
    border: 1px solid #aeb8c2;
    height: 26px;
    padding: 0 8px;
}

.sales-stock-issue-panel > span {
    color: #4b5563;
    padding-bottom: 6px;
}

.purchase-voucher-header-tabs {
    background: #eef0f3;
    border-bottom-color: #cfd6dd;
    padding-left: 14px;
}

.purchase-voucher-head {
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 260px;
    padding: 18px 14px 12px;
}

.purchase-voucher-fields {
    gap: 8px 12px;
    grid-template-columns: minmax(300px, 540px) minmax(340px, 1fr);
}

.purchase-voucher-side {
    border-left: 1px solid #cfd6dd;
    padding-left: 14px;
}

.purchase-voucher-grid-tabs {
    border-top: 1px solid #d8dee4;
}

.purchase-voucher-grid-tabs .misa-form-currency select {
    min-width: 90px;
}

.purchase-voucher-grid-tabs .misa-form-currency .misa-lookup {
    min-width: 250px;
}

.purchase-voucher-grid {
    flex: 0 1 174px;
    min-height: 134px;
}

.purchase-voucher-grid-shell {
    min-height: 132px;
}

.purchase-voucher-table {
    min-width: 1540px;
}

.purchase-voucher-table th,
.purchase-voucher-table td {
    height: 30px;
    padding: 3px 8px;
}

.purchase-voucher-table input,
.purchase-voucher-table select,
.purchase-voucher-table .misa-lookup-value {
    background: #ffffff;
    border: 1px solid #aeb8c2;
    border-radius: 0;
    color: #111827;
    font-size: 12px;
    height: 24px;
    min-width: 0;
    padding: 0 7px;
    width: 100%;
}

.purchase-voucher-table .misa-lookup {
    min-width: 154px;
}

.purchase-voucher-table .num {
    text-align: right;
}

.purchase-voucher-table .strong {
    font-weight: 800;
}

.purchase-voucher-table .center {
    text-align: center;
}

.purchase-tax-table {
    min-width: 2380px;
}

.purchase-tax-table th {
    white-space: normal;
}

.purchase-customs-exchange-rate-input {
    min-width: 96px;
}

.purchase-cost-allocation-panel {
    background: #ffffff;
    flex: 0 1 174px;
    min-height: 134px;
    overflow: auto;
}

.purchase-cost-allocation-note {
    align-items: center;
    background: #eef7ff;
    border-bottom: 1px solid #bdd7ee;
    color: #1f2937;
    display: flex;
    gap: 12px;
    min-height: 38px;
    padding: 6px 14px;
}

.purchase-cost-allocation-note b {
    white-space: nowrap;
}

.purchase-cost-allocation-table {
    min-width: 1180px;
}

.purchase-cost-allocation-empty {
    color: #667085;
    height: 48px;
    text-align: center;
}

.purchase-voucher-lower {
    background: #ffffff;
    display: flex;
    flex: 1 1 auto;
    gap: 16px;
    justify-content: space-between;
    min-height: 0;
    padding: 10px 14px 0;
}

.purchase-voucher-lower-left {
    min-width: 0;
}

.purchase-cost-allocation-actions {
    display: flex;
    margin-bottom: 8px;
}

.misa-form-row-actions,
.purchase-voucher-row-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.misa-form-row-actions {
    background: #ffffff;
    padding: 10px 14px 0;
}

.misa-form-row-actions button,
.purchase-voucher-row-actions button {
    background: #ffffff;
    border: 1px solid #aeb8c2;
    color: #111827;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    height: 26px;
    min-width: 88px;
    padding: 0 12px;
}

.misa-form-row-actions button:disabled,
.purchase-voucher-row-actions button:disabled {
    color: #7c8793;
    cursor: not-allowed;
}

.purchase-voucher-attachment {
    padding: 0;
}

.purchase-voucher-summary {
    align-self: start;
    display: grid;
    gap: 6px;
    margin-left: auto;
    padding-top: 4px;
    width: min(520px, 40vw);
}

.purchase-voucher-summary div {
    align-items: center;
    border-bottom: 1px solid #d8dee4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    min-height: 32px;
}

.purchase-voucher-summary span {
    font-size: 13px;
    font-weight: 700;
}

.purchase-voucher-summary b {
    font-size: 16px;
    font-weight: 800;
    text-align: right;
}

.cash-bank-voucher-form .purchase-voucher-head,
.accounting-voucher-form .purchase-voucher-head {
    background: #eef0f3;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 300px;
    padding-top: 14px;
}

.cash-bank-voucher-form .purchase-voucher-fields,
.accounting-voucher-form .purchase-voucher-fields {
    grid-template-columns: minmax(300px, 470px) minmax(360px, 1fr);
}

.cash-bank-voucher-form .purchase-voucher-grid,
.accounting-voucher-form .purchase-voucher-grid {
    flex: 1 1 auto;
    min-height: 190px;
}

.cash-bank-voucher-form .misa-attachment-box,
.accounting-voucher-form .misa-attachment-box {
    flex-basis: 86px;
    padding-left: 24px;
}

.cash-count-voucher-form .purchase-voucher-grid,
.bank-reconciliation-voucher-form .purchase-voucher-grid,
.accounting-closing-voucher-form .purchase-voucher-grid {
    flex: 1 1 auto;
    min-height: 300px;
}

.cash-count-voucher-form .purchase-voucher-fields,
.bank-reconciliation-voucher-form .purchase-voucher-fields,
.accounting-closing-voucher-form .purchase-voucher-fields {
    grid-template-columns: minmax(360px, 1fr) minmax(220px, 0.35fr);
}

.misa-lookup-table tbody tr.selected,
.misa-lookup-table tbody tr.selected:hover {
    background: #dff2ff;
}

@media (max-width: 980px) {
    .misa-list-page {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    .misa-list-toolbar,
    .misa-toolbar-left,
    .misa-toolbar-right {
        align-items: stretch;
        flex-wrap: wrap;
        max-width: 100%;
        width: 100%;
    }

    .misa-global-search {
        grid-template-columns: minmax(0, 1fr) 24px;
        min-width: 0;
        width: 100%;
    }

    .misa-filter-row,
    .misa-filter-popover,
    .misa-form-head,
    .misa-form-fields {
        grid-template-columns: 1fr;
    }

    .misa-filter-popover {
        left: 8px;
        max-height: calc(100vh - 112px);
        top: 104px;
        width: calc(100% - 16px);
    }

    .misa-filter-drawer {
        min-width: 0;
        width: min(100vw, 420px);
    }

    .misa-filter-date-grid {
        grid-template-columns: 1fr;
    }

    .misa-table-settings-panel {
        min-width: 100vw;
        padding: 14px 10px;
    }

    .misa-fullscreen-form {
        overflow: auto;
    }

    .misa-form-grid {
        min-height: 360px;
    }

    .misa-command-bar {
        align-items: stretch;
        flex-direction: column;
        height: auto;
    }
}

/* MISA fixed-viewport parity, 2026-05-23.
   App pages keep the window locked; grid regions own vertical/horizontal scroll. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body:has(.app-shell),
body:has(.misa-fullscreen-form),
body:has(.misa-document-surface) {
    overflow: hidden;
}

.app-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.app-sidebar {
    height: 100vh;
    min-height: 0;
    overflow-y: auto;
}

.app-main {
    min-height: 0;
    overflow: hidden;
}

.app-topbar {
    flex: 0 0 48px;
    position: static;
}

.app-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.app-content > .module-surface,
.app-content > .misa-list-page {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.module-surface,
.module-surface.misa-ledger-list,
.misa-list-page,
.misa-fullscreen-form,
.form-surface.misa-document-surface {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 12px;
}

.module-surface,
.module-surface.misa-ledger-list {
    overflow: hidden;
}

.module-workspace,
.module-grid-region,
.voucher-body,
.voucher-grid-panel,
.misa-form-grid,
.daka-grid-shell,
.misa-data-grid-shell {
    min-height: 0;
    min-width: 0;
}

.module-workspace {
    overflow: hidden;
}

.module-grid-region,
.voucher-grid-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}

.misa-list-page {
    height: 100%;
    min-height: 0;
}

.misa-list-tabs,
.misa-list-toolbar,
.misa-filter-row,
.misa-filter-popover,
.misa-list-status,
.misa-grid-pager,
.misa-form-titlebar,
.misa-form-head,
.misa-form-grid-tabs,
.misa-attachment-box,
.misa-command-bar,
.module-titlebar,
.daka-tabs,
.daka-toolbar,
.form-commandbar,
.voucher-header-grid,
.voucher-bottom-strip {
    flex-shrink: 0;
}

.misa-data-grid-scroll,
.daka-grid-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.misa-data-grid th,
.daka-grid th {
    top: 0;
    z-index: 8;
}

.misa-data-grid th,
.daka-grid th {
    overflow: visible;
}

.misa-data-grid td,
.daka-grid td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.misa-data-grid td.misa-action-col,
.misa-data-grid th.misa-action-col {
    overflow: visible;
}

.misa-grid-footer td,
.daka-grid-footer td {
    bottom: 0;
    position: sticky;
    z-index: 7;
}

.misa-grid-pager,
.daka-grid-pager,
.misa-command-bar,
.form-commandbar {
    position: relative;
    z-index: 9;
}

.misa-document-surface .voucher-grid-panel .misa-data-grid-shell {
    border-top: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.misa-document-surface .voucher-grid-panel .daka-grid-shell {
    flex: 1 1 auto;
}

.misa-fullscreen-form {
    height: 100vh;
    overflow: hidden;
}

.misa-fullscreen-form .misa-data-grid-shell,
.misa-fullscreen-form .misa-form-grid {
    flex: 1 1 auto;
    min-height: 0;
}

.fixed-asset-type-dialog,
.fixed-asset-period-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: min(560px, calc(100vw - 32px));
    padding: 24px 32px 20px;
    width: 520px;
}

.fixed-asset-period-dialog {
    width: 420px;
}

.fixed-asset-type-dialog header,
.fixed-asset-period-dialog header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.fixed-asset-type-dialog h2,
.fixed-asset-period-dialog h2 {
    font-size: 22px;
    line-height: 1.2;
    margin: 0;
}

.fixed-asset-dialog-tools {
    display: inline-flex;
    gap: 6px;
}

.fixed-asset-dialog-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.fixed-asset-dialog-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 120px));
}

.fixed-asset-dialog-grid label {
    display: grid;
    gap: 5px;
}

.fixed-asset-dialog-grid label.full {
    grid-column: 1 / -1;
}

.fixed-asset-dialog-grid label.wide {
    min-width: 0;
}

.fixed-asset-dialog-grid span {
    font-size: 12px;
    font-weight: 600;
}

.fixed-asset-dialog-grid .required span::after {
    color: #dc2626;
    content: " *";
}

.fixed-asset-dialog-grid input,
.fixed-asset-dialog-grid select {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    height: 32px;
    min-width: 0;
    padding: 0 10px;
}

.fixed-asset-checkline {
    align-items: center;
    display: inline-flex !important;
    gap: 8px !important;
}

.fixed-asset-checkline input {
    height: auto;
    width: auto;
}

.fixed-asset-type-dialog footer,
.fixed-asset-period-dialog footer {
    align-items: center;
    border-top: 1px solid #e5e7eb;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr auto auto;
    padding-top: 16px;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .app-sidebar {
        height: auto;
        max-height: 116px;
        overflow: hidden;
    }

    .app-main {
        min-height: 0;
    }

    .misa-list-page {
        height: 100%;
        min-height: 0;
    }

    .misa-fullscreen-form {
        height: 100vh;
        overflow: hidden;
    }

    .purchase-voucher-modebar {
        flex-wrap: wrap;
        min-height: 34px;
    }

    .sales-stock-issue-preview {
        margin-left: 0;
    }

    .sales-stock-issue-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-stock-issue-panel > span {
        grid-column: 1 / -1;
    }
}

/* Modern DakaFood polish layer, 2026-06-25.
   Visual-only overrides: keep routes, layout, workflow and accounting behavior unchanged. */
:root {
    --df-brand: #0a7a4b;
    --df-brand-strong: #075f3c;
    --df-brand-soft: #e8f5ee;
    --df-brand-mist: #f3fbf7;
    --df-accent: #2563eb;
    --df-danger: #dc2626;
    --df-warning: #b45309;
    --df-success: #098441;
    --df-ink: #0f172a;
    --df-muted: #5f6b7a;
    --df-subtle: #7a8797;
    --df-page: #eef3f1;
    --df-page-2: #f7faf8;
    --df-surface: #ffffff;
    --df-surface-muted: #f8fafc;
    --df-grid-head: #f1f5f9;
    --df-grid-hover: #f0f9f5;
    --df-grid-selected: #dff4ea;
    --df-border: #d7e0dc;
    --df-border-strong: #b8c6c0;
    --df-ring: rgba(10, 122, 75, 0.24);
    --df-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --df-shadow-md: 0 10px 28px rgba(15, 23, 42, 0.12);
    --df-shadow-lg: 0 22px 56px rgba(15, 23, 42, 0.18);
    --df-radius-xs: 4px;
    --df-radius-sm: 6px;
    --df-radius-md: 8px;
    --df-control-height: 30px;
}

html,
body {
    background: var(--df-page);
    color: var(--df-ink);
    font-family: "Segoe UI", Arial, sans-serif;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(10, 122, 75, 0.18);
}

a,
.btn-link,
.misa-grid-link,
.report-link-grid a strong,
.report-card a {
    color: var(--df-brand);
}

a:hover,
.misa-grid-link:hover,
.report-link-grid a:hover strong,
.report-card a:hover {
    color: var(--df-brand-strong);
}

.app-shell {
    background: var(--df-page);
}

.app-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f5faf7 100%);
    border-right: 1px solid var(--df-border);
    box-shadow: 1px 0 0 rgba(15, 23, 42, 0.02);
}

.app-brand,
.app-nav-footer {
    border-color: var(--df-border);
}

.app-brand-logo {
    background: linear-gradient(135deg, var(--df-brand), #19a66a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), var(--df-shadow-sm);
}

.app-nav-item {
    border-radius: var(--df-radius-sm);
    color: var(--df-muted);
    transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.app-nav-item:hover {
    background: var(--df-brand-mist);
    color: var(--df-brand-strong);
}

.app-nav-item.active {
    background: var(--df-brand-soft);
    box-shadow: inset 3px 0 0 var(--df-brand);
    color: var(--df-brand-strong);
}

.app-topbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--df-border);
    box-shadow: var(--df-shadow-sm);
    color: var(--df-ink);
}

.app-content,
.app-main {
    background: var(--df-page);
}

.module-surface,
.misa-list-page,
.misa-report-catalog,
.misa-report-viewer,
.report-catalog-surface,
.report-viewer-surface {
    background: var(--df-page);
    color: var(--df-ink);
}

.module-titlebar,
.misa-list-tabs,
.misa-list-toolbar,
.misa-selection-toolbar,
.misa-form-titlebar,
.misa-form-head,
.purchase-voucher-modebar,
.purchase-voucher-head,
.report-toolbar-strip {
    border-color: var(--df-border);
}

.module-titlebar,
.misa-list-tabs,
.misa-list-toolbar,
.misa-selection-toolbar,
.misa-form-titlebar,
.report-toolbar-strip {
    background: var(--df-surface);
}

.misa-list-tabs {
    border-top: 2px solid var(--df-brand);
}

.misa-list-tabs button,
.daka-tabs button,
.misa-form-grid-tabs button,
.purchase-voucher-grid-tabs button,
.purchase-voucher-header-tabs button {
    color: var(--df-muted);
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.misa-list-tabs button:hover,
.daka-tabs button:hover,
.misa-form-grid-tabs button:hover,
.purchase-voucher-grid-tabs button:hover,
.purchase-voucher-header-tabs button:hover {
    background: var(--df-brand-mist);
    color: var(--df-brand-strong);
}

.misa-list-tabs button.active,
.daka-tabs button.active,
.misa-form-grid-tabs button.active,
.purchase-voucher-grid-tabs button.active,
.purchase-voucher-header-tabs button.active {
    background: var(--df-brand-soft);
    border-bottom-color: var(--df-brand);
    color: var(--df-brand-strong);
}

.misa-list-toolbar button,
.misa-selection-toolbar button,
.misa-grid-pager button,
.daka-grid-pager button,
.misa-command-bar button,
.form-commandbar button,
.misa-action-col button,
.purchase-voucher-row-actions button,
.misa-secondary-button,
.misa-primary-button,
.report-parameter-panel button,
.report-toolbar-strip button,
.fixed-asset-type-dialog button,
.fixed-asset-period-dialog button {
    border-color: var(--df-border-strong);
    border-radius: var(--df-radius-sm);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.misa-list-toolbar button:hover:not(:disabled),
.misa-selection-toolbar button:hover:not(:disabled),
.misa-grid-pager button:hover:not(:disabled),
.daka-grid-pager button:hover:not(:disabled),
.misa-command-bar button:hover:not(:disabled),
.form-commandbar button:hover:not(:disabled),
.misa-action-col button:hover:not(:disabled),
.purchase-voucher-row-actions button:hover:not(:disabled),
.misa-secondary-button:hover:not(:disabled),
.report-parameter-panel button:hover:not(:disabled),
.report-toolbar-strip button:hover:not(:disabled),
.fixed-asset-type-dialog button:hover:not(:disabled),
.fixed-asset-period-dialog button:hover:not(:disabled) {
    background: var(--df-brand-mist);
    border-color: var(--df-brand);
    color: var(--df-brand-strong);
}

.misa-list-toolbar button.primary,
.misa-command-bar button.primary,
.misa-primary-button,
.report-parameter-panel button.primary,
.report-toolbar-strip button.primary,
.fixed-asset-type-dialog button.primary,
.fixed-asset-period-dialog button.primary,
.btn-primary {
    background: linear-gradient(180deg, #10a86a 0%, var(--df-brand) 100%);
    border-color: var(--df-brand);
    color: #ffffff;
}

.misa-list-toolbar button.primary:hover:not(:disabled),
.misa-command-bar button.primary:hover:not(:disabled),
.misa-primary-button:hover:not(:disabled),
.report-parameter-panel button.primary:hover:not(:disabled),
.report-toolbar-strip button.primary:hover:not(:disabled),
.fixed-asset-type-dialog button.primary:hover:not(:disabled),
.fixed-asset-period-dialog button.primary:hover:not(:disabled),
.btn-primary:hover {
    background: var(--df-brand-strong);
    border-color: var(--df-brand-strong);
    color: #ffffff;
}

.misa-list-toolbar button:focus-visible,
.misa-selection-toolbar button:focus-visible,
.misa-grid-pager button:focus-visible,
.daka-grid-pager button:focus-visible,
.misa-command-bar button:focus-visible,
.form-commandbar button:focus-visible,
.misa-action-col button:focus-visible,
.misa-form-titlebar button:focus-visible,
.app-nav-item:focus-visible,
.report-link-grid a:focus-visible,
.report-card a:focus-visible,
.app-shell input:focus-visible,
.app-shell select:focus-visible,
.app-shell textarea:focus-visible,
.misa-lookup-value:focus-within {
    border-color: var(--df-brand) !important;
    box-shadow: 0 0 0 3px var(--df-ring) !important;
    outline: none;
}

.app-shell input:not(.daka-search-box-input),
.app-shell select,
.app-shell textarea,
.misa-grid-cell-input,
.misa-lookup-value,
.misa-column-filter input,
.misa-column-filter select,
.misa-filter-input,
.misa-filter-drawer input,
.misa-filter-drawer select,
.fixed-asset-dialog-grid input,
.fixed-asset-dialog-grid select {
    background: #ffffff;
    border-color: var(--df-border-strong);
    border-radius: var(--df-radius-sm);
    color: var(--df-ink);
}

.app-shell input::placeholder,
.app-shell textarea::placeholder,
.misa-filter-input::placeholder {
    color: #9aa4b2;
}

.app-shell input:disabled,
.app-shell select:disabled,
.app-shell textarea:disabled,
.misa-grid-cell-input:disabled,
.misa-lookup-value[aria-disabled="true"] {
    background: #f1f5f9;
    color: var(--df-subtle);
    opacity: 1;
}

.misa-data-grid-shell,
.daka-grid-shell,
.table-shell,
.misa-list-workspace,
.report-category-rail,
.report-index-list,
.report-parameter-panel,
.report-paper,
.voucher-grid-panel,
.purchase-voucher-grid-shell,
.fixed-asset-type-dialog,
.fixed-asset-period-dialog,
.misa-import-dialog,
.misa-record-dialog,
.employee-record-dialog,
.misa-tgxq-dialog,
.misa-import-info-dialog {
    background: var(--df-surface);
    border-color: var(--df-border);
    border-radius: var(--df-radius-md);
    box-shadow: var(--df-shadow-sm);
}

.misa-data-grid,
.daka-grid,
.purchase-voucher-table,
.misa-lookup-table {
    color: var(--df-ink);
}

.misa-data-grid th,
.daka-grid th,
.purchase-voucher-table th,
.misa-lookup-table th {
    background: var(--df-grid-head);
    border-bottom-color: var(--df-border-strong);
    color: #1e293b;
}

.misa-data-grid td,
.daka-grid td,
.purchase-voucher-table td,
.misa-lookup-table td {
    border-bottom-color: #e3e9e6;
    border-right-color: #dbe4e0;
}

.misa-data-grid tbody tr:hover,
.daka-grid tbody tr:hover,
.purchase-voucher-table tbody tr:hover,
.misa-lookup-table tbody tr:hover {
    background: var(--df-grid-hover);
}

.misa-data-grid tr.selected,
.daka-grid tr.selected,
.misa-lookup-table tbody tr.selected,
.misa-lookup-table tbody tr.selected:hover,
.misa-data-grid tbody tr:has(.misa-check input:checked),
.daka-grid tbody tr:has(.misa-check input:checked) {
    background: var(--df-grid-selected);
}

.misa-data-grid tr.misa-tree-parent td,
.daka-grid tr.misa-tree-parent td,
.misa-grid-footer td,
.daka-grid-footer td {
    background: #f7fafc;
}

.misa-action-col,
.misa-data-grid th.misa-action-col {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.82), var(--df-surface) 18%);
    box-shadow: -6px 0 12px rgba(15, 23, 42, 0.05);
}

.misa-row-action-dropdown,
.misa-split-menu,
.misa-column-filter,
.misa-lookup-panel,
.misa-filter-drawer,
.misa-table-settings-panel {
    background: var(--df-surface);
    border-color: var(--df-border);
    border-radius: var(--df-radius-md);
    box-shadow: var(--df-shadow-md);
}

.misa-row-action-dropdown button:hover:not(:disabled),
.misa-split-menu button:hover:not(:disabled),
.misa-column-filter-actions button:hover:not(:disabled),
.misa-filter-value-option:hover,
.misa-filter-column-option:hover,
.misa-table-settings-row:hover {
    background: var(--df-brand-mist);
    color: var(--df-brand-strong);
}

.misa-fullscreen-form,
.form-surface.misa-document-surface,
.purchase-voucher-form {
    background: var(--df-page);
}

.misa-form-titlebar,
.purchase-voucher-titlebar {
    background: var(--df-surface);
    border-top-color: var(--df-brand);
    box-shadow: var(--df-shadow-sm);
}

.misa-form-head,
.purchase-voucher-head,
.voucher-header-grid,
.voucher-context-strip,
.voucher-bottom-strip,
.purchase-voucher-lower,
.misa-attachment-box {
    background: var(--df-surface-muted);
    border-color: var(--df-border);
}

.misa-form-total b,
.voucher-summary b,
.purchase-voucher-summary b {
    color: var(--df-ink);
}

.misa-command-bar,
.form-commandbar {
    background: #1f2933;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.12);
}

.misa-command-bar button,
.form-commandbar button {
    border-color: rgba(255, 255, 255, 0.2);
}

.misa-list-status,
.misa-form-status,
.report-status-message,
.opening-balance-hub-status,
.app-shell-toast {
    background: #ecfdf5;
    border: 1px solid #b7e4cb;
    border-radius: var(--df-radius-sm);
    color: var(--df-success);
    box-shadow: var(--df-shadow-sm);
}

.misa-list-status.error,
.misa-form-status.error,
.report-status-message.error,
.opening-balance-hub-status.error,
.validation-message,
.misa-import-status.error,
.misa-import-badge.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--df-danger);
}

.report-card,
.report-section,
.report-link-grid a,
.report-option-list label,
.metric-card,
.module-card,
.summary-panel,
.doc-list,
.checklist-panel {
    border-color: var(--df-border);
    border-radius: var(--df-radius-md);
    box-shadow: var(--df-shadow-sm);
}

.report-card:hover,
.report-link-grid a:hover,
.module-card:hover,
.metric-card:hover {
    border-color: rgba(10, 122, 75, 0.45);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.report-category-rail button.active,
.report-category-rail button:hover {
    background: var(--df-brand-soft);
    color: var(--df-brand-strong);
}

.misa-modal-backdrop,
.misa-dialog-backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
}

.misa-import-dialog,
.misa-record-dialog,
.employee-record-dialog,
.fixed-asset-type-dialog,
.fixed-asset-period-dialog,
.misa-tgxq-dialog,
.misa-import-info-dialog {
    box-shadow: var(--df-shadow-lg);
}

.misa-import-dialog header,
.misa-record-dialog header,
.employee-dialog-header,
.fixed-asset-type-dialog header,
.fixed-asset-period-dialog header,
.misa-tgxq-dialog header,
.misa-import-info-dialog header {
    border-color: var(--df-border);
}

@media (max-width: 980px) {
    .misa-data-grid-shell,
    .daka-grid-shell,
    .report-parameter-panel,
    .report-paper,
    .fixed-asset-type-dialog,
    .fixed-asset-period-dialog,
    .misa-import-dialog,
    .misa-record-dialog,
    .employee-record-dialog {
        border-radius: var(--df-radius-sm);
    }

    .misa-list-toolbar,
    .misa-selection-toolbar,
    .report-toolbar-strip {
        gap: 6px;
    }
}

/* Modern DakaFood polish layer: shared form command buttons stay right-aligned and even. */
.misa-command-bar,
.misa-document-surface .form-commandbar,
.form-commandbar {
    justify-content: flex-end;
    gap: 8px;
}

.misa-command-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-left: auto;
}

.misa-command-note,
.misa-document-surface .form-commandbar > span,
.form-commandbar > span {
    margin-right: auto;
}

.misa-command-action-wrap {
    align-items: center;
}

.misa-command-bar button,
.form-commandbar button,
.misa-document-surface .form-commandbar .daka-action {
    align-items: center;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    min-width: 72px;
    padding: 0 14px;
    white-space: nowrap;
}

.misa-command-bar button.primary,
.form-commandbar button.primary,
.misa-document-surface .form-commandbar .daka-action.primary {
    min-width: 112px;
}

.misa-command-bar .misa-command-caret {
    height: 32px;
    min-width: 32px;
    padding: 0;
}

.misa-command-menu {
    bottom: calc(100% + 6px);
}

.misa-command-menu button {
    height: 30px;
    justify-content: flex-start;
    min-width: 100%;
}

/* Modern DakaFood polish layer: filter values open only when the user focuses that field. */
.misa-filter-drawer .misa-filter-fields {
    overflow: visible;
}

.misa-filter-drawer .misa-filter-field {
    position: relative;
}

.misa-filter-drawer .misa-filter-field.open {
    z-index: 78;
}

.misa-filter-drawer .misa-filter-field.open input[type="text"] {
    border-color: var(--df-brand);
    box-shadow: 0 0 0 3px rgba(0, 163, 108, 0.16);
}

.misa-filter-drawer .misa-filter-field .misa-filter-checklist {
    background: #ffffff;
    border: 1px solid var(--df-border-strong);
    border-radius: var(--df-radius-sm);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    left: 7px;
    max-height: 220px;
    min-height: 38px;
    overflow: auto;
    padding: 6px;
    position: absolute;
    right: 7px;
    top: calc(100% - 2px);
    z-index: 79;
}

/* MISA parity polish: softer full-screen voucher forms. */
.misa-fullscreen-form.purchase-voucher-form,
.misa-fullscreen-form.cash-bank-voucher-form {
    background: #eef0f3;
    color: #07101f;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-titlebar,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-titlebar {
    background: #ffffff;
    border-bottom: 1px solid #d8dee6;
    border-top: 0;
    box-shadow: none;
    flex-basis: 46px;
    padding: 0 10px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-titlebar h1,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-titlebar h1 {
    color: #07101f;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-titlebar select,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-titlebar select {
    border-color: #8bbfa4;
    border-radius: 5px;
    height: 30px;
    min-width: 270px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-head,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-head {
    background: #e8eaee;
    border-bottom: 1px solid #d3d9e0;
    box-shadow: none;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 290px;
    padding: 10px 12px 16px;
}

.misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-fields,
.misa-fullscreen-form.cash-bank-voucher-form:not(.cash-count-voucher-form) .misa-form-fields {
    gap: 8px var(--daka-form-field-column-gap);
    grid-template-columns: repeat(2, minmax(0, var(--daka-field-text-width)));
    justify-content: start;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-fields label,
.misa-fullscreen-form.purchase-voucher-form .misa-form-side label,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-fields label,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-side label {
    gap: 4px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-fields span,
.misa-fullscreen-form.purchase-voucher-form .misa-form-side span,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-fields span,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-side span {
    color: #07101f;
    font-size: 12px;
    font-weight: 700;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-fields input,
.misa-fullscreen-form.purchase-voucher-form .misa-form-side input,
.misa-fullscreen-form.purchase-voucher-form .misa-form-currency select,
.misa-fullscreen-form.purchase-voucher-form .misa-lookup-value,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-fields input,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-side input,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-currency select,
.misa-fullscreen-form.cash-bank-voucher-form .misa-lookup-value {
    border-color: #c0c8d2;
    border-radius: 6px;
    height: 28px;
    min-height: 28px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-side,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-side {
    gap: 8px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-total,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-total {
    margin-top: 8px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-total b,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-total b {
    color: #020817;
    font-size: 35px;
    font-weight: 800;
    letter-spacing: 0;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-grid-tabs,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-grid-tabs {
    background: #ffffff;
    border: 1px solid #d8dee6;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    box-shadow: none;
    flex-basis: 44px;
    margin: 10px 10px 0;
    padding: 0 8px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-grid-tabs button,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-grid-tabs button {
    border-radius: 0;
    height: 44px;
    padding: 0 12px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-grid-tabs button.active,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-grid-tabs button.active {
    background: #ffffff;
    border-bottom-color: #0b8f5b;
    color: #067042;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-currency,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-currency {
    margin-left: auto;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-reference-strip,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-reference-strip {
    align-items: center;
    background: #e8eaee;
    color: #07101f;
    display: flex;
    flex: 0 0 30px;
    gap: 14px;
    min-height: 30px;
    padding: 0 14px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-reference-strip > span,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-reference-strip > span {
    font-weight: 600;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-reference-strip > div,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-reference-strip > div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    min-width: 0;
}

.misa-fullscreen-form.purchase-voucher-form .misa-reference-chip,
.misa-fullscreen-form.cash-bank-voucher-form .misa-reference-chip {
    color: #078757;
    font-weight: 600;
    max-width: 150px;
    overflow: hidden;
    text-decoration: underline;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-fullscreen-form.purchase-voucher-form .misa-reference-more,
.misa-fullscreen-form.cash-bank-voucher-form .misa-reference-more {
    color: #078757;
    font-weight: 700;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-grid,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-grid {
    background: #ffffff;
    border: 1px solid #d8dee6;
    border-radius: 0 0 6px 6px;
    border-top: 0;
    margin: 0 10px;
    min-height: 0;
    overflow: auto;
}

.misa-fullscreen-form.purchase-voucher-form .misa-data-grid-shell,
.misa-fullscreen-form.cash-bank-voucher-form .misa-data-grid-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.misa-fullscreen-form.purchase-voucher-form .misa-data-grid th,
.misa-fullscreen-form.cash-bank-voucher-form .misa-data-grid th {
    background: #eef2f5;
    border-bottom-color: #cfd7df;
    color: #07101f;
    font-size: 12px;
    font-weight: 700;
    height: 32px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-data-grid td,
.misa-fullscreen-form.cash-bank-voucher-form .misa-data-grid td {
    background: #ffffff;
    border-bottom-color: #e2e7ec;
    border-right-color: #d4dbe3;
    height: 31px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-data-grid input,
.misa-fullscreen-form.cash-bank-voucher-form .misa-data-grid input {
    border-color: #bfc8d2;
    border-radius: 5px;
    height: 24px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-data-grid input.purchase-import-tax-auto-checkbox {
    accent-color: var(--df-brand-primary, #0b8f5b);
    border: 0;
    border-radius: 3px;
    box-shadow: none;
    cursor: pointer;
    height: 16px;
    margin: 0;
    min-height: 16px;
    min-width: 16px;
    padding: 0;
    vertical-align: middle;
    width: 16px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-data-grid input.purchase-import-tax-auto-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.misa-fullscreen-form.purchase-voucher-form .misa-grid-footer td,
.misa-fullscreen-form.cash-bank-voucher-form .misa-grid-footer td {
    background: #f3f6f8;
    font-weight: 800;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-row-actions,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-row-actions {
    background: #ffffff;
    border-top: 1px solid #e3e8ee;
    margin: 0 10px;
    padding: 16px 30px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-row-actions button,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-row-actions button {
    border-color: #c9d1da;
    border-radius: 6px;
    height: 30px;
    padding: 0 16px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-attachment-box,
.misa-fullscreen-form.cash-bank-voucher-form .misa-attachment-box {
    background: #ffffff;
    border: 1px solid #d8dee6;
    border-top: 0;
    flex: 0 0 96px;
    margin: 0 10px;
    padding: 14px 30px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-attachment-title,
.misa-fullscreen-form.cash-bank-voucher-form .misa-attachment-title {
    color: #07101f;
    gap: 9px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-attachment-title svg,
.misa-fullscreen-form.cash-bank-voucher-form .misa-attachment-title svg {
    color: #98a2b3;
}

.misa-fullscreen-form.purchase-voucher-form .misa-attachment-title span,
.misa-fullscreen-form.cash-bank-voucher-form .misa-attachment-title span {
    color: #7c8793;
    margin-left: 4px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-attachment-drop,
.misa-fullscreen-form.cash-bank-voucher-form .misa-attachment-drop {
    border-color: #d3dae3;
    border-style: dashed;
    border-radius: 2px;
    color: #7abf9f;
    font-style: normal;
    height: 40px;
    max-width: 340px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-attachment-drop.disabled,
.misa-fullscreen-form.cash-bank-voucher-form .misa-attachment-drop.disabled {
    background: #ffffff;
    cursor: default;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar {
    background: #ffffff;
    border-top: 1px solid #d7dee6;
    box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.08);
    color: #07101f;
    flex-basis: 52px;
    padding: 8px 14px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar button,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar button {
    background: #ffffff;
    border-color: #c5ced8;
    border-radius: 6px;
    color: #07101f;
    font-weight: 700;
    height: 32px;
    min-width: 74px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar button svg,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar button svg {
    margin-right: 6px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar .misa-command-caret svg,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar .misa-command-caret svg {
    margin-right: 0;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar button.primary,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar button.primary {
    background: #0a9f65;
    border-color: #0a9f65;
    color: #ffffff;
    min-width: 116px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar button.primary:hover:not(:disabled),
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar button.primary:hover:not(:disabled) {
    background: #078757;
    border-color: #078757;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar .misa-command-caret.primary,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar .misa-command-caret.primary {
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    flex: 0 0 34px;
    max-width: 34px;
    min-width: 34px;
    padding: 0;
    width: 34px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-menu,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-menu {
    border-color: #d6dee7;
    border-radius: 6px;
    bottom: calc(100% + 8px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    min-width: 220px;
    padding: 6px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-menu button,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-menu button {
    border: 0;
    border-radius: 4px;
    font-weight: 600;
    height: 34px;
    justify-content: flex-start;
    padding: 0 14px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-menu button:hover:not(:disabled),
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-menu button:hover:not(:disabled) {
    background: #f0f6f3;
    color: #06623d;
}

@media (max-width: 980px) {
    .misa-fullscreen-form.purchase-voucher-form .misa-form-head,
    .misa-fullscreen-form.cash-bank-voucher-form .misa-form-head {
        gap: 14px;
        grid-template-columns: 1fr;
    }

    .misa-fullscreen-form.purchase-voucher-form .misa-form-fields,
    .misa-fullscreen-form.cash-bank-voucher-form .misa-form-fields {
        grid-template-columns: 1fr;
    }
}

/* DakaFood Modern UI System v1
   Shared visual layer only: routes, handlers, accounting rules and data contracts stay unchanged. */
:root {
    --df-brand-primary: #0b7a4b;
    --df-brand-primary-hover: #075f3a;
    --df-brand-primary-soft: #e7f5ee;
    --df-brand-primary-mist: #f3fbf7;
    --df-brand-secondary: #d71920;
    --df-brand-accent: #2563eb;

    --df-surface-page: #f4f7f6;
    --df-surface-shell: #ffffff;
    --df-surface-panel: #ffffff;
    --df-surface-muted: #f5f8f7;
    --df-surface-hover: #eef7f2;
    --df-surface-selected: #dff3e9;

    --df-border-subtle: #e4ebe8;
    --df-border-default: #cfdad5;
    --df-border-strong: #aebdb7;
    --df-border-focus: var(--df-brand-primary);

    --df-text-primary: #101828;
    --df-text-secondary: #475467;
    --df-text-muted: #667085;
    --df-text-inverse: #ffffff;

    --df-status-success-bg: #ecfdf3;
    --df-status-success-border: #abefc6;
    --df-status-success-text: #067647;
    --df-status-warning-bg: #fffaeb;
    --df-status-warning-border: #fedf89;
    --df-status-warning-text: #b54708;
    --df-status-danger-bg: #fef3f2;
    --df-status-danger-border: #fecdca;
    --df-status-danger-text: #b42318;
    --df-status-info-bg: #eff6ff;
    --df-status-info-border: #bfdbfe;
    --df-status-info-text: #1d4ed8;

    --df-radius-xs: 3px;
    --df-radius-sm: 5px;
    --df-radius-md: 6px;
    --df-radius-lg: 8px;
    --df-shadow-xs: 0 1px 1px rgba(16, 24, 40, 0.04);
    --df-shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
    --df-shadow-md: 0 10px 28px rgba(16, 24, 40, 0.13);
    --df-shadow-lg: 0 20px 54px rgba(16, 24, 40, 0.18);

    --df-space-1: 4px;
    --df-space-2: 8px;
    --df-space-3: 12px;
    --df-space-4: 16px;
    --df-space-5: 20px;
    --df-font-xs: 12px;
    --df-font-sm: 13px;
    --df-font-md: 14px;
    --df-font-lg: 18px;

    --df-control-height-sm: 28px;
    --df-control-height-md: 32px;
    --df-grid-header-height: 34px;
    --df-grid-row-height: 31px;
    --df-grid-cell-x: 8px;
    --df-focus-ring: 0 0 0 3px rgba(11, 122, 75, 0.22);
    --df-disabled-bg: #f2f4f7;
    --df-disabled-text: #98a2b3;

    --df-brand: var(--df-brand-primary);
    --df-brand-strong: var(--df-brand-primary-hover);
    --df-brand-soft: var(--df-brand-primary-soft);
    --df-brand-mist: var(--df-brand-primary-mist);
    --df-danger: var(--df-status-danger-text);
    --df-warning: var(--df-status-warning-text);
    --df-success: var(--df-status-success-text);
    --df-ink: var(--df-text-primary);
    --df-muted: var(--df-text-secondary);
    --df-subtle: var(--df-text-muted);
    --df-page: var(--df-surface-page);
    --df-page-2: var(--df-surface-muted);
    --df-surface: var(--df-surface-panel);
    --df-surface-muted: #f5f8f7;
    --df-grid-head: #f2f5f7;
    --df-grid-hover: var(--df-surface-hover);
    --df-grid-selected: var(--df-surface-selected);
    --df-border: var(--df-border-default);
    --df-ring: rgba(11, 122, 75, 0.22);
}

html,
body,
.app-shell,
.app-main,
.app-content,
.module-surface,
.misa-list-page,
.misa-fullscreen-form,
.misa-report-catalog,
.misa-report-viewer,
.opening-balance-hub {
    background: var(--df-surface-page);
    color: var(--df-text-primary);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: var(--df-font-md);
    letter-spacing: 0;
}

.app-sidebar {
    background: var(--df-surface-shell);
    border-right: 1px solid var(--df-border-default);
    box-shadow: var(--df-shadow-xs);
}

.app-brand {
    min-height: 60px;
    padding: 8px 10px;
}

.app-brand-logo {
    border-radius: var(--df-radius-lg);
    box-shadow: none;
    height: 36px;
    width: 36px;
}

.app-brand strong,
.app-topbar strong,
.misa-list-heading,
.misa-form-titlebar h1 {
    color: var(--df-text-primary);
    font-weight: 750;
    letter-spacing: 0;
}

.app-nav {
    gap: 3px;
    padding: 8px 6px;
}

.app-nav-item {
    border-radius: var(--df-radius-md);
    color: var(--df-text-secondary);
    min-height: 34px;
    padding: 6px 9px;
}

.app-nav-icon {
    background: transparent;
    border: 0;
    color: var(--df-text-secondary);
    height: 24px;
    width: 24px;
}

.app-nav-item:hover {
    background: var(--df-surface-hover);
    color: var(--df-brand-primary-hover);
}

.app-nav-item.active {
    background: var(--df-brand-primary-soft);
    box-shadow: inset 3px 0 0 var(--df-brand-secondary);
    color: var(--df-brand-primary-hover);
}

.app-nav-item.active .app-nav-icon {
    color: var(--df-brand-primary);
}

.app-topbar {
    background: var(--df-surface-shell);
    border-bottom: 1px solid var(--df-border-default);
    box-shadow: none;
    min-height: 56px;
    padding: 0 16px;
}

.app-context,
.misa-list-page small,
.misa-list-toolbar span,
.misa-form-titlebar small,
.misa-form-status,
.report-status-message {
    color: var(--df-text-muted);
}

.misa-list-page {
    gap: 0;
}

.misa-list-heading {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.misa-list-tabs,
.misa-form-grid-tabs,
.purchase-voucher-grid-tabs,
.purchase-voucher-header-tabs,
.daka-tabs {
    background: var(--df-surface-panel);
    border-color: var(--df-border-default);
    border-top: 2px solid var(--df-brand-primary);
    min-height: 34px;
}

.misa-list-tabs button,
.misa-form-grid-tabs button,
.purchase-voucher-grid-tabs button,
.purchase-voucher-header-tabs button,
.daka-tabs button {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--df-text-secondary);
    font-size: var(--df-font-sm);
    font-weight: 650;
    height: 34px;
    padding: 0 14px;
}

.misa-list-tabs button.active,
.misa-form-grid-tabs button.active,
.purchase-voucher-grid-tabs button.active,
.purchase-voucher-header-tabs button.active,
.daka-tabs button.active {
    background: var(--df-surface-panel);
    border-bottom-color: var(--df-brand-primary);
    color: var(--df-brand-primary-hover);
}

.misa-list-toolbar,
.misa-selection-toolbar,
.report-toolbar-strip {
    align-items: center;
    background: var(--df-surface-panel);
    border-color: var(--df-border-default);
    gap: var(--df-space-2);
    min-height: 44px;
    padding: 6px 12px;
}

.misa-toolbar-left,
.misa-toolbar-right,
.misa-header-actions,
.misa-toolbar-icon-strip,
.misa-command-actions {
    gap: var(--df-space-2);
}

.misa-list-toolbar button,
.misa-selection-toolbar button,
.misa-grid-pager button,
.daka-grid-pager button,
.misa-command-bar button,
.form-commandbar button,
.misa-form-row-actions button,
.purchase-voucher-row-actions button,
.misa-secondary-button,
.misa-primary-button,
.report-toolbar-strip button,
.report-parameter-panel button,
.misa-icon-button,
.daka-icon-button,
.misa-grid-filter-button,
.misa-row-action-toggle,
.misa-split-toggle {
    align-items: center;
    background: var(--df-surface-panel);
    border: 1px solid var(--df-border-default);
    border-radius: var(--df-radius-md);
    box-shadow: none;
    color: var(--df-text-primary);
    display: inline-flex;
    font-size: var(--df-font-sm);
    font-weight: 650;
    height: var(--df-control-height-md);
    justify-content: center;
    line-height: 1;
    min-width: var(--df-control-height-md);
    padding: 0 11px;
    white-space: nowrap;
}

.misa-list-toolbar button.icon-only,
.misa-toolbar-icon-strip button,
.misa-icon-button,
.daka-icon-button,
.misa-grid-filter-button,
.misa-row-action-toggle,
.misa-split-toggle {
    padding: 0;
    width: var(--df-control-height-md);
}

.misa-grid-filter-button {
    height: 28px;
    min-width: 28px;
    width: 28px;
}

.misa-list-toolbar button:hover:not(:disabled),
.misa-selection-toolbar button:hover:not(:disabled),
.misa-grid-pager button:hover:not(:disabled),
.daka-grid-pager button:hover:not(:disabled),
.misa-command-bar button:hover:not(:disabled),
.form-commandbar button:hover:not(:disabled),
.misa-form-row-actions button:hover:not(:disabled),
.purchase-voucher-row-actions button:hover:not(:disabled),
.misa-secondary-button:hover:not(:disabled),
.report-toolbar-strip button:hover:not(:disabled),
.report-parameter-panel button:hover:not(:disabled),
.misa-icon-button:hover:not(:disabled),
.daka-icon-button:hover:not(:disabled),
.misa-grid-filter-button:hover:not(:disabled),
.misa-row-action-toggle:hover:not(:disabled) {
    background: var(--df-surface-hover);
    border-color: var(--df-brand-primary);
    color: var(--df-brand-primary-hover);
}

.misa-list-toolbar button.primary,
.misa-command-bar button.primary,
.misa-primary-button,
.report-toolbar-strip button.primary,
.report-parameter-panel button.primary,
.btn-primary {
    background: var(--df-brand-primary);
    border-color: var(--df-brand-primary);
    color: var(--df-text-inverse);
}

.misa-list-toolbar button.primary:hover:not(:disabled),
.misa-command-bar button.primary:hover:not(:disabled),
.misa-primary-button:hover:not(:disabled),
.report-toolbar-strip button.primary:hover:not(:disabled),
.report-parameter-panel button.primary:hover:not(:disabled),
.btn-primary:hover {
    background: var(--df-brand-primary-hover);
    border-color: var(--df-brand-primary-hover);
    color: var(--df-text-inverse);
}

button:disabled,
.misa-list-toolbar button:disabled,
.misa-command-bar button:disabled,
.form-commandbar button:disabled,
.misa-grid-pager button:disabled,
.app-shell input:disabled,
.app-shell select:disabled,
.app-shell textarea:disabled {
    background: var(--df-disabled-bg);
    color: var(--df-disabled-text);
    cursor: not-allowed;
    opacity: 1;
}

.app-shell input:not(.daka-search-box-input),
.app-shell select,
.app-shell textarea,
.misa-grid-cell-input,
.misa-lookup-value,
.misa-filter-drawer input,
.misa-filter-drawer select,
.misa-column-filter input,
.misa-column-filter select,
.report-parameter-panel input,
.report-parameter-panel select {
    background: var(--df-surface-panel);
    border: 1px solid var(--df-border-strong);
    border-radius: var(--df-radius-sm);
    color: var(--df-text-primary);
    font-size: var(--df-font-sm);
    min-height: var(--df-control-height-sm);
}

.app-shell input:focus-visible,
.app-shell select:focus-visible,
.app-shell textarea:focus-visible,
button:focus-visible,
.app-nav-item:focus-visible,
.misa-lookup-value:focus-within {
    border-color: var(--df-border-focus) !important;
    box-shadow: var(--df-focus-ring) !important;
    outline: 0;
}

.daka-search-box {
    align-items: center;
    background: #fff;
    border: 1px solid #b8c5cf;
    border-radius: 6px;
    box-sizing: border-box;
    display: flex;
    height: 34px;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.daka-search-box-icon {
    align-items: center;
    color: #334155;
    display: inline-flex;
    flex: 0 0 34px;
    height: 100%;
    justify-content: center;
    pointer-events: none;
}

.daka-search-box-input,
.app-shell .daka-search-box-input {
    background: transparent;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    box-sizing: border-box;
    color: #0f172a;
    flex: 1 1 auto;
    font: inherit;
    height: 100%;
    min-height: 0;
    min-width: 0;
    outline: 0;
    padding: 0 10px 0 0;
    width: 100%;
}

.daka-search-box-input::placeholder {
    color: #94a3b8;
}

.daka-search-box:focus-within {
    border-color: #0b7a43;
    box-shadow: 0 0 0 2px rgba(11, 122, 67, 0.12);
}

.misa-global-search.daka-search-box,
.misa-table-settings-search.daka-search-box,
.document-audit-search.daka-search-box,
.opening-entry-search.daka-search-box,
.misa-report-search.daka-search-box {
    border-color: var(--df-brand-primary);
    border-radius: var(--df-radius-sm);
    display: flex;
    height: 34px;
}

.misa-global-search.daka-search-box {
    flex: 0 1 320px;
    min-width: 260px;
}

.misa-table-settings-search.daka-search-box,
.document-audit-search.daka-search-box,
.opening-entry-search.daka-search-box {
    max-width: 420px;
}

.misa-data-grid-shell,
.daka-grid-shell,
.table-shell,
.misa-list-workspace,
.misa-list-detail-pane,
.report-category-rail,
.report-index-list,
.report-parameter-panel,
.report-paper,
.voucher-grid-panel,
.purchase-voucher-grid-shell {
    background: var(--df-surface-panel);
    border: 1px solid var(--df-border-default);
    border-radius: var(--df-radius-md);
    box-shadow: none;
}

.misa-data-grid,
.daka-grid,
.purchase-voucher-table,
.misa-lookup-table {
    color: var(--df-text-primary);
    font-size: var(--df-font-sm);
}

.misa-data-grid th,
.daka-grid th,
.purchase-voucher-table th,
.misa-lookup-table th {
    background: var(--df-grid-head);
    border-bottom: 1px solid var(--df-border-default);
    color: var(--df-text-primary);
    font-size: var(--df-font-sm);
    font-weight: 750;
    height: var(--df-grid-header-height);
    padding: 0 var(--df-grid-cell-x);
}

.misa-data-grid td,
.daka-grid td,
.purchase-voucher-table td,
.misa-lookup-table td {
    background: var(--df-surface-panel);
    border-bottom: 1px solid var(--df-border-subtle);
    border-right: 1px solid var(--df-border-subtle);
    height: var(--df-grid-row-height);
    padding: 3px var(--df-grid-cell-x);
    vertical-align: middle;
}

.misa-data-grid tbody tr:hover td,
.daka-grid tbody tr:hover td,
.purchase-voucher-table tbody tr:hover td,
.misa-lookup-table tbody tr:hover td {
    background: var(--df-surface-hover);
}

.misa-data-grid tr.selected td,
.daka-grid tr.selected td,
.misa-lookup-table tbody tr.selected td,
.misa-data-grid tbody tr:has(.misa-check input:checked) td,
.daka-grid tbody tr:has(.misa-check input:checked) td {
    background: var(--df-surface-selected);
}

.misa-data-grid tbody tr.daka-document-row-posted td,
.daka-grid tbody tr.daka-document-row-posted td,
.misa-data-grid tbody tr.daka-document-row-posted .misa-grid-link,
.daka-grid tbody tr.daka-document-row-posted .daka-grid-link {
    color: var(--df-status-success-text);
}

.misa-data-grid tbody tr.daka-document-row-unposted td,
.daka-grid tbody tr.daka-document-row-unposted td,
.misa-data-grid tbody tr.daka-document-row-unposted .misa-grid-link,
.daka-grid tbody tr.daka-document-row-unposted .daka-grid-link {
    color: var(--df-status-warning-text);
}

.misa-lookup-table-wrap:has(.misa-lookup-table--object-party) {
    overflow-x: hidden;
}

.misa-lookup-table-wrap:has(.misa-lookup-table--employee) {
    overflow-x: hidden;
}

.misa-lookup-table-wrap:has(.misa-lookup-table--account) {
    overflow-x: hidden;
}

.misa-lookup-table-wrap:has(.misa-lookup-table--bank-account) {
    overflow-x: hidden;
}

.misa-lookup-table--object-party {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.misa-lookup-table--employee {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.misa-lookup-table--account {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.misa-lookup-table--bank-account {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.misa-lookup-table--item {
    min-width: 820px;
    table-layout: fixed;
    width: 100%;
}

.misa-lookup-table--object-party th,
.misa-lookup-table--object-party td,
.misa-lookup-table--employee th,
.misa-lookup-table--employee td,
.misa-lookup-table--account th,
.misa-lookup-table--account td,
.misa-lookup-table--bank-account th,
.misa-lookup-table--bank-account td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-lookup-table--item th,
.misa-lookup-table--item td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.misa-lookup-table--item th {
    overflow-wrap: normal;
    white-space: normal;
    word-break: normal;
}

.misa-lookup-table--item td {
    white-space: nowrap;
}

.misa-lookup-table--item .misa-lookup-item-code {
    width: 168px;
}

.misa-lookup-table--item .misa-lookup-item-name {
    width: auto;
}

.misa-lookup-table--item .misa-lookup-item-stock {
    width: 120px;
}

.misa-lookup-table--item .misa-lookup-item-price {
    width: 160px;
}

.misa-lookup-table--item th:nth-child(3),
.misa-lookup-table--item td:nth-child(3),
.misa-lookup-table--item th:nth-child(4),
.misa-lookup-table--item td:nth-child(4) {
    text-align: right;
}

.misa-lookup-table--employee th:nth-child(1),
.misa-lookup-table--employee td:nth-child(1) {
    width: 132px;
}

.misa-lookup-table--employee th:nth-child(2),
.misa-lookup-table--employee td:nth-child(2) {
    width: auto;
}

.misa-lookup-table--account th:nth-child(1),
.misa-lookup-table--account td:nth-child(1) {
    width: 124px;
}

.misa-lookup-table--account th:nth-child(2),
.misa-lookup-table--account td:nth-child(2) {
    width: auto;
}

.misa-lookup-table--account th:nth-child(3),
.misa-lookup-table--account td:nth-child(3) {
    width: 128px;
}

.misa-lookup-table--object-party th:nth-child(1),
.misa-lookup-table--object-party td:nth-child(1) {
    width: 132px;
}

.misa-lookup-table--object-party th:nth-child(2),
.misa-lookup-table--object-party td:nth-child(2) {
    width: 238px;
}

.misa-lookup-table--object-party th:nth-child(3),
.misa-lookup-table--object-party td:nth-child(3) {
    width: 112px;
}

.misa-lookup-table--object-party th:nth-child(4),
.misa-lookup-table--object-party td:nth-child(4) {
    width: auto;
}

.misa-lookup-table--bank-account th:nth-child(1),
.misa-lookup-table--bank-account td:nth-child(1) {
    width: 180px;
}

.misa-lookup-table--bank-account th:nth-child(2),
.misa-lookup-table--bank-account td:nth-child(2) {
    width: 260px;
}

.misa-lookup-table--bank-account th:nth-child(3),
.misa-lookup-table--bank-account td:nth-child(3) {
    width: auto;
}

.misa-grid-head-cell,
.daka-grid-head-cell {
    align-items: center;
    gap: 6px;
    min-height: var(--df-grid-header-height);
}

.misa-grid-head-cell > span,
.daka-grid-head-cell > span:first-child {
    min-width: 0;
}

.misa-grid-filter-button,
.daka-grid-filter-button {
    height: 24px;
    min-width: 24px;
    opacity: 0;
    transition: opacity 120ms ease, border-color 120ms ease, background-color 120ms ease;
    width: 24px;
}

.misa-grid-filter-button svg,
.daka-grid-filter-button svg {
    height: 14px;
    width: 14px;
}

.misa-data-grid th:hover .misa-grid-filter-button,
.misa-data-grid th:focus-within .misa-grid-filter-button,
.misa-grid-filter-button.active,
.daka-grid th:hover .daka-grid-filter-button,
.daka-grid th:focus-within .daka-grid-filter-button,
.daka-grid-filter-button.active {
    opacity: 1;
}

.misa-data-grid th .misa-grid-column-resizer,
.daka-grid th .daka-grid-column-resizer {
    cursor: col-resize;
    inset-inline-end: 0;
    width: 7px;
}

.misa-resizable-column:hover .misa-grid-column-resizer,
.daka-grid-resizable-column:hover .daka-grid-column-resizer,
.misa-grid-column-resizer:hover,
.daka-grid-column-resizer:hover,
.is-column-resizing .misa-grid-column-resizer,
.is-column-resizing .daka-grid-column-resizer {
    background: color-mix(in srgb, var(--df-brand-primary) 28%, transparent);
    opacity: 1;
}

.misa-resizable-column:hover .misa-grid-column-resizer::after,
.daka-grid-resizable-column:hover .daka-grid-column-resizer::after {
    opacity: 1;
}

.misa-grid-footer td,
.daka-grid-footer td {
    background: #f7faf9;
    color: var(--df-text-primary);
    font-weight: 750;
}

.misa-grid-empty-row td {
    color: var(--df-text-muted);
    font-style: italic;
    text-align: center;
}

.misa-action-col,
.misa-data-grid th.misa-action-col {
    background: var(--df-surface-panel);
    box-shadow: -4px 0 10px rgba(16, 24, 40, 0.05);
}

.misa-grid-pager,
.daka-grid-pager {
    background: var(--df-surface-panel);
    border-color: var(--df-border-default);
    color: var(--df-text-secondary);
    min-height: 40px;
    padding: 6px 10px;
}

.misa-grid-pager select,
.daka-grid-pager select {
    height: 30px;
    min-height: 30px;
}

.misa-row-action-dropdown,
.misa-split-menu,
.misa-command-menu,
.misa-column-filter,
.misa-lookup-panel,
.misa-filter-drawer,
.misa-table-settings-panel,
.misa-import-dialog,
.misa-record-dialog,
.employee-record-dialog,
.fixed-asset-type-dialog,
.fixed-asset-period-dialog,
.misa-tgxq-dialog,
.misa-import-info-dialog {
    background: var(--df-surface-panel);
    border: 1px solid var(--df-border-default);
    border-radius: var(--df-radius-lg);
    box-shadow: var(--df-shadow-md);
}

.misa-filter-drawer {
    width: min(420px, calc(100vw - 24px));
}

.misa-filter-drawer-header,
.misa-table-settings-header,
.misa-import-dialog header,
.misa-record-dialog header,
.employee-dialog-header,
.fixed-asset-type-dialog header,
.fixed-asset-period-dialog header,
.misa-tgxq-dialog header,
.misa-import-info-dialog header {
    border-color: var(--df-border-default);
    color: var(--df-text-primary);
    min-height: 44px;
}

.misa-filter-control span,
.misa-form-fields span,
.misa-form-side span,
.purchase-voucher-form label > span,
.report-parameter-panel label span {
    color: var(--df-text-primary);
    font-size: var(--df-font-xs);
    font-weight: 700;
}

.misa-fullscreen-form.purchase-voucher-form,
.misa-fullscreen-form.cash-bank-voucher-form,
.misa-fullscreen-form,
.purchase-voucher-form {
    background: var(--df-surface-page);
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-titlebar,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-titlebar,
.misa-form-titlebar,
.purchase-voucher-titlebar {
    background: var(--df-surface-panel);
    border-bottom: 1px solid var(--df-border-default);
    border-top: 2px solid var(--df-brand-primary);
    box-shadow: none;
    min-height: 44px;
    padding: 0 12px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-titlebar h1,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-titlebar h1,
.misa-form-titlebar h1,
.purchase-voucher-titlebar h1 {
    font-size: 20px;
    line-height: 1.1;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-head,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-head,
.misa-form-head,
.purchase-voucher-head,
.voucher-header-grid,
.voucher-context-strip,
.voucher-bottom-strip,
.purchase-voucher-lower {
    background: #eef2f4;
    border-color: var(--df-border-default);
    box-shadow: none;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-fields input,
.misa-fullscreen-form.purchase-voucher-form .misa-form-side input,
.misa-fullscreen-form.purchase-voucher-form .misa-form-currency select,
.misa-fullscreen-form.purchase-voucher-form .misa-lookup-value,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-fields input,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-side input,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-currency select,
.misa-fullscreen-form.cash-bank-voucher-form .misa-lookup-value,
.misa-form-fields input,
.misa-form-side input,
.misa-form-currency select {
    border-color: var(--df-border-strong);
    border-radius: var(--df-radius-sm);
    height: var(--df-control-height-sm);
    min-height: var(--df-control-height-sm);
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-grid-tabs,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-grid-tabs {
    border-color: var(--df-border-default);
    border-radius: var(--df-radius-md) var(--df-radius-md) 0 0;
    flex-basis: 38px;
    min-height: 38px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-grid-tabs button,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-grid-tabs button {
    height: 38px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-grid,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-grid {
    border-color: var(--df-border-default);
    border-radius: 0 0 var(--df-radius-md) var(--df-radius-md);
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-total b,
.misa-fullscreen-form.cash-bank-voucher-form .misa-form-total b,
.misa-form-total b {
    color: var(--df-text-primary);
    font-size: 34px;
    font-weight: 800;
}

.misa-attachment-box {
    background: var(--df-surface-panel);
    border-color: var(--df-border-default);
}

.misa-command-bar,
.form-commandbar,
.misa-fullscreen-form.purchase-voucher-form .misa-command-bar,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar {
    background: #202b33;
    border-top: 1px solid #33424c;
    box-shadow: 0 -10px 22px rgba(16, 24, 40, 0.14);
    color: var(--df-text-inverse);
    min-height: 52px;
    padding: 8px 14px;
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar button,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar button,
.misa-command-bar button,
.form-commandbar button {
    background: #34404a;
    border-color: #596673;
    color: var(--df-text-inverse);
    height: var(--df-control-height-md);
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar button.primary,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar button.primary,
.misa-command-bar button.primary,
.form-commandbar button.primary {
    background: var(--df-brand-primary);
    border-color: var(--df-brand-primary);
    color: var(--df-text-inverse);
}

.misa-fullscreen-form.purchase-voucher-form .misa-command-bar .misa-command-caret.primary,
.misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar .misa-command-caret.primary,
.misa-command-bar .misa-command-caret.primary {
    flex: 0 0 34px;
    max-width: 34px;
    min-width: 34px;
    width: 34px;
}

.misa-list-status,
.misa-form-status,
.report-status-message,
.opening-balance-hub-status,
.app-shell-toast {
    background: var(--df-status-success-bg);
    border: 1px solid var(--df-status-success-border);
    border-radius: var(--df-radius-md);
    color: var(--df-status-success-text);
    box-shadow: none;
}

.misa-list-status.error,
.misa-form-status.error,
.report-status-message.error,
.opening-balance-hub-status.error,
.validation-message,
.misa-import-status.error,
.misa-import-badge.error {
    background: var(--df-status-danger-bg);
    border-color: var(--df-status-danger-border);
    color: var(--df-status-danger-text);
}

.report-card,
.report-section,
.report-link-grid a,
.report-option-list label,
.metric-card,
.module-card,
.summary-panel,
.doc-list,
.checklist-panel,
.module-overview-card {
    background: var(--df-surface-panel);
    border-color: var(--df-border-default);
    border-radius: var(--df-radius-lg);
    box-shadow: none;
}

.report-card:hover,
.report-link-grid a:hover,
.module-card:hover,
.metric-card:hover,
.module-overview-card:hover {
    border-color: color-mix(in srgb, var(--df-brand-primary) 42%, var(--df-border-default));
    box-shadow: var(--df-shadow-sm);
}

.misa-modal-backdrop,
.misa-dialog-backdrop,
.misa-filter-drawer-backdrop {
    background: rgba(16, 24, 40, 0.45);
    backdrop-filter: blur(2px);
}

.misa-form-custom-body {
    background: var(--df-surface-page);
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
}

/* W0 master-data mutation dialogs size themselves to the form content. */
.misa-record-dialog.compact,
.misa-record-dialog.medium,
.misa-record-dialog.wide {
    height: auto;
    max-width: calc(100vw - 24px);
    min-height: 0;
    width: fit-content;
}

.misa-record-dialog.compact.single-column,
.misa-record-dialog.compact.two-column {
    width: fit-content;
}

.misa-record-dialog.compact.single-column {
    min-width: min(360px, calc(100vw - 24px));
}

.misa-record-dialog.compact.two-column {
    min-width: min(500px, calc(100vw - 24px));
}

.misa-record-dialog.medium {
    min-width: min(540px, calc(100vw - 24px));
}

.misa-record-dialog.wide {
    min-width: min(700px, calc(100vw - 24px));
}

.misa-record-dialog.compact .misa-record-body,
.misa-record-dialog.medium .misa-record-body,
.misa-record-dialog.wide .misa-record-body {
    align-content: start;
    align-items: start;
    flex: 0 1 auto;
    gap: 10px 14px;
    grid-auto-rows: min-content;
    max-height: calc(100vh - 124px);
    padding: 14px;
}

.misa-record-dialog.compact.single-column .misa-record-body {
    grid-template-columns: minmax(0, 360px);
}

.misa-record-dialog.compact.two-column .misa-record-body {
    grid-template-columns: repeat(2, minmax(210px, 240px));
}

.misa-record-dialog.medium .misa-record-body,
.misa-record-dialog.wide .misa-record-body {
    grid-template-columns: repeat(2, minmax(220px, 280px));
}

.misa-record-dialog.wide .misa-record-body {
    grid-template-columns: repeat(3, minmax(190px, 220px));
}

.misa-record-dialog .misa-record-body label,
.misa-record-dialog .misa-record-body .misa-record-field {
    align-self: start;
    min-width: 0;
}

.misa-record-dialog .misa-record-body input,
.misa-record-dialog .misa-record-body textarea,
.misa-record-dialog .misa-record-body .misa-lookup-value {
    box-sizing: border-box;
    min-height: 30px;
    width: 100%;
}

.misa-record-dialog .misa-record-body textarea {
    height: auto;
    line-height: 1.35;
    min-height: 62px;
}

.misa-record-dialog .misa-record-body .misa-lookup {
    min-width: 0;
    width: 100%;
}

.misa-record-dialog .misa-record-body .misa-record-field--wide {
    grid-column: 1 / -1;
}

.misa-record-dialog .misa-record-body .misa-record-field--compact input,
.misa-record-dialog .misa-record-body .misa-record-field--number input {
    max-width: 180px;
}

.misa-record-dialog .misa-record-body .misa-record-field--compact:not(.misa-record-field--wide) {
    justify-self: start;
    width: min(100%, 220px);
}

.misa-record-dialog .misa-record-body label.misa-record-checkbox {
    margin-top: 2px;
    min-height: 28px;
}

@media (max-width: 720px) {
    .misa-record-dialog.compact,
    .misa-record-dialog.medium,
    .misa-record-dialog.wide {
        width: calc(100vw - 16px);
    }

    .misa-record-dialog.compact.two-column .misa-record-body,
    .misa-record-dialog.medium .misa-record-body,
    .misa-record-dialog.wide .misa-record-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

.cash-count-voucher-form .purchase-voucher-head {
    grid-template-columns: minmax(0, 1fr) 260px;
    padding: 12px 14px;
}

.cash-count-voucher-form .purchase-voucher-fields {
    grid-template-columns: minmax(360px, 1fr) 180px;
}

.cash-count-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding: 12px;
}

.cash-count-section {
    background: var(--df-surface-panel);
    border: 1px solid var(--df-border-default);
    border-radius: var(--df-radius-md);
    overflow: hidden;
}

.cash-count-members {
    flex: 0 0 auto;
}

.cash-count-section-title {
    align-items: center;
    background: var(--df-surface-panel);
    border-bottom: 1px solid var(--df-border-default);
    color: var(--df-text-primary);
    display: flex;
    font-size: var(--df-font-sm);
    font-weight: 700;
    gap: 4px;
    min-height: 32px;
    padding: 0 12px;
}

.cash-count-members .misa-data-grid-shell {
    min-height: 96px;
}

.cash-count-results {
    min-height: 330px;
}

.cash-count-grid-tabs {
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.cash-count-grid {
    min-height: 270px;
}

.cash-count-grid .misa-data-grid-shell {
    border: 0;
    border-radius: 0;
    min-height: 270px;
}

.cash-count-body .misa-grid-pager {
    display: none;
}

.cash-count-body .misa-form-row-actions {
    margin: 10px 12px 12px;
}

.cash-count-lower {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(360px, 470px) minmax(360px, 1fr);
}

.cash-count-summary-card {
    background: #e8eaee;
    border: 1px solid var(--df-border-default);
    border-radius: var(--df-radius-md);
    display: grid;
    gap: 10px;
    padding: 14px 16px;
}

.cash-count-summary-card div {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 150px;
}

.cash-count-summary-card span {
    color: var(--df-text-primary);
    font-size: var(--df-font-sm);
}

.cash-count-summary-card b {
    color: var(--df-text-primary);
    font-size: var(--df-font-sm);
    font-weight: 800;
    text-align: right;
}

.cash-count-text-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    grid-column: 1 / -1;
    max-width: 920px;
}

.cash-count-text-field input,
.cash-count-text-field textarea {
    background: var(--df-surface-panel);
    border: 1px solid var(--df-border-strong);
    border-radius: var(--df-radius-md);
    color: var(--df-text-primary);
    font-size: var(--df-font-sm);
    min-height: 28px;
    padding: 4px 10px;
}

.cash-count-text-field textarea {
    min-height: 52px;
    resize: vertical;
}

.cash-count-checkbox {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.cash-count-checkbox input {
    accent-color: var(--df-brand-primary);
    height: 16px;
    width: 16px;
}

.cash-count-attachment {
    margin-top: 0;
    max-width: 420px;
}

/* Compact accounting form layout: keep voucher fields grouped instead of stretching every field across the canvas. */
.misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-head,
.misa-fullscreen-form.cash-bank-voucher-form:not(.cash-count-voucher-form) .misa-form-head,
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-head {
    align-items: start;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    padding: 10px 12px 14px;
    width: 100%;
}

.misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-fields,
.misa-fullscreen-form.cash-bank-voucher-form:not(.cash-count-voucher-form) .misa-form-fields,
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-fields {
    align-content: start;
    gap: 7px var(--daka-form-field-column-gap);
    grid-template-columns: repeat(2, minmax(0, var(--daka-field-text-width)));
    justify-content: start;
}

.misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-fields label.wide,
.misa-fullscreen-form.cash-bank-voucher-form:not(.cash-count-voucher-form) .misa-form-fields label.wide,
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-fields label.wide {
    grid-column: 1 / -1;
    max-width: var(--daka-field-long-text-width);
}

.misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-side,
.misa-fullscreen-form.cash-bank-voucher-form:not(.cash-count-voucher-form) .misa-form-side,
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side {
    align-self: start;
    justify-self: end;
    margin-left: auto;
    max-width: 300px;
    min-width: 260px;
    width: 100%;
}

@media (max-width: 980px) {
    .misa-list-toolbar,
    .misa-selection-toolbar,
    .report-toolbar-strip {
        align-items: stretch;
        flex-wrap: wrap;
        min-height: auto;
    }

    .misa-toolbar-left,
    .misa-toolbar-right {
        flex-wrap: wrap;
        width: 100%;
    }

    .misa-global-search,
    .daka-search-wrap {
        flex: 1 1 220px;
        min-width: min(100%, 220px);
    }

    .misa-fullscreen-form.purchase-voucher-form .misa-form-head,
    .misa-fullscreen-form.cash-bank-voucher-form .misa-form-head,
    .misa-form-head {
        grid-template-columns: 1fr;
    }

    .cash-count-voucher-form .purchase-voucher-fields,
    .cash-count-lower {
        grid-template-columns: 1fr;
    }

    .misa-command-bar,
    .form-commandbar {
        flex-wrap: wrap;
        min-height: 56px;
    }
}

/* Final shared override: keep document filter drawers compact and content-aligned. */
.misa-filter-drawer.compact {
    border-radius: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 16px 16px 0;
    width: min(420px, calc(100vw - 16px));
}

.misa-filter-drawer.compact .misa-filter-drawer-header {
    min-height: 36px;
    padding: 0 0 10px;
}

.misa-filter-drawer.compact .misa-filter-drawer-header strong {
    font-size: 22px;
    line-height: 1.1;
}

.misa-filter-drawer.compact .misa-filter-drawer-body {
    align-content: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
    overflow: auto;
    padding: 0 0 12px;
}

.misa-filter-drawer.compact .misa-filter-primary-fields {
    align-content: start;
    display: grid;
    gap: 11px;
    grid-auto-rows: max-content;
}

.misa-filter-drawer.compact .misa-filter-control {
    align-content: start;
    display: grid;
    gap: 5px;
}

.misa-filter-drawer.compact .misa-filter-control input,
.misa-filter-drawer.compact .misa-filter-control select {
    height: 28px;
    min-height: 28px;
}

.misa-filter-drawer.compact .misa-filter-date-grid {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.misa-filter-drawer.compact .misa-filter-checkline {
    align-items: center;
    display: grid;
    gap: 7px;
    grid-template-columns: 14px minmax(0, 1fr);
    margin-top: 0;
}

.misa-filter-drawer.compact .misa-filter-checkline span {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.misa-filter-drawer.compact .misa-filter-section-title,
.misa-filter-drawer.compact .misa-filter-column-picker,
.misa-filter-drawer.compact .misa-filter-fields {
    display: none;
}

.misa-filter-drawer.compact .misa-filter-drawer-actions {
    margin: 0 -16px;
    padding: 10px 16px;
}

@media (max-width: 640px) {
    .misa-filter-drawer.compact {
        width: 100vw;
    }

    .misa-filter-drawer.compact .misa-filter-date-grid {
        grid-template-columns: 1fr;
    }
}

.misa-grid-pager button.pager-icon,
.daka-grid-pager button.pager-icon {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 30px;
    padding: 0;
    width: 30px;
}
/* DakaFood Admin System Tools */
.admin-tool-page {
    min-height: 100%;
    background: var(--daka-surface-muted, #f3f5f7);
    color: var(--daka-text, #0f172a);
    padding: 16px;
}

.admin-tool-titlebar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.admin-tool-titlebar h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
}

.admin-tool-titlebar p {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    color: var(--daka-text-muted, #475569);
    font-size: 13px;
}

.admin-tool-filter {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) 150px 150px 200px minmax(220px, 1.3fr) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
}

.admin-tool-filter.compact {
    grid-template-columns: 180px 180px auto minmax(280px, 1fr);
}

.admin-tool-filter label {
    display: grid;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
}

.admin-tool-filter input,
.admin-tool-filter select,
.admin-tool-search input {
    min-height: 30px;
    border: 1px solid var(--daka-border, #cbd5e1);
    border-radius: 6px;
    background: #fff;
    padding: 4px 9px;
    font-size: 13px;
}

.admin-tool-filter input:focus,
.admin-tool-filter select:focus,
.admin-tool-search input:focus {
    border-color: var(--daka-primary, #0f8f5f);
    box-shadow: 0 0 0 2px rgba(15, 143, 95, 0.12);
    outline: none;
}

.admin-tool-filter b {
    color: #dc2626;
}

.admin-radio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    grid-column: 1 / -1;
    font-size: 13px;
    font-weight: 600;
}

.admin-radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.admin-tool-status {
    margin: 0 0 10px;
    border: 1px solid var(--daka-border, #cbd5e1);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
}

.admin-tool-status.is-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.admin-tool-status.is-error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.admin-tool-grid-shell {
    background: #fff;
    border: 1px solid var(--daka-border, #cbd5e1);
    border-radius: 8px;
    overflow: hidden;
}

.admin-tool-grid-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--daka-border, #cbd5e1);
}

.admin-tool-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 30px;
    min-width: 250px;
    border: 1px solid var(--daka-border, #cbd5e1);
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.admin-tool-search.wide {
    min-width: 320px;
}

.admin-tool-search:focus-within {
    border-color: var(--daka-primary, #0f8f5f);
    box-shadow: 0 0 0 2px rgba(15, 143, 95, 0.12);
}

.admin-tool-search .daka-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    z-index: 1;
    color: var(--daka-text-muted, #64748b);
    pointer-events: none;
    transform: translateY(-50%);
}

.admin-tool-search input {
    height: 100%;
    min-height: 0;
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0 10px 0 30px;
    box-shadow: none;
    outline: 0;
}

.admin-tool-search input:focus {
    border-color: transparent;
    box-shadow: none;
    outline: none;
}

.admin-tool-selected {
    font-size: 13px;
    color: var(--daka-text-muted, #475569);
}

.admin-tool-grid-scroll {
    overflow: auto;
    max-height: calc(100vh - 260px);
}

.admin-tool-grid {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-tool-grid.access-log {
    min-width: 1420px;
}

.admin-tool-grid th,
.admin-tool-grid td {
    border-bottom: 1px solid var(--daka-border, #d8e0e7);
    border-right: 1px dotted var(--daka-border, #d8e0e7);
    padding: 7px 10px;
    vertical-align: top;
}

.admin-tool-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef2f5;
    color: var(--daka-text, #0f172a);
    font-weight: 700;
    white-space: nowrap;
}

.admin-tool-grid tbody tr:hover {
    background: #f8fafc;
}

.admin-tool-grid tbody tr.is-selected {
    background: #e4f7ef;
}

.admin-check-cell {
    width: 42px;
    text-align: center;
}

.admin-money-cell {
    text-align: right;
    white-space: nowrap;
}

.admin-wrap-cell {
    white-space: pre-line;
}

.admin-empty-cell {
    color: var(--daka-text-muted, #64748b);
    text-align: center;
    padding: 24px;
}

.admin-tool-grid-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid var(--daka-border, #cbd5e1);
    font-size: 13px;
}

.admin-pagination {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-pagination select {
    height: 30px;
    border: 1px solid var(--daka-border, #cbd5e1);
    border-radius: 6px;
    background: #fff;
}

.admin-pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--daka-border, #cbd5e1);
    border-radius: 6px;
    background: #fff;
    color: var(--daka-text, #0f172a);
}

.admin-pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.daka-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    border: 1px solid var(--daka-border, #cbd5e1);
    border-radius: 6px;
    background: #fff;
    color: var(--daka-text, #0f172a);
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
}

.daka-button-primary {
    border-color: var(--daka-primary, #0f8f5f);
    background: var(--daka-primary, #0f8f5f);
    color: #fff;
}

.daka-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 1100px) {
    .admin-tool-filter,
    .admin-tool-filter.compact {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .admin-tool-grid-footer,
    .admin-tool-grid-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* DakaFood Shared Report UI */
.misa-report-shell {
    background: #f3f5f7;
    color: var(--daka-text, #0f172a);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.misa-report-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
    padding: 8px 14px;
    background: #fff;
    border-bottom: 1px solid var(--daka-border, #d4dde5);
}

.misa-report-title-main,
.misa-report-title-actions,
.misa-report-toolbar,
.misa-report-toolbar-left,
.misa-report-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.misa-report-title-main h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.misa-report-title-main p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 12px;
}

.misa-report-back {
    flex: 0 0 auto;
}

.misa-report-workspace {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    position: relative;
}

.misa-report-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 10px 14px 16px;
}

.misa-report-toolbar {
    flex: 0 0 auto;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 6px 0 10px;
}

.misa-report-search {
    width: min(320px, 34vw);
}

.misa-report-export-menu {
    position: relative;
    display: inline-flex;
}

.misa-report-export-menu > .daka-icon-button {
    gap: 3px;
    min-width: 42px;
}

.misa-report-export-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 210px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid var(--daka-border, #d4dde5);
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.misa-report-export-list a {
    display: block;
    padding: 8px 12px;
    color: #1f2937;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.misa-report-export-list a:hover,
.misa-report-export-list a:focus {
    background: #e7f5ee;
    color: var(--daka-primary, #008954);
    outline: 0;
}

.misa-report-paper-shell {
    background: #fff;
    border: 1px solid var(--daka-border, #d4dde5);
    border-radius: 8px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: contain;
}

.misa-report-paper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 16px 14px;
}

.s03a1-report-heading {
    flex: 0 0 auto;
    text-align: center;
    margin: 4px 0 18px;
}

.s03a1-report-heading h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
}

.s03a1-report-heading p {
    margin: 4px 0 0;
    font-size: 13px;
    font-style: italic;
    font-weight: 600;
}

.s03a1-table-wrap {
    border: 1px solid #cfd8e3;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.misa-report-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}

.misa-report-table th,
.misa-report-table td {
    height: 32px;
    padding: 6px 8px;
    border-right: 1px solid #cfd8e3;
    border-bottom: 1px solid #cfd8e3;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.misa-report-table th {
    background: #eef2f6;
    font-weight: 700;
    position: sticky;
    text-align: center;
    top: 0;
    z-index: 6;
}

.misa-report-table thead tr:nth-child(2) th {
    top: 32px;
}

.misa-report-table th.misa-report-filter-cell {
    overflow: visible;
    position: sticky;
}

.misa-report-filterable-heading {
    align-items: center;
    display: flex;
    gap: 4px;
    justify-content: center;
    min-width: 0;
}

.misa-report-filterable-heading.text-left {
    justify-content: space-between;
}

.misa-report-filterable-heading > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.misa-report-filterable-heading .misa-column-filter {
    left: 8px;
    text-align: left;
}

.misa-report-table th:hover .misa-grid-filter-button,
.misa-report-table th:focus-within .misa-grid-filter-button,
.misa-report-table .misa-grid-filter-button.active {
    opacity: 1;
}

.misa-report-table-resizable th.misa-report-resizable-header {
    position: sticky;
    padding-right: 14px;
}

.misa-report-table-resizable th.misa-report-resizable-header::after {
    content: "";
    position: absolute;
    top: 0;
    right: -3px;
    z-index: 2;
    width: 7px;
    height: 100%;
    cursor: col-resize;
}

.misa-report-table-resizable th.misa-report-resizable-header:hover::after,
.misa-report-table-resizing th.misa-report-resizable-header::after {
    background: color-mix(in srgb, var(--daka-primary, #008954) 28%, transparent);
}

.misa-report-column-resizing,
.misa-report-column-resizing * {
    cursor: col-resize !important;
    user-select: none;
}

.misa-report-table tbody tr:hover {
    background: #f7fbf9;
}

.misa-report-table tfoot td {
    background: #f4f6f8;
    bottom: 0;
    font-weight: 700;
    position: sticky;
    z-index: 5;
}

.misa-report-table .number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.misa-report-table .text-left {
    text-align: left;
}

.misa-report-empty {
    color: #64748b;
    text-align: center;
    font-style: italic;
}

.misa-report-footer-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 2px 0;
    color: #334155;
    font-size: 13px;
}

.misa-report-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    justify-content: flex-end;
    background: rgba(15, 23, 42, 0.48);
}

.misa-report-parameter-drawer {
    width: min(520px, 100vw);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -18px 0 34px rgba(15, 23, 42, 0.18);
}

.misa-report-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.misa-report-drawer-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.misa-report-parameter-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    padding: 14px 16px 16px;
}

.misa-report-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.misa-report-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
}

.misa-report-field.full {
    width: 100%;
}

.misa-report-field strong {
    color: #e11d48;
}

.misa-report-field input,
.misa-report-field select {
    height: 32px;
    padding: 4px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-weight: 500;
}

.misa-report-field input:focus,
.misa-report-field select:focus {
    outline: 2px solid rgba(0, 137, 84, 0.18);
    border-color: var(--daka-primary, #008954);
}

.misa-report-field input:disabled,
.misa-report-field select:disabled {
    background: #f1f5f9;
    color: #94a3b8;
}

.misa-report-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 13px;
}

.misa-report-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.misa-report-checkbox input {
    width: 14px;
    height: 14px;
    margin: 0;
}

.misa-report-checkbox input:disabled + span {
    color: #64748b;
}

.cash-daily-balance-report-paper,
.cash-daily-balance-report-table {
    min-width: 980px;
}

.cash-daily-balance-report-table:not([data-daka-report-resizable]) th:first-child,
.cash-daily-balance-report-table:not([data-daka-report-resizable]) td:first-child {
    width: 62%;
}

.cash-daily-balance-report-table .cash-daily-level-0 {
    padding-left: 28px;
}

.cash-daily-balance-report-table .cash-daily-level-1 {
    padding-left: 48px;
}

.cash-daily-balance-report-table .cash-daily-level-2 {
    padding-left: 72px;
}

.cash-daily-balance-report-table tr.cash-daily-row-group td {
    background: #f8fafc;
}

.cash-daily-balance-report-table tr.cash-daily-row-bold td {
    font-weight: 700;
}

.cash-daily-balance-report-table tr.cash-daily-row-italic td:first-child {
    font-style: italic;
}

.cash-daily-compare-row {
    flex-wrap: wrap;
}

.cash-daily-compare-row select {
    width: 82px;
    flex: 0 0 82px;
}

.cash-book-parameter-form {
    gap: 12px;
}

.cash-book-account-picker {
    max-height: 236px;
    overflow: auto;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
}

.cash-book-account-picker-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 13px;
}

.misa-report-grid-pager {
    align-items: center;
    background: #fff;
    border-top: 1px solid #cfd8e3;
    color: #334155;
    display: grid;
    flex: 0 0 42px;
    font-size: 13px;
    gap: 12px;
    grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
    min-height: 42px;
    padding: 5px 2px 0;
}

.misa-report-grid-pager-controls {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: center;
    white-space: nowrap;
}

.misa-report-grid-pager-controls label {
    align-items: center;
    display: flex;
    gap: 6px;
}

.misa-report-grid-pager-controls select {
    background: #fff;
    border: 1px solid #c7d0d8;
    border-radius: 4px;
    height: 30px;
    min-width: 58px;
    padding: 0 6px;
}

.misa-report-grid-pager-controls button {
    align-items: center;
    background: #fff;
    border: 1px solid #d2dae0;
    border-radius: 4px;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 30px;
}

.misa-report-grid-pager-controls button:hover:not(:disabled) {
    background: #eaf5ef;
    border-color: #8bc9a8;
    color: #08783f;
}

.misa-report-grid-pager-controls button:disabled {
    cursor: default;
    opacity: 0.4;
}

.misa-report-grid-total {
    justify-self: start;
}

.misa-report-grid-trailing {
    justify-self: end;
}

.cash-book-account-picker-table th,
.cash-book-account-picker-table td {
    height: 32px;
}

.cash-book-account-picker-table th:first-child,
.cash-book-account-picker-table td:first-child {
    width: 44px;
    text-align: center;
}

.cash-book-account-picker-table th:nth-child(2),
.cash-book-account-picker-table td:nth-child(2) {
    width: 112px;
}

.cash-book-account-picker-table th:last-child,
.cash-book-account-picker-table td:last-child {
    width: 72px;
}

.cash-book-account-picker-table tr.selected td {
    background: #e4f5ed;
    color: #007a4d;
}

.cash-fund-detail-account-selector {
    width: 100%;
}

.cash-fund-detail-account-selector .cash-book-account-picker {
    max-height: 292px;
}

.cash-book-report-paper,
.cash-book-report-table {
    min-width: 1180px;
}

.cash-book-report-table .cash-book-account-row td {
    background: #f8fafc;
    font-weight: 700;
}

.cash-book-report-table .cash-book-account-row .daka-icon {
    margin-right: 6px;
}

.misa-report-drawer-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.misa-report-cash-index {
    min-height: calc(100vh - 16px);
    padding: 0;
    background: #f3f5f7;
}

.misa-report-cash-index-body {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px 16px;
}

.misa-report-cash-index-rail,
.misa-report-cash-list {
    background: #fff;
    border: 1px solid var(--daka-border, #d4dde5);
    border-radius: 8px;
}

.misa-report-cash-index-rail {
    min-height: calc(100vh - 96px);
    padding: 10px;
}

.misa-report-cash-category {
    width: 100%;
    height: 36px;
    margin-top: 12px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    font-weight: 700;
    text-align: left;
}

.misa-report-cash-category.active {
    background: #e7f5ee;
    color: var(--daka-primary, #008954);
}

.misa-report-cash-list {
    min-height: calc(100vh - 96px);
    padding: 16px;
}

.misa-report-cash-section-title,
.misa-report-cash-link {
    display: flex;
    align-items: center;
}

.misa-report-cash-section-title {
    gap: 8px;
    margin-bottom: 12px;
}

.misa-report-cash-section-title h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.misa-report-cash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 28px;
}

.misa-report-cash-link {
    justify-content: space-between;
    min-height: 42px;
    padding: 0 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
}

.misa-report-cash-link:hover,
.misa-report-cash-link:focus {
    background: #f7fbf9;
    color: var(--daka-primary, #008954);
    outline: 0;
}

@media print {
    .app-sidebar,
    .misa-report-titlebar,
    .misa-report-toolbar,
    .misa-report-drawer-backdrop {
        display: none !important;
    }

    .misa-report-grid-pager {
        display: none !important;
    }

    .misa-report-shell,
    .misa-report-workspace,
    .misa-report-content,
    .misa-report-paper-shell {
        padding: 0 !important;
        margin: 0 !important;
        min-height: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        background: #fff !important;
    }

    .misa-report-paper {
        min-width: 0 !important;
        padding: 0 !important;
    }

    .misa-report-table {
        min-width: 0 !important;
        font-size: 11px;
    }
}

/* Accounting data management */
.app-dataset-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    max-width: 280px;
    padding: 4px 10px;
    border: 1px solid var(--daka-border, #cfd8dc);
    border-radius: 6px;
    color: var(--daka-text-strong, #0f172a);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.app-dataset-pill:hover,
.app-dataset-pill:focus-visible {
    border-color: var(--daka-primary, #008a5b);
    color: var(--daka-primary, #008a5b);
    outline: none;
}

.app-dataset-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-logout-form {
    display: inline-flex;
    margin: 0;
}

.app-logout-form button.app-dataset-pill {
    cursor: pointer;
    font-family: inherit;
}

.accounting-data-page {
    min-height: calc(100vh - 56px);
    padding: 14px 16px 18px;
    background: var(--daka-surface-muted, #f3f5f7);
    color: var(--daka-text, #1f2937);
}

.accounting-data-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
}

.accounting-data-header h1 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.2;
}

.accounting-data-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
}

.accounting-data-tabs button {
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--daka-text, #1f2937);
    font-weight: 700;
    cursor: pointer;
}

.accounting-data-tabs button.active {
    color: var(--daka-primary, #008a5b);
    border-bottom-color: var(--daka-primary, #008a5b);
}

.accounting-data-tabs button.disabled {
    color: #64748b;
    cursor: not-allowed;
}

.accounting-data-tabs span {
    display: inline-flex;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 10px;
    background: #f97316;
    color: #fff;
    font-size: 10px;
}

.accounting-data-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.accounting-data-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 14px;
    align-items: stretch;
    min-height: calc(100vh - 160px);
    padding: 20px;
    border-radius: 6px;
    background: #fff;
}

.accounting-data-card,
.accounting-data-add-card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    min-height: 92px;
    padding: 14px;
    border: 1px solid #c7d2da;
    border-radius: 6px;
    background: #fff;
    text-align: left;
}

.accounting-data-card.current {
    border-color: var(--daka-primary, #008a5b);
    box-shadow: inset 3px 0 0 var(--daka-primary, #008a5b);
}

.accounting-data-card-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--daka-primary, #008a5b);
}

.accounting-data-card-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.accounting-data-card-main strong,
.accounting-data-card-main span,
.accounting-data-card-main small,
.accounting-data-card-main em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accounting-data-card-main strong {
    font-size: 14px;
}

.accounting-data-card-main span,
.accounting-data-card-main em {
    color: #475569;
    font-size: 12px;
    font-style: normal;
}

.accounting-data-card-main small {
    color: var(--daka-primary, #008a5b);
    font-size: 12px;
    font-weight: 700;
}

.accounting-data-switch {
    align-self: center;
    padding: 6px 10px;
    border-radius: 5px;
    background: var(--daka-primary, #008a5b);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.accounting-data-add-card {
    grid-template-columns: 1fr;
    justify-items: center;
    color: var(--daka-primary, #008a5b);
    font-weight: 700;
    cursor: pointer;
}

.accounting-data-create-shell {
    width: min(760px, calc(100vw - 48px));
    margin: 24px auto;
    padding: 0 0 18px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .10);
}

.accounting-data-create-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 8px;
}

.accounting-data-create-title h2 {
    margin: 0;
    font-size: 18px;
}

.accounting-data-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
    gap: 14px 16px;
    padding: 8px 22px;
}

.accounting-data-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.accounting-data-field.wide,
.accounting-data-checkbox {
    grid-column: 1 / -1;
}

.accounting-data-field.compact {
    grid-column: span 1;
}

.accounting-data-field span,
.accounting-data-field legend {
    color: #111827;
    font-size: 12px;
    font-weight: 700;
}

.accounting-data-field strong {
    color: #ef4444;
}

.accounting-data-field input,
.accounting-data-field select {
    height: 30px;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 10px;
    background: #fff;
    color: #111827;
    font-size: 13px;
}

.accounting-data-field input:focus,
.accounting-data-field select:focus {
    border-color: var(--daka-primary, #008a5b);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 138, 91, .12);
}

.accounting-data-radio,
.accounting-data-checkbox,
.accounting-data-inline-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    color: #1f2937;
    font-size: 13px;
}

.accounting-data-radio {
    display: flex;
}

.accounting-data-inline-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.accounting-data-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px 0;
}

.accounting-data-status,
.accounting-data-loading {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.accounting-data-status.success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.accounting-data-status.error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.accounting-data-loading {
    border: 1px solid #dbe4ea;
    background: #fff;
    color: #475569;
}

/* DakaFood Shared Field Sizing System v1
   Keep accounting forms dense: bounded controls for dates, amounts, quantities,
   denominations, document numbers, currency and reference fields. */
:root {
    --daka-field-date-width: 172px;
    --daka-field-time-width: 116px;
    --daka-field-currency-width: 96px;
    --daka-field-document-width: var(--daka-field-date-width);
    --daka-field-money-width: 156px;
    --daka-field-denomination-width: 132px;
    --daka-field-quantity-width: 96px;
    --daka-field-account-width: 128px;
    --daka-field-code-width: 168px;
    --daka-field-reference-width: 420px;
    --daka-field-text-width: 320px;
    --daka-form-field-column-gap: 12px;
    --daka-field-long-text-width: calc(var(--daka-field-text-width) + var(--daka-form-field-column-gap) + var(--daka-field-text-width));
}

/* Shared Report owns the complete report anatomy. Report templates must not reintroduce
   module-surface/report-viewer/report-paper wrappers inside MisaReportShell. */

.shared-report-parameter-form input[type="date"]:not(.daka-date-input-picker),
.shared-report-parameter-form input[type="number"] {
    width: 100%;
}

.shared-report-parameter-form .daka-date-input-shell .daka-date-input-picker {
    box-sizing: border-box;
    inset-inline-end: 0;
    width: 34px;
}

.daka-date-input-shell {
    align-items: stretch;
    display: inline-flex;
    inline-size: var(--daka-field-date-width);
    max-inline-size: 100%;
    min-inline-size: min(100%, var(--daka-field-date-width));
    position: relative;
}

.daka-date-input-shell .daka-date-input-text {
    font-variant-numeric: tabular-nums;
    inline-size: 100%;
    letter-spacing: 0.01em;
    max-inline-size: none;
    padding-inline-end: 34px;
    text-align: left;
}

.daka-date-input-calendar {
    align-items: center;
    color: #52606d;
    display: inline-flex;
    inset-block: 0;
    inset-inline-end: 8px;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.daka-date-input-picker {
    border: 0;
    cursor: pointer;
    height: 100%;
    inset-block-start: 0;
    inset-inline-end: 0;
    opacity: 0.001;
    padding: 0;
    pointer-events: auto;
    position: absolute;
    width: 34px;
    z-index: 2;
}

.daka-date-input-shell:hover .daka-date-input-calendar,
.daka-date-input-shell:focus-within .daka-date-input-calendar {
    color: var(--daka-primary, #007f5f);
}

.daka-date-input-shell:focus-within .daka-date-input-text {
    border-color: var(--daka-primary, #007f5f);
    box-shadow: 0 0 0 2px rgba(0, 127, 95, 0.12);
}

.daka-date-input-picker:focus-visible {
    outline: none;
}

/* FB-00: generic filter input rules must not stretch the transparent native
   calendar control across the editable text field. Keep only the icon area clickable. */
.misa-filter-date-grid .daka-date-input-shell .daka-date-input-picker {
    box-sizing: border-box;
    inset-inline-end: 0;
    opacity: 0.001;
    padding: 0;
    width: 34px;
    z-index: 2;
}

.misa-filter-date-grid .daka-date-input-shell .daka-date-input-text {
    position: relative;
    z-index: 1;
}

.misa-filter-date-error {
    background: #fff4f2;
    border: 1px solid #f4b8b2;
    border-radius: 4px;
    color: #b42318;
    font-size: 12px;
    line-height: 1.35;
    padding: 7px 9px;
}

.daka-date-input-shell.invalid .daka-date-input-text {
    border-color: #d64545;
    box-shadow: 0 0 0 1px rgba(214, 69, 69, 0.12);
}

.daka-date-input-shell.invalid .daka-date-input-calendar {
    color: #d64545;
}

.shared-report-parameter-form .daka-date-input-shell,
.misa-filter-date-grid .daka-date-input-shell {
    inline-size: 100%;
    max-inline-size: none;
    min-inline-size: 0;
}

.daka-field-input,
.misa-fullscreen-form .daka-field-input {
    box-sizing: border-box;
    inline-size: min(100%, var(--daka-field-text-width));
    max-inline-size: 100%;
}

.daka-field-input--date,
.misa-fullscreen-form .daka-field-input--date {
    inline-size: var(--daka-field-date-width);
    max-inline-size: var(--daka-field-date-width);
}

.daka-field-input--time,
.misa-fullscreen-form .daka-field-input--time {
    inline-size: var(--daka-field-time-width);
    max-inline-size: var(--daka-field-time-width);
}

.daka-field-input--document-no,
.misa-fullscreen-form .daka-field-input--document-no {
    inline-size: var(--daka-field-document-width);
    max-inline-size: var(--daka-field-document-width);
}

.daka-field-input--currency,
.misa-fullscreen-form .daka-field-input--currency {
    inline-size: var(--daka-field-currency-width);
    max-inline-size: var(--daka-field-currency-width);
}

.daka-field-input--money,
.misa-fullscreen-form .daka-field-input--money {
    inline-size: var(--daka-field-money-width);
    max-inline-size: var(--daka-field-money-width);
    text-align: right;
}

.daka-field-input--denomination,
.misa-fullscreen-form .daka-field-input--denomination {
    inline-size: var(--daka-field-denomination-width);
    max-inline-size: var(--daka-field-denomination-width);
    text-align: right;
}

.daka-field-input--quantity,
.misa-fullscreen-form .daka-field-input--quantity {
    inline-size: var(--daka-field-quantity-width);
    max-inline-size: var(--daka-field-quantity-width);
    text-align: right;
}

.daka-field-input--reference,
.misa-fullscreen-form .daka-field-input--reference {
    inline-size: min(100%, var(--daka-field-reference-width));
    max-inline-size: var(--daka-field-reference-width);
}

.daka-field-input--long-text,
.misa-fullscreen-form .daka-field-input--long-text {
    inline-size: min(100%, var(--daka-field-long-text-width));
    max-inline-size: var(--daka-field-long-text-width);
}

.misa-form-fields label:has(.daka-field-input--date),
.misa-form-fields label:has(.daka-field-input--time),
.misa-form-fields label:has(.daka-field-input--document-no),
.misa-form-fields label:has(.daka-field-input--currency),
.misa-form-fields label:has(.daka-field-input--money),
.misa-form-fields label:has(.daka-field-input--denomination),
.misa-form-fields label:has(.daka-field-input--quantity),
.misa-form-side label:has(.daka-field-input--date),
.misa-form-side label:has(.daka-field-input--time),
.misa-form-side label:has(.daka-field-input--document-no),
.misa-form-side label:has(.daka-field-input--currency),
.misa-form-side label:has(.daka-field-input--money),
.misa-form-side label:has(.daka-field-input--denomination),
.misa-form-side label:has(.daka-field-input--quantity) {
    justify-items: start;
}

.cash-count-voucher-form .purchase-voucher-fields {
    align-content: start;
    gap: 8px 14px;
    grid-template-columns: minmax(280px, 470px) minmax(170px, 210px);
    justify-content: start;
}

.cash-count-voucher-form .purchase-voucher-fields label:has(.daka-field-input--reference) {
    max-width: var(--daka-field-reference-width);
}

.misa-form-currency select,
.purchase-voucher-grid-tabs .misa-form-currency select,
.cash-count-grid-tabs .misa-form-currency select {
    inline-size: var(--daka-field-currency-width);
    max-inline-size: var(--daka-field-currency-width);
    min-inline-size: var(--daka-field-currency-width);
}

.misa-form-exchange-rate-input {
    inline-size: var(--daka-field-money-width);
    max-inline-size: var(--daka-field-money-width);
}

.misa-data-grid col[data-column-kind="amount"] {
    width: var(--daka-field-money-width);
}

.misa-data-grid col[data-column-kind="denomination"] {
    width: var(--daka-field-denomination-width);
}

.misa-data-grid col[data-column-kind="quantity"] {
    width: var(--daka-field-quantity-width);
}

.misa-data-grid col[data-column-kind="date"] {
    width: var(--daka-field-date-width);
}

.misa-data-grid col[data-column-kind="time"] {
    width: var(--daka-field-time-width);
}

.misa-data-grid col[data-column-kind="currency"] {
    width: var(--daka-field-currency-width);
}

.misa-data-grid col[data-column-kind="account"] {
    width: var(--daka-field-account-width);
}

.misa-data-grid .daka-grid-input {
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
}

.misa-data-grid .daka-grid-input--amount {
    inline-size: 100%;
    max-inline-size: none;
}

.misa-data-grid .daka-grid-input--denomination {
    inline-size: 100%;
    max-inline-size: none;
}

.misa-data-grid .daka-grid-input--quantity {
    inline-size: 100%;
    max-inline-size: none;
}

.misa-data-grid .daka-grid-input--date {
    inline-size: 100%;
    max-inline-size: none;
}

.misa-data-grid .daka-grid-input--time {
    inline-size: 100%;
    max-inline-size: none;
}

.misa-data-grid .daka-grid-input--account {
    inline-size: 100%;
    max-inline-size: none;
}

.misa-data-grid .daka-grid-input--code {
    inline-size: 100%;
    max-inline-size: none;
}

.misa-data-grid .daka-grid-input--long-text,
.misa-data-grid .daka-grid-input--text {
    inline-size: 100%;
    max-inline-size: none;
}

.purchase-voucher-table input[type="date"] {
    inline-size: var(--daka-field-date-width);
    max-inline-size: var(--daka-field-date-width);
}

.purchase-voucher-table input.num {
    display: block;
    inline-size: min(100%, var(--daka-field-money-width));
    margin-left: auto;
    max-inline-size: var(--daka-field-money-width);
    text-align: right;
}

.purchase-voucher-table th.num,
.purchase-voucher-table td.num {
    text-align: right;
}

/* Scoped voucher column presets. Keep raw voucher table headers aligned with body cells without nth-child selectors. */
.purchase-voucher-grid-shell,
.purchase-voucher-grid-scroll {
    min-width: 0;
}

.purchase-voucher-grid-scroll {
    overflow-x: auto;
    overflow-y: auto;
}

.purchase-voucher-table,
.purchase-cost-allocation-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: max-content;
}

.purchase-voucher-table {
    min-width: 1540px;
}

.purchase-lines-table {
    min-width: 2300px;
}

.sales-voucher-table {
    min-width: 2220px;
}

.sales-voucher-items-table {
    min-width: 1580px;
}

.sales-voucher-cost-table {
    min-width: 1080px;
}

.misa-fullscreen-form.sales-voucher-form .misa-form-head.purchase-voucher-head {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    inline-size: 100%;
    max-inline-size: none;
}

.misa-fullscreen-form.sales-voucher-form .purchase-voucher-side {
    justify-self: end;
    margin-left: auto;
}

.inventory-voucher-table {
    min-width: 1420px;
}

.purchase-voucher-table th,
.purchase-cost-allocation-table th {
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.purchase-voucher-table col.voucher-col-row-no,
.purchase-cost-allocation-table col.voucher-col-row-no {
    width: 44px;
}

.purchase-voucher-table col.voucher-col-item-code {
    width: 130px;
}

.purchase-voucher-table col.voucher-col-item-name {
    width: 280px;
}

.sales-voucher-form .sales-voucher-table {
    inline-size: max-content;
    width: max-content;
}

.sales-voucher-form .sales-voucher-table col.voucher-col-item-name {
    width: 420px !important;
}

.inventory-voucher-table col.voucher-col-item-name {
    width: 300px;
}

.sales-voucher-form .sales-voucher-table th.sales-item-name-header,
.sales-voucher-form .sales-voucher-table td.sales-item-name-cell {
    max-inline-size: 420px;
    min-inline-size: 420px;
    width: 420px !important;
}

.sales-voucher-form .sales-voucher-table td.sales-item-name-cell {
    line-height: 1.35;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.inventory-voucher-table col.voucher-col-item-code {
    width: 150px;
}

.purchase-voucher-table col.voucher-col-warehouse {
    width: 130px;
}

.purchase-voucher-table col.voucher-col-account {
    width: 110px;
}

.purchase-voucher-table col.voucher-col-account-wide {
    width: 120px;
}

.purchase-voucher-table col.voucher-col-unit {
    width: 72px;
}

.purchase-voucher-table col.voucher-col-quantity {
    width: 110px;
}

.purchase-voucher-table col.voucher-col-price {
    width: 140px;
}

.purchase-voucher-table col.voucher-col-amount {
    width: 160px;
}

.purchase-voucher-table col.voucher-col-rate {
    width: 110px;
}

.purchase-voucher-table col.voucher-col-tax-amount {
    width: 150px;
}

.purchase-voucher-table col.voucher-col-group,
.purchase-voucher-table col.voucher-col-category {
    width: 180px;
}

.purchase-voucher-table col.voucher-col-code,
.purchase-voucher-table col.voucher-col-object-code {
    width: 150px;
}

.purchase-voucher-table col.voucher-col-object-name,
.purchase-cost-allocation-table col.voucher-col-object-name {
    width: 240px;
}

.purchase-voucher-table col.voucher-col-description {
    width: 280px;
}

.purchase-voucher-table col.voucher-col-toggle {
    width: 160px;
}

.purchase-voucher-table col.voucher-col-action {
    width: 80px;
}

.purchase-cost-allocation-table col.voucher-col-date {
    width: 120px;
}

.purchase-cost-allocation-table col.voucher-col-document {
    width: 140px;
}

.purchase-cost-allocation-table col.voucher-col-amount {
    width: 160px;
}

/* Shared voucher fit-to-width override. Keep purchase, sales, inventory and similar raw voucher tables professional without forced horizontal scrolling. */
.misa-fullscreen-form .purchase-voucher-grid-scroll {
    overflow-x: hidden;
    overflow-y: auto;
}

.misa-fullscreen-form .purchase-voucher-table,
.misa-fullscreen-form .purchase-lines-table,
.misa-fullscreen-form .sales-voucher-table,
.misa-fullscreen-form .sales-voucher-items-table,
.misa-fullscreen-form .sales-voucher-cost-table,
.misa-fullscreen-form .inventory-voucher-table,
.misa-fullscreen-form .purchase-cost-allocation-table {
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 100%;
    table-layout: fixed;
    width: 100%;
}

.misa-fullscreen-form .purchase-voucher-table col,
.misa-fullscreen-form .purchase-cost-allocation-table col {
    width: auto !important;
}

.misa-fullscreen-form .purchase-voucher-table col.voucher-col-row-no,
.misa-fullscreen-form .purchase-cost-allocation-table col.voucher-col-row-no,
.misa-fullscreen-form .purchase-voucher-table col.voucher-col-action {
    width: 3rem !important;
}

.misa-fullscreen-form .purchase-voucher-table th,
.misa-fullscreen-form .purchase-voucher-table td,
.misa-fullscreen-form .purchase-cost-allocation-table th,
.misa-fullscreen-form .purchase-cost-allocation-table td {
    min-inline-size: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.misa-fullscreen-form .purchase-voucher-table th,
.misa-fullscreen-form .purchase-cost-allocation-table th {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Lookup tables can be nested inside voucher grids; outer grid sticky-header rules must not cover dropdown rows. */
.misa-data-grid .misa-lookup-table th,
.daka-grid .misa-lookup-table th,
.purchase-voucher-table .misa-lookup-table th {
    overflow-wrap: normal;
    overflow: hidden;
    position: static;
    white-space: normal;
    word-break: normal;
    top: auto;
    z-index: auto;
}

.misa-fullscreen-form .purchase-voucher-table .misa-lookup-table--item th {
    overflow-wrap: normal;
    white-space: normal;
    word-break: normal;
}

.misa-fullscreen-form .purchase-voucher-table .misa-lookup-table--item td {
    white-space: nowrap;
}

.misa-fullscreen-form .purchase-voucher-table td,
.misa-fullscreen-form .purchase-cost-allocation-table td {
    white-space: nowrap;
}

.misa-fullscreen-form .purchase-voucher-table input,
.misa-fullscreen-form .purchase-voucher-table select,
.misa-fullscreen-form .purchase-voucher-table .misa-lookup,
.misa-fullscreen-form .purchase-voucher-table .misa-lookup-value,
.misa-fullscreen-form .purchase-cost-allocation-table input,
.misa-fullscreen-form .purchase-cost-allocation-table select {
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
}

@media (max-width: 980px) {
    .daka-field-input,
    .misa-fullscreen-form .daka-field-input,
    .daka-field-input--reference,
    .misa-fullscreen-form .daka-field-input--reference,
    .daka-field-input--long-text,
    .misa-fullscreen-form .daka-field-input--long-text {
        inline-size: 100%;
        max-inline-size: 100%;
    }

    .cash-count-voucher-form .purchase-voucher-fields {
        grid-template-columns: 1fr;
    }
}

/* 5119 layout refresh: dashboard widgets and compact system settings */
.ceo-dashboard {
    color: #1d2d26;
    display: grid;
    gap: 12px;
    margin: 0 auto;
    max-width: 1680px;
}

.ceo-dashboard-hero {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--df-border, #d9e4de);
    border-left: 4px solid #198754;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(32, 74, 55, 0.06);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    min-height: 112px;
    padding: 18px 20px;
}

.ceo-dashboard-hero h1 {
    color: #163d2b;
    font-size: 30px;
    font-weight: 760;
    line-height: 1.1;
    margin: 3px 0 6px;
}

.ceo-dashboard-hero > div:first-child > span {
    color: #64746d;
    display: block;
    font-size: 12px;
}

.ceo-dashboard .app-eyebrow {
    color: #0e7f45;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
}

.ceo-dashboard-hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.ceo-live-status {
    align-items: center;
    background: #eff8f3;
    border: 1px solid #cfe8da;
    border-radius: 8px;
    color: #1f6d43;
    display: inline-flex;
    font-size: 11px;
    font-weight: 720;
    gap: 7px;
    min-height: 34px;
    padding: 0 11px;
    white-space: nowrap;
}

.ceo-live-status i {
    background: #21a45e;
    border: 2px solid #c6edd8;
    border-radius: 50%;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.ceo-dashboard-hero-actions .daka-action.primary {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.ceo-dashboard .report-status-message {
    border-radius: 8px;
    margin: 0;
}

.ceo-financial-kpis {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ceo-financial-card {
    background: #ffffff;
    border: 1px solid var(--df-border, #d9e4de);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(27, 58, 47, 0.05);
    color: #1f3028;
    display: block;
    min-height: 148px;
    overflow: hidden;
    padding: 16px;
    position: relative;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ceo-financial-card:hover {
    border-color: #b9d7c7;
    box-shadow: 0 12px 28px rgba(27, 58, 47, 0.1);
    transform: translateY(-1px);
}

.ceo-financial-card::before,
.ceo-workspace-widget::before {
    content: "";
    inset: 0 0 auto;
    position: absolute;
}

.ceo-financial-card::before {
    height: 3px;
}

.ceo-financial-card.revenue::before {
    background: linear-gradient(90deg, #147a4b, #72c296);
}

.ceo-financial-card.profit::before {
    background: linear-gradient(90deg, #2f7688, #83b6c0);
}

.ceo-financial-card.cash::before {
    background: linear-gradient(90deg, #6d5a96, #b39bcf);
}

.ceo-financial-card.receivable::before {
    background: linear-gradient(90deg, #b87324, #e3b06c);
}

.ceo-kpi-label {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.ceo-kpi-label span {
    color: #5f7068;
    font-size: 11px;
    font-weight: 760;
}

.ceo-kpi-label i {
    align-items: center;
    background: #eef4f1;
    border-radius: 50%;
    color: #5f7168;
    display: inline-flex;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    height: 18px;
    justify-content: center;
    width: 18px;
}

.ceo-financial-card > strong {
    color: #18231f;
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-weight: 620;
    line-height: 1;
    margin: 16px 0 10px;
    position: relative;
    z-index: 2;
}

.ceo-financial-card > small {
    color: #76857e;
    display: block;
    font-size: 10px;
    line-height: 1.45;
    max-width: 70%;
    position: relative;
    z-index: 2;
}

.ceo-financial-spark {
    align-items: flex-end;
    bottom: 16px;
    display: flex;
    gap: 4px;
    height: 46px;
    justify-content: flex-end;
    position: absolute;
    right: 16px;
    width: 92px;
}

.ceo-financial-spark i {
    background: linear-gradient(180deg, #67c290, #198754);
    border-radius: 3px 3px 1px 1px;
    flex: 1;
    min-height: 4px;
}

.ceo-financial-progress {
    background: #edf3ef;
    border-radius: 999px;
    bottom: 18px;
    height: 6px;
    left: 16px;
    overflow: hidden;
    position: absolute;
    right: 16px;
}

.ceo-financial-progress i {
    background: linear-gradient(90deg, #2e7789, #79b6c2);
    border-radius: inherit;
    display: block;
    height: 100%;
}

.ceo-financial-meta {
    align-items: center;
    bottom: 17px;
    color: #7b8a83;
    display: flex;
    font-size: 10px;
    gap: 6px;
    left: 16px;
    position: absolute;
}

.ceo-financial-meta b {
    color: #40554b;
    font-size: 10px;
}

.ceo-financial-meta.warning b {
    color: #a86416;
}

.ceo-financial-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
}

.ceo-dashboard .app-panel {
    background: #ffffff;
    border: 1px solid var(--df-border, #d9e4de);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(27, 58, 47, 0.045);
    overflow: hidden;
}

.ceo-panel-title {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.ceo-panel-title > div h2 {
    color: #213a2f;
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
}

.ceo-panel-title > div span {
    color: #728079;
    display: block;
    font-size: 11px;
    margin-top: 3px;
}

.ceo-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.ceo-chart-legend span {
    align-items: center;
    color: #66766e;
    display: inline-flex;
    font-size: 10px;
    gap: 5px;
}

.ceo-chart-legend i {
    border-radius: 50%;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.ceo-chart-legend .draft {
    background: #789bab;
}

.ceo-chart-legend .posted {
    background: #24965f;
}

.ceo-financial-chart {
    align-items: flex-end;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), #edf1ef 25%);
    display: flex;
    gap: 12px;
    height: 230px;
    justify-content: space-around;
    min-width: 0;
    padding: 22px 20px 0;
}

.ceo-financial-chart-group {
    align-items: center;
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    max-width: 78px;
    min-width: 34px;
}

.ceo-financial-chart-bars {
    align-items: flex-end;
    display: flex;
    flex: 1;
    gap: 4px;
    justify-content: center;
    width: 100%;
}

.ceo-financial-chart-bars i {
    border-radius: 4px 4px 1px 1px;
    display: block;
    min-height: 4px;
    transition: height 240ms ease;
    width: min(20px, 38%);
}

.ceo-financial-chart-bars .revenue {
    background: linear-gradient(180deg, #52b77e, #16834f);
}

.ceo-financial-chart-bars .cogs {
    background: linear-gradient(180deg, #9bb2bc, #668896);
}

.ceo-financial-chart-group > span {
    color: #7e8b85;
    font-size: 10px;
    margin: 8px 0 10px;
    max-width: 80px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ceo-widget-empty {
    align-items: center;
    color: #87938d;
    display: flex;
    font-size: 12px;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.ceo-chart-footer {
    align-items: center;
    background: #f8fbf9;
    border-top: 1px solid #e2ebe6;
    color: #5d7067;
    display: flex;
    flex-wrap: wrap;
    font-size: 11px;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 16px;
}

.ceo-chart-footer b {
    color: #146f42;
}

.ceo-financial-health-body {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: 128px minmax(0, 1fr);
    padding: 22px 18px 16px;
}

.ceo-donut {
    align-items: center;
    background: conic-gradient(#1c8755 0 var(--ceo-posted), #d9e4de var(--ceo-posted) 100%);
    border-radius: 50%;
    display: grid;
    height: 124px;
    justify-items: center;
    position: relative;
    width: 124px;
}

.ceo-donut::after {
    background: #ffffff;
    border-radius: 50%;
    content: "";
    height: 88px;
    position: absolute;
    width: 88px;
}

.ceo-donut > div {
    display: grid;
    gap: 2px;
    justify-items: center;
    position: relative;
    z-index: 2;
}

.ceo-donut strong {
    color: #143b29;
    font-size: 20px;
}

.ceo-donut span {
    color: #76867f;
    font-size: 10px;
}

.ceo-health-list {
    display: grid;
    gap: 10px;
}

.ceo-health-list a {
    align-items: center;
    color: #53635b;
    display: grid;
    font-size: 11px;
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) auto;
    text-decoration: none;
}

.ceo-health-list a:hover {
    color: #147a4b;
}

.ceo-health-list span {
    align-items: center;
    display: flex;
    gap: 7px;
}

.ceo-health-list i {
    border-radius: 3px;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.ceo-health-list .inventory {
    background: #688747;
}

.ceo-health-list .purchase {
    background: #b77b38;
}

.ceo-health-list .receivable {
    background: #d2923f;
}

.ceo-health-list b {
    color: #364b41;
    font-size: 11px;
}

.ceo-insight {
    align-items: flex-start;
    background: #f4f8f6;
    border-top: 1px solid #e1ebe5;
    display: flex;
    gap: 8px;
    padding: 11px 14px;
}

.ceo-insight .daka-icon {
    color: #147a4b;
    flex: 0 0 auto;
}

.ceo-insight p {
    color: #607068;
    font-size: 11px;
    line-height: 1.45;
    margin: 0;
}

.ceo-insight b {
    color: #335448;
    display: block;
    font-size: 11px;
    margin-bottom: 2px;
}

.ceo-widget-warnings {
    background: #fff8ea;
    border: 1px solid #eeddb9;
    border-radius: 8px;
    color: #76551e;
    font-size: 11px;
    padding: 8px 11px;
}

.ceo-widget-warnings summary {
    cursor: pointer;
    font-weight: 720;
}

.ceo-widget-warnings ul {
    margin: 7px 0 0;
    padding-left: 18px;
}

.ceo-widget-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ceo-workspace-widget {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--df-border, #d9e4de);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(27, 58, 47, 0.045);
    color: #24372f;
    display: grid;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 128px;
    overflow: hidden;
    padding: 14px;
    position: relative;
    text-decoration: none;
}

.ceo-workspace-widget::before {
    background: #9aa7a1;
    height: 3px;
}

.ceo-workspace-widget:hover {
    border-color: #b9d7c7;
    box-shadow: 0 10px 24px rgba(27, 58, 47, 0.08);
}

.ceo-widget-icon,
.ceo-quick-icon {
    align-items: center;
    background: #eff6f2;
    border-radius: 8px;
    color: #157c48;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.ceo-widget-body {
    display: grid;
    min-width: 0;
}

.ceo-widget-body strong {
    color: #20362b;
    font-size: 13px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ceo-widget-body small {
    color: #708179;
    font-size: 10px;
    line-height: 1.35;
    margin-top: 3px;
}

.ceo-widget-metric {
    color: #203a2e;
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 620;
    line-height: 1;
    margin-top: 9px;
}

.ceo-widget-metric-note {
    color: #7e8b85;
    display: block;
    font-size: 10px;
    margin-top: 4px;
}

.ceo-workspace-widget em {
    align-self: end;
    color: #6e7f76;
    font-size: 10px;
    font-style: normal;
    font-weight: 760;
    grid-column: 2;
}

.ceo-workspace-widget.cash::before {
    background: #24a967;
}

.ceo-workspace-widget.bank::before {
    background: #287b8f;
}

.ceo-workspace-widget.purchase::before {
    background: #b9752a;
}

.ceo-workspace-widget.sales::before {
    background: #8061a8;
}

.ceo-workspace-widget.inventory::before {
    background: #607c38;
}

.ceo-workspace-widget.ledger::before {
    background: #456477;
}

.ceo-dashboard-secondary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
}

.ceo-dashboard .misa-dashboard-quicklinks {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ceo-dashboard .misa-dashboard-quicklinks > a {
    align-items: center;
    border-bottom: 1px solid #edf1ef;
    color: #34463d;
    display: grid;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 62px;
    padding: 12px;
    text-decoration: none;
}

.ceo-dashboard .misa-dashboard-quicklinks > a:nth-child(odd) {
    border-right: 1px solid #edf1ef;
}

.ceo-dashboard .misa-dashboard-quicklinks > a:hover {
    background: #f6fbf8;
}

.ceo-dashboard .misa-dashboard-quicklinks strong {
    color: #243a2e;
    display: block;
    font-size: 12px;
}

.ceo-dashboard .misa-dashboard-quicklinks div span {
    color: #78887f;
    display: block;
    font-size: 10px;
    margin-top: 2px;
}

.ceo-dashboard .misa-dashboard-quicklinks > a > b {
    color: #7d8b84;
    font-size: 18px;
    font-weight: 500;
}

.ceo-session-list {
    display: grid;
}

.ceo-session-list > div {
    align-items: center;
    border-bottom: 1px solid #edf1ef;
    display: grid;
    gap: 10px;
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 56px;
    padding: 11px 14px;
}

.ceo-session-list > div:last-child {
    border-bottom: 0;
}

.ceo-session-list svg {
    color: #147a4b;
}

.ceo-session-list span {
    color: #75857d;
    font-size: 10px;
}

.ceo-session-list strong {
    color: #273b31;
    display: block;
    font-size: 12px;
    grid-column: 2;
    min-width: 0;
    overflow-wrap: anywhere;
}

.system-settings-layout {
    display: grid;
    gap: 12px;
    grid-template-columns: 232px minmax(0, 1fr);
    height: calc(100dvh - 112px);
    margin: 0 auto;
    max-width: 1600px;
    min-height: 0;
}

.system-settings-nav {
    background: #ffffff;
    border: 1px solid #dce6e0;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(20, 62, 39, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.system-settings-nav-header {
    align-items: center;
    border-bottom: 1px solid #e5ece8;
    display: flex;
    gap: 10px;
    min-height: 60px;
    padding: 10px 14px;
}

.system-settings-nav-header div,
.system-settings-nav-footer div {
    display: grid;
    gap: 1px;
}

.system-settings-nav-header strong {
    color: #153c2a;
    font-size: 15px;
}

.system-settings-nav-header small,
.system-settings-nav-footer span {
    color: #75837b;
    font-size: 10px;
}

.system-settings-nav-icon {
    align-items: center;
    background: #e8f5ee;
    border-radius: 8px;
    color: #0b8a4a;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.system-settings-nav-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px;
}

.system-settings-nav-label {
    color: #829087;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 8px 8px 6px;
    text-transform: uppercase;
}

.system-settings-nav-label.tools {
    margin-top: 18px;
}

.system-settings-nav-list,
.system-settings-tool-list {
    display: grid;
    gap: 3px;
}

.system-settings-nav-list button,
.system-settings-tool-list a {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #34473d;
    cursor: pointer;
    display: grid;
    gap: 6px;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    min-height: 42px;
    padding: 5px 8px;
    text-align: left;
    text-decoration: none;
}

.system-settings-nav-list button:hover,
.system-settings-tool-list a:hover {
    background: #f1f7f4;
}

.system-settings-nav-list button.active {
    background: #e8f5ee;
    box-shadow: inset 3px 0 #0c9a53;
    color: #08783f;
}

.system-settings-nav-list button > span,
.system-settings-tool-list a > svg {
    color: #168a51;
}

.system-settings-nav-list button strong,
.system-settings-tool-list a span {
    font-size: 12px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-settings-nav-list button em {
    background: #edf2ef;
    border-radius: 8px;
    color: #617168;
    font-size: 9px;
    font-style: normal;
    font-weight: 720;
    justify-self: end;
    min-width: 24px;
    padding: 2px 5px;
    text-align: center;
}

.system-settings-nav-list button.active em {
    background: #ffffff;
    color: #08783f;
}

.system-settings-tool-list a {
    grid-template-columns: 30px minmax(0, 1fr);
}

.system-settings-nav-footer {
    align-items: center;
    border-top: 1px solid #e5ece8;
    display: flex;
    gap: 9px;
    min-height: 50px;
    padding: 9px 14px;
}

.system-settings-nav-footer i {
    background: #28ad67;
    border: 2px solid #cff0dc;
    border-radius: 50%;
    height: 8px;
    width: 8px;
}

.system-settings-nav-footer strong {
    color: #294438;
    font-size: 11px;
}

.system-settings-content {
    min-height: 0;
    min-width: 0;
}

.system-settings-content .module-surface {
    border-radius: 8px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.system-settings-content .module-titlebar {
    min-height: 66px;
    padding-bottom: 8px;
    padding-top: 8px;
}

.system-settings-content .module-workspace,
.system-settings-content .module-grid-region {
    min-height: 0;
}

@media (max-width: 1280px) {
    .ceo-financial-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ceo-widget-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ceo-financial-grid,
    .ceo-dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .system-settings-layout {
        grid-template-columns: 202px minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .ceo-dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .ceo-dashboard-hero h1 {
        font-size: 26px;
    }

    .ceo-dashboard-hero-actions,
    .ceo-live-status {
        justify-content: flex-start;
        width: 100%;
    }

    .ceo-financial-kpis,
    .ceo-widget-grid {
        grid-template-columns: 1fr;
    }

    .ceo-financial-card {
        min-height: 136px;
    }

    .ceo-financial-card > strong {
        font-size: 26px;
    }

    .ceo-financial-chart {
        gap: 6px;
        height: 190px;
        overflow-x: auto;
    }

    .ceo-financial-chart-group {
        flex: 0 0 48px;
    }

    .ceo-financial-health-body {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .ceo-donut {
        height: 108px;
        width: 108px;
    }

    .ceo-donut::after {
        height: 78px;
        width: 78px;
    }

    .ceo-dashboard .misa-dashboard-quicklinks {
        grid-template-columns: 1fr;
    }

    .ceo-dashboard .misa-dashboard-quicklinks > a:nth-child(odd) {
        border-right: 0;
    }

    .system-settings-layout {
        display: block;
        height: auto;
    }

    .system-settings-nav {
        margin-bottom: 10px;
    }

    .system-settings-nav-header,
    .system-settings-nav-footer {
        display: none;
    }

    .system-settings-nav-scroll {
        display: flex;
        gap: 8px;
        overflow-x: auto;
    }

    .system-settings-nav-label {
        display: none;
    }

    .system-settings-nav-list,
    .system-settings-tool-list {
        display: flex;
        flex: none;
    }

    .system-settings-nav-list button,
    .system-settings-tool-list a {
        min-width: 170px;
    }

    .system-settings-content {
        height: calc(100dvh - 170px);
    }
}

/* Phase 12 layout vNext: shared responsive shell, list and voucher contract. */
.app-mobile-menu,
.app-mobile-nav-backdrop {
    display: none;
}

.misa-form-header-option {
    margin-right: auto;
    min-width: 270px;
}

@media (max-width: 760px) {
    .app-shell,
    .app-shell.nav-collapsed {
        display: block;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        position: relative;
    }

    .app-sidebar,
    .app-shell.nav-collapsed .app-sidebar {
        background: var(--df-surface-shell);
        bottom: 0;
        box-shadow: 18px 0 42px rgba(16, 24, 40, 0.2);
        height: 100dvh;
        left: 0;
        max-height: none;
        overflow: hidden;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform 180ms ease;
        width: min(300px, 86vw);
        z-index: 1300;
    }

    .app-shell.mobile-nav-open .app-sidebar {
        transform: translateX(0);
    }

    .app-brand,
    .app-shell.nav-collapsed .app-brand {
        border-bottom: 1px solid var(--df-border-default);
        height: 58px;
        justify-content: flex-start;
        min-height: 58px;
        padding: 8px 12px;
    }

    .app-shell.nav-collapsed .app-brand > div,
    .app-shell.nav-collapsed .app-nav-label {
        display: block;
    }

    .app-nav,
    .app-shell.nav-collapsed .app-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        height: calc(100dvh - 58px);
        overflow-x: hidden;
        overflow-y: auto;
        padding: 8px;
    }

    .app-nav-item,
    .app-shell.nav-collapsed .app-nav-item {
        flex: 0 0 auto;
        grid-template-columns: 28px minmax(0, 1fr);
        justify-items: stretch;
        min-height: 38px;
        padding: 6px 9px;
        width: 100%;
    }

    .app-nav-footer {
        display: none;
    }

    .app-mobile-nav-backdrop {
        background: rgba(16, 24, 40, 0.42);
        border: 0;
        inset: 0;
        padding: 0;
        position: fixed;
        z-index: 1290;
    }

    .app-shell.mobile-nav-open .app-mobile-nav-backdrop {
        display: block;
    }

    .app-main {
        height: 100dvh;
        min-height: 0;
        min-width: 0;
        overflow: hidden;
        width: 100%;
    }

    .app-topbar {
        align-items: center;
        display: flex;
        flex-direction: row;
        gap: 8px;
        height: 56px;
        justify-content: flex-start;
        min-height: 56px;
        padding: 7px 9px;
    }

    .app-mobile-menu {
        align-items: center;
        background: var(--df-surface-panel);
        border: 1px solid var(--df-border-default);
        border-radius: var(--df-radius-md);
        color: var(--df-text-primary);
        display: inline-flex;
        flex: 0 0 36px;
        height: 36px;
        justify-content: center;
        padding: 0;
        width: 36px;
    }

    .app-topbar-heading {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-width: 0;
    }

    .app-topbar-heading .app-context,
    .app-topbar-heading strong {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-topbar-heading .app-context {
        font-size: 10px;
        line-height: 1.1;
    }

    .app-topbar-heading strong {
        font-size: 14px;
        line-height: 1.25;
    }

    .app-top-actions {
        flex: 0 1 auto;
        margin-left: auto;
        min-width: 0;
    }

    .app-dataset-pill {
        max-width: 150px;
        min-width: 0;
    }

    .app-dataset-pill span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-content {
        height: calc(100dvh - 56px);
        min-height: 0;
        overflow: hidden;
        padding: 6px 8px 8px;
    }

    .misa-list-page {
        border: 1px solid var(--df-border-default);
        border-radius: var(--df-radius-md);
        overflow: hidden;
    }

    .misa-list-tabs,
    .misa-form-grid-tabs,
    .purchase-voucher-grid-tabs,
    .daka-tabs {
        flex-wrap: nowrap;
        min-height: 38px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .misa-list-tabs button,
    .misa-form-grid-tabs button,
    .purchase-voucher-grid-tabs button,
    .daka-tabs button {
        flex: 0 0 auto;
        height: 38px;
        padding: 0 10px;
    }

    .misa-list-toolbar {
        align-items: stretch;
        display: grid;
        gap: 7px;
        grid-template-columns: minmax(0, 1fr);
        padding: 7px 8px;
    }

    .misa-toolbar-left {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        min-width: 0;
        width: 100%;
    }

    .misa-toolbar-right {
        align-items: center;
        display: grid;
        gap: 7px;
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
        width: 100%;
    }

    .misa-global-search,
    .daka-search-wrap {
        grid-column: 1 / -1;
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .misa-toolbar-icon-strip {
        grid-column: 1;
        grid-row: 2;
        justify-content: flex-start;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        width: 100%;
    }

    .misa-header-actions {
        flex-wrap: nowrap;
        grid-column: 1;
        grid-row: 3;
        justify-content: flex-start;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
        scrollbar-width: thin;
        width: 100%;
    }

    .misa-header-actions > * {
        flex: 0 0 auto;
    }

    .misa-grid-pager,
    .daka-grid-pager {
        display: grid;
        gap: 4px;
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 42px;
        padding: 5px 7px;
    }

    .misa-grid-pager > span,
    .daka-grid-pager > span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .misa-grid-pager-controls,
    .daka-grid-pager-controls {
        gap: 3px;
        min-width: 0;
    }

    .misa-grid-pager-controls label > span,
    .daka-grid-pager-controls label > span {
        display: none;
    }

    .misa-grid-pager-controls select,
    .daka-grid-pager-controls select {
        min-width: 54px;
        width: 54px;
    }

    .misa-grid-pager button,
    .daka-grid-pager button,
    .misa-grid-pager button.pager-icon,
    .daka-grid-pager button.pager-icon {
        height: 30px;
        min-width: 30px;
        padding: 0;
        width: 30px;
    }

    .misa-fullscreen-form {
        height: 100dvh;
        max-width: 100vw;
        overflow: hidden;
        width: 100vw;
    }

    .misa-fullscreen-form .misa-form-titlebar,
    .misa-fullscreen-form.purchase-voucher-form .misa-form-titlebar,
    .misa-fullscreen-form.cash-bank-voucher-form .misa-form-titlebar {
        align-items: center;
        display: grid;
        flex: 0 0 auto;
        gap: 5px 8px;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        min-height: 50px;
        padding: 6px 8px;
    }

    .misa-form-title-left {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .misa-form-titlebar h1,
    .misa-fullscreen-form.purchase-voucher-form .misa-form-titlebar h1,
    .misa-fullscreen-form.cash-bank-voucher-form .misa-form-titlebar h1 {
        display: -webkit-box;
        font-size: 16px;
        line-height: 1.15;
        max-height: 37px;
        min-width: 0;
        overflow: hidden;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .misa-form-icons {
        gap: 4px;
        grid-column: 2;
        grid-row: 1;
    }

    .misa-form-header-option,
    .misa-form-titlebar .misa-form-header-option {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0;
        min-width: 0;
        width: 100%;
    }

    .misa-fullscreen-form .misa-form-head,
    .misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-head,
    .misa-fullscreen-form.cash-bank-voucher-form:not(.cash-count-voucher-form) .misa-form-head,
    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-head {
        display: grid;
        flex: 0 0 auto;
        gap: 10px;
        grid-template-columns: minmax(0, 1fr);
        max-height: 43dvh;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 8px;
        width: 100%;
    }

    .misa-fullscreen-form .misa-form-fields,
    .misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-fields,
    .misa-fullscreen-form.cash-bank-voucher-form:not(.cash-count-voucher-form) .misa-form-fields,
    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-fields {
        display: grid;
        gap: 8px;
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
        width: 100%;
    }

    .misa-fullscreen-form .misa-form-fields label,
    .misa-fullscreen-form .misa-form-fields label.wide,
    .purchase-voucher-form .purchase-voucher-fields label,
    .purchase-voucher-form .purchase-voucher-fields label.wide {
        grid-column: auto;
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .misa-fullscreen-form .misa-form-side,
    .misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-side,
    .misa-fullscreen-form.cash-bank-voucher-form:not(.cash-count-voucher-form) .misa-form-side,
    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side {
        align-self: stretch;
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-self: stretch;
        margin: 0;
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .misa-fullscreen-form .misa-form-side label,
    .purchase-voucher-form .purchase-voucher-side label {
        min-width: 0;
    }

    .misa-fullscreen-form .misa-form-fields input,
    .misa-fullscreen-form .misa-form-side input,
    .misa-fullscreen-form .misa-lookup,
    .misa-fullscreen-form .misa-lookup-value,
    .purchase-voucher-form .purchase-voucher-fields input,
    .purchase-voucher-form .purchase-voucher-side input {
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .misa-form-total {
        align-items: end;
        display: flex;
        grid-column: 1 / -1;
        justify-content: space-between;
        min-width: 0;
    }

    .misa-fullscreen-form .misa-form-total b,
    .misa-fullscreen-form.purchase-voucher-form .misa-form-total b,
    .misa-fullscreen-form.cash-bank-voucher-form .misa-form-total b {
        font-size: 26px;
        line-height: 1;
        max-width: 70%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .misa-form-reference-strip {
        flex: 0 0 auto;
        max-height: 64px;
        overflow: auto;
    }

    .misa-form-grid-tabs {
        flex: 0 0 38px;
        min-height: 38px;
    }

    .misa-form-currency {
        flex: 0 0 auto;
        margin-left: auto;
        padding-right: 6px;
    }

    .misa-form-grid,
    .misa-fullscreen-form .misa-form-grid {
        flex: 1 1 160px;
        min-height: 120px;
    }

    .misa-command-bar,
    .form-commandbar,
    .misa-fullscreen-form.purchase-voucher-form .misa-command-bar,
    .misa-fullscreen-form.cash-bank-voucher-form .misa-command-bar {
        flex: 0 0 auto;
        max-height: 124px;
        min-height: 52px;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 7px 8px;
    }

    .misa-command-actions {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-end;
        margin-left: 0;
        width: 100%;
    }

    .misa-command-bar button,
    .form-commandbar button,
    .misa-document-surface .form-commandbar .daka-action {
        min-width: 68px;
        padding: 0 10px;
    }

    .misa-command-bar button.primary,
    .form-commandbar button.primary,
    .misa-document-surface .form-commandbar .daka-action.primary {
        min-width: 98px;
    }

    .misa-report-catalog .report-index-layout {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 8px;
        width: 100%;
    }

    .misa-report-catalog .report-category-rail {
        display: flex;
        flex: 0 0 auto;
        flex-direction: row;
        min-height: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 6px;
        scrollbar-width: thin;
        width: 100%;
    }

    .misa-report-catalog .report-category-rail button {
        flex: 0 0 auto;
        min-width: 138px;
    }

    .misa-report-catalog .report-index-list {
        flex: 0 0 auto;
        min-width: 0;
        overflow: visible;
        padding: 6px;
        width: 100%;
    }

    .misa-report-catalog .report-link-grid {
        grid-template-columns: minmax(0, 1fr);
        padding: 4px 6px;
    }

    .misa-report-catalog .report-link-grid a,
    .misa-report-catalog .report-link-disabled {
        grid-template-columns: 22px minmax(0, 1fr);
        min-width: 0;
        padding: 6px 8px;
    }

    .misa-report-catalog .report-link-grid a small,
    .misa-report-catalog .report-link-disabled small {
        grid-column: 2;
        overflow-wrap: anywhere;
    }

    .system-settings-layout {
        display: flex;
        flex-direction: column;
        gap: 8px;
        height: 100%;
        margin: 0;
        max-width: 100%;
        min-height: 0;
        min-width: 0;
        overflow: hidden;
        width: 100%;
    }

    .system-settings-nav {
        flex: 0 0 auto;
        margin: 0;
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .system-settings-nav-scroll {
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
    }

    .system-settings-nav-list,
    .system-settings-tool-list {
        flex: 0 0 max-content;
        min-width: max-content;
    }

    .system-settings-content {
        flex: 1 1 auto;
        height: auto;
        max-width: 100%;
        min-height: 0;
        min-width: 0;
        overflow: auto;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .app-dataset-pill {
        max-width: 132px;
    }

    .misa-list-toolbar button,
    .misa-command-bar button,
    .form-commandbar button {
        font-size: 12px;
    }

    .misa-grid-pager,
    .daka-grid-pager {
        font-size: 11px;
    }
}

@media (max-width: 760px) and (max-height: 700px) {
    .misa-fullscreen-form .misa-form-head,
    .misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-head,
    .misa-fullscreen-form.cash-bank-voucher-form:not(.cash-count-voucher-form) .misa-form-head {
        max-height: 38dvh;
    }
}
/* Configurable MISA keyboard shortcuts */
.shortcut-settings-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 22px;
    background: var(--surface, #fff);
    border: 1px solid #dce4ea;
    border-radius: 10px;
}

.shortcut-settings-header,
.shortcut-settings-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.shortcut-settings-header h1 {
    margin: 2px 0 4px;
}

.shortcut-settings-header p,
.shortcut-status + small {
    color: #5d6871;
}

.shortcut-settings-toolbar .daka-search-box {
    min-width: min(360px, 100%);
}

.shortcut-reason {
    display: grid;
    gap: 5px;
    flex: 1 1 360px;
}

.shortcut-reason span {
    font-size: 12px;
    font-weight: 700;
}

.shortcut-reason input,
.shortcut-settings-toolbar .daka-search-box input {
    width: 100%;
    min-height: 36px;
    border: 1px solid #b8c6d0;
    border-radius: 4px;
    padding: 6px 10px;
}

.shortcut-permission {
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.shortcut-permission.allowed { background: #e7f6ed; color: #176b3a; }
.shortcut-permission.readonly { background: #f3f5f7; color: #5c6670; }

.shortcut-settings-grid-wrap {
    overflow: auto;
    border: 1px solid #dce4ea;
    border-radius: 8px;
}

.shortcut-settings-grid {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
    font-size: 13px;
}

.shortcut-settings-grid th,
.shortcut-settings-grid td {
    padding: 10px;
    border-bottom: 1px solid #e5ebef;
    text-align: left;
    vertical-align: top;
}

.shortcut-settings-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f7f9;
}

.shortcut-settings-grid td:first-child {
    display: grid;
    gap: 4px;
}

.shortcut-settings-grid code {
    color: #66727c;
    font-size: 11px;
}

.shortcut-settings-grid kbd,
.shortcut-capture {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid #aebbc4;
    border-radius: 5px;
    background: #fff;
    color: #1f2b33;
    box-shadow: 0 1px 0 #d4dde3;
}

.shortcut-capture.recording {
    border-color: #1f8f5f;
    outline: 2px solid rgba(31, 143, 95, .2);
}

.shortcut-settings-grid tr.guarded { background: #fafbfc; }
.shortcut-settings-grid tr.guarded td { color: #66727c; }

.shortcut-status {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.shortcut-status.supported { background: #e7f6ed; color: #176b3a; }
.shortcut-status.guarded { background: #fff4d8; color: #845b00; }
.shortcut-status.unavailable { background: #f1f3f5; color: #606a73; }
.shortcut-status + small { display: block; margin-top: 5px; max-width: 260px; }
.shortcut-warning { color: #945b00; }
.shortcut-row-actions { white-space: nowrap; }
.shortcut-row-actions .daka-action + .daka-action { margin-left: 6px; }

@media (max-width: 900px) {
    .shortcut-settings-panel { padding: 14px; }
}

.formula-misa-workspace {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    background: #f1f3f4;
    color: #111827;
    font-size: 13px;
}

.formula-misa-workspace button,
.formula-misa-workspace input,
.formula-misa-workspace select,
.formula-misa-workspace textarea {
    font: inherit;
}

.formula-misa-titlebar {
    z-index: 2;
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 24px;
    border-bottom: 1px solid #d6dadd;
    background: #fff;
}

.formula-misa-titlebar h1 {
    overflow: hidden;
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.formula-misa-window-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.formula-misa-window-actions button,
.formula-management-panel > header button,
.formula-editor-dialog > header button {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #4b5563;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
}

.formula-misa-window-actions button:hover,
.formula-management-panel > header button:hover,
.formula-editor-dialog > header button:hover {
    background: #eef1f2;
    color: #111827;
}

.formula-misa-reportbar {
    display: flex;
    min-height: 66px;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
}

.formula-misa-reportbar > label {
    flex: 0 0 auto;
    color: #374151;
    font-weight: 500;
}

.formula-misa-reportbar > select {
    width: min(520px, 50vw);
    height: 36px;
    padding: 0 34px 0 10px;
    border: 1px solid #aeb6bd;
    border-radius: 3px;
    background: #fff;
    color: #111827;
}

.formula-misa-reportbar > select:focus,
.formula-misa-search:focus-within,
.formula-inline-input:focus,
.formula-editor-dialog input:focus,
.formula-editor-dialog textarea:focus,
.formula-editor-dialog select:focus {
    border-color: #2ca01c;
    outline: 1px solid #2ca01c;
}

.formula-profile-chip {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: #e8f4ec;
    color: #17733c;
    font-size: 12px;
    font-weight: 600;
}

.formula-version-button {
    min-height: 34px;
    margin-left: auto;
    padding: 0 13px;
    border: 1px solid #aeb6bd;
    border-radius: 3px;
    background: #fff;
    color: #26323d;
    cursor: pointer;
}

.formula-version-button:hover { background: #f7f8f8; }

.formula-misa-status {
    position: absolute;
    top: 66px;
    right: 24px;
    z-index: 20;
    display: flex;
    width: min(520px, calc(100vw - 48px));
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px 11px 14px;
    border: 1px solid;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgb(31 41 55 / 12%);
}

.formula-misa-status.success { border-color: #b9dbc4; background: #edf8f0; color: #176536; }
.formula-misa-status.error { border-color: #edb9b9; background: #fff0f0; color: #9d2525; }
.formula-misa-status button { padding: 0; border: 0; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }

.formula-misa-grid-panel {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    margin: 0 16px 12px;
    border: 1px solid #d0d5d8;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.formula-misa-grid-tools {
    display: flex;
    min-height: 50px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 7px 12px 7px 16px;
    border-bottom: 1px solid #d6dadd;
}

.formula-misa-grid-tools p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #4b5563;
    font-size: 12px;
    font-style: italic;
}

.formula-misa-grid-tools p > span {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2ca01c;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.formula-misa-search {
    display: flex;
    width: 260px;
    height: 34px;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border: 1px solid #b9c0c5;
    border-radius: 3px;
    background: #fff;
    color: #66717c;
}

.formula-misa-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
}

.formula-misa-search button { padding: 0; border: 0; background: transparent; color: #67727c; cursor: pointer; }

.formula-misa-table-scroll {
    position: relative;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
}

.formula-misa-table {
    width: 100%;
    min-width: 1740px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    color: #20272d;
    font-size: 12px;
}

.formula-misa-table .drag-column { width: 28px; }
.formula-misa-table .pin-column { width: 28px; }
.formula-misa-table .code-column { width: 105px; }
.formula-misa-table .name-column { width: 350px; }
.formula-misa-table .language-column { width: 210px; }
.formula-misa-table .note-column { width: 105px; }
.formula-misa-table .type-column { width: 230px; }
.formula-misa-table .formula-column { width: 340px; }
.formula-misa-table .edit-column { width: 38px; }
.formula-misa-table .print-column { width: 68px; }

.formula-misa-table th,
.formula-misa-table td {
    height: 36px;
    padding: 6px 8px;
    border-right: 1px solid #d9dddf;
    border-bottom: 1px solid #d9dddf;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.formula-misa-table th {
    position: sticky;
    top: 0;
    z-index: 4;
    height: 38px;
    background: #eceeef;
    color: #26323d;
    font-weight: 700;
}

.formula-misa-table tr:hover td { background: #f3f9f4; }
.formula-misa-table tr.is-selected td { background: #e8f5eb; }
.formula-misa-table tr.is-aggregate td { font-weight: 700; }
.formula-misa-table tr.positive-only td { color: #1f2937; }

.formula-misa-table th:nth-child(1),
.formula-misa-table td:nth-child(1) { position: sticky; left: 0; z-index: 3; width: 28px; }
.formula-misa-table th:nth-child(2),
.formula-misa-table td:nth-child(2) { position: sticky; left: 28px; z-index: 3; width: 28px; }
.formula-misa-table th:nth-child(3),
.formula-misa-table td:nth-child(3) { position: sticky; left: 56px; z-index: 3; width: 105px; }
.formula-misa-table th:nth-child(4),
.formula-misa-table td:nth-child(4) { position: sticky; left: 161px; z-index: 3; width: 28px; }
.formula-misa-table th:nth-child(5),
.formula-misa-table td:nth-child(5) { position: sticky; left: 189px; z-index: 3; width: 350px; box-shadow: 2px 0 3px rgb(15 23 42 / 8%); }

.formula-misa-table th:nth-child(-n+5) { z-index: 6; background: #eceeef; }
.formula-misa-table td:nth-child(-n+5) { background: #fff; }
.formula-misa-table tr:hover td:nth-child(-n+5) { background: #f3f9f4; }
.formula-misa-table tr.is-selected td:nth-child(-n+5) { background: #e8f5eb; }

.formula-drag-handle,
.formula-pin-cell,
.formula-edit-cell,
.formula-print-cell { text-align: center !important; }
.formula-drag-handle { color: #8a949c; cursor: grab; font-size: 14px; }
.formula-pin-cell { color: #8b969f; font-size: 13px; }
.formula-empty-cell { color: #b4bbc0; }
.formula-expression-cell > span { display: block; overflow: hidden; text-overflow: ellipsis; }

.formula-inline-input {
    width: 100%;
    height: 28px;
    padding: 3px 6px;
    border: 1px solid #9ba7af;
    border-radius: 2px;
    background: #fff;
}

.formula-inline-input.code { text-align: center; }

.formula-pencil-button {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #52606b;
    cursor: pointer;
    font-size: 16px;
}

.formula-pencil-button:hover:not(:disabled) { background: #dcefe0; color: #18783f; }
.formula-pencil-button:disabled { opacity: .4; cursor: not-allowed; }
.formula-print-cell input { width: 16px; height: 16px; accent-color: #2ca01c; }

.formula-misa-empty {
    position: sticky;
    left: 0;
    display: grid;
    min-height: 160px;
    place-items: center;
    color: #78838c;
}

.formula-misa-footer {
    display: flex;
    min-height: 64px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 24px;
    border-top: 1px solid #d6dadd;
    background: #fff;
}

.formula-misa-count { color: #65717b; font-size: 12px; }
.formula-misa-footer-actions,
.formula-management-actions,
.formula-preview-exports,
.formula-editor-dialog footer { display: flex; align-items: center; gap: 8px; }

.formula-misa-footer-actions button,
.formula-management-actions button,
.formula-version-row button,
.formula-editor-dialog footer button {
    min-width: 72px;
    min-height: 34px;
    padding: 0 15px;
    border: 1px solid #9da8b0;
    border-radius: 3px;
    background: #fff;
    color: #1f2933;
    font-weight: 600;
    cursor: pointer;
}

.formula-misa-footer-actions button:hover:not(:disabled),
.formula-management-actions button:hover:not(:disabled),
.formula-version-row button:hover:not(:disabled),
.formula-editor-dialog footer button:hover:not(:disabled) { background: #f4f6f7; }

.formula-misa-footer-actions button.primary,
.formula-editor-dialog footer button.primary {
    min-width: 112px;
    border-color: #2ca01c;
    background: #2ca01c;
    color: #fff;
}

.formula-misa-footer-actions button.primary:hover:not(:disabled),
.formula-editor-dialog footer button.primary:hover:not(:disabled) { background: #258b19; }
.formula-misa-workspace button:disabled { opacity: .5; cursor: not-allowed; }

.formula-management-panel {
    position: absolute;
    top: 54px;
    right: 0;
    bottom: 64px;
    z-index: 30;
    width: min(580px, 100vw);
    overflow: auto;
    padding: 18px;
    border-left: 1px solid #cbd1d5;
    background: #fff;
    box-shadow: -8px 0 22px rgb(15 23 42 / 16%);
}

.formula-management-panel > header,
.formula-editor-dialog > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.formula-management-panel > header p,
.formula-editor-dialog > header p { margin: 0 0 3px; color: #68737d; font-size: 11px; text-transform: uppercase; }
.formula-management-panel > header h2,
.formula-editor-dialog > header h2 { margin: 0; font-size: 20px; }

.formula-management-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.formula-management-fields label,
.formula-editor-dialog > label,
.formula-editor-options > label {
    display: grid;
    gap: 5px;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
}

.formula-management-fields label.wide { grid-column: 1 / -1; }
.formula-management-fields input,
.formula-management-fields select,
.formula-editor-dialog input,
.formula-editor-dialog select,
.formula-editor-dialog textarea {
    width: 100%;
    min-height: 35px;
    padding: 6px 8px;
    border: 1px solid #aeb6bd;
    border-radius: 3px;
    background: #fff;
    color: #111827;
}

.formula-management-actions { flex-wrap: wrap; margin: 16px 0; }
.formula-version-summary { display: grid; gap: 6px; padding: 12px; border-radius: 4px; background: #f4f6f7; color: #46515a; font-size: 12px; }
.formula-version-summary code { overflow-wrap: anywhere; color: #1f2937; }
.formula-version-comparison,
.formula-evaluation-preview { margin-top: 16px; padding-top: 16px; border-top: 1px solid #d9dddf; }
.formula-version-comparison h3,
.formula-evaluation-preview h3 { margin: 0 0 12px; font-size: 15px; }
.formula-version-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.formula-version-selectors label { display: grid; gap: 4px; color: #4b5563; font-size: 11px; }
.formula-version-selectors select { min-height: 32px; border: 1px solid #aeb6bd; border-radius: 3px; background: #fff; }
.formula-version-table-wrap { margin-top: 10px; overflow: auto; border: 1px solid #d6dadd; }
.formula-version-table-wrap table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 11px; }
.formula-version-table-wrap th,
.formula-version-table-wrap td { padding: 7px; border-bottom: 1px solid #e0e4e6; text-align: left; }
.formula-version-table-wrap th { background: #f0f2f3; }
.formula-version-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eceff0; font-size: 12px; }
.formula-preview-exports { margin-bottom: 10px; }
.formula-preview-exports a { color: #18783f; font-weight: 700; }

.formula-context-menu {
    position: fixed;
    z-index: 1400;
    display: grid;
    width: 190px;
    padding: 5px;
    border: 1px solid #c6ccd0;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(15 23 42 / 18%);
}

.formula-context-menu button {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 10px;
    padding: 5px 9px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #26323d;
    text-align: left;
    cursor: pointer;
}

.formula-context-menu button:hover:not(:disabled) { background: #eaf5ec; color: #176f39; }
.formula-context-menu button span { width: 18px; text-align: center; font-size: 16px; }
.formula-context-menu div[role="separator"] { height: 1px; margin: 4px 0; background: #e1e5e7; }

.formula-editor-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgb(15 23 42 / 32%);
}

.formula-editor-dialog {
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 20px;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 18px 52px rgb(15 23 42 / 28%);
}

.formula-editor-dialog > label { margin-bottom: 13px; }
.formula-editor-dialog textarea { resize: vertical; font-family: Consolas, monospace; line-height: 1.45; }
.formula-editor-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 13px; border-radius: 4px; background: #f5f7f8; }
.formula-editor-options > label:not(:first-child) { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.formula-editor-options input[type="checkbox"] { width: 16px; min-height: 16px; accent-color: #2ca01c; }
.formula-editor-dialog footer { justify-content: flex-end; margin-top: 18px; }

@media (max-width: 900px) {
    .formula-misa-titlebar { padding-left: 14px; }
    .formula-misa-titlebar h1 { font-size: 16px; }
    .formula-misa-reportbar { min-height: 92px; flex-wrap: wrap; padding: 8px 14px; }
    .formula-misa-reportbar > select { width: calc(100vw - 132px); }
    .formula-version-button { margin-left: 0; }
    .formula-misa-grid-panel { margin: 0 8px 8px; }
    .formula-misa-grid-tools { align-items: stretch; flex-direction: column; gap: 6px; padding: 7px; }
    .formula-misa-search { width: 100%; }
    .formula-misa-footer { min-height: 92px; align-items: flex-start; flex-direction: column; gap: 6px; padding: 8px 12px; }
    .formula-misa-footer-actions { width: 100%; overflow-x: auto; }
    .formula-misa-footer-actions button { flex: 0 0 auto; }
    .formula-management-panel { bottom: 92px; }
    .formula-editor-options { grid-template-columns: 1fr; }
}

/* System settings: one settings rail plus a full-size data grid, without a nested module dashboard. */
.app-content:has(> .system-settings-layout) {
    padding: 0;
}

.system-settings-layout {
    flex: 1 1 auto;
    gap: 0;
    height: 100%;
    margin: 0;
    max-width: none;
    width: 100%;
}

.system-settings-nav {
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    border-top: 0;
    box-shadow: none;
}

.system-settings-content {
    height: 100%;
    overflow: hidden;
}

.system-settings-grid-surface {
    background: #fff;
    display: flex;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.system-settings-grid-host {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.system-settings-grid-host > .daka-grid-shell,
.system-settings-grid-host > .misa-data-grid-shell {
    border: 0;
    border-radius: 0;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    width: 100%;
}

.system-settings-grid-status {
    align-items: flex-start;
    background: #eef9f1;
    border: 1px solid #9fd6ad;
    border-radius: 4px;
    box-shadow: 0 5px 18px rgb(15 23 42 / 14%);
    color: #176b34;
    display: flex;
    gap: 10px;
    max-width: min(620px, calc(100% - 24px));
    padding: 8px 10px;
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 40;
}

.system-settings-grid-status.error {
    background: #fff4f2;
    border-color: #efaaa2;
    color: #b42318;
}

.system-settings-grid-status span {
    overflow-wrap: anywhere;
}

.system-settings-grid-status button {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
}

.system-settings-floating-actions {
    align-items: center;
    background: rgb(255 255 255 / 94%);
    border: 1px solid #ccd8d1;
    border-radius: 4px;
    bottom: 44px;
    box-shadow: 0 5px 18px rgb(15 23 42 / 14%);
    display: flex;
    gap: 5px;
    padding: 5px;
    position: absolute;
    right: 12px;
    z-index: 30;
}

.system-settings-content > .shortcut-settings-panel {
    border: 0;
    border-radius: 0;
    height: 100%;
    margin: 0;
    max-height: none;
}

@media (max-width: 760px) {
    .system-settings-layout {
        gap: 0;
    }

    .system-settings-content {
        overflow: hidden;
    }

    .system-settings-floating-actions {
        left: 8px;
        max-width: calc(100% - 16px);
        overflow-x: auto;
        right: auto;
    }
}
.misa-shared-form-state-scope {
    display: contents;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}


/* User-feedback report column filters 2026-07-27 */
.misa-report-column-filter-row th {
    padding: 4px;
    background: #f4f8fc;
    position: sticky;
    top: var(--daka-report-header-height, 0);
    z-index: 2;
}

.misa-report-column-filter-row input,
.cash-daily-compare-row input[type="number"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 72px;
    height: 30px;
    padding: 4px 7px;
    border: 1px solid #b8c6d4;
    border-radius: 4px;
    background: #fff;
    color: #17212b;
    font: inherit;
}

.misa-report-column-filter-row input:focus,
.cash-daily-compare-row input[type="number"]:focus {
    border-color: #1677c8;
    outline: 2px solid rgb(22 119 200 / 16%);
    outline-offset: 0;
}

.misa-report-column-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 8px;
}


/* 2026-07-28: shared accounting-grid pagination and compact purchase voucher layout. */
.daka-grid-custom-page-size {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.daka-grid-custom-page-size input {
    background: #fff;
    border: 1px solid var(--df-border-strong, #aeb8c2);
    border-radius: var(--df-radius-sm, 3px);
    height: 28px;
    padding: 0 7px;
    width: 84px;
}

.daka-grid-custom-page-size-apply {
    min-width: 64px;
    white-space: nowrap;
}

.purchase-voucher-form .purchase-voucher-head {
    align-items: start;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(480px, 520px);
    padding: 8px 12px 9px;
}

.purchase-voucher-form .purchase-voucher-fields {
    gap: 6px 10px;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.purchase-voucher-form .purchase-voucher-fields > label.wide {
    grid-column: span 2;
}

.purchase-voucher-form .purchase-voucher-description {
    grid-column: span 1;
}

.purchase-voucher-form .purchase-voucher-fields label {
    gap: 3px;
}

.purchase-voucher-form .purchase-voucher-side-expanded {
    align-items: start;
    display: grid;
    gap: 5px 10px;
    grid-template-columns: minmax(150px, 176px) minmax(210px, 240px);
    grid-template-rows: repeat(3, auto);
    justify-content: start;
    padding-left: 12px;
}

.purchase-voucher-form .purchase-voucher-side-expanded > label {
    grid-column: 1;
}

.purchase-voucher-form .purchase-voucher-side-expanded .misa-form-total {
    align-self: start;
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 18px;
    min-width: 0;
    text-align: right;
}

.purchase-voucher-form .purchase-voucher-side-expanded .misa-form-total b {
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1.05;
}

.purchase-voucher-form .purchase-voucher-grid {
    flex: 1 1 240px;
    min-height: 200px;
}

.purchase-voucher-form .purchase-voucher-grid-shell,
.purchase-voucher-form .purchase-voucher-grid-scroll {
    min-height: 0;
}

.purchase-voucher-grid-pager {
    flex: 0 0 auto;
    min-height: 38px;
}

.purchase-voucher-form .purchase-voucher-lower {
    flex: 0 1 auto;
    padding-top: 6px;
}

.purchase-voucher-form .purchase-voucher-summary {
    gap: 8px;
    padding-top: 0;
}

.purchase-voucher-form .purchase-voucher-summary div {
    min-height: 36px;
}

@media (max-width: 1500px) {
    .purchase-voucher-form .purchase-voucher-head {
        grid-template-columns: minmax(0, 1fr) minmax(450px, 480px);
    }

    .purchase-voucher-form .purchase-voucher-fields {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .purchase-voucher-form .purchase-voucher-fields > label.wide,
    .purchase-voucher-form .purchase-voucher-description {
        grid-column: span 1;
    }
}

@media (max-width: 980px) {
    .purchase-voucher-form .purchase-voucher-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .purchase-voucher-form .purchase-voucher-side-expanded {
        border-left: 0;
        border-top: 1px solid var(--df-border-default, #cfd6dd);
        grid-template-columns: repeat(3, minmax(140px, 1fr));
        padding: 8px 0 0;
    }

    .purchase-voucher-form .purchase-voucher-side-expanded > label {
        grid-column: auto;
    }

    .purchase-voucher-form .purchase-voucher-side-expanded .misa-form-total {
        grid-column: 1 / -1;
        grid-row: auto;
        margin-top: 2px;
    }
}


/* 2026-07-28: shared purchase/sales/inventory header safe area. */
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded {
    box-sizing: border-box;
    justify-self: stretch;
    margin-left: 0;
    max-width: none;
    min-width: 0;
    padding-right: 12px;
    width: 100%;
}

.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total {
    box-sizing: border-box;
    justify-self: start;
    max-width: 220px;
    min-width: 0;
    overflow: visible;
    padding-right: 0;
    width: 220px;
}

.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total > span,
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total > b,
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total > small {
    display: block;
    max-width: 100%;
    overflow: visible;
    text-align: right;
    white-space: nowrap;
}

.sales-stock-issue-title-toggle {
    align-items: center;
    color: var(--df-text-secondary, #475467);
    display: inline-flex;
    flex: 0 1 auto;
    font-size: 12px;
    gap: 6px;
    margin-left: 4px;
    min-width: 0;
    white-space: nowrap;
}

.sales-stock-issue-title-toggle input {
    accent-color: var(--df-brand-primary, #0b7a4b);
    height: 16px;
    margin: 0;
    width: 16px;
}

.sales-stock-issue-title-toggle span {
    color: var(--df-text-primary, #101828);
    font-weight: 700;
}

.sales-stock-issue-title-toggle .sales-stock-issue-panel.sales-stock-issue-title-meta {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--df-text-muted, #667085);
    display: inline-flex;
    flex: 0 1 auto;
    gap: 5px;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.sales-stock-issue-title-toggle .sales-stock-issue-title-meta span {
    color: var(--df-text-muted, #667085);
    font-size: 11px;
    font-weight: 500;
}

.sales-stock-issue-title-toggle .sales-stock-issue-title-meta strong {
    color: var(--df-text-primary, #101828);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1180px) {
    .sales-stock-issue-title-toggle .sales-stock-issue-title-meta {
        display: none;
    }
}


/* Purchase detail report UI 2026-07-28 */
.misa-report-toolbar:has(.purchase-detail-report-toolbar) {
    padding: 6px 10px;
}

.purchase-detail-report-toolbar,
.purchase-detail-report-toolbar-left,
.purchase-detail-report-toolbar-right {
    align-items: center;
    display: flex;
    gap: 8px;
}

.purchase-detail-report-toolbar {
    justify-content: space-between;
    width: 100%;
}

.purchase-detail-report-search,
.purchase-detail-option-search {
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    display: flex;
    gap: 6px;
    min-height: 32px;
    padding: 0 9px;
}

.purchase-detail-report-search {
    width: min(320px, 36vw);
}

.purchase-detail-report-search input,
.purchase-detail-option-search input {
    background: transparent;
    border: 0;
    height: 30px;
    min-width: 0;
    outline: 0;
    padding: 0;
    width: 100%;
}

.purchase-detail-report-paper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 170px);
    min-height: 560px !important;
    padding: 8px 0 0 !important;
}

.purchase-detail-report-heading {
    flex: 0 0 auto;
    padding: 4px 0 14px;
}

.purchase-detail-report-heading strong {
    font-size: 18px;
}

.purchase-detail-report-heading p {
    color: #111827;
    font-size: 13px;
    font-style: italic;
    font-weight: 700;
}

.purchase-detail-report-paper .daka-grid-shell {
    flex: 1 1 auto;
    height: auto;
    min-height: 0 !important;
}

.purchase-detail-report-paper .daka-grid-scroll {
    border: 1px solid #d7dee5;
    overscroll-behavior: contain;
}

.purchase-detail-report-paper .daka-grid {
    min-width: 5250px;
}

.purchase-detail-report-paper .daka-grid th,
.purchase-detail-report-paper .daka-grid td {
    line-height: 1.25;
    padding: 7px 10px;
    white-space: nowrap;
}

.purchase-detail-report-paper .daka-grid th {
    background: #e9edf1;
    color: #111827;
}

.purchase-detail-report-paper .daka-grid-footer td {
    background: #eef0f2;
    font-weight: 800;
}

.purchase-detail-report-paper .daka-grid-pager {
    background: #ffffff;
    border-top: 1px solid #d7dee5;
    min-height: 42px;
}

.misa-report-parameter-drawer:has(.purchase-detail-parameter-form) {
    max-width: 100vw;
    width: min(1260px, calc(100vw - 220px));
}

.purchase-detail-parameter-form {
    gap: 10px;
    min-height: 0;
    overflow: auto;
    padding: 10px 14px 0;
}

.purchase-detail-parameter-fields {
    display: grid;
    flex: 0 0 auto;
    gap: 10px 12px;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.purchase-detail-option-card {
    border: 1px solid #d7dee5;
    border-radius: 7px;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 205px;
    overflow: hidden;
}

.purchase-detail-option-toolbar {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 14px;
    min-height: 44px;
    padding: 6px 10px;
}

.purchase-detail-option-toolbar > span {
    color: #334155;
    font-size: 13px;
    margin-left: auto;
    white-space: nowrap;
}

.purchase-detail-option-toolbar button {
    background: transparent;
    border: 0;
    color: #098c57;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 4px;
    white-space: nowrap;
}

.purchase-detail-option-toolbar button.primary {
    color: #078a52;
}

.purchase-detail-option-search {
    width: min(310px, 34vw);
}

.purchase-detail-option-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.purchase-detail-option-table {
    border-collapse: collapse;
    min-width: 720px;
    table-layout: fixed;
    width: 100%;
}

.purchase-detail-option-table th,
.purchase-detail-option-table td {
    border-bottom: 1px solid #d7dee5;
    border-right: 1px solid #d7dee5;
    font-size: 13px;
    height: 32px;
    overflow: hidden;
    padding: 5px 12px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchase-detail-option-table th {
    background: #e9edf1;
    color: #0f172a;
    font-weight: 800;
    position: sticky;
    top: 0;
    z-index: 1;
}

.purchase-detail-option-table .check {
    padding: 4px;
    text-align: center;
    width: 40px;
}

.purchase-detail-option-table th:nth-child(2),
.purchase-detail-option-table td:nth-child(2) {
    width: 180px;
}

.purchase-detail-option-table-wrap.supplier .purchase-detail-option-table {
    min-width: 900px;
}

.purchase-detail-option-footer {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 16px;
    justify-content: flex-end;
    min-height: 42px;
    padding: 6px 12px;
}

.purchase-detail-option-footer > span {
    margin-right: auto;
}

.purchase-detail-option-footer label {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.purchase-detail-option-footer select {
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    height: 30px;
    min-width: 76px;
}

.purchase-detail-parameter-actions {
    align-items: center;
    background: #ffffff;
    border-top: 1px solid #d7dee5;
    bottom: 0;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    justify-content: flex-end;
    margin: 0 -14px;
    min-height: 52px;
    padding: 8px 14px;
    position: sticky;
    z-index: 3;
}

.purchase-detail-parameter-actions .primary {
    min-width: 112px;
}

@media (max-width: 1100px) {
    .misa-report-parameter-drawer:has(.purchase-detail-parameter-form) {
        width: min(94vw, 960px);
    }

    .purchase-detail-parameter-fields {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

@media (max-width: 720px) {
    .misa-report-parameter-drawer:has(.purchase-detail-parameter-form) {
        width: 100vw;
    }

    .purchase-detail-parameter-fields {
        grid-template-columns: 1fr 1fr;
    }

    .purchase-detail-option-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .purchase-detail-option-toolbar > span {
        margin-left: 0;
    }

    .purchase-detail-option-search,
    .purchase-detail-report-search {
        width: 100%;
    }

    .purchase-detail-report-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}


/* Canonical shared report viewer and grouped inventory summary */
.daka-grid thead .daka-grid-group-header th {
    position: sticky;
    top: 0;
    z-index: 6;
    height: 32px;
    padding: 6px 10px;
    background: #e9edf1;
    border-bottom: 1px solid #cbd3da;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}

.daka-grid thead .daka-grid-column-header th {
    top: 32px;
    z-index: 5;
}

.daka-grid-group-cell {
    border-right: 1px solid #cbd3da;
}

.shared-report-viewer-paper {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 16px 14px;
}

.shared-report-viewer-paper .misa-report-column-filter-actions {
    flex: 0 0 auto;
}

.shared-report-viewer-paper .daka-grid-shell {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    flex-direction: column;
    border: 1px solid #cfd8e3;
}

.shared-report-viewer-paper .daka-grid-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: scroll;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
}

.shared-report-viewer-paper .daka-grid-pager {
    flex: 0 0 auto;
    background: #fff;
    border-top: 1px solid #d7dde3;
    bottom: 0;
    position: sticky;
    z-index: 8;
}

.shared-report-viewer-paper .daka-grid th,
.shared-report-viewer-paper .daka-grid td {
    white-space: nowrap;
}

.inventory-summary-report-paper .daka-grid {
    min-width: 2260px;
}

.misa-report-parameter-drawer:has(.inventory-summary-parameter-form) {
    width: min(1260px, calc(100vw - 72px));
    max-width: none;
}

.inventory-summary-parameter-form {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    gap: 12px;
}

.inventory-summary-parameter-fields {
    display: grid;
    grid-template-columns: minmax(190px, 1.1fr) repeat(2, minmax(150px, .72fr)) minmax(190px, .9fr) minmax(190px, .9fr);
    gap: 12px;
    align-items: end;
}

.inventory-warehouse-option-card {
    flex: 1 1 auto;
    min-height: 360px;
}

.inventory-warehouse-table-wrap {
    min-height: 320px;
    max-height: calc(100vh - 430px);
}

.inventory-summary-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 0;
}

.inventory-summary-checkbox input {
    width: 17px;
    height: 17px;
}

@media (max-width: 1100px) {
    .inventory-summary-parameter-fields {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

}

/* 2026-07-31: critical shared voucher viewport containment.
   Every Shared Form must stay inside the viewport; header totals and lower summaries
   must never expand past the right edge or render underneath the command bar. */
.misa-fullscreen-form {
    block-size: 100dvh;
    inline-size: auto;
    max-block-size: 100dvh;
    max-inline-size: 100%;
    min-inline-size: 0;
}

.misa-fullscreen-form > *,
.misa-fullscreen-form .misa-shared-form-state-scope > * {
    max-inline-size: 100%;
    min-inline-size: 0;
}

.misa-fullscreen-form .misa-form-head,
.misa-fullscreen-form .misa-form-grid,
.misa-fullscreen-form .misa-grid-pager,
.misa-fullscreen-form .purchase-voucher-lower,
.misa-fullscreen-form .misa-command-bar {
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
}

.misa-fullscreen-form .misa-form-titlebar h1,
.misa-fullscreen-form .purchase-voucher-titlebar h1 {
    font-size: 18px;
    font-weight: 700;
}

.misa-fullscreen-form.purchase-voucher-form .misa-form-titlebar h1,
.misa-fullscreen-form.purchase-voucher-form .purchase-voucher-titlebar h1 {
    font-size: 18px;
}

.misa-fullscreen-form .misa-form-total > span {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.misa-fullscreen-form .misa-form-total > b {
    font-size: clamp(17px, 1.15vw, 21px);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
    max-inline-size: 100%;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.misa-fullscreen-form .misa-form-total > small {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.purchase-voucher-form .purchase-voucher-summary span {
    font-size: 12px;
    font-weight: 600;
}

.purchase-voucher-form .purchase-voucher-summary b {
    font-size: 14px;
    font-weight: 700;
}

.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-head {
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) minmax(470px, 520px);
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
}

.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    max-inline-size: 100%;
    min-inline-size: 0;
}

.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-fields > label,
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side-expanded > label {
    max-inline-size: 100%;
    min-inline-size: 0;
}

.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded {
    box-sizing: border-box;
    grid-template-columns: minmax(160px, 176px) minmax(260px, 1fr);
    max-inline-size: 100%;
    min-inline-size: 0;
    padding-inline-end: 24px;
}

.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total {
    box-sizing: border-box;
    justify-items: start;
    justify-self: start;
    max-inline-size: 100%;
    min-inline-size: 0;
    overflow: visible;
    text-align: left;
    width: min(280px, 100%);
}

.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total > span,
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total > b,
.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total > small {
    display: block;
    max-inline-size: 100%;
    overflow: visible;
    position: static;
    text-align: left;
    text-overflow: clip;
    white-space: nowrap;
}

/* Unified UI Inventory: the canonical MisaFullScreenForm head defaults to a 290px
   summary track, while the preserved commercial date/total adapter requires the
   same safe track used by Purchase. Keep the Inventory override root-scoped so
   Cash/Bank/Purchase and accounting semantics are untouched. */
.misa-fullscreen-form.inventory-voucher-form .misa-form-head {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(480px, 520px);
}

.misa-fullscreen-form.inventory-voucher-form .misa-form-head > .misa-form-side {
    justify-self: stretch;
    margin-left: 0;
    max-width: none;
    min-width: 0;
    width: 100%;
}

@media (max-width: 1500px) and (min-width: 981px) {
    .misa-fullscreen-form.inventory-voucher-form .misa-form-head {
        grid-template-columns: minmax(0, 1fr) minmax(450px, 480px);
    }
}

/* FB-00 / DP-087: this selector intentionally outranks the older commercial
   form rule that used clamp(24px, 2vw, 34px), which clipped large totals. */
.misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form)
.purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total > b,
.misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form)
.misa-voucher-summary.commercial-document-summary-panel .misa-form-total > b {
    font-size: clamp(17px, 1.15vw, 21px);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

/* FB-00: on wide commercial forms reserve a 200px larger header lane.
   This shifts Posting date, Document date and Document no left while the total
   remains in its own non-overlapping column. Narrow widths keep the stacked rule. */
@media (min-width: 1501px) {
    .misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-head {
        grid-template-columns: minmax(0, 1fr) minmax(670px, 720px);
    }
}

.purchase-voucher-form .purchase-voucher-grid {
    flex: 1 1 190px;
    min-block-size: clamp(128px, 22dvh, 190px);
}

.purchase-voucher-form .purchase-voucher-lower {
    flex: 0 1 auto;
    max-block-size: min(31dvh, 260px);
    min-block-size: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.purchase-voucher-form .purchase-voucher-lower-left {
    flex: 1 1 auto;
    min-inline-size: 0;
}

.purchase-voucher-form .purchase-voucher-summary {
    flex: 0 1 520px;
    gap: 0;
    max-inline-size: 100%;
    min-inline-size: 0;
    width: min(520px, 40vw);
}

.purchase-voucher-form .purchase-voucher-summary div {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 170px);
    min-block-size: 32px;
}

@media (max-height: 820px) {
    .purchase-voucher-form .purchase-voucher-lower {
        padding-top: 0;
    }

    .purchase-voucher-form .purchase-voucher-summary div {
        min-block-size: 28px;
    }

    /* FB-051: sales exposes five accounting totals. Keep every value visible
       above the command bar on short desktop viewports instead of clipping it. */
    .sales-voucher-form .purchase-voucher-summary div {
        min-block-size: 20px;
    }

    /* FB-00 / FB-051: preserve the complete five-row sales summary on a
       768px-high desktop. The grid yields the small amount of space required
       instead of allowing the totals region to overflow behind the command bar. */
    .sales-voucher-form .purchase-voucher-grid {
        min-block-size: 112px;
    }

    .sales-voucher-form .purchase-voucher-lower {
        flex-shrink: 0;
        max-block-size: none;
        overflow-y: visible;
    }
}

.misa-fullscreen-form .misa-command-bar {
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

@media (max-width: 1500px) {
    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-head {
        grid-template-columns: minmax(0, 1fr);
        max-block-size: min(42dvh, 320px);
        overflow-x: auto;
        overflow-y: auto;
    }

    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded {
        border-left: 0;
        border-top: 1px solid var(--df-border-default, #cfd6dd);
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: auto;
        padding: 8px 0 0;
    }

    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded > label {
        grid-column: auto;
    }

    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total {
        grid-column: 1 / -1;
        grid-row: auto;
        justify-items: start;
        justify-self: start;
        margin: 4px 0 0;
        max-inline-size: 100%;
        text-align: left;
        width: min(320px, 100%);
    }

    .misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-total > span,
    .misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-total > b,
    .misa-fullscreen-form.purchase-voucher-form:not(.cash-count-voucher-form) .misa-form-total > small {
        inline-size: auto;
        inset-inline-end: auto;
        position: static;
        text-align: left;
    }
}

@media (max-width: 760px) {
    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-voucher-form:not(.cash-count-voucher-form) .purchase-voucher-side.purchase-voucher-side-expanded .misa-form-total {
        grid-column: 1 / -1;
        grid-row: auto;
        margin-top: 2px;
    }

    .purchase-voucher-form .purchase-voucher-lower {
        align-items: stretch;
        flex-direction: column;
        max-block-size: 35dvh;
    }

    .purchase-voucher-form .purchase-voucher-summary {
        flex-basis: auto;
        width: 100%;
    }
}

/* FB-036 purchase grid column readability */
.purchase-voucher-form .purchase-voucher-grid-scroll {
    overflow-x: auto;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.purchase-voucher-form .purchase-lines-table {
    inline-size: max-content;
    max-inline-size: none;
    min-inline-size: 2440px;
    table-layout: fixed;
    width: max-content;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-row-no,
.purchase-voucher-form .purchase-lines-table col.misa-row-delete-col {
    width: 44px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-item-code {
    width: 150px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-item-name {
    width: 360px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-warehouse {
    width: 130px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-account,
.purchase-voucher-form .purchase-lines-table col.voucher-col-account-wide {
    width: 110px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-unit {
    width: 72px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-quantity {
    width: 110px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-price {
    width: 140px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-amount {
    width: 160px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-rate {
    width: 110px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-tax-amount {
    width: 150px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-group,
.purchase-voucher-form .purchase-lines-table col.voucher-col-category {
    width: 180px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-code,
.purchase-voucher-form .purchase-lines-table col.voucher-col-object-code {
    width: 150px !important;
}

.purchase-voucher-form .purchase-lines-table col.voucher-col-object-name {
    width: 240px !important;
}

.purchase-voucher-form .purchase-lines-table td.purchase-item-name-cell {
    line-height: 1.35;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}


/* FB-054 strict sales quantity format: Vietnamese dot grouping, comma decimal, two decimals. */
.sales-voucher-form .sales-quantity-input-cell {
    vertical-align: top;
}

.sales-voucher-form .sales-quantity-input-cell input[aria-invalid="true"] {
    border-color: var(--df-status-danger-text, #c62828);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--df-status-danger-text, #c62828) 28%, transparent);
}

.sales-voucher-form .sales-quantity-validation {
    background: transparent;
    border: 0;
    display: block;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    margin-top: 3px;
    max-inline-size: 180px;
    padding: 0;
    text-align: left;
    white-space: normal;
}

/* 2026-08-09: canonical voucher anatomy. Domain fields may differ, but every
   non-cash-count voucher uses the same left field tracks and Cash/Bank-sized
   right summary lane. The commercial adapter follows the same vertical order:
   posting date -> document date -> document number -> total. */
.misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-header-region="true"] {
    align-items: start;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
}

.misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-business-fields="true"] {
    align-content: start;
    gap: 7px var(--daka-form-field-column-gap);
    grid-template-columns: repeat(2, minmax(0, var(--daka-field-text-width)));
    justify-content: start;
    max-inline-size: 100%;
    min-inline-size: 0;
}

.misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-business-fields="true"] > label.wide {
    grid-column: 1 / -1;
    max-inline-size: var(--daka-field-long-text-width);
}

/* FB-074 is bounded to the Sales customer-name field. IdentityName remains a
   standard-width shared role for supplier, employee, bank and asset consumers. */
.misa-fullscreen-form.sales-voucher-form
    [data-shared-form-business-fields="true"]
    [data-shared-form-field-role="identity-name"] {
    grid-column: 1 / -1;
    inline-size: min(100%, var(--daka-field-long-text-width));
    max-inline-size: var(--daka-field-long-text-width);
    min-inline-size: 0;
}

/* Header extras participate in the canonical two-column business-field grid.
   Sales Return contributes full-width controls followed by one nested field
   container, so reserve the row controls and flatten only that shared wrapper. */
.misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-business-fields="true"] > .purchase-voucher-modebar,
.misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-business-fields="true"] > .purchase-voucher-header-tabs {
    grid-column: 1 / -1;
    inline-size: 100%;
    max-inline-size: var(--daka-field-long-text-width);
    min-inline-size: 0;
}

.misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-business-fields="true"] > .misa-shared-form-state-scope > .misa-form-fields {
    display: contents;
}

.misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-summary-region="true"] {
    box-sizing: border-box;
    justify-self: end;
    margin-inline-start: auto;
    max-inline-size: 300px;
    min-inline-size: 260px;
    width: 100%;
}

.misa-voucher-summary.commercial-document-summary-panel {
    align-content: start;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr);
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
}

.misa-voucher-summary.commercial-document-summary-panel > label {
    grid-column: 1;
    justify-items: start;
    max-inline-size: 100%;
    min-inline-size: 0;
}

.misa-voucher-summary.commercial-document-summary-panel .misa-form-total {
    grid-column: 1;
    grid-row: auto;
    inline-size: 100%;
    justify-items: end;
    justify-self: stretch;
    margin-block-start: 3px;
    max-inline-size: 100%;
    min-inline-size: 0;
    text-align: right;
}

.misa-voucher-summary.commercial-document-summary-panel .misa-form-total > span,
.misa-voucher-summary.commercial-document-summary-panel .misa-form-total > b,
.misa-voucher-summary.commercial-document-summary-panel .misa-form-total > small {
    display: block;
    inline-size: auto;
    max-inline-size: 100%;
    overflow: visible;
    position: static;
    text-align: right;
    text-overflow: clip;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-header-region="true"] {
        grid-template-columns: minmax(0, 1fr);
    }

    .misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-summary-region="true"] {
        border-inline-start: 0;
        border-block-start: 1px solid var(--df-border-default, #cfd6dd);
        justify-self: stretch;
        margin-inline-start: 0;
        max-inline-size: none;
        padding-block-start: 8px;
    }
}

@media (max-width: 760px) {
    .misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-business-fields="true"] {
        grid-template-columns: minmax(0, 1fr);
    }

    .misa-fullscreen-form:not(.cash-count-voucher-form) [data-shared-form-business-fields="true"] > label.wide {
        grid-column: 1;
    }
}

/* Purchase cost allocation: bounded MISA-style source selection and allocation workspace. */
.purchase-cost-workspace {
    background: #fff;
    display: flex;
    flex: 1 0 clamp(280px, 31dvh, 285px);
    flex-direction: column;
    min-block-size: clamp(280px, 31dvh, 285px);
    min-width: 0;
    overflow: hidden;
}

.purchase-cost-workspace-grid {
    display: flex;
    flex: 1 1 auto;
    min-block-size: 132px;
    min-width: 0;
    overflow: hidden;
}

.purchase-cost-workspace-grid > .misa-data-grid-shell {
    border-inline: 0;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
}

.purchase-cost-workspace-actions {
    align-items: center;
    border-top: 1px solid var(--df-border-default, #cfd6dd);
    flex: 0 0 auto;
    margin: 0;
    min-height: 44px;
    padding: 6px 12px;
}

.misa-fullscreen-form.purchase-voucher-form .purchase-cost-workspace-actions {
    margin: 0 10px;
    min-height: 44px;
    padding: 6px 12px;
}

.purchase-cost-allocation-dialog-summary {
    align-items: center;
    background: #f4f5f7;
    border-bottom: 1px solid var(--df-border-default, #cfd6dd);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 20px 20px;
}

.purchase-cost-dialog footer > div {
    display: flex;
    gap: 8px;
}

.purchase-cost-allocation-dialog-total {
    flex: 0 0 auto;
    text-align: right;
}

.purchase-cost-allocation-dialog-summary span {
    color: #475467;
    display: block;
    font-size: 12px;
}

.purchase-cost-allocation-dialog-summary strong {
    color: #101828;
    font-size: clamp(28px, 2.4vw, 36px);
    line-height: 1.05;
}

.purchase-cost-workspace-message {
    background: #f5f9ff;
    border-top: 1px solid #d7e4f2;
    color: #344054;
    font-size: 12px;
    padding: 6px 12px;
}

.purchase-cost-workspace-message {
    border-top: 0;
    border-bottom: 1px solid #d7e4f2;
}

/* The Cost/Landed-cost tab has its own source grid. Reserve a real viewport
   for that grid and let the standard totals pane scroll underneath it. Keep
   the two cost-relevant totals first so the accounting result stays visible
   even when a 900px desktop leaves the lower pane compact. */
.purchase-voucher-form:has(.purchase-cost-workspace) .purchase-voucher-lower {
    max-block-size: min(23dvh, 200px);
    min-block-size: 72px;
}

.purchase-voucher-form:has(.purchase-cost-workspace) .purchase-voucher-summary > [data-feedback-purchase-allocated-cost="true"] {
    order: -2;
}

.purchase-voucher-form:has(.purchase-cost-workspace) .purchase-voucher-summary > [data-base-inventory-value-vnd] {
    order: -1;
}

.purchase-cost-dialog-backdrop {
    z-index: 240;
}

.purchase-cost-dialog {
    background: #fff;
    border: 1px solid var(--df-border-default, #cfd6dd);
    border-radius: 4px;
    box-shadow: var(--df-shadow-lg, 0 18px 48px rgba(15, 23, 42, .24));
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    width: min(1440px, calc(100vw - 40px));
}

.purchase-cost-dialog[data-purchase-cost-nested-content] {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    flex: 1 1 auto;
    max-height: none;
    width: 100%;
}

/* MISA uses a right-side selection pane and an edge-to-edge allocation sheet.
   Scope the presentation to this Purchase child workflow; the shared nested
   host keeps stack, focus, Escape and inert ownership for every consumer. */
.misa-nested-form-backdrop[data-nested-form-presentation="right-pane"],
.misa-nested-form-backdrop[data-nested-form-presentation="edge-to-edge"] {
    align-items: stretch;
    backdrop-filter: none;
    padding: 0 !important;
}

.misa-nested-form-backdrop[data-nested-form-presentation="right-pane"] {
    justify-content: flex-end;
}

.misa-nested-form-dialog[data-nested-form-presentation="right-pane"] {
    border-block: 0;
    border-radius: 0;
    border-right: 0;
    height: 100dvh !important;
    max-height: 100dvh !important;
    max-width: 100vw;
    width: min(1260px, max(720px, 66.667vw)) !important;
}

.misa-nested-form-dialog[data-nested-form-presentation="edge-to-edge"] {
    border: 0;
    border-radius: 0;
    height: 100dvh !important;
    max-height: 100dvh !important;
    max-width: none;
    width: 100vw !important;
}

.misa-nested-form-dialog[data-nested-form-presentation="right-pane"] > .misa-import-header,
.misa-nested-form-dialog[data-nested-form-presentation="edge-to-edge"] > .misa-import-header {
    background: #f4f5f7;
    min-height: 56px;
    padding: 10px 16px;
}

.misa-nested-form-dialog[data-nested-form-presentation="right-pane"] > .misa-import-header strong,
.misa-nested-form-dialog[data-nested-form-presentation="edge-to-edge"] > .misa-import-header strong {
    color: #20242a;
    font-size: 22px;
    line-height: 1.2;
}

.purchase-cost-allocation-dialog {
    width: min(1440px, calc(100vw - 40px));
}

.purchase-cost-allocation-dialog-controls {
    align-items: end;
    display: flex;
    gap: 8px;
    min-width: min(440px, 55vw);
}

.purchase-cost-allocation-dialog-controls label {
    flex: 1 1 320px;
}

.purchase-cost-allocation-dialog-controls button {
    flex: 0 0 auto;
    height: 32px;
    min-width: 88px;
}

.purchase-cost-dialog > header,
.purchase-cost-dialog > footer {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    padding: 12px 14px;
}

.purchase-cost-dialog > header {
    border-bottom: 1px solid var(--df-border-default, #cfd6dd);
}

.purchase-cost-dialog > header strong {
    font-size: 18px;
}

.purchase-cost-dialog > header button {
    align-items: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.purchase-cost-dialog > footer {
    border-top: 1px solid var(--df-border-default, #cfd6dd);
    gap: 12px;
}

.purchase-cost-dialog > footer button {
    background: #fff;
    border: 1px solid #98a2b3;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    min-height: 32px;
    min-width: 80px;
    padding: 0 14px;
}

.purchase-cost-dialog > footer button.primary {
    background: var(--df-brand, #089740);
    border-color: var(--df-brand, #089740);
    color: #fff;
}

.purchase-cost-dialog > footer button.link {
    border-color: transparent;
    color: #067647;
    margin-right: auto;
}

.purchase-cost-dialog > footer button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.purchase-cost-dialog-filters {
    align-items: end;
    background: #f4f5f7;
    border-bottom: 1px solid var(--df-border-default, #cfd6dd);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(200px, 1.6fr) minmax(135px, .8fr) minmax(135px, .8fr) auto;
    padding: 10px 14px;
}

.purchase-cost-source-supplier {
    grid-column: 1 / -1;
    max-width: 440px;
}

.purchase-cost-source-period {
    grid-column: 1;
}

.purchase-cost-source-from {
    grid-column: 2;
}

.purchase-cost-source-to {
    grid-column: 3;
}

.purchase-cost-source-load {
    grid-column: 4;
    min-width: 104px;
}

.purchase-cost-source-search {
    grid-column: 1 / span 2;
    max-width: 420px;
}

.purchase-cost-required {
    color: #d92d20;
}

.purchase-cost-dialog-filters label,
.purchase-cost-allocation-dialog-summary label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.purchase-cost-dialog-filters label > span,
.purchase-cost-allocation-dialog-summary label > span {
    color: #344054;
    font-size: 12px;
    font-weight: 600;
}

.purchase-cost-dialog-filters input,
.purchase-cost-dialog-filters select,
.purchase-cost-allocation-dialog-summary select {
    background: #fff;
    border: 1px solid #aab4bd;
    border-radius: 3px;
    box-sizing: border-box;
    height: 32px;
    min-width: 0;
    padding: 0 8px;
    width: 100%;
}

.purchase-cost-dialog-grid {
    flex: 1 1 auto;
    min-height: 280px;
    overflow: hidden;
    padding: 0 14px 12px;
}

.purchase-cost-dialog-grid > .misa-data-grid-shell {
    height: 100%;
    min-height: 260px;
    min-width: 0;
}

.purchase-cost-target-grid {
    min-height: 320px;
}

.purchase-cost-dialog-selection-count {
    color: #475467;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .misa-nested-form-dialog[data-nested-form-presentation="right-pane"] {
        width: min(100vw, max(720px, 72vw)) !important;
    }
}

@media (max-width: 760px) {
    .misa-nested-form-dialog[data-nested-form-presentation="right-pane"] {
        width: 100vw !important;
    }

    .purchase-cost-dialog-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .purchase-cost-source-supplier,
    .purchase-cost-source-period,
    .purchase-cost-source-from,
    .purchase-cost-source-to,
    .purchase-cost-source-load,
    .purchase-cost-source-search {
        grid-column: 1;
        max-width: none;
    }

    .purchase-cost-allocation-dialog-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .purchase-cost-allocation-dialog-total {
        text-align: left;
    }

    .purchase-cost-allocation-dialog-controls {
        align-items: stretch;
        min-width: 0;
        width: 100%;
    }
}
