/* ========================================
   KillerGrowth — The Office — Styles
   ======================================== */

:root {
  --bg: #222222;
  --surface: #2a2a2a;
  --surface2: #323232;
  --border: #3a3a3a;
  --accent: #ccff00;
  --accent-dim: #99cc00;
  --text: #f0f0f0;
  --muted: #888888;
  --danger: #ff4444;
  --warning: #ffaa00;
  --success: #44cc66;
  --sidebar-bg: #1a1a1a;
  --sidebar-w: 240px;
  --radius: 8px;
  --radius-sm: 4px;
}

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

body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Login Page ---- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-kg-logo {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
}

.login-logo .logo-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.login-logo h1 {
  font-size: 24px;
  color: var(--accent);
}

.login-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.error-msg {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Roboto', sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: #111;
}

.btn-primary:hover { filter: brightness(1.1); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); }

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover { filter: brightness(1.1); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 4px 8px;
}

.btn-ghost:hover { color: var(--text); }

.btn-full { width: 100%; justify-content: center; }

.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-wrap { display:flex; flex-direction:column; align-items:flex-start; padding: 4px 0 6px; }
.sidebar-logo-img { height:auto; width:120px; object-fit:contain; }
.sidebar-logo-sub { font-size:18px; text-transform:uppercase; letter-spacing:2px; color:var(--muted); margin-top:4px; font-family:'Roboto Condensed', sans-serif; font-weight:700; }

.nav-list {
  list-style: none;
  flex: 1;
  padding: 8px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  transition: all 0.15s;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent);
  background: rgba(204, 255, 0, 0.05);
  border-left-color: var(--accent);
  font-weight: 500;
}

.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--muted); text-transform: uppercase; }

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s;
}

.btn-logout:hover { color: var(--danger); border-color: var(--danger); }

/* ---- Main Content ---- */
.content {
  margin-left: var(--sidebar-w);
  padding: 32px 48px;
  min-height: 100vh;
  max-width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 28px;
  color: var(--text);
}

.page-header .page-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 16px;
  color: var(--text);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ---- Stat Cards ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  font-family: 'Roboto Condensed', sans-serif;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

/* ---- Tags/Badges ---- */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-urgent { background: rgba(255, 68, 68, 0.15); color: var(--danger); }
.tag-high { background: rgba(255, 170, 0, 0.15); color: var(--warning); }
.tag-normal { background: rgba(204, 255, 0, 0.1); color: var(--accent); }
.tag-low { background: rgba(136, 136, 136, 0.15); color: var(--muted); }

.tag-active { background: rgba(68, 204, 102, 0.15); color: var(--success); }
.tag-inactive { background: rgba(136, 136, 136, 0.15); color: var(--muted); }
.tag-planning { background: rgba(100, 149, 237, 0.15); color: #6495ed; }
.tag-review { background: rgba(255, 170, 0, 0.15); color: var(--warning); }
.tag-complete, .tag-done, .tag-signed { background: rgba(68, 204, 102, 0.15); color: var(--success); }

/* ---- Kanban Board ---- */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: flex-start;
}

.kanban-column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 400px;
}

.kanban-column-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-header h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kanban-count {
  background: var(--surface2);
  color: var(--muted);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.kanban-cards {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.kanban-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.kanban-card-client {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 4px;
}

/* ---- Client Cards ---- */
.client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.client-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.client-card-name {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.client-card-industry {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.client-card-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.health-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.health-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

/* ---- Progress Bars ---- */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s;
}

/* ---- Agent Hub ---- */
.agent-hub-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.agent-canvas {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  min-height: 500px;
  overflow: hidden;
}

.agent-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.agent-node:hover { transform: scale(1.1); }

.agent-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s;
}

.agent-dot.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(204, 255, 0, 0.3);
  animation: pulse 2s infinite;
}

.agent-dot.center {
  width: 72px;
  height: 72px;
  font-size: 28px;
  border-width: 3px;
}

.agent-name {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.agent-node.active .agent-name { color: var(--accent); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(204, 255, 0, 0.3); }
  50% { box-shadow: 0 0 24px rgba(204, 255, 0, 0.6); }
}

.agent-line {
  position: absolute;
  height: 1px;
  background: var(--border);
  transform-origin: left center;
  pointer-events: none;
}

.agent-line.active {
  background: var(--accent);
  opacity: 0.4;
}

.agent-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.agent-detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.agent-detail-panel h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.agent-detail-role {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.activity-feed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 400px;
  overflow-y: auto;
}

.activity-feed-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.activity-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.activity-item:last-child { border-bottom: none; }

.activity-agent {
  color: var(--accent);
  font-weight: 500;
}

.activity-time {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

/* ---- Filters ---- */
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.filters-bar select,
.filters-bar input[type="text"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 6px 12px;
  font-size: 13px;
  font-family: 'Roboto', sans-serif;
}

.filters-bar select:focus,
.filters-bar input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

th {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: var(--surface);
}

td { color: var(--text); }

tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ---- Site Builder ---- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
}

.template-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.template-preview {
  height: 140px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--border);
}

