/* ===========================================
   IMCP - Iron Man Case Platform
   UI Styles — VSCode Light Modern + Cursor
   =========================================== */

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Backgrounds */
  --bg-editor: #ffffff;
  --bg-sidebar: #f3f3f3;
  --bg-panel: #f3f3f3;
  --bg-hover: rgba(0,0,0,0.04);
  --bg-active: #e8e8e8;
  --bg-highlight: #f5f5f5;

  /* Borders / dividers */
  --border: #d0d0d0;
  --divider: #e0e0e0;

  /* Text */
  --text: #1e1e1e;
  --text-secondary: #5a5a5a;
  --text-muted: #808080;

  /* Accent */
  --accent: #007acc;
  --accent-hover: #006bb3;
  --accent-light: #e6f3fc;
  --selection: #add6ff;
  --focus-outline: #007acc;

  /* Status colors */
  --success: #107c10;
  --success-bg: #dff6dd;
  --success-text: #0b5e0b;
  
  --warning: #c87200;
  --warning-bg: #fff4ce;
  --warning-text: #8a5000;
  
  --danger: #c42b1c;
  --danger-bg: #fde7e9;
  --danger-text: #a4262c;
  
  --info: #0078d4;
  --info-bg: #e8f4fc;
  --info-text: #005a9e;

  /* Syntax colors */
  --syntax-keyword: #0000ff;
  --syntax-string: #a31515;
  --syntax-number: #098658;
  --syntax-function: #795e26;
  --syntax-comment: #008000;
  --syntax-type: #267f99;
  --syntax-variable: #001080;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-popup: 0 8px 24px rgba(0,0,0,0.15);

  /* Transitions */
  --transition: 120ms ease;

  /* Typography */
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: Consolas, 'Courier New', monospace;

  /* Sizing */
  --sidebar-width: 240px;
  --header-height: 48px;
  --row-height: 28px;
  --tab-height: 34px;
}

html {
  font-size: 13px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-editor);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===========================================
   Layout
   =========================================== */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--divider);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  background: var(--bg-editor);
}

.page-header {
  background: var(--bg-editor);
  border-bottom: 1px solid var(--divider);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-content {
  padding: 20px;
}

/* ===========================================
   Sidebar
   =========================================== */

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

.sidebar-logo svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.sidebar-logo h1 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.sidebar-logo span {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.sidebar-nav {
  list-style: none;
  padding: 6px;
}

.sidebar-nav li {
  margin-bottom: 2px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  font-size: 13px;
  height: var(--row-height);
}

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

.sidebar-nav a.active {
  background: var(--accent-light);
  color: var(--accent);
}

.sidebar-nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sidebar-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  padding: 0 14px;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ===========================================
   Typography
   =========================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
h4 { font-size: 13px; }
h5 { font-size: 12px; }
h6 { font-size: 11px; }

.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 14px; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-primary { color: var(--accent); }

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

.card {
  background: var(--bg-editor);
  border-radius: var(--radius-lg);
  border: 1px solid var(--divider);
}

.card-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-body {
  padding: 14px;
}

.card-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--divider);
  background: var(--bg-panel);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ===========================================
   Buttons
   =========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  height: 28px;
}

.btn svg {
  width: 14px;
  height: 14px;
}

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

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

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

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

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

.btn-success:hover {
  background: #0e6a0e;
}

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

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

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

.btn-warning:hover {
  background: #a86200;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
}

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

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

.btn-sm {
  padding: 3px 8px;
  font-size: 11px;
  height: 24px;
}

.btn-sm svg {
  width: 12px;
  height: 12px;
}

.btn-lg {
  padding: 8px 16px;
  font-size: 13px;
  height: 34px;
}

.btn-icon {
  padding: 5px;
  width: 28px;
}

.btn-group {
  display: flex;
  gap: 6px;
}

