:root {
  --bg: #070b14;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-elevated: rgba(24, 35, 61, 0.88);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(20, 184, 166, 0.35);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #14b8a6;
  --primary-hover: #0d9488;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;
  --info: #38bdf8;
  --radius: 16px;
  --shadow-card: 0 12px 32px -12px rgba(2, 6, 23, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at 85% 8%, rgba(20, 184, 166, 0.14), transparent 36%),
    radial-gradient(circle at 12% 88%, rgba(56, 189, 248, 0.1), transparent 40%),
    linear-gradient(180deg, #070b14 0%, #0b1120 55%, #070b14 100%);
  background-attachment: fixed;
  color: var(--text);
  direction: rtl;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 184, 166, 0.55);
}

@keyframes pulse-live {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }
}

.badge-live-a4 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

.badge-live-a4.live {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(20, 184, 166, 0.14));
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  box-shadow: 0 0 18px -6px rgba(16, 185, 129, 0.45);
}

.badge-live-a4.sandbox {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: #080d1a;
  border-left: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.brand-icon {
  font-size: 28px;
}

.brand-title {
  font-weight: 800;
  font-size: 16px;
}

.brand-sub {
  font-size: 12px;
  color: var(--primary);
}

.zero-cost-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: #5eead4;
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 11px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
  transition: all 0.2s;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text);
}

.nav-item.active {
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(20, 184, 166, 0.45);
  color: #5eead4;
}

.badge-danger {
  margin-right: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mode-line {
  display: flex;
  justify-content: space-between;
}

.mode-line strong {
  color: var(--text);
}

/* Main */
.main-content {
  padding: 28px 28px 44px;
  max-width: 1440px;
  width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
  margin-bottom: 22px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
  min-height: 76px;
  box-sizing: border-box;
}

.topbar > div:first-child {
  min-width: 0;
  flex: 1 1 320px;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.auto-engine-banner {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.14), rgba(20, 184, 166, 0.14));
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #bbf7d0;
  border-radius: var(--radius);
  padding: 13px 18px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dev-drawer {
  margin-top: 22px;
  background: #0b1326;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.dev-drawer > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  user-select: none;
}

.dev-drawer[open] > summary {
  color: var(--primary);
  margin-bottom: 16px;
}

/* Crisis Banner */
.crisis-banner {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.22), rgba(153, 27, 27, 0.35));
  border: 1px solid rgba(239, 68, 68, 0.7);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.crisis-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crisis-icon {
  font-size: 28px;
}

.crisis-banner p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #fecaca;
}

/* Buttons & Inputs */
.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
}

.btn-primary {
  background: var(--primary);
  color: #042f2e;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
}

.btn-danger-outline {
  background: rgba(239, 68, 68, 0.2);
  color: #fee2e2;
  border: 1px solid var(--danger);
}

