/* Redas Dashboard - Modern Redesign */
/* Inspired by CFO Silvia, Tailwind UI, Linear */

/* ============================================
   CSS Variables (Design Tokens)
   ============================================ */
:root {
  /* Colors */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-success: #22c55e;
  --color-success-light: #dcfce7;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #ef4444;
  --color-danger-light: #fee2e2;

  /* Backgrounds */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-header: #0f172a;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #f1f5f9;

  /* Borders */
  --border-color: #e2e8f0;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
}

/* Dark mode */
[data-theme="dark"] {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --bg-header: #0f172a;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
}

/* ============================================
   Base Styles
   ============================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Top Navigation Bar
   ============================================ */
.top-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0 var(--space-lg);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.nav-center {
  flex: 1;
  max-width: 400px;
  margin: 0 var(--space-lg);
}

.nav-search {
  width: 100%;
  padding: 10px 16px;
  padding-left: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  background: var(--bg-hover);
  color: var(--text-primary);
  transition: all 0.2s;
}

.nav-search:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.nav-search-wrapper {
  position: relative;
}

.nav-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

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

.nav-btn-text {
  width: auto;
  padding: 0 var(--space-md);
  gap: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  background: var(--color-danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  margin-left: var(--space-sm);
}

.user-dropdown {
  position: relative;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: var(--space-sm);
  display: none;
  z-index: 1000;
}

.user-dropdown-menu.show {
  display: block;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

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

.user-dropdown-item.danger {
  color: var(--color-danger);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-sm) 0;
}

/* ============================================
   Email Verification Banner
   ============================================ */
.verification-banner {
  background: linear-gradient(90deg, var(--color-warning-light) 0%, #fde68a 100%);
  border-bottom: 1px solid #fbbf24;
  padding: 12px var(--space-lg);
}

.verification-banner-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.875rem;
  color: #92400e;
}

.verification-banner svg {
  flex-shrink: 0;
  color: #d97706;
}

.verification-banner span {
  flex: 1;
}

.verification-banner .btn-resend-small {
  background: #d97706;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.verification-banner .btn-resend-small:hover {
  background: #b45309;
}

.verification-banner .btn-resend-small:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.verification-banner .btn-dismiss {
  background: none;
  border: none;
  color: #92400e;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.6;
  line-height: 1;
}

.verification-banner .btn-dismiss:hover {
  opacity: 1;
}

/* ============================================
   Main Layout Container
   ============================================ */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* ============================================
   Hero Stats Row
   ============================================ */
.stats-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.stat-card {
  flex: 1;
  min-width: 80px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-accent, var(--color-primary));
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  background: var(--stat-bg, var(--color-primary-light));
  color: var(--stat-color, var(--color-primary));
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  margin-top: var(--space-sm);
}

.stat-trend.up {
  color: var(--color-success);
}

.stat-trend.down {
  color: var(--color-danger);
}

/* Stat card color variants */
.stat-card.warning {
  --stat-accent: var(--color-warning);
  --stat-bg: var(--color-warning-light);
  --stat-color: #92400e;
}

.stat-card.danger {
  --stat-accent: var(--color-danger);
  --stat-bg: var(--color-danger-light);
  --stat-color: var(--color-danger);
}

.stat-card.success {
  --stat-accent: var(--color-success);
  --stat-bg: var(--color-success-light);
  --stat-color: #166534;
}

/* ============================================
   Main Content Grid (2 columns)
   ============================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-lg);
  align-items: start;
}

.content-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.content-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: sticky;
  top: calc(64px + var(--space-lg));
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

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

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-header-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.card-body {
  padding: 0;
}

.card-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-color);
  background: var(--bg-hover);
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0 8px;
}

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

.badge-success {
  background: var(--color-success-light);
  color: #166534;
}

.badge-warning {
  background: var(--color-warning-light);
  color: #92400e;
}

.badge-danger {
  background: var(--color-danger-light);
  color: #991b1b;
}

.badge-neutral {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* ============================================
   Your Redas Number Card
   ============================================ */
.phone-card {
  text-align: center;
  padding: var(--space-xl);
}

.phone-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.phone-number-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-lg);
  font-variant-numeric: tabular-nums;
}

.phone-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

