/* ================================================================
   MEETFLOW — Jira-Inspired Light Mode
   IBM Plex · Professional · Clean Design
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  /* Jira-like Light Backgrounds */
  --bg-base:     #f4f5f7;
  --bg-surface:  #ffffff;
  --bg-elevated: #ffffff;
  --bg-overlay:  #fafbfc;
  --bg-hover:    #ebecf0;

  /* Borders */
  --border-subtle:  #dfe1e6;
  --border-default: #c1c7d0;
  --border-strong:  #a5adba;

  /* Jira Blue Accent */
  --primary:       #0052cc;
  --primary-light: #0065ff;
  --primary-dim:   #deebff;
  --primary-hover: #0747a6;

  /* Status Colors */
  --success:     #00875a;
  --success-dim: #e3fcef;
  --danger:      #de350b;
  --danger-dim:  #ffebe6;
  --warning:     #ff991f;
  --warning-dim: #fffae6;
  --info:        #0065ff;
  --info-dim:    #deebff;

  /* Text Colors */
  --text-primary:   #172b4d;
  --text-secondary: #5e6c84;
  --text-muted:     #8993a4;
  --text-link:      #0052cc;

  /* Fonts */
  --font-sans:  'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --sidebar-w: 240px;
  --content-max: 1200px;

  /* Border Radius */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Transitions */
  --t-fast: 100ms ease;
  --t-med:  200ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(9, 30, 66, 0.08);
  --shadow-md: 0 2px 4px rgba(9, 30, 66, 0.12);
  --shadow-lg: 0 4px 8px rgba(9, 30, 66, 0.15);
  --shadow-xl: 0 8px 16px rgba(9, 30, 66, 0.18);
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 14px;
}

a { color: var(--text-link); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-light); text-decoration: underline; }

/* ── Layout ───────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 2px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 2px solid var(--border-subtle);
  background: linear-gradient(135deg, #0052cc 0%, #0065ff 100%);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: white;
  color: #0052cc;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  box-shadow: var(--shadow-md);
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
  font-weight: 500;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-item.active {
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-overlay);
}

.sidebar-footer p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Page Content ─────────────────────────────────────────── */
.page-wrapper {
  flex: 1;
  margin-left: var(--sidebar-w);
  background: var(--bg-base);
}

.page-content {
  max-width: 860px;
  margin: 0;
  padding: 32px 40px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--bg-hover);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #006644;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #bf2600;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--border-default);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-large { padding: 12px 24px; font-size: 15px; font-weight: 600; }
/* Button Group */
.button-group {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}


.btn-remove {
  background: transparent;
  color: var(--danger);
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid var(--border-default);
  box-shadow: none;
}

