/* ============================================================
   Mission Control — Design System v2
   Matching Declan's mockup exactly
   ============================================================ */

:root {
  /* Core palette - dark, near-black */
  --bg-base: #0a0a0a;
  --bg-surface: #0f0f0f;
  --bg-elevated: #141414;
  --bg-hover: #1a1a1a;
  
  /* Borders - very subtle */
  --border: #1f1f1f;
  --border-subtle: #181818;
  
  /* Text hierarchy */
  --text-primary: #ffffff;
  --text-secondary: #999999;
  --text-muted: #666666;
  --text-faint: #444444;
  
  /* Accent - warm orange */
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-dim: rgba(249, 115, 22, 0.12);
  
  /* Status colors */
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.12);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.15);
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.15);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.15);
  --cyan: #06b6d4;
  --cyan-dim: rgba(6, 182, 212, 0.15);
  
  /* Typography - using system fonts for speed, styled to match */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', Consolas, monospace;
  
  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  
  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;
  
  /* Layout */
  --sidebar-width: 180px;
  --right-sidebar-width: 280px;
}

/* ============================================================
   Reset
   ============================================================ */

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

html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   App Shell
   ============================================================ */

.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ============================================================
   Left Sidebar
   ============================================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-base);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: var(--sp-5);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.logo-icon {
  font-size: 18px;
  color: var(--accent);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.logo-sub {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Navigation */
.nav {
  flex: 1;
  padding: var(--sp-2) var(--sp-3);
  overflow-y: auto;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--sp-5) var(--sp-2) var(--sp-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  font-weight: 400;
  position: relative;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-item.active {
  color: var(--accent);
  background: transparent;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

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

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: var(--sp-4);
}

.version {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-faint);
}

/* ============================================================
   Main Content
   ============================================================ */

.main {
  flex: 1;
  overflow: hidden;
  background: var(--bg-base);
}

.view {
  display: none;
  height: 100%;
  width: 100%;
  overflow-y: auto;
}

.view.active {
  display: flex;
  flex: 1;
}

/* ============================================================
   Dashboard Layout
   ============================================================ */

.dashboard {
  display: flex;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

.dashboard-main {
  flex: 1;
  padding: var(--sp-8);
  overflow-y: auto;
  min-width: 0;
}

.dashboard-sidebar {
  width: var(--right-sidebar-width);
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  padding: var(--sp-6);
  overflow-y: auto;
  flex-shrink: 0;
}

/* Dashboard Header */
.dashboard-header {
  margin-bottom: var(--sp-6);
}

.dashboard-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dashboard-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card + .card {
  margin-top: var(--sp-5);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
}

.card-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.card-body {
  padding: 0;
}

.card-footer {
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.card-link {
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

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

/* ============================================================
   Task List
   ============================================================ */

.task-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
  cursor: pointer;
}

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

.task-item:hover {
  background: var(--bg-hover);
}

.task-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--text-faint);
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.task-item:hover .task-checkbox {
  border-color: var(--text-muted);
}

.task-content {
  flex: 1;
  min-width: 0;
}

.task-title-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.task-priority {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.task-priority.high {
  background: var(--red);
}

.task-priority.medium {
  background: var(--amber);
}

.task-priority.low {
  background: var(--text-faint);
}

.task-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.task-assignee {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.assignee-name {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   Avatars
   ============================================================ */

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.avatar-lg {
  width: 36px;
  height: 36px;
  font-size: 11px;
}

.avatar-jarvis { background: var(--blue-dim); color: var(--blue); }
.avatar-eisenhower { background: var(--amber-dim); color: var(--amber); }
.avatar-ada { background: var(--purple-dim); color: var(--purple); }
.avatar-scout { background: var(--green-dim); color: var(--green); }
.avatar-sterling { background: var(--cyan-dim); color: var(--cyan); }
.avatar-darwin { background: var(--amber-dim); color: var(--amber); }
.avatar-analyst { background: var(--amber-dim); color: var(--amber); }
.avatar-morse { background: var(--accent-dim); color: var(--accent); }
.avatar-ogilvy { background: var(--purple-dim); color: var(--purple); }
.avatar-declan { background: #2a2a2a; color: var(--text-secondary); }

/* ============================================================
   Team Status Widget
   ============================================================ */

.widget-section {
  margin-bottom: var(--sp-6);
}

.widget-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}

.team-member {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
}

.team-member + .team-member {
  border-top: 1px solid var(--border-subtle);
}

.team-info {
  flex: 1;
  min-width: 0;
}

.team-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.team-status {
  font-size: 11px;
  color: var(--text-muted);
}

.team-status::before {
  content: '↳ ';
  opacity: 0.5;
}

.team-role {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.03em;
  text-align: right;
}

.widget-footer {
  margin-top: var(--sp-4);
  text-align: center;
}

.widget-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
}

.widget-link:hover {
  opacity: 0.8;
}

/* ============================================================
   Deadlines Widget
   ============================================================ */

.deadline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
}

.deadline-item + .deadline-item {
  border-top: 1px solid var(--border-subtle);
}

.deadline-info {
  flex: 1;
}

.deadline-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.deadline-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.deadline-badge {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.deadline-badge.urgent {
  background: var(--red-dim);
  color: var(--red);
}

.deadline-badge.soon {
  background: var(--amber-dim);
  color: var(--amber);
}

.deadline-badge.ok {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

/* ============================================================
   Velocity Chart
   ============================================================ */

.velocity-chart {
  height: 140px;
  position: relative;
  padding: var(--sp-4) var(--sp-5);
}

.velocity-grid {
  position: absolute;
  top: var(--sp-4);
  left: 40px;
  right: var(--sp-5);
  bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.velocity-grid-line {
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  height: 0;
}

.velocity-grid-line span {
  position: absolute;
  left: -35px;
  top: -6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-faint);
}

.velocity-svg {
  position: absolute;
  top: var(--sp-4);
  left: 40px;
  right: var(--sp-5);
  bottom: var(--sp-4);
}

.velocity-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.velocity-area {
  fill: url(#velocity-gradient);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-family: inherit;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

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

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-sm {
  padding: var(--sp-1) var(--sp-3);
  font-size: 11px;
  border-radius: var(--radius-full);
}

/* ============================================================
   Empty States
   ============================================================ */

.empty-state {
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
  color: var(--text-muted);
}

.empty-icon {
  font-size: 28px;
  margin-bottom: var(--sp-3);
  opacity: 0.3;
}

.empty-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--sp-1);
}

.empty-text {
  font-size: 12px;
}

/* ============================================================
   Page Container (for other views)
   ============================================================ */

.page-container {
  padding: var(--sp-8);
  width: 100%;
}

.page-header {
  margin-bottom: var(--sp-6);
}

.page-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

/* ============================================================
   Forms
   ============================================================ */

.form-group {
  margin-bottom: var(--sp-4);
}

.form-row {
  display: flex;
  gap: var(--sp-4);
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s;
}

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

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

/* ============================================================
   Inbox
   ============================================================ */

.inbox-container {
  width: 100%;
  padding: var(--sp-8);
}

.inbox-container h2 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 2px;
}

.inbox-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: var(--sp-6);
}

.inbox-input-area {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.inbox-textarea {
  flex: 1;
  padding: var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  resize: none;
  min-height: 50px;
}

.inbox-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.inbox-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-2);
}

.inbox-item-content {
  flex: 1;
  font-size: 13px;
}

.inbox-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

.inbox-action-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-2);
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
  transition: all 0.15s;
}

.inbox-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.inbox-empty {
  text-align: center;
  padding: var(--sp-10);
  color: var(--text-faint);
}

.inbox-empty-icon {
  font-size: 32px;
  margin-bottom: var(--sp-3);
  opacity: 0.3;
}

/* ============================================================
   Settings
   ============================================================ */

.settings-container {
  width: 100%;
  padding: var(--sp-8);
}

.settings-container h2 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 2px;
}

