/* ============================================================
   J.A.R.V.I.S — Cyberpunk Dashboard Stylesheet
   Version 2.0 — Full Production CSS
   ============================================================ */

/* ── 1. CSS Custom Properties ─────────────────────────────── */
:root {
  --bg-primary:      #090b10;
  --bg-secondary:    #0d1117;
  --bg-panel:        rgba(0, 229, 255, 0.03);
  --bg-widget:       rgba(0, 229, 255, 0.04);
  --accent:          #00e5ff;
  --accent-dim:      rgba(0, 229, 255, 0.6);
  --accent-glow:     rgba(0, 229, 255, 0.3);
  --accent-border:   rgba(0, 229, 255, 0.12);
  --accent-border-md:rgba(0, 229, 255, 0.25);
  --blue:            #0047ff;
  --blue-dim:        rgba(0, 71, 255, 0.6);
  --blue-glow:       rgba(0, 71, 255, 0.3);
  --green:           #00ff88;
  --green-dim:       rgba(0, 255, 136, 0.5);
  --yellow:          #ffcc00;
  --yellow-dim:      rgba(255, 204, 0, 0.5);
  --red:             #ff3366;
  --red-dim:         rgba(255, 51, 102, 0.5);
  --text-primary:    #e8f4f8;
  --text-secondary:  #7a9bb5;
  --text-muted:      #3a5a7a;
  --header-height:   58px;
  --dock-height:     64px;
  --widget-width:    272px;
  --chat-width:      460px;
  --font-body:       'Inter', sans-serif;
  --font-display:    'Space Grotesk', sans-serif;
  --font-mono:       'JetBrains Mono', monospace;
  --glass:           rgba(0, 229, 255, 0.03);
  --glass-border:    rgba(0, 229, 255, 0.12);
  --glass-blur:      blur(20px);
  --transition:      all 0.2s ease;
  --glow-sm:         0 0 10px rgba(0, 229, 255, 0.2);
  --glow-md:         0 0 20px rgba(0, 229, 255, 0.3);
  --glow-lg:         0 0 40px rgba(0, 229, 255, 0.4);
  --glow-xl:         0 0 60px rgba(0, 229, 255, 0.5);
  --radius-sm:       4px;
  --radius-md:       8px;
  --radius-lg:       12px;
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  /* Cyberpunk grid pattern */
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(0, 71, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 71, 255, 0.015) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 229, 255, 0.03);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.25);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.45);
}

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: var(--font-body);
  color: var(--text-primary);
}

/* ── 3. Utility Classes ───────────────────────────────────── */
.hidden {
  display: none !important;
}

.cyan {
  color: var(--accent);
}

.green {
  color: var(--green);
}

.red {
  color: var(--red);
}

.yellow {
  color: var(--yellow);
}

.mono {
  font-family: var(--font-mono);
}

.glow {
  box-shadow: var(--glow-md);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.badge-todo {
  background: rgba(255, 51, 102, 0.15);
  color: var(--red);
  border-color: rgba(255, 51, 102, 0.3);
}

.badge-inprogress {
  background: rgba(255, 204, 0, 0.15);
  color: var(--yellow);
  border-color: rgba(255, 204, 0, 0.3);
}

.badge-done {
  background: rgba(0, 255, 136, 0.15);
  color: var(--green);
  border-color: rgba(0, 255, 136, 0.3);
}

/* ── 4. Scan-line Overlay ─────────────────────────────────── */
.scanline-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  animation: scan-line 8s linear infinite;
  opacity: 0.5;
}

/* ── 5. Loading Screen ────────────────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
  overflow: hidden;
}

.loading-hex-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: fadeIn 1s ease forwards;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 1;
}

.loading-arc {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-arc-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.loading-arc-ring.ring-1 {
  width: 120px;
  height: 120px;
  border-top-color: var(--accent);
  border-right-color: rgba(0, 229, 255, 0.3);
  animation: spin 1.2s linear infinite;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.loading-arc-ring.ring-2 {
  width: 88px;
  height: 88px;
  border-top-color: var(--blue);
  border-left-color: rgba(0, 71, 255, 0.3);
  animation: spin 1.8s linear infinite reverse;
}

.loading-arc-ring.ring-3 {
  width: 60px;
  height: 60px;
  border-top-color: rgba(0, 229, 255, 0.6);
  border-bottom-color: rgba(0, 229, 255, 0.2);
  animation: spin 2.4s linear infinite;
}

.loading-core {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, rgba(0, 229, 255, 0.4) 50%, transparent 80%);
  animation: breathe 2s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.8);
}

.loading-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-shadow: var(--glow-sm);
  animation: blink 1.5s step-end infinite;
}

.loading-bar-wrap {
  width: 240px;
  height: 2px;
  background: rgba(0, 229, 255, 0.1);
  border-radius: 1px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--accent));
  border-radius: 1px;
  transition: width 0.08s ease;
  box-shadow: 0 0 8px var(--accent);
}

.loading-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
}

/* ── 6. App Shell ─────────────────────────────────────────── */
#app {
  display: grid;
  grid-template-rows: var(--header-height) 1fr var(--dock-height);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* ── 7. Header ────────────────────────────────────────────── */
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--header-height);
  background: rgba(9, 11, 16, 0.9);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--accent-border);
  box-shadow: 0 1px 0 rgba(0, 229, 255, 0.08), 0 4px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 100;
}

