:root {
  --primary: #6d5aed;
  --primary-2: #4cc9f0;
  --bg: #06060a;
  --surface: #0a0a10;
  --surface-2: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #ececf1;
  --muted: #7a7a8c;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* ── Discloud-style hosting card ── */
.dc-card {
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

/* Header */
.dc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 16px;
}

.dc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
}
.dc-avatar.is-online  { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.25);  color: #4ade80; }
.dc-avatar.is-starting{ background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.25); color: #fbbf24; }
.dc-avatar.is-offline { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.2);   color: #f87171; }

.dc-header-info {
  flex: 1;
  min-width: 0;
}

.dc-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dc-header-title strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(122,122,140,0.2);
  background: rgba(122,122,140,0.08);
  color: var(--muted);
  white-space: nowrap;
}
.dc-status-pill.is-online  { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.25);  color: #4ade80; }
.dc-status-pill.is-starting{ background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.25); color: #fbbf24; }
.dc-status-pill.is-offline { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.2);   color: #f87171; }

.dc-header-sub {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.dc-header-sub span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dc-header-sub i {
  font-size: 12px;
}

/* Control buttons */
.dc-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dc-ctrl {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dc-ctrl:disabled { opacity: 0.35; cursor: not-allowed; }

.dc-ctrl-start:hover:not(:disabled)  { background: rgba(34,197,94,0.12);  border-color: rgba(34,197,94,0.3);  color: #4ade80; }
.dc-ctrl-stop:hover:not(:disabled)   { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.3);  color: #f87171; }
.dc-ctrl-restart:hover:not(:disabled){ background: rgba(109,90,237,0.12); border-color: rgba(109,90,237,0.3); color: #a78bfa; }

/* Metrics tab toolbar */
.dc-metrics-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 14px;
}

/* Gauge grid */
.dc-gauges-grid {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 8px 20px 28px;
  flex-wrap: wrap;
}

.dc-gauge-wrap {
  display: grid;
  grid-template-rows: 110px auto;
  justify-items: center;
  gap: 8px;
}

.dc-gauge-inner {
  position: relative;
  width: 110px;
  height: 110px;
}

.dc-gauge-inner .dc-gauge-svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.dc-gauge-inner .dc-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dc-gauge-track {
  fill: none;
  stroke: rgba(255,255,255,0.07);
  stroke-width: 8;
}

.dc-gauge-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.4,0,0.2,1);
}

.dc-gauge-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.dc-gauge-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

/* Network + info rows */
.dc-metrics-net {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border-top: 1px solid var(--border);
  background: var(--border);
}

.dc-metrics-net-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  background: var(--card-bg, #0e0e14);
}
.dc-metrics-net-row--full {
  grid-column: 1 / -1;
}

.dc-metrics-net-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.dc-metrics-net-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.dc-net-up   { color: #4ade80; }
.dc-net-down { color: #60a5fa; }

/* Action feedback */
.dc-action-msg {
  min-height: 0;
  margin: 0 20px;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  display: none;
}
.dc-action-msg:not(:empty) {
  display: block;
  padding: 8px 0 4px;
}
.dc-action-msg.is-success { color: #4ade80; }
.dc-action-msg.is-error   { color: #f87171; }
.dc-action-msg.is-warning { color: #fcd34d; }

/* Tabs */
.dc-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  gap: 0;
}

.dc-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.dc-tab i {
  font-size: 14px;
}

.dc-tab:hover { color: var(--text); }

.dc-tab.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

/* Panels */
.dc-panel {
  padding: 14px 0 4px;
}

/* Empty state */
.dc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 24px;
  color: var(--muted);
  text-align: center;
}
.dc-empty i  { font-size: 34px; opacity: 0.25; }
.dc-empty p  { margin: 0; font-size: 13px; }

/* ── Hosting portal card (legacy, kept for backwards compat) ── */
.hosting-portal-card {
  padding: 0;
  overflow: hidden;
}

.hosting-portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.hosting-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hosting-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(76, 201, 240, 0.08);
  border: 1px solid rgba(76, 201, 240, 0.15);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--primary-2);
  flex-shrink: 0;
}

.hosting-portal-header strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.hosting-portal-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.member-portal-status.is-inactive {
  background: rgba(122, 122, 140, 0.1);
  border-color: rgba(122, 122, 140, 0.16);
  color: var(--muted);
}

.member-portal-status.is-offline {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #f87171;
}

/* ── Bot panel ── */
.bot-panel {
  border-top: 1px solid var(--border);
  position: relative;
}

.bot-panel-accent {
  height: 3px;
  background: rgba(122, 122, 140, 0.25);
}

.bot-panel.is-online .bot-panel-accent {
  background: linear-gradient(90deg, #16a34a, #4ade80 55%, #22d3ee);
}

.bot-panel.is-starting .bot-panel-accent {
  background: linear-gradient(90deg, #d97706, #fbbf24);
  animation: accentPulse 1.1s ease-in-out infinite;
}

.bot-panel.is-offline .bot-panel-accent {
  background: linear-gradient(90deg, #b91c1c, #f87171);
}

@keyframes accentPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.bot-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.bot-panel-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  background: rgba(109, 90, 237, 0.1);
  border: 1px solid rgba(109, 90, 237, 0.18);
  color: var(--primary);
}

.bot-avatar.is-online {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.bot-avatar.is-starting {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.bot-avatar.is-offline {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.bot-panel-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-panel-name strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-panel-name span {
  font-size: 11px;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}

.bot-status-badge.is-online {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.bot-status-badge.is-starting {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.bot-status-badge.is-offline {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.bot-status-badge.is-unknown {
  background: rgba(122, 122, 140, 0.1);
  border: 1px solid rgba(122, 122, 140, 0.15);
  color: var(--muted);
}

.bot-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.bot-status-badge.is-online .bot-status-dot {
  animation: botStatusPulse 2.4s ease-in-out infinite;
}

.bot-status-badge.is-starting .bot-status-dot {
  animation: botStatusPulse 0.7s ease-in-out infinite;
}

@keyframes botStatusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.bot-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.bot-metric-tile {
  padding: 14px 18px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-metric-tile:last-child {
  border-right: none;
}

.bot-metric-tile-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bot-metric-tile-label i {
  font-size: 11px;
}

.bot-metric-tile-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.bot-metric-tile-value.is-unavailable {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.bot-metric-network-mini {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bot-metric-network-mini span {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
}

.bot-metric-network-mini .net-up { color: #4ade80; }
.bot-metric-network-mini .net-down { color: #60a5fa; }

.bot-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.bot-control-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}

.bot-control-meta i {
  font-size: 14px;
  flex-shrink: 0;
}

.bot-panel-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-bot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
  font-family: inherit;
}

.btn-bot:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-bot i { font-size: 14px; }

.btn-bot-start {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.22);
  color: #4ade80;
}

.btn-bot-start:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.35);
}

.btn-bot-restart {
  background: rgba(109, 90, 237, 0.12);
  border-color: rgba(109, 90, 237, 0.25);
  color: #a78bfa;
}

.btn-bot-restart:hover:not(:disabled) {
  background: rgba(109, 90, 237, 0.22);
  border-color: rgba(109, 90, 237, 0.38);
}

.btn-bot-stop {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.btn-bot-stop:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.32);
}

.bot-panel-empty {
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
}

.bot-panel-empty i {
  font-size: 36px;
  opacity: 0.3;
}

.bot-panel-empty p {
  margin: 0;
  font-size: 13px;
}

.hosting-action-message {
  min-height: 0;
  margin: 0 20px 14px;
  color: var(--muted);
  font-size: 12px;
  display: none;
}

.hosting-action-message:not(:empty) {
  display: block;
}

.hosting-action-message.is-success {
  color: #4ade80;
}

.hosting-action-message.is-error {
  color: #f87171;
}

/* ── Bot extra sections (logs + commit) ── */

.bot-extra-sections {
  border-top: 1px solid var(--border);
}

.bot-extra-section {
  border-bottom: 1px solid var(--border);
}

.bot-extra-section:last-child {
  border-bottom: none;
}

.bot-extra-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  gap: 8px;
}

.bot-extra-section-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.bot-extra-section-toggle span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.bot-extra-section-toggle span i {
  font-size: 14px;
}

.bot-extra-section-toggle .toggle-arrow {
  font-size: 16px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.bot-extra-section.is-open .bot-extra-section-toggle {
  color: var(--text);
}

.bot-extra-section.is-open .toggle-arrow {
  transform: rotate(180deg);
}

/* ── Logs section ── */

.bot-extra-section-body {
  padding: 0 0 16px;
  animation: fadeSlideIn 0.18s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bot-logs-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 12px;
}

.btn-bot-log-refresh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-bot-log-refresh:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-bot-log-refresh:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-bot-log-refresh i {
  font-size: 13px;
}

.btn-bot-log-refresh.is-spinning i {
  animation: logRefreshSpin 0.65s linear infinite;
}

@keyframes logRefreshSpin {
  to { transform: rotate(360deg); }
}

.bot-log-auto-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.bot-log-auto-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 13px;
  height: 13px;
  cursor: pointer;
}

.bot-log-auto-label.is-active {
  color: #4ade80;
}

.bot-logs-container {
  margin: 0 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #050508;
  overflow: hidden;
  min-height: 120px;
  max-height: 320px;
  position: relative;
}

.bot-logs-output {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 320px;
  overflow-y: auto;
  padding: 14px 16px;
  margin: 0;
  font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
  font-size: 11.5px;
  line-height: 1.65;
  color: #a8ffb0;
  white-space: pre-wrap;
  word-break: break-all;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.bot-logs-output::-webkit-scrollbar { width: 5px; }
.bot-logs-output::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.bot-logs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 20px;
  color: var(--muted);
  text-align: center;
}

.bot-logs-empty i {
  font-size: 28px;
  opacity: 0.3;
}

.bot-logs-empty p {
  margin: 0;
  font-size: 12px;
}

/* ── Commit / Upload section ── */

.bot-commit-zone {
  padding: 0 20px;
}

.bot-commit-dropzone {
  border: 2px dashed rgba(109, 90, 237, 0.3);
  border-radius: 10px;
  background: rgba(109, 90, 237, 0.04);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.bot-commit-dropzone:hover {
  border-color: rgba(109, 90, 237, 0.55);
  background: rgba(109, 90, 237, 0.08);
}

.bot-commit-dropzone.is-dragover {
  border-color: var(--primary);
  background: rgba(109, 90, 237, 0.14);
  box-shadow: 0 0 0 3px rgba(109, 90, 237, 0.12);
}

.bot-commit-dropzone i {
  font-size: 32px;
  color: var(--primary);
  opacity: 0.7;
}

.bot-commit-dropzone strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.bot-commit-dropzone span {
  font-size: 12px;
  color: var(--muted);
}

.bot-commit-dropzone small {
  font-size: 11px;
  color: rgba(122, 122, 140, 0.6);
  margin-top: 4px;
}

.bot-commit-preview {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.bot-commit-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.bot-commit-file-info > i {
  font-size: 28px;
  color: var(--primary);
  flex-shrink: 0;
}

.bot-commit-file-info > div {
  flex: 1;
  min-width: 0;
}

.bot-commit-file-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-commit-file-info span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.bot-commit-remove {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.bot-commit-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.bot-commit-send-row {
  padding: 0 16px 14px;
}

.bot-commit-send {
  width: 100%;
  justify-content: center;
}

.bot-commit-message {
  min-height: 0;
  margin: 6px 20px 0;
  font-size: 12px;
  color: var(--muted);
  display: none;
}

.bot-commit-message:not(:empty) {
  display: block;
}

.bot-commit-message.is-success {
  color: #4ade80;
}

.bot-commit-message.is-error   { color: #f87171; }
.bot-commit-message.is-warning { color: #fcd34d; }

.bot-commit-progress {
  margin: 10px 20px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bot-commit-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.bot-commit-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, #a78bfa 100%);
  border-radius: 99px;
  transition: width 0.25s ease;
}

.bot-commit-progress-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 34px;
  text-align: right;
}

.bot-commit-progress.is-processing .bot-commit-progress-bar {
  width: 100%;
  animation: commitPulse 1.2s ease-in-out infinite;
}

@keyframes commitPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

.bot-commit-sending {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}

.bot-commit-sending-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.bot-commit-sending-header i {
  font-size: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

.bot-commit-sending-header span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-commit-log {
  margin: 0;
  padding: 10px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 140px;
  overflow-y: auto;
  background: transparent;
}

@media (max-width: 900px) {
  .bot-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bot-metric-tile:nth-child(2) {
    border-right: none;
  }

  .bot-metric-tile:nth-child(1),
  .bot-metric-tile:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .bot-metric-tile:nth-child(3) {
    border-right: 1px solid var(--border);
  }

  .bot-panel-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .bot-panel-actions {
    width: 100%;
  }

  .btn-bot {
    flex: 1;
    justify-content: center;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 140;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
}

.toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 16, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(76, 201, 240, 0.12);
  color: var(--primary-2);
  font-size: 15px;
}

.toast.is-success .toast-icon { background: rgba(34,197,94,0.14);  color: #8df0b3; }
.toast.is-error   .toast-icon { background: rgba(239,68,68,0.14);   color: #ff9d9d; }
.toast.is-warning .toast-icon { background: rgba(251,191,36,0.14);  color: #fcd34d; }

.toast-body strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(109, 90, 237, 0.2), transparent 40%),
    rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(10px);
  transition: opacity .25s ease, visibility .25s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-box {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 24px 26px;
  min-width: min(280px, calc(100vw - 32px));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 17, 24, 0.92);
  box-shadow: var(--shadow);
}

.page-loader-box strong {
  font-size: 15px;
}

.page-loader-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--primary-2);
  animation: spin .8s linear infinite;
}

.btn .page-loader-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

a {
  color: inherit;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
}

.ambient {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(120px);
}

.ambient-1 {
  width: 520px;
  height: 520px;
  background: var(--primary);
  opacity: 0.08;
  top: -180px;
  left: -90px;
}

.ambient-2 {
  width: 460px;
  height: 460px;
  background: var(--primary-2);
  opacity: 0.08;
  bottom: -140px;
  right: -80px;
}

.auth {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  overflow: hidden;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  width: min(520px, 100%);
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.auth-card {
  width: 100%;
  padding: 28px 24px 24px;
  display: grid;
  gap: 20px;
  justify-items: center;
}

.auth-title h2 {
  margin: 0;
  text-align: center;
  font-size: 22px;
}

.auth-actions {
  display: grid;
  gap: 16px;
  width: 100%;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 15px 18px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}

.btn i {
  font-size: 18px;
}

.auth-actions .btn,
.auth-email-form .btn {
  width: 100%;
  justify-content: center;
}

.btn-primary {
  background: #1a1a28;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.btn-primary:hover {
  background: #22223a;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-secondary:hover {
  transform: translateY(-1px);
}

.btn-discord {
  background: #5865F2;
  color: #fff;
  border-color: transparent;
}

.btn-discord:hover {
  background: #4752C4;
  border-color: transparent;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #11131b;
  color: var(--text);
  border-color: var(--border);
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.login-divider .line {
  height: 1px;
  background: var(--border);
}

.login-divider .or {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

.login-hint {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(109, 90, 237, .08);
  border: 1px solid rgba(109, 90, 237, .16);
  color: var(--text);
  font-size: 13px;
  display: grid;
  gap: 4px;
  text-align: center;
}

.login-hint strong {
  color: var(--primary-2);
}

.auth-note,
.status-text,
.muted {
  color: var(--muted);
}

.auth-note {
  text-align: center;
  font-size: 12px;
  margin: 0;
}

.auth-note .link {
  color: var(--primary-2);
  text-decoration: none;
}

.auth-note .link:hover {
  text-decoration: underline;
}

.status-text {
  margin: 0;
  min-height: 20px;
  font-size: 13px;
}

.status-text.is-error {
  color: #ff8a8a;
}

.status-text.is-success {
  color: #7ef0c1;
}

.auth-modal[hidden] {
  display: none !important;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.auth-modal-card {
  position: relative;
  z-index: 1;
  width: min(540px, 94vw);
  padding: 22px;
  display: grid;
  gap: 16px;
  justify-items: center;
  background: #0f1118;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.auth-email-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: center;
  justify-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #11131b;
  text-align: center;
}

.auth-email-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}

.auth-email-copy h3 {
  margin: 2px 0 6px;
  font-size: 20px;
}

.auth-email-copy {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.auth-modal-kicker {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.auth-modal-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-email-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  padding: 8px;
  margin: 16px 0 10px;
  border-radius: 14px;
  background: #11131b;
  border: 1px solid var(--border);
}

.chip {
  border: 1px solid var(--border);
  border-radius: 12px;
  height: 42px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.form input {
  width: 100%;
  background: #11131b;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
}

.auth-modal .status-text {
  width: 100%;
  text-align: center;
}

.layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100dvh;
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
  overflow-y: auto;
}

.brand,
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  justify-content: center;
  min-height: 44px;
  text-align: center;
}

.brand-name,
.wordmark {
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(109, 90, 237, .08);
  border-color: rgba(109, 90, 237, .25);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
}

.nav-item i {
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.workspace-home {
  display: grid;
  gap: 26px;
  min-height: calc(100dvh - 132px);
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(109, 90, 237, 0.08), rgba(109, 90, 237, 0) 42%),
    var(--surface);
}

.workspace-home.panel {
  margin-bottom: 0;
}

.workspace-home-head {
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.workspace-home-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.workspace-home-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.workspace-home-head p {
  margin: 0;
  max-width: 640px;
}

/* ── Dashboard metrics ── */
.dashboard-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dash-metric {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color .18s ease, background .18s ease;
}

.dash-metric:hover {
  border-color: rgba(109, 90, 237, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.dash-metric-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 22px;
  flex-shrink: 0;
}

.dash-metric-green  { background: rgba(34, 197, 94, 0.12);  border: 1px solid rgba(34, 197, 94, 0.22);  color: #4ade80; }
.dash-metric-blue   { background: rgba(96, 165, 250, 0.12); border: 1px solid rgba(96, 165, 250, 0.22); color: #60a5fa; }
.dash-metric-amber  { background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.22); color: #fbbf24; }
.dash-metric-purple { background: rgba(167, 139, 250, 0.12);border: 1px solid rgba(167, 139, 250, 0.22);color: #a78bfa; }
.dash-metric-cyan   { background: rgba(76, 201, 240, 0.12); border: 1px solid rgba(76, 201, 240, 0.22); color: #4cc9f0; }
.dash-metric-teal   { background: rgba(45, 212, 191, 0.12); border: 1px solid rgba(45, 212, 191, 0.22); color: #2dd4bf; }
.dash-metric-rose   { background: rgba(251, 113, 133, 0.12);border: 1px solid rgba(251, 113, 133, 0.22);color: #fb7185; }

.dash-metric-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dash-metric-body span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-metric-body strong {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-metric-body small {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Dashboard charts ── */
.dashboard-charts-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dash-chart-card {
  display: grid;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.dash-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-chart-head strong {
  font-size: 14px;
  font-weight: 700;
}

.dash-chart-head .muted {
  font-size: 12px;
}

.dash-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 110px;
}

.dash-chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  height: 100%;
}

.dash-chart-bar-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.dash-chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.dash-chart-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #6d5aed 0%, #4eb6ff 100%);
}

.dash-chart-bar-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: capitalize;
  line-height: 1;
}

.dash-chart-hbars {
  display: grid;
  gap: 14px;
}

.dash-chart-hbar-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 12px;
}

.dash-chart-hbar-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-chart-hbar-track {
  height: 8px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}

.dash-chart-hbar-fill {
  height: 100%;
  border-radius: 99px;
}

.dash-chart-hbar-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.dash-chart-empty {
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
  margin: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar .left,
.topbar .right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
}

.icon-btn:hover {
  box-shadow: var(--shadow);
}

.account-menu-wrap {
  position: relative;
}

.account-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.account-toggle img,
.account-menu-head img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.account-toggle i {
  font-size: 18px;
  color: var(--muted);
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #0f1118;
  box-shadow: var(--shadow);
}

.account-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--border);
}

.account-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-meta strong,
.account-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-meta span {
  color: var(--muted);
  font-size: 12px;
}

.account-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 10px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}

.account-menu-link:hover {
  background: rgba(109, 90, 237, .08);
  border-color: rgba(109, 90, 237, .25);
}

.content {
  padding: 24px;
  display: block;
}

.route-view[hidden] {
  display: none !important;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.panel h2,
.plan-editor h3 {
  margin: 0;
  font-size: 18px;
}

.stats-grid,
.modules-grid,
.plans-grid {
  display: grid;
  gap: 14px;
}

.dashboard-empty {
  display: grid;
  min-height: calc(100vh - 120px);
  place-items: center;
}

.client-portal-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.client-portal-page .dashboard-empty {
  min-height: 100dvh;
  padding: 0;
  place-items: stretch;
}

.client-portal-page .dashboard-empty-panel {
  margin: auto;
}

.dashboard-empty-panel {
  display: grid;
  gap: 16px;
  width: min(720px, 100%);
  padding: 36px;
  min-height: 320px;
  align-content: center;
  justify-items: center;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(109, 90, 237, 0.14), transparent 48%),
    rgba(255, 255, 255, 0.03);
}

.dashboard-empty-panel h2 {
  margin: 0;
  max-width: 640px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.dashboard-empty-panel .muted {
  max-width: 560px;
  margin: 0;
}

.dashboard-empty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(76, 201, 240, 0.22);
  background: rgba(76, 201, 240, 0.08);
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dashboard-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.member-client-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: 100%;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.member-client-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  gap: 14px;
  width: 280px;
  height: 100dvh;
  min-width: 280px;
  padding: 18px 18px 16px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: width .2s ease, min-width .2s ease, padding .2s ease;
  overflow-x: hidden;
  overflow-y: auto;
}

.member-client-brand {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
}

.member-client-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.member-client-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.member-client-account img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.member-client-account strong,
.member-client-account span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-client-account span {
  color: var(--muted);
  font-size: 12px;
}

.member-client-nav {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.member-client-nav-item,
.member-client-footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.member-client-nav-item:hover,
.member-client-footer-link:hover,
.member-client-nav-item.active {
  background: rgba(109, 90, 237, 0.12);
  border-color: rgba(109, 90, 237, 0.24);
  color: #ffffff;
}

.member-client-sidebar-footer {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.member-client-main {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: 28px;
  min-height: 100dvh;
  min-width: 0;
  align-content: start;
}

.member-client-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.member-client-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-client-menu-toggle {
  display: inline-grid;
}

.member-client-header h2 {
  margin: 6px 0 0;
  font-size: 28px;
}

.member-client-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(76, 201, 240, 0.08);
  border: 1px solid rgba(76, 201, 240, 0.18);
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.member-client-route {
  display: grid;
  align-content: start;
  min-height: 0;
}

.member-client-cards {
  display: grid;
  gap: 14px;
}

.billing-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.billing-overview-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.billing-overview-card span,
.billing-overview-card small {
  color: var(--muted);
}

.billing-overview-card strong {
  font-size: 24px;
  line-height: 1.1;
}

.member-portal-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.billing-plan-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.billing-plan-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.billing-plan-card-head strong {
  font-size: 15px;
}

.billing-plan-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.billing-plan-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.billing-plan-card-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.billing-plan-card-item span {
  color: var(--muted);
  font-size: 13px;
}

.billing-plan-card-item strong {
  font-size: 18px;
}

.member-portal-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.member-portal-card-head strong {
  display: block;
  font-size: 16px;
}

.member-portal-card-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.member-portal-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(126, 240, 193, 0.18);
  background: rgba(126, 240, 193, 0.08);
  color: #7ef0c1;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.member-portal-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.member-portal-metric {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.member-portal-metric span,
.member-portal-inline-meta span {
  color: var(--muted);
  font-size: 13px;
}

.member-portal-metric strong {
  font-size: 20px;
}

.billing-card .member-portal-metrics {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.billing-card .member-portal-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.billing-card .member-portal-metric + .member-portal-metric {
  border-top: 1px solid var(--border);
}

.billing-card .member-portal-metric strong {
  font-size: 16px;
  text-align: right;
}

.member-portal-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.member-portal-inline-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.member-mode.member-client-active .content {
  padding: 0;
  min-height: 100vh;
}

body.member-client-sidebar-collapsed .member-client-shell {
  grid-template-columns: 104px minmax(0, 1fr);
}

body.member-client-sidebar-collapsed .member-client-sidebar {
  width: 104px;
  min-width: 104px;
  padding-inline: 12px;
}

body.member-client-sidebar-collapsed .member-client-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

body.member-client-sidebar-collapsed .member-client-brand .wordmark {
  display: none;
}

body.member-client-sidebar-collapsed .member-client-brand::after {
  display: none;
}

body.member-client-sidebar-collapsed .member-client-brand p,
body.member-client-sidebar-collapsed .member-client-account div,
body.member-client-sidebar-collapsed .member-client-nav-item span,
body.member-client-sidebar-collapsed .member-client-footer-link span {
  display: none;
}

body.member-client-sidebar-collapsed .member-client-account,
body.member-client-sidebar-collapsed .member-client-nav-item,
body.member-client-sidebar-collapsed .member-client-footer-link {
  justify-content: center;
  padding-inline: 0;
}

body.member-client-sidebar-collapsed .member-client-account {
  width: 56px;
  justify-self: center;
  padding: 8px 0;
}

body.member-client-sidebar-collapsed .member-client-nav-item,
body.member-client-sidebar-collapsed .member-client-footer-link {
  width: 52px;
  justify-self: center;
}

.member-services-list {
  display: grid;
  gap: 14px;
  width: 100%;
  margin-top: 6px;
}

.member-service-card {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.member-service-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.member-service-head strong {
  display: block;
  font-size: 16px;
}

.member-service-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.member-service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-service-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
}

.member-service-pill-highlight {
  border-color: rgba(126, 240, 193, 0.2);
  background: rgba(126, 240, 193, 0.08);
  color: #7ef0c1;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid-users {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.module-card,
.plan-editor {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.stat-card span,
.module-status,
.plan-preview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 28px;
}

.modules-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-status.is-active {
  color: #7ef0c1;
}

.module-status.is-locked {
  color: #f5c06d;
}

.module-status.is-soon {
  color: var(--primary-2);
}

.plans-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.client-register-panel {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.client-register-grid label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.client-register-grid label:last-child {
  grid-column: 1 / -1;
}

.client-register-grid input,
.client-register-grid select {
  width: 100%;
  background: #11131b;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.client-register-grid input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.client-hosting-preview {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
}

.plan-editor {
  display: grid;
  gap: 12px;
}

.plan-editor label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.plan-editor input {
  width: 100%;
  background: #11131b;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
}

.plan-preview strong {
  font-size: 22px;
  color: var(--primary-2);
}

.users-list {
  display: grid;
  gap: 14px;
}

.clients-list {
  display: grid;
  gap: 14px;
}

.client-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.client-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-card-head strong {
  display: block;
  font-size: 16px;
}

.client-card-head span {
  color: var(--muted);
  font-size: 13px;
}

.client-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-meta-row-muted {
  color: var(--muted);
  font-size: 13px;
}

.client-meta-row-muted span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.client-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
}

.client-meta-pill-highlight {
  border-color: rgba(126, 240, 193, 0.2);
  background: rgba(126, 240, 193, 0.08);
  color: #7ef0c1;
}

.client-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.user-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-row-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-row-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.user-row-meta strong,
.user-row-meta span,
.user-row-secondary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  align-content: center;
}

.user-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}

.user-role-member {
  color: #9ca3af;
}

.user-role-client {
  color: #7ef0c1;
}

.user-role-support {
  color: #4cc9f0;
}

.user-role-financial {
  color: #f5c06d;
}

.user-role-manager {
  color: #8d7bff;
}

.user-role-owner {
  color: #ff6b6b;
}

.user-auth-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.user-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.role-select {
  min-width: 150px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #11131b;
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
}

.user-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-compact {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
  color: #ffb4b4;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.18);
}

.btn-warning {
  background: rgba(245, 192, 109, 0.14);
  border-color: rgba(245, 192, 109, 0.35);
  color: #f5c06d;
}

.btn-warning:hover {
  background: rgba(245, 192, 109, 0.22);
  transform: translateY(-1px);
}

.btn-success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
  color: #8df0b3;
}

.btn-success:hover {
  background: rgba(34, 197, 94, 0.2);
}

.btn-register-client {
  background: #1a1a28;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
  box-shadow: none;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.btn-register-client:hover {
  background: #22223a;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}


.user-empty {
  padding: 22px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  color: var(--muted);
  text-align: center;
}

.client-empty {
  padding: 22px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  color: var(--muted);
  text-align: center;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.overlay {
  display: none;
}

.is-hidden {
  display: none !important;
}

body.member-mode .sidebar,
body.member-mode .topbar {
  display: none;
}

body.member-mode .app-shell {
  grid-template-columns: 1fr;
}

body.member-mode .content {
  min-height: 100vh;
  padding: 24px;
}

body.member-mode .dashboard-empty {
  min-height: calc(100vh - 48px);
}

body.sidebar-collapsed .sidebar {
  width: 86px;
  padding-inline: 12px;
}

body.sidebar-collapsed .brand {
  justify-content: center;
}

body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .nav-item span {
  display: none;
}

body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .sidebar-footer .nav-item {
  justify-content: center;
  padding-inline: 0;
}

@media (max-width: 900px) {
  body.member-client-menu-open,
  body.sidebar-open {
    overflow: hidden;
  }

  .member-client-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
    border-radius: 0;
    border-inline: 0;
  }

  .member-client-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(320px, calc(100vw - 28px));
    min-width: 0;
    padding: 18px;
    grid-template-rows: auto auto auto auto;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    transform: translateX(-110%);
    transition: transform .2s ease;
    overflow-y: auto;
    box-shadow: var(--shadow);
  }

  body.member-client-menu-open .member-client-sidebar {
    transform: translateX(0);
  }

  body.member-client-menu-open .member-client-main {
    opacity: .22;
    pointer-events: none;
    user-select: none;
  }

  body.member-client-sidebar-collapsed .member-client-shell {
    grid-template-columns: 1fr;
  }

  body.member-client-sidebar-collapsed .member-client-sidebar {
    width: min(320px, calc(100vw - 28px));
    min-width: 0;
    padding: 18px;
  }

  body.member-client-sidebar-collapsed .member-client-brand {
    display: grid;
    justify-items: center;
    min-height: auto;
  }

  body.member-client-sidebar-collapsed .member-client-brand .wordmark {
    display: inline;
  }

  body.member-client-sidebar-collapsed .member-client-brand::after {
    display: none;
  }

  body.member-client-sidebar-collapsed .member-client-brand p,
  body.member-client-sidebar-collapsed .member-client-account div,
  body.member-client-sidebar-collapsed .member-client-nav-item span,
  body.member-client-sidebar-collapsed .member-client-footer-link span {
    display: block;
  }

  body.member-client-sidebar-collapsed .member-client-account,
  body.member-client-sidebar-collapsed .member-client-nav-item,
  body.member-client-sidebar-collapsed .member-client-footer-link {
    width: 100%;
    justify-self: stretch;
    justify-content: flex-start;
    padding-inline: 14px;
  }

  .member-client-nav,
  .member-client-sidebar-footer {
    grid-template-columns: 1fr;
  }

  .member-client-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-client-header-main {
    width: 100%;
    justify-content: flex-start;
  }

  .member-portal-card-head {
    flex-direction: column;
  }

  .member-portal-metrics {
    grid-template-columns: 1fr;
  }

  .billing-card .member-portal-metric {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-card .member-portal-metric strong {
    text-align: left;
  }

  .billing-overview-grid {
    grid-template-columns: 1fr;
  }

  .billing-plan-card-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 30;
    transition: transform .2s ease;
    box-shadow: var(--shadow);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .overlay {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(7, 9, 18, 0.72);
    backdrop-filter: blur(3px);
  }

  body.sidebar-open .overlay,
  body.member-client-menu-open .overlay {
    display: block;
  }

  body.sidebar-collapsed .sidebar {
    width: 260px;
    padding-inline: 14px;
  }

  body.sidebar-collapsed .brand-name,
  body.sidebar-collapsed .nav-item span {
    display: inline;
  }

  body.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding-inline: 14px;
  }

  .stats-grid,
  .modules-grid,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .workspace-home {
    min-height: calc(100vh - 94px);
    padding: 20px;
  }

  .dashboard-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-charts-section {
    grid-template-columns: 1fr;
  }

  .dash-chart-hbar-row {
    grid-template-columns: 72px 1fr auto;
  }

  .client-register-grid {
    grid-template-columns: 1fr;
  }

  .client-register-grid label:last-child {
    grid-column: auto;
  }

  .user-row {
    grid-template-columns: 1fr;
  }

  .client-card-head {
    flex-direction: column;
  }

  .member-service-head {
    flex-direction: column;
  }

  .client-card-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .user-row-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .role-select,
  .user-row-actions .btn {
    width: 100%;
  }

  .user-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
  }

  .role-select,
  .user-action-buttons .btn {
    width: 100%;
  }

  .content {
    padding: 16px 12px;
  }
}

@media (max-width: 640px) {
  .dashboard-metrics-grid {
    grid-template-columns: 1fr;
  }

  .member-client-main,
  .member-client-sidebar {
    padding: 18px;
  }

  .member-client-shell {
    border-radius: 0;
  }

  .member-client-nav-item,
  .member-client-footer-link {
    min-height: 44px;
  }

  .auth {
    min-height: 100dvh;
    padding: 14px;
  }

  .auth-grid {
    width: min(100%, 420px);
    max-height: calc(100dvh - 28px);
  }

  .auth-card {
    padding: 22px 18px 20px;
    gap: 18px;
  }

  .auth-title h2 {
    font-size: 20px;
    line-height: 1.3;
  }

  .auth-actions {
    gap: 14px;
  }

  .btn {
    min-height: 50px;
    padding: 14px 16px;
    border-radius: 14px;
  }

  .login-divider {
    gap: 10px;
  }

  .login-hint {
    padding: 12px 14px;
  }

  .auth-modal {
    padding: 14px;
  }

  .auth-modal-card {
    width: min(100%, 420px);
    padding: 18px;
  }

  .auth-note,
  .status-text {
    text-align: center;
  }

  .dashboard-empty-panel {
    padding: 28px 20px;
    min-height: 280px;
  }

}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Developer role badge ─────────────────────────────────────────────────── */
.user-role-developer { background: rgba(96, 211, 148, 0.12); color: #60d394; }

/* ── Nav lock badge ───────────────────────────────────────────────────────── */
.nav-lock-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  font-size: 11px;
  color: #f5c06d;
  opacity: 0.85;
}

/* ── Payment pending banner ───────────────────────────────────────────────── */
.payment-pending-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  padding: 14px 18px;
  background: rgba(245, 192, 109, 0.08);
  border: 1px solid rgba(245, 192, 109, 0.25);
  border-radius: 12px;
  color: var(--text);
}

.payment-pending-banner-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 192, 109, 0.12);
  border-radius: 10px;
  font-size: 20px;
  color: #f5c06d;
}

.payment-pending-banner-body {
  flex: 1;
}

.payment-pending-banner-body strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #f5c06d;
  margin-bottom: 2px;
}

.payment-pending-banner-body p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ── Payment gate overlay ─────────────────────────────────────────────────── */
.payment-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 40px 20px;
}

.payment-gate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  max-width: 360px;
}

.payment-gate-box > i {
  font-size: 48px;
  color: #f5c06d;
  opacity: 0.7;
}

.payment-gate-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.payment-gate-box p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* ── Payment entries ──────────────────────────────────────────────────────── */
.payment-entries-list {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
}

.payment-entries-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.payment-no-charge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.payment-no-charge i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }

.payment-entry-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.payment-entry-card:last-child { margin-bottom: 0; }

.payment-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.payment-entry-head > div > strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.payment-entry-head > div > span {
  font-size: 12px;
  color: var(--muted);
}

.payment-entry-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.payment-entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.payment-entry-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.payment-entry-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.payment-entry-status i { font-size: 7px; }

.payment-status-pending { background: rgba(245,192,109,0.12); color: #f5c06d; }
.payment-status-paid { background: rgba(126,240,193,0.12); color: #7ef0c1; }
.payment-status-overdue { background: rgba(255,107,107,0.12); color: #ff6b6b; }
.payment-status-cancelled { background: rgba(122,122,140,0.12); color: #7a7a8c; }

/* ── Invoice card (redesign) ──────────────────────────────────────────────── */
.inv-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.inv-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.inv-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(109, 90, 237, 0.1);
  border: 1px solid rgba(109, 90, 237, 0.18);
  color: var(--primary);
  font-size: 17px;
  flex-shrink: 0;
}

.inv-header-info {
  flex: 1;
  min-width: 0;
}

.inv-header-info h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-header-info p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.inv-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(126, 240, 193, 0.07);
  border: 1px solid rgba(126, 240, 193, 0.16);
  color: #7ef0c1;
}

.inv-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Summary strip */
.inv-summary {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.inv-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  flex: 1 1 130px;
  border-right: 1px solid var(--border);
}

.inv-summary-item:last-child {
  border-right: none;
}

.inv-summary-item > i {
  font-size: 15px;
  color: var(--muted);
  flex-shrink: 0;
}

.inv-summary-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.inv-summary-item span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.inv-summary-item strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/* Payment list */
.inv-payments {
  padding: 18px 22px;
}

.inv-payments-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.inv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-row {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.inv-row.is-pending {
  border-color: rgba(245, 192, 109, 0.2);
  background: rgba(245, 192, 109, 0.025);
}

.inv-row.is-overdue {
  border-color: rgba(255, 107, 107, 0.22);
  background: rgba(255, 107, 107, 0.03);
}

.inv-row-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
}

.inv-row-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.inv-row-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.inv-row.is-pending .inv-row-type { color: #f5c06d; }
.inv-row.is-overdue .inv-row-type  { color: #ff7a7a; }

.inv-row-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.inv-row-date i { font-size: 11px; }

.inv-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.inv-row-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.inv-row.is-pending .inv-row-amount { color: #f5c06d; }
.inv-row.is-overdue .inv-row-amount  { color: #ff7a7a; }

.inv-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.inv-status-pill i { font-size: 6px; }

.status-pending   { background: rgba(245,192,109,.12); color: #f5c06d; }
.status-paid      { background: rgba(126,240,193,.12); color: #7ef0c1; }
.status-overdue   { background: rgba(255,107,107,.12); color: #ff7a7a; }
.status-cancelled { background: rgba(122,122,140,.12); color: #7a7a8c; }

/* Action button */
.inv-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 14px 12px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.12s;
  border: 1px solid transparent;
}

.inv-pay-btn:hover { opacity: 0.8; transform: translateY(-1px); text-decoration: none; }

.inv-pay-btn.pay-pending {
  background: rgba(109, 90, 237, 0.1);
  color: #a89af7;
  border-color: rgba(109, 90, 237, 0.22);
}

.inv-pay-btn.pay-overdue {
  background: rgba(255, 107, 107, 0.08);
  color: #ff7a7a;
  border-color: rgba(255, 107, 107, 0.2);
}

/* Empty state */
.inv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 28px 16px;
  color: var(--muted);
}

.inv-empty i {
  font-size: 26px;
  opacity: 0.35;
}

.inv-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  max-width: 260px;
}

@media (max-width: 640px) {
  .inv-header {
    padding: 14px 16px;
    gap: 12px;
  }

  .inv-header-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .inv-summary-item {
    flex: 0 0 50%;
    padding: 11px 14px;
    border-right: 1px solid var(--border);
  }

  .inv-summary-item:nth-child(even) {
    border-right: none;
  }

  .inv-summary-item--full {
    flex: 0 0 100%;
    justify-content: center;
    border-right: none;
    border-top: 1px solid var(--border);
  }

  .inv-payments {
    padding: 14px 16px;
  }

  .inv-pay-btn {
    margin: 0 12px 12px;
  }

  .inv-row-body {
    align-items: flex-start;
  }
}

.payment-pix-copy { display: flex; flex-direction: column; gap: 8px; }

.payment-pix-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.payment-pix-emv-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.payment-pix-emv {
  flex: 1;
  font-size: 11px;
  font-family: monospace;
  word-break: break-all;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  max-height: 80px;
  overflow: auto;
}

.payment-pix-mini {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Admin form modal overlay ─────────────────────────────────────────────── */
.admin-form-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 6, 10, 0.86);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-form-overlay.active {
  display: flex;
}

.admin-form-box {
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  background: #0d0d18;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

.admin-form-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #0d0d18;
  z-index: 1;
}

.admin-form-box-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.admin-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.admin-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.admin-form-box-body {
  padding: 22px 24px 26px;
}

/* ── Admin payment groups (redesign) ──────────────────────────────────────── */
.payments-filter-select {
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  outline: none;
  cursor: pointer;
}

.payments-list { margin-top: 8px; display: flex; flex-direction: column; gap: 20px; }

.fad-group {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

.fad-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, border-color 0.15s;
}

.fad-group-head:hover {
  background: rgba(255, 255, 255, 0.04);
}

.fad-group.is-open .fad-group-head {
  border-bottom-color: var(--border);
}

.fad-group-toggle {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 18px;
  transition: transform 0.2s;
}

.fad-group.is-open .fad-group-toggle {
  transform: rotate(180deg);
}

.fad-group-body {
  display: none;
}

.fad-group.is-open .fad-group-body {
  display: block;
}

.fad-group-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(109, 90, 237, 0.12);
  border: 1px solid rgba(109, 90, 237, 0.2);
  color: #a89af7;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.fad-group-info {
  flex: 1;
  min-width: 0;
}

.fad-group-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fad-group-info span {
  font-size: 12px;
  color: var(--muted);
}

.fad-group-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.fad-group-stat {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.fad-group-stat.is-pending { background: rgba(245,192,109,.08); border-color: rgba(245,192,109,.2); color: #f5c06d; }
.fad-group-stat.is-overdue { background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.2); color: #ff7a7a; }

/* Individual payment card */
.fad-card {
  border-left: 3px solid transparent;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.fad-card:last-child { border-bottom: none; }

.fad-card:hover { background: rgba(255, 255, 255, 0.018); }

.fad-card.is-pending { border-left-color: #f5c06d; }
.fad-card.is-overdue { border-left-color: #ff7a7a; }
.fad-card.is-paid    { border-left-color: #7ef0c1; }
.fad-card.is-cancelled { border-left-color: rgba(122,122,140,.4); }

.fad-card-client {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.fad-card-client i { font-size: 12px; }

.fad-card-client strong {
  color: var(--text);
  font-weight: 600;
}

.fad-card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fad-card-left { flex: 1; min-width: 0; }

.fad-type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.fad-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  text-transform: uppercase;
}

.fad-description {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fad-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.fad-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.fad-meta-item i { font-size: 11px; }

.fad-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.fad-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.fad-card.is-pending .fad-amount { color: #f5c06d; }
.fad-card.is-overdue .fad-amount { color: #ff7a7a; }

/* Inline date editor */
.fad-date-editor {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}

.fad-date-editor input[type="date"] {
  background: #11131b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.fad-date-editor label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}

/* Action bar */
.fad-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.fad-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  transition: background 0.12s, color 0.12s;
}

.fad-action:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.fad-action i { font-size: 13px; }

.fad-action.is-active {
  background: rgba(126,240,193,0.1);
  border-color: rgba(126,240,193,0.22);
  color: #7ef0c1;
}

.fad-action.is-overdue-active {
  background: rgba(245,192,109,0.1);
  border-color: rgba(245,192,109,0.22);
  color: #f5c06d;
}

.fad-action--danger {
  color: #ff7a7a;
  border-color: rgba(255,107,107,0.2);
  background: rgba(255,107,107,0.06);
}

.fad-action--danger:hover {
  background: rgba(255,107,107,0.12);
  color: #ffaaaa;
}

.fad-action--save {
  background: rgba(109,90,237,0.12);
  border-color: rgba(109,90,237,0.25);
  color: #a89af7;
}

.fad-action--save:hover {
  background: rgba(109,90,237,0.2);
  color: #c4b8ff;
}

/* Spinner dentro de botões de ação (fad-action não é .btn) */
.fad-action .page-loader-spinner {
  width: 12px;
  height: 12px;
  border-width: 2px;
  flex-shrink: 0;
}

/* Garante que o botão não mude de tamanho durante o loading */
.fad-action[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 640px) {
  .fad-group-head {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .fad-group-stats {
    width: 100%;
    flex-shrink: 1;
  }

  .fad-card {
    padding: 12px 14px;
  }

  .fad-card-body { flex-direction: column; }
  .fad-card-right { flex-direction: row; align-items: center; }

  .fad-actions {
    gap: 6px;
  }

}

/* ── Panel head actions ───────────────────────────────────────────────────── */
.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 16px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

/* ── Project files ────────────────────────────────────────────────────────── */
.project-portal-card { padding: 0; overflow: hidden; }
.project-portal-card > .member-portal-card-head { padding: 18px 20px; }
.project-portal-card > .member-portal-inline-meta { padding: 0 20px 16px; }

.project-files-list {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.project-file-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.project-file-icon { font-size: 22px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

.project-file-info > div > strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-file-info > div > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.project-file-info > div > small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  opacity: 0.7;
}

.project-files-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
}

.project-files-empty i { font-size: 36px; opacity: 0.4; }
.project-files-empty p { font-size: 13px; margin: 0; max-width: 300px; }

/* ── File upload area ─────────────────────────────────────────────────────── */
.file-upload-area {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 8px;
}

.file-upload-form { display: flex; flex-direction: column; gap: 0; }

.label-full { grid-column: 1 / -1; }

/* ── File client filter tabs ──────────────────────────────────────────────── */
.file-client-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0;
}

.file-client-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.file-client-group:last-child { margin-bottom: 0; }

.file-client-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.file-client-group-head strong { font-size: 14px; font-weight: 600; }
.file-client-group-head span { font-size: 12px; color: var(--muted); }

.files-list { margin-top: 4px; }

/* ── btn-sm ───────────────────────────────────────────────────────────────── */
.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
}

/* ── billing-card project portal padding fix ──────────────────────────────── */
.billing-card .payment-entries-list:first-of-type {
  border-top: none;
  padding-top: 0;
}

