/* GEC CMS — admin panel styles (RTL) */
@font-face { font-family: 'Vazirmatn'; src: url('/assets/fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/assets/fonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/assets/fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --navy: #0b1f3a; --navy2: #0e2a4f; --side: #0d1b30;
  --accent: #f5a623; --blue: #2f6fed;
  --ink: #1c2b3a; --muted: #5c6b7c; --bg: #f1f4f9;
  --card: #fff; --line: #e3e9f2;
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --info: #2f6fed;
  --radius: 14px; --shadow: 0 8px 24px rgba(11,31,58,.07);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Vazirmatn', Tahoma, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.8; font-size: 15px; }
a { color: var(--blue); text-decoration: none; }
code { background: #eef2f8; border-radius: 6px; padding: 2px 8px; font-size: 13px; }

/* ---------- login ---------- */
.login-body { background: radial-gradient(900px 500px at 80% -10%, #1b4a8f44 0%, transparent 60%), linear-gradient(135deg, #0b1f3a, #12345e); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-wrap { width: 100%; max-width: 420px; }
.login-card { background: #fff; border-radius: 20px; padding: 36px 32px; box-shadow: 0 24px 60px rgba(0,0,0,.35); text-align: center; }
.login-card img { margin-bottom: 10px; }
.login-card h1 { font-size: 21px; color: var(--navy); margin: 0 0 4px; }
.login-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }
.login-card label { display: block; text-align: right; font-weight: 700; font-size: 13.5px; color: var(--navy); margin-bottom: 16px; }
.login-card input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 15px; margin-top: 6px; }
.login-card input:focus { outline: none; border-color: var(--blue); }
.btn-block { width: 100%; }
.back { display: block; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.back:hover { color: var(--blue); }

/* ---------- buttons / badges ---------- */
.btn { display: inline-block; padding: 10px 20px; border-radius: 10px; font-family: inherit; font-size: 14px; font-weight: 700; border: 1.5px solid transparent; cursor: pointer; transition: .18s; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-accent { background: var(--accent); color: #3a2a05; }
.btn-accent:hover { filter: brightness(1.06); }
.btn-line { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: #fee2e2; color: var(--bad); }
.btn-danger:hover { background: #fecaca; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #fef3c7; color: var(--warn); }
.badge.bad { background: #fee2e2; color: var(--bad); }
.badge.info { background: #dbeafe; color: var(--info); }
.badge.muted { background: #eef1f6; color: var(--muted); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--side); color: #b9c7dd; padding: 20px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.side-brand strong { color: #fff; font-size: 16px; display: block; }
.side-brand small { font-size: 11.5px; color: #7e93b4; }
.side nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.side nav a { display: flex; align-items: center; gap: 10px; color: #b9c7dd; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: var(--blue); color: #fff; font-weight: 700; }
.side nav a .pill { background: var(--accent); color: #3a2a05; border-radius: 99px; font-size: 11px; padding: 1px 8px; margin-inline-start: auto; font-weight: 800; }
.side-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.side-foot a { color: #b9c7dd; font-size: 13px; padding: 4px 10px; }
.side-foot a:hover { color: #fff; }
.side-foot a.danger { color: #f87171; }
.main { display: flex; flex-direction: column; }
.top { background: #fff; border-bottom: 1px solid var(--line); padding: 16px 26px; display: flex; align-items: center; justify-content: space-between; }
.top-title { font-size: 19px; color: var(--navy); margin: 0; }
.top-user { text-align: left; }
.top-user span { display: block; font-weight: 700; font-size: 14px; color: var(--navy); }
.top-user small { color: var(--muted); font-size: 12px; }
.content { padding: 24px 26px; flex: 1; }
.foot { padding: 12px 26px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); background: #fff; }
.alert { border-radius: 12px; padding: 12px 18px; margin: 16px 26px 0; font-size: 14px; font-weight: 500; }
.alert.ok { background: #dcfce7; color: #14532d; }
.alert.warn { background: #fef3c7; color: #7c2d12; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card h3 { color: var(--navy); margin: 0 0 12px; font-size: 16.5px; }
.card-head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head-row h2 { font-size: 17px; color: var(--navy); margin: 0; }
.two-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.stats-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; box-shadow: var(--shadow); }
.stat-card strong { display: block; font-size: 20px; color: var(--navy); font-weight: 800; }
.stat-card span { font-size: 12px; color: var(--muted); }
.stat-card.ok strong { color: var(--ok); } .stat-card.warn strong { color: var(--warn); } .stat-card.info strong { color: var(--info); }
.tick-list { margin: 8px 0 0; padding: 0 18px 0 0; list-style: none; }
.tick-list li { position: relative; padding-right: 20px; margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.tick-list li::before { content: '✓'; position: absolute; right: 0; color: var(--ok); font-weight: 800; }
.log-list { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.log-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.log-list .ts { color: var(--blue); font-weight: 600; margin-left: 8px; }

/* ---------- roadmap ---------- */
.phase-items { list-style: none; margin: 8px 0 0; padding: 0; }
.phase-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.phase-item:last-child { border-bottom: 0; }
.phase-item.is-done .pi-txt strong { text-decoration: line-through; color: var(--muted); }
.pi-txt { flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pi-txt strong { font-weight: 600; font-size: 14.5px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.checkbox { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #cbd5e1; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: transparent; transition: .15s; }
.checkbox:hover { border-color: var(--ok); }
.checkbox.checked { background: var(--ok); border-color: var(--ok); color: #fff; }
.sel-mini { border: 1.5px solid var(--line); border-radius: 8px; padding: 4px 8px; font-family: inherit; font-size: 12.5px; background: #fff; color: var(--ink); }
.audit-form { margin-inline-start: auto; }
.phase-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.phase-head h3 { margin: 0; }
.phase-desc { color: var(--muted); font-size: 13.5px; margin: 6px 0 4px; }
.team summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: 14px; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.team-role { background: #f6f8fc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.team-role strong { font-size: 13px; color: var(--navy); }
.team-role span { font-size: 11.5px; color: var(--muted); }
.intro p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

/* ---------- laws ---------- */
.law-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.law-card { position: relative; padding-top: 26px; }
.law-first { border: 2px solid var(--accent); background: #fffdf5; }
.law-num { position: absolute; top: -14px; right: 20px; background: var(--navy); color: #fff; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.law-card p { color: var(--muted); font-size: 13.5px; margin: 8px 0 12px; }

/* ---------- tables & forms ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; text-align: right; vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 600; background: #f8fafd; white-space: nowrap; }
.tbl tr.unread { background: #f0f6ff; }
.ops { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.empty { text-align: center; color: var(--muted); padding: 26px !important; }
.clip { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-wide { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrap { white-space: nowrap; }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.form-card input, .form-card textarea, .form-card select { width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 14px; margin-top: 6px; background: #fff; color: var(--ink); }
.form-card input:focus, .form-card textarea:focus { outline: none; border-color: var(--blue); }
.form-card label { display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); margin-bottom: 13px; }
label.chk { display: flex; align-items: center; gap: 8px; }
label.chk input { width: auto; margin: 0; }
.frm-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.frm-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.spec-row { margin-bottom: 8px; }
.spec-row input { margin-top: 0; }
.frm-actions { display: flex; gap: 10px; margin-top: 16px; }
.confirm-form { display: inline; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .two-cards, .law-grid, .team-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .frm-3 { grid-template-columns: 1fr; }
  .tbl { display: block; overflow-x: auto; }
}
