/* ============================================================
   NOWFit HQ — Design System CSS
   Dark SaaS dashboard  |  Inter font  |  Orange accent
   ============================================================ */

/* ─────────────────────────────────────────
   1. DESIGN TOKENS
────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --orange: #EA8D5C;
  --orange-dark: #D25818;
  --orange-light: #F2A97E;
  --orange-glow: rgba(234, 141, 92, 0.15);
  --orange-glow-strong: rgba(234, 141, 92, 0.3);
  --gradient: linear-gradient(135deg, #EA8D5C, #D25818);
  --gradient-text: linear-gradient(135deg, #EA8D5C 0%, #F2A97E 50%, #D25818 100%);
  --gradient-hover: linear-gradient(135deg, #F2A97E, #EA8D5C);

  /* Dark Backgrounds */
  --bg-darkest: #07060B;
  --bg-dark: #0B0A0F;
  --bg-card: #111017;
  --bg-elevated: #18171F;
  --bg-surface: #1F1E27;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #A4A7AE;
  --text-muted: #6B6B7B;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-orange: rgba(234, 141, 92, 0.2);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(234, 141, 92, 0.15);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --sidebar-width: 220px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --transition: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-fast: 0.2s ease;

  /* Status Colors */
  --green: #34D399;
  --yellow: #F59E0B;
  --blue: #3B82F6;
  --red: #EF4444;
  --purple: #8B5CF6;
}


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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

input,
select,
textarea {
  font-family: var(--font);
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
}


/* ─────────────────────────────────────────
   3. APP LAYOUT
────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
  background-color: var(--bg-darkest);
}

.main-content > * + * {
  margin-top: 24px;
}


/* ─────────────────────────────────────────
   4. SIDEBAR
────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--bg-dark);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.sidebar-section {
  padding: 12px 8px;
  flex: 1;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 8px 8px 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
}

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

.sidebar-nav-item.active {
  background: rgba(234, 141, 92, 0.12);
  color: var(--orange);
}

.sidebar-nav-item .nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

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

.sidebar-nav-item .nav-badge {
  margin-left: auto;
  background: var(--orange-glow);
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  line-height: 1.4;
}

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user:hover {
  background: var(--bg-glass-hover);
}

.sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

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

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


/* ─────────────────────────────────────────
   5. PAGE HEADER
────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.page-greeting {
  flex: 1;
}

.page-greeting-eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

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

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────
   6. STAT CARDS
────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.stat-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--orange-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 16px;
}

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

.stat-value.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}

.stat-delta.up {
  color: var(--green);
}

.stat-delta.down {
  color: var(--red);
}


/* ─────────────────────────────────────────
   7. CARDS
────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.card-elevated {
  background: var(--bg-elevated);
}

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

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

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

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-glass);
}

.card-grid {
  display: grid;
  gap: 16px;
}

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

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}


/* ─────────────────────────────────────────
   8. TASK ITEMS
────────────────────────────────────────── */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity var(--transition-fast);
}

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

.task-item.completed {
  opacity: 0.5;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-hover);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  margin-top: 1px;
}

.task-checkbox:hover {
  border-color: var(--orange);
}

.task-checkbox.checked {
  background: var(--gradient);
  border-color: transparent;
}

.task-checkbox.checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  display: block;
}

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

.task-title {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

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

.task-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.task-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--orange-glow);
  color: var(--orange);
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

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

.task-action-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition-fast), color var(--transition-fast);
  font-size: 13px;
}

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


/* ─────────────────────────────────────────
   9. KANBAN BOARD
────────────────────────────────────────── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}

.kanban-column {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.kanban-column-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-column-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Status border-top and dot colors */
.kanban-column[data-status="todo"] {
  border-top: 2px solid var(--orange);
}

.kanban-column[data-status="todo"] .kanban-column-title::before {
  background: var(--orange);
}

.kanban-column[data-status="in_progress"] {
  border-top: 2px solid var(--blue);
}

.kanban-column[data-status="in_progress"] .kanban-column-title::before {
  background: var(--blue);
}

