* { box-sizing: border-box; }
html { scroll-behavior: smooth; direction: rtl; }
body { font-family: 'Yekan Bakh FaNum', Tahoma, Arial, sans-serif; direction: rtl; text-align: right; font-weight: 400; color:#1e293b; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
input, textarea, select, button { font-family: inherit; direction: rtl; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.01em; }
/* Minimal official typography: tame heavy weights coming from utility classes */
.font-black { font-weight: 700 !important; }
.font-extrabold { font-weight: 700 !important; }
.font-bold { font-weight: 600 !important; }
.font-semibold { font-weight: 600 !important; }
.official-body {
  background:
    radial-gradient(circle at 18% 8%, rgba(30,64,175,.08), transparent 28rem),
    radial-gradient(circle at 90% 16%, rgba(148,163,184,.16), transparent 28rem),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 54%, #eef2f7 100%);
}
.official-login-bg {
  background:
    radial-gradient(circle at 72% 20%, rgba(30,64,175,.22), transparent 30rem),
    radial-gradient(circle at 20% 85%, rgba(15,23,42,.32), transparent 34rem),
    linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
}
.sidebar-official {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 1.75rem;
  box-shadow: 0 26px 70px rgba(15,23,42,.09);
  backdrop-filter: blur(20px);
  overflow: hidden;
}
.sidebar-official nav::-webkit-scrollbar { width: 6px; }
.sidebar-official nav::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 999px; }
.sidebar-official .nav-link { gap: .65rem; padding: .72rem .8rem; font-size: .875rem; border-radius: .9rem; }
.sidebar-official .nav-link i { width: 1.1rem; font-size: .9rem; }
.sidebar-official .current-user-card { padding: .65rem; gap: .6rem; border-radius: 1rem; }
.sidebar-official .current-user-card .font-black { font-size: .875rem; }
.sidebar-official .logout-link { padding: .7rem; font-size: .875rem; }
.mobile-topbar { background: rgba(255,255,255,.9); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(226,232,240,.9); }
.nav-link {
  display:flex; align-items:center; gap:.82rem; padding:.92rem 1rem; border-radius:1.1rem;
  color:#334155; font-weight:600; transition:.2s ease; border:1px solid transparent; position:relative;
}
.nav-link i { width:1.25rem; text-align:center; color:#64748b; }
.nav-link:hover { background:#f1f5f9; border-color:#e2e8f0; color:#0f172a; transform:translateX(-2px); }
.nav-link--active { background:linear-gradient(135deg,#eff6ff,#e0e7ff); color:#1e3a8a; border-color:#dbeafe; box-shadow:0 12px 26px rgba(30,64,175,.10); }
.nav-link--active i { color:#1d4ed8; }
.nav-link--active::before { content:""; position:absolute; right:.4rem; width:3px; height:26px; border-radius:999px; background:#1d4ed8; }
.mobile-nav-link { display:flex; align-items:center; gap:.75rem; padding:.9rem 1rem; border-radius:1rem; background:#fff; color:#0f172a; font-weight:600; border:1px solid #e2e8f0; }
.current-user-card { display:flex; align-items:center; gap:.75rem; border-radius:1.25rem; background:#f8fafc; border:1px solid #e2e8f0; padding:.85rem; }
.logout-link { display:flex; align-items:center; justify-content:center; gap:.6rem; border-radius:1rem; background:#fff; color:#475569; padding:.85rem; font-weight:600; transition:.2s; border:1px solid #e2e8f0; }
.logout-link:hover { background:#fff1f2; color:#be123c; border-color:#fecdd3; }
.page-heading { display:flex; flex-direction:column; gap:1rem; }
.page-icon { width:2.8rem; height:2.8rem; border-radius:1rem; display:inline-flex; align-items:center; justify-content:center; background:#f1f5f9; color:#1e3a8a; border:1px solid #e2e8f0; box-shadow:0 10px 26px rgba(15,23,42,.04); }
.panel { background:#ffffff; border:1px solid #edf1f6; border-radius:1.2rem; padding:1rem; box-shadow:0 1px 2px rgba(15,23,42,.03), 0 10px 30px rgba(15,23,42,.045); }
@media (min-width: 640px) { .panel { padding:1.5rem; border-radius:1.4rem; } }
.panel + .panel { margin-top:1.25rem; }
.panel-header { display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:1.1rem; padding-bottom:.9rem; border-bottom:1px solid #f1f5f9; flex-wrap:wrap; }
.panel-header h2 { display:flex; align-items:center; gap:.6rem; font-size:1rem; font-weight:700; color:#0f172a; letter-spacing:-.01em; }
.panel-header h2 i { font-size:.95rem; }
.official-stat-card { background:#fff; border:1px solid #edf1f6; border-radius:1.2rem; padding:1.25rem; box-shadow:0 1px 2px rgba(15,23,42,.03), 0 10px 26px rgba(15,23,42,.04); transition:.2s ease; }
.official-stat-card:hover { transform: translateY(-2px); border-color:#dbe4ef; box-shadow:0 16px 38px rgba(15,23,42,.07); }
.stat-icon { width:3rem; height:3rem; border-radius:1rem; display:flex; align-items:center; justify-content:center; border:1px solid #e2e8f0; color:#1e3a8a; background:#f8fafc; }
.stat-icon-success { color:#047857; background:#ecfdf5; border-color:#a7f3d0; }
.stat-icon-danger { color:#be123c; background:#fff1f2; border-color:#fecdd3; }
.form-label { display:block; margin-bottom:.4rem; color:#64748b; font-weight:700; font-size:.8rem; }
.form-input { width:100%; border:1px solid #dbe2ea; background:#fff; border-radius:.85rem; padding:.72rem .95rem; outline:none; transition:.18s ease; color:#0f172a; font-size:.92rem; }
.form-input:focus { border-color:#1d4ed8; box-shadow:0 0 0 3px rgba(29,78,216,.12); }
.form-input:hover:not(:focus):not([readonly]) { border-color:#cbd5e1; }
.btn-primary, .btn-secondary, .btn-danger { display:inline-flex; align-items:center; gap:.5rem; border-radius:.85rem; padding:.72rem 1.1rem; font-weight:700; font-size:.9rem; transition:.18s ease; cursor:pointer; white-space:nowrap; }
.btn-primary { background:#1d4ed8; color:#fff; box-shadow:0 8px 18px rgba(29,78,216,.20); border:1px solid #1d4ed8; }
.btn-primary:hover { background:#1e40af; transform:translateY(-1px); }
.btn-secondary { background:#fff; color:#0f172a; border:1px solid #e2e8f0; }
.btn-secondary:hover { background:#f8fafc; border-color:#cbd5e1; }
.btn-danger { background:#dc2626; color:#fff; border:1px solid #dc2626; box-shadow:0 8px 18px rgba(220,38,38,.18); }
.btn-danger:hover { background:#b91c1c; transform:translateY(-1px); }
.data-table { width:100%; border-collapse:separate; border-spacing:0 .58rem; }
.data-table th { text-align:right; font-size:.74rem; color:#64748b; font-weight:700; padding:.2rem .75rem; white-space:nowrap; }
.data-table td { background:#fff; border-top:1px solid #e2e8f0; border-bottom:1px solid #e2e8f0; padding:.82rem .75rem; white-space:nowrap; vertical-align:middle; }
.data-table tbody tr { transition:.18s; }
.data-table tbody tr:hover td { background:#f8fafc; border-color:#cbd5e1; }
.data-table td:first-child { border-right:1px solid #e2e8f0; border-radius:0 1rem 1rem 0; }
.data-table td:last-child { border-left:1px solid #e2e8f0; border-radius:1rem 0 0 1rem; }
.table-action { display:inline-flex; align-items:center; justify-content:center; border-radius:.8rem; background:#f8fafc; color:#334155; font-weight:700; padding:.48rem .72rem; font-size:.8rem; border:1px solid #e2e8f0; min-height:2rem; }
.table-action:hover { background:#eff6ff; color:#1d4ed8; border-color:#dbeafe; }
.table-action-danger { background:#fff1f2; color:#991b1b; border-color:#fecaca; }
.table-action-danger:hover { background:#fee2e2; color:#7f1d1d; }
.table-input { width:100%; min-width:7rem; border:1px solid #cbd5e1; border-radius:.85rem; padding:.58rem .72rem; outline:none; background:#fff; }
.table-input:focus { border-color:#1d4ed8; box-shadow:0 0 0 3px rgba(29,78,216,.10); }
.empty-box { border:1px dashed #cbd5e1; border-radius:1.25rem; padding:2rem; text-align:center; color:#64748b; font-weight:600; background:#f8fafc; }
.quick-link { display:flex; align-items:center; gap:.75rem; border-radius:1.25rem; background:#fff; border:1px solid #e2e8f0; padding:1rem; font-weight:700; color:#0f172a; transition:.18s; }
.quick-link:hover { border-color:#bfdbfe; background:#f8fafc; transform:translateY(-1px); }
.quick-link i { width:2.5rem; height:2.5rem; border-radius:1rem; background:#eff6ff; color:#1d4ed8; display:flex; align-items:center; justify-content:center; }
.file-card { display:flex; align-items:center; gap:.85rem; padding:1rem; border-radius:1.25rem; border:1px solid #e2e8f0; background:#fff; color:#0f172a; font-weight:700; min-width:0; transition:.18s; }
.file-card:hover { background:#eff6ff; border-color:#bfdbfe; transform:translateY(-1px); }
.file-card i { font-size:1.4rem; color:#1d4ed8; }
.file-card span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.file-card small { display:block; font-size:.7rem; color:#64748b; font-weight:650; margin-top:.2rem; }
.alert-success, .alert-error { display:flex; align-items:center; gap:.75rem; border-radius:1.25rem; padding:1rem 1.25rem; font-weight:700; margin-bottom:1.5rem; }
.alert-success { background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; }
.alert-error { background:#fff1f2; color:#be123c; border:1px solid #fecdd3; }
.official-card { border-radius:1.5rem; background:#fff; border:1px solid #e2e8f0; box-shadow:0 18px 45px rgba(15,23,42,.06); }
.help-prose { line-height:2.05; color:#334155; }
.help-prose h2 { color:#0f172a; font-size:1.25rem; font-weight:700; margin-top:1.75rem; margin-bottom:.75rem; }
.help-prose h3 { color:#0f172a; font-weight:700; margin-top:1rem; }
.help-prose ul { padding-right:1.25rem; list-style:disc; }
.help-prose li { margin:.25rem 0; }
.help-price { background:linear-gradient(135deg, #0f172a, #1e3a8a); color:#fff; }
.status-badge { display:inline-flex; align-items:center; gap:.35rem; border-radius:999px; padding:.32rem .7rem; font-size:.75rem; font-weight:700; border:1px solid transparent; }
.status-badge::before { content:""; width:.42rem; height:.42rem; border-radius:999px; background:currentColor; opacity:.72; }
.badge-success { background:#ecfdf5; color:#047857; border-color:#bbf7d0; }
.badge-danger { background:#fff1f2; color:#be123c; border-color:#fecdd3; }
.badge-warning { background:#fffbeb; color:#b45309; border-color:#fde68a; }
.badge-info { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.badge-primary { background:#eef2ff; color:#4338ca; border-color:#c7d2fe; }
.badge-neutral { background:#f8fafc; color:#475569; border-color:#e2e8f0; }
.badge-muted { background:#f4f4f5; color:#71717a; border-color:#e4e4e7; }
.chart-card { min-height: 22rem; }
.chart-grid-line { stroke:#e2e8f0; stroke-width:1; }
.chart-axis-text { fill:#64748b; font-size:11px; font-weight:700; }
.user-mini { display:flex; align-items:center; justify-content:space-between; gap:.85rem; padding:.85rem; border-radius:1.15rem; background:#fff; border:1px solid #e2e8f0; }
@media (max-width: 640px) {
  .btn-primary, .btn-secondary, .btn-danger { width:100%; justify-content:center; }
  .panel { border-radius:1.1rem; padding:1rem; }
  .panel-header { margin-bottom:.85rem; padding-bottom:.7rem; }
  .panel-header h2 { font-size:.95rem; }
  .official-stat-card { padding:1.1rem; border-radius:1.1rem; }
  .page-icon { width:2.4rem; height:2.4rem; border-radius:.85rem; }
  .form-input { padding:.7rem .85rem; font-size:.9rem; }
  .data-table { border-spacing:0 .5rem; }
  .alert-success, .alert-error { border-radius:1rem; padding:.85rem 1rem; margin-bottom:1rem; }
}