.settings-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-top: var(--sp-5);
}

.settings-section-header h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.settings-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: var(--sp-4);
}

.settings-textarea {
  width: 100%;
  min-height: 450px;
  padding: var(--sp-4);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.settings-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

/* ============================================================
   Modal
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 15px;
  font-weight: 600;
}

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

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

.modal-body {
  padding: var(--sp-5);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
}

/* ============================================================
   Toast
   ============================================================ */

.toast {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(var(--sp-3));
  transition: all 0.2s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { border-color: var(--green); }
.toast-error { border-color: var(--red); }
.toast-info { border-color: var(--blue); }

/* ============================================================
   Scrollbar
   ============================================================ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* ============================================================
   Utilities
   ============================================================ */

.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }

/* ============================================================
   Revenue Progress
   ============================================================ */

.revenue-target {
  font-size: 11px;
  color: var(--text-muted);
}

.revenue-current {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}

.revenue-bar {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--sp-2);
}

.revenue-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.revenue-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   Task Modal (Create New Task)
   ============================================================ */

.task-modal {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: 90vw;
}

.task-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
}

.task-modal-header h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.task-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

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

.task-modal-body {
  padding: var(--sp-4) var(--sp-6) var(--sp-6);
}

.task-form-group {
  margin-bottom: var(--sp-5);
  flex: 1;
}

.task-form-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

.task-form-input,
.task-form-select {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s;
}