.template-info {
  padding: 16px;
}

.template-info h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.template-info p {
  font-size: 12px;
  color: var(--muted);
}

/* ---- Pipeline Columns ---- */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.pipeline-column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pipeline-column-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pipeline-card {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.pipeline-card:hover { background: rgba(255,255,255,0.02); }
.pipeline-card:last-child { border-bottom: none; }

.pipeline-company {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
}

.pipeline-contact { font-size: 12px; color: var(--muted); }
.pipeline-value { font-size: 13px; color: var(--accent); font-weight: 500; margin-top: 4px; }

/* ---- Intel Cards ---- */
.intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.intel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.intel-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.intel-card-header h4 { font-size: 15px; flex: 1; }

.bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  transition: transform 0.15s;
}

.bookmark-btn:hover { transform: scale(1.2); }

.intel-category {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.intel-summary {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- Memory ---- */
.memory-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
  font-size: 14px;
  line-height: 1.8;
}

.memory-content h1, .memory-content h2, .memory-content h3 {
  color: var(--accent);
  margin-top: 24px;
  margin-bottom: 12px;
}

.memory-content h1 { font-size: 24px; }
.memory-content h2 { font-size: 20px; }
.memory-content h3 { font-size: 16px; }

.memory-content p { margin-bottom: 12px; color: var(--muted); }
.memory-content ul, .memory-content ol { padding-left: 24px; margin-bottom: 12px; color: var(--muted); }
.memory-content li { margin-bottom: 4px; }
.memory-content code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 { font-size: 20px; }

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ---- Alerts Section ---- */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  font-size: 13px;
}

.alert-item.warning { border-left-color: var(--warning); }
.alert-item.danger { border-left-color: var(--danger); }
.alert-item.info { border-left-color: #6495ed; }

.alert-icon { font-size: 16px; }

/* ---- Sections ---- */
.section { margin-bottom: 24px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 18px;
}

/* ---- Detail View ---- */
.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-back {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
}

.detail-back:hover { color: var(--text); border-color: var(--accent); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---- Two Column Layout ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ---- Move Dropdown ---- */
.move-menu {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  z-index: 50;
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.move-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-family: 'Roboto', sans-serif;
}

.move-menu button:hover { background: var(--surface2); }

/* ========================================
   OFFICE PAGE — Pixel Art 2D Workspace
   ======================================== */

.office-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: flex-start;
}

.office-floor-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  padding: 24px;
  min-height: 400px;
}