#header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(0, 229, 255, 0.4) 20%,
    rgba(0, 229, 255, 0.6) 50%,
    rgba(0, 229, 255, 0.4) 80%,
    transparent
  );
  animation: glow-pulse 3s ease-in-out infinite;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.brand-hex {
  color: var(--accent);
  display: flex;
  align-items: center;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.6));
}

.brand {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-shadow: var(--glow-sm);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.busy {
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
  animation: pulse 0.8s ease-in-out infinite;
}

.status-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--green);
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.5);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-display {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-shadow: var(--glow-sm);
}

.date-display {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.weather-header {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.header-sep {
  color: var(--text-muted);
  font-size: 10px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  justify-content: flex-end;
}

.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.header-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border-md);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: var(--glow-sm);
  transform: translateY(-1px);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(255, 51, 102, 0.5);
}

.version-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--glass);
}

/* ── 8. Main Layout ───────────────────────────────────────── */
#main {
  display: grid;
  grid-template-columns: var(--widget-width) 1fr var(--chat-width);
  overflow: hidden;
  position: relative;
  height: 100%;
}

/* ── 9. HUD Widgets Layer ─────────────────────────────────── */
#widgets-layer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 10px 12px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.2) transparent;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* When widgets are unlocked (free-drag mode), layer covers full viewport */
#widgets-layer.free-drag {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: visible;
  padding: 0;
}
#widgets-layer.free-drag .hud-widget {
  pointer-events: auto;
  position: absolute;
}

/* Lock/Unlock toggle button */
.widget-lock-toggle {
  position: fixed;
  bottom: calc(var(--dock-height) + 12px);
  left: 14px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--accent-border-md);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}
.widget-lock-toggle:hover {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.3);
}
.widget-lock-toggle.locked {
  color: var(--green);
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.08);
}
.widget-lock-toggle svg {
  width: 12px;
  height: 12px;
}

/* Locked widgets can't be dragged */
.hud-widget.widget-locked .widget-header {
  cursor: default !important;
}

#widgets-layer.widgets-hidden {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.hud-widget {
  background: var(--bg-widget);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.hud-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.6;
}

.hud-widget:hover {
  border-color: var(--accent-border-md);
  box-shadow: var(--glow-sm), inset 0 0 20px rgba(0, 229, 255, 0.02);
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px 8px 14px;
  border-bottom: 1px solid var(--glass-border);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}

.widget-icon {
  color: var(--accent);
  opacity: 0.8;
  display: flex;
  align-items: center;
}

.widget-tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 2px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-dim);
  border: 1px solid rgba(0, 229, 255, 0.15);
  animation: blink 2s step-end infinite;
}

.widget-body {
  padding: 10px 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.widget-big-val {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: var(--glow-md);
  line-height: 1;
  margin-bottom: 2px;
}

.widget-sub {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.widget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.widget-row .label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.widget-row .val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.widget-row .val.cyan {
  color: var(--accent);
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

.widget-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-bar-row .label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  width: 28px;
  flex-shrink: 0;
}

.widget-bar {
  flex: 1;
  height: 3px;
  background: rgba(0, 229, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.widget-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--accent));
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
  transition: width 0.8s ease;
}

.widget-bar-fill.mem {
  background: linear-gradient(90deg, var(--blue), #7b00ff);
}

.widget-bar-row .val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* Stock Items */
.stock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.05);
  gap: 6px;
}

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

.stock-sym {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  width: 46px;
  flex-shrink: 0;
}

.stock-price {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  flex: 1;
  text-align: right;
}

.stock-chg {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  width: 52px;
  text-align: right;
  flex-shrink: 0;
}

.stock-chg.up {
  color: var(--green);
}

.stock-chg.down {
  color: var(--red);
}

/* News Items */
.news-item {
  padding: 7px 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.05);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.15s ease;
}

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

.news-item:hover {
  color: var(--text-primary);
}

.news-item .news-source {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent-dim);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

/* Loading shimmer */
.loading-shimmer {
  animation: shimmer 1.5s ease-in-out infinite;
}

.loading-text-anim {
  animation: blink 1.5s step-end infinite;
  color: var(--text-muted);
  font-size: 11px;
  padding: 8px 0;
}

/* ── 10. Arc Reactor Center ───────────────────────────────── */
#arc-reactor-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  padding: 20px;
}

#arc-reactor {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Arc Rings */
.arc-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent-border);
}

.arc-ring-outer {
  width: 260px;
  height: 260px;
  border-color: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.08), inset 0 0 30px rgba(0, 229, 255, 0.04);
}

.arc-ring-mid {
  width: 210px;
  height: 210px;
  border-color: rgba(0, 71, 255, 0.3);
  border-top-color: var(--blue);
  border-right-color: rgba(0, 71, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 71, 255, 0.25);
}

