:root {
  --font-sans: "Avenir Next", "Segoe UI", "Noto Sans", "Liberation Sans", sans-serif;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --border: #dbe5f0;
  --border-strong: #b7c7da;
  --error: #be123c;
  --success: #0f766e;
  --accent-50: #eff6ff;
  --accent-100: #dbeafe;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 20px 36px rgba(15, 23, 42, 0.12);
  --radius-panel: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, #ffffff 0%, #edf2f8 45%, #e6edf6 100%);
}

.dashboard-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, transparent 30%);
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  border-bottom-left-radius: var(--radius-panel);
  border-bottom-right-radius: var(--radius-panel);
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.88);
}

.dashboard-header-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem 0;
}

.dashboard-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.dashboard-subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 40rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dashboard-content {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
}

.dashboard-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dashboard-link {
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.dashboard-link:hover {
  color: #1e3a8a;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}

.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.narrow {
  max-width: 420px;
}

.hero-panel {
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.9) 0%, rgba(255, 255, 255, 0.98) 45%);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-strong);
}

.panel-copy {
  margin: 0 0 0.35rem;
  color: #334155;
  white-space: normal;
  overflow-wrap: anywhere;
}

.stack {
  display: grid;
  gap: 1rem;
}

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

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: var(--accent);
}

.primary-button,
.ghost-button {
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  border: 0;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
}

.ghost-button {
  background: var(--accent-50);
  color: var(--accent-dark);
  border: 1px solid var(--accent-100);
}

.review-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}

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

.preview-image {
  width: 100%;
  border-radius: 16px;
}

.flash-stack {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 14px;
}

.flash-error {
  background: #ffe4ea;
  color: var(--error);
}

.flash-success {
  background: #ddf7f0;
  color: var(--success);
}

.inline-warning {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #fff4d6;
  color: #8a5a00;
  border: 1px solid #f0d79b;
}

.plain-list {
  margin: 0;
  padding-left: 1.2rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-row input {
  width: auto;
}

.muted-note {
  color: var(--muted);
  margin-bottom: 0;
}

.mapping-row {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.form-actions {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 820px) {
  .review-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header-inner,
  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-header-inner {
    padding: 1rem 0;
  }

  .dashboard-title {
    font-size: 2rem;
  }

  .dashboard-subtitle {
    font-size: 0.9rem;
    line-height: 1.45;
    max-width: 100%;
  }

  .icon-link,
  .ghost-button,
  .link-button,
  .form-actions .primary-button {
    width: 100%;
  }

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

  .panel {
    padding: 1.1rem;
  }
}
