:root {
  --navy: #0f1f3a; --navy-2: #172a4d; --navy-3: #22385f; --gold: #c9a45c; --gold-2: #b38d44;
  --bg: #f5f6f8; --panel: #ffffff; --text: #1b2333; --muted: #6b7486; --line: #e3e6ec;
  --blue: #2f6fde; --green: #2e9d5b; --red: #d64545; --amber: #d98e1f; --purple: #7b5cd6;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
}
:root[data-theme="dark"] { --bg: #0e141f; --panel: #151d2b; --text: #e6e9ef; --muted: #98a2b5; --line: #263246; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; }
body { font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", Arial, sans-serif; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
.hidden { display: none !important; }

/* buttons & fields */
.btn { border: 1px solid var(--line); background: var(--panel); padding: 8px 14px; border-radius: 8px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-3); }
[data-theme="dark"] .btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1408; }
[data-theme="dark"] .btn.primary:hover { background: var(--gold-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1a1408; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); outline: none; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,222,.15); }
textarea.input { resize: vertical; min-height: 80px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.error { color: var(--red); font-size: 13px; min-height: 18px; }

/* login */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, var(--navy-3), var(--navy) 70%); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: 14px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .08em; }
.brand .logo { width: 34px; height: 34px; border-radius: 8px; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 800; }
.login-card .brand { font-size: 20px; margin-bottom: 6px; }
.login-card p.sub { color: var(--muted); margin: 0 0 22px; }