.arc-ring-inner {
  width: 165px;
  height: 165px;
  border-color: rgba(0, 229, 255, 0.25);
  border-top-color: var(--accent);
  border-left-color: rgba(0, 229, 255, 0.12);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

/* Ring segments */
.arc-ring-segment {
  position: absolute;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(0, 229, 255, 0.5);
}

.arc-ring-mid .seg-1 { top: -3px; left: 50%; transform: translateX(-50%); }
.arc-ring-mid .seg-2 { bottom: -3px; left: 30%; transform: translateX(-50%); }
.arc-ring-mid .seg-3 { bottom: -3px; right: 30%; transform: translateX(50%); }
.arc-ring-inner .seg-1 { top: -3px; left: 50%; transform: translateX(-50%); }
.arc-ring-inner .seg-2 { right: -3px; top: 50%; transform: translateY(-50%); background: var(--blue); box-shadow: 0 0 8px var(--blue); }

/* Spin animations */
.spin-cw  { animation: spin 8s linear infinite; }
.spin-ccw { animation: spin 6s linear infinite reverse; }

/* Corner brackets on outer ring — hidden */
.arc-bracket {
  display: none;
}

/* Tick marks */
.arc-ticks {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.tick {
  position: absolute;
  width: 2px;
  height: 8px;
  background: rgba(0, 229, 255, 0.4);
  left: 50%;
  top: 2px;
  transform-origin: 50% 128px;
  transform: translateX(-50%) rotate(calc(var(--i) * 45deg));
}

/* Arc Core */
.arc-core {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background: radial-gradient(circle at center,
    rgba(0, 229, 255, 0.06) 0%,
    rgba(0, 71, 255, 0.04) 50%,
    transparent 80%
  );
  border: 1px solid rgba(0, 229, 255, 0.15);
  z-index: 2;
}

.arc-sphere {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  /* Multi-layer plasma hologram: white hotspot -> cyan -> electric blue -> deep blue core */
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.4) 8%, transparent 20%),
    radial-gradient(circle at 35% 35%, rgba(180, 245, 255, 0.9) 0%, transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.85) 0%, rgba(0, 140, 255, 0.75) 30%, rgba(0, 71, 255, 0.7) 55%, rgba(0, 20, 80, 0.9) 85%, rgba(0, 0, 20, 1) 100%);
  box-shadow:
    0 0 8px rgba(180, 245, 255, 0.9),
    0 0 22px rgba(0, 229, 255, 0.75),
    0 0 48px rgba(0, 180, 255, 0.55),
    0 0 90px rgba(0, 71, 255, 0.35),
    0 0 140px rgba(0, 71, 255, 0.18),
    inset 0 0 14px rgba(255, 255, 255, 0.25),
    inset 0 -10px 20px rgba(0, 20, 80, 0.6),
    inset 8px 8px 18px rgba(120, 230, 255, 0.25);
  filter: saturate(1.3);
  overflow: hidden;
}

/* Plasma / scanline overlay inside sphere */
.arc-sphere::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06) 0px,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: sphereScan 3.5s linear infinite;
  pointer-events: none;
}

/* Rotating plasma wisp inside the sphere */
.arc-sphere::after {
  content: '';
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 60% 25% at 50% 40%, rgba(120, 230, 255, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse 45% 18% at 40% 60%, rgba(0, 180, 255, 0.35) 0%, transparent 70%);
  filter: blur(4px);
  mix-blend-mode: screen;
  animation: plasmaSwirl 6s linear infinite;
  pointer-events: none;
}

.breathe {
  animation: breathe 3s ease-in-out infinite;
}

.arc-inner-glow {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 229, 255, 0.22) 0%, rgba(0, 140, 255, 0.1) 45%, transparent 75%);
  animation: breathe 3s ease-in-out infinite;
  filter: blur(2px);
  pointer-events: none;
}

@keyframes sphereScan {
  0%   { transform: translateY(-8%); }
  100% { transform: translateY(8%); }
}

@keyframes plasmaSwirl {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}

.arc-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-shadow: var(--glow-sm);
  text-transform: uppercase;
  position: absolute;
  bottom: 10px;
}

/* SVG Progress Circle */
.arc-svg {
  position: absolute;
  width: 260px;
  height: 260px;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
  z-index: 1;
}

.arc-track {
  fill: none;
  stroke: rgba(0, 229, 255, 0.06);
  stroke-width: 2;
}

.arc-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 534;
  stroke-dashoffset: 534;
  transition: stroke-dashoffset 0.6s ease;
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.6));
}

/* HUD Corner decorations — hidden */
.hud-corner {
  display: none;
}

/* Greeting — pure floating text, no container */
.jarvis-greeting {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-align: center;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Arc Stats Row */
.arc-stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 100%;
  max-width: 280px;
}

.arc-stat {
  flex: 1;
  text-align: center;
  padding: 8px 0;
}

.arc-stat-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-shadow: var(--glow-sm);
}

.arc-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-top: 2px;
}

.arc-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--glass-border);
}

/* ── 11. Chat Interface ───────────────────────────────────── */
#chat-container {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--glass-border);
  background: rgba(9, 11, 16, 0.5);
  overflow: hidden;
  position: relative;
}

/* Chat resize handle — drag left edge to resize */
.chat-resize-handle {
  position: absolute;
  top: 0;
  left: -3px;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
  z-index: 10;
  background: transparent;
  transition: background 0.15s ease;
}
.chat-resize-handle:hover,
.chat-resize-handle.resizing {
  background: linear-gradient(90deg, transparent 0%, rgba(0, 229, 255, 0.4) 50%, transparent 100%);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}
body.resizing-chat {
  cursor: ew-resize !important;
  user-select: none;
}
body.resizing-chat * {
  user-select: none !important;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 46px;
  gap: 10px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.chat-hex {
  color: var(--accent);
  display: flex;
}

.chat-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.token-counter {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.12);
  white-space: nowrap;
}

.token-counter #token-count {
  color: var(--accent);
  font-weight: 600;
}

