/* ظاهر سراسری نظرسنجی: فونت ایران‌سنس، پس‌زمینه کرم، پالت سبز/طلایی.
   متغیرهای :root در MainLayout و کارت‌های islamic-card استفاده می‌شوند. */

html, body {
    font-family: IRANSans, Tahoma, sans-serif;
    background: #f6f0e4;
    color: #12211f;
}

:root {
    --teal: #0f5c56;
    --teal-deep: #0a3d3a;
    --gold: #c4a35a;
    --cream: #f6f0e4;
    --parchment: #fffcf6;
    --mud-appbar-height: 64px;
}

.app-bar-islamic {
    background:
        linear-gradient(90deg, rgba(196,163,90,.18), transparent 28%),
        #0a3d3a !important;
    color: #f6f0e4 !important;
    border-bottom: 3px solid #c4a35a;
    z-index: 1300;
}

/* نوار هشدار ورود به‌جای مدیر — فقط در مرورگر ادمین؛ نشست خود مدیر جداست. */
.impersonate-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, #5c3d0f, #7a5520);
    color: #fff8e8;
    font-size: .9rem;
    border: 1px solid rgba(196, 163, 90, .55);
}
.impersonate-banner strong { color: #ffe7a8; }
.impersonate-exit {
    color: #0a3d3a;
    background: #c4a35a;
    font-weight: 700;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
}
.impersonate-exit:hover { background: #d4b56a; color: #062826; }

.site-logo { display: block; object-fit: contain; flex-shrink: 0; }
.site-logo-bar { width: 40px; height: 40px; margin-left: 10px; }
.site-logo-drawer { width: 52px; height: 52px; }
.site-logo-auth { width: 96px; height: 96px; background: #fff; border-radius: 18px; padding: 8px; }

.side-drawer { background: #0d2c2a !important; }

.drawer-crest {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(196,163,90,.28);
}

.crest-title { color: #f6f0e4; font-weight: 700; font-size: 1.05rem; }
.crest-sub { color: #c4a35a; font-size: .75rem; }

.side-nav .mud-nav-link {
    color: #e8dcc4 !important;
    border-radius: 8px;
    margin: 2px 0;
}

.side-nav .mud-nav-link.active,
.side-nav .mud-nav-link:hover {
    background: rgba(196,163,90,.16) !important;
    color: #fff !important;
}

.main-canvas {
    padding-top: calc(var(--mud-appbar-height, 64px) + 24px) !important;
    padding-right: 28px !important;
    padding-bottom: 88px !important;
    padding-left: 28px !important;
    min-height: 100vh;
    background:
        radial-gradient(circle at 100% 0, rgba(15,92,86,.06), transparent 32%),
        repeating-linear-gradient(45deg, rgba(15,92,86,.03) 0 8px, transparent 8px 16px),
        #f6f0e4;
}

/* انتخاب محدوده گزارش فرم‌های دارای تایید: همه رکوردها یا فقط تایید نهایی. */
.report-scope {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px 24px;
    margin: 0 0 22px;
    padding: 18px 20px;
    border-radius: 16px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(196, 163, 90, .22), transparent 55%),
        linear-gradient(135deg, #0a3d3a 0%, #0f5c56 55%, #164f4a 100%);
    color: #f6f0e4;
    border: 1px solid rgba(196, 163, 90, .45);
    box-shadow: 0 10px 28px rgba(10, 61, 58, .18);
}
.report-scope-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: min(100%, 240px);
    max-width: 420px;
}
.report-scope-eyebrow {
    font-size: .72rem;
    letter-spacing: .04em;
    color: #c4a35a;
    font-weight: 700;
}
.report-scope-copy strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fffcf6;
}
.report-scope-hint {
    font-size: .82rem;
    color: rgba(246, 240, 228, .78);
    line-height: 1.5;
}
.report-scope-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .18);
    min-width: min(100%, 420px);
    flex: 1 1 360px;
}
.report-scope-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 12px 14px;
    background: transparent;
    color: rgba(246, 240, 228, .88);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
    font: inherit;
}
.report-scope-opt:hover:not(:disabled) {
    background: rgba(255, 252, 246, .08);
}
.report-scope-opt:disabled {
    opacity: .65;
    cursor: wait;
}
.report-scope-opt.is-on {
    background: #fffcf6;
    color: #0a3d3a;
    border-color: rgba(196, 163, 90, .55);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}
.report-scope-opt.is-on .report-scope-icon {
    background: #0f5c56;
    color: #f6f0e4;
}
.report-scope-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(246, 240, 228, .14);
    font-size: .85rem;
    font-weight: 700;
}
.report-scope-opt em {
    display: block;
    font-style: normal;
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.3;
}
.report-scope-opt small {
    display: block;
    margin-top: 2px;
    font-size: .75rem;
    opacity: .78;
    line-height: 1.35;
}
@media (max-width: 700px) {
    .report-scope-switch { grid-template-columns: 1fr; }
}

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.page-title { font-weight: 700; color: #0a3d3a; margin-bottom: 4px; }
.take-survey-title {
    font-weight: 700;
    color: #0f5c56;
    margin: 0 0 6px;
    line-height: 1.5;
}
.page-kicker { color: #7a6a45; margin-bottom: 18px; }

/* تب‌های کارتابل تایید */
.approvals-shell {
    background: linear-gradient(180deg, #fffcf6 0%, #f6f0e4 100%);
    border: 1px solid #eadfca;
    border-radius: 18px;
    padding: 10px 12px 18px;
    box-shadow: 0 10px 28px rgba(10, 61, 58, .06);
}
.approvals-tabs .mud-tabs-toolbar {
    background: transparent;
    min-height: 0;
    padding: 4px;
}
.approvals-tabs .mud-tabs-tabbar {
    background: rgba(15, 92, 86, .06);
    border-radius: 14px;
    padding: 4px;
    border: 1px solid #e4dcc8;
}
.approvals-tabs .mud-tab {
    min-width: 0;
    flex: 1 1 0;
    border-radius: 11px !important;
    text-transform: none;
    font-weight: 700;
    color: #5c6b68 !important;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.approvals-tabs .mud-tab.mud-tab-active {
    background: #0f5c56 !important;
    color: #f6f0e4 !important;
    box-shadow: 0 6px 16px rgba(15, 92, 86, .28);
}
.approvals-tabs .mud-tab .mud-tab-slider,
.approvals-tabs .mud-tabs-slider {
    display: none !important;
}
.approvals-tab-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    white-space: nowrap;
}
.approvals-tab-icon {
    font-size: 1.15rem !important;
}
.approvals-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 7px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    background: rgba(246, 240, 228, .22);
    color: inherit;
    border: 1px solid rgba(246, 240, 228, .35);
}
.approvals-tabs .mud-tab:not(.mud-tab-active) .approvals-tab-badge {
    background: #e8f3f1;
    color: #0f5c56;
    border-color: #cfe3df;
}
.approvals-tab-badge--gold {
    background: #f4ead0 !important;
    color: #6b5420 !important;
    border-color: #e2d3a8 !important;
}
.approvals-tab-panel {
    padding-top: 14px;
}
.approvals-form-block {
    margin-bottom: 1.5rem;
    background: #fffcf6;
    border: 1px solid #eadfca;
    border-radius: 14px;
    padding: 12px 12px 4px;
}
.approvals-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    padding: 0 4px;
}
.approvals-form-title {
    color: #0a3d3a;
    font-weight: 700;
}
.approvals-form-meta {
    color: #7a6a45;
}

