/* Tibox Tracking — clean minimal theme */
:root {
  --bg: #f7f8fa; --card: #ffffff; --ink: #1a1d21; --muted: #6b7280;
  --line: #e5e7eb; --accent: #0f766e; --accent-d: #0b5f59;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --info: #1d4ed8;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif; font-size: 15px; }
[dir="rtl"] body, [lang="fa"] body { font-family: Tahoma, -apple-system, 'Segoe UI', Arial, sans-serif; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--card);
  border-bottom: 1px solid var(--line); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px; }
.topbar h1 { font-size: 17px; margin: 0; flex: 1; }
.topbar .logo { font-weight: 800; color: var(--accent); letter-spacing: .5px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card h2, .card h3 { margin: 0 0 12px; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; background: #fff; color: var(--ink); font-family: inherit; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
button, .btn { display: inline-block; border: 0; border-radius: 10px; padding: 12px 18px;
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
  background: var(--accent); color: #fff; text-decoration: none; text-align: center; }
button:hover, .btn:hover { background: var(--accent-d); }
button:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: #eef2f2; color: var(--ink); }
.btn-ghost:hover { background: #e2e8e8; }
.btn-danger { background: var(--bad); }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-big { width: 100%; padding: 16px; font-size: 17px; margin-top: 10px; }
.iconbtn { background: #eef2f2; color: var(--ink); border-radius: 10px; padding: 8px 12px;
  font-size: 14px; font-weight: 600; border: 0; cursor: pointer; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #f3f6f6; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.b-created { background: #e0e7ff; color: #3730a3; } .b-assigned { background: #fef3c7; color: #92400e; }
.b-offered { background: #ccfbf1; color: #0f766e; }
.b-picked_up { background: #dbeafe; color: #1e40af; } .b-in_transit { background: #ffedd5; color: #9a3412; }
.b-delivered { background: #dcfce7; color: #166534; } .b-cancelled { background: #fee2e2; color: #991b1b; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 26px 18px 0; font-size: 14px; }
[dir="ltr"] .timeline li { padding: 0 0 18px 26px; }
.timeline li::before { content: ''; position: absolute; top: 6px; inset-inline-start: 6px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ''; position: absolute; top: 20px; bottom: 0; inset-inline-start: 10px;
  width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .tt { font-weight: 700; } .timeline .tm { color: var(--muted); font-size: 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.gallery figure { margin: 0; } .gallery figcaption { font-size: 12px; color: var(--muted); padding: 4px 2px; }
#map { height: 320px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.login-card { max-width: 380px; margin: 8vh auto; }
.center { text-align: center; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 18px; text-align: center; text-decoration: none; color: var(--ink); }
.hero-card:hover { border-color: var(--accent); }
.hero-card .ic { font-size: 34px; } .hero-card h3 { margin: 10px 0 6px; }
.sigpad { border: 2px dashed var(--line); border-radius: 10px; width: 100%; height: 180px;
  touch-action: none; background: #fff; }
.photobox { border: 2px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; }
.photobox img { max-width: 100%; max-height: 220px; border-radius: 8px; }
input[type="file"] { padding: 8px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button { flex: 1; }
.tabs button.on { background: var(--ink); }
.toast { position: fixed; bottom: 20px; inset-inline: 20px; background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: 10px; text-align: center; display: none; z-index: 99; }
.gpsdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
@media (max-width: 640px) {
  .wrap { padding: 12px; }
  table { font-size: 13px; }
  .hide-sm { display: none; }
}
@media print {
  .topbar, .noprint { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}
.statgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.stat{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:12px;text-align:center}
.stat .sv{font-size:20px;font-weight:700;color:var(--ink)}
.stat .sl{font-size:12px;color:var(--muted);margin-top:4px}
.moneylist{list-style:none;margin:8px 0;padding:0}
.moneylist li{padding:8px 4px;border-bottom:1px dashed var(--line);font-size:14px;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
h4{margin:10px 0 4px;font-size:15px}
