:root {
  --ink: #172331;
  --ink-soft: #263749;
  --orange: #f27a0a;
  --orange-dark: #c95400;
  --cream: #fffaf3;
  --paper: #ffffff;
  --page: #f5f1eb;
  --line: #ddd5ca;
  --muted: #66717c;
  --success: #18794e;
  --warning: #a45300;
  --danger: #a52828;
  --shadow: 0 10px 30px rgba(23, 35, 49, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 92% 2%, rgba(242, 122, 10, .10), transparent 24rem),
    var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: var(--orange-dark); }
a:hover { color: var(--orange); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  border-bottom: 4px solid var(--orange);
  box-shadow: 0 5px 18px rgba(23, 35, 49, .18);
}

.site-header.is-unpinned {
  position: relative;
  top: auto;
}

.site-header-inner {
  width: min(1240px, calc(100% - 2rem));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  padding-inline-end: 2.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.brand:hover { color: #fff; }

.brand-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-company { color: #ffd7ac; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.brand-product { margin-top: .2rem; color: #fff; font-size: 1.12rem; font-weight: 800; }

.site-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  padding: .55rem .75rem;
  border-radius: 8px;
  color: #f7f8fa;
  font-size: .92rem;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.site-nav a.active { box-shadow: inset 0 -2px 0 var(--orange); }

.header-pin-toggle {
  position: absolute;
  top: .42rem;
  inset-inline-end: 0;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
}

.header-pin-toggle:hover,
.header-pin-toggle:focus-visible {
  transform: none;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: none;
}

.header-pin-toggle[aria-pressed="false"] { color: #b8c2cc; }
.header-pin-toggle[aria-pressed="false"] .header-pin-icon { transform: rotate(42deg); }
.header-pin-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .16s ease;
}

main {
  width: min(1240px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
}

h1, h2, h3 { margin-top: 0; line-height: 1.18; color: var(--ink); }
h1 { margin-bottom: .65rem; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; }
h2 { margin-bottom: .55rem; font-size: 1.35rem; letter-spacing: -.015em; }
p { margin-top: 0; }

.eyebrow {
  margin: 0 0 .35rem;
  color: var(--orange-dark);
  font-size: .77rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.muted { color: var(--muted); }

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  margin-bottom: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid #eadfd2;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, #fff 0%, var(--cream) 62%, #ffe6cb 100%);
  box-shadow: var(--shadow);
}

.compact-hero h1 { font-size: clamp(1.8rem, 3.2vw, 2.55rem); }
.hero-copy { max-width: 780px; margin-bottom: 0; color: #465563; font-size: 1.04rem; }
.guide-logo { width: 150px; height: 150px; flex: 0 0 150px; border-radius: 32px; object-fit: cover; box-shadow: 0 18px 35px rgba(23,35,49,.14); }

.page-heading { margin-bottom: 1.25rem; }
.heading-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }

.cards { display: grid; gap: 1rem; }
.dashboard-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 1.2rem 0 1.5rem; }
.cards > section,
.cards > a {
  min-width: 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(23,35,49,.05);
}
.cards strong { display: block; margin-bottom: .1rem; color: var(--ink); font-size: 2rem; line-height: 1; }
.cards span { color: var(--muted); font-size: .9rem; font-weight: 650; }
.dashboard-filter-card {
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.dashboard-filter-card:hover {
  transform: translateY(-2px);
  border-color: #e2a268;
  color: inherit;
  box-shadow: 0 10px 24px rgba(23,35,49,.10);
}
.dashboard-filter-card:focus-visible {
  outline: 3px solid rgba(242,122,10,.3);
  outline-offset: 2px;
}
.dashboard-filter-card.selected {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange), 0 8px 22px rgba(23,35,49,.08);
}
.dashboard-filter-card.selected strong { color: var(--orange-dark); }

.panel {
  margin: 1.25rem 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 6px 20px rgba(23,35,49,.045);
}

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.section-heading h2 { margin-bottom: 0; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
/* Instances is intentionally a wide administrative table. Keep useful column widths
   and let the existing table wrapper scroll instead of crushing content vertically. */
.instance-table {
  min-width: 104rem;
}
.instance-table th,
.instance-table td,
.instance-table td a {
  overflow-wrap: normal;
  word-break: normal;
}
.instance-table th:nth-child(1),
.instance-table td:nth-child(1) { min-width: 5.25rem; }
.instance-table th:nth-child(2),
.instance-table td:nth-child(2) { min-width: 6.25rem; }
.instance-table th:nth-child(3),
.instance-table td:nth-child(3) { min-width: 11.5rem; }
.instance-table th:nth-child(4),
.instance-table td:nth-child(4) { min-width: 6rem; }
.instance-table th:nth-child(5),
.instance-table td:nth-child(5) { min-width: 9.5rem; }
.instance-table th:nth-child(6),
.instance-table td:nth-child(6) { min-width: 8rem; }
.instance-table th:nth-child(7),
.instance-table td:nth-child(7) { min-width: 10rem; }
.instance-table th:nth-child(8),
.instance-table td:nth-child(8) { min-width: 7rem; }
.instance-table .instance-ip-column,
.instance-table .instance-ip-cell {
  min-width: 9.5rem;
  white-space: nowrap;
}
.instance-table th:nth-child(10),
.instance-table td:nth-child(10) { min-width: 10.5rem; }
.instance-table th:nth-child(11),
.instance-table td:nth-child(11) { min-width: 10.5rem; }
.instance-table th:nth-child(12),
.instance-table td:nth-child(12) {
  min-width: 10.5rem;
  white-space: nowrap;
}
th, td { padding: .8rem .7rem; border-bottom: 1px solid #ece6df; text-align: left; vertical-align: top; }
th { color: #4d5965; font-size: .76rem; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
tbody tr:hover { background: #fffaf5; }
tbody tr:last-child td { border-bottom: 0; }
td a { font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.empty-state { padding: 2rem; color: var(--muted); text-align: center; }

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: .2rem .58rem;
  border: 1px solid #d6dce2;
  border-radius: 999px;
  background: #f4f6f8;
  color: #40505e;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.form { max-width: 720px; }
.form-panel { padding: 1.5rem; }
.form label,
.inline-form label,
.compact-label { display: block; margin: 1rem 0; color: var(--ink); font-weight: 750; }
.form input,
.form select,
.form textarea,
.inline-form input,
.compact-label input,
.compact-label select {
  display: block;
  width: 100%;
  margin-top: .38rem;
  padding: .72rem .78rem;
  border: 1px solid #bfc7cf;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.form input:focus,
.form select:focus,
.form textarea:focus,
.inline-form input:focus {
  outline: 3px solid rgba(242,122,10,.2);
  border-color: var(--orange);
}
.form textarea { min-height: 120px; resize: vertical; }
.field-help { display: block; margin-top: .35rem; color: var(--muted); font-size: .84rem; font-weight: 500; }
fieldset { margin: 1.2rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
legend { padding: 0 .35rem; font-weight: 800; }
.interval-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.interval-fields label { margin: 0; }
.form-actions { display: flex; align-items: center; gap: .7rem; margin-top: 1.25rem; flex-wrap: wrap; }

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .68rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-weight: 780;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
button:hover,
.button-link:hover { transform: translateY(-1px); background: var(--orange-dark); color: #fff; box-shadow: 0 7px 18px rgba(201,84,0,.18); }
.secondary { background: var(--ink-soft); }
.secondary:hover { background: var(--ink); }
.secondary-link { background: var(--ink); white-space: nowrap; }
.ghost-link { border-color: #bdc5cc; background: transparent; color: var(--ink); }
.ghost-link:hover { background: #f0ede8; color: var(--ink); box-shadow: none; }
.danger { background: var(--danger); }
.danger:hover { background: #801b1b; }
.warning { background: var(--warning); }
.warning:hover { background: #783b00; }
.text-link { font-weight: 750; text-decoration: none; }

.notice,
.callout,
.secret {
  margin: 1rem 0;
  padding: .9rem 1rem;
  border-radius: 10px;
}
.notice { border: 1px solid #9fc4e4; background: #edf7ff; color: #184969; }
.info-callout { border: 1px solid #edc895; background: #fff7e9; color: #66400d; }
.secret { border: 1px solid #e0b858; background: #fff6d8; }
.secret code { display: block; margin-top: .75rem; overflow-wrap: anywhere; }

.detail-panel dl,
dl {
  display: grid;
  grid-template-columns: minmax(165px, 210px) minmax(0, 1fr);
  margin: 0;
}
dt { padding: .55rem .6rem .55rem 0; border-bottom: 1px solid #eee8e1; font-weight: 800; }
dd { margin: 0; padding: .55rem 0; border-bottom: 1px solid #eee8e1; overflow-wrap: anywhere; }

.danger-zone,
.warning-zone {
  margin: 1.25rem 0;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: #fff;
}
.danger-zone { border: 1px solid #d99a9a; background: #fff4f4; }
.warning-zone { border: 1px solid #e5bb7e; background: #fff8ed; }
.danger-zone p,
.warning-zone p { max-width: 850px; color: #5b4b4b; }
.inline-form { max-width: 760px; }

.guide-page { max-width: 1100px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.guide-card { margin: 0; }
.guide-card p:last-child,
.guide-card ul:last-child { margin-bottom: 0; }
.guide-section { padding: 1.5rem; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.definition-grid div { padding: .9rem; border: 1px solid #e6dfd6; border-radius: 10px; background: #fffaf5; }
.definition-grid strong { display: block; margin-bottom: .25rem; }
.definition-grid span { color: var(--muted); }
.guide-definitions { grid-template-columns: 120px minmax(0,1fr); }
.guide-relationship-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 1.25rem; }
.guide-relationship-card { padding: 1rem; border: 1px solid #e6dfd6; border-radius: 12px; background: #fffaf5; }
.guide-relationship-card h3 { margin-bottom: .4rem; font-size: 1.08rem; }
.guide-relationship-card p:last-child { margin-bottom: 0; color: var(--ink-soft); }
.guide-flow-heading { margin-top: 1.3rem; margin-bottom: .75rem; }
.guide-flowchart { display:flex; flex-direction:column; align-items:center; gap: .55rem; margin: .85rem 0 1rem; }
.guide-flow-card { width: min(100%, 38rem); padding: .95rem 1rem; border: 1px solid #d9d0c4; border-radius: 12px; background: #fff; text-align: center; box-shadow: 0 4px 14px rgba(23,35,49,.05); }
.guide-flow-card strong { display:block; }
.guide-flow-note { background: #fffaf5; }
.guide-flow-arrow { color: var(--orange-dark); font-size: 1.35rem; line-height: 1; }
.guide-flow-branches { width: 100%; display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items:start; margin-top: .2rem; }
.guide-flow-branches.nested { margin-top: .65rem; }
.guide-flow-branch { display:flex; flex-direction:column; align-items:center; gap: .45rem; }
.guide-flow-branch-label { display:inline-flex; align-items:center; justify-content:center; min-width: 3rem; padding: .16rem .55rem; border-radius: 999px; background: #fbe6cf; color: var(--orange-dark); font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.guide-relationship-rules { margin: 0; padding-left: 1.2rem; }
.guide-relationship-rules li + li { margin-top: .45rem; }

.site-footer {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .85rem;
}
.site-footer a { font-weight: 700; text-decoration: none; }

code { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 1000px) {
  .dashboard-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-header-inner { align-items: flex-start; flex-direction: column; gap: .7rem; padding-block: .8rem; padding-inline: 0 2.8rem; }
  .site-nav { justify-content: flex-start; }
}

@media (max-width: 760px) {
  main { width: min(100% - 1rem, 1240px); margin-top: 1rem; }
  .hero,
  .heading-row { align-items: flex-start; flex-direction: column; }
  .guide-logo { width: 110px; height: 110px; flex-basis: 110px; }
  .dashboard-cards,
  .guide-grid,
  .definition-grid,
  .guide-relationship-grid,
  .guide-flow-branches { grid-template-columns: 1fr 1fr; }
  .interval-fields { grid-template-columns: 1fr; }
  .site-footer { width: calc(100% - 1rem); flex-direction: column; }
}

@media (max-width: 520px) {
  .dashboard-cards,
  .guide-grid,
  .definition-grid,
  .guide-relationship-grid,
  .guide-flow-branches { grid-template-columns: 1fr; }
  .brand-mark { width: 44px; height: 44px; flex-basis: 44px; }
  .site-nav a { padding: .45rem .5rem; font-size: .85rem; }
  .detail-panel dl,
  dl,
  .guide-definitions { grid-template-columns: 1fr; }
  dt { padding-bottom: .1rem; border-bottom: 0; }
  dd { padding-top: 0; }
}

.error-page { max-width: 850px; }
.error-panel { padding: clamp(1.5rem, 5vw, 2.5rem); }
.error-panel dl { margin: 1.3rem 0; }

.logout-form {
  margin: 0;
  display: inline-flex;
}

.nav-logout {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.nav-logout:hover,
.nav-logout:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.override-indicator {
  display: inline-block;
  margin-left: 0.3rem;
  color: #a85d00;
  font-weight: 800;
}

.override-note,
.override-warning {
  margin-top: 0.35rem;
  font-size: 0.92rem;
}

.override-note {
  color: #67491d;
}

.override-warning {
  color: #8a4300;
  font-weight: 700;
}

.compact-action-form {
  margin-top: 0.65rem;
}

.compact-button {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.override-panel {
  margin-bottom: 1rem;
}

.override-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.override-card {
  border: 1px solid #dbc8aa;
  border-radius: 0.8rem;
  padding: 1rem;
  background: #fffaf1;
}

.override-card h3,
.override-card p {
  margin-top: 0;
}

@media (max-width: 760px) {
  .logout-form {
    width: 100%;
  }

  .nav-logout {
    width: 100%;
    text-align: left;
  }
}

/* Status and fleet activity presentation */
.status-badge.live { border-color: #8fd0aa; background: #e9f8ef; color: #12613c; }
.status-badge.paused { border-color: #e7bd6f; background: #fff5d9; color: #7a4800; }
.status-badge.stale { border-color: #e5c16d; background: #fff8df; color: #785100; }
.status-badge.offline { border-color: #dc9a9a; background: #fff0f0; color: #8d2020; }
.status-badge.revoked { border-color: #a8adb3; background: #eceff1; color: #3f474f; }
.status-badge.never-seen,
.status-badge.unknown { border-color: #ccd2d8; background: #f4f6f8; color: #52606d; }

.activity-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: .2rem .58rem;
  border: 1px solid #d6dce2;
  border-radius: 999px;
  background: #f4f6f8;
  color: #40505e;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}
.activity-badge.large { padding: .4rem .8rem; font-size: .92rem; }
.activity-badge.empty { border-color: #ccd2d8; background: #f4f6f8; color: #52606d; }
.activity-badge.light { border-color: #b7cee5; background: #eef7ff; color: #245b85; }
.activity-badge.typical { border-color: #b9c8a7; background: #f2f8e9; color: #436125; }
.activity-badge.active { border-color: #8fd0aa; background: #e9f8ef; color: #12613c; }
.activity-badge.heavy { border-color: #e0aa70; background: #fff0df; color: #8d4600; }
.activity-badge.unknown { border-color: #ccd2d8; background: #f4f6f8; color: #52606d; }
.activity-summary { display: block; max-width: 270px; margin-top: .35rem; color: var(--muted); line-height: 1.3; }
.activity-comparison { margin-bottom: .35rem; font-size: 1.04rem; font-weight: 750; }
.activity-overview-panel { background: linear-gradient(135deg, #fff 0%, #fffaf3 100%); }
.count-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1rem; }
.count-cards strong { font-size: 1.65rem; }

.pause-zone,
.resume-zone {
  margin: 1.25rem 0;
  padding: 1.2rem;
  border-radius: var(--radius);
}
.pause-zone { border: 1px solid #e5bb7e; background: #fff8ed; }
.resume-zone { border: 1px solid #91c9a9; background: #eefaf2; }
.pause-zone p,
.resume-zone p { max-width: 850px; color: #4f5660; }
.pause { background: #a65d00; }
.pause:hover { background: #7e4500; }
.resume { background: var(--success); }
.resume:hover { background: #105a38; }

.chart-panel { overflow: hidden; }
.chart-wrap { width: 100%; }
.chart-wrap canvas {
  display: block;
  width: 100%;
  height: 420px;
  border: 1px solid #e6dfd6;
  border-radius: 10px;
  background: #fff;
}
.chart-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .7rem; color: var(--muted); font-size: .84rem; font-weight: 750; }
.chart-legend span::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: .4rem; vertical-align: middle; border-radius: 999px; }
.legend-users::before { background: #2563eb; }
.legend-recipes::before { background: #c95400; }
.legend-organizations::before { background: #7c3aed; }
.legend-displays::before { background: #18794e; }

@media (max-width: 760px) {
  .count-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-wrap canvas { height: 340px; }
}

@media (max-width: 520px) {
  .count-cards { grid-template-columns: 1fr; }
}

/* Fleet filters, application branding, and revoked-IP awareness */
.filter-panel { margin-bottom: 1rem; }
.filter-heading { align-items: flex-start; }
.filter-result-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .25rem .7rem;
  border: 1px solid #d7d1c9;
  border-radius: 999px;
  background: #f8f5f1;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}
.instance-filter-form { max-width: none; }
.instance-filter-form label {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
  gap: .38rem;
  color: var(--ink);
  font-weight: 750;
}
.instance-filter-form input,
.instance-filter-form select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: .62rem .72rem;
  border: 1px solid #bfc7cf;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.instance-filter-form input:focus,
.instance-filter-form select:focus {
  outline: 3px solid rgba(242,122,10,.2);
  border-color: var(--orange);
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: .85rem;
}
.filter-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: .9rem;
  margin-top: 1rem;
}
.comparison-filter {
  display: grid;
  grid-template-columns: minmax(145px, .8fr) repeat(2, minmax(170px, 1fr));
  align-items: end;
  gap: .8rem;
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid #ddd5cc;
  border-radius: 10px;
  background: #fffaf5;
}
.comparison-filter legend {
  padding: 0 .35rem;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 850;
}
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
  margin-top: 1rem;
}
.application-cell { text-align: center; }
.application-logo {
  display: inline-block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  vertical-align: middle;
}
.revoked-ip-match-row > td {
  background: #fff5ed;
  border-top-color: #efb179;
  border-bottom-color: #efb179;
}
.revoked-ip-match-row > td:first-child { box-shadow: inset 4px 0 0 #c95d12; }
.revoked-ip-alert {
  display: block;
  width: fit-content;
  margin-top: .35rem;
  padding: .18rem .48rem;
  border: 1px solid #e09a5f;
  border-radius: 999px;
  background: #fff0df;
  color: #8d3900;
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: help;
}
.revoked-ip-indicator {
  display: inline-block;
  margin-left: .25rem;
  color: #b34700;
  font-weight: 900;
  cursor: help;
}

@media (max-width: 1100px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(155px, 1fr)); }
  .comparison-filter { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .filter-grid,
  .filter-comparison-grid { grid-template-columns: 1fr 1fr; }
  .comparison-filter { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .filter-grid,
  .filter-comparison-grid { grid-template-columns: 1fr; }
  .filter-result-count { white-space: normal; }
}

/* Retention settings and run history */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.retention-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}
.input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
}
.input-with-unit span {
  color: var(--muted);
  font-weight: 750;
}
.checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: .65rem;
  margin-top: .9rem;
}
.checkbox-row input { width: auto; margin-top: .25rem; }
.retention-status-panel { margin-top: 1rem; }
.retention-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin: 0 0 1rem;
}
.retention-status-grid div {
  padding: .8rem;
  border: 1px solid #e2dcd4;
  border-radius: 10px;
  background: #fffaf5;
}
.retention-status-grid dt { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.retention-status-grid dd { margin: .3rem 0 0; font-weight: 800; }
.retention-run-status {
  display: inline-flex;
  padding: .2rem .5rem;
  border: 1px solid #ccd2d8;
  border-radius: 999px;
  background: #f4f6f8;
  font-size: .76rem;
  font-weight: 850;
}
.retention-run-status.completed { border-color: #8fd0aa; background: #e9f8ef; color: #12613c; }
.retention-run-status.failed { border-color: #dc9a9a; background: #fff0f0; color: #8d2020; }
.retention-run-status.running { border-color: #b7cee5; background: #eef7ff; color: #245b85; }
.retention-runs-table { margin-top: .5rem; }

@media (max-width: 900px) {
  .settings-grid,
  .retention-fields,
  .retention-status-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .settings-grid,
  .retention-fields,
  .retention-status-grid { grid-template-columns: 1fr; }
}

/* Country identification */
.country-cell { white-space: nowrap; }
.geoip-status-panel { margin: 1rem 0; }
.site-footer { flex-wrap: wrap; gap: .65rem 1.25rem; }

/* Settings: database-backed administrator allow list. */
.inline-admin-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
  margin: 1rem 0;
}
.inline-admin-form label {
  margin: 0;
}
.inline-admin-form input {
  width: 100%;
}
.admin-access-table .small-note {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted, #667085);
  font-size: 0.78rem;
}
.admin-access-table form {
  margin: 0;
}
.danger-link {
  border: 0;
  background: transparent;
  color: #a12a1f;
  padding: 0;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
@media (max-width: 720px) {
  .inline-admin-form {
    grid-template-columns: 1fr;
  }
}

/* Locale selection and localized responsive content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.locale-menu {
  position: relative;
  margin: 0;
}

.locale-menu summary {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2.2rem;
  padding: .4rem .55rem;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 8px;
  color: #fff;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.locale-menu summary::-webkit-details-marker { display: none; }
.locale-menu summary::marker { content: ""; }
.locale-menu summary:hover,
.locale-menu summary:focus-visible,
.locale-menu[open] summary { background: rgba(255, 255, 255, .12); }
.locale-globe { font-size: 1rem; line-height: 1; }
.locale-code { white-space: nowrap; }

.locale-menu-panel {
  position: absolute;
  top: calc(100% + .5rem);
  inset-inline-end: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(2, minmax(13rem, 1fr));
  gap: .25rem;
  width: min(34rem, calc(100vw - 2rem));
  max-height: min(70vh, 34rem);
  margin: 0;
  padding: .65rem;
  overflow-y: auto;
  border: 1px solid #d8dee6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 35, 49, .24);
}

.locale-menu-title {
  grid-column: 1 / -1;
  margin: 0 0 .25rem;
  padding: .2rem .35rem .45rem;
  color: var(--ink);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.locale-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  min-height: 2.5rem;
  padding: .55rem .65rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .86rem;
  text-align: start;
  cursor: pointer;
}

.locale-option small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
}

.locale-option:hover,
.locale-option:focus-visible {
  transform: none;
  background: #f4f6f8;
  border-color: #d8dee6;
  color: var(--ink);
  box-shadow: none;
}
.locale-option:hover small,
.locale-option:focus-visible small { color: #4e5c69; }
.locale-option.active { background: #fff3e6; border-color: #efb276; }
.locale-option.active::before { content: "✓"; color: var(--orange-dark); font-weight: 900; }
.locale-option.active span { margin-right: auto; }

.public-header-inner { min-height: 76px; }
.guide-card-wide { grid-column: 1 / -1; }
.auth-page { max-width: 760px; }
.auth-panel { padding: clamp(1.5rem, 5vw, 3rem); text-align: center; }
.auth-panel .guide-logo { margin: 0 auto 1.2rem; }
.auth-panel .button-link { margin-top: .8rem; }

th, td, dt, dd, button, a, label, .status-badge { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .site-header-inner { gap: 1rem; }
  .site-nav { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .locale-menu-panel {
    position: fixed;
    top: 5.25rem;
    right: 1rem;
    left: 1rem;
    grid-template-columns: 1fr;
    width: auto;
    max-height: calc(100vh - 6.25rem);
  }
  .public-header-inner { align-items: center; }
}

.admin-locale-form {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  white-space: nowrap;
}
.admin-locale-form select {
  width: auto;
  min-width: 5.6rem;
  padding: .38rem .45rem;
  font-size: .8rem;
}
.compact-button {
  min-height: 0;
  padding: .42rem .55rem;
  font-size: .78rem;
}

/* License administration */
.heading-action {
  flex: 0 0 auto;
  margin: .2rem 0 0;
}

.license-issue-form {
  max-width: 900px;
}

.license-issue-form .section-heading {
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee8e1;
}

.license-issue-form .section-heading p {
  margin: .2rem 0 0;
}

.license-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.1rem;
}

.license-form-grid label {
  min-width: 0;
}

.license-form-grid .field-wide {
  grid-column: 1 / -1;
}

.optional-label {
  margin-left: .25rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}

.license-delivery-option {
  margin-top: 1.1rem;
  padding: 1rem 1.05rem;
  border: 1px solid #e4d7c7;
  border-radius: 10px;
  background: var(--cream);
}

.license-delivery-option .checkbox-row {
  margin: 0;
  cursor: pointer;
}

.license-delivery-option .checkbox-row > span {
  display: block;
  min-width: 0;
}

.license-delivery-option strong,
.license-delivery-option small {
  display: block;
}

.license-delivery-option small {
  margin-top: .2rem;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
}

@media (max-width: 760px) {
  .heading-action {
    width: 100%;
  }

  .heading-action button {
    width: 100%;
  }

  .license-form-grid {
    grid-template-columns: 1fr;
  }

  .license-form-grid .field-wide {
    grid-column: auto;
  }
}


.license-issue-form label.checkbox-row {
  display: flex;
  align-items: flex-start;
}
.license-trial-override-row {
  padding: .85rem .95rem;
  border: 1px solid #e4d7c7;
  border-radius: 9px;
  background: #fffaf5;
}
.license-trial-override-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .2rem;
}
.license-trial-override-row strong,
.license-trial-override-row small {
  display: block;
}
.license-trial-override-row small {
  margin-top: 0;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
}
.license-scope-period {
  white-space: nowrap;
}
.license-scope-term-separator {
  color: var(--muted);
}
.license-scope-cell > small {
  display: block;
  margin-top: .18rem;
  color: var(--muted);
}

/* Licensing operational settings */
.license-operational-grid .panel {
  margin-top: 0;
}
.license-signing-panel,
.license-smtp-panel {
  max-width: none;
}
.license-settings-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin: 1rem 0;
}
.license-settings-status > div {
  padding: .8rem;
  border: 1px solid #e2dcd4;
  border-radius: 10px;
  background: #fffaf5;
  min-width: 0;
}
.license-settings-status dt {
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.license-settings-status dd {
  margin: .3rem 0 0;
  padding: 0;
  border: 0;
  font-weight: 800;
}
.license-public-key-block label {
  display: block;
  margin: 1rem 0;
  font-weight: 750;
}
.license-public-key-block textarea {
  display: block;
  width: 100%;
  min-height: 6.5rem;
  margin-top: .38rem;
  padding: .72rem .78rem;
  border: 1px solid #bfc7cf;
  border-radius: 8px;
  background: #f8f7f5;
  color: var(--ink);
  font: 0.82rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  resize: vertical;
  overflow-wrap: anywhere;
}
.smtp-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: .8rem;
}
.smtp-fields label {
  margin-bottom: 0;
}
.smtp-sender-name-row {
  display: block;
  width: 100%;
}
.smtp-sender-name-row input {
  width: 100%;
}
.smtp-options {
  display: grid;
  gap: .25rem;
  margin: .8rem 0;
}
.smtp-options .checkbox-row {
  margin: .25rem 0;
}
.license-signing-init .info-callout {
  margin-top: 1rem;
}
@media (max-width: 760px) {
  .license-settings-status,
  .smtp-fields {
    grid-template-columns: 1fr;
  }
}
button:disabled,
button:disabled:hover {
  transform: none;
  background: #a8afb6;
  color: #f7f7f7;
  box-shadow: none;
  cursor: not-allowed;
}
.license-prerequisite-warning {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .55rem;
  max-width: 900px;
}

/* License detail action layout */
.license-actions-panel .section-heading {
  margin-bottom: 1rem;
}

.license-actions-panel .section-heading p:last-child {
  margin: .25rem 0 0;
}

.license-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.license-action-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  padding: 1.05rem;
  border: 1px solid #e2dcd4;
  border-radius: 12px;
  background: #fffaf5;
}

.license-action-card h3 {
  margin: 0 0 .3rem;
  font-size: 1rem;
}

.license-action-copy p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.license-action-warning {
  border-color: #edc895;
  background: #fff9ef;
}

.license-action-danger {
  grid-column: 1 / -1;
  border-color: #d99a9a;
  background: #fff4f4;
}

.license-action-form {
  display: grid;
  gap: .75rem;
  margin-top: auto;
  padding-top: 1rem;
}

.license-action-form label {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: .84rem;
  font-weight: 750;
}

.license-action-form input,
.license-action-form select {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .68rem .72rem;
  border: 1px solid #bfc7cf;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.license-action-form input:focus,
.license-action-form select:focus {
  outline: 3px solid rgba(242,122,10,.2);
  border-color: var(--orange);
}

.license-action-form button {
  justify-self: start;
}

.license-action-simple {
  align-items: end;
}

@media (max-width: 760px) {
  .license-action-grid {
    grid-template-columns: 1fr;
  }

  .license-action-danger {
    grid-column: auto;
  }

  .license-action-form button {
    width: 100%;
  }
}

/* License inventory, application badges, and SMTP diagnostics */
.application-badge {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  width: fit-content;
  max-width: 100%;
  padding: .3rem .58rem;
  border: 1px solid #ddd5cc;
  border-radius: 999px;
  background: #fffaf5;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}
.application-badge-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
}
.application-badge-large {
  padding: .4rem .72rem;
  font-size: .9rem;
}
.application-badge-large .application-badge-logo {
  width: 30px;
  height: 30px;
}
.license-summary-cards {
  margin-top: .8rem;
}
.dashboard-summary-panel .dashboard-cards {
  margin-bottom: 0;
}
.dashboard-instance-summary .dashboard-cards {
  margin-top: .8rem;
}
.dashboard-license-summary .license-summary-cards {
  margin-bottom: 0;
}
.license-filter-form {
  max-width: none;
}
.license-filter-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.license-smtp-form {
  max-width: none;
}
.smtp-test-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5ded6;
}
.smtp-test-zone p {
  margin: .25rem 0 0;
  max-width: 720px;
}
.smtp-test-zone form {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .license-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .smtp-test-zone {
    align-items: stretch;
    flex-direction: column;
  }
  .smtp-test-zone button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .license-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Safe cloud-hosting metadata reported by Blackcap */
.hosting-metadata-detail {
  display: grid;
  gap: .35rem;
}
.hosting-metadata-detail > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .7rem;
}
.hosting-metadata-detail strong {
  min-width: 9rem;
}

/* Application and packaged-distribution administration. */
.application-title-logo{width:48px;height:48px;object-fit:contain;vertical-align:middle;margin-inline-end:12px}.panel-subtle{border:1px solid var(--border-color,#d6d8dc);border-radius:10px;padding:14px;background:rgba(127,127,127,.04)}.download-page{max-width:720px;margin:7vh auto;padding:20px}.download-card{text-align:center;padding:34px}.download-logo{display:block;max-width:210px;max-height:80px;object-fit:contain;margin:0 auto 24px}.action-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid rgba(127,127,127,.18)}.action-row>div{display:flex;flex-direction:column;gap:3px}

/* Application/package distribution administration */
.distribution-admin-form {
  max-width: none;
  padding: 1.45rem;
}

.distribution-form-heading {
  padding-bottom: .8rem;
  border-bottom: 1px solid #eee8e1;
}

.distribution-form-heading p {
  margin: .2rem 0 0;
}

.distribution-form-section {
  margin-top: 1.35rem;
}

.distribution-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.1rem;
}

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

.distribution-form-grid > label,
.distribution-form-grid > .application-toggle-stack,
.distribution-form-grid > .license-delivery-option {
  min-width: 0;
}

.distribution-form-grid .field-wide {
  grid-column: 1 / -1;
}

.package-trial-override-panel {
  margin-top: .5rem;
}

.package-trial-override-panel .checkbox-row {
  margin-top: 0;
}

.package-override-reason {
  margin-bottom: 0 !important;
}

.application-detail-title {
  display: flex;
  align-items: center;
  gap: .15rem;
}

.application-key {
  margin: -.15rem 0 0 3.8rem;
  color: var(--muted);
}

.application-toggle-stack {
  align-self: end;
  padding-bottom: .55rem;
}

.application-toggle-stack .checkbox-row {
  margin: .35rem 0;
}

.application-source-action {
  margin-top: 1rem;
}

.target-management-list {
  display: grid;
  gap: .9rem;
  margin-bottom: 1rem;
}

.target-management-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 1rem;
  border: 1px solid #e2dcd4;
  border-radius: 10px;
  background: #fffaf5;
}

.build-targets-heading {
  align-items: center;
}

.build-target-config-list {
  display: grid;
  gap: .65rem;
  margin: .65rem 0 1rem;
}

.build-target-config-item {
  overflow: hidden;
  border: 1px solid #e2dcd4;
  border-radius: 10px;
  background: #fffaf5;
}

.build-target-config-summary {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(18rem, 1.5fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: .85rem 1rem;
  cursor: pointer;
  list-style: none;
}

.build-target-config-summary::-webkit-details-marker,
.add-build-target-summary::-webkit-details-marker { display: none; }

.build-target-config-item[open] .build-target-config-summary {
  border-bottom: 1px solid #e2dcd4;
  background: #fff7ef;
}

.build-target-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .2rem;
}

.build-target-identity strong { overflow-wrap: anywhere; }
.build-target-identity code { color: var(--muted); overflow-wrap: anywhere; }

.build-target-script-summary { min-width: 0; }
.build-target-script-summary > span {
  display: block;
  margin-bottom: .2rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.build-target-script-summary code { display: block; overflow-wrap: anywhere; }

.target-status-badge.enabled { border-color: #b5dbc1; background: #eefaf2; color: #25633a; }
.target-status-badge.disabled { border-color: #d8d8d8; background: #f4f4f4; color: #666; }

.build-target-edit-affordance {
  color: var(--link);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

.build-target-config-item[open] .build-target-edit-affordance::before { content: 'Close '; }
.build-target-config-item[open] .build-target-edit-affordance { font-size: 0; }
.build-target-config-item[open] .build-target-edit-affordance::before { font-size: .82rem; }

.build-target-edit-form {
  max-width: none;
  padding: 1rem;
}

.build-target-edit-grid {
  display: grid;
  grid-template-columns: minmax(10rem, .8fr) minmax(12rem, 1fr) minmax(18rem, 1.6fr) auto;
  gap: .8rem;
  align-items: end;
}

.build-target-edit-grid label {
  min-width: 0;
  margin: 0;
}

.target-key {
  display: block;
  min-height: 42px;
  margin-top: .38rem;
  padding: .68rem .72rem;
  overflow: hidden;
  border: 1px solid #d7d1ca;
  border-radius: 8px;
  background: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-enabled-field {
  min-height: 42px;
  margin: 0 !important;
  padding-bottom: .5rem;
  white-space: nowrap;
}

.build-target-edit-actions { margin-top: .8rem; }
.build-target-empty { margin: 0; }

.add-build-target-panel {
  margin: .85rem 0 1.25rem;
  padding: 0;
  overflow: hidden;
}

.add-build-target-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  cursor: pointer;
  list-style: none;
}

.add-build-target-summary > span:first-child {
  display: flex;
  flex-direction: column;
  gap: .18rem;
}

.add-build-target-summary small { color: var(--muted); font-size: .8rem; font-weight: 600; }
.add-build-target-panel[open] .add-build-target-summary { border-bottom: 1px solid #e2dcd4; }

.add-target-form {
  max-width: none;
  margin: 0;
  padding: 1rem;
}

.application-release-table {
  margin-top: .35rem;
}

@media (max-width: 980px) {
  .distribution-form-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .target-management-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .build-target-config-summary {
    grid-template-columns: minmax(12rem, 1fr) minmax(16rem, 1.4fr) auto;
  }

  .build-target-edit-affordance {
    grid-column: 1 / -1;
    justify-self: end;
  }

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

@media (max-width: 700px) {
  .distribution-form-grid,
  .distribution-form-grid-three,
  .build-target-edit-grid {
    grid-template-columns: 1fr;
  }

  .build-target-config-summary {
    grid-template-columns: 1fr auto;
    gap: .65rem;
  }

  .build-target-script-summary { grid-column: 1 / -1; }
  .build-target-edit-affordance { grid-column: auto; justify-self: end; }

  .distribution-form-grid .field-wide {
    grid-column: auto;
  }

  .application-key {
    margin-inline-start: 0;
  }

  .application-toggle-stack {
    align-self: auto;
  }
}

/* Application source/configuration validation */
.notice-error {
  border-color: #d9a4a4;
  background: #fff0f0;
  color: #7d1e1e;
}
.field-error-container {
  padding: .65rem;
  margin: -.65rem;
  border: 1px solid #cf7777;
  border-radius: 9px;
  background: #fff7f7;
}
.field-error-container > input,
.field-error-container > select,
.field-error-container > textarea {
  border-color: #b53d3d;
}
.credential-status {
  margin: .45rem 0 .55rem;
  padding: .55rem .7rem;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 750;
}
.credential-status-ok {
  border: 1px solid #9dc5a6;
  background: #f0faf2;
  color: #275d32;
}
.credential-status-missing {
  border: 1px solid #d7a6a6;
  background: #fff2f2;
  color: #7b2323;
}
.deployment-key-field textarea { min-height: 165px; }
.source-check-help { margin-top: .85rem; }
.source-check-error { margin-bottom: .85rem; }

/* Package operations */
.status-badge.building { border-color: #e7bd6f; background: #fff5d9; color: #7a4800; }
.status-badge.ready,
.status-badge.installed { border-color: #8fd0aa; background: #e9f8ef; color: #12613c; }
.status-badge.downloaded { border-color: #9bbde1; background: #eef6ff; color: #24567f; }
.status-badge.failed { border-color: #dc9a9a; background: #fff0f0; color: #8d2020; }
.status-badge.closed { border-color: #a8adb3; background: #eceff1; color: #3f474f; }
.package-summary-cards {
  margin: .8rem 0 1rem;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.package-filter-form { max-width: none; }
.package-filter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.package-search-wide { grid-column: span 2; }
.package-delivery-form { max-width: none; }
.package-delivery-grid {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr);
  gap: 1rem;
  align-items: start;
}
.package-delivery-grid label {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
  gap: .42rem;
  font-weight: 750;
}
.package-delivery-grid input,
.package-delivery-grid select,
.package-delivery-grid textarea {
  width: 100%;
  min-width: 0;
  margin: 0;
  font: inherit;
}
.package-description-field { grid-column: 1 / -1; }
.package-delivery-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5ded6;
}
.package-delivery-actions form { margin: 0; }
.compact-detail-list { margin-top: 1rem; }

@media (max-width: 1000px) {
  .package-summary-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .package-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .package-summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .package-delivery-grid { grid-template-columns: 1fr; }
  .package-description-field { grid-column: auto; }
}
@media (max-width: 520px) {
  .package-summary-cards,
  .package-filter-grid { grid-template-columns: 1fr; }
  .package-search-wide { grid-column: auto; }
}
.download-actions{display:flex;flex-direction:column;align-items:center;gap:.8rem;margin-top:1.1rem}.download-actions[hidden]{display:none}.download-actions .button-link{width:min(100%,360px)}.download-cloud-help{max-width:620px;margin:.25rem auto}.download-command{width:100%;max-width:100%;box-sizing:border-box;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere;background:rgba(127,127,127,.08);border:1px solid var(--line);border-radius:8px;padding:.9rem;margin:.4rem 0 0}.download-command code{white-space:pre-wrap;overflow-wrap:anywhere}

/* Package installation/download journey. Keep technical instructions readable on narrow screens. */
.download-guide-step{width:100%;display:flex;justify-content:center;margin:.05rem 0 .2rem;padding:0}
.download-guide-step .button-link{width:min(100%,360px)}
.install-guide-card{text-align:left}
.install-guide-card .download-logo{margin-inline:auto}
.install-guide-card h1{text-align:center}
.install-guide-card pre{max-width:100%;box-sizing:border-box;text-align:left;overflow-x:auto;white-space:pre;overflow-wrap:normal}
.install-guide-card pre code{white-space:pre;overflow-wrap:normal}
.install-guide-command-panel,.install-guide-command-block{margin:1rem 0;padding:1rem;border:1px solid var(--line);border-radius:8px;background:rgba(127,127,127,.04)}
.install-guide-command-block pre,.install-guide-command-panel pre{margin-bottom:0}
.install-guide-command-heading{display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap}
.install-guide-command-actions{display:flex;gap:.55rem;flex-wrap:wrap}
.install-guide-command-heading .button-link.compact{width:auto;min-width:0;padding:.45rem .75rem}
.install-guide-copy-status:empty{display:none}
.install-guide-card .download-command{white-space:pre;overflow-x:auto;overflow-wrap:normal}
.install-guide-card .download-command code{white-space:pre;overflow-wrap:normal}
@media (max-width: 620px){
  .download-page{margin:2vh auto;padding:10px}
  .download-card{padding:20px 16px}
  .install-guide-card h1{font-size:1.7rem}
  .install-guide-card h2{font-size:1.25rem;margin-top:1.6rem}
  .install-guide-command-heading{align-items:flex-start;flex-direction:column}
  .install-guide-command-actions{width:100%}
}

/* Data tables keep their natural column widths rather than compressing identifiers,
   commits, dates, and owner addresses into narrow wrapped columns. Every table-wrap
   remains the native horizontal-scroll owner; the viewport dock below mirrors it
   only while that native scrollbar is below the visible page. */
.table-wrap > table {
  width: max-content;
  min-width: 100%;
}
.table-wrap > table th { white-space: nowrap; }
.table-wrap > table td { overflow-wrap: normal; word-break: normal; }
.table-wrap > table td code,
.table-wrap > table td a { overflow-wrap: normal; word-break: normal; }

.data-table-floating-header {
  position: fixed;
  overflow: hidden;
  z-index: 940;
  pointer-events: none;
  max-width: 100vw;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 8px 18px rgba(23, 35, 49, .12);
}
.data-table-floating-header[hidden] { display: none !important; }
.data-table-floating-table {
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  transform-origin: top left;
}
.data-table-floating-table th {
  position: static !important;
  top: auto !important;
  box-sizing: border-box;
  background: #fffaf3;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table-floating-scrollbar {
  position: fixed;
  bottom: 0;
  z-index: 950;
  height: 19px;
  min-height: 19px;
  max-width: 100vw;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(255, 250, 243, .98);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 -5px 12px rgba(23, 35, 49, .06);
  scrollbar-gutter: stable;
}
.data-table-floating-scrollbar[hidden] { display: none !important; }
.data-table-floating-scrollbar:focus-visible { outline: 3px solid rgba(242,122,10,.28); outline-offset: -3px; }
.data-table-floating-scrollbar-spacer { height: 1px; min-height: 1px; }
.table-wrap.has-floating-table-scroll { padding-bottom: 2px; }

.package-list-table { min-width: 98rem !important; }
.package-list-table th:nth-child(1), .package-list-table td:nth-child(1) { min-width: 12rem; }
.package-list-table th:nth-child(2), .package-list-table td:nth-child(2) { min-width: 8rem; }
.package-list-table th:nth-child(3), .package-list-table td:nth-child(3) { min-width: 10rem; }
.package-list-table th:nth-child(4), .package-list-table td:nth-child(4) { min-width: 8rem; }
.package-list-table th:nth-child(5), .package-list-table td:nth-child(5) { min-width: 9rem; }
.package-list-table th:nth-child(6), .package-list-table td:nth-child(6) { min-width: 15rem; }
.package-list-table th:nth-child(7), .package-list-table td:nth-child(7) { min-width: 21rem; }
.package-list-table th:nth-child(8), .package-list-table td:nth-child(8) { min-width: 15rem; }
.package-list-table th:nth-child(9), .package-list-table td:nth-child(9) { min-width: 7rem; }
.package-list-table th:nth-child(10), .package-list-table td:nth-child(10) { min-width: 16rem; }
.package-list-table .status-substate { display: block; margin-top: .35rem; max-width: 14rem; color: var(--muted); font-size: .78rem; line-height: 1.25; white-space: normal; }

.package-download-table { min-width: 122rem !important; }
.package-download-table th:nth-child(1), .package-download-table td:nth-child(1) { min-width: 15rem; }
.package-download-table th:nth-child(2), .package-download-table td:nth-child(2) { min-width: 10rem; }
.package-download-table th:nth-child(3), .package-download-table td:nth-child(3) { min-width: 13rem; }
.package-download-table th:nth-child(4), .package-download-table td:nth-child(4) { min-width: 25rem; }
.package-download-table th:nth-child(5), .package-download-table td:nth-child(5) { min-width: 9rem; }
.package-download-table th:nth-child(6), .package-download-table td:nth-child(6),
.package-download-table th:nth-child(7), .package-download-table td:nth-child(7),
.package-download-table th:nth-child(8), .package-download-table td:nth-child(8) { min-width: 12rem; }
.package-download-table th:nth-child(9), .package-download-table td:nth-child(9) { min-width: 42rem; }

.dashboard-instance-table { min-width: 88rem !important; }
.license-list-table { min-width: 84rem !important; }
.application-list-table { min-width: 68rem !important; }
.table-wrap > table.application-release-table { min-width: 78rem !important; }
.instance-history-table { min-width: 82rem !important; }
.license-trial-history-table { min-width: 84rem !important; }
.license-conflict-table { min-width: 72rem !important; }
.license-audit-table, .package-audit-table { min-width: 78rem !important; }
.admin-access-table > table { min-width: 76rem !important; }
.retention-runs-table > table { min-width: 90rem !important; }

.package-audit-table td:last-child code,
.license-audit-table td:last-child code {
  display: block;
  min-width: 24rem;
  max-width: 42rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Reviewed administrative table widths. These tables carry identifiers, timestamps,
   email addresses, commits, and audit data; let the shared horizontal scroller carry
   the width instead of wrapping operational values into tall, hard-to-scan rows. */
.application-list-table th:nth-child(1), .application-list-table td:nth-child(1) { min-width: 12rem; }
.application-list-table th:nth-child(2), .application-list-table td:nth-child(2) { min-width: 18rem; }
.application-list-table th:nth-child(3), .application-list-table td:nth-child(3) { min-width: 25rem; }
.application-list-table th:nth-child(4), .application-list-table td:nth-child(4) { min-width: 13rem; }
.application-list-table th:nth-child(5), .application-list-table td:nth-child(5) { min-width: 9rem; }

.application-release-table th:nth-child(1), .application-release-table td:nth-child(1) { min-width: 13rem; }
.application-release-table th:nth-child(2), .application-release-table td:nth-child(2) { min-width: 11rem; }
.application-release-table th:nth-child(3), .application-release-table td:nth-child(3) { min-width: 26rem; }
.application-release-table th:nth-child(4), .application-release-table td:nth-child(4) { min-width: 10rem; }
.application-release-table th:nth-child(5), .application-release-table td:nth-child(5) { min-width: 9rem; }
.application-release-table th:nth-child(6), .application-release-table td:nth-child(6) { min-width: 13rem; }

.dashboard-instance-table th:nth-child(1), .dashboard-instance-table td:nth-child(1) { min-width: 8rem; }
.dashboard-instance-table th:nth-child(2), .dashboard-instance-table td:nth-child(2) { min-width: 11rem; }
.dashboard-instance-table th:nth-child(3), .dashboard-instance-table td:nth-child(3) { min-width: 16rem; }
.dashboard-instance-table th:nth-child(4), .dashboard-instance-table td:nth-child(4) { min-width: 13rem; }
.dashboard-instance-table th:nth-child(5), .dashboard-instance-table td:nth-child(5),
.dashboard-instance-table th:nth-child(6), .dashboard-instance-table td:nth-child(6) { min-width: 12rem; }
.dashboard-instance-table th:nth-child(7), .dashboard-instance-table td:nth-child(7) { min-width: 13rem; }
.dashboard-instance-table th:nth-child(8), .dashboard-instance-table td:nth-child(8) { min-width: 11rem; }
.dashboard-instance-table th:nth-child(9), .dashboard-instance-table td:nth-child(9) { min-width: 10rem; }
.dashboard-instance-table th:nth-child(10), .dashboard-instance-table td:nth-child(10) { min-width: 13rem; }

.instance-history-table th:nth-child(1), .instance-history-table td:nth-child(1) { min-width: 13rem; }
.instance-history-table th:nth-child(2), .instance-history-table td:nth-child(2) { min-width: 10rem; }
.instance-history-table th:nth-child(3), .instance-history-table td:nth-child(3),
.instance-history-table th:nth-child(4), .instance-history-table td:nth-child(4) { min-width: 13rem; }
.instance-history-table th:nth-child(5), .instance-history-table td:nth-child(5) { min-width: 12rem; }
.instance-history-table th:nth-child(6), .instance-history-table td:nth-child(6) { min-width: 16rem; }
.instance-history-table th:nth-child(7), .instance-history-table td:nth-child(7) { min-width: 18rem; }

.license-list-table th:nth-child(1), .license-list-table td:nth-child(1) { min-width: 13rem; }
.license-list-table th:nth-child(2), .license-list-table td:nth-child(2) { min-width: 11rem; }
.license-list-table th:nth-child(3), .license-list-table td:nth-child(3),
.license-list-table th:nth-child(4), .license-list-table td:nth-child(4) { min-width: 10rem; }
.license-list-table th:nth-child(5), .license-list-table td:nth-child(5) { min-width: 18rem; }
.license-list-table th:nth-child(6), .license-list-table td:nth-child(6) { min-width: 15rem; }
.license-list-table th:nth-child(7), .license-list-table td:nth-child(7) { min-width: 17rem; }
.license-list-table th:nth-child(8), .license-list-table td:nth-child(8) { min-width: 13rem; }

.license-trial-history-table th:nth-child(1), .license-trial-history-table td:nth-child(1),
.license-trial-history-table th:nth-child(2), .license-trial-history-table td:nth-child(2),
.license-trial-history-table th:nth-child(4), .license-trial-history-table td:nth-child(4) { min-width: 13rem; }
.license-trial-history-table th:nth-child(3), .license-trial-history-table td:nth-child(3) { min-width: 16rem; }
.license-trial-history-table th:nth-child(5), .license-trial-history-table td:nth-child(5) { min-width: 18rem; }
.license-trial-history-table th:nth-child(6), .license-trial-history-table td:nth-child(6) { min-width: 22rem; }
.license-trial-history-table th:nth-child(7), .license-trial-history-table td:nth-child(7) { min-width: 18rem; }

.license-conflict-table th:nth-child(1), .license-conflict-table td:nth-child(1) { min-width: 20rem; }
.license-conflict-table th:nth-child(2), .license-conflict-table td:nth-child(2),
.license-conflict-table th:nth-child(3), .license-conflict-table td:nth-child(3) { min-width: 14rem; }
.license-conflict-table th:nth-child(4), .license-conflict-table td:nth-child(4) { min-width: 9rem; }

.license-audit-table th:nth-child(1), .license-audit-table td:nth-child(1),
.package-audit-table th:nth-child(1), .package-audit-table td:nth-child(1) { min-width: 14rem; }
.license-audit-table th:nth-child(2), .license-audit-table td:nth-child(2),
.package-audit-table th:nth-child(2), .package-audit-table td:nth-child(2) { min-width: 18rem; }
.license-audit-table th:nth-child(3), .license-audit-table td:nth-child(3),
.package-audit-table th:nth-child(3), .package-audit-table td:nth-child(3) { min-width: 18rem; }
.license-audit-table th:nth-child(4), .license-audit-table td:nth-child(4),
.package-audit-table th:nth-child(4), .package-audit-table td:nth-child(4) { min-width: 16rem; }
.license-audit-table th:nth-child(5), .license-audit-table td:nth-child(5),
.package-audit-table th:nth-child(5), .package-audit-table td:nth-child(5) { min-width: 34rem; }

.admin-access-table > table th:nth-child(1), .admin-access-table > table td:nth-child(1) { min-width: 19rem; }
.admin-access-table > table th:nth-child(2), .admin-access-table > table td:nth-child(2) { min-width: 13rem; }
.admin-access-table > table th:nth-child(3), .admin-access-table > table td:nth-child(3) { min-width: 18rem; }
.admin-access-table > table th:nth-child(4), .admin-access-table > table td:nth-child(4) { min-width: 14rem; }
.admin-access-table > table th:nth-child(5), .admin-access-table > table td:nth-child(5) { min-width: 14rem; }
.admin-access-table > table th:nth-child(6), .admin-access-table > table td:nth-child(6) { min-width: 10rem; }

.retention-runs-table > table th:nth-child(1), .retention-runs-table > table td:nth-child(1) { min-width: 14rem; }
.retention-runs-table > table th:nth-child(2), .retention-runs-table > table td:nth-child(2) { min-width: 12rem; }
.retention-runs-table > table th:nth-child(3), .retention-runs-table > table td:nth-child(3) { min-width: 10rem; }
.retention-runs-table > table th:nth-child(4), .retention-runs-table > table td:nth-child(4),
.retention-runs-table > table th:nth-child(5), .retention-runs-table > table td:nth-child(5),
.retention-runs-table > table th:nth-child(6), .retention-runs-table > table td:nth-child(6),
.retention-runs-table > table th:nth-child(7), .retention-runs-table > table td:nth-child(7),
.retention-runs-table > table th:nth-child(8), .retention-runs-table > table td:nth-child(8) { min-width: 15rem; }
.retention-runs-table > table th:nth-child(9), .retention-runs-table > table td:nth-child(9) { min-width: 30rem; }

.package-trial-eligibility {
  display: grid;
  gap: .55rem;
}
.trial-eligibility-details {
  display: grid;
  grid-template-columns: minmax(7rem, auto) minmax(0, 1fr);
  gap: .3rem 1rem;
  margin: .35rem 0 0;
  padding-top: .65rem;
  border-top: 1px solid rgba(164, 83, 0, .2);
}
.trial-eligibility-details dt { font-weight: 800; color: var(--ink-soft); }
.trial-eligibility-details dd { margin: 0; }
.package-trial-override-panel {
  display: grid;
  grid-template-columns: minmax(17rem, .9fr) minmax(18rem, 1.1fr);
  gap: 1rem 1.4rem;
  align-items: start;
  border-color: #e6bf91;
  background: #fff9f0;
}
.package-trial-override-heading {
  grid-column: 1 / -1;
  padding-bottom: .75rem;
  border-bottom: 1px solid #edd8bd;
}
.package-trial-override-heading p { margin: .35rem 0 0; color: #6f4a20; max-width: 78rem; }
.package-trial-override-panel .checkbox-row { margin: 0; }
.package-trial-override-panel .package-override-reason { min-width: 0; }
@media (max-width: 760px) {
  .package-trial-override-panel { grid-template-columns: 1fr; }
}

/* Application release overview / history */
.application-source-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin: 0 0 1rem;
}
.application-source-summary-grid > div {
  min-width: 0;
  padding: .8rem .9rem;
  border: 1px solid #e2dcd4;
  border-radius: 10px;
  background: #fffaf5;
}
.application-source-summary-grid span {
  display: block;
  margin-bottom: .25rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.application-source-summary-grid strong,
.application-source-summary-grid code { overflow-wrap: anywhere; }
.release-opportunity-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .3rem;
}
.status-badge.available { border-color: #9bbde1; background: #eef6ff; color: #24567f; }
.status-badge.current { border-color: #ccd2d8; background: #f4f6f8; color: #52606d; }
.application-configuration-panel { padding: 0; overflow: hidden; }
.application-configuration-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.35rem;
  cursor: pointer;
  list-style: none;
}
.application-configuration-summary::-webkit-details-marker { display: none; }
.application-configuration-summary > span:first-child { display: flex; flex-direction: column; gap: .2rem; }
.application-configuration-summary small { color: var(--muted); font-size: .82rem; font-weight: 600; }
.application-configuration-panel[open] .application-configuration-summary { border-bottom: 1px solid #e5ded6; }
.application-configuration-content { padding: 0 1.35rem 1.35rem; }
.application-configuration-form { max-width: none; padding: 0; }
.application-release-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: .7rem;
  align-items: end;
  margin: .5rem 0 1rem;
}
.application-release-filters label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 0;
  color: var(--ink);
  font-weight: 750;
}
.application-release-filters select { width: 100%; margin: 0; padding: .65rem .7rem; }
.release-error-details { margin-top: .45rem; max-width: 32rem; }
.release-error-details summary { cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 750; }
.release-error-copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; align-items: start; margin-top: .45rem; }
.release-error-copy-row pre {
  max-height: 12rem;
  margin: 0;
  padding: .65rem;
  overflow: auto;
  border: 1px solid #e1d9d1;
  border-radius: 8px;
  background: #fffaf5;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .78rem;
}
.compact-button { min-height: 32px; padding: .35rem .6rem; }
@media (max-width: 900px) {
  .application-source-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .application-release-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .application-source-summary-grid,
  .application-release-filters { grid-template-columns: 1fr; }
  .release-opportunity-title-row { align-items: flex-start; flex-direction: column; }
  .release-error-copy-row { grid-template-columns: 1fr; }
}
.release-opportunity-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.release-opportunity-row { align-items: start; }
@media (max-width: 820px) {
  .release-opportunity-list { grid-template-columns: 1fr; }
}

/* Application release opportunity commit-history popup. */
.release-opportunity-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.release-opportunity-notice > div { min-width: 0; }
.release-opportunity-notice .button-link { flex: 0 0 auto; }
.application-commit-history-dialog {
  width: min(780px, calc(100% - 2rem));
  max-height: min(78vh, 760px);
  margin: auto;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(23,35,49,.28);
}
.application-commit-history-dialog::backdrop { background: rgba(23,35,49,.5); }
.application-commit-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
}
.application-commit-history-header h2 { margin: .1rem 0 0; }
.application-commit-history-summary { margin: .9rem 0; }
.application-commit-history-list {
  display: grid;
  gap: .75rem;
  max-height: 52vh;
  overflow-y: auto;
  padding-inline-end: .2rem;
}
.application-commit-history-entry {
  padding: .85rem .95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}
.application-commit-history-identity {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  flex-wrap: wrap;
}
.application-commit-history-identity code { white-space: nowrap; overflow-wrap: normal; }
.application-commit-history-message {
  margin: .55rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .release-opportunity-notice,
  .application-commit-history-header { align-items: stretch; flex-direction: column; }
  .release-opportunity-notice .button-link,
  .application-commit-history-header .button-link { align-self: flex-start; }
}

/* Bulk lifecycle actions on Licenses / Packages. */
.bulk-action-toolbar{display:flex;align-items:end;gap:1rem;justify-content:space-between;margin:0 0 1rem;flex-wrap:wrap}
.bulk-action-toolbar>div{display:grid;gap:.25rem;min-width:15rem;flex:1 1 22rem}
.bulk-action-toolbar small{color:var(--muted,#667085);max-width:70rem}
.bulk-action-toolbar .bulk-reason{display:grid;gap:.3rem;min-width:min(22rem,100%)}
.bulk-select-cell{width:2.5rem;text-align:center}
.bulk-select-cell input{width:1.05rem;height:1.05rem}
.bulk-action-results{margin-block:.75rem}
.bulk-action-results summary{cursor:pointer;font-weight:700}
.bulk-action-results ul{margin:.8rem 0 0;padding-left:1.35rem}
@media (max-width:760px){.bulk-action-toolbar{align-items:stretch}.bulk-action-toolbar .bulk-reason{width:100%}.bulk-action-toolbar button{width:100%}}

/* Effective application/package version status. */
.version-primary,.application-primary-version,.package-primary-version{font-weight:800;white-space:nowrap;}
.version-secondary,.status-substate{display:block;margin-top:.2rem;font-size:.78rem;color:var(--muted,#667085);}
.application-version-status{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;margin-top:.45rem;}
.status-badge.mixed{border-color:#b9a7d8;background:#f5f0ff;color:#5b3f84;}
.status-badge.out_of_date{border-color:#e7bd6f;background:#fff5d9;color:#7a4800;}
.status-badge.ahead_of_policy,.status-badge.needs_review{border-color:#d6a46f;background:#fff4e8;color:#7a4300;}
.status-badge.active{border-color:#8fd0aa;background:#e9f8ef;color:#12613c;}
.status-badge.deprecated{border-color:#a8adb3;background:#eceff1;color:#3f474f;}
.status-tooltip[data-tooltip]{cursor:help;position:relative;}
.status-tooltip[data-tooltip]:hover::after,.status-tooltip[data-tooltip]:focus::after{
  content:attr(data-tooltip);position:absolute;z-index:50;left:0;top:calc(100% + .45rem);min-width:18rem;max-width:min(34rem,80vw);
  padding:.65rem .75rem;border:1px solid var(--line);border-radius:.5rem;background:var(--paper);
  color:var(--ink);font-size:.82rem;font-weight:500;line-height:1.35;white-space:pre-line;text-align:left;
  box-shadow:0 8px 24px rgba(0,0,0,.14);pointer-events:none;
}

/* Application-wide missing Git commit matrix. Deployment labels deliberately stay compact. */
.application-commit-history-legend { margin: 0 0 .65rem; }
.application-commit-matrix-wrap { margin-top: .35rem; }
.application-commit-matrix { width: 100%; table-layout: auto; }
.application-commit-matrix th,
.application-commit-matrix td { vertical-align: top; }
.application-commit-matrix th:first-child,
.application-commit-matrix td:first-child { width: 7.5rem; }
.application-commit-matrix-identity { white-space: nowrap; }
.application-commit-matrix-identity strong,
.application-commit-matrix-identity code { display: block; }
.application-commit-matrix-message { margin: 0; min-width: 15rem; }
.application-commit-deployment-column {
  width: 4.25rem;
  max-width: 4.25rem;
  padding-left: .35rem;
  padding-right: .35rem;
  text-align: center;
  white-space: nowrap;
  font-size: .78rem;
}
.application-commit-deployment-status {
  width: 4.25rem;
  max-width: 4.25rem;
  text-align: center;
  padding-left: .35rem;
  padding-right: .35rem;
}
.application-commit-deployment-status input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: .1rem 0 0;
  opacity: 1;
}
@media (max-width: 760px) {
  .application-commit-matrix-message { min-width: 12rem; }
}

/* Compact instance risk filter and seven-card fleet summaries. */
.instance-filter-form .instance-risk-filter {
  display: inline-flex;
  width: fit-content;
  flex-direction: row;
  align-items: center;
  gap: .55rem;
}
.instance-filter-form .instance-risk-filter input[type="checkbox"] {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  min-height: 1.05rem;
  margin: 0;
  padding: 0;
  flex: 0 0 1.05rem;
}
.instance-summary-cards,
.dashboard-instance-summary .dashboard-cards {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .75rem;
}
.instance-summary-cards > a,
.dashboard-instance-summary .dashboard-cards > a {
  padding-inline: 1rem;
}

/* Keep version provenance beside every displayed Git SHA. */
.sha-with-version {
  display: inline-flex;
  min-width: 0;
  align-items: baseline;
  gap: .45rem;
  flex-wrap: wrap;
}
.sha-friendly-version {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 750;
  white-space: nowrap;
}
.page-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  flex-wrap: wrap;
}
.page-heading-actions form { margin: 0; }

/* Deployment release tile: controls stay top-right; explanatory copy spans full tile width below. */
.release-opportunity-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "summary actions"
    "details details";
  align-items: start;
}
.release-opportunity-summary { grid-area: summary; min-width: 0; }
.release-opportunity-actions { grid-area: actions; align-self: start; }
.release-opportunity-details { grid-area: details; min-width: 0; }
.release-opportunity-details > :first-child { margin-top: .2rem; }
.release-opportunity-details > :last-child { margin-bottom: 0; }

/* Commit matrix is bounded by the dialog; commit messages wrap instead of forcing horizontal scroll. */
.application-commit-matrix-wrap { overflow-x: hidden; }
.application-commit-matrix-wrap > table.application-commit-matrix {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.application-commit-matrix-message {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.application-commit-version { margin-top: .15rem; }

@media (max-width: 1000px) {
  .instance-summary-cards,
  .dashboard-instance-summary .dashboard-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .instance-summary-cards,
  .dashboard-instance-summary .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading-actions { justify-content: flex-start; }
  .release-opportunity-row {
    grid-template-columns: 1fr;
    grid-template-areas: "summary" "actions" "details";
  }
}
@media (max-width: 520px) {
  .instance-summary-cards,
  .dashboard-instance-summary .dashboard-cards { grid-template-columns: 1fr; }
}