/* app layout */
.app { display: grid; grid-template-columns: 260px 1fr; height: 100vh; height: 100dvh; }
.sidebar { background: var(--navy); color: #c8d1e3; display: flex; flex-direction: column; min-height: 0; }
.sidebar .top { padding: 16px; border-bottom: 1px solid var(--navy-3); }
.sidebar .brand { color: #fff; font-size: 16px; }
.sidebar .brand .logo { background: var(--gold); color: var(--navy); }
.sidebar .ws { font-size: 12px; color: #8d9ab4; margin-top: 4px; }
.nav { flex: 1; overflow-y: auto; padding: 10px 8px 16px; }
.nav h4 { margin: 16px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8d9ab4; display: flex; justify-content: space-between; align-items: center; }
.nav h4 button { background: none; border: none; color: #8d9ab4; font-size: 18px; line-height: 1; padding: 0 4px; }
.nav h4 button:hover { color: #fff; }
.nav-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: none; background: none; color: inherit; padding: 6px 10px; border-radius: 6px; }
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item.active { background: var(--gold); color: var(--navy); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; opacity: .85; }
.nav-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item.unread .label { color: #fff; font-weight: 700; }
.badge { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 6px; min-width: 18px; text-align: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #5b6880; display: inline-block; flex: none; }
.dot.on { background: #3ccf7a; }
.me { padding: 12px 14px; border-top: 1px solid var(--navy-3); display: flex; gap: 10px; align-items: center; }
.me .who { flex: 1; min-width: 0; }
.me .who b { color: #fff; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12px; color: #8d9ab4; }
.me button { background: none; border: 1px solid var(--navy-3); color: #c8d1e3; border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.me button:hover { color: #fff; border-color: #8d9ab4; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.header { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--panel); min-height: 60px; }
.header h2 { margin: 0; font-size: 17px; }
.header .desc { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.menu-btn { display: none; border: none; background: none; font-size: 22px; padding: 0 4px; }
.content { flex: 1; overflow-y: auto; min-height: 0; }
.page { padding: 20px; max-width: 1200px; }

.avatar { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; border-radius: 6px; }

/* chat */
.chat { display: flex; flex-direction: column; height: 100%; }
.messages { flex: 1; overflow-y: auto; padding: 16px 20px; }
.msg { display: flex; gap: 10px; padding: 6px 8px; border-radius: 8px; position: relative; }
.msg:hover { background: rgba(127,127,127,.06); }
.msg .meta { display: flex; gap: 8px; align-items: baseline; }
.msg .meta b { font-size: 14px; }
.msg .meta time { font-size: 12px; color: var(--muted); }
.msg .body { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.cont { padding-top: 1px; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg .del { position: absolute; right: 8px; top: 4px; display: none; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; font-size: 12px; padding: 2px 6px; color: var(--red); }
.msg:hover .del { display: block; }
.attach { margin-top: 6px; display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--panel); max-width: 100%; }
.attach img { max-width: 320px; max-height: 240px; border-radius: 6px; display: block; }
.attach.img { padding: 4px; }
.day { text-align: center; margin: 14px 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.empty { color: var(--muted); text-align: center; padding: 40px 10px; }
.typing { height: 18px; font-size: 12px; color: var(--muted); padding: 0 22px; }
.composer { padding: 0 20px 16px; }
.composer .box { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); display: flex; align-items: flex-end; gap: 6px; padding: 6px; }
.composer textarea { flex: 1; border: none; outline: none; resize: none; background: none; padding: 6px; max-height: 160px; min-height: 22px; }
.composer .icon { border: none; background: none; font-size: 18px; padding: 4px 8px; border-radius: 6px; color: var(--muted); }
.composer .icon:hover { background: var(--bg); }
.composer .pending { font-size: 12px; color: var(--muted); padding: 4px 8px; }

/* cards & dashboard */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.warn .n { color: var(--red); }
.section-title { font-size: 15px; font-weight: 700; margin: 6px 0 10px; }

/* tasks */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; }
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: rgba(127,127,127,.07); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.col.over { outline: 2px dashed var(--gold); }
.col h3 { margin: 2px 4px 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; }
.task { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); }
.task.p-low { border-left-color: #8a94a6; } .task.p-medium { border-left-color: var(--blue); }
.task.p-high { border-left-color: var(--amber); } .task.p-urgent { border-left-color: var(--red); }
.task .t { font-weight: 600; margin-bottom: 6px; }
.task .tags { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.pill { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: rgba(127,127,127,.12); color: var(--muted); }
.pill.overdue { background: rgba(214,69,69,.12); color: var(--red); }
.pill.role-admin { background: rgba(201,164,92,.2); color: var(--gold-2); }
.list-task { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-task:last-child { border-bottom: none; }
.list-task .grow { flex: 1; min-width: 0; }

/* tables */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: rgba(127,127,127,.05); }
.table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }
.cell-user { display: flex; gap: 10px; align-items: center; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { border: none; background: none; padding: 8px 14px; border-bottom: 2px solid transparent; font-weight: 600; color: var(--muted); }
.tabs button.active { color: var(--text); border-bottom-color: var(--gold); }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(8,14,26,.55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal h3 { margin: 0 0 16px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.modal .actions .left { margin-right: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 60; box-shadow: var(--shadow); }
.result-group { margin-bottom: 18px; }

/* mobile */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.35); }
  .app.nav-open .nav-backdrop { display: block; }
  .sidebar .top .nav-close { display: grid; }
  .menu-btn { display: block; }
  .header { padding: 10px 16px; }
  .page, .messages { padding-left: 16px; padding-right: 16px; }
  .composer { padding: 0 12px 12px; }
  .board { grid-template-columns: repeat(4, 260px); }
  .attach img { max-width: 100%; }
  .row { flex-direction: column; gap: 0; }
}

/* avatars with photos */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 168px; height: 168px; border-radius: 50%; font-size: 56px; border: 3px solid var(--gold); box-shadow: 0 8px 28px rgba(201,164,92,.28); }

/* profile page */
.profile-card { max-width: 860px; padding: 28px; }
.profile-grid { display: grid; grid-template-columns: 200px 1fr; gap: 36px; }
.avatar-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.avatar-col .avatar.xl { margin-bottom: 6px; }
.btn.block { width: 100%; justify-content: center; }
.hint { font-size: 12px; color: var(--muted); text-align: center; }
.profile-form .input:disabled { opacity: .65; }
.form-buttons { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-buttons .left { margin-right: auto; }
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.notice.success { background: rgba(46,157,91,.12); color: var(--green); border: 1px solid rgba(46,157,91,.3); }
.notice.error { background: rgba(214,69,69,.1); color: var(--red); border: 1px solid rgba(214,69,69,.3); }
.notice.loading { background: rgba(47,111,222,.1); color: var(--blue); border: 1px solid rgba(47,111,222,.3); }

/* cropper */
.crop-wrap { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1; margin: 0 auto; border-radius: 10px; overflow: hidden; touch-action: none; }
.crop-canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.crop-canvas:active { cursor: grabbing; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(8,14,26,.55); border: 2px solid rgba(255,255,255,.85); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; max-width: 300px; margin: 14px auto 6px; color: var(--muted); font-weight: 700; }
.crop-zoom input { flex: 1; accent-color: var(--gold); }

@media (max-width: 820px) {
  .profile-grid { grid-template-columns: 1fr; gap: 20px; }
  .profile-card { padding: 18px; }
  .form-buttons .left { margin-right: 0; width: 100%; }
}

/* ---------- attachments ---------- */
.attachments { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.img-grid { display: grid; gap: 4px; border-radius: 10px; overflow: hidden; }
.img-grid.n1 { grid-template-columns: 1fr; max-width: 360px; }
.img-grid.n2 { grid-template-columns: 1fr 1fr; }
.img-grid.n3, .img-grid.n4 { grid-template-columns: 1fr 1fr; }
.img-grid a { display: block; background: rgba(127,127,127,.12); }
.img-grid img { width: 100%; height: 100%; max-height: 260px; object-fit: cover; display: block; aspect-ratio: 4 / 3; }
.img-grid.n1 img { aspect-ratio: auto; max-height: 300px; object-fit: contain; }
.att-video { width: 100%; max-width: 480px; max-height: 300px; border-radius: 10px; background: #000; }
.file-list { display: flex; flex-direction: column; gap: 4px; }
.file-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 8px 6px 10px; min-width: 0; }
.ficon { font-size: 18px; flex: none; }
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; font-weight: 500; }
.fname:hover { text-decoration: underline; }
.fsize { color: var(--muted); font-size: 12px; flex: none; }
.file-row .btn.sm { padding: 2px 8px; text-decoration: none; }
.zip-link { font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: none; align-self: flex-start; }
.zip-link:hover { text-decoration: underline; }

/* upload queue */
.upl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.upl-item { display: flex; align-items: center; gap: 8px; width: 240px; max-width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 6px 6px 6px 8px; box-shadow: var(--shadow); }
.upl-item.error { border-color: rgba(214,69,69,.5); }
.upl-item.error .upl-sub { color: var(--red); }
.upl-item.done .upl-sub::before { content: '✓ '; color: var(--green); font-weight: 700; }
.upl-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; }
.upl-thumb.ico { display: grid; place-items: center; font-size: 20px; background: rgba(127,127,127,.1); }
.upl-main { flex: 1; min-width: 0; }
.upl-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upl-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upl-bar { height: 4px; background: rgba(127,127,127,.18); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.upl-bar i { display: block; height: 100%; background: var(--gold); transition: width .2s; }
.upl-x { border: none; background: none; font-size: 18px; line-height: 1; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.upl-x:hover { background: rgba(127,127,127,.15); color: var(--red); }

/* drag & drop */
.chat, .drop-area { position: relative; }
.drop-hint { display: none; position: absolute; inset: 8px; border: 2px dashed var(--gold); border-radius: 12px; background: rgba(201,164,92,.12); z-index: 5; place-items: center; pointer-events: none; font-weight: 700; font-size: 16px; color: var(--gold-2); }
.drop-on > .drop-hint { display: grid; }
.drop-area { min-height: 60vh; }
.task-att label { display: flex; justify-content: space-between; align-items: center; }
.zip-inline { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--blue); text-decoration: none; }
.att-drop { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; }
.task-att.drop-on .att-drop { border-color: var(--gold); background: rgba(201,164,92,.1); }
.task-att .file-list { margin-bottom: 6px; }
@media (max-width: 820px) { .upl-item { width: 100%; } .attachments { max-width: 100%; } }
.img-grid.n3 a:first-child { grid-column: span 2; }
.img-grid.n3 a:first-child img { aspect-ratio: 16 / 9; }

/* ---------- Mesh wordmark ---------- */
.wordmark { display: inline-flex; align-items: baseline; font-family: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-weight: 800; letter-spacing: -0.055em; line-height: 1; color: var(--navy); font-size: 28px; padding-right: .02em; user-select: none; }
.wordmark .node { display: inline-block; width: .2em; height: .2em; border-radius: 50%; background: var(--gold); margin-left: .07em; transform: translateY(-.02em);
  box-shadow: 0 0 0 .05em rgba(201,164,92,.22); }
.wordmark.xl { font-size: 56px; }
.wordmark.lg { font-size: 40px; }
.wordmark.side { font-size: 30px; color: #fff; }
.login-brand { margin-bottom: 22px; }
.login-brand .tagline { margin-top: 10px; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.login-title { margin: 0 0 6px; font-size: 18px; }
.sidebar .top .ws { margin-top: 8px; }
[data-theme="dark"] .wordmark { color: #fff; }

/* ---------- priority messages ---------- */
.msg-actions { position: absolute; right: 8px; top: 4px; display: none; gap: 4px; }
.msg:hover .msg-actions { display: flex; }
.msg-actions .del, .msg-actions .flag { position: static; display: inline-block; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; font-size: 12px; padding: 2px 6px; }
.msg-actions .flag:hover { border-color: var(--red); }
.prio-badge { display: none; align-self: flex-start; width: max-content; margin: 2px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--red); background: rgba(214,69,69,.1); border: 1px solid rgba(214,69,69,.3); border-radius: 10px; padding: 1px 8px; }
.msg.priority { background: rgba(214,69,69,.06); box-shadow: inset 3px 0 0 var(--red); }
.msg.priority .prio-badge { display: block; }
.msg.priority.cont .avatar { visibility: visible; height: auto; }
.prio-toggle { filter: grayscale(1); opacity: .55; }
.prio-toggle.on { filter: none; opacity: 1; background: rgba(214,69,69,.12) !important; box-shadow: inset 0 0 0 1px rgba(214,69,69,.4); }

/* dashboard message feeds */
.msg-feed { overflow: hidden; }
.feed-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.feed-row:last-child { border-bottom: none; }
.feed-row:hover { background: rgba(127,127,127,.06); }
.feed-row .grow { flex: 1; min-width: 0; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--muted); }
.feed-meta b { color: var(--text); font-size: 13px; }
.feed-body { margin-top: 2px; font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.feed-files { color: var(--muted); font-size: 12px; }
.prio-feed { border-color: rgba(214,69,69,.35); }
.prio-feed .feed-row { box-shadow: inset 3px 0 0 var(--red); }

/* ---------- @mentions ---------- */
.mention { color: var(--blue); background: rgba(47,111,222,.1); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.mention.mention-me { color: #8a5a00; background: rgba(201,164,92,.28); }
[data-theme="dark"] .mention.mention-me { color: #f0d39a; }
[data-theme="dark"] .mention { color: #8fb4ff; }
.msg.mentions-me:not(.priority) { background: rgba(201,164,92,.1); box-shadow: inset 3px 0 0 var(--gold); }
.composer { position: relative; }
.mention-pop { position: absolute; left: 20px; bottom: calc(100% - 4px); width: 300px; max-width: calc(100% - 40px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 4px; z-index: 20; }
.mention-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.mention-opt.on, .mention-opt:hover { background: rgba(201,164,92,.18); }
.mention-opt b { font-size: 13px; }
.mention-sub { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.mention-feed .feed-row { box-shadow: inset 3px 0 0 var(--gold); }

/* ---------- supervisor view ---------- */
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: livepulse 1.6s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(46,157,91,.55); } 70% { box-shadow: 0 0 0 8px rgba(46,157,91,0); } 100% { box-shadow: 0 0 0 0 rgba(46,157,91,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot::before { animation: none; } }
.team-today td.num { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.team-today th:nth-child(n+3) { text-align: center; }
.team-today td.num.zero { color: var(--muted); font-weight: 400; }
.team-today td.num.hl:not(.zero) { color: var(--gold-2); }
.team-today td.num.good:not(.zero) { color: var(--green); }
.team-today td:nth-child(2) { white-space: nowrap; font-size: 13px; color: var(--muted); }
.timeline { max-height: 480px; overflow-y: auto; }
.tl-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tl-row:last-child { border-bottom: none; }
.tl-row[onclick], .tl-mention { cursor: pointer; }
.tl-row time { flex: none; width: 64px; color: var(--muted); font-size: 12px; padding-top: 4px; font-variant-numeric: tabular-nums; }
.tl-row .grow { flex: 1; min-width: 0; padding-top: 2px; }
.tl-body { margin-top: 2px; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-mention { box-shadow: inset 3px 0 0 var(--gold); }

/* ---------- channel members modal ---------- */
.modal.wide { max-width: 640px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: none; background: none; padding: 7px 12px; border-radius: 7px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--navy); color: #fff; }
[data-theme="dark"] .seg button.on { background: var(--gold); color: #1a1408; }
.cm-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-height: 340px; overflow-y: auto; }
.cm-row { display: grid; grid-template-columns: 1fr 70px 90px 80px; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cm-table.open .cm-row { grid-template-columns: 1fr 90px; }
.cm-row:last-child { border-bottom: none; }
.cm-row.sel:not(.cm-head) { background: rgba(201,164,92,.08); }
.cm-head { position: sticky; top: 0; z-index: 1; background: var(--panel); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cm-col { display: flex; justify-content: center; align-items: center; gap: 6px; }
.cm-head .cm-col { cursor: pointer; }
.cm-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.cm-row input[type=checkbox]:disabled { cursor: not-allowed; opacity: .6; }
.cm-sub { font-size: 12px; color: var(--muted); }
.cm-you { font-weight: 400; color: var(--muted); font-size: 12px; }
.cm-summary { margin-top: 8px; font-size: 13px; font-weight: 600; }
.cm-legend { margin-top: 4px; font-size: 12px; color: var(--muted); }
.cm-check { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; }
@media (max-width: 560px) { .cm-row { grid-template-columns: 1fr 44px 66px 56px; padding: 8px; } .cm-head { font-size: 10px; } }

/* ---------- settings ---------- */
.settings { max-width: 980px; }
.set-card { padding: 8px 22px 18px; }
.set-intro { margin: 14px 0 6px; padding: 10px 14px; border-radius: 8px; background: rgba(201,164,92,.1); border: 1px solid rgba(201,164,92,.3); font-size: 13px; }
.set-h { margin: 22px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.set-row { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.4fr); gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-row:last-of-type { border-bottom: none; }
.set-label > div:first-child { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.set-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.set-ctl { display: flex; justify-content: flex-start; }
.set-ctl .input { max-width: 320px; }
.set-tag { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 7px; border-radius: 8px; background: rgba(127,127,127,.14); color: var(--muted); margin-left: 6px; }
.set-tag.custom { background: rgba(201,164,92,.22); color: var(--gold-2); }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 16px; padding: 10px 0; }
.set-check, .switch { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.set-check input, .switch input { width: 18px; height: 18px; accent-color: var(--gold); }
.set-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.set-status { font-size: 13px; color: var(--muted); }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--gold); }
tr.is-admin td { background: rgba(201,164,92,.08); }
@media (max-width: 720px) { .set-row { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- roles ---------- */
.role-head { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.role-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.role-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.role-card .grow { flex: 1; min-width: 0; }
.role-name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.role-perms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; }
.role-perm { align-items: flex-start; }
.role-perm input { margin-top: 3px; }
.settings > .card + .card, #root .set-card + .set-card { margin-top: 16px; }
.field .role-perms label.role-perm { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); font-weight: 400; }
.role-perm input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--gold); }

/* mobile drawer backdrop + close */
.nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(8,14,26,.5); z-index: 39; }
.sidebar .top { position: relative; }
.nav-close { display: none; position: absolute; top: 12px; right: 10px; width: 36px; height: 36px; place-items: center; border: none; background: rgba(255,255,255,.08); color: #fff; font-size: 22px; border-radius: 8px; }

/* ======================================================================
   Device-friendly pass: phones (≤600), tablets (≤820), touch screens
   ====================================================================== */
.m-only { display: none; }
.m-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.menu-btn { width: 44px; height: 44px; margin-left: -8px; border-radius: 8px; flex: none; }
.nav h4 button { min-width: 32px; min-height: 32px; border-radius: 6px; }
.header { flex-wrap: nowrap; }
.header h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { white-space: nowrap; flex: none; }
img, video { max-width: 100%; }

/* touch devices: no hover — show message actions on tap, bigger targets */
@media (hover: none) {
  .msg:hover .msg-actions { display: none; }
  .msg.tapped { background: rgba(127,127,127,.08); }
  .msg.tapped .msg-actions { display: flex; }
  .msg-actions .del, .msg-actions .flag { min-height: 36px; min-width: 40px; font-size: 14px; }
  .upl-x { min-width: 40px; min-height: 40px; font-size: 22px; }
  .file-row .btn.sm { min-width: 40px; min-height: 36px; }
  .btn.sm { min-height: 36px; }
  .nav-item { min-height: 44px; }
  input[type=checkbox] { width: 24px !important; height: 24px !important; }
  .composer .icon { min-width: 40px; min-height: 40px; }
}

@media (max-width: 820px) {
  /* stop iOS zooming into inputs (needs ≥16px) */
  .input, textarea, select, .composer textarea, input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date] { font-size: 16px; }
  .header .desc { display: none; }
  .header { gap: 8px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .header .btn { padding: 8px 12px; white-space: nowrap; }
  .composer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .modal { max-height: calc(100dvh - 32px); }
  .zip-link, .fname, .zip-inline { padding: 6px 0; display: inline-block; }
  .toast { bottom: max(20px, env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); text-align: center; }
}

@media (max-width: 600px) {
  .page { padding: 14px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .n { font-size: 22px; }
  /* tasks: stack columns, full width (drag works with a mouse; on phones open a task to change status) */
  .board { grid-template-columns: 1fr; overflow-x: visible; }
  .col { min-height: 0; }
  .toolbar .input { flex: 1 1 140px; width: 100%; }
  /* files: name + one info line, actions */
  .m-only { display: block; }
  .files-table th:nth-child(2), .files-table td:nth-child(2),
  .files-table th:nth-child(3), .files-table td:nth-child(3),
  .files-table th:nth-child(4), .files-table td:nth-child(4),
  .files-table th:nth-child(5), .files-table td:nth-child(5) { display: none; }
  .files-table td:last-child { white-space: nowrap; text-align: right; }
  .file-name-cell { word-break: break-word; }
  /* team: email moves under the name */
  .team-table th:nth-child(2), .team-table td:nth-child(2), .team-table th:nth-child(4), .team-table td:nth-child(4) { display: none; }
  .team-table td:last-child { white-space: nowrap; text-align: right; }
  .team-table td:last-child .btn { margin: 2px 0; }
  /* settings */
  .set-card { padding: 4px 14px 14px; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1 1 0; padding: 8px 6px; text-align: center; }
  .set-ctl .input { max-width: none; width: 100%; }
  .set-actions { flex-direction: column-reverse; align-items: stretch; }
  .set-actions .btn { justify-content: center; }
  .set-actions span[style] { display: none; }
  .role-card { flex-wrap: wrap; }
  .role-card .grow { flex-basis: 100%; }
  .role-card .btn { flex: 1; justify-content: center; }
  .role-head { flex-wrap: wrap; gap: 8px; }
  /* members & admins table → stacked */
  .members-table thead { display: none; }
  .members-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .members-table td { border: none; padding: 0 10px; }
  .members-table td:first-child { grid-column: 1 / -1; }
  .members-table td:last-child { grid-column: 1 / -1; }
  .members-table td:last-child .btn { width: 100%; justify-content: center; }
  .members-table select { width: 100%; }
  /* channel members modal */
  .cm-row { grid-template-columns: minmax(0, 1fr) 46px 62px 52px; gap: 4px; padding: 8px; }
  .cm-head > * { white-space: normal; line-height: 1.15; text-align: center; font-size: 10px; }
  .cm-head .cm-col { flex-direction: column; gap: 2px; }
  .cm-row .cell-user .avatar { display: none; }
  .cm-sub { display: none; }
  /* modals become bottom sheets */
  .overlay { align-items: end; padding: 0; }
  .modal { max-width: none !important; width: 100%; border-radius: 16px 16px 0 0; padding: 18px 16px max(18px, env(safe-area-inset-bottom)); max-height: 92dvh; }
  .modal .actions { position: sticky; bottom: 0; background: var(--panel); padding: 10px 0 2px; z-index: 2; }
  .modal .actions .btn { flex: 1; justify-content: center; }
  .modal .actions .left { flex: 0 0 auto; }
  /* chat */
  .messages { padding: 10px 10px; }
  .msg { padding: 6px 4px; gap: 8px; }
  .attachments { max-width: 100%; }
  .img-grid.n1 { max-width: 100%; }
  .feed-row { padding: 10px 12px; }
  .team-today { min-width: 680px; }
  .tl-row time { width: 52px; }
  .profile-card { padding: 16px; }
  .avatar.xl { width: 132px; height: 132px; font-size: 44px; }
  .login-card { padding: 26px 20px; }
  .wordmark.xl { font-size: 48px; }
}
@media (max-width: 820px) {
  .me button { min-height: 36px; padding: 6px 10px; }
  .file-name-cell > a { display: inline-block; padding: 8px 0; }
}
@media (max-width: 600px) {
  .team-table th:nth-child(3), .team-table td:nth-child(3) { display: none; }
  .modal { padding-bottom: 0; }
  .modal .actions { padding-bottom: max(14px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 12px -10px rgba(0,0,0,.25); }
}
@media (max-width: 600px) {
  .team-table td:last-child { width: 1%; }
  .team-table td:last-child .btn { display: flex; width: 100%; justify-content: center; margin: 4px 0; }
  .team-table .cell-user > div { min-width: 0; overflow-wrap: anywhere; }
}


/* ===== MESH RESPONSIVE PATCH (added Oct 16 2026) — delete from here to the END marker to undo ===== */
@media (pointer: coarse), (max-width: 820px) {
  .nav-item { min-height: 44px; }
  .menu-btn { min-width: 44px; min-height: 44px; }
  .header button, .composer button, .form-buttons button, .tabs button, .seg button { min-height: 40px; }
  textarea, select, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]) { font-size: 16px !important; }
}
@media (max-width: 820px) {
  .header { gap: 8px; }
  .header .desc { display: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs > * { white-space: nowrap; flex: 0 0 auto; }
  .board { scroll-snap-type: x mandatory; grid-template-columns: repeat(4, minmax(82%, 1fr)); padding-bottom: 8px; }
  .board .col { scroll-snap-align: start; }
  .messages img { max-height: 55vh; max-width: 100%; height: auto; object-fit: contain; }
}
@media (max-width: 720px) {
  .table-wrap { overflow: visible; }
  table.table:not(.team-today) thead { display: none; }
  table.table:not(.team-today), table.table:not(.team-today) tbody { display: block; width: 100%; }
  table.table:not(.team-today) tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--line, rgba(128,128,128,.25)); border-radius: 12px; background: var(--panel, transparent); }
  table.table:not(.team-today) td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  table.table:not(.team-today) td:nth-child(1) { grid-column: 1 / -1; }
  table.table:not(.team-today) td:nth-child(2) { grid-column: 1 / -1; opacity: .8; font-size: 13px; }
  table.table:not(.team-today) td:nth-child(5) { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
  .team-today { min-width: 640px; }
}
@media (max-width: 380px) { .page { padding-left: 12px; padding-right: 12px; } }
@media (min-width: 1200px) { .page { max-width: 1320px; margin-inline: auto; } }
@media (min-width: 1700px) { .page { max-width: 1480px; } }
.composer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
/* ===== END MESH RESPONSIVE PATCH ===== */


/* ===== MESH PRIORITY (added Oct 16 2026) ===== */
.pri-row { display: flex; align-items: center; gap: 6px; margin: 6px 0 2px; }
.pri-badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; color: #fff; line-height: 1.5; white-space: nowrap; }
.pri-badge.pri-urgent { background: var(--red); }
.pri-badge.pri-high { background: var(--amber); }
.pri-badge.pri-medium { background: var(--blue); }
.pri-badge.pri-low { background: var(--muted); }
.pri-quick { margin-left: auto; font-size: 12px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); max-width: 96px; cursor: pointer; }
.list-task .pri-badge { align-self: flex-start; }
@media (pointer: coarse) { .pri-quick { font-size: 16px !important; min-height: 36px; max-width: 120px; } .pri-badge { font-size: 11px; } }
@media (max-width: 820px) { .toolbar { flex-wrap: wrap; gap: 8px; } .toolbar select { flex: 1 1 140px; min-width: 0; } }
/* ===== END MESH PRIORITY ===== */


/* ===== MESH SIGN-IN & ACCESS REQUESTS (added Oct 17 2026) ===== */
.si { --si-bg:#0f1a33; --si-card:#141d33; --si-line:#26324f; --si-line2:#33405f; --si-text:#eef1f7; --si-muted:#9aa4bb; --si-dim:#6f7a93;
  --si-gold:#c9a862; --si-gold2:#d9bb79; --si-ink:#1a1405; --si-ok:#3fb27f; --si-warn:#e0a948; --si-bad:#e0605a;
  min-height:100%; display:flex; flex-direction:column; color:var(--si-text); color-scheme:dark; position:relative;
  background:radial-gradient(1200px 700px at 50% -10%, #24345c 0%, var(--si-bg) 60%) fixed, var(--si-bg);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,"Noto Sans Bengali",Helvetica,Arial,sans-serif; -webkit-font-smoothing:antialiased; }
.si::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.06;
  background-image:linear-gradient(var(--si-text) 1px,transparent 1px),linear-gradient(90deg,var(--si-text) 1px,transparent 1px);
  background-size:44px 44px; -webkit-mask-image:radial-gradient(600px 400px at 50% 20%,#000,transparent); mask-image:radial-gradient(600px 400px at 50% 20%,#000,transparent); }
.si-topbar { height:4px; background:linear-gradient(90deg,var(--si-gold),#7d6a3d 50%,var(--si-gold)); }
.si-main { flex:1; display:flex; justify-content:center; padding:56px 16px 40px; position:relative; }
.si-wrap { width:100%; max-width:440px; }
.si-brand { display:flex; flex-direction:column; align-items:center; margin-bottom:36px; }
.si-brand .wordmark { color:#fff; font-size:44px; }
.si-tag { display:block; text-align:center; font-size:11px; letter-spacing:2.4px; color:var(--si-muted); margin-top:10px; font-weight:600; }
.si h1 { font-size:32px; line-height:1.15; letter-spacing:-.8px; margin:0 0 10px; text-align:center; font-weight:800; }
.si-sub { color:var(--si-muted); text-align:center; margin:0 0 28px; font-size:15px; line-height:1.5; }
.si-sub b { color:var(--si-text); font-weight:600; }
.si-view { animation:si-in .25s ease; }
@keyframes si-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.si-field { margin-bottom:14px; }
.si-field > label { display:block; font-size:12px; font-weight:600; color:var(--si-muted); letter-spacing:.4px; margin:0 0 6px; text-transform:uppercase; }
.si-input { width:100%; height:48px; border-radius:10px; border:1px solid var(--si-line2); background:#111a2e; color:var(--si-text);
  padding:0 14px; font-size:16px; outline:none; transition:border .15s, box-shadow .15s; font-family:inherit; }
select.si-input { appearance:none; -webkit-appearance:none; padding-right:36px;
  background-image:linear-gradient(45deg,transparent 50%,var(--si-muted) 50%),linear-gradient(135deg,var(--si-muted) 50%,transparent 50%);
  background-position:calc(100% - 20px) 21px,calc(100% - 15px) 21px; background-size:5px 5px; background-repeat:no-repeat; }
.si-input::placeholder { color:var(--si-dim); }
.si-input:focus { border-color:var(--si-gold); box-shadow:0 0 0 4px rgba(201,168,98,.18); }
.si-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.si-pw { position:relative; }
.si-pw .si-input { padding-right:68px; }
.si-peek { position:absolute; right:8px; top:10px; height:28px; padding:0 8px; background:none; border:0; color:var(--si-muted); cursor:pointer; font-size:13px; }
.si-btn { width:100%; height:48px; border-radius:10px; border:0; font-weight:700; font-size:16px; cursor:pointer; font-family:inherit;
  display:flex; align-items:center; justify-content:center; gap:10px; transition:transform .05s, background .15s; }
.si-btn:active { transform:translateY(1px); }
.si-btn:disabled { opacity:.6; cursor:default; }
.si-btn.primary { background:var(--si-gold); color:var(--si-ink); }
.si-btn.primary:hover { background:var(--si-gold2); }
.si-btn.ghost { background:transparent; color:var(--si-text); border:1px solid var(--si-line2); }
.si-btn.ghost:hover { border-color:var(--si-muted); background:rgba(255,255,255,.03); }
.si-link { color:var(--si-gold2); font-weight:600; cursor:pointer; background:none; border:0; font:inherit; padding:0; }
.si-link:hover { text-decoration:underline; }
.si-center { text-align:center; }
.si-muted { color:var(--si-muted); font-size:14px; line-height:1.6; }
.si-err { color:var(--si-bad); font-size:13px; margin:6px 0 10px; display:none; }
.si-err.on { display:block; }
.si-chipwrap { display:flex; justify-content:center; }
.si-chip { display:inline-flex; align-items:center; gap:8px; background:#111a2e; border:1px solid var(--si-line2); border-radius:999px; padding:6px 8px 6px 12px; font-size:14px; margin:0 auto 24px; max-width:100%; }
.si-chip span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.si-chip button { background:var(--si-line); border:0; color:var(--si-muted); border-radius:999px; padding:3px 10px; font-size:12px; cursor:pointer; flex:none; }
.si-toggle { display:flex; gap:12px; align-items:flex-start; padding:14px; border:1px solid var(--si-line2); border-radius:10px; cursor:pointer; margin-bottom:12px; background:#111a2e; }
.si-toggle input { width:18px; height:18px; margin-top:2px; accent-color:var(--si-gold); flex:none; }
.si-toggle strong { display:block; font-size:14px; }
.si-toggle span { font-size:13px; color:var(--si-muted); }
.si-icon { width:64px; height:64px; border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 22px; color:var(--si-gold2);
  background:rgba(201,168,98,.12); border:1px solid rgba(201,168,98,.35); }
.si-icon.bad { color:var(--si-bad); background:rgba(224,96,90,.12); border-color:rgba(224,96,90,.4); }
.si-path { border:1px solid var(--si-line); border-radius:12px; padding:18px; background:var(--si-card); margin:6px 0 24px; }
.si-step { display:flex; gap:14px; position:relative; padding-bottom:18px; }
.si-step:last-child { padding-bottom:0; }
.si-step:not(:last-child)::after { content:""; position:absolute; left:11px; top:26px; bottom:2px; width:2px; background:var(--si-line2); }
.si-dot { width:24px; height:24px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800;
  border:2px solid var(--si-line2); color:var(--si-dim); background:var(--si-card); z-index:1; }
.si-step.done .si-dot { background:var(--si-ok); border-color:var(--si-ok); color:#06210f; }
.si-step.now .si-dot { border-color:var(--si-warn); color:var(--si-warn); box-shadow:0 0 0 4px rgba(224,169,72,.15); }
.si-step b { display:block; font-size:14px; }
.si-step small { color:var(--si-muted); font-size:13px; }
.si-note { font-size:13px; color:var(--si-muted); border-left:3px solid var(--si-gold); padding:8px 12px; background:rgba(201,168,98,.06); border-radius:0 8px 8px 0; margin-bottom:18px; }
.si-foot { display:flex; justify-content:center; gap:22px; flex-wrap:wrap; padding:20px 16px max(28px, env(safe-area-inset-bottom)); color:var(--si-dim); font-size:13px; position:relative; }
@media (max-width:520px) {
  .si-main { padding-top:36px; }
  .si h1 { font-size:26px; }
  .si-row { grid-template-columns:1fr; gap:0; }
}
/* approvals page */
.badge.gold { background:var(--gold); color:#1a1408; }
.ap-page { max-width:820px; }
.ap-note { font-size:13px; color:var(--muted); border-left:3px solid var(--gold); padding:8px 12px; background:rgba(201,164,92,.08); border-radius:0 8px 8px 0; margin-bottom:18px; }
.ap-req { display:flex; gap:14px; align-items:center; margin-bottom:10px; flex-wrap:wrap; }
.ap-req > .avatar { width:42px; height:42px; border-radius:10px; flex:none; font-weight:800; }
.ap-who { flex:1; min-width:180px; overflow-wrap:anywhere; }
.ap-who b { font-size:15px; }
.ap-meta { color:var(--muted); font-size:13px; margin-top:3px; }
.ap-badge { font-size:11px; font-weight:700; letter-spacing:.5px; padding:2px 8px; border-radius:6px; text-transform:uppercase; vertical-align:2px; }
.ap-badge.sup { background:rgba(201,164,92,.18); color:var(--gold-2); }
.ap-badge.mem { background:rgba(47,111,222,.12); color:var(--blue); }
[data-theme="dark"] .ap-badge.sup { color:var(--gold); }
.ap-acts { display:flex; gap:8px; }
.ap-acts .ap-ok { background:var(--green); border-color:var(--green); color:#fff; }
@media (max-width:600px) { .ap-acts { width:100%; } .ap-acts .btn { flex:1; justify-content:center; min-height:40px; } }
/* ===== END MESH SIGN-IN ===== */

/* ===== MESH WORKSPACE MENU (added Oct 17 2026) ===== */
.ws-switch { display:block; width:100%; text-align:left; background:none; border:0; color:inherit; padding:6px 8px; margin:-6px -8px; border-radius:8px; cursor:pointer; width:calc(100% + 16px); }
.ws-switch:hover, .ws-switch[aria-expanded="true"] { background:var(--navy-2); }
.ws-switch:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.ws-line { display:flex; align-items:center; gap:8px; }
.ws-caret { color:#c8d1e3; font-size:14px; line-height:1; transform:translateY(2px); }
.sidebar .top .nav-close { z-index:2; }
.ws-menu { position:absolute; left:10px; top:calc(100% - 6px); z-index:60; width:300px; max-width:calc(100vw - 20px);
  background:#22262e; color:#e8eaee; border:1px solid #3a3f4a; border-radius:12px; box-shadow:0 18px 50px rgba(0,0,0,.45); padding:6px 0; animation:ws-in .14s ease; max-height:calc(100dvh - 110px); overflow-y:auto; overscroll-behavior:contain; }
@keyframes ws-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.ws-head { display:flex; gap:12px; align-items:center; padding:12px 16px 14px; }
.ws-tile { width:44px; height:44px; border-radius:10px; background:linear-gradient(135deg, var(--gold), var(--gold-2)); color:var(--navy); font-weight:800; font-size:17px; display:grid; place-items:center; flex:none; }
.ws-id { min-width:0; }
.ws-id b { display:block; font-size:16px; color:#fff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ws-id span { display:block; font-size:12.5px; color:#a3a9b5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ws-sep { height:1px; background:#3a3f4a; margin:6px 0; }
.ws-item { display:flex; align-items:center; gap:10px; width:100%; background:none; border:0; color:inherit; text-align:left; padding:8px 16px; font-size:14.5px; min-height:38px; cursor:pointer; }
.ws-item > span:first-child { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ws-item:hover, .ws-item:focus-visible { background:var(--blue); color:#fff; outline:none; }
.ws-item:hover .ws-hint, .ws-item:hover .ws-chev { color:#fff; }
.ws-hint { font-size:12px; color:#8d939f; }
.ws-chev { font-size:18px; color:#a3a9b5; transition:transform .15s; }
.ws-item.open .ws-chev { transform:rotate(90deg); }
.ws-sub { background:rgba(0,0,0,.18); padding:4px 0; }
.ws-sub .ws-item { padding-left:30px; font-size:13.5px; min-height:34px; }
.ws-p { margin:0 0 14px; color:var(--muted); line-height:1.55; }
.ws-link { display:flex; gap:8px; margin-bottom:12px; }
.ws-link .input { flex:1; min-width:0; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:13px; }
.ws-share { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.ws-share .btn { text-decoration:none; color:var(--text); }
.ws-alt { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; padding:12px; border:1px dashed var(--line); border-radius:8px; font-size:13px; color:var(--muted); margin-bottom:6px; }
.ws-qrwrap { display:flex; justify-content:center; margin:4px 0 14px; }
.ws-qr { width:200px; height:200px; border-radius:10px; border:1px solid var(--line); background:#fff; image-rendering:pixelated; }
.ws-steps { margin:0 0 14px; padding-left:20px; line-height:1.6; color:var(--text); }
.ws-steps li + li { margin-top:4px; }
@media (pointer: coarse), (max-width: 820px) { .ws-item { min-height:44px; } .ws-sub .ws-item { min-height:42px; } }
@media (max-width: 480px) { .ws-share .btn { flex:1 1 auto; justify-content:center; } }
/* ===== END MESH WORKSPACE MENU ===== */