.task-form-input::placeholder {
  color: var(--text-faint);
}

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

.task-form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.task-form-row {
  display: flex;
  gap: var(--sp-4);
}

.task-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6) var(--sp-5);
}

.task-cancel-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: var(--sp-2) var(--sp-3);
  transition: color 0.15s;
}

.task-cancel-btn:hover {
  color: var(--text-primary);
}

.task-create-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: var(--sp-3) var(--sp-5);
  cursor: pointer;
  transition: background 0.15s;
}

.task-create-btn:hover {
  background: var(--accent-hover);
}

/* ============================================================
   Tasks Board (Kanban)
   ============================================================ */

.board-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  height: 100%;
  padding: var(--sp-8);
  overflow: hidden;
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  flex-shrink: 0;
}

.board-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.board-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.board {
  display: flex;
  gap: var(--sp-5);
  flex: 1;
  width: 100%;
  overflow-x: auto;
  padding-bottom: var(--sp-4);
}

.board-column {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
}

.board-column-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.board-column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.board-column-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.board-column-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.board-column-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-height: 0;
  overflow-y: auto;
}

.board-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  cursor: pointer;
  transition: border-color 0.15s;
}

.board-card:hover {
  border-color: var(--text-faint);
}

.board-card-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-2);
}

.board-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: var(--sp-3);
}

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

.board-card-urgent {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.avatar-sm {
  width: 22px;
  height: 22px;
  font-size: 8px;
}

.board-add-btn {
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: auto;
}

.board-add-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

/* ============================================================
   Projects Grid (New Design)
   ============================================================ */

.projects-container {
  padding: var(--sp-8);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.projects-header {
  margin-bottom: var(--sp-6);
}

.projects-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.projects-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-5);
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  transition: border-color 0.15s;
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--text-faint);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.project-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
}

.project-header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.project-status-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-status-badge.active {
  background: var(--green-dim);
  color: var(--green);
}

.project-status-badge.risk {
  background: var(--red-dim);
  color: var(--red);
}

.project-status-badge.on-hold,
.project-status-badge.paused {
  background: var(--amber-dim);
  color: var(--amber);
}

.project-status-badge.completed {
  background: var(--green-dim);
  color: var(--green);
}

.project-status-badge.development,
.project-status-badge.nearly-ready {
  background: var(--blue-dim);
  color: var(--blue);
}

.project-status-badge.running {
  background: var(--purple-dim);
  color: var(--purple);
}

.project-menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.project-menu-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.project-card-body {
  flex: 1;
}

.project-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  line-height: 1.3;
}

.project-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--sp-4);
}

.project-progress {
  margin-bottom: var(--sp-4);
}

.project-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-2);
}

.project-progress-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.project-progress-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.project-progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.project-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.project-progress-fill.green { background: var(--green); }
.project-progress-fill.amber { background: var(--amber); }
.project-progress-fill.red { background: var(--red); }
.project-progress-fill.blue { background: var(--blue); }

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
}

.project-avatars {
  display: flex;
  align-items: center;
}

.project-avatars .avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
  margin-right: -8px;
  border: 2px solid var(--bg-surface);
}

.project-avatars .avatar:last-child {
  margin-right: 0;
}

.project-due-date {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 12px;
  color: var(--text-muted);
}

.project-due-date .icon {
  font-size: 14px;
  opacity: 0.6;
}

/* Create New Project Card */
.project-card-new {
  background: transparent;
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  cursor: pointer;
  transition: all 0.15s;
}

.project-card-new:hover {
  border-color: var(--text-muted);
  background: var(--bg-surface);
}

.project-card-new-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.project-card-new-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Project Detail Modal */
.project-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.project-modal-title {
  font-size: 18px;
  font-weight: 600;
}

.project-modal-body {
  padding: var(--sp-6);
  overflow-y: auto;
  flex: 1;
}

.project-detail-section {
  margin-bottom: var(--sp-5);
}

.project-detail-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
}

.project-detail-value {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

.project-blockers-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-blockers-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.project-blockers-list li::before {
  content: '•';
  color: var(--red);
  font-weight: bold;
}

.project-actions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-actions-list li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  font-size: 13px;
}

.project-actions-list li.done {
  color: var(--text-muted);
  text-decoration: line-through;
}

.project-actions-list li.pending {
  color: var(--text-secondary);
}

.project-action-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--text-faint);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

.project-action-checkbox.checked {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

/* ============================================================
   Finances Dashboard
   ============================================================ */

/* Lock Screen */
.finance-lock-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  background: var(--bg-base);
}

.finance-lock-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  max-width: 380px;
  width: 100%;
  text-align: center;
}

