/* Centres OS — extends Sales CRM chrome */
.cos-page { --cos-accent: #0f766e; }
.cos-page[data-theme="teal"] { --sl-accent: #0f766e; }

.cos-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  min-height: calc(100vh - 64px);
}

.cos-side {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 14px;
  border-right: 1px solid #1e293b;
}

.cos-side-brand {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 4px;
  color: #fff;
}

.cos-side-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0 0 18px;
}

.cos-nav-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 4px;
  text-decoration: none;
  box-sizing: border-box;
}

.cos-nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.cos-nav-btn.active { background: var(--cos-accent, #0f766e); color: #fff; font-weight: 600; }
.cos-nav-btn.stub { opacity: 0.72; }

.cos-main { padding: 20px 22px 40px; background: #f8fafc; }

.cos-hurray {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.cos-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.cos-kpi span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 6px;
}

.cos-kpi strong {
  font-size: 1.45rem;
  color: #0f172a;
  font-weight: 700;
}

.cos-kpi em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 0.78rem;
  color: #0f766e;
  font-weight: 600;
}

.cos-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.cos-panel h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.cos-panel p.sl-meta { margin-top: 0; }

.cos-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cos-settings-grid .sl-field.full { grid-column: 1 / -1; }

.cos-stub-note {
  border-left: 3px solid #0f766e;
  padding: 10px 14px;
  background: #f0fdfa;
  border-radius: 0 10px 10px 0;
  margin: 12px 0;
  font-size: 0.9rem;
}

.cos-centre-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}

.cos-centre-chip {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

.cos-centre-chip.active {
  border-color: #0f766e;
  background: #ccfbf1;
  color: #115e59;
  font-weight: 600;
}

.cos-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.cos-hurray-sm { margin-bottom: 12px; }
.cos-hurray-sm .cos-kpi strong { font-size: 1.15rem; }

.cos-search {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 180px;
  font-size: 0.88rem;
}

.cos-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.cos-tab {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

.cos-tab.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
  font-weight: 600;
}

.cos-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: auto;
}

.cos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cos-table th,
.cos-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
}

.cos-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f8fafc;
}

.cos-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}

.cos-badge-lead { background: #fef3c7; color: #92400e; }
.cos-badge-active { background: #d1fae5; color: #065f46; }

.cos-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.cos-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.cos-drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: #fff;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
}

.cos-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.cos-drawer-head h2 { margin: 0; font-size: 1.1rem; }
.cos-drawer-body { padding: 16px 18px; overflow: auto; flex: 1; }

.cos-drawer-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.cos-drawer-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.cos-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cos-chip-list .cos-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  min-width: 160px;
}

.cos-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

@media (max-width: 860px) {
  .cos-shell { grid-template-columns: 1fr; }
  .cos-side {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px;
  }
  .cos-side-brand, .cos-side-sub { width: 100%; }
  .cos-nav-btn { width: auto; margin: 0; }
  .cos-settings-grid { grid-template-columns: 1fr; }
  .cos-search { min-width: 0; width: 100%; }
}
