:root {
  --blue: #b8dcf5;
  --blue-soft: #edf8ff;
  --ink: #003565;
  --ink-deep: #012a55;
  --muted: #537191;
  --purple: #5b49c8;
  --purple-2: #7a55ef;
  --pink: #ef3f90;
  --orange: #ff9c45;
  --surface: #ffffff;
  --line: #b7d6ee;
  --line-soft: #d9edf9;
  --shadow: 0 24px 70px rgba(1, 44, 89, .15);
  --shadow-soft: 0 12px 34px rgba(1, 44, 89, .09);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  background: #f7fbff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #7aaef2;
  box-shadow: 0 0 0 4px rgba(92, 78, 210, .11);
}

textarea { resize: vertical; }

label {
  display: grid;
  gap: 8px;
  color: #7890aa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin-bottom: 18px;
  color: var(--ink-deep);
  font-size: clamp(36px, 4vw, 54px);
  line-height: .98;
  letter-spacing: -.03em;
}

h2 {
  margin-bottom: 12px;
  color: var(--ink-deep);
  font-size: 25px;
  line-height: 1.12;
}

h3 {
  color: var(--ink-deep);
  font-size: 18px;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

small {
  color: var(--muted);
  display: block;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(232, 61, 136, .18), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(255, 155, 69, .18), transparent 26%),
    linear-gradient(135deg, #eff8ff, #fff7fb);
}

.login-card {
  width: min(480px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 30px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
}

.login-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand {
  color: var(--ink-deep);
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6656d6, #473ab2);
  color: #fff;
  box-shadow: 0 16px 34px rgba(88, 70, 190, .3);
}

.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.05;
}

.brand small {
  color: #01406f;
  font-size: 12px;
}

.kicker {
  margin-bottom: 10px;
  color: var(--pink);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .34em;
  text-transform: uppercase;
}

.stack { display: grid; gap: 18px; }

.primary-button,
.secondary-button,
.link-button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), #6c4ee7 45%, var(--pink) 76%, var(--orange));
  box-shadow: 0 18px 38px rgba(88, 70, 190, .26);
  transition: transform .18s ease, box-shadow .18s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(88, 70, 190, .32);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--purple);
}

.wide { width: 100%; }

.link-button {
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.logout-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--ink-deep);
  cursor: pointer;
  font: inherit;
  font-weight: 1000;
  padding: 0;
}

.logout-form { margin: 0; }

.settings-wide {
  grid-column: 1 / -1;
}

.settings-card textarea {
  min-height: 92px;
  resize: vertical;
}

.alert {
  padding: 15px 18px;
  border-radius: 16px;
  font-weight: 800;
}

.alert-error {
  background: #fff0f4;
  color: #b71952;
}

.alert-success {
  background: #e9fff4;
  color: #087248;
}

.app-shell {
  width: min(1390px, calc(100% - 32px));
  min-height: calc(100vh - 20px);
  margin: 10px auto;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 34px;
  border-radius: 10px;
  background: var(--blue);
  padding: 28px;
}

.sidebar {
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
}

.nav {
  display: grid;
  gap: 12px;
  margin-top: 38px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 10px;
  color: var(--ink-deep);
  font-weight: 1000;
  transition: background .18s ease, transform .18s ease;
}

.nav a.is-active,
.nav a:hover {
  background: #fff;
  transform: translateX(1px);
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  color: #225d8a;
}

.sidebar-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding: 14px;
  border: 1px solid rgba(1, 44, 89, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .46);
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--purple);
  background: #f0e9ff;
  font-weight: 1000;
}

.sidebar-card strong,
.sidebar-footer strong {
  display: block;
  color: var(--ink-deep);
  font-weight: 1000;
}

.sidebar-card small,
.sidebar-footer span {
  color: #235b86;
  font-size: 12px;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(1, 44, 89, .22);
  padding-top: 24px;
  display: grid;
  gap: 3px;
}