.islamic-card {
    border: 1px solid #eadfca !important;
    background: #fffcf6 !important;
    box-shadow: 0 8px 24px rgba(10, 61, 58, .06) !important;
}

.kpi-value { font-size: 1.8rem; font-weight: 700; color: #0a3d3a; }
.kpi-label { color: #6b5c3d; font-size: .85rem; }

.lifecycle {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 0 16px;
}

.lifecycle-step {
    min-width: 108px;
    text-align: center;
    padding: 10px 8px;
    border-radius: 10px;
    border: 1px solid #eadfca;
    background: #fff;
    font-size: .75rem;
    color: #5c6b68;
}

.lifecycle-step.done { background: #e7f3ee; border-color: #b7d7c8; color: #0f5c56; }
.lifecycle-step.current { background: #0f5c56; color: #f6f0e4; border-color: #0f5c56; font-weight: 700; }

.stat-bar {
    height: 10px;
    background: #efe6d0;
    border-radius: 99px;
    overflow: hidden;
}

.stat-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #0f5c56, #c4a35a);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background:
        radial-gradient(circle at 15% 20%, rgba(196,163,90,.28), transparent 32%),
        radial-gradient(circle at 90% 10%, rgba(15,92,86,.22), transparent 30%),
        linear-gradient(160deg, #0a3d3a, #12302e 45%, #1a3f3b);
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0 20px;
}

.login-tabs form {
    flex: 1;
    margin: 0;
}

.login-tab {
    width: 100%;
    text-align: center;
    text-decoration: none;
    border: 1px solid #d9ccae;
    background: #fff;
    color: #6b5c3d;
    border-radius: 10px;
    padding: 10px 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.login-tab.is-active-user {
    background: #0f5c56;
    border-color: #0f5c56;
    color: #f6f0e4;
}

.login-tab.is-active-admin {
    background: #c4a35a;
    border-color: #c4a35a;
    color: #12211f;
}

.login-submit {
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    background: #0f5c56;
    color: #f6f0e4;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.login-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9ccae;
    border-radius: 8px;
    margin: 6px 0 16px;
    font-family: inherit;
    background: #fff;
}

.demo-account {
    width: 100%;
    text-align: right;
    background: #f6f0e4;
    border: 1px solid #eadfca;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: inherit;
    color: #0a3d3a;
}

.demo-account:hover { background: #efe4c8; }

.take-preview-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    background: #0f5c56;
    color: #f6f0e4;
    padding: 10px 16px;
    font-size: .9rem;
}

.take-preview-bar a {
    color: #f6e7b2;
    font-weight: 600;
}

.take-shell {
    max-width: 820px;
    margin: 32px auto;
    padding: 0 16px 96px;
}

.nav-busy {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2000;
    background: #f6f0e4;
    box-shadow: 0 2px 10px rgba(15, 92, 86, .18);
}

.nav-busy span {
    display: block;
    text-align: center;
    padding: 6px 12px 8px;
    color: #0f5c56;
    font-weight: 700;
}

.field-repeat-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.field-repeat-body {
    flex: 1;
    min-width: 0;
}

.q-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.q-head-copy {
    flex: 1;
    min-width: 0;
}

.q-index {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #0f5c56;
    color: #f6f0e4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-weight: 700;
    font-size: .9rem;
    line-height: 1;
}

.q-options {
    color: #7a6a45;
    font-size: .8rem;
    max-width: 280px;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 2000;
    padding: 14px 18px;
    background: #9b3b3b;
    color: #fff;
    text-align: center;
    font-family: IRANSans, Tahoma, sans-serif;
}

#blazor-error-ui.show,
#blazor-error-ui.components-reconnect-show {
    display: block;
}

#blazor-error-ui .reload {
    color: #f6f0e4;
    margin-right: 12px;
}

.viz { margin-top: 12px; }
.viz-caption { color: #7a6a45; font-size: .82rem; margin-bottom: 12px; }
.viz-empty { color: #7a6a45; padding: 24px 0; text-align: center; }
.viz-highlight {
    margin-top: 12px;
    padding: 8px 12px;
    background: #e7f3ee;
    border: 1px solid #b7d7c8;
    border-radius: 8px;
    color: #0a3d3a;
    font-size: .85rem;
    font-weight: 600;
}

.viz-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    color: #5c6b68;
    font-size: .82rem;
    margin-bottom: 12px;
}

.viz-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.dist-row {
    display: grid;
    grid-template-columns: 7.2rem minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.dist-label {
    font-size: .88rem;
    color: #12211f;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dist-track {
    height: 22px;
    background: #efe6d0;
    border-radius: 99px;
    overflow: hidden;
}

.dist-fill {
    height: 100%;
    border-radius: 99px;
    min-width: 0;
}

.dist-meta {
    min-width: 4.8rem;
    text-align: left;
    font-size: .82rem;
    color: #5c6b68;
    white-space: nowrap;
}

.dist-meta b { color: #0a3d3a; margin-left: 4px; }

/* کارت‌های کنار هم در گزارش استفاده؛ مشارکت گروه‌ها اسکرول می‌شود تا ارتفاع مثل سهم پاسخ بماند. */
.usage-chart-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.usage-group-scroll {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 8px;
    padding-inline-end: 4px;
}

.cmp-block { margin-bottom: 16px; }
.cmp-head, .score-block { margin-bottom: 8px; }
.cmp-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: .9rem;
    color: #0a3d3a;
}
.cmp-head span, .score-block .cmp-head span { color: #7a6a45; font-size: .8rem; font-weight: 500; }
.score-block { margin-top: 14px; }

.share-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.share-ring {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 36px #fffcf6;
    background: #efe6d0;
}

.share-legend { flex: 1; min-width: 180px; }
.share-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #eadfca;
    font-size: .88rem;
}
.share-item:last-child { border-bottom: 0; }
.share-pct { color: #7a6a45; min-width: 2.4rem; }

.trend-plot {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-height: 180px;
    padding-top: 8px;
}

.trend-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.trend-count { font-size: .75rem; font-weight: 700; color: #0a3d3a; margin-bottom: 4px; }
.trend-bar {
    width: 70%;
    max-width: 28px;
    background: linear-gradient(180deg, #c4a35a, #0f5c56);
    border-radius: 8px 8px 3px 3px;
}
.trend-label {
    margin-top: 8px;
    font-size: .7rem;
    color: #7a6a45;
    text-align: center;
    word-break: break-all;
}

.participation-plot {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    min-height: 180px;
    padding-top: 8px;
    overflow-x: auto;
}

.participation-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 52px;
    max-width: 96px;
}

.participation-count {
    font-size: .78rem;
    font-weight: 700;
    color: #0a3d3a;
    margin-bottom: 4px;
}

.participation-bar {
    width: 70%;
    max-width: 32px;
    background: linear-gradient(180deg, #c4a35a, #0f5c56);
    border-radius: 8px 8px 3px 3px;
}

.participation-label {
    margin-top: 8px;
    font-size: .72rem;
    color: #7a6a45;
    text-align: center;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.mud-input-helper-text {
    text-align: start !important;
    white-space: normal !important;
}

.mud-dialog-content .mud-input-control {
    margin-bottom: 4px;
}

#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    background: rgba(18, 33, 31, 0.45);
    font-family: IRANSans, Tahoma, sans-serif !important;
    direction: rtl;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex !important;
}

.ns-reconnect-card {
    background: #fffcf6;
    color: #12211f;
    border: 1px solid #eadfca;
    border-radius: 16px;
    padding: 22px 28px;
    min-width: 260px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(10, 61, 58, 0.18);
}

.ns-reconnect-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border: 3px solid #eadfca;
    border-top-color: #0f5c56;
    border-radius: 50%;
    animation: ns-spin 0.8s linear infinite;
}

@keyframes ns-spin {
    to { transform: rotate(360deg); }
}

.ns-reconnect-card p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

#components-reconnect-modal .ns-reconnect-failed,
#components-reconnect-modal .ns-reconnect-rejected {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed .ns-reconnect-show,
#components-reconnect-modal.components-reconnect-rejected .ns-reconnect-show,
#components-reconnect-modal.components-reconnect-failed .ns-reconnect-spinner,
#components-reconnect-modal.components-reconnect-rejected .ns-reconnect-spinner {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed .ns-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected .ns-reconnect-rejected {
    display: block;
}

.people-panel {
    overflow: hidden;
}

.group-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px;
    width: 100%;
    padding: 10px 8px 10px 6px;
    border: 0;
    border-bottom: 1px dashed #eadfca;
    background: transparent;
    text-align: start;
    color: inherit;
    font: inherit;
}

.group-item-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: start;
    color: inherit;
    font: inherit;
    padding: 2px 4px 2px 0;
}

.group-item-main strong {
    line-height: 1.35;
    word-break: break-word;
}

.group-item > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    cursor: pointer;
}

.group-item small {
    color: #7a6a45;
    font-size: .75rem;
}

.group-item:hover,
.group-item.is-on {
    background: #f6f0e4;
}

.group-item.is-on strong {
    color: #0f5c56;
}

.group-item.is-off {
    opacity: .72;
}

.group-item.is-off strong {
    color: #7a6a45;
}

.people-search,
.surveys-search {
    min-width: 220px;
    max-width: 320px;
}

.people-table .mud-table-container {
    padding: 0 8px 8px;
    overflow-x: auto;
    overflow-y: visible;
}

.people-table .mud-table-container .mud-table-root {
    table-layout: auto;
}

.people-table.ctx-table tbody .mud-table-cell {
    height: auto;
}

.people-table .ctx-cell {
    height: auto;
    min-height: 48px;
}

.people-table .mud-table-pagination {
    border-top: 1px solid #eadfca;
    background: #fffcf6;
}

.mud-dialog .mud-dialog-content {
    padding-top: 8px !important;
}

.guide-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 22px;
    margin-bottom: 20px;
    padding: 26px 28px;
    border-radius: 20px;
    border: 1px solid rgba(196, 163, 90, .45);
    background:
        linear-gradient(90deg, rgba(196, 163, 90, .22), transparent 34%),
        linear-gradient(145deg, #0a3d3a 0%, #0f5c56 58%, #12302e 100%);
    color: #f6f0e4;
    box-shadow: 0 16px 36px rgba(10, 61, 58, .18);
}

.guide-hero-ornament {
    position: absolute;
    left: -36px;
    bottom: -70px;
    width: 170px;
    height: 170px;
    border: 16px solid rgba(196, 163, 90, .18);
    border-radius: 28px;
    transform: rotate(28deg);
    pointer-events: none;
}

.guide-hero-icon {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255, 252, 246, .12);
    border: 1px solid rgba(196, 163, 90, .45);
    color: #e8dcc4;
    flex-shrink: 0;
}

.guide-hero-copy {
    position: relative;
    z-index: 1;
    flex: 1 1 240px;
    min-width: 0;
}

.guide-hero-title {
    font-weight: 800 !important;
    color: #fffcf6 !important;
    margin-bottom: 6px !important;
}

.guide-hero-kicker {
    color: #e8dcc4;
    line-height: 1.8;
    margin: 0;
}

.guide-hero-stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.guide-stat {
    min-width: 108px;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(255, 252, 246, .1);
    border: 1px solid rgba(255, 252, 246, .16);
    text-align: center;
}

.guide-stat strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.2;
    color: #fffcf6;
}

.guide-stat span {
    font-size: .78rem;
    color: #e8dcc4;
}

.guide-stat-gold {
    background: rgba(196, 163, 90, .2);
    border-color: rgba(196, 163, 90, .4);
}

.guide-panel {
    padding: 22px 22px 18px !important;
    margin-bottom: 20px;
}

.guide-panel-head,
.guide-col-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.guide-panel-mark,
.guide-col-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: #e7f3ee;
    color: #0f5c56;
}

