/* CSS Variables for theming */
:root {
  /* Light theme (default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card-header: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-success: #22c55e;
  --accent-warning: #f59e0b;
  --accent-error: #ef4444;
  --code-bg: rgba(99, 102, 241, 0.1);
  --code-color: #6366f1;
  --diff-add-bg: rgba(34, 197, 94, 0.1);
  --diff-add-color: #16a34a;
  --diff-remove-bg: rgba(239, 68, 68, 0.1);
  --diff-remove-color: #dc2626;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --sidebar-width: 240px;
}

[data-theme='dark'] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card-header: rgba(0, 0, 0, 0.2);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --code-bg: rgba(99, 102, 241, 0.2);
  --code-color: #a5b4fc;
  --diff-add-bg: rgba(34, 197, 94, 0.15);
  --diff-add-color: #4ade80;
  --diff-remove-bg: rgba(239, 68, 68, 0.15);
  --diff-remove-color: #f87171;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* App Layout */
.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.logo svg {
  color: var(--accent-primary);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s;
  font-size: 14px;
}

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

.nav-item.active {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: white;
}

.nav-item svg {
  flex-shrink: 0;
}

.nav-item.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

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

.theme-toggle {
  width: 100%;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

.sun-icon {
  display: block;
}
.moon-icon {
  display: none;
}
[data-theme='dark'] .sun-icon {
  display: none;
}
[data-theme='dark'] .moon-icon {
  display: block;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 24px 32px;
  max-width: calc(100% - var(--sidebar-width));
}

/* Sections */
.section {
  display: none;
  max-width: 900px;
}

.section.active {
  display: block;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Stats Header */
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

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

.section-title p {
  color: var(--text-secondary);
  font-size: 14px;
}

.stats {
  display: flex;
  gap: 20px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.stat-value {
  font-weight: 600;
  font-size: 20px;
}

.stat-fix {
  color: var(--accent-success);
}
.stat-skip {
  color: var(--text-muted);
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Forms */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 200px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

textarea {
  resize: vertical;
  min-height: 150px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 13px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-success), #16a34a);
  color: white;
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

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

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

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.button-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Actions Bar */
.actions-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  align-items: center;
}

.spacer {
  flex: 1;
}

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

/* Status Messages */
.status-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
  align-items: center;
  gap: 10px;
}

.status-message.visible {
  display: flex;
}

.status-message.loading {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
}

.status-message.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--accent-success);
}

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

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Comment Cards */
.file-group {
  margin-bottom: 24px;
}

.file-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.file-group-header svg {
  color: var(--accent-secondary);
}

.file-group-header h3 {
  font-size: 13px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  color: var(--accent-secondary);
  font-weight: 500;
}

.file-group-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 3px 10px;
  border-radius: 20px;
}

.comment-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

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

.comment-card.selected {
  border-color: var(--accent-success);
  background: rgba(34, 197, 94, 0.03);
}

.comment-card.skipped {
  opacity: 0.5;
}

.comment-card.skipped .card-content {
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}

.card-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card-header);
  gap: 12px;
}

.line-number {
  color: var(--accent-primary);
  font-weight: 500;
  font-size: 13px;
}

.author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
}

.author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.card-content {
  padding: 16px;
}

.diff-preview {
  background: var(--bg-primary);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 12px;
  border: 1px solid var(--border-color);
}

.diff-line {
  padding: 3px 12px;
  white-space: pre;
}

.diff-add {
  background: var(--diff-add-bg);
  color: var(--diff-add-color);
}

.diff-remove {
  background: var(--diff-remove-bg);
  color: var(--diff-remove-color);
}

.comment-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}

.comment-text code {
  background: var(--code-bg);
  color: var(--code-color);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 13px;
}

.comment-text pre {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  margin: 12px 0;
  overflow-x: auto;
}

.card-notes {
  padding: 0 16px 12px;
}

.card-notes input {
  padding: 10px 14px;
  background: var(--bg-primary);
  font-size: 13px;
}

.card-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
}

.decision-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.decision-btn.fix {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.decision-btn.fix:hover,
.decision-btn.fix.active {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--accent-success);
}

.decision-btn.fix.active {
  background: var(--accent-success);
  color: white;
}

.decision-btn.skip {
  background: rgba(113, 113, 122, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(113, 113, 122, 0.3);
}

.decision-btn.skip:hover,
.decision-btn.skip.active {
  background: rgba(113, 113, 122, 0.2);
  border-color: var(--text-muted);
}

.decision-btn.skip.active {
  background: var(--text-muted);
  color: white;
}

/* Output Card */
.output-card textarea {
  margin-bottom: 0;
}

/* Card Header Row */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-header-row h2 {
  margin-bottom: 0;
}

/* PR List */
.pr-list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.pr-list-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
}

