/* Application overrides on top of brand.css (the design system from the mockups).
   The mockups had a 30px preview strip above the header; the product does not. */
body.no-mockbar .topbar { top: 0; }
body.no-mockbar .shell { min-height: calc(100vh - 62px); }
body.no-mockbar .side { top: 62px; height: calc(100vh - 62px); max-height: none; }
body.no-mockbar .main { max-width: none; min-width: 0; }
.task-scroll { max-height: calc(100vh - 300px); min-height: 320px; overflow-y: auto; padding-right: 4px; }
body.no-mockbar .auth-wrap { min-height: 100vh; }

/* ------------------------------------------------------------ forms */
button.box { font: inherit; padding: 0; display: inline-grid; place-items: center; }
button.box .ic { opacity: 0; width: 14px; height: 14px; }
button.box.on .ic, span.box.on .ic { opacity: 1; }
.tick-form { display: contents; }
.thumb img, .thumb-ph { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; background: var(--card-2); color: var(--faint); flex: none; }
.thumb-ph .ic { width: 18px; height: 18px; }
.t-main a { color: inherit; }
.t-status { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.task.skipped { opacity: .6; }

.sw-wrap { display: inline-flex; align-items: center; cursor: pointer; }
.sw-wrap input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-wrap input:checked + .sw { background: var(--grad); }
.sw-wrap input:checked + .sw::after { left: 19px; }
.sw-wrap input:focus-visible + .sw { box-shadow: 0 0 0 3px rgba(53, 224, 143, .3); }
.sw-row, .field > label.sw-row { display: flex; gap: 11px; align-items: center; padding: 7px 0; margin: 0; font-size: 13.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text); cursor: pointer; }
.sw-row b { font-size: 13.5px; }
.sw-row .hint { margin: 1px 0 0; }

.radios label { display: contents; }
.radios input { position: absolute; opacity: 0; width: 0; height: 0; }
.radios input:checked + span { background: var(--grad); border-color: transparent; color: var(--on-grad); font-weight: 750; }
.radios input:focus-visible + span { box-shadow: 0 0 0 3px rgba(53, 224, 143, .3); }

.seg a { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 12.5px; padding: 6px 13px; border-radius: 999px; cursor: pointer; display: inline-block; }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(18, 29, 18, .12); }

.field.has-error .in { border-color: var(--red); }
.err { color: var(--red); font-size: 11.5px; margin-top: 5px; }
.btn-danger { color: var(--red); border-color: rgba(198, 57, 43, .35); }
.btn-danger:hover { background: var(--red-bg); }
.menu-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; font: inherit; font-size: 13px; padding: 9px 10px; border-radius: 10px; cursor: pointer; text-align: left; }
.menu-btn.danger { color: var(--red); }
.menu-btn:hover { background: var(--card-2); }
.tb-user { border: 0; font: inherit; text-align: left; }
button.tb-ico { border: 0; background: transparent; padding: 0; font: inherit; cursor: pointer; }
button.tb-ico:hover { background: var(--card-2); }
.tb-ico .badge { top: 1px; right: 1px; transform: translate(30%, -30%); }
.tb-search { margin: 0; }
.menu form { margin: 0; }
.inline-form { display: inline; }
.wide-select { max-width: 320px; }

/* ------------------------------------------------------------ flash */
.flash { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 12px; margin-bottom: 14px; font-size: 13px; border: 1px solid; }
.flash.ok { background: var(--mint-bg); color: #0d6b41; border-color: #cdebd9; }
.flash.err { background: var(--red-bg); color: var(--red); border-color: #f6d5d0; }
.flash-x { margin-left: auto; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 2px; display: grid; }
.auth-wrap .flash { max-width: 420px; margin: 0 auto 14px; }

/* ------------------------------------------------------------ bits */
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty .ic { width: 30px; height: 30px; color: var(--faint); margin-bottom: 8px; }
.sub { color: var(--faint); font-size: 11.5px; }
.list-img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.who .thumb-ph { width: 36px; height: 36px; }
.search-sec h3 { font-size: 13px; margin: 18px 0 8px; color: var(--muted); }
.push-cta { display: flex; align-items: center; gap: 12px; }
.table-wrap { overflow-x: auto; }
table td.wrap { white-space: normal; max-width: 320px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.live-dot.off, .live-dot.off::after { background: var(--red); animation: none; }
code.k { background: var(--card-2); padding: 2px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }
@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 4px 14px; }
    .side .nav { display: flex; flex-wrap: wrap; }
    .side-sec { width: 100%; }
    .split { grid-template-columns: 1fr; }
    .tb-search { display: none; }
}

/* ------------------------------------------------------------ live notifications */
.menu-notif { width: 360px; max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; }
.menu-notif .menu-head { padding: 9px 10px; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; color: inherit; }
.notif:hover { background: var(--card-2); }
.notif.unread { background: var(--grad-soft); }
.notif .avi { flex: none; margin-top: 2px; }
.notif .avi.red { color: var(--red); background: var(--red-bg); }
.notif-t { flex: 1; min-width: 0; }
.notif-t b { display: block; font-size: 12.5px; line-height: 1.3; }
.notif-t small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif time { flex: none; font-size: 10.5px; color: var(--faint); margin-top: 3px; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 90; width: 340px; max-width: calc(100vw - 36px); }
.toast { background: var(--surface); border: 1px solid var(--stroke); border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(18, 29, 18, .18); display: flex; gap: 10px; align-items: flex-start; animation: toast-in .25s ease-out; }
.toast.alert { border-color: #f3cfca; background: var(--red-bg); }
.toast b { display: block; font-size: 13px; }
.toast p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.toast .toast-x { margin-left: auto; border: 0; background: transparent; cursor: pointer; color: var(--faint); padding: 0; display: grid; }
.toast a { font-size: 12px; font-weight: 650; color: var(--mint); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