.chat-search {
  width: 130px;
  height: 22px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 2px;
  outline: none;
  transition: all 0.2s ease;
}

.chat-search::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.chat-search:focus {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.25), inset 0 0 8px rgba(0, 229, 255, 0.05);
}

/* Search result highlighting */
.msg.msg-search-hidden {
  display: none !important;
}

.msg .search-highlight {
  background: rgba(0, 229, 255, 0.25);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 600;
}

.model-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 2px;
  background: rgba(0, 71, 255, 0.12);
  color: var(--blue-dim);
  border: 1px solid rgba(0, 71, 255, 0.2);
  letter-spacing: 0.05em;
}

.chat-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-muted);
  transition: var(--transition);
}

.chat-clear-btn:hover {
  color: var(--red);
  border-color: rgba(255, 51, 102, 0.3);
  background: rgba(255, 51, 102, 0.08);
}

/* Messages */
#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.2) transparent;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  animation: slideUp 0.2s ease forwards;
}

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

.msg-assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.msg-system {
  align-self: center;
  align-items: center;
  max-width: 100%;
}

.msg-bubble {
  padding: 10px 13px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.msg-user .msg-bubble {
  background: linear-gradient(135deg,
    rgba(0, 71, 255, 0.25) 0%,
    rgba(0, 229, 255, 0.15) 100%
  );
  border: 1px solid rgba(0, 71, 255, 0.3);
  color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(0, 71, 255, 0.15);
}

.msg-assistant .msg-bubble {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-left: 2px solid var(--accent);
  color: var(--text-primary);
  box-shadow: -2px 0 20px rgba(0, 229, 255, 0.06);
}

.msg-system .msg-bubble {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.1);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-align: center;
  border-radius: var(--radius-sm);
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.msg-sender {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.msg-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

/* Thinking animation */
.msg-thinking .msg-bubble {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
}

.thinking-dots {
  display: flex;
  gap: 4px;
}

.thinking-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: thinking-dot 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; }

.thinking-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* Attachment preview */
.msg-attachment {
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.msg-attachment img {
  max-width: 200px;
  max-height: 150px;
  display: block;
  object-fit: cover;
}

/* Chat Input Area */
.chat-input-area {
  border-top: 1px solid var(--glass-border);
  padding: 10px 12px 12px;
  flex-shrink: 0;
  background: rgba(9, 11, 16, 0.6);
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.attachment-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--glass-border);
  font-size: 11px;
  color: var(--text-secondary);
}

.attachment-chip button {
  color: var(--text-muted);
  font-size: 12px;
  transition: color 0.15s ease;
}

.attachment-chip button:hover {
  color: var(--red);
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.chat-tool-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: rgba(0, 229, 255, 0.06);
}

.chat-tool-btn.active {
  color: var(--accent);
  border-color: var(--accent-border-md);
  background: rgba(0, 229, 255, 0.1);
  box-shadow: var(--glow-sm);
  animation: pulse 1s ease-in-out infinite;
}

#chat-input {
  flex: 1;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  resize: none;
  outline: none;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  scrollbar-width: thin;
  font-family: var(--font-body);
}

#chat-input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

#chat-input:focus {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.06), var(--glow-sm);
}

.chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: white;
  border: none;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.chat-send-btn:active {
  transform: scale(0.97);
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── 12. Side Panels ──────────────────────────────────────── */
.side-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  background: rgba(9, 11, 16, 0.97);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s ease forwards;
}

.side-panel.slide-left {
  animation: slideInLeft 0.25s ease forwards;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-muted);
  transition: var(--transition);
}

.panel-close:hover {
  color: var(--red);
  border-color: rgba(255, 51, 102, 0.3);
  background: rgba(255, 51, 102, 0.08);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: thin;
}

/* ── 13. Kanban Board (Tasks Panel) ───────────────────────── */
.task-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

#task-input {
  flex: 1;
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

#task-input::placeholder {
  color: var(--text-muted);
}

#task-input:focus {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: var(--glow-sm);
}

#task-priority {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  letter-spacing: 0.05em;
}

#task-priority:focus {
  border-color: rgba(0, 229, 255, 0.3);
}

#add-task-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: white;
  font-size: 20px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

#add-task-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.kanban-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  height: calc(100% - 60px);
}

.kanban-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 229, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  min-height: 200px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 4px;
}

.todo-header     { color: var(--red); }
.inprogress-header { color: var(--yellow); }
.done-header     { color: var(--green); }

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 40px;
}

.task-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: grab;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.task-card:hover {
  border-color: var(--accent-border-md);
  box-shadow: var(--glow-sm);
  transform: translateY(-1px);
}

.task-card:active {
  cursor: grabbing;
}

.task-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
}

.task-card[data-priority="high"]::before   { background: var(--red); }
.task-card[data-priority="medium"]::before { background: var(--yellow); }
.task-card[data-priority="low"]::before    { background: var(--green); }

.task-card-title {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 5px;
}

.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-priority-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 1px 5px;
  border-radius: 2px;
}

.task-priority-badge.high   { background: rgba(255, 51, 102, 0.15); color: var(--red); }
.task-priority-badge.medium { background: rgba(255, 204, 0, 0.15);  color: var(--yellow); }
.task-priority-badge.low    { background: rgba(0, 255, 136, 0.15);  color: var(--green); }

.task-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.task-card:hover .task-card-actions {
  opacity: 1;
}

