/* Partnerit CRM. Wyłącznie tokeny Aurora (var(--…)); kolor marki nadpisuje organizacja (setBrand w core.js). */
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--fs-base); margin: 0; }
body.noscroll { overflow: hidden; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 15px; height: 15px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
button { font-family: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { letter-spacing: -.01em; }

/* przyciski */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; transition: background var(--dur-1), border-color var(--dur-1), transform var(--dur-1); text-decoration: none; cursor: pointer; }
.b:hover { background: var(--surface-2); }
.b:active { transform: scale(.98); }
.b:disabled { opacity: .55; pointer-events: none; }
.b:focus-visible, .rail a:focus-visible, .card:focus-visible, .tr:focus-visible, .pick-list li:focus-visible, .chk:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
.b.pri { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.b.pri:hover { background: var(--brand-hover); }
.b.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.b.danger:hover { filter: brightness(.92); }
.b.ghost { border-color: transparent; background: transparent; }
.b.ghost:hover { background: var(--surface-2); }
.b.icon { width: 36px; padding: 0; }
.b.xs { height: 28px; padding: 0 10px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.linkbtn { color: var(--brand); font-weight: 500; text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; font-size: inherit; }
.linkbtn:hover { text-decoration: underline; }

/* ekrany bramy (logowanie, komunikaty, wybór organizacji): css/gate.css */

/* powłoka */
.shell { display: grid; grid-template-columns: 84px minmax(0, 1fr); grid-template-rows: 60px minmax(0, 1fr); min-height: 100vh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.brandmark { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-right: 4px; }
.brandmark { color: var(--text); text-decoration: none; }
.brandmark img { width: 32px; height: 32px; display: block; }
.brandmark .wm { height: 18px; width: auto; display: block; color: var(--text); }
.brandmark .crm { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--brand); margin-left: -2px; }
.orgbtn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand); font-weight: 500; font-size: var(--fs-sm); border: 0; max-width: 240px; }
.orgbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch { flex: 1; max-width: 420px; margin: 0 auto 0 8px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-md); background: var(--surface-2); color: var(--text-3); font-size: var(--fs-sm); border: 1px solid transparent; white-space: nowrap; min-width: 0; overflow: hidden; cursor: pointer; }
.srch:hover { border-color: var(--border-strong); }
.srch kbd { margin-left: auto; font: inherit; font-size: var(--fs-xs); border: 1px solid var(--border-strong); border-radius: 5px; padding: 0 5px; flex: none; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.av.sm { width: 24px; height: 24px; font-size: 9.5px; }
.bellwrap { position: relative; }
.dot { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.rail { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.rail a { width: 68px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: var(--r-md); color: var(--text-2); font-size: 10.5px; font-weight: 500; text-decoration: none; flex: none; }
.rail a:hover { background: var(--surface-2); }
.rail a.on { background: var(--brand-soft); color: var(--brand); }
.rail .sp { flex: 1; }
.main { padding: 22px 24px 60px; min-width: 0; max-width: 1280px; width: 100%; }
.announce { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 16px; font-size: var(--fs-sm); }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.head h1 { font-size: var(--fs-xl); margin: 0; font-weight: 650; }
.head .sub { color: var(--text-2); font-size: var(--fs-sm); }
.head .grow { flex: 1; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--elev-1); }
.panel + .panel { margin-top: 16px; }
.panel .ph { padding: 14px 16px 10px; font-weight: 600; font-size: var(--fs-sm); display: flex; align-items: center; gap: 8px; }
.panel .ph .grow { flex: 1; }
.panel .pb { padding: 0 16px 16px; }
.two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two > .stack > .panel + .panel, .two > div > .panel + .panel { margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 14px 16px; }
.stat span { display: block; font-size: var(--fs-xs); color: var(--text-2); margin-bottom: 4px; }
.stat b { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.stat small { display: block; margin-top: 2px; color: var(--text-3); font-size: var(--fs-xs); }
.loading, .empty { padding: 34px 12px; text-align: center; color: var(--text-2); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }
.empty p { margin: 0 0 12px; }

/* listy zadań i wiersze */
.trow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border-soft); }
.trow:first-child { border-top: 0; }
.chk { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex: none; padding: 0; background: none; cursor: pointer; transition: background var(--dur-1), border-color var(--dur-1); }
.chk:hover { border-color: var(--brand); }
.chk.d { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.chk .ic { width: 13px; height: 13px; stroke-width: 3; }
.trow .tt { flex: 1; min-width: 0; }
.trow .tt a { color: inherit; text-decoration: none; }
.trow .tt small { display: block; color: var(--text-3); font-size: var(--fs-xs); }
.done { text-decoration: line-through; color: var(--text-3); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 500; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.late, .badge.bad { background: var(--danger-bg); color: var(--danger); }
.badge.ok { background: var(--success-bg); color: var(--success); }
.badge.warn { background: var(--warning-bg); color: var(--warning); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.hot { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-soft); cursor: pointer; text-decoration: none; color: inherit; }
.hot:first-of-type { border-top: 0; }
.hot:hover .n { color: var(--brand); }
.hot .n { font-weight: 500; }
.hot small { display: block; color: var(--text-3); font-size: var(--fs-xs); }
.hot .v { margin-left: auto; font-weight: 600; white-space: nowrap; }
.add-inline { display: flex; gap: 8px; margin-top: 12px; }
.add-inline input { flex: 1; height: 36px; }

/* tablica pipeline */
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); border: 0; background: transparent; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--elev-1); }
.cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--r-lg); padding: 10px; min-height: 340px; border: 1px dashed transparent; transition: border-color var(--dur-1), background var(--dur-1); }
.col.over { border-color: var(--brand); background: var(--brand-softer); }
.col .ct { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 10px; font-size: var(--fs-sm); font-weight: 600; gap: 8px; }
.col .ct small { font-weight: 500; color: var(--text-2); font-size: var(--fs-xs); white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 12px; margin-bottom: 8px; box-shadow: var(--elev-1); cursor: grab; transition: box-shadow var(--dur-2); }
.card:hover { box-shadow: var(--elev-2); }
.card.drag { opacity: .45; }
.card b { font-weight: 550; display: block; margin-bottom: 3px; font-size: var(--fs-sm); }
.card .m { color: var(--text-2); font-size: var(--fs-xs); }
.card .f { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin-top: 9px; }
.card .val { font-weight: 600; font-size: var(--fs-sm); }
.card .own { display: flex; align-items: center; gap: 6px; }