/* ===========================================
   Badges
   =========================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

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

.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-text);
}

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

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.status-open {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-blocked {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.status-done {
  background: var(--bg-panel);
  color: var(--text-secondary);
}

.status-pending {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.status-approved {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-rejected {
  background: var(--danger-bg);
  color: var(--danger-text);
}

/* ===========================================
   Tables
   =========================================== */

.table-container {
  overflow-x: auto;
}

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

.table th,
.table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--divider);
}

.table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--bg-panel);
}

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

.table tbody tr {
  cursor: pointer;
  transition: background var(--transition);
}

/* ===========================================
   Forms
   =========================================== */

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-editor);
  color: var(--text);
  transition: border-color var(--transition);
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

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

/* ===========================================
   Case Header (Cockpit)
   =========================================== */

.case-header {
  background: var(--bg-editor);
  border-bottom: 1px solid var(--divider);
  padding: 12px 20px;
}

.case-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.case-id {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.case-type-badge {
  background: var(--accent);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.case-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.case-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.case-meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.sla-warning {
  color: var(--warning);
}

.sla-danger {
  color: var(--danger);
}

.priority-urgent {
  color: var(--danger);
}

.priority-high {
  color: var(--warning);
}

/* ===========================================
   Next Best Action (NBA)
   =========================================== */

.nba-card {
  background: var(--bg-panel);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--divider);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

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

.nba-indicator {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.nba-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

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

.nba-description {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 12px;
}

.nba-description ul {
  list-style: none;
  padding: 0;
}

.nba-description li {
  padding-left: 14px;
  position: relative;
  margin-bottom: 4px;
}

.nba-description li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.nba-risk {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--warning-bg);
  color: var(--warning-text);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 12px;
}

.nba-risk svg {
  width: 14px;
  height: 14px;
}

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

.nba-actions .btn {
  /* Use default button styles */
}

.nba-actions .btn-secondary {
  /* Use default secondary button styles */
}

/* ===========================================
   Cockpit Layout
   =========================================== */

.cockpit-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

@media (max-width: 1200px) {
  .cockpit-grid {
    grid-template-columns: 1fr;
  }
}

.main-panel {
  min-width: 0;
}

.context-sidebar {
  min-width: 0;
}

.context-card {
  margin-bottom: 12px;
}

.context-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--divider);
  font-weight: 600;
  font-size: 12px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.context-card-header svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.context-card-body {
  padding: 10px 12px;
}

.context-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 12px;
}

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

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

.context-item-value {
  font-weight: 500;
  color: var(--text);
}

/* Risk flags */
.risk-flag {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  margin-bottom: 6px;
}

.risk-flag:last-child {
  margin-bottom: 0;
}

.risk-high {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.risk-medium {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.risk-low {
  background: var(--success-bg);
  color: var(--success-text);
}

.risk-flag svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===========================================
   Timeline
   =========================================== */

.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--divider);
}