.guide-panel-sub {
    color: #7a6a45;
    margin: 0;
    line-height: 1.7;
}

.guide-section-title {
    font-weight: 700;
    color: #0a3d3a;
    margin: 0 0 4px;
}

.guide-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.guide-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 16px 16px 14px;
    background: #fff;
    border: 1px solid #eadfca;
    border-radius: 14px;
    min-height: 100%;
}

.guide-step:hover,
.guide-item:hover {
    border-color: #d9ccae;
    box-shadow: 0 8px 20px rgba(10, 61, 58, .07);
}

.guide-step-num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #0f5c56;
    color: #f6f0e4;
    font-weight: 800;
    font-size: .95rem;
    margin-top: 2px;
}

.guide-step:nth-child(even) .guide-step-num {
    background: #c4a35a;
    color: #12211f;
}

.guide-step p {
    margin: 0;
    color: #12211f;
    line-height: 1.85;
    font-size: .95rem;
}

.guide-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    align-items: start;
}

.guide-col {
    padding: 20px !important;
}

.guide-col-head-fix .guide-col-mark {
    background: #f6f0e4;
    color: #8a6d2e;
}

.guide-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 99px;
    padding: 4px 10px;
    margin-bottom: 6px;
}

.guide-badge-feature {
    background: #e7f3ee;
    color: #0f5c56;
    border: 1px solid #b7d7c8;
}