/* ============================================
   Reliability Score Card
   ============================================ */
.reliability-card {
  padding: var(--space-lg);
}

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

.reliability-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.reliability-score-ring {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-lg);
  position: relative;
}

.reliability-score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.reliability-score-ring circle {
  fill: none;
  stroke-width: 8;
}

.reliability-score-ring .bg {
  stroke: var(--border-color);
}

.reliability-score-ring .progress {
  stroke: var(--color-success);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.reliability-score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.reliability-breakdown {
  display: flex;
  justify-content: space-around;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

.reliability-stat {
  text-align: center;
}

.reliability-stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.reliability-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.reliability-stat.clickable {
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  transition: background 0.2s, transform 0.2s;
}

.reliability-stat.clickable:hover {
  background: var(--bg-hover);
  transform: scale(1.05);
}

.reliability-stat.clickable:active {
  transform: scale(0.98);
}

/* Reliability subtitle */
.reliability-subtitle {
  font-size: 0.6875rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Their Reliability styling */
.their-reliability .reliability-score-ring .progress {
  stroke: var(--color-primary);
}

/* Names to Review Card */
.names-review-card {
  border-left: 4px solid var(--color-warning);
}

.names-review-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
}

.names-review-badge {
  background: var(--color-warning);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}

.names-review-label {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.names-review-link {
  font-size: 0.8125rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.names-review-link:hover {
  text-decoration: underline;
}

/* ============================================
   Quick Actions Card
   ============================================ */
.quick-actions {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--border-radius-sm);
  background: var(--bg-hover);
  border: 1px solid transparent;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.quick-action-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.quick-action-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.quick-action-btn.success .quick-action-icon {
  background: var(--color-success-light);
  color: #166534;
}

.quick-action-btn.warning .quick-action-icon {
  background: var(--color-warning-light);
  color: #92400e;
}

/* ============================================
   Commitment List Items
   ============================================ */
.commitment-list {
  max-height: 400px;
  overflow-y: auto;
}

.commitment-item {
  display: flex;
  align-items: flex-start;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  gap: var(--space-md);
  transition: background 0.2s;
}

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

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

.commitment-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-top: 2px;
}

.commitment-checkbox:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.commitment-checkbox.checked {
  background: var(--color-success);
  border-color: var(--color-success);
  color: white;
}

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

.commitment-what {
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-xs);
}

.commitment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.commitment-who {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.commitment-due {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.commitment-due.overdue {
  background: var(--color-danger-light);
  color: #991b1b;
}

.commitment-due.due-today {
  background: var(--color-warning-light);
  color: #92400e;
}

.commitment-actions {
  display: flex;
  gap: var(--space-xs);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.commitment-item:hover .commitment-actions {
  opacity: 1;
}

/* ============================================
   Action Buttons
   ============================================ */
.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-btn.complete {
  background: var(--color-success);
  color: white;
}

.action-btn.complete:hover {
  background: #16a34a;
}

.action-btn.missed {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.action-btn.missed:hover {
  background: var(--color-danger);
  color: white;
}

.action-btn.edit {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

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

.action-btn.draft {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

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

.action-btn.undo {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

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

/* ============================================
   Section Headers
   ============================================ */
.subsection-header {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-hover);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.subsection-header.unspecified {
  background: var(--color-warning-light);
  color: #92400e;
}

/* ============================================
   Attention Card (Priority)
   ============================================ */
.attention-card {
  border-left: 4px solid var(--color-danger);
}

.attention-card.no-issues {
  border-left-color: var(--color-success);
}

.attention-list {
  max-height: 200px;
  overflow-y: auto;
}

.attention-item {
  display: flex;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  gap: var(--space-md);
  transition: background 0.2s;
}

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

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

.attention-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.attention-icon.overdue {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.attention-icon.due-today {
  background: var(--color-warning-light);
  color: #92400e;
}

.attention-icon.at-risk {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

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

.attention-what {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attention-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ============================================
   Reliability Badge
   ============================================ */
.reliability-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}

.reliability-badge.good {
  background: var(--color-success-light);
  color: #166534;
}

.reliability-badge.medium {
  background: var(--color-warning-light);
  color: #92400e;
}

.reliability-badge.poor {
  background: var(--color-danger-light);
  color: #991b1b;
}

/* ============================================
   Completed Items
   ============================================ */
.completed-card {
  border-left: 4px solid var(--color-success);
}

.card-header.collapsible {
  cursor: pointer;
  user-select: none;
}

.card-header.collapsible:hover {
  background: var(--bg-hover);
}

.card-header .header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.collapse-icon {
  font-size: 0.6875rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.collapse-icon.expanded {
  transform: rotate(90deg);
}

.commitment-list.collapsed {
  display: none;
}

.completed-item {
  display: flex;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  gap: var(--space-md);
}

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

.completed-item .commitment-what {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Always show actions in completed items */
.completed-item .commitment-actions {
  opacity: 1;
}

/* Always show actions in missed items */
.missed-item .commitment-actions {
  opacity: 1;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.status-badge.on-time {
  background: var(--color-success-light);
  color: #166534;
}

.status-badge.late {
  background: var(--color-warning-light);
  color: #92400e;
}

.status-badge.missed {
  background: var(--color-danger-light);
  color: #991b1b;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.empty-state-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

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

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-full {
  width: 100%;
}

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

.modal.active,
.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content.modal-lg {
  max-width: 550px;
}

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

.modal-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

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

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

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-color);
}

/* ============================================
   Form Elements
   ============================================ */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

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

.form-row {
  display: flex;
  gap: var(--space-md);
}

.form-row .form-group {
  flex: 1;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ============================================
   Toast / Notifications
   ============================================ */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-header);
  color: white;
  padding: 12px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
  z-index: 1001;
  animation: slideUp 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast.success {
  background: var(--color-success);
}

.toast.error {
  background: var(--color-danger);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Undo Toast */
.undo-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-header);
  color: white;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  z-index: 1001;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  min-width: 300px;
  overflow: hidden;
}

.undo-message {
  flex: 1;
  font-size: 0.9375rem;
}

.undo-btn {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.undo-btn:hover {
  background: rgba(255,255,255,0.3);
}

.undo-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary);
  border-radius: 0 0 8px 8px;
  animation: shrink 5s linear forwards;
}

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

/* Copy Toast */
.copy-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-header);
  color: white;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
  z-index: 1002;
  animation: fadeInOut 1.5s ease;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================
   Floating Action Button
   ============================================ */
.fab-call {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-success) 0%, #16a34a 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 100;
}

.fab-call:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.5);
}

.fab-call:active {
  transform: scale(0.95);
}

/* ============================================
   Draft Modal Styles
   ============================================ */
.draft-type-selector {
  margin-bottom: var(--space-lg);
}

.draft-type-selector > label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.draft-type-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.draft-type-btn {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--bg-card);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.draft-type-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.draft-type-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.draft-type-btn[data-type="escalation"] {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.draft-type-btn[data-type="escalation"]:hover {
  background: var(--color-danger-light);
}

.draft-type-btn[data-type="escalation"].active {
  background: var(--color-danger);
  color: white;
}

.auto-select-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-primary);
  margin-left: var(--space-sm);
}

.draft-options {
  margin-bottom: var(--space-md);
}

.draft-result {
  margin-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-lg);
}

.draft-fields {
  margin-bottom: var(--space-md);
}

.draft-field {
  margin-bottom: var(--space-sm);
}

.draft-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.draft-field-value {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.draft-body-content {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: var(--space-md);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 250px;
  overflow-y: auto;
  font-family: inherit;
  margin: 0;
}

.draft-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.draft-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-2xl);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   Call Modal
   ============================================ */
#call-modal .modal-content {
  max-width: 420px;
}

#call-status {
  padding: 12px;
  border-radius: var(--border-radius-sm);
  margin-top: var(--space-md);
}

#call-status.success {
  background: var(--color-success-light);
  color: #166534;
}

#call-status.error {
  background: var(--color-danger-light);
  color: #991b1b;
}

#call-status.connecting {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border-color) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-number {
  height: 48px;
  width: 80px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .content-sidebar .card {
    flex: 1;
    min-width: 280px;
  }

  .stats-grid {
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1 1 calc(50% - var(--space-sm));
    min-width: 120px;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0 var(--space-md);
  }

  .nav-center {
    display: none;
  }

  .nav-btn-text span {
    display: none;
  }

  .nav-btn-text {
    width: 40px;
    padding: 0;
  }

  .dashboard-container {
    padding: var(--space-md);
  }

  .stats-grid {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .stat-card {
    flex: 1 1 calc(50% - var(--space-sm));
    min-width: 100px;
    padding: 10px;
  }

  .stat-number {
    font-size: 24px;
  }

  .stat-label {
    font-size: 10px;
  }

  .content-sidebar {
    flex-direction: column;
  }

  .content-sidebar .card {
    min-width: 100%;
  }

  .commitment-actions {
    opacity: 1;
    flex-wrap: wrap;
  }

  .fab-call {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1 1 calc(50% - var(--space-sm));
    min-width: 80px;
    padding: 8px;
  }

  .stat-number {
    font-size: 22px;
  }

  .stat-label {
    font-size: 9px;
  }

  .stat-icon {
    width: 24px;
    height: 24px;
  }

  .modal-content {
    margin: var(--space-sm);
    max-height: calc(100vh - var(--space-md));
  }
}

/* ============================================
   Tabs (Full View)
   ============================================ */
.tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
  overflow-x: auto;
}

