:root {
  --navy: #1f4e78;
  --navy-dark: #163955;
  --green: #2e7d32;
  --red: #c00000;
  --amber-bg: #fce4d6;
  --grey-bg: #f4f6f8;
  --border: #dfe3e8;
  --text: #1c2733;
}
* { box-sizing: border-box; }
body {
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  direction: rtl;
  text-align: right;
  background: var(--grey-bg);
  color: var(--text);
  margin: 0;
}
.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: #fff; text-decoration: none; margin-inline-start: 18px; font-size: 14px; }
.topbar a:hover { text-decoration: underline; }
.brand { font-weight: bold; font-size: 18px; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; color: var(--navy); margin: 0 0 12px; }
label { display: block; font-size: 13px; margin: 12px 0 4px; font-weight: bold; }
input, select, button {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 100%;
}
input[type=checkbox] { width: auto; }
button, .btn {
  background: var(--navy);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 6px;
  margin-top: 16px;
  display: inline-block;
  text-decoration: none;
  font-weight: bold;
}
button:hover, .btn:hover { background: var(--navy-dark); }
.btn-secondary { background: #6b7280; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: right; }
th { background: var(--navy); color: #fff; }
tr:nth-child(even) { background: #fafbfc; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-official { background: #e2efda; color: var(--green); }
.tag-estimated { background: var(--amber-bg); color: var(--red); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kpi { display: flex; gap: 16px; flex-wrap: wrap; }
.kpi .box { flex: 1; min-width: 160px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
.kpi .box .num { font-size: 22px; font-weight: bold; color: var(--navy); }
.kpi .box .lbl { font-size: 12px; color: #667; margin-top: 4px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs a { padding: 8px 16px; border-radius: 6px 6px 0 0; text-decoration: none; color: var(--navy); border: 1px solid var(--border); border-bottom: none; }
.tabs a.active { background: var(--navy); color: #fff; }
.note { font-size: 12px; color: #667; background: var(--grey-bg); padding: 10px 12px; border-radius: 6px; margin-top: 8px; }
.note.warn { background: var(--amber-bg); color: var(--red); }
.error-box { background: #fdecea; color: var(--red); padding: 12px; border-radius: 6px; margin-bottom: 12px; }
footer { text-align: center; font-size: 12px; color: #99a; padding: 24px; }

.badge-red { background: var(--red); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; margin-inline-start: 4px; }
.sla-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.sla-green { background: #2e7d32; }
.sla-yellow { background: #e0a800; }
.sla-red { background: var(--red); }
.sla-done { background: #9aa5b1; }
.sla-row-red { background: #fdecea !important; }
.sla-row-yellow { background: #fff8e1 !important; }
.status-pill { display:inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; background: var(--grey-bg); border:1px solid var(--border); }
.kpi-mini { display:flex; gap:12px; margin-bottom:16px; }
.kpi-mini .box { flex:1; text-align:center; padding:14px; border-radius:8px; color:#fff; }
.kpi-mini .box.green { background: #2e7d32; }
.kpi-mini .box.yellow { background: #b8860b; }
.kpi-mini .box.red { background: var(--red); }
.kpi-mini .box .num { font-size: 22px; font-weight:bold; }