.task-card-btn {
  width: 20px;
  height: 20px;
  border-radius: 2px;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.task-card-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}

/* Briefing Panel */
.briefing-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

.briefing-loading-ring {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.15);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

.briefing-section {
  margin-bottom: 20px;
}

.briefing-section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border);
  text-transform: uppercase;
}

.briefing-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.04);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

.briefing-item strong {
  color: var(--text-primary);
}

/* ── 14. Bottom Dock ──────────────────────────────────────── */
#dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 20px;
  height: var(--dock-height);
  background: rgba(9, 11, 16, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -1px 0 rgba(0, 229, 255, 0.06), 0 -4px 24px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 100;
}

#dock::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(0, 229, 255, 0.3) 30%,
    rgba(0, 229, 255, 0.5) 50%,
    rgba(0, 229, 255, 0.3) 70%,
    transparent
  );
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 68px;
  height: 50px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
  padding: 6px 4px;
}

.dock-btn:hover {
  color: var(--text-secondary);
  background: rgba(0, 229, 255, 0.05);
  border-color: var(--glass-border);
  transform: translateY(-2px);
}

.dock-btn.active {
  color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
  border-color: var(--accent-border);
  box-shadow: var(--glow-sm), inset 0 0 20px rgba(0, 229, 255, 0.04);
}

.dock-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.dock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: transform 0.2s ease;
}

.dock-btn:hover .dock-icon,
.dock-btn.active .dock-icon {
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.4));
}

.dock-btn:hover .dock-icon {
  transform: scale(1.1);
}

.dock-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  font-weight: 600;
  text-transform: uppercase;
}

.dock-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

/* ── 15. Toast Notifications ──────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  min-width: 260px;
  max-width: 340px;
  background: rgba(13, 17, 23, 0.97);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glow-sm), 0 8px 32px rgba(0, 0, 0, 0.5);
  pointer-events: all;
  animation: slideInLeft 0.3s ease forwards;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
}

.toast.toast-success::before { background: var(--green); }
.toast.toast-error::before   { background: var(--red); }
.toast.toast-warning::before { background: var(--yellow); }
.toast.toast-info::before    { background: var(--accent); }

.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  letter-spacing: 0.05em;
}

.toast-message {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.toast-drain {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  animation: drainBar 4s linear forwards;
}

.toast.toast-success .toast-drain { background: var(--green); }
.toast.toast-error .toast-drain   { background: var(--red); }
.toast.toast-warning .toast-drain { background: var(--yellow); }

/* ── 16. Voice Overlay ────────────────────────────────────── */
#voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: fadeIn 0.3s ease forwards;
}

.voice-bg {
  position: absolute;
  inset: 0;
  background: rgba(9, 11, 16, 0.92);
  backdrop-filter: blur(8px);
}

.voice-rings {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.3);
  animation: voice-expand 2s ease-in-out infinite;
}

.voice-ring { width: 80px; height: 80px; }
.voice-ring-2 { width: 120px; height: 120px; animation-delay: 0.4s; border-color: rgba(0, 229, 255, 0.2); }
.voice-ring-3 { width: 160px; height: 160px; animation-delay: 0.8s; border-color: rgba(0, 229, 255, 0.1); }

.voice-core {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.3) 0%, transparent 70%);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: var(--glow-md);
  animation: breathe 1s ease-in-out infinite;
  z-index: 1;
}

.voice-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-shadow: var(--glow-sm);
  animation: blink 1s step-end infinite;
}

.voice-cancel {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.voice-cancel:hover {
  color: var(--red);
  border-color: rgba(255, 51, 102, 0.3);
  background: rgba(255, 51, 102, 0.08);
}

/* ── 17. Keyframe Animations ──────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    filter: saturate(1.3) brightness(1);
  }
  50% {
    transform: scale(1.08);
    filter: saturate(1.6) brightness(1.2);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes drainBar {
  from { width: 100%; }
  to   { width: 0%; }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

@keyframes scan-line {
  0%   { background-position: 0 0; }
  100% { background-position: 0 200px; }
}

@keyframes voice-expand {
  0%   { transform: scale(0.9); opacity: 0.8; }
  50%  { transform: scale(1.1); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

@keyframes thinking-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

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

/* ── 18. Responsive — Tablet (768–1023px) ─────────────────── */
@media (max-width: 1023px) {
  :root {
    --widget-width: 240px;
    --chat-width: 320px;
  }

  #main {
    grid-template-columns: var(--widget-width) 1fr var(--chat-width);
  }

  .time-display {
    font-size: 15px;
  }

  #arc-reactor {
    width: 210px;
    height: 210px;
  }

  .arc-ring-outer { width: 210px; height: 210px; }
  .arc-ring-mid   { width: 170px; height: 170px; }
  .arc-ring-inner { width: 134px; height: 134px; }
  .arc-svg        { width: 210px; height: 210px; }

  .tick {
    transform-origin: 50% 104px;
  }
}

