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

* {
  box-sizing: border-box;
}

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

.portal-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.panel {
  background: #ffffff;
  border: 1px solid #d9e0e8;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgb(15 23 42 / 8%);
  max-width: 760px;
  padding: 28px;
  width: 100%;
}

.narrow-panel {
  max-width: 620px;
}

.brand-row {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: 16px;
  padding-bottom: 22px;
}

.logo-mark {
  align-items: center;
  background: #111827;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  font-size: 26px;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.eyebrow,
.label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

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

h1 {
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 0;
}

h2 {
  font-size: 22px;
  line-height: 1.25;
}

.hidden {
  display: none !important;
}

.state-view {
  padding: 48px 8px 24px;
  text-align: center;
}

.loader {
  animation: spin 0.9s linear infinite;
  border: 3px solid #dbe3ee;
  border-top-color: #2563eb;
  border-radius: 999px;
  height: 36px;
  margin: 0 auto 16px;
  width: 36px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
}

.chip {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  text-transform: uppercase;
}

.reference {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.summary-card {
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  margin-top: 18px;
  padding: 22px;
}

.time-line {
  color: #334155;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 0;
}

.detail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.detail-grid > div,
.notes-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.value,
.notes-box p:last-child {
  font-weight: 700;
  margin-bottom: 0;
}

.response-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

label {
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button,
.secondary-link {
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 12px 16px;
  text-decoration: none;
}

.primary-button {
  background: #2563eb;
  border: 1px solid #2563eb;
  color: #ffffff;
}

.secondary-button,
.secondary-link {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.result-message {
  border-radius: 8px;
  font-weight: 700;
  margin-top: 16px;
  padding: 14px 16px;
}

.result-message.success {
  background: #ecfdf5;
  color: #047857;
}

.result-message.warning {
  background: #fffbeb;
  color: #b45309;
}

.result-message.error {
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 640px) {
  .portal-shell {
    align-items: stretch;
    padding: 0;
  }

  .panel {
    border: 0;
    border-radius: 0;
    min-height: 100vh;
    padding: 20px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

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