.main-panel {
  width: min(100%, 980px);
  display: grid;
  gap: 22px;
  align-content: start;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.topbar p:not(.kicker) {
  max-width: 760px;
  color: #004c85;
  font-size: 17px;
  line-height: 1.7;
}

.date-pill {
  color: var(--ink-deep);
  font-weight: 900;
  white-space: nowrap;
}

.back-link {
  display: inline-flex;
  margin-bottom: 20px;
  color: #005294;
  font-weight: 1000;
}

.hero-card,
.panel-card,
.creator-card {
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
}

.hero-card-compact {
  min-height: 176px;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.steps span {
  border-radius: 999px;
  background: #e2f2ff;
  padding: 8px 13px;
  color: #005294;
  font-size: 13px;
  font-weight: 1000;
}

.panel-card {
  padding: 30px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-head h2 {
  margin-bottom: 4px;
}

.search-form {
  width: min(360px, 100%);
}

.package-list {
  display: grid;
  gap: 0;
  margin-top: 20px;
}

.package-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.package-row:last-child {
  border-bottom: 0;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 26px;
  color: var(--purple);
  font-weight: 1000;
}

.row-main strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-deep);
  font-size: 16px;
  font-weight: 1000;
}

.row-actions {
  display: flex;
  gap: 9px;
}

.row-actions a {
  min-width: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-weight: 900;
}

.empty-state {
  padding: 20px;
  border-radius: 12px;
  background: #eef8ff;
  color: var(--ink);
}

.center-link {
  margin-top: 20px;
  text-align: center;
  color: var(--purple);
  font-weight: 1000;
}

.creator-card {
  display: grid;
  gap: 22px;
  padding: 34px;
}

.pm-form {
  gap: 24px;
}

.language-switch {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.language-switch label {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #eef0ff;
  color: var(--purple);
  font-size: 12px;
  letter-spacing: .08em;
}

.language-switch input {
  width: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.form-grid-tight {
  gap: 18px;
}

.form-section {
  display: grid;
  align-content: start;
  gap: 16px;
}

.form-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--purple);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.section-icon {
  color: #5d6cff;
  font-family: Inter, sans-serif;
}

.section-icon-pink {
  color: var(--pink);
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.medication-list {
  display: grid;
  gap: 14px;
}

.medication-row {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d3eaf8;
  border-radius: 18px;
  background: #f5fbff;
}

.dashed-button {
  width: 100%;
  border-style: dashed;
  border-color: #8fd0f8;
  color: #0085d5;
}

.settings-card {
  display: grid;
  gap: 22px;
}

.help-card {
  display: grid;
  gap: 18px;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.help-grid article {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: #f8fcff;
}

.help-grid span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 999px;
  color: var(--purple);
  background: #eee9ff;
  font-weight: 1000;
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature-list p {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #f9fcff;
}

.story-preview {
  display: grid;
  grid-template-columns: 390px 1fr;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.cover-card {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #e5efff, #ffe0ef);
  color: #fff;
  font-size: 38px;
  font-weight: 1000;
  text-align: center;
}

.cover-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-card span {
  position: absolute;
  top: 30px;
  left: 30px;
  right: 30px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}

.cover-placeholder { color: var(--purple); }

.story-card {
  padding: 42px;
  background: #fff;
  font-size: 18px;
  line-height: 1.8;
}

.story-card h1,
.print-story h1 {
  color: var(--purple);
  font-size: 34px;
  line-height: 1.1;
}

.story-card h2,
.print-story h2 {
  margin-top: 28px;
  color: #5846ff;
  font-size: 20px;
}

.package-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mission-item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
  padding: 14px;
  border-radius: 14px;
  background: #f5fbff;
  font-weight: 800;
}

.coloring-card img {
  max-width: 100%;
  border-radius: 18px;
}

.prompt-box {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.print-root {
  padding: 28px;
  background: #b9ddf6;
}

.print-page {
  width: 794px;
  min-height: 1123px;
  margin: 0 auto 32px;
  padding: 48px;
  page-break-after: always;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff 0%, #e2f4ff 100%);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .18);
}

.parent-print { background: #fff; }

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: #7068ff;
}

.print-title {
  margin: 0;
  color: #7068ff;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 800;
}

.print-cover {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 22px;
  margin: 28px 0 32px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, .16);
}

.print-story {
  font-size: 16px;
  line-height: 1.7;
}

.print-bottom-grid,
.parent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 28px;
}

.print-coloring {
  min-height: 260px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #fff;
}

.print-coloring img {
  max-width: 220px;
  max-height: 220px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.field-row div,
.parent-grid p {
  padding: 14px;
  border: 1px solid #d9e8f2;
  border-radius: 12px;
  background: #f7fbff;
}

.field-row span {
  display: block;
  color: #7068ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.print-signature {
  margin-top: 120px;
  border-top: 1px solid #d9e8f2;
  padding-top: 28px;
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.print-signature div {
  display: grid;
  gap: 8px;
}

.print-signature span {
  color: #8194ad;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .app-shell {
    width: min(100%, calc(100% - 20px));
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .sidebar {
    min-height: auto;
  }

  .main-panel {
    width: 100%;
  }

  .form-grid,
  .story-preview,
  .package-grid,
  .admin-grid,
  .help-grid,
  .feature-list p {
    grid-template-columns: 1fr;
  }

  .field-pair {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .topbar,
  .section-head {
    flex-direction: column;
  }

  .package-row {
    grid-template-columns: auto 1fr;
  }

  .row-actions {
    grid-column: 2;
  }
}

.package-print-root {
  min-height: 100vh;
  display: grid;
  gap: 2rem;
  justify-items: center;
  padding: 2rem;
  background: #b6d8f2;
}

.package-print-root .storybook-page {
  margin: 0;
}

.print-book-page {
  min-height: 69rem;
  page-break-after: always;
  break-after: page;
}

.print-book-page:last-child {
  page-break-after: auto;
  break-after: auto;
}

.print-book-story .storybook-hero-frame {
  margin-bottom: 1.5rem;
}

.print-story-text-compact h1 {
  font-size: 1.5rem;
}

.print-story-text-compact h2 {
  margin-top: .85rem;
  font-size: .92rem;
}

.print-story-text-compact p,
.print-story-text-compact li {
  margin-bottom: .72rem;
  font-size: .87rem;
  line-height: 1.52;
}

.print-book-missions,
.print-book-coloring {
  display: flex;
  flex-direction: column;
}

.mission-print-card-full {
  width: min(100%, 31rem);
  margin: 4rem auto 0;
  padding: 2rem;
}

.mission-print-row-large {
  grid-template-columns: 3.25rem 1fr 1.75rem;
  min-height: 4.5rem;
  padding: 1rem;
}

.mission-print-row-large .mission-print-icon {
  width: 2.75rem;
  height: 2.75rem;
}

.mission-print-row-large p {
  font-size: 1rem;
}

.coloring-full-page {
  display: flex;
  flex: 1;
  min-height: 50rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  border-radius: 2rem;
  background: #fff;
  padding: 2rem;
  box-shadow: 0 12px 26px rgba(0, 45, 91, .08);
}

.coloring-full-page img {
  width: 100%;
  max-width: 32rem;
  max-height: 44rem;
  object-fit: contain;
  filter: grayscale(1) contrast(1.18);
}

.coloring-full-page em {
  color: #5b4fd6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 900;
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    background: #b6d8f2 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .package-print-root {
    display: block;
    padding: 0;
    background: #b6d8f2 !important;
  }

  .package-print-root .storybook-page {
    width: 190mm;
    height: 277mm;
    min-height: 277mm;
    margin: 10mm auto;
    overflow: hidden;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .package-print-root .storybook-script-title {
    font-size: 20pt;
  }

  .package-print-root .storybook-hero-frame {
    height: 48mm;
    aspect-ratio: auto;
    margin-bottom: 6mm;
  }

  .package-print-root .storybook-text {
    padding: 0 4mm;
  }

  .package-print-root .print-story-text-compact h1 {
    margin-bottom: 3mm;
    font-size: 14pt;
  }

  .package-print-root .print-story-text-compact h2 {
    margin: 3mm 0 1.5mm;
    font-size: 8.6pt;
  }

  .package-print-root .print-story-text-compact p,
  .package-print-root .print-story-text-compact li {
    margin-bottom: 2.1mm;
    font-size: 8pt;
    line-height: 1.42;
  }

  .package-print-root .mission-print-card-full {
    width: 118mm;
    margin-top: 28mm;
    padding: 8mm;
  }

  .package-print-root .mission-print-row-large {
    grid-template-columns: 13mm 1fr 7mm;
    min-height: 18mm;
    gap: 5mm;
    margin-bottom: 4mm;
    padding: 4mm;
  }

  .package-print-root .mission-print-row-large .mission-print-icon {
    width: 11mm;
    height: 11mm;
  }

  .package-print-root .mission-print-row-large p {
    font-size: 10.4pt;
  }

  .package-print-root .coloring-full-page {
    min-height: 236mm;
    padding: 4mm 6mm 6mm;
    gap: 5mm;
  }

  .package-print-root .coloring-full-page img {
    max-width: 168mm;
    max-height: 214mm;
  }

  .package-print-root .coloring-full-page em {
    font-size: 14pt;
  }

  .package-print-root .storybook-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
}

/* Generated package view: mirrors the polished TypeScript package result screen. */
.package-result-panel {
  align-items: stretch;
  gap: 1.5rem;
}

.package-result-heading {
  width: min(100%, 56rem);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.package-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .75rem;
}

.result-action {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 999px;
  padding: .65rem 1.25rem;
  font-size: .875rem;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease;
}

.result-action:hover {
  transform: translateY(-1px);
}

.result-action-primary {
  background: #5f59ee;
  color: #fff;
  box-shadow: 0 12px 28px rgba(88, 70, 190, .28);
}

.result-action-secondary {
  border: 1px solid #5f59ee;
  background: #fff;
  color: #5f59ee;
}

.result-action-muted {
  border: 1px solid #9fc2dc;
  background: rgba(255, 255, 255, .45);
  color: #8ba0b4;
}

.storybook-page {
  position: relative;
  width: min(100%, 48rem);
  min-height: 68rem;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(74, 170, 216, .1);
  border-radius: 2.5rem;
  background:
    radial-gradient(circle at 98% 0%, rgba(255, 221, 156, .72) 0 5.5rem, transparent 5.65rem),
    radial-gradient(circle at 0% 100%, rgba(206, 185, 255, .48) 0 7rem, transparent 7.15rem),
    linear-gradient(180deg, #fff 0%, #f8fdff 42%, #dff4ff 100%);
  padding: 3rem;
  box-shadow: 0 20px 55px rgba(0, 45, 91, .16);
}

.storybook-page-parent {
  min-height: 66rem;
  background:
    radial-gradient(circle at 98% 0%, rgba(255, 221, 156, .58) 0 5.5rem, transparent 5.65rem),
    #fff;
}

.storybook-corner {
  position: absolute;
  pointer-events: none;
}

.storybook-watermark {
  position: absolute;
  top: 2rem;
  left: 50%;
  z-index: 0;
  transform: translateX(-50%);
  color: rgba(124, 58, 237, .06);
  font-size: 6.75rem;
  font-weight: 1000;
  letter-spacing: .03em;
  line-height: 1;
}

.storybook-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.storybook-header-parent {
  margin-bottom: 3rem;
}

.storybook-title-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.storybook-round-icon,
.storybook-info-icon {
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff0cc;
  color: #3f2b96;
  box-shadow: 0 12px 28px rgba(245, 158, 11, .16);
}

.storybook-info-icon {
  width: 2rem;
  height: 2rem;
  border: 2px solid #6d5ee7;
  background: #fff;
  color: #6d5ee7;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  box-shadow: none;
}

.storybook-round-icon .ui-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.storybook-script-title {
  margin: 0;
  color: #5b4fd6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1.05;
}

.storybook-page-meta {
  position: relative;
  z-index: 2;
  display: grid;
  gap: .2rem;
  text-align: right;
}

.storybook-page-meta span {
  color: #64748b;
  font-size: .75rem;
  font-weight: 1000;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.storybook-page-meta em {
  color: #5b4fd6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 900;
}

.storybook-hero-frame {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  aspect-ratio: 21 / 9;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 2rem;
  background: linear-gradient(135deg, #e0f2fe, #fce7f3, #ffedd5);
  box-shadow: 0 22px 40px rgba(15, 23, 42, .16);
}

.storybook-hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-generating-placeholder {
  display: grid;
  min-height: 100%;
  width: 100%;
  place-items: center;
  align-content: center;
  gap: .75rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(224, 242, 254, .85), rgba(252, 231, 243, .85), rgba(255, 237, 213, .85));
  color: #002d5b;
  text-align: center;
}

.image-generating-placeholder span {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: #fff;
  color: #6d5ee7;
  box-shadow: 0 10px 24px rgba(88, 70, 190, .12);
}

.image-generating-placeholder strong {
  color: #8b7cf6;
  font-size: .75rem;
  letter-spacing: .28em;
}

.image-generating-placeholder p {
  margin: 0;
  color: #002d5b;
  font-weight: 1000;
}

.image-generating-placeholder i {
  display: block;
  width: 2.25rem;
  height: .5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #5f59ee 0 25%, #ef3f90 25% 50%, #ff9c45 50% 75%, #5f59ee 75% 100%);
  animation: placeholder-pulse 1s ease-in-out infinite alternate;
}

.image-generating-placeholder-small {
  min-height: 12rem;
  border: 2px dashed #cfdff1;
  border-radius: 1.25rem;
}

@keyframes placeholder-pulse {
  from { opacity: .45; transform: scaleX(.82); }
  to { opacity: 1; transform: scaleX(1); }
}

.storybook-text {
  position: relative;
  z-index: 2;
  padding: 0 1.25rem;
  color: #172033;
}

.storybook-text h1 {
  margin: 0 0 1rem;
  color: #5b4fd6;
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 1000;
  letter-spacing: 0;
}

.storybook-text h2 {
  margin: 1.05rem 0 .45rem;
  color: #5b4fd6;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 1000;
}

.storybook-text p,
.storybook-text li {
  margin: 0 0 1rem;
  color: #1f2937;
  font-size: .96rem;
  line-height: 1.72;
}

.storybook-bottom-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.mission-print-card,
.coloring-print-card {
  border-radius: 2rem;
  background: rgba(255, 255, 255, .78);
  padding: 1.25rem;
  box-shadow: 0 12px 26px rgba(0, 45, 91, .08);
}

.mission-print-card {
  border: 2px solid rgba(74, 170, 216, .18);
}

.mission-print-card h2 {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  color: #00a4dd;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 900;
}

.mission-print-card h2 span {
  color: #f59e0b;
  font-family: inherit;
}

.mission-print-list {
  display: grid;
  gap: .65rem;
}

.mission-print-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr 1.35rem;
  gap: .75rem;
  align-items: center;
  border: 1px solid #dbeaf1;
  border-radius: 1rem;
  background: rgba(255, 255, 255, .9);
  padding: .75rem;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .05);
}

.mission-print-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: #eefaff;
  color: #5f59ee;
  font-weight: 1000;
}

.mission-print-row p {
  margin: 0;
  color: #253044;
  font-size: .82rem;
  font-weight: 1000;
  line-height: 1.18;
}

.mission-print-check {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid #b9e7f6;
  border-radius: 999px;
}

.coloring-print-card {
  position: relative;
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #fff;
}

.coloring-print-card::after {
  content: "✎";
  position: absolute;
  top: -.7rem;
  right: -.5rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-weight: 1000;
  box-shadow: 0 8px 18px rgba(245, 158, 11, .25);
}

.coloring-print-card img {
  width: 100%;
  max-height: 13rem;
  object-fit: contain;
  filter: grayscale(1) contrast(1.15);
}

.coloring-print-card em {
  color: #5b4fd6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 900;
}

.parent-print-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.parent-print-column {
  display: grid;
  align-content: start;
  gap: 1.35rem;
}

.parent-info-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.parent-info-box span,
.parent-text-box h3 {
  display: block;
  margin: 0 0 .55rem;
  color: #6d5ee7;
  font-size: .75rem;
  font-weight: 1000;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.parent-info-box strong,
.parent-text-box p {
  display: block;
  margin: 0;
  border: 1px solid #d7dde8;
  border-radius: .75rem;
  background: #f8fafc;
  color: #111827;
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.48;
}

.parent-info-box strong {
  min-height: 3rem;
  padding: .85rem 1rem;
}

.parent-text-box p {
  min-height: 6rem;
  padding: 1rem;
}

.parent-text-box-tall p {
  min-height: 8rem;
}

.glossary-print-card {
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 1.25rem;
  background: #fffbf4;
  padding: 1.25rem;
}

.glossary-print-card h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  color: #f59e0b;
  font-size: .75rem;
  font-weight: 1000;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.glossary-print-card h3 .ui-icon {
  width: .9rem;
  height: .9rem;
}

.glossary-print-card p {
  margin: 0 0 .85rem;
  color: #4b5563;
  font-size: .88rem;
  line-height: 1.35;
}

.glossary-print-card p:last-child {
  margin-bottom: 0;
}

.glossary-print-card strong {
  color: #5b4fd6;
  font-style: italic;
}

.glossary-print-card span {
  margin: 0 .35rem;
  color: #94a3b8;
}

.parent-print-footer {
  position: absolute;
  right: 3rem;
  bottom: 2.5rem;
  left: 3rem;
  border-top: 1px solid #e7edf5;
  padding-top: 1.75rem;
  text-align: center;
}

.parent-print-footer > p {
  margin: 0 0 1.75rem;
  color: #7b70dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
}

.parent-print-footer > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
}

.parent-stamp {
  display: flex;
  min-width: 8.5rem;
  min-height: 3.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7dff0;
  border-radius: .5rem;
  color: #6d5ee7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .85rem;
  font-style: italic;
}

.parent-date {
  display: grid;
  gap: .35rem;
  color: #111827;
  text-align: left;
}

.parent-date strong {
  color: #6d5ee7;
  font-size: .75rem;
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .package-result-heading,
  .storybook-header,
  .parent-print-footer > div {
    flex-direction: column;
  }

  .package-result-actions {
    justify-content: flex-start;
  }

  .storybook-page {
    border-radius: 1.25rem;
    padding: 1.25rem;
  }

  .storybook-watermark {
    font-size: 4rem;
  }

  .storybook-script-title {
    font-size: 1.45rem;
  }

  .storybook-bottom-grid,
  .parent-print-grid,
  .parent-info-row {
    grid-template-columns: 1fr;
  }

  .storybook-text {
    padding: 0;
  }

  .parent-print-footer {
    position: static;
    margin-top: 2rem;
  }
}

@media print {
  body { background: #b9ddf6; }
  .print-root { padding: 0; }
  .print-page {
    box-shadow: none;
    margin: 0 auto;
    border-radius: 0;
  }
}

/* PHP dashboard parity with the TypeScript /dashboard shell. */
body {
  background: #fff;
  color: #002d5b;
}

.ui-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.brand-icon .ui-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.dashboard-login-root {
  min-height: 100vh;
  padding: 1rem;
  background: #fff;
  color: #002d5b;
}

.dashboard-login-shell {
  width: min(72rem, 100%);
  min-height: calc(100vh - 2rem);
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: .75rem;
  background: #b6d8f2;
  padding: 1.25rem;
}

.dashboard-login-card {
  width: min(28rem, 100%);
  border-radius: .75rem;
  background: #fff;
  padding: 1.75rem;
  box-shadow: 0 18px 50px rgba(0, 45, 91, .14);
}

.login-wordmark {
  position: relative;
  width: 14rem;
  height: 6rem;
  margin: 0 auto 1rem;
}

.login-wordmark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-login-card h1 {
  margin-bottom: .5rem;
  text-align: center;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 1000;
  letter-spacing: 0;
}

.dashboard-login-card p {
  margin-bottom: 1.5rem;
  text-align: center;
  color: #174d7c;
  font-size: .875rem;
  font-weight: 650;
}

.dashboard-login-card label {
  margin-top: 1rem;
  color: #174d7c;
  font-size: .75rem;
  letter-spacing: .06em;
}

.dashboard-login-card input {
  border-color: #9bc8e9;
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-weight: 650;
}

.dashboard-login-card .primary-button {
  margin-top: 1.5rem;
  border-radius: .5rem;
  background: #5846be;
  box-shadow: 0 10px 20px rgba(88, 70, 190, .2);
}

.primary-button,
.secondary-button,
.link-button {
  gap: .5rem;
}

.app-shell {
  width: min(72rem, calc(100% - 2rem));
  min-height: calc(100vh - 2rem);
  margin: 1rem auto;
  display: flex;
  gap: 0;
  overflow: hidden;
  border-radius: .75rem;
  background: #b6d8f2;
  padding: 0;
  box-shadow: 0 24px 70px rgba(0, 45, 91, .16);
}

.sidebar {
  width: 16rem;
  min-height: auto;
  flex: 0 0 16rem;
  padding: 1.75rem;
}

.brand {
  border: 0;
  background: transparent;
}

.brand-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .5rem;
  background: #5846be;
  box-shadow: 0 8px 16px rgba(88, 70, 190, .2);
}

.brand strong {
  font-size: .875rem;
  font-weight: 1000;
}

.brand small {
  color: #174d7c;
  font-size: .75rem;
  font-weight: 650;
}

.nav {
  margin-top: 1.75rem;
  gap: .5rem;
}

.nav a {
  min-height: auto;
  border-radius: .5rem;
  padding: .75rem 1rem;
  color: #174d7c;
  font-size: .875rem;
  font-weight: 900;
}

.nav a.is-active {
  background: #fff;
  color: #002d5b;
  box-shadow: 0 1px 2px rgba(0, 45, 91, .05);
}

.nav a:hover {
  background: rgba(255, 255, 255, .5);
  transform: none;
}

.nav-icon {
  width: 1rem;
  color: currentColor;
}

.sidebar-card {
  display: none;
}

.sidebar-footer {
  border-top-color: #7db6dd;
  padding-top: 1.25rem;
}

.sidebar-footer strong {
  font-size: .875rem;
  font-weight: 1000;
}

.sidebar-footer span {
  color: #174d7c;
  font-size: .75rem;
  font-weight: 650;
}

.sidebar-footer .sidebar-specialization {
  margin-top: .25rem;
  color: rgba(23, 77, 124, .75);
  font-size: .6875rem;
}

.logout-button {
  color: #174d7c;
  font-size: .875rem;
  font-weight: 900;
}

.main-panel {
  width: auto;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1.75rem;
}

.date-row {
  width: min(100%, 56rem);
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  color: #002d5b;
  font-size: .875rem;
  font-weight: 900;
}

.dashboard-card,
.creator-heading,
.creator-card,
.alert {
  width: min(100%, 56rem);
  margin-inline: auto;
}

.dashboard-card,
.creator-card {
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 45, 91, .06), 0 4px 14px rgba(0, 45, 91, .05);
}

.dashboard-home-card {
  padding: 1.75rem 1.5rem;
}

.dashboard-home-card h1,
.library-head h1,
.settings-view h1,
.creator-heading h1 {
  margin: 0;
  color: #002d5b;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 1000;
  letter-spacing: -.02em;
}

.dashboard-home-card p,
.library-head p {
  max-width: 42rem;
  margin-top: .75rem;
  color: #005198;
  font-size: 1rem;
  line-height: 1.75rem;
  font-weight: 650;
}

.steps {
  margin-top: 1.5rem;
  gap: .75rem;
}

.steps span {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 0;
  background: transparent;
  color: #005198;
  font-size: .875rem;
  font-weight: 1000;
}

.steps b {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: #e6f2fb;
  color: #005198;
}

.dashboard-cta {
  margin-top: 2rem;
  width: fit-content;
  min-height: 3.5rem;
  border-radius: .5rem;
  background: #5846be;
  padding-inline: 2rem;
  box-shadow: 0 8px 18px rgba(88, 70, 190, .2);
}

.recent-card {
  padding: 1.5rem;
}

.section-head {
  align-items: center;
}

.section-head h2 {
  margin: 0;
  color: #002d5b;
  font-size: 1.125rem;
  font-weight: 1000;
}

.search-form {
  width: min(24rem, 100%);
}

.search-control {
  display: flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid #b4cce1;
  border-radius: .375rem;
  padding: .5rem .75rem;
  color: #174d7c;
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.search-control input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.package-list {
  margin-top: 1.25rem;
}

.package-row {
  grid-template-columns: 1fr 8.75rem;
  padding: .75rem 0;
  border-color: #c8dceb;
}

.row-main {
  min-width: 0;
}

.row-open {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.row-open .ui-icon {
  margin-top: .25rem;
  color: #5846be;
}

.row-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #002d5b;
  font-size: .875rem;
}

.row-main small {
  margin-top: .25rem;
  color: #005198;
  font-size: .75rem;
  font-weight: 650;
}

.mini-actions {
  justify-content: flex-end;
}

.mini-actions a {
  display: grid;
  place-items: center;
  min-width: auto;
  width: 2.5rem;
  height: 2rem;
  border-color: #afc7da;
  border-radius: .375rem;
  padding: 0;
}

.empty-state {
  border-radius: .5rem;
  background: #f2f8fd;
  padding: 1.25rem;
  color: #174d7c;
  font-size: .875rem;
  font-weight: 650;
}

.center-link a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #5846be;
  font-size: .875rem;
  font-weight: 1000;
}

.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem 1.5rem;
}

.compact-button {
  min-height: 3rem;
  border-radius: .5rem;
  padding-inline: 1.25rem;
  font-size: .875rem;
}

.settings-view {
  padding: 1.75rem 1.5rem;
}

.settings-heading {
  margin-bottom: 1.75rem;
}

.settings-heading .kicker,
.creator-heading .kicker {
  margin: 0;
  color: #e33e7f;
  font-size: .75rem;
  letter-spacing: .28em;
}

.profile-form {
  display: grid;
  gap: 1.25rem;
}

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

.profile-field {
  gap: .5rem;
  color: #174d7c;
  font-size: .75rem;
  letter-spacing: .06em;
}

.profile-field > span {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.profile-field > span .ui-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: .375rem;
  background: #eaf5fd;
  color: #5846be;
  padding: .375rem;
}

.profile-field input,
.profile-field textarea {
  border-color: #b7d6ee;
  border-radius: .5rem;
  color: #002d5b;
  font-weight: 650;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #d7e6f2;
  padding-top: 1.25rem;
}

.creator-heading {
  margin-top: 0;
}

.creator-heading .back-link {
  margin-bottom: 1rem;
  color: #005198;
  font-size: .875rem;
  font-weight: 1000;
}

.creator-card.pm-form {
  position: relative;
  width: min(100%, 64rem);
  border: 1px solid rgba(74, 170, 216, .1);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 4px 14px rgba(0, 45, 91, .08);
}

.generation-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  padding: 2rem;
}

.pm-form.is-generating .generation-overlay {
  display: flex;
}

.generation-loader {
  width: min(34rem, 100%);
  border: 1px solid #d7e6f2;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #fff, #f7fbff);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 45, 91, .14);
}

.generation-spinner {
  display: inline-block;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border: .35rem solid #e6f2fb;
  border-top-color: #5846be;
  border-radius: 999px;
  animation: generation-spin .85s linear infinite;
}

.generation-loader h2 {
  margin: 0;
  color: #002d5b;
  font-size: 1.35rem;
  font-weight: 1000;
}

.generation-loader p {
  margin: .75rem auto 0;
  max-width: 28rem;
  color: #174d7c;
  font-size: .9rem;
  font-weight: 650;
}

.generation-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.25rem;
}

.generation-steps span {
  border-radius: 999px;
  background: #e6f2fb;
  padding: .4rem .75rem;
  color: #005198;
  font-size: .75rem;
  font-weight: 900;
}

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

.language-switch {
  margin-bottom: .25rem;
}

.language-switch button {
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  padding: .25rem .75rem;
  color: #94a3b8;
  font-size: .75rem;
  font-weight: 900;
  cursor: pointer;
}

.language-switch button.is-active {
  background: #5846be;
  color: #fff;
  box-shadow: 0 4px 12px rgba(88, 70, 190, .2);
}

.form-section h2 {
  color: #5846be;
  font-size: 1.125rem;
  line-height: 1.4;
}

.form-section h2 .ui-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.form-section h2.pink-heading {
  color: #e33e7f;
}

.pm-form label {
  color: #94a3b8;
  font-size: .75rem;
  letter-spacing: .06em;
}

.pm-form input,
.pm-form textarea {
  border-color: #b7d6ee;
  border-radius: .5rem;
  padding: .75rem 1rem;
  color: #002d5b;
  font-weight: 650;
}

.medication-row {
  border-color: rgba(74, 170, 216, .1);
  border-radius: 1rem;
  background: rgba(74, 170, 216, .05);
  padding: 1rem;
}

.medication-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
  color: #4aaad8;
  font-size: .75rem;
  font-weight: 1000;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.medication-remove-button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgba(227, 62, 127, .2);
  border-radius: 999px;
  background: #fff;
  padding: .35rem .6rem;
  color: #e33e7f;
  font-size: .7rem;
  font-weight: 1000;
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
}

