body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #0b1020;
  color: #e5e7eb;
}
.login-card {
  max-width: 420px;
  margin: 50px auto;
}
.login-card h2 {
  margin-top: 0;
}
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #111827;
  border-right: 1px solid #1f2937;
  padding: 20px;
}
.brand {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
}
.muted {
  color: #9ca3af;
  font-size: 13px;
}
.main {
  padding: 20px;
}
.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
input, select, button, textarea {
  border-radius: 8px;
  border: 1px solid #374151;
  background: #0f172a;
  color: #e5e7eb;
  padding: 10px;
}
input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}
button {
  background: #4f46e5;
  border: none;
  cursor: pointer;
  font-weight: 600;
  min-height: 40px;
}
button.secondary {
  background: #374151;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  border-bottom: 1px solid #1f2937;
  padding: 10px 8px;
  text-align: left;
}
th {
  color: #9ca3af;
  font-weight: 600;
}
.table-wrap {
  overflow-x: auto;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid #1f2937;
}
.clients-table {
  min-width: 100%;
}
.clients-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.06);
}
.clients-toolbar {
  margin: 4px 0 0;
  min-height: 1.25rem;
  font-size: 13px;
}
.sa-cell-clientid {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}
.sa-actions-card h3 {
  margin-top: 0;
}
.sa-selected-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #1f2937;
}
.sa-selected-bar-fields {
  flex: 1;
  min-width: 220px;
}
.sa-inline-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 6px;
}
.sa-selected-input {
  width: 100%;
  box-sizing: border-box;
}
.sa-action-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sa-action-row {
  display: grid;
  grid-template-columns: minmax(130px, 170px) 1fr;
  gap: 12px 16px;
  align-items: center;
}
@media (max-width: 720px) {
  .sa-action-row {
    grid-template-columns: 1fr;
  }
  .sa-action-label {
    margin-bottom: -4px;
  }
}
.sa-action-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sa-action-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.sa-action-controls input,
.sa-action-controls select {
  min-width: 120px;
}
.sa-edit-fields {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: 520px;
}
.sa-edit-fields .sa-edit-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.sa-edit-input-wide {
  max-width: 100%;
}
.sa-action-row-edit .sa-action-controls {
  align-items: stretch;
}
.sa-action-row-edit #edit-client-save-btn {
  align-self: flex-start;
  margin-top: 4px;
}
.sa-action-msg {
  margin-top: 14px;
  margin-bottom: 0;
}
.status-pill {
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  display: inline-block;
}
.status-active { background: #064e3b; color: #6ee7b7; }
.status-suspended { background: #7f1d1d; color: #fca5a5; }
.hidden { display: none !important; }
.danger { color: #fca5a5; }
.sidebar-nav {
  margin: 0 0 12px;
}
.sidebar-link {
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.sidebar-link:hover {
  text-decoration: underline;
}

/* --- Create-site wizard (light card, setup/index style) --- */
.sa-create-card {
  background: transparent;
  border: none;
  padding: 0;
}
.sa-wizard-shell {
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid #334155;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
@supports (backdrop-filter: blur(6px)) {
  .sa-wizard-shell {
    backdrop-filter: blur(8px);
  }
}
.sa-wizard {
  max-width: 640px;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  border: 1px solid #cbd5e1;
}
.sa-wizard-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}
.sa-wizard-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sa-wizard-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}
.sa-wiz-step-indicator {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}
.sa-wiz-progress-track {
  margin-top: 1rem;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.sa-wiz-progress-fill {
  height: 100%;
  width: 25%;
  border-radius: 999px;
  background: #4f46e5;
  transition: width 0.35s ease;
}
.sa-wizard-body {
  padding: 1.5rem 1.75rem 1.25rem;
}
.sa-wizard-panel {
  display: none;
  animation: saWizFade 0.35s ease;
}
.sa-wizard-panel.active {
  display: block;
}
@keyframes saWizFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.sa-wiz-welcome {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}
.sa-wiz-welcome-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  width: 5rem;
  height: 5rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  font-size: 2.5rem;
}
.sa-wiz-welcome-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
}
.sa-wiz-welcome-text {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
}
.sa-wiz-panel-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
.sa-wiz-muted {
  margin: 0 0 1rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}
.sa-wiz-field {
  margin-bottom: 1rem;
}
.sa-wiz-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}
.sa-wiz-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}
.sa-wiz-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f9fafb;
  color: #0f172a;
}
.sa-wiz-input:focus {
  outline: none;
  border-color: #4f46e5;
  background: #fff;
}
.sa-wiz-input.sa-wiz-invalid {
  border-color: #ef4444;
}
.sa-wiz-input-with-status {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sa-wiz-input-with-status .sa-wiz-input {
  flex: 1;
  min-width: 0;
}
.sa-wiz-map-status {
  flex-shrink: 0;
  min-width: 1.5rem;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1;
}
.sa-wiz-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(79, 70, 229, 0.2);
  border-left-color: #4f46e5;
  border-radius: 50%;
  animation: saSpin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes saSpin {
  to { transform: rotate(360deg); }
}
.sa-wiz-error {
  min-height: 1.25rem;
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #dc2626;
}
.sa-wiz-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.35rem;
}
.sa-wiz-linkish {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4f46e5;
  cursor: pointer;
  text-decoration: underline;
}
.sa-wiz-preview {
  margin-top: 0.5rem;
}
.sa-wiz-preview img {
  max-height: 120px;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.sa-wizard-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.sa-wiz-footer-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
}
.sa-wiz-next-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sa-wizard-footer button.secondary {
  background: #e2e8f0;
  color: #334155;
}
.sa-wizard-footer button.secondary:hover {
  background: #cbd5e1;
}
.sa-create-msg {
  margin-top: 12px;
  padding: 0 4px;
}
