@font-face {
    font-family: "Jameel Noori Nastaleeq";
    src: url("../fonts/Jameel Noori Nastaleeq Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --gk-green: #198754;
    --gk-green-dark: #146c43;
    --slip-ink: #1e4f99;
    --slip-paper: #fffdf6;
    --bs-body-font-family: "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
    --bs-body-font-size: 1.2rem;
    --bs-body-line-height: 2.1;
}

body {
    min-height: 100vh;
    font-family: "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
    font-size: 1.2rem;
    line-height: 2.1;
    font-synthesis: none;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand, .nav-link, .btn, .form-control, .form-select,
.form-label, .badge, .alert, .table {
    font-family: inherit;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    line-height: 2.2;
    padding-top: 0.2em;
}

.btn, .nav-link, .navbar-brand, .badge, .alert {
    line-height: 1.9;
}

.form-control, .form-select {
    height: auto;
    line-height: 1.9;
    padding-top: 0.35rem;
    padding-bottom: 0.1rem;
}

.table > :not(caption) > * > * {
    line-height: 1.9;
    padding-top: 0.45rem;
    padding-bottom: 0.15rem;
}

code, .ltr, [dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(25, 135, 84, 0.18), transparent 40%),
        linear-gradient(160deg, #f8faf8 0%, #e8f5e9 45%, #f1f3f1 100%);
}

.login-card {
    width: 100%;
    max-width: 440px;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 12px 40px rgba(20, 108, 67, 0.12);
}

.login-brand {
    font-family: "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
    font-size: 2.6rem;
    line-height: 2.3;
    color: var(--gk-green);
}

.stat-card {
    border: 0;
    border-radius: 0.85rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.table thead th {
    white-space: nowrap;
    font-size: 0.95rem;
}

.today-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.85rem 0.2rem;
    border: 1px solid #b7dfc8;
    border-radius: 999px;
    background: #f0faf4;
}

.today-pill-label {
    color: #146c43;
    font-weight: 700;
}

.today-pill-date {
    font-weight: 700;
    font-size: 1.15rem;
    color: #0f5132;
    unicode-bidi: isolate;
}

.dashboard-card .card-header {
    border-bottom: 1px solid #e9ecef;
}

.dashboard-filter .form-label {
    font-weight: 700;
    color: #146c43;
}

.dashboard-table-wrap {
    overflow-x: auto;
}

.table-dashboard {
    table-layout: fixed;
    width: 100%;
    min-width: 880px;
    font-size: 1rem;
    margin-bottom: 0;
}

.table-dashboard col.w-sn { width: 52px; }
.table-dashboard col.w-no { width: 88px; }
.table-dashboard col.w-date { width: 108px; }
.table-dashboard col.w-vehicle { width: 96px; }
.table-dashboard col.w-farmers { width: 72px; }
.table-dashboard col.w-money { width: 108px; }
.table-dashboard col.w-actions { width: 168px; }

.table-dashboard-admin {
    min-width: 980px;
}

.table-dashboard-admin col.w-kanda { width: 96px; }
.table-dashboard-admin col.w-munshi { width: 88px; }
.table-dashboard-admin col.w-actions-admin { width: 148px; }

.table-dashboard-admin .dashboard-actions .btn {
    line-height: 1.4;
    padding: 0.2rem 0.55rem;
}

.table-dashboard > :not(caption) > * > * {
    line-height: 1.45;
    padding: 0.4rem 0.45rem 0.25rem;
    vertical-align: middle;
}

.table-dashboard thead th {
    font-size: 0.92rem;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
}

.table-dashboard thead th.text-end {
    text-align: end;
}

.table-dashboard .cell-ltr {
    direction: ltr;
    text-align: center;
    unicode-bidi: isolate;
}

.table-dashboard tbody tr.factory-cpr-clear > td {
    background-color: rgba(25, 135, 84, 0.14);
}

.table-dashboard.table-hover tbody tr.factory-cpr-clear:hover > td {
    background-color: rgba(25, 135, 84, 0.22);
}

.factory-cpr-clear-badge {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

.table-dashboard .dashboard-actions .btn {
    line-height: 1.4;
    padding: 0.2rem 0.55rem;
}

@media screen and (max-width: 991.98px) {
    .navbar-collapse .navbar-nav {
        margin-bottom: 0.5rem;
    }

    .navbar-text,
    .navbar-collapse .btn {
        display: inline-flex;
        align-items: center;
        margin: 0.35rem 0.4rem 0.35rem 0 !important;
    }
}

@media screen and (max-width: 768px) {
    main.container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }

    .page-heading .btn,
    .dashboard-filter .btn {
        flex: 1 1 auto;
    }

    .today-pill {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }

    .stat-card .fs-3 {
        font-size: 1.45rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .table-dashboard,
    .table-dashboard-admin {
        min-width: 0;
        table-layout: auto;
    }

    .table-dashboard colgroup {
        display: none;
    }

    .table-dashboard thead {
        display: none;
    }

    .table-dashboard tbody tr {
        display: block;
        margin: 0.75rem;
        border: 1px solid #d8e8de;
        border-radius: 0.75rem;
        background: #fff;
        overflow: hidden;
    }

    .table-dashboard tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        width: auto !important;
        text-align: start !important;
        border: 0;
        border-bottom: 1px solid #eef3ef;
        padding: 0.45rem 0.75rem 0.3rem;
    }

    .table-dashboard tbody td:last-child {
        border-bottom: 0;
    }

    .table-dashboard tbody td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        color: #146c43;
        flex: 0 0 auto;
    }

    .table-dashboard tbody td.dashboard-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .table-dashboard tbody td[colspan] {
        display: block;
        text-align: center !important;
    }

    .slip-meta-grid {
        grid-template-columns: 1fr 1fr;
    }

    .slip-meta-grid .slip-meta-cell:nth-child(odd) {
        border-inline-start: 0;
    }

    .slip-foot {
        flex-direction: column;
    }

    .slip-foot .slip-calc-side {
        border-inline-end: 0;
        border-bottom: 1px solid var(--slip-ink);
    }

    .slip-register .slip-no {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .slip-meta-grid {
        grid-template-columns: 1fr;
    }

    .slip-meta-cell {
        border-inline-start: 0;
        border-top: 1px solid var(--slip-ink);
    }

    .slip-meta-grid .slip-meta-cell:first-child {
        border-top: 0;
    }
}

.page-heading {
    border-bottom: 2px solid #d1e7dd;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.num {
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
}

.daak-slip {
    background: var(--slip-paper);
    border: 2px solid var(--slip-ink);
    border-radius: 0.35rem;
    padding: 0.9rem;
    box-shadow: 0 8px 28px rgba(30, 79, 153, 0.08);
}

.slip-head {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.slip-report-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.65rem 0.4rem;
    border: 2px solid var(--slip-ink);
    background: #fff;
}

.slip-report-head-centered {
    text-align: center;
}

.slip-report-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.25rem;
}

.slip-report-ids {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    width: 100%;
    padding-top: 0.25rem;
    border-top: 1px solid #c5d4ea;
    font-size: 0.82rem;
    line-height: 1.15;
}

.slip-id-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    white-space: nowrap;
}

