@font-face { font-family: VazirmatnLocal; src: local("Vazirmatn"), local("Tahoma"); }
:root {
  --bg:#f3f6fb; --card:#fff; --text:#182235; --muted:#64748b; --line:#e2e8f0;
  --accent:#2563eb; --accent2:#7c3aed; --ok:#11854d; --bad:#dc2626; --warn:#ca8a04;
  --shadow:0 16px 38px #0f172a14;
}
* { box-sizing: border-box; }
body { margin:0; background:radial-gradient(circle at top right,#e0edff 0,#f7f9fc 34%,var(--bg) 100%); color:var(--text); font-family: VazirmatnLocal, Tahoma, Arial, sans-serif; }
a { color:var(--accent); text-decoration:none; } a:hover { text-decoration:underline; }
.topbar { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:18px 32px; background:linear-gradient(135deg,#0f172a,#1e3a8a 60%,#312e81); color:white; box-shadow:0 8px 30px #0f172a3b; position:sticky; top:0; z-index:10; }
.brand { font-size:23px; font-weight:900; letter-spacing:-.3px; } .subbrand { color:#dbeafe; font-size:13px; margin-top:5px; }
.topbar nav { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.topbar nav a { color:white; padding:9px 12px; border-radius:999px; background:#ffffff12; border:1px solid #ffffff1a; }
.topbar nav a:hover { background:#fff2; text-decoration:none; }
.user-chip { color:#dbeafe; background:#ffffff18; border:1px solid #ffffff28; border-radius:999px; padding:8px 12px; direction:ltr; }
.container { width:min(1320px, calc(100% - 36px)); margin:24px auto 60px; }
.card { background:rgba(255,255,255,.94); border:1px solid var(--line); border-radius:22px; padding:22px; margin-bottom:20px; box-shadow:var(--shadow); backdrop-filter: blur(8px); }
.auth-shell { display:grid; grid-template-columns:1.1fr .9fr; gap:22px; align-items:stretch; margin:70px auto; max-width:980px; }
.hero-card { border-radius:28px; padding:42px; color:white; background:linear-gradient(135deg,#1e40af,#7c3aed); box-shadow:var(--shadow); }
.hero-card h1 { font-size:34px; margin:18px 0; } .hero-card p { line-height:2; color:#eef2ff; }
.hero-badge { display:inline-block; border:1px solid #ffffff54; border-radius:999px; padding:7px 14px; color:#e0e7ff; }
.login-card { margin:0; }
h1,h2 { margin:0 0 16px; } h1 { font-size:24px; } h2 { font-size:19px; }
.grid.two { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.grid.three { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.grid.four { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.form { display:flex; flex-direction:column; gap:10px; } .form.spaced { gap:12px; } .form.compact { gap:8px; }
input, button, select { font:inherit; border-radius:14px; border:1px solid #cbd5e1; padding:11px 13px; background:white; transition:.15s; }
input:focus { outline:none; border-color:#93c5fd; box-shadow:0 0 0 4px #bfdbfe66; }
input[type=file] { padding:9px; }
button { cursor:pointer; font-weight:800; }
button.primary, .primary-link { background:linear-gradient(135deg,var(--accent),var(--accent2)); color:white; border:0; border-radius:14px; padding:11px 17px; display:inline-block; box-shadow:0 8px 20px #2563eb30; }
button.secondary { background:#eef2ff; color:#3730a3; border-color:#c7d2fe; font-weight:800; }
.form-actions { margin-top:8px; }
.toolbar { display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.toolbar label { display:flex; gap:7px; align-items:center; color:var(--muted); background:#f8fafc; border:1px solid var(--line); border-radius:14px; padding:8px; }
.toolbar input[type=number] { width:78px; }
.checkline { display:flex; align-items:center; gap:8px; color:#475569; }
.advanced { background:#f8fafc; border:1px dashed #cbd5e1; border-radius:16px; padding:13px 16px; margin-bottom:14px; }
.advanced label { display:inline-flex; gap:6px; margin:10px 0 0 18px; color:#374151; }
.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:18px; background:white; }
table { width:100%; border-collapse:collapse; min-width:850px; }
th,td { padding:13px 15px; border-bottom:1px solid var(--line); text-align:right; vertical-align:middle; }
th { background:#f8fafc; font-size:13px; color:#475569; position:sticky; top:0; }
tr:hover td { background:#f9fbff; }
.empty { text-align:center; color:var(--muted); padding:28px; }
.kv { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:10px 0; border-bottom:1px solid var(--line); }
.kv span { color:var(--muted); } .kv code { direction:ltr; unicode-bidi:plaintext; font-size:12px; overflow-wrap:anywhere; }
.ok { color:var(--ok); } .bad { color:var(--bad); }
.muted,.hint { color:var(--muted); line-height:1.9; }
.alert { border-radius:16px; padding:13px 16px; margin-bottom:18px; border:1px solid; line-height:1.8; }
.alert.error { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.alert.warn { background:#fffbeb; border-color:#fde68a; color:#92400e; }
.alert.success { background:#ecfdf5; border-color:#bbf7d0; color:#166534; }
.action-alert a { font-weight:900; margin-inline-start:8px; }
.badge { display:inline-block; padding:6px 11px; border-radius:999px; font-size:12px; font-weight:900; background:#e5e7eb; color:#374151; }
.badge.queued { background:#fef3c7; color:#92400e; } .badge.running { background:#dbeafe; color:#1d4ed8; } .badge.done { background:#dcfce7; color:#166534; } .badge.failed { background:#fee2e2; color:#991b1b; }
.pill { display:inline-block; padding:7px 10px; border:1px solid #dbeafe; background:#eff6ff; border-radius:999px; margin:2px; font-size:12px; }
.pill.admin { background:#f5f3ff; border-color:#ddd6fe; color:#5b21b6; }
.status-line { display:flex; gap:14px; align-items:center; margin-bottom:12px; }
.progress { width:100%; background:#e5e7eb; border-radius:999px; overflow:hidden; height:14px; } .progress div { height:100%; background:linear-gradient(90deg,#2563eb,#7c3aed); transition:.3s; }
.mini-progress { display:inline-block; vertical-align:middle; width:110px; height:8px; border-radius:999px; background:#e5e7eb; overflow:hidden; margin-left:8px; }
.mini-progress div { height:100%; background:linear-gradient(90deg,#2563eb,#7c3aed); }
.mini-percent { color:var(--muted); font-size:12px; }
.downloads { display:flex; gap:10px; flex-wrap:wrap; } .downloads a { border:1px solid #dbeafe; border-radius:14px; padding:10px 13px; background:#eff6ff; font-weight:800; }
.downloads.vertical { flex-direction:column; }
.log { direction:ltr; text-align:left; white-space:pre-wrap; background:#0f172a; color:#d1e7ff; border-radius:18px; padding:16px; max-height:560px; overflow:auto; font-family:Consolas, monospace; font-size:12px; line-height:1.65; }
.ltrish { direction:ltr; unicode-bidi:plaintext; }
.file-name { font-weight:700; }
.stat-card { min-height:132px; display:flex; flex-direction:column; justify-content:space-between; }
.stat-card span { color:var(--muted); } .stat-card b { font-size:23px; } .stat-card small { color:#64748b; overflow-wrap:anywhere; }
.section-head { display:flex; justify-content:space-between; gap:18px; align-items:center; }
.key-status { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:18px 0; }
.key-box { border:1px solid #fecaca; background:#fef2f2; color:#991b1b; border-radius:18px; padding:15px; display:flex; flex-direction:column; gap:6px; }
.key-box.ready { border-color:#bbf7d0; background:#ecfdf5; color:#166534; }
.note { margin-top:18px; color:#64748b; line-height:1.9; background:#f8fafc; border:1px solid var(--line); border-radius:16px; padding:14px; }
.detail-hero { position:relative; overflow:hidden; }
.detail-hero:before { content:""; position:absolute; inset:auto -60px -120px auto; width:260px; height:260px; border-radius:50%; background:#dbeafe; z-index:0; }
.detail-hero > * { position:relative; z-index:1; }
.status-block { display:flex; justify-content:space-between; align-items:center; margin-bottom:13px; }
.status-block b { font-size:26px; color:#1e40af; }
.current-stage { margin-top:16px; display:flex; flex-direction:column; gap:6px; background:#f8fafc; border:1px solid var(--line); border-radius:16px; padding:14px; }
.current-stage span { color:var(--muted); line-height:1.7; }
.meta-grid { margin-top:16px; }
.timeline { position:relative; padding-right:8px; }
.timeline:before { content:""; position:absolute; top:6px; bottom:6px; right:15px; width:2px; background:#dbeafe; }
.timeline-item { position:relative; display:grid; grid-template-columns:30px 1fr; gap:10px; margin-bottom:14px; }
.timeline-item .dot { width:16px; height:16px; border-radius:50%; margin-top:7px; background:#93c5fd; border:3px solid white; box-shadow:0 0 0 2px #bfdbfe; z-index:1; }
.timeline-item.ok .dot { background:#22c55e; box-shadow:0 0 0 2px #bbf7d0; }
.timeline-item.warn .dot { background:#f59e0b; box-shadow:0 0 0 2px #fde68a; }
.timeline-item.error .dot { background:#ef4444; box-shadow:0 0 0 2px #fecaca; }
.timeline-body { background:#f8fafc; border:1px solid var(--line); border-radius:16px; padding:12px 14px; }
.timeline-top { display:flex; justify-content:space-between; gap:12px; }
.timeline-top span { color:#2563eb; font-weight:900; }
.timeline-body p { margin:7px 0; color:#475569; line-height:1.8; }
.timeline-body small { color:#94a3b8; direction:ltr; display:block; }
@media (max-width: 980px) { .grid.two,.grid.three,.grid.four,.auth-shell { grid-template-columns:1fr; } .topbar { flex-direction:column; align-items:flex-start; } .container { width:min(100% - 22px, 1320px); } }

/* v3 user-friendly workspace */
.page-hero { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:28px; margin-bottom:20px; border-radius:28px; background:linear-gradient(135deg,#eff6ff,#f5f3ff); border:1px solid #dbeafe; box-shadow:var(--shadow); }
.page-hero h1 { font-size:30px; margin:8px 0; }
.page-hero p { margin:0; color:#475569; line-height:2; max-width:850px; }
.eyebrow { display:inline-flex; align-items:center; gap:6px; color:#2563eb; background:#dbeafe; border:1px solid #bfdbfe; border-radius:999px; padding:5px 12px; font-size:12px; font-weight:900; direction:ltr; }
.breadcrumb { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:16px; }
.breadcrumb a { background:#f8fafc; border:1px solid var(--line); border-radius:999px; padding:7px 12px; font-weight:800; }
.breadcrumb span { color:#94a3b8; }
.filemanager-actions { display:grid; grid-template-columns:.9fr 1.4fr; gap:14px; align-items:center; }
.inline-form { display:flex; gap:10px; align-items:center; background:#f8fafc; border:1px solid var(--line); border-radius:18px; padding:12px; }
.inline-form.grow input[type=file] { flex:1; }
.inline-form input:not([type=file]) { flex:1; }
.small { font-size:13px; }
.file-table td:first-child { font-size:20px; width:58px; }
.wizard-head { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:4px 0 20px; }
.step { display:flex; align-items:center; gap:10px; border:1px solid var(--line); background:white; border-radius:20px; padding:15px; box-shadow:0 8px 22px #0f172a0c; }
.step b { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#e2e8f0; color:#334155; }
.step span { font-weight:900; color:#475569; }
.step.active { border-color:#93c5fd; background:linear-gradient(135deg,#eff6ff,#eef2ff); }
.step.active b { background:linear-gradient(135deg,#2563eb,#7c3aed); color:white; }
.step.active span { color:#1e40af; }
.step.done { border-color:#bbf7d0; background:#f0fdf4; }
.step.done b { background:#22c55e; color:white; }
.step.done span { color:#166534; }
.sticky-actions { position:sticky; top:92px; z-index:3; background:#ffffffd9; backdrop-filter:blur(8px); padding:12px; border:1px solid var(--line); border-radius:18px; }
.slim-table { max-height:420px; overflow:auto; }
.engine-card { min-height:300px; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; }
.engine-icon { width:72px; height:72px; display:grid; place-items:center; font-size:38px; border-radius:24px; background:linear-gradient(135deg,#dbeafe,#ede9fe); margin-bottom:18px; }
.selected-engine { border-color:#bfdbfe; background:linear-gradient(135deg,#ffffff,#eff6ff); }
.selected-list { display:flex; flex-direction:column; gap:10px; max-height:360px; overflow:auto; }
.selected-list div { display:flex; justify-content:space-between; gap:14px; align-items:center; border:1px solid var(--line); background:#f8fafc; border-radius:15px; padding:11px 13px; }
.selected-list b { color:#64748b; font-size:12px; white-space:nowrap; }
.compact-list { max-height:520px; margin-top:14px; }
.form-actions-row { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.big-submit { font-size:17px; padding:14px 22px !important; }
.live-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:18px; }
.live-summary div { border:1px solid var(--line); border-radius:18px; background:#f8fafc; padding:16px; display:flex; flex-direction:column; gap:6px; }
.live-summary b { font-size:24px; color:#1e40af; }
.live-summary span { color:#64748b; }
@media (max-width: 980px) { .page-hero,.form-actions-row { flex-direction:column; align-items:stretch; } .filemanager-actions,.wizard-head,.live-summary { grid-template-columns:1fr; } .sticky-actions { position:static; } }
