.brand-kicker,
.section-kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}
.button:disabled { opacity: .55; cursor: not-allowed; }
.button.primary { background: var(--brand); color: white; }
.button.secondary { background: #e2e8f0; color: #0f172a; }
.button.danger { background: #b42318; color: #fff; }
.button.danger-soft { border: 1px solid #fecaca; background: #fff5f5; color: #b42318; }
.button.small { padding: 7px 10px; font-size: .84rem; }

.stack-form { display: grid; gap: 16px; }
.stack-form label { display: grid; gap: 7px; font-size: .9rem; font-weight: 600; }
.stack-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  background: white;
  color: var(--text);
}
.stack-form input:focus { outline: 2px solid rgba(37, 99, 235, .2); border-color: var(--accent); }
.form-message { min-height: 1.2em; margin: 0; color: var(--danger); font-size: .9rem; }

.nav-button {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  color: #dbeafe;
  background: transparent;
}
.nav-button:hover:not(:disabled), .nav-button.active { background: rgba(255,255,255,.11); color: white; }
.nav-button:disabled { opacity: .38; cursor: not-allowed; }

.badge,
.environment-badge {
  display: inline-flex;
  width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
}
.badge { background: rgba(255,255,255,.12); color: white !important; }
.environment-badge { background: #dbeafe; color: #1d4ed8; }

.metric-card,
.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.metric-card { padding: 18px; display: grid; gap: 9px; }
.metric-card span { color: var(--muted); font-size: .88rem; }
.metric-card strong { font-size: 1.55rem; }
.metric-card.emphasis { border-color: #bfdbfe; }
.panel-card { padding: 20px; }
.panel-title span { color: var(--muted); font-size: .8rem; }

.data-list { margin: 14px 0 0; display: grid; gap: 12px; }
.data-list div { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; font-weight: 700; text-align: right; }

.toast {
  position: fixed;
  z-index: 1200;
  right: 20px;
  top: 20px;
  max-width: min(420px, calc(100vw - 40px));
  background: #111827;
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.toast.error { background: #7f1d1d; }

body.modal-open-v2 { overflow: hidden; }
.modal-root-v2 { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; }
.modal-root-v2.hidden { display: none; }
.modal-backdrop-v2 { position: absolute; inset: 0; background: rgba(15, 23, 42, .58); backdrop-filter: blur(4px); }
.modal-dialog-v2 {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid #dbe2ea;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
}
.modal-dialog-v2[data-size="sm"] { width: min(520px, calc(100vw - 48px)); }
.modal-dialog-v2[data-size="xl"] { width: min(1180px, calc(100vw - 48px)); }
.modal-header-v2 {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255,255,255,.97);
}
.modal-header-v2 h3 { margin: 4px 0 0; font-size: 1.35rem; }
.modal-subtitle-v2 { margin: 7px 0 0; max-width: 760px; color: #667085; line-height: 1.5; }
.modal-close-v2 { border: 0; background: #f1f5f9; width: 38px; height: 38px; border-radius: 12px; font-size: 1.45rem; line-height: 1; cursor: pointer; }
.modal-body-v2 { padding: 24px; }
.modal-form-v2 { display: grid; gap: 20px; }
.form-section-v2 { border: 1px solid #e5e7eb; border-radius: 16px; padding: 18px; background: #fbfcfe; }
.form-section-v2 > h4 { margin: 0 0 16px; }
.modal-footer-v2 { position: sticky; bottom: -24px; display: flex; justify-content: flex-end; gap: 10px; margin: 0 -24px -24px; padding: 16px 24px; border-top: 1px solid #e5e7eb; background: #fff; }
.modal-confirm-actions-v2 { display: flex; justify-content: flex-end; gap: 10px; }
.modal-related-v2 { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
.modal-back-link-v2 { border: 0; background: transparent; color: #2563eb; font-weight: 700; padding: 0 0 14px; cursor: pointer; }

@media (max-width: 760px) {
  .modal-root-v2 { padding: 0; align-items: end; }
  .modal-dialog-v2,
  .modal-dialog-v2[data-size="sm"],
  .modal-dialog-v2[data-size="xl"] { width: 100%; max-height: 94vh; border-radius: 22px 22px 0 0; }
  .modal-header-v2, .modal-body-v2 { padding-left: 16px; padding-right: 16px; }
  .modal-footer-v2 { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}