@import url("https://fonts.googleapis.com/css2?family=Battambang:wght@400;700&family=Kantumruy+Pro:wght@400;500;600;700;800&family=Noto+Sans+Khmer:wght@400;500;600;700;800&family=Noto+Serif+SC:wght@400;700&family=Roboto:wght@400;500;700;900&display=swap");
:root {
    --bg: #edf7ff;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #526477;
    --brand: #0471ba;
    --brand-dark: #005996;
    --line: #c8d8e6;
    --danger: #b42318;
    --field: #eaf3ff;
    --shadow: 0 28px 70px rgba(25, 76, 123, 0.18);
    --font-app: "Battambang", "Khmer OS Battambang", "Noto Sans Khmer", "Khmer OS Siemreap", "Khmer OS", Arial, Helvetica, sans-serif;
    --font-print: "Battambang", "Khmer OS Battambang", "Noto Sans Khmer", "Noto Serif SC", "Noto Serif TC", "SimSun", serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--font-app);
}

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    font-size: 13px;
}

body.has-app-shell {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.brand,
.topbar__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #34495e;
}

.brand__icon,
.login-card__icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    background: var(--brand);
}

.page {
    min-height: calc(100vh - 52px);
}

.page--login {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}

.page--public-request {
    min-height: 100vh;
}

.login-card {
    width: min(371px, 100%);
    min-height: 450px;
    display: grid;
    
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-card__visual {
    position: relative;
    min-height: 100px;
    background: #dbeaf7;
}

.login-card__visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.login-card__visual {
        min-height: 240px;
    }

.login-card__badge {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    color: #fff;
    background: rgba(0, 86, 148, 0.84);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.login-card__form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 38px;
}

.login-card__heading {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 22px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
}

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #29445b;
    font-size: 12px;
    font-weight: 700;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="date"],
.field input[type="number"],
.field input[type="text"],
.field select {
    width: 100%;
    min-height: 38px;
    padding: 9px 12px;
    color: #111827;
    background: var(--field);
    border: 1px solid #bfd2e6;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.35;
    outline: none;
}

.field input:focus,
.field select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(4, 113, 186, 0.16);
}

.field input[readonly] {
    color: var(--muted);
    background: #f7fbff;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 20px;
    color: #29445b;
    font-size: 12px;
}

.button {
width: 100%;
min-height: 40px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
border: 0;
border-radius: 8px;
color: #fff;
background: var(--brand);
font-weight: 800;
cursor: pointer;
transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;

font-family: var(--font-app);
line-height: 1.5;
}

.button:hover {
    background: var(--brand-dark);
}

.button--small {
    width: auto;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 13px;
}

.button--light {
    color: var(--brand);
    background: #e7f4ff;
    border: 1px solid #b8def8;
}

.button--light:hover {
    color: #fff;
}

.alert {
    margin: 0 0 16px;
    padding: 10px 12px;
    color: var(--danger);
    background: #fff0f0;
    border: 1px solid #ffd0d0;
    border-radius: 8px;
    font-size: 13px;
}

.alert--success {
    width: 100%;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 14px 36px;
    color: #027a48;
    background: #ecfdf3;
    border-color: #75e0a7;
}

.alert--error {
    color: var(--danger);
    background: #fff0f0;
    border-color: #ffd0d0;
}

