/* مساحة العمل — قائمة البروفايلات وشاشة المتصفح الكاملة (pages/workspace.js) */

.wk-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.wk-title {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 22px; font-weight: var(--fw-semibold); color: var(--text-strong);
}
.wk-title svg { width: 22px; height: 22px; color: var(--accent); }
.wk-sub { margin: 4px 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
.wk-count {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-full);
  background: var(--surface-2); border: 1px solid var(--border-subtle);
  font-size: 13px; color: var(--text-strong);
}
.wk-count svg { width: 16px; height: 16px; color: var(--accent); }

.wk-setup {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px;
  background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.wk-setup label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-strong); }
.wk-setup label svg { width: 16px; height: 16px; }
.wk-setup select { width: auto; min-width: 220px; }

.wk-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.wk-card {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.wk-card.is-open { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.wk-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wk-name {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-weight: var(--fw-semibold); color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wk-name svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.wk-meta { font-size: 12px; color: var(--text-muted); min-height: 1em; overflow-wrap: anywhere; }
.wk-chip {
  flex: none; padding: 2px 10px; border-radius: var(--radius-full);
  font-size: 12px; background: var(--surface-1); color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
.wk-chip-on { background: var(--accent-soft); color: var(--text-strong); border-color: var(--accent); }
.wk-assign { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.wk-assign select { flex: 1; min-width: 0; }
.wk-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── الشاشة الكاملة ── */
body.wk-full-open { overflow: hidden; }
/* ‏وفوق طبقة noVNC: تضع الشاشةُ ستارةً شفّافةً على الصفحة كلِّها (z-index 10000) ما دام
   زرُّ الماوس مضغوطا، وتُزيلها عند رفعه. فإن رُفع الزرُّ خارج نافذة المتصفّح لم يصل
   الرفعُ ولم تُزَل الستارة — فيموت شريطُ الأزرار تحتها. وقيس (2026-09-29): الثلاثة
   كلُّها `noVNC_mouse_capture_elem` فوقها. فالشريطُ فوقها، ومعه حارسٌ في `workspace.js`. */
.wk-full {
  position: fixed; inset: 0;
  z-index: 10001;
  display: grid; grid-template-rows: 44px minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  background: #000;
}
.wk-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 0 12px; min-width: 0;
  background: var(--surface-1); border-bottom: 1px solid var(--border-subtle);
}
.wk-bar-title {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-strong);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.wk-bar-title svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.wk-bar-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.wk-bar-hint { font-size: 12px; color: var(--text-muted); }
.wk-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #000; }
.wk-stage-msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #fff; font-size: var(--fs-sm);
}
.wk-stage-msg svg { width: 20px; height: 20px; }

@media (max-width: 720px) {
  .wk-bar-hint { display: none; }
  .wk-bar-acts .btn { padding-inline: 8px; }
}

/* ‏فتحةٌ أخفقت: السبب وزرّان — لا سواد بلا مخرج */
.wk-stage-fail { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 16px; }
.wk-stage-fail p { display: flex; align-items: center; gap: 8px; margin: 0; color: #fff; max-width: 640px; }
.wk-stage-fail p svg { width: 20px; height: 20px; flex: none; color: var(--warning-text, #f5b544); }
.wk-stage-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
