/* =========================================================
   ux-ui.css — کیت ظاهری مشترک برای یکدست‌کردن صفحه‌های قدیمی (نسخه ۷)
   بعد از ui.css و tm-ui.css لود شود.
   همه کلاس‌ها با پیشوند ux- هستند تا با بقیه تداخل نکنند.
   (از متغیرهای --ui-* در ui.css استفاده می‌کند)
   ========================================================= */

/* ---------- رنگ‌های هدر (هر بخش یک رنگ) ---------- */
.ux-purple { --ux-a: #5b5bd6; --ux-b: #9b5de5; --ux-soft: #ede9fe; --ux-ink: #4c1d95; }
.ux-blue   { --ux-a: #1e3a8a; --ux-b: #3b82f6; --ux-soft: #dbeafe; --ux-ink: #1e3a8a; }
.ux-teal   { --ux-a: #0f766e; --ux-b: #14b8a6; --ux-soft: #ccfbf1; --ux-ink: #115e59; }
.ux-green  { --ux-a: #047857; --ux-b: #10b981; --ux-soft: #d1fae5; --ux-ink: #065f46; }
.ux-orange { --ux-a: #c2410c; --ux-b: #fb923c; --ux-soft: #ffedd5; --ux-ink: #9a3412; }
.ux-pink   { --ux-a: #be185d; --ux-b: #f472b6; --ux-soft: #fce7f3; --ux-ink: #9d174d; }
.ux-indigo { --ux-a: #312e81; --ux-b: #6366f1; --ux-soft: #e0e7ff; --ux-ink: #312e81; }
.ux-cyan   { --ux-a: #0e7490; --ux-b: #22d3ee; --ux-soft: #cffafe; --ux-ink: #155e75; }
.ux-slate  { --ux-a: #1e293b; --ux-b: #475569; --ux-soft: #e2e8f0; --ux-ink: #1e293b; }

/* ---------- قاب صفحه ---------- */
.ux-page { padding: 8px; display: flex; flex-direction: column; gap: 14px; animation: uxIn .35s ease both; }
.ux-page * { text-align: inherit; }
@keyframes uxIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =========================================================
   هدر رنگی (UxPageHeader)
   ========================================================= */
.ux-hero {
    --ux-a: #5b5bd6; --ux-b: #9b5de5; --ux-soft: #ede9fe; --ux-ink: #4c1d95;
    background: linear-gradient(135deg, var(--ux-a) 0%, var(--ux-b) 100%);
    border-radius: 20px; padding: 20px 22px 18px; position: relative; overflow: hidden;
    box-shadow: 0 10px 30px rgba(31, 35, 64, .18); text-align: right;
}
.ux-hero.ux-purple { --ux-a: #5b5bd6; --ux-b: #9b5de5; --ux-soft: #ede9fe; --ux-ink: #4c1d95; }
.ux-hero.ux-blue   { --ux-a: #1e3a8a; --ux-b: #3b82f6; --ux-soft: #dbeafe; --ux-ink: #1e3a8a; }
.ux-hero.ux-teal   { --ux-a: #0f766e; --ux-b: #14b8a6; --ux-soft: #ccfbf1; --ux-ink: #115e59; }
.ux-hero.ux-green  { --ux-a: #047857; --ux-b: #10b981; --ux-soft: #d1fae5; --ux-ink: #065f46; }
.ux-hero.ux-orange { --ux-a: #c2410c; --ux-b: #fb923c; --ux-soft: #ffedd5; --ux-ink: #9a3412; }
.ux-hero.ux-pink   { --ux-a: #be185d; --ux-b: #f472b6; --ux-soft: #fce7f3; --ux-ink: #9d174d; }
.ux-hero.ux-indigo { --ux-a: #312e81; --ux-b: #6366f1; --ux-soft: #e0e7ff; --ux-ink: #312e81; }
.ux-hero.ux-cyan   { --ux-a: #0e7490; --ux-b: #22d3ee; --ux-soft: #cffafe; --ux-ink: #155e75; }
.ux-hero.ux-slate  { --ux-a: #1e293b; --ux-b: #475569; --ux-soft: #e2e8f0; --ux-ink: #1e293b; }

.ux-hero::before { content: ""; position: absolute; left: -70px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); }
.ux-hero::after  { content: ""; position: absolute; left: 30%; bottom: -90px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.07); }
.ux-hero-top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; flex-wrap: wrap; }
.ux-hero-ico { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.17); display: grid; place-items: center; transform: rotate(-8deg); flex-shrink: 0; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }
.ux-hero-txt { flex: 1; min-width: 200px; }
.ux-hero-title { color: white !important; margin: 0; font-size: 1.45rem; font-weight: 800; line-height: 1.5; }
.ux-hero-sub { color: rgba(255,255,255,.85) !important; font-size: .88rem; margin-top: 2px; }
.ux-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* مسیر (breadcrumb) داخل هدر */
.ux-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; font-size: .78rem; }
.ux-crumbs a, .ux-crumbs span { color: rgba(255,255,255,.78) !important; text-decoration: none; }
.ux-crumbs a:hover { color: white !important; text-decoration: underline; }
.ux-crumbs .ux-crumb-sep { color: rgba(255,255,255,.5) !important; }

/* کارت‌های عددی داخل هدر (UxKpi) */
.ux-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; position: relative; z-index: 1; }
.ux-kpi { background: rgba(255,255,255,.13); border: 1.5px solid rgba(255,255,255,.2); border-radius: 14px; padding: 11px 12px; display: flex; align-items: center; gap: 10px; transition: .15s; font: inherit; text-align: right; min-width: 0; }
button.ux-kpi { cursor: pointer; }
button.ux-kpi:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.ux-kpi.on { background: rgba(255,255,255,.28); border-color: white; }
.ux-kpi-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255,255,255,.2); }
.ux-kpi-txt { display: flex; flex-direction: column; min-width: 0; }
.ux-kpi-val { color: white !important; font-size: 1.3rem; font-weight: 800; line-height: 1.25; }
.ux-kpi-lbl { color: rgba(255,255,255,.82) !important; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================
   کارت محتوا
   ========================================================= */
.ux-card { background: white; border-radius: 18px; padding: 16px; box-shadow: 0 2px 12px rgba(17,24,39,.06); border: 1px solid #eef0f4; text-align: right; min-width: 0; }
.ux-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ux-card-title { color: #1f2340 !important; font-weight: 800; font-size: 1.02rem; margin: 0; flex: 1; }
.ux-card-sub { color: #7a7f9a !important; font-size: .8rem; }
.ux-sep { height: 1px; background: #f1f3f8; margin: 12px 0; border: 0; }

.ux-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.ux-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* =========================================================
   نوار ابزار: جستجو، تب، چیپ
   ========================================================= */
.ux-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ux-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 6px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 3px 10px; }
.ux-search:focus-within { border-color: #8b8be8; background: white; box-shadow: 0 0 0 3px rgba(91,91,214,.12); }
.ux-search input { border: 0; outline: none; background: transparent; flex: 1; padding: 7px 0; min-width: 0; color: #1f2340 !important; font: inherit; }

.ux-tabs { display: flex; gap: 4px; background: #f1f5f9; border-radius: 12px; padding: 4px; flex-wrap: wrap; }
.ux-tab { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font: inherit; font-weight: 700; font-size: .86rem; color: #64748b !important; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ux-tab.on { background: white; color: #5b5bd6 !important; box-shadow: 0 2px 8px rgba(91,91,214,.14); }
.ux-count { background: #e2e8f0; color: #475569 !important; border-radius: 999px; padding: 0 8px; font-size: .74rem; min-width: 22px; text-align: center !important; }
.ux-tab.on .ux-count { background: #ede9fe; color: #5b5bd6 !important; }

.ux-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ux-chip { border: 1.5px solid #e2e8f0; background: white; color: #475569 !important; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .8rem; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.ux-chip:hover { border-color: #c7c9f3; }
.ux-chip.on { background: #5b5bd6; border-color: #5b5bd6; color: white !important; }

/* =========================================================
   دکمه‌ها
   ========================================================= */
.ux-btn { border: 0; border-radius: 12px; padding: 9px 16px; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: .15s; text-decoration: none !important; white-space: nowrap; line-height: 1.4; }
.ux-btn:hover { transform: translateY(-1px); }
.ux-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.ux-btn-primary { background: linear-gradient(135deg, #5b5bd6, #9b5de5); color: white !important; box-shadow: 0 6px 16px rgba(91,91,214,.3); }
.ux-btn-primary .mud-icon-root { fill: white !important; }
.ux-btn-soft { background: #eef0fb; color: #5b5bd6 !important; }
.ux-btn-soft .mud-icon-root { fill: #5b5bd6 !important; }
.ux-btn-ghost { background: white; color: #475569 !important; border: 1.5px solid #e2e8f0; }
.ux-btn-success { background: #12b886; color: white !important; }
.ux-btn-success .mud-icon-root { fill: white !important; }
.ux-btn-danger { background: #fff1f3; color: #e03157 !important; }
.ux-btn-danger .mud-icon-root { fill: #e03157 !important; }
/* دکمه روشن روی هدر رنگی */
.ux-btn-hero { background: white; color: var(--ux-ink, #4c1d95) !important; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.ux-btn-hero .mud-icon-root { fill: var(--ux-ink, #4c1d95) !important; }
.ux-btn-glass { background: rgba(255,255,255,.16); color: white !important; border: 1.5px solid rgba(255,255,255,.3); }
.ux-btn-glass .mud-icon-root { fill: white !important; }
.ux-btn-sm { padding: 6px 11px; font-size: .8rem; border-radius: 10px; }

/* دکمه آیکونی کوچک (ویرایش/حذف/...) */
.ux-ib { width: 34px; height: 34px; border-radius: 10px; border: 0; display: inline-grid; place-items: center; cursor: pointer; transition: .15s; background: #f1f5f9; padding: 0; }
.ux-ib:hover { transform: translateY(-1px) scale(1.05); }
.ux-ib .mud-icon-root { width: 18px; height: 18px; fill: #475569 !important; }
.ux-ib-edit { background: #fff4e6; } .ux-ib-edit .mud-icon-root { fill: #e8590c !important; }
.ux-ib-del  { background: #fff1f3; } .ux-ib-del  .mud-icon-root { fill: #e03157 !important; }
.ux-ib-view { background: #e7f5ff; } .ux-ib-view .mud-icon-root { fill: #1c7ed6 !important; }
.ux-ib-ok   { background: #e6fcf5; } .ux-ib-ok   .mud-icon-root { fill: #0ca678 !important; }
.ux-ib-chat { background: #ede9fe; } .ux-ib-chat .mud-icon-root { fill: #5b5bd6 !important; }
.ux-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

/* =========================================================
   نشان وضعیت
   ========================================================= */
.ux-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: .74rem; font-weight: 700; white-space: nowrap; background: #f1f5f9; color: #475569 !important; }
.ux-badge-green  { background: #e6fcf5; color: #087f5b !important; }
.ux-badge-red    { background: #fff1f3; color: #c92a4b !important; }
.ux-badge-orange { background: #fff4e6; color: #d9480f !important; }
.ux-badge-blue   { background: #e7f5ff; color: #1864ab !important; }
.ux-badge-purple { background: #ede9fe; color: #5b21b6 !important; }
.ux-badge-gray   { background: #f1f5f9; color: #64748b !important; }
.ux-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* =========================================================
   لیست کارتی (جایگزین جدول)
   ========================================================= */
.ux-list { display: flex; flex-direction: column; gap: 8px; }
.ux-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid #f1f3f8; background: white; transition: .15s; min-width: 0; }
.ux-row:hover { border-color: #dcdcf7; box-shadow: 0 6px 18px rgba(91,91,214,.09); }
.ux-row-main { flex: 1; min-width: 0; }
.ux-row-title { color: #1f2340 !important; font-weight: 700; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux-row-meta { color: #7a7f9a !important; font-size: .78rem; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.ux-row-meta span { color: #7a7f9a !important; display: inline-flex; align-items: center; gap: 4px; }
.ux-row-meta .mud-icon-root { width: 15px; height: 15px; fill: #a0a5c0 !important; }

/* آواتار */
.ux-av { width: 42px; height: 42px; border-radius: 50%; background: #eef0fb center/cover no-repeat; flex-shrink: 0; display: grid; place-items: center; color: #5b5bd6 !important; font-weight: 800; position: relative; }
.ux-av-lg { width: 76px; height: 76px; font-size: 1.4rem; }
.ux-av .ux-st { position: absolute; bottom: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid white; background: #adb5bd; }
.ux-av-lg .ux-st { width: 16px; height: 16px; bottom: 3px; left: 3px; }
.ux-st.on { background: #12b886; } .ux-st.busy { background: #f59f00; }

/* کارت شخص (مثل همکاران من) */
.ux-person { background: white; border-radius: 18px; padding: 18px 14px 14px; border: 1.5px solid #f1f3f8; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center !important; transition: .2s; position: relative; overflow: hidden; }
.ux-person::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 52px; background: linear-gradient(135deg, #ede9fe, #e0f2fe); }
.ux-person > * { position: relative; }
.ux-person:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31,35,64,.12); border-color: transparent; }
.ux-person .ux-av-lg { border: 3px solid white; box-shadow: 0 6px 16px rgba(31,35,64,.14); }
.ux-person-name { color: #1f2340 !important; font-weight: 800; font-size: .95rem; text-align: center !important; }
.ux-person-sub { color: #7a7f9a !important; font-size: .78rem; text-align: center !important; }

/* =========================================================
   فرم
   ========================================================= */
.ux-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.ux-form .ux-full { grid-column: 1 / -1; }
.ux-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ux-label { color: #475569 !important; font-weight: 700; font-size: .82rem; }
.ux-label i { color: #e03157 !important; font-style: normal; }
.ux-hint { color: #94a3b8 !important; font-size: .74rem; }
.ux-input, .ux-field select, .ux-field textarea, .ux-field input[type=text], .ux-field input[type=number], .ux-field input[type=password], .ux-field input[type=email], .ux-field input[type=tel] {
    width: 100%; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 9px 12px; background: #f8fafc; outline: none; font: inherit; color: #1f2340 !important; transition: .15s;
}
.ux-input:focus, .ux-field select:focus, .ux-field textarea:focus, .ux-field input:focus { border-color: #8b8be8; background: white; box-shadow: 0 0 0 3px rgba(91,91,214,.12); }
.ux-field textarea { min-height: 96px; resize: vertical; }
.ux-field .validation-message { color: #e03157 !important; font-size: .76rem; }
.ux-form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 14px; margin-top: 14px; border-top: 1px dashed #e9ecf3; }

/* فیلدهای MudBlazor داخل فرم ux */
.ux-form .mud-input-control { margin-top: 0 !important; }
.ux-form .mud-input.mud-input-outlined .mud-input-outlined-border { border-radius: 12px; border-color: #e2e8f0; }
.ux-form .mud-input.mud-input-outlined:hover .mud-input-outlined-border { border-color: #c7c9f3; }

/* =========================================================
   حالت خالی و در حال بارگذاری
   ========================================================= */
.ux-empty { padding: 34px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center !important; }
.ux-empty-ico { width: 72px; height: 72px; border-radius: 22px; background: #eef0fb; display: grid; place-items: center; transform: rotate(-6deg); }
.ux-empty-ico .mud-icon-root { width: 36px; height: 36px; fill: #8b8be8 !important; }
.ux-empty-title { color: #1f2340 !important; font-weight: 800; text-align: center !important; }
.ux-empty-text { color: #7a7f9a !important; font-size: .85rem; text-align: center !important; max-width: 380px; }

.ux-skel { border-radius: 12px; background: linear-gradient(90deg, #f1f3f8 25%, #e6e9f2 37%, #f1f3f8 63%); background-size: 400% 100%; animation: uxSk 1.3s ease infinite; height: 58px; }
@keyframes uxSk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* =========================================================
   جدول‌های MudTable
   با کلاس ux-table — و همچنین همه جدول‌های قدیمی که داخل
   <div class="TableMud"> هستند خودکار ظاهر جدید می‌گیرند.
   ========================================================= */
.ux-table .mud-table, .TableMud .mud-table { background: transparent; box-shadow: none !important; border-radius: 0; }
.ux-table .mud-table-toolbar, .TableMud .mud-table-toolbar { padding: 0 0 12px; height: auto; min-height: 0; }
.ux-table .mud-table-toolbar .mud-input-control, .TableMud .mud-table-toolbar .mud-input-control { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 2px 10px; margin: 0 !important; max-width: 420px; }
.ux-table .mud-table-toolbar .mud-input.mud-input-underline:before,
.ux-table .mud-table-toolbar .mud-input.mud-input-underline:after,
.TableMud .mud-table-toolbar .mud-input.mud-input-underline:before,
.TableMud .mud-table-toolbar .mud-input.mud-input-underline:after { display: none; }
.ux-table .mud-table-container, .TableMud .mud-table-container { border: 1.5px solid #eef0f6; border-radius: 14px; }
.ux-table .mud-table-root, .TableMud .mud-table-root { border-collapse: separate; border-spacing: 0; }
.ux-table .mud-table-head .mud-table-cell, .TableMud .mud-table-head .mud-table-cell { background: #f6f7fd; color: #5b5f7e !important; font-weight: 800; font-size: .8rem; border-bottom: 1.5px solid #eceefa !important; border-right: 0 !important; border-left: 0 !important; padding: 12px 14px; white-space: nowrap; }
.ux-table .mud-table-body .mud-table-cell, .TableMud .mud-table-body .mud-table-cell { color: #2b3050 !important; font-size: .86rem; border-bottom: 1px solid #f2f3f8 !important; border-right: 0 !important; border-left: 0 !important; padding: 10px 14px; }
.ux-table .mud-table-striped .mud-table-body .mud-table-row:nth-of-type(odd) .mud-table-cell,
.TableMud .mud-table-striped .mud-table-body .mud-table-row:nth-of-type(odd) .mud-table-cell { background: #fcfcff; }
.ux-table .mud-table-hover .mud-table-body .mud-table-row:hover .mud-table-cell,
.TableMud .mud-table-hover .mud-table-body .mud-table-row:hover .mud-table-cell { background: #f3f2ff; }
.ux-table .mud-table-body .mud-table-row:last-child .mud-table-cell,
.TableMud .mud-table-body .mud-table-row:last-child .mud-table-cell { border-bottom: 0 !important; }
.ux-table .mud-table-pagination, .TableMud .mud-table-pagination { border-top: 0 !important; margin-top: 4px; }
.ux-table .mud-table-pagination *, .TableMud .mud-table-pagination * { color: #64748b !important; }
/* دکمه‌های گرد قدیمی داخل جدول ← مربع گرد ملایم */
.ux-table .mud-fab, .TableMud .mud-fab { border-radius: 10px !important; box-shadow: none !important; }
.ux-table .mud-table-body .mud-table-cell.ChangeBTN, .TableMud .mud-table-body .mud-table-cell.ChangeBTN { border-right: 0 !important; }

/* =========================================================
   دیالوگ‌ها: Class="ux-dialog" روی MudDialog
   ========================================================= */
.ux-dialog.mud-dialog { border-radius: 20px !important; overflow: hidden; }
.ux-dialog .mud-dialog-title { background: linear-gradient(135deg, #5b5bd6, #9b5de5); padding: 14px 20px; }
.ux-dialog .mud-dialog-title, .ux-dialog .mud-dialog-title * { color: white !important; font-weight: 800; }

/* =========================================================
   موبایل
   ========================================================= */
@media (max-width: 768px) {
    .ux-page { padding: 4px; gap: 10px; }
    .ux-hero { padding: 16px; border-radius: 16px; }
    .ux-hero-ico { width: 46px; height: 46px; }
    .ux-hero-title { font-size: 1.18rem; }
    .ux-hero-actions { width: 100%; }
    .ux-hero-actions .ux-btn { flex: 1; }
    .ux-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ux-form, .ux-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .ux-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ux-card { padding: 12px; border-radius: 16px; }
    .ux-row { flex-wrap: wrap; }
    .ux-row .ux-actions { width: 100%; border-top: 1px dashed #f1f3f8; padding-top: 6px; }
    .ux-form-actions .ux-btn { flex: 1; }
}

/* =========================================================
   v2 — اضافه‌های گروه ۱ (گزارش کار و ...)
   ========================================================= */
.ux-dlg-title { color: #1f2340 !important; font-weight: 800; }
.ux-dialog .ux-dlg-title { color: white !important; }

.ux-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ux-pre { white-space: pre-line; line-height: 2; color: #2b3050 !important; font-size: .88rem; }
.ux-note { background: #f8f9ff; border: 1.5px solid #eceefa; border-radius: 14px; padding: 10px 14px; }
.ux-soft-box { background: linear-gradient(135deg, #f0fdfa, #f5f3ff); border: 1.5px dashed #c7d2fe; border-radius: 16px; padding: 14px; }
.ux-row-top { align-items: flex-start; }
.ux-dr { display: flex; flex-direction: column; gap: 16px; }

/* کادر ساعت با آیکون */
.ux-time-box { display: flex; align-items: center; gap: 10px; background: white; border: 1.5px solid #eef0f6; border-radius: 16px; padding: 8px 12px; }
.ux-tb-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.ux-tb-ico .mud-icon-root { width: 22px; height: 22px; }
.ux-tb-in  .ux-tb-ico { background: #e6fcf5; } .ux-tb-in  .ux-tb-ico .mud-icon-root { fill: #0ca678 !important; }
.ux-tb-out .ux-tb-ico { background: #fff4e6; } .ux-tb-out .ux-tb-ico .mud-icon-root { fill: #e8590c !important; }
.ux-tb-car .ux-tb-ico { background: #e7f5ff; } .ux-tb-car .ux-tb-ico .mud-icon-root { fill: #1c7ed6 !important; }
.ux-time-box .mud-input-control { margin: 0 !important; }

/* فرم افزودن فعالیت */
.ux-addact { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.ux-addact textarea { height: 100%; min-height: 130px; }
.ux-addact-side { display: flex; flex-direction: column; gap: 8px; }
.ux-addact-side .ux-btn { margin-top: auto; }
.ux-addact .ss-container { max-width: none !important; }
.ux-addact .ss-selected { border: 1.5px solid #e2e8f0 !important; border-radius: 12px !important; background: #f8fafc !important; padding: 9px 12px !important; }
.ux-addact .ss-dropdown { border-radius: 12px !important; border-color: #e2e8f0 !important; box-shadow: 0 12px 30px rgba(31,35,64,.14); overflow: hidden; }

/* انتخاب ماه در هدر */
.ux-month { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.18); border-radius: 14px; padding: 5px; }
.ux-month-btn { width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255,255,255,.18); display: grid; place-items: center; cursor: pointer; padding: 0; }
.ux-month-btn:hover { background: rgba(255,255,255,.3); }
.ux-month-btn:disabled { opacity: .5; cursor: wait; }
.ux-month-btn .mud-icon-root { fill: white !important; }
.ux-month-name { color: white !important; font-weight: 800; min-width: 110px; text-align: center !important; }

/* روزهای ماه (باز و بسته) */
.ux-day { border: 1.5px solid #f1f3f8; border-radius: 14px; background: white; transition: .15s; overflow: hidden; }
.ux-day:hover, .ux-day.open { border-color: #dcdcf7; box-shadow: 0 6px 18px rgba(91,91,214,.08); }
.ux-day-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; flex-wrap: wrap; }
.ux-day-date { color: #1f2340 !important; font-weight: 800; min-width: 92px; }
.ux-day-more { margin-right: auto; display: flex; align-items: center; gap: 6px; }
.ux-tm { display: inline-flex; align-items: center; gap: 4px; background: #f8fafc; border-radius: 999px; padding: 2px 10px 2px 8px; color: #2b3050 !important; font-size: .82rem; font-weight: 600; }
.ux-tm .mud-icon-root { width: 16px; height: 16px; }
.ux-day-body { border-top: 1px dashed #eceefa; padding: 10px 14px 12px; background: #fcfcff; display: flex; flex-direction: column; gap: 10px; animation: uxIn .25s ease both; }
.ux-day-act { border-right: 3px solid #c7d2fe; padding-right: 10px; }

@media (max-width: 768px) {
    .ux-grid-3, .ux-addact { grid-template-columns: minmax(0, 1fr); }
    .ux-month { width: 100%; justify-content: space-between; }
    .ux-day-more { margin-right: 0; }
}

/* =========================================================
   v3 — اعلانات، همکاران، پروفایل
   ========================================================= */
.ux-clamp { color: #475569 !important; font-size: .85rem; line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.ux-elan-ico { width: 42px; height: 42px; border-radius: 14px; background: #fff4e6; display: grid; place-items: center; flex-shrink: 0; transform: rotate(-6deg); }
.ux-elan-ico .mud-icon-root { fill: #e8590c !important; width: 22px; height: 22px; }
a.ux-av, a.ux-person-name { text-decoration: none !important; }
a.ux-person-name:hover { color: #5b5bd6 !important; }

/* site.css همه‌چیز را rtl می‌کند؛ برای نام کاربری، لینک و ... */
.ux-page [dir=ltr], .ux-dialog [dir=ltr] { direction: ltr !important; unicode-bidi: isolate; }
.ux-page input[dir=ltr] { text-align: left !important; }
.ux-pf-user[dir=ltr] { text-align: right !important; }

/* انتخاب فایل */
.ux-file { position: relative; display: flex; align-items: center; gap: 8px; border: 1.5px dashed #c7d2fe; border-radius: 12px; padding: 9px 12px; background: #f8f9ff; cursor: pointer; color: #5b5bd6 !important; font-weight: 700; font-size: .85rem; overflow: hidden; }
.ux-file span { color: #5b5bd6 !important; }
.ux-file .mud-icon-root { fill: #5b5bd6 !important; width: 20px; height: 20px; }
.ux-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* فرم اعلان: متن + گیرنده‌ها */
.ux-elan-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ux-elan-form .ux-form-actions { grid-column: 1 / -1; margin-top: 0; }
.ux-picker { display: flex; flex-direction: column; min-height: 0; }
.ux-pick-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.ux-pick { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #e2e8f0; background: white; border-radius: 999px; padding: 3px 4px 3px 10px; cursor: pointer; font: inherit; transition: .15s; }
.ux-pick:hover { border-color: #c7c9f3; }
.ux-pick.on { border-color: #12b886; background: #e6fcf5; }
.ux-pick-name { color: #2b3050 !important; font-size: .82rem; font-weight: 600; white-space: nowrap; }

/* پروفایل من */
.ux-profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.ux-profile-side { position: sticky; top: 80px; }

/* صفحه دیدن پروفایل */
.ux-pf { background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 2px 12px rgba(17,24,39,.06); border: 1px solid #eef0f4; }
.ux-pf-cover { height: 150px; background: linear-gradient(135deg, #312e81, #6366f1 55%, #9b5de5) center/cover no-repeat; }
.ux-pf-main { display: flex; align-items: flex-end; gap: 16px; padding: 0 22px 18px; margin-top: -48px; flex-wrap: wrap; }
.ux-pf-av { width: 112px; height: 112px; font-size: 2rem; border: 4px solid white; box-shadow: 0 10px 26px rgba(31,35,64,.18); cursor: zoom-in; }
.ux-pf-av .ux-st { width: 18px; height: 18px; bottom: 6px; left: 6px; border-width: 3px; }
.ux-pf-txt { flex: 1; min-width: 200px; padding-top: 52px; }
.ux-pf-name { color: #1f2340 !important; font-size: 1.4rem; font-weight: 800; margin: 0; }
.ux-pf-user { color: #7a7f9a !important; font-size: .85rem; text-align: right !important; }
.ux-pf-quote { background: #f5f3ff; border-right: 4px solid #8b5cf6; border-radius: 10px; padding: 10px 14px; color: #4c1d95 !important; font-weight: 600; margin-bottom: 10px; }
.ux-pf-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: #f8fafc; }
.ux-pf-link span { color: #7a7f9a !important; font-size: .82rem; min-width: 70px; }
.ux-pf-link b { color: #1f2340 !important; font-weight: 700; margin-right: auto; word-break: break-all; }
.ux-pf-link .mud-icon-root { fill: #6366f1 !important; width: 20px; height: 20px; }

/* تغییر عکس */
.ux-photo { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ux-photo-now { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ux-photo-av { width: 124px; height: 124px; border: 4px solid white; box-shadow: 0 10px 26px rgba(31,35,64,.16); }
.ux-photo-banner { width: 100%; height: 160px; border-radius: 16px; background-size: cover; background-position: center; }
.ux-drop { position: relative; flex: 1; min-width: 240px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed #c7d2fe; border-radius: 18px; padding: 24px 16px; background: #f8f9ff; cursor: pointer; transition: .15s; text-align: center !important; }
.ux-drop:hover { border-color: #8b8be8; background: #f3f2ff; }
.ux-drop.busy { opacity: .7; cursor: wait; }
.ux-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ux-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px; }
.ux-avatar-pick { border: 3px solid transparent; border-radius: 50%; padding: 0; background: #eef0fb; cursor: pointer; aspect-ratio: 1; overflow: hidden; transition: .15s; }
.ux-avatar-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ux-avatar-pick:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 22px rgba(91,91,214,.22); }
.ux-avatar-pick.on { border-color: #5b5bd6; }

/* پنجره «حذف اطلاعات» قدیمی (DeleteConfirmation) که همه صفحه‌ها دارند */
#confirmationModal .modal-content { border: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(31,35,64,.28); }
#confirmationModal .modal-header { background: linear-gradient(135deg, #e03157, #f0506e); border: 0; padding: 14px 20px; display: flex; flex-direction: row-reverse; align-items: center; }
#confirmationModal .modal-title, #confirmationModal .modal-header .close, #confirmationModal .modal-header .close span { color: white !important; font-weight: 800; opacity: 1; text-shadow: none; }
#confirmationModal .modal-body { padding: 22px 20px; color: #2b3050 !important; font-weight: 600; }
#confirmationModal .modal-footer { border-top: 1px dashed #eceefa; gap: 8px; }
#confirmationModal .modal-footer .btn { border-radius: 12px; font-weight: 700; padding: 8px 18px; border: 0; }
#confirmationModal .modal-footer .btn-default { background: #f1f5f9; color: #475569 !important; }
#confirmationModal .modal-footer .btn-danger { background: #e03157; color: white !important; }

@media (max-width: 900px) {
    .ux-elan-form, .ux-profile-layout { grid-template-columns: minmax(0, 1fr); }
    .ux-profile-side { position: static; }
}
@media (max-width: 768px) {
    .ux-pf-main { justify-content: center; text-align: center !important; }
    .ux-pf-txt { padding-top: 0; text-align: center !important; }
    .ux-pf-txt .ux-chips { justify-content: center; }
    .ux-pf-user { text-align: center !important; }
    .ux-pf-cover { height: 110px; }
}

/* =========================================================
   v4 — فرم ثبت تیکت و ارجاع
   ========================================================= */
.ux-mhead { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px dashed #e9ecf3; }
.ux-mhead-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; transform: rotate(-6deg); }
.ux-mhead-ico .mud-icon-root { fill: white !important; width: 24px; height: 24px; }
.ux-mh-blue { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.ux-mh-indigo { background: linear-gradient(135deg, #312e81, #6366f1); }
.ux-mhead-title { color: #1f2340 !important; font-weight: 800; font-size: 1.1rem; }

/* کاشی‌های انتخابی (محصول، نوع، اهمیت) */
.ux-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ux-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ux-tile { --t: #5b5bd6; --tb: #f3f2ff; display: flex; align-items: center; gap: 8px; border: 1.5px solid #e2e8f0; background: white; border-radius: 14px; padding: 10px 12px; cursor: pointer; font: inherit; font-weight: 700; font-size: .88rem; transition: .15s; min-width: 0; }
.ux-tile span { color: #2b3050 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux-tile .mud-icon-root { fill: #94a3b8 !important; width: 22px; height: 22px; flex-shrink: 0; }
.ux-tile:hover { border-color: var(--t); }
.ux-tile.on { border-color: var(--t); background: var(--tb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 15%, transparent); }
.ux-tile.on span { color: var(--t) !important; }
.ux-tile.on .mud-icon-root { fill: var(--t) !important; }
.ux-tile-blue   { --t: #1c7ed6; --tb: #e7f5ff; }
.ux-tile-purple { --t: #7048e8; --tb: #f3f0ff; }
.ux-tile-orange { --t: #e8590c; --tb: #fff4e6; }
.ux-tile-red    { --t: #e03157; --tb: #fff1f3; }
.ux-tile-gray   { --t: #475569; --tb: #f1f5f9; }

/* پیوست */
.ux-attach { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ux-attach-img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; border: 1.5px solid #e2e8f0; }

/* انتخاب همکار */
.ux-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 240px; overflow-y: auto; padding: 2px; }
.ux-person-pick { display: flex; align-items: center; gap: 10px; border: 1.5px solid #e2e8f0; background: white; border-radius: 14px; padding: 8px 10px; cursor: pointer; font: inherit; transition: .15s; text-align: right; }
.ux-person-pick:hover { border-color: #c7c9f3; }
.ux-person-pick.on { border-color: #12b886; background: #e6fcf5; }
.ux-pp-name { color: #2b3050 !important; font-weight: 700; font-size: .86rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux-person-pick .ux-av { width: 36px; height: 36px; font-size: .85rem; }

/* سابقه (تایم‌لاین) */
.ux-timeline { position: relative; padding-right: 18px; display: flex; flex-direction: column; gap: 10px; }
.ux-timeline::before { content: ""; position: absolute; right: 5px; top: 6px; bottom: 6px; width: 2px; background: #eceefa; border-radius: 2px; }
.ux-tl-item { position: relative; }
.ux-tl-dot { position: absolute; right: -18px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #5b5bd6; border: 2px solid white; box-shadow: 0 0 0 2px #e0e7ff; }
.ux-tl-dot.orange { background: #f59f00; box-shadow: 0 0 0 2px #ffe8cc; }
.ux-tl-dot.red { background: #e03157; box-shadow: 0 0 0 2px #ffe3e8; }
.ux-tl-body { background: #f8f9ff; border-radius: 12px; padding: 8px 12px; }
.ux-tl-body b { color: #1f2340 !important; }

/* site.css همه آیکون‌های داخل پنجره‌ها را قرمز می‌کند (.mud-dialog .mud-svg-icon)؛ برای دکمه‌های ux درست شود */
.mud-dialog .ux-btn-ghost .mud-icon-root { fill: #475569 !important; }
.mud-dialog .ux-search .mud-icon-root { fill: #94a3b8 !important; }

@media (max-width: 768px) {
    .ux-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .ux-tile { flex-direction: column; justify-content: center; padding: 10px 6px; font-size: .8rem; }
}

/* =========================================================
   v5 — دفتر تلفن و لینک‌های من
   ========================================================= */
.ux-cell-2 { display: flex; flex-direction: column; }
.ux-cell-2 b { color: #1f2340 !important; }
.ux-cell-2 span { color: #7a7f9a !important; font-size: .78rem; }

/* کارت مخاطب */
.ux-grid.ux-grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.ux-contact { background: white; border: 1.5px solid #f1f3f8; border-radius: 16px; padding: 12px; transition: .15s; min-width: 0; }
.ux-contact:hover { border-color: #c3fae8; box-shadow: 0 10px 24px rgba(18,184,134,.1); }
.ux-contact-top { display: flex; align-items: center; gap: 10px; }
.ux-contact-top .ux-actions { opacity: .35; transition: .15s; }
.ux-contact:hover .ux-contact-top .ux-actions { opacity: 1; }
.ux-contact-lines { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.ux-cl { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #f8fafc; text-decoration: none !important; min-width: 0; }
a.ux-cl:hover { background: #e6fcf5; }
.ux-cl .mud-icon-root { width: 17px; height: 17px; fill: #12b886 !important; flex-shrink: 0; }
.ux-cl span { color: #7a7f9a !important; font-size: .76rem; min-width: 52px; }
.ux-cl b { color: #1f2340 !important; font-size: .85rem; font-weight: 700; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
a.ux-chip { text-decoration: none !important; }

/* جزئیات در پنجره */
.ux-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ux-info { background: #f8fafc; border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; min-width: 0; }
.ux-info span { color: #7a7f9a !important; font-size: .74rem; }
.ux-info b { color: #1f2340 !important; font-weight: 700; word-break: break-word; }

/* لینک‌ها */
.ux-link-ico { width: 42px; height: 42px; border-radius: 14px; background: #e3fafc; display: grid; place-items: center; flex-shrink: 0; transform: rotate(-6deg); }
.ux-link-ico .mud-icon-root { fill: #0c8599 !important; width: 22px; height: 22px; }
.ux-link-url { display: block; color: #0c8599 !important; font-size: .82rem; text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: right !important; }
.ux-link-url:hover { text-decoration: underline !important; }
.ux-cred { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ux-cred-item { display: inline-flex; align-items: center; gap: 6px; background: #f8fafc; border: 1px solid #eef0f6; border-radius: 10px; padding: 3px 4px 3px 10px; }
.ux-cred-item > .mud-icon-root { width: 16px; height: 16px; fill: #94a3b8 !important; }
.ux-cred-item b { color: #1f2340 !important; font-size: .84rem; font-family: Consolas, monospace, Vazirmatn; }
.ux-cred-btn { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; }
.ux-cred-btn:hover { background: #e2e8f0; }
.ux-cred-btn .mud-icon-root { width: 16px; height: 16px; fill: #64748b !important; }
.ux-pass { position: relative; }
.ux-pass input { padding-left: 40px !important; }
.ux-pass .ux-cred-btn { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); }

@media (max-width: 768px) {
    .ux-info-grid { grid-template-columns: minmax(0, 1fr); }
    .ux-contact-top .ux-actions { opacity: 1; }
    .ux-grid.ux-grid-wide { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================
   v6 — چارت سازمانی، سمت‌ها و پرسنل
   ========================================================= */
/* انتخاب یکی از چند گزینه (به‌جای رادیو) */
.ux-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: #f1f5f9; border-radius: 12px; padding: 4px; }
.ux-seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font: inherit; font-weight: 700; font-size: .84rem; color: #64748b !important; cursor: pointer; white-space: nowrap; }
.ux-seg button.on { background: white; color: #5b5bd6 !important; box-shadow: 0 2px 8px rgba(91,91,214,.14); }
.ux-seg button.on.g { color: #0ca678 !important; }
.ux-seg button.on.o { color: #e8590c !important; }
.ux-seg button.on.r { color: #e03157 !important; }

/* کارت نسخه چارت */
.ux-ver { position: relative; background: white; border: 1.5px solid #f1f3f8; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: .15s; min-width: 0; }
.ux-ver:hover { border-color: #dcdcf7; box-shadow: 0 10px 24px rgba(91,91,214,.1); }
.ux-ver.on { border-color: #12b886; box-shadow: 0 10px 24px rgba(18,184,134,.12); }
.ux-ver.on::before { content: ""; position: absolute; top: 0; right: 18px; left: 18px; height: 3px; border-radius: 0 0 4px 4px; background: #12b886; }
.ux-ver-head { display: flex; align-items: center; gap: 10px; }
.ux-ver-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: #e0e7ff; transform: rotate(-6deg); }
.ux-ver-ico .mud-icon-root { fill: #4338ca !important; width: 22px; height: 22px; }
.ux-ver.on .ux-ver-ico { background: #d3f9d8; }
.ux-ver.on .ux-ver-ico .mud-icon-root { fill: #0ca678 !important; }
.ux-ver-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 10px; border-top: 1px dashed #eef0f6; }
.ux-ver-foot .ux-actions { margin-right: auto; }

/* درخت سمت‌ها */
.ux-tree { display: flex; flex-direction: column; gap: 6px; }
.ux-node { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; border: 1.5px solid #f1f3f8; background: white; transition: .15s; min-width: 0; }
.ux-node:hover { border-color: #dcdcf7; box-shadow: 0 6px 16px rgba(91,91,214,.08); }
.ux-node.sel { border-color: #6366f1; background: #f5f6ff; }
.ux-node-tog { width: 26px; height: 26px; border: 0; border-radius: 8px; background: #f1f5f9; display: grid; place-items: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.ux-node-tog .mud-icon-root { width: 18px; height: 18px; fill: #64748b !important; }
.ux-node-tog.leaf { visibility: hidden; }
.ux-node-ico { width: 34px; height: 34px; border-radius: 11px; background: #e0e7ff; display: grid; place-items: center; flex-shrink: 0; }
.ux-node-ico .mud-icon-root { width: 18px; height: 18px; fill: #4338ca !important; }
.ux-node-ico.root { background: linear-gradient(135deg, #312e81, #6366f1); }
.ux-node-ico.root .mud-icon-root { fill: white !important; }
.ux-node-main { flex: 1; min-width: 0; cursor: pointer; }
.ux-node-name { color: #1f2340 !important; font-weight: 700; font-size: .92rem; }
.ux-node-people { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.ux-node-people span { background: #f1f5f9; color: #475569 !important; border-radius: 999px; padding: 1px 9px; font-size: .74rem; }
.ux-node-people span.empty { background: #fff4e6; color: #d9480f !important; }
.ux-kids { border-right: 2px solid #eceefa; margin-right: 24px; padding-right: 12px; display: flex; flex-direction: column; gap: 6px; }

/* نمایش گرافیکی چارت */
.ux-org-wrap { overflow-x: auto; padding: 8px 4px 16px; }
.ux-org { display: flex; justify-content: center; min-width: max-content; }
.ux-org ul { display: flex; justify-content: center; padding: 18px 0 0; margin: 0; position: relative; list-style: none; }
.ux-org > ul { padding-top: 0; }
.ux-org li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 18px 6px 0; }
.ux-org > ul > li { padding-top: 0; }
/* خط‌های اتصال (برای راست‌به‌چپ: اولین فرزند سمت راست است) */
.ux-org li::before, .ux-org li::after { content: ""; position: absolute; top: 0; width: 50%; height: 18px; border-top: 2px solid #c7d2fe; }
.ux-org li::before { right: 50%; }
.ux-org li::after { left: 50%; border-left: 2px solid #c7d2fe; }
.ux-org li:first-child::after { border-top: 0; }
.ux-org li:last-child::before { border-top: 0; }
.ux-org > ul > li::before, .ux-org > ul > li::after { display: none; }
.ux-org ul ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 18px; border-left: 2px solid #c7d2fe; margin-left: -1px; }
.ux-org-box { position: relative; background: white; border: 1.5px solid #e0e7ff; border-radius: 14px; padding: 8px 12px; min-width: 110px; max-width: 180px; box-shadow: 0 4px 12px rgba(49,46,129,.08); text-align: center !important; cursor: pointer; transition: .15s; }
.ux-org-box:hover { border-color: #6366f1; transform: translateY(-2px); }
.ux-org-box.sel { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.ux-org-box b { display: block; color: #1f2340 !important; font-size: .84rem; text-align: center !important; }
.ux-org-box span { display: block; color: #7a7f9a !important; font-size: .72rem; margin-top: 2px; text-align: center !important; }
.ux-org-box.root { background: linear-gradient(135deg, #312e81, #6366f1); border-color: transparent; }
.ux-org-box.root b, .ux-org-box.root span { color: white !important; }

/* پنل سمت انتخاب‌شده */
.ux-side-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.ux-sticky { position: sticky; top: 76px; }
.ux-swatch { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; border: 2px solid white; box-shadow: 0 0 0 1.5px #e2e8f0; }
.ux-floor { display: flex; align-items: center; gap: 10px; }
.ux-floor input { flex: 1; }

/* دسترسی‌ها */
.ux-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.ux-check { display: flex; align-items: center; gap: 8px; border: 1.5px solid #e2e8f0; background: white; border-radius: 12px; padding: 9px 12px; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 700; color: #475569 !important; text-align: right; transition: .15s; }
.ux-check .ux-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #cbd5e1; display: grid; place-items: center; flex-shrink: 0; background: white; }
.ux-check .ux-box .mud-icon-root { width: 14px; height: 14px; fill: white !important; }
.ux-check:hover { border-color: #c7c9f3; }
.ux-check.on { border-color: #12b886; background: #e6fcf5; color: #087f5b !important; }
.ux-check.on .ux-box { background: #12b886; border-color: #12b886; }

/* عکس، امضا و مهر پرسنل */
.ux-imgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ux-img-slot { position: relative; border: 2px dashed #c7d2fe; border-radius: 16px; background: #f8f9ff; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center !important; min-height: 140px; justify-content: center; }
.ux-img-slot:hover { border-color: #8b8be8; }
.ux-img-slot img { max-width: 100%; height: 80px; object-fit: contain; border-radius: 10px; }
.ux-img-slot span { color: #5b5bd6 !important; font-weight: 700; font-size: .8rem; text-align: center !important; }
.ux-img-slot .mud-icon-root { fill: #8b8be8 !important; width: 28px; height: 28px; }
.ux-img-slot input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* پنجره‌ها: آیکون‌های ux را از قرمز site.css نجات بده */
.mud-dialog .ux-check .ux-box .mud-icon-root { fill: white !important; }
.mud-dialog .ux-img-slot .mud-icon-root { fill: #8b8be8 !important; }
.mud-dialog .ux-file .mud-icon-root { fill: #5b5bd6 !important; }
.mud-dialog .ux-btn-primary .mud-icon-root, .mud-dialog .ux-btn-success .mud-icon-root { fill: white !important; }
.mud-dialog .ux-btn-soft .mud-icon-root { fill: #5b5bd6 !important; }
.mud-dialog .ux-ib .mud-icon-root { fill: #475569 !important; }
.mud-dialog .ux-ib-edit .mud-icon-root { fill: #e8590c !important; }
.mud-dialog .ux-ib-del .mud-icon-root { fill: #e03157 !important; }
.mud-dialog .ux-cred-btn .mud-icon-root { fill: #64748b !important; }
.mud-dialog .ux-mhead-ico .mud-icon-root { fill: white !important; }

@media (max-width: 1100px) {
    .ux-side-layout { grid-template-columns: minmax(0, 1fr); }
    .ux-sticky { position: static; }
}
@media (max-width: 768px) {
    .ux-imgs { grid-template-columns: minmax(0, 1fr); }
    .ux-kids { margin-right: 10px; padding-right: 8px; }
    .ux-node { flex-wrap: wrap; }
    .ux-node .ux-actions { width: 100%; }
}

/* =========================================================
   v7 — محصولات و بالابان
   ========================================================= */
.ux-ver.off { opacity: .72; }
.ux-ver.off:hover { opacity: 1; }

/* کارت سایت بالابان */
.ux-site { position: relative; background: white; border: 1.5px solid #f1f3f8; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: .15s; min-width: 0; overflow: hidden; }
.ux-site:hover { border-color: #c5f6fa; box-shadow: 0 10px 24px rgba(12,133,153,.1); }
.ux-site.err { border-color: #ffe3e8; background: linear-gradient(180deg, #fff8f9, white 60%); }
.ux-site.err .ux-link-ico { background: #fff1f3; }
.ux-site.err .ux-link-ico .mud-icon-root { fill: #e03157 !important; }
.ux-site-name { display: block; color: #1f2340 !important; font-weight: 800; font-size: .95rem; text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right !important; }
.ux-site-name:hover { color: #0c8599 !important; }
.ux-site-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.ux-site-checks span { display: inline-flex; align-items: center; gap: 5px; border-radius: 10px; padding: 4px 10px; font-size: .76rem; font-weight: 700; background: #f1f5f9; color: #64748b !important; }
.ux-site-checks .mud-icon-root { width: 15px; height: 15px; fill: #94a3b8 !important; }
.ux-site-checks span.ok { background: #e6fcf5; color: #087f5b !important; }
.ux-site-checks span.ok .mud-icon-root { fill: #0ca678 !important; }
.ux-site-checks span.warn { background: #fff4e6; color: #d9480f !important; }
.ux-site-checks span.warn .mud-icon-root { fill: #f76707 !important; }
.ux-site-checks span.bad { background: #fff1f3; color: #c92a4b !important; }
.ux-site-checks span.bad .mud-icon-root { fill: #e03157 !important; }
.ux-site-busy { position: absolute; inset: 0; z-index: 2; background: rgba(255,255,255,.88); display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 16px; }
.ux-site-busy span { color: #0c8599 !important; font-weight: 700; }
.ux-btn .ux-count { background: rgba(255,255,255,.7); }



/* =========================================================
   v8 — بات بله (منوها و درخواست‌ها)
   ========================================================= */
.ux-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

    .ux-price b {
        color: #1f2340 !important;
        font-size: 1.15rem;
        font-weight: 800;
    }

    .ux-price small {
        color: #7a7f9a !important;
        font-size: .74rem;
        font-weight: 600;
    }

    .ux-price s {
        color: #94a3b8 !important;
        font-size: .84rem;
    }

/* انتخاب خدمت با قیمت */
.ux-svcs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 8px;
}

.ux-svc {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid #e2e8f0;
    background: white;
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
    font: inherit;
    text-align: right;
    transition: .15s;
    min-width: 0;
}

    .ux-svc:hover {
        border-color: #c7c9f3;
    }

    .ux-svc:disabled {
        cursor: default;
    }

    .ux-svc .ux-box {
        width: 22px;
        height: 22px;
        border-radius: 7px;
        border: 2px solid #cbd5e1;
        display: grid;
        place-items: center;
        flex-shrink: 0;
        background: white;
    }

        .ux-svc .ux-box .mud-icon-root {
            width: 15px;
            height: 15px;
            fill: white !important;
        }

.ux-svc-txt {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

    .ux-svc-txt b {
        color: #1f2340 !important;
        font-size: .88rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ux-svc-txt span {
        color: #7a7f9a !important;
        font-size: .74rem;
    }

    .ux-svc-txt s {
        color: #94a3b8 !important;
    }

.ux-svc.on {
    border-color: #12b886;
    background: #e6fcf5;
}

    .ux-svc.on .ux-box {
        background: #12b886;
        border-color: #12b886;
    }

.mud-dialog .ux-svc .ux-box .mud-icon-root {
    fill: white !important;
}

/* جمع مبلغ پایین فرم */
.ux-total {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f5f3ff, #ecfeff);
    border: 1.5px dashed #c7d2fe;
    border-radius: 14px;
    padding: 10px 14px;
    margin-top: 12px;
}

    .ux-total span {
        color: #475569 !important;
        font-weight: 700;
        flex: 1;
    }

    .ux-total b {
        color: #4c1d95 !important;
        font-size: 1.15rem;
        font-weight: 800;
    }

/* ===== v9 (گروه ۵: گزارش پروژه‌ها + تگ‌ها) ===== */
.ux-side-layout.ux-split {
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
}

.ux-scroll {
    max-height: 68vh;
    overflow-y: auto;
    padding-left: 4px;
}

.ux-pick-row {
    width: 100%;
    font: inherit;
    text-align: right;
    cursor: pointer;
}

    .ux-pick-row:hover {
        border-color: #c7d2fe;
        background: #f8f9ff;
    }

    .ux-pick-row.sel {
        border-color: #5b5bd6;
        background: #eef0ff;
        box-shadow: 0 0 0 3px rgba(91,91,214,.12);
    }

.ux-tabs a.ux-tab {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ux-code {
    font-family: Consolas, monospace;
    font-size: .8rem;
    background: #f1f5f9;
    color: #334155 !important;
    padding: 1px 8px;
    border-radius: 6px;
}

.ux-row.ux-row-off {
    opacity: .62;
}

.ux-field input[type=time], .ux-field input[type=url] {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 9px 12px;
    background: #f8fafc;
    outline: none;
    font: inherit;
    color: #1f2340 !important;
}

@media (max-width: 900px) {
    .ux-side-layout.ux-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .ux-scroll {
        max-height: none;
    }
}

/* ===== v10 (گروه ۶: مدیریت بلاگ) ===== */
.ux-field input[type=time], .ux-field input[type=url] {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 9px 12px;
    background: #f8fafc;
    outline: none;
    font: inherit;
    color: #1f2340 !important;
}

.ux-post {
    background: white;
    border: 1.5px solid #f1f3f8;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: .15s;
    min-width: 0;
}

    .ux-post:hover {
        border-color: #dcdcf7;
        box-shadow: 0 10px 24px rgba(91,91,214,.1);
    }

.ux-post-img {
    position: relative;
    aspect-ratio: 3 / 2;
    background: linear-gradient(135deg, #eef0ff, #f8f9ff);
    display: grid;
    place-items: center;
    overflow: hidden;
}

    .ux-post-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .ux-post-img .mud-icon-root {
        fill: #c7d2fe !important;
        width: 46px;
        height: 46px;
    }

    .ux-post-img .ux-badge {
        position: absolute;
        top: 10px;
        right: 10px;
    }

.ux-post-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.ux-post-title {
    color: #1f2340 !important;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1.7;
}

.ux-clamp2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ux-post-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #f1f3f8;
}

    .ux-post-foot .ux-row-meta {
        flex: 1;
    }

.ux-cnt {
    font-size: .72rem;
    color: #94a3b8 !important;
    margin-right: auto;
    font-weight: 400;
}

    .ux-cnt.over {
        color: #e03157 !important;
        font-weight: 700;
    }

.ux-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ux-serp {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    background: white;
}

.ux-serp-url {
    color: #0f766e !important;
    font-size: .76rem;
    direction: ltr;
    text-align: left !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ux-serp-title {
    color: #1a0dab !important;
    font-size: 1rem;
    margin: 4px 0;
}

.ux-serp-desc {
    color: #4d5156 !important;
    font-size: .8rem;
    line-height: 1.8;
}

.ux-cover {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #f8f9ff;
}

    .ux-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .ux-cover button {
        position: absolute;
        top: 8px;
        left: 8px;
    }