/* =========================================================
   In-house project showcases — Masarif, Kitchen, Talent Match
   ========================================================= */

/* ---------- shared card chrome ---------- */
.proj-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  padding: clamp(24px, 3vw, 40px);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.proj-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(1200px 400px at 100% 0%, color-mix(in oklch, var(--proj-accent, #7c3aed) 14%, transparent), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.proj-card[data-accent="violet"] { --proj-accent: #7c3aed; }
.proj-card[data-accent="indigo"] { --proj-accent: #6366f1; }
.proj-card[data-accent="purple"] { --proj-accent: #9333ea; }
.proj-card > * { position: relative; z-index: 1; }

.proj-card__head { max-width: 780px; margin-bottom: clamp(20px, 3vw, 32px); }
.proj-card__tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--fg-muted);
  padding-bottom: 18px;
}
.proj-card__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--proj-accent);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--proj-accent) 30%, transparent);
  animation: pulse 2.4s infinite;
}
.proj-card__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 600; letter-spacing: -0.01em; line-height: 1.15;
  margin: 0 0 12px;
}
html[dir="rtl"] .proj-card__title { letter-spacing: 0; line-height: 1.3; }
.proj-card__lede { color: var(--fg-muted); font-size: 15px; line-height: 1.7; margin: 0 0 20px; max-width: 68ch; }
.proj-card__flow {
  list-style: none; padding: 0;
  margin: 0 0 18px;
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  color: var(--fg-muted); font-size: 13px;
}
.proj-card__flow li { display: inline-flex; align-items: center; gap: 8px; }
.proj-card__flow .mono {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 10px; color: var(--proj-accent);
}
.proj-card__stack { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-card__stack .chip {
  font-size: 11px; padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklch, var(--bg) 50%, transparent);
  color: var(--fg-muted);
}

/* ---------- shared dashboard shell ---------- */
.proj-dash {
  border-radius: 12px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.4;
}

/* =========================================================
   1. MASARIF DASHBOARD (dark)
   ========================================================= */
