@font-face { font-family: Vazir; src: url('../fonts/Vazir-Regular.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Vazir; src: url('../fonts/Vazir-Medium.ttf') format('truetype'); font-style: normal; font-weight: 500 600; font-display: swap; }
@font-face { font-family: Vazir; src: url('../fonts/Vazir-Bold.ttf') format('truetype'); font-style: normal; font-weight: 700 900; font-display: swap; }

:root { font-family: Vazir, Tahoma, sans-serif; color: #182437; background: #f3f6fb; font-synthesis: none; }
html, body, button, input, textarea, select { font-family: Vazir, Tahoma, sans-serif; }
html, body { min-height: 100%; background: #f3f6fb; color: #182437; }
body { margin: 0; font-size: .94rem; line-height: 1.7; }

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.products-page { color: #172b4d; padding: 1.7rem clamp(1rem, 2.5vw, 2.4rem) 3rem; max-width: 1440px; margin: 0 auto; }
.products-heading, .table-toolbar, .products-heading > div, .dialog-actions, .row-actions { display: flex; align-items: center; }
.products-heading, .table-toolbar { justify-content: space-between; gap: 1rem; }
.products-heading h1 { font-size: 1.8rem; font-weight: 750; margin: .25rem 0; }
.products-heading p, .table-toolbar span, .products-summary span { color: #738198; margin: 0; }
.eyebrow { color: #5676ce; font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.primary-button, .secondary-button, .delete-button { border: 0; border-radius: 9px; padding: .7rem 1rem; font-weight: 650; cursor: pointer; }
.primary-button { color: white; background: #4263c7; box-shadow: 0 4px 10px #4263c72b; }
.primary-button:hover { background: #3453b2; }
.primary-button:disabled { opacity: .6; cursor: wait; }
.products-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
.products-summary > div, .products-card { background: #fff; border: 1px solid #e8edf4; border-radius: 14px; box-shadow: 0 5px 20px #25385808; }
.products-summary > div { padding: 1rem 1.2rem; display: grid; gap: .55rem; }
.products-summary strong { font-size: 1.35rem; }
.products-summary small { font-size: .78rem; font-weight: 500; color: #738198; }
.products-card { overflow: hidden; }
.table-toolbar { padding: 1.2rem 1.3rem; border-bottom: 1px solid #edf0f5; }
.table-toolbar h2, .product-dialog h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.search-box { width: min(100%, 310px); border: 1px solid #dce3ed; border-radius: 9px; padding: .7rem .9rem; outline: none; }
.search-box:focus, .product-dialog input:focus, .product-dialog textarea:focus { border-color: #7891e0; box-shadow: 0 0 0 3px #4263c71c; }
.table-scroll { overflow-x: auto; }
.products-table { width: 100%; border-collapse: collapse; min-width: 700px; text-align: right; }
.products-table th { background: #f8f9fc; color: #728097; font-size: .82rem; font-weight: 650; }
.products-table th, .products-table td { padding: .95rem 1.3rem; border-bottom: 1px solid #edf0f5; }
.products-table tbody tr:hover { background: #fafbfe; }
.product-code { color: #596b88; background: #f2f4f8; border-radius: 6px; padding: .25rem .5rem; font-size: .85rem; }
.product-name { font-weight: 650; }
.description-cell { color: #758198; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-actions { gap: .9rem; }
.text-button, .close-button { border: 0; background: transparent; color: #4263c7; cursor: pointer; padding: .25rem; }
.danger-text { color: #c24444; }
.table-footer { color: #78859a; padding: .85rem 1.3rem; font-size: .85rem; }
.empty-state { text-align: center; color: #77849a; padding: 3rem 1rem; }
.notice { padding: .8rem 1rem; margin: 1rem; border-radius: 8px; }
.error-notice, .form-error { color: #a83232; background: #fff1f1; }
.success-notice { color: #23734c; background: #edfaf3; }
.notice button { border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 1200; background: #11182780; display: grid; place-items: center; padding: 1rem; }
.product-dialog { background: white; width: min(100%, 500px); border-radius: 16px; padding: 1.4rem; box-shadow: 0 20px 60px #11182740; }
.product-dialog > header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; }
.close-button { font-size: 1.5rem; color: #7a8699; }
.product-dialog form, .product-dialog label { display: grid; gap: .5rem; }
.product-dialog form { gap: .9rem; }
.product-dialog label { font-size: .9rem; font-weight: 600; }
.product-dialog input, .product-dialog textarea { width: 100%; border: 1px solid #dce3ed; border-radius: 8px; padding: .7rem .8rem; font: inherit; font-weight: 400; outline: none; }
.product-dialog textarea { resize: vertical; }
.validation-message { color: #bd3c3c; font-size: .82rem; }
.dialog-actions { justify-content: flex-start; gap: .65rem; margin-top: .5rem; }
.secondary-button { color: #48566d; background: #f1f3f7; }
.delete-button { color: white; background: #c34444; }
.confirm-dialog p { color: #738198; }
@media (max-width: 650px) { .products-heading { align-items: flex-start; flex-direction: column; } .products-heading .primary-button { width: 100%; } .products-summary { grid-template-columns: 1fr; gap: .65rem; } .products-summary > div { padding: .8rem 1rem; } .table-toolbar { align-items: stretch; flex-direction: column; } .search-box { width: 100%; } }

/* Consistent desktop-style controls and application surfaces */
button, input, textarea, select { font-size: .92rem; }
button { transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #83a1f5; outline-offset: 2px; }
.products-heading { margin-bottom: 1.25rem; }
.products-heading > div { align-items: flex-start; flex-direction: column; gap: .1rem; }
.products-heading h1 { font-size: clamp(1.55rem, 2vw, 2rem); letter-spacing: -.02em; }
.products-heading p { font-size: .9rem; }
.primary-button { min-height: 42px; padding: .6rem 1.1rem; border-radius: 10px; font-size: .9rem; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px #4263c733; }
.secondary-button, .delete-button { min-height: 40px; padding: .55rem 1rem; border-radius: 9px; font-size: .9rem; }
.secondary-button:hover { background: #e7ebf2; }
.products-summary > div { min-height: 92px; border-radius: 13px; }
.products-card { border-color: #e5eaf2; border-radius: 14px; box-shadow: 0 8px 24px #2538580a; }
.products-card { overflow: visible; }
.products-card .e-grid { overflow: visible; }
.e-filter-popup, .e-filter-popup.e-popup, .e-popup.e-filter-popup { z-index: 1200 !important; }
.table-toolbar { background: #fff; }
.table-toolbar h2 { font-size: 1.02rem; font-weight: 700; }
.search-box { min-height: 42px; background: #fbfcfe; font-size: .88rem; }
.products-table th { font-weight: 700; letter-spacing: -.01em; }
.products-table td { font-size: .9rem; }
.text-button { border-radius: 7px; font-size: .86rem; }
.text-button:hover { background: #eef2ff; }
.danger-text:hover { background: #fff0f0; }
.notice { border-radius: 9px; font-size: .9rem; }
.dialog-backdrop { backdrop-filter: blur(3px); }
.product-dialog { border: 1px solid #e6eaf1; border-radius: 16px; }
.product-dialog input, .product-dialog textarea { min-height: 42px; background: #fbfcfe; }
.product-dialog input:disabled { background: #f0f2f6; color: #728097; }
.editor-card { padding: clamp(1.2rem, 3vw, 2rem); }
.editor-fields input, .editor-fields textarea { min-height: 44px; background: #fbfcfe; border-radius: 9px; }
.editor-fields textarea { min-height: 112px; }
.editor-heading h1 { font-size: 1.4rem; }
.editor-breadcrumb { margin-inline: auto; max-width: 820px; }
.editor-actions { justify-content: flex-start; }

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

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

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

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

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Branded first-load screen shown before the WebAssembly app is ready. */
.startup-screen { position: relative; display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; overflow: hidden; padding: 2rem; background: radial-gradient(ellipse at 50% 45%, #f9fbff 0%, #f1f5fc 55%, #e9eff9 100%); }
.startup-orb { position: absolute; border-radius: 50%; filter: blur(1px); pointer-events: none; }
.startup-orb-one { width: 34rem; height: 34rem; inset: -20rem auto auto -12rem; background: linear-gradient(140deg, #d9e7ff99, #d9e7ff00); }
.startup-orb-two { width: 30rem; height: 30rem; inset: auto -13rem -20rem auto; background: linear-gradient(140deg, #d8d5ff66, #d8d5ff00); }
.startup-card { position: relative; z-index: 1; width: min(100%, 470px); padding: 2.7rem 3rem 2.2rem; border: 1px solid #ffffffc9; border-radius: 24px; background: #ffffffd9; box-shadow: 0 24px 80px #25385816, 0 3px 12px #25385809; text-align: center; backdrop-filter: blur(16px); animation: startup-appear .55s cubic-bezier(.2,.7,.25,1) both; }
.startup-brand { display: flex; align-items: center; justify-content: center; gap: .8rem; padding-bottom: 1.7rem; border-bottom: 1px solid #edf1f7; text-align: right; }
.startup-brand strong, .startup-brand small { display: block; }
.startup-brand strong { color: #182d50; font-size: 1.35rem; line-height: 1.4; }
.startup-brand small { margin-top: .15rem; color: #8794a8; font-size: .72rem; }
.startup-logo { display: grid; width: 46px; height: 46px; grid-template-columns: 1fr 1fr; gap: 4px; padding: 9px; border-radius: 14px; background: linear-gradient(145deg, #396bd7, #694bd2); box-shadow: 0 7px 16px #4663cb40; transform: rotate(-4deg); }
.startup-logo span { border-radius: 3px; background: #fff; opacity: .96; }
.startup-logo span:nth-child(2), .startup-logo span:nth-child(3) { opacity: .64; }
.startup-progress-wrap { position: relative; width: 108px; height: 108px; margin: 2rem auto 1.15rem; }
.startup-progress-wrap .loading-progress { width: 108px; height: 108px; margin: 0; }
.startup-progress-wrap .loading-progress circle { stroke-width: 7px; }
.startup-progress-wrap .loading-progress .progress-track { stroke: #e8edf6; }
.startup-progress-wrap .loading-progress .progress-value { stroke: #4d68d8; stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .86), 300%; stroke-linecap: round; transition: stroke-dasharray .12s ease-out; }
.startup-progress-wrap .loading-progress-text { inset: 0; display: grid; place-items: center; color: #263c64; font-size: 1rem; }
.startup-progress-wrap .loading-progress-text::after { content: var(--blazor-load-percentage-text, "در حال بارگذاری"); }
.startup-card h1 { margin: 0; color: #1d2e4c; font-size: 1.18rem; font-weight: 700; }
.startup-card p { margin: .55rem 0 1.45rem; color: #7d8aa0; font-size: .83rem; }
.startup-loading-line { height: 4px; overflow: hidden; border-radius: 10px; background: #edf0f8; }
.startup-loading-line span { display: block; width: 34%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #416bdd, #8b6be2); animation: startup-sweep 1.5s ease-in-out infinite; }
.startup-footer { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1.2rem; color: #97a2b3; font-size: .72rem; }
.startup-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #35b987; box-shadow: 0 0 0 4px #35b9871c; }
.startup-version { position: absolute; inset: auto 0 1.15rem; color: #9aa6b8; font-family: Arial, sans-serif; font-size: .63rem; letter-spacing: .13em; text-align: center; }
.startup-version span { padding: 0 .35rem; color: #aab4c3; }
@keyframes startup-sweep { 0% { transform: translateX(220%); } 100% { transform: translateX(-320%); } }
@keyframes startup-appear { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 520px) { .startup-screen { padding: 1rem; } .startup-card { padding: 2rem 1.4rem 1.7rem; } .startup-version { bottom: .65rem; font-size: .56rem; } }
@media (prefers-reduced-motion: reduce) { .startup-card, .startup-loading-line span { animation: none; } }

code {
    color: #c02d76;
}

.route-transition { animation: route-enter .28s cubic-bezier(.2,.7,.25,1) both; }
@keyframes route-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.editor-breadcrumb { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; color: #8190a5; font-size: .88rem; }
.back-link { border: 0; background: transparent; color: #4263c7; cursor: pointer; font: inherit; }
.editor-card { max-width: 820px; margin-inline: auto; padding: 1.6rem; }
.editor-heading { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.3rem; margin-bottom: 1.3rem; border-bottom: 1px solid #edf0f5; }
.editor-heading h1 { font-size: 1.45rem; margin: .2rem 0; }
.editor-heading p { color: #738198; margin: 0; }
.editor-icon { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 12px; color: #4263c7; background: #edf1ff; font-size: 1.6rem; }
.editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.1rem; }
.editor-fields label { display: grid; gap: .45rem; font-size: .9rem; font-weight: 650; }
.editor-fields .description-field { grid-column: 1 / -1; }
.editor-fields input, .editor-fields textarea { width: 100%; border: 1px solid #dce3ed; border-radius: 8px; padding: .7rem .8rem; font: inherit; font-weight: 400; outline: none; }
.editor-fields input:focus, .editor-fields textarea:focus { border-color: #7891e0; box-shadow: 0 0 0 3px #4263c71c; }
.editor-fields input:disabled { color: #77849a; background: #f4f6f9; }
.editor-actions { display: flex; justify-content: flex-start; gap: .7rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #edf0f5; }
.editor-loading { padding: 2rem; text-align: center; }
.editor-error { margin-top: 1rem; padding: .8rem; border-radius: 8px; }
.grid-loading { min-height: 265px; padding: 1.4rem 1.5rem 1.2rem; }
.grid-loading-heading { display: flex; align-items: center; justify-content: center; gap: .85rem; margin: .15rem 0 1.5rem; text-align: right; }
.grid-loading-heading strong, .grid-loading-heading span { display: block; }
.grid-loading-heading strong { color: #263b60; font-size: .96rem; }
.grid-loading-heading div > span { margin-top: .15rem; color: #8795aa; font-size: .78rem; }
.grid-loading-spinner { width: 27px; height: 27px; flex: 0 0 27px; border: 3px solid #e3e9f6; border-top-color: #4b68d7; border-left-color: #4b68d7; border-radius: 50%; animation: grid-spinner .8s linear infinite; }
.grid-skeleton { overflow: hidden; border: 1px solid #edf0f6; border-radius: 10px; }
.grid-skeleton-header, .grid-skeleton-row { display: grid; grid-template-columns: .8fr 1.25fr 1.8fr .9fr; align-items: center; gap: 1.2rem; min-height: 43px; padding: .65rem 1rem; }
.grid-skeleton-header { background: #f7f9fc; border-bottom: 1px solid #edf0f6; }
.grid-skeleton-row { border-bottom: 1px solid #f0f2f7; }
.grid-skeleton-row:last-child { border-bottom: 0; }
.grid-skeleton i { display: block; height: 9px; max-width: 100%; border-radius: 8px; background: linear-gradient(100deg, #edf1f7 25%, #f8f9fc 42%, #edf1f7 63%); background-size: 220% 100%; animation: grid-shimmer 1.4s ease-in-out infinite; }
.grid-skeleton-header i { height: 8px; background: #e7ecf5; animation: none; }
.grid-skeleton-row i:nth-child(1) { width: 62%; }
.grid-skeleton-row i:nth-child(2) { width: 75%; }
.grid-skeleton-row i:nth-child(3) { width: 88%; }
.grid-skeleton-row i:nth-child(4) { width: 48%; }
@keyframes grid-spinner { to { transform: rotate(360deg); } }
@keyframes grid-shimmer { to { background-position: -220% 0; } }
@media (max-width: 650px) { .grid-loading { padding: 1rem .8rem; } .grid-skeleton-header, .grid-skeleton-row { grid-template-columns: .9fr 1.4fr 1.5fr; gap: .65rem; padding-inline: .7rem; } .grid-skeleton-header i:last-child, .grid-skeleton-row i:last-child { display: none; } }
@media (prefers-reduced-motion: reduce) { .grid-loading-spinner, .grid-skeleton i { animation: none; } }
@media (max-width: 650px) { .editor-breadcrumb { align-items: flex-start; flex-direction: column; } .editor-fields { grid-template-columns: 1fr; } .editor-fields .description-field { grid-column: auto; } .editor-card { padding: 1rem; } }
@media (prefers-reduced-motion: reduce) { .route-transition { animation: none; } }
