:root {
  --ink: #202123;
  --ink-2: #343541;
  --paper: #ffffff;
  --paper-2: #f7f7f8;
  --card: #ffffff;
  --line: #e5e5e7;
  --line-strong: #d4d4d7;
  --muted: #6f7077;
  --muted-2: #999aa1;
  --accent: #202123;
  --accent-soft: #ececef;
  --green: #16825d;
  --green-soft: #e7f5ef;
  --blue: #4169a8;
  --blue-soft: #eaf0f9;
  --red: #c04434;
  --red-soft: #fae9e6;
  --yellow: #9a681b;
  --yellow-soft: #f8eed8;
  --sidebar: #f7f7f8;
  --shadow: 0 14px 42px rgba(20, 20, 24, .12);
}
[hidden] { display:none!important; }

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, textarea, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid rgba(65,105,168,.45); outline-offset: 2px; }
h1, h2, h3, h4, p { margin-top: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0,1fr); }
.rail { position: sticky; top: 0; height: 100vh; padding: 12px 11px 10px; border-right: 1px solid var(--line); background: var(--sidebar); display: flex; flex-direction: column; overflow-y: auto; z-index: 10; }
.rail-heading { display: grid; grid-template-columns: minmax(0,1fr) 34px; gap: 5px; align-items: center; }
.brand { min-width: 0; height: 44px; padding: 4px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); display: flex; align-items: center; gap: 9px; text-align: left; }
.brand:hover, .rail-search:hover { background: #ececee; }
.brand-mark { width: 29px; height: 29px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: white; font-size: 13px; font-weight: 800; }
.brand-copy { min-width: 0; display: grid; line-height: 1.1; }
.brand-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.rail-search { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 21px; }
.new-chat-button { width: 100%; height: 38px; margin: 7px 0 8px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; color: var(--ink); display: flex; align-items: center; gap: 9px; text-align: left; font-size: 12px; font-weight: 650; box-shadow: 0 1px 2px rgba(20,20,24,.03); }
.new-chat-button:hover { background: #f1f1f3; }
.new-chat-button span { font-size: 18px; font-weight: 400; }

.nav-list { display: grid; gap: 2px; }
.nav-item { min-height: 36px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: #3d3e43; display: grid; grid-template-columns: 23px minmax(0,1fr) auto; gap: 7px; align-items: center; text-align: left; font-size: 12px; }
.nav-item[hidden] { display:none!important; }
.nav-item:hover { background: #ebebed; }
.nav-item.active { background: #e5e5e8; color: #17181a; font-weight: 650; }
.nav-icon { color: #606169; font-size: 15px; text-align: center; }
.nav-count { min-width: 20px; height: 18px; padding: 0 5px; border-radius: 99px; background: #dfe0e4; color: #55565d; display: grid; place-items: center; font-size: 9px; }
.nav-count-muted { background: transparent; color: var(--muted-2); }
.nav-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22,130,93,.09); }
.nav-primary { padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.nav-secondary { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); }
.nav-more { display: grid; gap: 2px; }

.rail-section { margin-top: 12px; }
.rail-section-title { height: 26px; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; color: #898a91; font-size: 10px; font-weight: 650; }
.rail-section-title button { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #898a91; font-size: 16px; }
.rail-section-title button:hover { background: #e9e9ec; color: var(--ink); }
.rail-thread-list, .rail-project-list { display: grid; gap: 2px; }
.rail-thread-list { max-height: 180px; overflow-y: auto; }
.rail-project-list { max-height: 82px; overflow-y: auto; }
.rail-thread { width:100%; min-height:34px; padding:0; border:0; border-radius:7px; background:transparent; color:#424349; display:grid; grid-template-columns:minmax(0,1fr) 28px; align-items:center; font-size:11px; }
.rail-thread-open, .rail-project { width:100%; min-height:34px; padding:7px 9px; border:0; border-radius:7px; background:transparent; color:inherit; display:grid; grid-template-columns:9px minmax(0,1fr); gap:8px; align-items:center; text-align:left; font-size:11px; }
.rail-thread:hover, .rail-thread:focus-within, .rail-project:hover { background:#ebebed; }
.rail-thread-open span, .rail-project span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rail-thread i, .rail-project i { width: 7px; height: 7px; border-radius: 2px; background: #b3b4ba; }
.rail-thread.doing i { background: var(--green); border-radius: 50%; }
.rail-thread.blocked i { background: var(--red); border-radius: 50%; }
.rail-loading { padding: 8px; color: var(--muted-2); font-size: 10px; }

.rail-foot { width:100%; margin-top: auto; padding: 10px 6px 2px; border-top: 1px solid var(--line); display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; align-items:center; }
.rail-account-button { min-width:0; padding:0; border:0; background:transparent; color:inherit; display:grid; grid-template-columns:30px minmax(0,1fr) auto; gap:8px; align-items:center; text-align:left; cursor:pointer; }
.rail-account-button:hover .owner-copy b { color:#fff; }
.owner-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #d9d9dd; color: #3c3d42; font-size: 10px; font-weight: 800; }
.owner-copy { min-width: 0; display: grid; line-height: 1.1; }
.owner-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.owner-copy small { margin-top: 3px; color: var(--muted-2); font-size: 8px; }
.verify-email-button { grid-column:1 / -1; justify-self:start; border:0; padding:3px 0 0 38px; color:var(--accent-soft); background:transparent; font:inherit; font-size:9px; cursor:pointer; text-align:left; }
.verify-email-button:hover { color:#fff; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.trademark-plaque { margin:10px 4px 8px; padding:6px 8px; border:1px solid #303030; border-radius:9px; background:#fff; display:block; }
.trademark-plaque span { display:none; }
.trademark-plaque img { width:100%; height:36px; object-fit:contain; display:block; }

.workspace { min-width: 0; min-height: 100vh; background: white; }
.topbar { min-height: 58px; padding: 9px 19px 9px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(18px); display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 8; }
.topbar-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.eyebrow { margin: 0; color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: none; }
.topbar-title .eyebrow::after { content: "/"; margin-left: 8px; color: #c1c2c6; }
h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.2; font-weight: 650; letter-spacing: 0; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.quiet-button, .primary-button, .connection-pill { min-height: 34px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; color: var(--ink); font-size: 11px; font-weight: 650; }
.quiet-button:hover { background: var(--paper-2); }
.primary-button { border-color: var(--ink); background: var(--ink); color: white; }
.primary-button:hover { background: #34353a; }
.connection-pill { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.connection-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.connection-pill.connected span { background: var(--green); }

.view { display: none; }
.view.active { display: block; }
.chat-layout { min-height: calc(100vh - 58px); display: block; }
.chat-main { min-height: calc(100vh - 58px); padding: 40px clamp(18px,6vw,72px) 22px; display: flex; flex-direction: column; }
.chat-intro { max-width: 780px; width: 100%; margin: auto auto 34px; padding-top: 4vh; text-align: center; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 650; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chat-intro h2 { margin: 20px 0 10px; color: #222327; font-size: clamp(30px,4vw,44px); line-height: 1.08; font-weight: 620; letter-spacing: -.035em; }
.chat-intro p { max-width: 590px; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.6; }
.has-work-history .chat-intro { display: none; }
.message-list { flex: 1; max-width: 790px; width: 100%; margin: 0 auto; padding: 8px 0 30px; display: flex; flex-direction: column; gap: 23px; }
.message { width: 100%; padding: 0; background: transparent; color: #26272b; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { width: auto; max-width: min(78%,680px); align-self: flex-end; padding: 12px 16px; border-radius: 18px 18px 5px 18px; background: #f1f1f3; color: #26272b; }
.message-head { margin-bottom: 7px; display: flex; gap: 8px; align-items: center; color: var(--muted-2); font-size: 9px; }
.message-head b { color: #55565c; font-weight: 700; }
.message:not(.user) .message-head b { color: var(--ink); }
.message.user .message-head { display: none; }
.message p { margin: 0; font-size: 14px; line-height: 1.66; }
.message.pending p { color: var(--muted-2); animation: pendingPulse 1.1s ease-in-out infinite alternate; }
.message p a { color:#8ec2ff; text-decoration-color:rgba(142,194,255,.45); text-underline-offset:3px; }
.message p a:hover { color:#c5ddff; text-decoration-color:currentColor; }
.message:not(.user) p { padding-right: 28px; }
.message-files { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.message-files a { max-width: 240px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-size: 10px; font-weight: 650; }
.message-sources { margin-top:12px; display:flex; flex-wrap:wrap; gap:7px; white-space:normal; }
.message-sources > span { width:100%; color:var(--muted-2); font-size:9px; font-weight:750; text-transform:uppercase; letter-spacing:.08em; }
.message-sources a { max-width:280px; padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:var(--panel); color:var(--ink); text-decoration:none; display:flex; flex-direction:column; gap:2px; }
.message-sources a:hover { border-color:var(--blue); }
.message-sources b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; }
.message-sources small { color:var(--muted-2); font-size:9px; }

.composer { max-width: 790px; width: 100%; margin: 0 auto; position: sticky; bottom: 18px; border: 1px solid var(--line-strong); border-radius: 19px; background: rgba(255,255,255,.97); box-shadow: 0 8px 28px rgba(20,20,24,.12); overflow: hidden; backdrop-filter: blur(18px); }
.composer.dragging { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(65,105,168,.12), var(--shadow); }
.composer textarea { width: 100%; min-height: 77px; max-height: 240px; padding: 17px 18px 8px; border: 0; resize: vertical; background: transparent; color: var(--ink); font-size: 14px; line-height: 1.55; outline: none; }
.composer textarea::placeholder { color: #9a9ba1; }
.composer-actions { min-height: 48px; padding: 4px 8px 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.composer-left, .composer-right { min-width: 0; display: flex; align-items: center; gap: 5px; }
.composer-top { min-width: 0; display: flex; align-items: center; gap: 8px; }
.composer-top select { max-width: 225px; padding: 6px 24px 6px 8px; border: 0; border-radius: 7px; background: transparent; color: #55565d; font-size: 10px; font-weight: 650; }
.composer-top select:hover { background: #f1f1f3; }
.composer-top > span { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.tool-button { min-width: 34px; height: 34px; padding: 0 9px; border: 0; border-radius: 9px; background: transparent; color: #606168; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; font-weight: 650; }
.tool-button:hover, .tool-button.recording { background: #eeeeF0; color: var(--ink); }
.tool-button.recording { color: var(--red); animation: pulse 1s infinite alternate; }
.tool-button.starting { color: var(--yellow); cursor: progress; }
.icon-tool > span:first-child { font-size: 18px; font-weight: 400; }
.mic-icon { width:18px; height:18px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.voice-state { max-width: 190px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.pending-files { padding: 0 12px 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.pending-files:empty { display: none; }
.file-chip { max-width: 260px; min-height: 30px; padding: 5px 7px 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 650; }
.file-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.file-chip button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; background: rgba(255,255,255,.65); color: currentColor; }
.send-button { width: 36px; min-width: 36px; height: 36px; padding: 0; border: 0; border-radius: 11px; background: var(--ink); color: white; display: grid; place-items: center; }
.stop-capture-button{height:34px;padding:0 11px;border:1px solid #613d3d;border-radius:9px;background:#2a1818;color:#ff9d9d;font-size:10px;font-weight:700;cursor:pointer}.stop-capture-button:hover{background:#3a2020}.stop-capture-button:disabled{opacity:.6;cursor:wait}
.send-button span { display: none; }
.send-button b { font-size: 18px; line-height: 1; }
.send-button:disabled { opacity: .45; cursor: wait; }
@keyframes pulse { to { box-shadow: 0 0 0 7px rgba(192,68,52,.11); } }
@keyframes pendingPulse { to { opacity: .45; } }

.context-panel { display: none; }
.metric-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.metric-grid button { min-height: 78px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: white; text-align: left; }
.metric-grid b { display: block; margin-bottom: 3px; font-size: 25px; }
.metric-grid span { color: var(--muted); font-size: 9px; }
.metric-alert b { color: var(--red); }
.compact-list { margin-top: 10px; display: grid; gap: 7px; }
.compact-card { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.compact-card b, .compact-card span { display: block; }
.compact-card b { font-size: 11px; }
.compact-card span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.compact-actions { margin-top: 8px; display: flex; gap: 5px; }
.compact-actions button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 9px; }

.content-view { padding: 28px 32px 52px; background: #fbfbfc; min-height: calc(100vh - 58px); }
.section-toolbar, .crm-toolbar { max-width: 1380px; margin: 0 auto 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.section-toolbar p, .crm-toolbar p { margin: 0; max-width: 680px; color: var(--muted); font-size: 12px; }
.filter-row { display: flex; gap: 6px; }
.task-search{margin-left:auto;min-width:min(320px,35vw)}.task-search input{width:100%;min-height:34px;padding:0 11px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);font:inherit}.task-search input:focus{outline:2px solid rgba(91,90,226,.2);border-color:var(--blue)}
.filter { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); font-size: 10px; font-weight: 650; }
.filter.active { border-color: var(--ink); background: var(--ink); color: white; }
.empty-state { padding: 28px 12px; color: var(--muted-2); text-align: center; font-size: 10px; }
.tag { padding: 4px 7px; border-radius: 6px; background: #f0f0f2; color: var(--muted); font-size: 9px; font-weight: 650; }
.tag.urgent, .tag.due.overdue { background: var(--red-soft); color: var(--red); }
.tag.important { background: var(--yellow-soft); color: var(--yellow); }
.tag.due { background: var(--blue-soft); color: var(--blue); }
.deadline.estimated::after { content: " · оценка"; color: var(--yellow); font-size: 9px; }
.deadline.overdue { color: var(--red); font-weight: 700; }

.workflow-columns { max-width: 1380px; margin: auto; padding-bottom: 10px; display: grid; grid-template-columns: repeat(4,minmax(230px,1fr)); gap: 11px; overflow-x: auto; }
.workflow-column { min-height: 420px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #f3f3f5; }
.column-head { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.column-head h3 { margin: 0; font-size: 11px; }
.column-head b { color: var(--muted); font-size: 10px; }
.task-stack { display: grid; gap: 8px; }
.task-card { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; text-align: left; transition: .15s ease; }
.task-card:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(20,20,24,.07); }
.task-card h4 { margin: 0 0 9px; font-size: 11px; line-height: 1.4; }
.task-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.task-table { max-width: 1380px; margin: auto; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.task-row { min-height: 64px; padding: 11px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 32px minmax(240px,1.6fr) minmax(130px,.7fr) 105px 100px; gap: 11px; align-items: center; }
.task-row:last-child { border-bottom: 0; }
.load-more { width:100%; min-height:46px; border:0; border-top:1px solid var(--line); background:transparent; color:var(--accent-soft); cursor:pointer; font-weight:650; }
.load-more:hover { background:#202020; color:#fff; }
.task-row:hover { background: #fafafd; }
.task-check { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line-strong); border-radius: 7px; background: white; }
.task-check.done { border-color: var(--green); background: var(--green); color: white; }
.task-title { min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; font-size: 11px; font-weight: 650; }
.task-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-select { width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 9px; }

.matrix-note { max-width: 1380px; margin: 0 auto 18px; color: var(--muted); font-size: 11px; }
.matrix-grid { max-width: 1380px; margin: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.matrix-box { min-height: 290px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.matrix-box.q1 { background: #fff9f8; }.matrix-box.q2 { background: #fffcf5; }.matrix-box.q3 { background: #f8fbff; }.matrix-box.q4 { background: #f7f7f8; }
.matrix-head { margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.matrix-head h3 { margin: 0; font-size: 15px; }.matrix-head span { color: var(--muted); font-size: 9px; }

.gantt-board { max-width: 1380px; min-width: 980px; margin: auto; border: 1px solid var(--line); border-radius: 12px; background: white; overflow: hidden; }
.gantt-head, .gantt-row { display: grid; grid-template-columns: 260px minmax(700px,1fr); }
.gantt-head { min-height: 48px; border-bottom: 1px solid var(--line); background: var(--paper-2); color: var(--muted); font-size: 9px; font-weight: 700; }
.gantt-head > div:first-child, .gantt-label { padding: 10px 13px; border-right: 1px solid var(--line); }
.gantt-head > div:first-child { display: flex; align-items: center; }
.gantt-weeks { display: flex; overflow: hidden; }.gantt-weeks span { min-width: 88px; flex: 1; padding: 10px 7px; border-right: 1px solid var(--line); font-size: 9px; }
.gantt-row { width: 100%; min-height: 56px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.gantt-row:hover { background: #fafafd; }.gantt-row:last-child { border-bottom: 0; }
.gantt-label { min-width: 0; display: flex; flex-direction: column; justify-content: center; }.gantt-label b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }.gantt-label small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.gantt-track { position: relative; background-image: linear-gradient(to right,transparent calc(100% - 1px),var(--line) 0); background-size: calc(100% / 8) 100%; }
.gantt-bar { position: absolute; top: 15px; height: 26px; min-width: 8px; border-radius: 7px; overflow: hidden; background: var(--blue-soft); color: var(--blue); }.gantt-bar.estimated { border: 1px dashed currentColor; }.gantt-bar em { display: block; height: 100%; background: currentColor; opacity: .16; }.gantt-bar strong { position: absolute; inset: 0; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }

.project-grid { max-width: 1380px; margin: auto; display: grid; grid-template-columns: repeat(3,minmax(240px,1fr)); gap: 11px; }
.schedule-list{max-width:1100px;margin:auto;display:grid;gap:8px}.schedule-row{min-height:82px;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:white;display:grid;grid-template-columns:38px minmax(220px,1fr) auto auto;gap:12px;align-items:center}.schedule-icon{width:36px;height:36px;border-radius:9px;background:var(--paper-2);display:grid;place-items:center;font-weight:800}.schedule-copy{min-width:0;display:grid;gap:3px}.schedule-copy b{font-size:12px}.schedule-copy span,.schedule-copy small{font-size:9px;color:var(--muted)}.schedule-row .compact-actions{justify-content:flex-end;flex-wrap:wrap}
body.authenticated .schedule-row{background:#181818;border-color:#303030;color:#ddd}body.authenticated .schedule-icon{background:#282828;color:#ddd}
.workspace-search-results{display:grid;gap:5px;max-height:min(52vh,520px);overflow:auto}.workspace-search-row{width:100%;padding:10px;border:1px solid var(--line);border-radius:9px;background:transparent;color:inherit;display:grid;grid-template-columns:24px minmax(0,1fr);gap:9px;text-align:left}.workspace-search-row:hover,.workspace-search-row:focus-visible{border-color:#666;background:#242424}.workspace-search-row>span:first-child{width:24px;height:24px;border-radius:7px;background:#282828;display:grid;place-items:center}.workspace-search-row>span:last-child{min-width:0;display:grid;gap:3px}.workspace-search-row b,.workspace-search-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-search-row b{font-size:10px}.workspace-search-row small{color:var(--muted);font-size:9px}
.notification-button{position:relative;width:34px;height:34px;border:1px solid var(--line);border-radius:9px;background:transparent;color:inherit;display:grid;place-items:center}.notification-button b{position:absolute;right:-5px;top:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:99px;background:#d64d4d;color:#fff;font-size:8px;line-height:17px}.notification-list{display:grid;gap:5px;max-height:min(58vh,560px);overflow:auto}.notification-row{padding:10px;border:1px solid var(--line);border-radius:9px;display:grid;grid-template-columns:14px minmax(0,1fr);gap:8px}.notification-row.unread{border-color:#555;background:#222}.notification-row>span{color:#777}.notification-row.unread>span{color:#75c9a4}.notification-row>div{min-width:0;display:grid;gap:3px}.notification-row b{font-size:10px}.notification-row small{font-size:8px;color:var(--muted)}
.project-card { min-height: 220px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; display: flex; flex-direction: column; }
.project-top, .project-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }.project-color { width: 10px; height: 10px; border-radius: 3px; }.project-card h3 { margin: 19px 0 8px; font-size: 15px; }.project-card p { color: var(--muted); font-size: 10px; }.project-progress { margin-top: auto; }.progress-line { height: 5px; margin-bottom: 8px; border-radius: 99px; background: #ececef; overflow: hidden; }.progress-line i { display: block; height: 100%; background: var(--green); }.project-foot { color: var(--muted); font-size: 9px; }.project-open { padding: 5px 7px; border: 0; background: none; color: var(--blue); font-size: 9px; font-weight: 650; }
.project-foot>span:last-child{display:flex;gap:4px}.project-workspace{max-width:1380px;margin:auto}.project-folder-head{margin-bottom:18px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:start}.project-folder-head h2{margin:0 0 5px}.project-folder-head p{margin:0;color:var(--muted);font-size:11px}.project-folder-head>div:last-child{display:flex;gap:7px}.project-folder-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.project-folder-grid>section{min-height:260px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.project-folder-grid h3{margin:0 0 11px;font-size:12px}.project-folder-row{width:100%;min-height:52px;padding:9px;border:0;border-bottom:1px solid var(--line);background:transparent;color:inherit;display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px;align-items:center;text-align:left}.project-folder-row:last-child{border-bottom:0}.project-folder-row:hover{background:rgba(255,255,255,.04)}.project-folder-row>span:last-child{min-width:0;display:grid;gap:3px}.project-folder-row b,.project-folder-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-folder-row small{color:var(--muted);font-size:9px}
.project-orange{background:#ef6c35!important}.project-violet{background:#5b5ae2!important}.project-blue{background:#4169a8!important}.project-green{background:#26845f!important}.project-amber{background:#a96219!important}.project-red{background:#a94848!important}.project-gray{background:#74757c!important}
.pct-w-0{width:0}.pct-w-5{width:5%}.pct-w-10{width:10%}.pct-w-15{width:15%}.pct-w-20{width:20%}.pct-w-25{width:25%}.pct-w-30{width:30%}.pct-w-35{width:35%}.pct-w-40{width:40%}.pct-w-45{width:45%}.pct-w-50{width:50%}.pct-w-55{width:55%}.pct-w-60{width:60%}.pct-w-65{width:65%}.pct-w-70{width:70%}.pct-w-75{width:75%}.pct-w-80{width:80%}.pct-w-85{width:85%}.pct-w-90{width:90%}.pct-w-95{width:95%}.pct-w-100{width:100%}
.pct-h-5{height:5%}.pct-h-10{height:10%}.pct-h-15{height:15%}.pct-h-20{height:20%}.pct-h-25{height:25%}.pct-h-30{height:30%}.pct-h-35{height:35%}.pct-h-40{height:40%}.pct-h-45{height:45%}.pct-h-50{height:50%}.pct-h-55{height:55%}.pct-h-60{height:60%}.pct-h-65{height:65%}.pct-h-70{height:70%}.pct-h-75{height:75%}.pct-h-80{height:80%}.pct-h-85{height:85%}.pct-h-90{height:90%}.pct-h-95{height:95%}.pct-h-100{height:100%}
.pct-l-0{left:0}.pct-l-5{left:5%}.pct-l-10{left:10%}.pct-l-15{left:15%}.pct-l-20{left:20%}.pct-l-25{left:25%}.pct-l-30{left:30%}.pct-l-35{left:35%}.pct-l-40{left:40%}.pct-l-45{left:45%}.pct-l-50{left:50%}.pct-l-55{left:55%}.pct-l-60{left:60%}.pct-l-65{left:65%}.pct-l-70{left:70%}.pct-l-75{left:75%}.pct-l-80{left:80%}.pct-l-85{left:85%}.pct-l-90{left:90%}.pct-l-95{left:95%}.pct-l-100{left:100%}

.crm-layout { max-width: 1380px; margin: auto; display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 12px; }
.deal-pipeline { display: grid; grid-template-columns: repeat(5,minmax(180px,1fr)); gap: 9px; overflow-x: auto; }.deal-column, .contact-panel { min-height: 390px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #f3f3f5; }.deal-stack, .contact-list { display: grid; gap: 8px; }.deal-card, .contact-card { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: white; text-align: left; }.deal-card b, .deal-card span, .deal-card strong, .deal-card small { display: block; }.deal-card b { font-size: 10px; }.deal-card span, .deal-card small { margin-top: 4px; color: var(--muted); font-size: 8px; }.deal-card strong { margin-top: 10px; font-size: 11px; }.contact-card { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 8px; align-items: center; }.contact-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 10px; font-weight: 700; }.contact-card b, .contact-card small { display: block; }.contact-card b { font-size: 10px; }.contact-card small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.result-list { max-width: 1050px; margin: auto; display: grid; gap: 9px; }.result-card { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; align-items: center; }.file-icon { width: 42px; height: 42px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 10px; font-weight: 700; }.result-card h3 { margin: 0 0 4px; font-size: 11px; }.result-card p { margin: 0; color: var(--muted); font-size: 9px; }.download-button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); text-decoration: none; font-size: 9px; font-weight: 650; }.artifact-kind { color: var(--green); font-weight: 700; }.artifact-kind.input { color: var(--blue); }

.tools-intro { max-width: 1100px; margin: 0 auto 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end; }.tools-intro h2 { margin: 3px 0 0; font-size: 24px; }.tools-intro > p { margin: 0; color: var(--muted); font-size: 11px; }.connector-grid { max-width: 1100px; margin: auto; display: grid; grid-template-columns: repeat(3,minmax(230px,1fr)); gap: 11px; }.connector-card { min-height: 220px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: white; display: flex; flex-direction: column; }.connector-top { display: flex; justify-content: space-between; }.connector-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: white; display: grid; place-items: center; font-weight: 700; }.connector-status, .source-status { padding: 5px 7px; border-radius: 6px; background: #ececef; color: var(--muted); font-size: 8px; font-weight: 700; }.connector-status.connected, .source-status.connected { background: var(--green-soft); color: var(--green); }.connector-status.ready, .source-status.ready { background: var(--blue-soft); color: var(--blue); }.connector-status.blocked, .source-status.awaiting_access, .source-status.waiting_gpu { background: var(--yellow-soft); color: var(--yellow); }.connector-card h3 { margin: 18px 0 2px; font-size: 14px; }.connector-model { color: var(--muted); font-size: 9px; }.connector-card p { color: var(--muted); font-size: 10px; }.connector-actions { margin-top: auto; display: flex; gap: 6px; }.connector-actions button { min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 9px; }.connector-actions button:disabled { color: var(--muted-2); }
.mail-account-summary{display:grid;gap:5px;margin:8px 0 12px}.mail-account-summary>span{display:grid;gap:2px;padding:7px 8px;border:1px solid var(--line);border-radius:7px;background:var(--paper-2)}.mail-account-summary b{font-size:9px;overflow-wrap:anywhere}.mail-account-summary small{color:var(--muted);font-size:8px}.mail-account-list,.mail-preview-list{display:grid;gap:7px}.mail-account-list article{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--paper-2)}.mail-account-list article>div:first-child{display:grid;gap:3px;min-width:0}.mail-account-list b{overflow-wrap:anywhere}.mail-account-list small{color:var(--muted)}.mail-account-list article>div:last-child{display:flex;flex-wrap:wrap;gap:5px}.mail-preview-list{max-height:390px;overflow:auto}.mail-preview-list article{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--paper-2)}.mail-preview-list article>div{display:grid;gap:3px;min-width:0}.mail-preview-list article>button{flex:0 0 auto}.mail-preview-list b,.mail-preview-list span{overflow-wrap:anywhere}.mail-preview-list span,.mail-preview-list small{color:var(--muted);font-size:9px}

.team-intro { max-width:1100px;margin:0 auto 20px;display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:end}.team-intro h2{margin:3px 0 0;font-size:24px}.team-intro-actions{display:flex;align-items:center;justify-content:space-between;gap:14px}.team-intro-actions p{margin:0;color:var(--muted);font-size:11px}.team-intro-actions button{flex:0 0 auto}.team-list{max-width:1100px;margin:auto;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:white}.team-row{min-height:72px;padding:12px 14px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:38px minmax(150px,1fr) minmax(250px,1.4fr) 120px auto;gap:12px;align-items:center}.team-row:last-child{border-bottom:0}.team-invite-row{background:rgba(65,105,168,.06)}.team-row:last-child{border-bottom:0}.team-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--paper-2);font-size:10px;font-weight:800}.team-person{min-width:0;display:grid}.team-person b{font-size:11px}.team-person span,.team-seen,.team-owner-lock{color:var(--muted);font-size:9px}.team-flags{display:flex;gap:5px;flex-wrap:wrap}.team-owner-lock{text-align:center}

.cloud-view { background: #f8f8fa; }.cloud-hero { max-width: 1380px; margin: 0 auto 16px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 13px; background: white; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }.cloud-hero h2 { margin: 4px 0 7px; font-size: 24px; }.cloud-hero p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 11px; }.cloud-hero-actions { display: flex; align-items: center; gap: 8px; }.cloud-live { min-height: 34px; padding: 0 10px; border: 1px solid #cde5da; border-radius: 8px; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 700; }.cloud-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }.cloud-live.offline { border-color: #efd3cd; background: var(--red-soft); color: var(--red); }.cloud-live.offline i { background: var(--red); }.cloud-metrics { max-width: 1380px; margin: 0 auto 11px; display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 9px; }.cloud-metrics article { min-height: 108px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; display: flex; flex-direction: column; }.cloud-metrics span { color: var(--muted); font-size: 8px; font-weight: 700; }.cloud-metrics b { margin: auto 0 5px; font-size: 28px; }.cloud-metrics small { color: var(--muted); font-size: 8px; }.cloud-grid { max-width: 1380px; margin: 0 auto 11px; display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.75fr); gap: 11px; }.cloud-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: white; }.cloud-panel-head { margin-bottom: 13px; display: flex; justify-content: space-between; gap: 12px; }.cloud-panel-head h3 { margin: 2px 0 0; font-size: 14px; }.cloud-panel-head > span, .cloud-panel-head button { border: 0; background: none; color: var(--muted); font-size: 8px; }.cloud-chart { height: 165px; padding: 16px 9px 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: flex-end; gap: 4px; background-image: linear-gradient(to bottom,transparent calc(25% - 1px),#eee 0); background-size: 100% 25%; overflow: hidden; }.cloud-sample { height: 100%; min-width: 4px; flex: 1; display: flex; align-items: flex-end; gap: 1px; }.cloud-sample i { width: 33%; min-height: 2px; border-radius: 2px 2px 0 0; }.cloud-sample .cpu,.cloud-chart-legend .cpu { background:#222; }.cloud-sample .memory,.cloud-chart-legend .memory { background:var(--blue); }.cloud-sample .storage,.cloud-chart-legend .storage { background:var(--green); }.cloud-chart-legend { margin-top: 9px; display: flex; gap: 14px; color: var(--muted); font-size: 8px; }.cloud-chart-legend span { display: flex; align-items: center; gap: 5px; }.cloud-chart-legend i { width: 6px; height: 6px; border-radius: 2px; }.model-panel { display:flex; flex-direction:column; }.model-panel > p { margin: 9px 0; color:var(--muted); font-size:10px; }.model-panel > small { margin-top:7px; color:var(--muted); font-size:8px; }.model-orb { width:82px; height:82px; margin:6px auto; border:1px solid var(--line); border-radius:50%; display:grid; place-items:center; background:var(--paper-2); }.model-orb b { color:var(--yellow); font-size:15px; }.model-orb.online { background:var(--green-soft); }.model-orb.online b { color:var(--green); }.model-progress { height:5px; margin-top:auto; border-radius:99px; background:#eee; overflow:hidden; }.model-progress i { display:block; height:100%; background:var(--ink); }.source-list,.cloud-job-list,.cloud-activity { display:grid; gap:7px; }.source-row { min-height:56px; padding:8px 9px; border:1px solid var(--line); border-radius:9px; display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:9px; align-items:center; }.source-icon { width:32px; height:32px; border-radius:8px; background:var(--paper-2); display:grid; place-items:center; font-size:12px;font-weight:700; }.source-row b,.source-row small,.cloud-job b,.cloud-job small,.cloud-activity b,.cloud-activity small { display:block; }.source-row b,.cloud-job b,.cloud-activity b { font-size:10px; }.source-row small,.cloud-job small,.cloud-activity small { margin-top:3px;color:var(--muted);font-size:8px; }.cloud-job { min-height:54px;padding:9px;border:1px solid var(--line);border-radius:9px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center; }.cloud-job button { min-height:28px;padding:0 8px;border:1px solid var(--line);border-radius:7px;background:white;color:var(--muted);font-size:8px; }.cloud-job .stop-button { border-color:#e4b9b1;background:var(--red-soft);color:var(--red); }.job-dot { width:8px;height:8px;border-radius:50%;background:var(--muted); }.job-dot.done { background:var(--green); }.job-dot.failed { background:var(--red); }.job-dot.cancelled { background:var(--yellow); }.cloud-activity-panel { max-width:1380px;margin:0 auto 20px; }.cloud-activity { grid-template-columns:repeat(3,minmax(210px,1fr)); }.cloud-activity article { min-height:54px;padding:9px;border-top:1px solid var(--line);display:grid;grid-template-columns:8px minmax(0,1fr);gap:8px; }.activity-dot { width:6px;height:6px;margin-top:5px;border-radius:50%;background:var(--green); }

.modal-backdrop { position:fixed; inset:0; z-index:40; padding:20px; background:rgba(18,18,20,.42); display:grid; place-items:center; backdrop-filter:blur(5px); }.modal-backdrop[hidden] { display:none; }.modal { width:min(650px,100%); max-height:90vh; padding:20px; border:1px solid var(--line); border-radius:15px; background:white; box-shadow:var(--shadow); overflow-y:auto; }.modal-head { display:flex; justify-content:space-between; gap:20px; }.modal-head h2 { margin:3px 0 0; font-size:20px; }.modal-head > button { width:31px; height:31px; padding:0; border:0; border-radius:8px; background:var(--paper-2); color:var(--muted); font-size:20px; }.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.field { display:grid; gap:6px; }.field.full { grid-column:1/-1; }.field label { color:var(--muted); font-size:9px; font-weight:700; }.field input,.field textarea,.field select { width:100%; padding:10px 11px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--ink); }.field textarea { min-height:100px; resize:vertical; }.check-row { display:flex; flex-wrap:wrap; gap:10px; }.check-row label { min-height:36px; padding:0 10px; border:1px solid var(--line); border-radius:8px; display:flex; align-items:center; gap:6px; background:var(--paper-2); font-size:10px; }.modal-actions { margin-top:17px; display:flex; justify-content:flex-end; gap:7px; }.toast { position:fixed; z-index:50; right:20px; bottom:20px; max-width:360px; padding:11px 14px; border-radius:9px; background:var(--ink); color:white; box-shadow:var(--shadow); opacity:0; transform:translateY(12px); pointer-events:none; transition:.2s ease; }.toast.show { opacity:1; transform:translateY(0); }.toast.error { background:var(--red); }.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

@media (max-width:1120px) {
  .app-shell { grid-template-columns:240px minmax(0,1fr); }
  .cloud-metrics { grid-template-columns:repeat(3,1fr); }
  .cloud-grid { grid-template-columns:1fr; }
  .cloud-activity { grid-template-columns:repeat(2,1fr); }
  .task-row { grid-template-columns:32px minmax(220px,1fr) 140px 100px; }.task-row > :nth-child(4) { display:none; }
  .crm-layout { grid-template-columns:1fr; }.contact-panel { order:-1; min-height:0; }
  .project-grid,.connector-grid { grid-template-columns:repeat(2,minmax(230px,1fr)); }
}

@media (max-width:760px) {
  .app-shell { display:block; padding-bottom:62px; }
  .rail { position:fixed; inset:auto 0 0; width:100%; height:62px; padding:5px 7px max(5px,env(safe-area-inset-bottom)); border:0; border-top:1px solid var(--line); overflow:hidden; display:block; background:rgba(249,249,250,.97); backdrop-filter:blur(18px); }
  .rail-heading,.new-chat-button,.rail-section,.nav-secondary,.trademark-plaque,.rail-foot { display:none; }
  .nav-primary { height:100%; padding:0; border:0; display:grid; grid-template-columns:repeat(3,1fr); gap:2px; }
  .nav-item { min-height:50px; padding:4px 2px; display:flex; flex-direction:column; justify-content:center; gap:1px; text-align:center; font-size:8px; position:relative; }.nav-item.active { background:#e7e7ea; }.nav-icon { font-size:16px; }.nav-count { position:absolute; top:2px; left:calc(50% + 8px); min-width:16px; height:16px; }.nav-live { position:absolute; top:6px; left:calc(50% + 8px); }
  .topbar { min-height:54px; padding:8px 11px; }.topbar-title .eyebrow { display:none; }.top-actions .quiet-button { display:none; }.connection-pill { max-width:145px; min-height:32px; padding:0 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .chat-main { min-height:calc(100vh - 116px); padding:24px 12px 17px; }.chat-intro { padding-top:6vh; }.chat-intro h2 { font-size:31px; }.message-list { gap:18px; }.message.user { max-width:88%; }.message p { font-size:13px; }.composer { bottom:7px; border-radius:16px; }.composer textarea { min-height:72px; padding:14px 14px 7px; }.composer-top > span,.tool-label,.voice-state { display:none; }.composer-top select { max-width:170px; }.tool-button { padding:0 7px; }
  .content-view { min-height:calc(100vh - 54px); padding:22px 12px 30px; }.cloud-hero { padding:17px; align-items:flex-start; flex-direction:column; }.cloud-hero-actions { flex-wrap:wrap; }.cloud-metrics { grid-template-columns:1fr 1fr; }.cloud-metrics article { min-height:96px; }.cloud-activity { grid-template-columns:1fr; }.source-row { grid-template-columns:30px minmax(0,1fr); }.source-status { grid-column:2; width:max-content; }.section-toolbar,.crm-toolbar { align-items:flex-start; flex-direction:column; }.workflow-columns { grid-template-columns:repeat(4,82vw); }.task-table { border:0; background:transparent; display:grid; gap:7px; }.task-row { min-height:78px; border:1px solid var(--line); border-radius:10px; background:white; grid-template-columns:30px minmax(0,1fr) 100px; }.task-row > :nth-child(3),.task-row > :nth-child(4) { display:none; }.matrix-grid { grid-template-columns:1fr; }#view-gantt { overflow-x:auto; }.gantt-head,.gantt-row { grid-template-columns:190px minmax(700px,1fr); }.project-grid,.connector-grid { grid-template-columns:1fr; }.deal-pipeline { grid-template-columns:repeat(5,78vw); }.tools-intro { grid-template-columns:1fr; }.form-grid { grid-template-columns:1fr; }.field.full { grid-column:auto; }.result-card { grid-template-columns:40px minmax(0,1fr); }.download-button { grid-column:1/-1; text-align:center; }
  .schedule-row{grid-template-columns:36px minmax(0,1fr) auto}.schedule-row .compact-actions{grid-column:1/-1;justify-content:flex-start}.schedule-row .compact-actions button{flex:1 1 120px}
}

/* Clean Codex-like workspace: restrained, task-first and account-isolated. */
.auth-shell { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:24px; background:#0d0d0d; color:#f5f5f5; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; }
body.authenticated .auth-shell { display:none; }
body:not(.authenticated) .app-shell, body:not(.authenticated) .space-scene { display:none; }
.auth-card { width:min(440px,100%); margin:auto; padding:34px; border:1px solid #323232; border-radius:18px; background:#171717; box-shadow:0 28px 90px rgba(0,0,0,.42); }
.auth-brand { display:flex; align-items:center; gap:12px; margin-bottom:30px; }
.auth-brand div { display:grid; gap:2px; }.auth-brand b{font-size:16px}.auth-brand small{color:#9b9b9b;font-size:12px}
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; margin-bottom:24px; border-radius:10px; background:#0f0f0f; }
.auth-tabs button { min-height:44px;padding:9px;border:0;border-radius:7px;background:transparent;color:#999;font-weight:650;cursor:pointer}.auth-tabs button.active{background:#292929;color:#fff}
.auth-form { display:grid; gap:15px; }.auth-form[hidden]{display:none!important}.auth-form h1{margin:0;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;font-size:24px;line-height:1.16;letter-spacing:-.03em}.auth-form>p{margin:-7px 0 5px;color:#aaa;font-size:13px;line-height:1.5}
.auth-form label{display:grid;gap:7px;color:#c9c9c9;font-size:12px;font-weight:650}.auth-form label[hidden]{display:none!important}.auth-form input{height:44px;padding:0 13px;border:1px solid #3c3c3c;border-radius:9px;background:#101010;color:#fff;font:inherit;outline:none}.auth-form input:focus{border-color:#777;box-shadow:0 0 0 3px rgba(255,255,255,.06)}
.auth-form>button{height:44px;border:0;border-radius:9px;background:#f3f3f3;color:#111;font-weight:720;cursor:pointer}.auth-form>button:disabled{opacity:.55}.auth-form>small{color:#777;line-height:1.45}.auth-error{min-height:18px;margin:14px 0 0;color:#ff8d8d;font-size:12px}
.auth-form>.auth-link{min-height:44px;height:auto;padding:9px 8px;border:0;background:transparent;color:#9f9f9f;font-size:12px;font-weight:600}.auth-form>.auth-link:hover{color:#fff}.auth-error.success{color:#78d6ad}
.space-scene { display:none!important; }
body { background:#111; }
.app-shell { grid-template-columns:286px minmax(0,1fr); background:#111; }
.rail { padding:10px 9px; border-color:#2b2b2b; background:#171717; box-shadow:none; backdrop-filter:none; }
.workspace { background:#111; }
.brand-mark { background:#f0f0f0; color:#171717; box-shadow:none; }
.brand-copy b,.owner-copy b { color:#f2f2f2; }.brand-copy small,.owner-copy small{color:#8c8c8c}
.new-chat-button { background:transparent; border-color:#343434; color:#ededed; box-shadow:none; }.new-chat-button:hover{background:#252525;border-color:#444}
.nav-item { color:#b8b8b8; }.nav-item:hover,.nav-item.active{background:#262626;color:#fff;box-shadow:none}.nav-icon{color:#a6a6a6}
.rail-section { margin-top:18px; }.rail-section-title{color:#777}.rail-section-title button{color:#999}
.rail-thread-group{display:grid;gap:2px}.rail-thread-group>span{min-height:13px;padding:4px 8px 2px;color:#707070;font-size:9px;font-weight:700}.rail-thread-group>span:empty{display:none}
.rail-thread { position:relative; color:#bdbdbd; }.rail-thread:hover,.rail-thread:focus-within,.rail-thread.active{background:#292929;color:#fff}.rail-thread-open{grid-template-columns:14px minmax(0,1fr);border-radius:7px 0 0 7px}.rail-thread i{width:8px;height:8px;border:1px solid #777;border-radius:3px;background:transparent!important}
.rail-thread .thread-menu{display:none;width:24px;height:24px;padding:0;border:0;border-radius:5px;background:transparent;color:#777;font-size:8px;letter-spacing:-1px;cursor:pointer}.rail-thread.active .thread-menu,.rail-thread:hover .thread-menu,.rail-thread:focus-within .thread-menu{display:block}.rail-thread .thread-menu:hover,.rail-thread .thread-menu:focus-visible{background:#383838;color:#fff}
.chat-action-list{display:grid;gap:4px}.chat-action-list>button,.chat-action-link{width:100%;min-height:54px;padding:10px;border:0;border-radius:9px;background:transparent;color:#ccc;display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;align-items:center;text-align:left;text-decoration:none;cursor:pointer}.chat-action-list>button:hover,.chat-action-list>button:focus-visible,.chat-action-link:hover,.chat-action-link:focus-visible{background:#252525}.chat-action-list>button>span:first-child,.chat-action-link>span:first-child{font-size:16px;text-align:center}.chat-action-list>button>span:last-child,.chat-action-link>span:last-child{display:grid;gap:2px}.chat-action-list b{color:#e7e7e7;font-size:12px}.chat-action-list small{color:#777;font-size:10px}.chat-action-list .danger b{color:#ff9999}
.mobile-account-card{margin-bottom:10px;padding:10px;border:1px solid #303030;border-radius:10px;background:#151515;display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center}.mobile-account-card .team-avatar{width:38px;height:38px}.mobile-account-card>div:last-child{min-width:0;display:grid;gap:2px}.mobile-account-card b,.mobile-account-card span,.mobile-account-card small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-account-card b{color:#eee}.mobile-account-card span,.mobile-account-card small{color:#888;font-size:10px}
.archive-chat-list{display:grid;gap:8px}.archive-chat-row{min-height:68px;padding:12px 14px;border:1px solid #303030;border-radius:11px;background:#181818;display:flex;gap:16px;align-items:center;justify-content:space-between}.archive-chat-row>div:first-child{min-width:0;display:grid;gap:4px}.archive-chat-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e7e7e7;font-size:13px}.archive-chat-row span{color:#777;font-size:10px}.archive-chat-row>div:last-child{display:flex;gap:6px;flex:0 0 auto}
.rail-project { color:#bdbdbd; }.rail-project:hover{background:#292929;color:#fff}
.nav-secondary { margin-top:auto; }.nav-secondary .nav-more{display:none}.nav-secondary .nav-more.open{display:grid}.nav-more-toggle[aria-expanded="true"]{background:#262626;color:#fff}
.mobile-more-item{display:none}
.trademark-plaque { display:block; }
.rail-foot { border-color:#2c2c2c; }.logout-button{width:30px;height:30px;border:0;border-radius:7px;background:transparent;color:#888;cursor:pointer}.logout-button:hover{background:#2b2b2b;color:#fff}
.rail-search,.notification-button,.logout-button{min-width:40px;min-height:40px}
.notification-button{border-color:#333;background:#191919;color:#aaa}.notification-button>span{color:#bbb;font-size:15px;line-height:1}.notification-button:hover,.notification-button:focus-visible{border-color:#4a4a4a;background:#242424;color:#fff}
.rail-section-title button{width:36px;height:36px}
.rail-thread .thread-menu{width:36px;height:36px;flex:0 0 36px}
.rail-account-button{min-height:40px}
.verify-email-button{min-height:36px;padding-top:0;padding-bottom:0;display:flex;align-items:center}
.topbar { height:58px; border-color:#292929; background:rgba(17,17,17,.94); backdrop-filter:blur(16px); }.topbar-title .eyebrow{display:none}.topbar-title h1{color:#e8e8e8;font-size:14px;font-weight:620}.quiet-button{border-color:#333;background:#191919;color:#c8c8c8}.connection-pill{border-color:#2e2e2e;background:#171717;color:#aaa}
.chat-layout { min-height:calc(100vh - 58px); display:block; }.context-panel{display:none}
.chat-main { min-height:calc(100vh - 58px); max-width:880px; margin:0 auto; padding:38px 26px 26px; }
.chat-intro { display:block; max-width:720px; margin:auto auto 28px; padding:5vh 0 0; text-align:center; perspective:none; }
.live-badge { background:transparent;border:0;color:#888;box-shadow:none}.live-badge i{background:#62d7a7}
.chat-intro h2 { margin:18px 0 10px; color:#f3f3f3; font-size:clamp(34px,5vw,48px); line-height:1.05; font-weight:650; letter-spacing:-.045em; text-shadow:none; }.chat-intro h2 span{display:inline;color:inherit;background:none}
.chat-intro .hero-description { max-width:520px;margin:0 auto;color:#999;font-size:14px;line-height:1.55 }
.mission-grid { max-width:650px;margin:28px auto 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.mission-grid button{width:100%;min-height:76px;padding:11px;border:1px solid #303030;border-radius:10px;background:#171717;color:#bbb;box-shadow:none;display:grid;grid-template-columns:28px minmax(0,1fr) 12px;gap:9px;align-items:center;text-align:left}.mission-grid button:hover{border-color:#484848;background:#202020;transform:none}.mission-grid button span{min-width:0;display:grid;gap:2px}.mission-grid span b,.mission-grid span small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mission-grid span b{color:#ddd;font-size:11px;line-height:1.25}.mission-grid small{color:#777;font-size:9px;line-height:1.25}.mission-grid em{color:#666;font-style:normal;text-align:right}.mission-icon{width:28px;height:28px;border-radius:8px;background:#252525!important;color:#bbb!important;box-shadow:none!important;display:grid;place-items:center}
.message-list { max-width:760px; gap:18px; }.message{border-color:#2e2e2e;background:transparent;color:#dedede;box-shadow:none}.message.user{background:#222;border-color:#343434}.message p{color:#d3d3d3}.message-head{color:#777}
.message-actions{margin-top:9px;display:flex;flex-wrap:wrap;gap:6px}.message-actions button{min-height:36px;padding:5px 9px;border:1px solid #333;border-radius:7px;background:transparent;color:#888;font-size:9px}.message-actions button:hover,.message-actions button:focus-visible{border-color:#555;background:#202020;color:#ddd}.message-actions button:disabled{opacity:.5}.message-actions button.active{border-color:#417d66;background:#18392c;color:#8de0ba}.message-actions button.active.negative{border-color:#7c4848;background:#3a2020;color:#ffaaa1}
.composer { max-width:760px; bottom:18px; border-color:#3d3d3d; border-radius:18px; background:#1b1b1b; box-shadow:0 16px 48px rgba(0,0,0,.34); backdrop-filter:none; }.composer:focus-within{border-color:#626262;box-shadow:0 18px 55px rgba(0,0,0,.4)}
.composer textarea{color:#f2f2f2}.composer textarea::placeholder{color:#777}.composer-top select{background:#222;color:#aaa}.composer-top select:hover,.tool-button:hover{background:#2a2a2a;color:#fff}.tool-button{color:#aaa}.send-button{background:#f1f1f1;color:#111;box-shadow:none}.send-button b{color:#111}.voice-state{color:#838383}
.content-view,.cloud-view { background:#111;color:#ddd }.content-view h2,.content-view h3,.cloud-view h2,.cloud-view h3{color:#eee}.task-row,.project-card,.result-card,.connector-card,.cloud-panel,.cloud-metrics article,.workflow-column,.matrix-box,.team-list{background:#181818;border-color:#303030;color:#ddd;box-shadow:none}.task-search input{border-color:#363636;background:#181818;color:#eee;color-scheme:dark}.cloud-hero{background:#181818;border-color:#303030}.cloud-hero p:last-child{color:#999}.cloud-chart{border-color:#333;background-image:linear-gradient(to bottom,transparent calc(25% - 1px),#2a2a2a 0)}.cloud-sample .cpu,.cloud-chart-legend .cpu{background:#aaa}.source-row,.cloud-job{background:#151515;border-color:#303030}.source-icon{background:#242424;color:#bbb}.cloud-activity article{border-color:#303030}.team-row{border-color:#303030}.team-avatar{background:#282828;color:#ddd}.empty-state{color:#777}
.content-view .mail-account-summary>span,.mail-account-list article,.mail-preview-list article{background:#151515;border-color:#303030}.content-view .connector-actions button{background:#222;border-color:#383838;color:#ccc}
.deal-column,.contact-panel{background:#151515;border-color:#303030;color:#ddd}.deal-card,.contact-card{background:#1c1c1c;border-color:#343434;color:#ddd}.deal-card b,.deal-card strong,.contact-card b{color:#e6e6e6}.deal-card span,.deal-card small,.contact-card small{color:#888}.contact-avatar{background:#292929;color:#bbb}.deal-column .empty-state,.contact-panel .empty-state{color:#727272}
.modal-backdrop{padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:rgba(0,0,0,.7)}
.modal{max-height:min(90vh,calc(100dvh - 24px));padding:0;border-color:#353535;background:#181818;color:#ddd;box-shadow:0 28px 90px rgba(0,0,0,.55);overscroll-behavior:contain}
.modal-head{position:sticky;top:0;z-index:2;padding:18px 20px 13px;border-bottom:1px solid #303030;background:#181818}.modal-head h2{color:#f0f0f0}.modal-head>button{background:#282828;color:#aaa}
.modal-form,#modal-form{padding:16px 20px 0}.field label{color:#999}.field input,.field textarea,.field select{border-color:#393939;background:#111;color:#eee;color-scheme:dark}.field input:focus,.field textarea:focus,.field select:focus{border-color:#666}.check-row label{border-color:#393939;background:#222;color:#ccc}
.modal-actions{position:sticky;bottom:0;z-index:2;margin:17px -20px 0;padding:13px 20px calc(13px + env(safe-area-inset-bottom));border-top:1px solid #303030;background:#181818}.modal-actions .primary-button{background:#eee;color:#111}.modal-actions .quiet-button{background:#222;color:#bbb}
@media(max-width:760px){
  .auth-shell{padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom))}
  .auth-form input{font-size:16px}
  .app-shell{display:block;grid-template-columns:1fr;padding-bottom:76px}
  .rail{position:fixed;inset:auto 0 0;z-index:30;width:100%;height:70px;max-height:none;padding:5px 6px max(5px,env(safe-area-inset-bottom));border:0;border-top:1px solid #303030;background:rgba(23,23,23,.97);overflow:visible;backdrop-filter:blur(18px)}
  .rail-heading,.new-chat-button,.rail-section,.trademark-plaque,.rail-foot{display:none}
  .task-search{order:-1;width:100%;min-width:0;margin:0}.section-toolbar .filter-row{width:100%;overflow-x:auto}
  .nav-secondary{height:100%;margin:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;gap:2px;overflow:visible}
  .nav-secondary>.nav-item{min-width:0;min-height:54px;padding:5px 2px;display:flex;flex-direction:column;justify-content:center;gap:2px;text-align:center;font-size:8px;position:relative}
  .nav-secondary>[data-view="scheduled"],.nav-secondary>[data-view="results"],.nav-secondary>#team-nav{display:none}
  .nav-secondary>.nav-item.active{background:#303030}
  .nav-secondary .nav-icon{font-size:17px}
  .nav-secondary .nav-count{position:absolute;top:3px;left:calc(50% + 8px);min-width:15px;height:15px}
  .nav-secondary .nav-more{display:none}.nav-secondary .nav-more.open{position:fixed;right:8px;bottom:78px;width:min(230px,calc(100vw - 16px));padding:7px;border:1px solid #353535;border-radius:12px;background:#1b1b1b;box-shadow:0 18px 50px rgba(0,0,0,.42);z-index:35}
  .nav-secondary .nav-more.open>.nav-item{min-height:42px;padding:0 10px;display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px;text-align:left;font-size:10px}
  .nav-secondary .nav-more.open>.mobile-more-item{display:grid}
  .chat-main{padding:22px 14px 92px}.composer{bottom:76px}.toast{right:12px;bottom:84px;max-width:calc(100vw - 24px)}
  .mission-grid{grid-template-columns:1fr}.top-actions .quiet-button{display:none}.auth-card{padding:25px}.rail-thread .thread-menu{display:block;min-width:44px;min-height:44px}.chat-intro{padding-top:2vh}.archive-chat-row{align-items:stretch;flex-direction:column}.archive-chat-row>div:last-child{justify-content:flex-end}
  .project-folder-head{grid-template-columns:1fr}.project-folder-head>div:last-child{justify-content:flex-start}.project-folder-grid{grid-template-columns:1fr}
  .team-intro{grid-template-columns:1fr}.team-intro-actions{align-items:flex-start;flex-direction:column}.team-row{grid-template-columns:36px minmax(0,1fr) auto}.team-flags,.team-seen{grid-column:2/-1}.team-row>.quiet-button,.team-owner-lock{grid-column:3;grid-row:1}
  .modal-backdrop{place-items:end center;padding:8px 8px max(8px,env(safe-area-inset-bottom))}.modal{width:100%;max-height:calc(100dvh - 16px);border-radius:16px}.modal-head{padding:15px 16px 11px}.modal-head h2{font-size:18px}.modal-form,#modal-form{padding:14px 16px 0}.modal-actions{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:16px}.modal-actions button{min-height:42px;flex:1}.field input,.field select{min-height:44px;font-size:16px}.field textarea{font-size:16px}.check-row label{min-height:44px}
}
@media(min-width:761px) and (max-width:1200px){.composer-left{overflow:hidden}.composer-top>span{display:none}.composer-top select{max-width:200px}.voice-state{max-width:135px}}
