:root {
  --ink: #0e0e12;
  --paper: #f6f4ef;
  --card: #ffffff;
  --muted: #6b7280;
  --border: #e2e0d9;
  --accent: #2563eb;
  --accent2: #10b981;
  --accent3: #7c3aed;
  --danger: #dc2626;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "DM Sans", sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
}
body.rtl {
  direction: rtl;
  font-family: "Noto Naskh Arabic", "DM Sans", sans-serif;
}
a { color: inherit; text-decoration: none; }
.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 28px 32px;
}
.wrap::before {
  content: "";
  position: fixed;
  inset: 56px auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent2), var(--accent3));
  opacity: 0.35;
}
.topbar {
  background: var(--ink);
  color: #fff;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar .brand {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  letter-spacing: -0.3px;
  font-size: 16px;
}
.lang-switcher { display: flex; gap: 6px; }
.lang-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn.active,
.lang-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.crumbs {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 16px;
}
.crumbs a { color: var(--accent); font-weight: 600; }
.hero-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
}
.hero-card h1 {
  font-family: "Syne", sans-serif;
  font-size: 34px;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.hero-card p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 900px;
}
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 10px;
  background: #dbeafe;
  color: #1d4ed8;
}
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; margin-top: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.22s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(37,99,235,0.45), rgba(16,185,129,0.4));
}
.card h3 {
  font-family: "Syne", sans-serif;
  font-size: 16px;
  margin-bottom: 10px;
}
.card p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.kpi {
  font-family: "Syne", sans-serif;
  font-size: 30px;
  color: var(--accent);
  letter-spacing: -0.6px;
}
.list { margin-top: 10px; padding-left: 18px; color: #374151; }
.list li { margin-bottom: 6px; line-height: 1.5; font-size: 13px; }
.table-wrap {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  margin-top: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
th {
  background: #f8fafc;
  font-size: 11px;
  text-transform: uppercase;
  color: #4b5563;
  letter-spacing: 0.4px;
}
.status {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
}
.status.done { background: #dcfce7; color: #166534; }
.status.draft { background: #fef9c3; color: #854d0e; }
.status.todo { background: #e5e7eb; color: #374151; }
.footer-note { margin: 20px 0 8px; color: var(--muted); font-size: 11px; }
.section-title {
  font-family: "Syne", sans-serif;
  font-size: 18px;
  margin: 16px 0 8px;
  letter-spacing: -0.4px;
}
main .grid-2 + .grid-2,
main .grid-3 + .grid-3,
main .grid-4 + .grid-4 { margin-top: 18px; }
@media (max-width: 720px) {
  .hero-card h1 { font-size: 28px; }
  .topbar { flex-wrap: wrap; }
}
