body {
  margin: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  background: radial-gradient(circle at top, #1d4ed8 0%, #0f172a 55%, #0b1120 100%);
  min-height: 100vh;
  color: #0f172a;
}

.assist-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.assist-nav {
  display: flex;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  padding: 16px;
}

.assist-nav-inner {
  width: min(1100px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #e2e8f0;
}

.assist-brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
  opacity: 0.85;
}

.assist-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.assist-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.assist-links a:hover {
  background: rgba(226, 232, 240, 0.18);
}

.assist-links .primary-link {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
}

.assist-links .primary-link:hover {
  background: #0ea5e9;
  color: #fff;
}

.assist-layout {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  flex: 1;
  padding: 48px 0 64px;
}

.assist-header {
  margin-bottom: 28px;
  color: #e2e8f0;
  text-align: center;
}

.assist-header h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
}

.assist-header p {
  margin: 0 auto;
  max-width: 720px;
  color: rgba(226, 232, 240, 0.85);
  font-size: 1.05rem;
  line-height: 1.6;
}

.analysis-panel {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.analysis-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(30, 64, 175, 0.08));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.analysis-panel.is-loading::after {
  opacity: 1;
}

.analysis-panel.is-loading .analysis-actions button {
  pointer-events: none;
}

.analysis-panel.is-loading .analysis-loader {
  opacity: 1;
  pointer-events: all;
}

.analysis-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.analysis-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid rgba(37, 99, 235, 0.25);
  border-top-color: #2563eb;
  animation: spin 0.8s linear infinite;
}

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

.analysis-panel h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.45rem;
  font-weight: 700;
  color: #1e293b;
}

.analysis-panel p {
  margin-top: 0;
  margin-bottom: 22px;
  color: #52606d;
  max-width: 720px;
}

.analysis-grid {
  display: grid;
  gap: 18px;
}

.analysis-grid .field {
  display: flex;
  flex-direction: column;
}

.analysis-grid label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #1f2937;
}

.analysis-grid textarea {
  resize: vertical;
  min-height: 150px;
}

.analysis-grid input[type="file"],
.analysis-grid select,
.analysis-grid textarea {
  font-family: inherit;
  font-size: 0.97rem;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.analysis-grid input[type="file"]:focus,
.analysis-grid select:focus,
.analysis-grid textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.analysis-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.analysis-actions button {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 0.98rem;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.analysis-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 46px rgba(37, 99, 235, 0.4);
}

.analysis-actions button:disabled {
  opacity: 0.55;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

.analysis-feedback {
  min-height: 20px;
  font-size: 0.95rem;
  color: #1d4ed8;
  font-weight: 600;
}

.analysis-feedback.error {
  color: #b91c1c;
}

.analysis-feedback.success {
  color: #0f766e;
}

.warning-list {
  display: none;
  background: #fff7ed;
  border: 1px solid #fb923c;
  border-radius: 12px;
  padding: 18px;
  margin-top: 20px;
  color: #9a3412;
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.15);
}

.warning-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.96rem;
}

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

.assist-divider {
  margin: 48px auto;
  width: min(1100px, calc(100% - 32px));
  height: 1px;
  background: rgba(148, 163, 184, 0.35);
}

.suggestion-section {
  display: none;
}

.suggestion-section.active {
  display: block;
}

.suggestion-section .form-container {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.28);
  padding: 32px;
}

.suggestion-section h2 {
  margin-top: 0;
  color: #0f172a;
}

.suggestion-section p {
  color: #475569;
  margin-bottom: 22px;
}

.suggestion-section button[type="submit"] {
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #15803d);
  padding: 14px 34px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.35);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.suggestion-section button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 46px rgba(34, 197, 94, 0.42);
}

.suggestion-section button[type="submit"]:disabled {
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

@media (min-width: 720px) {
  .analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-grid .field.full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .assist-nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .analysis-panel,
  .suggestion-section .form-container {
    padding: 24px;
  }

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