/* Team and LLM features: user menu, presence, folder picker, Assistant panel, design requests. */

.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.text-danger { color:#b42318; }

/* Top bar: who is signed in, who else has this page open */
.user-menu > button { display:inline-flex; align-items:center; gap:8px; }
.user-avatar { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#111;
               color:#fff; font-size:11px; font-weight:700; }
.user-menu .yolo-panel { display:grid; gap:10px; }
.user-menu .yolo-panel[hidden] { display:none; }
.user-email { margin:0; color:var(--muted); font-size:12px; word-break:break-all; }
.outdated-banner { display:flex; flex-wrap:wrap; justify-content:center; gap:4px 10px; margin:0;
                   padding:10px clamp(22px, 3.2vw, 48px); text-align:center;
                   border-bottom:1px solid #e5b84c; background:#fff7e0; color:#6b4b00; font-size:13px; }
.outdated-banner[hidden] { display:none; }
.topbar-export { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:4px 11px;
                 border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink);
                 font-size:12px; font-weight:700; text-decoration:none; white-space:nowrap; }
.topbar-export:hover { border-color:#111; color:var(--ink); }
.topbar-export svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round;
                     stroke-linejoin:round; }
.topbar-left { display:flex; align-items:center; gap:12px; min-width:0; }
.avatar-stack { display:inline-flex; align-items:center; }
.avatar-stack[hidden], .online-people[hidden] { display:none; }
.avatar { display:inline-grid; place-items:center; width:26px; height:26px; margin-left:-6px; border:2px solid #fff;
          border-radius:50%; color:#fff; font-size:10.5px; font-weight:700; letter-spacing:.02em; cursor:default; }
.avatar:first-child { margin-left:0; }
.avatar-more { background:#e5e5e5; color:#333; }
.online-people { display:inline-flex; align-items:center; gap:8px; min-height:34px; padding:3px 4px 3px 12px;
                 border:1px solid var(--line); border-radius:999px; background:#fff; box-shadow:0 2px 8px #0000000d; }
.avatar.here { box-shadow:0 0 0 2px #111; }  /* on the same page as you */
.presence-anchor { position:relative; display:flex; align-items:center; min-height:26px; }
.topbar-notices { position:absolute; z-index:5; top:calc(100% + 10px); left:0; display:grid; gap:6px;
                  width:max-content; max-width:min(420px, calc(100vw - 32px)); }
.topbar-notices[hidden] { display:none; }
.topbar-notice { margin:0; padding:8px 12px; border:1px solid #e5b84c; border-radius:8px; background:#fff7e0;
                 color:#6b4b00; font-size:12.5px; box-shadow:0 8px 20px #0000001f; }
.topbar-notice::before { content:''; position:absolute; top:-6px; left:14px; width:10px; height:10px;
                         border-top:1px solid #e5b84c; border-left:1px solid #e5b84c; background:#fff7e0;
                         transform:rotate(45deg); }
.topbar-notice:not(:first-child)::before { display:none; }
.online-label { color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }

/* Project page */
.folder-field { display:flex; gap:8px; align-items:stretch; margin:7px 0 13px; }
.folder-field input { flex:1; min-width:0; margin:0 !important; }
.folder-field button { margin:0 !important; white-space:nowrap; }
.project-list-card { grid-column:1 / -1; }
.project-list { margin:0; padding:0; list-style:none; }
.project-list li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0;
                   border-top:1px solid var(--line); }
.project-list li:first-child { border-top:0; }
.project-list li div { display:grid; min-width:0; }
.project-list code { overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.project-list form { margin:0; }
.project-list li.current strong::after { content:' (current)'; color:var(--muted); font-weight:400; }

/* Folder picker */
.folder-picker { width:min(640px, calc(100vw - 32px)); max-height:min(640px, calc(100vh - 32px)); padding:0;
                 border:1px solid var(--line); border-radius:12px; box-shadow:0 24px 60px #00000040; }
.folder-picker[open] { display:flex; flex-direction:column; }
.folder-picker::backdrop { background:#0000004d; }
.folder-picker-head { display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line); }
.folder-picker-head strong { flex:1; }
.folder-crumbs { display:flex; flex-wrap:wrap; gap:2px; padding:10px 16px 6px; font-size:12.5px; }
.folder-crumbs button { min-height:0; padding:2px 6px; border:0; background:transparent; color:var(--link);
                        font-size:12.5px; text-decoration:underline; text-underline-offset:2px; }
.folder-crumbs button:hover { background:#eef5ff; transform:none; }
.folder-crumbs span { color:var(--muted); }
.folder-picker-error { margin:6px 16px; }
.folder-list { flex:1; min-height:200px; margin:0; padding:4px 8px; overflow:auto; list-style:none; }
.folder-list li { margin:0; }
.folder-picker .folder-row { display:flex; align-items:center; gap:10px; width:100%; min-height:36px; padding:6px 10px; border:1px solid transparent;
              border-radius:8px; background:transparent; color:var(--ink); font-weight:500; text-align:left; }
.folder-picker .folder-row:hover, .folder-picker .folder-row:focus-visible { outline-offset:-2px; border-color:var(--line); background:#f3f3f3; transform:none; }
.folder-row svg { flex:none; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; }
.folder-row .folder-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.folder-row .project-tag { padding:1px 8px; border-radius:999px; background:#111; color:#fff; font-size:11px; font-weight:700; }
.folder-empty { padding:16px; color:var(--muted); }
.folder-picker-foot { display:flex; align-items:center; gap:8px; padding:12px 16px; border-top:1px solid var(--line); }
.folder-picker-hint { flex:1; min-width:0; overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis;
                      white-space:nowrap; }

/* Assistant panel */
.assistant-dialog { width:min(520px, calc(100vw - 80px)); height:min(680px, calc(100vh - var(--tools-top, 82px) - 16px)); }
.assistant-new { min-height:28px; padding:0 10px; border:1px solid #c9c9c9; background:#fff; color:var(--ink); font-size:12px; }
.assistant-new:hover { border-color:#111; background:#f3f3f3; transform:none; }
.assistant-log { flex:1; min-height:0; padding:12px 14px; overflow:auto; }
.assistant-turn { margin:0 0 12px; }
.assistant-turn.user { margin-left:48px; padding:8px 12px; border-radius:10px; background:#111; color:#fff; white-space:pre-wrap; }
.assistant-turn.assistant { padding:2px 0; }
.assistant-turn.assistant p:first-child { margin-top:0; }
.assistant-turn.assistant table { font-size:12.5px; }
.assistant-turn.assistant pre { overflow:auto; padding:8px; border-radius:8px; background:#f3f3f3; font-size:12px; }
.assistant-tools { display:flex; flex-wrap:wrap; gap:4px; margin:6px 0 0; }
.assistant-tools span { padding:1px 7px; border:1px solid var(--line); border-radius:999px; color:var(--muted);
                        font:11px 'IBM Plex Mono', monospace; }
.assistant-request { display:block; margin:8px 0 0; padding:8px 12px; border:1px solid #2e9e5b; border-radius:8px;
                     background:#effaf3; color:#1d5c33; text-decoration:none; }
.assistant-request.invalid { border-color:#d9a400; background:#fff7e0; color:#6b4b00; }
.assistant-request:hover { color:#111; }
.assistant-note { color:var(--muted); font-size:12.5px; }
.assistant-error { color:#b42318; }
.assistant-form { display:flex; gap:8px; padding:10px 14px 14px; border-top:1px solid var(--line); }
.assistant-form textarea { flex:1; min-height:0; resize:vertical; font:inherit; }
.assistant-form button { align-self:flex-end; }
.assistant-thinking::after { content:'...'; animation:assistant-dots 1.2s steps(4) infinite; display:inline-block; width:1.2em;
                             overflow:hidden; vertical-align:bottom; }
@keyframes assistant-dots { from { width:0; } to { width:1.2em; } }
@media (prefers-reduced-motion: reduce) { .assistant-thinking::after { animation:none; } }

/* Design requests and activity */
.filter-tabs { display:flex; gap:6px; margin:0 0 14px; }
.filter-tabs a { padding:4px 12px; border:1px solid #c9c9c9; border-radius:999px; color:var(--ink); text-decoration:none; font-size:12.5px; }
.filter-tabs a.active { border-color:#111; background:#111; color:#fff; }
.status-pill { display:inline-block; padding:1px 8px; border-radius:999px; background:#ececec; color:#333; font-size:11.5px; font-weight:700; }
.status-pill.open { background:#e7f0ff; color:#0b4a9c; }
.status-pill.applied, .status-pill.added { background:#e3f6ea; color:#1d5c33; }
.status-pill.rejected, .status-pill.removed, .status-pill.invalid { background:#fde8e6; color:#8f1d12; }
.status-pill.changed { background:#fff3d6; color:#6b4b00; }
pre.diff { max-height:520px; margin:8px 0 0; padding:10px 12px; overflow:auto; border:1px solid var(--line); border-radius:8px;
           background:#fafafa; font:12px/1.5 'IBM Plex Mono', monospace; white-space:pre; }
pre.diff .add { display:inline-block; min-width:100%; background:#e3f6ea; }
pre.diff .del { display:inline-block; min-width:100%; background:#fde8e6; }
pre.diff .hunk { color:#0b4a9c; }
pre.diff .meta { color:var(--muted); }
.diff-file { margin:0 0 12px; }
.diff-file summary { cursor:pointer; }
.review-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.review-actions form { display:flex; gap:8px; margin:0; }
.reject-form input { min-width:260px; }
.token-form { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; }
.token-form label { display:grid; gap:4px; font-size:12px; font-weight:700; }
.signin-card { max-width:460px; }
.signin-card form { display:grid; gap:12px; }
.signin-card label { display:grid; gap:4px; font-size:12px; font-weight:700; }
.activity-table td:nth-child(1) { white-space:nowrap; }

/* Sign-in and password pages: on their own, no navigation */
body.auth-page { --ink:#111111; --muted:#666666; --line:#d9d9d9; margin:0; min-height:100vh; color:var(--ink);
                 background:radial-gradient(circle at 78% 0%, #eeeeee 0, transparent 34rem), #f7f7f7;
                 font:14px/1.55 'DM Sans', 'Trebuchet MS', sans-serif; }
.auth-shell { display:grid; place-content:center; gap:22px; min-height:100vh; padding:24px 16px; }
.auth-brand { display:flex; align-items:center; gap:12px; justify-self:center; }
.auth-brand span { display:grid; line-height:1.2; }
.auth-brand small { color:var(--muted); font-size:11px; letter-spacing:.12em; text-transform:uppercase; }
.auth-mark { display:grid; place-items:center; width:40px; height:40px; border-radius:10px; background:#111;
             color:#fff; font-weight:700; }
.auth-card { width:min(400px, calc(100vw - 32px)); padding:28px; border:1px solid var(--line); border-radius:14px;
             background:#fff; box-shadow:0 10px 30px #0000000d; }
.auth-card h1 { margin:0 0 18px; font-size:22px; }
.auth-form { display:grid; gap:14px; }
.auth-form label { display:grid; gap:6px; font-size:12px; font-weight:700; }
.auth-form input { min-height:40px; padding:8px 12px; border:1px solid #c9c9c9; border-radius:8px; font:inherit;
                   font-size:14px; font-weight:400; }
.auth-form input:focus-visible { outline:3px solid #111; outline-offset:1px; }
.auth-form button { min-height:42px; border:0; border-radius:8px; background:#111; color:#fff; font:inherit;
                    font-weight:700; cursor:pointer; }
.auth-form button:hover { background:#000; }
.auth-form .cf-turnstile { min-height:65px; }
.auth-error { margin:0 0 14px; padding:10px 12px; border:1px solid #f1b8b2; border-radius:8px; background:#fde8e6;
              color:#8f1d12; }
.auth-message { margin:0 0 14px; padding:10px 12px; border-radius:8px; background:#e3f6ea; color:#1d5c33; }
.auth-hint { margin:16px 0 0; color:var(--muted); font-size:12.5px; }
.auth-code { overflow:auto; padding:10px; border-radius:8px; background:#f3f3f3; font-size:12px; }

/* User accounts page */
.accounts-table { width:100%; }
.account-actions { display:flex; flex-wrap:wrap; gap:6px; }
.account-actions form { margin:0; }
.account-actions button { min-height:30px; padding:3px 10px; font-size:12px; }
.checkbox-label { display:flex !important; align-items:center; gap:6px; }