.slip-id-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    white-space: nowrap;
}

.slip-id-label {
    font-weight: 700;
    color: #35588d;
    font-size: 0.78rem;
}

.slip-id-value {
    font-size: 0.95rem;
    color: #0f1f3d;
}

.slip-report-head .slip-no-auto-hint {
    font-size: 0.65rem;
    color: #5c6f8a;
    margin-top: 0.05rem;
}

.slip-report-head .slip-logo {
    background: transparent;
    border: none;
    padding: 0;
    flex-shrink: 0;
}

.slip-report-head .slip-logo-hero img,
.slip-report-head .slip-logo img,
.slip-report-head .slip-logo-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 200px;
    margin: 0 auto;
    object-fit: contain;
    background: transparent;
    border: none;
    box-shadow: none;
}

.slip-report-head .slip-company-hero,
.slip-report-head .slip-company {
    font-family: "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    color: var(--slip-ink);
    width: 100%;
}

.slip-report-head .slip-phone {
    text-align: center;
}

.slip-brand {
    border: 2px solid var(--slip-ink);
    padding: 0.35rem 0.9rem 0.5rem;
    text-align: center;
    min-width: 220px;
}

.slip-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.slip-logo img,
.slip-logo-img {
    display: block;
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    background: transparent;
}

.slip-brand-text {
    text-align: center;
    min-width: 0;
}

.slip-company,
.slip-title {
    font-family: "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--slip-ink);
}

.slip-figure {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.daak-slip .slip-table-daak td.num,
.daak-slip .slip-table-daak td.ltr.num,
.daak-slip .slip-foot .slip-calc td.num,
.daak-slip .slip-foot .slip-calc td.num span {
    font-weight: 800;
    font-size: 0.88rem;
    color: #0f1f3d;
}

.daak-slip .slip-meta-cell strong,
.daak-slip .slip-meta-input {
    font-weight: 800;
    font-size: 0.95rem;
}

.kanda-logo-preview {
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2px;
    background: #fff;
}

.factory-readonly,
input.factory-readonly[readonly],
textarea.factory-readonly[readonly] {
    background-color: #e9ecef !important;
    color: #495057 !important;
    border-color: #ced4da;
    cursor: default;
}

.factory-readonly-text {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 600;
}


.slip-phone {
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #163e78;
}

.slip-place {
    color: #35588d;
    font-size: 0.95rem;
}

.slip-no {
    min-width: 170px;
    border: 2px solid var(--slip-ink);
    padding: 0.4rem 0.7rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slip-no-label,
.slip-field {
    font-weight: 700;
    color: var(--slip-ink);
}

.slip-no-input,
.slip-no-value {
    font-size: 1.7rem;
    font-weight: 700;
    text-align: center;
    color: #14213d;
}

.slip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.4rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.slip-register .slip-head {
    margin-bottom: 0.55rem;
}

.slip-register .slip-brand {
    flex: 1 1 55%;
}

.slip-register .slip-no {
    flex: 0 0 190px;
}

.slip-no-auto-hint {
    font-size: 0.75rem;
    color: #5c6f8a;
    line-height: 1.2;
    margin-top: 0.1rem;
    text-align: center;
}

.slip-no-pending {
    color: #8a96a8;
    font-weight: 600;
}

.slip-no-date {
    margin-top: 0.15rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #163e78;
    text-align: center;
}

.slip-meta-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 1px solid var(--slip-ink);
    margin-bottom: 0.55rem;
}

.slip-meta-cell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.25rem 0.45rem 0.15rem;
    border-inline-start: 1px solid var(--slip-ink);
    min-height: 2.6rem;
}

.slip-meta-grid .slip-meta-cell:first-child {
    border-inline-start: 0;
}

.slip-meta-cell > span {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--slip-ink);
    line-height: 1.2;
}

.slip-meta-cell strong {
    font-size: 0.95rem;
    line-height: 1.25;
}

.slip-meta-input {
    border: none;
    border-bottom: 1px solid var(--slip-ink);
    background: transparent;
    padding: 0.05rem 0.2rem;
    width: 100%;
    font-weight: 700;
    font-family: inherit;
}

.slip-meta-input:focus {
    outline: none;
    background: #fff8dc;
}

.slip-table-wrap {
    margin-bottom: 0.35rem;
}

.slip-register .slip-table .col-sn { width: 42px; }
.slip-register .slip-table .col-bharati { width: 38px; }
.slip-register .slip-table .col-name { width: auto; min-width: 140px; }
.slip-register .slip-table .col-grass { width: 140px; min-width: 140px; }
.slip-register .slip-table .col-safi { width: 155px; min-width: 155px; }
.slip-register .slip-table .col-rate { width: 130px; min-width: 130px; }
.slip-register .slip-table .col-maz { width: 140px; min-width: 140px; }

.slip-register-wide .slip-table-wrap {
    overflow-x: auto;
}

.slip-register-wide .slip-table-daak {
    width: 100%;
    table-layout: fixed;
    min-width: 980px;
    font-size: 0.78rem;
}

