/* App additions on top of kit.css: sign-in, shared controls, the admin workspace. */
body { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
.top { padding-top: calc(.55rem + env(safe-area-inset-top)); }
.loading { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.center { text-align: center; }
.bad-text, .form-msg.bad { color: var(--bad); font-weight: 600; }
.form-msg { min-height: 1.2em; margin: .6rem 0 0; }
.btn.wide { width: 100%; margin-top: .5rem; }
.btn.icon { width: 40px; min-height: 40px; padding: 0; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost.danger, .btn.quiet.danger { color: var(--bad); background: transparent; border-color: transparent; }
.btn.ghost.danger { border-color: var(--line-2); }
.btn.quiet.danger:hover { background: var(--bad-bg); }
.btn.off { opacity: .3; pointer-events: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
kbd { font: .78rem var(--mono); background: var(--wash-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-btn { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; display: inline-flex; }
.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 6px; z-index: 100; width: min(92vw, 440px); }
.has-tabbar .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
.toast { background: #1d1f21; color: #fff; padding: .75rem 1rem; border-radius: 12px; box-shadow: var(--shadow-2); transition: opacity .4s, transform .4s; animation: pop .25s ease-out; font-weight: 500; }
.toast.bad { background: #b3261e; }
.toast.good { background: #1d7a43; }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.offline-bar { background: var(--warn-bg); color: var(--warn); }
.draft-banner { background: var(--info); color: #fff; }
.join-code { font: 800 2rem/1.1 var(--mono); letter-spacing: .1em; margin: .2rem 0; }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: .65rem .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
table.list tr:last-child td { border-bottom: 0; }
table.list select { font: inherit; min-height: 40px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); padding: 0 .4rem; }
.induct td input[type=text], .induct td input[type=date] { width: 100%; min-height: 40px; font: inherit; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 .4rem; background: var(--paper); color: var(--ink); }
.induct td input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--brand); }
.check-row { display: flex; gap: .5rem; align-items: center; font-size: .9rem; color: var(--ink-2); }
.check-row input { width: 20px; height: 20px; accent-color: var(--brand); }

/* Sign in ----------------------------------------------------------------------------- */
.welcome { text-align: center; padding: 2rem 0 .5rem; }
.welcome h1 { font-size: 2rem; margin-top: 1rem; }
.seg { display: flex; gap: 4px; margin: 1.2rem auto 0; max-width: 440px; background: var(--wash-2); padding: 4px; border-radius: 999px; }
.seg button { flex: 1; min-height: 42px; border: 0; background: transparent; color: var(--ink-2); border-radius: 999px; font: inherit; font-weight: 650; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.signin { max-width: 440px; margin: 1rem auto; padding: 1.3rem 1.3rem 1.1rem; }
.signin h2 { margin-top: 0; }
.signin-wrap { display: grid; gap: 2rem; align-items: center; min-height: 70vh; max-width: 980px; margin: 0 auto; }
.signin-art h1 { font-size: 2.2rem; margin: 1.2rem 0 .6rem; max-width: 18ch; }
@media (min-width: 860px) { .signin-wrap { grid-template-columns: 1.1fr 1fr; } }

/* Staff app extras -------------------------------------------------------------------- */
.me-card { display: flex; gap: 1rem; align-items: center; margin: 1.2rem 0; }
.me-card h1 { margin: 0; }
.me-card p { margin: 0; }
.menu-list { list-style: none; margin: 0 0 1rem; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
.menu-list li + li { border-top: 1px solid var(--line); }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; color: var(--ink); text-decoration: none; width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.menu-list .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.menu-list .txt { flex: 1; display: flex; flex-direction: column; }
.menu-list .ic:last-child { color: var(--muted); }
.station-list .thumb { font-weight: 800; color: var(--brand); background: var(--brand-soft); }
.station-list > li > a > .ic:last-child { color: var(--muted); }
html.preview .top { position: static; }
html.preview body { font-size: 15px; }

/* Shared form controls ---------------------------------------------------------------- */
.frow { margin: .9rem 0; border-radius: 10px; transition: background .4s; }
.frow:first-child { margin-top: .2rem; }
.flabel { display: block; font-weight: 650; margin-bottom: 5px; font-size: .93rem; }
.req { color: var(--bad); }
.fhelp { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin: -2px 0 6px; line-height: 1.4; }
.switch .fhelp { margin: 0; }
.ferr { color: var(--bad); font-size: .84rem; font-weight: 600; margin-top: 5px; display: flex; gap: .3rem; align-items: center; }
.fwarn { color: var(--warn); font-size: .84rem; margin-top: 5px; }
.frow input[type=text], .frow input[type=number], .frow select, .frow textarea, .rowlist input, .rowlist select, .quick-add, .ghost-row, .newname, .id-edit, .palette input, .notes-ta, input[type=search] {
  font: inherit; width: 100%; min-height: 42px; padding: .45rem .7rem; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.frow textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.frow input:focus, .frow select:focus, .frow textarea:focus, .rowlist input:focus, .rowlist select:focus, .quick-add:focus, .ghost-row:focus, .newname:focus, .id-edit:focus, .notes-ta:focus, input[type=search]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.frow.has-err > input, .frow.has-err > select, .frow.has-err > textarea, .frow.has-err > .refpick select { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 15%, transparent); }
.frow.flash, .card-item.flash, .rl.flash { background: var(--warn-bg); box-shadow: 0 0 0 8px var(--warn-bg); }
.swatch { width: 46px; height: 42px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--paper); flex: none; cursor: pointer; }
.switch { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; font-weight: 600; margin: .8rem 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: var(--line-2); flex: none; position: relative; transition: background .15s; margin-top: 1px; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .15s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track .knob { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 2px; }
.switch > span:last-child { display: flex; flex-direction: column; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 3px; background: var(--wash-2); padding: 3px; border-radius: 12px; max-width: 100%; }
.segmented button { border: 0; background: transparent; padding: .45rem .85rem; border-radius: 9px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink-2); cursor: pointer; min-height: 36px; display: inline-flex; gap: .35rem; align-items: center; }
.segmented button[aria-checked="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.segmented[data-type="low medium high"] button[data-v="medium"][aria-checked="true"] { background: var(--warn-bg); color: var(--warn); }
.segmented[data-type="low medium high"] button[data-v="high"][aria-checked="true"] { background: var(--bad-bg); color: var(--bad); }
.segmented[data-type="low medium high"] button[data-v="low"][aria-checked="true"] { background: var(--good-bg); color: var(--good); }
.segmented.big { margin: .4rem 0 .6rem; }
.segmented.big button { padding: .55rem 1.1rem; font-size: .95rem; }
.segmented .count { font-size: .75rem; background: var(--wash-2); border-radius: 99px; padding: 0 .45rem; color: var(--muted); }
.refs { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .9rem; background: var(--paper); color: var(--ink); cursor: pointer; min-height: 34px; }
.chip:hover { border-color: var(--brand-line); }
.chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 650; }
.chip.missing { border-color: var(--bad); color: var(--bad); }
.chip.add { border-style: dashed; color: var(--brand); }
.refs .row { flex: 1 1 220px; }
.refpick select { width: 100%; }
.img-field { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.dropzone { width: 200px; aspect-ratio: 8/5; border: 2px dashed var(--line-2); border-radius: 12px; background: var(--wash); display: grid; place-items: center; cursor: pointer; padding: 0; overflow: hidden; color: var(--muted); font: inherit; flex: none; position: relative; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.dropzone.busy { opacity: .6; }
.dropzone img { width: 100%; height: 100%; object-fit: cover; }
.dropzone .ph { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .85rem; font-weight: 600; }
.dropzone .ph small { font-weight: 400; }
.img-side { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ibtn { flex: none; width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; }
.ibtn:hover { color: var(--ink); background: var(--wash-2); }
.ibtn.del:hover { color: var(--bad); background: var(--bad-bg); }
.ibtn[disabled] { opacity: .3; cursor: default; }
.addbtn { display: inline-flex; gap: .3rem; align-items: center; background: none; border: 1px dashed var(--line-2); border-radius: 10px; padding: .5rem .9rem; font: inherit; color: var(--brand); cursor: pointer; font-weight: 650; }
.addbtn:hover { border-color: var(--brand); background: var(--brand-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid2 > .frow { margin: .9rem 0; }
.fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.fs > legend { font-weight: 750; font-size: 1.02rem; padding: 0; margin-bottom: .3rem; }
.fs .fs { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .8rem; }

/* Step lists */
.strs { display: grid; gap: 4px; }
.strs .sr { display: flex; gap: 4px; align-items: flex-start; border-radius: 10px; }
.strs .sr .n { width: 1.7rem; height: 1.7rem; margin-top: 7px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: .78rem; font-weight: 800; display: grid; place-items: center; flex: none; }
.strs .sr.ghost .n { background: transparent; color: var(--muted); border: 1px dashed var(--line-2); }
.strs textarea { flex: 1; min-height: 40px !important; resize: none; overflow: hidden; padding: .5rem .7rem; line-height: 1.4; border: 1px solid transparent !important; background: var(--wash) !important; border-radius: 9px; font: inherit; color: var(--ink); }
.strs textarea:hover { border-color: var(--line-2) !important; }
.strs textarea:focus { background: var(--paper) !important; border-color: var(--brand) !important; outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.strs .sr.ghost textarea { background: transparent !important; border: 1px dashed var(--line-2) !important; }
.strs .sr.over textarea { background: var(--warn-bg) !important; }
.strs .sr .del { opacity: 0; margin-top: 3px; }
.strs .sr:hover .del, .strs .sr:focus-within .del { opacity: 1; }
.grip { width: 18px; flex: none; color: var(--line-2); cursor: grab; display: grid; place-items: center; height: 40px; }
.grip:hover { color: var(--muted); }
.sr.drop, .rl.drop, .nav-item.drop { box-shadow: 0 -3px 0 var(--brand); }
.sr.dragging, .nav-item.dragging { opacity: .4; }
.frow.has-err > .strs { box-shadow: 0 0 0 2px var(--bad); border-radius: 10px; padding: 4px; }

/* Compact rows (checklists, fixes, areas) */
.rowlist .rows { display: grid; gap: 6px; }
.rl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 6px 6px 2px; border-radius: 12px; border: 1px solid transparent; }
.rl:hover, .rl:focus-within { background: var(--wash); }
.rl .cell { flex: 1 1 120px; min-width: 0; }
.rl .c-task, .rl .c-problem, .rl .c-action, .rl .c-name { flex: 3 1 240px; }
.rl .c-station { flex: 1.3 1 170px; }
.rl input, .rl select { min-height: 40px !important; padding: .35rem .6rem !important; }
.rl .cell.bad input, .rl .cell.bad select { border-color: var(--bad); }
.rl-sub { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 24px; }
.rl-sub .cell { flex: 1 1 110px; }
.rl-sub .c-note { flex: 2 1 160px; }
.rl-sub input { min-height: 32px !important; font-size: .86rem !important; border-color: transparent !important; background: transparent !important; padding: .2rem .55rem !important; color: var(--ink-2) !important; }
.rl:hover .rl-sub input, .rl:focus-within .rl-sub input { border-color: var(--line-2) !important; background: var(--paper) !important; }
.rl-sub input:focus { border-color: var(--brand) !important; }
.rl-act { display: flex; flex: none; opacity: .35; }
.rl:hover .rl-act, .rl:focus-within .rl-act { opacity: 1; }
.rl-err { flex-basis: 100%; color: var(--bad); font-size: .82rem; font-weight: 600; padding-left: 26px; display: flex; gap: .3rem; align-items: center; }
.ghost-wrap, .quick-wrap { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); padding-left: 4px; }
.ghost-row, .quick-add { border-style: dashed !important; background: transparent !important; }
.quick-wrap { margin: .4rem 0 1rem; padding: 0; }
.quick-add { min-height: 48px !important; font-size: 1rem !important; }
.card-item { border: 1px solid var(--line); border-radius: 12px; padding: .2rem .9rem .6rem; margin: .5rem 0; }
.ci-head { display: flex; align-items: center; gap: 4px; padding-top: .4rem; }
.ci-head b { flex: 1; }
.idline { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: 6px; font-size: .82rem; color: var(--muted); }
.idline code { background: var(--wash-2); padding: .05rem .4rem; border-radius: 5px; color: var(--ink-2); }
.idline .fhelp { margin: 0; }
.idline .id-edit { width: 16rem; min-height: 32px; padding: .2rem .5rem; font: .85rem var(--mono); }
.newname { min-height: 38px !important; }

/* Dialogs */
dialog.modal { border: 0; border-radius: 20px; width: min(94vw, 600px); padding: 1.2rem 1.4rem 1.4rem; box-shadow: var(--shadow-2); max-height: 92vh; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; }
.swatches { display: flex; gap: 8px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.nv-extra { margin: .6rem 0; }
.palette { padding: 0 !important; width: min(94vw, 560px); margin-top: 12vh; }
.pal-in { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette input { border: 0 !important; box-shadow: none !important; font-size: 1.05rem; padding: .3rem 0; }
.palette input:focus { outline: none; }
.pal-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.pal-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .8rem; border-radius: 10px; cursor: pointer; }
.pal-list li[aria-selected="true"] { background: var(--brand-soft); }
.pal-list small { color: var(--muted); }

/* Admin shell -------------------------------------------------------------------------- */
body.admin main { max-width: 1180px; }
body.admin main.wide { max-width: none; padding: 0; }
.topnav { display: flex; gap: 2px; margin-left: .8rem; }
.topnav a { color: var(--ink-2); text-decoration: none; padding: .45rem .8rem; border-radius: 9px; font-weight: 600; font-size: .93rem; }
.topnav a:hover { background: var(--wash-2); }
.topnav a[aria-current="page"] { background: var(--wash-2); color: var(--ink); }
.btn.quiet.icon { position: relative; }
.bell-n { position: absolute; top: 2px; right: 2px; background: var(--bad); color: #fff; font-size: .65rem; font-weight: 800; min-width: 17px; height: 17px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); min-width: 250px; padding: 6px; z-index: 40; }
.menu-who { padding: .5rem .7rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.menu-pop a, .menu-pop button { display: flex; gap: .6rem; align-items: center; padding: .55rem .7rem; border-radius: 9px; color: var(--ink); text-decoration: none; width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--wash); }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.admin-head h1 { margin: 0 0 .2rem; font-size: 2rem; }
.admin-head .lead { margin: 0; }
.blk { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.25rem; margin: 0 0 14px; box-shadow: var(--shadow-1); }
.blk.flush { padding: .6rem .6rem .4rem; }
.card-h { font-size: 1.02rem; margin: 0 0 .7rem; display: flex; gap: .45rem; align-items: center; }
.blk .cat { margin: .2rem .6rem .4rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.empty { text-align: center; padding: 3rem 1rem; border: 2px dashed var(--line-2); border-radius: 18px; color: var(--muted); }
.empty.small { padding: 1.5rem 1rem; }
.empty h2 { color: var(--ink); margin: .6rem 0 .3rem; }
.empty-ic { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); }

/* Venue list */
.venue-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.venue-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .75rem; box-shadow: var(--shadow-1); transition: transform .12s, box-shadow .12s, border-color .12s; }
.venue-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--brand-line); }
.venue-card.add { border: 2px dashed var(--line-2); background: transparent; box-shadow: none; align-items: center; justify-content: center; color: var(--muted); font: inherit; cursor: pointer; min-height: 200px; gap: .3rem; }
.venue-card.add b { color: var(--ink); }
.vc-top { display: flex; gap: .7rem; align-items: center; }
.vc-mark { width: 44px; height: 44px; border-radius: 13px; color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.vc-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vc-name b { font-size: 1.05rem; }
.vc-ready small { display: block; margin-top: .3rem; }
.vc-stats { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); }
.vc-stats span { display: inline-flex; gap: .3rem; align-items: center; }

/* Editor -------------------------------------------------------------------------------- */
.ed-head { position: sticky; top: 57px; z-index: 15; background: color-mix(in srgb, var(--wash) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: .5rem; padding: .6rem 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ed-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ed-title { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.save-state { font-size: .78rem; color: var(--good); font-weight: 600; display: inline-flex; gap: .3rem; align-items: center; }
.save-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.save-state.busy { color: var(--muted); }
.save-state.bad { color: var(--bad); }
.tool-group { display: inline-flex; gap: 2px; }
.side-toggle button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.issues-btn { border: 0; border-radius: 99px; padding: .4rem .8rem; font: inherit; font-size: .85rem; font-weight: 650; display: inline-flex; gap: .35rem; align-items: center; cursor: pointer; min-height: 36px; }
.issues-btn.bad { background: var(--bad-bg); color: var(--bad); }
.issues-btn.ok { background: var(--good-bg); color: var(--good); }
.issues-btn small { color: inherit; opacity: .8; }
.issues-pop { position: fixed; right: 16px; top: 120px; width: min(460px, 92vw); max-height: 70vh; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); padding: .9rem 1rem; z-index: 30; }
.issue-list { margin: .4rem 0 .8rem; padding-left: 1.1rem; font-size: .9rem; }
.issue-list li { margin: .35rem 0; }
.issue-list li.bad::marker { color: var(--bad); }
.issue-list li.warn { color: var(--ink-2); }
.issue-list li.warn::marker { color: var(--warn); }
.ed-tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--wash); }
.ed-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem .9rem; color: var(--muted); text-decoration: none; font-weight: 650; font-size: .93rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ed-tabs a[aria-selected="true"] { color: var(--ink); border-color: var(--brand); }
.ed-body { display: grid; grid-template-columns: 250px minmax(0, 1fr) 420px; gap: 0; align-items: start; }
.ed-body.no-side { grid-template-columns: 250px minmax(0, 1fr); }
.ed-body.single { display: block; max-width: 1100px; margin: 0 auto; padding: 1.2rem 16px; }
.ed-nav { position: sticky; top: 160px; max-height: calc(100vh - 170px); overflow: auto; padding: 1rem .6rem 2rem 1rem; display: flex; flex-direction: column; gap: 1px; }
.nav-ready { padding: .2rem .6rem .9rem; }
.nav-ready .row { gap: .35rem; align-items: baseline; margin-bottom: .35rem; }
.nav-ready b { font-size: 1.15rem; }
.nav-sec { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .93rem; }
.nav-sec:hover { background: var(--wash-2); color: var(--ink); }
.nav-sec[aria-current] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.nav-sec[aria-current] .ic { color: var(--brand); }
.nav-sec .l, .nav-item .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { font-size: .75rem; color: var(--muted); font-weight: 600; }
.dot.bad { background: var(--bad); color: #fff; font-size: .68rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 99px; display: inline-grid; place-items: center; padding: 0 5px; }
.nav-items { margin: 2px 0 6px 18px; padding-left: 10px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .88rem; cursor: pointer; }
.nav-item:hover { background: var(--wash-2); }
.nav-item[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.nav-item img, .nav-item .thumb { width: 26px; height: 20px; border-radius: 4px; object-fit: cover; flex: none; background: var(--wash-2); display: grid; place-items: center; color: var(--muted); }
.nav-add { display: flex; align-items: center; gap: .4rem; padding: .35rem .5rem; border: 0; background: none; font: inherit; font-size: .86rem; color: var(--brand); cursor: pointer; font-weight: 650; border-radius: 8px; }
.nav-add:hover { background: var(--brand-soft); }
.ed-work { padding: 1.2rem 1.4rem 5rem; min-width: 0; max-width: 900px; width: 100%; justify-self: center; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: .2rem 0 1rem; flex-wrap: wrap; }
.sec-head h1 { margin: 0 0 .2rem; }
.sec-head .lead { margin: 0; font-size: .95rem; max-width: 60ch; }
.item-head { margin: 0 0 1rem; }
.crumb-link { display: inline-flex; gap: .25rem; align-items: center; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .88rem; }
.crumb-link:hover { color: var(--ink); }
.item-head-row { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.item-title { margin: .3rem 0 0; }
.ready-card .ready-top { display: flex; gap: 1.2rem; align-items: center; margin-bottom: .6rem; }
.ready-card h2 { margin: 0 0 .2rem; }
.ready-card p { margin: 0; }
.ring.big { width: 84px; height: 84px; }
.ring.big b { width: 68px; height: 68px; font-size: 1.15rem; }
.ready-list { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: 2px; }
.ready-list li { display: flex; gap: .8rem; align-items: center; padding: .45rem .3rem; border-radius: 10px; }
.ready-list li:hover { background: var(--wash); }
.ready-list a { color: inherit; text-decoration: none; display: flex; flex-direction: column; flex: 1; }
.ready-list .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.ready-list li.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.ready-list li.done b { color: var(--muted); font-weight: 600; }
.blk.tip { background: var(--brand-soft); border-color: transparent; }
.blk.tip ol { margin: 0; padding-left: 1.2rem; }
.blk.tip li { margin: .3rem 0; }
.gal { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gal-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow-1); transition: transform .12s, box-shadow .12s; display: flex; flex-direction: column; }
.gal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.gal-card img, .gal-ph { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--wash-2); display: grid; place-items: center; color: var(--muted); }
.gal-body { padding: .7rem .9rem .9rem; display: flex; flex-direction: column; gap: .3rem; }
.gal-body small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.skill-rows { list-style: none; padding: 0; margin: 0; }
.skill-rows a { display: flex; align-items: center; gap: .5rem; padding: .55rem .6rem; border-radius: 10px; color: inherit; text-decoration: none; }
.skill-rows a:hover { background: var(--wash); }
.skill-rows .l { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.skill-rows .ic { color: var(--muted); }
.ed-tl .ed-shift { display: block; color: inherit; text-decoration: none; }
.ed-tl .ed-shift:hover { border-color: var(--brand-line); }
.ed-side { position: sticky; top: 160px; height: calc(100vh - 170px); padding: 1rem 1rem 1rem .4rem; display: flex; flex-direction: column; gap: .6rem; }
.side-head { display: flex; justify-content: space-between; align-items: center; }
.phone { position: relative; flex: 1; min-height: 0; max-height: 820px; width: 100%; max-width: 390px; margin: 0 auto; border-radius: 40px; padding: 34px 10px 12px; background: #16181a; box-shadow: var(--shadow-2), inset 0 0 0 2px #2c2f33; }
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; border-radius: 99px; background: #000; z-index: 2; }
.pv-frame { width: 100%; height: 100%; border: 0; border-radius: 6px 6px 30px 30px; background: var(--wash); display: block; }
.notes-ta { flex: 1; min-height: 240px !important; resize: none; font-size: .92rem !important; line-height: 1.55; }
.notes-act { display: flex; justify-content: flex-end; }
.notes-act .btn { white-space: normal; text-align: left; line-height: 1.25; padding: .4rem .9rem; }

/* Team, people, activity, reports */
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.team-grid .blk { margin: 0; }
.span2 { grid-column: 1 / -1; }
.member-list { list-style: none; padding: 0; margin: 0 0 .6rem; }
.member-list li { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.member-list .who, .who-cell div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.who-cell { display: flex; align-items: center; gap: .6rem; }
.people-table tr.blocked td { opacity: .6; }
.people-table td.act { text-align: right; }
.feed { list-style: none; padding: 0; margin: .8rem 0; }
.feed li { display: flex; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.feed li > div { display: flex; flex-direction: column; }
.feed .d { color: var(--ink-2); }
.reports { display: grid; gap: 10px; }
details.report { padding: 0; }
details.report > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: center; padding: .9rem 1.1rem; }
details.report > summary::-webkit-details-marker { display: none; }
details.report.unseen > summary b::after { content: " •"; color: var(--bad); }
.r-first { flex-basis: 100%; color: var(--ink-2); font-size: .92rem; }
.r-body { padding: 0 1.1rem 1rem; border-top: 1px solid var(--line); }
.errs { background: var(--wash); padding: .6rem; border-radius: 8px; font-size: .8rem; white-space: pre-wrap; overflow: auto; }
.field.inline { flex-direction: row; align-items: center; gap: .5rem; }
.field.inline select { width: auto; min-height: 38px; }

@media (max-width: 1150px) {
  .ed-body { grid-template-columns: 220px minmax(0, 1fr); }
  .ed-side { position: fixed; right: 10px; top: 130px; bottom: 10px; height: auto; width: min(400px, 92vw); background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-2); z-index: 25; padding: .8rem; }
}
@media (max-width: 760px) {
  .topnav { margin-left: 0; overflow-x: auto; }
  .topnav a { padding: .4rem .55rem; }
  .ed-head { position: static; }
  body.admin .brand span { display: none; }
  .ed-tabs { overflow-x: auto; }
  .ed-tabs a { white-space: nowrap; }
  .ed-title { max-width: 45vw; }
  .hide-s { display: none; }
  .ed-body, .ed-body.no-side { grid-template-columns: 1fr; }
  .ed-nav { position: static; max-height: none; flex-direction: row; overflow-x: auto; padding: .6rem 12px; gap: 4px; border-bottom: 1px solid var(--line); }
  .nav-ready, .nav-items { display: none; }
  .nav-sec { white-space: nowrap; flex: none; }
  .ed-work { padding: 1rem 12px 5rem; }
  .grid2, .team-grid { grid-template-columns: 1fr; }
  .rl { border-color: var(--line); padding: 8px; }
  .rl-sub { padding-left: 0; }
  .dropzone { width: 100%; }
  .admin-head h1 { font-size: 1.6rem; }
}