.pr-list-item:last-child {
  margin-bottom: 0;
}

.pr-number {
  font-weight: 600;
  color: var(--accent-primary);
  font-size: 14px;
  min-width: 50px;
}

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

.pr-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.pr-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.pr-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pr-comments-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.pr-comments-badge.has-comments {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent-warning);
}

/* Detail Header */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* Selected PR Info */
#selected-pr-info {
  margin-bottom: 0;
}

.selected-pr-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.selected-pr-number {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-primary);
}

.selected-pr-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.selected-pr-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

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

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: var(--accent-success);
  color: white;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

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

/* Hidden */
.hidden {
  display: none !important;
}

/* Auth Section */
.auth-section {
  margin-bottom: 12px;
}

.btn-github {
  width: 100%;
  padding: 12px 16px;
  background: #24292e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.btn-github:hover {
  background: #2f363d;
  transform: translateY(-1px);
}

[data-theme='dark'] .btn-github {
  background: #f0f0f0;
  color: #24292e;
}

[data-theme='dark'] .btn-github:hover {
  background: #ffffff;
}

.auth-logged-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.btn-logout {
  padding: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-error);
}

/* GitHub Auth Status in Settings */
.github-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  margin-bottom: 16px;
}

.github-status.connected {
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.github-status.disconnected {
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.github-status-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.github-status-info {
  flex: 1;
}

.github-status-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.github-status-label {
  font-size: 12px;
  color: var(--accent-success);
}

.github-status.disconnected .github-status-label {
  color: var(--text-muted);
}

.github-status-actions {
  display: flex;
  gap: 10px;
}

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

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Test Runner */
.test-prereq-card {
  padding: 16px 20px;
}

.test-prereq {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.test-prereq-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.test-prereq-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.test-prereq-badge.unit {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.test-prereq-badge.integration {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
}

.test-prereq-badge.e2e {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-success);
}

.test-quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

/* Test List Groups */
.test-group {
  margin-bottom: 16px;
}

.test-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}

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

.test-group-toggle {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.test-group.collapsed .test-group-toggle {
  transform: rotate(-90deg);
}

.test-group-name {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.test-group-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.test-group-badge.unit {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.test-group-badge.integration {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
}

.test-group-badge.e2e {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-success);
}

.test-group-count {
  font-size: 12px;
  color: var(--text-muted);
}

.test-group-results {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.test-result-count {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.test-result-count.passed {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-success);
}

.test-result-count.failed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-error);
}

.test-group-items {
  padding-left: 16px;
}

.test-group.collapsed .test-group-items {
  display: none;
}

/* Test Items */
.test-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  margin-bottom: 4px;
}

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

.test-item-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-primary);
  transition: all 0.2s;
  flex-shrink: 0;
  position: relative;
}

.test-item-checkbox:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.test-item-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  margin-top: -1px;
}

