/*
 * ONG Panel UI v2
 *
 * Loaded after the original application stylesheet.
 * Keep redesign overrides here until the legacy CSS can be retired.
 */

.app-shell-v2 {
  --v2-bg: #0a0c11;
  --v2-sidebar: #0d0f15;
  --v2-header: rgba(12, 14, 20, 0.9);
  --v2-surface: #141720;
  --v2-surface-raised: #181b26;
  --v2-surface-soft: #11141c;
  --v2-input: #0f1219;

  --v2-text: #f4f2f7;
  --v2-text-soft: #d6d2dc;
  --v2-muted: #9893a3;

  --v2-line: rgba(255, 255, 255, 0.085);
  --v2-line-strong: rgba(255, 255, 255, 0.14);

  --v2-accent: #8b5cf6;
  --v2-accent-strong: #7c3aed;
  --v2-accent-soft: rgba(139, 92, 246, 0.13);

  --v2-pink: #ec4899;
  --v2-success: #34d399;
  --v2-warning: #fbbf24;
  --v2-danger: #fb7185;

  --v2-radius-lg: 20px;
  --v2-radius: 14px;
  --v2-radius-sm: 10px;

  --v2-shadow:
    0 18px 50px rgba(0, 0, 0, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.025) inset;

  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
  color: var(--v2-text);
  background:
    radial-gradient(
      circle at 82% -10%,
      rgba(124, 58, 237, 0.13),
      transparent 34rem
    ),
    var(--v2-bg);
  color-scheme: dark;
}

/* Shell */

.app-shell-v2 .app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  min-height: 100vh;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.25rem 1rem;
  overflow-y: auto;
  border-right: 1px solid var(--v2-line);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.015),
      transparent 28%
    ),
    var(--v2-sidebar);
  backdrop-filter: none;
}

.app-shell-v2 .app-main {
  min-width: 0;
  padding: 1.35rem 1.6rem 2.5rem;
  background: transparent;
}

.app-shell-v2 .app-page-body {
  display: grid;
  width: min(100%, 1540px);
  min-width: 0;
  gap: 1rem;
  margin: 0 auto;
}

/* Brand */

.app-shell-v2 .brand-mark {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--v2-text);
}

.app-shell-v2 .brand-bubble {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  color: #fff;
  background:
    linear-gradient(
      145deg,
      var(--v2-accent),
      var(--v2-accent-strong)
    );
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.22);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.app-shell-v2 .brand-mark strong {
  color: var(--v2-text);
  font-size: 0.92rem;
}

.app-shell-v2 .brand-mark small {
  margin-top: 0.12rem;
  color: var(--v2-muted);
  font-size: 0.72rem;
}

/* Navigation */

.app-shell-v2 .app-sidebar-nav {
  display: grid;
  gap: 0.22rem;
  margin-top: 0.35rem;
}

.app-shell-v2 .sidebar-section-title {
  margin: 1rem 0 0.3rem;
  padding: 0 0.7rem;
  color: #777280;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.app-shell-v2 .app-sidebar-nav > a,
.app-shell-v2 .sidebar-nested-links a {
  position: relative;
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 0.62rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--v2-muted);
  font-size: 0.88rem;
  font-weight: 680;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.app-shell-v2 .app-sidebar-nav > a:hover,
.app-shell-v2 .sidebar-nested-links a:hover {
  color: var(--v2-text);
  background: rgba(255, 255, 255, 0.035);
}

.app-shell-v2 .app-sidebar-nav > a.active,
.app-shell-v2 .sidebar-nested-links a.active {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.17);
  background: var(--v2-accent-soft);
}

.app-shell-v2 .app-sidebar-nav > a.active::before,
.app-shell-v2 .sidebar-nested-links a.active::before {
  content: "";
  position: absolute;
  left: -0.05rem;
  width: 3px;
  height: 48%;
  border-radius: 999px;
  background: var(--v2-accent);
}

.app-shell-v2 .sidebar-advanced-group {
  margin-top: 0.45rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.app-shell-v2 .sidebar-advanced-group summary {
  padding: 0.7rem 0.75rem;
  color: var(--v2-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.app-shell-v2 .sidebar-advanced-group[open] summary {
  color: var(--v2-text-soft);
}

.app-shell-v2 .sidebar-nested-links {
  display: grid;
  gap: 0.15rem;
  padding: 0 0.4rem 0.45rem;
}

.app-shell-v2 .sidebar-nested-links a {
  min-height: 36px;
  padding-left: 1.1rem;
  font-size: 0.82rem;
}

/* Sidebar status */

.app-shell-v2 .sidebar-callout {
  margin-top: auto;
  padding: 0.9rem;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}

.app-shell-v2 .sidebar-callout span {
  display: inline-flex;
  margin: 0 0 0.55rem;
  padding: 0.32rem 0.55rem;
  border-radius: 8px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  font-size: 0.68rem;
  font-weight: 800;
}

.app-shell-v2 .sidebar-callout p {
  margin: 0;
  color: var(--v2-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* Top bar */

.app-shell-v2 .app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1.35rem -1.6rem 1.1rem;
  padding: 1rem 1.6rem;
  border-bottom: 1px solid var(--v2-line);
  background: var(--v2-header);
  backdrop-filter: blur(20px);
}

.app-shell-v2 .app-kicker {
  margin: 0 0 0.25rem;
  color: #a78bfa;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.17em;
}

.app-shell-v2 .app-topbar h1 {
  margin: 0;
  color: var(--v2-text);
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.app-shell-v2 .topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.app-shell-v2 .user-pill {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.58rem;
  padding: 0.3rem 0.7rem 0.3rem 0.35rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.app-shell-v2 .user-pill > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--v2-accent-soft);
  font-size: 0.75rem;
  font-weight: 850;
}

.app-shell-v2 .user-pill strong,
.app-shell-v2 .user-pill small {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell-v2 .user-pill strong {
  color: var(--v2-text);
  font-size: 0.8rem;
}

.app-shell-v2 .user-pill small {
  margin-top: 0.05rem;
  color: var(--v2-muted);
  font-size: 0.68rem;
}

/* Typography */

.app-shell-v2,
.app-shell-v2 button,
.app-shell-v2 input,
.app-shell-v2 select,
.app-shell-v2 textarea {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.app-shell-v2 .eyebrow {
  margin: 0 0 0.3rem;
  color: #a78bfa;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.app-shell-v2 .muted {
  color: var(--v2-muted);
  line-height: 1.55;
}

/* Cards */

.app-shell-v2 .panel-card,
.app-shell-v2 .stat-card,
.app-shell-v2 .table-card,
.app-shell-v2 .event-card {
  min-width: 0;
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-lg);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.018),
      transparent 44%
    ),
    var(--v2-surface);
  box-shadow: var(--v2-shadow);
  backdrop-filter: none;
}

.app-shell-v2 .panel-card {
  padding: 1.2rem;
}

.app-shell-v2 .panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-shell-v2 .panel-header h2 {
  margin: 0;
  color: var(--v2-text);
  font-size: 1.28rem;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.app-shell-v2 .panel-header p {
  margin-top: 0.45rem;
}

.app-shell-v2 .stat-card {
  min-height: 108px;
  padding: 1rem;
}

.app-shell-v2 .stat-card small,
.app-shell-v2 .stat-card span {
  color: var(--v2-muted);
}

.app-shell-v2 .stat-card strong {
  color: var(--v2-text);
  font-size: 1.7rem;
}

/* Buttons */

.app-shell-v2 .button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 0.88rem;
  border: 1px solid var(--v2-line-strong);
  border-radius: 11px;
  color: var(--v2-text-soft);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 760;
  transition:
    transform 140ms ease,
    color 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.app-shell-v2 .button:hover {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-1px);
}

.app-shell-v2 .button.primary {
  color: #fff;
  border-color: transparent;
  background:
    linear-gradient(
      135deg,
      var(--v2-accent),
      var(--v2-accent-strong)
    );
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.22);
}

.app-shell-v2 .button.primary:hover {
  filter: brightness(1.08);
}

.app-shell-v2 .button.ghost {
  color: var(--v2-text-soft);
  background: rgba(255, 255, 255, 0.025);
}

.app-shell-v2 .button.danger {
  color: #fff;
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(225, 29, 72, 0.72);
  box-shadow: none;
}

.app-shell-v2 .pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 0.65rem;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 9px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.1);
  font-size: 0.69rem;
  font-weight: 820;
}

/* Detail blocks and links */

.app-shell-v2 .detail-grid > div,
.app-shell-v2 .mini-row,
.app-shell-v2 .settings-management-link,
.app-shell-v2 .quick-action-card,
.app-shell-v2 .dashboard-guide-step,
.app-shell-v2 .onboarding-step,
.app-shell-v2 .danger-action-card {
  border-color: var(--v2-line);
  border-radius: var(--v2-radius);
  background: var(--v2-surface-soft);
  box-shadow: none;
}

.app-shell-v2 .detail-grid small,
.app-shell-v2 .mini-row span,
.app-shell-v2 .quick-action-card span,
.app-shell-v2 .settings-management-link span {
  color: var(--v2-muted);
}

.app-shell-v2 .quick-action-card,
.app-shell-v2 .settings-management-link {
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.app-shell-v2 .quick-action-card:hover,
.app-shell-v2 .settings-management-link:hover {
  border-color: rgba(139, 92, 246, 0.34);
  background: #171a24;
  transform: translateY(-2px);
}

/* Forms */

.app-shell-v2 .ong-form input,
.app-shell-v2 .ong-form select,
.app-shell-v2 .ong-form textarea,
.app-shell-v2 input,
.app-shell-v2 select,
.app-shell-v2 textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.68rem 0.78rem;
  border: 1px solid var(--v2-line-strong);
  border-radius: 11px;
  color: var(--v2-text);
  background: var(--v2-input);
  box-shadow: none;
  outline: none;
}

