﻿@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/IRANSansX-Regular.ttf") format("truetype")
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/IRANSansX-Regular.ttf") format("truetype")
}

@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/IRANSansX-Bold.ttf") format("truetype")
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "IRANSans", "Tahoma", "Arial", sans-serif;
    font-size: 14px;
    word-spacing: -1px;
    height: 100%
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050
}

.invalid {
    outline: 1px solid #e50000
}

.validation-message {
    color: #e50000
}

.text-left {
    text-align: left !important;
}

#blazor-error-ui {
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        left: .75rem;
        right: unset;
        top: .5rem
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAy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5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem,#b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: #fff
}

    .blazor-error-boundary::after {
        content: "خطایی رخ داده است"
    }

.status-bar-safe-area {
    display: none
}

.mud-application-layout-rtl .mud-input-label-outlined {
    transform: translate(-14px, 14px) scale(1)
}

.mud-table {
    border: 1px solid #dcdcdc
}

    .mud-table .mud-table-root .mud-table-head .mud-table-row .mud-table-cell {
        border-left: 1px solid #dcdcdc;
        border-top: 1px solid #dcdcdc;
        border-radius: 0;
        font-weight: bold;
        font-size: 12px
    }

.mud-application-layout-rtl .mud-table-bordered .mud-table-container .mud-table-root .mud-table-head .mud-table-row th.mud-table-cell:first-child {
    border-top-right-radius: 0
}

.mud-input-helper-text.mud-input-error {
    direction: rtl
}

/* MudAlert RTL — متن فارسی از راست شروع شود
   ContentAlignment پیش‌فرض Left در RTL به justify-right تبدیل می‌شود و به چپ می‌چسبد */
.mud-application-layout-rtl .mud-alert,
html[dir="rtl"] .mud-alert {
    direction: rtl;
    text-align: right;
}

.mud-application-layout-rtl .mud-alert .mud-alert-position:not(.justify-center):not(.justify-sm-center),
html[dir="rtl"] .mud-alert .mud-alert-position:not(.justify-center):not(.justify-sm-center) {
    justify-content: flex-start !important;
}

.mud-application-layout-rtl .mud-alert .mud-alert-message,
html[dir="rtl"] .mud-alert .mud-alert-message {
    text-align: right;
}

.mud-application-layout-rtl .mud-alert .mud-alert-position.justify-center,
.mud-application-layout-rtl .mud-alert .mud-alert-position.justify-sm-center,
html[dir="rtl"] .mud-alert .mud-alert-position.justify-center,
html[dir="rtl"] .mud-alert .mud-alert-position.justify-sm-center {
    justify-content: center !important;
    text-align: center;
}

.mud-application-layout-rtl .mud-alert .mud-alert-position.justify-center .mud-alert-message,
.mud-application-layout-rtl .mud-alert .mud-alert-position.justify-sm-center .mud-alert-message,
html[dir="rtl"] .mud-alert .mud-alert-position.justify-center .mud-alert-message,
html[dir="rtl"] .mud-alert .mud-alert-position.justify-sm-center .mud-alert-message {
    text-align: center;
}

/* Text Alignment Utilities */
.text-left input {
    text-align: left !important;
}

.text-right input {
    text-align: right !important;
}

.text-center input {
    text-align: center !important;
}

.mud-input-control.text-left input[type="number"] {
    text-align: left !important;
}

.mud-input-control.text-right input[type="number"] {
    text-align: right !important;
}

.mud-input-control.text-center input[type="number"] {
    text-align: center !important;
}

/* وضعیت کارپوشه مودیان */
.moadian-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
}

.moadian-status__dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.moadian-status.is-approved {
    color: #1b5e20;
    background: #e8f5e9;
    border-color: #a5d6a7;
}

.moadian-status.is-approved-systemic {
    color: #0d47a1;
    background: #e3f2fd;
    border-color: #90caf9;
}