.finance-lock-icon {
  font-size: 56px;
  margin-bottom: var(--sp-4);
  opacity: 0.8;
}

.finance-lock-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--text-primary);
}

.finance-lock-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}

.finance-lock-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  text-align: center;
  margin-bottom: var(--sp-4);
  transition: border-color 0.15s;
}

.finance-lock-input:focus {
  outline: none;
  border-color: var(--accent);
}

.finance-lock-input::placeholder {
  color: var(--text-faint);
}

.finance-lock-btn {
  width: 100%;
  padding: var(--sp-3);
  font-size: 14px;
  font-weight: 600;
}

/* Dashboard Layout */
.finance-dashboard {
  padding: var(--sp-8);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.finance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.finance-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.finance-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Stats Grid */
.finance-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

@media (max-width: 1200px) {
  .finance-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .finance-stats-grid {
    grid-template-columns: 1fr;
  }
}

.finance-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  transition: border-color 0.15s;
}

.finance-stat-card:hover {
  border-color: var(--text-faint);
}

.finance-stat-card.finance-stat-primary {
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(249, 115, 22, 0.08) 100%);
  border-color: rgba(249, 115, 22, 0.3);
}

.finance-stat-card.finance-stat-positive .finance-stat-value {
  color: var(--green);
}

.finance-stat-card.finance-stat-negative .finance-stat-value {
  color: var(--red);
}

.finance-stat-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.finance-stat-content {
  flex: 1;
  min-width: 0;
}

.finance-stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}

.finance-stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-1);
}

.finance-stat-meta {
  font-size: 11px;
  color: var(--text-faint);
}

/* Content Grid */
.finance-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}

@media (max-width: 1000px) {
  .finance-content-grid {
    grid-template-columns: 1fr;
  }
}

.finance-column {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* Revenue Progress */
.finance-progress-percent {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.finance-progress-bar-container {
  margin-bottom: var(--sp-4);
}

.finance-progress-bar {
  height: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--sp-2);
}

.finance-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.finance-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-faint);
}

.finance-progress-summary {
  display: flex;
  gap: var(--sp-5);
}

.finance-progress-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12px;
  color: var(--text-secondary);
}

.finance-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.finance-progress-dot.green {
  background: var(--green);
}

.finance-progress-dot.muted {
  background: var(--text-faint);
}

/* Client Revenue */
.finance-client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}

.finance-client-row:last-child {
  border-bottom: none;
}

.finance-client-info {
  flex: 1;
}

.finance-client-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.finance-client-spend {
  font-size: 11px;
  color: var(--text-muted);
}

.finance-client-fee {
  font-size: 18px;
  font-weight: 600;
  color: var(--green);
}

.finance-client-total {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Ad Spend */
.finance-ad-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.finance-ad-item:last-of-type {
  border-bottom: none;
}

.finance-ad-platform {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--text-secondary);
}

.finance-ad-icon {
  font-size: 16px;
}

.finance-ad-amount {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.finance-ad-total {
  display: flex;
  justify-content: space-between;
  padding-top: var(--sp-4);
  margin-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* P&L Summary */
.finance-period-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.finance-pnl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-2) 0;
}

.finance-pnl-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.finance-pnl-value {
  font-size: 14px;
  font-weight: 500;
}

.finance-pnl-value.positive {
  color: var(--green);
}

.finance-pnl-value.negative {
  color: var(--red);
}

.finance-pnl-divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-3) 0;
}

.finance-pnl-total {
  padding-top: var(--sp-3);
}

.finance-pnl-total .finance-pnl-label {
  font-weight: 600;
  color: var(--text-primary);
}

.finance-pnl-total .finance-pnl-value {
  font-size: 18px;
  font-weight: 700;
}

/* Deadlines */
.finance-deadline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}

.finance-deadline-row:last-child {
  border-bottom: none;
}

.finance-deadline-info {
  flex: 1;
}

.finance-deadline-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.finance-deadline-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   Team Grid (New Design)
   ============================================================ */

.team-container {
  padding: var(--sp-8);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.team-header {
  margin-bottom: var(--sp-6);
}

.team-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.team-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}

/* Team Card */
.team-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
}

.team-card:hover {
  border-color: var(--text-faint);
  transform: translateY(-2px);
}

.team-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.team-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
}

.team-card-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.team-card-status-badge.active {
  background: var(--green-dim);
  color: var(--green);
}

.team-card-status-badge.idle {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.team-card-status-badge .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.team-card-body {
  flex: 1;
}

.team-card-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.team-card-role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.team-card-status-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.team-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-subtle);
  gap: var(--sp-4);
}

.team-card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-card-stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.team-card-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.team-card-action {
  margin-left: auto;
}