.guide-badge-fix {
    background: #f6f0e4;
    color: #7a6a45;
    border: 1px solid #ead9b0;
}

.guide-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guide-item {
    background: #fff;
    border: 1px solid #eadfca;
    border-right: 4px solid #0f5c56;
    border-radius: 12px;
    padding: 13px 14px 14px;
}

.guide-item-fix {
    border-right-color: #c4a35a;
}

.guide-date {
    display: inline-block;
    color: #7a6a45;
    font-size: .75rem;
    margin-bottom: 6px;
    background: #f6f0e4;
    border-radius: 99px;
    padding: 2px 8px;
}

.guide-title {
    font-weight: 700;
    color: #0a3d3a;
    margin-bottom: 4px;
}

.guide-detail {
    color: #5c6b68;
    font-size: .9rem;
    line-height: 1.75;
}

@media (max-width: 900px) {
    .guide-split,
    .guide-steps { grid-template-columns: 1fr; }
    .guide-hero {
        padding: 20px 18px;
        flex-direction: column;
        align-items: stretch;
    }
    .guide-hero-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }
    .guide-hero-stats { width: 100%; }
    .guide-stat { flex: 1; }
}

@media (min-width: 901px) {
    .guide-step:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

.ctx-table tbody tr {
    cursor: context-menu;
}

.ctx-table tbody .mud-table-cell {
    padding: 0 !important;
    height: 1px;
    vertical-align: middle;
}

.ctx-cell {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 52px;
    margin: 0;
    padding: 10px 16px;
}

.row-ctx-overlay {
    position: fixed;
    inset: 0;
    z-index: 1999;
    background: transparent;
}

.row-ctx-menu {
    position: fixed;
    z-index: 2000;
    min-width: 220px;
    max-width: min(320px, calc(100vw - 16px));
    transform: translateX(-100%);
}

.row-ctx-item {
    justify-content: flex-start !important;
    width: 100%;
    border-radius: 0 !important;
    padding: 8px 14px !important;
}

.ns-card,
.surveys-card {
    overflow: hidden;
}

.ns-card-head,
.surveys-card-head,
.people-table-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #eadfca;
    background:
        linear-gradient(90deg, rgba(15, 92, 86, .07), transparent 58%),
        #fffcf6;
}

