/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === NIGHT (00-06) === */
:root {
  --bg: #0d0f1a;
  --surface: #111422;
  --surface2: #0a1a38;
  --accent: #e94560;
  --text: #d0d4e8;
  --text2: #7a82a0;
  --floor-color: #16192a;
  --wall-top: #0d0f1a;
  --wall-bot: #13162a;
  --sky-top: #020408;
  --sky-bot: #0a0e20;
  --room-top: #0d0f1a;
  --room-bot: #16192a;
  --cloud-opacity: 0.08;
  --building-color: #12182e;
  --window-pane: linear-gradient(180deg,#020408 0%,#0a0e20 60%,#101c14 100%);
  --header-bg: rgba(8,10,20,0.97);
  --shadow: rgba(0,0,0,0.7);
  --radius: 12px;
}

/* === MORNING (06-09) === */
body.morning {
  --bg: #1a2a4a;
  --surface: #1e3050;
  --surface2: #162848;
  --sky-top: #1a2a6e;
  --sky-bot: #4a3080;
  --room-top: #1a2a4a;
  --room-bot: #26354a;
  --floor-color: #2a3040;
  --wall-top: #1a2a4a;
  --wall-bot: #253545;
  --cloud-opacity: 0.25;
  --building-color: #1a2540;
  --window-pane: linear-gradient(180deg,#1a2a6e 0%,#4a3080 60%,#2a4028 100%);
  --header-bg: rgba(20,32,60,0.97);
  --text: #dde4f0;
  --text2: #8a96b8;
  --shadow: rgba(0,0,0,0.5);
}

/* === DAY (09-17) === */
body.day {
  --bg: #e8f0f8;
  --surface: #ffffff;
  --surface2: #d0e0f0;
  --sky-top: #5bb8f5;
  --sky-bot: #a0d8f5;
  --room-top: #c8ddf0;
  --room-bot: #dce8f4;
  --floor-color: #b0c4d8;
  --wall-top: #c8ddf0;
  --wall-bot: #dce8f4;
  --cloud-opacity: 0.85;
  --building-color: #4a6a8a;
  --window-pane: linear-gradient(180deg,#5bb8f5 0%,#a0d8f5 60%,#6aaa60 100%);
  --header-bg: rgba(200,224,244,0.98);
  --text: #1a2a3a;
  --text2: #4a6070;
  --shadow: rgba(0,0,0,0.15);
  --accent: #c0392b;
}

/* === SUNSET (17-19) === */
body.sunset {
  --bg: #1a1028;
  --surface: #221428;
  --surface2: #1a1030;
  --sky-top: #0f0818;
  --sky-bot: #3a1840;
  --room-top: #1a1028;
  --room-bot: #221830;
  --floor-color: #1a1428;
  --wall-top: #1a1028;
  --wall-bot: #221830;
  --cloud-opacity: 0.35;
  --building-color: #1a0f28;
  --window-pane: linear-gradient(180deg,#4a1a30 0%,#801820 60%,#3a2010 100%);
  --header-bg: rgba(20,10,30,0.97);
  --text: #e8d0c8;
  --text2: #9a7880;
  --shadow: rgba(0,0,0,0.6);
  --accent: #e05a20;
}

/* === EVENING (19-23) === */
body.evening {
  --bg: #0e1020;
  --surface: #131628;
  --surface2: #0a1030;
  --sky-top: #080c18;
  --sky-bot: #141830;
  --room-top: #0e1020;
  --room-bot: #141828;
  --floor-color: #141620;
  --wall-top: #0e1020;
  --wall-bot: #141828;
  --cloud-opacity: 0.1;
  --building-color: #0e1224;
  --window-pane: linear-gradient(180deg,#080c18 0%,#141830 60%,#10180c 100%);
  --header-bg: rgba(10,12,24,0.97);
  --text: #d0d6e8;
  --text2: #7880a0;
  --shadow: rgba(0,0,0,0.65);
}

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  transition: background 2s ease, color 1s ease;
}

#app { display: flex; flex-direction: column; height: 100vh; }

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  z-index: 10;
  flex-shrink: 0;
  transition: background 2s ease;
}

.header-left { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 28px; }
.header-title h1 { font-size: 18px; font-weight: 700; color: var(--text); }
.subtitle { font-size: 11px; color: var(--text2); }
.header-right { display: flex; align-items: center; gap: 16px; }
.clock { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: #7dd3fc; }
.theme-indicator {
  font-size: 12px; color: var(--text2);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px 12px; border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, color 0.2s;
}
.theme-indicator:hover { background: rgba(255,255,255,0.13); color: var(--text); }

#theme-picker {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 999;
  min-width: 160px;
}
.theme-opt {
  background: none; border: none; cursor: pointer;
  color: var(--text2); font-size: 13px;
  padding: 8px 14px; border-radius: 8px;
  text-align: left; width: 100%;
  transition: background 0.15s, color 0.15s;
}
.theme-opt:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.theme-opt.active { background: rgba(99,102,241,0.2); color: #a5b4fc; font-weight: 600; }
.theme-auto { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 2px; padding-top: 10px; }
.status-bar { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6b7280;
  transition: background 0.3s;
}
.status-dot.connected { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.status-dot.error { background: #ef4444; }

/* ===== OFFICE SCENE ===== */
.office-scene {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.office-room {
  width: 100%;
  height: 100%;
  position: relative;
  background: linear-gradient(180deg, var(--room-top) 0%, var(--room-bot) 60%, var(--floor-color) 100%);
  overflow: hidden;
  transition: background 2s ease;
}

/* ===== ROOM BACKGROUND ===== */
.room-bg { position: absolute; top: 0; left: 0; right: 0; height: 65%; }

/* ===== WINDOWS ===== */
.window {
  position: absolute;
  top: 15%;
  width: 160px;
  height: 130px;
  border: 4px solid #5a6080;
  border-radius: 4px;
  background: #0f1628;
  overflow: hidden;
}
.window-1 { left: 10%; }
.window-2 { left: 30%; }

.window-pane {
  width: 100%; height: 100%;
  background: var(--window-pane);
  position: relative;
  overflow: hidden;
  transition: background 2s ease;
}
.window-sky {
  position: absolute; top: 0; left: 0; right: 0; height: 70%;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 100%);
  transition: background 2s ease;
}
.window-clouds {
  position: absolute; top: 0; left: 0; right: 0; height: 60%;
}
.cloud {
  position: absolute;
  background: rgba(220,235,255,var(--cloud-opacity));
  border-radius: 50px;
  height: 12px;
  transition: background 2s ease;
}
.c1 { width: 40px; top: 15%; left: 10%; animation: cloudFloat 8s ease-in-out infinite; }
.c2 { width: 30px; top: 30%; left: 50%; animation: cloudFloat 12s ease-in-out infinite 2s; }
.c3 { width: 50px; top: 50%; left: 20%; animation: cloudFloat 10s ease-in-out infinite 4s; }
.c4 { width: 35px; top: 20%; left: 15%; animation: cloudFloat 9s ease-in-out infinite 1s; }
.c5 { width: 45px; top: 45%; left: 40%; animation: cloudFloat 11s ease-in-out infinite 3s; }

@keyframes cloudFloat {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

.window-buildings {
  position: absolute; bottom: 0; left: 0; right: 0; height: 45%;
  display: flex; align-items: flex-end; gap: 4px; padding: 0 4px;
}
.building {
  flex: 1; border-radius: 2px 2px 0 0;
  background: var(--building-color);
  transition: background 2s ease;
}
.b1 { height: 80%; }
.b2 { height: 60%; }
.b3 { height: 90%; }
.b4 { height: 70%; }
.b5 { height: 55%; }
.window-frame {
  position: absolute; inset: 0;
  border: 4px solid #5a6080;
  pointer-events: none;
}
.window::after {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 3px; background: #5a6080; transform: translateX(-50%);
}
.window::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 3px; background: #5a6080; transform: translateY(-50%);
}

/* ===== BOOKSHELF ===== */
.bookshelf {
  position: absolute;
  right: 5%;
  top: 10%;
  width: 160px;
  background: #4a3520;
  padding: 6px;
  border-radius: 4px;
  border: 2px solid #6b4c2a;
}
.shelf { display: flex; gap: 2px; align-items: flex-end; padding: 4px 2px; border-bottom: 3px solid #6b4c2a; }
.shelf-bot { margin-top: 6px; }
.book {
  width: var(--bw);
  height: 50px;
  background: var(--bc);
  border-radius: 2px 2px 0 0;
  box-shadow: inset -2px 0 0 rgba(0,0,0,0.3);
}

/* ===== PLANTS ===== */
.plant { position: absolute; }
.plant-1 { bottom: 35%; left: 2%; }
.plant-2 { bottom: 35%; right: 20%; }
.pot {
  width: 28px; height: 24px;
  background: linear-gradient(180deg, #c0621c 0%, #8b4513 100%);
  border-radius: 2px 2px 6px 6px;
  margin: 0 auto;
}
.stem {
  width: 4px; height: 30px;
  background: #3a7a20;
  margin: 0 auto;
}
.leaf {
  position: absolute;
  width: 26px; height: 14px;
  background: radial-gradient(ellipse at 30% 50%, #5cb85c, #2d7a20);
  border-radius: 50%;
  transform-origin: left center;
}
.l1 { top: -20px; left: 14px; transform: rotate(-30deg); }
.l2 { top: -30px; left: 0px; transform: rotate(30deg) scaleX(-1); }
.l3 { top: -40px; left: 14px; transform: rotate(-45deg); }
.l4 { top: -15px; left: -6px; transform: rotate(50deg) scaleX(-1); }

/* ===== LOGO NA PAREDE ===== */
.wall-logo {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.wall-logo-frame {
  background: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  border: 3px solid #8B6914;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.5),
    inset 0 0 0 2px rgba(255,255,255,0.1),
    4px 4px 0 #5a4010;
  position: relative;
}
.wall-logo-frame::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid #C49A2D;
  border-radius: 8px;
  pointer-events: none;
}
.wall-logo-frame img {
  display: block;
  height: 44px;
  width: auto;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* ===== WHITEBOARD ===== */
.whiteboard {
  position: absolute;
  right: 18%;
  top: 5%;
  width: 200px;
  height: 130px;
  background: #2a3060;
  border: 6px solid #6a5030;
  border-radius: 4px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
}
.whiteboard:hover { filter: brightness(1.15); transform: scale(1.03); }
.wb-surface {
  position: relative;
  width: 100%; height: 100%;
  background: #f0ede8;
  padding: 8px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.wb-sprint-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  font-family: 'Courier New', monospace;
  text-align: center;
}
.wb-stats {
  display: flex; flex-direction: column; gap: 3px;
}
.wb-stat {
  font-size: 9px;
  font-family: 'Courier New', monospace;
}
.wb-stat.pending { color: #b45309; }
.wb-stat.inprogress { color: #1d4ed8; }
.wb-stat.done { color: #15803d; }
.wb-hint {
  font-size: 9px;
  color: #9ca3af;
  text-align: center;
  font-style: italic;
}

/* ===== FLOOR ===== */
.floor {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 38%;
  background: linear-gradient(180deg, var(--floor-color) 0%, var(--wall-bot) 100%);
  border-top: 2px solid rgba(255,255,255,0.05);
  transition: background 2s ease;
}
.floor::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ===== MANAGER AREA (Lena) ===== */
.manager-area {
  position: absolute;
  right: 4%;
  bottom: 5%;
  z-index: 5;
}
.manager-desk {
  transform-origin: bottom right;
}
.manager-desk .desk-area {
  width: 180px;
}
.manager-desk .char-torso { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; }
.manager-desk .char-label strong { color: #fbbf24; }
.manager-desk .desk-unit:hover .desk-surface { background: linear-gradient(180deg, #e0b84a 0%, #c49a2a 100%) !important; }

/* Lena monitor screen - sprint bars */
.sprint-ui { padding: 4px; display: flex; flex-direction: column; gap: 3px; position: relative; }
.su-bar { height: 5px; border-radius: 2px; }
.sb1 { width: 80%; background: #4ade80; }
.sb2 { width: 50%; background: #fbbf24; }
.sb3 { width: 30%; background: #f87171; }
.su-dot { position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 4px #f59e0b; }

/* Lena hair */
.hair-lena {
  position: absolute; top: -8px; left: -3px; right: -3px;
  height: 20px;
  background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
  border-radius: 50% 50% 20% 20%;
}
.hair-lena::before {
  content: '';
  position: absolute; bottom: -8px; left: -4px;
  width: 10px; height: 16px;
  background: #4c1d95;
  border-radius: 0 0 4px 8px;
}
.hair-lena::after {
  content: '';
  position: absolute; bottom: -8px; right: -4px;
  width: 10px; height: 16px;
  background: #4c1d95;
  border-radius: 0 0 8px 4px;
}
.torso-lena { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; }

/* Notebook */
.notebook {
  position: absolute; right: 22px; top: 18px;
  font-size: 18px; cursor: default;
}

/* ===== DESKS ROW ===== */
.desks-row {
  position: absolute;
  bottom: 4%;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 0 40px;
  align-items: flex-end;
}

/* ===== DESK UNIT ===== */
.desk-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}
.desk-unit:hover { transform: scale(1.04); }
.desk-unit:hover .click-hint { opacity: 1; }
.desk-unit:hover .desk-surface { background: linear-gradient(180deg, #d4a72c 0%, #b8891a 100%); }

.desk-area {
  position: relative;
  width: 200px;
  height: 100px;
}

/* ===== DESK SURFACE ===== */
.desk-surface {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 28px;
  background: linear-gradient(180deg, #c49a2d 0%, #a07818 100%);
  border-radius: 6px 6px 2px 2px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
.desk-surface::before {
  content: '';
  position: absolute;
  bottom: -12px; left: 8px;
  width: 14px; height: 14px;
  background: #5a4010;
  border-radius: 2px;
  box-shadow: 155px 0 0 #5a4010;
}

/* ===== MONITOR ===== */
.monitor {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.monitor-screen {
  width: 130px;
  height: 85px;
  background: #0d1117;
  border: 3px solid #30363d;
  border-radius: 6px 6px 2px 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 20px rgba(0,100,255,0.15), inset 0 0 10px rgba(0,0,0,0.5);
}
.monitor-stand {
  width: 24px; height: 8px;
  background: #30363d;
  border-radius: 0 0 4px 4px;
}

/* ===== SCREEN CONTENTS ===== */
.code-lines {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.code-line {
  height: 5px;
  background: #3fb950;
  border-radius: 2px;
  opacity: 0.8;
  animation: codeTyping 3s ease-in-out infinite;
}
.cl1 { width: 80%; animation-delay: 0s; }
.cl2 { width: 60%; animation-delay: 0.3s; }
.cl3 { width: 90%; animation-delay: 0.6s; }
.cl4 { width: 50%; animation-delay: 0.9s; }
.cl5 { width: 70%; animation-delay: 1.2s; }

@keyframes codeTyping {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

.design-ui { padding: 8px; }
.ui-rect {
  background: rgba(168, 85, 247, 0.6);
  border-radius: 3px;
  margin-bottom: 4px;
}
.r1 { width: 90%; height: 16px; }
.r2 { width: 70%; height: 10px; background: rgba(99,102,241,0.6); }
.r3 { width: 85%; height: 14px; background: rgba(236,72,153,0.5); }
.ui-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(34,197,94,0.5);
  margin: 4px 0;
}

.terminal-ui { padding: 6px; }
.term-line {
  font-family: 'Courier New', monospace;
  font-size: 7px;
  color: #22c55e;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.tl1, .tl3 { color: #7dd3fc; }
.tl2 { color: #22c55e; }
.tl4 { color: #a3e635; }

/* Blinking cursor */
.monitor-screen::after {
  content: '▌';
  position: absolute;
  bottom: 6px; right: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Monitor clickable state */
.monitor-clickable {
  cursor: pointer;
}
.monitor-clickable:hover .monitor-screen {
  box-shadow: 0 0 16px rgba(99,102,241,0.5), inset 0 0 10px rgba(0,0,0,0.5);
  border-color: #6366f1;
}

/* ===== AGENT TERMINAL POPUP (monitor click) ===== */
.agent-terminal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 400;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(3px);
}
.agent-terminal-overlay.show { opacity: 1; pointer-events: all; }

.agent-terminal {
  width: 580px;
  max-height: 70vh;
  background: #0a0d14;
  border-radius: 12px;
  border: 1px solid rgba(99,102,241,0.3);
  box-shadow: 0 24px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04);
  display: flex; flex-direction: column;
  font-family: 'Courier New', 'Cascadia Code', monospace;
  transform: scale(0.94) translateY(8px);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}
.agent-terminal-overlay.show .agent-terminal { transform: none; }

/* Terminal title bar */
.at-titlebar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #111827;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.at-dots { display: flex; gap: 6px; }
.at-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.at-dot.red { background: #ef4444; }
.at-dot.yellow { background: #f59e0b; }
.at-dot.green { background: #22c55e; }
.at-title {
  flex: 1; text-align: center;
  font-size: 12px; color: #64748b;
  letter-spacing: .04em;
}
.at-close {
  background: none; border: none; color: #475569;
  cursor: pointer; font-size: 14px; padding: 2px 6px;
  border-radius: 4px; transition: color 0.15s;
}
.at-close:hover { color: #e2e8f0; }

/* Terminal body */
.at-body {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.at-body::-webkit-scrollbar { width: 3px; }
.at-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Process header line */
.at-process {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; margin-bottom: 10px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 6px;
}
.at-process-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
.at-process-dot.idle { background: #475569; box-shadow: none; animation: none; }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #22c55e; }
  50% { opacity: 0.5; box-shadow: 0 0 2px #22c55e; }
}
.at-process-text { font-size: 12px; color: #a5b4fc; flex: 1; }
.at-process-time { font-size: 10px; color: #475569; }

/* Terminal lines */
.at-line {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 2px 0; min-height: 20px;
  animation: at-fadein 0.15s ease;
}
@keyframes at-fadein { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

.at-prompt { color: #4ade80; font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.at-text {
  font-size: 12px; line-height: 1.55; flex: 1;
  white-space: pre-wrap; word-break: break-word;
}
.at-line.user .at-prompt { color: #60a5fa; }
.at-line.user .at-text { color: #bfdbfe; }
.at-line.assistant .at-prompt { color: #4ade80; }
.at-line.assistant .at-text { color: #d1fae5; }
.at-line.system .at-prompt { color: #f59e0b; }
.at-line.system .at-text { color: #fde68a; }
.at-line.dim .at-prompt { color: #334155; }
.at-line.dim .at-text { color: #475569; }

.at-timestamp { font-size: 10px; color: #334155; flex-shrink: 0; margin-top: 3px; }

/* Thinking animation inside terminal */
.at-thinking {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; color: #6366f1; font-size: 12px;
}
.at-thinking-dots { display: flex; gap: 4px; }
.at-thinking-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: #6366f1; display: inline-block;
  animation: at-bounce 1.2s ease-in-out infinite;
}
.at-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.at-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes at-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* Footer actions */
.at-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; gap: 8px; flex-shrink: 0;
  background: #0d1117;
}
.at-btn {
  padding: 7px 14px; border-radius: 6px; border: none;
  font-size: 11px; cursor: pointer; font-weight: 600;
  font-family: inherit; transition: all 0.15s;
}
.at-btn-done {
  background: rgba(34,197,94,0.18); color: #4ade80;
  border: 1px solid rgba(34,197,94,0.3);
}
.at-btn-done:hover { background: rgba(34,197,94,0.3); }
.at-btn-chat {
  background: rgba(99,102,241,0.15); color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.25);
}
.at-btn-chat:hover { background: rgba(99,102,241,0.28); }
.at-btn-sprint {
  background: rgba(251,191,36,0.12); color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.25);
}
.at-btn-sprint:hover { background: rgba(251,191,36,0.24); }

/* ===== KEYBOARD & MOUSE ===== */
.keyboard {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 16px;
  background: #21262d;
  border-radius: 3px;
  border: 1px solid #30363d;
}
.keyboard::before {
  content: '';
  position: absolute;
  inset: 3px;
  background: repeating-linear-gradient(
    90deg,
    #30363d 0, #30363d 4px,
    transparent 4px, transparent 8px
  );
  border-radius: 1px;
}

.mouse {
  position: absolute;
  bottom: 30px; right: 20px;
  width: 14px; height: 20px;
  background: #21262d;
  border-radius: 8px 8px 4px 4px;
  border: 1px solid #30363d;
}
.mouse::after {
  content: '';
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 8px;
  background: #30363d;
}

/* ===== PAPER STACK ===== */
.paper-stack {
  position: absolute;
  bottom: 32px;
  right: 16px;
  width: 28px;
  height: 30px;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.15s;
}
.paper-stack:hover { transform: scale(1.2) rotate(-3deg); }
.paper-stack .paper {
  position: absolute;
  width: 26px; height: 32px;
  background: #fefce8;
  border: 1px solid #d4d4aa;
  border-radius: 1px;
}
.paper-stack .p1 { bottom: 0; left: 0; z-index: 3; }
.paper-stack .p2 { bottom: 2px; left: 2px; z-index: 2; transform: rotate(3deg); background: #f5f5dc; }
.paper-stack .p3 { bottom: 4px; left: 4px; z-index: 1; transform: rotate(-2deg); background: #fffacd; }
.paper-stack .paper-icon { position: absolute; bottom: 2px; left: 4px; font-size: 14px; z-index: 4; }

/* Small items */
.coffee-mug, .pen-holder, .sticky-notes {
  position: absolute;
  bottom: 32px;
  font-size: 16px;
  line-height: 1;
}
.coffee-mug { left: 14px; }
.pen-holder { left: 14px; }
.sticky-notes { left: 12px; }

/* ===== CHARACTER ===== */
.character {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: -4px;
}

.char-body {
  position: relative;
  animation: charIdle 4s ease-in-out infinite;
}
@keyframes charIdle {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Head */
.char-head {
  width: 38px; height: 38px;
  background: #fdbcb4;
  border-radius: 50% 50% 40% 40%;
  position: relative;
  margin: 0 auto;
  z-index: 2;
}
.char-face {
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.char-eyes {
  display: flex; gap: 8px;
}
.char-eyes span {
  width: 4px; height: 4px;
  background: #2c2c2c;
  border-radius: 50%;
  animation: blink 4s step-end infinite;
}
.char-mouth {
  width: 10px; height: 4px;
  border-bottom: 2px solid #c0704a;
  border-radius: 0 0 50% 50%;
}

/* Hair variants */
.char-hair {
  position: absolute;
  top: -4px; left: -2px; right: -2px;
  height: 20px;
  border-radius: 50% 50% 0 0;
}
.hair-alex { background: #3d2b1f; }
.hair-sam { background: #8b4513; clip-path: polygon(0 60%, 100% 60%, 120% 100%, 100% 120%, 50% 100%, 0 120%, -20% 100%); height: 26px; }
.hair-jordan { background: #1c1c1c; }

/* Torso */
.char-torso {
  width: 42px; height: 36px;
  border-radius: 4px 4px 6px 6px;
  margin: 2px auto 0;
  position: relative;
  z-index: 1;
}
.torso-alex { background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%); }
.torso-sam { background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%); }
.torso-jordan { background: linear-gradient(180deg, #059669 0%, #047857 100%); }

/* Arms */
.char-arms {
  display: flex;
  justify-content: space-between;
  width: 52px;
  margin: 0 auto;
  margin-top: -30px;
  position: relative;
  z-index: 0;
}
.arm {
  width: 10px; height: 28px;
  background: #fdbcb4;
  border-radius: 5px;
}
.arm-left { transform-origin: top; animation: armLeft 2s ease-in-out infinite; }
.arm-right { transform-origin: top; animation: armRight 2s ease-in-out infinite; }
@keyframes armLeft { 0%,100%{transform:rotate(-10deg)} 50%{transform:rotate(10deg)} }
@keyframes armRight { 0%,100%{transform:rotate(10deg)} 50%{transform:rotate(-10deg)} }

/* Character label */
.char-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
  text-align: center;
}
.char-label strong { font-size: 13px; color: #fff; }
.char-label span { font-size: 10px; color: var(--text2); }

/* Bubble */
.char-bubble {
  position: absolute;
  top: -42px; left: 50%;
  transform: translateX(-50%) scale(0);
  background: white;
  color: #1a1a2e;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 12px;
  white-space: nowrap;
  max-width: 140px;
  text-overflow: ellipsis;
  overflow: hidden;
  z-index: 10;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.char-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: white;
  border-bottom: none;
}
.char-bubble.show { transform: translateX(-50%) scale(1); }

/* Status & hint */
.agent-status {
  font-size: 10px;
  color: var(--text2);
  margin-top: 4px;
  opacity: 0.8;
  text-align: center;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.click-hint {
  font-size: 10px;
  color: var(--accent);
  opacity: 0;
  margin-top: 2px;
  transition: opacity 0.2s;
  text-align: center;
}

/* Busy state */
.desk-unit.busy .char-body { animation-duration: 0.5s; }
.desk-unit.busy .arm-left { animation-duration: 0.4s; }
.desk-unit.busy .arm-right { animation-duration: 0.4s; }
.desk-unit.busy .agent-status { color: #f59e0b; }
.desk-unit.active .desk-surface { box-shadow: 0 0 20px rgba(99,102,241,0.4), 0 4px 12px rgba(0,0,0,0.5); }

/* ===== CHAT OVERLAY ===== */
.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(2px);
}
.chat-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.chat-panel {
  width: 400px;
  height: 80vh;
  background: #0f172a;
  border-radius: 16px 16px 0 0;
  margin-right: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  overflow: hidden;
}
.chat-overlay.open .chat-panel { transform: translateY(0); }

/* Chat Header */
.chat-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: var(--surface2);
  flex-shrink: 0;
}
.chat-agent-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: var(--surface);
}
.chat-name { font-weight: 700; font-size: 15px; }
.chat-role { font-size: 11px; color: var(--text2); margin-top: 2px; }
.chat-actions { display: flex; gap: 8px; }

.btn-clear, .btn-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text2);
  cursor: pointer;
  border-radius: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-clear:hover, .btn-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.chat-welcome {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; margin: auto; text-align: center; opacity: 0.6;
}
.welcome-emoji { font-size: 36px; }
.chat-welcome p { font-size: 13px; color: var(--text2); max-width: 240px; }

/* Messages */
.msg {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  animation: msgIn 0.2s ease-out;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.agent { align-self: flex-start; align-items: flex-start; }

.msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.msg.user .msg-bubble {
  background: #1d4ed8;
  border-radius: 14px 14px 2px 14px;
}
.msg.agent .msg-bubble {
  background: #1e293b;
  border-radius: 14px 14px 14px 2px;
  border: 1px solid rgba(255,255,255,0.06);
}
.msg-time {
  font-size: 10px;
  color: var(--text2);
  margin-top: 3px;
  padding: 0 4px;
}

/* Thinking indicator in chat */
.msg-thinking .msg-bubble {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.06);
}
.thinking-dots-inline {
  display: flex; gap: 4px; align-items: center; padding: 2px 0;
}
.thinking-dots-inline span {
  width: 6px; height: 6px;
  background: var(--text2);
  border-radius: 50%;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.thinking-dots-inline span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots-inline span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%,100%{opacity:0.3;transform:scale(0.8)} 50%{opacity:1;transform:scale(1)} }

/* Chat Input */
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--surface);
  flex-shrink: 0;
}

#chat-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #e2e8f0;
  -webkit-text-fill-color: #e2e8f0;
  font-size: 13px;
  padding: 10px 14px;
  resize: none;
  max-height: 120px;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.2s;
}
#chat-input:focus { border-color: rgba(99,102,241,0.5); }
#chat-input::placeholder { color: var(--text2); }

.btn-send {
  width: 42px; height: 42px;
  background: #1d4ed8;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  align-self: flex-end;
}
.btn-send:hover { background: #2563eb; transform: scale(1.05); }
.btn-send:active { transform: scale(0.95); }
.btn-send svg { width: 18px; height: 18px; color: white; stroke: white; }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ===== THINKING TOAST ===== */
.thinking-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text2);
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.thinking-toast.show { transform: translateX(-50%) translateY(0); }
.thinking-dots { display: flex; gap: 4px; }
.thinking-dots span {
  width: 6px; height: 6px;
  background: #7dd3fc;
  border-radius: 50%;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ===== MEMORY BUTTON ===== */
.btn-memory {
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text2);
  cursor: pointer;
  border-radius: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-memory:hover { background: rgba(99,102,241,0.25); color: #a5b4fc; }

/* ===== MEMORY MODAL ===== */
.memory-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(3px);
}
.memory-overlay.open { opacity: 1; pointer-events: all; }

.memory-panel {
  width: 560px;
  max-height: 70vh;
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid rgba(99,102,241,0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.memory-overlay.open .memory-panel { transform: scale(1); }

.memory-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.memory-title { font-weight: 700; font-size: 15px; color: #a5b4fc; }
.memory-subtitle { font-size: 11px; color: var(--text2); margin-top: 2px; }

.btn-clear-memory {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  transition: all 0.2s;
}
.btn-clear-memory:hover { background: rgba(239,68,68,0.3); }

.btn-close-memory {
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text2);
  cursor: pointer;
  border-radius: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-close-memory:hover { background: rgba(255,255,255,0.15); color: #fff; }

.memory-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: #e2e8f0;
}
.memory-body::-webkit-scrollbar { width: 4px; }
.memory-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.memory-empty {
  color: var(--text2);
  text-align: center;
  padding: 40px 0;
  line-height: 1.8;
}

.memory-block {
  margin-bottom: 18px;
  padding: 14px 16px;
  background: #1e293b;
  border-radius: 10px;
  border-left: 3px solid #6366f1;
}
.memory-block-time {
  font-size: 10px;
  color: var(--text2);
  margin-bottom: 8px;
  font-family: 'Courier New', monospace;
}
.memory-block-content { color: #e2e8f0; }
.memory-block-content li {
  list-style: none;
  padding: 2px 0;
}
.memory-block-content li::before {
  content: '→ ';
  color: #6366f1;
  font-weight: bold;
}

/* ===== GENERIC MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-panel {
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  display: flex; flex-direction: column;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
  max-height: 85vh;
}
.modal-overlay.open .modal-panel { transform: none; }

.modal-header {
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  background: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.modal-title-area { display: flex; align-items: center; gap: 12px; }
.modal-title { font-weight: 700; font-size: 15px; color: #e2e8f0; }
.modal-subtitle { font-size: 11px; color: var(--text2); margin-top: 2px; }

.btn-close-modal {
  background: rgba(255,255,255,0.08); border: none; color: var(--text2);
  cursor: pointer; border-radius: 8px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  transition: all 0.2s;
}
.btn-close-modal:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-edit-sprint {
  background: transparent; border: none; cursor: pointer; font-size: 16px;
  transition: transform 0.2s; padding: 4px;
}
.btn-edit-sprint:hover { transform: scale(1.2); }

.modal-body {
  flex: 1; overflow-y: auto; padding: 20px;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.empty-state { color: var(--text2); text-align: center; padding: 32px 0; font-size: 13px; }

/* ===== SPRINT PANEL ===== */
.sprint-panel { width: 820px; }

.sprint-toolbar {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
}
.btn-new-task {
  background: #4f46e5; border: none; color: #fff; cursor: pointer;
  border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 600;
  transition: all 0.2s;
}
.btn-new-task:hover { background: #4338ca; }

/* ===== NEW TASK POPUP ===== */
.new-task-panel {
  width: 620px;
  max-height: 90vh;
}
.new-task-form-body {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 18px;
}
.new-task-form-body::-webkit-scrollbar { width: 4px; }
.new-task-form-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.ntf-section {
  display: flex; flex-direction: column; gap: 10px;
}
.ntf-section-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text2); padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ntf-field { display: flex; flex-direction: column; gap: 5px; }
.ntf-field label { font-size: 11px; color: var(--text2); font-weight: 500; }
.ntf-field .req { color: #f87171; }
.ntf-row { display: flex; gap: 10px; }
.ntf-row .ntf-field { flex: 1; }
.ntf-field-sm { max-width: 90px; }

.ntf-field input, .ntf-field textarea, .ntf-field select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; color: #e2e8f0;
  -webkit-text-fill-color: #e2e8f0;
  font-size: 13px; padding: 9px 12px;
  outline: none; font-family: inherit;
  transition: border-color 0.2s;
  width: 100%;
}
.ntf-field input::placeholder, .ntf-field textarea::placeholder { color: #475569; -webkit-text-fill-color: #475569; }
.ntf-field input:focus, .ntf-field textarea:focus, .ntf-field select:focus { border-color: rgba(99,102,241,0.6); background: rgba(255,255,255,0.11); }
.ntf-field textarea { resize: vertical; min-height: 60px; }
.ntf-field select option { background: #1e293b; color: #e2e8f0; }

/* User story builder */
.ntf-user-story {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.us-row { display: flex; align-items: center; gap: 10px; }
.us-label { font-size: 11px; color: #818cf8; font-weight: 600; min-width: 38px; text-align: right; }
.us-row input {
  flex: 1; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px; color: #e2e8f0;
  -webkit-text-fill-color: #e2e8f0;
  font-size: 12px; padding: 6px 10px;
  outline: none; font-family: inherit;
  transition: border-color 0.2s;
}
.us-row input::placeholder { color: #475569; -webkit-text-fill-color: #475569; }
.us-row input:focus { border-color: rgba(99,102,241,0.6); background: rgba(255,255,255,0.11); }

.new-task-form-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; gap: 10px; justify-content: flex-end; flex-shrink: 0;
}
.btn-cancel-task {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text2); cursor: pointer; border-radius: 8px;
  padding: 9px 18px; font-size: 13px; transition: all 0.2s;
}
.btn-cancel-task:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-save-task {
  background: #4f46e5; border: none; color: #fff; cursor: pointer;
  border-radius: 8px; padding: 9px 22px; font-size: 13px; font-weight: 700;
  transition: all 0.2s;
}
.btn-save-task:hover { background: #4338ca; }

/* ===== LENA ANALYSIS PANEL ===== */
.lena-panel { width: 560px; }
.lena-thinking {
  display: flex; align-items: center; gap: 12px;
  padding: 30px; color: var(--text2); font-size: 13px;
  justify-content: center;
}
.lena-analysis-text {
  white-space: pre-wrap; line-height: 1.7; color: #e2e8f0;
  font-size: 13px; padding: 20px;
}
.lena-analysis-text strong { color: #fbbf24; }

/* Lena analysis badge on task card */
.task-lena-badge {
  font-size: 9px; padding: 2px 7px; border-radius: 10px;
  background: rgba(245,158,11,0.15); color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.25); cursor: pointer;
  transition: background 0.15s;
}
.task-lena-badge:hover { background: rgba(245,158,11,0.3); }

/* Task columns */
.task-columns {
  display: flex; gap: 0; flex: 1; overflow: hidden;
}
.task-col {
  flex: 1; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
  min-height: 300px; max-height: 420px;
}
.task-col:last-child { border-right: none; }
.task-col-header {
  padding: 10px 14px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  flex-shrink: 0;
}
.pending-header { color: #fbbf24; background: rgba(251,191,36,0.08); }
.inprogress-header { color: #60a5fa; background: rgba(96,165,250,0.08); }
.done-header { color: #34d399; background: rgba(52,211,153,0.08); }
.col-count {
  display: inline-block; background: rgba(255,255,255,0.1);
  border-radius: 10px; padding: 0 6px; font-size: 11px; margin-left: 6px;
}
.task-list {
  flex: 1; overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.task-list::-webkit-scrollbar { width: 3px; }
.task-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

/* Task card */
.task-card {
  background: #1e293b; border-radius: 8px;
  padding: 10px 12px; border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s;
}
.task-card:hover { border-color: rgba(99,102,241,0.3); }
.task-card-title { font-size: 12px; font-weight: 600; color: #e2e8f0; margin-bottom: 4px; }
.task-card-desc { font-size: 11px; color: var(--text2); margin-bottom: 6px; line-height: 1.4; }
.task-card-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.task-assignee {
  font-size: 10px; padding: 2px 7px; border-radius: 10px;
  font-weight: 600; white-space: nowrap;
}
.task-priority { font-size: 10px; }
.task-actions { display: flex; gap: 4px; margin-left: auto; }
.task-btn {
  background: rgba(255,255,255,0.07); border: none; cursor: pointer;
  border-radius: 5px; padding: 3px 8px; font-size: 10px; color: var(--text2);
  transition: all 0.15s; white-space: nowrap;
}
.task-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.task-btn.start { color: #60a5fa; }
.task-btn.start:hover { background: rgba(96,165,250,0.2); }
.task-btn.done { color: #34d399; }
.task-btn.done:hover { background: rgba(52,211,153,0.2); }
.task-btn.del { color: #f87171; }
.task-btn.del:hover { background: rgba(248,113,113,0.2); }
.task-date { font-size: 9px; color: #475569; }

/* ===== WORKLOG PANEL ===== */
.worklog-panel { width: 520px; }
.worklog-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: rgba(255,255,255,0.08);
}
.worklog-entry {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.worklog-entry:last-child { border-bottom: none; }
.worklog-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6366f1; flex-shrink: 0; margin-top: 4px;
}
.worklog-content { flex: 1; }
.worklog-summary { font-size: 13px; color: #e2e8f0; line-height: 1.5; }
.worklog-task { font-size: 11px; color: #818cf8; margin-top: 2px; }
.worklog-time { font-size: 10px; color: var(--text2); margin-top: 3px; }

/* ===== LENA TOAST ===== */
.lena-toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a; border-radius: 10px;
  padding: 12px 20px; font-size: 13px; color: #e2e8f0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 500; pointer-events: none;
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
  max-width: 480px; text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
}
.lena-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.lena-toast-success { border-color: rgba(74,222,128,0.3); }
.lena-toast-warning { border-color: rgba(251,191,36,0.3); }
.lena-toast-info { border-color: rgba(99,102,241,0.3); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .desks-row { gap: 20px; padding: 0 10px; }
  .desk-area { width: 160px; }
  .monitor-screen { width: 100px; height: 65px; }
}
@media (max-width: 600px) {
  .chat-panel { width: 100%; margin-right: 0; border-radius: 16px 16px 0 0; }
  .whiteboard, .bookshelf { display: none; }
  .window-2 { display: none; }
}