.team-card-view {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  transition: opacity 0.15s;
}

.team-card:hover .team-card-view {
  opacity: 0.8;
}

/* ============================================================
   Employee Detail View
   ============================================================ */

.employee-detail-container {
  padding: var(--sp-8);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.employee-back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: var(--sp-5);
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.employee-back-btn:hover {
  color: var(--text-primary);
}

/* Employee Header */
.employee-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  gap: var(--sp-6);
}

.employee-header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.employee-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 600;
  text-transform: uppercase;
}

.employee-header-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.employee-name {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}

.employee-role {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin: 0;
}

.employee-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  margin-top: var(--sp-2);
  max-width: fit-content;
}

.employee-status-badge.active {
  background: var(--green-dim);
  color: var(--green);
}

.employee-status-badge.idle {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.employee-status-badge .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.employee-header-actions {
  display: flex;
  gap: var(--sp-3);
}

/* Stats Row */
.employee-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.employee-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  text-align: center;
}

.employee-stat-value {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.employee-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Content Grid */
.employee-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}

.employee-column {
  display: flex;
  flex-direction: column;
}

/* Card count badge */
.card-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Task Items */
.employee-task-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

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

.employee-task-item:hover {
  background: var(--bg-hover);
}

.employee-task-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.employee-task-priority.high {
  background: var(--red);
}

.employee-task-priority.medium {
  background: var(--amber);
}

.employee-task-priority.low {
  background: var(--text-faint);
}

.employee-task-content {
  flex: 1;
  min-width: 0;
}

.employee-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.employee-task-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.employee-task-project {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.employee-task-status {
  font-size: 10px;
  color: var(--text-faint);
}

/* Activity Items */
.employee-activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}

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

.employee-activity-icon {
  width: 24px;
  height: 24px;
  background: var(--bg-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.employee-activity-content {
  flex: 1;
  min-width: 0;
}

.employee-activity-action {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.employee-activity-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.employee-activity-time {
  font-size: 11px;
  color: var(--text-faint);
  flex-shrink: 0;
}

/* Persona Text */
.employee-persona-text {
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .employee-content-grid {
    grid-template-columns: 1fr;
  }
  
  .employee-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .employee-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .employee-header-actions {
    margin-top: var(--sp-4);
  }
}

@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Approvals Tab
   ============================================================ */

.approvals-container {
  padding: var(--sp-8);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.approvals-header {
  margin-bottom: var(--sp-6);
}

.approvals-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.approvals-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.approvals-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10) var(--sp-6);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.approvals-empty-icon {
  width: 64px;
  height: 64px;
  background: var(--green-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--green);
  margin-bottom: var(--sp-4);
}

.approvals-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.approvals-empty-text {
  font-size: 13px;
  color: var(--text-muted);
}

.approvals-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.approval-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  transition: border-color 0.15s;
}

.approval-card:hover {
  border-color: var(--text-faint);
}

.approval-card-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.approval-card-meta {
  flex: 1;
}

.approval-card-from {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.approval-card-time {
  font-size: 11px;
  color: var(--text-muted);
}

.approval-type-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.approval-type-badge.green { background: var(--green-dim); color: var(--green); }
.approval-type-badge.amber { background: var(--amber-dim); color: var(--amber); }
.approval-type-badge.blue { background: var(--blue-dim); color: var(--blue); }
.approval-type-badge.red { background: var(--red-dim); color: var(--red); }
.approval-type-badge.purple { background: var(--purple-dim); color: var(--purple); }

.approval-card-body {
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
}

.approval-card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.approval-card-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.approval-card-amount {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
  margin-top: var(--sp-3);
}

.approval-card-actions {
  display: flex;
  gap: var(--sp-3);
}

.approval-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.approval-btn.approve {
  background: var(--green);
  color: white;
}

.approval-btn.approve:hover {
  background: #1ea550;
}

.approval-btn.reject {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.approval-btn.reject:hover {
  background: var(--red-dim);
  border-color: var(--red);
  color: var(--red);
}

.approval-btn.details {
  background: transparent;
  color: var(--text-muted);
  margin-left: auto;
}

.approval-btn.details:hover {
  color: var(--text-primary);
}

/* Approval History */
.approvals-history {
  margin-top: var(--sp-8);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.approvals-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-elevated);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.approvals-history-count {
  background: var(--bg-base);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
}

.approvals-history-list {
  padding: var(--sp-3);
}

.approval-history-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--radius-md);
}

.approval-history-item:hover {
  background: var(--bg-hover);
}

.approval-history-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.approval-history-title {
  font-size: 13px;
  color: var(--text-secondary);
}

.approval-history-status {
  font-size: 11px;
  font-weight: 600;
}

.approval-history-status.approved { color: var(--green); }
.approval-history-status.rejected { color: var(--red); }

/* Approval Modal */
.approval-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 500px;
  max-width: 90vw;
}

.approval-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.approval-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.approval-modal-body {
  padding: var(--sp-6);
}

.approval-detail-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.approval-detail-row:last-child {
  border-bottom: none;
}

.approval-detail-label {
  width: 80px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  flex-shrink: 0;
}

.approval-detail-value {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.approval-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
}

/* ============================================================
   Ideas Tab
   ============================================================ */

.ideas-container {
  padding: var(--sp-8);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.ideas-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.ideas-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.ideas-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ideas-input-area {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.ideas-quick-input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}

.ideas-quick-input:focus {
  outline: none;
  border-color: var(--accent);
}

.ideas-quick-input::placeholder {
  color: var(--text-faint);
}

.ideas-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10) var(--sp-6);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.ideas-empty-icon {
  font-size: 48px;
  margin-bottom: var(--sp-4);
}

.ideas-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.ideas-empty-text {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 300px;
}

.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.idea-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
}