/* ── 19. Responsive — Mobile (< 768px) ───────────────────── */
@media (max-width: 767px) {
  :root {
    --header-height: 50px;
    --dock-height: 58px;
  }

  #main {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  #widgets-layer {
    display: none;
  }

  #arc-reactor-container {
    display: none;
  }

  #chat-container {
    border-left: none;
    width: 100%;
  }

  .header-center .date-display,
  .header-center .header-sep:last-of-type,
  .weather-header {
    display: none;
  }

  .time-display {
    font-size: 14px;
  }

  .version-badge {
    display: none;
  }

  .dock-btn {
    width: 56px;
  }

  .dock-label {
    font-size: 7px;
  }

  .side-panel {
    width: 100%;
  }

  .kanban-board {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #toast-container {
    left: 10px;
    right: 10px;
    bottom: 70px;
  }

  .toast {
    max-width: none;
    min-width: 0;
  }
}

/* ── 20. Additional Polish ────────────────────────────────── */

/* Focus visible outline for accessibility */
:focus-visible {
  outline: 1px solid rgba(0, 229, 255, 0.5);
  outline-offset: 2px;
}

/* Code blocks in chat */
.msg-bubble code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.1);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--accent);
}

.msg-bubble pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.1);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  overflow-x: auto;
  margin: 6px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-primary);
}

.msg-bubble pre::-webkit-scrollbar {
  height: 3px;
}

/* Markdown lists */
.msg-bubble ul,
.msg-bubble ol {
  margin: 6px 0;
  padding-left: 18px;
}

.msg-bubble li {
  margin: 3px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Markdown headers */
.msg-bubble h1, .msg-bubble h2, .msg-bubble h3 {
  font-family: var(--font-display);
  color: var(--accent);
  margin: 8px 0 4px;
  font-weight: 600;
}

.msg-bubble h1 { font-size: 15px; }
.msg-bubble h2 { font-size: 14px; }
.msg-bubble h3 { font-size: 13px; }

/* Blockquote in chat */
.msg-bubble blockquote {
  border-left: 2px solid rgba(0, 229, 255, 0.4);
  padding-left: 10px;
  margin: 6px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Selection color */
::selection {
  background: rgba(0, 229, 255, 0.2);
  color: var(--text-primary);
}

/* Smooth scroll for panels */
.panel-body,
#chat-messages,
#widgets-layer {
  scroll-behavior: smooth;
}

/* Neon line separator */
.neon-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-border-md), transparent);
  margin: 12px 0;
}

/* Arc glow ambient effect on container */
#arc-reactor-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle,
    rgba(0, 71, 255, 0.04) 0%,
    rgba(0, 229, 255, 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
  animation: breathe 4s ease-in-out infinite;
}

/* Subtle grid on main area */
#main::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
    ellipse at 50% 0%,
    rgba(0, 71, 255, 0.06) 0%,
    transparent 60%
  );
  z-index: 0;
}

/* Ensure main children are above pseudo-element */
#widgets-layer,
#arc-reactor-container,
#chat-container,
.side-panel {
  position: relative;
  z-index: 1;
}

/* ============================================================
   JARVIS CHARACTER — Holographic Orb
   ============================================================ */
.jarvis-character {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px auto 0;
  cursor: default;
  user-select: none;
  position: relative;
  z-index: 2;
}

.jarvis-outfit {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
  color: transparent;
  overflow: hidden;
  position: relative;
  animation: holoFloat 4s ease-in-out infinite;
  transition: all 0.4s ease;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.6) 0%, rgba(0, 71, 255, 0.4) 40%, rgba(0, 20, 60, 0.6) 100%);
  box-shadow:
    0 0 15px rgba(0, 229, 255, 0.5),
    0 0 30px rgba(0, 229, 255, 0.3),
    0 0 60px rgba(0, 71, 255, 0.2),
    inset 0 0 15px rgba(255, 255, 255, 0.1),
    inset 0 -8px 16px rgba(0, 71, 255, 0.3);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* Holographic scan line effect */
.jarvis-outfit::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 229, 255, 0.08) 45%,
    rgba(0, 229, 255, 0.25) 50%,
    rgba(0, 229, 255, 0.08) 55%,
    transparent 100%
  );
  animation: holoScan 2.5s linear infinite;
}

/* Outer ring flare */
.jarvis-outfit::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
  animation: holoRingPulse 3s ease-in-out infinite;
}

.jarvis-outfit:hover {
  transform: scale(1.15);
  box-shadow:
    0 0 20px rgba(0, 229, 255, 0.7),
    0 0 40px rgba(0, 229, 255, 0.5),
    0 0 80px rgba(0, 71, 255, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.15),
    inset 0 -8px 20px rgba(0, 71, 255, 0.4);
}

.jarvis-char-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent-dim);
  letter-spacing: 0.1em;
  margin-top: 8px;
  text-transform: uppercase;
}

@keyframes holoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes holoScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes holoRingPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* Weather high/low */
#w-high-low {
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ============================================================
   V2.0 OVERHAUL — Full Panels, Kanban, Modals, Buttons
   ============================================================ */

/* ── Button System ─────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.3);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.55);
}
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent-border-md);
  background: rgba(0, 229, 255, 0.06);
  transform: translateY(-1px);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 51, 102, 0.12);
  color: var(--red);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 51, 102, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-danger:hover {
  background: rgba(255, 51, 102, 0.22);
  box-shadow: 0 0 14px rgba(255, 51, 102, 0.35);
  transform: translateY(-1px);
}

/* ── Full Panel System ─────────────────────────────────────── */
.full-panel {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.22s ease forwards;
}

/* When a full panel is active on #main */
#main.full-panel-active #widgets-layer,
#main.full-panel-active #arc-reactor-container,
#main.full-panel-active #chat-container {
  display: none !important;
}