.tab {
  background: none;
  border: none;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  white-space: nowrap;
}

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

.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================
   Filters Bar (Full View)
   ============================================ */
.filters {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  align-items: center;
}

.filters select,
.filters input[type="text"] {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  background: var(--bg-card);
  color: var(--text-primary);
  min-width: 150px;
  transition: all 0.2s;
}

.filters select:focus,
.filters input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}

/* ============================================
   Tables (Full View)
   ============================================ */
.table-container {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

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

th, td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-hover);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

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

.loading,
.empty {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-2xl) !important;
}

/* Table action buttons */
.actions {
  display: flex;
  gap: var(--space-xs);
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: var(--border-radius-sm);
}

.btn-success {
  background: var(--color-success);
  color: white;
  border: none;
}

.btn-success:hover {
  background: #16a34a;
}

.btn-success:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

.btn-danger {
  background: var(--color-danger);
  color: white;
  border: none;
}

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

/* Overdue row styling */
tr.overdue {
  background: var(--color-warning-light) !important;
}

tr.overdue:hover td {
  background: #fef3c7 !important;
}

/* ============================================
   Status Badges (Table)
   ============================================ */
.badge-open {
  background: var(--color-primary);
  color: white;
}

.badge-fulfilled {
  background: var(--color-success);
  color: white;
}

