.guide-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #d6e2f3;
  border-radius: 13px;
  background: linear-gradient(135deg, #f7faff 0%, #f1f6ff 100%);
  color: #34445d;
}
.guide-banner > div { display: grid; gap: 3px; }
.guide-banner strong { color: #20334f; font-size: 13px; }
.guide-banner span { color: #66788f; font-size: 12px; line-height: 1.5; }
.guide-banner.info { border-color: #d7e3f7; background: #f7faff; }
.guide-banner.warning-guide { border-color: #ead9ad; background: #fffaf0; }

.field-help { margin: 6px 0 0; color: #7b899d; font-size: 11px; line-height: 1.45; }
.field-help code { color: #4c607d; font-size: 10px; }

.form-section { margin-top: 4px; padding: 16px; border: 1px solid #e0e6ef; border-radius: 12px; background: #fbfcfe; }
.section-kicker { margin: 0 0 10px; color: #6980a1; font-size: 10px; font-weight: 850; letter-spacing: .11em; }

.help-check { min-height: 58px; align-items: flex-start; padding: 10px 11px; border: 1px solid #e3e8f0; border-radius: 10px; background: #fff; }
.help-check input { margin-top: 3px; }
.help-check span { display: grid; gap: 2px; }
.help-check strong { color: #34445c; font-size: 12px; }
.help-check small { color: #8390a1; font-size: 10px; font-weight: 500; line-height: 1.35; }

.editor-heading { margin-bottom: 14px; }
.editor-heading h2, .editor-heading h3 { margin: 2px 0 5px; }
.editor-heading p { margin: 0; color: #78879b; font-size: 11px; line-height: 1.5; }
.elevated-editor { margin-top: 18px; padding: 18px; border-color: #d6deea; background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.secret-editor { max-width: 820px; }

.decision-box { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; margin-top: 14px; padding: 15px 16px; border: 1px solid #d8e2f0; border-radius: 12px; background: #f8fbff; }
.decision-box strong { color: #263a56; font-size: 13px; }
.decision-box p { margin: 3px 0 0; color: #73839a; font-size: 11px; line-height: 1.45; }
.decision-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.decision-actions .inline-input { min-width: 250px; }

.sticky-actions { position: sticky; bottom: 12px; z-index: 5; margin: 20px -6px 0; padding: 12px; border: 1px solid #dce4ef; border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: 0 10px 28px rgba(36,54,82,.08); backdrop-filter: blur(8px); }
.compact-empty { padding: 18px 10px; }
.center-card-route { max-width: 760px; }

.audit-table th:first-child, .audit-table td:first-child { width: 170px; }
.audit-table th:nth-child(2), .audit-table td:nth-child(2) { width: 150px; }
.audit-table th:nth-child(3), .audit-table td:nth-child(3) { width: 180px; }
.audit-table tbody tr:hover, .run-table tbody tr:hover { background: #fbfcfe; }
.nowrap { white-space: nowrap; }
.actor-chip { display: inline-flex; padding: 4px 7px; border: 1px solid #dce3ed; border-radius: 7px; background: #f8fafc; color: #495c76; font-size: 11px; font-weight: 700; }

.run-table { min-width: 980px; }
.run-table td { vertical-align: middle; }
.run-table .table-actions { width: 105px; }
.subtle-mono { color: #66788f; font-size: 11px; }
.action-link { border: 1px solid #d3dce8; border-radius: 7px; padding: 6px 9px; background: #fff; color: #315fc5; font-size: 11px; font-weight: 750; }
.action-link:hover { background: #f5f8fd; border-color: #becce0; }

.editor-panel .step-card { box-shadow: 0 2px 8px rgba(32,50,77,.025); }
.editor-panel .step-card:hover { border-color: #cbd8e9; }
.panel-header h2 { letter-spacing: -.01em; }
.panel-header p { max-width: 760px; }

.settings-grid { grid-template-columns: minmax(260px,.62fr) minmax(0,1.38fr); }
.templates-panel { position: sticky; top: 20px; }
.secrets-panel { grid-column: 2; }

input::placeholder, textarea::placeholder { color: #a2adbc; opacity: 1; }
select:invalid { color: #8a97a8; }
.modal { border: 1px solid #dce3ed; }
.modal label { margin-top: 14px; }

/* Shared management views: Pipelines, Agents and Targets */
.management-card { width: 100%; margin: 0 0 22px; background: #fff; border: 1px solid #e0e6ef; border-radius: 14px; box-shadow: 0 6px 22px rgba(16,24,40,.045); overflow: hidden; }
.embedded-card { max-width: none; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid #edf0f4; }
.card-header h2 { margin: 0 0 5px; color: #1f2f47; font-size: 19px; }
.card-header p { margin: 0; color: #708097; font-size: 12px; line-height: 1.45; }
.management-card .table-wrap { width: 100%; overflow-x: auto; }
.management-table { width: 100%; min-width: 1120px; border-collapse: collapse; font-size: 12px; }
.pipeline-table { min-width: 1380px; }
.management-table th { padding: 11px 14px; background: #f8fafc; border-bottom: 1px solid #dfe5ee; color: #728198; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.management-table td { padding: 13px 14px; border-bottom: 1px solid #edf0f4; vertical-align: middle; color: #40516a; }
.management-table tbody tr:hover { background: #fafcff; }
.management-table tbody tr:last-child td { border-bottom: 0; }
.management-table td strong { color: #25364e; }
.management-table code { display: inline-block; padding: 3px 7px; border-radius: 6px; background: #f2f4f7; color: #344054; font-size: 11px; }
.actions-column { width: 150px; }
.row-actions { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; }
.action-button { border: 1px solid #ccd6e3; background: #fff; color: #34465f; padding: 6px 10px; border-radius: 7px; font-size: 11px; font-weight: 750; cursor: pointer; }
.action-button:hover { background: #f6f9fd; border-color: #b7c5d7; }
.action-button.run { color: #175cd3; border-color: #b2ccff; background: #f5f8ff; }
.action-button.danger { color: #b42318; border-color: #efc3bf; }
.muted-action { color: #98a2b3; font-size: 11px; }
.status-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.management-table .badge, .environment-badge, .revision-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #f2f4f7; color: #475467; font-size: 10px; font-weight: 800; white-space: nowrap; }
.management-table .badge.good { background: #ecfdf3; color: #027a48; }
.environment-badge { background: #eef4ff; color: #3538cd; }
.revision-badge { background: #f4f3ff; color: #5925dc; }
.cell-note { display: block; margin-top: 4px; color: #8b98a9; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.repository-cell { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { padding: 34px 24px; text-align: center; color: #8492a5; font-size: 12px; }

.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid #edf0f4; background: #fbfcfe; color: #667085; font-size: 11px; }
.page-size, .pager-actions { display: flex; align-items: center; gap: 9px; }
.page-size select { width: auto; min-width: 68px; padding: 6px 28px 6px 9px; border: 1px solid #d0d5dd; border-radius: 7px; background: #fff; color: #344054; }
.pager-actions > span { min-width: 88px; text-align: center; color: #475467; font-weight: 700; }

.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 28px; background: rgba(12,25,45,.60); backdrop-filter: blur(3px); }
.management-modal { width: min(560px,100%); max-height: calc(100vh - 56px); overflow-y: auto; padding: 24px; border: 1px solid #dce3ed; border-radius: 16px; background: #fff; box-shadow: 0 28px 90px rgba(10,24,46,.28); }
.management-modal.wide { width: min(780px,100%); }
.pipeline-modal { width: min(1040px,100%); }
.run-modal { width: min(620px,100%); }
.confirmation-modal { width: min(520px,100%); text-align: center; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.modal-header .eyebrow { margin: 0 0 5px; }
.modal-header h2 { margin: 0; color: #203149; font-size: 22px; }
.modal-subtitle, .modal-header p:not(.eyebrow) { margin: 6px 0 0; color: #6f7f95; font-size: 12px; line-height: 1.5; }
.modal-close { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 1px solid #d7dfe9; border-radius: 9px; background: #fff; color: #667085; font-size: 21px; line-height: 1; cursor: pointer; }
.modal-close:hover { background: #f7f9fc; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 22px; padding-top: 17px; border-top: 1px solid #eaecf0; }
.management-modal .form-section { margin: 0; padding: 17px; border: 1px solid #e1e7ef; border-radius: 12px; background: #fbfcfe; }
.management-modal .form-grid { display: grid; gap: 15px; }
.management-modal .form-grid.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.management-modal .form-grid.three-columns { grid-template-columns: repeat(3,minmax(0,1fr)); }
.management-modal .field { display: grid; gap: 6px; min-width: 0; }
.management-modal .full-width { grid-column: 1 / -1; }
.management-modal .field label { margin: 0; color: #344054; font-size: 12px; font-weight: 800; }
.management-modal .field small { display: block; color: #758499; font-size: 10px; line-height: 1.45; }
.management-modal .field small code { color: #4c607d; }
.management-modal .field input, .management-modal .field select, .management-modal .field textarea, .management-modal > input, .management-modal > select, .management-modal > textarea { width: 100%; box-sizing: border-box; border: 1px solid #cdd7e4; border-radius: 9px; padding: 10px 11px; background: #fff; color: #17233a; font: inherit; }
.management-modal .field input:focus, .management-modal .field select:focus, .management-modal .field textarea:focus { outline: none; border-color: #4f75d8; box-shadow: 0 0 0 3px rgba(79,117,216,.11); }
.checkbox-row { display: flex !important; align-items: flex-start !important; gap: 10px !important; min-height: 64px; margin: 0 !important; padding: 11px 12px !important; border: 1px solid #e0e6ef; border-radius: 9px; background: #fff; }
.checkbox-row input { width: auto !important; flex: 0 0 auto; margin: 3px 0 0 !important; }
.checkbox-row span { display: grid; gap: 2px; min-width: 0; }
.checkbox-row strong { color: #344054; font-size: 11px; }
.checkbox-row small { color: #758499; font-size: 10px; font-weight: 500; line-height: 1.35; }
.compact-check, .step-check { align-self: end; }
.steps-section { margin-top: 22px; }
.management-modal .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.management-modal .section-heading h3 { margin: 0 0 4px; font-size: 16px; }
.management-modal .section-heading p { margin: 0; color: #667085; font-size: 11px; line-height: 1.45; }
.pipeline-step-card { margin-bottom: 12px; padding: 15px; border: 1px solid #dfe5ed; border-radius: 12px; background: #fbfcfe; }
.step-header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-header strong, .step-header small { display: block; }
.step-header small { margin-top: 2px; color: #8390a1; font-size: 10px; }
.step-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #e8eef9; color: #365b9c; font-weight: 800; font-size: 11px; }
.icon-button { border: 0; background: transparent; font-size: 22px; }
.danger-text { color: #b42318; }
.empty-step { padding: 22px; border: 1px dashed #d7dee8; border-radius: 10px; color: #7b899d; text-align: center; font-size: 11px; }
.danger-button { border: 1px solid #d92d20; border-radius: 9px; padding: 9px 14px; background: #d92d20; color: #fff; font-weight: 750; }
.danger-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; background: #fef3f2; color: #d92d20; font-size: 22px; font-weight: 800; }

@media (max-width: 1100px) {
  .settings-grid { grid-template-columns: 1fr; }
  .templates-panel { position: static; }
  .secrets-panel { grid-column: auto; }
  .decision-box { grid-template-columns: 1fr; }
  .decision-actions { justify-content: flex-start; }
  .management-modal .form-grid.three-columns { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .guide-banner { align-items: flex-start; flex-direction: column; }
  .decision-actions { display: grid; width: 100%; }
  .decision-actions .inline-input { min-width: 0; max-width: none; }
  .sticky-actions { position: static; margin-left: 0; margin-right: 0; }
  .card-header { align-items: flex-start; flex-direction: column; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  .page-size { flex-wrap: wrap; }
  .pager-actions { width: 100%; justify-content: space-between; }
  .management-modal { max-height: calc(100vh - 24px); padding: 18px; }
  .management-modal .form-grid.two-columns, .management-modal .form-grid.three-columns { grid-template-columns: 1fr; }
  .management-modal .full-width { grid-column: auto; }
}
