@font-face { font-family: Anton; src: url('/fonts/anton-latin-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('/fonts/inter-latin-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('/fonts/inter-latin-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url('/fonts/inter-latin-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --ink: #120E2A;
  --ink-2: #1a1440;
  --violet: #6A4CFF;
  --violet-2: #8B6CFF;
  --tint: #EFEBFF;
  --lime: #C8F23D;
  --paper: #FAF9FF;
  --muted: #b7addd;
  --line: #2c2558;
  --panel: #161033;
  --good: #3DDC97;
  --danger: #ff5d73;
  font-family: Inter, ui-sans-serif, sans-serif;
  color: var(--paper);
  background: var(--ink);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; min-height: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
a { color: var(--tint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { display: inline-block; vertical-align: middle; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr) 332px; grid-template-rows: 74px minmax(0, 1fr); background: radial-gradient(circle at 30% 0%, #241a55 0%, var(--ink) 46%); }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: #100c26; padding-right: 14px; min-width: 0; }
.brand { width: 228px; display: flex; gap: 12px; align-items: center; padding: 0 16px; flex: none; }
.brand-mark { width: 46px; height: 30px; border: 2px solid var(--violet); border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 0 12px #6A4CFF66; }
.brand-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.brand-copy strong { display: block; font-family: Anton, Inter, sans-serif; font-size: 18px; letter-spacing: .3px; font-weight: 400; white-space: nowrap; }
.brand-copy em { font-style: normal; color: var(--violet-2); }
.brand-copy small { display: block; letter-spacing: 1.6px; font-size: 8px; color: var(--muted); margin-top: 2px; }
.search { flex: 1; min-width: 0; max-width: 460px; height: 42px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #1b1540; border-radius: 11px; padding: 0 12px; color: var(--muted); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--paper); }
.top-stats { margin-left: auto; display: flex; }
.topstat { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-left: 1px solid var(--line); }
.topstat b { display: block; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 15px; }
.topstat small { display: block; color: var(--muted); font-size: 10px; }
.time-stat { text-align: right; font-size: 11px; color: var(--muted); padding: 0 8px; white-space: nowrap; }
.time-stat strong { display: block; color: var(--paper); font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.avatar-circle { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--violet); font-weight: 700; }
.notification { background: none; border: 0; color: var(--tint); }
.sidebar { background: #120e2c; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; min-height: 0; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; width: 100%; align-items: center; gap: 12px; text-align: left; background: transparent; border: 1px solid transparent; color: var(--tint); border-radius: 8px; padding: 11px 12px; }
.nav-item.active { background: linear-gradient(90deg, var(--violet), #3a2a9a); color: white; }
.nav-item .count { margin-left: auto; background: #ff4d67; border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.soon { margin-left: auto; font-style: normal; font-size: 9px; letter-spacing: .4px; text-transform: uppercase; color: var(--lime); }
.sidebar-bottom { margin-top: auto; }
.capacity { background: #1a1440; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.eyebrow { text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.status-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--tint); font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); display: inline-block; box-shadow: 0 0 6px #3DDC9766; flex: none; }
.dot.lime { background: var(--lime); box-shadow: 0 0 6px #C8F23D88; }
.dot.gray { background: #7d879c; box-shadow: none; }
.dot.red { background: var(--danger); box-shadow: none; }
.deploy, .btn.wide { width: 100%; margin-top: 14px; text-align: center; text-decoration: none; }
.workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #100c24; }
.office-panel { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.map-toolbar, .sample-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.map-toolbar h1 { font-size: 15px; margin: 0; }
.map-tools, .row, .spread { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.live-tag, .demo-tag, .sample-pill, .badge { border-radius: 99px; font-size: 10px; font-weight: 700; padding: 4px 8px; }
.live-tag { background: #143226; color: var(--lime); border: 1px solid #2d6a38; }
.demo-tag, .sample-pill { background: #3a2c12; color: #ffd27a; border: 1px solid #6a5124; font-style: normal; }
.sample-banner { background: #2a2410; color: #ffe7ad; justify-content: flex-start; font-size: 13px; }
.sample-banner a, .book { background: var(--lime); color: var(--ink); border-radius: 8px; padding: 8px 10px; font-weight: 700; text-decoration: none; }
.office-viewport { flex: 1; min-height: 220px; overflow: hidden; touch-action: none; background: #0c0a1c; position: relative; }
.office-stage { width: 100%; transform-origin: 0 0; }
#office-canvas { width: 100%; height: auto; display: block; image-rendering: pixelated; image-rendering: crisp-edges; background: #0c0a1c; }
.bottom-info { display: grid; grid-template-columns: 1.2fr .9fr .9fr; gap: 10px; padding: 10px; border-top: 1px solid var(--line); background: #120e2c; }
.info-card, .generic-card, .agent-card, .task-list-item, .rpanel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.info-card h2, .rpanel h2 { margin: 0; font-size: 13px; padding: 12px 12px 8px; }
.task-table, .log-list, .activity-list, .rpanel-body { padding: 0 12px 12px; }
.task-table-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 36px 72px; gap: 6px; align-items: center; font-size: 11px; padding: 6px 0; border-bottom: 1px solid #2a2450; }
.task-table-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row, .queue-row { display: flex; gap: 8px; align-items: center; font-size: 12px; padding: 7px 0; border-bottom: 1px solid #2a2450; }
.log-row span:nth-child(3), .queue-row b { flex: 1; min-width: 0; }
.log-row small, .fine, .muted { color: var(--muted); }
.activity-item { font-size: 12px; padding: 8px 0; border-bottom: 1px solid #2a2450; }
.activity-item small { margin-left: auto; color: var(--muted); }
.rightbar { background: #120e2c; border-left: 1px solid var(--line); overflow: auto; padding: 12px; min-height: 0; }
.profile-head { display: flex; gap: 12px; align-items: center; }
.portrait { width: 72px; height: 72px; object-fit: cover; image-rendering: pixelated; border-radius: 10px; background: #241a4e; border: 1px solid var(--line); }
.profile-title { font-family: Anton, Inter, sans-serif; font-size: 28px; letter-spacing: .4px; }
.profile-sub, .profile-role { color: var(--tint); font-size: 13px; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 8px 0; border-bottom: 1px solid var(--line); }
.tab { background: transparent; border: 0; color: var(--tint); padding: 8px 2px; }
.tab.active { background: var(--violet); color: white; border-radius: 6px 6px 0 0; }
.task-big { padding: 10px 12px 12px; }
.task-title { font-size: 13px; }
.progress { height: 8px; background: #2c2558; border-radius: 8px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), #b08cff); }
.taskstate, .badge { border: 1px solid #4d3d9a; color: var(--tint); }
.badge.good { border-color: #2d6a38; color: var(--lime); }
.queue-num { min-width: 22px; text-align: center; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }
.btn { border-radius: 8px; background: var(--violet); border: 1px solid #8d78ff; color: white; padding: 10px 12px; font-weight: 700; }
.btn.secondary { background: #241b4e; border-color: #43367d; }
.btn.small { font-size: 12px; padding: 7px 10px; }
.btn.wide { display: inline-flex; justify-content: center; align-items: center; gap: 6px; }
.current-page { padding: 22px; overflow: auto; }
.page-title { margin: 0 0 6px; font-family: Anton, Inter, sans-serif; letter-spacing: .4px; font-size: 32px; font-weight: 400; }
.page-sub { margin: 0 0 18px; color: var(--muted); }
.grid-cards, .integration-list, .task-list { display: grid; gap: 12px; }
.grid-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.agent-card { display: flex; gap: 12px; text-align: left; padding: 14px; color: inherit; }
.agent-card img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; image-rendering: pixelated; }
.agent-card p, .generic-card p, .task-list-item p { color: var(--muted); font-size: 13px; }
.small-status { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--tint); }
.section-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.task-list-item, .generic-card, .integration-card { padding: 14px; }
.field { display: block; font-size: 12px; color: var(--tint); margin: 10px 0; }
.inp { width: 100%; margin-top: 6px; background: #100c24; border: 1px solid #43367d; border-radius: 8px; padding: 10px; }
textarea.inp { min-height: 84px; resize: vertical; }
.chat-log { max-height: 240px; overflow: auto; padding: 0 12px 8px; }
.chat-line { margin: 8px 0; font-size: 13px; }
.chat-line p { margin: 4px 0; }
.chat-line.out { border-left: 2px solid var(--violet); padding-left: 8px; }
.chat-line.in { border-left: 2px solid var(--lime); padding-left: 8px; }
.chat-form { display: grid; gap: 8px; margin-top: 8px; }
.fine { font-size: 12px; }
.empty { padding: 14px; color: var(--muted); text-align: center; }
.notice { margin: 10px; padding: 10px 12px; border-radius: 8px; background: #241b4e; border: 1px solid #6A4CFF; }
.notice.error { background: #3d1824; border-color: var(--danger); }
.dialog-backdrop, .sheet-backdrop { position: fixed; inset: 0; background: #070514cc; display: grid; place-items: center; z-index: 30; padding: 16px; }
.sheet-backdrop { display: none; }
.dialog { width: min(480px, 100%); background: #1a1440; border: 1px solid #6A4CFF; border-radius: 16px; padding: 20px; }
.dialog h2 { font-family: Anton, Inter, sans-serif; font-weight: 400; letter-spacing: .4px; margin: 0 0 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #2a1d66, var(--ink) 60%); }
.login-card { width: min(440px, 100%); background: #1a1440; border: 1px solid #43367d; border-radius: 20px; padding: 28px; }
.login-card h1 { font-family: Anton, Inter, sans-serif; font-weight: 400; letter-spacing: .4px; margin: 8px 0; }
.brand-lockup { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.sheet-bar { display: none; }
.integration-card .row { margin-top: 8px; }
h2 { font-size: 18px; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr) 300px; }
  .brand { width: 76px; }
  .brand-copy, .nav-item .label, .soon, .capacity .eyebrow, .status-row, .topstat small { display: none; }
  .nav-item { justify-content: center; padding: 12px 4px; }
  .topstat { padding: 8px; }
  .bottom-info { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app-shell { display: flex; flex-direction: column; min-height: 100vh; }
  .topbar { height: auto; min-height: 64px; flex-wrap: wrap; padding: 8px; gap: 8px; }
  .brand { width: auto; padding: 0; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .top-stats, .time-stat { display: none; }
  .sidebar { order: 2; flex-direction: row; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px; }
  .nav { flex-direction: row; }
  .sidebar-bottom { display: none; }
  .workspace { order: 3; }
  .office-viewport {
    height: auto;
    aspect-ratio: 1071 / 626;
    flex: none;
    min-height: 0;
  }
  .rightbar { position: fixed; left: 0; right: 0; bottom: 0; height: min(74vh, 680px); z-index: 40; transform: translateY(110%); transition: transform .2s ease; border-radius: 18px 18px 0 0; border: 1px solid var(--line); }
  .sheet-open .rightbar { transform: translateY(0); }
  .sheet-open .sheet-backdrop { display: block; z-index: 35; }
  .sheet-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
  .bottom-info { grid-template-columns: 1fr; }
  .page-title { font-size: 26px; }
}