/* Test Result Indicators */
.test-item-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.test-item-status.passed {
  background: var(--accent-success);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.test-item-status.failed {
  background: var(--accent-error);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.test-item-status.running {
  background: var(--accent-warning);
  animation: pulse 1s ease-in-out infinite;
}

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

.test-item.passed {
  background: rgba(34, 197, 94, 0.05);
}

.test-item.failed {
  background: rgba(239, 68, 68, 0.05);
}

.test-item-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.test-item-category {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Test Output */
.test-output {
  background: #1a1a2e;
  border-radius: 8px;
  padding: 16px;
  min-height: 200px;
  max-height: 500px;
  overflow-y: auto;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

[data-theme='light'] .test-output {
  background: #1e293b;
}

.test-output-line {
  display: block;
  padding: 1px 0;
}

.test-output-line.error {
  color: #f87171;
}

.test-output-line.pass {
  color: #4ade80;
}

.test-output-line.fail {
  color: #f87171;
}

.test-output-line.info {
  color: #94a3b8;
}

.test-output-line.default {
  color: #e2e8f0;
}

/* Test Running State */
.test-running .btn-run {
  opacity: 0.5;
  pointer-events: none;
}

/* Empty Test List */
.test-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.test-empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Performance Profiler */
.endpoint-input-row {
  display: flex;
  gap: 10px;
}

.endpoint-method-select {
  width: 100px;
  flex-shrink: 0;
}

.branch-select-row {
  display: flex;
  gap: 8px;
}

.branch-select {
  flex: 1;
}

.btn-icon {
  padding: 8px;
  min-width: auto;
}

.code-path-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 20px;
}

.code-path-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 8px;
}

.code-path-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.code-path-icon.controller {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.code-path-icon.service {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
}

.code-path-icon.repository {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-success);
}

.code-path-icon.other {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-secondary);
}

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

.code-path-file {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  margin-bottom: 4px;
  word-break: break-all;
}

.code-path-method {
  font-size: 12px;
  color: var(--text-muted);
}

.code-path-lines {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Analysis Results */
.analysis-results {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
}

.analysis-results h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.analysis-results h3:first-child {
  margin-top: 0;
}

.analysis-results ul {
  margin: 8px 0;
  padding-left: 20px;
}

.analysis-results li {
  margin-bottom: 8px;
}

.analysis-results code {
  background: var(--code-bg);
  color: var(--code-color);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 13px;
}

.analysis-results pre {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 12px;
}

.analysis-section {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  border-left: 4px solid var(--accent-primary);
}

.analysis-section.critical {
  border-left-color: var(--accent-error);
  background: rgba(239, 68, 68, 0.05);
}

.analysis-section.warning {
  border-left-color: var(--accent-warning);
  background: rgba(245, 158, 11, 0.05);
}

.analysis-section.info {
  border-left-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.analysis-section.success {
  border-left-color: var(--accent-success);
  background: rgba(34, 197, 94, 0.05);
}

.analysis-section-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-section.critical .analysis-section-title {
  color: var(--accent-error);
}

.analysis-section.warning .analysis-section-title {
  color: var(--accent-warning);
}

.analysis-section.info .analysis-section-title {
  color: var(--accent-primary);
}

.analysis-section.success .analysis-section-title {
  color: var(--accent-success);
}

.severity-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.severity-badge.critical {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-error);
}

.severity-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-warning);
}

.severity-badge.info {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
}

/* Loading animation for analysis */
.analysis-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
}

