@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  color-scheme: light;
  background: #f6f7f9;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Arial,
    Helvetica,
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.download-link {
  border: 1px solid #172033;
  background: #172033;
  color: #ffffff;
  cursor: pointer;
  border-radius: 6px;
  min-height: 2.25rem;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  background: #ffffff;
  color: #172033;
  padding: 0.65rem 0.7rem;
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

label {
  display: grid;
  gap: 0.35rem;
}

label span,
h3 {
  color: #586174;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.app-shell {
  display: grid;
  gap: 1rem;
  min-height: 100vh;
  padding: 1rem;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  border-bottom: 1px solid #dce2eb;
  padding-bottom: 1rem;
}

.topbar h1 {
  margin: 0;
  color: #172033;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.1;
}

.topbar p {
  margin: 0.3rem 0 0;
  color: #586174;
}

.api-key-field {
  min-width: min(16rem, 100%);
}

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

.panel {
  border: 1px solid #dce2eb;
  border-radius: 8px;
  background: #ffffff;
  min-height: 18rem;
  padding: 1rem;
}

.stack {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.empty-panel {
  color: #8992a3;
}

.panel-heading,
.qa-title-row {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.panel-heading {
  color: #172033;
  font-size: 1rem;
  font-weight: 800;
}

.body-input {
  min-height: 14rem;
}

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

.status-text {
  margin: 0;
  font-weight: 700;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.35rem 0.5rem;
  text-transform: uppercase;
}

.pass {
  background: #e6f6ec;
  color: #116438;
}

.warn {
  background: #fff5d6;
  color: #805a00;
}

.fail {
  background: #fde7e7;
  color: #9f1d21;
}

.preview {
  border-left: 3px solid #2f6fdd;
  padding-left: 1rem;
}

.preview h2 {
  margin: 0;
  font-size: 1.25rem;
}

.preview p {
  color: #586174;
}

.preview pre {
  background: #f6f7f9;
  border-radius: 6px;
  overflow: auto;
  padding: 0.8rem;
  white-space: pre-wrap;
}

.tag-row,
.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  border: 1px solid #cbd3df;
  border-radius: 999px;
  color: #586174;
  padding: 0.25rem 0.55rem;
}

.qa-list {
  display: grid;
  gap: 0.7rem;
}

.qa-item {
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
}

.qa-item p,
.qa-item em,
.qa-item small {
  margin: 0;
}

.qa-item small {
  color: #586174;
}

.qa-item code {
  color: #2f6fdd;
}

.progress-panel {
  border: 1px solid #dce2eb;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
}

.progress-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.progress-summary strong {
  color: #172033;
}

.progress-summary span,
.progress-panel p {
  color: #586174;
}

.progress-panel p {
  margin: 0;
}

.progress-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.progress-steps li {
  border: 1px solid #cbd3df;
  border-radius: 999px;
  color: #586174;
  padding: 0.25rem 0.55rem;
}

@media (max-width: 900px) {
  .workflow-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }
}