.idea-card:hover {
  border-color: var(--text-faint);
  transform: translateY(-2px);
}

.idea-card-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.idea-icon {
  font-size: 18px;
}

.idea-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.idea-category.amber { background: var(--amber-dim); color: var(--amber); }
.idea-category.green { background: var(--green-dim); color: var(--green); }
.idea-category.blue { background: var(--blue-dim); color: var(--blue); }
.idea-category.purple { background: var(--purple-dim); color: var(--purple); }
.idea-category.muted { background: var(--bg-elevated); color: var(--text-muted); }

.idea-priority {
  margin-left: auto;
  font-size: 14px;
}

.idea-priority.high { color: var(--amber); }

.idea-card-body {
  flex: 1;
  margin-bottom: var(--sp-4);
}

.idea-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  line-height: 1.4;
}

.idea-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.idea-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-subtle);
}

.idea-date {
  font-size: 11px;
  color: var(--text-faint);
}

.idea-votes {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

.idea-card-new {
  background: transparent;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}

.idea-card-new:hover {
  border-color: var(--text-muted);
  background: var(--bg-surface);
}

.idea-card-new-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.idea-card-new-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
}

.idea-card-new-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* Idea Modal */
.idea-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 500px;
  max-width: 90vw;
}

.idea-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.idea-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.idea-modal-body {
  padding: var(--sp-6);
}

.idea-detail-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.idea-detail-date {
  font-size: 12px;
  color: var(--text-muted);
}

.idea-detail-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
}

.idea-detail-notes {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
}

.idea-detail-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.idea-modal-footer {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
}

/* ============================================================
   Trading Dashboard
   ============================================================ */

.trading-container {
  padding: var(--sp-8);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.trading-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.trading-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.trading-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Bot Status Indicators */
.trading-bots-status {
  display: flex;
  gap: var(--sp-3);
}

.bot-status {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 11px;
}

.bot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.bot-status.online .bot-status-dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.bot-status.offline .bot-status-dot {
  background: var(--red);
  animation: none;
}

.bot-status-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.bot-status-label {
  font-weight: 700;
  letter-spacing: 0.05em;
}

.bot-status.online .bot-status-label {
  color: var(--green);
}

.bot-status.offline .bot-status-label {
  color: var(--red);
}

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

/* Stats Grid */
.trading-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

@media (max-width: 1200px) {
  .trading-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .trading-stats-grid {
    grid-template-columns: 1fr;
  }
}

.trading-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  transition: border-color 0.15s;
}

.trading-stat-card:hover {
  border-color: var(--text-faint);
}

.trading-stat-card.trading-stat-primary {
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(249, 115, 22, 0.08) 100%);
  border-color: rgba(249, 115, 22, 0.3);
}

.trading-stat-card.trading-stat-positive .trading-stat-value {
  color: var(--green);
}

.trading-stat-card.trading-stat-negative .trading-stat-value {
  color: var(--red);
}

.trading-stat-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.trading-stat-content {
  flex: 1;
  min-width: 0;
}

.trading-stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}

.trading-stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-1);
}

.trading-stat-value.green { color: var(--green); }
.trading-stat-value.red { color: var(--red); }

.trading-stat-meta {
  font-size: 11px;
  color: var(--text-faint);
}

/* Content Grid */
.trading-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}

@media (max-width: 1000px) {
  .trading-content-grid {
    grid-template-columns: 1fr;
  }
}