.ns-card-title,
.surveys-card-title {
    font-weight: 700;
    color: #0a3d3a;
}

.ns-card-sub,
.surveys-card-sub {
    color: #7a6a45;
}

.ns-table .mud-table-container,
.surveys-table .mud-table-container {
    overflow-x: auto;
}

.ns-table .mud-table-head .mud-table-cell,
.surveys-table .mud-table-head .mud-table-cell,
.people-table .mud-table-head .mud-table-cell {
    font-weight: 700 !important;
    color: #0a3d3a !important;
    background: #f6f0e4;
    border-bottom: 2px solid #c4a35a !important;
    white-space: nowrap;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.report-answers .mud-table-head .mud-table-cell {
    white-space: normal;
    vertical-align: top;
    min-width: 148px;
}

.report-col-filter {
    margin-top: 8px;
    min-width: 128px;
}

.report-answers .mud-table-body .mud-table-cell {
    vertical-align: top;
    max-width: 260px;
}

.clamp-cell {
    position: relative;
    min-width: 0;
}

.clamp-measure {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    line-height: 1.7;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.clamp-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.7;
    max-height: 3.4em;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.clamp-strong {
    font-weight: 700;
    color: #0a3d3a;
}

.clamp-more {
    display: inline-block;
    margin-top: 2px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0f5c56;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}

.text-pop-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 30, 28, .45);
}