.full-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 64px;
  background: rgba(9, 11, 16, 0.9);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.full-panel-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(0, 229, 255, 0.4) 30%,
    rgba(0, 229, 255, 0.6) 50%,
    rgba(0, 229, 255, 0.4) 70%,
    transparent
  );
}

.full-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.full-panel-title h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.panel-icon {
  font-size: 18px;
  color: var(--accent);
  text-shadow: var(--glow-sm);
  line-height: 1;
}

.panel-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  padding-left: 6px;
  border-left: 1px solid var(--glass-border);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.panel-close-btn:hover {
  color: var(--red);
  border-color: rgba(255, 51, 102, 0.3);
  background: rgba(255, 51, 102, 0.08);
}

/* ── Task Form ──────────────────────────────────────────────── */
.task-form {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
  opacity: 0;
  border-bottom: 0px solid var(--glass-border);
  background: rgba(0, 229, 255, 0.025);
  pointer-events: none;
  /* Never use display:none — use height + opacity instead */
}

/* JS toggles .task-form-open instead of .hidden */
.task-form.task-form-open {
  max-height: 280px;
  opacity: 1;
  border-bottom-width: 1px;
  pointer-events: all;
}

.task-form-inner {
  padding: 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-form-input {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}
.task-form-input:focus {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.07);
}
.task-form-input::placeholder { color: var(--text-muted); }

.task-form-textarea {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  resize: vertical;
  font-family: var(--font-body);
  line-height: 1.5;
}
.task-form-textarea:focus {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.07);
}
.task-form-textarea::placeholder { color: var(--text-muted); }

.task-form-select {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}
.task-form-select:focus {
  border-color: rgba(0, 229, 255, 0.35);
}

.task-form-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.task-form-date { width: 160px; flex-shrink: 0; }
.task-form-label { flex: 1; }

.task-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Kanban Board (Full Panel version) ─────────────────────── */
#task-board.kanban-board {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding: 20px 28px;
  overflow: hidden;
  height: 100%;
}

.kanban-col {
  display: flex;
  flex-direction: column;
  background: rgba(0, 229, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
}

.col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-todo       { background: var(--yellow); box-shadow: 0 0 6px rgba(255,204,0,0.5); }
.dot-inprogress { background: var(--accent); box-shadow: 0 0 6px rgba(0,229,255,0.5); }
.dot-done       { background: var(--green);  box-shadow: 0 0 6px rgba(0,255,136,0.5); }

.col-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  min-width: 26px;
  text-align: center;
}

.kanban-cards {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.15) transparent;
}

.kanban-cards.drag-over {
  background: rgba(0, 229, 255, 0.04);
  outline: 1px dashed rgba(0, 229, 255, 0.3);
  outline-offset: -4px;
  border-radius: var(--radius-sm);
}

/* ── Task Cards ─────────────────────────────────────────────── */
.task-card {
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 14px 10px;
  cursor: grab;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  border-left-width: 3px;
}

.task-card.priority-high   { border-left-color: var(--red); }
.task-card.priority-medium { border-left-color: var(--yellow); }
.task-card.priority-low    { border-left-color: var(--green); }

.task-card:hover {
  border-color: var(--accent-border-md);
  border-left-color: inherit;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), var(--glow-sm);
  transform: translateY(-2px);
}

.task-card.dragging {
  opacity: 0.55;
  cursor: grabbing;
  transform: rotate(1.5deg) scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.task-card-id {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.task-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.task-card:hover .task-card-actions { opacity: 1; }

.task-action-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}
.task-action-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: rgba(0, 229, 255, 0.08);
}
.task-action-btn.danger:hover {
  color: var(--red);
  border-color: rgba(255, 51, 102, 0.3);
  background: rgba(255, 51, 102, 0.08);
}

.task-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 5px;
  word-break: break-word;
}

.task-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
  word-break: break-word;
}

.task-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.priority-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pip-high   { background: var(--red);    box-shadow: 0 0 5px rgba(255,51,102,0.5); }
.pip-medium { background: var(--yellow); box-shadow: 0 0 5px rgba(255,204,0,0.5); }
.pip-low    { background: var(--green);  box-shadow: 0 0 5px rgba(0,255,136,0.5); }

.task-due-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}
.task-due-chip.overdue {
  color: var(--red);
  background: rgba(255, 51, 102, 0.08);
  border-color: rgba(255, 51, 102, 0.25);
}

.task-status-btns {
  display: flex;
  gap: 4px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.task-card:hover .task-status-btns { opacity: 1; }

.task-status-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}
.task-status-btn:hover {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent);
  border-color: var(--accent-border);
}
.task-status-btn.done:hover {
  background: rgba(0, 255, 136, 0.1);
  color: var(--green);
  border-color: rgba(0, 255, 136, 0.3);
}

.task-empty {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 0;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* ── Briefing Panel Layout ──────────────────────────────────── */
#panel-briefing .briefing-grid {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-content: start;
}

.briefing-loading-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.briefing-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.1);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

/* Briefing cards (sections rendered by JS) */
.briefing-card {
  background: rgba(0, 229, 255, 0.025);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: all 0.2s ease;
}
.briefing-card:hover {
  border-color: var(--accent-border-md);
  box-shadow: var(--glow-sm);
}
.briefing-card-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.briefing-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.briefing-card-body strong {
  color: var(--text-primary);
}