.btn-remove:hover {
  background: var(--danger-dim);
  border-color: var(--danger);
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-feature { background: #deebff; color: #0052cc; }
.badge-bug { background: #ffebe6; color: #de350b; }
.badge-refactor { background: #fffae6; color: #ff991f; }
.badge-chore { background: #f4f5f7; color: #5e6c84; }

.badge-priority-critical { background: #ffebe6; color: #de350b; }
.badge-priority-high { background: #fff0b3; color: #ff991f; }
.badge-priority-medium { background: #fffae6; color: #ff991f; }
.badge-priority-low { background: #e3fcef; color: #00875a; }

.badge-complexity { background: #f4f5f7; color: #5e6c84; }
.badge-status { background: #dfe1e6; color: #42526e; }
.badge-info { background: #deebff; color: #0052cc; }
.badge-success { background: #e3fcef; color: #00875a; }

/* ── Messages ─────────────────────────────────────────────── */
.message {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border-left: 4px solid;
  box-shadow: var(--shadow-sm);
}

.message p { margin: 4px 0; }
.message p:last-child { margin-bottom: 0; }

.message.success { background: var(--success-dim); border-color: var(--success); color: #006644; }
.message.error { background: var(--danger-dim); border-color: var(--danger); color: #bf2600; }
.message.info { background: var(--info-dim); border-color: var(--info); color: #0747a6; }
.message.warning { background: var(--warning-dim); border-color: var(--warning); color: #974f0c; }

.message a { color: inherit; font-weight: 600; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

input[type='text'],
input[type='file'],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: all var(--t-fast);
}

/* Character Counter */
.char-counter {
  float: right;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

input[type='text']::placeholder,
textarea::placeholder { color: var(--text-muted); }

input[type='text']:focus,
input[type='file']:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

input[type='file'] { padding: 8px; cursor: pointer; }
textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
select { cursor: pointer; appearance: auto; }
select option { background: var(--bg-surface); }

small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

#transcript-text {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  min-height: 280px;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.inline-form input { flex: 1; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-subtle);
}

.tab-button {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--t-fast);
  margin-bottom: -2px;
}

.tab-button:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Tickets Grid ─────────────────────────────────────────── */
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.ticket-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--t-med);
  box-shadow: var(--shadow-sm);
}

.ticket-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ticket-header { margin-bottom: 12px; }

.ticket-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.ticket-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.ticket-summary {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
}

.meta-item { color: var(--text-muted); }
.meta-item strong { color: var(--text-primary); font-weight: 600; }

.ticket-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* ── Ticket Groups ────────────────────────────────────────── */
.ticket-group {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-subtle);
}

.group-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.group-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.timestamp { font-size: 12px; color: var(--text-muted); }

.ticket-group > .tickets-grid { margin-bottom: 0; }

/* Ticket card color accents */
.ticket-card:nth-child(6n+1) { border-left: 4px solid #0052cc; }
.ticket-card:nth-child(6n+2) { border-left: 4px solid #00875a; }
.ticket-card:nth-child(6n+3) { border-left: 4px solid #ff991f; }
.ticket-card:nth-child(6n+4) { border-left: 4px solid #de350b; }
.ticket-card:nth-child(6n+5) { border-left: 4px solid #6554c0; }
.ticket-card:nth-child(6n+6) { border-left: 4px solid #00b8d9; }

/* ── Metrics ──────────────────────────────────────────────── */
/* Primary Metrics Grid (Larger Cards) */
.metrics-grid-primary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

/* Secondary Metrics Grid (Smaller Cards) */
.metrics-grid-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

/* Legacy support */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all var(--t-med);
  box-shadow: var(--shadow-sm);
}

.metric-card-large {
  padding: 32px 24px;
}

.metric-card-large .metric-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--primary);
}

.metric-card-large .metric-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--primary);
}

.metric-card-large .metric-value {
  font-size: 48px;
  margin-bottom: 8px;
}

.metric-card-large .metric-label {
  font-size: 14px;
}

.metric-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.metric-card:nth-child(1) { border-top: 3px solid #0052cc; }
.metric-card:nth-child(2) { border-top: 3px solid #00875a; }
.metric-card:nth-child(3) { border-top: 3px solid #ff991f; }
.metric-card:nth-child(4) { border-top: 3px solid #6554c0; }
.metric-card:nth-child(5) { border-top: 3px solid #00b8d9; }
.metric-card:nth-child(6) { border-top: 3px solid #36b37e; }
.metric-card:nth-child(7) { border-top: 3px solid #ff5630; }
.metric-card:nth-child(8) { border-top: 3px solid #5243aa; }

.metric-icon { font-size: 32px; margin-bottom: 8px; }

.metric-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1;
}

.metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Charts ───────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* ── Enhanced Charts Grid with Visual Hierarchy ───────────── */
.charts-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.chart-primary {
  grid-column: 1 / -1;
}

.chart-wrapper {
  position: relative;
  min-height: 300px;
}

.chart-empty-state {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
}

.chart-empty-state svg {
  stroke: var(--text-muted);
  opacity: 0.5;
}

.chart-empty-state p {
  font-size: 14px;
  margin: 0;
}

.chart-empty-state a {
  color: var(--primary);
  font-weight: 600;
}

/* SVG Icons in Metric Cards */
.metric-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--primary);
  margin-bottom: 8px;
}

/* Insight Actions */
.insight-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chart-container {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-container h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

/* ── Activity Table ───────────────────────────────────────── */
.recent-activity {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.recent-activity h3,
.insights h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
}

.activity-table th,
.activity-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-table th {
  background: var(--bg-overlay);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.activity-table td {
  font-size: 13px;
  color: var(--text-primary);
}

.activity-table td a { font-weight: 500; }
.activity-table td a:hover { text-decoration: underline; }
.activity-table tr:hover td { background: var(--bg-hover); }

.no-data {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Insights ─────────────────────────────────────────────── */
.insights {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.insights-grid {
  display: grid;
  gap: 16px;
}

.insight {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  font-size: 13px;
  line-height: 1.6;
}

.insight strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.insight-success { background: var(--success-dim); border-color: var(--success); color: #006644; }
.insight-warning { background: var(--warning-dim); border-color: var(--warning); color: #974f0c; }
.insight-danger { background: var(--danger-dim); border-color: var(--danger); color: #bf2600; }
.insight-info { background: var(--info-dim); border-color: var(--info); color: #0747a6; }

/* ── Knowledge Base ───────────────────────────────────────── */
.knowledge-actions { margin-bottom: 24px; }
.status-message { margin-bottom: 24px; }
.knowledge-overview { margin-bottom: 32px; }

.overview-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.overview-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stat-card {
  text-align: center;
  padding: 16px;
  background: var(--bg-overlay);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.knowledge-section {
  margin-bottom: 32px;
}

.knowledge-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.content-box {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.content-box pre {
  background: var(--bg-overlay);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-primary);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.glossary-item {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-sm);
}

.glossary-item:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.glossary-item strong {
  display: block;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.glossary-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.search-box { margin-bottom: 20px; }
.search-box input { max-width: 400px; }

.file-tree {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.file-item { margin-bottom: 12px; }
.file-item:last-child { margin-bottom: 0; }

.file-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-overlay);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast);
}

.file-header:hover { background: var(--bg-hover); }

.file-icon { font-size: 16px; }
.file-path { flex: 1; font-weight: 500; font-size: 13px; color: var(--text-primary); }
.file-lines { font-size: 12px; color: var(--text-muted); }
.toggle-icon { font-size: 12px; color: var(--text-muted); }

.file-details {
  padding: 16px 12px 12px 42px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.file-description { margin-bottom: 12px; }
.functions-list, .imports-list { margin-top: 12px; }
.functions-list ul, .imports-list ul { list-style: none; }
.functions-list li, .imports-list li { margin-bottom: 4px; }

.functions-list code,
.imports-list code {
  background: var(--bg-overlay);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  border: 1px solid var(--border-subtle);
}

/* ── Ticket Detail ────────────────────────────────────────── */
.ticket-detail { max-width: 900px; }

.detail-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-subtle);
}

.detail-header h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-section {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.form-section:nth-child(1) { border-left: 4px solid #0052cc; }
.form-section:nth-child(2) { border-left: 4px solid #00875a; }
.form-section:nth-child(3) { border-left: 4px solid #ff991f; }
.form-section:nth-child(4) { border-left: 4px solid #6554c0; }
.form-section:nth-child(5) { border-left: 4px solid #00b8d9; }

.form-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
}

.list-item { margin-bottom: 12px; }
.list-input { margin-bottom: 8px; }

.transcript-segment {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.transcript-segment pre {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.form-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
}

/* ── Dependencies ─────────────────────────────────────────── */
.dependency-info {
  background: linear-gradient(135deg, var(--primary-dim) 0%, var(--info-dim) 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.dependency-info p { margin: 6px 0; color: var(--text-primary); }
.dependency-info strong { color: var(--primary); font-weight: 600; }

.legend {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.legend h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.legend-items { display: flex; flex-wrap: wrap; gap: 20px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.node-preview { width: 16px; height: 16px; border-radius: 50%; }
.node-independent { background: #00875a; }
.node-blocked { background: #ff991f; }
.arrow-preview { color: var(--text-muted); }

.graph-container {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
  min-height: 400px;
  box-shadow: var(--shadow-sm);
}

.tickets-list { margin-bottom: 32px; }

.tickets-list h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.dep-ticket-row {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-sm);
}

.dep-ticket-row:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.dep-ticket-row-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 16px;
}

.dep-ticket-row-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.dep-ticket-row > p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.dependencies-info {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
}

.dependencies-info ul { list-style: none; padding-left: 0; }
.dependencies-info li { margin: 4px 0; color: var(--text-secondary); }

.implementation-order {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.implementation-order h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.order-list {
  list-style: none;
  counter-reset: order-counter;
}

.order-list li {
  counter-increment: order-counter;
  position: relative;
  padding: 16px 20px 16px 60px;
  margin-bottom: 16px;
  background: var(--bg-overlay);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--t-fast);
}

.order-list li:last-child { margin-bottom: 0; }

.order-list li::before {
  content: counter(order-counter);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.order-list li strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.dependency-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.actions { margin-top: 16px; }

/* ── Loading & Results ────────────────────────────────────── */
.loading { text-align: center; padding: 40px; }

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 4px solid var(--border-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Toast Notifications ──────────────────────────────────── */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  box-shadow: var(--shadow-xl);
  font-size: 14px;
  font-weight: 500;
  max-width: 400px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-success {
  background: var(--success-dim);
  border-color: var(--success);
  color: #006644;
}

.toast-error {
  background: var(--danger-dim);
  border-color: var(--danger);
  color: #bf2600;
}

.toast-warning {
  background: var(--warning-dim);
  border-color: var(--warning);
  color: #974f0c;
}

.toast-info {
  background: var(--info-dim);
  border-color: var(--info);
  color: #0747a6;
}

/* Implementation Steps List */
.implementation-steps-list {
  list-style: none;
  counter-reset: step-counter;
  padding-left: 0;
}

.implementation-steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 12px 16px 12px 50px;
  margin-bottom: 12px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

.implementation-steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* Inline Reason Input */
.inline-reason-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--warning-dim);
  border: 2px solid var(--warning);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.results { margin-top: 32px; }
.hidden { display: none; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-overlay); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── Mobile Navigation ────────────────────────────────────── */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-nav-toggle { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open { transform: translateX(0); }

  .page-wrapper { margin-left: 0; }
  .page-content { padding: 24px 16px; }

  .charts-grid { grid-template-columns: 1fr; }
  .charts-grid-enhanced { grid-template-columns: 1fr; }
  .chart-primary { grid-column: 1; }
  .tickets-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid-primary { grid-template-columns: 1fr; }
  .metrics-grid-secondary { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .activity-table { font-size: 12px; }
  .activity-table th, .activity-table td { padding: 8px; }
}

/* Made with Bob */