.app-shell-v2 textarea {
  min-height: 112px;
  resize: vertical;
}

.app-shell-v2 .ong-form input:focus,
.app-shell-v2 .ong-form select:focus,
.app-shell-v2 .ong-form textarea:focus,
.app-shell-v2 input:focus,
.app-shell-v2 select:focus,
.app-shell-v2 textarea:focus {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.app-shell-v2 .ong-form label {
  color: var(--v2-text-soft);
  font-size: 0.82rem;
  font-weight: 720;
}

.app-shell-v2 .ong-form label > small {
  color: var(--v2-muted);
  font-size: 0.73rem;
}

/* Details and collapsible panels */

.app-shell-v2 details {
  border-color: var(--v2-line);
  background: rgba(0, 0, 0, 0.12);
}

.app-shell-v2 details > summary {
  color: var(--v2-text-soft);
  font-size: 0.84rem;
  font-weight: 740;
}

.app-shell-v2 details[open] > summary {
  color: #fff;
}

/* Tables */

.app-shell-v2 .table-card {
  overflow-x: auto;
  background: var(--v2-surface);
}

.app-shell-v2 .data-table {
  color: var(--v2-text-soft);
}

.app-shell-v2 .data-table th,
.app-shell-v2 .data-table td {
  padding: 0.8rem 0.9rem;
  border-color: var(--v2-line);
}

.app-shell-v2 .data-table th {
  color: #888291;
  background: rgba(255, 255, 255, 0.015);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.app-shell-v2 .data-table tbody tr {
  transition: background 130ms ease;
}

.app-shell-v2 .data-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.035);
}

/* Code */

.app-shell-v2 .code-card,
.app-shell-v2 .sdk-output {
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius);
  color: #e8e4ef;
  background: #090b10;
  box-shadow: none;
}

.app-shell-v2 .code-card pre,
.app-shell-v2 .sdk-output,
.app-shell-v2 pre,
.app-shell-v2 code {
  font-family:
    "Cascadia Code",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

.app-shell-v2 .code-card pre,
.app-shell-v2 .sdk-output {
  font-size: 0.82rem;
  line-height: 1.65;
  tab-size: 4;
}

.app-shell-v2 code {
  color: #c4b5fd;
  font-size: 0.88em;
}

/* Notifications */

.app-shell-v2 .flash-message {
  border-color: var(--v2-line);
  border-radius: var(--v2-radius);
  color: var(--v2-text-soft);
  background: var(--v2-surface-raised);
}

.app-shell-v2 .flash-success {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.07);
}

.app-shell-v2 .flash-error {
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.07);
}

.app-shell-v2 .flash-warning {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.065);
}

/* Status colours */

.app-shell-v2 .connection-connected {
  color: var(--v2-success);
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.08);
}

.app-shell-v2 .connection-offline {
  color: var(--v2-warning);
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.075);
}

.app-shell-v2 .connection-setup {
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
}

/* Scrollbars */

.app-shell-v2 * {
  scrollbar-width: thin;
  scrollbar-color:
    rgba(139, 92, 246, 0.38)
    rgba(255, 255, 255, 0.025);
}

.app-shell-v2 *::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.app-shell-v2 *::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.app-shell-v2 *::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.38);
  background-clip: padding-box;
}

/* Responsive shell */

@media (max-width: 1180px) {
  .app-shell-v2 {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .app-shell-v2 .app-main {
    padding-inline: 1.2rem;
  }

  .app-shell-v2 .app-topbar {
    margin-inline: -1.2rem;
    padding-inline: 1.2rem;
  }
}

@media (max-width: 900px) {
  .app-shell-v2 {
    display: block;
  }

  .app-shell-v2 .app-sidebar {
    position: relative;
    height: auto;
    min-height: auto;
    padding: 0.9rem;
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  .app-shell-v2 .app-sidebar-nav {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .app-shell-v2 .sidebar-section-title {
    display: none;
  }

  .app-shell-v2 .sidebar-advanced-group {
    margin: 0;
  }

  .app-shell-v2 .sidebar-callout {
    display: none;
  }

  .app-shell-v2 .app-main {
    padding-top: 1rem;
  }

  .app-shell-v2 .app-topbar {
    position: relative;
    margin-top: -1rem;
  }
}

@media (max-width: 720px) {
  .app-shell-v2 .app-topbar {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell-v2 .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .app-shell-v2 .user-pill {
    width: 100%;
  }

  .app-shell-v2 .panel-header {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .app-shell-v2 .app-main {
    padding: 0.85rem;
  }

  .app-shell-v2 .app-topbar {
    margin-inline: -0.85rem;
    padding-inline: 0.85rem;
  }

  .app-shell-v2 .topbar-actions,
  .app-shell-v2 .topbar-actions .button {
    width: 100%;
  }

  .app-shell-v2 .panel-card {
    padding: 1rem;
    border-radius: 16px;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 55B
 * Dashboard and project overview
 * ====================================================== */

.app-shell-v2 .dashboard-command-v2 {
  display: grid;
  gap: 1.15rem;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 92% 0%,
      rgba(139, 92, 246, 0.13),
      transparent 30rem
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.022),
      transparent 55%
    ),
    var(--v2-surface);
}

.app-shell-v2 .dashboard-command-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.app-shell-v2 .dashboard-command-copy {
  max-width: 780px;
}

.app-shell-v2 .dashboard-command-copy h2 {
  margin: 0;
  color: var(--v2-text);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: -0.045em;
}

.app-shell-v2 .dashboard-command-copy .muted {
  margin: 0.55rem 0 0;
}

.app-shell-v2 .dashboard-command-side {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 0.8rem;
}

.app-shell-v2 .dashboard-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.app-shell-v2 .dashboard-metric-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .dashboard-metric-v2 {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
  padding: 0.85rem;
  border: 1px solid var(--v2-line);
  border-radius: 13px;
  color: var(--v2-text);
  background: rgba(6, 8, 13, 0.44);
  text-decoration: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.app-shell-v2 .dashboard-metric-v2:hover {
  border-color: rgba(139, 92, 246, 0.32);
  background: rgba(139, 92, 246, 0.055);
  transform: translateY(-2px);
}

.app-shell-v2 .dashboard-metric-v2 span {
  color: var(--v2-muted);
  font-size: 0.72rem;
}

.app-shell-v2 .dashboard-metric-v2 strong {
  color: var(--v2-text);
  font-size: 1.45rem;
  line-height: 1.15;
}

.app-shell-v2 .dashboard-metric-v2 small {
  overflow: hidden;
  color: #777281;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell-v2 .dashboard-section-grid {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

.app-shell-v2 .dashboard-primary-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
}

.app-shell-v2 .dashboard-activity-grid-v2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-shell-v2 .dashboard-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .dashboard-project-card {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.82rem;
  border: 1px solid var(--v2-line);
  border-radius: 13px;
  color: var(--v2-text);
  background: var(--v2-surface-soft);
  text-decoration: none;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.app-shell-v2 .dashboard-project-card:hover {
  border-color: rgba(139, 92, 246, 0.34);
  background: #171a24;
  transform: translateY(-2px);
}

.app-shell-v2 .dashboard-project-card > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
}

.app-shell-v2 .dashboard-project-card strong,
.app-shell-v2 .dashboard-project-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell-v2 .dashboard-project-card strong {
  font-size: 0.86rem;
}

.app-shell-v2 .dashboard-project-card small {
  margin-top: 0.15rem;
  color: var(--v2-muted);
  font-size: 0.7rem;
}

.app-shell-v2 .dashboard-project-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.1);
  font-size: 0.76rem;
  font-weight: 850;
}

.app-shell-v2 .dashboard-project-status {
  flex: 0 0 auto;
  color: var(--v2-muted);
  font-size: 0.68rem;
  font-weight: 760;
}

.app-shell-v2 .dashboard-project-status.status-connected,
.app-shell-v2 .dashboard-project-status.status-active {
  color: var(--v2-success);
}

.app-shell-v2 .dashboard-project-status.status-paused {
  color: var(--v2-warning);
}

.app-shell-v2 .dashboard-attention-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.app-shell-v2 .dashboard-attention-summary a {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  color: var(--v2-text);
  background: var(--v2-surface-soft);
  text-decoration: none;
}

.app-shell-v2 .dashboard-attention-summary span {
  color: var(--v2-muted);
  font-size: 0.7rem;
}

.app-shell-v2 .dashboard-attention-summary strong {
  font-size: 1.3rem;
}

.app-shell-v2 .dashboard-list-v2 {
  display: grid;
  gap: 0.45rem;
}

.app-shell-v2 .dashboard-list-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--v2-text);
  background: rgba(5, 7, 11, 0.32);
  text-decoration: none;
  transition:
    border-color 130ms ease,
    background 130ms ease;
}

.app-shell-v2 a.dashboard-list-item:hover {
  border-color: rgba(139, 92, 246, 0.22);
  background: rgba(139, 92, 246, 0.045);
}

.app-shell-v2 .dashboard-list-item > div {
  min-width: 0;
}

.app-shell-v2 .dashboard-list-item strong,
.app-shell-v2 .dashboard-list-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell-v2 .dashboard-list-item strong {
  font-size: 0.82rem;
}

.app-shell-v2 .dashboard-list-item span {
  margin-top: 0.15rem;
  color: var(--v2-muted);
  font-size: 0.68rem;
}

.app-shell-v2 .dashboard-list-item > small {
  flex: 0 0 auto;
  color: #716c79;
  font-size: 0.68rem;
  text-align: right;
}

.app-shell-v2 .dashboard-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.app-shell-v2 .dashboard-empty-state {
  display: grid;
  justify-items: start;
  gap: 0.45rem;
  padding: 1.1rem;
  border: 1px dashed var(--v2-line-strong);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.12);
}

.app-shell-v2 .dashboard-empty-state.compact {
  padding: 0.85rem;
}

.app-shell-v2 .dashboard-empty-state p {
  margin: 0;
  color: var(--v2-muted);
  font-size: 0.78rem;
}

.app-shell-v2 .dashboard-audit-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-shell-v2 .dashboard-health-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.app-shell-v2 .dashboard-health-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.app-shell-v2 .dashboard-health-copy h2,
.app-shell-v2 .dashboard-health-copy p {
  margin: 0;
}

.app-shell-v2 .dashboard-health-copy h2 {
  font-size: 1.1rem;
}

.app-shell-v2 .dashboard-health-copy .muted {
  margin-top: 0.3rem;
}

.app-shell-v2 .dashboard-health-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 0.55rem;
}

