/* حساب‌یار — استایل سبک، RTL، بدون وابستگی خارجی */
:root{
  --bg:#f6f7f9; --surface:#ffffff; --ink:#16233a; --muted:#6b7a90;
  --line:#e3e8ef; --brand:#0f6b5c; --brand-weak:#e6f2ef;
  --gold:#a97b1e; --ok:#1f7a45; --err:#b3261e;
  --radius:14px; --shadow:0 1px 2px rgba(16,35,58,.06),0 6px 20px rgba(16,35,58,.05);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"Vazirmatn","IRANSans","Segoe UI",Tahoma,sans-serif;
  background:var(--bg); color:var(--ink); line-height:1.75; font-size:15px;
}
a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{margin:0 0 .5em; line-height:1.45}
.muted{color:var(--muted)}

/* نوار بالا */
.topbar{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  padding:12px 18px; background:var(--surface);
  border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20;
}
.brand{display:flex; align-items:center; gap:9px; font-weight:800; font-size:17px; color:var(--ink)}
.brand:hover{text-decoration:none}
.brand-mark{
  display:grid; place-items:center; width:32px; height:32px; border-radius:10px;
  background:var(--brand); color:#fff; font-size:17px; font-weight:800;
}
.nav{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-inline-start:auto; font-size:14px}
.nav .cta{background:var(--brand); color:#fff; padding:6px 13px; border-radius:9px}
.nav .cta:hover{text-decoration:none; opacity:.92}
.who{color:var(--muted); font-size:13px}

/* محتوا */
.wrap{max-width:1000px; margin:0 auto; padding:22px 16px 56px}
.hero{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:26px 22px; box-shadow:var(--shadow); margin-bottom:18px;
}
.hero h1{font-size:23px}
.hero p{color:var(--muted); margin:0 0 16px}
.hero-actions{display:flex; gap:10px; flex-wrap:wrap}

.btn{
  display:inline-block; padding:9px 17px; border-radius:10px; border:1px solid var(--line);
  background:var(--surface); color:var(--ink); cursor:pointer; font:inherit; font-size:14px;
}
.btn:hover{text-decoration:none; background:#f0f3f7}
.btn.primary{background:var(--brand); border-color:var(--brand); color:#fff}
.btn.primary:hover{opacity:.92; background:var(--brand)}
.btn.danger{background:var(--err); border-color:var(--err); color:#fff}

/* آمار */
.stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; margin-bottom:18px}
.stat{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:14px; text-align:center; box-shadow:var(--shadow);
}
.stat b{display:block; font-size:24px; color:var(--brand)}
.stat span{color:var(--muted); font-size:13px}

/* فیلتر */
.filters{
  display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:12px; box-shadow:var(--shadow);
}
.filters select,.filters input{
  padding:8px 11px; border:1px solid var(--line); border-radius:9px;
  font:inherit; font-size:14px; background:var(--surface); color:var(--ink); min-width:160px;
}

/* کارت پروژه */
.cards{display:grid; gap:12px}
.card{
  display:block; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); color:var(--ink);
}
.card:hover{text-decoration:none; border-color:#c8d5e4; transform:translateY(-1px); transition:.14s}
.card-top{display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:8px}
.tag{background:var(--brand-weak); color:var(--brand); padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600}
.chip{background:#f1f4f8; color:var(--muted); padding:3px 10px; border-radius:999px; font-size:12px}
.card h3{font-size:16px; margin:0 0 6px}
.card .desc{color:var(--muted); font-size:13.5px; margin:0 0 10px}
.card .meta{display:flex; gap:14px; flex-wrap:wrap; font-size:12.5px; color:var(--muted)}
.card .meta .ai{color:var(--gold); font-weight:600}

/* هشدار */
.alert{padding:11px 14px; border-radius:11px; margin-bottom:14px; font-size:14px; border:1px solid transparent}
.alert.ok{background:#e8f5ec; color:var(--ok); border-color:#bfe2cb}
.alert.err{background:#fdecea; color:var(--err); border-color:#f5c6c2}

/* فرم */
.form-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow)}
.field{margin-bottom:14px}
.field label{display:block; font-size:13.5px; margin-bottom:6px; font-weight:600}
.field input,.field textarea,.field select{
  width:100%; padding:9px 12px; border:1px solid var(--line); border-radius:10px;
  font:inherit; font-size:14px; background:var(--surface); color:var(--ink);
}
.field textarea{min-height:120px; resize:vertical}
.field .hint{font-size:12.5px; color:var(--muted); margin-top:4px}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
@media(max-width:640px){.grid2{grid-template-columns:1fr}}

/* جدول */
.table{width:100%; border-collapse:collapse; background:var(--surface); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); font-size:13.5px}
.table th,.table td{padding:10px 12px; text-align:right; border-bottom:1px solid var(--line)}
.table th{background:#f2f5f9; font-weight:700; font-size:13px; color:var(--muted)}
.table tr:last-child td{border-bottom:0}

/* وضعیت */
.badge{padding:2px 9px; border-radius:999px; font-size:12px; font-weight:600; white-space:nowrap}
.badge.open{background:#e8f5ec; color:var(--ok)}
.badge.in_progress{background:#eaf1fb; color:#1c5fa8}
.badge.delivered{background:#fdf3e3; color:var(--gold)}
.badge.completed{background:#eef0f3; color:#4a5666}
.badge.cancelled{background:#fdecea; color:var(--err)}
.badge.draft{background:#f1f4f8; color:var(--muted)}

.empty{background:var(--surface); border:1px dashed var(--line); border-radius:var(--radius); padding:34px; text-align:center; color:var(--muted)}
.foot{max-width:1000px; margin:0 auto; padding:16px; border-top:1px solid var(--line); display:flex; gap:12px; justify-content:space-between; flex-wrap:wrap; font-size:12.5px; color:var(--muted)}

/* چت دستیار */
.chat{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px}
.chat-log{max-height:340px; overflow-y:auto; display:flex; flex-direction:column; gap:9px; margin-bottom:12px}
.bubble{padding:9px 13px; border-radius:12px; font-size:14px; max-width:88%}
.bubble.user{background:var(--brand-weak); align-self:flex-start}
.bubble.bot{background:#f2f5f9; align-self:flex-end}
