/* Creator pages: /start, /dashboard, /admin. Uses tokens from /styles.css. */
.app-main { padding-block: clamp(20px, 4vw, 48px) clamp(40px, 7vw, 88px); min-height: 60vh; }
.page-head { display: grid; gap: 10px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head .lead { margin: 0; max-width: 60ch; }
.page-head--row { grid-auto-flow: column; justify-content: space-between; align-items: center; }
.prog-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }

.gate { max-width: 560px; margin-inline: auto; display: grid; gap: 14px; }
.gate h1, .gate p { margin: 0; }

.account-strip { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 44px; }
.app-main .notice { margin-bottom: 16px; }
.app-main .notice[hidden], .app-main [hidden] { display: none; }

.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r); }
.link-row__url { flex: 1 1 220px; min-width: 0; font-size: .875rem; min-height: 44px; display: flex; align-items: center; }

/* start */
.start-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .start-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } .start-ticket { position: sticky; top: 24px; } }
.start-ticket__text { margin: 10px 0 0; }
.start-ticket__fig { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); overflow-wrap: anywhere; }
.start-ticket { display: grid; gap: 4px; }
.start-ticket .ticket-perf { margin: 14px 0; }
.more { margin: 4px 0 18px; border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 650; }
.more[open] > summary { margin-bottom: 10px; }

/* lists and sections */
.prog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.prog-card { display: grid; gap: 6px; text-decoration: none; color: inherit; min-height: 44px; }
.prog-card:hover { border-color: var(--teal); }
.prog-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.prog-card__name { font-size: 1.1rem; }

.dash-section { margin-top: clamp(28px, 5vw, 52px); display: grid; gap: 14px; }
.dash-section > h2, .dash-section > .sub { margin: 0; }
.dash-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; }
.dash-section__head h2 { margin: 0; }
.dash-stats { margin-top: 20px; padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.dash-section > .sub { margin-top: 18px; }

/* tables */
.app-main .table td.cell-actions { text-align: right; white-space: nowrap; }
.app-main .table td.cell-actions .btn + .btn { margin-left: 8px; }
.app-main .table th:last-child:empty { width: 1%; }
.table .break, .table td.break { overflow-wrap: anywhere; word-break: break-word; }
.bar { display: block; width: 100%; max-width: 160px; height: 10px; }
.bar__bg { fill: var(--paper-3); }
.bar__fg { fill: var(--teal); }
.cell-bar { min-width: 120px; }
.table--compact { font-size: .875rem; }
@media (max-width: 599px) {
  .app-main .table td.cell-actions { justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
  .app-main .table td.cell-actions .btn + .btn { margin-left: 0; }
  .cell-bar .bar { max-width: 55%; margin-left: auto; }
  .cell-link { align-items: flex-start; }
  .table td.break { text-align: right; }
}
@media (min-width: 600px) and (max-width: 999px) { .links-table th, .links-table td { padding-inline: 8px; } }

/* buttons in tables meet 44px tap target */
.app-main .btn--sm { min-height: 44px; }

/* claims and payments */
.pay-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9375rem; }
.pay-history li { padding: 8px 0; border-bottom: 1px dashed var(--line-strong); overflow-wrap: anywhere; }
.plan-rows { margin-block: 8px; }
.plan-rows .plan-total { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; }
.paste-form .field { margin-bottom: 12px; }
.settings-form, .void-form { max-width: 560px; }
textarea.input { resize: vertical; min-height: 84px; }

/* dialogs */
.dlg { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; display: grid; gap: 12px; }
.dlg > * { margin: 0; }
.dlg .field { margin-bottom: 0; }

body.is-mismatch [data-act] { cursor: not-allowed; }
.app-main .chip { min-height: 44px; }

.dlg [hidden], .app-main [hidden] { display: none !important; }
@media (max-width: 599px) { .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