.medication-remove-button:hover {
  background: #fff5f9;
}

.medication-remove-button[hidden],
.medication-row.is-single .medication-remove-button {
  display: none;
}

.dashed-button {
  min-height: 2.75rem;
  border: 2px dashed rgba(74, 170, 216, .2);
  border-radius: .75rem;
  color: #4aaad8;
  background: #fff;
}

.pm-form .primary-button.wide {
  border-radius: .75rem;
  background: #5846be;
  min-height: 3.5rem;
}

.help-card,
.help-card article,
.feature-list p {
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(30, 43, 60, .06), 0 4px 14px rgba(30, 43, 60, .05);
}

.help-panel {
  color: #1e2b3c;
}

.help-width {
  width: min(100%, 56rem);
  margin-inline: auto;
}

.help-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  border-radius: 1rem;
  background: #fff;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 1px 3px rgba(30, 43, 60, .06), 0 4px 14px rgba(30, 43, 60, .05);
}

.help-hero > span {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: .75rem;
  background: #ede7fb;
  color: #7c3aed;
}

.help-hero > span .ui-icon {
  width: 1.75rem;
  height: 1.75rem;
}

.help-hero h1 {
  margin: 0;
  color: #1e2b3c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.625rem;
  line-height: 1.2;
}

.help-hero p {
  margin: .5rem 0 0;
  color: #475569;
  font-size: .925rem;
  font-weight: 550;
}

