/* MIS · dense, readable, Zricks red chrome. Desktop rows stay within 2 lines at 1366px; phones get cards. */
:root {
    --zr: #cf003f;
    --zr-dark: #a10031;
    --zr-soft: #fde8ee;
    --bg: #f3f4f7;
    --card: #fff;
    --line: #e6e7eb;
    --line-2: #f0f1f4;
    --ink: #1b1c20;
    --ink-2: #55575f;
    --ink-3: #8a8c94;
    --good: #0b8a3e;
    --bad: #c62828;
    --warn: #b45309;
    --blue: #2a78d6;
    --top: 90px;      /* header + toolbar: the table header sticks below them */
    --head: #14151a;
    --shadow: 0 1px 2px rgba(16,18,27,.06), 0 1px 1px rgba(16,18,27,.04);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); -webkit-font-smoothing: antialiased; color: var(--ink); font: 13px/1.35 Inter, "Segoe UI", Arial, sans-serif; }
a { color: var(--zr); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.m-hide { display: none !important; }
.m-muted { color: var(--ink-3); }
.m-red { color: var(--bad); }
.m-good { color: var(--good); }
.m-nowrap { white-space: nowrap; }

/* ---------- buttons & inputs ---------- */
.m-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; white-space: nowrap; font-weight: 500; }
.m-btn:hover { border-color: #c9cbd3; text-decoration: none; }
.m-btn:disabled { opacity: .5; cursor: default; }
.m-btn.zr { background: var(--zr); border-color: var(--zr); color: #fff; font-weight: 600; }
.m-btn.zr:hover { background: var(--zr-dark); }
.m-btn.sm { height: 24px; padding: 0 7px; font-size: 12px; }
.m-btn.ic { width: 28px; padding: 0; justify-content: center; }
.m-btn.sm.ic { width: 24px; }
.m-btn.wa { color: #128c4b; }
.m-btn.danger { color: var(--bad); }
.m-in { height: 28px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: #fff; min-width: 0; width: 100%; }
textarea.m-in { height: auto; padding: 5px 8px; resize: vertical; }
.m-in:focus, .m-btn:focus-visible { outline: 2px solid rgba(207,0,63,.25); border-color: var(--zr); }
label.m-f { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
label.m-f > span { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.m-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; }
.m-grid .s2 { grid-column: span 2; } .m-grid .s3 { grid-column: span 3; } .m-grid .s4 { grid-column: 1 / -1; }
.m-check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; white-space: nowrap; }
.m-check input { accent-color: var(--zr); margin: 0; }

/* ---------- header + toolbar ---------- */
.m-head { position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 8px rgba(16,18,27,.08); }
.m-top { height: 50px; background: linear-gradient(90deg, var(--head) 0%, #1d1e25 60%, #2a0f19 100%); color: #e7e8ec; display: flex; align-items: center; gap: 14px; padding: 0 12px; }
.m-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; white-space: nowrap; letter-spacing: .02em; }
.m-brand img { height: 26px; background: #fff; border-radius: 6px; padding: 3px 6px; }
.m-brand span { border-left: 1px solid #3a3b44; padding-left: 8px; font-size: 14px; }
.m-brand:hover { text-decoration: none; }
.m-search { flex: 1 1 420px; max-width: 620px; position: relative; display: flex; }
.m-search > i { position: absolute; left: 11px; top: 10px; color: #8a8c94; font-size: 13px; }
.m-search input { height: 34px; padding-left: 32px; border: 1px solid #34353d; border-right: 0; border-radius: 8px 0 0 8px; background: #23242b; color: #fff; }
.m-search input::placeholder { color: #8a8c94; }
.m-search input:focus { outline: 0; border-color: var(--zr); background: #2a2b33; }
.m-sbtn { height: 34px; border: 0; border-radius: 0 8px 8px 0; background: var(--zr); color: #fff; font-weight: 600; padding: 0 16px; cursor: pointer; white-space: nowrap; }
.m-sbtn:hover { background: var(--zr-dark); }
.m-user { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12.5px; color: #d6d7dc; }
.m-uav { width: 28px; height: 28px; border-radius: 50%; background: var(--zr); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; text-transform: uppercase; }
.m-user a { color: #a9abb3; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; }
.m-user a:hover { background: #2a2b33; color: #fff; text-decoration: none; }
.m-bar { height: 40px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.m-seg { display: inline-flex; background: var(--line-2); border-radius: 8px; padding: 2px; gap: 2px; }
.m-chip { height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 6px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; white-space: nowrap; font-weight: 500; }
.m-chip:hover { color: var(--ink); }
.m-seg .m-chip.on { background: #fff; color: var(--zr); box-shadow: var(--shadow); font-weight: 600; }
.m-chip-o { border: 1px solid var(--line); background: #fff; }
.m-chip-o:hover { border-color: #c9cbd3; }
.m-chip-o.on { border-color: var(--zr); color: var(--zr); background: var(--zr-soft); }
#fReset { color: var(--zr); border-color: #f3c3d1; }
.m-xl i { color: #1d7044; }
.m-count { color: var(--ink-3); white-space: nowrap; margin-left: auto; font-size: 12px; }
.m-count b { color: var(--ink); font-size: 13px; }
.m-sort { display: inline-flex; align-items: center; gap: 6px; height: 28px; border: 1px solid var(--line); border-radius: 6px; padding: 0 4px 0 9px; color: var(--ink-3); background: #fff; }
.m-sort select { border: 0; background: transparent; height: 26px; color: var(--ink); font-weight: 500; cursor: pointer; outline: 0; }
.m-hint { background: #fff8e6; border-bottom: 1px solid #f3dfa6; color: #5b4a12; padding: 3px 12px; font-size: 12px; }

/* ---------- table ---------- */
.m-wrap { padding: 0; }
.m-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); table-layout: fixed; }
.m-table th { position: sticky; top: var(--top); z-index: 5; background: #f8f9fb; color: #6b6e78; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.m-table td { padding: 5px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; overflow: hidden; }
.m-table tbody tr { cursor: pointer; transition: background .12s; }
.m-table tbody tr:nth-child(even) { background: #fcfcfd; }
.m-table tbody tr:hover { background: #f6f7fb; }
.m-table tbody tr:hover td:first-child, .m-table tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--zr); }
.m-table tbody tr.sel { background: var(--zr-soft); }
.m-l1, .m-l2 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-l1 { font-weight: 600; line-height: 20px; }
.m-l2 { color: var(--ink-2); font-size: 12px; line-height: 17px; }
.m-l1 .m-light, .m-l2 .m-light { font-weight: 400; color: var(--ink-3); }
.c-id { width: 74px; } .c-client { width: 22%; } .c-project { width: 17%; } .c-source { width: 10%; }
.c-admin { width: 15%; } .c-rm { width: 12%; } .c-shared { width: auto; } .c-act { width: 92px; white-space: nowrap; }
.m-mid { font-variant-numeric: tabular-nums; color: var(--ink); }
.m-date { color: var(--ink-3); font-size: 11.5px; }
.m-date i { font-size: 10px; margin-right: 2px; }
.m-star { border: 0; background: none; padding: 0 2px; cursor: pointer; color: #cfd1d8; font-size: 12px; line-height: 1; }
.m-star:hover { color: #f5a400; }
.m-star.on { color: #f5a400; }
.m-hot { color: #e2541b; }
.m-cl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.m-clt { min-width: 0; flex: 1; }
.m-av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--a, #8a8c94); object-fit: cover; letter-spacing: .02em; }
.m-ct { margin-right: 8px; }
.m-ct > i { margin-right: 3px; }
.m-ct > i { font-size: 10px; color: var(--ink-3); }
.m-li { font-size: 10px; color: var(--ink-3); margin-right: 4px; }
.m-si { width: 16px; text-align: center; margin-right: 5px; color: var(--s, #8a8c94); font-size: 12px; }
.m-pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--c) 70%, #111); background: color-mix(in srgb, var(--c) 14%, #fff); border: 1px solid color-mix(in srgb, var(--c) 28%, #fff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.m-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.m-pic { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; vertical-align: -3px; margin-right: 3px; }
.m-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #c9cbd3); margin-right: 4px; vertical-align: 0; flex: none; }
.m-tag { display: inline-block; border-radius: 4px; padding: 0 5px; font-size: 10.5px; font-weight: 600; background: #eef0f4; color: var(--ink-2); vertical-align: 1px; margin-left: 4px; line-height: 16px; }
.m-tag.dup { background: #fff1e0; color: var(--warn); }
.m-tag.hl { background: #e3eefc; color: #18509a; }
.m-tag.et { background: #f1f2f5; color: var(--ink-3); font-weight: 500; }
.m-tag.rem { background: #fde8e8; color: var(--bad); }
.m-tag.rem.up { background: #e6f3ea; color: var(--good); }
.m-rms { display: flex; flex-wrap: wrap; gap: 3px 4px; max-height: 40px; overflow: hidden; }
.m-rm { display: inline-flex; align-items: center; max-width: 140px; border: 1px solid var(--line); border-radius: 10px; padding: 0 7px 0 5px; font-size: 11.5px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.m-more { font-size: 11px; color: var(--ink-2); background: var(--line-2); border-radius: 10px; padding: 0 6px; line-height: 17px; }
.m-acts2 { display: flex; gap: 2px; justify-content: flex-end; }
.m-ib { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink-3); cursor: pointer; }
.m-ib:hover { background: #fff; border-color: var(--line); color: var(--zr); text-decoration: none; }
.m-empty { padding: 48px 20px; text-align: center; color: var(--ink-3); background: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.m-empty i { font-size: 30px; color: #c9cbd3; margin-bottom: 6px; }
.m-empty b { color: var(--ink); font-size: 14px; }
.m-pager { display: flex; gap: 4px; align-items: center; justify-content: flex-end; padding: 6px 12px; background: #fff; border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 5; }
.m-pager span { color: var(--ink-2); margin-right: 6px; font-size: 12px; }
.m-pager .m-range { margin-right: auto; color: var(--ink-3); }
.m-pager .m-range b { color: var(--ink); font-weight: 600; }
.m-loading { position: fixed; left: 0; right: 0; top: var(--top); height: 2px; background: linear-gradient(90deg, transparent, var(--zr), transparent); background-size: 50% 100%; animation: mLoad 1s linear infinite; z-index: 40; }
@keyframes mLoad { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ---------- drawer ---------- */
.m-shade { position: fixed; inset: 0; background: rgba(20,21,26,.35); z-index: 50; }
.m-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(820px, 100vw); background: var(--bg); z-index: 51; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.15); animation: mIn .18s ease-out; }
@keyframes mIn { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.m-dh { background: #fff; border-bottom: 1px solid var(--line); padding: 6px 10px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.m-dh h2 { margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-dh .m-sub { color: var(--ink-2); font-size: 12px; display: flex; flex-wrap: wrap; gap: 2px 10px; grid-column: 1 / -1; }
.m-dh .m-acts { display: flex; gap: 4px; align-items: flex-start; }
.m-marks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding-top: 3px; font-size: 12px; }
.m-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); padding: 0 6px; overflow-x: auto; }
.m-tabs button { border: 0; background: none; padding: 6px 10px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.m-tabs button.on { color: var(--zr); border-bottom-color: var(--zr); }
.m-tabs button small { color: var(--ink-3); font-weight: 500; }
.m-db { flex: 1; overflow: auto; padding: 8px 10px 30px; }
.m-box { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.m-box h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: 0 0 6px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.m-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.m-err { color: var(--bad); font-size: 12px; min-height: 0; }
.m-err:empty { display: none; }

/* history */
.m-hist { list-style: none; margin: 0; padding: 0; }
.m-hist li { display: grid; grid-template-columns: 110px 1fr; gap: 0 8px; padding: 4px 2px; border-bottom: 1px solid var(--line-2); }
.m-hist li:last-child { border-bottom: 0; }
.m-hist .h-when { color: var(--ink-3); font-size: 11.5px; }
.m-hist .h-when b { display: block; color: var(--ink-2); font-weight: 600; }
.m-hist .h-top { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
.m-hist .h-st { font-weight: 600; }
.m-hist .h-r { white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.m-hist .h-links { display: flex; gap: 10px; font-size: 12px; margin-top: 1px; }
.m-kind { font-size: 10px; font-weight: 700; text-transform: uppercase; border-radius: 3px; padding: 0 4px; letter-spacing: .03em; }
.m-kind.admin { background: #fde8ee; color: var(--zr-dark); }
.m-kind.tele { background: #ede7fb; color: #5b34b5; }
.m-kind.rm { background: #e3eefc; color: #18509a; }
.m-kind.activity { background: #eef0f4; color: var(--ink-2); }
.m-kind.mail { background: #e6f3ea; color: var(--good); }
.m-kind.other { background: #eef0f4; color: var(--ink-3); }
.m-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.m-filter button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 0 8px; font-size: 11.5px; cursor: pointer; line-height: 20px; }
.m-filter button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* RM copies & users */
.m-list { display: flex; flex-direction: column; }
.m-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 5px 2px; border-bottom: 1px solid var(--line-2); align-items: center; }
.m-item:last-child { border-bottom: 0; }
.m-item .i-sub { color: var(--ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-item .i-acts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.m-item .i-wide { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.m-item .i-wide .m-in { flex: 1 1 200px; }
.m-sugg { display: flex; flex-wrap: wrap; gap: 4px; }
.m-sugg button { border: 1px dashed #c9cbd3; background: #fff; border-radius: 12px; padding: 1px 9px; font-size: 12px; cursor: pointer; }
.m-sugg button:hover { border-color: var(--zr); color: var(--zr); }
.m-off { opacity: .55; }
iframe.m-mail { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* toast */
.m-toast { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 10px); background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; opacity: 0; transition: all .2s; pointer-events: none; z-index: 100; max-width: 90vw; }
.m-toast.show { opacity: 1; transform: translate(-50%, 0); }
.m-toast.bad { background: var(--bad); }

/* ---------- login ---------- */
.m-login-body { background: #fff; }
.m-login { min-height: 100vh; display: flex; }
.m-login-hero { flex: 1 1 55%; color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(1200px 600px at 10% 10%, #e01e5a 0%, var(--zr) 40%, #7d0026 100%); }
.m-login-hero img { height: 38px; background: #fff; border-radius: 8px; padding: 5px 10px; align-self: flex-start; }
.m-login-hero h1 { font-size: 2.1rem; font-weight: 700; max-width: 520px; margin: 0 0 8px; }
.m-login-hero p { font-size: 1rem; max-width: 520px; opacity: .9; margin: 0; }
.m-login-hero ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.m-login-hero li i { width: 22px; }
.m-login-card { flex: 1 1 45%; display: flex; align-items: center; justify-content: center; padding: 28px 16px; }
.m-login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 8px; }
.m-login-box h2 { margin: 0; font-size: 1.5rem; }
.m-login-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--zr-soft); color: var(--zr); display: grid; place-items: center; font-size: 22px; }
.m-login-box .m-in, .m-login-box .m-btn { height: 40px; font-size: 15px; }
.m-login-box .m-btn { justify-content: center; width: 100%; }
.m-pre { display: flex; } .m-pre span { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line); border-right: 0; border-radius: 6px 0 0 6px; background: #f6f7f9; } .m-pre .m-in { border-radius: 0 6px 6px 0; }
.m-captcha { display: flex; gap: 6px; align-items: center; }
.m-captcha img { border-radius: 8px; border: 1px solid var(--line); flex: none; }
.m-otp { letter-spacing: .5em; text-align: center; font-size: 1.5rem !important; font-weight: 700; }
.m-login .m-err { min-height: 18px; display: block; }

/* ---------- phones: cards ---------- */
/* ---------- advanced filters ---------- */
.m-badge { min-width: 16px; height: 16px; border-radius: 8px; background: var(--zr); color: #fff; font-size: 10.5px; line-height: 16px; text-align: center; padding: 0 4px; }
.m-badge:empty { display: none; }
.m-adv { background: #fafbfc; border-bottom: 1px solid var(--line); padding: 8px 12px 10px; box-shadow: inset 0 3px 6px -4px rgba(20,20,30,.12); }
.m-advf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px 8px; align-items: end; }
.m-advf .s2 { grid-column: span 2; }
.m-advf label.m-f > span { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.m-advf label.m-f > span .m-check { font-weight: 500; color: var(--ink-2); font-size: 11px; }
.m-advf .m-fpin .m-check { height: 28px; }
.m-row2 { display: flex !important; gap: 4px; }
.m-advfoot { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding-top: 6px; margin-top: 2px; border-top: 1px dashed var(--line); }
.m-advfoot .m-check { margin-right: auto; }
.m-advtip { font-size: 11px; }
.m-loading-in { padding: 6px 0; color: var(--ink-3); }
.m-ms { position: relative; width: 100%; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 22px 0 8px; text-align: left; cursor: pointer; display: flex; align-items: center; min-width: 0; }
.m-ms span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-ms i { position: absolute; right: 7px; top: 8px; font-size: 10px; color: var(--ink-3); }
.m-ms:disabled { background: #fafbfc; cursor: default; }
.m-ms:focus-visible { outline: 2px solid rgba(207,0,63,.25); border-color: var(--zr); }
.m-f { position: relative; }
.m-msp { position: absolute; z-index: 45; top: 100%; left: 0; margin-top: 2px; width: max(100%, 250px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20,20,30,.16); padding: 5px; display: flex; flex-direction: column; gap: 4px; }
.m-msl { max-height: 260px; overflow: auto; }
.m-msi { display: flex; align-items: center; gap: 6px; padding: 3px 5px; border-radius: 5px; cursor: pointer; font-size: 12.5px; font-weight: 400; color: var(--ink); }
.m-msi:hover { background: var(--line-2); }
.m-msi input { accent-color: var(--zr); margin: 0; flex: none; }
.m-msi span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-msi em { font-style: normal; color: var(--ink-3); font-size: 11px; }
.m-msf { display: flex; justify-content: flex-end; gap: 4px; border-top: 1px solid var(--line-2); padding-top: 4px; }
.m-advbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.m-fchip { display: inline-flex; align-items: center; gap: 4px; max-width: 360px; height: 22px; padding: 0 2px 0 8px; border-radius: 11px; background: var(--zr-soft); color: #5c0b25; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-fchip b { font-weight: 600; }
.m-fchip button { border: 0; background: none; cursor: pointer; width: 18px; height: 18px; border-radius: 9px; color: #5c0b25; font-size: 14px; line-height: 1; padding: 0; flex: none; }
.m-fchip button:hover { background: rgba(207,0,63,.15); }
.m-fclear { border: 0; background: none; color: var(--zr); cursor: pointer; font-size: 12px; font-weight: 600; padding: 0 6px; }
/* ---------- selection & bulk actions ---------- */
.c-id { width: 92px; }
.m-sel { display: inline-flex; align-items: center; margin-right: 4px; cursor: pointer; vertical-align: -2px; }
.m-sel input { accent-color: var(--zr); margin: 0; width: 14px; height: 14px; cursor: pointer; }
.m-table tbody tr.picked { background: #fff6f8; }
.m-bulk { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 48; background: #17181c; color: #e7e8ec; border-radius: 10px; padding: 6px 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 16px); }
.m-bulk .m-btn { background: #26272d; border-color: #33343b; color: #fff; }
.m-bulk .m-btn:hover { background: #303139; }
.m-bsum { font-size: 12.5px; padding: 0 4px; }
.m-bsum b { color: #fff; }
.m-link { border: 0; background: none; color: #ff8fb0; cursor: pointer; font-size: 12.5px; text-decoration: underline; padding: 0 2px; }
body.m-bulking .m-pager { padding-bottom: 56px; }
.m-modal { position: fixed; inset: 0; z-index: 70; background: rgba(15,15,20,.45); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 10px 10px; }
.m-mbox { background: #fff; border-radius: 10px; width: min(560px, 100%); max-height: 84vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.m-mbox header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.m-mbox header h2 { font-size: 14px; margin: 0; flex: 1; }
.m-mbox form { display: flex; flex-direction: column; min-height: 0; }
.m-mbody { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.m-mbox .m-err { padding: 0 10px; }
.m-mbox footer { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
.m-picked { display: flex; flex-wrap: wrap; gap: 4px; }
#bulkRes { max-height: 180px; overflow: auto; }
.m-bout { padding: 8px 10px 0; display: flex; flex-direction: column; min-height: 0; }
.m-bout p { margin: 0 0 6px; }
.m-blines { overflow: auto; max-height: 48vh; font-size: 12.5px; border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 6px; }
.m-blines > div { padding: 2px 0; border-bottom: 1px solid var(--line-2); }
.m-bout footer { padding: 8px 0; border: 0; }

@media (max-width: 1200px) { .m-advf { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (max-width: 900px) {
    .m-head { position: sticky; }
    .m-top { height: auto; flex-wrap: wrap; padding: 6px 8px; gap: 8px; }
    .m-search { order: 5; flex: 1 1 100%; max-width: none; }
    .m-uname { display: none; }
    .m-bar { height: auto; flex-wrap: wrap; padding: 5px 8px; gap: 5px; }
    .m-seg { order: 1; flex: 1 1 100%; }
    .m-seg .m-chip { flex: 1; justify-content: center; }
    .m-count { order: 9; flex: 1 1 100%; margin-left: 0; }
    .m-av { width: 26px; height: 26px; font-size: 10.5px; }
    .m-pager .m-range { display: none; }
    .m-ct { display: block; }
    .m-table thead { display: none; }
    .m-table, .m-table tbody, .m-table tr, .m-table td { display: block; width: auto !important; }
    .m-table { background: none; padding: 6px; }
    .m-table tbody tr { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; padding: 5px 7px; display: grid; grid-template-columns: 1fr auto; gap: 0 6px; }
    .m-table td { border: 0; padding: 1px 0; }
    .m-table td.c-id { order: 2; text-align: right; }
    .m-table td.c-client { order: 1; }
    .m-table td.c-project, .m-table td.c-admin, .m-table td.c-rm, .m-table td.c-shared { order: 3; grid-column: 1 / -1; }
    .m-table td.c-source, .m-table td.c-act { display: none; }
    .m-l1, .m-l2 { white-space: normal; }
    /* project, admin and RM status each on one line on phones */
    .m-table td.c-project .m-l1, .m-table td.c-project .m-l2, .m-table td.c-admin .m-l1, .m-table td.c-admin .m-l2,
    .m-table td.c-rm .m-l1, .m-table td.c-rm .m-l2 { display: inline; }
    .m-table td.c-project .m-l2::before, .m-table td.c-admin .m-l2:not(:empty)::before, .m-table td.c-rm .m-l2:not(:empty)::before { content: " · "; color: var(--ink-3); }
    .m-table td.c-rm::before { content: "RM: "; color: var(--ink-3); font-size: 12px; }
    .m-table td.m-none { display: none; }
    .m-bar .m-chip { height: 28px; padding: 0 8px; font-size: 12px; }
    .m-pager { justify-content: center; }
    .m-drawer { width: 100vw; }
    .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .m-grid .s3, .m-grid .s4 { grid-column: 1 / -1; }
    .m-adv { position: fixed; inset: 0; z-index: 60; overflow: auto; padding: 10px 10px 70px; }
    .m-advf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .m-advf .s2 { grid-column: 1 / -1; }
    .m-advf label.m-f > span { white-space: normal; flex-wrap: wrap; gap: 2px 8px; }
    .m-advfoot { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 8px 10px; }
    .m-advtip { display: none; }
    .m-msp { width: 100%; }
    .m-fchip { max-width: 100%; }
    .m-bulk { left: 6px; right: 6px; bottom: 6px; transform: none; justify-content: flex-start; }
    .m-bulk .m-btn { flex: 1 1 auto; }
    .m-bsum { flex: 1 1 100%; }
    .m-modal { padding: 0; align-items: stretch; }
    .m-mbox { max-height: none; height: 100%; border-radius: 0; }
    .m-hist li { grid-template-columns: 1fr; }
    .m-login { flex-direction: column; }
    .m-login-hero { padding: 24px 18px; }
    .m-login-hero h1 { font-size: 1.5rem; }
    .m-login-hero ul { display: none; }
}

/* lead info table (row i button) and duplicate search */
.m-dsr { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 0 3px; font-size: 11px; }
.m-dsr:hover { color: var(--zr); }
.m-iph { display: none; }
.m-mbox.m-info { width: min(1080px, 100%); }
.m-info .m-mbody { padding: 6px 8px; }
.m-info .m-link { color: var(--zr); text-decoration: none; font-size: 12.5px; padding: 0; }
.m-igrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.m-itab { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.m-itab th, .m-itab td { padding: 3px 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; text-align: left; }
.m-itab th { width: 32%; font-weight: 500; color: var(--ink-2); overflow-wrap: anywhere; }
.m-itab td { font-weight: 500; overflow-wrap: anywhere; }
.m-itab tr.m-ihead th { background: var(--line-2); color: var(--ink); font-weight: 600; width: auto; }
.m-itab td a { color: var(--zr); }
.m-ilinks a { color: var(--ink-2); margin-right: 7px; font-size: 14px; }
.m-ilinks a:hover { color: var(--zr); }
.m-prew { white-space: pre-wrap; }
@media (max-width: 900px) {
    .m-igrid { grid-template-columns: 1fr; }
    .m-iph { display: inline-flex; }
}

/* ---------- drawer v3 (2026-10-31): bigger, readable type, red accent, timeline history ---------- */
.m-drawer { font-size: 14px; line-height: 1.45; width: min(860px, 100vw); background: #f4f5f8; }
.m-dh { position: relative; padding: 14px 16px 10px; gap: 8px 12px; border-bottom: 0; box-shadow: 0 1px 0 var(--line); background: linear-gradient(180deg, #fff 0%, #fff 70%, #fdf6f8 100%); }
.m-dh::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--zr), #ff4d6d); }
.m-dh .d-id { display: flex; gap: 12px; align-items: center; min-width: 0; }
.m-dh .d-id .m-av { width: 46px; height: 46px; font-size: 16px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--zr-soft); }
.m-dh .d-who { min-width: 0; }
.m-dh h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.m-dh .d-mid { font-size: 13px; font-weight: 600; color: var(--zr); background: var(--zr-soft); border-radius: 6px; padding: 1px 7px; vertical-align: 2px; margin-left: 4px; }
.m-dh .d-contact { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 3px; font-size: 14px; color: var(--ink); font-weight: 500; }
.m-dh .d-contact i { color: var(--zr); font-size: 12px; margin-right: 6px; }
.m-dh .m-acts { align-items: center; gap: 6px; }
.m-dh .m-acts .m-btn.ic { width: 34px; height: 34px; justify-content: center; padding: 0; border-radius: 8px; font-size: 14px; }
.m-dh .m-sub { gap: 6px; font-size: 13px; margin-top: 2px; }
.m-dh .d-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; color: var(--ink-2); white-space: nowrap; }
.m-dh .d-chip i { color: var(--ink-3); font-size: 11px; }
.m-dh .d-chip a { color: var(--zr); font-weight: 600; text-decoration: none; }
.m-dh .d-chip a:hover { text-decoration: underline; }
.m-marks { gap: 6px 16px; font-size: 13.5px; padding-top: 4px; }
.m-marks .d-status { display: inline-flex; align-items: center; gap: 6px; background: #fff7d6; border: 1px solid #f5e2a0; border-radius: 999px; padding: 3px 12px; }
.m-marks .d-status b { font-weight: 700; }
.m-marks .m-check { font-weight: 500; color: var(--ink-2); }
.m-marks .m-check input { width: 16px; height: 16px; }

.m-tabs { padding: 0 12px; gap: 4px; box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
.m-tabs button { padding: 11px 14px 10px; font-size: 14.5px; border-bottom-width: 3px; color: var(--ink-2); }
.m-tabs button:hover { color: var(--ink); }
.m-tabs button small { display: inline-block; min-width: 20px; text-align: center; font-size: 11.5px; font-weight: 700; background: #eef0f4; color: var(--ink-2); border-radius: 999px; padding: 0 6px; margin-left: 4px; line-height: 18px; }
.m-tabs button.on small { background: var(--zr); color: #fff; }

.m-drawer .m-db { padding: 14px 16px 40px; }
.m-drawer .m-box { border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; border-color: #e9eaee; box-shadow: 0 1px 3px rgba(16,18,27,.05); }
.m-drawer .m-box h3 { font-size: 13px; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 12px; }
.m-drawer .m-box h3 { border-left: 3px solid var(--zr); padding-left: 9px; line-height: 18px; }
.m-drawer .m-grid { gap: 10px 12px; }
.m-drawer label.m-f { gap: 5px; }
.m-drawer label.m-f > span { font-size: 12.5px; color: var(--ink-2); }
.m-drawer .m-in { height: 38px; font-size: 14px; border-radius: 8px; padding: 0 11px; border-color: #dcdee4; }
.m-drawer textarea.m-in { padding: 8px 11px; }
.m-drawer .m-btn { height: 34px; padding: 0 14px; font-size: 13.5px; border-radius: 8px; }
.m-drawer .m-btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.m-drawer .m-btn.zr { box-shadow: 0 2px 6px rgba(207,0,63,.25); }
.m-drawer #fuForm .m-btn.zr { height: 38px; padding: 0 18px; font-size: 14px; }
.m-drawer .m-err { font-size: 13px; }

/* history as a timeline */
.m-drawer .m-filter { gap: 6px; }
.m-drawer .m-filter button { font-size: 12.5px; line-height: 26px; padding: 0 12px; border-radius: 999px; text-transform: none; letter-spacing: 0; }
.m-drawer .m-hist li { position: relative; grid-template-columns: 118px 1fr; gap: 0 30px; padding: 10px 4px 12px; border-bottom: 0; }
.m-drawer .m-hist li::before { content: ""; position: absolute; left: 136px; top: 0; bottom: 0; width: 2px; background: #e3e5ea; }
.m-drawer .m-hist li:first-child::before { top: 16px; }
.m-drawer .m-hist li:last-child::before { bottom: calc(100% - 16px); }
.m-drawer .m-hist li::after { content: ""; position: absolute; left: 131px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid var(--kc, #9aa0ab); }
.m-drawer .m-hist li.k-admin { --kc: var(--zr); }
.m-drawer .m-hist li.k-tele { --kc: #5b34b5; }
.m-drawer .m-hist li.k-rm { --kc: #18509a; }
.m-drawer .m-hist li.k-mail { --kc: var(--good); }
.m-drawer .m-hist .h-when { font-size: 12.5px; text-align: right; }
.m-drawer .m-hist .h-when b { font-size: 13.5px; color: var(--ink); }
.m-drawer .m-hist .h-top { gap: 4px 8px; margin-bottom: 3px; }
.m-drawer .m-hist .h-st { font-size: 14.5px; }
.m-drawer .m-hist .h-r { font-size: 14px; line-height: 1.55; color: #2b2d33; }
.m-drawer .m-hist .h-links { font-size: 13px; gap: 14px; margin-top: 4px; }
.m-drawer .m-kind { font-size: 10.5px; padding: 1px 7px; border-radius: 5px; letter-spacing: .05em; }

/* RMs / share lists */
.m-drawer .m-item { padding: 10px 4px; gap: 4px 10px; }
.m-drawer .m-item .i-sub { font-size: 13px; }
.m-drawer .m-sugg button { font-size: 13px; padding: 4px 12px; border-radius: 999px; }
.m-drawer .m-pill { height: 22px; font-size: 12px; }

@media (max-width: 700px) {
    .m-dh .d-id .m-av { width: 38px; height: 38px; font-size: 14px; }
    .m-dh h2 { font-size: 17px; }
    .m-drawer .m-hist li { grid-template-columns: 1fr; gap: 2px; padding-left: 20px; }
    .m-drawer .m-hist li::before { left: 5px; }
    .m-drawer .m-hist li::after { left: 0; }
    .m-drawer .m-hist .h-when { text-align: left; }
}

/* ---------- quick add lead ---------- */
.m-addbox { width: min(600px, 100%); font-size: 14px; }
.m-addbox header h2 { font-size: 16px; }
.m-addbox header h2 i { color: var(--zr); margin-right: 4px; }
.m-addbox .m-mbody { padding: 12px 14px; }
.m-addbox .m-grid { gap: 10px 12px; }
.m-addbox label.m-f > span { font-size: 12.5px; color: var(--ink-2); }
.m-addbox .m-in { height: 38px; font-size: 14px; border-radius: 8px; }
.m-addbox textarea.m-in { height: auto; padding: 8px 11px; }
.m-addbox footer .m-btn { height: 36px; padding: 0 16px; font-size: 14px; }
.m-etype { display: flex; flex-wrap: wrap; gap: 6px; background: none; padding: 0; }
.m-etype label { cursor: pointer; }
.m-etype input { position: absolute; opacity: 0; pointer-events: none; }
.m-etype span { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: #fff; }
.m-etype input:checked + span { background: var(--zr); border-color: var(--zr); color: #fff; }
.m-etype input:focus-visible + span { outline: 2px solid rgba(207,0,63,.3); }
.m-dup { margin-top: 12px; border: 1px solid #f3dfa6; background: #fff8e6; border-radius: 10px; padding: 10px 12px; }
.m-dup > b { color: #7a5a00; }
.m-dup .m-item { padding: 6px 0; }
.m-dup .m-row { margin-top: 6px; }
.m-chip.m-addlead { color: var(--zr); font-weight: 600; }

/* ---------- top-bar key filters: Admin FU · RM FU · Pinned (2026-11-01) ---------- */
.m-qf { display: flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; }
.m-qfw { position: relative; display: inline-flex; min-width: 0; }
.m-qbtn { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid #34353d; border-radius: 8px; background: #23242b; color: #c9cad1; font: 500 12.5px/1 Inter, "Segoe UI", Arial, sans-serif; cursor: pointer; white-space: nowrap; max-width: 230px; transition: background .12s, border-color .12s, color .12s; }
.m-qbtn:hover { background: #2c2d35; color: #fff; }
.m-qbtn > i:first-child { color: #8a8c94; font-size: 12px; }
.m-qbtn .m-qcar { font-size: 9px; opacity: .6; }
.m-qbtn .m-qv { font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.m-qbtn .m-qv:empty { display: none; }
.m-qbtn.on { background: rgba(207,0,63,.16); border-color: var(--zr); color: #fff; }
.m-qbtn.on > i:first-child, .m-qbtn.open > i:first-child { color: #ff6f95; }
.m-qbtn.open { border-color: var(--zr); }
.m-qpin.on { background: var(--zr); border-color: var(--zr); }
.m-qpin.on > i:first-child { color: #fff; transform: rotate(-30deg); }
.m-qfw .m-msp { color: var(--ink); width: 280px; font-weight: 400; }
@media (max-width: 1100px) { .m-qbtn .m-qt { display: none; } }
@media (max-width: 900px) {
    .m-qf { order: 6; flex: 1 1 100%; }
    .m-qfw { flex: 1 1 0; }
    .m-qbtn { width: 100%; justify-content: center; max-width: none; }
    .m-qpin { flex: 0 0 auto; }
    .m-qbtn .m-qt { display: inline; }
    .m-qfw .m-msp { width: min(300px, 92vw); }
    .m-qfw + .m-qfw .m-msp { left: auto; right: 0; }
}

/* ---------- compact polish + Bootstrap Icons (2026-11-01) ---------- */
.bi::before { vertical-align: -.1em; }
.m-top .bi, .m-bar .bi { font-size: 13px; line-height: 1; }
.m-search > i.bi { top: 10px; }
.m-qbtn .bi-chevron-down { font-size: 9px; opacity: .6; }
.m-qbtn > i:first-child { font-size: 13px; }
.m-chip .bi-star-fill { color: #f2a900; }
.m-chip-o .bi { color: var(--zr); }
.m-bar { gap: 6px; }
.m-chip { padding: 0 9px; gap: 5px; }
.m-table td { padding: 4px 7px; }
.m-table th { padding: 6px 7px; }
.m-user a .bi { font-size: 15px; }

/* one Search button at the end of the top bar (search box + Admin FU + RM FU + Pinned) */
.m-search input { border-right: 1px solid #34353d; border-radius: 8px; padding-right: 10px; }
.m-qf .m-sbtn { height: 32px; border-radius: 8px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; margin-left: 2px; position: relative; }
.m-qf .m-sbtn.pending::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #ffc107; border: 2px solid var(--head); }
@media (max-width: 900px) { .m-qf .m-sbtn { flex: 0 0 auto; } }

/* ---------- AI helpers: Add lead raw message, Compose ---------- */
.m-btn.m-ai { color: #6d28d9; border-color: #ddd0fb; background: linear-gradient(180deg, #fff, #f6f1ff); font-weight: 600; }
.m-btn.m-ai:hover { border-color: #a78bfa; }
.m-btn.m-ai[aria-expanded="true"] { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.m-aibox { border: 1px dashed #c4b5fd; background: #faf7ff; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.m-aibox textarea.m-in { min-height: 96px; }
.m-cbox { width: min(640px, 100%); font-size: 14px; }
.m-cbox header h2 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-cbox header h2 i { color: var(--zr); margin-right: 4px; }
.m-cbox .m-mbody { padding: 12px 14px; }
.m-cbox .m-grid { gap: 10px 12px; }
.m-cbox label.m-f > span { font-size: 12.5px; color: var(--ink-2); }
.m-cbox .m-in { height: 38px; font-size: 14px; border-radius: 8px; }
.m-cbox textarea.m-in { height: auto; padding: 9px 11px; line-height: 1.5; }
.m-cbox .m-btn.m-ai { height: 38px; padding: 0 16px; font-size: 14px; }
.m-csend { flex-wrap: wrap; }
.m-csend .m-btn { height: 36px; padding: 0 14px; font-size: 13.5px; }
.m-csend .m-btn.wa { background: #25d366; border-color: #25d366; color: #fff; font-weight: 600; }
.m-csend .m-btn[disabled] { opacity: .45; cursor: not-allowed; }
.m-loadingx { background: repeating-linear-gradient(90deg, #fff 0 40%, #f3efff 50%, #fff 60% 100%); background-size: 200% 100%; animation: mShim 1.2s linear infinite; }
@keyframes mShim { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- toolbar count + time, row actions (2026-11-01) ---------- */
.m-count { display: inline-flex; align-items: center; gap: 6px; }
.m-cnt, .m-tm { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-cnt { background: var(--zr-soft); color: var(--zr-dark); }
.m-cnt b { font-size: 13px; color: var(--zr-dark); }
.m-cnt i, .m-tm i { font-size: 10.5px; }
.m-tm { --tc: #0b8a3e; color: var(--tc); background: color-mix(in srgb, var(--tc) 10%, #fff); font-weight: 600; }
.m-tm em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.m-tm.ok { --tc: #b45309; } .m-tm.slow { --tc: #c62828; }
.c-act { width: 204px; }
.m-acts2 { gap: 5px; }
.m-ib { width: 28px; height: 28px; border-radius: 8px; font-size: 12.5px; border: 1px solid transparent; transition: transform .1s, background .12s, color .12s; }
.m-ib:hover { transform: translateY(-1px); text-decoration: none; }
.m-ib.ib-compose { color: #fff; background: linear-gradient(135deg, var(--zr), #ff4d6d); box-shadow: 0 2px 6px rgba(207,0,63,.28); }
.m-ib.ib-compose:hover { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--zr-dark), var(--zr)); }
.m-ib.ib-info { color: #2a78d6; background: #e8f1fc; }
.m-ib.ib-info:hover { background: #2a78d6; color: #fff; border-color: #2a78d6; }
.m-ib.ib-open { color: var(--ink-2); background: #eef0f4; }
.m-ib.ib-open:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.m-ib.ib-old { color: #b45309; background: #fff4e5; }
.m-ib.ib-old:hover { background: #b45309; color: #fff; border-color: #b45309; }
.m-table tbody tr:hover .m-ib.ib-info, .m-table tbody tr:hover .m-ib.ib-open, .m-table tbody tr:hover .m-ib.ib-old { box-shadow: 0 1px 2px rgba(16,18,27,.08); }

/* ---------- Ask AI chat (2026-11-01) ---------- */
.m-ib.ib-ask { color: #fff; background: linear-gradient(135deg, #6d28d9, #a855f7); box-shadow: 0 2px 6px rgba(109,40,217,.28); }
.m-ib.ib-ask:hover { color: #fff; border-color: transparent; background: linear-gradient(135deg, #5b21b6, #7c3aed); }
.m-askbox { width: min(680px, 100%); height: min(640px, 84vh); font-size: 14px; }
.m-askbox header h2 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-askbox header h2 i { color: #7c3aed; margin-right: 4px; }
.m-askmsgs { flex: 1; overflow: auto; padding: 14px; background: #f7f6fb; display: flex; flex-direction: column; gap: 10px; }
.m-msg { max-width: 86%; padding: 9px 12px; border-radius: 12px; line-height: 1.5; position: relative; word-break: break-word; }
.m-msg.me { align-self: flex-end; background: var(--zr); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.m-msg.ai { align-self: flex-start; background: #fff; border: 1px solid #e9e5f5; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(16,18,27,.04); }
.m-msg.ai.err { border-color: #f5c2c2; color: var(--bad); }
.m-msg p { margin: 0 0 4px; } .m-msg p:last-of-type { margin-bottom: 0; }
.m-msg ul { margin: 2px 0 4px; padding-left: 18px; } .m-msg li { margin: 1px 0; }
.m-msg time { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; text-align: right; }
.m-msg.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.m-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #a78bfa; animation: mDot 1s infinite ease-in-out; }
.m-msg.typing i:nth-child(2) { animation-delay: .15s; } .m-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes mDot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.m-askempty { margin: auto; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.m-askempty i { font-size: 26px; color: #a78bfa; } .m-askempty b { color: var(--ink); font-size: 15px; }
.m-askchips { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 0; border-top: 1px solid var(--line); background: #fff; }
.m-askchips button { border: 1px solid #ddd0fb; background: #faf7ff; color: #5b21b6; border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.m-askchips button:hover { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.m-mbox form.m-askform { display: flex; flex-direction: row; gap: 8px; padding: 8px 12px; background: #fff; align-items: flex-end; }
.m-askform textarea.m-in { flex: 1; width: auto; min-width: 0; min-height: 40px; max-height: 120px; resize: none; padding: 9px 12px; font-size: 14px; border-radius: 10px; line-height: 1.4; }
.m-askform .m-btn { height: 40px; width: 44px; justify-content: center; border-radius: 10px; }
.m-asknote { font-size: 11.5px; color: var(--ink-3); padding: 0 12px 8px; background: #fff; border-radius: 0 0 10px 10px; }
.m-btn.m-aiic { color: #7c3aed; }

/* ---------- Quick share from grid + unredeemed count (2026-11-01) ---------- */
.m-ib.ib-share { color: #fff; background: linear-gradient(135deg, #0f9d58, #22c55e); box-shadow: 0 2px 6px rgba(15,157,88,.28); }
.m-ib.ib-share:hover { color: #fff; border-color: transparent; background: linear-gradient(135deg, #0b7a44, #16a34a); }
.m-qsbox { width: min(620px, 100%); max-height: min(680px, 86vh); font-size: 14px; }
.m-qsbox header h2 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-qsbox header h2 i { color: #0f9d58; margin-right: 4px; }
.m-qsbody { padding: 12px 14px; overflow: auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.m-qsproj { font-weight: 600; color: var(--zr); }
.m-qsdone { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12.5px; }
.m-qstools { display: flex; gap: 10px; align-items: center; }
.m-qstools .m-in { flex: 1; height: 36px; font-size: 14px; }
.m-qstools .m-check { white-space: nowrap; }
.m-qshead { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.m-qslist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: auto; min-height: 120px; }
.m-qsrow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.m-qsrow:last-child { border-bottom: 0; }
.m-qsrow:hover { background: #fafbfc; }
.m-qsav { width: 32px; height: 32px; border-radius: 50%; background: #e8f5ee; color: #0f7a46; display: grid; place-items: center; font-weight: 700; flex: none; }
.m-qsinfo { flex: 1; min-width: 0; }
.m-qsmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.m-qsok { color: #0f9d58; font-weight: 600; font-size: 13px; white-space: nowrap; }
.m-unr { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #eef0f3; color: #6b7280; }
.m-unr.some { background: #fff4d6; color: #a15c00; }
.m-unr.hi { background: #fde2e2; color: #b42318; }
.m-sugg .m-unr { margin-left: 3px; padding: 0 6px; font-size: 10.5px; }

/* ---------- Bulk share in turn: whole RM group list (2026-11-01) ---------- */
.m-rrhead { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 4px; font-size: 12.5px; }
.m-rrlist { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.m-rrrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; font: inherit; font-size: 13.5px; }
.m-rrrow:last-child { border-bottom: 0; }
.m-rrrow:hover { background: #fafbfc; }
.m-rrrow.on { background: #fff1f4; }
.m-rrchk { color: #c4c7cf; font-size: 16px; }
.m-rrrow.on .m-rrchk { color: var(--zr); }
.m-rrname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-rrlog { font-size: 12px; color: var(--ink-2); white-space: nowrap; min-width: 92px; text-align: right; }

/* ---------- Unredeemed link + page (2026-11-01) ---------- */
a.m-unr { text-decoration: none; cursor: pointer; }
a.m-unr:hover { filter: brightness(.94); text-decoration: underline; }
a.m-unr i { font-size: 9px; margin-left: 2px; }
.m-rrrow:focus-visible { outline: 2px solid var(--zr); outline-offset: -2px; }
.m-unrpage { max-width: 1100px; margin: 0 auto; padding: 16px; font-size: 14px; }
.m-unrhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.m-unrhead h1 { font-size: 18px; margin: 0; flex: 1; }
.m-unrtable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.m-unrtable th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); background: #fafbfc; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.m-unrtable td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.m-unrtable tr:last-child td { border-bottom: 0; }
.m-unrtable a { color: var(--zr); font-weight: 600; text-decoration: none; }

/* ---------- Drawer share suggestions as rows + recommended RMs (2026-11-01) ---------- */
.m-shsugg { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.m-shsugg .m-qslist { max-height: 320px; min-height: 0; }
.m-qsrow.good { background: #f3fbf6; }
.m-goodtag { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: #dcf5e6; color: #0f7a46; vertical-align: 1px; }

/* ---------- Row action icons v2: small soft-tint circles, fill on hover (2026-11-01) ---------- */
.c-act { width: 168px; }
.m-acts2 { gap: 4px; align-items: center; }
.m-ib, .m-ib.ib-share, .m-ib.ib-ask, .m-ib.ib-compose, .m-ib.ib-info, .m-ib.ib-open, .m-ib.ib-old {
  --c: #6b7280; --t: #f1f2f5;
  width: 24px; height: 24px; border-radius: 50%; font-size: 11px; border: 0;
  color: var(--c); background: var(--t); box-shadow: none;
  transition: transform .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.m-ib.ib-share { --c: #0f9d58; --t: #e6f6ee; }
.m-ib.ib-ask { --c: #7c3aed; --t: #f1eafe; }
.m-ib.ib-compose { --c: #d1043f; --t: #fde8ee; }
.m-ib.ib-info { --c: #2a78d6; --t: #e8f1fc; }
.m-ib.ib-open { --c: #475569; --t: #eef1f5; }
.m-ib.ib-old { --c: #c2410c; --t: #fff1e6; }
.m-ib:hover, .m-ib.ib-share:hover, .m-ib.ib-ask:hover, .m-ib.ib-compose:hover, .m-ib.ib-info:hover, .m-ib.ib-open:hover, .m-ib.ib-old:hover {
  color: #fff; background: var(--c); border: 0; transform: translateY(-1px) scale(1.08);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--c) 35%, transparent); text-decoration: none;
}
.m-ib:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.m-table tbody tr:hover .m-ib.ib-info, .m-table tbody tr:hover .m-ib.ib-open, .m-table tbody tr:hover .m-ib.ib-old { box-shadow: none; }
