@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/VazirMatn.woff2"), url("fonts/VazirMatnMedium.woff2"), url("fonts/VazitMatnBold.woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Novin";
    src: url("fonts/Novin.woff2"), url("fonts/Novin.woff");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Vazirmatn", "Novin", Tahoma, Arial, sans-serif !important;
    direction: rtl;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: inherit;
}

body {
    background: #f8fafc;
    color: #111827;
}

a,
button,
input,
textarea,
select,
.dxbl-component,
.dxbl-grid,
.dxbl-text-edit,
.dxbl-btn,
.dxbl-popup,
.dxbl-form-layout {
    font-family: "Vazirmatn", "Vazir", Tahoma, Arial, sans-serif !important;
}

.dxbl-grid {
    direction: ltr;
    width: 100%;
    overflow: hidden;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0px !important;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.dxbl-grid table,
.dxbl-grid .dxbl-grid-table {
    direction: rtl;
}

.dxbl-grid th,
.dxbl-grid td,
.dxbl-grid .dxbl-grid-header-cell,
.dxbl-grid .dxbl-grid-data-cell {
    direction: rtl;
    text-align: right !important;
    vertical-align: middle;
}

.dxbl-grid .dxbl-grid-header-row,
.dxbl-grid thead tr {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.dxbl-grid .dxbl-grid-header-cell,
.dxbl-grid thead th {
    color: #334155;
    font-weight: 800;
    border-bottom: 1px solid #dbe3ec !important;
}

.dxbl-grid .dxbl-grid-data-row,
.dxbl-grid tbody tr {
    transition: background-color 0.15s ease;
}

.dxbl-grid .dxbl-grid-data-row:nth-child(even),
.dxbl-grid tbody tr:nth-child(even) {
    background: #fbfdff;
}

.dxbl-grid .dxbl-grid-data-row:hover,
.dxbl-grid tbody tr:hover {
    background: #f1f5f9 !important;
}

.dxbl-grid .dxbl-grid-data-cell,
.dxbl-grid tbody td {
    color: #1e293b;
    border-bottom: 1px solid #eef2f7 !important;
}

.dxbl-grid .dxbl-grid-pager,
.dxbl-grid .dxbl-pager {
    direction: rtl;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.alert {
    margin-bottom: 1rem;
}

.delivery-confirmation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-weight: 700;
}

.delivery-confirmation--done {
    color: #166534;
    background: #dcfce7;
}

.delivery-confirmation--waiting {
    color: #92400e;
    background: #fef3c7;
}

.ledger-page,
.page-shell {
    width: 100%;
    min-width: 0;
}

.ledger-header,
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ledger-header h3,
.page-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.ledger-header p,
.page-header p {
    margin: 0.35rem 0 0;
    color: #6b7280;
}

.form-card {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .ledger-header,
    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column-reverse;
    }
}