.help-section-head {
  margin-top: .75rem;
}

.help-section-head p {
  margin: 0 0 .25rem;
  color: #7c3aed;
  font-size: .67rem;
  font-weight: 1000;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.help-section-head h2 {
  color: #1e2b3c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3125rem;
  line-height: 1.2;
}

.help-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.help-grid article {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem 1.5rem;
  color: #475569;
  font-size: .82rem;
  font-weight: 550;
  line-height: 1.7;
  box-shadow: 0 1px 3px rgba(30, 43, 60, .06), 0 4px 14px rgba(30, 43, 60, .05);
}

.help-grid ul,
.howto-grid ol {
  margin: .5rem 0;
  padding-left: 1.25rem;
}

.help-grid ul {
  list-style: disc;
}

.howto-grid ol {
  list-style: decimal;
}

.help-grid strong,
.howto-grid strong {
  color: #1e2b3c;
  font-weight: 800;
}

.help-grid article > span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: .75rem;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
}

.help-grid h3,
.howto-grid h3 {
  margin: 0 0 .35rem;
  color: #1e2b3c;
  font-size: .95rem;
  font-weight: 1000;
}

.help-grid em {
  width: fit-content;
  margin-top: auto;
  border-radius: 999px;
  background: #ede7fb;
  padding: .25rem .75rem;
  color: #7c3aed;
  font-size: .7rem;
  font-style: normal;
  font-weight: 800;
}

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

