/* Общие стили страниц входа и списка досок */
:root {
  --bg: #f2f3f5; --panel: #fff; --line: #e8e9ec; --text: #1f2329; --muted: #6b7280;
  --accent: #4262ff; --accent-dark: #2f4be0; --accent-soft: #eef1ff; --danger: #e5484d;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 8px 24px rgba(16, 24, 40, .10);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font-family: inherit; font-size: 14px; }
.hidden { display: none !important; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.logo { width: 34px; height: 34px; border-radius: 9px; color: #fff; font-weight: 800; font-size: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #4262ff, #8b5cf6); flex: none; }

.btn {
  height: 40px; padding: 0 16px; border: 1px solid #dfe1e6; border-radius: 10px; background: #fff; color: var(--text);
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.btn:hover { background: #f6f7f9; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--danger); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.danger-zone { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.del-text { margin: 0 0 6px; }
.del-list { margin: 0 0 8px; padding-left: 20px; color: #3d4350; font-size: 14px; line-height: 1.5; }
.code-input { font-size: 22px; letter-spacing: 6px; text-align: center; max-width: 200px; }
.del-actions { justify-content: flex-end; gap: 8px; margin-top: 12px; }
#error.ok, #codeError.ok, #resetError.ok { color: #16794c; }
.forgot { display: block; margin: 6px 0 0 auto; font-size: 12.5px; }
.reset-title { margin: 0 0 2px; font-size: 18px; }
.reset-step { margin: 0 0 12px; font-size: 12.5px; color: #7a8190; }
.reset-step:empty { display: none; }
.pw-rules { list-style: none; margin: 2px 0 6px; padding: 0; font-size: 13px; line-height: 1.4; }
.pw-rules li { position: relative; padding: 2px 0 2px 24px; color: #7a8190; }
.pw-rules li::before { content: ''; position: absolute; left: 2px; top: 4px; width: 14px; height: 14px; box-sizing: border-box; border: 1.5px solid #b5bac4; border-radius: 50%; }
.pw-rules li.ok { color: #16794c; }
.pw-rules li.ok::before { content: '✓'; border-color: #16794c; background: #16794c; color: #fff; font-size: 10px; line-height: 11px; text-align: center; font-weight: 700; }
.reset-done { width: 56px; height: 56px; margin: 6px auto 12px; border-radius: 50%; background: #e3f4ea; color: #16794c; font-size: 30px; font-weight: 700; line-height: 56px; text-align: center; }
.reset-done-text { text-align: center; font-size: 15.5px; }
#resetSubmit:disabled { opacity: .5; cursor: not-allowed; }
.code-lead { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
#codeForm .code-input, #resetForm .code-input { max-width: none; }
.code-links { margin: 14px 0 0; text-align: center; font-size: 12.5px; line-height: 1.8; }
button.link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
button.link:hover { text-decoration: underline; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #eef0f3; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.input {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid #dfe1e6; border-radius: 10px; background: #fff; outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: #3d4350; }
.error { color: var(--danger); font-size: 13.5px; min-height: 18px; margin: 4px 0 10px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  flex: none; overflow: hidden; background: #8a9099;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }

/* ================= Вход ================= */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-card { width: min(420px, 100%); background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 32px 32px 26px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand b { font-size: 22px; }
.tabs { display: flex; background: #f2f3f5; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.tabs button { flex: 1; height: 34px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.auth-card .btn.primary { width: 100%; height: 44px; font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth { display: flex; flex-direction: column; gap: 10px; }
.oauth .btn { width: 100%; height: 44px; }
.oauth .mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; }
.mark.g { background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.mark.tg { background: #2aabee; }

/* ================= Список досок ================= */
body.dash { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; font-weight: 800; font-size: 18px; }
.team-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; text-align: left; }
.team-btn:hover { background: #f2f3f5; }
.team-mark { width: 30px; height: 30px; border-radius: 8px; background: #1f2329; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.team-btn .tname { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.nav button { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-weight: 500; color: #2b2f36; text-align: left; }
.nav button:hover { background: #f2f3f5; }
.nav button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side .spacer { flex: 1; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--bg); position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 520px; position: relative; }
.search .ic { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.search .input { padding-left: 40px; background: #fff; }
.topbar .grow { flex: 1; }
.me-btn { border: 0; background: transparent; cursor: pointer; padding: 2px; border-radius: 50%; }
.content { padding: 8px 28px 40px; }
.content-head { display: flex; align-items: center; gap: 12px; margin: 10px 0 18px; }
.content-head h1 { font-size: 24px; margin: 0; flex: 1; }
.board-list { background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); overflow: hidden; }
.brow, .bhead { display: grid; grid-template-columns: minmax(0, 1fr) 180px 150px 40px 40px; align-items: center; gap: 12px; padding: 0 16px; }
.bhead { height: 40px; font-size: 12.5px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.brow { height: 58px; border-bottom: 1px solid #f1f2f4; cursor: pointer; }
.brow:last-child { border-bottom: 0; }
.brow:hover { background: #f8f9fb; }
.bname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bicon { width: 36px; height: 36px; border-radius: 9px; background: #eef1ff; display: grid; place-items: center; font-size: 18px; flex: none; }
.btitle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsub { font-size: 12.5px; color: var(--muted); }
.bowner { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.bowner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bowner .avatar { width: 24px; height: 24px; font-size: 11px; }
.bdate { font-size: 13.5px; color: var(--muted); }
.icon-btn { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: #6b7280; }
.icon-btn:hover { background: #eef0f3; color: var(--text); }
.icon-btn.star.on { color: #e8a200; }
.icon-btn.star.on .ic { fill: #fac710; stroke: #e8a200; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.brow.trash { grid-template-columns: minmax(0, 1fr) auto; cursor: default; }
.trash-note { padding: 12px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: #fafbfc; }
.banner { background: #fff4e5; color: #8a4b00; border: 1px solid #ffd7a3; border-radius: 12px; padding: 12px 16px; margin: 10px 0; font-size: 14px; line-height: 1.45; }
.server-info { font-size: 12px; color: var(--muted); line-height: 1.45; padding: 8px 10px; border-radius: 8px; background: #f6f7f9; margin: 0 0 6px; }
.status { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; margin-left: 8px; }
.status.progress { background: #fff4d6; color: #9a6b00; }
.status.review { background: #e9f2fe; color: #2459c7; }
.status.done { background: #e4f6ea; color: #17804a; }

/* меню и модальные окна */
.menu { position: fixed; z-index: 50; background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 220px; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: left; color: #2b2f36; font-weight: 500; }
.menu button:hover { background: #f2f3f5; }
.menu button.danger { color: var(--danger); }
.menu .sep { height: 1px; background: var(--line); margin: 4px 2px; }
.menu .label { font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 10px 4px; }
.modal-back { position: fixed; inset: 0; background: rgba(16, 20, 30, .32); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 22px 24px; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { margin: 0 0 16px; font-size: 19px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.ways { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.ways-title { font-size: 13px; font-weight: 600; color: #3d4350; margin-bottom: 6px; }
.way { display: flex; align-items: center; gap: 10px; padding: 6px 0; min-height: 40px; }
.way b { font-size: 14px; font-weight: 600; width: 130px; flex: none; }
.way .hint { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colors button { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.colors button.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.people { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.person .pname { flex: 1; min-width: 0; }
.person .pname b { display: block; font-weight: 600; }
.person .pname span { font-size: 12.5px; color: var(--muted); }
select.input { height: 36px; width: auto; padding: 0 8px; }
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: #1f2329; color: #fff; padding: 10px 16px;
  border-radius: 10px; font-size: 14px; font-weight: 500; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 120;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 800px) {
  body.dash { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .topbar .grow { display: none; }
  .search { max-width: none; min-width: 0; }
  .bname, .bname > div:last-child { min-width: 0; }
  .btitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .modal .foot { flex-wrap: wrap; }
  .modal .foot .btn { flex: 1 1 auto; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); min-width: 0; }
  .side .brand { padding: 4px 6px; font-size: 16px; }
  .side .brand .logo { width: 28px; height: 28px; font-size: 15px; }
  .team-btn { width: auto; flex: 1; min-width: 0; padding: 6px; }
  /* строка 1: логотип, команда, участники и приглашение значками; строка 2: разделы с прокруткой */
  .nav { flex-direction: row; margin-top: 0; overflow-x: auto; scrollbar-width: none; }
  .nav button { flex: none; white-space: nowrap; height: 34px; }
  #nav { order: 3; width: 100%; }
  .nav:not(#nav) button { width: 36px; padding: 0; justify-content: center; }
  .nav:not(#nav) button span { display: none; }
  .side .spacer, .server-info { display: none !important; }
  .topbar { padding: 10px 12px; }
  .content { padding: 4px 12px 32px; }
  .content-head h1 { font-size: 20px; }
  .brow, .bhead { grid-template-columns: minmax(0, 1fr) 40px 40px; }
  .bowner, .bdate, .bhead .c-owner, .bhead .c-date { display: none; }
}

/* ================= Политика и условия ================= */
.auth-legal { margin: 18px 0 0; text-align: center; font-size: 12.5px; }
.auth-legal a, .legal-card a { color: var(--accent); text-decoration: none; }
.auth-legal a:hover, .legal-card a:hover { text-decoration: underline; }
body.legal { padding: 32px 16px; }
.legal-card { max-width: 760px; margin: 0 auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 32px 36px; line-height: 1.6; font-size: 15px; }
.legal-card .auth-brand { color: inherit; }
.legal-card .auth-brand:hover { text-decoration: none; }
.legal-card h1 { font-size: 26px; margin: 0 0 4px; }
.legal-card h2 { font-size: 17px; margin: 24px 0 6px; }
.legal-card ul { padding-left: 20px; }
@media (max-width: 600px) { .legal-card { padding: 24px 20px; } }
.remember { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin: 4px 0 10px; cursor: pointer; }

/* ================= Список досок: инструменты, плитки, поиск по содержимому ================= */
.list-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.list-tools .grow { flex: 1; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.seg button { border: 0; background: transparent; width: 34px; height: 30px; border-radius: 7px; cursor: pointer; font-size: 16px; color: #6b7280; }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.board-list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; background: transparent; box-shadow: none; overflow: visible; }
.bcard { background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .08); overflow: hidden; cursor: pointer; position: relative; display: flex; flex-direction: column; transition: box-shadow .15s; }
.bcard:hover, .bcard:focus-visible { box-shadow: 0 4px 14px rgba(16, 24, 40, .14); }
.bcover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #eef1ff, #f6f0ff); display: grid; place-items: center; overflow: hidden; }
.bcover img { width: 100%; height: 100%; object-fit: cover; }
.bcover-ic { font-size: 40px; }
.binfo { padding: 10px 12px 12px; min-width: 0; }
.bacts { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; background: rgba(255, 255, 255, .92); border-radius: 9px; opacity: 0; transition: opacity .15s; }
.bcard:hover .bacts, .bcard:focus-within .bacts, .bacts .star.on { opacity: 1; }
.bcard .bacts:has(.star.on) { opacity: 1; }
.board-list.grid .empty, .board-list.grid .found { grid-column: 1 / -1; }
.board-list.grid .empty { background: #fff; border-radius: 14px; }
.found { border-top: 1px solid var(--line); padding: 8px 0 6px; background: #fff; }
.board-list.grid .found { border-radius: 14px; border-top: 0; }
.found-title { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 16px; }
.found-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 16px; text-decoration: none; color: inherit; min-width: 0; }
.found-row:hover { background: #f8f9fb; }
.found-row b { flex: none; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.found-row .ftype { flex: none; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 7px; }
.found-row .fsnip { color: #4b5160; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.found-row mark { background: #fff2a8; border-radius: 3px; }
.banner.announce { display: flex; align-items: center; gap: 12px; background: #eef1ff; color: #2b3a8f; border-color: #cdd5ff; }
.banner.announce span { flex: 1; }
.team-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.team-mark.lg { width: 48px; height: 48px; font-size: 20px; border-radius: 12px; }
.team-top { margin-bottom: 10px; }
.team-top .grow { flex: 1; font-size: 16px; }
.modal.wide { width: min(620px, 100%); }
.modal select.wide-sel { width: 100%; }
.modal textarea.input { height: auto; padding: 10px 12px; resize: vertical; font: inherit; }
.tpl-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 6px; }
.tpl-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border: 1px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; font: inherit; color: inherit; }
.tpl-opt:hover, .tpl-opt:focus-visible { border-color: var(--accent); background: #f7f8ff; }
.tpl-opt .tpl-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 18px; }
.tpl-opt span:last-child { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.ntable { display: grid; grid-template-columns: 1fr 70px 70px; align-items: center; gap: 8px 6px; margin: 6px 0 12px; }
.ntable b { font-size: 12.5px; color: var(--muted); text-align: center; }
.ntable input { justify-self: center; width: 18px; height: 18px; }
.person.pick { cursor: pointer; }
.way .input { flex: 1; min-width: 0; }
@media (max-width: 800px) {
  .board-list.grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .bacts { opacity: 1; }
  .found-row { flex-wrap: wrap; }
  .found-row b { max-width: 60%; }
  .found-row .fsnip { flex-basis: 100%; white-space: normal; }
  .way { flex-wrap: wrap; }
  .way b { width: auto; }
}
.bname > div:last-child { min-width: 0; }
@media (max-width: 1000px) and (min-width: 801px) {
  .brow, .bhead { grid-template-columns: minmax(0, 1fr) 120px 40px 40px; }
  .bowner, .bhead .c-owner { display: none; }
}
.talk-row { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.talk-th { width: 64px; height: 40px; border-radius: 6px; background: #1f2329; color: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.talk-th img { width: 100%; height: 100%; object-fit: cover; }
/* обложки по виду содержимого, значки досок */
.bcover.k-doc { background: linear-gradient(135deg, #e7f0ff, #d6e4ff); }
.bcover.k-table { background: linear-gradient(135deg, #e3f7ea, #c9efd7); }
.bcover.k-slides { background: linear-gradient(135deg, #fff1e3, #ffe0c2); }
.bcover.k-mind { background: linear-gradient(135deg, #f1e8ff, #e2d4ff); }
.bcover.k-plan { background: linear-gradient(135deg, #e3f8f7, #c8efec); }
.bcover.k-diagram { background: linear-gradient(135deg, #e8ecf7, #d3dbef); }
.bicon.k-doc { background: #e7f0ff; } .bicon.k-table { background: #e3f7ea; } .bicon.k-slides { background: #fff1e3; } .bicon.k-mind { background: #f1e8ff; } .bicon.k-plan { background: #e3f8f7; } .bicon.k-diagram { background: #e8ecf7; }
.icon-grid { display: grid; grid-template-columns: repeat(6, 44px); gap: 6px; margin: 8px 0; }
.icon-cell { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #e3e5ea; background: #fff; font-size: 22px; cursor: pointer; }
.icon-cell.on { border-color: #4262ff; background: #eef1ff; }
.team-mark { width: 26px; height: 26px; border-radius: 7px; background: #eef1ff; display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: 0 0 auto; }
.team-mark img { width: 100%; height: 100%; object-fit: cover; }
.recent-acc { margin-bottom: 14px; }
.recent-title { font-size: 12px; font-weight: 600; color: #6b7280; margin-bottom: 6px; }
.recent-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.recent-go { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 1px solid #e3e5ea; border-radius: 10px; background: #fff; cursor: pointer; text-align: left; }
.recent-go:hover { border-color: #4262ff; }
.recent-go span { font-size: 12px; color: #6b7280; }
.recent-x { width: 30px; height: 30px; border: 0; background: transparent; font-size: 18px; color: #8a9099; cursor: pointer; border-radius: 8px; }
.recent-x:hover { background: #f3f4f6; }
#magicBtn { display: block; margin: 10px auto 0; }
.digest-row { gap: 8px; margin: 6px 0 10px 26px; flex-wrap: wrap; }
.digest-row select { width: auto; }
.ntable.muted { opacity: .45; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 10px; }
.year-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 12px; background: linear-gradient(135deg, #eef1ff, #f6f0ff); text-align: center; }
.year-card b { font-size: 26px; }
.year-card span { font-size: 12.5px; color: #5f6169; }
.year-ic { font-size: 22px !important; }
.invite-banner { background: #eef1ff; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; line-height: 1.45; }
.brand-ed .ways { margin-bottom: 10px; }
.brand-sw { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); cursor: pointer; display: inline-block; }
.brand-sw.sm { width: 16px; height: 16px; cursor: default; }
.brand-thumb { width: 54px; height: 54px; object-fit: contain; border: 1px solid #e3e5ea; border-radius: 8px; cursor: pointer; background: #fff; }
.brand-folder { border: 1px solid #e3e5ea; border-radius: 10px; padding: 8px; margin-bottom: 6px; }
.row.wrap { flex-wrap: wrap; }
.mem-tools { gap: 8px; margin-bottom: 8px; }
.mem-tools .input { width: auto; flex: 1; }
.mem-bulk { gap: 8px; align-items: center; padding: 6px 8px; background: #f3f5ff; border-radius: 8px; margin-bottom: 8px; }
.mem-bulk select { width: auto; }
.ann-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ann-row + .ann-row { margin-top: 6px; }
.ann-row.prio span { font-weight: 700; }
.ann-edit { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #e3e5ea; border-radius: 10px; margin: 6px 0; }
.ann-edit .row { gap: 6px; align-items: center; }
.auth-card.wide-card { width: min(680px, 100%); }
.status-big { font-size: 26px; font-weight: 800; margin: 6px 0; }
.status-big.ok { color: #12a150; }
.status-meta { color: #6b7280; font-size: 13.5px; margin-bottom: 14px; }
.status-h { font-size: 15px; margin: 16px 0 8px; }
.status-notes { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.status-note { background: #fff4e5; border-radius: 8px; padding: 8px 10px; }
#sub { gap: 8px; }
.dev-doc { font-size: 14.5px; line-height: 1.55; }
.dev-doc pre { background: #1f2329; color: #e8eaf0; padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; }
.dev-doc code { font-family: ui-monospace, Consolas, monospace; }
.dev-doc h2 { font-size: 18px; margin: 22px 0 8px; }
.dev-doc table { border-collapse: collapse; width: 100%; font-size: 13px; }
.dev-doc td, .dev-doc th { border: 1px solid #e3e5ea; padding: 6px 8px; text-align: left; vertical-align: top; }
.person.muted { opacity: .55; }
.tk-text { white-space: pre-wrap; color: #1f2329 !important; }

/* двухфакторная защита: QR-код, ключ, запасные коды */
.tfa-qr { display: block; width: 184px; height: 184px; margin: 8px auto 6px; border: 1px solid #e3e5e8; border-radius: 8px; }
.tfa-key { text-align: center; margin-bottom: 8px; }
.tfa-key code, .tfa-codes code { font: 600 13px ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .5px; }
.tfa-code { font: 600 20px ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 4px; text-align: center; }
.tfa-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; padding: 12px; margin: 8px 0; background: #f6f7f9; border-radius: 8px; text-align: center; }

/* ================= Новый вид списка досок (макет 2026-10-23) ================= */
:root { --ink: #050038; --muted2: #6b6b8a; }
body.dash { background: #fff; color: var(--ink); }
body.dash .ic { stroke-width: 1.9; }
.side { background: #fafafb; border-right: 1px solid #ececf2; padding: 16px 12px; }
.side .brand { text-decoration: none; color: var(--ink); padding: 2px 8px 14px; }
.wordmark { font: 700 26px/1 "Mivorli Brand", var(--font); letter-spacing: -.3px; color: var(--ink); }
.team-btn { background: #fff; box-shadow: 0 0 0 1px #e4e4ec; height: 46px; padding: 0 10px; margin-bottom: 6px; }
.team-btn:hover { background: #fff; box-shadow: 0 0 0 1px #c9c9d6; }
.team-mark { background: #13a8a8; color: #fff; }
.nav button { color: var(--ink); height: 38px; font-weight: 500; }
.nav button .ic { width: 19px; height: 19px; }
.nav button:hover { background: #f0f0f5; }
.nav button.on { background: #e9edff; color: var(--accent); font-weight: 600; }
.topbar { background: #fff; border-bottom: 1px solid #ececf2; padding: 12px 32px; height: 64px; }
.search .input { background: #f3f3f6; border-color: transparent; height: 40px; }
.search .input:focus { background: #fff; border-color: var(--accent); }
.search .ic { top: 10px; }
.content { padding: 24px 32px 48px; }
.content-head { margin: 28px 0 14px; }
.content-head h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.btn { border-radius: 8px; color: var(--ink); border-color: #d9d9e3; }
.btn.primary { color: #fff; }
.input { border-radius: 8px; border-color: #d9d9e3; color: var(--ink); }
select.input { -webkit-appearance: none; appearance: none; padding: 0 32px 0 12px; height: 36px; font-weight: 500; cursor: pointer;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23050038' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 9px center / 15px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
/* «Создать доску» */
.tpl-block { margin-bottom: 4px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sec-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.sec-head .link { font-weight: 500; font-size: 14px; }
.tpl-row { display: flex; gap: 16px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.tpl-tile { flex: 0 0 168px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.tpl-pic { display: grid; place-items: center; height: 104px; border-radius: 10px; background: #f4f4f6; box-shadow: inset 0 0 0 1px #e6e6ec; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.tpl-pic svg { width: 100%; height: 100%; display: block; }
.tpl-tile.blank .tpl-pic { background: var(--accent); box-shadow: none; color: #fff; }
.tpl-tile.blank .tpl-pic .ic { width: 34px; height: 34px; stroke-width: 1.8; }
.tpl-tile:hover .tpl-pic, .tpl-tile:focus-visible .tpl-pic { box-shadow: inset 0 0 0 2px var(--accent); }
.tpl-tile.blank:hover .tpl-pic { background: var(--accent-dark); box-shadow: none; }
.tpl-name { display: block; font-size: 13.5px; font-weight: 500; margin-top: 8px; }
/* инструменты списка */
.list-tools { margin-bottom: 16px; }
.seg { background: #f3f3f6; border: 0; border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { width: 34px; height: 30px; display: grid; place-items: center; color: var(--muted2); }
.seg button .ic { width: 18px; height: 18px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(5, 0, 56, .14); }
/* плитки */
.board-list.grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.bcard { border-radius: 10px; box-shadow: 0 0 0 1px #e4e4ec; transition: box-shadow .15s; }
.bcard:hover, .bcard:focus-visible { box-shadow: 0 0 0 1px #c9c9d6, 0 6px 18px rgba(5, 0, 56, .10); }
.bcover { aspect-ratio: 16 / 10; border-bottom: 1px solid #efeff4; }
.bcover.pv { background: #fff; }
.bcover.pv img { object-fit: contain; }
.binfo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.btext { flex: 1; min-width: 0; }
.binfo .btitle { font-size: 14px; }
.binfo .bsub { margin-top: 2px; font-size: 12px; color: var(--muted2); }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.bacts { top: 8px; right: 8px; box-shadow: 0 1px 4px rgba(5, 0, 56, .14); border-radius: 8px; background: #fff; }
/* список */
.board-list:not(.grid) { box-shadow: 0 0 0 1px #e4e4ec; border-radius: 10px; }
.bicon.thumb { width: 56px; height: 36px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px #e4e4ec; overflow: hidden; padding: 0; }
.bicon.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brow:hover { background: #f8f8fb; }
@media (max-width: 800px) {
  .content { padding: 12px 12px 32px; }
  .topbar { padding: 10px 12px; height: auto; }
  .tpl-tile { flex-basis: 132px; }
  .tpl-pic { height: 82px; }
  .board-list.grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .side .brand { padding: 4px 6px; }
  .wordmark { font-size: 22px; }
}
/* доска без превью (ещё не открывали после обновления) — аккуратная заглушка */
.bcover:not(.pv) { background-color: #f4f4f6; background-image: linear-gradient(#e9e9ef 1px, transparent 1px), linear-gradient(90deg, #e9e9ef 1px, transparent 1px); background-size: 24px 24px; }
.bcover-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(5, 0, 56, .12); font-size: 28px; }
@media (max-width: 800px) { .tpl-row { scrollbar-width: none; } .tpl-row::-webkit-scrollbar { display: none; } }

/* ================= Окна дашборда в новом виде ================= */
.modal-back { background: rgba(5, 0, 56, .28); }
.modal { border-radius: 16px; padding: 24px; color: var(--ink); box-shadow: 0 24px 60px rgba(5, 0, 56, .22), 0 0 0 1px rgba(5, 0, 56, .06); }
.modal h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 18px; }
.modal .hint, .modal p.hint { color: var(--muted2); line-height: 1.5; }
.modal .foot { border-top: 1px solid #ececf2; margin: 22px -24px -24px; padding: 14px 24px; background: #fafafb; border-radius: 0 0 16px 16px; }
.field label { color: var(--ink); }
.btn.small { border-radius: 8px; height: 32px; font-weight: 600; }
.btn.small:not(.primary):not(.danger-fill) { background: #fff; border-color: #d9d9e3; }
.btn.small:not(.primary):not(.danger-fill):hover { background: #f4f4f7; }
.btn.danger { color: var(--danger); }
/* строки «название и пояснение — кнопка справа» */
.ways { margin-top: 20px; border: 1px solid #ececf2; border-radius: 12px; padding: 4px 16px; border-top: 1px solid #ececf2; }
.ways-title { font-size: 13px; font-weight: 700; color: var(--ink); margin: 12px 0 4px; }
.way { display: flex; align-items: center; gap: 16px; padding: 12px 0; min-height: 0; border-top: 1px solid #f1f1f5; }
.ways-title + .way, .ways > .way:first-child { border-top: 0; }
.way-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.way b { width: auto; font-size: 14px; font-weight: 600; }
.way .hint { white-space: normal; overflow: visible; text-overflow: clip; font-size: 13px; color: var(--muted2); }
.way > b { width: 150px; flex: none; }
.way > .hint { flex: 1; }
.way > .btn, .way > select, .way > input[type="checkbox"] { flex: none; }
.way > select.input { width: auto; min-width: 160px; }
.danger-zone { border-color: #f5d0d0; }
/* настройки: разделы слева, содержимое справа */
.modal.settings { width: min(920px, 100%); height: min(640px, calc(100vh - 32px)); padding: 0; display: grid; grid-template-columns: 240px 1fr; overflow: hidden; position: relative; }
.set-side { background: #fafafb; border-right: 1px solid #ececf2; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.set-who { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; min-width: 0; }
.set-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-nav { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font: 500 14px var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.set-nav .ic { width: 19px; height: 19px; flex: none; }
.set-nav:hover { background: #f0f0f5; }
.set-nav.on { background: #e9edff; color: var(--accent); font-weight: 600; }
.set-pane { padding: 24px 32px 24px; overflow-y: auto; min-width: 0; }
.set-pane .foot { margin: 22px 0 0; padding: 0; border: 0; background: none; justify-content: flex-start; }
.pane-head { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; padding-right: 36px; }
.pane-head h2 { margin: 0; }
.btn.back { width: 34px; height: 34px; padding: 0; }
.set-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; padding: 0; }
.set-pane .row:first-of-type .avatar.lg { width: 80px; height: 80px; }
@media (max-width: 760px) {
  .modal.settings { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: calc(100vh - 32px); }
  .set-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #ececf2; padding: 8px; scrollbar-width: none; }
  .set-who { display: none; }
  .set-nav { flex: none; white-space: nowrap; }
  .set-pane { padding: 18px 16px; }
  .way { flex-wrap: wrap; }
  .way > b { width: auto; }
}
.set-pane .team-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.set-pane .team-top .way-text { flex: 1; min-width: 160px; }
.set-who .team-mark { width: 32px; height: 32px; border-radius: 8px; }
.group-add { margin-top: 14px; gap: 8px; }
.group-add .input { flex: 1; }
.way-empty { padding: 14px 0; }
.way > .btn + .btn { margin-left: -8px; }
.set-pane .people { margin-top: 12px; }
.set-pane .person { padding: 10px 0; border-top: 1px solid #f1f1f5; }
.set-pane .person:first-child { border-top: 0; }
/* вход: надпись-логотип, ведёт на главную */
a.auth-brand { text-decoration: none; color: var(--ink, #050038); }
.auth-brand .wordmark { font: 700 30px/1 "Mivorli Brand", var(--font); letter-spacing: -.3px; color: #050038; }
body.login { background: #f6f6f9; }
.auth-card { box-shadow: 0 20px 60px rgba(5, 0, 56, .12), 0 0 0 1px rgba(5, 0, 56, .05); border-radius: 20px; }
/* логотип: стопка стикеров */
.brand-mark { width: 30px; height: 30px; flex: none; display: block; }
.side .brand { display: flex; align-items: center; gap: 8px; }
a.auth-brand { display: flex; align-items: center; gap: 9px; }
a.auth-brand .brand-mark { width: 34px; height: 34px; }
/* импорт из Miro */
.miro-list { margin-top: 12px; border: 1px solid #ececf2; border-radius: 12px; max-height: 380px; overflow-y: auto; }
.miro-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid #f1f1f5; }
.miro-row:first-child { border-top: 0; }
.miro-row:hover { background: #fafafc; }
.miro-wait { padding: 20px 16px; }
.miro-connect { padding: 20px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.miro-connect p { margin: 0; }
.tpl-tile.miro .tpl-pic { background: #fff8d6; box-shadow: inset 0 0 0 1px #f0e2a0; color: #050038; }
.tpl-tile.miro .tpl-pic .ic { width: 30px; height: 30px; }

/* запасной адрес сайта: подсказка на странице входа */
.alt-note { background: #fff7e0; border: 1px solid #f2d27a; color: #5a4300; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; margin-bottom: 14px; }
