/* ===== CEO Cockpit - Page Specific Styles ===== */
/* Uses brand CSS (base.css + components.css) */

/* Additional CEO-specific variables */
:root {
  /* Meter/Progress colors */
  --meter-green: #10b981;
  --meter-blue: #3b82f6;
  --meter-orange: #f59e0b;
  --meter-cyan: #06b6d4;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: var(--text-primary);
  background: rgba(211, 47, 47, 0.15);
  border-bottom: 2px solid var(--brand-primary);
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

#user-name {
  color: var(--text-secondary);
  font-size: 14px;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ===== Main Content ===== */
.main-content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 32px;
}

.section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

/* ===== Grid Layout ===== */
.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1400px) {
  .grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .grid-3col {
    grid-template-columns: 1fr;
  }
}

/* ===== Card Styles ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* ===== Chat Interface ===== */
/* Chat styling moved to chatbot.css for reusability */

/* ===== Notes Card ===== */
.notes-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.note-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.note-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--info);
  transform: translateX(4px);
}

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

.note-content {
  flex: 1;
}

.note-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.note-preview {
  font-size: 13px;
  color: var(--text-secondary);
}

.note-item {
  cursor: pointer;
}

.note-expanded {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.note-detail {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 6px 0;
  padding-left: 8px;
}

/* ===== News Card ===== */
.news-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.news-item {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--info);
  border-radius: 6px;
}

.news-source {
  font-size: 12px;
  color: var(--info);
  font-weight: 600;
  margin-bottom: 6px;
}

.news-headline {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.news-summary {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-refresh {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* ===== KPI Cards ===== */
.kpi-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-icon {
  font-size: 28px;
}

.kpi-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-value-large {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* Progress Bar (matching UI_style.jpg) */
.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--meter-blue), var(--meter-cyan));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.progress-percent {
  color: var(--text-primary);
  font-weight: 600;
}

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

.kpi-target {
  margin-bottom: 16px;
}

.kpi-trend {
  font-size: 14px;
  font-weight: 500;
}

.kpi-trend.positive {
  color: var(--success);
}

.kpi-trend.negative {
  color: var(--error);
}

/* Cash Flow Metrics */
.cash-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.cash-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.cash-item.highlight {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
}

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

.cash-value {
  font-size: 18px;
  font-weight: 700;
}

.cash-value.positive {
  color: var(--success);
}

.cash-value.negative {
  color: var(--error);
}

/* Runway Meter (matching UI_style.jpg style) */
.runway-meter {
  margin-top: 16px;
}

.runway-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.runway-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--meter-blue), var(--meter-cyan));
  border-radius: 6px;
  transition: width 0.5s ease;
}

.runway-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.runway-value {
  color: var(--info);
  font-weight: 700;
  font-size: 16px;
}

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

/* Pipeline Stages (matching UI_style.jpg horizontal bars) */
.pipeline-stages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.pipeline-stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stage-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

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

.stage-count {
  color: var(--text-primary);
  font-weight: 700;
}

.stage-bar {
  height: 8px;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Win Rate Bar */
.pipeline-winrate {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.winrate-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.winrate-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), #34d399);
  border-radius: 3px;
  transition: width 0.5s ease;
}

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

.winrate-label strong {
  color: var(--success);
  font-size: 14px;
}

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

/* Emails */
.emails-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.email-item {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.email-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--info);
  transform: translateX(4px);
}

.email-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

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

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

.email-subject {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 14px;
}

.email-preview {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.email-ai {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid var(--info);
  border-radius: 4px;
  font-size: 12px;
}

.ai-icon {
  font-size: 14px;
}

.ai-insight {
  color: var(--info);
  font-weight: 500;
}

/* Calendar */
.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calendar-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.calendar-item.past {
  border-left: 3px solid var(--error);
}

.calendar-item.today {
  border-left: 3px solid var(--warning);
  background: rgba(245, 158, 11, 0.05);
}

.calendar-item.upcoming {
  border-left: 3px solid var(--info);
}

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

.calendar-content {
  flex: 1;
}

.calendar-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 14px;
}

.calendar-time {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.calendar-ai {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  font-size: 12px;
}

.calendar-item.past .ai-insight {
  color: var(--error);
}

.calendar-item.today .ai-insight {
  color: var(--warning);
}

.calendar-item.upcoming .ai-insight {
  color: var(--info);
}

/* Tasks */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s;
}

.task-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.task-item.high {
  border-left: 3px solid var(--error);
}

.task-item.medium {
  border-left: 3px solid var(--warning);
}

.task-item.low {
  border-left: 3px solid var(--info);
}

.task-checkbox {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.task-content {
  flex: 1;
  cursor: pointer;
}

.task-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 14px;
}

.task-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
}

.task-priority {
  font-weight: 500;
}

.task-item.high .task-priority {
  color: var(--error);
}

.task-item.medium .task-priority {
  color: var(--warning);
}

.task-item.low .task-priority {
  color: var(--info);
}

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

.btn-add-task {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-add-task:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--info);
  color: var(--text-primary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
