.operations-center,
.customer-360-page {
  --ops-ink: #101828;
  --ops-muted: #667085;
  --ops-line: #e3e8f2;
  --ops-soft: #f6f8fc;
  --ops-indigo: #4f5ff7;
  --ops-mint: #dff8ea;
  --ops-yellow: #fff4c7;
  background: #f8faff;
  color: var(--ops-ink);
  min-height: calc(100vh - 74px);
  padding: clamp(24px, 2.4vw, 42px);
}

.operations-center .panel,
.customer-360-page .panel {
  background: #fff;
  border: 1px solid var(--ops-line);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgb(16 24 40 / 5%);
}

.operations-hero,
.customer-360-head {
  align-items: flex-end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto 28px;
  max-width: 1600px;
}

.operations-hero p,
.operations-center article > header p,
.operations-value > p,
.customer-360-head p,
.customer-360-page article > header p,
.memory-policy-card > p {
  color: #6673a6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  margin: 0 0 8px;
}

.operations-hero p span {
  background: #24b47e;
  border-radius: 50%;
  box-shadow: 0 0 0 5px #dff8ea;
  display: inline-block;
  height: 8px;
  margin-right: 10px;
  width: 8px;
}

.operations-hero h1,
.customer-360-head h1 {
  font-size: clamp(32px, 3.2vw, 54px);
  letter-spacing: -.035em;
  line-height: 1.03;
  margin: 0 0 10px;
}

.operations-hero > div > strong {
  color: var(--ops-muted);
  font-size: 18px;
  font-weight: 500;
}

.operations-hero-actions,
.customer-360-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.operations-hero-actions .button,
.customer-360-head-actions .button {
  align-items: center;
  display: inline-flex;
  font-size: 15px;
  min-height: 46px;
}

.operations-hero-actions .button b {
  align-items: center;
  background: rgb(255 255 255 / 18%);
  border-radius: 999px;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  margin-left: 9px;
  min-width: 24px;
}

.operations-metrics,
.customer-360-metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 auto 18px;
  max-width: 1600px;
}

