/* الکترو شبکه — نمونه تست کلادفلر — ظاهر ساده و روشن */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Tahoma, "Segoe UI", system-ui, sans-serif;
  background: #f1f5f9; color: #0f172a; min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.wrap { max-width: 880px; margin: 0 auto; padding: 16px; }

/* ---------- ورود ---------- */
.auth-card {
  max-width: 420px; margin: 48px auto; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 16px; padding: 28px 24px; box-shadow: 0 8px 30px rgba(15,23,42,.06);
}
.auth-card img.logo { width: 84px; height: 84px; object-fit: contain; display: block; margin: 0 auto 8px; }
.auth-card h1 { font-size: 20px; text-align: center; margin: 4px 0 2px; }
.auth-card p.sub { text-align: center; color: #64748b; font-size: 13px; margin: 0 0 18px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #334155; margin-bottom: 5px; }
.field input {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px;
  font-size: 14px; background: #fff;
}
.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: 10px 18px;
  background: #2563eb; color: #fff; font-size: 14px;
}
.btn:hover { background: #1d4ed8; }
.btn.block { width: 100%; }
.btn.ghost { background: #e2e8f0; color: #1e293b; }
.btn.ghost:hover { background: #cbd5e1; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.auth-links { display: flex; gap: 14px; justify-content: center; margin-top: 14px; font-size: 13px; }
.auth-links a { color: #2563eb; text-decoration: none; cursor: pointer; }
.msg { border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; display: none; }
.msg.err { background: #fef2f2; color: #b91c1c; display: block; }
.msg.ok { background: #f0fdf4; color: #15803d; display: block; }

/* ---------- پوسته ---------- */
.topbar {
  background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 20;
}
.topbar-in { max-width: 880px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.topbar img.logo { width: 38px; height: 38px; object-fit: contain; }
.topbar .title { font-weight: bold; font-size: 16px; }
.topbar .spacer { flex: 1; }
.chip {
  font-size: 12px; border-radius: 999px; padding: 4px 10px; background: #f0fdf4; color: #15803d;
  border: 1px solid #bbf7d0; white-space: nowrap;
}
.chip.off { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.bell { position: relative; background: none; border: 0; font-size: 21px; padding: 4px; }
.bell .badge {
  position: absolute; top: -2px; left: -4px; background: #dc2626; color: #fff;
  font-size: 11px; min-width: 18px; height: 18px; border-radius: 999px; line-height: 18px; text-align: center;
}
.userbox { font-size: 13px; color: #334155; white-space: nowrap; }

.card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; margin-bottom: 16px;
}
.card h2 { font-size: 15px; margin: 0 0 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row input { flex: 1; min-width: 140px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 14px; }
.list { display: grid; gap: 8px; margin-top: 12px; }
.item {
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; font-size: 14px;
  display: flex; align-items: center; gap: 8px; cursor: pointer; background: #fff;
}
.item:hover { border-color: #93c5fd; }
.item.sel { border-color: #2563eb; background: #eff6ff; }
.item .grow { flex: 1; }
.item .muted { color: #64748b; font-size: 12px; }
.pend {
  font-size: 11px; background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa;
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
table.items { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.items th, table.items td { border: 1px solid #e2e8f0; padding: 7px 8px; font-size: 13px; text-align: right; }
table.items th { background: #f8fafc; }
table.items input { width: 100%; border: 0; font-size: 13px; padding: 2px; background: transparent; }
.total-line { font-size: 14px; margin-top: 10px; }
.events-panel {
  display: none; position: absolute; top: 58px; left: 12px; width: min(360px, 92vw);
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15,23,42,.14); padding: 12px; z-index: 30;
}
.events-panel.open { display: block; }
.events-panel h3 { margin: 2px 0 10px; font-size: 14px; }
.event { border-top: 1px solid #f1f5f9; padding: 8px 2px; font-size: 13px; }
.event:first-of-type { border-top: 0; }
.event .when { color: #94a3b8; font-size: 11px; }
.empty { color: #94a3b8; font-size: 13px; text-align: center; padding: 14px 0; }