.input, .select, .textarea {
  width: 100%;
  background: #090f1d;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #cbd5e1;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

/* Cards & Grids */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.card-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.standalone-header {
  margin-bottom: 14px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.kpi-label {
  font-size: 13px;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin: 4px 0;
}

.kpi-note {
  font-size: 12px;
  color: var(--text-muted);
}

.command-launcher {
  margin-bottom: 20px;
}

.quick-form {
  display: grid;
  grid-template-columns: 1fr 170px auto auto;
  gap: 10px;
  align-items: center;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 10px 0 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-header h2 {
  margin: 0;
  font-size: 18px;
}

.hint, .muted-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* 8 Virtual Employees Grid */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-card.status-alert {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

.agent-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.agent-name {
  font-weight: 800;
  font-size: 15px;
}

.agent-dept {
  font-size: 12px;
  color: var(--primary);
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-idle { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }
.badge-working { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.badge-completed { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.badge-alert { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }

.agent-role {
  font-size: 12px;
  color: var(--text-muted);
}

.agent-task {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
}

.agent-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  gap: 6px;
}

.model-pill {
  background: #090f1d;
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  direction: ltr;
  font-family: monospace;
  font-size: 10.5px;
  color: #93c5fd;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Lists & Grids */
.two-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 18px;
}

.stack-list, .activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.item-box.crisis-box {
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(239, 68, 68, 0.08);
}

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

/* CEO Chat */
.ceo-chat-card {
  display: flex;
  flex-direction: column;
  min-height: 540px;
}

.chat-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.preset-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 11px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.preset-chip:hover {
  border-color: var(--primary);
}

.preset-danger {
  border-color: rgba(239, 68, 68, 0.55);
  color: #fecaca;
}

.chat-messages {
  flex: 1;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: #090f1d;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 88%;
  white-space: pre-line;
  font-size: 13.5px;
}

.chat-owner {
  align-self: flex-start;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(20, 184, 166, 0.45);
}

.chat-ceo {
  align-self: flex-end;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.chat-input-row {
  display: flex;
  gap: 10px;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-image {
  width: 100%;
  height: 230px;
  object-fit: cover;
  background: #090f1d;
  border-bottom: 1px solid var(--border);
}

.post-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-text {
  white-space: pre-line;
  font-size: 13.5px;
  background: #090f1d;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.prompt-ltr {
  direction: ltr;
  text-align: left;
  font-family: monospace;
  font-size: 11.5px;
  color: #93c5fd;
  background: #090f1d;
  padding: 8px;
  border-radius: 8px;
}

.post-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vertical-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sim-result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: rgba(20, 184, 166, 0.1);
  font-size: 13.5px;
}

.sim-result.crisis {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.14);
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--primary);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  z-index: 9999;
  font-weight: 700;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: #090f1d;
  border: 1px dashed var(--border);
  border-radius: 12px;
  min-height: 180px;
  text-align: center;
}

.qr-img {
  width: 240px;
  height: 240px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.round-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.round-badge.round-2 {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.round-badge.round-3 {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.sop-preview {
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-line;
  font-size: 12px;
  background: #090f1d;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  color: #cbd5e1;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: static;
  }
  .quick-form, .two-col-grid, .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th, .data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: top;
}

.data-table th {
  color: var(--primary);
  font-weight: 800;
  background: #090f1d;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: rgba(20, 184, 166, 0.05);
}

/* ==========================================================================
   Department-Centric Suite (Meta Business Suite Inspired Workspaces)
   ========================================================================== */
.nav-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 10px 12px 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.85;
}

.dept-roster-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dept-emp-card {
  background: linear-gradient(145deg, rgba(25, 36, 61, 0.92), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dept-emp-card .dept-emp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.dept-emp-card .dept-emp-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #f8fafc;
}

.dept-emp-card .dept-emp-last {
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 8px;
  padding: 6px 8px;
  line-height: 1.45;
}

.suite-actions-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.inbox-3pane {
  display: grid;
  grid-template-columns: 280px 1fr 290px;
  gap: 14px;
  margin-bottom: 18px;
}

@media (max-width: 1120px) {
  .inbox-3pane {
    grid-template-columns: 1fr;
  }
}

.inbox-pane-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  max-height: 640px;
}

.inbox-scroll {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.inbox-scroll::-webkit-scrollbar {
  width: 6px;
}

.inbox-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.inbox-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.thread-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.thread-item:hover,
.thread-item.active {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
}

.chat-bubble-customer {
  align-self: flex-start;
  max-width: 82%;
  background: rgba(51, 65, 85, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px 12px 2px 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.chat-bubble-agent {
  align-self: flex-end;
  max-width: 85%;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px 12px 12px 2px;
  padding: 10px 12px;
  font-size: 13px;
}

.chat-bubble-crisis {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.45);
}

.chat-bubble-human {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.45);
}

.typing-indicator {
  font-size: 12px;
  color: #5eead4;
  padding: 6px 10px;
  margin-top: 4px;
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.1);
  border: 1px dashed rgba(20, 184, 166, 0.35);
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #10b981;
  color: #052e16;
  font-size: 11px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}


/* ============================================================
   Modern Contemporary Glassmorphic Polish (2026 Executive OS)
   ============================================================ */
.sidebar {
  background: rgba(8, 13, 26, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: -8px 0 32px rgba(2, 6, 23, 0.45);
}

.brand-box {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(15, 23, 42, 0.9));
  border-color: rgba(20, 184, 166, 0.28);
  box-shadow: var(--shadow-card);
}

.dot-live {
  animation: pulse-live 2.2s infinite;
}

.nav-item {
  border-radius: 12px;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-item:hover {
  background: rgba(30, 41, 59, 0.65);
  transform: translateX(-2px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.22), rgba(56, 189, 248, 0.08));
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 6px 20px -10px rgba(20, 184, 166, 0.65);
}

.topbar,
.card,
.agent-card,
.kpi-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.agent-card:hover,
.kpi-card:hover {
  border-color: rgba(20, 184, 166, 0.35);
  transform: translateY(-2px);
}

.btn {
  border-radius: 11px;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  box-shadow: 0 8px 20px -10px rgba(20, 184, 166, 0.75);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
  box-shadow: 0 10px 24px -8px rgba(20, 184, 166, 0.85);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22);
}

.data-table thead th {
  background: rgba(15, 23, 42, 0.85);
  letter-spacing: 0.2px;
}

.data-table tbody tr:hover {
  background: rgba(20, 184, 166, 0.06);
}


/* ============================================================
   Employee Illustrated Avatars, Direct Chat Modal & Boardroom Picker
   ============================================================ */
.emp-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.emp-avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 14px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 16px -6px rgba(2, 6, 23, 0.75);
  position: relative;
}

.emp-avatar.sm {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
}

.emp-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.emp-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-chat-emp {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(20, 184, 166, 0.22));
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #bae6fd;
  padding: 5px 11px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}

.btn-chat-emp:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(20, 184, 166, 0.35));
  color: #ffffff;
  transform: translateY(-1px);
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 2px;
}

.participant-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.participant-chip:hover {
  border-color: rgba(20, 184, 166, 0.45);
}

.participant-chip.selected {
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.6);
  box-shadow: 0 4px 14px -6px rgba(20, 184, 166, 0.5);
}