.operations-metrics a,
.customer-360-metrics article {
  background: #fff;
  border: 1px solid var(--ops-line);
  border-radius: 17px;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 142px;
  padding: 20px;
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.operations-metrics a:hover {
  border-color: #aeb7ff;
  box-shadow: 0 14px 36px rgb(79 95 247 / 10%);
  transform: translateY(-2px);
}

.operations-metrics span,
.customer-360-metrics span {
  color: var(--ops-muted);
  font-size: 14px;
  font-weight: 650;
}

.operations-metrics strong,
.customer-360-metrics strong {
  font-size: 38px;
  letter-spacing: -.04em;
  line-height: 1;
  margin: 18px 0 8px;
}

.operations-metrics small,
.customer-360-metrics small {
  color: var(--ops-muted);
  font-size: 13px;
}

.operations-metrics .metric-ai { background: linear-gradient(145deg, #f4f2ff, #fff); }
.operations-metrics .metric-approval { background: linear-gradient(145deg, #fff8df, #fff); }
.operations-metrics .metric-alert { background: linear-gradient(145deg, #fff2ef, #fff); }

.operations-focus-grid,
.operations-main-grid,
.operations-lower-grid,
.customer-360-grid {
  display: grid;
  gap: 18px;
  margin: 0 auto 18px;
  max-width: 1600px;
}

.operations-focus-grid { grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); }
.operations-main-grid { grid-template-columns: minmax(0, 1.45fr) minmax(350px, .55fr); }
.operations-lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-360-grid { align-items: start; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .55fr); }

.operations-center article > header,
.customer-360-page article > header {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.operations-center article > header h2,
.customer-360-page article > header h2 {
  font-size: 23px;
  letter-spacing: -.025em;
  margin: 0;
}

.operations-center article > header a,
.customer-360-page article > header a {
  color: var(--ops-indigo);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.operations-workload,
.operations-signals,
.operations-approvals,
.operations-topics,
.operations-employees,
.operations-activity,
.memory-ledger,
.customer-history-card,
.customer-orders-card,
.memory-policy-card {
  padding: 24px;
}

.workload-bars { display: grid; gap: 17px; margin: 28px 0 24px; }
.workload-bars div > span { display: flex; font-size: 14px; justify-content: space-between; margin-bottom: 8px; }
.workload-bars div > span em { color: var(--ops-muted); font-style: normal; }
.workload-bars div > i { background: #edf0f7; border-radius: 99px; display: block; height: 9px; overflow: hidden; }
.workload-bars div > i b { background: linear-gradient(90deg, #4f5ff7, #7d68ff); border-radius: inherit; display: block; height: 100%; min-width: 2px; }
.workload-bars div:nth-child(2) > i b { background: #f4bd3f; }
.workload-bars div:nth-child(3) > i b { background: #f56c5b; }

.operations-saved-queues { display: grid; gap: 9px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.operations-saved-queues a { align-items: center; background: var(--ops-soft); border: 1px solid #edf0f6; border-radius: 12px; color: inherit; display: grid; font-size: 13px; gap: 8px; grid-template-columns: auto 1fr auto; min-height: 52px; padding: 8px 11px; text-decoration: none; }
.operations-saved-queues span { align-items: center; background: #ebe9ff; border-radius: 9px; color: #5748e8; display: inline-flex; height: 30px; justify-content: center; width: 30px; }
.operations-saved-queues em { background: #fff; border-radius: 99px; color: var(--ops-muted); font-style: normal; padding: 3px 7px; }

.signal-list { display: grid; gap: 4px; margin-top: 16px; }
.signal-list > a { align-items: center; border-top: 1px solid #eef1f6; color: inherit; display: grid; gap: 12px; grid-template-columns: auto 1fr auto; min-height: 66px; padding: 10px 0; text-decoration: none; }
.signal-list > a > i { align-items: center; background: #ffebe8; border-radius: 10px; color: #c43f34; display: inline-flex; font-style: normal; font-weight: 800; height: 36px; justify-content: center; width: 36px; }
.signal-list > a > i.vip { background: #fff3c9; color: #8f6900; }
.signal-list > a span { display: grid; gap: 3px; }
.signal-list > a small { color: var(--ops-muted); font-size: 12px; line-height: 1.4; }
.operations-clear,
.operations-empty { align-items: center; color: var(--ops-muted); display: flex; flex-direction: column; justify-content: center; min-height: 170px; text-align: center; }
.operations-clear span,
.operations-empty > span { align-items: center; background: var(--ops-mint); border-radius: 50%; color: #087a4d; display: inline-flex; font-size: 20px; height: 48px; justify-content: center; margin-bottom: 12px; width: 48px; }
.operations-clear strong,
.operations-empty h3 { color: var(--ops-ink); font-size: 17px; margin: 0 0 5px; }
.operations-clear small,
.operations-empty p { font-size: 13px; margin: 0; max-width: 390px; }
.operations-empty.compact { min-height: 90px; }

.operations-approvals > header > span { background: var(--ops-yellow); border-radius: 99px; color: #805f00; font-size: 13px; font-weight: 750; padding: 7px 11px; }
.approval-row { align-items: center; border-top: 1px solid #edf0f6; display: grid; gap: 14px; grid-template-columns: auto minmax(0, 1fr) auto auto; margin-top: 18px; padding-top: 18px; }
.approval-mark { align-items: center; background: #eeecff; border-radius: 13px; color: var(--ops-indigo); display: flex; font-size: 20px; height: 46px; justify-content: center; width: 46px; }
.approval-row small { color: #7665dd; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.approval-row h3 { font-size: 17px; margin: 3px 0; }
.approval-row p { color: var(--ops-muted); font-size: 13px; line-height: 1.45; margin: 0 0 4px; }
.approval-row a { color: var(--ops-indigo); font-size: 12px; font-weight: 700; text-decoration: none; }
.approval-row time { color: var(--ops-muted); font-size: 12px; white-space: nowrap; }
.approval-row-actions { display: flex; gap: 7px; }
.approval-row-actions .button { font-size: 13px; min-height: 39px; padding: 8px 12px; }

.operations-side-stack,
.customer-360-side { display: grid; gap: 18px; }
.operations-topics ol { display: grid; gap: 15px; list-style: none; margin: 22px 0 0; padding: 0; }
.operations-topics li { align-items: center; display: grid; font-size: 13px; gap: 10px; grid-template-columns: auto minmax(100px, .8fr) minmax(80px, 1fr) auto; }
.operations-topics li > span { align-items: center; background: var(--ops-soft); border-radius: 7px; color: var(--ops-muted); display: flex; height: 25px; justify-content: center; width: 25px; }
.operations-topics li > i { background: #edf0f7; border-radius: 99px; height: 6px; overflow: hidden; }
.operations-topics li > i em { background: var(--ops-indigo); border-radius: inherit; display: block; height: 100%; min-width: 4px; }
.operations-topics li > strong { color: var(--ops-muted); }
.operations-value { background: linear-gradient(145deg, #101a35, #1d2850) !important; color: #fff; padding: 24px; }
.operations-value > p { color: #b7c0eb; }
.operations-value > strong { display: block; font-size: 38px; letter-spacing: -.04em; margin: 15px 0 5px; }
.operations-value > span { color: #bec5dc; display: block; font-size: 13px; line-height: 1.5; }
.operations-value > a { color: #fff; display: inline-block; font-size: 13px; font-weight: 700; margin-top: 18px; }

.operations-employees > div { display: grid; gap: 7px; margin-top: 16px; }
.operations-employees > div > a { align-items: center; border-top: 1px solid #edf0f6; color: inherit; display: grid; gap: 12px; grid-template-columns: auto 1fr auto auto; min-height: 67px; padding: 9px 0; text-decoration: none; }
.agent-avatar { align-items: center; background: linear-gradient(145deg, #666df8, #8e6fe9); border-radius: 13px; color: #fff; display: flex; font-size: 18px; font-weight: 800; height: 42px; justify-content: center; overflow: hidden; width: 42px; }
.agent-avatar img { height: 100%; object-fit: cover; width: 100%; }
.operations-employees section { display: grid; gap: 2px; }
.operations-employees small { color: var(--ops-muted); }
.operations-employees em { background: var(--ops-mint); border-radius: 99px; color: #087a4d; font-size: 11px; font-style: normal; padding: 5px 8px; }
.operations-employees a > b { color: var(--ops-muted); font-size: 12px; }

.operations-activity ol { display: grid; list-style: none; margin: 16px 0 0; padding: 0; }
.operations-activity li { align-items: flex-start; border-top: 1px solid #edf0f6; display: grid; gap: 11px; grid-template-columns: auto 1fr auto; padding: 13px 0; }
.operations-activity li > i { align-items: center; background: #f0eeff; border-radius: 8px; color: var(--ops-indigo); display: flex; font-style: normal; height: 30px; justify-content: center; width: 30px; }
.operations-activity li > span { display: grid; gap: 3px; }
.operations-activity li small { color: var(--ops-muted); }
.operations-activity li p { color: var(--ops-muted); font-size: 12px; line-height: 1.45; margin: 2px 0 0; }
.operations-activity li > a { color: var(--ops-indigo); text-decoration: none; }

.customer-360-page { padding-top: 24px; }
.customer-360-head { align-items: center; }
.customer-360-head > a { color: var(--ops-muted); font-size: 14px; position: absolute; top: 94px; text-decoration: none; }
.customer-identity { align-items: center; display: flex; gap: 17px; margin-top: 25px; }
.customer-identity > span { align-items: center; background: linear-gradient(145deg, #343c64, #6b78aa); border-radius: 20px; color: #fff; display: flex; font-size: 24px; font-weight: 800; height: 72px; justify-content: center; width: 72px; }
.customer-identity h1 { font-size: 35px; margin: 0 0 4px; }
.customer-identity section > strong,
.customer-identity section > small { display: block; }
.customer-identity section > small { color: var(--ops-muted); margin-top: 4px; }
.customer-360-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.memory-ledger > header > div > span { color: var(--ops-muted); display: block; font-size: 14px; margin-top: 7px; }
.memory-ledger > header > button { background: #f0eeff; border: 0; border-radius: 10px; color: #5143cf; cursor: pointer; font-weight: 750; min-height: 40px; padding: 8px 13px; }
.memory-group { margin-top: 25px; }
.memory-group > h3 { color: #4a556f; font-size: 13px; letter-spacing: .035em; margin: 0 0 10px; text-transform: uppercase; }
.memory-group > h3 span { background: var(--ops-soft); border-radius: 99px; color: var(--ops-muted); font-size: 11px; margin-left: 5px; padding: 3px 7px; }
.memory-fact-grid { display: grid; gap: 10px; }
.memory-fact { border: 1px solid var(--ops-line); border-radius: 14px; padding: 15px; }
.memory-fact.sensitive { background: #fffdf5; }
.memory-fact.restricted { background: #fff6f5; }
.memory-fact > header { align-items: center !important; display: grid !important; gap: 11px !important; grid-template-columns: auto 1fr auto; }
.memory-source { align-items: center; background: var(--ops-mint); border-radius: 9px; color: #087a4d; display: flex; height: 36px; justify-content: center; width: 36px; }
.memory-source.shopify { background: #eff9e8; }
.memory-source img { height: 23px; width: 23px; }
.memory-fact > header > div { display: grid; gap: 2px; }
.memory-fact > header small { color: var(--ops-muted); font-size: 12px; }
.memory-fact > header strong { font-size: 16px; }
.memory-fact > header i { background: var(--ops-mint); border-radius: 99px; color: #087a4d; font-size: 11px; font-style: normal; padding: 5px 8px; }
.memory-fact > p { color: var(--ops-muted); font-size: 12px; margin: 11px 0 0 47px; }
.memory-fact > footer { align-items: center; display: flex; gap: 10px; justify-content: space-between; margin: 12px 0 0 47px; }
.memory-fact > footer > span { color: var(--ops-muted); font-size: 11px; }
.memory-fact > footer > div { display: flex; gap: 4px; }
.memory-fact > footer form { margin: 0; }
.memory-fact > footer button { background: transparent; border: 0; color: #4f5ff7; cursor: pointer; font-size: 12px; font-weight: 700; padding: 5px; }
.memory-fact > footer button.danger { color: #b5473a; }

.customer-history-card > a,
.customer-orders-card > a { align-items: center; border-top: 1px solid #edf0f6; color: inherit; display: grid; gap: 10px; grid-template-columns: auto 1fr auto; min-height: 62px; padding: 9px 0; text-decoration: none; }
.customer-history-card > a > i { background: #d9dee8; border-radius: 50%; height: 9px; width: 9px; }
.customer-history-card > a > i.open { background: #27b67a; box-shadow: 0 0 0 4px #e0f8ed; }
.customer-history-card a > span,
.customer-orders-card a > span { display: grid; gap: 3px; }
.customer-history-card small,
.customer-orders-card small { color: var(--ops-muted); }
.customer-orders-card img { height: 28px; width: 28px; }
.customer-orders-card a > b { font-size: 13px; }
.memory-policy-card { background: linear-gradient(145deg, #f2f0ff, #fff) !important; }
.memory-policy-card h2 { font-size: 25px; margin: 0; }
.memory-policy-card ul { color: #4b5672; display: grid; font-size: 13px; gap: 9px; line-height: 1.45; list-style: none; margin: 18px 0 0; padding: 0; }
.memory-policy-card li::before { color: #24a56e; content: "✓"; font-weight: 800; margin-right: 8px; }

.memory-dialog > section { max-width: 620px; }
.memory-dialog > section > header { align-items: center; display: flex; justify-content: space-between; }
.memory-dialog > section > header small { color: #6673a6; font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.memory-dialog > section > header h2 { margin: 3px 0 0; }
.memory-dialog form { display: grid; gap: 14px; padding: 20px; }
.memory-dialog label { color: #344054; display: grid; font-size: 13px; font-weight: 700; gap: 6px; }
.memory-dialog input,
.memory-dialog textarea,
.memory-dialog select { background: #fff; border: 1px solid #ccd4e3; border-radius: 10px; color: #101828; font: inherit; min-height: 44px; padding: 10px 12px; }
.memory-field-pair { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.memory-dialog form > p { background: #f6f8fc; border-radius: 10px; color: var(--ops-muted); font-size: 12px; line-height: 1.45; margin: 0; padding: 10px; }
.memory-dialog form > footer { display: flex; gap: 9px; justify-content: flex-end; }

.customer-memory-card { border: 1px solid #dfe5f0; border-radius: 14px; margin: 12px; overflow: hidden; }
.customer-memory-card > header { align-items: center; display: flex; justify-content: space-between; padding: 13px 14px; }
.customer-memory-card > header > div { align-items: center; display: flex; gap: 7px; }
.customer-memory-card > header span { color: #6656e7; }
.customer-memory-card > header h3 { font-size: 15px; margin: 0; }
.customer-memory-card > header a,
.customer-memory-card > footer a { color: #4f5ff7; font-size: 12px; font-weight: 700; text-decoration: none; }
.customer-memory-card > div { display: grid; gap: 7px; padding: 0 14px 12px; }
.customer-memory-card article { align-items: center; background: #f7f8fc; border-radius: 9px; display: grid; gap: 3px 8px; grid-template-columns: 1fr auto; padding: 9px 10px; }
.customer-memory-card article small { color: #667085; grid-column: 1; }
.customer-memory-card article strong { font-size: 13px; grid-column: 1; }
.customer-memory-card article span { align-items: center; color: #268057; display: flex; font-size: 10px; grid-column: 2; grid-row: 1 / span 2; }
.customer-memory-card article img { height: 15px; margin-right: 3px; width: 15px; }
.customer-memory-card > div > p { color: #667085; font-size: 12px; }
.customer-memory-card > footer { align-items: center; border-top: 1px solid #edf0f6; color: #667085; display: flex; font-size: 10px; justify-content: space-between; padding: 10px 14px; }

html[data-theme="dark"] .operations-center,
html[data-theme="dark"] .customer-360-page {
  --ops-ink: #f1f4fb;
  --ops-muted: #9ca8be;
  --ops-line: #2c3548;
  --ops-soft: #20283a;
  background: #111724;
}
html[data-theme="dark"] .operations-center .panel,
html[data-theme="dark"] .customer-360-page .panel,
html[data-theme="dark"] .operations-metrics a,
html[data-theme="dark"] .customer-360-metrics article,
html[data-theme="dark"] .memory-fact { background: #192132; }
html[data-theme="dark"] .operations-metrics .metric-ai,
html[data-theme="dark"] .operations-metrics .metric-approval,
html[data-theme="dark"] .operations-metrics .metric-alert { background: #192132; }
html[data-theme="dark"] .memory-dialog input,
html[data-theme="dark"] .memory-dialog textarea,
html[data-theme="dark"] .memory-dialog select { background: #141b29; border-color: #3b465b; color: #f1f4fb; }

@media (max-width: 1250px) {
  .operations-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .operations-focus-grid,
  .operations-main-grid,
  .customer-360-grid { grid-template-columns: 1fr; }
}

@media (max-width: 850px) {
  .operations-center,
  .customer-360-page { padding: 18px; }
  .operations-hero,
  .customer-360-head { align-items: flex-start; flex-direction: column; }
  .operations-metrics,
  .customer-360-metrics,
  .operations-lower-grid { grid-template-columns: 1fr 1fr; }
  .approval-row { align-items: start; grid-template-columns: auto 1fr; }
  .approval-row time,
  .approval-row-actions { grid-column: 2; }
  .operations-saved-queues { grid-template-columns: 1fr; }
  .memory-fact > footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .operations-metrics,
  .customer-360-metrics,
  .operations-lower-grid,
  .memory-field-pair { grid-template-columns: 1fr; }
  .operations-metrics a,
  .customer-360-metrics article { min-height: 116px; }
  .operations-employees > div > a { grid-template-columns: auto 1fr; }
  .operations-employees a > em,
  .operations-employees a > b { grid-column: 2; }
  .memory-fact > header { grid-template-columns: auto 1fr !important; }
  .memory-fact > header i { grid-column: 2; justify-self: start; }
  .memory-fact > p,
  .memory-fact > footer { margin-left: 0; }
}