.slip-register-wide .slip-table-daak .col-sn { width: 3%; }
.slip-register-wide .slip-table-daak .col-bharati { width: 3%; }
.slip-register-wide .slip-table-daak .col-name { width: 13%; }
.slip-register-wide .slip-table-daak .col-wazan { width: 7%; }
.slip-register-wide .slip-table-daak .col-katoti { width: 9%; }
.slip-register-wide .slip-table-daak .col-safi-kg { width: 7%; }
.slip-register-wide .slip-table-daak .col-rate { width: 6%; }
.slip-register-wide .slip-table-daak .col-safi { width: 9%; }
.slip-register-wide .slip-table-daak .col-maz-rate { width: 6%; }
.slip-register-wide .slip-table-daak .col-maz { width: 7%; }
.slip-register-wide .slip-table-daak .col-safi-net { width: 8%; }

.slip-table-daak tr.slip-entries-total {
    border-top: 2px solid var(--slip-ink);
}

.slip-table-daak tr.slip-entries-total th,
.slip-table-daak tr.slip-entries-total td {
    font-weight: 800;
    background: #f4f8f5;
    vertical-align: middle;
}

.slip-entries-total-label {
    text-align: center;
    white-space: nowrap;
}

.slip-register-wide .slip-table-daak .slip-zameendar,
.slip-register-wide .slip-table-daak .slip-name {
    font-weight: 800;
    white-space: normal;
    word-break: break-word;
    line-height: 1.15;
    overflow: visible;
}

.slip-kanda-name {
    font-size: 1rem;
    font-weight: 700;
    color: #35588d;
}

.slip-register-wide .slip-table-daak .wazan-cell,
.slip-register-wide .slip-table-daak .katoti-cell,
.slip-register-wide .daak-wazan-ltr {
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: nowrap;
    padding: 2px 3px;
    direction: ltr;
    unicode-bidi: isolate;
    text-align: center;
}

.slip-register-wide .calc-text {
    display: block;
    font-size: 0.72rem;
    line-height: 1.15;
    min-height: 1.4em;
    padding: 2px 3px;
}

.slip-register-wide .slip-table-daak .slip-input {
    font-size: 0.78rem;
    padding: 1px 3px;
}

.slip-register .slip-table .safi-grass,
.slip-register .slip-table .safi-raqam,
.slip-register .slip-table .rate,
.slip-register .slip-table .mazdori {
    min-width: 7.25rem;
    font-size: 1.05rem;
    box-sizing: border-box;
}

.slip-bharati {
    text-align: center;
    color: #7a94bf;
}

.slip-name {
    text-align: right;
}

.slip-foot {
    display: flex;
    gap: 0;
    border: 1px solid var(--slip-ink);
    margin-top: 0.15rem;
}