.moadian-status.is-rejected {
    color: #b71c1c;
    background: #ffebee;
    border-color: #ef9a9a;
}

.moadian-status.is-awaiting {
    color: #e65100;
    background: #fff3e0;
    border-color: #ffcc80;
}

.moadian-status.is-sent {
    color: #1b5e20;
    background: #e8f5e9;
    border-color: #a5d6a7;
}

.moadian-status.is-need-no {
    color: #00695c;
    background: #e0f2f1;
    border-color: #80cbc4;
}

.moadian-status.is-impossible {
    color: #4a148c;
    background: #f3e5f5;
    border-color: #ce93d8;
}

.moadian-status.is-canceled {
    color: #37474f;
    background: #eceff1;
    border-color: #b0bec5;
}

.moadian-status.is-not-found,
.moadian-status.is-denied {
    color: #f57f17;
    background: #fffde7;
    border-color: #fff176;
}

.moadian-status.is-unknown {
    color: #546e7a;
    background: #f5f7f8;
    border-color: #cfd8dc;
}

/* Invoice list — operations popover (MudPopover portal) */
.inv-ops-popover.mud-popover,
.mud-popover.inv-ops-popover,
.inv-ops-popover {
    border-radius: 14px !important;
    border: 1px solid #dbe3ee !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .14) !important;
    overflow: hidden;
    min-width: 268px;
    padding: 6px !important;
    background: #fff !important;
}

.inv-ops-popover--compact {
    min-width: 210px !important;
}

.inv-ops-popover .mud-list {
    padding: 0 !important;
}

.inv-ops-head {
    padding: 8px 12px 4px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: #64748b;
}

.inv-ops-divider {
    height: 1px;
    margin: 6px 8px;
    background: #e2e8f0;
}

.inv-ops-popover .inv-ops-item.mud-list-item,
.inv-ops-popover .mud-menu-item.inv-ops-item {
    border-radius: 10px !important;
    margin: 2px 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.inv-ops-popover .inv-ops-item:hover:not(.mud-list-item-disabled):not(.mud-disabled),
.inv-ops-popover .mud-menu-item.inv-ops-item:hover:not([disabled]) {
    background: #f1f5f9 !important;
}

.inv-ops-popover .inv-ops-item--danger:hover:not(.mud-list-item-disabled):not(.mud-disabled) {
    background: #fef2f2 !important;
}

.inv-ops-item__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    width: 100%;
}

.inv-ops-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    text-align: right;
}

.inv-ops-text strong {
    font-size: .84rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.inv-ops-text small {
    font-size: .68rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.2;
}

.inv-ops-popover .mud-list-item-disabled .inv-ops-text strong,
.inv-ops-popover .mud-list-item-disabled .inv-ops-text small,
.inv-ops-popover .mud-disabled .inv-ops-text strong,
.inv-ops-popover .mud-disabled .inv-ops-text small {
    color: #94a3b8 !important;
}

.inv-ops-ico {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inv-ops-ico--pdf { background: #fee2e2; color: #b91c1c; }
.inv-ops-ico--xls { background: #dcfce7; color: #15803d; }
.inv-ops-ico--edit { background: #e0e7ff; color: #3730a3; }
.inv-ops-ico--return { background: #ffedd5; color: #c2410c; }
.inv-ops-ico--cancel { background: #fce7f3; color: #be185d; }
.inv-ops-ico--inq { background: #e0f2fe; color: #0369a1; }
.inv-ops-ico--send { background: #d1fae5; color: #047857; }
.inv-ops-ico--copy { background: #f1f5f9; color: #475569; }
.inv-ops-ico--ready { background: #dbeafe; color: #1d4ed8; }
.inv-ops-ico--draft { background: #f8fafc; color: #64748b; }
.inv-ops-ico--danger { background: #fee2e2; color: #dc2626; }

.inv-ops-item--danger .inv-ops-text strong {
    color: #dc2626;
}