.request-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.request-card {
    width: min(460px, 100%);
    padding: 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.request-card__header {
    margin-bottom: 20px;
}

.request-card__header h1 {
    font-size: 24px;
}

.request-form__money {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.request-form__message[hidden] {
    display: none;
}

.request-form button[disabled] {
    cursor: wait;
    opacity: 0.72;
}

.app-shell {
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    background: var(--bg);
    overflow: hidden;
}

.sidebar {
    height: 100vh;
    min-height: 0;
    background: #fff;
    border-right: 1px solid var(--line);
    overflow: hidden;
}

.sidebar__brand {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.sidebar__brand img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: block;
    object-fit: contain;
    padding: 3px;
    background: #fffbea;
    border: 1px solid #f0d87a;
    border-radius: 12px;
}

.sidebar__brand .brand__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.sidebar__brand .brand__icon svg {
    width: 22px;
    height: 22px;
}

.sidebar__brand strong,
.user-menu strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.sidebar__brand small,
.user-menu small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

.sidebar__nav {
    padding: 14px;
}

.sidebar__nav p {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar__nav a {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    margin-bottom: 8px;
    color: #526477;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.sidebar__nav a:hover {
    color: var(--brand-dark);
    background: #eaf4ff;
}

.sidebar__nav a span {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    font-weight: 800;
}

.sidebar__nav a svg {
    width: 20px;
    height: 20px;
}

.sidebar__nav a.is-active {
    color: #fff;
    background: var(--brand-dark);
    box-shadow: 0 10px 22px rgba(0, 89, 150, 0.2);
}

.sidebar__nav a.is-active:hover {
    color: #fff;
    background: var(--brand-dark);
}

.sidebar__nav a.is-active span {
    color: #fff;
}

.notification-link__icon {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -9px;
    right: -11px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    color: #fff;
    background: #dc2626;
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.sidebar__nav a.is-active .notification-badge {
    border-color: var(--brand-dark);
}

.app-main {
    height: 100vh;
    min-width: 0;
    overflow: hidden;
}

.app-topbar {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.language-switcher > span {
    margin-right: 4px;
}

.language-switcher button {
    min-width: 46px;
    min-height: 30px;
    padding: 0 12px;
    color: var(--brand-dark);
    background: #eef7ff;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-weight: 800;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.language-switcher button:hover {
    border-color: #8bc7ee;
    background: #e0f1ff;
}

.language-switcher button.is-active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 6px 14px rgba(4, 113, 186, 0.16);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: transparent;
    border: 0;
}

.user-menu__avatar {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--brand);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}

.user-menu button {
    width: 24px;
    height: 24px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    background: #fff;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.page--app {
    height: calc(100vh - 44px);
    min-height: 0;
    overflow: hidden;
    padding: 16px 20px 32px;
}

.page--reports {
    height: calc(100vh - 44px);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.dashboard {
    width: 100%;
}

.dashboard--managed {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.dashboard__header,
.record-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.dashboard__header {
    min-height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    margin-bottom: 18px;
    background: transparent;
    border: 0;
}

.dashboard__header h1 {
    font-size: 28px;
}

.dashboard__header p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.dashboard__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.record-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.record-card {
    padding: 16px;
}

.record-card h2 {
    margin: 0 0 8px;
    font-size: 16px;
}

.record-card p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.data-panel {
    margin-bottom: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.dashboard--managed .data-panel:last-child {
    margin-bottom: 0;
}

.inline-form {
    display: grid;
    grid-template-columns: 0.7fr 1.2fr 1fr 1.4fr auto;
    gap: 12px;
    align-items: end;
}

.inline-form .field {
    margin-bottom: 0;
}

.inline-form input[type="text"] {
    width: 100%;
    min-height: 38px;
    padding: 9px 12px;
    color: #111827;
    background: var(--field);
    border: 1px solid #bfd2e6;
    border-radius: 8px;
    outline: none;
}

.inline-form input[type="text"]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(4, 113, 186, 0.16);
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
    gap: 12px;
    align-items: end;
}

.filter-form .field {
    margin-bottom: 0;
}

.filter-form__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    
}

.report-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(150px, 160px) minmax(150px, 160px) auto;
    gap: 12px;
    align-items: end;
}

.report-filter .field {
    margin-bottom: 0;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.report-metric {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.report-metric span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.report-metric strong {
    font-size: 24px;
    line-height: 1;
}

.report-metric--strong {
    color: #fff;
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.report-metric--strong span {
    color: rgba(255, 255, 255, 0.78);
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.report-panel {
    min-width: 0;
}

.report-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.report-panel__header h2 {
    margin: 0;
    font-size: 16px;
}

.report-panel__header span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.report-table-wrap {
    max-height: 260px;
}

.report-detail-panel {
    min-height: 0;
}

.reports-page.dashboard--managed {
    min-height: 100%;
    display: block;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.data-panel--table .table-wrap {
    flex: 1;
    max-height: none;
    min-height: 180px;
    margin-bottom: 12px;
    overscroll-behavior: contain;
}

.data-panel--table {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e3edf6;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #526477;
    background: #f7fbff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.sort-link {
    color: inherit;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.table-action {
    min-height: 30px;
    padding: 0 12px;
    color: var(--brand);
    background: #e7f4ff;
    border: 1px solid #b8def8;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font-app);
    line-height: 1.5; 
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.table-action:hover {
    color: #fff;
    background: var(--brand);
}

.table-action--danger {
    color: var(--danger);
    background: #fff0f0;
    border-color: #ffd0d0;
}

.table-action--danger:hover {
    color: #fff;
    background: var(--danger);
}

.table-action--approve {
    color: #027a48;
    background: #ecfdf3;
    border-color: #75e0a7;
}

.table-action--approve:hover {
    color: #fff;
    background: #027a48;
}

.table-action--print {
    color: #0f766e;
    background: #ecfdf5;
    border-color: #5eead4;
}

.table-action--print:hover {
    color: #fff;
    background: #0f766e;
}

.table-action--printed,
.table-action--printed:hover {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}


.request-admin .data-table {
    min-width: 920px;
}

.request-admin .data-table th {
    text-transform: none;
}

.request-actions {
    flex-wrap: wrap;
}

.tailwind-table-wrap {
    border-radius: 8px;
}

.tailwind-table tr:hover td {
    background: #f8fbff;
}

.table-action.is-active {
    color: #fff;
    background: var(--brand);
}

.pagination {
    flex: 0 0 auto;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid #e3edf6;
}

.pagination p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.pagination__links {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination__links .table-action {
    min-width: 32px;
}

.alert--compact {
    min-height: auto;
    padding: 12px 16px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.is-open {
    display: flex;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
}

.modal__panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.modal__header h2 {
    margin: 0;
    font-size: 18px;
}

.modal__close {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
    cursor: pointer;
}

.modal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-note {
    margin: -4px 0 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.status {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status--online {
    color: #05603a;
    background: #d1fadf;
}

.status--warning {
    color: #93370d;
    background: #ffead5;
}

.status--offline {
    color: #912018;
    background: #fee4e2;
}

.receipt-print {
    display: none;
}

.receipt-preview {
    padding: 18px;
}

.receipt-preview__panel {
    width: min(900px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
}

.receipt-preview__header {
    position: sticky;
    top: -20px;
    z-index: 2;
    padding: 0 0 14px;
    background: #fff;
}

.receipt-preview__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.receipt-preview .receipt-print {
    display: block;
}

.receipt-summary-page {
  position: relative;
    display: flex;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto 18px;
    padding: 22mm;
    flex-direction: column;
    justify-content: flex-start; /* was: center */
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    font-family: var(--font-print);
}

.receipt-summary-page::before {
    position: absolute;
    inset: 16mm;
    border: 1px solid #c8d0d8;
    content: "";
    pointer-events: none;
}

.receipt-summary-page__reference {
    position: absolute;
    top: 20mm;
    right: 22mm;
    z-index: 1;
    font-size: 12px;
    font-weight: 700;
}

.receipt-summary-page__header {
    position: relative;
    z-index: 1;
    margin-bottom: 14mm;
    text-align: center;
}

.receipt-summary-page__logo {
    width: 34mm;
    height: 34mm;
    object-fit: contain;
}

.receipt-summary-page__header h2 {
    margin: 3mm 0 1mm;
    font-size: 27px;
}

.receipt-summary-page__header p {
    margin: 0;
    color: #52606d;
    font-size: 15px;
}.receipt-summary-page__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 0;
    width: 100%;
}

.receipt-summary-page__details > div {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #cfd6de;
}

.receipt-summary-page__details dt {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.receipt-summary-page__details dd {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

body.is-previewing-record .app-shell {
    display: block;
}

body.is-previewing-record .sidebar,
body.is-previewing-record .app-topbar,
body.is-previewing-record .dashboard {
    display: none;
}

body.is-previewing-record .page--app {
    height: auto;
    min-height: 100vh;
    overflow: auto;
    padding: 18px;
    background: #eef7ff;
}

body.is-previewing-record .receipt-preview {
    position: static;
    display: block;
    padding: 0;
}

body.is-previewing-record .receipt-preview .modal__backdrop {
    display: none;
}

body.is-previewing-record .receipt-preview__panel {
    width: min(980px, 100%);
    max-height: none;
    margin: 0 auto;
    overflow: visible;
}

.receipt-print__sheet {
    position: relative;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 15mm 18mm 18mm;
    
    background: #fff;
    overflow: hidden;
    font-family: var(--font-print);
}

.receipt-print__sheet::before {
    position: absolute;
    inset: 3mm;
    z-index: 1;
   
    content: "";
    pointer-events: none;
}
.receipt-print__sheet,
    .receipt-print__sheet * {
        font-family: var(--font-print) !important;
    }
        body.is-printing-record > .receipt-print .receipt-print__sheet {
        display: block !important;
        width: 210mm;
        height: 297mm;
        min-height: 297mm;
        margin: 0;
        box-sizing: border-box;
        break-before: page;
        page-break-before: always;
        break-after: auto;
        page-break-after: auto;
    }

.receipt-print__reference {
    position: absolute;
    top: 14mm;
    right: 18mm;
    z-index: 3;
    font-size: 13px;
    font-weight: 700;
}

.receipt-print__corner {
    position: absolute;
    z-index: 2;
    width: 30mm;
    height: 30mm;
    object-fit: contain;
    pointer-events: none;
}

.receipt-print__corner--top-left {
    top: 60mm;
    left: 1mm;
}

.receipt-print__corner--top-right {
     top: 60mm;
    right: 3mm;
    transform: rotate(90deg);
}

.receipt-print__corner--bottom-right {
    right: 1mm;
    bottom: 3mm;
    transform: rotate(180deg);
}

.receipt-print__corner--bottom-left {
    bottom: 1mm;
    left: 3mm;
    transform: rotate(270deg);
}

.receipt-print__watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0.08;
    pointer-events: none;
}

.receipt-print__watermark-img {
    max-width: 500px;
    height: auto;
   
}

.sala-flower {
    width: 52mm;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}



.receipt-print__seal {
    width: 78mm;
    height: 78mm;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 6px solid #111827;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.receipt-print__watermark-text {
    margin-top: 8px;
    text-align: center;
    font-size: 32px;
    font-weight: 800;
}

.receipt-print__details {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 2.5fr 0.75fr;
    gap: 8px 18px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font-app);
}

.receipt-print__details div {
    min-height: 24px;
  
}

.receipt-print__details div:nth-child(2),
.receipt-print__details div:nth-child(5) {
    text-align: right;
}

.receipt-print__top,
.receipt-print__title-row,
.receipt-print__footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 1px;
}

.receipt-print__top {
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #000000;
    font-size: 15px;
    font-weight: 900;
    font-family: var(--font-app);
    width: 100%;
}

.receipt-print__top *,
.receipt-print__name-line,
.receipt-print__name-line *,
.receipt-print__amount-pair,
.receipt-print__amount-pair * {
    font-weight: 900 !important;
}

.receipt-print__amount-pair--compact,
.receipt-print__amount-pair--compact * {
    font-size: 0.78em;
    white-space: nowrap;
}

.receipt-print__amount-pair--large,
.receipt-print__amount-pair--large * {
    font-size: 0.92em;
    font-weight: 400 !important;
    white-space: nowrap;
}

.receipt-print__date-line {
    flex: 1;
    text-align: center;
}

.receipt-print__blank {
    display: inline-block;
    min-width: 78px;
  
}

.receipt-print__blank--amount {
    min-width: 190px;
    text-align: center;
}

.receipt-print__title-row {
    align-items: center;
    margin-top: 8px;
}

.receipt-print__title-row h2 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 21px;
    font-weight: 800;
    font-family: var(--font-app);
}

.receipt-print__no {
    min-width: 108px;
    text-align: right;
    font-size: 15px;
    font-weight: 800;
    font-family: var(--font-app);
}

.receipt-print__khmer {
    position: relative;
    z-index: 1;
    margin: 22px 0 18px;
    text-align: justify;
    font-size: 18px !important;
   
    line-height: 2.3;
    font-family: var(--font-print) !important;
}

.receipt-print__chinese {
    position: relative;
    z-index: 1;
    margin: 0;
    text-align: justify;
    font-family: var(--font-print);
    font-size: 18px;
    line-height: 2.05;
}

.receipt-print__footer {
    position: relative;
    z-index: 1;
    align-items: flex-start;
    margin-top: 10mm;
}

.receipt-print__receiver {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 2mm;
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font-print);
}

.receipt-print__receiver p {
    margin: 0 0 5px;
    line-height: 1.55;
}

.receipt-print__receiver-line > span:first-child {
    margin-left: 5px;
}

.receipt-print__dotted {
    width: 74mm;
    height: 1px;
    margin: 7px 0 10px;
    border-bottom: 1px dotted #111827;
}

.receipt-print__signed-date span {
    display: inline-block;
    min-width: 11mm;
    padding: 0 1mm;
    text-align: center;
}

.receipt-print__western-date {
    font-family: var(--font-print);
    font-size: 13px;
}

.receipt-print__western-date span {
    display: inline-block;
    min-width: 12mm;
    padding: 0 1mm;
    text-align: center;
}

.receipt-print__signature-name {
    display: inline-block;
    min-width: 0;
    padding: 0;
    text-align: left;
}

.receipt-print__flower {
    flex: 0 0 62mm;
    text-align: center;
}

.receipt-print__flower .sala-flower {
    width: 52mm;
    display: block;
    margin: 0 auto;
}

.receipt-print__flower p {
    margin: 1.5mm 0 0;
    font-size: 12px;
    line-height: 1.2;
}
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    body {
        background: #fff;
    }

    

    .receipt-summary-page {
        display: flex;
        width: 210mm;
        height: 297mm;
        min-height: 297mm;
        margin: 0;
    }

    .sidebar,
    .app-topbar,
    .dashboard__actions,
    .filter-form,
    .table-actions,
    .modal,
    .receipt-print {
        display: none !important;
    }

    .app-shell {
        display: block;
        min-height: auto;
        background: #fff;
    }

    .page--app {
        height: auto;
        min-height: auto;
        overflow: visible;
        padding: 0;
    }

    .dashboard--managed {
        display: block;
        height: auto;
    }

    .dashboard__header,
    .data-panel {
        padding: 0;
        margin: 0 0 14px;
        border: 0;
        background: #fff;
    }

    .data-panel--table,
    .data-panel--table .table-wrap {
        display: block;
        overflow: visible;
        min-height: auto;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
        color: #111827;
        border-bottom: 1px solid #b8c7d6;
    }

    .data-table th {
        position: static;
        background: #f4f7fb;
    }

    .data-table th:last-child,
    .data-table td:last-child,
    .pagination__links {
        display: none;
    }

    body.is-printing-record .dashboard {
        display: none !important;
    }

    body.is-printing-record .app-shell {
        display: none !important;
    }

    body.is-printing-record .receipt-preview .modal__backdrop,
    body.is-printing-record .receipt-preview__header {
        display: none !important;
    }

    body.is-printing-record > .receipt-print {
        display: block !important;
        width: 210mm;
        height: auto;
        overflow: visible;
    }



    body.is-printing-record .page--app {
        padding: 0;
    }
}

@media (max-width: 760px) {
    .page--login {
        align-items: flex-start;
        padding: 24px 14px;
    }

    .login-card {
        grid-template-columns: 1fr;
    }
      .login-card .img {
         text-align: center;
    }
.login-card .img {
    display: block;
    margin: 0 auto;
}
    

    .login-card__form {
        padding: 30px 24px;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar__brand {
        min-height: 54px;
    }

    .sidebar__nav {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 8px 10px;
    }

    .sidebar__nav p {
        display: none;
    }

    .sidebar__nav a {
        flex: 0 0 auto;
        margin: 0;
    }

    .app-topbar {
        padding: 0 12px;
    }

    .language-switcher label {
        display: none;
    }

    .page--app {
        height: calc(100vh - 44px);
        overflow: hidden;
        padding: 12px;
    }

    .dashboard__header {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 0;
    }

    .dashboard__actions {
        width: 100%;
        flex-wrap: wrap;
    }

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

    .inline-form {
        grid-template-columns: 1fr;
    }

    .request-form__money {
        grid-template-columns: 1fr;
    }

    .filter-form {
        grid-template-columns: 1fr;
    }

    .report-filter,
    .report-metrics,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .filter-form__actions,
    .filter-form__actions .button {
        width: 100%;
    }

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

    .data-panel--table .table-wrap {
        max-height: none;
        min-height: 160px;
    }

    .modal {
        align-items: flex-start;
        padding: 14px;
    }

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

    .modal__actions {
        flex-direction: column-reverse;
    }

    .modal__actions .button {
        width: 100%;
    }
}

.receipt-print__amount-line {
    font-size: 1.05em;
    white-space: nowrap;
}

.receipt-print__amount-line,
.receipt-print__amount-line * {
    font-weight: 400 !important;
}