.kanban-column[data-status="review"] {
  border-top: 2px solid var(--yellow);
}

.kanban-column[data-status="review"] .kanban-column-title::before {
  background: var(--yellow);
}

.kanban-column[data-status="done"] {
  border-top: 2px solid var(--green);
}

.kanban-column[data-status="done"] .kanban-column-title::before {
  background: var(--green);
}

.kanban-count-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-glass-hover);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1.5;
}

.kanban-column-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}

.kanban-column-body.drag-over {
  background: var(--bg-glass-hover);
  border-radius: var(--radius-sm);
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  position: relative;
}

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

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
  box-shadow: var(--shadow-lg);
}

.kanban-card-priority {
  width: 3px;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.kanban-card-priority.high { background: var(--red); }
.kanban-card-priority.medium { background: var(--yellow); }
.kanban-card-priority.low { background: var(--green); }

.kanban-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 8px;
  padding-left: 8px;
}

.kanban-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
  padding-left: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
  padding-left: 8px;
}

.kanban-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  background: var(--orange-glow);
  color: var(--orange);
  border: 1px solid var(--border-orange);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.kanban-card-deadline {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.kanban-card-deadline.overdue {
  color: var(--red);
}

.kanban-card-deadline.due-today {
  color: var(--yellow);
}

.kanban-card-avatars {
  display: flex;
  margin-left: auto;
}

.kanban-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border: 2px solid var(--bg-card);
  margin-left: -6px;
  flex-shrink: 0;
}

.kanban-card-avatar:first-child {
  margin-left: 0;
}

.kanban-add-card {
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 12px 12px;
  width: calc(100% - 24px);
}

.kanban-add-card:hover {
  color: var(--orange);
  border-color: var(--border-orange);
  background: var(--orange-glow);
}


/* ─────────────────────────────────────────
   10. MODAL
────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 6, 11, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: scale(0.95);
  transition: transform var(--transition);
}

.modal-overlay.visible .modal {
  transform: scale(1);
}

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

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  transition: background var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-glass);
}


/* ─────────────────────────────────────────
   11. FORMS
────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

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

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-label .required {
  color: var(--red);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

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

.form-select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: 11px;
  color: var(--red);
  margin-top: 5px;
}


/* ─────────────────────────────────────────
   12. BUTTONS
────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  border: none;
  outline: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  text-decoration: none;
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 15px;
  border-radius: var(--radius);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-sm);
}

.btn-icon.btn-sm {
  padding: 7px;
}

/* Primary */
.btn-primary {
  background: var(--gradient);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(234, 141, 92, 0.25);
}

.btn-primary:hover {
  background: var(--gradient-hover);
  box-shadow: 0 6px 24px rgba(234, 141, 92, 0.4);
}

/* Secondary */
.btn-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

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

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

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

/* Danger */
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

/* Orange outline */
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-orange);
  color: var(--orange);
}

.btn-outline:hover {
  background: var(--orange-glow);
}


/* ─────────────────────────────────────────
   13. TOAST
────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 300px;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: all;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition), transform var(--transition);
  border-left: 3px solid var(--border-hover);
}

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

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

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

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

.toast-message {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.toast-close {
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  line-height: 1;
}

.toast-close:hover {
  opacity: 1;
}

/* Toast variants */
.toast-success {
  border-left-color: var(--green);
}

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

.toast-error {
  border-left-color: var(--red);
}

.toast-error .toast-icon {
  color: var(--red);
}

.toast-info {
  border-left-color: var(--blue);
}

.toast-info .toast-icon {
  color: var(--blue);
}

.toast-warning {
  border-left-color: var(--yellow);
}

.toast-warning .toast-icon {
  color: var(--yellow);
}


/* ─────────────────────────────────────────
   14. FILTER TABS
────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.kanban-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.kanban-filter-tab:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.kanban-filter-tab.active {
  background: rgba(234, 141, 92, 0.12);
  color: var(--orange);
}

.kanban-filter-tab .tab-count {
  font-size: 10px;
  background: var(--bg-glass-hover);
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: 700;
}

.kanban-filter-tab.active .tab-count {
  background: var(--orange-glow);
}

/* Toolbar with search + filters */
.kanban-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.kanban-search {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 280px;
}