.timeline-item {
  position: relative;
  padding-bottom: 14px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -18px;
  width: 20px;
  height: 20px;
  background: var(--bg-editor);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-marker svg {
  width: 10px;
  height: 10px;
  color: var(--text-muted);
}

.timeline-marker.human {
  border-color: var(--accent);
}

.timeline-marker.human svg {
  color: var(--accent);
}

.timeline-marker.system {
  border-color: var(--info);
}

.timeline-marker.system svg {
  color: var(--info);
}

.timeline-marker.ai {
  border-color: #9333ea;
}

.timeline-marker.ai svg {
  color: #9333ea;
}

.timeline-content {
  background: var(--bg-panel);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

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

.timeline-actor {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

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

.timeline-event {
  font-weight: 500;
  font-size: 12px;
  color: var(--text);
}

.timeline-details {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===========================================
   Documents List
   =========================================== */

.doc-list {
  list-style: none;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
  transition: background var(--transition);
}

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

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

.doc-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--divider);
}

.doc-icon svg {
  width: 16px;
  height: 16px;
}

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

.doc-name {
  font-weight: 500;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.doc-actions {
  display: flex;
  gap: 6px;
}

/* ===========================================
   Approvals List
   =========================================== */

.approval-item {
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-editor);
}

.approval-header {
  padding: 12px 14px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.approval-type {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.approval-type svg {
  width: 16px;
  height: 16px;
  color: var(--warning);
}

.approval-body {
  padding: 14px;
}

.approval-snapshot {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--divider);
}

.approval-actions {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--divider);
  background: var(--bg-panel);
}

/* ===========================================
   Stats Grid
   =========================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-editor);
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 1px solid var(--divider);
}

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

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

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 14px;
  height: 14px;
}

.stat-icon.primary {
  background: var(--accent-light);
  color: var(--accent);
}

.stat-icon.success {
  background: var(--success-bg);
  color: var(--success);
}

.stat-icon.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-icon.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-icon.info {
  background: var(--info-bg);
  color: var(--info);
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.stat-change {
  font-size: 11px;
  margin-top: 4px;
  color: var(--text-muted);
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* ===========================================
   Quote Draft
   =========================================== */

.quote-draft {
  background: var(--bg-editor);
  border-radius: var(--radius-lg);
  border: 1px solid var(--divider);
  overflow: hidden;
}

.quote-header {
  padding: 10px 14px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  gap: 8px;
}

.quote-header svg {
  width: 18px;
  height: 18px;
  color: var(--success);
}

.quote-body {
  padding: 14px;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 12px;
}

.quote-row:last-child {
  border-bottom: none;
}

.quote-row.total {
  font-size: 14px;
  font-weight: 600;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  border-bottom: none;
}

.quote-label {
  color: var(--text-secondary);
}

.quote-value {
  font-weight: 500;
  color: var(--text);
}

.quote-notes {
  margin-top: 12px;
  padding: 10px;
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-secondary);
}

.quote-assumptions {
  margin-top: 12px;
}

.quote-assumptions-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.quote-assumptions ul {
  list-style: none;
  font-size: 12px;
  color: var(--text-secondary);
}

.quote-assumptions li {
  padding-left: 14px;
  position: relative;
  margin-bottom: 4px;
}

.quote-assumptions li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ===========================================
   Inbox Sections
   =========================================== */

.inbox-section {
  margin-bottom: 20px;
}

.inbox-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.inbox-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbox-section-count {
  background: var(--bg-panel);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--divider);
}

/* ===========================================
   Empty States
   =========================================== */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: 6px;
}

/* ===========================================
   Tabs
   =========================================== */

.tabs {
  border-bottom: 1px solid var(--divider);
  margin-bottom: 20px;
}

.tabs-list {
  display: flex;
  gap: 2px;
  list-style: none;
}

.tabs-list a {
  display: block;
  padding: 8px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}

.tabs-list a:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.tabs-list a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===========================================
   Breadcrumb
   =========================================== */

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

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

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

.breadcrumb-current {
  color: var(--text);
}

/* ===========================================
   Avatar
   =========================================== */

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
}

.avatar-sm {
  width: 20px;
  height: 20px;
  font-size: 9px;
}

.avatar-lg {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

/* ===========================================
   Info Banners
   =========================================== */

.info-banner {
  background: var(--info-bg);
  border: 1px solid #b3d4fc;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 20px;
}

.info-banner.success {
  background: var(--success-bg);
  border-color: #b7e4b7;
}

.info-banner.warning {
  background: var(--warning-bg);
  border-color: #ffeaa7;
}

.info-banner-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-banner-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-banner-icon svg {
  width: 16px;
  height: 16px;
}

.info-banner h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
}

.info-banner p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===========================================
   Code blocks
   =========================================== */

code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-panel);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--text);
}

pre {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-panel);
  padding: 12px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--divider);
}

/* ===========================================
   Utilities
   =========================================== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.w-full { width: 100%; }

.hidden { display: none; }

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 768px) {
  :root {
    --sidebar-width: 220px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 1000;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .cockpit-grid {
    grid-template-columns: 1fr;
  }
  
  .btn-group {
    flex-wrap: wrap;
  }
}
