﻿h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}


@font-face {
    font-family: 'Vazir';
    src: url('fonts/Vazir/Vazir.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'irn-sns';
    src: url('fonts/ttf/IRANSansWeb(FaNum).ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* محتوای اصلی */
.mud-main-content {
    min-height: calc(100vh - 64px);
    box-sizing: border-box;
}

/* کارت‌ها و جداول از عرض بیرون نزنن */
.mud-paper,
.mud-table,
.mud-grid {
    max-width: 100%;
}

/* جلوگیری از overflow ناشی از transform در hover کارت‌ها */
.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.12);
}
body, html {
    font-family: 'irn-sns', sans-serif;
    direction: rtl;
    font-size: 1rem;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--mud-palette-background-gray);
}

.mud-typography, .mud-button-label, .mud-input, .mud-breadcrumb-item {
    font-family: 'irn-sns', sans-serif;
}

/* ===== بهبود ظاهر کلی ===== */

/* سایه‌های نرم‌تر برای کارت‌ها */
.mud-paper {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* کارت‌های آماری داشبورد */

.dashboard-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px !important;
    border: 1px solid var(--mud-palette-lines-default);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

    .dashboard-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(30, 58, 95, 0.12);
        transition: all 0.25s ease;
    }

    .dashboard-card::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 4px;
        height: 100%;
        background: currentColor;
        opacity: 0.85;
    }

    .dashboard-card .dashboard-icon-wrapper {
        position: relative;
        width: 56px;
        height: 56px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        overflow: hidden;
    }

        /* پس‌زمینه ملایم با رنگ خود کارت */
        .dashboard-card .dashboard-icon-wrapper::before {
            content: '';
            position: absolute;
            inset: 0;
            background: currentColor;
            opacity: 0.12;
            border-radius: inherit;
        }

    .dashboard-card .dashboard-icon {
        position: relative;
        z-index: 1;
        color: inherit;
        opacity: 1;
    }

/* آیکن‌های منو با پس‌زمینه نرم */
.nav-icon-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 58, 95, 0.08);
    color: var(--mud-palette-primary);
    margin-left: 10px;
    transition: all 0.2s ease;
}

.mud-nav-link:hover .nav-icon-wrapper {
    background: var(--mud-palette-primary);
    color: #fff;
}

.mud-nav-link.active .nav-icon-wrapper {
    background: var(--mud-palette-primary);
    color: #fff;
}

/* ===== منو ===== */

/* هر لینک منو */
.mud-nav-link {
    border-radius: 8px;
    margin: 2px 8px !important;
    padding: 8px 12px !important;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    min-height: 42px;
    display: flex;
    align-items: center;
}

    /* آیکن همه لینک‌ها (یکدست) */
    .mud-nav-link .mud-nav-link-icon,
    .mud-nav-link .mud-icon-root {
        width: 22px !important;
        height: 22px !important;
        font-size: 22px !important;
        min-width: 22px !important;
        margin-left: 12px !important;
        margin-right: 0 !important;
        color: var(--mud-palette-primary);
        opacity: 0.85;
        transition: all 0.2s ease;
    }
.mud-nav-group * .mud-navmenu .mud-nav-item .mud-nav-link {
    margin-left: 15px !important;
}
    /* متن لینک */
    .mud-nav-link .mud-nav-link-text {
        margin-right: 0 !important;
        margin-left: 0 !important;
        font-size: 0.88rem;
        line-height: 1.4;
    }

    /* hover */
    .mud-nav-link:hover {
        background: rgba(30, 58, 95, 0.06) !important;
    }

        .mud-nav-link:hover .mud-icon-root {
            opacity: 1;
        }

    /* فعال */
    .mud-nav-link.active {
        background: linear-gradient(90deg, rgba(30, 58, 95, 0.12) 0%, rgba(30, 58, 95, 0.06) 100%) !important;
        font-weight: 600;
        color: var(--mud-palette-primary) !important;
    }

        .mud-nav-link.active .mud-icon-root {
            color: var(--mud-palette-primary);
            opacity: 1;
        }

/* گروه‌ها */
.mud-nav-group > .mud-nav-link {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    min-height: 44px;
    font-size: 0.9rem;
}

    .mud-nav-group > .mud-nav-link .mud-icon-root {
        color: var(--mud-palette-primary);
        opacity: 1;
    }

/* زیرمنوها */
.mud-nav-group .mud-collapse-container .mud-nav-link {
    padding-right: 24px !important;
}

    .mud-nav-group .mud-nav-link .mud-icon-root {
        width: 20px !important;
        height: 20px !important;
        font-size: 20px !important;
        min-width: 20px !important;
        color: var(--mud-palette-text-secondary);
    }

    .mud-nav-group .mud-nav-link.active .mud-icon-root {
        color: var(--mud-palette-primary);
    }

/* حذف پس‌زمینه ناخواسته */
.mud-nav-link-default-icon {
    display: none;
}

