/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/*
  Design tokens + component classes ported from the approved mockup
  (automation-hub-mockup.html). Same palette, spacing, and type scale —
  intentionally not reinvented. Class names match the mockup 1:1 where
  practical so the two stay easy to diff against each other over time.
*/

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-muted: #898781;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --border-strong: rgba(11, 11, 11, 0.16);
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --accent-wash: rgba(42, 120, 214, 0.09);
  --accent-wash-strong: rgba(42, 120, 214, 0.16);
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --success-text: #006300;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px -12px rgba(11, 11, 11, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #212120;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --ink-muted: #898781;
    --grid: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --accent: #3987e5;
    --accent-ink: #ffffff;
    --accent-wash: rgba(57, 135, 229, 0.14);
    --accent-wash-strong: rgba(57, 135, 229, 0.22);
    --good: #0ca30c;
    --warning: #fab219;
    --serious: #ec835a;
    --critical: #e66767;
    --success-text: #0ca30c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #212120;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --ink-muted: #898781;
  --grid: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #3987e5;
  --accent-ink: #ffffff;
  --accent-wash: rgba(57, 135, 229, 0.14);
  --accent-wash-strong: rgba(57, 135, 229, 0.22);
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #e66767;
  --success-text: #0ca30c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.mono {
  font-family: ui-monospace, "SFMono-Regular", "IBM Plex Mono", Menlo, Consolas, monospace;
}
.tnum {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  font: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 650;
  font-size: 14.5px;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 1px;
}

nav.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding: 12px 10px 4px;
}
.nav-label:first-child {
  padding-top: 0;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.nav-item:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}
.nav-item.active {
  background: var(--accent-wash);
  color: var(--accent);
}
.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.role-switch {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px;
  background: var(--surface-2);
}
.role-switch-label {
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.role-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}
.role-toggle button {
  flex: 1 1;
  border: none;
  background: transparent;
  color: var(--ink-2);
  padding: 6px 0;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.role-toggle button.on {
  background: var(--accent);
  color: var(--accent-ink);
}
.role-hint {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 8px;
  line-height: 1.45;
}

/* ---------- Main ---------- */
.main {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--page);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-title {
  font-size: 15px;
  font-weight: 650;
}
.topbar-title .dim {
  color: var(--ink-muted);
  font-weight: 500;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
}
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  flex-shrink: 0;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
}
.role-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
}
.role-badge.r-admin {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-wash);
}

.section {
  padding: 28px;
  max-width: 1320px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-head h1,
.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.section-head .sub {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 12.5px;
}

/* ---------- Tags ---------- */
.tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
  white-space: nowrap;
}
.tag-chip.qa {
  border-style: dashed;
  color: var(--ink-muted);
  font-weight: 600;
}
.release-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* ---------- Pipeline cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.card-titles {
  min-width: 0;
}
.card-title {
  font-weight: 650;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.card-engine {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.engine-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-muted);
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 650;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  white-space: nowrap;
}
.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-pill.passed {
  color: var(--success-text);
}
.status-pill.passed .dot {
  background: var(--good);
}
.status-pill.failed,
.status-pill.failed_to_start {
  color: var(--critical);
}
.status-pill.failed .dot,
.status-pill.failed_to_start .dot {
  background: var(--critical);
}
.status-pill.running,
.status-pill.queued {
  color: var(--accent);
}
.status-pill.running .dot,
.status-pill.queued .dot {
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
.status-pill.cancelled {
  color: var(--ink-muted);
}
.status-pill.cancelled .dot {
  background: var(--ink-muted);
}
@media (prefers-reduced-motion: reduce) {
  .status-pill.running .dot,
  .status-pill.queued .dot {
    animation: none;
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px 14px;
  gap: 8px 14px;
  font-size: 12px;
}
.meta-item .k {
  color: var(--ink-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.meta-item .v {
  font-weight: 600;
}

.spark-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.spark-row svg {
  flex-shrink: 0;
}
.counts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.count-line {
  display: flex;
  align-items: center;
  gap: 6px;
}
.count-line .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.count-line .dot.good {
  background: var(--good);
}
.count-line .dot.critical {
  background: var(--critical);
}
.count-line .dot.warning {
  background: var(--warning);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.report-link {
  font-size: 12.5px;
  font-weight: 600;
}
.btn {
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  filter: brightness(1.08);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--surface-2);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}
.btn-danger-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--critical);
}
.btn-danger-ghost:hover {
  background: rgba(208, 59, 59, 0.08);
}

/* ---------- Filters ---------- */
.filters-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
select,
input[type="text"] {
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 7px 10px;
}
select:focus,
input:focus {
  border-color: var(--accent);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}
table.compact {
  min-width: 0;
}
thead th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-weight: 650;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  vertical-align: middle;
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--surface-2);
}
.pipeline-cell {
  font-weight: 600;
}
.pipeline-cell .eng {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 500;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 650;
  font-size: 12px;
}
.status-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-chip.passed {
  color: var(--success-text);
}
.status-chip.passed .dot {
  background: var(--good);
}
.status-chip.failed,
.status-chip.failed_to_start {
  color: var(--critical);
}
.status-chip.failed .dot,
.status-chip.failed_to_start .dot {
  background: var(--critical);
}
.status-chip.running,
.status-chip.queued {
  color: var(--accent);
}
.status-chip.running .dot,
.status-chip.queued .dot {
  background: var(--accent);
}
.status-chip.cancelled {
  color: var(--ink-muted);
}
.status-chip.cancelled .dot {
  background: var(--ink-muted);
}
.counts-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.counts-inline span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.counts-inline .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.who {
  display: flex;
  align-items: center;
  gap: 7px;
}
.who .avatar {
  width: 20px;
  height: 20px;
  font-size: 9.5px;
}
.muted {
  color: var(--ink-muted);
}