/* tabele */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tbl th { text-align: left; font-weight: 550; color: var(--text-2); font-size: var(--fs-xs); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.tbl .tr { cursor: pointer; }
.tbl .tr:hover td { background: var(--brand-softer); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl-wrap { overflow-x: auto; }
.cname { display: flex; align-items: center; gap: 10px; font-weight: 550; min-width: 0; }
.cname small { display: block; color: var(--text-3); font-weight: 400; font-size: var(--fs-xs); }
.cav { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.tools { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.tools input[type=search], .tools input[type=text] { flex: 1; min-width: 180px; max-width: 360px; height: 38px; }
.tools select { height: 38px; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 14px; color: var(--text-2); font-size: var(--fs-sm); }

/* karta rekordu */
.back { margin-bottom: 8px; }
.rec { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.rec .cav { width: 52px; height: 52px; border-radius: 15px; font-size: 16px; }
.rec h1 { margin: 0; font-size: var(--fs-xl); font-weight: 650; }
.rec .meta { color: var(--text-2); font-size: var(--fs-sm); }
.rec .grow { flex: 1; }
.rec .acts { display: flex; gap: 8px; align-items: center; }
.composer { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px; margin-bottom: 16px; background: var(--surface); }
.composer textarea { width: 100%; border: 0; box-shadow: none; padding: 6px; resize: vertical; min-height: 60px; background: transparent; }
.composer textarea:focus { outline: none; box-shadow: none; }
.composer .cr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.composer .cr .grow { flex: 1; }
.composer input[type=datetime-local], .composer select { height: 34px; }
.tl { position: relative; margin: 0; padding: 0 0 0 24px; list-style: none; }
.tl:before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl li { position: relative; padding: 0 0 16px; }
.tl li > i { position: absolute; left: -24px; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); display: grid; place-items: center; color: var(--brand); }
.tl li > i .ic { width: 10px; height: 10px; stroke-width: 2.6; }
.tl li.system > i { border-color: var(--border-strong); color: var(--text-3); }
.tl li.task > i { border-color: var(--warning); color: var(--warning); }
.tl .body { white-space: pre-wrap; word-break: break-word; }
.tl .w { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; align-items: center; }
.tl .w button { color: var(--text-3); font-size: var(--fs-xs); background: none; border: 0; cursor: pointer; padding: 0; }
.tl .w button:hover { color: var(--danger); }
.kv { display: grid; gap: 2px; font-size: var(--fs-sm); }
.kv .r { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border-soft); }
.kv .r:first-child { border-top: 0; }
.kv .r span:first-child { color: var(--text-2); width: 110px; flex: none; }
.kv .r span:last-child { min-width: 0; word-break: break-word; }
.sec { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 6px; display: flex; align-items: center; gap: 8px; }
.sec:first-child { margin-top: 0; }
.sec .grow { flex: 1; }
.sec .b { text-transform: none; letter-spacing: 0; }
.mini { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border-soft); font-size: var(--fs-sm); text-decoration: none; color: inherit; }
.mini:first-of-type { border-top: 0; }
.mini > div { min-width: 0; flex: 1; }
.mini small { display: block; color: var(--text-3); font-size: var(--fs-xs); }
a.mini:hover b { color: var(--brand); }
.stepper { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.stepper button { flex: 1; min-width: 90px; height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); cursor: pointer; }
.stepper button.past { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.stepper button.now { background: var(--brand); color: var(--brand-on); border-color: var(--brand); }
.stepper button:disabled { cursor: default; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.banner { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--brand-softer); border: 1px solid var(--brand-soft); font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 16px; }

/* formularze i okna */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld.wide, .form-err, .form .modal-f, .fld.check { grid-column: 1 / -1; }
.fld label { font-size: var(--fs-sm); font-weight: 500; }
.fld .req { color: var(--danger); }
.fld .hint { color: var(--text-3); font-size: var(--fs-xs); }
.fld .err { color: var(--danger); font-size: var(--fs-xs); min-height: 0; }
.fld.has-err input, .fld.has-err select, .fld.has-err textarea { border-color: var(--danger); }
.fld.check label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.fld input, .fld select, .fld textarea { width: 100%; }
.fld input[type=checkbox] { width: auto; }
.form-err { color: var(--danger); font-size: var(--fs-sm); }
.scrim { position: fixed; inset: 0; background: var(--scrim, rgba(10, 14, 20, .5)); z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 6vh 16px 16px; overflow-y: auto; animation: fade var(--dur-2); }
.modal { width: min(520px, 100%); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--elev-5); border: 1px solid var(--border); animation: rise var(--dur-3) var(--ease-out); outline: none; }
.modal.wide { width: min(760px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.modal-h h2 { margin: 0; font-size: var(--fs-lg); font-weight: 650; }
.modal-b { padding: 8px 18px 18px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 0 18px 18px; }
.modal-f.inline { padding: 4px 0 0; }
.pop { position: absolute; z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--elev-4); padding: 6px; min-width: 210px; animation: rise var(--dur-2) var(--ease-out); }
.pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); text-align: left; font-size: var(--fs-sm); cursor: pointer; background: none; border: 0; }
.pop button:hover { background: var(--surface-2); }
.pop button.danger { color: var(--danger); }
.pop hr { border: 0; border-top: 1px solid var(--border-soft); margin: 4px 0; }
.picker { position: relative; }
.picker input { width: 100%; }
.pick-list { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--elev-3); max-height: 240px; overflow: auto; }
.pick-list li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-sm); }
.pick-list li:hover { background: var(--brand-soft); }
.pick-list li small { color: var(--text-3); }
.pick-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 40px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); }
.pick-chip button { color: var(--text-2); background: none; border: 0; cursor: pointer; display: grid; place-items: center; }

