/* Components used by the owner and recipient pages. */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: 44px; min-width: 240px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); display: flex; flex-direction: column; z-index: 10; }
.menu-head { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--divider); margin-bottom: 6px; }
.menu-section { padding: 6px 12px 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.menu-item { min-height: 44px; padding: 0 12px; border: none; background: transparent; text-align: left; font: inherit; font-size: 14px; color: var(--text); border-radius: var(--radius-s); cursor: pointer; width: 100%; }
.menu-item:hover { background: var(--raised); }
a.menu-item { display: flex; align-items: center; text-decoration: none; }
.nav-org { color: var(--muted); }

.search .input { width: 360px; max-width: 100%; height: 48px; }
.chips { display: flex; gap: 12px; flex-wrap: wrap; }
.chip { min-height: 56px; padding: 0 16px 0 8px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; }
.chip:hover { border-color: var(--muted); color: var(--text); }
.app-icon.small { width: 40px; height: 40px; font-size: 16px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.app-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.app-name { font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; }
.app-name:hover { color: var(--link); }
.app-desc { font-size: 14px; line-height: 1.45; color: var(--text-2); }

.app-row { display: flex; align-items: center; gap: 20px; }
.app-row .app-name { font-size: 16px; }
.app-audience { width: 190px; flex-shrink: 0; font-size: 14px; color: var(--text-2); }

.dropzone { padding: 20px 24px; border: 2px dashed var(--dashed); border-radius: var(--radius-l); background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dropzone.over { border-color: var(--action); background: var(--tint); }
.drop-icon { width: 48px; height: 48px; border-radius: var(--radius-m); background: var(--tint); color: var(--link); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fields-2 { display: flex; gap: 20px; }
.fields-2 > * { flex: 1 1 0; min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; }
.readonly.mono { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 6px; border-radius: 9999px; background: var(--raised); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--action); width: 0; transition: width .2s; }

.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 12px 2px; border-bottom: 2px solid transparent; font-size: 15px; color: var(--muted); text-decoration: none; }
.tabs a[aria-current="page"] { border-bottom-color: var(--action); color: var(--text); font-weight: 600; }
.two-col { display: flex; gap: 24px; align-items: flex-start; }
.side { width: 400px; flex-shrink: 0; }
.version-row { padding: 16px 20px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--divider); }
.version-row:last-child { border-bottom: none; }
.version-num { width: 96px; flex-shrink: 0; font-size: 15px; font-weight: 600; }
.facts { display: flex; flex-direction: column; }
.fact { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.fact:last-child { border-bottom: none; }
.fact-value { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-weight: 500; color: var(--text); }

@media (max-width: 1079px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { flex-direction: column; align-items: stretch; }
  .two-col > .grow { width: 100%; }
  .side { width: 100%; }
  .app-audience { display: none; }
}
@media (max-width: 719px) {
  .cards { grid-template-columns: 1fr; }
  .fields-2 { flex-direction: column; }
  .app-row { flex-wrap: wrap; }
  .search .input { width: 100%; }
  .dropzone { flex-direction: column; align-items: flex-start; }
  .version-row { flex-wrap: wrap; }
}

/* Share dialog, request access and the decision page */
.dialog { border: none; border-radius: var(--radius-l); padding: 0; background: var(--surface); color: var(--text); width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.dialog::backdrop { background: var(--overlay); }
.dialog-card { padding: 0; }
.dialog-body { padding: 28px; }
.dialog-title { font-size: 26px; letter-spacing: -0.02em; }
.icon-btn { width: 44px; height: 44px; border: none; border-radius: var(--radius-s); background: transparent; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.share-row { min-height: 56px; display: flex; align-items: center; gap: 12px; }
.share-row.pending { flex-wrap: wrap; padding: 8px 0; }
.share-row.pending > form { flex-basis: 100%; justify-content: flex-end; }
.share-row .avatar { flex-shrink: 0; }
.share-row .small, .suggestion .small, .picker-item .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row > .menu, .share-row > form, .suggestion > .btn, .suggestion > .small { flex-shrink: 0; }
.picker-item > .grow { min-width: 0; }
.picker-item > .grow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-item > .grow { flex: 1 1 60%; }
.picker-item > .muted:last-child { flex: 0 1 auto; max-width: 40%; text-align: right; white-space: normal; font-size: 12px; }
.avatar.group { background: var(--tint); color: var(--link); }
.avatar.large { width: 52px; height: 52px; font-size: 16px; }
.app-icon.large { width: 56px; height: 56px; font-size: 24px; }
.menu-btn { min-height: 44px; padding: 0 12px; border-color: var(--border); font-size: 14px; font-weight: 400; gap: 8px; }
.menu-item[aria-current="true"] { font-weight: 600; }
.audience-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-l); }
.deputy-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--tint); color: var(--tint-text); }
.deputy-card .muted { color: var(--tint-text); opacity: .85; }
.suggestions { border: 1px solid var(--border); border-radius: var(--radius-m); padding: 8px 12px; }
.suggestion { min-height: 56px; display: flex; align-items: center; gap: 12px; }
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: 52px; z-index: 20; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); display: flex; flex-direction: column; }
.picker-item { min-height: 48px; padding: 4px 10px; border: none; border-radius: var(--radius-s); background: transparent; text-align: left; font: inherit; color: var(--text); display: flex; align-items: center; gap: 10px; cursor: pointer; width: 100%; }
.picker-item:hover, .picker-item[aria-selected="true"] { background: var(--raised); }
.picker-item .muted { font-size: 13px; }
.share-link { min-height: 44px; flex: 1 1 200px; font-size: 13px; }
.pb-6 { padding-bottom: 6px; } .pt-8 { padding-top: 8px; }
.fs-17 { font-size: 17px; } .fs-19 { font-size: 19px; } .fs-24 { font-size: 24px; line-height: 1.25; } .fs-30 { font-size: 30px; }
.request-card { max-width: 500px; width: 100%; padding: 36px; border-radius: var(--radius-l); }
.request-banner { padding: 18px 24px; display: flex; align-items: center; gap: 18px; }
.quote { padding: 14px 16px; border-radius: var(--radius-m); background: var(--raised); color: var(--text-2); font-size: 15px; line-height: 1.5; }
.readonly-btn { cursor: default; }
.note-details summary { cursor: pointer; list-style: none; }
.note-details summary::-webkit-details-marker { display: none; }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--link); }
@media (max-width: 719px) {
  .dialog-body, .request-card { padding: 20px; }
  .request-banner { flex-wrap: wrap; }
  .dialog-title { font-size: 22px; }
}

