/* ============================================================
   PatientQ — Admin Styles
   ============================================================ */

.admin-layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: calc(100vh - 56px);
}

/* ── Sidebar ── */
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--g200);
  padding: 1.25rem;
  overflow-y: auto;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
}

.sidebar-section { margin-bottom: 1.75rem; }

.sidebar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--g400);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-card {
  background: var(--g50);
  border-radius: var(--rsm);
  padding: 10px 13px;
  margin-bottom: 8px;
}
.stat-num       { font-size: 24px; font-weight: 500; color: var(--navy); line-height: 1; }
.stat-num.green { color: var(--teal); }
.stat-num.amber { color: var(--amb); }
.stat-lbl       { font-size: 12px; color: var(--g400); margin-top: 3px; }

/* Feed */
.feed-item {
  display: flex; gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--g100);
}
.feed-item:last-child { border-bottom: none; }
.feed-dot {
  width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0; margin-top: 4px;
}
.feed-dot.sent     { background: var(--g300); }
.feed-dot.opened   { background: #3b82f6; }
.feed-dot.progress { background: var(--amb); }
.feed-dot.complete { background: #16a34a; }
.feed-dot.error    { background: #e24b4a; }
.feed-text { font-size: 12px; color: var(--g700); line-height: 1.4; }
.feed-time { font-size: 11px; color: var(--g400); margin-top: 1px; }

/* Integration card */
.integration-card {
  background: var(--navy);
  border-radius: var(--rsm);
  padding: 12px 14px;
}
.int-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.int-row:last-of-type { border-bottom: none; }
.int-key  { font-size: 11px; color: rgba(255,255,255,0.5); }
.int-val  { font-size: 11px; color: rgba(255,255,255,0.8); font-family: monospace; word-break: break-all; max-width: 60%; text-align: right; }
.int-badge {
  font-size: 10px; padding: 2px 9px; border-radius: 10px;
  font-weight: 500;
}
.int-badge.ok      { background: rgba(22,163,74,0.2);  color: #86efac; }
.int-badge.missing { background: rgba(239,68,68,0.15); color: #fca5a5; }
.int-badge.checking{ background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }
.int-link {
  display: block; font-size: 11px; color: var(--teal-mid);
  text-decoration: none; margin-top: 8px;
  opacity: 0.8;
}
.int-link:hover { opacity: 1; }

/* ── Admin Main ── */
.admin-main {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
}

/* Card header */
.card-header { margin-bottom: 1.25rem; }
.card-title    { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--navy); }
.card-subtitle { font-size: 13px; color: var(--g600); margin-top: 3px; }

/* Clients table */
.table-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--g200);
  overflow: hidden;
  margin-bottom: 2rem;
}
.clients-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.clients-table th {
  text-align: left; padding: 9px 13px;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--g400);
  font-weight: 500;
  border-bottom: 1px solid var(--g200);
  background: var(--g50);
  white-space: nowrap;
}
.clients-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--g100);
  vertical-align: middle;
}
.clients-table tr:last-child td { border-bottom: none; }
.clients-table tr:hover td { background: var(--g50); }
.cname  { font-weight: 500; color: var(--navy); font-size: 13px; }
.cemail { font-size: 11px; color: var(--g400); margin-top: 2px; }
.pkg-tag {
  font-size: 11px; padding: 2px 9px;
  border-radius: 4px; font-weight: 500;
  background: var(--teal-light); color: var(--teal-dark);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--g200); }
  .admin-main { padding: 1.25rem; }
}