.text-pop {
    width: min(560px, 100%);
    max-height: min(70vh, 520px);
    display: flex;
    flex-direction: column;
    background: #fffdf8;
    border: 1px solid #e4d3b0;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(10, 40, 36, .22);
}

.text-pop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0e6d2;
    font-weight: 700;
    color: #0a3d3a;
}

.text-pop-close {
    border: 0;
    background: transparent;
    color: #0f5c56;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.text-pop-body {
    overflow: auto;
    padding: 16px 18px 20px;
    line-height: 1.85;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #1c2430;
}

.report-values-pop {
    width: min(640px, 100%);
    max-height: min(78vh, 640px);
}

.ns-table .mud-table-body .mud-table-cell,
.surveys-table .mud-table-body .mud-table-cell,
.people-table .mud-table-body .mud-table-cell {
    vertical-align: middle;
    border-bottom: 1px solid #f0e6d2 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.ns-table .mud-table-row:hover .mud-table-cell,
.surveys-table .mud-table-row:hover .mud-table-cell,
.people-table .mud-table-row:hover .mud-table-cell {
    background: rgba(15, 92, 86, .045) !important;
}

.ns-title,
.survey-title {
    font-weight: 700;
    color: #0a3d3a;
    line-height: 1.45;
}

.ns-date,
.survey-date,
.survey-owner {
    color: #6b5c3d;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ns-meta {
    color: #6b5c3d;
    line-height: 1.45;
}

.ns-count,
.survey-count {
    display: inline-flex;
    min-width: 2rem;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 99px;
    background: #e7f3ee;
    color: #0a3d3a;
    font-weight: 700;
    font-size: .85rem;
}

.ns-count-gold,
.survey-count-gold {
    background: #f4ead0;
    color: #6b5420;
}

.ns-status,
.survey-status {
    font-weight: 600 !important;
}

.ns-actions-head,
.ns-actions-cell,
.surveys-actions-head,
.surveys-actions-cell {
    text-align: start;
    white-space: nowrap;
}

.ns-actions-cell .ctx-cell,
.surveys-actions-cell .ctx-cell {
    margin: 0;
    padding: 8px 12px;
    min-height: 52px;
    height: 100%;
}

.ns-actions,
.survey-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    border-radius: 999px;
    background: #f6f0e4;
    border: 1px solid #eadfca;
}