.mail-body { margin: 0; padding: 12px 14px; border-radius: var(--radius-m); background: var(--raised); font: 13px/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }

/* Admin: navigation badge, setup wizard, tiles, tables, reviews, policy */
.count-badge { margin-left: 6px; padding: 1px 7px; border-radius: 9999px; background: var(--review-bg); font-size: 12px; font-weight: 600; color: var(--review-text); }
.page.wide { max-width: 1280px; padding: 28px 40px; }
.btn-wide { padding: 0 28px; min-height: 48px; }
.input-sm { min-height: 44px; width: 260px; max-width: 100%; }
.select { padding-right: 32px; width: auto; }
.setup { display: flex; min-height: calc(100vh - var(--nav-h)); }
.setup-rail { width: 320px; flex-shrink: 0; padding: 40px 32px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 28px; }
.setup-step { display: flex; gap: 14px; color: var(--muted); }
.setup-step.current, .setup-step.done { color: var(--text); }
.step-dot { width: 28px; height: 28px; flex-shrink: 0; border-radius: 9999px; border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.setup-step.current .step-dot { border-color: var(--action); color: var(--tint-text); }
.setup-step.done .step-dot { border-color: var(--action); background: var(--action); color: var(--on-action); }
.setup-main { flex-grow: 1; min-width: 0; padding: 40px 56px; max-width: 960px; }
.setup-main h1 { font-size: 36px; }
.preset-cards, .columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.preset-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.preset-card.selected { padding: 19px; border: 2px solid var(--action); }
.preset-card:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.column { padding: 20px; border-radius: var(--radius-m); display: flex; flex-direction: column; gap: 10px; line-height: 1.6; }
.column-0 { background: var(--tint); color: var(--tint-text); }
.column-1 { background: var(--review-bg); color: var(--review-text); }
.column-2 { background: var(--neutral-bg); color: var(--neutral-text); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--divider); cursor: pointer; }
.toggle-row:last-child { border-bottom: none; }
.switch { appearance: none; width: 44px; height: 26px; flex-shrink: 0; border-radius: 9999px; background: var(--border-strong); position: relative; cursor: pointer; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 9999px; background: #FFFFFF; transition: left .15s; }
.switch:checked { background: var(--action); }
.switch:checked::after { left: 21px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.tile-n { font-family: var(--font-heading); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 9999px; background: var(--surface); display: inline-flex; align-items: center; font-size: 14px; color: var(--text-2); text-decoration: none; }
.chip-btn.on { border-color: var(--tint-text); background: var(--tint); color: var(--tint-text); font-weight: 600; }
.table { overflow-x: auto; }
.thead, .trow { padding: 12px 20px; display: flex; align-items: center; gap: 0; min-width: 1100px; }
.thead { border-bottom: 1px solid var(--border); background: var(--raised); border-radius: var(--radius-m) var(--radius-m) 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.trow { border-bottom: 1px solid var(--divider); font-size: 14px; }
.trow:last-child { border-bottom: none; }
.thead > *, .trow > * { flex-shrink: 0; padding-right: 16px; }
.col-app { width: 250px; } .col-owner { width: 200px; } .col-type { width: 120px; } .col-status { width: 210px; align-items: flex-start; } .col-who { width: 180px; } .col-conn { width: 150px; } .col-used { width: 90px; } .col-menu { width: 48px; padding-right: 0; }
.audit .thead, .audit .trow { min-width: 1160px; }
.col-when { width: 130px; } .col-whoc { width: 150px; } .col-what { width: 260px; } .col-appc { width: 180px; } .col-detail { width: 440px; }
.people .thead, .people .trow { min-width: 900px; }
.col-person { width: 320px; } .col-dept { width: 180px; } .col-state { width: 240px; } .col-actions { width: 260px; padding-right: 0; }
.menu-wide { min-width: 300px; }
.pad-8 { padding: 8px; }
.reviews { display: flex; min-height: calc(100vh - var(--nav-h)); }
.phone-only { display: none; }
.review-queue { width: 360px; flex-shrink: 0; padding: 28px 24px; border-right: 1px solid var(--border); }
.queue-item { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.queue-item.selected { padding: 15px; border: 2px solid var(--action); }
.queue-item:hover { border-color: var(--muted); color: var(--text); }
.review-detail { flex-grow: 1; min-width: 0; padding: 28px 40px; }
.reason { padding: 16px 20px; border-radius: var(--radius-m); background: var(--tint); color: var(--tint-text); font-size: 14px; line-height: 1.5; }
.diff-row { padding: 14px 18px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--divider); }
.diff-row:last-child { border-bottom: none; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--divider); }
.pb-4 { padding-bottom: 4px; }
.fs-26 { font-size: 26px; letter-spacing: -0.02em; } .fs-30 { font-size: 30px; }
.rule-row { padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--divider); }
.rule-row:last-child { border-bottom: none; }
.segmented { flex-shrink: 0; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--raised); }
.seg { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { height: 44px; width: 76px; border-radius: var(--radius-s); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: var(--muted); }
.seg input:checked + span { font-weight: 600; }
.seg-allow input:checked + span { background: var(--good-bg); color: var(--good-text); }
.seg-review input:checked + span { background: var(--review-bg); color: var(--review-text); }
.seg-block input:checked + span { background: var(--attention-bg); color: var(--attention-text); }
.seg input:disabled + span { opacity: .5; }
.seg input:focus-visible + span { outline: 2px solid var(--focus); }
.impact { padding: 16px 20px; border-radius: var(--radius-m); background: var(--tint); color: var(--tint-text); }
@media (max-width: 1079px) {
  .setup, .reviews { flex-direction: column; }
  .setup-rail, .review-queue { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 20px; }
  .setup-main, .review-detail { padding: 24px 20px; }
  .reviews.single .review-queue { display: none; }
  .reviews:not(.single) .review-detail { display: none; }
  .phone-only { display: inline-flex; }
  .preset-cards, .columns, .tiles { grid-template-columns: 1fr; }
  .two-up { grid-template-columns: 1fr; }
  .page.wide { padding: 20px; }
}
@media (max-width: 719px) {
  .setup-main h1 { font-size: 26px; }
  .rule-row { flex-direction: column; align-items: stretch; }
  .segmented { justify-content: stretch; }
  .seg { flex: 1 1 0; } .seg span { width: 100%; }
  .input-sm { width: 100%; }
}

/* Integrations (admin): a secret shown once, and the read-only "From ServiceNow" list */
.secret-value { display: block; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface); font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.integration h2, .card h2.fs-19 { margin: 0; }
dl, dd { margin: 0; }
.delivery { padding: 8px 0; border-bottom: 1px solid var(--divider); }
.delivery:last-child { border-bottom: none; }
