:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f5f7fb;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button {
  font: inherit;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #dce3ee;
  display: flex;
  justify-content: space-between;
  min-height: 88px;
  padding: 18px clamp(20px, 5vw, 56px);
}

.eyebrow {
  color: #51627d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.1;
  margin-bottom: 0;
}

h2 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.shell {
  margin: 0 auto;
  max-width: 1040px;
  padding: 28px clamp(16px, 4vw, 40px) 48px;
}

.workspace {
  display: grid;
  gap: 18px;
}

.panel {
  background: #ffffff;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  padding: 22px;
}

.section-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-heading p,
.muted {
  color: #63718a;
}

.detail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin: 0;
}

.detail-grid div {
  border-top: 1px solid #e7ecf4;
  padding-top: 12px;
}

.compact-grid {
  gap: 10px;
  margin-top: 12px;
}

.compact-grid div {
  padding-top: 8px;
}

dt {
  color: #63718a;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

dd {
  font-size: 0.95rem;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-pill {
  align-items: center;
  border: 1px solid #b9c5d6;
  border-radius: 999px;
  color: #384960;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 30px;
  padding: 4px 12px;
}

.status-pill.connected {
  background: #e8f7ee;
  border-color: #99d4ad;
  color: #176638;
}

.status-pill.disconnected,
.status-pill.error {
  background: #fff1f1;
  border-color: #f0b6b6;
  color: #9b2727;
}

.callout {
  background: #fff7e8;
  border: 1px solid #f1d5a7;
  border-radius: 8px;
  margin-top: 18px;
  padding: 14px;
}

.callout p {
  margin-bottom: 0;
}

.warning-list {
  margin: 10px 0 0;
  padding-left: 20px;
}

.warning-list li + li {
  margin-top: 6px;
}

.inline-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1fr) 130px auto;
}

.inline-form label {
  color: #63718a;
  display: grid;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 6px;
  text-transform: uppercase;
}

.inline-form input,
.inline-form select,
.users-table select {
  background: #ffffff;
  border: 1px solid #cbd5e4;
  border-radius: 6px;
  color: #172033;
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
}

.table-wrap {
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  margin-top: 16px;
  overflow-x: auto;
}

.users-table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.users-table th,
.users-table td {
  border-bottom: 1px solid #e7ecf4;
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

.users-table th {
  color: #63718a;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.users-table tr:last-child td {
  border-bottom: 0;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-button {
  background: #fff1f1;
  color: #9b2727;
}

.operation-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.operation-block {
  border-top: 1px solid #e7ecf4;
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.operation-block h3,
.operation-result h3 {
  font-size: 0.96rem;
  margin: 0 0 6px;
}

.operation-block p {
  color: #63718a;
  margin-bottom: 0;
}

.compact-label {
  color: #63718a;
  display: grid;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 6px;
  text-transform: uppercase;
}

.compact-label select {
  background: #ffffff;
  border: 1px solid #cbd5e4;
  border-radius: 6px;
  color: #172033;
  font: inherit;
  min-height: 36px;
  padding: 7px 9px;
  text-transform: none;
}

.workflow-block {
  background: #f7f9fc;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  padding: 14px;
}

.workflow-list {
  color: #384960;
  margin: 8px 0 0;
  padding-left: 22px;
}

.workflow-list li + li {
  margin-top: 6px;
}

.operation-result {
  border-top: 1px solid #dce3ee;
  margin-top: 22px;
  padding-top: 18px;
}

.error-callout {
  background: #fff1f1;
  border-color: #f0b6b6;
}

.reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.reason-list p {
  background: #edf2f8;
  border-radius: 999px;
  color: #23324a;
  font-size: 0.86rem;
  margin: 0;
  padding: 6px 10px;
}

.preview-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.preview-row {
  border: 1px solid #e7ecf4;
  border-radius: 8px;
  padding: 12px;
}

.preview-row p {
  color: #63718a;
  margin: 6px 0 0;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.single-export-button {
  background: #fff7e8;
  border: 1px solid #e2bd7d;
  color: #7a4a12;
}

.artifact-readiness {
  background: #f7f9fc;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  margin-top: 10px;
  padding: 10px;
}

.artifact-readiness.ready {
  background: #eef9f1;
  border-color: #b8dfc1;
}

.artifact-readiness.blocked {
  background: #fff7e8;
  border-color: #e2bd7d;
}

.operation-details {
  border-top: 1px solid #dce3ee;
  margin-top: 22px;
  padding-top: 16px;
}

.operation-details summary {
  cursor: pointer;
  font-weight: 700;
}

.operation-details pre {
  background: #f7f9fc;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  margin: 12px 0 0;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.sign-in-panel {
  margin-top: 18px;
  min-height: 260px;
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  padding: 9px 14px;
}

.primary-button {
  background: #2358d1;
  color: #ffffff;
}

.secondary-button {
  background: #edf2f8;
  color: #23324a;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.error-text {
  color: #a32626;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .topbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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