.kanban-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.kanban-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 34px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

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

.kanban-search-input:focus {
  border-color: var(--border-orange);
}


/* ─────────────────────────────────────────
   15. EMPTY STATES
────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state-message {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.6;
  margin-bottom: 20px;
}


/* ─────────────────────────────────────────
   16. BADGES & TAGS
────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-orange { background: var(--orange-glow); color: var(--orange); }
.badge-green  { background: rgba(52, 211, 153, 0.12); color: var(--green); }
.badge-yellow { background: rgba(245, 158, 11, 0.12); color: var(--yellow); }
.badge-red    { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.badge-blue   { background: rgba(59, 130, 246, 0.12); color: var(--blue); }
.badge-purple { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.badge-muted  { background: var(--bg-glass-hover); color: var(--text-muted); }


/* ─────────────────────────────────────────
   17. PROGRESS BARS
────────────────────────────────────────── */
.progress-track {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.progress-fill.green  { background: var(--green); }
.progress-fill.yellow { background: var(--yellow); }
.progress-fill.red    { background: var(--red); }


/* ─────────────────────────────────────────
   18. DIVIDERS & SEPARATORS
────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.divider-label {
  position: relative;
  text-align: center;
  margin: 20px 0;
}

.divider-label::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.divider-label span {
  position: relative;
  background: var(--bg-darkest);
  padding: 0 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


/* ─────────────────────────────────────────
   19. AVATAR GROUP
────────────────────────────────────────── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid var(--bg-darkest);
}

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  margin-left: -10px;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

.avatar-overflow {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 11px;
  border-color: var(--bg-darkest);
}


/* ─────────────────────────────────────────
   20. UTILITY CLASSES
────────────────────────────────────────── */

/* Text */
.text-primary    { color: var(--text-primary) !important; }
.text-secondary  { color: var(--text-secondary) !important; }
.text-muted      { color: var(--text-muted) !important; }
.text-orange     { color: var(--orange) !important; }
.text-green      { color: var(--green) !important; }
.text-red        { color: var(--red) !important; }
.text-yellow     { color: var(--yellow) !important; }
.text-blue       { color: var(--blue) !important; }

.text-sm   { font-size: 12px; }
.text-xs   { font-size: 11px; }
.text-base { font-size: 14px; }
.text-lg   { font-size: 16px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }

.font-normal  { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold    { font-weight: 700; }

/* Layout */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1       { flex: 1; }
.flex-wrap    { flex-wrap: wrap; }

.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

/* Spacing */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.p-8   { padding: 8px; }
.p-12  { padding: 12px; }
.p-16  { padding: 16px; }
.p-20  { padding: 20px; }
.p-24  { padding: 24px; }

/* Display */
.hidden    { display: none !important; }
.invisible { visibility: hidden; }
.block     { display: block; }
.inline    { display: inline; }
.inline-flex { display: inline-flex; }

/* Borders */
.border         { border: 1px solid var(--border); }
.rounded-sm     { border-radius: var(--radius-sm); }
.rounded        { border-radius: var(--radius); }
.rounded-lg     { border-radius: var(--radius-lg); }
.rounded-full   { border-radius: 9999px; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Width */
.w-full  { width: 100%; }
.w-auto  { width: auto; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Opacity */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }


/* ─────────────────────────────────────────
   21. SCROLLBAR STYLES
────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

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

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


/* ─────────────────────────────────────────
   22. SELECTION
────────────────────────────────────────── */
::selection {
  background: var(--orange-glow-strong);
  color: var(--text-primary);
}


/* ─────────────────────────────────────────
   23. FOCUS VISIBLE
────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}


.sidebar-search-btn {
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font);
  font-size: inherit;
  cursor: pointer;
  width: 100%;
  color: var(--text-muted);
}

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


/* ─────────────────────────────────────────
   24. RESPONSIVE — TABLET & MOBILE
────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 768px) {
  /* Sidebar collapses */
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 200;
  }

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

  /* Backdrop for open sidebar */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 6, 11, 0.7);
    z-index: 199;
  }

  .sidebar.open ~ .sidebar-backdrop,
  .sidebar-backdrop.visible {
    display: block;
  }

  /* Main fills full width */
  .main-content {
    margin-left: 0;
    padding: 20px 16px;
  }

  /* Hamburger visible */
  .mobile-menu-btn {
    display: flex;
  }

  /* Stats: 2 columns */
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Kanban: single column */
  .kanban-board {
    grid-template-columns: 1fr;
  }

  /* Page header stacks */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  /* Cards */
  .card-grid-2,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  /* Form rows stack */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Modals fill screen */
  .modal {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 0;
  }

  .modal-overlay {
    align-items: flex-end;
  }

  /* Toasts */
  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  .toast {
    min-width: unset;
    max-width: 100%;
  }

  /* Toolbar stacks */
  .kanban-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .kanban-search {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* Single column stats */
  .stats-bar {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 16px 12px;
  }
}

