@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root{
  --ink:#12181f;
  --slate:#1f2a36;
  --slate-2:#2c3a49;
  --paper:#eef1f4;
  --card:#ffffff;
  --hazard:#ffb703;
  --hazard-dark:#e09400;
  --ok:#1b8a5a;
  --danger:#c0392b;
  --line:#d9dee3;
  --muted:#5b6773;
  --radius:10px;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:'Vazirmatn', system-ui, sans-serif;
  background:var(--paper);
  color:var(--ink);
  direction:rtl;
  min-height:100vh;
  line-height:1.9;
}

a{color:inherit;}

.topbar{
  background:var(--slate);
  color:#fff;
  padding:14px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:4px solid var(--hazard);
}
.topbar .brand{
  font-weight:700;
  font-size:17px;
  display:flex;
  align-items:center;
  gap:10px;
}
.topbar .brand .dot{
  width:10px;height:10px;border-radius:50%;background:var(--hazard);
  display:inline-block;
}
.topbar .who{
  font-size:13px;
  color:#cbd5df;
  display:flex;
  gap:14px;
  align-items:center;
}
.topbar a.logout{
  background:rgba(255,255,255,.08);
  padding:6px 14px;
  border-radius:6px;
  font-size:13px;
  text-decoration:none;
  border:1px solid rgba(255,255,255,.2);
}
.topbar a.logout:hover{background:rgba(255,255,255,.16);}

.wrap{
  max-width:1080px;
  margin:0 auto;
  padding:26px 18px 60px;
}
.wrap.narrow{max-width:640px;}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px;
  margin-bottom:18px;
}
.card h2, .card h3{margin-top:0;}

.hazard-strip{
  height:6px;
  background:repeating-linear-gradient(135deg, var(--hazard) 0 14px, var(--ink) 14px 28px);
  border-radius:6px;
  margin-bottom:20px;
}

h1{font-size:22px;margin:0;}
h2{font-size:19px;}
h3{font-size:16px;color:var(--slate-2);}

label{
  display:block;
  font-size:13.5px;
  color:var(--muted);
  margin:14px 0 6px;
  font-weight:600;
}
input[type=text], input[type=tel], input[type=number], input[type=password], select, textarea{
  width:100%;
  padding:11px 12px;
  border:1.5px solid var(--line);
  border-radius:8px;
  font-family:inherit;
  font-size:14.5px;
  background:#fbfcfd;
  color:var(--ink);
}
input:focus, select:focus, textarea:focus{
  outline:2px solid var(--hazard);
  outline-offset:1px;
  border-color:var(--hazard-dark);
}

.btn{
  display:inline-block;
  padding:11px 22px;
  border-radius:8px;
  border:none;
  font-family:inherit;
  font-size:14.5px;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  text-align:center;
}
.btn-primary{background:var(--hazard); color:var(--ink);}
.btn-primary:hover{background:var(--hazard-dark);}
.btn-dark{background:var(--slate); color:#fff;}
.btn-dark:hover{background:var(--slate-2);}
.btn-ok{background:var(--ok); color:#fff;}
.btn-danger{background:var(--danger); color:#fff;}
.btn:disabled{background:#c7ccd1; color:#777; cursor:not-allowed;}
.btn-block{width:100%;}
.btn-sm{padding:7px 14px; font-size:13px;}

.badge{
  display:inline-block;
  padding:3px 10px;
  border-radius:20px;
  font-size:12px;
  font-weight:700;
}
.badge-wait{background:#fff3cd; color:#8a6400;}
.badge-in{background:#d9f2e6; color:#166a45;}
.badge-out{background:#e4e7ea; color:#454f58;}
.badge-reject{background:#fbdede; color:#9c2a20;}

table{width:100%; border-collapse:collapse; font-size:14px;}
th,td{padding:10px 8px; border-bottom:1px solid var(--line); text-align:right;}
th{color:var(--muted); font-size:12.5px; font-weight:700;}

.stat-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px; margin-bottom:20px;}
.stat{background:var(--slate); color:#fff; border-radius:var(--radius); padding:18px; text-align:center;}
.stat .num{font-size:30px; font-weight:800; color:var(--hazard);}
.stat .lbl{font-size:12.5px; color:#c9d3dc; margin-top:4px;}

.notice{padding:12px 14px; border-radius:8px; font-size:13.5px; margin-bottom:14px;}
.notice-warn{background:#fff3cd; color:#7a5b00; border:1px solid #ffe08a;}
.notice-err{background:#fbdede; color:#7d1e15; border:1px solid #f3b8b0;}
.notice-ok{background:#d9f2e6; color:#0f5c39; border:1px solid #a9e0c4;}

.progress{display:flex; gap:6px; margin-bottom:22px;}
.progress span{flex:1; height:6px; border-radius:4px; background:var(--line);}
.progress span.done{background:var(--hazard);}

.sig-pad-wrap{
  border:2px dashed var(--line);
  border-radius:8px;
  background:#fff;
  touch-action:none;
}
#sigPad{display:block; width:100%; height:160px; cursor:crosshair;}

.muted{color:var(--muted); font-size:13px;}
.center{text-align:center;}
.flex-between{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap;}
.small{font-size:12.5px;}
hr{border:none; border-top:1px solid var(--line); margin:18px 0;}

.login-box{max-width:380px; margin:8vh auto;}
.login-box .hazard-strip{margin-bottom:26px;}

@media (max-width:640px){
  .wrap{padding:16px 12px 40px;}
  .card{padding:16px;}
}
