/* Prototype-only helpers (not part of the design system). */

/* Variant switcher (floating bottom-center pill). */
.proto-switcher {
  position: fixed;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: var(--color-white);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-3);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  z-index: var(--z-toast);
  font-size: var(--text-small-size);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.proto-switcher-btn {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-full);
  width: 32px; height: 32px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s ease;
}
.proto-switcher-btn:hover { background: rgba(255, 255, 255, 0.24); }
.proto-switcher-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.proto-switcher-label {
  padding: 0 var(--space-2);
  min-width: 180px;
  text-align: center;
  font-family: var(--font-body);
}

[data-variant] { display: none; }
[data-variant].is-active { display: block; }

/* Sub-shape A: inbox/triage layout for the alerts page. */
.inbox-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: var(--space-5);
  align-items: start;
}
.inbox-list {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-height: 70vh;
  overflow-y: auto;
}
.inbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  position: sticky; top: 0;
  font-size: var(--text-small-size);
  font-weight: 700;
  color: var(--color-text-muted);
}
.inbox-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background-color .15s ease;
  background: var(--color-white);
}
.inbox-row:hover { background: var(--color-primary-light); }
.inbox-row.is-active {
  background: var(--color-primary-light);
  box-shadow: inset 3px 0 0 var(--color-primary);
}
.inbox-row.is-done { opacity: 0.55; }
.inbox-row-title {
  font-weight: 700;
  font-size: var(--text-body-sm-size);
  color: var(--color-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-row-meta {
  font-size: var(--text-caption-size);
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.inbox-row-when {
  font-size: var(--text-caption-size);
  color: var(--color-text-muted);
  font-weight: 700;
  white-space: nowrap;
}
.inbox-detail {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  min-height: 320px;
}
.inbox-detail h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.inbox-detail .detail-meta {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.inbox-detail .detail-body {
  color: var(--color-text);
  margin-bottom: var(--space-5);
  line-height: 1.55;
}
.bulk-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-body-sm-size);
}
@media (max-width: 880px) {
  .inbox-layout { grid-template-columns: 1fr; }
  .inbox-list { max-height: none; }
}

/* Sub-shape B: client cards grid (alternative to the dense table). */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}
.client-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.client-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.client-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.client-card-name {
  font-weight: 700;
  font-size: var(--text-body-size);
  color: var(--color-text);
}
.client-card-sub {
  font-size: var(--text-caption-size);
  color: var(--color-text-muted);
}
.client-card-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--color-border);
}
.client-card-kpi {
  text-align: center;
}
.client-card-kpi .num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}
.client-card-kpi .lab {
  font-size: var(--text-caption-size);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.client-card-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.client-card-actions {
  display: flex; gap: var(--space-2); justify-content: flex-end;
}

/* Wizard stepper for the client form. */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-body-sm-size);
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.wizard-step.is-active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.wizard-step.is-done {
  background: var(--color-secondary-light);
  color: var(--color-secondary-hover);
  border-color: var(--color-secondary);
}
.wizard-step .step-num {
  width: 24px; height: 24px;
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-caption-size);
  font-weight: 700;
}
.wizard-step.is-active .step-num { background: var(--color-white); color: var(--color-primary); }
.wizard-step.is-done .step-num { background: var(--color-secondary); color: var(--color-white); }
.wizard-step .step-arrow {
  color: var(--color-border);
}
.wizard-panel { display: none; }
.wizard-panel.is-active { display: block; }
.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.proto-toolbar {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  box-shadow: var(--shadow-md);
  font-size: var(--text-small-size);
  color: var(--color-text-muted);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.proto-toolbar a { font-weight: 700; color: var(--color-primary); }
.proto-toolbar a:hover { color: var(--color-primary-hover); }

/* Alert page: mobile-first column with comfortable spacing */
.alert-stack { display: flex; flex-direction: column; gap: var(--space-3); }

/* Alert state visual variants — already covered by .is-done / .is-snoozed / .is-archived */

/* Stat card on alerts top */
.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--pink-100), var(--pink-300));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--color-white);
}
.stat-card .stat-num { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: var(--color-text); line-height: 1; }
.stat-card .stat-label { font-size: var(--text-small-size); color: var(--color-text-muted); margin-top: var(--space-1); }

/* Tabs */
.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
  overflow-x: auto;
}
.tabs button, .tabs a {
  background: none;
  border: none;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-body-sm-size);
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tabs button:hover, .tabs a:hover { color: var(--color-text); }
.tabs button.active, .tabs a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Login layout */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--color-surface);
}
.auth-art {
  background: linear-gradient(135deg, var(--pink-100) 0%, var(--lavender-100) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
  color: var(--color-text);
  text-align: center;
  gap: var(--space-5);
}
.auth-art img {
  width: 140px; height: 140px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  background: var(--color-white);
  padding: var(--space-2);
}
.auth-art .auth-art-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
}
.auth-art .auth-art-sub {
  max-width: 320px;
  color: var(--color-text);
  font-size: var(--text-body-size);
  opacity: .9;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-6);
}
.auth-form { width: 100%; max-width: 380px; }

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}

/* Page-level helpers */
.section { margin-bottom: var(--space-8); }
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  color: var(--color-text-muted);
}

/* Compact list — used for dependents inside the client form */
.compact-list {
  display: flex; flex-direction: column; gap: var(--space-2);
}
.compact-list-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: var(--space-3);
  align-items: center;
}
@media (max-width: 560px) {
  .compact-list-row { grid-template-columns: 1fr 1fr; }
  .compact-list-row .compact-list-remove { grid-column: 1 / -1; justify-self: end; }
}

/* Index/launcher cards */
.proto-launcher {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5);
}
.proto-launcher a.card {
  display: block;
  padding: var(--space-6);
  text-decoration: none;
  color: var(--color-text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.proto-launcher a.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.proto-launcher a.card .icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--color-white);
  margin-bottom: var(--space-3);
}
.proto-launcher a.card.pink .icon { background: linear-gradient(135deg, var(--pink-200), var(--pink-400)); }
.proto-launcher a.card.mint .icon { background: linear-gradient(135deg, var(--mint-200), var(--mint-400)); }
.proto-launcher a.card.lavender .icon { background: linear-gradient(135deg, var(--lavender-100), var(--lavender-300)); }
.proto-launcher a.card.yellow .icon { background: linear-gradient(135deg, var(--yellow-100), var(--yellow-200)); color: #8a6a00; }
.proto-launcher a.card .title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: var(--space-1); }
.proto-launcher a.card .desc { font-size: var(--text-body-sm-size); color: var(--color-text-muted); }

/* Push preview (decorative) */
.push-preview {
  background: rgba(61,32,64,0.92);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  box-shadow: var(--shadow-lg);
}
.push-preview img {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.push-preview .push-title { font-weight: 700; font-size: var(--text-body-sm-size); margin-bottom: var(--space-1); }
.push-preview .push-body { font-size: var(--text-small-size); opacity: .85; line-height: 1.45; }
.push-preview .push-meta { font-size: var(--text-caption-size); opacity: .6; margin-top: var(--space-2); text-transform: uppercase; letter-spacing: var(--tracking-label); }
