:root {
  --bg: #f4f6fb;
  --card: #fff;
  --text: #1a2233;
  --muted: #5c6b82;
  --accent: #2563eb;
  --accent2: #0ea5e9;
  --danger: #dc2626;
  --border: #dbe3ef;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.shell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.shell-brand { display: flex; gap: 12px; align-items: center; }
.shell-brand .mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; display: grid; place-items: center; font-weight: 700;
}
.shell-brand h1 { margin: 0; font-size: 18px; }
.shell-brand p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.shell-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
button, .btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}
button.primary, .btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.danger { color: var(--danger); border-color: #fecaca; }
.page { max-width: 1100px; margin: 0 auto; padding: 28px 20px 48px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(20, 40, 80, 0.04);
}
.card h2 { margin: 0 0 8px; font-size: 22px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
input, select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.error { color: var(--danger); margin-top: 10px; }
.success { color: #059669; margin-top: 10px; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
}
.profile-card h3 { margin: 0 0 6px; }
.profile-card .meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.profile-card .row { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef2ff;
  color: #3730a3;
}
.hidden { display: none !important; }
#workspaceFrame {
  width: 100%;
  border: 0;
  min-height: calc(100vh - 72px);
  background: #fff;
}

/* ── Team access (admin panel) ─────────────────────────────────────────────── */
.meta { font-size: 13px; color: var(--muted); }

.access-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 14px;
}
.access-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 600;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--border);
}
.access-table td {
  padding: 11px 10px 11px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.access-table tr:last-child td { border-bottom: 0; }
.access-table td:last-child { text-align: right; }
.access-table button { padding: 5px 11px; font-size: 13px; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pill.ok   { background: #dcfce7; color: #166534; }
.pill.wait { background: #fef3c7; color: #92400e; }

@media (max-width: 560px) {
  .access-table th:nth-child(2),
  .access-table td:nth-child(2) { display: none; }
}
