/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #f1f2f4;
  --surface: #ffffff;
  --surface-2: #f7f8f9;
  --list-bg: #f1f2f4;
  --text: #172b4d;
  --muted: #626f86;
  --border: #dcdfe4;
  --primary: #0c66e4;
  --primary-hover: #0055cc;
  --primary-text: #ffffff;
  --danger: #c9372c;
  --warning: #f5cd47;
  --success: #1f845a;
  --hover: rgba(9, 30, 66, 0.06);
  --shadow: 0 1px 1px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  --shadow-lg: 0 8px 12px rgba(9, 30, 66, 0.15), 0 0 1px rgba(9, 30, 66, 0.31);
  --radius: 8px;
  --topbar: 48px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d2125;
    --surface: #22272b;
    --surface-2: #2c333a;
    --list-bg: #101204;
    --text: #b6c2cf;
    --muted: #8c9bab;
    --border: #3d474f;
    --primary: #579dff;
    --primary-hover: #85b8ff;
    --primary-text: #09326c;
    --danger: #f87168;
    --hover: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 1px rgba(3, 4, 4, 0.5), 0 0 1px rgba(3, 4, 4, 0.6);
    --shadow-lg: 0 8px 12px rgba(3, 4, 4, 0.5), 0 0 1px rgba(3, 4, 4, 0.6);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: var(--primary); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.icon { flex: none; vertical-align: middle; }