/* ---------- Trends ---------- */
.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}
.trend-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}
.trend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.trend-title {
  font-weight: 650;
  font-size: 13.5px;
}
.trend-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.trend-delta {
  font-size: 11.5px;
  font-weight: 650;
}
.trend-delta.up {
  color: var(--success-text);
}
.trend-delta.down {
  color: var(--critical);
}
.trend-chart-wrap {
  position: relative;
  margin-top: 10px;
}
.trend-caption {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 6px;
}
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.08s;
  background: var(--ink);
  color: var(--page);
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  z-index: 10;
  line-height: 1.4;
}

/* ---------- Pipelines page ---------- */
.pipelines-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  grid-gap: 16px;
  gap: 16px;
  align-items: start;
}
.pipeline-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow);
}
.pipeline-list-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.pipeline-list-item:hover {
  background: var(--surface-2);
}
.pipeline-list-item.active {
  background: var(--accent-wash);
}
.pipeline-list-item .name {
  font-weight: 650;
  font-size: 13px;
}
.pipeline-list-item .eng {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.pipeline-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.pd-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 10px;
}
.pd-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pd-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.pd-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
  white-space: nowrap;
}

.run-panel {
  margin-top: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
}
.run-panel-head {
  background: var(--surface-2);
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.run-panel-head .rp-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
.run-panel-body {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: 12px 16px;
  gap: 12px 16px;
}
.run-panel-body .field-full {
  grid-column: 1 / -1;
}
.run-panel-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  gap: 10px;
  flex-wrap: wrap;
}
.run-panel-foot .hint {
  font-size: 11.5px;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
  min-width: 0;
}

.recent-mini {
  margin-top: 18px;
}
.recent-mini h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 0 0 8px;
}
.recent-mini table {
  min-width: 0;
}
.recent-mini thead th,
.recent-mini tbody td {
  padding: 8px 10px;
  font-size: 12px;
}

/* ---------- Settings ---------- */
.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 9px 2px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.banner-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0052cc12;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #0052cc;
  flex-shrink: 0;
}
:root:not([data-theme="light"]) .banner-icon,
:root[data-theme="dark"] .banner-icon {
  background: #0052cc26;
  color: #6699ff;
}
.banner-text {
  flex: 1 1;
}
.banner-text .t1 {
  font-weight: 650;
  font-size: 13px;
}
.banner-text .t2 {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 1px;
}

.role-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
}
.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.role-card .rn {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}
.role-card .rd {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}

.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 320px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.access-denied {
  padding: 40px 28px;
  color: var(--ink-muted);
  font-size: 13px;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 420px;
  max-width: 100%;
  max-height: min(85vh, 680px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.4);
}
.modal-header {
  padding: 20px 20px 0;
  flex-shrink: 0;
}
.modal h3 {
  margin: 0 0 2px;
  font-size: 15.5px;
}
.modal .modal-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
.modal-body {
  padding: 4px 20px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.modal-field label {
  font-size: 11.5px;
  font-weight: 600;
}
.modal-field select,
.modal-field input {
  width: 100%;
}
.modal-actions {
  flex-shrink: 0;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--page);
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s;
  z-index: 60;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.4);
  max-width: min(90vw, 420px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

@media (max-width: 860px) {
  .pipelines-layout {
    grid-template-columns: 1fr;
  }
  .run-panel-body {
    grid-template-columns: 1fr;
  }
  .role-legend {
    grid-template-columns: 1fr;
  }
}