.analysis-loading-icon {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.analysis-loading-text {
  font-size: 14px;
}

/* Profiler Stats */
.profiler-stats {
  display: flex;
  gap: 16px;
}

.profiler-actions {
  margin-bottom: 16px;
}

/* Profiler Metrics */
.profiler-metrics {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.profiler-metrics.hidden {
  display: none;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* Profiler Issues List */
.profiler-issues-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profiler-issue-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  overflow: hidden;
}

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

.profiler-issue-card.selected-fix {
  border-color: var(--accent-success);
  background: rgba(34, 197, 94, 0.05);
}

.profiler-issue-card.selected-skip {
  border-color: var(--text-muted);
  opacity: 0.6;
}

.profiler-issue-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.profiler-issue-summary:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] .profiler-issue-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.profiler-issue-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.profiler-issue-card.expanded .profiler-issue-toggle {
  transform: rotate(90deg);
}

.profiler-issue-headline {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.profiler-issue-details {
  display: none;
  padding: 0 20px 20px 56px;
  border-top: 1px solid var(--border-color);
}

.profiler-issue-card.expanded .profiler-issue-details {
  display: block;
}

.profiler-issue-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.profiler-issue-body p {
  margin-bottom: 12px;
}

.profiler-issue-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.profiler-issue-body code {
  background: var(--code-bg);
  color: var(--code-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 13px;
}

.profiler-issue-body pre {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.profiler-issue-body ul,
.profiler-issue-body ol {
  margin: 8px 0 12px 20px;
}

.profiler-issue-body li {
  margin-bottom: 6px;
}

.profiler-issue-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.profiler-issue-checkbox {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.profiler-issue-checkbox input {
  display: none;
}

.profiler-issue-checkbox label {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--bg-secondary);
}

.profiler-issue-checkbox label:hover {
  border-color: var(--text-muted);
}

.profiler-issue-checkbox label svg {
  opacity: 0.3;
  transition: opacity 0.15s ease;
}

.profiler-issue-checkbox label.fix-label {
  color: var(--accent-success);
}

.profiler-issue-checkbox label.skip-label {
  color: var(--accent-error);
}

.profiler-issue-checkbox input:checked + label {
  border-color: currentColor;
  background: currentColor;
}

.profiler-issue-checkbox input:checked + label svg {
  opacity: 1;
  color: white;
}

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

.profiler-issue-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.profiler-issue-title .severity-badge {
  flex-shrink: 0;
}

.severity-badge.high {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-error);
}

.severity-badge.medium {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
}

.severity-badge.low {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.profiler-issue-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

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

.profiler-issue-location code {
  background: var(--code-bg);
  color: var(--code-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 11px;
}

.profiler-issue-suggestion {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 3px solid var(--accent-success);
}

.profiler-issue-suggestion-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-success);
  margin-bottom: 6px;
}

.profiler-issue-suggestion-content {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.profiler-issue-suggestion-content code {
  background: var(--code-bg);
  color: var(--code-color);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 12px;
}

/* Raw Analysis Details */
.raw-analysis-details {
  margin-top: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.raw-analysis-details summary {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
}

.raw-analysis-details summary:hover {
  color: var(--text-secondary);
}

.raw-analysis-details[open] .analysis-results {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
}

/* Profiler Output */
#profiler-output {
  width: 100%;
  min-height: 200px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  resize: vertical;
  margin-bottom: 16px;
}

#profiler-output:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* No issues state */
.profiler-no-issues {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.profiler-no-issues svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.profiler-no-issues h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-success);
  margin-bottom: 8px;
}

.profiler-no-issues p {
  font-size: 14px;
}

/* Statistics */
.stats-auth-step {
  margin-top: 16px;
}

.stats-auth-btn {
  margin-top: 16px;
}

.stats-otp-hint {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

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

.stats-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

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

.stats-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stats-card-icon.volume {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  color: var(--accent-success);
}

.stats-card-icon.transactions {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  color: var(--accent-primary);
}

.stats-card-icon.date {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  color: var(--accent-warning);
}

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

.stats-card-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stats-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stats-card-value-small {
  font-size: 16px;
  font-weight: 600;
}

/* Stats Breakdown */
.stats-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.stats-breakdown-list {
  max-height: 300px;
  overflow-y: auto;
}

.stats-breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.stats-breakdown-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stats-breakdown-item:nth-child(1) .stats-breakdown-rank {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}

.stats-breakdown-item:nth-child(2) .stats-breakdown-rank {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: white;
}

.stats-breakdown-item:nth-child(3) .stats-breakdown-rank {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
}

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

.stats-breakdown-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-breakdown-bar-container {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.stats-breakdown-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.stats-breakdown-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.stats-breakdown-volume {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-success);
}

.stats-breakdown-count {
  font-size: 11px;
  color: var(--text-muted);
}

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

.stats-breakdown-fee {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--accent-success);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* Partner Breakdown */
.stats-partner-item {
  border-bottom: 1px solid var(--border-color);
}

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

.stats-partner-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  list-style: none;
}

.stats-partner-summary::-webkit-details-marker {
  display: none;
}

.stats-partner-summary::before {
  content: '▶';
  font-size: 8px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.stats-partner-item[open] .stats-partner-summary::before {
  transform: rotate(90deg);
}

.stats-partner-summary .stats-breakdown-label {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stats-partner-item:nth-child(1) .stats-breakdown-rank {
  background: linear-gradient(135deg, #ffd700, #ffb700);
  color: #000;
}

.stats-partner-item:nth-child(2) .stats-breakdown-rank {
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
  color: #000;
}

.stats-partner-item:nth-child(3) .stats-breakdown-rank {
  background: linear-gradient(135deg, #cd7f32, #a0522d);
  color: #fff;
}

.stats-partner-details {
  padding: 8px 12px 12px;
  background: var(--bg-tertiary);
  margin: 4px 0 8px 34px;
  border-radius: 8px;
  border-left: 3px solid var(--accent-primary);
}

.partner-crypto-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.partner-crypto-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-secondary);
  border-radius: 16px;
  font-size: 12px;
  border: 1px solid var(--border-color);
}

.partner-crypto-name {
  font-weight: 600;
  color: var(--text-primary);
}

.partner-crypto-stats {
  color: var(--text-muted);
  font-size: 11px;
}

.partner-crypto-item .partner-crypto-fiat {
  color: var(--accent-success);
  font-weight: 500;
}

.stats-partner-summary .stats-breakdown-values {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.stats-partner-summary .stats-breakdown-volume {
  font-size: 14px;
}

.stats-partner-summary .stats-breakdown-count {
  font-size: 12px;
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Release Notes */
.rn-refresh-btn {
  margin-top: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.rn-progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin: 16px 0;
}

.rn-progress-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.rn-progress-status {
  font-size: 13px;
  color: var(--text-muted);
}

.rn-progress-details {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.rn-output {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 20px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.rn-output-section {
  margin-bottom: 24px;
}

.rn-output-section:last-child {
  margin-bottom: 0;
}

.rn-output-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rn-output-title.live {
  color: var(--accent-success);
}

.rn-output-title.pending {
  color: var(--accent-warning);
}

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

.rn-output-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.rn-output-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

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

.rn-commits-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.rn-commits-summary:hover {
  color: var(--text-primary);
}

.rn-commits-count {
  font-size: 12px;
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: 12px;
  color: var(--text-muted);
}

.rn-commits-list {
  margin-top: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.rn-commit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid var(--border-color);
}

.rn-commit.live {
  border-left-color: var(--accent-success);
}

.rn-commit.pending {
  border-left-color: var(--accent-warning);
}

.rn-commit.pr {
  border-left-color: var(--accent-primary);
}

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

.rn-commit-message {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  word-break: break-word;
}

.rn-commit-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rn-commit-hash {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.rn-commit-files {
  color: var(--accent-primary);
}

.rn-commit-generated {
  font-size: 12px;
  color: var(--accent-success);
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 6px;
  display: inline-block;
}

.rn-commit-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.rn-commit-badge.live {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-success);
}

.rn-commit-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
}

.rn-commit-badge.pr {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

/* Mobile Header - Hidden on desktop */
.mobile-header {
  display: none;
}

.mobile-overlay {
  display: none;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }

  .main-content {
    margin-left: 200px;
    padding: 24px;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  /* Mobile Header */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
  }

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

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

  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .hamburger-btn:hover,
  .hamburger-btn:active {
    background: var(--bg-tertiary);
  }

  /* Mobile Overlay */
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Sidebar - Hidden by default, slide in from left */
  .sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
  }

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

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

  .sidebar-nav {
    flex-direction: column;
    padding: 8px;
    gap: 4px;
  }

  .nav-item {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
  }

  .sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
  }

  /* Main Content - Full width */
  .main-content {
    margin-left: 0 !important;
    margin-top: 56px;
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px;
    min-height: calc(100vh - 56px);
    box-sizing: border-box;
  }

  /* Sections - full width on mobile */
  .section {
    max-width: 100% !important;
    width: 100%;
  }

  /* Section headers */
  .section-header {
    margin-bottom: 20px;
  }

  .section-header h1 {
    font-size: 24px;
  }

  .section-header p {
    font-size: 14px;
  }

  /* Cards */
  .card {
    padding: 16px;
    border-radius: 12px;
  }

  .card h2 {
    font-size: 16px;
  }

  /* Forms */
  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-group {
    min-width: 100%;
  }

  .form-group label {
    font-size: 13px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
  }

  .form-group small {
    font-size: 12px;
  }

  /* Buttons */
  .btn {
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
  }

  .btn-sm {
    padding: 8px 12px;
    width: auto;
  }

  .card > .btn:last-child,
  .form-group + .btn {
    margin-top: 16px;
  }

  /* Stats */
  .stats-header {
    flex-direction: column;
    gap: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

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

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

  /* PR List */
  .pr-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
  }

  .pr-info {
    width: 100%;
  }

  .pr-title {
    font-size: 14px;
  }

  .pr-meta {
    font-size: 12px;
    flex-wrap: wrap;
  }

  .pr-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .pr-actions .btn {
    flex: 1;
  }

  /* Test Runner */
  .test-type-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .test-type-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13px;
  }

  .test-list {
    max-height: 300px;
  }

  .test-item {
    padding: 10px 12px;
  }

  .test-output {
    font-size: 12px;
    padding: 12px;
    max-height: 400px;
  }

  /* Release Notes */
  .rn-commits-list {
    gap: 12px;
  }

  .rn-commit-card {
    padding: 12px;
  }

  .rn-commit-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .rn-commit-hash {
    font-size: 11px;
  }

  .rn-commit-message {
    font-size: 13px;
  }

  .rn-output-section h4 {
    font-size: 14px;
  }

  /* Profiler */
  .profiler-form {
    flex-direction: column;
  }

  .profiler-form .form-group {
    min-width: 100%;
  }

  .code-path-item {
    padding: 12px;
  }

  .code-path-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* GitHub status */
  .github-status {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .github-status-avatar {
    width: 48px;
    height: 48px;
  }

  .github-status-actions {
    width: 100%;
  }

  .github-status-actions .btn {
    width: 100%;
  }

  /* Tables - make scrollable */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }

  table {
    min-width: 500px;
  }

  /* Checkboxes */
  .checkbox-group {
    flex-direction: column;
    gap: 12px;
  }

  .checkbox-item {
    padding: 12px;
  }

  /* Progress */
  .rn-progress-bar {
    height: 6px;
  }

  /* Auth buttons in header */
  .auth-buttons {
    gap: 8px;
  }

  .auth-buttons .btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Modals/Overlays */
  .modal {
    padding: 16px;
    margin: 16px;
    max-height: calc(100vh - 32px);
  }

  /* Toast notifications */
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    transform: none;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .mobile-header-title {
    font-size: 14px;
  }

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