.howto-grid article {
  border: 1px solid transparent;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem 1.5rem;
  color: #475569;
  font-size: .825rem;
  font-weight: 550;
  line-height: 1.7;
  box-shadow: 0 1px 3px rgba(30, 43, 60, .06), 0 4px 14px rgba(30, 43, 60, .05);
}

.howto-grid article > span {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: .75rem;
  border-radius: .625rem;
  background: #ede7fb;
  color: #7c3aed;
}

.howto-grid article.tone-amber > span {
  background: #fff6e0;
  color: #f4a732;
}

.howto-grid article.tone-rose > span {
  background: #fef0f3;
  color: #e04b6a;
}

.howto-grid article.tone-green > span {
  background: #dcfce7;
  color: #16a34a;
}

.howto-grid article.tone-sky > span {
  background: #ebf7fd;
  color: #4aaad8;
}

.help-faq-card {
  border-radius: 1rem;
  background: #fff;
  padding: .75rem 1.5rem;
  box-shadow: 0 1px 3px rgba(30, 43, 60, .06), 0 4px 14px rgba(30, 43, 60, .05);
}

.help-faq-card details {
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 0;
}

.help-faq-card details:last-child {
  border-bottom: 0;
}

.help-faq-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #1e2b3c;
  font-size: .9rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.help-faq-card summary::-webkit-details-marker {
  display: none;
}

