/* Quote preview app — dark theme (side panel + chrome; PDF stays light paper) */
:root {
  color-scheme: dark;
  --quote-bg: #101218;
  --quote-ink: #e8e6e1;
  --quote-muted: #9a9690;
  --quote-line: #2c3038;
  --quote-panel: #171a21;
  --quote-field: #0e1015;
  --quote-accent: #6fbfa0;
  --quote-accent-ink: #0b1411;
  --quote-danger: #f0a0a0;
  --quote-danger-bg: #3a1f22;
  --quote-preview-well: #0a0b0f;
  --quote-focus: #8fd4b8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.quote-app {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif;
  color: var(--quote-ink);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(111, 191, 160, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(90, 110, 160, 0.07), transparent 50%),
    var(--quote-bg);
}

.quote-app__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--quote-line);
  background: rgba(23, 26, 33, 0.72);
  backdrop-filter: blur(8px);
}

.quote-app__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--quote-muted);
}

.quote-app__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--quote-ink);
}

.quote-app__note,
.quote-app__muted {
  margin: 0;
  color: var(--quote-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.quote-app__layout {
  display: grid;
  grid-template-columns: minmax(17rem, 22rem) 1fr;
  gap: 0;
  min-height: calc(100vh - 6.5rem);
}

.quote-app__panel {
  padding: 1rem 1.25rem 1.5rem;
  border-right: 1px solid var(--quote-line);
  overflow: auto;
  background: var(--quote-panel);
}

.quote-app__preview {
  position: relative;
  padding: 0;
  min-height: 24rem;
  background: var(--quote-preview-well);
}

.quote-app__iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 6.5rem);
  border: 0;
  background: #d8d4cc;
}

.quote-app__preview .quote-app__muted {
  position: absolute;
  inset: 1.25rem;
  margin: 0;
}

.quote-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.quote-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--quote-ink);
}

.quote-form__field input,
.quote-form__field select {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--quote-line);
  border-radius: 4px;
  background: var(--quote-field);
  color: var(--quote-ink);
  color-scheme: dark;
}

.quote-form__field input:focus,
.quote-form__field select:focus {
  outline: 2px solid var(--quote-focus);
  outline-offset: 1px;
  border-color: var(--quote-accent);
}

.quote-form__field input::placeholder {
  color: #6f6c66;
}

.quote-form__check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--quote-ink);
}

.quote-form__check input {
  margin-top: 0.15rem;
  accent-color: var(--quote-accent);
}

.quote-form__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--quote-muted);
}

.quote-form__hint strong {
  color: var(--quote-ink);
  font-weight: 600;
}

.quote-form__error {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(240, 160, 160, 0.35);
  background: var(--quote-danger-bg);
  color: var(--quote-danger);
  font-size: 0.85rem;
  line-height: 1.4;
}

.quote-form__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.quote-form__btn {
  font: inherit;
  padding: 0.55rem 0.85rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
}

.quote-form__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quote-form__btn--primary {
  background: var(--quote-accent);
  color: var(--quote-accent-ink);
  font-weight: 600;
}

.quote-form__btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.quote-form__btn--primary:focus-visible {
  outline: 2px solid var(--quote-focus);
  outline-offset: 2px;
}

@media (max-width: 800px) {
  .quote-app__layout {
    grid-template-columns: 1fr;
  }

  .quote-app__panel {
    border-right: none;
    border-bottom: 1px solid var(--quote-line);
  }

  .quote-app__iframe {
    min-height: 70vh;
  }
}
