@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

/* ═══ پایه ═══ */
:root {
  --bg:#F7F7F5; --card:#FFFFFF;
  --ink:#1F1F1E; --ink-soft:#71716C; --ink-mute:#9C9C96;
  --rose:#1E8449; --rose-soft:#E9F5EE; --rose-lite:#F4FAF6; --rose-deep:#166139;
  --gold:#B8952F; --gold-soft:#FBF5E4;
  --sage:#5A5A57; --sage-soft:#F0F0ED;
  --line:#E7E6E1;
  --r:10px; --r2:14px;
  --ease:cubic-bezier(.2,.7,.3,1);
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body {
  margin:0; background:var(--bg); color:var(--ink);
  font-family:'Vazirmatn',system-ui,Tahoma,sans-serif;
  font-size:15px; line-height:1.65; -webkit-font-smoothing:antialiased;
}
a { color:inherit; }
img { max-width:100%; height:auto; }

.page { max-width:680px; margin:0 auto; padding:0 14px 40px; }

/* ═══ نوار بالا ═══ */
.navbar {
  position:sticky; top:0; z-index:40; display:flex; align-items:center; gap:10px;
  background:var(--card); border-bottom:1px solid var(--line);
  padding:10px 14px; margin:0 -14px 16px;
}
.navtog {
  width:36px; height:36px; flex-shrink:0; border:1px solid var(--line);
  background:var(--card); border-radius:var(--r); font-size:17px; line-height:1;
  color:var(--ink); cursor:pointer; font-family:inherit; padding:0;
}
.navtog:active { background:var(--sage-soft); }
.navlogo { display:flex; align-items:center; gap:7px; text-decoration:none; min-width:0; }
.navlogo img { width:26px; height:26px; border-radius:8px; flex-shrink:0; }
.navlogo span { font-size:14px; font-weight:700; white-space:nowrap; }
.navwho { margin-right:auto; font-size:12px; color:var(--ink-soft);
          white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.navout .btn { padding:6px 12px; font-size:12px; }
@media (max-width:560px){ .navlogo span { display:none; } .navout { display:none; } }

/* ═══ کشو ═══ */
.navback { position:fixed; inset:0; background:rgba(20,20,18,.4); z-index:48;
           opacity:0; pointer-events:none; transition:opacity .18s; }
.navback.open { opacity:1; pointer-events:auto; }
.navdraw {
  position:fixed; top:0; right:0; bottom:0; width:258px; max-width:80vw;
  background:var(--card); z-index:49; transform:translateX(100%);
  transition:transform .22s var(--ease); overflow-y:auto; padding:14px 10px 24px;
}
.navdraw.open { transform:translateX(0); }
.navhead { display:flex; align-items:center; gap:10px; padding:6px 8px 14px;
           border-bottom:1px solid var(--line); margin-bottom:8px; }
.navhead .avb { width:38px; height:38px; border-radius:12px; flex-shrink:0;
                background:var(--rose); color:#fff; display:grid; place-items:center;
                font-size:16px; font-weight:700; }
.navhead b { display:block; font-size:14px; }
.navhead span { font-size:12px; color:var(--rose); }
.navdraw a { display:flex; align-items:center; gap:10px; padding:11px 10px;
             border-radius:var(--r); text-decoration:none; font-size:14px; }
.navdraw a:active { background:var(--sage-soft); }
.navdraw a.on { background:var(--rose-soft); color:var(--rose); font-weight:700; }
.navdraw .di { width:19px; height:19px; flex-shrink:0; opacity:.62; }
.navdraw a.on .di { opacity:1; }
.navdraw .di svg { width:100%; height:100%; display:block; }
.navdrawout { margin-top:14px; padding:0 8px; }

/* ═══ سرصفحه ═══ */
.topbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap;
          margin-bottom:16px; }
.topbar h1 { font-size:19px; font-weight:800; margin:0; letter-spacing:-.02em; }
.topbar .actions { display:flex; gap:8px; flex-wrap:wrap; }
.link-accent { color:var(--rose); text-decoration:none; font-size:13px; font-weight:600; }
.back-link { display:inline-block; margin-bottom:12px; color:var(--ink-soft);
             text-decoration:none; font-size:13px; }
h3.sec, h3.section { font-size:15px; font-weight:700; margin:22px 0 10px;
                     letter-spacing:-.01em; }
h3.sec .cnt, h3.section .cnt { font-size:12px; font-weight:400;
                               color:var(--ink-soft); margin-right:6px; }

/* ═══ دکمه ═══ */
.btn {
  display:inline-block; padding:9px 16px; border-radius:var(--r);
  border:1px solid var(--line); background:var(--card); color:var(--ink);
  font-family:inherit; font-size:13.5px; font-weight:500; cursor:pointer;
  text-decoration:none; text-align:center; line-height:1.5;
  transition:background .15s var(--ease), border-color .15s var(--ease);
}
.btn:active { background:var(--sage-soft); }
.btn-primary { background:var(--rose); color:#fff; border-color:var(--rose); }
.btn-primary:active { background:var(--rose-deep); }
.btn-primary:disabled, .btn-primary[disabled] {
  background:#C9CFCA; border-color:#C9CFCA; cursor:not-allowed; }
.btn-sm { padding:7px 13px; font-size:12.5px; }

/* ═══ کارت ═══ */
.card, .kc, .box {
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--r2); padding:14px;
}
.card, .box { margin-bottom:12px; }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
         gap:8px; margin-bottom:16px; }
.kc .l { font-size:12px; color:var(--ink-soft); margin-bottom:4px; }
.kc .v { font-size:19px; font-weight:800; letter-spacing:-.025em;
         font-variant-numeric:tabular-nums; }
.kc .s { font-size:11.5px; color:var(--ink-mute); margin-top:2px; }
.kc.green { background:var(--rose-soft); border-color:#CFE7D9; }
.kc.green .l, .kc.green .v { color:var(--rose-deep); }
.kc.gold { background:var(--gold-soft); border-color:#EDE0BC; }
.kc.gold .l, .kc.gold .v { color:#7C6216; }

/* ═══ بنر ═══ */
.hero-band, .hcard {
  background:var(--rose); border-radius:var(--r2); padding:16px 16px 18px;
  color:#fff; margin-bottom:12px;
}
.hero-band .cap, .hcard .cap { font-size:12.5px; opacity:.85; }
.hero-band .big, .hcard .big { font-size:26px; font-weight:800; letter-spacing:-.03em;
                               line-height:1.25; font-variant-numeric:tabular-nums; }
.hero-band .big small, .hcard .big small { font-size:12px; font-weight:400;
                                           opacity:.8; margin-right:4px; }
.hero-band .row { display:flex; gap:20px; flex-wrap:wrap; margin-top:14px;
                  padding-top:12px; border-top:1px solid rgba(255,255,255,.2); }
.hero-band .row div { min-width:88px; }
.hero-band .row span { display:block; font-size:11.5px; opacity:.8; }
.hero-band .row b { font-size:15px; font-weight:700;
                    font-variant-numeric:tabular-nums; }

/* ═══ ردیف لیست ═══ */
.bk, .it, .fk, .lead {
  display:block; background:var(--card); border:1px solid var(--line);
  border-radius:var(--r2); padding:12px 14px; margin-bottom:8px;
  text-decoration:none; color:inherit;
}
.bk:active, .it:active { background:var(--rose-lite); }
.bk .top, .it .top, .fk .top { display:flex; align-items:baseline; gap:7px;
                               flex-wrap:wrap; }
.bk .who, .it .who, .fk .who { font-size:14.5px; font-weight:700; }
.bk .amt, .fk .amt { margin-right:auto; font-size:14px; font-weight:700;
                     color:var(--rose); font-variant-numeric:tabular-nums; }
.bk .sub, .it .sub, .fk .sub { font-size:12.5px; color:var(--ink-soft);
                               line-height:1.8; margin-top:5px; }
.bk .acts, .it .acts, .fk .acts { display:flex; gap:6px; flex-wrap:wrap;
                                  align-items:center; margin-top:10px; }

/* ═══ برچسب ═══ */
.tag { font-size:11px; padding:2px 8px; border-radius:99px; white-space:nowrap;
       background:var(--sage-soft); color:var(--ink-soft); }
.tag.on   { background:var(--rose-soft); color:var(--rose); }
.tag.gold { background:var(--gold-soft); color:#7C6216; }
.tag.gray { background:var(--sage-soft); color:var(--ink-mute); }

/* ═══ مسیر پیشرفت ═══ */
.flow { display:flex; gap:5px; flex-wrap:wrap; margin-top:9px; }
.step { font-size:11px; padding:3px 9px; border-radius:99px;
        border:1px solid var(--line); color:var(--ink-mute); }
.step.done { background:var(--rose-soft); border-color:#CFE7D9; color:var(--rose); }

/* ═══ نوار درصد ═══ */
.bar { height:6px; background:var(--sage-soft); border-radius:99px;
       overflow:hidden; min-width:50px; }
.bar > span, .bar i { display:block; height:100%; background:var(--rose);
                      border-radius:99px; }

/* ═══ فرم ═══ */
.field, .fld { margin-bottom:14px; }
.field label, .fld label { display:block; font-size:12.5px; color:var(--ink-soft);
                           margin-bottom:5px; }
input[type=text], input[type=number], input[type=password], input[type=date],
select, textarea, .srch {
  width:100%; padding:10px 12px; border:1px solid var(--line);
  border-radius:var(--r); font-family:inherit; font-size:14.5px;
  background:var(--card); color:var(--ink);
  font-variant-numeric:tabular-nums;
}
input:focus, select:focus, textarea:focus, .srch:focus {
  outline:none; border-color:var(--rose);
}
.srch { margin-bottom:12px; }
.filter-form, .filt, .bar-f {
  display:flex; gap:8px; flex-wrap:wrap; align-items:flex-end;
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--r2); padding:12px; margin-bottom:14px;
}
.filter-form label, .filt label, .filt > div > label {
  font-size:12px; color:var(--ink-soft); display:block; margin-bottom:4px; }
.filter-form input, .filter-form select, .filt input, .filt select {
  width:auto; min-width:78px; padding:8px 10px; font-size:13.5px; }
.filter-form button { padding:9px 16px; border-radius:var(--r); border:none;
  background:var(--rose); color:#fff; font-family:inherit; font-size:13.5px; }
.row3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; }

/* ═══ جدول ═══ */
.tw { overflow-x:auto; -webkit-overflow-scrolling:touch; margin-bottom:14px; }
table.data {
  width:100%; border-collapse:collapse; background:var(--card);
  border:1px solid var(--line); border-radius:var(--r2); overflow:hidden;
  font-size:13px; font-variant-numeric:tabular-nums;
}
table.data th, table.data td { padding:9px 10px; text-align:right;
                               white-space:nowrap; }
table.data th { background:var(--rose-soft); color:var(--rose-deep);
                font-weight:700; font-size:11.5px; }
table.data tr:not(:last-child) td { border-bottom:1px solid var(--line); }
table.data td.num, table.data th.num { text-align:left; }
.empty-row { text-align:center; color:var(--ink-mute); padding:22px 12px;
             font-size:13.5px; white-space:normal; }
p.empty-row { background:var(--card); border:1px dashed var(--line);
              border-radius:var(--r2); }

/* ═══ پیام ═══ */
.msg, .success-banner {
  background:var(--rose-soft); color:var(--rose-deep); border:1px solid #CFE7D9;
  border-radius:var(--r); padding:11px 13px; margin-bottom:14px; font-size:13.5px;
}
.warn { background:#FDF2E7; color:#96551E; border:1px solid #F0DCC4;
        border-radius:var(--r); padding:11px 13px; margin-bottom:14px;
        font-size:13.5px; line-height:1.8; }

/* ═══ کاشی و پوشه ═══ */
.report-list a.report-card, .tile, .fc {
  display:block; background:var(--card); border:1px solid var(--line);
  border-radius:var(--r2); padding:14px; margin-bottom:8px;
  text-decoration:none; color:inherit;
}
.report-list a.report-card:active, .tile:active, .fc:active {
  background:var(--rose-lite); }
.tile .t, .fc .t { font-size:14.5px; font-weight:700; }
.tile .d { font-size:12.5px; color:var(--ink-soft); line-height:1.75; margin-top:4px; }
.fold { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.fc { text-align:center; margin:0; }
.fc .ic { font-size:22px; display:block; margin-bottom:6px; }
.fc .n { font-size:24px; font-weight:800; color:var(--rose);
         font-variant-numeric:tabular-nums; margin-top:4px; }
.fc .z { font-size:11.5px; color:var(--ink-mute); }

/* ═══ ورود ═══ */
.login-wrap { display:flex; align-items:center; justify-content:center;
              min-height:100vh; padding:20px; }
.login-box { background:var(--card); border:1px solid var(--line);
             border-radius:18px; padding:28px 22px; width:100%; max-width:340px; }
.login-box .lmark { width:52px; height:52px; border-radius:16px; display:block;
                    margin:0 auto 12px; object-fit:cover; }
.login-box h1 { font-size:17px; font-weight:800; margin:0 0 4px; text-align:center; }
.login-box .sub { text-align:center; font-size:12.5px; color:var(--ink-soft);
                  margin:0 0 20px; }
.login-box input { margin-bottom:10px; }
.login-box button { width:100%; padding:12px; background:var(--rose); color:#fff;
                    border:none; border-radius:var(--r); font-family:inherit;
                    font-weight:700; font-size:15px; cursor:pointer; }
.login-error { background:#FCEBEB; color:#9E3535; padding:10px 12px;
               border-radius:var(--r); margin-bottom:12px; font-size:13px;
               text-align:center; }
.login-foot { text-align:center; font-size:11.5px; color:var(--ink-mute);
              margin-top:16px; line-height:1.8; }

/* ═══ برند ═══ */
.brand-strip { display:flex; align-items:center; gap:9px; padding:10px 0 12px;
               border-bottom:1px solid var(--line); margin-bottom:14px; }
.brand-strip .mark { width:32px; height:32px; border-radius:10px; flex-shrink:0; }
.brand-strip .name { font-size:13px; color:var(--ink-soft); font-weight:600; }

.hide { display:none !important; }

/* ── کلاس‌هایی که صفحه‌ها به آن‌ها تکیه دارند ── */
.success-banner { background:var(--rose-soft); color:var(--rose-deep);
  border:1px solid #CFE7D9; border-radius:var(--r); padding:11px 13px;
  margin-bottom:14px; font-size:13.5px; }

.report-list { display:block; }
.report-list a.report-card { display:block; background:var(--card);
  border:1px solid var(--line); border-radius:var(--r2); padding:14px;
  margin-bottom:8px; text-decoration:none; color:inherit; }
.report-list a.report-card:active { background:var(--rose-lite); }
.report-list .icon, .tile .icon, .icon { font-size:19px; margin-left:7px; }

.hero { background:var(--rose); color:#fff; border-radius:var(--r2);
  padding:16px; margin-bottom:14px; }
.hero .cap, .hero .l { font-size:12.5px; opacity:.85; }
.hero .big, .hero .v { font-size:25px; font-weight:800; letter-spacing:-.03em;
  font-variant-numeric:tabular-nums; }

.chips { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.chip { background:var(--sage-soft); color:var(--ink-soft); font-size:12px;
  padding:4px 10px; border-radius:99px; white-space:nowrap; }
.chip b { color:var(--ink); font-weight:700; }

.links { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.links a { color:var(--rose); text-decoration:none; font-size:13px; font-weight:600; }

.cta { display:flex; gap:8px; flex-wrap:wrap; }
.note, .muted { color:var(--ink-soft); font-size:12.5px; line-height:1.85; }
.note-box { background:var(--sage-soft); border-radius:var(--r);
  padding:11px 13px; margin-bottom:14px; font-size:13px;
  color:var(--ink-soft); line-height:1.9; }

/* صفحهٔ تأیید صندوق */
.calc { background:var(--sage-soft); border-radius:var(--r);
  padding:11px 13px; margin-top:12px; }
.calc div { display:flex; justify-content:space-between; padding:4px 0; font-size:13.5px; }
.calc b { font-variant-numeric:tabular-nums; font-weight:800; }
.calc .net { border-top:1px solid var(--line); margin-top:5px; padding-top:8px;
  color:var(--rose); }
.locked { background:var(--sage-soft); border:1px solid var(--line);
  border-radius:var(--r); padding:9px 11px; display:flex;
  align-items:baseline; gap:8px; }
.locked b { font-size:15px; font-weight:800; font-variant-numeric:tabular-nums; }
.locked span { font-size:11.5px; color:var(--ink-soft); }

/* ردیف‌های ویرایشی پنل ادمین */
.row { display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--r2); padding:11px 13px; margin-bottom:7px; }
.row.off { opacity:.55; }
.row.hide { display:none; }
.row .nm { flex:1; min-width:120px; }
.row .nm b { display:block; font-size:14px; }
.row .nm span, .row .un { font-size:11.5px; color:var(--ink-soft); }
.row .pr, .row .hrs { display:flex; align-items:center; gap:5px; }
.row .pr input, .row .hrs input { width:100px; padding:7px 8px; font-size:13px; }
.row .pr span, .row .hrs span { font-size:11.5px; color:var(--ink-soft); }
.row .act { display:flex; align-items:center; gap:5px; font-size:12.5px;
  color:var(--ink-soft); white-space:nowrap; }
.savebar { position:sticky; bottom:0; background:var(--bg);
  padding:12px 0; border-top:1px solid var(--line); margin-top:10px; }

/* راهنمای قالب پیامک در ثبت لید */
.fmt-box { background:var(--card); border:1px solid var(--line);
  border-radius:var(--r2); padding:13px; margin-bottom:14px; }
.fmt-title { font-size:14px; font-weight:700; margin-bottom:8px; }
.fmt-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.fmt-table td { padding:5px 7px; border-bottom:1px solid var(--line); }
.fmt-notes { font-size:12px; color:var(--ink-soft); line-height:1.85; margin-top:8px; }
.fmt-dl { color:var(--rose); text-decoration:none; font-size:13px; font-weight:600; }
.fmt-confirm { font-size:12.5px; color:var(--ink-soft); margin-top:8px; }
