:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6fb;
  color: #14213d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.panel {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(20, 33, 61, 0.08);
}

h1,
h2 {
  margin-top: 0;
  color: #0f2540;
}

.subtitle {
  color: #5b6b82;
  margin-top: -0.5rem;
}

fieldset {
  border: 1px solid #dce3f0;
  border-radius: 0.8rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

legend {
  font-weight: 700;
  color: #274060;
  padding: 0 0.5rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: #264463;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  padding: 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #cad4e2;
  background: #fbfdff;
  color: #14213d;
}

input:focus,
textarea:focus {
  outline: 2px solid #4f7cff;
  border-color: transparent;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button.primary {
  background: #4f7cff;
  color: white;
  box-shadow: 0 8px 20px rgba(79, 124, 255, 0.25);
}

button:not(.primary) {
  background: #eef2ff;
  color: #264463;
}

.history-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  width: 100%;
  text-align: left;
  background: #f7f9fe;
  border: 1px solid #e2e8f6;
  padding: 0.85rem 0.95rem;
  border-radius: 0.8rem;
}

.history-item strong {
  display: block;
  margin-bottom: 0.2rem;
}

.history-item small {
  color: #6c7a90;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
}