.help-faq-card details[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-chevron {
  color: #7c3aed;
  transition: transform .18s ease;
}

.help-faq-card details > div {
  margin-top: .75rem;
  color: #475569;
  font-size: .825rem;
  font-weight: 550;
  line-height: 1.7;
}

.help-faq-card p {
  margin: 0;
}

.faq-action {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
  border-radius: .625rem;
  background: #7c3aed;
  padding: .625rem 1rem;
  color: #fff;
  font-size: .8125rem;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(124, 58, 237, .3);
}

.support-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border: 1px solid #c9b9f4;
  border-radius: 1rem;
  background: linear-gradient(135deg, #fff, #ede7fb);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 1px 3px rgba(30, 43, 60, .06), 0 4px 14px rgba(30, 43, 60, .05);
}

.support-card > span {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: #fff;
  color: #7c3aed;
  box-shadow: 0 1px 3px rgba(30, 43, 60, .06), 0 4px 14px rgba(30, 43, 60, .05);
}

.support-card h3 {
  flex: 1;
  margin: 0;
  color: #1e2b3c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
    width: min(100%, calc(100% - 1rem));
    margin: .5rem auto;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
  }

  .main-panel {
    padding: 1rem;
  }

  .profile-grid,
  .form-grid,
  .field-pair,
  .library-head,
  .help-grid,
  .howto-grid {
    grid-template-columns: 1fr;
  }

  .support-card {
    flex-direction: column;
    text-align: center;
  }
}

/* Admin owner console parity with the TypeScript /admin screen. */
.admin-owner-root {
  min-height: 100vh;
  background: #f8f6ff;
  padding: 1.25rem;
  color: #0b1534;
}