.participant-chip input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.emp-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.emp-chat-box {
  width: 100%;
  max-width: 640px;
  height: min(82vh, 680px);
  background: rgba(11, 17, 32, 0.96);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.emp-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border);
}

.emp-chat-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.emp-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emp-chat-bubble {
  max-width: 85%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.emp-chat-bubble.user {
  align-self: flex-start;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.emp-chat-bubble.agent {
  align-self: flex-end;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.emp-chat-quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 16px 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.emp-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px 14px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid var(--border);
}

.emp-chat-form .input {
  flex: 1;
}


/* ============================================================
   Professional 2-Column Social Post Card & Balanced Dept Roster
   ============================================================ */
.dept-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
}

.post-card-pro {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  align-items: start;
}

.post-media-box {
  width: 230px;
  height: 230px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-thumb-pro {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-media-empty {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.post-body-pro {
  min-width: 0;
}

.post-details-drawer {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
}

.post-details-drawer summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-muted);
  user-select: none;
}

.post-details-drawer[open] summary {
  color: var(--primary);
}

@media (max-width: 780px) {
  .post-card-pro {
    grid-template-columns: 1fr;
  }
  .post-media-box {
    width: 100%;
    height: 220px;
  }
}


/* --- Retain Core Icon & Semantic Utility Classes --- */
/* Crisp SVG Icons inside Sidebar */
.nav-ic {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.85;
  transition: color 0.16s ease, opacity 0.16s ease;
}

.nav-ic svg {
  width: 17px;
  height: 17px;
  display: block;
}

/* Theme-Aware Semantic Helpers */
.btn-danger-soft {
  color: #dc2626 !important;
  background: #fef2f2 !important;
  border-color: #fecaca !important;
}
.btn-danger-soft:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
}
.btn-sent-soft {
  color: #047857 !important;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  cursor: default !important;
}
.b2b-phone-pill {
  color: #047857 !important;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  font-weight: 700 !important;
}
.b2b-source-link {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}
.b2b-source-link:hover {
  text-decoration: underline;
}
.text-danger-soft {
  color: #dc2626 !important;
}

body.theme-dark .btn-danger-soft {
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
body.theme-dark .btn-sent-soft {
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}
body.theme-dark .b2b-phone-pill {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.32) !important;
}
body.theme-dark .b2b-source-link {
  color: #818cf8;
}
body.theme-dark .text-danger-soft {
  color: #fca5a5 !important;
}


/* --- Retain Responsive Grids, Onboarding, Radar, War-Room & Creator Studio Layouts --- */
@media (min-width: 1120px) {
  #tab-overview .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ==========================================================================
   Onboarding Checklist, Order Filter Bar & Mobile-First Responsive Card Tables
   ========================================================================== */
.onb-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.06);
}
.onb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.onb-progress-track {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.onb-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #0ea5e9);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.onb-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.onb-step {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}
.onb-step:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}
.onb-step strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}
.onb-step small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.onb-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: #eef2ff;
  color: #4f46e5;
  flex-shrink: 0;
}
.onb-step.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.onb-step.done .onb-check {
  background: #16a34a;
  color: #ffffff;
}
.onb-step.done strong {
  color: #166534;
  text-decoration: line-through;
  opacity: 0.85;
}