.proj-dash--masarif {
  background: #0b1118;
  color: #e6ecf1;
  border: 1px solid #1b2430;
}
.pd-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
}
.pd-bar__logo { display: inline-flex; align-items: baseline; gap: 8px; }
.pd-bar__ar {
  font-family: var(--font-ar, "Tajawal", system-ui);
  color: #4aa8ff; font-weight: 800; font-size: 22px;
}
.pd-bar__en { color: #fff; font-weight: 600; font-size: 15px; }
.pd-bar__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-chip {
  background: #162030; color: #c6d3e0;
  padding: 6px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 500;
  border: 1px solid #223042;
}
.pd-bar__right { display: flex; align-items: center; gap: 10px; }
.pd-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #334155; color: #e6ecf1;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.pd-sun { color: #f3e96d; font-size: 16px; }

.pd-summary-bar {
  padding: 12px 16px;
  background: #12192400;
  border: 1px solid #1b2430;
  border-radius: 8px;
  color: #7a8a96;
  font-size: 11px; letter-spacing: 0.14em;
  text-align: center;
  margin-bottom: 12px;
}

.pd-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.pd-kpi {
  position: relative;
  padding: 14px 14px 12px;
  border: 1px solid #1b2430;
  border-radius: 10px;
  background: #0f1620;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  overflow: hidden;
}
.pd-kpi__lbl { grid-column: 1/3; font-size: 9px; color: #7a8a96; letter-spacing: 0.14em; margin-bottom: 2px; }
.pd-kpi__val { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.pd-kpi__sub { font-size: 9px; color: #7a8a96; letter-spacing: 0.12em; align-self: end; padding-bottom: 3px; }
.pd-kpi__glyph {
  position: absolute; right: 10px; top: 8px;
  font-size: 28px; opacity: 0.18; font-weight: 700;
  font-family: var(--font-display);
}
html[dir="rtl"] .pd-kpi__glyph { right: auto; left: 10px; }

.pd-row { display: grid; gap: 10px; margin-bottom: 10px; }
.pd-row--3 { grid-template-columns: repeat(3, 1fr); }

.pd-panel {
  background: #0f1620;
  border: 1px solid #1b2430;
  border-radius: 10px;
  padding: 14px;
}
.pd-panel--wide { padding: 16px 16px 8px; }
.pd-panel__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; gap: 12px; flex-wrap: wrap;
}
.pd-panel__title {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  margin-bottom: 10px;
}
.pd-panel__title span { font-weight: 700; }

.pd-donut-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: center; }
.pd-donut { width: 90px; height: 90px; display: block; }
.pd-legend { list-style: none; padding: 0; margin: 0; font-size: 10px; color: #c6d3e0; }
.pd-legend li {
  display: grid; grid-template-columns: 10px 1fr auto; gap: 6px; align-items: center;
  padding: 1px 0;
}
.pd-legend b { font-weight: 600; color: #e6ecf1; }
.pd-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.pd-legend__total {
  grid-template-columns: 1fr auto !important;
  margin-top: 4px; padding-top: 4px;
  border-top: 1px solid #1b2430;
  color: #7a8a96;
}

/* Bar chart — 12 month groups, each with 4 bars */
.pd-barchart {
  display: flex; gap: 10px;
  align-items: flex-end;
  padding: 10px 4px 4px;
  height: 170px;
  border-bottom: 1px dashed #1b2430;
}
.pd-month {
  flex: 1; display: flex; gap: 2px; align-items: flex-end; height: 100%;
}
.pd-month > span {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
}
.pd-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  padding: 8px 4px 0;
  font-size: 9px; color: #7a8a96;
  text-align: center;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in oklch, var(--proj-accent, var(--accent)) 30%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in oklch, var(--proj-accent, var(--accent)) 0%, transparent); }
}

.pd-legend-inline { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10px; color: #7a8a96; }
.pd-legend-inline > span { display: inline-flex; align-items: center; gap: 5px; }

/* =========================================================
   2. KITCHEN DISPLAY DASHBOARD (light)
   ========================================================= */
.proj-dash--kitchen {
  background: #f5f6fa;
  color: #1a1f2e;
  border: 1px solid #e3e6ee;
  font-size: 12px;
}
.kd-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e8eaf1;
  border-radius: 10px;
  margin-bottom: 12px;
}
.kd-bar__left { display: flex; align-items: center; gap: 10px; }
.kd-logo-blur {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #e8b97a, #c17d48 60%, #7a4220);
  filter: blur(3px);
  display: inline-block;
}
.kd-title-blur {
  font-weight: 700; color: #1a1f2e;
  filter: blur(3.5px);
  user-select: none;
}
.kd-bar__right { display: flex; align-items: center; gap: 12px; }
.kd-btn {
  background: #fff; color: #1a1f2e;
  border: 1px solid #d8dbe5;
  padding: 6px 12px; border-radius: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  cursor: pointer;
}
.kd-btn--ghost { background: #fff; font-weight: 500; font-size: 11px; letter-spacing: 0; }
.kd-btn--red { background: #e93b3b; color: #fff; border-color: #e93b3b; }
.kd-live { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: #0a9b4f; letter-spacing: 0.05em; }
.kd-live__dot { width: 7px; height: 7px; border-radius: 50%; background: #0a9b4f; animation: pulse 2.4s infinite; }

.kd-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 12px;
}
.kd-kpi {
  background: #fff;
  border: 1px solid #e8eaf1;
  border-radius: 10px;
  padding: 14px 16px;
}
.kd-kpi__lbl { font-size: 9px; color: #6b7280; letter-spacing: 0.14em; display: block; margin-bottom: 6px; }
.kd-kpi__val { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #1a1f2e; letter-spacing: -0.01em; }

.kd-body { display: grid; grid-template-columns: 1fr 320px; gap: 12px; align-items: start; }
@media (max-width: 900px) { .kd-body { grid-template-columns: 1fr; } }

.kd-main { background: transparent; }
.kd-tabs {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.kd-tab { font-size: 11px; color: #6b7280; display: inline-flex; gap: 6px; align-items: center; padding-bottom: 4px; }
.kd-tab b {
  background: #e8e9f1; color: #6b7280;
  padding: 1px 7px; border-radius: 10px; font-size: 10px; font-weight: 600;
}
.kd-tab--on { color: #6a57ea; border-bottom: 2px solid #6a57ea; font-weight: 600; }
.kd-tab--on b { background: #6a57ea; color: #fff; }
.kd-tab-spacer { flex: 1; }
.kd-date { font-size: 11px; color: #6b7280; }

.kd-order {
  background: #fff;
  border: 2px solid #6a57ea;
  border-radius: 10px;
  padding: 14px 16px;
  max-width: 340px;
}
.kd-order__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.kd-order__name { font-weight: 700; font-size: 14px; }
.kd-order__time { font-size: 10px; color: #6b7280; }
.kd-order__phone { font-size: 10px; color: #6b7280; margin-bottom: 10px; }
.kd-order__section { font-size: 9px; color: #9098aa; letter-spacing: 0.14em; margin-bottom: 4px; }
.kd-order__items { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #1a1f2e; }
.kd-qty { background: #f1f2f8; padding: 2px 8px; border-radius: 6px; font-size: 10px; }
.kd-order__foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 8px; border-top: 1px solid #eef0f5;
}
.kd-order__totlbl { font-size: 10px; color: #6b7280; }
.kd-order__tot { font-weight: 700; font-size: 13px; }
.kd-order__status { font-size: 9px; color: #6a57ea; letter-spacing: 0.1em; font-weight: 700; }

.kd-side {
  background: #fff;
  border: 1px solid #e8eaf1;
  border-radius: 10px;
  padding: 14px;
}
.kd-side__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.kd-side__title { font-weight: 700; font-size: 14px; }
.kd-side__count { font-size: 10px; color: #e93b3b; font-weight: 600; }

.kd-esc {
  border: 1px solid #e8eaf1;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
}
.kd-esc--open { border-color: #f4b5b5; }
.kd-esc__brand { font-weight: 700; font-size: 12px; margin-bottom: 2px; }
.kd-esc__brand--blur { filter: blur(3.5px); user-select: none; display: inline-block; }
.kd-esc__phone { font-size: 10px; color: #5c67ea; margin-bottom: 6px; }
.kd-esc__body { font-size: 11px; color: #3b4257; line-height: 1.5; margin: 0 0 8px; }
.kd-esc--done .kd-esc__body { color: #9098aa; }
.kd-esc__foot { display: flex; justify-content: space-between; align-items: center; }
.kd-esc__resolved { color: #0a9b4f; font-size: 10px; }

/* =========================================================
   3. TALENT MATCH DASHBOARD
   ========================================================= */
.proj-dash--talent {
  background: #faf9fe;
  color: #1a1030;
  border: 1px solid #e8e3f5;
}
.tm-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ece7f8;
  border-radius: 12px;
  margin-bottom: 12px;
}
.tm-bar__left { display: flex; align-items: center; gap: 12px; }
.tm-logo {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff; font-weight: 800; font-size: 13px;
  letter-spacing: 0.02em;
}
.tm-title__name { font-weight: 700; font-size: 14px; color: #1a1030; display: block; }
.tm-title__tag {
  font-size: 10px; color: #7c3aed;
  background: #f3edff;
  padding: 2px 10px; border-radius: 999px;
  display: inline-block;
  margin-top: 3px;
}
.tm-bar__right { display: flex; align-items: center; gap: 8px; }
.tm-chip { background: #f3edff; color: #5b21b6; padding: 6px 10px; border-radius: 8px; font-size: 11px; font-weight: 500; border: 1px solid #e9ddff; }
.tm-avatar { width: 28px; height: 28px; border-radius: 50%; background: #7c3aed; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }

.tm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.tm-kpi {
  background: #fff;
  border: 1px solid #ece7f8;
  border-radius: 12px;
  padding: 14px 16px;
}
.tm-kpi__lbl { font-size: 9px; color: #7a6b96; letter-spacing: 0.14em; display: block; margin-bottom: 6px; }
.tm-kpi__val { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #1a1030; letter-spacing: -0.01em; display: block; }
.tm-kpi__trend { font-size: 10px; color: #7a6b96; }
.tm-kpi__trend--up { color: #0a9b4f; font-weight: 600; }

.tm-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 900px) { .tm-body { grid-template-columns: 1fr; } }

.tm-panel {
  background: #fff;
  border: 1px solid #ece7f8;
  border-radius: 12px;
  padding: 14px 16px;
}
.tm-panel__title { font-family: var(--font-display); font-weight: 700; font-size: 13px; margin-bottom: 12px; color: #1a1030; }
.tm-panel__head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; gap: 12px; }
.tm-pill { background: #ede4ff; color: #6b21a8; padding: 2px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: 0.05em; }
.tm-role { font-weight: 700; font-size: 15px; color: #1a1030; margin-top: 6px; }
.tm-role__meta { font-size: 10px; color: #7a6b96; margin-top: 2px; letter-spacing: 0.04em; }
.tm-btn { background: #7c3aed; color: #fff; border: none; padding: 7px 14px; border-radius: 8px; font-size: 11px; font-weight: 600; cursor: pointer; }

.tm-shortlist { display: grid; gap: 8px; }
.tm-cand {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: #faf8ff;
  border: 1px solid #f1ebff;
}
.tm-cand__av { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.tm-cand__name { font-weight: 600; font-size: 13px; color: #1a1030; display: flex; align-items: center; gap: 8px; }
.tm-flag { font-size: 9px; padding: 1px 6px; border-radius: 4px; background: #ede4ff; color: #6b21a8; font-weight: 600; letter-spacing: 0.04em; }
.tm-cand__sub { font-size: 10px; color: #7a6b96; margin-top: 2px; }
.tm-score { text-align: right; }
.tm-score b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #7c3aed; letter-spacing: -0.01em; }
.tm-score span { font-size: 9px; color: #7a6b96; letter-spacing: 0.1em; }
.tm-stage { font-size: 10px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.tm-stage--int { background: #defbe6; color: #0a7c3b; }
.tm-stage--scr { background: #fef3c7; color: #92630e; }
.tm-stage--new { background: #ede4ff; color: #6b21a8; }

.tm-panel--narrow .tm-funnel { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tm-funnel li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  font-size: 11px;
  color: #1a1030;
}
.tm-funnel b { font-family: var(--font-display); font-weight: 700; color: #1a1030; }
.tm-funnel__bar {
  grid-column: 1 / 3;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  width: var(--w, 100%);
  margin-top: 4px;
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 720px) {
  .pd-kpis { grid-template-columns: repeat(2, 1fr); }
  .pd-kpis > :nth-child(5) { grid-column: 1 / -1; }
  .pd-row--3 { grid-template-columns: 1fr; }
  .pd-bar { grid-template-columns: 1fr; gap: 10px; }
  .pd-bar__filters { flex-wrap: wrap; }
  .kd-kpis { grid-template-columns: 1fr; }
  .kd-body { grid-template-columns: 1fr; }
  .tm-kpis { grid-template-columns: repeat(2, 1fr); }
  .tm-cand { grid-template-columns: 28px 1fr; }
  .tm-cand__av { width: 28px; height: 28px; }
  .tm-score, .tm-stage { grid-column: 2 / 3; justify-self: start; padding-left: 0; }
}