.badge-unfulfilled {
  background: var(--color-danger);
  color: white;
}

.badge-partial {
  background: var(--color-warning);
  color: #92400e;
}

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

.badge-medium {
  background: var(--color-warning);
  color: #92400e;
}

.badge-missed {
  background: var(--color-danger);
  color: white;
}

.badge-fulfilled_late {
  background: var(--color-warning);
  color: #92400e;
}

.badge-resolved {
  background: var(--color-success);
  color: white;
}

/* ============================================
   Calendar Notice (Full View)
   ============================================ */
.calendar-notice {
  text-align: center;
  padding: var(--space-2xl);
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.calendar-notice-icon {
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.calendar-notice h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.calendar-notice p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.calendar-email {
  background: var(--color-primary);
  color: white;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-danger-outline {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.btn-danger-outline:hover {
  background: var(--color-danger);
  color: white;
}

/* ============================================
   Reliability Score (Table)
   ============================================ */
.reliability-score {
  font-weight: 600;
}

.reliability-score.good {
  color: var(--color-success);
}

.reliability-score.medium {
  color: var(--color-warning);
}

.reliability-score.poor {
  color: var(--color-danger);
}

/* ============================================
   Meetings List (Full View)
   ============================================ */
.meetings-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.meeting-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.meeting-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.meeting-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border-color);
}

.meeting-card-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.meeting-card-date {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.meeting-card-stats {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.meeting-stat {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.meeting-stat-commitments {
  background: var(--color-primary);
  color: white;
}

.meeting-stat-risks {
  background: var(--color-danger);
  color: white;
}

.meeting-stat-decisions {
  background: var(--color-success);
  color: white;
}

.meeting-stat-open {
  background: var(--color-warning);
  color: #92400e;
}

.meeting-card-body {
  padding: var(--space-md) var(--space-lg);
}

.meeting-card-summary {
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.meeting-card-topics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.topic-tag {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ============================================
   Meeting Intelligence Modal
   ============================================ */
.modal-large {
  max-width: 700px;
}

.intel-section {
  margin-bottom: var(--space-lg);
}

.intel-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
}

.intel-section-icon {
  font-size: 1.125rem;
}

.intel-summary {
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.6;
  padding: var(--space-md);
  background: var(--bg-hover);
  border-radius: var(--border-radius-sm);
  border-left: 3px solid var(--color-primary);
}

.intel-topics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

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

.intel-list li {
  padding: var(--space-md);
  background: var(--bg-hover);
  margin-bottom: var(--space-sm);
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
}

.intel-list li:last-child {
  margin-bottom: 0;
}

.intel-commitment {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.intel-commitment-who {
  font-weight: 600;
  color: var(--text-primary);
}

.intel-commitment-what {
  color: var(--text-primary);
}

.intel-commitment-when {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.intel-risk {
  border-left: 3px solid var(--color-danger);
}

.intel-risk-high {
  border-left-color: var(--color-danger);
  background: var(--color-danger-light);
}

.intel-risk-medium {
  border-left-color: var(--color-warning);
  background: var(--color-warning-light);
}

.intel-decision {
  border-left: 3px solid var(--color-success);
}

.intel-open-item {
  border-left: 3px solid var(--color-warning);
}

.intel-gap {
  border-left: 3px solid #9333ea;
  background: #faf5ff;
}

.intel-meta {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.intel-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.intel-badge-category {
  background: var(--color-primary);
  color: white;
}

.intel-badge-severity-high {
  background: var(--color-danger);
  color: white;
}

.intel-badge-severity-medium {
  background: var(--color-warning);
  color: #92400e;
}

.intel-badge-severity-low {
  background: var(--color-success);
  color: white;
}

.intel-badge-urgency-high {
  background: var(--color-danger);
  color: white;
}

.intel-badge-urgency-medium {
  background: var(--color-warning);
  color: #92400e;
}

.intel-badge-urgency-low {
  background: var(--color-primary);
  color: white;
}

.intel-badge-priority-high {
  background: var(--color-danger);
  color: white;
}

.intel-badge-priority-medium {
  background: var(--color-warning);
  color: #92400e;
}

.intel-badge-priority-low {
  background: var(--color-success);
  color: white;
}

.intel-empty {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: var(--space-lg);
}

/* Transcript */
.transcript-content {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
  padding: var(--space-md);
  background: var(--bg-hover);
  border-radius: var(--border-radius-sm);
  margin: 0;
}

/* ============================================
   Notification Toast (Full View)
   ============================================ */
.notification {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius-sm);
  background: var(--bg-header);
  color: white;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  animation: slideUp 0.3s ease;
}

.notification-success {
  background: var(--color-success);
}

.notification-error {
  background: var(--color-danger);
}

.notification-warning {
  background: var(--color-warning);
  color: #92400e;
}

.notification.fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

/* ============================================
   Time Cell (Calendar Table)
   ============================================ */
.time-cell {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.time-main {
  font-weight: 500;
}

.time-until {
  font-size: 0.6875rem;
}

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

/* ============================================
   Legacy Compatibility (from style.css)
   ============================================ */
header {
  display: none;
}

/* Hide old header when new nav is present */
.top-nav ~ header {
  display: none;
}

/* Greeting bar legacy support */
.greeting-bar {
  display: none;
}

/* ============================================
   Sortable Table Headers
   ============================================ */
th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

th.sortable:hover {
  background: var(--bg-hover);
}

th.sortable.active {
  background: var(--bg-hover);
  color: var(--color-primary);
}

.sort-icon {
  display: inline-block;
  width: 1em;
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-primary);
  vertical-align: middle;
}

/* ============================================
   Commitment Row Colors (Due Date Based)
   ============================================ */
tr.row-overdue {
  background: #fef2f2 !important;
}

tr.row-overdue:hover td {
  background: #fee2e2 !important;
}

tr.row-due-today {
  background: #fefce8 !important;
}

tr.row-due-today:hover td {
  background: #fef9c3 !important;
}

tr.row-due-week {
  background: var(--bg-primary) !important;
}

tr.row-due-week:hover td {
  background: var(--bg-primary) !important;
}

tr.row-no-deadline {
  background: #f9fafb !important;
}

tr.row-no-deadline:hover td {
  background: #f3f4f6 !important;
}

/* Dark mode overrides for row colors */
.dark-mode tr.row-overdue {
  background: rgba(239, 68, 68, 0.15) !important;
}

.dark-mode tr.row-overdue:hover td {
  background: rgba(239, 68, 68, 0.25) !important;
}

.dark-mode tr.row-due-today {
  background: rgba(234, 179, 8, 0.15) !important;
}

.dark-mode tr.row-due-today:hover td {
  background: rgba(234, 179, 8, 0.25) !important;
}

.dark-mode tr.row-due-week {
  background: var(--bg-primary) !important;
}

.dark-mode tr.row-no-deadline {
  background: rgba(107, 114, 128, 0.1) !important;
}

.dark-mode tr.row-no-deadline:hover td {
  background: rgba(107, 114, 128, 0.2) !important;
}

/* ============================================
   Clickable Stat Cards (Full View)
   ============================================ */
.stat-card.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stat-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card.clickable.active {
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.stat-card.clickable.active.warning {
  border-color: var(--color-warning);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.stat-card.clickable.active.success {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.stat-card.clickable.active.danger {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* ============================================
   Missed Section (Dashboard)
   ============================================ */
.missed-card .card-header h2 {
  color: var(--color-danger);
}

.missed-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-md);
  border-bottom: 1px solid var(--bg-hover);
  background: rgba(239, 68, 68, 0.05);
}

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

.missed-item:hover {
  background: rgba(239, 68, 68, 0.1);
}

.action-btn.reopen {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

/* ============================================
   Direction Tracking - Company Labels
   ============================================ */
.company-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 400;
}

/* Fix table header and column alignment */
#commitments-table th,
#commitments-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 8px;
}

#commitments-table th {
  vertical-align: middle;
  white-space: nowrap;
}

/* Set consistent column widths */
#commitments-table th:nth-child(1),
#commitments-table td:nth-child(1) {
  width: 15%;
  min-width: 120px;
}

#commitments-table th:nth-child(2),
#commitments-table td:nth-child(2) {
  width: 15%;
  min-width: 120px;
}

#commitments-table th:nth-child(3),
#commitments-table td:nth-child(3) {
  width: 30%;
}

#commitments-table th:nth-child(4),
#commitments-table td:nth-child(4) {
  width: 10%;
  min-width: 80px;
}

#commitments-table th:nth-child(5),
#commitments-table td:nth-child(5) {
  width: 10%;
  min-width: 80px;
}

#commitments-table th:nth-child(6),
#commitments-table td:nth-child(6) {
  width: 20%;
  min-width: 150px;
}

/* ============================================
   Direction Tracking - Badges
   ============================================ */
.commitment-badges {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.badge-review {
  background: var(--color-warning-light);
  color: #92400e;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.badge-name {
  background: #fae8ff;
  color: #86198f;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* Dark mode badges */
body.dark-mode .badge-review {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

body.dark-mode .badge-name {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

/* ============================================
   Select with Add Button
   ============================================ */
.select-with-add {
  display: flex;
  gap: 8px;
  align-items: center;
}

.select-with-add select {
  flex: 1;
}

.select-with-add .btn {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: bold;
}

/* ============================================
   Small Modal Variant
   ============================================ */
.modal-sm {
  max-width: 400px;
}

/* ============================================
   Direction Filter Dropdown
   ============================================ */
#filter-direction {
  min-width: 150px;
}

/* ============================================
   Form Row Layout (Two Columns)
   ============================================ */
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
}

.form-group-half {
  flex: 1;
  min-width: 0;
}

.form-group-half .select-with-add {
  width: 100%;
}

.form-group-half select,
.form-group-half input {
  width: 100%;
}

@media (max-width: 500px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ============================================
   Temporary option styling
   ============================================ */
.temp-option {
  font-style: italic;
  color: var(--text-secondary);
}