.crm-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-pill {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

@media (max-width: 768px) {
  .data-table.mobile-cards thead {
    display: none;
  }
  .data-table.mobile-cards,
  .data-table.mobile-cards tbody,
  .data-table.mobile-cards tr,
  .data-table.mobile-cards td {
    display: block;
    width: 100%;
  }
  .data-table.mobile-cards tr {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }
  .data-table.mobile-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.25);
    text-align: left;
  }
  .data-table.mobile-cards td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .data-table.mobile-cards td[data-label]::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    flex-shrink: 0;
  }
}


/* ==========================================================================
   2026 Modern Social-Feed Competitor Radar & Watchlist UI
   ========================================================================== */
.radar-command-panel {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(14, 165, 233, 0.04));
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.radar-search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.radar-search-row .input {
  flex: 1;
  min-width: 240px;
  background: #ffffff;
  font-size: 13.5px;
}
.radar-watchlist-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}
.radar-wl-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.radar-wl-form .input {
  flex: 1;
  min-width: 220px;
  background: #ffffff;
  font-size: 12.5px;
  padding: 7px 10px;
}
.radar-wl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.radar-wl-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px 4px 6px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.radar-wl-pill button {
  border: none;
  background: #fee2e2;
  color: #dc2626;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.radar-wl-pill button:hover {
  background: #dc2626;
  color: #ffffff;
}

.radar-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
@media (max-width: 768px) {
  .radar-feed-grid {
    grid-template-columns: 1fr;
  }
}

.radar-post-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.radar-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: rgba(79, 70, 229, 0.35);
}
.radar-post-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.radar-post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.radar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
  font-weight: 800;
}
.radar-avatar.opensooq { background: #fef3c7; color: #b45309; }
.radar-avatar.facebook { background: #dbeafe; color: #1d4ed8; }
.radar-avatar.instagram { background: #fce7f3; color: #be185d; }
.radar-avatar.web { background: #eef2ff; color: #4f46e5; }

.radar-post-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}
.radar-post-source {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.radar-post-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
  margin: 0;
}
.radar-insight-box {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.07), rgba(14, 165, 233, 0.06));
  border-right: 3.5px solid var(--primary);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #1e1b4b;
}
.radar-insight-box strong {
  display: block;
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 3px;
}
.radar-team-accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
  padding: 8px 12px;
}
.radar-team-accordion summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.radar-team-accordion summary::-webkit-details-marker {
  display: none;
}
.radar-team-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.radar-team-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.5;
}
.radar-post-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.radar-post-links {
  display: flex;
  align-items: center;
  gap: 6px;
}


/* ==========================================================================
   AI Team War-Room Live Motion Modal (Campaign Launch Animation)
   ========================================================================== */