/* AppBar سفارشی */
.custom-appbar {
    background: linear-gradient(135deg, #1E3A5F 0%, #2A5280 100%) !important;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.15) !important;
}

/* Drawer سفارشی */
.custom-drawer {
    border-left: 1px solid var(--mud-palette-divider);
}

    .custom-drawer .mud-drawer-content {
        padding-top: 8px;
    }

/* دکمه‌های خروج/بازگشت در لیست */
.action-chip-warning {
    background: rgba(237, 108, 2, 0.1) !important;
    color: #ED6C02 !important;
}

.action-chip-success {
    background: rgba(46, 125, 50, 0.1) !important;
    color: #2E7D32 !important;
}

/* جدول‌ها */
.mud-table-row:hover {
    background-color: rgba(30, 58, 95, 0.035) !important;
}

.mud-table-head .mud-table-cell {
    font-weight: 600 !important;
    color: var(--mud-palette-text-secondary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: var(--mud-palette-background-gray);
}

/* Dialog ها */
.mud-dialog {
    border-radius: 14px !important;
}

.mud-dialog-title {
    background: var(--mud-palette-background-gray);
    border-radius: 14px 14px 0 0;
}
/* محتوای Drawer */
.custom-drawer .mud-drawer-content {
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 4px;
}

/* منو */
.mud-navmenu {
    padding-top: 4px;
    padding-bottom: 4px;
}

/* حذف margin اضافی که باعث overflow می‌شه */
.mud-nav-link,
.mud-nav-group {
    margin-left: 6px !important;
}

/* اسکرول‌بار نازک و نامحسوس */
.custom-drawer .mud-drawer-content::-webkit-scrollbar {
    width: 6px;
}

.custom-drawer .mud-drawer-content::-webkit-scrollbar-thumb {
    background: rgba(30, 58, 95, 0.2);
    border-radius: 3px;
}

.custom-drawer .mud-drawer-content::-webkit-scrollbar-track {
    background: transparent;
}

.report-table {
    font-size: 0.82rem;
}

    .report-table .mud-table-cell {
        padding: 6px 10px !important;
        white-space: nowrap;
    }

    .report-table .mud-table-head .mud-table-cell {
        background: var(--mud-palette-background-gray);
        font-weight: 600;
    }

/* ===== Public Portal ===== */
.public-appbar {
    background: linear-gradient(135deg, #1E3A5F 0%, #2A5280 100%) !important;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.15) !important;
}

.public-main {
    min-height: calc(100vh - 64px);
    background: linear-gradient(180deg, #F4F6F8 0%, #FFFFFF 100%);
    padding: 32px 16px 64px;
    box-sizing: border-box;
}

.portal-hero {
    max-width: 720px;
    margin: 145px auto 32px;
    text-align: center;
}

.portal-search {
    max-width:640px;
    margin: 0 auto;
}

    .portal-search .mud-input-control {
        background: #fff;
        border-radius: 50px;
        box-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
    }

    .portal-search .mud-input-slot {
        padding: 14px 20px !important;
        font-size: 1.05rem;
        height: auto !important;
    }
    .portal-search .mud-input-outlined .mud-input-outlined-border {
        border-color: transparent !important;
        border-radius: 30px !important;
    }
    .portal-search .mud-input-outlined:hover .mud-input-outlined-border,
    .portal-search .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
        border-color: var(--mud-palette-primary) !important;
        border-width: 1.5px !important;
    }
    .portal-search .mud-input-adornment .mud-icon-root {
        font-size: 20px !important;
        width: 20px !important;
        height: 20px !important;
        color: var(--mud-palette-text-secondary);
    }
.portal-search-input input {
    padding: 0 !important;
}

.file-result-card {
    border-radius: 12px !important;
    border: 1px solid var(--mud-palette-lines-default);
    transition: all 0.2s ease;
    height: 100%;
}

    .file-result-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(30, 58, 95, 0.1);
    }

.tracking-code-box {
    display: inline-block;
    background: var(--mud-palette-background-gray);
    border: 2px dashed var(--mud-palette-primary);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--mud-palette-primary);
    font-family: monospace;
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: linear-gradient(135deg, #1E3A5F 0%, #2A5280 50%, #0E7C7B 100%);
    position: relative;
    font-family: 'irn-sns', Roboto, sans-serif;
}

    .login-page::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 40%), radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0%, transparent 40%);
        pointer-events: none;
    }

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 32px 32px;
    border-radius: 20px;
    background: #FFFFFF;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E3A5F 0%, #2A5280 100%);
    color: #FFFFFF;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.25);
}

.login-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1A2027;
    margin: 0 0 4px;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #5A6570;
    margin: 0;
}

.login-field {
    margin-bottom: 18px;
}

    .login-field label {
        display: block;
        font-size: 0.85rem;
        font-weight: 500;
        color: #263238;
        margin-bottom: 6px;
    }

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    right: 14px;
    display: flex;
    align-items: center;
    color: #7986CB;
    pointer-events: none;
}

.login-input {
    width: 100%;
    height: 50px;
    padding: 0 46px 0 16px;
    border: 1.5px solid #E0E3E7;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #FFFFFF;
    color: #1A2027;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

    .login-input:hover {
        border-color: #A8B0B8;
    }

    .login-input:focus {
        border-color: #1E3A5F;
        border-width: 2px;
        padding: 0 45px 0 15px;
        box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
    }

.login-validation {
    display: block;
    color: #C62828;
    font-size: 0.78rem;
    margin-top: 4px;
    min-height: 16px;
}

.login-alert {
    background: #FFEBEE;
    color: #C62828;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    border-right: 4px solid #C62828;
}

.login-checkbox-wrapper {
    margin-bottom: 24px;
}

.login-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #263238;
    cursor: pointer;
    user-select: none;
}

.login-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #1E3A5F;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1E3A5F 0%, #2A5280 100%);
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

    .login-btn:hover {
        box-shadow: 0 6px 16px rgba(30, 58, 95, 0.3);
        transform: translateY(-1px);
    }

    .login-btn:active {
        transform: translateY(0);
    }

.login-footer {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 24px;
    z-index: 1;
    font-size: 0.82rem;
}

/* اعتبارسنجی Blazor */
.login-field .validation-message {
    color: #C62828;
    font-size: 0.78rem;
    margin-top: 4px;
    display: block;
}

.logout-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--mud-palette-tertiary);
    text-align: right;
    transition: background 0.15s ease;
}

    .logout-btn:hover {
        background: rgba(0, 0, 0, 0.04);
    }
/* دسترسی سریع */
.quick-action-btn {
    height: 48px !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
}