/* Legacy briefing styles (rendered by widgets.js) */
.briefing-section {
  background: rgba(0, 229, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.briefing-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--glass-border);
}
.briefing-sub { font-size: 12px; color: var(--text-muted); margin: 4px 0; }
.briefing-task { font-size: 12px; color: var(--text-secondary); padding: 3px 0; }
.priority-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--yellow); }
.briefing-news { font-size: 12px; color: var(--text-secondary); padding: 3px 0; line-height: 1.5; }
.briefing-source { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.briefing-ask-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.3);
}
.briefing-ask-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.5);
}
.briefing-weather-main { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.priority-high   { color: var(--red); }
.priority-medium { color: var(--yellow); }

/* ── Expand Modal ───────────────────────────────────────────── */
.expand-modal {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.expand-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.expand-modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-border-md);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.2), 0 24px 60px rgba(0, 0, 0, 0.7);
  animation: modalScaleIn 0.2s ease forwards;
}

@keyframes modalScaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.expand-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.expand-modal-header h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.expand-close-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.expand-close-btn:hover {
  color: var(--red);
  border-color: rgba(255, 51, 102, 0.3);
  background: rgba(255, 51, 102, 0.08);
}

.expand-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.2) transparent;
}

/* block body scroll when modal open */
body.modal-open {
  overflow: hidden;
}

/* Modal body inner styles */
.modal-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-detail-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.modal-detail-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.modal-detail-val {
  font-size: 13px;
  color: var(--text-primary);
}
.modal-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 14px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--glass-border);
}
.modal-news-list { display: flex; flex-direction: column; gap: 10px; }
.modal-news-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid var(--glass-border);
  transition: all 0.15s ease;
}
.modal-news-item:hover {
  border-color: var(--accent-border);
  background: rgba(0, 229, 255, 0.06);
}
.modal-news-title { font-size: 13px; color: var(--text-primary); line-height: 1.45; margin-bottom: 5px; }
.modal-news-meta { display: flex; gap: 10px; align-items: center; }
.modal-news-source { font-family: var(--font-mono); font-size: 10px; color: var(--accent-dim); }
.modal-news-time   { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.modal-news-link   { font-family: var(--font-mono); font-size: 10px; color: var(--accent); margin-left: auto; }
.modal-stock-list { display: flex; flex-direction: column; gap: 8px; }
.modal-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid var(--glass-border);
  gap: 12px;
}
.modal-stock-sym  { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--text-primary); width: 60px; }
.modal-stock-type { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); letter-spacing: 0.1em; flex: 1; }
.modal-stock-price { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }
.modal-stock-chg { font-family: var(--font-mono); font-size: 12px; font-weight: 700; width: 60px; text-align: right; }
.modal-stock-chg.up   { color: var(--green); }
.modal-stock-chg.down { color: var(--red); }
.modal-stock-sparkline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.weather-expanded {}
.weather-exp-main {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}
.weather-exp-temp {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: var(--glow-md);
  line-height: 1;
}
.weather-exp-cond { font-size: 16px; color: var(--text-secondary); }
.weather-exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.weather-exp-stat {
  padding: 10px 14px;
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.weather-exp-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.weather-exp-stat-val {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
}

/* ── Widget click cursor hint ───────────────────────────────── */
.hud-widget[data-clickable="true"] {
  cursor: pointer;
}
.hud-widget[data-clickable="true"]:hover .widget-tag {
  background: rgba(0, 229, 255, 0.18);
  color: var(--accent);
}

/* ── Task detail in modal ───────────────────────────────────── */
.task-detail-header {
  margin-bottom: 16px;
}
.task-detail-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 8px;
}
.task-detail-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.task-detail-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 10px;
}
.task-detail-badge.high   { background: rgba(255,51,102,0.12); color: var(--red);    border: 1px solid rgba(255,51,102,0.25); }
.task-detail-badge.medium { background: rgba(255,204,0,0.12);  color: var(--yellow); border: 1px solid rgba(255,204,0,0.25);  }
.task-detail-badge.low    { background: rgba(0,255,136,0.12);  color: var(--green);  border: 1px solid rgba(0,255,136,0.25);  }
.task-detail-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}
.task-detail-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 14px;
  background: rgba(0,229,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  margin-top: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.task-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(0,229,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-top: 10px;
}
.task-detail-field-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.task-detail-field-val { font-size: 13px; color: var(--text-primary); }

/* ── Mobile responsive for full panels ─────────────────────── */
@media (max-width: 767px) {
  .full-panel-header {
    padding: 0 16px;
    height: 56px;
  }
  .full-panel-title h1 { font-size: 16px; }
  .panel-subtitle { display: none; }

  #task-board.kanban-board {
    grid-template-columns: 1fr;
    padding: 12px 14px;
    overflow-y: auto;
  }

  #panel-briefing .briefing-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .task-form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .task-form-date,
  .task-form-label { width: 100%; }

  .expand-modal-content {
    max-height: 90vh;
  }

  .modal-detail-grid {
    grid-template-columns: 1fr;
  }
  .weather-exp-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Overwrite old side-panel kanban board sizing ───────────── */
/* The kanban board inside the full panel needs proper height */
#panel-tasks.full-panel {
  overflow: hidden;
}
#panel-tasks .kanban-board {
  /* Remove old calc height; use flex layout */
  height: auto;
}
#panel-tasks {
  display: flex;
  flex-direction: column;
}