.admin-owner-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
}

.admin-owner-sidebar,
.admin-owner-hero,
.admin-panel,
.admin-owner-notice,
.admin-metrics article {
  border: 1px solid rgba(124, 58, 237, .1);
  background: #fff;
  box-shadow: 0 24px 70px rgba(61, 26, 110, .08);
}

.admin-owner-sidebar {
  min-height: calc(100vh - 2.5rem);
  border-radius: 2rem;
  padding: 1.25rem;
}

.admin-owner-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.75rem;
}

.admin-owner-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border-radius: 1rem;
  background: #e9f6ff;
  color: #5846be;
}

.admin-owner-brand strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 1000;
}

.admin-owner-brand small,
.admin-owner-user small {
  color: #94a3b8;
  font-size: .75rem;
  font-weight: 800;
}

.admin-owner-nav {
  display: grid;
  gap: .5rem;
}

.admin-owner-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 1rem;
  padding: .85rem 1rem;
  color: #475569;
  font-size: .9rem;
  font-weight: 1000;
}

.admin-owner-nav a span {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}

.admin-owner-nav a.is-active {
  background: rgba(124, 58, 237, .1);
  color: #7c3aed;
}

.admin-owner-user {
  margin-top: 1.75rem;
  border-radius: 1.5rem;
  background: #10172a;
  padding: 1rem;
  color: #fff;
}

.admin-owner-user span {
  color: rgba(255, 255, 255, .45);
  font-size: .7rem;
  font-weight: 1000;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.admin-owner-user strong {
  display: block;
  margin-top: .5rem;
}

.admin-owner-actions {
  display: grid;
  gap: .5rem;
  margin-top: 1rem;
}

.admin-owner-actions a,
.admin-owner-actions button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: .85rem 1rem;
  color: #0b1534;
  font-size: .85rem;
  font-weight: 1000;
  cursor: pointer;
}

.admin-owner-main {
  min-width: 0;
}

.admin-owner-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: 2rem;
  background: #10172a;
  padding: 1.5rem;
  color: #fff;
}