.slip-foot .slip-calc {
    flex: 1 1 50%;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.slip-foot .slip-calc-side {
    border-inline-end: 1px solid var(--slip-ink);
}

.slip-foot .slip-calc th,
.slip-foot .slip-calc td {
    border-color: var(--slip-ink);
}

.slip-sign-row th {
    height: 2.6rem;
    text-align: center;
    vertical-align: bottom;
    background: #fff;
    font-weight: 700;
    color: var(--slip-ink);
}

.slip-field {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.slip-field input,
.slip-no-input,
.slip-input {
    border: none;
    border-bottom: 1px solid var(--slip-ink);
    background: transparent;
    border-radius: 0;
    padding: 0.15rem 0.35rem;
    width: 100%;
    font-family: inherit;
    box-shadow: none;
}

.slip-field input {
    min-width: 140px;
    font-weight: 600;
}

.slip-input:focus,
.slip-field input:focus,
.slip-no-input:focus,
.slip-calc input:focus {
    outline: none;
    background: #fff8dc;
}

.slip-table {
    width: 100%;
    min-width: 1020px;
    border-collapse: collapse;
    margin-bottom: 0.35rem;
}

.slip-register .slip-table {
    table-layout: fixed;
}

.slip-table th,
.slip-table td,
.slip-calc th,
.slip-calc td {
    border: 1px solid var(--slip-ink);
    padding: 0.2rem 0.3rem 0.05rem;
    vertical-align: middle;
    line-height: 1.85;
}

.slip-table th {
    background: #e7eefc;
    color: var(--slip-ink);
    text-align: center;
    font-weight: 700;
    white-space: normal;
    line-height: 1.35;
}

.slip-sn {
    width: 54px;
    text-align: center;
    font-weight: 700;
    color: var(--slip-ink);
    white-space: nowrap;
}

.zameendar-input {
    min-width: 160px;
    text-align: right;
}

.slip-table .ltr,
.slip-calc td,
.slip-calc input {
    direction: ltr;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.safi-raqam {
    font-weight: 700;
    color: #163e78;
}

.slip-table input[type="number"]::-webkit-outer-spin-button,
.slip-table input[type="number"]::-webkit-inner-spin-button,
.slip-calc input[type="number"]::-webkit-outer-spin-button,
.slip-calc input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.slip-table input[type="number"],
.slip-calc input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.btn-remove {
    border: 0;
    background: transparent;
    color: #b42318;
    font-weight: 700;
    line-height: 1;
    padding: 0 0.15rem;
}

.slip-formula {
    color: var(--slip-ink);
    font-size: 0.95rem;
    margin: 0.45rem 0 0.55rem;
}

.slip-calcs,
.slip-signs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.slip-calc {
    flex: 1 1 280px;
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.slip-calc th {
    width: 58%;
    text-align: right;
    background: #f3f7fd;
    font-weight: 700;
    color: #163e78;
}

.slip-calc td {
    font-weight: 700;
}

.slip-calc input {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-family: inherit;
}

.slip-total th,
.slip-total td {
    background: #d9e6ff;
    font-size: 1.05rem;
}

.slip-balance th,
.slip-balance td {
    background: #fff6d8;
}

.slip-signs {
    margin-top: 12px;
}

.slip-sign {
    flex: 1 1 220px;
    border: 1px solid var(--slip-ink);
    min-height: 78px;
    padding: 0.45rem 0.7rem;
    font-weight: 700;
    color: var(--slip-ink);
}

.unit {
    font-weight: 600;
    color: #35588d;
}

.slip-no-input::placeholder,
.slip-field input::placeholder {
    color: #c5d0e4;
    font-weight: 500;
    font-size: 0.95rem;
}

@media screen and (max-width: 768px) {
    .slip-head,
    .slip-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .slip-field {
        width: 100%;
    }

    .slip-field {
        display: flex;
    }

    .slip-field span {
        white-space: nowrap;
    }

    .slip-field input {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
    }

    .slip-title {
        font-size: 1.7rem;
        line-height: 2;
    }
}

@page {
    size: A4 portrait;
    margin: 2mm;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 2mm;
    }

    .navbar,
    .no-print,
    .alert,
    .slip-toolbar {
        display: none !important;
    }

    html,
    body,
    body.bg-canvas {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        font-size: 10pt !important;
        line-height: 1.3 !important;
    }

    script,
    .flatpickr-calendar {
        display: none !important;
    }

    main.container,
    main.container-xl,
    main[class*="container"] {
        max-width: none !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .daak-slip {
        box-shadow: none;
        background: #fff !important;
        border-color: #000 !important;
        border-width: 1px;
        max-width: none;
        margin: 0;
        padding: 2mm 3mm;
        page-break-after: auto;
        page-break-inside: auto;
        break-inside: auto;
    }

    .daak-slip,
    .daak-slip th,
    .daak-slip td,
    .slip-no,
    .slip-brand,
    .slip-sign,
    .slip-total th,
    .slip-total td,
    .slip-balance th,
    .slip-balance td,
    .slip-table th {
        -webkit-print-color-adjust: economy;
        print-color-adjust: economy;
    }

    .daak-slip .slip-head {
        gap: 2mm;
        margin-bottom: 2mm;
    }

    .daak-slip .slip-brand,
    .daak-slip .slip-no {
        padding: 1.5mm 2mm;
        min-width: 0;
    }

    .daak-slip .slip-company,
    .daak-slip .slip-title {
        font-size: 14pt;
        line-height: 1.15;
        font-weight: 800;
    }

    .daak-slip .slip-logo img {
        max-height: 14mm;
        max-width: 14mm;
    }

    .daak-slip .slip-no-value,
    .daak-slip .slip-no-input {
        font-size: 15pt;
        line-height: 1.1;
        font-weight: 800;
    }

    .daak-slip .slip-table-daak td.num,
    .daak-slip .slip-foot .slip-calc td.num {
        font-weight: 800;
        font-size: 8pt;
    }

    .daak-slip .slip-place,
    .daak-slip .slip-phone {
        font-size: 8pt;
        line-height: 1.15;
    }

    .daak-slip .slip-meta-grid {
        margin-bottom: 1.5mm;
    }

    .daak-slip .slip-meta-cell {
        min-height: 0;
        padding: 0.8mm 1.2mm 0.5mm;
    }

    .daak-slip .slip-meta-cell > span {
        font-size: 6.5pt;
        line-height: 1.05;
    }

    .daak-slip .slip-meta-cell strong,
    .daak-slip .slip-no-date {
        font-size: 8pt;
        line-height: 1.05;
    }

    .daak-slip .slip-formula {
        display: none !important;
    }

    .daak-slip .slip-table {
        min-width: 0 !important;
        width: 100%;
        margin-bottom: 1mm;
    }

    .daak-slip .slip-table th,
    .daak-slip .slip-table td {
        padding: 0 1px !important;
        font-size: 7pt;
        line-height: 1 !important;
        height: 4.1mm;
        max-height: 4.1mm;
        overflow: hidden;
        vertical-align: middle;
    }

    .daak-slip .slip-table .col-bharati,
    .daak-slip .slip-bharati {
        width: 5mm;
        max-width: 5mm;
        padding: 0 !important;
    }

    .daak-slip .slip-table th {
        line-height: 1.1 !important;
        height: auto;
        max-height: none;
        padding-top: 0.5mm !important;
        padding-bottom: 0.5mm !important;
    }

    .daak-slip .slip-sn {
        width: 6mm;
        font-size: 7pt;
    }

    .daak-slip .slip-foot {
        margin-top: 1mm;
    }

    .daak-slip .slip-foot .slip-calc th,
    .daak-slip .slip-foot .slip-calc td {
        padding: 0 1.5px !important;
        font-size: 7pt;
        line-height: 1.05 !important;
        height: 4.2mm;
        max-height: 4.2mm;
    }

    .daak-slip .slip-sign-row th {
        height: 7mm;
        font-size: 7pt;
    }

    .daak-slip .slip-total th,
    .daak-slip .slip-total td,
    .daak-slip .slip-balance th,
    .daak-slip .slip-balance td {
        font-size: 8pt;
    }

    .daak-slip .unit {
        font-size: 6.5pt;
    }

    .daak-slip.slip-register {
        transform: none;
        width: 100%;
    }

    .daak-slip.slip-register-wide {
        box-sizing: border-box !important;
        transform: none !important;
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 1.5mm 2mm !important;
        background: #fff !important;
        border: 2px solid #000 !important;
        border-radius: 0;
        box-shadow: none;
        overflow: visible !important;
        display: block !important;
        break-inside: auto;
        page-break-inside: auto;
        page-break-after: auto;
        break-after: auto;
    }

    .daak-slip .slip-report-head {
        flex: 0 0 auto;
        margin-bottom: 1mm;
        padding: 1.2mm 2mm 1mm;
        align-items: center;
        border: 2px solid #000;
        background: #fff !important;
    }

    .daak-slip .slip-report-head .slip-company-hero,
    .daak-slip .slip-report-head .slip-company {
        font-size: 20pt;
        line-height: 1.25;
    }

    .daak-slip .slip-report-head .slip-logo {
        background: transparent !important;
    }

    .daak-slip .slip-report-head .slip-logo-hero img,
    .daak-slip .slip-report-head .slip-logo img,
    .daak-slip .slip-report-head .slip-logo-img {
        max-height: 18mm;
        max-width: 32mm;
        background: transparent !important;
        filter: grayscale(100%);
        print-color-adjust: economy;
        -webkit-print-color-adjust: economy;
    }

    .daak-slip .slip-report-ids {
        font-size: 9pt;
        gap: 2mm 5mm;
        padding-top: 2mm;
        border-top: 1px solid #000;
    }

    .daak-slip .slip-id-value {
        font-size: 11pt;
        font-weight: 800;
    }

    .daak-slip .slip-id-label {
        font-size: 8.5pt;
    }

    .daak-slip .slip-report-head .slip-no-auto-hint {
        display: none !important;
    }

    .daak-slip.slip-register-wide .slip-meta-grid {
        flex: 0 0 auto;
        margin-bottom: 1.5mm !important;
    }

    .daak-slip.slip-register-wide .slip-table-wrap {
        min-width: 0 !important;
        min-height: 0 !important;
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
        display: block !important;
    }

    .daak-slip.slip-register-wide .slip-table-daak {
        min-width: 0 !important;
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        table-layout: fixed !important;
        overflow: visible !important;
    }

    .daak-slip.slip-register-wide .slip-table-daak .col-sn { width: 5% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-bharati { width: 4% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-name { width: 13% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-wazan { width: 8% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-katoti { width: 9% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-safi-kg { width: 8% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-rate { width: 7% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-safi { width: 9% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-maz-rate { width: 7% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-maz { width: 7% !important; }
    .daak-slip.slip-register-wide .slip-table-daak .col-safi-net { width: 8% !important; }

    .daak-slip.slip-register-wide .slip-table-daak th,
    .daak-slip.slip-register-wide .slip-table-daak td {
        font-size: 8pt;
        line-height: 1.25 !important;
        padding: 1.1mm 0.45mm !important;
        overflow: hidden !important;
        max-height: none !important;
        height: auto !important;
        border-color: #000 !important;
        word-break: break-word;
    }

    .daak-slip.slip-register-wide .slip-table-daak tbody tr {
        height: auto !important;
    }

    .daak-slip.slip-register-wide .slip-table-daak tr.slip-entries-total th,
    .daak-slip.slip-register-wide .slip-table-daak tr.slip-entries-total td {
        background: #fff !important;
        color: #000 !important;
        font-weight: 800 !important;
        border-color: #000 !important;
    }

    .daak-slip.slip-register-wide tr.slip-row-pad,
    .daak-slip.slip-register-wide tr.print-hide-row,
    .daak-slip.slip-register-wide tr.entry-row[data-empty="1"],
    .daak-slip.slip-register-wide tr.entry-row:has(.zameendar-input[value=""]) {
        display: none !important;
        visibility: collapse !important;
        height: 0 !important;
        line-height: 0 !important;
        border: none !important;
    }

    .daak-slip.slip-register-wide .slip-table-daak th {
        background: #fff !important;
        color: #000 !important;
        font-size: 6.6pt;
        font-weight: 800;
        line-height: 1.15 !important;
        padding: 1mm 0.3mm !important;
        white-space: normal !important;
    }

    .daak-slip.slip-register-wide .slip-table-daak .slip-zameendar,
    .daak-slip.slip-register-wide .slip-table-daak .slip-name,
    .daak-slip.slip-register-wide .slip-table-daak .zameendar-input {
        font-size: 7.5pt;
        font-weight: 800;
        min-width: 0 !important;
        width: 100% !important;
        white-space: normal;
        word-break: break-word;
        text-align: right;
    }

    .daak-slip.slip-register-wide .slip-table-daak td.num,
    .daak-slip.slip-register-wide .slip-table-daak .slip-input {
        font-size: 7.5pt;
        font-weight: 800;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .daak-slip.slip-register-wide .slip-foot {
        flex: 0 0 auto !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 0 !important;
        margin-top: 1.5mm;
        border: 1px solid #000;
        width: 100% !important;
    }

    .daak-slip.slip-register-wide .slip-foot .slip-calc {
        flex: 1 1 0 !important;
        width: auto !important;
        max-width: 50% !important;
        min-width: 0 !important;
    }

    .daak-slip.slip-register-wide .slip-foot .slip-calc-side {
        border-inline-end: 1px solid #000 !important;
        border-bottom: 0 !important;
    }

    .daak-slip.slip-register-wide .slip-foot .slip-calc th,
    .daak-slip.slip-register-wide .slip-foot .slip-calc td {
        height: auto !important;
        max-height: none !important;
        font-size: 9pt;
        line-height: 1.3 !important;
        padding: 1.4mm 1.6mm !important;
    }

    .daak-slip.slip-register-wide .slip-sign-row th {
        height: 6mm !important;
        min-height: 6mm !important;
    }

    .daak-slip.slip-register-wide .slip-table th,
    .daak-slip.slip-register-wide .slip-table td {
        height: auto !important;
        max-height: none !important;
    }

    .daak-slip.slip-register-wide .wazan-cell,
    .daak-slip.slip-register-wide .katoti-cell,
    .daak-slip.slip-register-wide .calc-text {
        font-size: 8pt;
        line-height: 1.25;
    }

    .daak-slip input.slip-input,
    .daak-slip input.slip-meta-input,
    .daak-slip .slip-calc input,
    .daak-slip .zameendar-input,
    .daak-slip .safi-raqam,
    .daak-slip .rate,
    .daak-slip .mazdori,
    .daak-slip .safi-grass,
    .daak-slip .slip-field input {
        border: none !important;
        border-bottom: none !important;
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        font-size: inherit !important;
        font-weight: 800 !important;
        -webkit-print-color-adjust: economy;
        print-color-adjust: economy;
    }

    .daak-slip .slip-meta-grid {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        border: 1px solid #000;
        margin-bottom: 2mm;
        width: 100% !important;
    }

    .daak-slip .slip-meta-cell {
        min-width: 0 !important;
        min-height: 8mm;
        padding: 0.8mm 1mm 0.5mm;
        overflow: hidden;
    }

    .daak-slip .slip-meta-cell > span {
        font-size: 7pt;
        line-height: 1.15;
    }

    .daak-slip .slip-meta-cell strong,
    .daak-slip .slip-meta-input {
        font-size: 8.5pt;
        line-height: 1.2;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body.page-slip-work {
        min-height: 0 !important;
        height: auto !important;
    }

    body.page-slip-work main.container-xl,
    body.page-slip-work main[class*="container"] {
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
    }

    body.page-slip-work .daak-slip.slip-register-wide {
        page: auto !important;
    }
}

.factory-ledger {
    background: #fffdf8;
    border: 2px solid var(--slip-ink);
    padding: 0.75rem;
    box-shadow: 0 6px 20px rgba(30, 79, 153, 0.08);
}

.factory-ledger-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid var(--slip-ink);
}

.factory-ledger-title {
    font-size: 1.65rem;
    line-height: 1.5;
    color: var(--slip-ink);
    margin: 0;
}

.factory-ledger-sub {
    color: #35588d;
    font-size: 0.95rem;
}

.factory-ledger-meta {
    border: 1px solid var(--slip-ink);
    padding: 0.35rem 0.65rem;
    font-weight: 700;
    color: #163e78;
}

.factory-ledger-wrap {
    overflow-x: auto;
}

.factory-ledger-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    margin: 0;
}

.factory-ledger-table th,
.factory-ledger-table td {
    border: 1px solid var(--slip-ink);
    padding: 0.25rem 0.35rem;
    vertical-align: middle;
    text-align: center;
    line-height: 1.35;
}

.factory-ledger-table thead th {
    background: #e7eefc;
    color: var(--slip-ink);
    font-weight: 700;
    white-space: normal;
}

.factory-ledger-table td:nth-child(6) {
    text-align: right;
}

.factory-ledger-total th,
.factory-ledger-total td {
    background: #fff6d8;
    font-weight: 700;
}

@media screen and (max-width: 768px) {
    .factory-ledger {
        padding: 0.55rem;
    }

    .factory-ledger-head {
        flex-direction: column;
    }

    .factory-ledger-table {
        min-width: 980px;
        font-size: 0.85rem;
    }
}

input.date-input,
.slip-meta-input.date-input {
    cursor: pointer;
}

input.date-input[readonly] {
    background-color: #fff;
}

.flatpickr-calendar {
    direction: ltr;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 0.95rem;
}

body.bg-canvas {
    background:
        radial-gradient(900px 280px at 0% 0%, rgba(196, 163, 90, 0.16), transparent 55%),
        linear-gradient(180deg, #e7efe9 0%, #f4f7f5 42%, #eef3ef 100%);
    color: #143024;
}

.print-only {
    display: none !important;
}

@media print {
    .print-only {
        display: block !important;
    }
}

.app-navbar {
    background: linear-gradient(90deg, #0b3d2e 0%, #146c43 58%, #1a7a4c 100%) !important;
    border-bottom: 3px solid #c4a35a;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.app-navbar .navbar-brand {
    font-size: 1.45rem;
    letter-spacing: 0.01em;
}

.app-navbar .nav-link {
    font-weight: 700;
    padding: 0.3rem 0.8rem !important;
    border-radius: 0.5rem;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
    background: rgba(255, 255, 255, 0.12);
}

.munshi-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem;
    color: #f7fbf8;
    background:
        linear-gradient(135deg, rgba(11, 61, 46, 0.94), rgba(20, 108, 67, 0.86)),
        repeating-linear-gradient(118deg, rgba(196, 163, 90, 0.16) 0 12px, transparent 12px 24px),
        #0b3d2e;
    border-radius: 1.35rem;
    padding: 1.7rem 1.6rem 1.5rem;
    box-shadow: 0 18px 40px rgba(11, 61, 46, 0.22);
    margin-bottom: 1.25rem;
}

.munshi-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -40px;
    bottom: -50px;
    width: 180px;
    height: 180px;
    border: 18px solid rgba(196, 163, 90, 0.18);
    border-radius: 50%;
    pointer-events: none;
}

.munshi-hero-kicker {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    color: #e7d7a8;
}

.munshi-hero-title {
    margin: 0;
    font-size: 2.15rem;
    line-height: 1.35;
}

.munshi-hero-user {
    margin: 0.35rem 0 0.85rem;
    color: rgba(247, 251, 248, 0.86);
}

.munshi-hero-dot {
    margin: 0 0.35rem;
    color: #c4a35a;
}

.munshi-hero-date {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.28rem 0.9rem 0.15rem;
    border: 1px solid rgba(231, 215, 168, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.munshi-hero-date strong {
    font-size: 1.15rem;
    unicode-bidi: isolate;
}

.btn.munshi-hero-cta {
    --bs-btn-color: #143024;
    --bs-btn-bg: #c4a35a;
    --bs-btn-border-color: #c4a35a;
    --bs-btn-hover-color: #0b3d2e;
    --bs-btn-hover-bg: #d4b56a;
    --bs-btn-hover-border-color: #d4b56a;
    --bs-btn-active-color: #0b3d2e;
    --bs-btn-active-bg: #d4b56a;
    --bs-btn-active-border-color: #d4b56a;
    position: relative;
    z-index: 1;
    font-weight: 700;
    padding: 0.55rem 1.35rem;
    border-radius: 0.8rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.munshi-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.munshi-metric {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #fff;
    border: 1px solid #d7e4db;
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    box-shadow: 0 8px 22px rgba(20, 48, 36, 0.05);
}

.munshi-metric-icon {
    width: 2.7rem;
    height: 2.7rem;
    display: grid;
    place-items: center;
    border-radius: 0.8rem;
    background: #e7f4ec;
    color: #146c43;
    font-size: 1.2rem;
    flex: 0 0 auto;
}

.munshi-metric-icon-leaf {
    background: #e8f0fb;
    color: #1e4f99;
}

.munshi-metric-icon-gold {
    background: #f7efd8;
    color: #8a6a24;
}

.munshi-metric-label {
    color: #5b7264;
    font-size: 0.92rem;
    line-height: 1.5;
}

.munshi-metric-value {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0b3d2e;
}

.munshi-metric-sub {
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.munshi-today {
    background: #fff;
    border: 1px solid #d7e4db;
    border-radius: 1.15rem;
    box-shadow: 0 10px 28px rgba(20, 48, 36, 0.06);
    overflow: hidden;
}

.munshi-today-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1.05rem 1.2rem 0.85rem;
    border-bottom: 1px solid #e6eee8;
    background: linear-gradient(180deg, #fbfdfb, #f4f8f5);
}

.munshi-today-head h2 {
    margin: 0;
    font-size: 1.35rem;
    color: #0b3d2e;
}

.munshi-today-head p {
    margin: 0.1rem 0 0;
    color: #5b7264;
    font-size: 0.95rem;
}

.munshi-today-count {
    background: #0b3d2e;
    color: #f7efd8;
    border-radius: 999px;
    padding: 0.2rem 0.85rem 0.05rem;
    font-weight: 700;
}

.munshi-empty {
    text-align: center;
    padding: 2.6rem 1.25rem;
}

.munshi-empty-icon {
    width: 4.2rem;
    height: 4.2rem;
    margin: 0 auto 0.7rem;
    display: grid;
    place-items: center;
    border-radius: 1.1rem;
    background: #eef6f1;
    color: #146c43;
    font-size: 2rem;
}

.munshi-empty h3 {
    margin: 0 0 0.35rem;
    color: #0b3d2e;
}

.munshi-empty p {
    color: #5b7264;
    margin-bottom: 1.1rem;
}

.munshi-daak-list {
    display: grid;
    gap: 0;
}

.munshi-daak-card {
    display: flex;
    align-items: stretch;
    gap: 0.9rem 1rem;
    padding: 1.05rem 1.2rem 1.15rem;
    border-bottom: 1px solid #e6eee8;
}

.munshi-daak-card:last-child {
    border-bottom: 0;
}

.munshi-daak-index {
    display: grid;
    place-items: center;
    flex: 0 0 3.4rem;
    min-height: 3.4rem;
    background: #f3f7f4;
    border: 1px solid #d7e4db;
    border-radius: 0.9rem;
    color: #146c43;
    font-weight: 800;
    font-size: 1.15rem;
}

.munshi-daak-main {
    flex: 1 1 18rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.munshi-daak-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 0.45rem;
}

.munshi-daak-top h3 {
    margin: 0;
    font-size: 1.35rem;
    color: #0b3d2e;
    line-height: 1.4;
}

.munshi-daak-date {
    color: #5b7264;
    font-weight: 700;
}

.munshi-daak-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.1rem;
    list-style: none;
    margin: 0 0 0.7rem;
    padding: 0;
}

.munshi-daak-meta li {
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
}

.munshi-daak-meta span {
    color: #5b7264;
}

.munshi-daak-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem 0.85rem;
}

.munshi-daak-amounts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    flex: 1 1 22rem;
}

.munshi-daak-amounts div {
    background: #f6faf7;
    border: 1px solid #e3eee7;
    border-radius: 0.65rem;
    padding: 0.25rem 0.55rem 0.15rem;
}

.munshi-daak-amounts span {
    display: block;
    color: #5b7264;
    font-size: 0.82rem;
    line-height: 1.4;
}

.munshi-daak-amounts strong {
    font-size: 1.05rem;
    color: #143024;
}

.munshi-daak-amounts .is-total {
    background: #f7efd8;
    border-color: #ead9a8;
}

.munshi-daak-amounts .is-total strong {
    color: #8a6a24;
}

.munshi-daak-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.munshi-daak-actions .btn {
    font-weight: 700;
}

.slip-toolbar {
    position: sticky;
    top: 0.65rem;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d7e4db;
    border-radius: 0.95rem;
    box-shadow: 0 10px 28px rgba(11, 61, 46, 0.1);
}

.slip-toolbar-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.7rem;
    min-width: 0;
}

.slip-toolbar-title strong {
    font-size: 1.2rem;
    color: #0b3d2e;
}

.slip-toolbar-no {
    font-weight: 800;
    color: #1e4f99;
}

.slip-toolbar-hint {
    color: #5b7264;
    font-size: 0.92rem;
}

.slip-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.slip-toolbar-actions .btn,
.slip-toolbar > .btn {
    font-weight: 700;
}

@media screen and (max-width: 991.98px) {
    .munshi-metrics {
        grid-template-columns: 1fr;
    }

    .munshi-daak-actions {
        width: 100%;
        justify-content: stretch;
        margin-inline-start: 0;
    }

    .munshi-daak-actions .btn {
        flex: 1 1 auto;
    }
}

@media screen and (max-width: 768px) {
    .munshi-hero-title {
        font-size: 1.7rem;
    }

    .munshi-hero-cta {
        width: 100%;
    }

    .munshi-daak-amounts {
        grid-template-columns: 1fr 1fr;
    }

    .slip-toolbar {
        position: static;
    }

    .slip-toolbar-actions {
        width: 100%;
    }

    .slip-toolbar-actions .btn {
        flex: 1 1 auto;
    }
}

@media print {
    .daak-slip.slip-register-wide,
    .daak-slip.slip-register-wide * {
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .daak-slip.slip-register-wide .slip-table,
    .daak-slip.slip-register-wide .slip-table-daak {
        table-layout: fixed !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(1),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(1) { width: 4.5% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(2),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(2) { width: 4% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(3),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(3) { width: 12% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(4),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(4),
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(5),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(5),
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(6),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(6) { width: 7.5% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(7),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(7) { width: 9% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(8),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(8) { width: 7.5% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(9),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(9) { width: 7% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(10),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(10) { width: 9% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(11),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(11) { width: 7% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(12),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(12) { width: 7% !important; }
    .daak-slip.slip-register-wide .slip-table-daak th:nth-child(13),
    .daak-slip.slip-register-wide .slip-table-daak td:nth-child(13) { width: 8% !important; }

    .daak-slip.slip-register-wide .slip-table-daak input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: block !important;
        overflow: hidden !important;
    }

    .daak-slip.slip-register-wide .slip-table-daak .num,
    .daak-slip.slip-register-wide .slip-table-daak .ltr,
    .daak-slip.slip-register-wide .slip-table-daak .calc-text,
    .daak-slip.slip-register-wide .slip-table-daak .slip-input {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: clip;
    }

    .daak-slip.slip-register-wide .slip-foot,
    .daak-slip .slip-foot {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .daak-slip .slip-foot .slip-calc {
        flex: 1 1 0 !important;
        width: auto !important;
        max-width: 50% !important;
    }

    .daak-slip,
    .daak-slip * {
        color: #000 !important;
        box-shadow: none !important;
    }

    .daak-slip,
    .daak-slip .slip-report-head,
    .daak-slip.slip-register-wide,
    .daak-slip th,
    .daak-slip td,
    .daak-slip .slip-calc,
    .daak-slip .slip-calc th,
    .daak-slip .slip-calc td,
    .daak-slip .slip-total th,
    .daak-slip .slip-total td,
    .daak-slip .slip-balance th,
    .daak-slip .slip-balance td,
    .daak-slip .slip-sign-row th,
    .daak-slip .slip-meta-cell {
        background: #fff !important;
        background-color: #fff !important;
        background-image: none !important;
    }

    .daak-slip,
    .daak-slip th,
    .daak-slip td,
    .daak-slip .slip-report-head,
    .daak-slip .slip-meta-grid,
    .daak-slip .slip-meta-cell,
    .daak-slip .slip-foot,
    .daak-slip .slip-foot .slip-calc th,
    .daak-slip .slip-foot .slip-calc td {
        border-color: #000 !important;
    }

    .daak-slip .slip-bharati,
    .daak-slip .slip-id-label,
    .daak-slip .unit {
        color: #000 !important;
    }

    .daak-slip.slip-register-wide .slip-report-head .slip-logo-hero img,
    .daak-slip.slip-register-wide .slip-report-head .slip-logo img,
    .daak-slip.slip-register-wide .slip-report-head .slip-logo-img {
        max-height: 18mm;
        max-width: 32mm;
    }

    .daak-slip.slip-register-wide .slip-report-head .slip-company-hero,
    .daak-slip.slip-register-wide .slip-report-head .slip-company {
        font-size: 18pt;
        line-height: 1.15;
    }

    body.page-slip-work > *:not(main),
    body.page-slip-work main > *:not(.daak-slip):not(form.daak-slip):not(article.daak-slip) {
        display: none !important;
    }

    form.daak-slip.slip-register-wide,
    article.daak-slip.slip-register-wide {
        page-break-before: auto !important;
        break-before: auto !important;
        page-break-after: auto !important;
        break-after: auto !important;
    }

    body.page-advance-report .no-print,
    body.page-kanda-advance .no-print {
        display: none !important;
    }

    body.page-advance-report,
    body.page-kanda-advance {
        background: #fff !important;
    }

    body.page-advance-report main,
    body.page-kanda-advance main {
        padding: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }

    body.page-advance-report .card,
    body.page-kanda-advance .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.page-advance-report .card-header,
    body.page-kanda-advance .card-header {
        background: #fff !important;
        color: #000 !important;
        border-bottom: 1px solid #000 !important;
    }

    body.page-advance-report .table,
    body.page-kanda-advance .table,
    body.page-advance-report .table th,
    body.page-advance-report .table td,
    body.page-kanda-advance .table th,
    body.page-kanda-advance .table td {
        color: #000 !important;
        border-color: #000 !important;
        background: #fff !important;
        print-color-adjust: economy;
        -webkit-print-color-adjust: economy;
    }

    body.page-advance-report .table-success thead th,
    body.page-advance-report .table-light thead th,
    body.page-kanda-advance .table-success thead th {
        background: #fff !important;
        color: #000 !important;
        font-weight: 800;
    }

    body.page-advance-report .text-success,
    body.page-kanda-advance .text-success {
        color: #000 !important;
    }

    body.page-advance-report .badge,
    body.page-kanda-advance .badge {
        border: 1px solid #000 !important;
        color: #000 !important;
        background: #fff !important;
    }

    body.page-advance-report .advance-report-print-head,
    body.page-kanda-advance .advance-report-print-head {
        display: block !important;
        border-bottom: 1px solid #000;
        padding-bottom: 2mm;
        margin-bottom: 2mm;
    }

    body.page-advance-report .advance-report-print-head .h4,
    body.page-kanda-advance .advance-report-print-head .h4 {
        font-size: 12pt !important;
        margin-bottom: 1mm !important;
    }

    body.page-advance-report .advance-report-stats {
        display: none !important;
    }

    body.page-advance-report .stat-card,
    body.page-kanda-advance .stat-card {
        border: 1px solid #000 !important;
    }

    body.page-kanda-advance .kanda-advance-print-stats {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 2mm !important;
        margin-bottom: 2mm !important;
    }

    body.page-kanda-advance .kanda-advance-print-stats > [class*="col-"] {
        flex: 1 1 0 !important;
        width: auto !important;
        max-width: none !important;
        padding: 0 !important;
    }

    body.page-kanda-advance .kanda-advance-print-stats .card-body {
        padding: 1mm 2mm !important;
    }

    body.page-kanda-advance .kanda-advance-print-stats .fs-3 {
        font-size: 10pt !important;
        line-height: 1.2 !important;
    }

    body.page-kanda-advance .kanda-advance-print-stats .text-muted.small {
        font-size: 7pt !important;
        line-height: 1.1 !important;
    }

    body.page-advance-report .dashboard-card .card-header,
    body.page-advance-report .card.mb-4 .card-header {
        padding: 1.5mm 2mm !important;
    }

    body.page-advance-report .card.mb-4 {
        margin-bottom: 2mm !important;
    }
}

@-moz-document url-prefix() {
    @media print {
        html,
        body.page-slip-work {
            height: auto !important;
            min-height: 0 !important;
            overflow: visible !important;
        }

        body.page-slip-work > nav,
        body.page-slip-work > script,
        body.page-slip-work .flatpickr-calendar {
            display: none !important;
            height: 0 !important;
            max-height: 0 !important;
            overflow: hidden !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        body.page-slip-work .daak-slip.slip-register-wide {
            page: auto !important;
            float: none !important;
        }

        body.page-slip-work tr.entry-row[data-empty="1"],
        body.page-slip-work tr.print-hide-row,
        body.page-slip-work tr.slip-row-pad {
            display: none !important;
            visibility: collapse !important;
        }
    }
}