.app-shell-v2 .dashboard-health-numbers div {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--v2-line);
  border-radius: 11px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .dashboard-health-numbers span {
  color: var(--v2-muted);
  font-size: 0.66rem;
}

.app-shell-v2 .dashboard-health-numbers strong {
  font-size: 1rem;
}

/* Compact project onboarding */

.app-shell-v2 .project-onboarding-card {
  gap: 0.85rem;
}

.app-shell-v2 .project-onboarding-card .panel-header {
  margin-bottom: 0;
}

.app-shell-v2 .project-onboarding-card.onboarding-complete {
  background:
    linear-gradient(
      180deg,
      rgba(52, 211, 153, 0.025),
      transparent 42%
    ),
    var(--v2-surface);
}

.app-shell-v2 .project-onboarding-card .onboarding-progress {
  height: 0.42rem;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
}

.app-shell-v2 .project-onboarding-card .onboarding-progress-bar {
  background:
    linear-gradient(
      90deg,
      var(--v2-accent),
      var(--v2-success)
    );
}

.app-shell-v2 .onboarding-summary-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.app-shell-v2 .onboarding-summary-row > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .onboarding-summary-row > div > span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border: 1px solid var(--v2-line);
  border-radius: 50%;
  color: var(--v2-muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.app-shell-v2 .onboarding-summary-row > div.complete > span {
  color: var(--v2-success);
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.08);
}

.app-shell-v2 .onboarding-summary-row strong,
.app-shell-v2 .onboarding-summary-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell-v2 .onboarding-summary-row strong {
  font-size: 0.75rem;
}

.app-shell-v2 .onboarding-summary-row small {
  margin-top: 0.08rem;
  color: var(--v2-muted);
  font-size: 0.64rem;
}

.app-shell-v2 .onboarding-checklist-details {
  margin-top: 0.1rem;
  padding: 0.7rem 0.8rem;
  border-radius: 13px;
}

.app-shell-v2 .onboarding-checklist-details[open] > summary {
  margin-bottom: 0.8rem;
}

.app-shell-v2 .onboarding-checklist-details .onboarding-step-grid {
  gap: 0.6rem;
}

.app-shell-v2 .onboarding-checklist-details .onboarding-step {
  padding: 0.8rem;
  border-radius: 13px;
}

.app-shell-v2 .onboarding-checklist-details .onboarding-step-number {
  width: 1.7rem;
  height: 1.7rem;
  flex-basis: 1.7rem;
}

.app-shell-v2 .onboarding-checklist-details h3 {
  font-size: 0.82rem;
}

.app-shell-v2 .onboarding-checklist-details p {
  font-size: 0.72rem;
}

@media (max-width: 1280px) {
  .app-shell-v2 .dashboard-metric-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell-v2 .onboarding-summary-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .app-shell-v2 .dashboard-primary-grid {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .dashboard-health-v2,
  .app-shell-v2 .dashboard-health-copy {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .app-shell-v2 .dashboard-command-top {
    flex-direction: column;
  }

  .app-shell-v2 .dashboard-command-side {
    width: 100%;
    justify-items: start;
  }

  .app-shell-v2 .dashboard-command-actions {
    justify-content: flex-start;
  }

  .app-shell-v2 .dashboard-activity-grid-v2,
  .app-shell-v2 .dashboard-project-grid,
  .app-shell-v2 .dashboard-audit-list {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .onboarding-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell-v2 .dashboard-metric-row,
  .app-shell-v2 .dashboard-attention-summary,
  .app-shell-v2 .dashboard-health-numbers,
  .app-shell-v2 .onboarding-summary-row {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .dashboard-command-actions,
  .app-shell-v2 .dashboard-command-actions .button {
    width: 100%;
  }

  .app-shell-v2 .dashboard-list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell-v2 .dashboard-list-item > small {
    text-align: left;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 55C
 * Players, moderation, economy, filters and tables
 * ====================================================== */

/* Shared live-ops page structure */

.app-shell-v2 .route-app-players .stats-grid,
.app-shell-v2 .route-app-moderation .stats-grid,
.app-shell-v2 .route-app-economy .stats-grid,
.app-shell-v2 .route-app-economy-transactions .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.app-shell-v2 .route-app-players .stat-card,
.app-shell-v2 .route-app-moderation .stat-card,
.app-shell-v2 .route-app-economy .stat-card,
.app-shell-v2 .route-app-economy-transactions .stat-card {
  min-height: 96px;
  padding: 0.9rem;
  border-radius: 15px;
}

.app-shell-v2 .route-app-players .stat-card strong,
.app-shell-v2 .route-app-moderation .stat-card strong,
.app-shell-v2 .route-app-economy .stat-card strong,
.app-shell-v2 .route-app-economy-transactions .stat-card strong {
  margin-top: 0.2rem;
  font-size: 1.55rem;
}

/* Filter panels */

.app-shell-v2 .player-filter-form,
.app-shell-v2 .moderation-filter-form,
.app-shell-v2 .economy-filter-form,
.app-shell-v2 .filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  align-items: end;
  gap: 0.75rem;
}

.app-shell-v2 .player-filter-form label,
.app-shell-v2 .moderation-filter-form label,
.app-shell-v2 .economy-filter-form label,
.app-shell-v2 .filter-form label {
  display: grid;
  min-width: 0;
  gap: 0.42rem;
}

.app-shell-v2 .player-filter-form .button,
.app-shell-v2 .moderation-filter-form .button,
.app-shell-v2 .economy-filter-form .button,
.app-shell-v2 .filter-form .button {
  min-height: 44px;
}

.app-shell-v2 .active-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.app-shell-v2 .active-filter-list span {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 0 0.62rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 9px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.08);
  font-size: 0.69rem;
  font-weight: 720;
}

/* Tables */

.app-shell-v2 .table-card {
  max-width: 100%;
  border-radius: 15px;
  background: #0c0f16;
}

.app-shell-v2 .data-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
}

.app-shell-v2 .route-app-economy-transactions .data-table {
  min-width: 1180px;
}

.app-shell-v2 .route-app-moderation .data-table {
  min-width: 1120px;
}

.app-shell-v2 .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid var(--v2-line-strong);
  color: #878190;
  background: #10131b;
  font-size: 0.65rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.app-shell-v2 .data-table tbody td {
  padding: 0.78rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.052);
  color: var(--v2-text-soft);
  font-size: 0.76rem;
  vertical-align: middle;
}

.app-shell-v2 .data-table tbody tr {
  background: transparent;
  transition: background 130ms ease;
}

.app-shell-v2 .data-table tbody tr:not(.payload-row):hover {
  background: rgba(139, 92, 246, 0.042);
}

.app-shell-v2 .data-table tbody tr:last-child td {
  border-bottom: 0;
}

.app-shell-v2 .data-table td strong {
  color: var(--v2-text);
  font-size: 0.78rem;
}

.app-shell-v2 .data-table td small {
  display: block;
  margin-top: 0.16rem;
  color: var(--v2-muted);
  font-size: 0.66rem;
}

.app-shell-v2 .data-table td .button {
  min-height: 32px;
  padding-inline: 0.68rem;
  border-radius: 9px;
  font-size: 0.71rem;
}

/* Player risks */

.app-shell-v2 .risk-pill,
.app-shell-v2 .case-pill {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 0.56rem;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  font-size: 0.67rem;
  font-weight: 820;
  white-space: nowrap;
}

.app-shell-v2 .risk-low {
  color: var(--v2-success);
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.07);
}

.app-shell-v2 .risk-medium {
  color: var(--v2-warning);
  border-color: rgba(251, 191, 36, 0.24);
  background: rgba(251, 191, 36, 0.075);
}

.app-shell-v2 .risk-high {
  color: var(--v2-danger);
  border-color: rgba(251, 113, 133, 0.25);
  background: rgba(251, 113, 133, 0.08);
}

/* Moderation types and severity */

.app-shell-v2 .case-type-note {
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.24);
  background: rgba(139, 92, 246, 0.08);
}

.app-shell-v2 .case-type-warning,
.app-shell-v2 .severity-medium {
  color: var(--v2-warning);
  border-color: rgba(251, 191, 36, 0.24);
  background: rgba(251, 191, 36, 0.075);
}

.app-shell-v2 .case-type-kick,
.app-shell-v2 .severity-high {
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.25);
  background: rgba(251, 146, 60, 0.08);
}