/* Mobile menu button — hidden by default on desktop */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

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

/* ─────────────────────────────────────────
   TRANSCRIPT LIST
────────────────────────────────────────── */
.transcript-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.transcript-row:hover {
  background: var(--bg-glass-hover);
}

.transcript-row.unread {
  border-left: 3px solid var(--orange);
}

.transcript-row-main {
  flex: 1;
  min-width: 0;
}

.transcript-row-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transcript-row-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.transcript-row-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 16px;
}

.transcript-row-summary {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─────────────────────────────────────────
   BADGES
────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--orange);
  color: white;
  line-height: 1;
}

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

.badge-green {
  background: var(--green);
}

.badge-red {
  background: var(--red);
}

/* ─────────────────────────────────────────
   TRANSCRIPT DETAIL — SPLIT SCREEN
────────────────────────────────────────── */
.transcript-detail {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  height: calc(100vh - 140px);
}

.transcript-detail-main {
  overflow-y: auto;
  padding-right: 8px;
}

.transcript-detail-chat {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ─────────────────────────────────────────
   TABS
────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

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

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

.tab-panel {
  display: none;
}

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

/* ─────────────────────────────────────────
   AI SUMMARY SECTIONS
────────────────────────────────────────── */
.ai-section {
  margin-bottom: 24px;
}

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

.ai-summary-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.ai-list {
  list-style: none;
  padding: 0;
}

.ai-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ai-list li::before {
  content: '\2022';
  color: var(--orange);
  font-weight: 800;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   ACTION ITEM ROW (in transcript detail)
────────────────────────────────────────── */
.action-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.action-item-row .task-checkbox {
  flex-shrink: 0;
}

.action-item-assignee {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.action-item-deadline {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
}

.action-item-deadline.overdue {
  color: var(--red);
}

.action-item-deadline.due-today {
  color: var(--yellow);
}

/* ─────────────────────────────────────────
   RAW TRANSCRIPT VIEW
────────────────────────────────────────── */
.raw-transcript {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-wrap;
  font-family: var(--font);
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ─────────────────────────────────────────
   SEARCH BAR
────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--transition-fast);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--orange);
}

.search-bar::before {
  content: '\1F50D';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

/* ─────────────────────────────────────────
   WARNING BANNER
────────────────────────────────────────── */
.banner {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--yellow);
}

.banner-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
}

.banner-success {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--green);
}

/* ─────────────────────────────────────────
   PARTICIPANT AVATARS (inline)
────────────────────────────────────────── */
.participant-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
}

.participant-chip-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
}

/* ─────────────────────────────────────────
   12. CHAT UI
────────────────────────────────────────── */

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

.chat-header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.chat-export-btn {
  font-size: 11px !important;
  padding: 6px 12px !important;
}

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

.chat-msg {
  display: flex;
}

.chat-msg-user {
  justify-content: flex-end;
}