@keyframes warroomPulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}
@keyframes warroomShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes warroomFadeSlide {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.warroom-modal {
  max-width: 560px;
  width: 94%;
  height: auto !important;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  animation: warroomFadeSlide 0.25s ease-out;
}
.warroom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.warroom-live-orb {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 20px;
  animation: warroomPulse 1.8s infinite;
  flex-shrink: 0;
}
.warroom-progress-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}
.warroom-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #0ea5e9, #8b5cf6, #4f46e5);
  background-size: 200% 100%;
  animation: warroomShimmer 1.8s linear infinite;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.warroom-stages {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.warroom-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: #f8fafc;
  opacity: 0.58;
  transition: all 0.3s ease;
}
.warroom-stage.active {
  opacity: 1;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(14, 165, 233, 0.06));
  border-color: rgba(79, 70, 229, 0.45);
  transform: translateX(-4px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.1);
}
.warroom-stage.done {
  opacity: 1;
  background: #f0fdf4;
  border-color: #bbf7d0;
  transform: none;
}
.warroom-stage-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.warroom-stage.active .warroom-stage-avatar {
  border-color: var(--primary);
  animation: warroomPulse 1.5s infinite;
}
.warroom-stage-body {
  flex: 1;
  min-width: 0;
}
.warroom-stage-body strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}
.warroom-stage-body small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.warroom-stage-state {
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}
.warroom-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  font-size: 13px;
  line-height: 1.65;
  color: #14532d;
  animation: warroomFadeSlide 0.3s ease-out;
  max-height: 180px;
  overflow-y: auto;
}
.warroom-result.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.warroom-footer {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}


/* ==========================================================================
   Full-Screen AI Operations War-Room & Flying Data Packets Between Employees
   ========================================================================== */
@keyframes wrPacketFlyRTL {
  0% { opacity: 0; transform: translateX(36px) scale(0.85); }
  20% { opacity: 1; transform: translateX(18px) scale(1); }
  80% { opacity: 1; transform: translateX(-18px) scale(1); }
  100% { opacity: 0; transform: translateX(-36px) scale(0.85); }
}
@keyframes wrPipeFlow {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.warroom-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: #0f172a;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  animation: warroomFadeSlide 0.25s ease-out;
}
.warroom-fullscreen.hidden {
  display: none !important;
}
.warroom-fs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: linear-gradient(90deg, #0f172a, #1e1b4b);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.wr-live-pill {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.4);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.wr-live-pill.done {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
}
.warroom-fs-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px 32px;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Horizontal Animated Pipeline */
.wr-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 22px 18px;
  overflow-x: auto;
}
.wr-node {
  min-width: 125px;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  position: relative;
  opacity: 0.55;
  transition: all 0.35s ease;
  flex-shrink: 0;
}
.wr-node.active {
  opacity: 1;
  border-color: #6366f1;
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.28), rgba(14, 165, 233, 0.18));
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.35);
}
.wr-node.done {
  opacity: 1;
  border-color: #22c55e;
  background: rgba(22, 163, 74, 0.14);
}
.wr-node-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin: 0 auto 8px;
}
.wr-node.active .wr-node-avatar {
  animation: warroomPulse 1.5s infinite;
  background: rgba(99, 102, 241, 0.3);
}
.wr-node-name {
  font-weight: 800;
  font-size: 13.5px;
  color: #ffffff;
}
.wr-node-role {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.wr-node-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 13px;
}