.app-shell-v2 .case-type-tempban,
.app-shell-v2 .case-type-ban,
.app-shell-v2 .severity-critical {
  color: var(--v2-danger);
  border-color: rgba(251, 113, 133, 0.26);
  background: rgba(251, 113, 133, 0.08);
}

.app-shell-v2 .severity-low {
  color: var(--v2-muted);
  background: rgba(255, 255, 255, 0.035);
}

.app-shell-v2 .status-open {
  color: var(--v2-success);
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.07);
}

.app-shell-v2 .status-closed {
  color: var(--v2-muted);
  background: rgba(255, 255, 255, 0.035);
}

/* Economy */

.app-shell-v2 .delta-positive {
  color: var(--v2-success);
}

.app-shell-v2 .delta-negative {
  color: var(--v2-danger);
}

.app-shell-v2 .delta-zero {
  color: var(--v2-muted);
}

.app-shell-v2 .route-app-economy .panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-shell-v2 .route-app-economy .mini-row {
  padding: 0.75rem;
}

.app-shell-v2 .payload-row td {
  padding: 0 0.8rem 0.75rem;
  background: rgba(0, 0, 0, 0.13);
}

.app-shell-v2 .payload-row details {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
}

.app-shell-v2 .payload-row pre {
  max-height: 340px;
  margin: 0.7rem 0 0;
  padding: 0.8rem;
  overflow: auto;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  color: #d8d3e0;
  background: #080a0f;
  font-size: 0.72rem;
  line-height: 1.55;
}

/* Empty states */

.app-shell-v2 .empty-state {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  padding: 2rem 1rem;
  border: 1px dashed var(--v2-line-strong);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.12);
  text-align: center;
}

.app-shell-v2 .empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.09);
  font-size: 0.88rem;
  font-weight: 900;
}

.app-shell-v2 .empty-state h3,
.app-shell-v2 .empty-state p {
  margin: 0;
}

.app-shell-v2 .empty-state p {
  max-width: 620px;
  color: var(--v2-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* Player profile */

.app-shell-v2 .route-app-player-show .panel-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.65fr);
}

.app-shell-v2 .route-app-player-show .detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-shell-v2 .route-app-player-show .compact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.app-shell-v2 .route-app-player-show .compact-form label:nth-of-type(5),
.app-shell-v2 .route-app-player-show .compact-form label:nth-of-type(6),
.app-shell-v2 .route-app-player-show .compact-form .button {
  grid-column: 1 / -1;
}

.app-shell-v2 .player-event-list {
  display: grid;
  gap: 0.65rem;
}

.app-shell-v2 .player-event-card {
  padding: 0.85rem;
  border-radius: 13px;
}

.app-shell-v2 .event-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.app-shell-v2 .event-card-heading strong,
.app-shell-v2 .event-card-heading small {
  display: block;
}

.app-shell-v2 .event-card-heading small {
  margin-top: 0.12rem;
  color: var(--v2-muted);
}

.app-shell-v2 .event-payload-details {
  margin-top: 0.7rem;
  padding: 0.65rem 0.72rem;
}

.app-shell-v2 .event-payload-details pre {
  max-height: 360px;
  margin: 0.65rem 0 0;
  overflow: auto;
}

/* Moderation detail */

.app-shell-v2 .route-app-moderation-show .panel-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.65fr);
}