.office-floor {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

/* Checkerboard tiles */
.floor-tile {
  position: absolute;
  width: 40px;
  height: 40px;
}
.tile-a { background: #252528; }
.tile-b { background: #2a2a2d; }

/* Desks */
.pixel-desk {
  position: absolute;
  width: 64px;
  height: 36px;
  z-index: 2;
}

.desk-surface {
  width: 64px;
  height: 32px;
  background: #3a3020;
  border: 2px solid transparent;
  border-radius: 4px;
  position: absolute;
  top: 4px;
  left: 0;
  transition: border-color 0.3s;
}

.desk-monitor {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 16px;
  border-radius: 2px;
  border: 2px solid #333;
  transition: all 0.3s;
  overflow: hidden;
}

.monitor-glow {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a4a8a44, #4080ff22);
  animation: monitor-flicker 3s infinite;
}

@keyframes monitor-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Agent sprites */
.agent-sprite {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.15s;
}

.agent-sprite:hover { transform: scale(1.15) translateY(-4px); }
.agent-sprite.sprite-selected { transform: scale(1.15) translateY(-4px); }
.agent-sprite.sprite-selected .sprite-body { box-shadow: 0 0 12px var(--sprite-color, #ccff00); }

.sprite-status-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid #1a1a1a;
  z-index: 11;
}

.sprite-body {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 2px solid var(--sprite-color, #555);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: box-shadow 0.2s;
}

.sprite-body.sprite-phase2 {
  opacity: 0.45;
  filter: grayscale(0.6);
  border-style: dashed;
}

.sprite-name {
  font-size: 10px;
  color: #aaa;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Env objects */
.env-obj {
  position: absolute;
  font-size: 24px;
  z-index: 3;
  line-height: 1;
}

.conf-table {
  position: absolute;
  z-index: 3;
}

.conf-table-inner {
  width: 160px;
  height: 48px;
  background: #353535;
  border: 2px solid #4a4a4a;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Office legend */
.office-legend {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
}
.active-legend { color: #44cc66; background: rgba(68,204,102,0.1); }
.idle-legend { color: #888; background: rgba(136,136,136,0.1); }
.phase2-legend { color: #555; background: rgba(80,80,80,0.15); }

/* Right panel */
.office-right-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.agent-inspect-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 200px;
}

.inspect-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 160px;
  color: var(--muted);
  font-size: 14px;
}

.inspect-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  border-bottom-color: var(--card-color, var(--border));
}

.inspect-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.inspect-section {
  margin-bottom: 14px;
}

.inspect-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.inspect-value {
  font-size: 13px;
  color: var(--text);
}

.inspect-phase2-badge {
  background: rgba(100,100,100,0.15);
  color: #888;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.inspect-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: color 0.15s;
}
.inspect-link:hover { color: var(--accent); text-decoration: none; }

/* Roster card */
.office-roster-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.roster-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.roster-list { padding: 4px; }

.roster-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}

.roster-item:hover { background: rgba(255,255,255,0.03); border-left-color: var(--agent-color, #555); }
.roster-item.roster-active { border-left-color: var(--agent-color, #44cc66); }
.roster-item.roster-phase2 { opacity: 0.5; }

.roster-emoji { font-size: 18px; width: 24px; text-align: center; }

.roster-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.roster-name { font-size: 13px; font-weight: 500; }
.roster-role { font-size: 11px; color: var(--muted); }

.roster-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ========================================
   TEAM PAGE — Lspace Org Chart
   ======================================== */

.team-org-chart {
  max-width: 1200px;
}

/* Section dividers */
.org-section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0 20px;
}

.org-section-label span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.org-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Card rows */
.team-card-row {
  display: grid;
  gap: 16px;
}

.founders-row {
  grid-template-columns: repeat(4, 1fr);
}

.dept-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dept-block {}

.dept-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px;
  border: 1px solid;
  border-radius: 6px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.02);
}

.dept-row {
  grid-template-columns: repeat(2, 1fr);
}

/* Agent rows */
.agent-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Person card */
.team-person-card {
  background: var(--surface);
  border: 1px solid;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
  position: relative;
}

.team-person-card:hover {
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.team-card-sm {
  padding: 14px;
}

/* Agent card */
.team-agent-card {
  background: var(--surface);
  border: 1px solid;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
}

.team-agent-card:hover {
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.agent-card-center {
  min-width: 320px;
  padding: 24px;
}

.agent-card-phase2 {
  opacity: 0.6;
}

.agent-card-phase2:hover { opacity: 1; }

/* Card internals */
.tcard-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tcard-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.tcard-nameblock {
  flex: 1;
  min-width: 0;
}

.tcard-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.tcard-title {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.tcard-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tcard-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.tcard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.tcard-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tcard-agent-link {
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.tcard-rolelink {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
  width: 100%;
  transition: color 0.15s;
}

.tcard-rolelink:hover { color: var(--accent); text-decoration: none; }