.admin-owner-hero p,
.admin-eyebrow {
  margin: 0;
  color: #ef3f90;
  font-size: .75rem;
  font-weight: 1000;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.admin-owner-hero h1 {
  margin: .5rem 0 .75rem;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -.03em;
}

.admin-owner-hero span {
  display: block;
  max-width: 42rem;
  color: rgba(255, 255, 255, .65);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.7;
}

.admin-owner-hero > a {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 1rem;
  background: #fff;
  padding: .85rem 1.1rem;
  color: #10172a;
  font-size: .85rem;
  font-weight: 1000;
}

.admin-owner-notice {
  margin-bottom: 1.25rem;
  border-radius: 1rem;
  padding: 1rem;
  color: #7c3aed;
  font-weight: 900;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-metrics article {
  border-radius: 1.75rem;
  padding: 1.25rem;
}

.admin-metrics article > span {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: rgba(124, 58, 237, .1);
  color: #7c3aed;
}

.admin-metrics p {
  margin: 0;
  color: #94a3b8;
  font-size: .72rem;
  font-weight: 1000;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.admin-metrics strong {
  display: block;
  margin-top: .5rem;
  color: #0b1534;
  font-size: 2.35rem;
  line-height: 1;
  font-weight: 1000;
}

.admin-metrics small {
  margin-top: .5rem;
  color: #059669;
  font-weight: 900;
}

.admin-two-col {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 1.25rem;
}

.admin-two-col-wide {
  grid-template-columns: 1fr .55fr;
}

.admin-two-col-prompts {
  grid-template-columns: 340px 1fr;
}

.admin-panel {
  border-radius: 2rem;
  padding: 1.25rem;
}

.admin-panel h2 {
  margin: .25rem 0 1.25rem;
  color: #0b1534;
  font-size: 1.55rem;
  font-weight: 1000;
}

.admin-status-list,
.admin-user-list,
.admin-copy {
  display: grid;
  gap: .75rem;
}

.admin-status-list > div {
  display: flex;
  align-items: center;
  gap: .75rem;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1rem;
}

.admin-status-list span.ok,
.admin-status-list span.warn {
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
}

.admin-status-list span.ok { background: #10b981; }
.admin-status-list span.warn { background: #f59e0b; }

.admin-status-list strong {
  display: block;
  font-size: .9rem;
}

.admin-status-list small,
.admin-copy p,
.admin-user-list small {
  color: #64748b;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.65;
}

.admin-user-form {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.2fr 1fr 120px 110px;
  gap: .75rem;
  margin-bottom: 1.25rem;
  border-radius: 1.5rem;
  background: #f8fafc;
  padding: 1rem;
}

.admin-user-form input,
.admin-user-form select,
.admin-model-picker input,
.admin-field-grid input,
.admin-field-grid select,
.admin-panel textarea {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: .85rem 1rem;
  color: #0b1534;
  font-size: .9rem;
  font-weight: 750;
}

.admin-user-form button,
.admin-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: 1rem;
  background: #10172a;
  padding: .85rem 1rem;
  color: #fff;
  font-size: .85rem;
  font-weight: 1000;
  cursor: pointer;
}

.admin-primary {
  margin-top: 1rem;
  background: linear-gradient(135deg, #5b49c8, #7c3aed 45%, #ef3f90 76%, #ff9c45);
}

.admin-user-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid #f1f5f9;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
}

.admin-user-list p {
  margin: 0;
}

.admin-user-list form button {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: .75rem 1rem;
  font-size: .85rem;
  font-weight: 1000;
}

.admin-user-list form button:disabled {
  opacity: .45;
}

.admin-user-list code {
  overflow: hidden;
  max-width: 28rem;
  border-radius: .85rem;
  background: #f8fafc;
  padding: .65rem .85rem;
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
  text-overflow: ellipsis;
}

.admin-progress {
  display: block;
  overflow: hidden;
  height: .45rem;
  margin-top: .65rem;
  border-radius: 999px;
  background: #eef2f7;
}

.admin-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #5b49c8, #7c3aed 45%, #ef3f90 76%, #ff9c45);
}

.badge-ok,
.badge-off,
.badge-role,
.badge-muted {
  display: inline-flex;
  margin-left: .35rem;
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .7rem;
  font-weight: 1000;
}

.badge-ok { background: #ecfdf5; color: #047857; }
.badge-off { background: rgba(239, 63, 144, .1); color: #ef3f90; }
.badge-role { background: rgba(124, 58, 237, .1); color: #7c3aed; }
.badge-muted { background: #f1f5f9; color: #64748b; }

.model-catalog-status,
.admin-hint {
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: rgba(124, 58, 237, .06);
  padding: .9rem 1rem;
  color: #64748b;
  font-size: .82rem;
  font-weight: 800;
}

.admin-model-picker {
  display: grid;
  gap: .65rem;
  margin-bottom: 1rem;
  color: #0b1534;
  font-size: .9rem;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: none;
}

.model-list {
  max-height: 13rem;
  overflow: auto;
  display: grid;
  gap: .5rem;
}

.model-list button {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: .75rem;
  color: #0b1534;
  text-align: left;
  cursor: pointer;
}

.model-list button.is-active {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, .08);
}

.model-list strong,
.model-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-prompt-nav {
  display: grid;
  gap: .6rem;
}

.admin-prompt-nav a {
  display: block;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1rem;
  color: #475569;
}

.admin-prompt-nav a.is-active {
  background: rgba(124, 58, 237, .1);
  color: #7c3aed;
}

.admin-prompt-nav strong,
.admin-prompt-nav small {
  display: block;
}

.admin-code-editor {
  min-height: 560px;
  border-radius: 1.5rem !important;
  background: #0b1020 !important;
  color: #f8fafc !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .admin-owner-shell,
  .admin-two-col,
  .admin-two-col-wide,
  .admin-two-col-prompts,
  .admin-metrics,
  .admin-user-form {
    grid-template-columns: 1fr;
  }

  .admin-owner-sidebar {
    min-height: auto;
  }
}

.login-shell,
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 44vw) 1fr;
  background: #0f172a;
  color: #0b1534;
}

.login-hero,
.admin-hero {
  padding: clamp(2rem, 5vw, 5rem);
  color: #fff;
}

.login-hero img,
.admin-hero img {
  width: 160px;
  height: auto;
  object-fit: contain;
  margin-bottom: 2rem;
}

.login-hero h1,
.admin-hero h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  line-height: .95;
  letter-spacing: 0;
}

.login-hero p,
.admin-hero p {
  max-width: 640px;
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1.7;
}

.login-card,
.admin-panel {
  align-self: center;
  width: min(920px, calc(100% - 3rem));
  margin: 2rem auto;
  border-radius: 2rem;
  background: #fff;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .24);
}

.login-card {
  max-width: 560px;
}

.login-card label,
.admin-form label,
.package-form-card label,
.settings-grid label {
  display: grid;
  gap: .45rem;
  color: #64748b;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .75rem;
}

.login-card input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.package-form-card input,
.package-form-card textarea,
.settings-grid input {
  width: 100%;
  border: 1px solid #c7dff1;
  border-radius: .9rem;
  background: #fff;
  padding: .85rem 1rem;
  color: #002b55;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
}

.alert {
  border-radius: 1rem;
  margin: 0 0 1rem;
  padding: 1rem;
  font-weight: 800;
}

.alert-error {
  background: #fff1f2;
  color: #be123c;
}

.alert-success {
  background: #ecfdf5;
  color: #047857;
}

.package-form-card,
.dashboard-card,
.dashboard-hero-card {
  border-radius: 1.4rem;
  background: #fff;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  box-shadow: 0 20px 60px rgba(0, 43, 85, .1);
}

.package-form-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 2rem;
}

.full-span,
.primary-gradient-button.full-span {
  grid-column: 1 / -1;
}

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

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.medications-list {
  display: grid;
  gap: 1rem;
  max-height: none;
}

.medication-row {
  border: 1px solid #d8ecfb;
  border-radius: 1.2rem;
  background: #f6fbff;
  padding: 1rem;
}

.medication-row-head,
.section-heading,
.package-result-heading,
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.medication-remove-button {
  border: 0;
  background: transparent;
  color: #d946ef;
  font-weight: 900;
  cursor: pointer;
}

.add-row-button {
  border: 1px dashed #7dd3fc;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  color: #0284c7;
  font-weight: 900;
  cursor: pointer;
}

.primary-gradient-button,
.primary-dashboard-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  border: 0;
  border-radius: 1rem;
  background: linear-gradient(90deg, #5b4ce2, #e83f95, #ff9f43);
  color: #fff;
  padding: 1rem 1.5rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(91, 76, 226, .24);
}

.language-switch {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

.language-switch button {
  border: 0;
  border-radius: 999px;
  background: #edf2f7;
  color: #94a3b8;
  padding: .55rem 1rem;
  font-weight: 900;
  cursor: pointer;
}

.language-switch button.is-active {
  background: #5b4ce2;
  color: #fff;
}

.generation-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  text-align: center;
  z-index: 4;
}

.is-generating .generation-overlay {
  display: flex;
}

.package-list {
  display: grid;
  gap: .6rem;
}

.package-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid #c7dff1;
  padding: .9rem 0;
  color: #003463;
  text-decoration: none;
}

.package-row small,
.muted-note {
  display: block;
  color: #47729a;
}

.row-actions {
  display: flex;
  gap: .5rem;
}

.row-actions a,
.result-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid #b9d6ed;
  border-radius: .8rem;
  background: #fff;
  padding: .65rem .85rem;
  color: #003463;
  text-decoration: none;
  font-weight: 900;
}

.result-action-primary {
  background: #5b4ce2;
  color: #fff;
  border-color: #5b4ce2;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.admin-tabs a {
  border-radius: 999px;
  background: #f1f5f9;
  padding: .7rem 1rem;
  color: #475569;
  font-weight: 900;
  text-decoration: none;
}

.admin-tabs a.active {
  background: #5b4ce2;
  color: #fff;
}

.admin-card {
  border: 1px solid #e2e8f0;
  border-radius: 1.4rem;
  margin-top: 1rem;
  padding: 1.4rem;
}

.admin-form {
  display: grid;
  gap: 1rem;
}

.model-picker-list {
  display: grid;
  max-height: 260px;
  overflow: auto;
  gap: .45rem;
}

.model-picker-list button {
  border: 1px solid #e2e8f0;
  border-radius: .9rem;
  background: #fff;
  padding: .7rem;
  text-align: left;
}

.model-picker-list button.is-active {
  border-color: #7c3aed;
  background: #f5f3ff;
}

@media print {
  body {
    background: #b9dff6 !important;
  }

  .print-shell {
    width: 100%;
    margin: 0;
  }

  .storybook-page {
    break-after: page;
    page-break-after: always;
  }
}

@media (max-width: 980px) {
  .login-shell,
  .admin-shell,
  .package-form-card,
  .form-grid,
  .field-pair,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
