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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-hover: #1a1a28;
  --bg-sidebar: #0d0d14;
  --border: #1e1e2e;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #a855f7;
  --orange: #f97316;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 24px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}

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

.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
}

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

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

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

.user-name {
  font-size: 14px;
  font-weight: 600;
}

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

/* ===== MAIN ===== */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

.header-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  max-width: 480px;
}

.header-search svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.header-search input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.header-search input::placeholder {
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: all 0.15s;
}

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

.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--red);
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ===== CONTENT ===== */
.content {
  flex: 1;
  padding: 32px;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

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

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
}

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

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.stat-icon.green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.15); color: var(--orange); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  display: block;
}

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

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

/* ===== TASK LIST MINI ===== */
.task-list-mini {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

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

.task-dot.green { background: var(--green); }
.task-dot.yellow { background: var(--yellow); }
.task-dot.red { background: var(--red); }
.task-dot.blue { background: var(--blue); }

.task-tag {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ===== ACTIVITY ===== */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.activity-avatar {
  width: 32px;
  height: 32px;
  background: var(--bg-hover);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.activity-text {
  font-size: 14px;
  line-height: 1.5;
}

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

/* ===== BUTTONS ===== */
.btn {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

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

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

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

.btn-full {
  width: 100%;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 18px;
  border-radius: 4px;
}

.btn-icon:hover {
  background: var(--bg-hover);
}

/* ===== FILTERS ===== */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.filter-tab {
  padding: 6px 14px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.filter-tab:hover {
  color: var(--text);
}

.filter-tab.active {
  background: var(--primary);
  color: white;
}

.filter-search {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  width: 240px;
}

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

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

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

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.data-table tr:hover td {
  background: var(--bg-hover);
}

.contact-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-xs {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  flex-shrink: 0;
}

.badge-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-tag.blogger { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.badge-tag.investor { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-tag.partner { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-tag.marketing { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.badge-tag.content { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.badge-tag.outreach { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-tag.dev { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-tag.strategy { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.badge-tag.urgent { background: rgba(239, 68, 68, 0.15); color: var(--red); }

.social-badge {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 3px 8px;
  border-radius: 4px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.active { background: var(--green); }
.status-dot.pending { background: var(--yellow); }

/* ===== KANBAN ===== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  min-height: calc(100vh - 260px);
}

.kanban-column {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.kanban-column .kanban-cards {
  flex: 1;
}

.kanban-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.kanban-header h4 {
  font-size: 14px;
  font-weight: 600;
}

.kanban-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.kanban-dot.backlog { background: var(--text-muted); }
.kanban-dot.progress { background: var(--blue); }
.kanban-dot.review { background: var(--yellow); }
.kanban-dot.done { background: var(--green); }

.kanban-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 10px;
}

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

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

.kanban-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kanban-card.highlight {
  border-color: var(--orange);
  border-width: 1px;
}

.kanban-card.completed {
  opacity: 0.5;
}

.kanban-card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

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

/* ===== STRATEGY ===== */
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.strategy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s;
}

.strategy-card:hover {
  border-color: var(--primary);
}

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

.strategy-status {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
}

.strategy-status.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.strategy-status.draft {
  background: rgba(113, 113, 122, 0.15);
  color: var(--text-muted);
}

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

.strategy-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.strategy-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.strategy-metrics {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

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

.metric-value {
  font-size: 20px;
  font-weight: 700;
}

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

.strategy-team {
  display: flex;
  gap: 4px;
}

/* ===== REPORTS ===== */
#reports-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

#reports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-report-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.video-report-item:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-thumb {
  width: 120px;
  height: 80px;
  background: var(--bg-hover);
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
}

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

.video-report-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-report-stats {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.video-report-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.video-report-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ===== CHAT ===== */
/* ===== CHAT (Claude-style) ===== */
.chat-layout {
  display: flex;
  height: calc(100vh - 130px);
  margin: -32px;
  margin-top: -28px;
}

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

.chat-sidebar-top {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.chat-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.chat-search-wrap svg { color: var(--text-muted); flex-shrink: 0; }

.chat-search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

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

.chat-history {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 8px;
  flex: 1;
}

.chat-history-group {
  margin-bottom: 8px;
}

.chat-history-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px 4px;
}

.chat-history-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.chat-history-item.active {
  background: rgba(99, 102, 241, 0.12);
}

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

.chat-history-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.chat-history-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.chat-history-item:hover .chat-history-actions {
  opacity: 1;
}

.chat-history-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

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

.chat-history-action-btn.delete:hover {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}

.chat-history-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Welcome screen */
.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  text-align: center;
}

.chat-welcome-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-welcome h2 {
  font-size: 24px;
  margin: 0;
}

.chat-welcome p {
  margin: 0;
  font-size: 14px;
}

.chat-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  max-width: 500px;
}

.chat-suggestion-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.chat-suggestion-btn:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

/* Messages */
.chat-message {
  display: flex;
  gap: 14px;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

.chat-message.assistant .chat-avatar {
  background: linear-gradient(135deg, var(--primary), var(--purple));
}

.chat-message.user .chat-avatar {
  background: linear-gradient(135deg, var(--blue), var(--primary));
}

.chat-bubble {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.chat-message.user .chat-bubble {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.chat-bubble p { margin: 0 0 12px; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-bubble ol, .chat-bubble ul { margin: 8px 0; padding-left: 20px; }
.chat-bubble li { margin-bottom: 6px; }
.chat-bubble strong { color: var(--text); }
.chat-bubble code { background: var(--bg-card); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.chat-bubble pre { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; margin: 12px 0; }
.chat-bubble pre code { background: none; padding: 0; }
.chat-bubble h2, .chat-bubble h3, .chat-bubble h4 { margin: 16px 0 8px; }

/* Message actions (copy button) */
.chat-msg-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}

.chat-message:hover .chat-msg-actions {
  opacity: 1;
}

.chat-msg-action-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.chat-msg-action-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--bg-card);
}

.chat-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.chat-typing::after {
  content: '';
  width: 6px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
  animation: blink 0.8s infinite;
}

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

.chat-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
}

/* Input area */
.chat-input-area {
  padding: 16px 32px 24px;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  transition: border-color 0.2s;
}

.chat-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.chat-input-wrap textarea {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  line-height: 1.5;
  padding: 4px 0;
  max-height: 120px;
}

.chat-input-wrap textarea::placeholder {
  color: var(--text-muted);
}

.btn-send-claude {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-send-claude:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.btn-send-claude:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-hint {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stats-grid, .reports-summary {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .content {
    padding: 20px;
  }

  .stats-grid, .reports-summary {
    grid-template-columns: 1fr;
  }

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

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-search {
    width: 100%;
  }

  .video-report-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-report-stats {
    flex-direction: column;
    gap: 4px;
  }

  .chat-layout {
    flex-direction: column;
  }

  .chat-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 250px;
  }

  .chat-suggestions {
    grid-template-columns: 1fr;
  }

  .chat-input-area {
    padding: 12px 16px 16px;
  }
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* ===== LOGIN SCREEN ===== */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100vw;
  background: var(--bg);
}

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

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 8px;
}

.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.login-error {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
}

.login-card .form-group {
  margin-bottom: 16px;
}

.login-card .btn-full {
  margin-top: 8px;
  padding: 12px;
  font-size: 15px;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

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

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

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 0;
}

.form-row .form-group {
  margin-bottom: 0;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

.modal-lg {
  max-width: 780px;
}

.modal-sm {
  max-width: 400px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

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

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

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

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: white;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

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

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

/* ===== DANGER BUTTON ===== */
.btn-danger {
  background: var(--red);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.btn-danger:hover {
  background: #dc2626;
}

/* ===== SMALL BUTTONS ===== */
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}

.btn-start { background: var(--green); color: white; }
.btn-stop { background: var(--red); color: white; }

/* ===== NAV BADGE ===== */
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 16px 12px 6px;
  font-weight: 600;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

/* ===== SIDEBAR FOOTER WITH LOGOUT ===== */
.sidebar-footer {
  position: relative;
}

.sidebar-footer .btn-icon {
  margin-left: auto;
}

/* ===== HEADER RIGHT ACTIONS ===== */
.header-right-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ===== TEAM CARDS ===== */
.team-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.team-member-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s;
}

.team-member-card.online {
  border-color: var(--green);
}

.member-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.member-avatar {
  background: linear-gradient(135deg, var(--primary), var(--purple));
}

.member-info {
  flex: 1;
}

.member-name {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.member-name.add-member {
  color: var(--text-muted);
  cursor: pointer;
}

.member-role-tag {
  font-size: 12px;
  color: var(--text-muted);
}

.online-badge, .offline-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.online-badge {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.offline-badge {
  background: rgba(113, 113, 122, 0.15);
  color: var(--text-muted);
}

.member-timer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.timer-value {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex: 1;
}

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

.member-stats-row {
  display: flex;
  gap: 16px;
}

.member-stat {
  flex: 1;
  text-align: center;
}

.member-stat-val {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

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

/* ===== TEAM SUMMARY ===== */
.team-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* ===== CHART ===== */
.chart-container {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 200px;
  padding-bottom: 32px;
  position: relative;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  position: relative;
}

.chart-bar-group.today {
  background: rgba(99, 102, 241, 0.05);
  border-radius: var(--radius-sm);
}

.chart-day {
  position: absolute;
  bottom: -24px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.chart-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  flex: 1;
  width: 100%;
  padding: 0 4px;
}

.chart-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
}

.chart-bar.akyl { background: var(--primary); }
.chart-bar.lujan { background: var(--green); }
.chart-bar.nurdos { background: var(--orange); }

.chart-bar.active-bar {
  animation: pulse-bar 2s ease-in-out infinite;
}

@keyframes pulse-bar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot.akyl { background: var(--primary); }
.legend-dot.lujan { background: var(--green); }
.legend-dot.nurdos { background: var(--orange); }

/* ===== CALENDAR ===== */
.cal-month-label {
  font-size: 18px;
  font-weight: 600;
  min-width: 160px;
  text-align: center;
}

.pipeline-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.pipeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.pipeline-dot.idea { background: var(--yellow); }
.pipeline-dot.filming { background: var(--blue); }
.pipeline-dot.editing { background: var(--purple); }
.pipeline-dot.published { background: var(--green); }

.pipeline-arrow {
  color: var(--text-muted);
  font-size: 16px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal-header {
  background: var(--bg-card);
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cal-day {
  background: var(--bg-card);
  padding: 8px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cal-day.today {
  background: rgba(99, 102, 241, 0.08);
}

.cal-day.past {
  opacity: 0.6;
}

.cal-day.weekend {
  background: rgba(113, 113, 122, 0.05);
}

.cal-day.next-month {
  opacity: 0.3;
}

.cal-date {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cal-post {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-post.idea { background: rgba(234, 179, 8, 0.15); border-left: 3px solid var(--yellow); }
.cal-post.filming { background: rgba(59, 130, 246, 0.15); border-left: 3px solid var(--blue); }
.cal-post.editing { background: rgba(168, 85, 247, 0.15); border-left: 3px solid var(--purple); }
.cal-post.published { background: rgba(34, 197, 94, 0.15); border-left: 3px solid var(--green); }

.cal-post-platform {
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cal-post-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.script-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.script-card:hover {
  border-color: var(--primary);
}

.script-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

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

.script-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.script-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.script-preview {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.script-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.script-tag {
  font-size: 11px;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.script-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== WIKI ===== */
.wiki-layout {
  display: flex;
  gap: 24px;
  min-height: 500px;
}

.wiki-sidebar-nav {
  width: 240px;
  flex-shrink: 0;
}

.wiki-category {
  margin-bottom: 20px;
}

.wiki-cat-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.wiki-link {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.wiki-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.wiki-link.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
}

.wiki-content {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.wiki-article-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.wiki-article-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.wiki-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.wiki-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 10px;
}

.wiki-body p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.wiki-body ul, .wiki-body ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.wiki-body li {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 4px;
}

.wiki-body code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.wiki-body pre {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 12px;
}

.wiki-example {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.wiki-example.good {
  background: rgba(34, 197, 94, 0.08);
  border-left: 3px solid var(--green);
}

.wiki-example.bad {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid var(--red);
}

.wiki-example-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

/* ===== FILES ===== */
.files-breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
}

.breadcrumb-item {
  color: var(--text-muted);
  cursor: pointer;
}

.breadcrumb-item.active {
  color: var(--text);
  font-weight: 500;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.file-folder, .file-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.file-folder:hover, .file-item:hover {
  border-color: var(--primary);
}

.folder-icon svg {
  width: 40px;
  height: 40px;
}

.file-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.file-icon.img { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.file-icon.vid { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.file-icon.doc { background: rgba(249, 115, 22, 0.15); color: var(--orange); }

.file-name {
  font-size: 13px;
  font-weight: 500;
  word-break: break-all;
}

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

/* ===== FINANCE ===== */
.finance-breakdown {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.finance-cat {
  width: 140px;
  font-size: 13px;
  flex-shrink: 0;
}

.finance-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}

.finance-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.finance-amount {
  font-size: 14px;
  font-weight: 600;
  min-width: 80px;
  text-align: right;
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

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

.transaction-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transaction-icon.income { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.transaction-icon.expense { background: rgba(239, 68, 68, 0.15); color: var(--red); }

.transaction-info {
  flex: 1;
}

.transaction-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.transaction-date {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.transaction-amount {
  font-size: 15px;
  font-weight: 600;
}

.transaction-amount.income { color: var(--green); }
.transaction-amount.expense { color: var(--red); }

/* ===== NOTIFICATIONS ===== */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  align-items: flex-start;
}

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

.notif-item.unread {
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid var(--primary);
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon.task-icon { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.notif-icon.contact-icon { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.notif-icon.team-icon { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.notif-icon.money-icon { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.notif-icon.ai-icon { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.notif-icon.calendar-icon { background: rgba(234, 179, 8, 0.15); color: var(--yellow); }
.notif-icon.warning-icon { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.notif-icon.info-icon { background: rgba(59, 130, 246, 0.15); color: var(--blue); }

.notif-content {
  flex: 1;
}

.notif-content p {
  font-size: 14px;
  line-height: 1.5;
}

.notif-time {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== PLATFORMS ===== */
.platform-section {
  margin-bottom: 32px;
}

.platform-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 13px;
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s;
  cursor: pointer;
}

.platform-card:hover {
  border-color: var(--primary);
}

.platform-card.connected {
  border-color: rgba(34, 197, 94, 0.3);
}

.platform-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.platform-info {
  margin-bottom: 8px;
}

.platform-name {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.platform-desc {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

.platform-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.platform-status.connected {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.platform-status.inactive {
  background: rgba(113, 113, 122, 0.15);
  color: var(--text-muted);
}

.platform-details {
  margin-bottom: 8px;
}

.platform-details span {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

.platform-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.platform-costs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.cost-row.total {
  border-bottom: none;
  border-top: 2px solid var(--border);
  padding-top: 12px;
  font-weight: 700;
}

.cost-name {
  font-size: 14px;
}

.cost-amount {
  font-size: 14px;
  font-weight: 600;
}

/* ===== STATUS DOT VARIANTS ===== */
.status-dot.inactive { background: var(--text-muted); }
.status-dot.closed { background: var(--red); }
.status-dot.negotiation { background: var(--yellow); }
.status-dot.archived { background: var(--text-muted); opacity: 0.5; }

/* ===== BADGE TAG VARIANTS ===== */
.badge-tag.client { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.badge-tag.super_admin { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.badge-tag.admin { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.badge-tag.member { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-tag.viewer { background: rgba(113, 113, 122, 0.15); color: var(--text-muted); }

/* ===== STRATEGY STATUS VARIANTS ===== */
.strategy-status.completed {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
}

.strategy-status.archived {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

/* ===== TEXT HELPERS ===== */
.text-muted {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== TASK DETAIL OVERLAY ===== */
#task-detail-overlay .modal-lg {
  max-width: 680px;
}

.task-detail-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.task-detail-content .form-group label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.task-detail-content .form-group select,
.task-detail-content .form-group input,
.task-detail-content .form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}

.task-detail-content .form-group select:focus,
.task-detail-content .form-group input:focus,
.task-detail-content .form-group textarea:focus {
  border-color: var(--primary);
}

.task-detail-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

.task-detail-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.task-detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

/* Subtasks */
.subtask-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

.subtask-check {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.subtask-item span {
  flex: 1;
}

.subtask-del-btn {
  opacity: 0;
  transition: opacity 0.15s;
  padding: 2px 8px !important;
  font-size: 14px !important;
}

.subtask-item:hover .subtask-del-btn {
  opacity: 1;
}

/* Comments */
.comment-item {
  padding: 12px 16px !important;
  margin-bottom: 8px;
  background: var(--bg-card) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.comment-item p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* Attachments */
.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.attachment-item a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
}

.attachment-item a:hover {
  color: var(--primary-hover);
}

/* Task detail action buttons */
.task-detail-content > .btn-primary {
  align-self: flex-start;
  padding: 10px 24px;
}

.task-detail-content > .btn-danger {
  align-self: flex-start;
  margin-top: 8px;
}

/* Subtask / comment input row */
.task-detail-section .form-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.task-detail-section .form-row input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.task-detail-section .form-row input:focus {
  border-color: var(--primary);
}

.task-detail-section .form-row .btn {
  flex-shrink: 0;
}

/* Kanban card improvements */
.kanban-card {
  position: relative;
}

.kanban-card-tags .badge-tag {
  font-size: 11px;
  padding: 2px 8px;
}

.kanban-card-footer .avatar-xs {
  width: 22px;
  height: 22px;
  font-size: 9px;
}

/* ===== DRAG AND DROP ===== */
.kanban-card.dragging {
  opacity: 0.4;
  transform: rotate(2deg);
}

.kanban-column.drag-over {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--primary);
}

.kanban-cards.drag-over {
  min-height: 60px;
  border: 2px dashed var(--primary);
  border-radius: var(--radius-sm);
}

/* ===== CHAT STREAMING ===== */
.chat-typing {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--primary);
  animation: blink-cursor 0.8s infinite;
  vertical-align: middle;
  margin-left: 2px;
}

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

.chat-bubble code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.chat-bubble pre {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 8px 0;
}

.chat-bubble ol, .chat-bubble ul {
  padding-left: 20px;
  margin: 8px 0;
}

.chat-bubble li {
  margin-bottom: 4px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 15px;
  margin-bottom: 16px;
}

/* ===== UPLOAD PROGRESS ===== */
.upload-progress {
  width: 100%;
  height: 4px;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.upload-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ADDITIONS ===== */
@media (max-width: 768px) {
  .login-card {
    margin: 16px;
    padding: 32px 24px;
  }

  .team-status-grid {
    grid-template-columns: 1fr;
  }

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

  .wiki-layout {
    flex-direction: column;
  }

  .wiki-sidebar-nav {
    width: 100%;
  }

  .platforms-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
    margin: 16px;
  }

  .header-right-actions {
    flex-wrap: wrap;
  }

  .form-row {
    flex-direction: column;
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .contacts-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .contact-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .contact-funnel {
    flex-wrap: wrap;
  }
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.view-toggle-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.view-toggle-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ===== CONTACTS CARDS GRID ===== */
.contacts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 4px 0;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.contact-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

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

.contact-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.contact-card-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.contact-card-company {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.contact-card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.contact-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.contact-card-niches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.contact-niche-tag {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

/* ===== DEAL STAGE BADGES ===== */
.deal-stage-badge {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.stage-new {
  background: rgba(113, 113, 122, 0.2);
  color: #a1a1aa;
}

.stage-contacted {
  background: rgba(59, 130, 246, 0.2);
  color: var(--blue);
}

.stage-responded {
  background: rgba(234, 179, 8, 0.2);
  color: var(--yellow);
}

.stage-meeting {
  background: rgba(168, 85, 247, 0.2);
  color: var(--purple);
}

.stage-contract {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
}

.stage-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red);
}

/* ===== CONTACT DETAIL VIEW ===== */
.contact-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.contact-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-detail-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.contact-detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  flex-shrink: 0;
}

.contact-detail-info {
  flex: 1;
}

.contact-detail-info h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.contact-detail-sub {
  color: var(--text-muted);
  font-size: 14px;
}

.contact-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.contact-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-detail-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-detail-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

.contact-detail-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.contact-detail-section h3 {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--text);
}

/* ===== FUNNEL ===== */
.contact-funnel {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 0;
}

.funnel-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.funnel-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 3px solid var(--border);
  transition: all 0.3s;
}

.funnel-step.active .funnel-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.funnel-step.rejected .funnel-dot {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.funnel-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.funnel-step.active .funnel-label {
  color: var(--primary);
  font-weight: 600;
}

.funnel-step.rejected .funnel-label {
  color: var(--red);
  font-weight: 600;
}

.funnel-line {
  flex: 1;
  height: 3px;
  background: var(--border);
  min-width: 20px;
  margin-bottom: 24px;
}

/* ===== INTERACTION HISTORY ===== */
.interaction-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interaction-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.interaction-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.interaction-content {
  flex: 1;
}

.interaction-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.interaction-note {
  font-size: 14px;
  color: var(--text);
}

.contact-notes-box {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
