.card { background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(247,249,255,.94)); border: 1px solid #dfe7f7; border-radius: 18px; padding: 12px; box-shadow: 0 8px 24px rgba(19,30,61,.05); }
.hero { background: linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(238,244,255,.98) 48%, rgba(235,250,246,.96) 100%); border-color: #d6ddff; box-shadow: 0 14px 36px rgba(90,69,214,.10); }
.button, button.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 10px 14px; background: #e7ecf7; color: #172033; font-weight: 700; box-shadow: 0 1px 2px rgba(17,24,39,.04); }
.button.primary { background: linear-gradient(180deg, #6b59dd, #5641d2); color: #fff; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button-row.compact { justify-content: flex-end; }
.form-card form, .card form { display: grid; gap: 12px; }
.input, input, select, textarea { width: 100%; max-width: 100%; padding: 12px 14px; border: 1px solid #cfd7e6; border-radius: 14px; font: inherit; background: #fff; }
label { display: grid; gap: 6px; font-weight: 600; }
.toggle-row { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.toggle-row input[type="checkbox"] { width: 18px; height: 18px; }
.summary-grid, .grid-2, .grid-3 { display: grid; gap: 10px; }
.summary-grid { grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary-tile, .list-row { background: linear-gradient(180deg, #f7f9fe, #eaf2ff); border-radius: 16px; padding: 11px 12px; display: grid; gap: 4px; }
.stack { display: grid; gap: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5a45d6; }
.muted { color: #52607a; }
.helper-text { font-size: 13px; color: #52607a; font-weight: 500; }
.field-error { font-size: 13px; color: #b42318; font-weight: 700; }
.help-grid { align-items: start; }
.help-steps, .checklist { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.help-legend-row { justify-content: flex-start; margin-top: 8px; }
.schema-graph { gap: 18px; }
.schema-group { gap: 10px; border: 1px solid color-mix(in srgb, var(--schema-accent) 18%, #dfe7f7); border-radius: 18px; padding: 10px; background: linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--schema-soft) 45%, #f7f9ff)); }
.schema-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.schema-group > summary::-webkit-details-marker { display: none; }
.schema-group-summary h3 { margin: 0; color: var(--schema-accent); }
.schema-group-hint, .schema-card-hint { font-size: 12px; color: #52607a; white-space: nowrap; }
.schema-group[open] .schema-group-hint::after, .schema-card[open] .schema-card-hint::after { content: 'Hide'; }
.schema-group:not([open]) .schema-group-hint::after, .schema-card:not([open]) .schema-card-hint::after { content: 'Show'; }
.schema-card { border-radius: 18px; border: 1px solid color-mix(in srgb, var(--schema-accent) 20%, #dfe7f7); background: linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--schema-soft) 55%, #f7f9ff)); box-shadow: 0 10px 22px rgba(19,30,61,.05); padding: 12px; }
.schema-card > summary { list-style: none; cursor: pointer; }
.schema-card > summary::-webkit-details-marker { display: none; }
.schema-card-summary { display: grid; gap: 8px; }
.schema-card-body { display: grid; gap: 10px; margin-top: 8px; }.flash-stack {
  position: fixed;
  top: calc(var(--topbar-height) + 8px);
  right: 12px;
  z-index: 60;
  display: grid;
  gap: 8px;
  pointer-events: none;
  width: min(60vw, 420px);
  max-width: calc(100vw - 24px);
}
.flash {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  min-height: calc(1.35em + 14px);
  max-height: calc((1.35em * 3) + 14px);
  padding: 7px 12px;
  border-radius: 18px;
  background: rgba(239, 246, 255, .82);
  box-shadow: 0 10px 24px rgba(19,30,61,.12);
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  animation: flash-fade 5s ease forwards;
}
.flash.success { background: rgba(220, 252, 231, .82); }
.flash.error { background: rgba(254, 226, 226, .82); }
.flash.info { background: rgba(239, 246, 255, .82); }
@keyframes flash-fade {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; }
}
.empty-state { border: 1px dashed #cfd7e6; border-radius: 16px; padding: 12px; background: linear-gradient(180deg, #fbfcff, #f5f8ff); }
.compact-empty { padding: 10px 12px; }
.jump-form { display: grid; gap: 8px; align-items: end; }
.entry-card { display: grid; gap: 4px; padding: 11px 13px; border-radius: 16px; background: linear-gradient(180deg, #f7f9fe, #f1f5ff); border: 1px solid #e3e8f3; }
.saved-entry-card { display: grid; gap: 10px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(180deg, #f7f9fe, #f1f5ff); border: 1px solid #e3e8f3; }
.saved-entry-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dashboard-header-card { padding-bottom: 4px; padding-top: 10px; }
.dashboard-header-card > .page-title-section { padding-right: 4px; }
.dashboard-header-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.dashboard-header-copy { min-width: 0; }
.dashboard-header-row > .button-row.compact { width: auto; margin-left: auto; justify-content: flex-end; flex-wrap: nowrap; }
.dashboard-title { margin: 0; color: #5a45d6; font-size: clamp(0.98rem, 2.2vw, 1.08rem); line-height: 1.12; }
.dashboard-subtitle { margin: 0; }
.dashboard-quick-add { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 999px; background: linear-gradient(180deg, #6b59dd, #5641d2); color: #fff; font-size: 28px; font-weight: 500; line-height: 1; box-shadow: 0 8px 20px rgba(90,69,214,.18); }
.dashboard-quick-add:hover, .dashboard-quick-add:focus-visible { outline: none; filter: brightness(1.04); box-shadow: 0 10px 24px rgba(90,69,214,.24); }
.cycle-badge { display: inline-flex; align-items: center; width: fit-content; padding: 5px 10px; border-radius: 999px; background: rgba(90,69,214,.10); color: #5a45d6; font-weight: 800; font-size: 12px; }

@media (max-width: 767px) {
  .flash-stack { top: calc(var(--topbar-height) + 6px); right: 8px; width: min(60vw, calc(100vw - 16px), 420px); }
  .flash { min-height: 32px; padding: 6px 10px; font-size: 0.92rem; }
  .card { border-radius: 16px; padding: 11px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .dashboard-quick-add { width: 38px; height: 38px; flex-basis: 38px; font-size: 26px; }
  .button-row.compact { width: 100%; justify-content: stretch; }
  .button-row.compact .button { flex: 1 1 calc(50% - 10px); }
  .jump-form { grid-template-columns: 1fr; }
  .hero { padding-top: 11px; padding-bottom: 11px; }
}

@media (min-width: 700px) {
  .jump-form { grid-template-columns: minmax(0, 1fr) auto; }
}

@media (max-width: 899px) and (max-height: 760px) {
  .card {
    border-radius: 15px;
    padding: 10px;
  }

  .button,
  button.button {
    padding: 8px 12px;
    border-radius: 12px;
  }

  .form-card form,
  .card form,
  .stack,
  .button-row,
  .summary-grid,
  .grid-2,
  .grid-3 {
    gap: 8px;
  }

  .input,
  input,
  select,
  textarea {
    padding: 9px 11px;
    border-radius: 12px;
  }

  .dashboard-header-card {
    padding-top: 8px;
    padding-bottom: 2px;
  }

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

  .dashboard-quick-add {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 22px;
  }

  .helper-text,
  .field-error {
    font-size: 12px;
  }
}

@media (max-width: 899px) and (max-height: 680px) {
  .card {
    padding: 9px;
  }

  .button,
  button.button {
    padding: 7px 11px;
  }

  .input,
  input,
  select,
  textarea {
    padding: 8px 10px;
  }
}