/* Animated Connecting Pipe + Flying Data Packet */
.wr-pipe {
  flex: 1;
  min-width: 85px;
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wr-pipe-line {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  transition: background 0.3s ease;
}
.wr-pipe.flowing .wr-pipe-line {
  background: linear-gradient(90deg, #38bdf8, #818cf8, #38bdf8);
  background-size: 200% 100%;
  animation: wrPipeFlow 1.1s linear infinite;
}
.wr-pipe.done .wr-pipe-line {
  background: #22c55e;
}
.wr-packet {
  position: absolute;
  top: 0;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.45);
  opacity: 0;
  pointer-events: none;
}
.wr-pipe.flowing .wr-packet {
  animation: wrPacketFlyRTL 1.5s ease-in-out infinite;
}
.wr-pipe.done .wr-packet {
  opacity: 0.92;
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: none;
}

/* 2-Column Workspace Grid */
.wr-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
  flex: 1;
}
@media (max-width: 960px) {
  .wr-workspace-grid {
    grid-template-columns: 1fr;
  }
}
.wr-panel {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wr-panel-title {
  font-weight: 800;
  font-size: 14.5px;
  color: #e2e8f0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.wr-handoff-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wr-handoff-item {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-right: 3px solid #38bdf8;
  border-radius: 12px;
  padding: 11px 13px;
  animation: warroomFadeSlide 0.3s ease-out;
}
.wr-handoff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 4px;
}
.wr-handoff-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: #cbd5e1;
}
.wr-showcase {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wr-showcase-loading {
  text-align: center;
  padding: 40px 20px;
  color: #cbd5e1;
}
.wr-campaign-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: warroomFadeSlide 0.35s ease-out;
}
.wr-campaign-poster {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.wr-campaign-copy {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-line;
  color: #1e293b;
}


/* ==========================================================================
   Native Light-Theme War-Room Pipeline (100% Consistent with System Design)
   ========================================================================== */
.wr-native-pill {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid rgba(79, 70, 229, 0.25);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}
.wr-native-pill.live {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.wr-native-pill.done {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}
.wr-native-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff55);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 16px;
  overflow-x: auto;
}
.wr-native-node {
  min-width: 118px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 15px;
  padding: 16px 10px 12px;
  text-align: center;
  position: relative;
  opacity: 0.65;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}
.wr-native-node.active {
  opacity: 1;
  border-color: var(--primary);
  background: linear-gradient(180deg, #ffffff, #eef2ff);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.16);
}
.wr-native-node.done {
  opacity: 1;
  border-color: #22c55e;
  background: #f0fdf4;
}
.wr-native-avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin: 0 auto 8px;
}
.wr-native-node.active .wr-native-avatar {
  background: #e0e7ff;
  animation: warroomPulse 1.5s infinite;
}
.wr-native-node.done .wr-native-avatar {
  background: #dcfce7;
}
.wr-native-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}
.wr-native-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.wr-native-pipe {
  flex: 1;
  min-width: 92px;
  position: relative;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wr-native-pipe-line {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background 0.3s ease;
}
.wr-native-pipe.flowing .wr-native-pipe-line {
  background: linear-gradient(90deg, #4f46e5, #0ea5e9, #4f46e5);
  background-size: 200% 100%;
  animation: wrPipeFlow 1.1s linear infinite;
}
.wr-native-pipe.done .wr-native-pipe-line {
  background: #22c55e;
}
.wr-native-packet {
  position: absolute;
  top: 0;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.28);
  opacity: 0;
  pointer-events: none;
}
.wr-native-pipe.flowing .wr-native-packet {
  animation: wrPacketFlyRTL 1.5s ease-in-out infinite;
}
.wr-native-pipe.done .wr-native-packet {
  opacity: 1;
  background: #16a34a;
  box-shadow: none;
}
.wr-native-handoff-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wr-native-handoff-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-right: 3.5px solid var(--primary);
  border-radius: 12px;
  padding: 10px 12px;
  animation: warroomFadeSlide 0.28s ease-out;
}
.wr-native-handoff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}
.wr-native-handoff-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
}


/* ==========================================================================
   2026 Modern Creator Studio Feed (Spacious 2-Column Vertical Post Cards)
   ========================================================================== */
#postsGrid,
.posts-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
  gap: 20px !important;
  align-items: start;
}
@media (max-width: 768px) {
  #postsGrid,
  .posts-grid {
    grid-template-columns: 1fr !important;
  }
}
.studio-post-card,
.post-card-pro.studio-post-card {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  overflow: hidden;
  padding: 0 !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.studio-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09) !important;
  border-color: rgba(79, 70, 229, 0.35) !important;
}
.studio-card-media {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.studio-card-media-empty {
  height: 180px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.studio-card-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.studio-card-badges {
  position: absolute;
  top: 22px;
  right: 22px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.studio-dl-btn {
  position: absolute;
  top: 22px;
  left: 22px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}
.studio-dl-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.studio-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.studio-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.studio-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
}
.studio-card-caption {
  font-size: 13.5px;
  line-height: 1.7;
  color: #334155;
  white-space: pre-line;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
}
.studio-card-caption.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.studio-expand-btn {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.studio-card-tags {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.5;
}