.my-form-edit-item--active {
    background: #e8f5f3 !important;
    border-radius: 8px;
}

.ns-actions .mud-icon-button,
.survey-actions .mud-icon-button {
    width: 34px;
    height: 34px;
}

.ns-empty,
.surveys-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 16px;
    color: #7a6a45;
}

.ns-empty .mud-icon-root,
.surveys-empty .mud-icon-root {
    color: #c4a35a;
}

.ns-simple table thead th {
    font-weight: 700;
    color: #0a3d3a;
    background: #f6f0e4;
    border-bottom: 2px solid #c4a35a !important;
}

.ns-simple table tbody td {
    border-bottom: 1px solid #f0e6d2;
    vertical-align: middle;
}

.people-panel-head {
    padding: 16px 18px 12px;
    font-weight: 700;
    color: #0a3d3a;
    border-bottom: 1px solid #eadfca;
    background:
        linear-gradient(90deg, rgba(15, 92, 86, .07), transparent 58%),
        #fffcf6;
}

.group-item .ns-actions {
    flex-shrink: 0;
}

.rich-editor {
    border: 1px solid #eadfca;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.rich-toolbar {
    display: flex;
    gap: 2px;
    padding: 4px 6px;
    background: #f6f0e4;
    border-bottom: 1px solid #eadfca;
}

.rich-area {
    min-height: 140px;
    padding: 12px 14px;
    outline: none;
    line-height: 1.9;
}

.intro-body {
    line-height: 1.9;
    font-size: 1rem;
}

.intro-body a {
    color: #0f5c56;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.captcha-box svg {
    border-radius: 8px;
    border: 1px solid #eadfca;
}

.ns-changelog-preview {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #eadfca;
    border-radius: 10px;
    background: #fffaf0;
    color: #12211f;
    font-family: IRANSans, Tahoma, sans-serif;
    font-size: .9rem;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 280px;
    overflow: auto;
}