.trading-column {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* Chart Legend */
.trading-chart-legend {
  display: flex;
  gap: var(--sp-4);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 11px;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.green { background: var(--green); }
.legend-dot.red { background: var(--red); }

/* P&L Chart */
.trading-chart {
  padding: var(--sp-4);
}

.chart-empty {
  text-align: center;
  padding: var(--sp-8);
  color: var(--text-muted);
  font-size: 12px;
}

.chart-bars-container {
  position: relative;
  width: 100%;
}

.chart-baseline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  height: 100%;
  position: relative;
}

.chart-bar {
  flex: 1;
  min-width: 4px;
  max-width: 16px;
  position: absolute;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.chart-bar:hover {
  opacity: 1 !important;
}

.trading-chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-faint);
  padding: var(--sp-2) var(--sp-4) 0;
}

/* Strategy Breakdown */
.strategy-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}

.strategy-row:last-child {
  border-bottom: none;
}

.strategy-info {
  width: 100px;
  flex-shrink: 0;
}

.strategy-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.strategy-stats {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.strategy-bar-container {
  flex: 1;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.strategy-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.strategy-bar.positive { background: var(--green); }
.strategy-bar.negative { background: var(--red); }

.strategy-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 70px;
}

.strategy-winrate {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.strategy-pnl {
  font-size: 10px;
}

.strategy-pnl.green { color: var(--green); }
.strategy-pnl.red { color: var(--red); }

/* Position Cards */
.position-count {
  font-size: 11px;
  color: var(--text-muted);
}

.position-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}

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

.position-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.position-icon.btc {
  background: var(--amber-dim);
  color: var(--amber);
}

.position-icon.pm {
  background: var(--purple-dim);
  color: var(--purple);
}

.position-info {
  flex: 1;
}

.position-symbol {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.position-details {
  display: flex;
  gap: var(--sp-2);
  margin-top: 2px;
}

.position-side {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

.position-side.long {
  background: var(--green-dim);
  color: var(--green);
}

.position-side.short {
  background: var(--red-dim);
  color: var(--red);
}

.position-side.up {
  background: var(--green-dim);
  color: var(--green);
}

.position-side.down {
  background: var(--red-dim);
  color: var(--red);
}

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

.position-stats {
  text-align: right;
}

.position-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.position-regime {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-top: 2px;
  display: inline-block;
}

.position-regime.bullish { background: var(--green-dim); color: var(--green); }
.position-regime.bearish { background: var(--red-dim); color: var(--red); }
.position-regime.ranging { background: var(--amber-dim); color: var(--amber); }
.position-regime.neutral { background: var(--bg-elevated); color: var(--text-muted); }

.position-entry {
  font-size: 11px;
  color: var(--text-muted);
}

/* Trades List */
.trades-filter {
  display: flex;
  gap: var(--sp-1);
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.trades-list {
  max-height: 400px;
  overflow-y: auto;
}

.trade-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.15s;
}

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

.trade-item:hover {
  background: var(--bg-hover);
}

.trade-result {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.trade-result.win {
  background: var(--green-dim);
  color: var(--green);
}

.trade-result.loss {
  background: var(--red-dim);
  color: var(--red);
}

.trade-info {
  flex: 1;
  min-width: 0;
}

.trade-strategy {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.trade-direction {
  font-size: 10px;
  font-weight: 700;
  margin-left: var(--sp-1);
}

.trade-direction.up { color: var(--green); }
.trade-direction.down { color: var(--red); }

.trade-meta {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 1px;
}

.trade-profit {
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.trade-profit.positive { color: var(--green); }
.trade-profit.negative { color: var(--red); }

/* Trading Sidebar Widgets */
.trading-widget-stats {
  margin-top: var(--sp-3);
}

.widget-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.widget-stat-row:last-child {
  border-bottom: none;
}

.widget-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.widget-stat-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.widget-stat-value.green { color: var(--green); }
.widget-stat-value.red { color: var(--red); }

.regime-badge {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
}

.regime-badge.bullish { background: var(--green-dim); color: var(--green); }
.regime-badge.bearish { background: var(--red-dim); color: var(--red); }
.regime-badge.ranging { background: var(--amber-dim); color: var(--amber); }

.signal-badge {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
}

.signal-badge.long { background: var(--green-dim); color: var(--green); }
.signal-badge.short { background: var(--red-dim); color: var(--red); }
.signal-badge.hold, .signal-badge.none { background: var(--bg-elevated); color: var(--text-muted); }

/* Activity Feed */
.trading-activity {
  margin-top: var(--sp-3);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  font-size: 11px;
}

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

.activity-dot.win { background: var(--green); }
.activity-dot.loss { background: var(--red); }

.activity-text {
  flex: 1;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-time {
  color: var(--text-faint);
  flex-shrink: 0;
}

/* Trade Detail Modal */
.trade-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 400px;
  max-width: 90vw;
  overflow: hidden;
}

.trade-modal-header {
  padding: var(--sp-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trade-modal-header.win {
  background: var(--green-dim);
}

.trade-modal-header.loss {
  background: var(--red-dim);
}

.trade-modal-result {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.trade-modal-header.win .trade-modal-result { color: var(--green); }
.trade-modal-header.loss .trade-modal-result { color: var(--red); }

.trade-modal-body {
  padding: var(--sp-5);
}

.trade-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.trade-detail-row:last-child {
  border-bottom: none;
}

.trade-detail-row.full {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
}

.trade-detail-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trade-detail-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.trade-detail-value.green { color: var(--green); }
.trade-detail-value.red { color: var(--red); }

.direction-badge {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 11px;
}

.direction-badge.up {
  background: var(--green-dim);
  color: var(--green);
}

.direction-badge.down {
  background: var(--red-dim);
  color: var(--red);
}

/* Responsive */
/* Utility: margin top large */
.mt-lg { margin-top: var(--sp-6); }

/* ============================================================
   Inbox Tab (Redesigned)
   ============================================================ */

.inbox-container-new {
  padding: var(--sp-8);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.inbox-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.inbox-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.inbox-subtitle-new {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.inbox-stats {
  display: flex;
  gap: var(--sp-4);
}

.inbox-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 70px;
}

.inbox-stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.inbox-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inbox-capture-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-6);
  overflow: hidden;
}

.inbox-capture-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-elevated);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.inbox-capture-icon {
  font-size: 16px;
}

.inbox-capture-body {
  padding: var(--sp-5);
}

.inbox-capture-input {
  width: 100%;
  min-height: 80px;
  padding: var(--sp-3);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.inbox-capture-input:focus {
  outline: none;
  border-color: var(--accent);
}

.inbox-capture-input::placeholder {
  color: var(--text-faint);
}

.inbox-capture-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-3);
}

.inbox-capture-hint {
  font-size: 11px;
  color: var(--text-faint);
}

.inbox-section {
  margin-bottom: var(--sp-6);
}

.inbox-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.inbox-section-count {
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  color: var(--text-muted);
}

.inbox-empty-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10) var(--sp-6);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.inbox-empty-icon-new {
  font-size: 40px;
  margin-bottom: var(--sp-3);
}

.inbox-empty-title-new {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.inbox-empty-text-new {
  font-size: 13px;
  color: var(--text-muted);
}

.inbox-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.inbox-item-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s;
}

.inbox-item-card:hover {
  border-color: var(--text-faint);
}

.inbox-item-main {
  flex: 1;
  min-width: 0;
}

.inbox-item-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: var(--sp-1);
}

.inbox-item-time {
  font-size: 11px;
  color: var(--text-faint);
}

.inbox-item-actions-new {
  display: flex;
  gap: var(--sp-1);
  flex-shrink: 0;
}

.inbox-action-btn-new {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.inbox-action-btn-new:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-faint);
}

.inbox-action-btn-new.delete:hover {
  background: var(--red-dim);
  color: var(--red);
  border-color: var(--red);
}

.inbox-section.processed {
  opacity: 0.7;
}

.inbox-clear-btn {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
}

.inbox-clear-btn:hover {
  color: var(--text-primary);
}

.inbox-processed-list {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.inbox-processed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
}

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

.inbox-processed-text {
  font-size: 13px;
  color: var(--text-muted);
}

.inbox-processed-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-dim);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

/* ============================================================
   Settings Tab (Redesigned)
   ============================================================ */

.settings-container-new {
  padding: var(--sp-8);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.settings-header {
  margin-bottom: var(--sp-6);
}

.settings-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.settings-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-5);
}

.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.settings-card.full-width {
  grid-column: 1 / -1;
}

.settings-card.stats {
  grid-column: 1 / -1;
}

.settings-card.danger {
  border-color: var(--red);
  border-style: dashed;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.settings-card-icon {
  font-size: 16px;
}

.settings-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-card-body {
  padding: var(--sp-5);
}

.settings-card-description {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

.settings-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-5);
}

.settings-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-4);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.settings-stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

.settings-button-row {
  display: flex;
  gap: var(--sp-3);
}

.settings-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-option-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-option-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.settings-option-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: 0.3s;
}

.settings-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: 0.3s;
}

.settings-toggle input:checked + .settings-toggle-slider {
  background-color: var(--accent);
  border-color: var(--accent);
}

.settings-toggle input:checked + .settings-toggle-slider:before {
  transform: translateX(20px);
  background-color: white;
}

.settings-office-textarea {
  width: 100%;
  min-height: 300px;
  padding: var(--sp-4);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.settings-office-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