.app-shell-v2 .route-app-moderation-show .detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-shell-v2 .text-block {
  margin-top: 0.8rem;
  padding: 0.9rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .text-block small {
  color: var(--v2-muted);
}

.app-shell-v2 .text-block p {
  margin: 0.4rem 0 0;
  color: var(--v2-text-soft);
  line-height: 1.58;
}

.app-shell-v2 .moderation-enforcement-summary {
  align-self: start;
}

/* Responsive */

@media (max-width: 1100px) {
  .app-shell-v2 .route-app-players .stats-grid,
  .app-shell-v2 .route-app-moderation .stats-grid,
  .app-shell-v2 .route-app-economy .stats-grid,
  .app-shell-v2 .route-app-economy-transactions .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell-v2 .route-app-player-show .panel-grid,
  .app-shell-v2 .route-app-moderation-show .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 850px) {
  .app-shell-v2 .route-app-player-show .detail-grid,
  .app-shell-v2 .route-app-moderation-show .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell-v2 .route-app-economy .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .app-shell-v2 .route-app-players .stats-grid,
  .app-shell-v2 .route-app-moderation .stats-grid,
  .app-shell-v2 .route-app-economy .stats-grid,
  .app-shell-v2 .route-app-economy-transactions .stats-grid,
  .app-shell-v2 .route-app-player-show .detail-grid,
  .app-shell-v2 .route-app-moderation-show .detail-grid,
  .app-shell-v2 .route-app-player-show .compact-form {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .route-app-player-show .compact-form label,
  .app-shell-v2 .route-app-player-show .compact-form .button {
    grid-column: auto;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 55D.1
 * SDK installation, tests and project tooling
 * ====================================================== */

/* Shared technical page rhythm */

.app-shell-v2 .route-app-project-install .app-page-body,
.app-shell-v2 .route-app-project-settings .app-page-body,
.app-shell-v2 .route-app-project-sdk-test .app-page-body,
.app-shell-v2 .route-app-project-studio-test .app-page-body,
.app-shell-v2 .route-app-project-enforcement .app-page-body,
.app-shell-v2 .route-app-sdk-docs .app-page-body,
.app-shell-v2 .route-app-sdk-security-docs .app-page-body,
.app-shell-v2 .route-app-sdk-compatibility .app-page-body {
  gap: 0.85rem;
}

/* Specialist project navigation */

.app-shell-v2 .route-app-project-install .panel-card:first-child .project-actions,
.app-shell-v2 .route-app-project-settings .project-settings-header .project-actions,
.app-shell-v2 .route-app-project-sdk-test .panel-card:first-child .project-actions,
.app-shell-v2 .route-app-project-studio-test .panel-card:first-child .project-actions,
.app-shell-v2 .route-app-project-enforcement .panel-card:first-child .project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.app-shell-v2 .route-app-project-install .panel-card:first-child .project-actions .button,
.app-shell-v2 .route-app-project-settings .project-settings-header .project-actions .button,
.app-shell-v2 .route-app-project-sdk-test .panel-card:first-child .project-actions .button,
.app-shell-v2 .route-app-project-studio-test .panel-card:first-child .project-actions .button,
.app-shell-v2 .route-app-project-enforcement .panel-card:first-child .project-actions .button {
  min-height: 34px;
  padding-inline: 0.7rem;
  border-radius: 9px;
  font-size: 0.72rem;
}

/* Installation checklist */

.app-shell-v2 .route-app-project-install .mini-list {
  display: grid;
  gap: 0.48rem;
}

.app-shell-v2 .route-app-project-install .mini-row {
  min-height: 52px;
  padding: 0.68rem 0.78rem;
  border-radius: 11px;
}

.app-shell-v2 .route-app-project-install .mini-row strong {
  color: var(--v2-text);
  font-size: 0.77rem;
}

.app-shell-v2 .route-app-project-install .mini-row span {
  font-size: 0.7rem;
  line-height: 1.45;
}

/* Large code sections */

.app-shell-v2 .route-app-project-install .panel-card:has(.code-card),
.app-shell-v2 .route-app-sdk-docs .panel-card:has(.code-card),
.app-shell-v2 .route-app-project-sdk-test .panel-card:has(.sdk-output),
.app-shell-v2 .route-app-project-studio-test .panel-card:has(.sdk-output) {
  overflow: hidden;
}

.app-shell-v2 .route-app-project-install .code-card,
.app-shell-v2 .route-app-sdk-docs .code-card {
  max-height: 540px;
  overflow: auto;
  border-radius: 12px;
}

.app-shell-v2 .route-app-project-install .code-card pre,
.app-shell-v2 .route-app-sdk-docs .code-card pre {
  min-width: 620px;
  margin: 0;
  padding: 1rem;
  font-size: 0.75rem;
  line-height: 1.62;
}

.app-shell-v2 .route-app-project-install .sdk-output,
.app-shell-v2 .route-app-project-sdk-test .sdk-output,
.app-shell-v2 .route-app-project-studio-test .sdk-output {
  max-height: 440px;
  overflow: auto;
  padding: 0.9rem;
  font-size: 0.74rem;
  line-height: 1.6;
}

/* Make technical values readable without stretching pages */

.app-shell-v2 .route-app-project-install .detail-grid strong,
.app-shell-v2 .route-app-project-settings .detail-grid strong,
.app-shell-v2 .route-app-project-enforcement .detail-grid strong,
.app-shell-v2 .route-app-project-sdk-test .detail-grid strong,
.app-shell-v2 .route-app-project-studio-test .detail-grid strong {
  overflow-wrap: anywhere;
}

.app-shell-v2 .route-app-project-install .detail-grid,
.app-shell-v2 .route-app-project-sdk-test .detail-grid,
.app-shell-v2 .route-app-project-studio-test .detail-grid,
.app-shell-v2 .route-app-project-enforcement .detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Install examples and production checklist */

.app-shell-v2 .route-app-project-install .panel-grid {
  gap: 0.85rem;
}

.app-shell-v2 .route-app-project-install .panel-grid > .panel-card {
  align-self: start;
}

.app-shell-v2 .route-app-project-install .panel-card h2,
.app-shell-v2 .route-app-sdk-docs .panel-card h2 {
  letter-spacing: -0.025em;
}

.app-shell-v2 .route-app-project-install .panel-card > p.muted,
.app-shell-v2 .route-app-sdk-docs .panel-card > p.muted {
  max-width: 920px;
  font-size: 0.78rem;
}

/* Project settings */

.app-shell-v2 .route-app-project-settings .project-settings-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(310px, 0.68fr);
  gap: 0.85rem;
}

.app-shell-v2 .route-app-project-settings .project-settings-sidebar {
  position: sticky;
  top: 98px;
  gap: 0.85rem;
}

.app-shell-v2 .route-app-project-settings .settings-summary-card {
  padding: 1rem;
}

.app-shell-v2 .route-app-project-settings .settings-summary-list {
  gap: 0.5rem;
}

.app-shell-v2 .route-app-project-settings .settings-summary-list div {
  padding: 0.68rem;
  border-radius: 11px;
}

.app-shell-v2 .route-app-project-settings .settings-management-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.app-shell-v2 .route-app-project-settings .settings-management-link {
  padding: 0.82rem;
  border-radius: 12px;
}

.app-shell-v2 .route-app-project-settings .settings-management-link strong {
  font-size: 0.78rem;
}

.app-shell-v2 .route-app-project-settings .settings-management-link span {
  font-size: 0.69rem;
}

/* Enforcement configuration */

.app-shell-v2 .route-app-project-enforcement .panel-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
  align-items: start;
  gap: 0.85rem;
}

.app-shell-v2 .route-app-project-enforcement .ong-form {
  gap: 0.8rem;
}

.app-shell-v2 .route-app-project-enforcement .settings-summary-card,
.app-shell-v2 .route-app-project-enforcement .panel-grid > .panel-card {
  min-width: 0;
}

.app-shell-v2 .route-app-project-enforcement .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* SDK and Studio test screens */

.app-shell-v2 .route-app-project-sdk-test .panel-grid,
.app-shell-v2 .route-app-project-studio-test .panel-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: start;
  gap: 0.85rem;
}

.app-shell-v2 .route-app-project-sdk-test .ong-form,
.app-shell-v2 .route-app-project-studio-test .ong-form {
  display: grid;
  gap: 0.75rem;
}

.app-shell-v2 .route-app-project-sdk-test .project-actions,
.app-shell-v2 .route-app-project-studio-test .project-actions {
  gap: 0.5rem;
}

/* Documentation and compatibility */

.app-shell-v2 .route-app-sdk-docs .quick-action-grid,
.app-shell-v2 .route-app-sdk-security-docs .quick-action-grid,
.app-shell-v2 .route-app-sdk-compatibility .quick-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .route-app-sdk-docs .quick-action-card,
.app-shell-v2 .route-app-sdk-security-docs .quick-action-card,
.app-shell-v2 .route-app-sdk-compatibility .quick-action-card {
  padding: 0.85rem;
  border-radius: 12px;
}

.app-shell-v2 .route-app-sdk-docs .quick-action-card strong,
.app-shell-v2 .route-app-sdk-security-docs .quick-action-card strong,
.app-shell-v2 .route-app-sdk-compatibility .quick-action-card strong {
  font-size: 0.78rem;
}

.app-shell-v2 .route-app-sdk-docs .quick-action-card span,
.app-shell-v2 .route-app-sdk-security-docs .quick-action-card span,
.app-shell-v2 .route-app-sdk-compatibility .quick-action-card span {
  font-size: 0.69rem;
}

/* Local URL and security warnings */

.app-shell-v2 .route-app-project-install .flash-warning,
.app-shell-v2 .route-app-project-install .flash-error,
.app-shell-v2 .route-app-sdk-security-docs .flash-warning {
  padding: 0.85rem 0.95rem;
  border-radius: 13px;
}

.app-shell-v2 .route-app-project-install .flash-warning strong,
.app-shell-v2 .route-app-project-install .flash-error strong {
  display: block;
  margin-bottom: 0.2rem;
}

/* Responsive */

@media (max-width: 1120px) {
  .app-shell-v2 .route-app-project-settings .project-settings-layout,
  .app-shell-v2 .route-app-project-enforcement .panel-grid,
  .app-shell-v2 .route-app-project-sdk-test .panel-grid,
  .app-shell-v2 .route-app-project-studio-test .panel-grid {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .route-app-project-settings .project-settings-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell-v2 .route-app-project-install .detail-grid,
  .app-shell-v2 .route-app-project-sdk-test .detail-grid,
  .app-shell-v2 .route-app-project-studio-test .detail-grid,
  .app-shell-v2 .route-app-project-enforcement .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell-v2 .route-app-project-settings .project-settings-sidebar,
  .app-shell-v2 .route-app-project-settings .settings-management-grid,
  .app-shell-v2 .route-app-sdk-docs .quick-action-grid,
  .app-shell-v2 .route-app-sdk-security-docs .quick-action-grid,
  .app-shell-v2 .route-app-sdk-compatibility .quick-action-grid {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .route-app-project-install .code-card,
  .app-shell-v2 .route-app-sdk-docs .code-card {
    max-height: 420px;
  }
}

@media (max-width: 560px) {
  .app-shell-v2 .route-app-project-install .detail-grid,
  .app-shell-v2 .route-app-project-sdk-test .detail-grid,
  .app-shell-v2 .route-app-project-studio-test .detail-grid,
  .app-shell-v2 .route-app-project-enforcement .detail-grid {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .route-app-project-install .panel-card:first-child .project-actions,
  .app-shell-v2 .route-app-project-settings .project-settings-header .project-actions,
  .app-shell-v2 .route-app-project-sdk-test .panel-card:first-child .project-actions,
  .app-shell-v2 .route-app-project-studio-test .panel-card:first-child .project-actions,
  .app-shell-v2 .route-app-project-enforcement .panel-card:first-child .project-actions,
  .app-shell-v2 .route-app-project-install .panel-card:first-child .project-actions .button,
  .app-shell-v2 .route-app-project-settings .project-settings-header .project-actions .button {
    width: 100%;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 55D.2
 * Diagnostics, events, audit, retention, docs and billing
 * ====================================================== */

/* Enforcement checkbox correction */

.app-shell-v2 .route-app-project-enforcement .settings-list {
  display: grid;
  gap: 0.6rem;
}

.app-shell-v2 .route-app-project-enforcement .setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 76px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--v2-line);
  border-radius: 13px;
  background: var(--v2-surface-soft);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.app-shell-v2 .route-app-project-enforcement .setting-row:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: #171a24;
}

.app-shell-v2 .route-app-project-enforcement .setting-row > span {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.app-shell-v2 .route-app-project-enforcement .setting-row strong,
.app-shell-v2 .route-app-project-enforcement .setting-row small {
  display: block;
}

.app-shell-v2 .route-app-project-enforcement .setting-row strong {
  color: var(--v2-text);
  font-size: 0.8rem;
}

.app-shell-v2 .route-app-project-enforcement .setting-row small {
  margin-top: 0.25rem;
  color: var(--v2-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.app-shell-v2 .route-app-project-enforcement .setting-row > input[type="checkbox"] {
  appearance: none;
  grid-column: 2;
  grid-row: 1;
  width: 23px !important;
  height: 23px !important;
  min-height: 23px !important;
  margin: 0;
  padding: 0 !important;
  border: 1px solid var(--v2-line-strong);
  border-radius: 7px;
  background-color: #0b0e14;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  box-shadow: none;
  cursor: pointer;
}

.app-shell-v2 .route-app-project-enforcement .setting-row > input[type="checkbox"]:checked {
  border-color: var(--v2-accent);
  background-color: var(--v2-accent-strong);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.app-shell-v2 .route-app-project-enforcement .setting-row > input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(139, 92, 246, 0.22);
  outline-offset: 3px;
}

.app-shell-v2 .route-app-project-enforcement .danger-setting {
  border-color: rgba(251, 113, 133, 0.2);
  background: rgba(251, 113, 133, 0.035);
}

.app-shell-v2 .route-app-project-enforcement .danger-setting:hover {
  border-color: rgba(251, 113, 133, 0.34);
}

.app-shell-v2 .route-app-project-enforcement .danger-setting > input[type="checkbox"]:checked {
  border-color: var(--v2-danger);
  background-color: #e11d48;
}

/* Shared administrative stats and filters */

.app-shell-v2 .route-app-api-diagnostics .stats-grid,
.app-shell-v2 .route-app-events .stats-grid,
.app-shell-v2 .route-app-audit .stats-grid,
.app-shell-v2 .route-app-project-activity .stats-grid,
.app-shell-v2 .route-app-billing .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.app-shell-v2 .route-app-api-diagnostics .stat-card,
.app-shell-v2 .route-app-events .stat-card,
.app-shell-v2 .route-app-audit .stat-card,
.app-shell-v2 .route-app-project-activity .stat-card,
.app-shell-v2 .route-app-billing .stat-card {
  min-height: 94px;
  padding: 0.9rem;
  border-radius: 14px;
}

.app-shell-v2 .event-filter-form,
.app-shell-v2 .audit-filter-form,
.app-shell-v2 .route-app-api-diagnostics .filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  align-items: end;
  gap: 0.7rem;
}

.app-shell-v2 .event-filter-form label,
.app-shell-v2 .audit-filter-form label,
.app-shell-v2 .route-app-api-diagnostics .filter-form label {
  display: grid;
  min-width: 0;
  gap: 0.4rem;
}

.app-shell-v2 .event-filter-form .button,
.app-shell-v2 .audit-filter-form .button,
.app-shell-v2 .route-app-api-diagnostics .filter-form .button {
  min-height: 44px;
}

/* API diagnostics */

.app-shell-v2 .route-app-api-diagnostics .panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.app-shell-v2 .api-log-list {
  display: grid;
  gap: 0.65rem;
}

.app-shell-v2 .api-log-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--v2-line);
  border-radius: 13px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .api-log-card.failed {
  border-color: rgba(251, 113, 133, 0.22);
  background:
    linear-gradient(
      90deg,
      rgba(251, 113, 133, 0.045),
      transparent 34%
    ),
    var(--v2-surface-soft);
}

.app-shell-v2 .api-log-title {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-shell-v2 .api-log-title > div {
  min-width: 0;
}

.app-shell-v2 .api-log-title strong,
.app-shell-v2 .api-log-title small {
  display: block;
}

.app-shell-v2 .api-log-title strong {
  color: var(--v2-text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.app-shell-v2 .api-log-title small {
  margin-top: 0.2rem;
  color: var(--v2-muted);
  font-size: 0.68rem;
}

.app-shell-v2 .api-log-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.app-shell-v2 .api-log-grid > div {
  min-width: 0;
  padding: 0.68rem;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: rgba(5, 7, 11, 0.35);
}

.app-shell-v2 .api-log-grid small,
.app-shell-v2 .api-log-grid strong {
  display: block;
}

.app-shell-v2 .api-log-grid small {
  color: var(--v2-muted);
  font-size: 0.64rem;
}

.app-shell-v2 .api-log-grid strong {
  margin-top: 0.18rem;
  overflow-wrap: anywhere;
  color: var(--v2-text-soft);
  font-size: 0.72rem;
}

.app-shell-v2 .compat-pill {
  display: inline-flex;
  min-height: 27px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 0.58rem;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  font-size: 0.67rem;
  font-weight: 820;
  text-transform: capitalize;
}

.app-shell-v2 .compat-ready {
  color: var(--v2-success);
  border-color: rgba(52, 211, 153, 0.23);
  background: rgba(52, 211, 153, 0.07);
}

.app-shell-v2 .compat-missing {
  color: var(--v2-danger);
  border-color: rgba(251, 113, 133, 0.24);
  background: rgba(251, 113, 133, 0.075);
}

.app-shell-v2 .api-log-card details {
  padding: 0.65rem 0.72rem;
  border-radius: 10px;
}

.app-shell-v2 .api-log-card .code-card {
  max-height: 330px;
  margin-top: 0.65rem;
  overflow: auto;
}

.app-shell-v2 .cleanup-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid rgba(251, 113, 133, 0.18);
  border-radius: 12px;
  background: rgba(251, 113, 133, 0.035);
}

/* Raw events */

.app-shell-v2 .route-app-events .data-table {
  min-width: 1050px;
}

.app-shell-v2 .route-app-event-show .detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-shell-v2 .payload-viewer {
  max-height: 660px;
  margin: 0;
  padding: 1rem;
  overflow: auto;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  color: #ddd7e8;
  background: #07090e;
  font-family:
    "Cascadia Code",
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 0.76rem;
  line-height: 1.62;
  tab-size: 4;
  white-space: pre;
}

/* Audit */

.app-shell-v2 .audit-list {
  display: grid;
  gap: 0.65rem;
}

.app-shell-v2 .audit-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--v2-line);
  border-radius: 13px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .audit-main {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-shell-v2 .audit-main > div {
  min-width: 0;
}

.app-shell-v2 .audit-main strong {
  display: block;
  color: var(--v2-text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.app-shell-v2 .audit-main small {
  display: block;
  margin-top: 0.18rem;
  color: var(--v2-muted);
  font-size: 0.68rem;
}

.app-shell-v2 .audit-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.app-shell-v2 .audit-meta > div {
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: rgba(5, 7, 11, 0.35);
}

.app-shell-v2 .audit-meta small,
.app-shell-v2 .audit-meta strong {
  display: block;
}

.app-shell-v2 .audit-meta small {
  color: var(--v2-muted);
  font-size: 0.63rem;
}

.app-shell-v2 .audit-meta strong {
  margin-top: 0.15rem;
  overflow-wrap: anywhere;
  font-size: 0.7rem;
}

.app-shell-v2 .audit-context {
  padding: 0.65rem 0.72rem;
  border-radius: 10px;
}

.app-shell-v2 .audit-context pre {
  max-height: 330px;
  margin: 0.65rem 0 0;
  padding: 0.8rem;
  overflow: auto;
  border: 1px solid var(--v2-line);
  border-radius: 10px;
  background: #07090e;
  font-size: 0.72rem;
  line-height: 1.55;
}

/* Data retention */

.app-shell-v2 .warning-box {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 12px;
  color: var(--v2-text-soft);
  background: rgba(251, 191, 36, 0.055);
  line-height: 1.5;
}

.app-shell-v2 .retention-list {
  display: grid;
  gap: 0.75rem;
}

.app-shell-v2 .retention-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .retention-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-shell-v2 .retention-head h3,
.app-shell-v2 .retention-head p {
  margin: 0;
}

.app-shell-v2 .retention-head p {
  margin-top: 0.25rem;
  color: var(--v2-muted);
}

.app-shell-v2 .retention-card .detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-shell-v2 .retention-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  align-items: end;
  gap: 0.7rem;
}

.app-shell-v2 .retention-card > form:last-child {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.8rem;
  border-top: 1px solid var(--v2-line);
}

/* Project activity timeline */

.app-shell-v2 .route-app-project-activity .project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.app-shell-v2 .route-app-project-activity .project-actions .button {
  min-height: 34px;
  padding-inline: 0.68rem;
  font-size: 0.7rem;
}

.app-shell-v2 .timeline-list {
  position: relative;
  display: grid;
  gap: 0.6rem;
}

.app-shell-v2 .timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.82rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 0.32rem;
  border: 2px solid var(--v2-accent);
  border-radius: 50%;
  background: var(--v2-surface);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.09);
}

.app-shell-v2 .timeline-body {
  min-width: 0;
}

.app-shell-v2 .timeline-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-shell-v2 .timeline-head strong,
.app-shell-v2 .timeline-head small {
  display: block;
}

.app-shell-v2 .timeline-head strong {
  color: var(--v2-text);
  font-size: 0.8rem;
}

.app-shell-v2 .timeline-head small {
  margin-top: 0.15rem;
  color: var(--v2-muted);
  font-size: 0.67rem;
}

/* Documentation */

.app-shell-v2 .docs-hub-hero {
  overflow: hidden;
  background:
    radial-gradient(
      circle at 88% 0%,
      rgba(139, 92, 246, 0.13),
      transparent 30rem
    ),
    var(--v2-surface);
}

.app-shell-v2 .docs-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.app-shell-v2 .docs-hub-card {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  color: var(--v2-text);
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.app-shell-v2 .docs-hub-card:hover {
  border-color: rgba(139, 92, 246, 0.36);
  background: #181b26;
  transform: translateY(-2px);
}

.app-shell-v2 .docs-hub-card.featured {
  border-color: rgba(139, 92, 246, 0.25);
  background:
    linear-gradient(
      145deg,
      rgba(139, 92, 246, 0.09),
      transparent 62%
    ),
    var(--v2-surface);
}

.app-shell-v2 .docs-card-code {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 10px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.09);
  font-size: 0.68rem;
  font-weight: 850;
}

.app-shell-v2 .docs-hub-card small,
.app-shell-v2 .docs-hub-card strong,
.app-shell-v2 .docs-hub-card p {
  display: block;
}

.app-shell-v2 .docs-hub-card small {
  color: #a78bfa;
  font-size: 0.63rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-shell-v2 .docs-hub-card strong {
  margin-top: 0.18rem;
  font-size: 0.82rem;
}

.app-shell-v2 .docs-hub-card p {
  margin: 0.35rem 0 0;
  color: var(--v2-muted);
  font-size: 0.7rem;
  line-height: 1.48;
}

/* Billing */

.app-shell-v2 .billing-banner {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.055);
}

.app-shell-v2 .billing-banner strong {
  color: var(--v2-text);
}

.app-shell-v2 .billing-banner p {
  margin: 0.3rem 0 0;
  color: var(--v2-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.app-shell-v2 .plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.app-shell-v2 .plan-card {
  display: flex;
  min-width: 0;
  min-height: 370px;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--v2-line);
  border-radius: 15px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow);
}

.app-shell-v2 .plan-card.current {
  border-color: rgba(52, 211, 153, 0.22);
  background:
    linear-gradient(
      160deg,
      rgba(52, 211, 153, 0.045),
      transparent 55%
    ),
    var(--v2-surface);
}

.app-shell-v2 .plan-card.featured {
  border-color: rgba(139, 92, 246, 0.32);
  background:
    linear-gradient(
      160deg,
      rgba(139, 92, 246, 0.1),
      transparent 60%
    ),
    var(--v2-surface);
}

.app-shell-v2 .plan-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.app-shell-v2 .plan-price {
  margin: 0.65rem 0;
  color: var(--v2-text);
  font-size: 1.7rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.app-shell-v2 .plan-price span {
  color: var(--v2-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.app-shell-v2 .feature-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-shell-v2 .feature-list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--v2-text-soft);
  font-size: 0.72rem;
}

.app-shell-v2 .feature-list li::before {
  content: "Ã¢Å“â€œ";
  position: absolute;
  left: 0;
  color: var(--v2-success);
  font-weight: 850;
}

.app-shell-v2 .plan-card .button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

/* Responsive */

@media (max-width: 1220px) {
  .app-shell-v2 .docs-hub-grid,
  .app-shell-v2 .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell-v2 .api-log-grid,
  .app-shell-v2 .audit-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell-v2 .route-app-api-diagnostics .stats-grid,
  .app-shell-v2 .route-app-events .stats-grid,
  .app-shell-v2 .route-app-audit .stats-grid,
  .app-shell-v2 .route-app-project-activity .stats-grid,
  .app-shell-v2 .route-app-billing .stats-grid,
  .app-shell-v2 .retention-card .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell-v2 .route-app-api-diagnostics .panel-grid {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .cleanup-form,
  .app-shell-v2 .retention-form {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .cleanup-form .button,
  .app-shell-v2 .retention-form .button {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .app-shell-v2 .docs-hub-grid,
  .app-shell-v2 .plan-grid,
  .app-shell-v2 .route-app-api-diagnostics .stats-grid,
  .app-shell-v2 .route-app-events .stats-grid,
  .app-shell-v2 .route-app-audit .stats-grid,
  .app-shell-v2 .route-app-project-activity .stats-grid,
  .app-shell-v2 .route-app-billing .stats-grid,
  .app-shell-v2 .api-log-grid,
  .app-shell-v2 .audit-meta,
  .app-shell-v2 .retention-card .detail-grid,
  .app-shell-v2 .route-app-event-show .detail-grid {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .api-log-title,
  .app-shell-v2 .audit-main,
  .app-shell-v2 .retention-head,
  .app-shell-v2 .timeline-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell-v2 .plan-card {
    min-height: 0;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 55E
 * Mobile navigation, accessibility and final consistency
 * ====================================================== */

html {
  min-width: 320px;
}

body {
  overflow-x: hidden;
}

body.app-mobile-nav-open {
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 1000;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(139, 92, 246, 0.55);
  border-radius: 10px;
  color: #fff;
  background: #171324;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell-v2 *,
.app-shell-v2 *::before,
.app-shell-v2 *::after {
  box-sizing: border-box;
}

.app-shell-v2 img,
.app-shell-v2 svg,
.app-shell-v2 video,
.app-shell-v2 canvas {
  max-width: 100%;
}

.app-shell-v2 .app-page-body > *,
.app-shell-v2 .panel-grid > *,
.app-shell-v2 .stats-grid > *,
.app-shell-v2 .quick-action-grid > * {
  min-width: 0;
}

.app-shell-v2 a,
.app-shell-v2 button,
.app-shell-v2 input,
.app-shell-v2 select,
.app-shell-v2 textarea,
.app-shell-v2 summary {
  -webkit-tap-highlight-color: transparent;
}

.app-shell-v2 a:focus-visible,
.app-shell-v2 button:focus-visible,
.app-shell-v2 summary:focus-visible,
.app-shell-v2 input:focus-visible,
.app-shell-v2 select:focus-visible,
.app-shell-v2 textarea:focus-visible {
  outline: 3px solid rgba(139, 92, 246, 0.34);
  outline-offset: 3px;
}

.app-shell-v2 .button:disabled,
.app-shell-v2 button:disabled,
.app-shell-v2 input:disabled,
.app-shell-v2 select:disabled,
.app-shell-v2 textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell-v2 .button,
.app-shell-v2 button,
.app-shell-v2 summary {
  touch-action: manipulation;
}

.app-shell-v2 .pill,
.app-shell-v2 .risk-pill,
.app-shell-v2 .case-pill,
.app-shell-v2 .compat-pill,
.app-shell-v2 .connection-pill {
  max-width: 100%;
  white-space: nowrap;
}

.app-shell-v2 strong,
.app-shell-v2 code,
.app-shell-v2 pre,
.app-shell-v2 td,
.app-shell-v2 .mini-row span {
  overflow-wrap: anywhere;
}

.app-shell-v2 .table-card {
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.app-shell-v2 details > summary {
  min-height: 34px;
  align-items: center;
}

.app-shell-v2 details > summary::marker {
  color: #8b5cf6;
}

.app-shell-v2 .panel-card > :last-child,
.app-shell-v2 .stat-card > :last-child {
  margin-bottom: 0;
}

/* Mobile navigation controls */

.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 1px solid var(--v2-line);
  border-radius: 11px;
  color: var(--v2-text);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.mobile-nav-line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.app-shell-v2.nav-open .mobile-nav-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.app-shell-v2.nav-open .mobile-nav-line:nth-child(2) {
  opacity: 0;
}

.app-shell-v2.nav-open .mobile-nav-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(2, 4, 9, 0.72);
  backdrop-filter: blur(4px);
  cursor: default;
}

/* Final sidebar cleanup */

.app-shell-v2 .app-sidebar-nav a {
  text-decoration: none;
}

.app-shell-v2 .sidebar-advanced-group summary {
  min-height: 40px;
}

.app-shell-v2 .sidebar-callout {
  flex: 0 0 auto;
}

/* Final top-bar cleanup */

.app-shell-v2 .app-topbar > div {
  min-width: 0;
}

.app-shell-v2 .app-topbar h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell-v2 .topbar-actions {
  flex: 0 0 auto;
}

/* Tablet and mobile drawer */

@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }

  .app-shell-v2 .app-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    z-index: 110;
    display: flex;
    width: min(86vw, 292px);
    height: 100dvh;
    min-height: 100dvh;
    padding: 1rem;
    overflow-y: auto;
    border-right: 1px solid var(--v2-line-strong);
    border-bottom: 0;
    background: #0d0f15;
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.42);
    transform: translateX(-104%);
    transition: transform 190ms ease;
  }

  .app-shell-v2.nav-open .app-sidebar {
    transform: translateX(0);
  }

  .app-shell-v2.nav-open .mobile-nav-backdrop {
    display: block;
  }

  .app-shell-v2 .app-sidebar-nav {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    overflow: visible;
  }

  .app-shell-v2 .sidebar-section-title {
    display: block;
  }

  .app-shell-v2 .sidebar-callout {
    display: block;
  }

  .app-shell-v2 .app-main {
    width: 100%;
    min-height: 100vh;
    padding: 1rem;
  }

  .app-shell-v2 .app-topbar {
    position: sticky !important;
    top: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 72px;
    align-items: center;
    gap: 0.8rem;
    margin: -1rem -1rem 1rem;
    padding: 0.85rem 1rem;
  }

  .app-shell-v2 .app-topbar h1 {
    font-size: clamp(1.45rem, 5vw, 2rem);
  }

  .app-shell-v2 .topbar-actions {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .app-shell-v2 .topbar-actions .button {
    width: auto;
    white-space: nowrap;
  }

  .app-shell-v2 .user-pill {
    width: auto;
  }
}

@media (max-width: 700px) {
  .app-shell-v2 .app-topbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .app-shell-v2 .topbar-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
  }

  .app-shell-v2 .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .app-shell-v2 .user-pill {
    flex: 0 0 auto;
  }

  .app-shell-v2 .app-topbar h1 {
    white-space: normal;
  }

  .app-shell-v2 .panel-card {
    padding: 1rem;
  }

  .app-shell-v2 .panel-header {
    margin-bottom: 0.8rem;
  }

  .app-shell-v2 .project-actions,
  .app-shell-v2 .form-actions,
  .app-shell-v2 .settings-card-actions,
  .app-shell-v2 .dashboard-card-footer {
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .app-shell-v2 .app-main {
    padding: 0.75rem;
  }

  .app-shell-v2 .app-topbar {
    margin: -0.75rem -0.75rem 0.85rem;
    padding: 0.75rem;
  }

  .app-shell-v2 .app-kicker {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }

  .app-shell-v2 .topbar-actions .button {
    min-height: 38px;
    padding-inline: 0.72rem;
    font-size: 0.75rem;
  }

  .app-shell-v2 .user-pill {
    padding-right: 0.55rem;
  }

  .app-shell-v2 .user-pill small {
    display: none;
  }

  .app-shell-v2 .panel-card,
  .app-shell-v2 .stat-card,
  .app-shell-v2 .table-card,
  .app-shell-v2 .event-card {
    border-radius: 14px;
  }
}

/* Respect users who requested fewer moving objects */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 56A
 * Billing catalogue foundation
 * ====================================================== */

.app-shell-v2 .billing-foundation-hero {
  overflow: hidden;
  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(139, 92, 246, 0.16),
      transparent 31rem
    ),
    var(--v2-surface);
}

.app-shell-v2 .billing-foundation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.app-shell-v2 .billing-usage-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.app-shell-v2 .billing-plan-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.app-shell-v2 .billing-plan-card-v2 {
  display: flex;
  min-width: 0;
  min-height: 510px;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  padding: 1rem;
  border: 1px solid var(--v2-line);
  border-radius: 15px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.018),
      transparent 46%
    ),
    var(--v2-surface-soft);
}

.app-shell-v2 .billing-plan-card-v2.featured {
  border-color: rgba(139, 92, 246, 0.34);
  background:
    linear-gradient(
      155deg,
      rgba(139, 92, 246, 0.11),
      transparent 54%
    ),
    var(--v2-surface-soft);
}

.app-shell-v2 .billing-plan-card-v2.plan-current {
  border-color: rgba(52, 211, 153, 0.22);
  background:
    linear-gradient(
      155deg,
      rgba(52, 211, 153, 0.055),
      transparent 54%
    ),
    var(--v2-surface-soft);
}

.app-shell-v2 .billing-plan-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.app-shell-v2 .billing-plan-heading h2,
.app-shell-v2 .billing-plan-heading .eyebrow {
  margin: 0;
}

.app-shell-v2 .billing-plan-heading h2 {
  margin-top: 0.18rem;
  font-size: 1.2rem;
}

.app-shell-v2 .billing-plan-tagline {
  display: block;
  margin-top: 0.85rem;
  color: var(--v2-text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.app-shell-v2 .billing-plan-card-v2 > div > .muted {
  min-height: 3.2rem;
  margin-top: 0.45rem;
  font-size: 0.74rem;
}

.app-shell-v2 .billing-term-grid {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.app-shell-v2 .billing-term-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem 0.7rem;
  padding: 0.7rem;
  border: 1px solid var(--v2-line);
  border-radius: 11px;
  background: rgba(5, 7, 11, 0.36);
}

.app-shell-v2 .billing-term-card span {
  color: var(--v2-text-soft);
  font-size: 0.72rem;
}

.app-shell-v2 .billing-term-card strong {
  color: var(--v2-text);
  font-size: 0.9rem;
}

.app-shell-v2 .billing-term-card small {
  grid-column: 1 / -1;
  color: var(--v2-muted);
  font-size: 0.63rem;
}

.app-shell-v2 .billing-price-placeholder {
  display: grid;
  gap: 0.3rem;
  min-height: 76px;
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px dashed var(--v2-line-strong);
  border-radius: 11px;
  background: rgba(5, 7, 11, 0.26);
}

.app-shell-v2 .billing-price-placeholder strong {
  font-size: 0.8rem;
}

.app-shell-v2 .billing-price-placeholder span {
  color: var(--v2-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.app-shell-v2 .billing-feature-list {
  display: grid;
  gap: 0.48rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.app-shell-v2 .billing-feature-list li {
  position: relative;
  padding-left: 1.05rem;
  color: var(--v2-text-soft);
  font-size: 0.7rem;
  line-height: 1.4;
}

.app-shell-v2 .billing-feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--v2-success);
  font-weight: 850;
}

.app-shell-v2 .billing-plan-footer {
  display: grid;
}

.app-shell-v2 .billing-plan-footer .button {
  width: 100%;
}

.app-shell-v2 .billing-architecture-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.app-shell-v2 .billing-architecture-grid .panel-card {
  padding: 1rem;
}

.app-shell-v2 .billing-architecture-grid h2 {
  margin: 0;
  font-size: 0.92rem;
}

.app-shell-v2 .billing-architecture-grid .muted {
  margin: 0.45rem 0 0;
  font-size: 0.7rem;
}

.app-shell-v2 .billing-next-pass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-shell-v2 .billing-next-pass h2,
.app-shell-v2 .billing-next-pass p {
  margin: 0;
}

.app-shell-v2 .billing-next-pass .muted {
  margin-top: 0.35rem;
}

@media (max-width: 1280px) {
  .app-shell-v2 .billing-plan-grid-v2,
  .app-shell-v2 .billing-architecture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell-v2 .billing-usage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell-v2 .billing-plan-grid-v2,
  .app-shell-v2 .billing-architecture-grid,
  .app-shell-v2 .billing-usage-grid {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .billing-plan-card-v2 {
    min-height: 0;
  }

  .app-shell-v2 .billing-next-pass {
    align-items: flex-start;
    flex-direction: column;
  }
}
.app-shell-v2 .billing-term-card .billing-term-saving {
  color: var(--v2-success);
  font-weight: 700;
}
/* ========================================================
 * ONG Panel UI v2 - Pass 56C.1
 * Stripe configuration readiness
 * ====================================================== */

.app-shell-v2 .billing-stripe-readiness {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-readiness-item {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-readiness-item span {
  color: var(--v2-muted);
  font-size: 0.67rem;
}

.app-shell-v2 .billing-readiness-item strong {
  color: var(--v2-text-soft);
  font-size: 0.76rem;
}

.app-shell-v2 .billing-readiness-item.ready {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.045);
}

.app-shell-v2 .billing-readiness-item.ready strong {
  color: var(--v2-success);
}

.app-shell-v2 .billing-readiness-item.pending {
  border-color: rgba(251, 191, 36, 0.18);
}

@media (max-width: 900px) {
  .app-shell-v2 .billing-stripe-readiness {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell-v2 .billing-stripe-readiness {
    grid-template-columns: 1fr;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 56D.2B
 * Stripe Checkout controls
 * ====================================================== */

.app-shell-v2 .billing-checkout-actions {
  display: grid;
  gap: 1rem;
}

.app-shell-v2 .billing-workspace-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-workspace-summary > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-workspace-summary small {
  color: var(--v2-muted);
}

.app-shell-v2 .billing-workspace-summary strong {
  overflow-wrap: anywhere;
}

.app-shell-v2 .billing-checkout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.app-shell-v2 .billing-checkout-form {
  display: grid;
  gap: 0.8rem;
  align-content: space-between;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-checkout-form > div {
  display: grid;
  gap: 0.25rem;
}

.app-shell-v2 .billing-checkout-form span {
  color: var(--v2-muted);
  font-size: 0.76rem;
}

.app-shell-v2 .billing-checkout-form .button {
  width: 100%;
}

.app-shell-v2 .billing-checkout-result {
  display: grid;
  gap: 1rem;
}

@media (max-width: 900px) {
  .app-shell-v2 .billing-workspace-summary,
  .app-shell-v2 .billing-checkout-grid {
    grid-template-columns: 1fr;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 56D.3
 * Stripe Customer Portal
 * ====================================================== */

.app-shell-v2 .billing-portal-actions {
  display: grid;
  gap: 1rem;
}

.app-shell-v2 .billing-portal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-portal-summary > div {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-portal-summary small {
  color: var(--v2-muted);
}

.app-shell-v2 .billing-portal-summary strong {
  overflow-wrap: anywhere;
}

.app-shell-v2 .billing-portal-form {
  display: flex;
  justify-content: flex-end;
}

.app-shell-v2 .billing-portal-form .button {
  min-width: 220px;
}

@media (max-width: 900px) {
  .app-shell-v2 .billing-portal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell-v2 .billing-portal-summary {
    grid-template-columns: 1fr;
  }

  .app-shell-v2 .billing-portal-form {
    display: grid;
  }

  .app-shell-v2 .billing-portal-form .button {
    width: 100%;
    min-width: 0;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 56E.3
 * Billing operations visibility
 * ====================================================== */

.app-shell-v2 .billing-operations-card {
  display: grid;
  gap: 1rem;
}

.app-shell-v2 .billing-operations-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-operations-grid > div,
.app-shell-v2 .billing-operations-details > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-operations-grid small,
.app-shell-v2 .billing-operations-details small {
  color: var(--v2-muted);
}

.app-shell-v2 .billing-operations-grid span {
  color: var(--v2-muted);
  font-size: 0.72rem;
}

.app-shell-v2 .billing-operations-grid strong,
.app-shell-v2 .billing-operations-details strong {
  overflow-wrap: anywhere;
}

.app-shell-v2 .billing-operations-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-health-attention {
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--v2-danger);
}

.app-shell-v2 .billing-health-pending {
  border-color: rgba(251, 191, 36, 0.28);
}

.app-shell-v2 .billing-health-healthy {
  border-color: rgba(52, 211, 153, 0.28);
  color: var(--v2-success);
}

@media (max-width: 1000px) {
  .app-shell-v2 .billing-operations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .app-shell-v2 .billing-operations-grid,
  .app-shell-v2 .billing-operations-details {
    grid-template-columns: 1fr;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 56F.1
 * Stripe sandbox activation
 * ====================================================== */

.app-shell-v2 .billing-activation-card {
  display: grid;
  gap: 1rem;
}

.app-shell-v2 .billing-activation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-activation-grid > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-activation-grid small,
.app-shell-v2 .billing-activation-grid span,
.app-shell-v2 .billing-activation-steps small {
  color: var(--v2-muted);
}

.app-shell-v2 .billing-activation-grid span {
  font-size: 0.72rem;
}

.app-shell-v2 .billing-activation-prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-activation-prices > div {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.82rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-activation-prices > div > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-shell-v2 .billing-activation-prices span {
  color: var(--v2-muted);
}

.app-shell-v2 .billing-activation-prices code,
.app-shell-v2 .billing-activation-steps code {
  overflow-wrap: anywhere;
  color: var(--v2-text);
  font-size: 0.72rem;
}

.app-shell-v2 .billing-activation-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-activation-steps > div {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.82rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-activation-steps ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1rem;
}

@media (max-width: 1000px) {
  .app-shell-v2 .billing-activation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell-v2 .billing-activation-prices,
  .app-shell-v2 .billing-activation-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell-v2 .billing-activation-grid {
    grid-template-columns: 1fr;
  }
}
/* ========================================================
 * ONG Panel UI v2 - Pass 57A
 * PayPal billing provider foundation
 * ====================================================== */

.app-shell-v2 .billing-paypal-foundation {
  display: grid;
  gap: 1rem;
}

.app-shell-v2 .billing-paypal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-paypal-grid > div,
.app-shell-v2 .billing-paypal-status > div {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-paypal-grid small,
.app-shell-v2 .billing-paypal-grid span,
.app-shell-v2 .billing-paypal-status small {
  color: var(--v2-muted);
}

.app-shell-v2 .billing-paypal-grid span {
  font-size: 0.72rem;
}

.app-shell-v2 .billing-paypal-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-shell-v2 .billing-paypal-plan-grid > div {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.82rem;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface-soft);
}

.app-shell-v2 .billing-paypal-plan-grid span {
  color: var(--v2-muted);
}

.app-shell-v2 .billing-paypal-plan-grid code {
  overflow-wrap: anywhere;
  color: var(--v2-text);
  font-size: 0.72rem;
}

.app-shell-v2 .billing-paypal-plan-grid .pill {
  justify-self: start;
}

.app-shell-v2 .billing-paypal-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 1000px) {
  .app-shell-v2 .billing-paypal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell-v2 .billing-paypal-plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .app-shell-v2 .billing-paypal-grid,
  .app-shell-v2 .billing-paypal-status {
    grid-template-columns: 1fr;
  }
}