/* فهرست بازشو، منو، تقویم و دیالوگ داخل پنجره بماند و زیر نوار وظیفه نرود. */
.mud-popover.mud-popover-open {
    max-height: min(360px, calc(100dvh - 88px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.mud-popover.mud-popover-open .mud-list,
.mud-popover.mud-popover-open .mud-select-item,
.mud-popover.mud-popover-open .mud-autocomplete-list {
    max-height: inherit;
}

.mud-dialog-container {
    align-items: center !important;
    padding: 12px !important;
}

.mud-dialog {
    max-height: calc(100dvh - 24px) !important;
    display: flex !important;
    flex-direction: column;
}

.mud-dialog .mud-dialog-content {
    overflow-y: auto !important;
    min-height: 0;
    flex: 1 1 auto;
}

.pick-scroll,
.choice-scroll {
    max-height: min(48vh, 360px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-inline-end: 4px;
    -webkit-overflow-scrolling: touch;
}

/* فریم رنگی سطوح جریان تایید در ادیتور */
.approval-stage-card {
    box-shadow: none !important;
}
.approval-stage-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}
.approval-stage-fields {
    box-shadow: none !important;
}

/* شماتیک جریان تایید زیر دکمه ویرایش فرم */
.approval-flow-schematic {
    border-radius: 14px;
    padding: 14px 12px;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(15, 92, 86, .06), transparent 55%),
        linear-gradient(180deg, #fffcf6, #f3ebe0);
    border: 1px solid rgba(15, 92, 86, .12);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.approval-flow-schematic--empty {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7a6a45;
    font-size: .88rem;
}
.approval-flow-schematic__empty-icon {
    color: var(--teal);
    opacity: .55;
    font-size: 1.1rem;
}
.approval-flow-schematic__track {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    min-width: max-content;
    padding: 4px 2px 8px;
}
.approval-flow-node {
    position: relative;
    min-width: 148px;
    max-width: 200px;
    padding: 12px 12px 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(18, 33, 31, .1);
    box-shadow: 0 6px 18px rgba(18, 33, 31, .05);
    animation: approval-flow-in .45s ease both;
}
.approval-flow-node--start {
    background: linear-gradient(160deg, #eef7f5, #fff);
    border-color: rgba(15, 92, 86, .22);
}
.approval-flow-node--end {
    background: linear-gradient(160deg, #f7f1e3, #fff);
    border-color: rgba(196, 163, 90, .45);
}
.approval-flow-node--stage {
    background: var(--stage-bg, #e7f4f1);
    border-color: var(--stage-border, #8fbfb4);
    border-inline-start: 3px solid var(--stage-accent, #2f6f65);
}
.approval-flow-node__badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    color: #fff;
    background: var(--teal);
    margin-bottom: 8px;
}
.approval-flow-node--end .approval-flow-node__badge {
    background: #a8893f;
}
.approval-flow-node__title {
    font-weight: 700;
    font-size: .92rem;
    color: #12211f;
    line-height: 1.35;
    margin-bottom: 6px;
}
.approval-flow-node__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}
.approval-flow-chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: .7rem;
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(18, 33, 31, .1);
    color: #3d4f4b;
}
.approval-flow-chip--lock {
    background: rgba(140, 70, 70, .1);
    border-color: rgba(140, 70, 70, .25);
    color: #7a3a3a;
}
.approval-flow-node__fields {
    margin-top: 8px;
    padding: 7px 8px;
    border-radius: 10px;
    border: 1px dashed var(--stage-border, #8fbfb4);
    background: var(--fields-bg, #d5ebe5);
    font-size: .72rem;
    color: #2a403c;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.approval-flow-node__field-names {
    opacity: .85;
    line-height: 1.35;
}
.approval-flow-arrow {
    display: flex;
    align-items: center;
    align-self: center;
    padding: 0 2px;
    color: rgba(15, 92, 86, .45);
    flex: 0 0 auto;
}
.approval-flow-arrow__line {
    display: block;
    width: 18px;
    height: 2px;
    background: linear-gradient(90deg, rgba(15, 92, 86, .15), rgba(15, 92, 86, .55));
    border-radius: 2px;
}
.approval-flow-arrow__head {
    font-size: 1.05rem;
    line-height: 1;
    margin-inline-start: -2px;
    color: rgba(15, 92, 86, .65);
}
@keyframes approval-flow-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
    .approval-flow-node {
        min-width: 132px;
        max-width: 168px;
        padding: 10px;
    }
}

/* بانک‌های اطلاعاتی */
.db-card {
    transition: transform .15s ease, box-shadow .15s ease;
}
.db-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(10, 61, 58, .1);
}
.db-pick-scroll {
    max-height: min(42vh, 360px);
    overflow: auto;
    padding-inline-end: 4px;
}
.db-data-card {
    overflow: hidden;
}
.db-table-scroll {
    overflow-x: auto;
    max-height: min(70vh, 720px);
}
.db-data-table {
    min-width: 640px;
}
.db-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #eadfca;
}
.db-search {
    min-width: min(100%, 260px);
}

