:root { --app-primary: #1f4e78; --app-bg: #f4f6fa; --sidebar-w: 250px; }
html, body { font-family: Vazirmatn, Tahoma, sans-serif; background: var(--app-bg); }
body { font-feature-settings: "ss01"; }
.ltr { direction: ltr; unicode-bidi: isolate; }
dd { margin-inline-start: 0 !important; }
td.ltr, dd.ltr { text-align: right; }
input[dir=ltr] { text-align: left; }
.num { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; }
.sidebar { width: var(--sidebar-w); height: 100vh; overflow-y: auto; background: linear-gradient(180deg, #16395a, #1f4e78); position: fixed; top: 0; right: 0; z-index: 1030; transition: transform .2s; }
.sidebar .brand { color: #fff; padding: 1.1rem 1rem; font-weight: 800; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar .nav-link { color: rgba(255,255,255,.82); border-radius: .5rem; margin: 2px 8px; padding: .55rem .8rem; font-size: .92rem; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: rgba(255,255,255,.14); color: #fff; }
.sidebar .nav-section { color: rgba(255,255,255,.45); font-size: .75rem; padding: .9rem 1.2rem .3rem; }
.main { margin-right: var(--sidebar-w); min-height: 100vh; }
.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: .6rem 1.2rem; position: sticky; top: 0; z-index: 1020; }
.content { padding: 1.3rem; }
.card { border: 0; border-radius: .8rem; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 700; border-radius: .8rem .8rem 0 0 !important; }
.stat-card .icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.table th { font-weight: 600; font-size: .85rem; color: #475467; white-space: nowrap; background: #f8f9fb; }
.table td { vertical-align: middle; font-size: .9rem; }
.form-label { font-size: .85rem; font-weight: 600; color: #344054; margin-bottom: .25rem; }
.errorlist { list-style: none; padding: 0; margin: .2rem 0 0; color: #d92d20; font-size: .8rem; }
.item-row { border: 1px solid #e5e7eb; border-radius: .6rem; padding: .7rem; margin-bottom: .6rem; background: #fcfcfd; }
.item-row.deleted { opacity: .45; }
.item-row .calc { background: #eef4ff; border-radius: .4rem; padding: .25rem .5rem; font-size: .8rem; }
.pattern-field { display: none; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background-color: var(--p-navy); background-image: linear-gradient(135deg, var(--p-navy), var(--p-blue)); }
.auth-card { width: 100%; max-width: 440px; }
pre.json { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: .6rem; max-height: 480px; overflow: auto; direction: ltr; text-align: left; font-size: .8rem; }
.badge { font-weight: 500; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.show { transform: translateX(0); }
  .main { margin-right: 0; }
}
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin: 0 !important; }
  body { background: #fff; }
}

/* ---------------- Blazor */
#blazor-error-ui { background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; right: 0; left: 0;
  padding: .6rem 1.25rem; position: fixed; z-index: 2000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; left: .75rem; top: .5rem; }
.sidebar .nav-link.active { background: rgba(255,255,255,.16); color: #fff; }
.table-hover tbody tr { cursor: default; }
.clickable { cursor: pointer; }
.form-check-input { cursor: pointer; }
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.55); z-index: 3000; display: flex; align-items: center; justify-content: center; }
.step-num { display: inline-flex; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--bs-primary); color: #fff; align-items: center; justify-content: center; font-size: .85rem; margin-left: .4rem; }
.edit-panel { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: .6rem; padding: 1rem; }
.items-table input, .items-table select { min-width: 90px; }
.items-table td { vertical-align: top; }
.sticky-totals { position: sticky; bottom: 0; z-index: 5; }
/* کدها، شناسه‌ها و آدرس‌ها با ارقام لاتین نمایش داده شوند */
.ltr, [dir=ltr], pre, code, .font-monospace { font-feature-settings: normal; }
.plan-card { transition: transform .15s, box-shadow .15s; }
.plan-card:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.08); }

/* ---- صفحه اول عمومی، درباره ما، ورود/ثبت‌نام (رنگ‌ها از پنل مدیر تنظیم می‌شود) ---- */
:root { --p-navy:#0b1f4b; --p-blue:#2457d6; --p-cyan:#12b5cb; --p-accent:#ffb703; --p-accent-text:#1b2a4a; --p-hero-text:#ffffff; --p-bg:#f4f7ff; --p-ink:#1b2a4a; }
.pub-root { background: var(--p-bg); min-height: 100vh; color: var(--p-ink); }
.pub-nav { background-color: var(--p-navy); background-image: linear-gradient(90deg, var(--p-navy), var(--p-blue)); box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.pub-nav .nav-link { color: var(--p-hero-text); opacity: .9; border-radius: 999px; padding: .4rem .9rem; }
.pub-nav .nav-link:hover { opacity: 1; background: rgba(255,255,255,.14); }
.pub-brand, .pub-brand:hover { color: var(--p-hero-text); text-decoration: none; }
.pub-nav .navbar-toggler i { color: var(--p-hero-text) !important; }
.brand-badge { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--p-accent); color: var(--p-accent-text); font-size: 1.15rem; }
.brand-badge-lg { width: 60px; height: 60px; border-radius: 16px; font-size: 1.9rem; }
.btn-accent { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-accent-text); font-weight: 700; }
.btn-accent:hover, .btn-accent:focus { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-accent-text); filter: brightness(1.08); }
.btn-hero-outline { background: transparent; color: var(--p-hero-text); border: 2px solid var(--p-hero-text); font-weight: 600; }
.btn-hero-outline:hover { background: var(--p-hero-text); color: var(--p-navy); }
.text-accent { color: var(--p-accent); }
.hero-text, .cta-text, .auth-text { color: var(--p-hero-text); }
.hero-text h1 { color: inherit; text-shadow: 0 2px 14px rgba(0,0,0,.28); }
.hero { position: relative; overflow: hidden; background-color: var(--p-navy); background-image: linear-gradient(135deg, var(--p-navy) 0%, var(--p-blue) 100%); padding-bottom: 60px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 360px at 90% 0%, var(--p-cyan), transparent 70%); opacity: .45; pointer-events: none; }
.hero-blob { position: absolute; border-radius: 50%; opacity: .12; background: var(--p-hero-text); }
.hero-blob-1 { width: 260px; height: 260px; top: -90px; left: -60px; }
.hero-blob-2 { width: 160px; height: 160px; bottom: 40px; right: 38%; }
.hero-chip { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); padding: .3rem .9rem; border-radius: 999px; font-size: .85rem; }
.hero-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.7; }
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; fill: var(--p-bg); }
.hero-card { background: #fff; color: var(--p-ink); border-radius: 1.2rem; padding: 1.4rem; box-shadow: 0 25px 60px rgba(4,12,40,.35); transform: rotate(-2deg); }
.hc-line { display: flex; justify-content: space-between; gap: .6rem; margin-bottom: .7rem; }
.hc-line span { height: 10px; border-radius: 6px; background: #e6ecfb; flex: 1; }
.hc-line span.w-50 { flex: 0 0 40%; background: #cfdcfb; }
.hc-line span.w-25 { flex: 0 0 22%; background: #cfdcfb; }
.hc-line span.w-75 { flex: 0 0 55%; background: #cfdcfb; }
.hc-pill { background: #eef3ff; color: var(--p-blue); border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; font-weight: 600; }
.feature-card { background: #fff; border-radius: 1rem; padding: 1.2rem; box-shadow: 0 6px 22px rgba(36,87,214,.08); border: 1px solid #e9eefb; transition: transform .15s, box-shadow .15s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(36,87,214,.14); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: .8rem; }
.ic-green { background: #e3f7ee; color: #12a05c; } .ic-blue { background: #e4edff; color: var(--p-blue); }
.ic-amber { background: #fff3d6; color: #d98a00; } .ic-rose { background: #ffe6ec; color: #e0345f; }
.section-title { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.section-title i { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background-color: var(--p-blue); background-image: linear-gradient(135deg, var(--p-blue), var(--p-cyan)); color: #fff; font-size: 1.15rem; }
.section-title h3 { margin: 0; font-weight: 800; font-size: 1.35rem; }
.news-card { background: #fff; border-radius: 1rem; padding: 1.2rem 1.3rem; box-shadow: 0 6px 22px rgba(11,31,75,.07); border: 1px solid #e9eefb; border-right: 5px solid var(--p-blue); transition: transform .15s; }
.news-card:hover { transform: translateY(-2px); }
.news-success { border-right-color: #12a05c; } .news-warning { border-right-color: #f0a500; }
.news-danger { border-right-color: #e0345f; } .news-info { border-right-color: var(--p-blue); }
.step-card { background: #fff; border-radius: 1rem; padding: 1.3rem; border: 1px dashed #c9d6f5; }
.step-num { width: 42px; height: 42px; border-radius: 50%; background-color: var(--p-blue); background-image: linear-gradient(135deg, var(--p-blue), var(--p-cyan)); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: .7rem; }
.plan-pub { background: #fff; border-radius: 1.1rem; padding: 1.5rem; text-align: center; border: 1px solid #e9eefb; box-shadow: 0 6px 22px rgba(11,31,75,.07); }
.plan-green { border: 2px solid #12a05c; } .plan-blue { border: 2px solid var(--p-blue); box-shadow: 0 14px 34px rgba(36,87,214,.2); }
.plan-big { font-size: 1.45rem; font-weight: 800; margin: .4rem 0; }
.plan-tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: .2rem .8rem; border-radius: 999px; }
.tag-gray { background: #eceff5; color: #5b6784; } .tag-green { background: #e3f7ee; color: #0e8a4e; } .tag-blue { background: #e4edff; color: var(--p-blue); }
.cta-band { border-radius: 1.4rem; padding: 2.4rem 1.5rem; background-color: var(--p-navy); background-image: linear-gradient(135deg, var(--p-navy), var(--p-blue)); box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.pub-footer { background-color: var(--p-navy); background-image: linear-gradient(90deg, var(--p-navy), var(--p-blue)); color: var(--p-hero-text); }
.pf-link { color: var(--p-hero-text); opacity: .75; text-decoration: none; } .pf-link:hover { opacity: 1; color: var(--p-hero-text); }
.pf-strong { color: var(--p-hero-text); font-weight: 700; text-decoration: none; }
.designer-avatar { width: 96px; height: 96px; border-radius: 50%; background-color: var(--p-navy); background-image: linear-gradient(135deg, var(--p-navy), var(--p-cyan)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; }
.pub-root .card { border-radius: 1rem; box-shadow: 0 6px 22px rgba(11,31,75,.07); border: 1px solid #e9eefb; }
.theme-preview { border-radius: 1rem; padding: 1.4rem; text-align: center; }
.theme-swatch { display: inline-block; width: 46px; height: 18px; border-radius: 6px; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }

.hc-table { width: 100%; border-collapse: collapse; font-size: .78rem; margin-bottom: .6rem; }
.hc-table th { background: #eef2fb; color: #3a4a78; font-weight: 700; padding: 4px 6px; text-align: right; }
.hc-table th:not(:first-child), .hc-table td:not(:first-child) { text-align: center; }
.hc-table td { padding: 4px 6px; border-bottom: 1px solid #eef0f5; }
.hc-table tbody tr:nth-child(even) td { background: #f6f8fc; }
.hc-total { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, var(--p-navy), var(--p-blue)); color: #fff; border-radius: .6rem; padding: .45rem .7rem; font-size: .82rem; }

/* منوی کشویی کناری */
.sidebar details.nav-group { border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar details.nav-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  color: rgba(255,255,255,.78); font-size: .86rem; font-weight: 700; padding: .75rem 1.2rem; user-select: none; }
.sidebar details.nav-group > summary::-webkit-details-marker { display: none; }
.sidebar details.nav-group > summary:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar details.nav-group > summary::after { content: "\f282"; font-family: "bootstrap-icons"; font-size: .75rem; transition: transform .2s; }
.sidebar details.nav-group[open] > summary { color: #fff; }
.sidebar details.nav-group[open] > summary::after { transform: rotate(180deg); }
.sidebar details.nav-group > .nav-link { padding-right: 1.6rem; }

/* قاب عکس: تصویر کامل و بدون برش نمایش داده می‌شود */
.photo-frame { display: block; width: 96px; height: 96px; object-fit: contain; background: #f1f5f9; border: 1px solid #dbe3ec; border-radius: 14px; padding: 2px; }
.photo-frame-lg { width: 180px; height: 220px; border-radius: 16px; }