.noscript { padding: 24px; text-align: center; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

#app { min-height: 100%; display: flex; flex-direction: column; }
main#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ----------------------------------------------------------------- topbar */
.topbar {
  height: var(--topbar);
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; margin-right: 8px; }
.brand img { width: 24px; height: 24px; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a { padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a.active { background: var(--hover); }
.nav a.active { color: var(--primary); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 0 12px;
  border: 0; border-radius: 6px; background: var(--hover); color: var(--text);
  font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: rgba(9, 30, 66, 0.12); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--primary-text); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.small { min-height: 28px; padding: 0 8px; font-size: 13px; }
.btn.icon-only { padding: 0; width: 32px; }
.btn.icon-only.small { width: 28px; }
.btn.block { width: 100%; justify-content: flex-start; }
.board .btn.glass { background: rgba(255, 255, 255, 0.22); color: #fff; }
.board .btn.glass:hover { background: rgba(255, 255, 255, 0.34); }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > label, .field > .label { font-weight: 600; font-size: 12px; color: var(--muted); }
.input {
  width: 100%; min-height: 36px; padding: 6px 10px;
  border: 2px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font: inherit;
}
textarea.input { min-height: 72px; resize: vertical; }
.input:focus { outline: none; border-color: var(--primary); }
.input.inline { min-height: 0; padding: 2px 6px; border-color: transparent; background: transparent; font-weight: 600; }
.input.inline:hover { background: var(--hover); }
.input.inline:focus { background: var(--surface); border-color: var(--primary); }
.error-text { color: var(--danger); margin: 0 0 12px; min-height: 1.4em; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

/* ------------------------------------------------------------ avatars etc */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #fff; background: #64748b;
  user-select: none;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.board-header .avatar-stack .avatar { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25); }

.chip { display: inline-block; min-width: 40px; max-width: 100%; padding: 2px 8px; border-radius: 4px; background: var(--c, #8590a2); color: #fff; font-size: 12px; font-weight: 600; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.bar { min-width: 40px; width: 40px; height: 8px; padding: 0; border-radius: 4px; }
.c-green { --c: #1f845a; } .c-yellow { --c: #b38600; } .c-orange { --c: #c25100; } .c-red { --c: #c9372c; }
.c-purple { --c: #8270db; } .c-blue { --c: #0c66e4; } .c-sky { --c: #2898bd; } .c-lime { --c: #5b7f24; }
.c-pink { --c: #cd519d; } .c-black { --c: #596773; }

/* -------------------------------------------------------- board backgrounds */
.bg-blue { background: linear-gradient(135deg, #0c66e4, #09326c); }
.bg-green { background: linear-gradient(135deg, #1f845a, #164b35); }
.bg-orange { background: linear-gradient(135deg, #e56910, #a54800); }
.bg-red { background: linear-gradient(135deg, #c9372c, #5d1f1a); }
.bg-purple { background: linear-gradient(135deg, #8270db, #352c63); }
.bg-pink { background: linear-gradient(135deg, #cd519d, #50253f); }
.bg-teal { background: linear-gradient(135deg, #2898bd, #164555); }
.bg-slate { background: linear-gradient(135deg, #626f86, #2c3e5d); }

/* ---------------------------------------------------------------- pages */
.page { width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
.page h1 { font-size: 22px; margin-bottom: 16px; }
.page h2 { font-size: 16px; margin: 24px 0 12px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

.auth-wrap { flex: 1; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 12px; padding: 28px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card p.lead { margin: 0 0 20px; color: var(--muted); }

.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.board-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 96px; padding: 10px 12px; border-radius: var(--radius);
  color: #fff; text-decoration: none; font-weight: 700; box-shadow: var(--shadow);
}
.board-tile:hover { filter: brightness(1.1); }
.board-tile .meta { font-size: 12px; font-weight: 500; opacity: 0.9; }
.board-tile.new { background: var(--surface-2); color: var(--text); border: 1px dashed var(--border); align-items: center; justify-content: center; font-weight: 500; cursor: pointer; font-size: inherit; }
.board-tile.new:hover { filter: none; background: var(--hover); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 44px; height: 32px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; color: var(--muted); font-weight: 600; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--hover); }
.pill.admin { background: var(--primary); color: var(--primary-text); }

/* ----------------------------------------------------------------- board */
.board { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.board-header { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; background: rgba(0, 0, 0, 0.28); color: #fff; }
.board-header .input.inline { color: #fff; font-size: 18px; }
.board-header .input.inline:focus { color: var(--text); }
.board-header h1 { font-size: 18px; padding: 2px 6px; }
.board-header .filter { width: 180px; min-height: 32px; background: rgba(255, 255, 255, 0.22); border-color: transparent; color: #fff; }
.board-header .filter::placeholder { color: rgba(255, 255, 255, 0.85); }
.board-header .filter:focus { background: var(--surface); color: var(--text); }
.filter-note { font-size: 12px; background: rgba(255, 255, 255, 0.22); padding: 3px 8px; border-radius: 12px; }
.role-note { font-size: 12px; background: rgba(0, 0, 0, 0.25); padding: 3px 8px; border-radius: 12px; }

.lists-scroll { flex: 1; min-height: 0; overflow-x: auto; overflow-y: hidden; padding: 12px 12px 8px; }
.lists-row { display: flex; align-items: flex-start; gap: 10px; height: 100%; }
.lists { display: flex; align-items: flex-start; gap: 10px; height: 100%; }
.list {
  flex: none; width: 272px; max-height: 100%; display: flex; flex-direction: column;
  background: var(--list-bg); border-radius: 12px; box-shadow: var(--shadow);
}
.list-header { display: flex; align-items: center; gap: 4px; padding: 8px 8px 4px 10px; cursor: grab; }
.list-header .input.inline { flex: 1; font-size: 14px; }
.cards { flex: 1; min-height: 12px; overflow-y: auto; padding: 4px 8px; display: flex; flex-direction: column; gap: 8px; }
.card {
  display: block; padding: 8px 10px; background: var(--surface); color: var(--text);
  border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; text-align: left;
  border: 0; width: 100%; overflow-wrap: anywhere;
}
.card:hover { outline: 2px solid var(--primary); outline-offset: -2px; }
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card-title { white-space: pre-wrap; }
.card.done .card-title { text-decoration: line-through; color: var(--muted); }
.card-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); padding: 1px 4px; border-radius: 4px; }
.badge.complete { background: var(--success); color: #fff; }
.badge.due.upcoming { }
.badge.due.soon { background: var(--warning); color: #1d2125; }
.badge.due.overdue { background: var(--danger); color: #fff; }
.badge.due.done { background: var(--success); color: #fff; }
.card-members { display: flex; justify-content: flex-end; margin-top: 6px; }
.drag-ghost { opacity: 0.4; }
.list-header > .list-title { flex: 1; font-weight: 600; padding: 4px 8px; overflow-wrap: anywhere; }
.cd-head > .cd-title { font-size: 20px; font-weight: 700; padding: 4px 8px; }
.cd-section > h3 .input.inline { font-size: 15px; }
.popover.wide-popover { width: 400px; }
.is-filtered-out { display: none !important; }

.list-footer { padding: 6px 8px 8px; }
.add-card-btn { width: 100%; justify-content: flex-start; color: var(--muted); background: transparent; }
.add-card-btn:hover { background: var(--hover); color: var(--text); }
.composer textarea { width: 100%; min-height: 56px; padding: 8px 10px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); resize: none; background: var(--surface); color: var(--text); font: inherit; }
.composer textarea:focus { outline: 2px solid var(--primary); }
.composer .row { margin-top: 6px; }

.add-list { flex: none; width: 272px; }
.add-list > .btn { width: 100%; justify-content: flex-start; background: rgba(255, 255, 255, 0.24); color: #fff; min-height: 40px; border-radius: 12px; }
.add-list > .btn:hover { background: rgba(255, 255, 255, 0.34); }
.add-list .composer-box { background: var(--list-bg); padding: 8px; border-radius: 12px; }
.add-list .composer-box input { width: 100%; }

/* ---------------------------------------------------- overlays and popovers */
.overlay { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 48px 16px; background: rgba(9, 30, 66, 0.55); overflow-y: auto; }
.dialog { width: 100%; max-width: 440px; background: var(--surface); color: var(--text); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 20px; position: relative; }
.dialog.wide { max-width: 640px; }
.dialog h2 { font-size: 18px; margin-bottom: 12px; padding-right: 32px; }
.dialog-close { position: absolute; top: 10px; right: 10px; }
.popover { position: fixed; z-index: 200; width: 304px; max-width: calc(100vw - 16px); max-height: 70vh; overflow-y: auto; background: var(--surface); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 10px; border: 1px solid var(--border); }
.popover h3 { font-size: 13px; text-align: center; margin-bottom: 8px; color: var(--muted); }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--hover); }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }

.toast-stack { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1d2125; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: min(92vw, 460px); pointer-events: auto; }
.toast.error { background: var(--danger); }

/* ------------------------------------------------------------ card dialog */
.card-modal { max-width: 768px; padding: 0; background: var(--surface-2); }
.cd { padding: 20px; }
.cd-head { display: flex; flex-direction: column; gap: 2px; padding-right: 36px; margin-bottom: 12px; }
.cd-head .input.inline { font-size: 20px; padding: 4px 8px; width: 100%; }
.cd-columns { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 20px; }
.cd-section { margin-bottom: 20px; }
.cd-section > h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 8px; }
.cd-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.cd-meta h4 { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.cd-meta .group { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.cd-side h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.cd-side .btn { margin-bottom: 6px; background: var(--hover); }
.cd-side .btn.danger { background: transparent; color: var(--danger); }
.cd-side .btn.danger:hover { background: var(--hover); }
.desc-view { padding: 8px 10px; border-radius: var(--radius); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); min-height: 40px; cursor: text; }
.desc-empty { width: 100%; text-align: left; min-height: 56px; align-items: flex-start; padding-top: 8px; background: var(--hover); color: var(--muted); font-weight: 400; }
.archived-banner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 16px; border-radius: var(--radius); background: var(--warning); color: #1d2125; }

.progress { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.progress .track { flex: 1; height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.progress .bar { height: 100%; background: var(--primary); transition: width 0.2s; }
.progress .bar.full { background: var(--success); }
.check-item { display: flex; align-items: flex-start; gap: 8px; padding: 4px 6px; border-radius: 6px; }
.check-item:hover { background: var(--hover); }
.check-item input[type="checkbox"] { margin-top: 3px; }
.check-item .text { flex: 1; overflow-wrap: anywhere; }
.check-item.done .text { text-decoration: line-through; color: var(--muted); }

.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment .body { flex: 1; min-width: 0; }
.comment .who { font-weight: 600; }
.comment .when { color: var(--muted); font-size: 12px; margin-left: 6px; }
.comment .text { display: block; margin-top: 4px; padding: 8px 10px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .links { margin-top: 4px; font-size: 12px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12px; }
.link-btn:hover { color: var(--text); }

/* comment dates, edit marker and history */
.comment .meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.comment .when { margin-left: 0; }
.comment .edited { color: var(--muted); font-size: 12px; }
.small-note { font-size: 12px; }
.history-modal .versions { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; }
.version { padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.version.current { border-color: var(--primary); }
.version-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; font-size: 13px; }
.version .text { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.version-files { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; }

/* attachments on comments */
.attachments { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 6px; }
.attachment-pictures { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-pictures a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--shadow); }
.attachment-pictures img { display: block; max-width: 220px; max-height: 160px; object-fit: cover; }
.file-row { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--text); font-size: 13px; text-decoration: none; }
a.file-row:hover { background: var(--hover); }
.file-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row.editing { display: flex; margin-top: 6px; }
.file-row.editing .name { flex: 1; }
.file-row.removed .name { color: var(--muted); text-decoration: line-through; }
.attach-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.file-input { display: none; }
.file-chips { display: contents; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 8px; border-radius: 999px; background: var(--hover); font-size: 12px; }
.file-chip .name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-zone.dragging { outline: 2px dashed var(--primary); outline-offset: 2px; border-radius: var(--radius); }
.activity-item { display: flex; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.activity-item .when { color: var(--muted); font-size: 12px; display: block; }

.pick-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; }
.pick-row:hover { background: var(--hover); }
.pick-row .tick { margin-left: auto; color: var(--primary); }
.pick-row .chip { flex: 1; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 640px) {
  .overlay { padding: 0; }
  .dialog { border-radius: 0; min-height: 100%; }
  .cd-columns { grid-template-columns: 1fr; }
  .cd-side { order: -1; display: flex; flex-wrap: wrap; gap: 6px; }
  .cd-side h4 { width: 100%; margin: 4px 0 0; }
  .cd-side .btn { margin: 0; }
  .list, .add-list { width: 82vw; }
  .board-header .filter { width: 130px; }
  .nav a { padding: 6px 8px; }
  .brand span { display: none; }
}

/* ------------------------------------------------------------ notifications */
.bell { position: relative; }
.bell .count {
  position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  line-height: 18px; text-align: center; pointer-events: none;
}
.popover.notif-popover { width: 400px; padding: 0; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px 12px; }
.notif-head h3 { margin: 0; font-size: 14px; color: var(--text); }
.notif-list { max-height: 55vh; overflow-y: auto; padding: 0 4px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px; margin-bottom: 2px;
  border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer;
}
.notif-item:hover { background: var(--hover); }
.notif-item.unread { background: rgba(12, 102, 228, 0.1); }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-message { font-weight: 500; overflow-wrap: anywhere; }
.notif-excerpt { color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.notif-meta { font-size: 12px; color: var(--muted); }
.notif-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--primary); flex: none; }
.notif-popover .menu-sep { margin: 4px 0; }
.notif-popover > .menu-item { margin: 0 4px 4px; width: calc(100% - 8px); }

.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.check-row input { margin-top: 3px; flex: none; }
.field > .muted { font-size: 12px; }

.mention { background: rgba(12, 102, 228, 0.14); color: var(--primary); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.mention-list {
  position: fixed; z-index: 250; max-width: calc(100vw - 16px); padding: 4px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.mention-item { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; }
.mention-item:hover, .mention-item.active { background: var(--hover); }
.btn.is-on { background: var(--primary); color: var(--primary-text); }

@media (max-width: 640px) {
  .popover.notif-popover { width: calc(100vw - 16px); }
}
