/* Ghalamchi calls — "soft plum & blush" theme.
   Headings: Mikhak (OFL), body: Vazirmatn (OFL). No external resources. */
@font-face{font-family:Vazirmatn;src:url(fonts/Vazirmatn-Regular.ttf);font-weight:400}
@font-face{font-family:Vazirmatn;src:url(fonts/Vazirmatn-Medium.ttf);font-weight:500}
@font-face{font-family:Vazirmatn;src:url(fonts/Vazirmatn-Bold.ttf);font-weight:700}
@font-face{font-family:Mikhak;src:url(fonts/Mikhak-FD-SemiBold.woff2);font-weight:600}
@font-face{font-family:Mikhak;src:url(fonts/Mikhak-FD-Bold.woff2);font-weight:700}

:root{
  --bg:#FBF6F1; --surface:#FFFDFB; --line:#F0E4DD; --line2:#F6EEE9;
  --plum:#4A2C47; --plum-2:#6B4A66; --text:#3B2537; --soft:#7C6577; --muted:#A8949F;
  --rose:#B9848C; --rose-d:#9A5F6A; --blush:#F6E4E2; --blush-2:#FBEFEC;
  --lav:#A996C8; --lav-bg:#EFE9F7; --lav-d:#6A5592;
  --sage:#6F9A7E; --sage-bg:#E6F0E8; --terra:#C48A52; --terra-bg:#F8ECDF; --berry:#B0506A; --berry-bg:#F8E3E8;
  --r:22px; --r-s:14px;
  --shadow:0 1px 0 rgba(74,44,71,.04), 0 10px 28px -18px rgba(74,44,71,.28);
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;font-family:Vazirmatn,Tahoma,sans-serif;color:var(--text);font-size:18px;line-height:1.7;direction:rtl;
  background:radial-gradient(1200px 300px at 85% -60px,#F7E7E4 0,rgba(247,231,228,0) 70%) no-repeat,var(--bg)}
.wrap{max-width:1120px;margin:0 auto;padding:34px 28px 56px}
h1,h2,.n,.code{font-family:Mikhak,Vazirmatn,sans-serif}
h1{font-size:34px;font-weight:700;margin:0;color:var(--plum);line-height:1.35;letter-spacing:-.2px}
h2{font-size:22px;font-weight:600;margin:0 0 18px;color:var(--plum);display:flex;align-items:center;justify-content:space-between;gap:12px}
a{color:inherit}
.hidden{display:none!important}

/* header */
.top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:26px}
.brand{display:flex;align-items:center;gap:10px;color:var(--rose-d);font-size:14px;font-weight:500;letter-spacing:.3px;margin-bottom:6px}
.brand img{width:96px;height:32px;transform:scaleX(-1)}
.sub{color:var(--soft);font-size:16px;margin-top:4px}
.nav{display:flex;gap:6px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:5px;box-shadow:var(--shadow)}
.nav a,.nav button{font:inherit;font-size:15px;font-weight:500;color:var(--plum-2);background:none;border:0;border-radius:999px;padding:5px 16px;text-decoration:none;cursor:pointer}
.nav a:hover,.nav button:hover{background:var(--blush-2)}
.nav a.on{background:var(--plum);color:#fff}
.nav .who-am-i{color:var(--muted);font-size:14px;padding:0 10px;border-inline-start:1px solid var(--line)}

/* stat cards */
.cards{display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:18px;margin-bottom:26px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:22px 26px 20px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.card .n{font-size:50px;font-weight:700;line-height:1.15}
.card .l{color:var(--soft);font-size:16px;font-weight:500}
.card.hero{background:linear-gradient(160deg,#FFF9F7 0,#F9E9E6 100%)}
.card.hero::after{content:"";position:absolute;inset:auto auto -6px -10px;width:132px;height:44px;background:url(sprig.svg) no-repeat;opacity:.55}
.green{color:var(--sage)}.red{color:var(--berry)}.orange{color:var(--terra)}

/* panels & tables */
section{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:24px 26px;margin-bottom:22px;box-shadow:var(--shadow)}
table{width:100%;border-collapse:collapse}
th{font-weight:500;color:var(--muted);font-size:14px;text-align:right;padding:6px 12px 10px;border-bottom:1px solid var(--line)}
td{padding:13px 12px;border-bottom:1px solid var(--line2);vertical-align:middle}
tr:last-child td{border-bottom:0}
tbody tr:hover td{background:#FFF8F5}
td b,td a b{font-weight:500}
td a{text-decoration:none;border-bottom:1px dashed var(--rose)}
td a:hover{color:var(--rose-d)}
.bar{display:flex;align-items:center;gap:14px}
.bar .t{flex:1;height:10px;background:var(--line2);border-radius:999px;overflow:hidden}
.bar .f{height:100%;border-radius:999px}
.bar b{width:52px;font-weight:700}
.tag{border-radius:999px;padding:1px 12px;font-size:14px;font-weight:500;white-space:nowrap}
.tag.v{background:var(--lav-bg);color:var(--lav-d)}.tag.s{background:var(--blush);color:var(--rose-d)}
.who{color:var(--muted);font-size:15px}
.days{font-weight:700}
.days.red{color:var(--berry)}
.pill-none{background:var(--berry-bg);color:var(--berry);border-radius:999px;padding:1px 12px;font-size:14px;font-weight:500}

/* forms */
select,input[type=text],input[type=password],input[type=tel],input[type=file]{font:inherit;font-size:16px;color:var(--text);padding:8px 14px;border:1px solid var(--line);border-radius:12px;background:#fff}
input[type=text],input[type=password],input[type=tel]{width:100%}
input:focus,select:focus{outline:2px solid var(--blush);border-color:var(--rose)}
select{padding-inline-end:30px}
.filters{display:flex;gap:8px;font-weight:400}
.form{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 18px}
.form label{font-size:14px;font-weight:500;color:var(--soft);display:block;margin-bottom:4px}
.btn{font:inherit;font-size:15px;font-weight:500;background:var(--plum);color:#fff;border:0;border-radius:12px;padding:8px 18px;cursor:pointer;white-space:nowrap;text-decoration:none;display:inline-block}
.btn:hover{background:var(--plum-2)}
.btn.light{background:var(--blush-2);color:var(--plum-2);border:1px solid var(--line)}
.btn.light:hover{background:var(--blush)}
.btn.red{background:#fff;color:var(--berry);border:1px solid #EFD3DA}
.btn:disabled{opacity:.5}
.row-actions{display:flex;gap:8px;justify-content:flex-end;align-items:center;flex-wrap:wrap}
.toggle{display:inline-flex;border-radius:999px;padding:3px;background:var(--line2);gap:2px}
.toggle button{font:inherit;font-size:14px;font-weight:500;border:0;background:none;padding:2px 14px;border-radius:999px;cursor:pointer;color:var(--soft)}
.toggle button.on.s{background:#fff;color:var(--rose-d);box-shadow:0 1px 3px rgba(74,44,71,.15)}
.toggle button.on.v{background:var(--lav-d);color:#fff}
.small{font-size:15px}
.small .mask,.small .muted{white-space:nowrap}
.err{color:var(--berry);font-size:15px}
.okmsg{color:var(--sage);font-weight:500}
.msg{margin-top:10px;font-size:15px}
.muted{color:var(--muted)}
tr.bad td{background:#FDF3F5}
.scroll{max-height:540px;overflow:auto;margin:0 -8px;padding:0 8px}
.scroll thead th{position:sticky;top:0;background:var(--surface);z-index:1}
.subpanel{margin-top:16px;background:var(--blush-2);border:1px solid var(--line);border-radius:var(--r-s);padding:16px 18px}
.code{font-size:28px;font-weight:700;letter-spacing:5px;direction:ltr;display:inline-block;background:var(--sage-bg);color:#4E7A5E;border-radius:12px;padding:2px 18px;margin:0 6px}

/* student page */
.back{color:var(--rose-d);text-decoration:none;font-size:15px;font-weight:500}
.nums{display:flex;gap:12px;flex-wrap:wrap}
.num{display:flex;align-items:center}
button.call{font:inherit;font-size:14px;font-weight:500;color:var(--plum);background:#fff;border:1px solid #E9D3D3;border-radius:999px;padding:3px 12px 3px 14px;margin-inline-start:14px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
button.call:hover{background:var(--blush)}
button.call:disabled{opacity:.5}
.callwrap{display:inline-flex;align-items:center;gap:6px;margin-inline-start:10px;vertical-align:middle}
button.callmenu{width:28px;height:28px;border-radius:50%;border:1px solid #E9D3D3;background:var(--blush-2);display:inline-grid;place-items:center;cursor:pointer;padding:0}
button.callmenu:hover{background:var(--blush)}
.callopts{display:inline-flex;gap:4px}
.callopts.hidden{display:none}
.callopts button.call{margin:0;font-size:13px;padding:2px 10px}
.num{background:var(--blush-2);border:1px solid var(--line);border-radius:var(--r-s);padding:10px 18px;font-size:18px}
.num span{color:var(--soft);margin-inline-end:10px;font-size:15px}
.mask{direction:ltr;unicode-bidi:isolate;letter-spacing:.5px}
.lock{font-size:14px;color:var(--muted);margin-top:12px;display:flex;align-items:center;gap:6px}
.lock svg{width:14px;height:14px;flex:none}
.status-ok{color:var(--sage);font-weight:500}.status-bad{color:var(--berry);font-weight:500}

/* empty states */
.empty{text-align:center;padding:26px 10px 14px;color:var(--soft)}
.empty img{width:120px;height:40px;display:block;margin:0 auto 8px;opacity:.9}
.empty b{display:block;font-family:Mikhak,Vazirmatn;color:var(--plum);font-size:19px;font-weight:600}

/* login */
.login{max-width:430px;margin:70px auto 0;padding:34px 34px 28px}
.login h1{font-size:30px}
.login .sub{margin-bottom:20px}
.login label{font-size:14px;font-weight:500;color:var(--soft)}
.login input{margin:4px 0 16px}
.login .btn{width:100%;padding:11px;font-size:17px}
.login .brand{justify-content:flex-start}
.foot{text-align:center;color:var(--muted);font-size:13px;margin-top:18px}
.sub .dot{display:inline-block;width:4px;height:4px;border-radius:50%;background:var(--rose);margin:0 10px 3px;vertical-align:middle}
.is-counselor .col-c{display:none}
.nowrap td{white-space:nowrap}
.nowrap td.small{white-space:normal}

/* unanswered attempts: informational, soft and distinct from short (orange) calls */
.attempt{display:inline-block;margin-top:3px;padding:1px 9px;border-radius:999px;background:#F1E9F0;color:#7A5874;border:1px dashed #CDB3C8;font-size:12.5px;white-space:nowrap}
tr.row-attempt td{color:#8C7A88}

/* quick notes */
.ntag{display:inline-block;border-radius:999px;padding:1px 11px;font-size:13px;font-weight:500;white-space:nowrap}
.ntag.good{background:#E6F1EA;color:#4F7D5F}.ntag.drop{background:#F8E5E9;color:#A2445C}
.ntag.meet{background:#EFE6F4;color:#6E4F86}.ntag.other{background:#F1ECE7;color:#7A6A5E}
.notes{display:flex;flex-direction:column;gap:10px}
.note{display:flex;gap:16px;align-items:baseline;padding:10px 0;border-bottom:1px solid var(--line)}
.note:last-child{border-bottom:0}.note .when{color:var(--soft);font-size:14px;min-width:130px}
.ntext{margin-right:10px}
.backup{line-height:2}
.printonly{display:none}
@media print{
  body{background:#fff}.nav,.noprint,.back{display:none!important}.printonly{display:block}
  section,.card{box-shadow:none;break-inside:avoid}.wrap{max-width:none;padding:0}
  .card.hero::after{display:none}
}
.nonote{display:inline-block;background:#FFF1E3;color:#A0632E;border:1px dashed #E3B98F;border-radius:999px;padding:0 10px;font-size:13px;font-weight:500;white-space:nowrap}
/* call targets */
.target{display:inline-block;border-radius:999px;padding:0 10px;font-size:13px;font-weight:500;white-space:nowrap;background:#F1ECE7;color:#7A6A5E}
.target.t-student{background:#EFE6F4;color:#6E4F86}.target.t-parents{background:#E8EEF3;color:#4F6A86}
.target.t-both{background:#F8E5E9;color:#A2445C}.target.t-none{background:#F3F1EF;color:#A8949F;text-decoration:line-through}
.missing{color:var(--berry);font-size:13px;font-weight:500;white-space:nowrap}
.nonum{color:#A0632E;font-size:13px;white-space:nowrap}
.bonus{display:inline-block;background:linear-gradient(135deg,#FFF4D6,#F9E2B8);color:#8A5A12;border:1px solid #EBCF97;border-radius:999px;padding:0 10px;font-size:13px;font-weight:600;white-space:nowrap;vertical-align:middle}
h1 .bonus{font-size:14px}
.tsel{margin:0 8px;padding:2px 8px;font-size:14px}
.bulkbar{position:sticky;bottom:12px;z-index:5;display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:var(--plum);color:#fff;border-radius:16px;padding:12px 18px;box-shadow:0 8px 24px rgba(74,44,71,.25);margin-top:10px}
.bulkbar .btn{background:#fff;color:var(--plum)}.bulkbar .btn:hover{background:var(--blush)}.bulkbar .btn.ghost{background:transparent;color:#F1DDE2;border:1px solid #8B6A86}
.bulkbar b{margin-inline-end:8px}
td.ck,th.ck{width:34px;text-align:center}td.ck input,th.ck input{width:18px;height:18px;accent-color:var(--plum)}
tr.sel td{background:#FBF0F2}
/* v5: urgent follow-ups */
.urgent{border:1.5px solid #E7A9B6;background:linear-gradient(180deg,#FFF3F5,#FFFDFB)}
.urgent h2{color:var(--berry);display:flex;align-items:center;gap:10px}
.ubadge{display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 8px;border-radius:999px;background:var(--berry);color:#fff;font-size:15px;font-weight:700;box-shadow:0 4px 12px -4px rgba(176,80,106,.6)}
.ulist{display:grid;gap:10px}
.uitem{display:grid;grid-template-columns:minmax(180px,1fr) 2fr auto;gap:12px;align-items:center;background:#fff;border:1px solid #F3D3DA;border-radius:14px;padding:10px 14px}
.uitem .ntext{margin-inline-start:8px;color:var(--text)}
.btn.small{padding:6px 14px;font-size:14px}
.urgent-pill{display:inline-block;background:var(--berry);color:#fff;border-radius:999px;padding:0 10px;font-size:12.5px;font-weight:600;white-space:nowrap;vertical-align:middle;animation:pulse 2.4s ease-in-out infinite}
@keyframes pulse{50%{box-shadow:0 0 0 5px rgba(176,80,106,.15)}}
h1 .urgent-pill{font-size:14px}
.urgent-box{display:flex;justify-content:space-between;align-items:center;gap:14px;background:#FFF1F4;border:1.5px solid #E7A9B6;border-radius:16px;padding:14px 18px;margin:-8px 0 22px;color:var(--berry)}
.urgent-box .ntext{color:var(--text);margin-inline-start:6px}
tr.urow td{background:#FFF6F8}
.act{display:inline-block;border-radius:999px;padding:0 10px;font-size:13px;white-space:nowrap;background:var(--lav-bg);color:var(--lav-d)}
.act.a-reassign{background:var(--terra-bg);color:#93602F}.act.a-followup{background:var(--berry-bg);color:var(--berry)}
.bulkbar select{margin:0;padding:6px 10px;border-radius:12px;min-width:170px}
.bulkbar .sep{width:1px;height:26px;background:#8B6A86;margin:0 6px}
/* ranking */
.seg{display:inline-flex;background:var(--blush-2);border:1px solid var(--line);border-radius:999px;padding:4px;margin-bottom:22px}
.seg button{border:0;background:transparent;padding:8px 20px;border-radius:999px;font:inherit;color:var(--soft);cursor:pointer}
.seg button.on{background:var(--plum);color:#fff;box-shadow:0 6px 14px -8px rgba(74,44,71,.7)}
.podium{display:flex;justify-content:center;align-items:flex-end;gap:18px;margin:6px 0 26px;flex-wrap:wrap}
.pod{width:190px;text-align:center;background:var(--surface);border:1px solid var(--line);border-radius:22px 22px 14px 14px;padding:16px 12px 0;box-shadow:var(--shadow);position:relative}
.pod .crown{font-size:22px;color:#D9A5B3;height:26px}.pod.p1 .crown{color:#C9A046;font-size:28px}
.pod .medal{width:46px;height:46px;font-size:20px;margin:4px auto 8px}
.pod .pname{font-weight:700;color:var(--plum);font-size:16px}.pod .pmin{color:var(--soft);margin:4px 0 12px}.pod .pmin b{font-size:22px;color:var(--plum)}
.pod .pbase{border-radius:0 0 14px 14px;margin:0 -12px;height:26px}
.pod.p1{width:210px}.pod.p1 .pbase{height:64px;background:linear-gradient(180deg,#F6DDE4,#EAC2CE)}
.pod.p2 .pbase{height:40px;background:linear-gradient(180deg,#EFE9F7,#DCD2EE)}.pod.p3 .pbase{height:22px;background:linear-gradient(180deg,#F8ECDF,#EFD9C2)}
.pod.me{outline:2px solid var(--rose);outline-offset:3px}
.medal{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;font-weight:700;background:var(--line2);color:var(--soft)}
.medal.m1{background:radial-gradient(circle at 35% 30%,#FFF1C9,#E0B860);color:#6B4A12;box-shadow:0 0 0 3px #F7E7BE}
.medal.m2{background:radial-gradient(circle at 35% 30%,#FFFFFF,#C9C2D6);color:#4E4366;box-shadow:0 0 0 3px #ECE8F3}
.medal.m3{background:radial-gradient(circle at 35% 30%,#FCE3D2,#D49A78);color:#6A3B22;box-shadow:0 0 0 3px #F6E1D4}
table.rank tr.top1 td{background:#FFF9EC}table.rank tr.top2 td{background:#FAF8FD}table.rank tr.top3 td{background:#FFF6F0}
tr.me td{box-shadow:inset 0 0 0 9999px rgba(217,165,179,.14)}
.you{display:inline-block;background:var(--rose);color:#fff;border-radius:999px;padding:0 8px;font-size:12px}
/* charts */
.legend{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.legend .lg{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:6px 14px;font:inherit;color:var(--text);cursor:pointer}
.legend .lg i{width:12px;height:12px;border-radius:50%}.legend .lg.off{opacity:.4;text-decoration:line-through}
.charts{display:grid;grid-template-columns:repeat(auto-fit,minmax(420px,1fr));gap:18px}
.chart{margin:0}.chart h2{font-size:17px}
svg.lc{width:100%;height:auto;display:block}
svg.lc .grid{stroke:#F0E4DD;stroke-width:1}svg.lc .ylab,svg.lc .xlab{font-family:Vazirmatn,Tahoma,sans-serif;font-size:12px;fill:#A8949F}
@media print{.urgent .btn,.ures{display:none}}
.top{flex-wrap:wrap;gap:14px}
.nav{flex-wrap:wrap}
.nav a,.nav button{white-space:nowrap;padding:5px 12px;font-size:14.5px}
.nav .who-am-i{white-space:nowrap}

.applink{font-size:12px;color:#B0506A!important;border:1px dashed #D9A5B3;border-radius:12px;padding:2px 10px!important;text-decoration:none;white-space:nowrap}
.foot .applink{display:inline-block;margin-bottom:6px;font-size:13px}