.chat-msg-assistant {
  justify-content: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 80%;
  word-wrap: break-word;
}

.chat-bubble-user {
  background: var(--orange);
  color: white;
  border-radius: 12px 12px 2px 12px;
}

.chat-bubble-assistant {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-radius: 12px 12px 12px 2px;
}

.chat-bubble-assistant strong {
  color: var(--text-primary);
}

.chat-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: var(--orange);
  animation: chat-blink 1s infinite;
  vertical-align: middle;
  margin-left: 2px;
}

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

.chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition-fast);
}

.chat-input:focus {
  border-color: var(--orange);
}

.chat-send-btn {
  padding: 10px 16px !important;
  font-size: 13px !important;
}

.chat-retry-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--orange);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  margin-top: 8px;
}

.chat-retry-btn:hover {
  background: var(--bg-glass-hover);
}

/* ─────────────────────────────────────────
   13. STANDALONE CHAT PAGE
────────────────────────────────────────── */

.chat-layout {
  display: flex;
  height: calc(100vh - 0px);
  overflow: hidden;
}

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

.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.chat-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-sidebar-item {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

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

.chat-sidebar-item.active {
  background: var(--bg-elevated);
}

.chat-sidebar-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-sidebar-item.active .chat-sidebar-item-title {
  color: var(--text-primary);
}

.chat-sidebar-item:not(.active) .chat-sidebar-item-title {
  color: var(--text-secondary);
}

.chat-sidebar-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.chat-sidebar-item-actions {
  display: none;
  margin-top: 4px;
}

.chat-sidebar-item:hover .chat-sidebar-item-actions {
  display: block;
}

.chat-sidebar-delete {
  background: none;
  border: none;
  color: var(--red);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.chat-sidebar-delete:hover {
  background: rgba(239, 68, 68, 0.1);
}

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

.chat-empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ─────────────────────────────────────────
   14. SEARCH OVERLAY (Cmd+K)
────────────────────────────────────────── */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.search-modal {
  position: relative;
  width: 600px;
  max-height: 70vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-modal-input {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font);
  outline: none;
}

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

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.search-results-group {
  margin-bottom: 8px;
}

.search-results-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

.search-result-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background var(--transition-fast);
}

.search-result-item:hover,
.search-result-item.selected {
  background: var(--bg-glass-hover);
}

.search-result-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

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

.search-result-title {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-snippet {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-muted);
  flex-shrink: 0;
}

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

.search-footer {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.search-footer kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: var(--font);
}

/* Responsive: chat stacks below transcript on tablet */
@media (max-width: 1024px) {
  .transcript-detail {
    grid-template-columns: 1fr;
  }

  .transcript-detail-chat {
    border-left: none;
    border-top: 1px solid var(--border);
    height: 400px;
  }
}

/* Responsive: standalone chat sidebar collapses */
@media (max-width: 768px) {
  .chat-sidebar {
    display: none;
  }

  .chat-sidebar.open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100%;
  }
}

/* ───────────────────────────────────────── 15. People Page ───────────────────────────────────────── */

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

.people-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

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

.people-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.people-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.people-role {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.people-role:hover { opacity: 0.8; }

.role-team { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.role-coach { background: rgba(245, 158, 66, 0.15); color: var(--orange); }
.role-external { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); }

.people-notes {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.people-section { margin-bottom: 32px; }
.people-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.people-section-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 10px;
}

.role-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  z-index: 100;
  min-width: 120px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.role-menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}
.role-menu-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.role-menu-item.active { color: var(--orange); font-weight: 600; }

/* Merge mode */
.merge-bar {
  background: var(--bg-elevated);
  border: 1px solid var(--border-orange);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 16px;
}
.merge-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.merge-bar-inner #merge-status {
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
}
#merge-actions {
  display: flex;
  gap: 8px;
}
.people-card.merge-selectable {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.people-card.merge-selectable:hover {
  border-color: var(--border-hover);
}
.people-card.merge-selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange), var(--shadow-glow);
}
