/* Data entry, organisations and ownership. Uses the tokens defined in app.css. */

.default-submit { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); border: 0; padding: 0; margin: -1px; }

/* Step progress */
.step-progress { margin-block-end: 1rem; }
.step-of { margin: 0 0 .5rem; color: var(--muted); font-weight: 600; }
.step-progress ol { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.step-progress li { display: flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--muted); min-width: 0; }
.step-progress li.current { border-color: var(--teal); color: var(--teal-dark); font-weight: 700; box-shadow: inset 0 0 0 1px var(--teal); }
.step-progress li.done { color: var(--ok); }
.step-n { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; flex: none; }
.step-progress li.current .step-n { background: var(--teal); color: #fff; }
.step-title { overflow-wrap: anywhere; }
.step-actions { flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal-dark); text-decoration: underline; font: inherit; cursor: pointer; }

/* Drafts and notices */
.notice { padding: .75rem 1rem; border-radius: var(--radius); background: var(--teal-soft); color: var(--ink); }
.draft-banner { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.draft-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.draft-list li { display: flex; flex-wrap: wrap; gap: .75rem; align-items: baseline; }

/* Searchable pickers and chips */
.combo { position: relative; }
.combo input { width: 100%; }
.combo-list { position: absolute; inset-inline: 0; z-index: 20; max-height: 16rem; overflow-y: auto; margin: .25rem 0 0; padding: .25rem 0; list-style: none; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.combo-list [role=option] { padding: .45rem .75rem; cursor: pointer; }
.combo-list [role=option][aria-selected=true], .combo-list [role=option]:hover { background: var(--teal-soft); color: var(--teal-dark); }
.combo-none { padding: .45rem .75rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--teal); background: var(--teal-soft); color: var(--teal-dark); font: inherit; font-size: .9rem; cursor: pointer; }
.chip:hover { background: var(--card); }
.chip-search { width: 100%; }

/* Quick add dialogs */
.quick-dialog { width: min(36rem, calc(100vw - 2rem)); border: 0; border-radius: var(--radius); padding: 1.25rem; box-shadow: 0 20px 60px rgba(22, 61, 112, .25); background: var(--card); color: var(--ink); }
.quick-dialog::backdrop { background: rgba(22, 37, 56, .45); }
.page-actions-row { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

/* Inline grid editing */
.cell-edit { display: inline-flex; align-items: center; gap: .35rem; }
.cell-btn { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; opacity: .55; }
.cell-btn:hover, .cell-btn:focus-visible, tr:hover .cell-btn { opacity: 1; border-color: var(--border); color: var(--teal-dark); }
.cell-field { min-width: 7rem; padding: .3rem .4rem; }

/* Organisation and ownership */
.org-badge { display: inline-flex; align-items: center; gap: .4rem; max-width: 22rem; min-width: 0; }
.org-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-role-super_admin { background: #ffd48a; color: #3d2a00; }
.badge-role-org_admin { background: #dfe9fb; color: #163d70; }
.badge-role-editor { background: #e3f3ec; color: #1f6b43; }
.badge-role-contributor { background: #efe8fa; color: #4d3680; }
.badge-role-viewer { background: #eceff3; color: #3b4652; }
.org-switch select { max-width: 14rem; padding: .3rem .5rem; border-radius: 8px; }
.owner-chip { margin: 0 0 .75rem; }
.owner-chip .chip { cursor: default; }
.copy-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.copy-row input { flex: 1 1 20rem; min-width: 0; }
.link-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-block-start: 1rem; }
.login-help { margin: 1rem 0 0; text-align: center; }

@media (max-width: 760px) {
  /* Organisation and role stay visible in the sidebar's user card; the switcher is a desktop tool. */
  .topbar .org-badge, .topbar form.org-switch, .topbar .welcome { display: none; }
}
.login-logo { display: flex; justify-content: center; padding: 0.5rem 1.5rem 1.5rem; }
.login-logo .step-logo { max-width: 300px; }
.user-card .muted { display: block; }