/* paleta Ctrl+K */
.pal { width: min(560px, 100%); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--elev-5); overflow: hidden; border: 1px solid var(--border); }
.pal input { width: 100%; height: 52px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 18px; background: transparent; font-size: var(--fs-md); outline: none; box-shadow: none; }
.pal ul { list-style: none; margin: 0; padding: 6px; max-height: 340px; overflow: auto; }
.pal li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-sm); }
.pal li.on, .pal li:hover { background: var(--brand-soft); }
.pal li small { margin-left: auto; color: var(--text-3); }

/* powiadomienia (dzwonek, toast) */
.notifs { width: min(380px, 92vw); padding: 6px; }
.notifs .n { display: block; width: 100%; text-align: left; padding: 10px; border-radius: var(--r-sm); background: none; border: 0; cursor: pointer; font-size: var(--fs-sm); }
.notifs .n:hover { background: var(--surface-2); }
.notifs .n.unread b:before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: 6px; }
.notifs small { color: var(--text-3); display: block; }
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 90; }
.toast { display: flex; align-items: center; gap: 14px; background: var(--surface-inv, #151a22); color: var(--text-inv, #fff); padding: 11px 14px 11px 16px; border-radius: var(--r-md); box-shadow: var(--elev-4); font-size: var(--fs-sm); animation: rise var(--dur-3) var(--ease-out); max-width: min(520px, 92vw); }
.toast button { color: var(--brand-300, #93bbfd); font-weight: 600; font-size: var(--fs-sm); background: none; border: 0; cursor: pointer; }

/* raporty */
.funnel { display: grid; gap: 10px; }
.frow { display: grid; grid-template-columns: 130px minmax(0, 1fr) 150px; align-items: center; gap: 12px; font-size: var(--fs-sm); }
.fbar { height: 26px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.fbar div { height: 100%; background: var(--brand); border-radius: 8px; min-width: 3px; transition: width var(--dur-4) var(--ease-out); }
.frow .fv { text-align: right; font-weight: 550; }
.months { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.months .mc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.months .bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: 100%; justify-content: center; }
.months .bars i { display: block; width: 42%; max-width: 18px; border-radius: 4px 4px 0 0; min-height: 2px; }
.months .bars i.w { background: var(--brand); }
.months .bars i.l { background: var(--border-strong); }
.months small { font-size: 10px; color: var(--text-3); }
.legend { display: flex; gap: 14px; font-size: var(--fs-xs); color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* superadmin */
.seats { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.seats div { height: 100%; background: var(--brand); }
.check-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: var(--fs-sm); }
.check-row:first-child { border-top: 0; }
.check-row .ic.okc { color: var(--success); }
.check-row .ic.bad { color: var(--danger); }
.check-row small { color: var(--text-3); margin-left: auto; }
.danger-zone { border: 1px solid var(--danger-border); border-radius: var(--r-lg); padding: 14px 16px; background: var(--danger-bg); }
.danger-zone .row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
pre.detail { margin: 0; font-size: var(--fs-xs); white-space: pre-wrap; word-break: break-word; color: var(--text-2); }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *:before { animation: none !important; transition: none !important; } }

/* mobile */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 56px minmax(0, 1fr) 62px; }
  .rail { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: 62px; flex-direction: row; justify-content: flex-start; padding: 4px; border-right: 0; border-top: 1px solid var(--border); z-index: 30; overflow-x: auto; overflow-y: hidden; gap: 2px; }
  .rail .sp { display: none; }
  .rail a { width: auto; min-width: 66px; flex: 1 0 auto; height: 52px; }
  .main { padding: 16px 14px 96px; }
  .srch, .brandmark span { display: none; }
  .two, .form { grid-template-columns: 1fr; }
  .stat b { font-size: 21px; }
  .hide-m { display: none; }
  .frow { grid-template-columns: 90px minmax(0, 1fr) 100px; gap: 8px; }
  .scrim { padding: 0; align-items: flex-end; }
  .modal, .modal.wide { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh; overflow-y: auto; }
  .cols { grid-auto-columns: 82%; }
  #toasts { bottom: 76px; }
}

/* edytor uprawnień */
.access .fld label { font-weight: 550; }
.perm-details { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-md); padding: 4px 12px 8px; }
.perm-details summary { cursor: pointer; padding: 8px 0; font-size: var(--fs-sm); font-weight: 500; color: var(--brand); list-style: none; }
.perm-details summary::-webkit-details-marker { display: none; }
.perm-details[open] summary { margin-bottom: 2px; }
.permlist { display: grid; gap: 2px; }
.perm { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border-soft); cursor: pointer; }
.perm:first-child { border-top: 0; }
.perm input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.perm b { font-weight: 550; font-size: var(--fs-sm); display: block; }
.perm small { color: var(--text-3); font-size: var(--fs-xs); display: block; }
