/* Friotech Hub UI model - TailAdmin-derived tokens (docs/hub.md, docs/tech/admin-ui.md) */

:root {
    --sidebar: #1c2434;
    --sidebar-hover: #333a48;
    --primary: #3c50e0;
    --primary-dark: #2c3cbb;
    --body-bg: #f1f5f9;
    --stroke: #e2e8f0;
    --text: #1c2434;
    --text-muted: #64748b;
    --success: #219653;
    --success-soft: #e7f6ec;
    --warning: #b54708;
    --warning-soft: #fdf3e7;
    --danger: #c02626;
    --danger-soft: #fbe9e9;
    --info: #1a6fb5;
    --info-soft: #e8f2fb;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(28, 36, 52, .08), 0 1px 2px rgba(28, 36, 52, .04);
    --shadow-lg: 0 8px 24px rgba(28, 36, 52, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- model banner ---------- */

.model-bar {
    background: #111827;
    color: #e5e7eb;
    font-size: 12px;
    padding: 7px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.model-bar strong { color: #fff; }

.model-bar .legend { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.anno-sync-status { color: #fbbf24; font-size: 12px; font-weight: 600; }
.anno-sync-status[hidden] { display: none; }

/* ---------- shell ---------- */

.shell { display: flex; min-height: calc(100vh - 32px); }

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--sidebar);
    color: #dee4ee;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: calc(100vh - 32px);
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 20px;
}

.brand-mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700; font-size: 17px;
    flex-shrink: 0;
}

.brand-name { color: #fff; font-weight: 600; letter-spacing: -.2px; }
.brand-sub { font-size: 11px; color: #8a99af; }

.nav { padding: 4px 14px 20px; }
.nav-group { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #6b7a91; padding: 16px 10px 7px; }

.nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    color: #cbd4e2;
    transition: background .12s, color .12s;
}

.nav a:hover { background: var(--sidebar-hover); color: #fff; }
.nav a.active { background: var(--primary); color: #fff; font-weight: 500; }
.nav a .ico { width: 17px; text-align: center; opacity: .85; flex-shrink: 0; }
.nav a .flag { margin-left: auto; font-size: 9px; padding: 1px 5px; border-radius: 4px; font-weight: 700; letter-spacing: .04em; }

.sidebar-foot {
    margin-top: auto;
    padding: 14px 22px 18px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 11.5px;
    color: #8a99af;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- topbar ---------- */

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--stroke);
    padding: 13px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.search-box {
    flex: 1;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--body-bg);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    padding: 7px 12px;
    color: var(--text-muted);
}

.search-box input { border: 0; background: none; outline: none; flex: 1; font: inherit; color: var(--text); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: #dbe3f5; color: var(--primary-dark);
    display: grid; place-items: center; font-weight: 600; font-size: 12px;
}

/* ---------- page ---------- */

.page { padding: 26px 28px 40px; max-width: 1500px; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.4px; display: flex; align-items: center; gap: 10px; }
.page-head p { color: var(--text-muted); font-size: 13px; margin-top: 4px; max-width: 780px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.crumbs { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }

/* ---------- cards ---------- */

.card { background: #fff; border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.card-head { padding: 15px 20px; border-bottom: 1px solid var(--stroke); display: flex; align-items: center; gap: 10px; }
.card-head h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* ---------- stats ---------- */

.stat { background: #fff; border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.stat .label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.stat .value { font-size: 27px; font-weight: 700; letter-spacing: -.7px; margin-top: 6px; }
.stat .note { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 15px; border-radius: 8px; border: 1px solid transparent;
    font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
    transition: background .12s, box-shadow .12s, border-color .12s;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; border-color: var(--stroke); color: var(--text); }
.btn-ghost:hover { background: var(--body-bg); }
.btn-danger { background: #fff; border-color: #f0b8b8; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: #fff; border-color: #f2cfa5; color: var(--warning); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-armed { background: #7c2d12; color: #fff; }

/* ---------- badges ---------- */

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
    white-space: nowrap;
}

.b-success { background: var(--success-soft); color: var(--success); }
.b-warning { background: var(--warning-soft); color: var(--warning); }
.b-danger { background: var(--danger-soft); color: var(--danger); }
.b-info { background: var(--info-soft); color: var(--info); }
.b-muted { background: #eef1f6; color: #4b5768; }
.b-primary { background: #e6e9fc; color: var(--primary-dark); }

.flag-new { background: #dcfce7; color: #14532d; }
.flag-changed { background: #fef3c7; color: #78350f; }
.flag-same { background: #e2e8f0; color: #475569; }

/* ---------- tables ---------- */

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
    text-align: left; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
    color: var(--text-muted); font-weight: 700;
    padding: 11px 14px; border-bottom: 1px solid var(--stroke); background: #f8fafc;
    white-space: nowrap;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #f8fafc; }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.t-main { font-weight: 500; }
.t-sub { font-size: 11.5px; color: var(--text-muted); }

/* ---------- forms ---------- */

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--danger); }
.field .hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }

.inp {
    width: 100%; padding: 8px 12px; font: inherit; font-size: 13px;
    border: 1px solid var(--stroke); border-radius: 8px; background: #fff; color: var(--text);
    outline: none;
}
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(60, 80, 224, .12); }
.inp[readonly], .inp:disabled { background: #f4f6fa; color: #55627a; cursor: not-allowed; }
textarea.inp { min-height: 84px; resize: vertical; }

.ro-wrap { position: relative; }
.ro-tag {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    font-size: 10px; font-weight: 700; color: var(--info);
    background: var(--info-soft); padding: 2px 7px; border-radius: 5px;
}

.check { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; font-size: 13px; }
.check input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--primary); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .row2, .row3 { grid-template-columns: 1fr; } }

/* ---------- filter bar ---------- */

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .f { min-width: 150px; }
.filters .f > label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }

/* ---------- tabs ---------- */

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--stroke); overflow-x: auto; padding: 0 8px; background: #fff; border-radius: var(--radius) var(--radius) 0 0; }
.tabs button {
    border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500;
    padding: 13px 14px; cursor: pointer; color: var(--text-muted);
    border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { background: #fff; border: 1px solid var(--stroke); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }

/* ---------- banners ---------- */

.banner { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 13px; border: 1px solid; }
.banner .bi { font-size: 16px; line-height: 1; }
.banner-info { background: var(--info-soft); border-color: #bcdcf5; color: #124a78; }
.banner-warn { background: var(--warning-soft); border-color: #f2cfa5; color: #7a3208; }
.banner-danger { background: var(--danger-soft); border-color: #f0b8b8; color: #8c1c1c; }
.banner-success { background: var(--success-soft); border-color: #b7e0c5; color: #17663c; }
.banner strong { display: block; margin-bottom: 2px; }

/* ---------- state strip (product editor) ---------- */

.state-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--stroke); border: 1px solid var(--stroke); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.state-strip > div { background: #fff; padding: 14px 18px; }
.state-strip .k { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.state-strip .v { font-size: 15px; font-weight: 600; margin-top: 5px; display: flex; align-items: center; gap: 7px; }
@media (max-width: 980px) { .state-strip { grid-template-columns: repeat(2, 1fr); } }

/* ---------- key-value list ---------- */

.kv { display: grid; grid-template-columns: 190px 1fr; gap: 1px; background: #eef1f6; border: 1px solid #eef1f6; border-radius: 8px; overflow: hidden; font-size: 13px; }
.kv > div { background: #fff; padding: 9px 13px; }
.kv > div:nth-child(odd) { background: #f8fafc; font-weight: 600; font-size: 12.5px; }

/* ---------- lists ---------- */

.pill-list { display: flex; gap: 6px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.empty .big { font-size: 30px; opacity: .35; margin-bottom: 8px; }

.step-list { list-style: none; counter-reset: s; }
.step-list li { counter-increment: s; position: relative; padding: 0 0 14px 34px; font-size: 13px; }
.step-list li::before {
    content: counter(s); position: absolute; left: 0; top: -1px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #e6e9fc; color: var(--primary-dark);
    font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- login ---------- */

.login-wrap { min-height: calc(100vh - 32px); display: grid; place-items: center; background: linear-gradient(140deg, #1c2434, #2b3550); padding: 30px; }
.login-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 430px; padding: 34px; }

/* ---------- page footer explainer ---------- */

.explain { border: 1px solid #cbd5e6; border-radius: var(--radius); background: #fff; overflow: hidden; margin-top: 30px; }
.explain > header { background: #eef2fb; padding: 13px 20px; border-bottom: 1px solid #cbd5e6; display: flex; align-items: center; gap: 9px; }
.explain > header h3 { font-size: 14px; font-weight: 700; color: #1e2a4a; }
.explain-body { padding: 20px; display: grid; gap: 22px; }
.explain h4 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 9px; }
.explain p { font-size: 13.5px; }
.explain ul { padding-left: 20px; font-size: 13px; }
.explain ul li { margin-bottom: 5px; }
.explain .delta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .explain .delta { grid-template-columns: 1fr; } }
.delta-box { border: 1px solid var(--stroke); border-radius: 8px; padding: 13px 15px; }
.delta-box.new { border-color: #a7e8bd; background: #f2fcf6; }
.delta-box.changed { border-color: #f2d79a; background: #fffdf4; }
.delta-box.same { border-color: var(--stroke); background: #f8fafc; }
.delta-box ul { padding-left: 17px; font-size: 12.5px; }
.doc-src { font-size: 12px; color: var(--text-muted); }
.doc-src code { background: #eef1f6; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

/* ---------- tooltip ---------- */

#tip {
    position: fixed; z-index: 9999; max-width: 330px;
    background: #111827; color: #f3f4f6;
    font-size: 12.5px; line-height: 1.45;
    padding: 9px 12px; border-radius: 8px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
    pointer-events: none; opacity: 0;
    transition: opacity .1s;
}
#tip.on { opacity: 1; }
#tip b { color: #fff; display: block; margin-bottom: 3px; font-size: 12px; }

[data-tip] { cursor: help; }
button[data-tip], a[data-tip], input[data-tip], select[data-tip], textarea[data-tip] { cursor: pointer; }
[data-tip]:hover { outline: 1px dashed rgba(60, 80, 224, .45); outline-offset: 2px; border-radius: 4px; }
body.no-hints [data-tip]:hover { outline: none; }

/* ---------- modal ---------- */

#modal { position: fixed; inset: 0; z-index: 9000; display: none; }
#modal.on { display: block; }
#modal .backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .55); }

#modal .dlg {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    margin: 32px auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#modal .dlg-head { padding: 18px 22px; border-bottom: 1px solid var(--stroke); display: flex; align-items: flex-start; gap: 12px; }
#modal .dlg-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.3px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
#modal .dlg-head p { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
#modal .dlg-close {
    margin-left: auto; border: 0; background: var(--body-bg); color: var(--text-muted);
    width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 15px; flex-shrink: 0;
}
#modal .dlg-close:hover { background: #e2e8f0; color: var(--text); }
#modal .dlg-body { padding: 22px; overflow-y: auto; }
#modal .dlg-foot { padding: 15px 22px; border-top: 1px solid var(--stroke); background: #f8fafc; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#modal .dlg-foot .note { font-size: 11.5px; color: var(--text-muted); margin-left: auto; max-width: 340px; text-align: right; }

#modal .dlg.danger .dlg-head { background: var(--danger-soft); border-bottom-color: #f0b8b8; }
#modal .dlg.danger .dlg-head h2 { color: #8c1c1c; }
#modal .dlg.armed .dlg-head { background: #7c2d12; }
#modal .dlg.armed .dlg-head h2, #modal .dlg.armed .dlg-head p { color: #fff; }
#modal .dlg.armed .dlg-close { background: rgba(255, 255, 255, .15); color: #fff; }

/* ---------- toast ---------- */

/* Top-right so the assistant widget and the comment popover can own the bottom-right corner. */
#toasts { position: fixed; right: 20px; top: 48px; z-index: 9500; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
#toasts .toast {
    background: #111827; color: #f3f4f6;
    padding: 12px 16px; border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    font-size: 13px; max-width: 400px;
    animation: toast-in .16s ease-out;
}
#toasts .toast b { display: block; color: #fff; margin-bottom: 2px; font-size: 12.5px; }
#toasts .toast.ok { border-left: 3px solid #34d399; }
#toasts .toast.warn { border-left: 3px solid #fbbf24; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- reviewer comments (right-click pins) ---------- */

html { position: relative; }

/* Page pins scroll with the document; dialog pins sit above the modal in a fixed layer. */
#anno-layer { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 8500; }
#anno-layer-fixed { position: fixed; inset: 0; pointer-events: none; z-index: 9100; }
body.anno-mode-off #anno-layer, body.anno-mode-off #anno-layer-fixed { display: none; }

.anno-pin {
    pointer-events: auto;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid #fff;
    background: var(--danger);
    color: #fff; font: 700 11px/22px Inter, system-ui, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
    cursor: pointer; padding: 0;
    transition: transform .12s, background .12s;
}
.anno-pin:hover { background: #9f1c1c; transform: translate(-50%, -50%) scale(1.12); }
.anno-pin.active { background: var(--primary); box-shadow: 0 0 0 4px rgba(60, 80, 224, .25); }
.anno-pin.empty { background: #f59e0b; }

#anno-popover {
    position: fixed; z-index: 9200;
    width: min(380px, calc(100vw - 24px));
    background: #fff; border: 1px solid var(--stroke);
    border-radius: 12px; box-shadow: var(--shadow-lg);
    padding: 12px 14px;
}
#anno-popover .anno-pop-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
#anno-popover .anno-where { font-size: 11.5px; color: var(--text-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#anno-popover .anno-text {
    width: 100%; resize: vertical; min-height: 88px;
    border: 1px solid var(--stroke); border-radius: 8px;
    padding: 8px 10px; font: inherit; font-size: 13.5px;
}
#anno-popover .anno-text:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
#anno-popover .anno-pop-foot { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
#anno-popover .anno-author {
    flex: 1; min-width: 120px;
    border: 1px solid var(--stroke); border-radius: 8px;
    padding: 7px 10px; font: inherit; font-size: 12.5px;
}

.anno-icon {
    margin-left: auto; border: 0; background: var(--body-bg); color: var(--text-muted);
    width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 15px; flex-shrink: 0;
}
.anno-icon:hover { background: #e2e8f0; color: var(--text); }

.anno-btn {
    border: 1px solid var(--stroke); background: #fff; color: var(--text);
    border-radius: 8px; padding: 7px 12px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
}
.anno-btn:hover { background: var(--body-bg); }
.anno-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.anno-btn.primary:hover { background: var(--primary-dark); }
.anno-btn.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.anno-btn.danger:hover { background: #f5d5d5; }
.anno-file { display: inline-block; }

#anno-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 9300;
    width: min(440px, 100vw);
    background: #fff; border-left: 1px solid var(--stroke);
    box-shadow: -12px 0 40px rgba(28, 36, 52, .16);
    display: flex; flex-direction: column;
}
#anno-drawer[hidden], #anno-popover[hidden] { display: none; }
#anno-drawer .anno-drawer-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px 10px; font-size: 15px; }
#anno-drawer .anno-drawer-hint { padding: 0 18px 12px; font-size: 12px; color: var(--text-muted); border-bottom: 1px solid var(--stroke); }
#anno-drawer .anno-drawer-sync { color: var(--warn, #b45309); border-bottom: none; padding-top: 0; }
#anno-drawer .anno-drawer-body { flex: 1; overflow-y: auto; padding: 10px 18px; }
#anno-drawer .anno-drawer-foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid var(--stroke); background: #f8fafc; }
#anno-drawer .anno-empty { font-size: 13px; color: var(--text-muted); padding: 20px 0; }

.anno-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin: 14px 0 6px; display: flex; gap: 8px; align-items: baseline; }
.anno-group h4 a { color: var(--primary); text-transform: none; letter-spacing: 0; font-size: 13px; }
.anno-group h4 span { font-weight: 500; }
.anno-group ul { list-style: none; }
.anno-group li {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 9px 10px; margin-bottom: 6px;
    border: 1px solid var(--stroke); border-radius: 10px; cursor: pointer;
}
.anno-group li:hover { background: var(--body-bg); }
.anno-group li.here { border-color: #c7d0ee; background: #f5f7ff; }
.anno-num {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 22px; text-align: center;
}
.anno-item-main { flex: 1; min-width: 0; }
.anno-item-where { font-size: 11.5px; color: var(--text-muted); }
.anno-item-text { font-size: 13px; margin: 2px 0; white-space: pre-wrap; word-break: break-word; }
.anno-item-meta { font-size: 11px; color: var(--text-muted); }
.anno-item-del { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 0 4px; flex-shrink: 0; }
.anno-item-del:hover { color: var(--danger); }

/* ---------- assistant (ElevenLabs widget host) ---------- */

/* The widget positions itself; keep it above pins but below the comment popover and drawer. */
/* The widget positions itself (fixed, inset 0); only lift it above the mock's modals. */
elevenlabs-convai { z-index: 9150; }
