/**
 * Dev Analyzer Styles
 * Styling for the log analysis results and ROI calculator
 */

/* ============================================
   Demo Banner
   ============================================ */

#dev-demo-banner-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}

.dev-demo-banner {
  background: rgba(139, 148, 158, 0.06);
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dev-demo-banner-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dev-demo-badge {
  background: rgba(234, 179, 8, 0.08);
  color: rgba(234, 179, 8, 0.75);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.dev-demo-text {
  color: #8b949e;
  font-size: 0.8rem;
}

.dev-demo-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-left: 1px solid #30363d;
  padding-left: 0.75rem;
}

.dev-demo-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.dev-demo-action-secondary {
  background: #21262d;
  border: 1px solid #30363d;
  color: #e6edf3;
}

.dev-demo-action-secondary:hover {
  background: #30363d;
  border-color: #444c56;
  color: #e6edf3;
}

.dev-demo-action-primary {
  background: rgba(138, 115, 255, 0.1);
  border: 1px solid rgba(138, 115, 255, 0.35);
  color: #e6edf3;
  animation: paste-btn-glow 2s ease-in-out 0.5s 2;
}

.dev-demo-action-primary:hover {
  background: rgba(138, 115, 255, 0.18);
  border-color: rgba(138, 115, 255, 0.55);
}

/* Fancy tooltips */
.dev-demo-badge[data-tooltip] {
  position: relative;
  cursor: help;
}

.dev-demo-badge[data-tooltip]::before,
.dev-demo-badge[data-tooltip]::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.dev-demo-badge[data-tooltip]::before {
  content: attr(data-tooltip);
  top: calc(100% + 8px);
  background: #1c2128;
  color: #e6edf3;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #30363d;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  letter-spacing: 0;
}

.dev-demo-badge[data-tooltip]::after {
  content: '';
  top: calc(100% + 2px);
  border: 5px solid transparent;
  border-bottom-color: #30363d;
}

.dev-demo-badge[data-tooltip]:hover::before,
.dev-demo-badge[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dev-demo-action-btn[data-tooltip] {
  position: relative;
}

.dev-demo-action-btn[data-tooltip]::before,
.dev-demo-action-btn[data-tooltip]::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.dev-demo-action-btn[data-tooltip]::before {
  content: attr(data-tooltip);
  top: calc(100% + 8px);
  background: #1c2128;
  color: #e6edf3;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #30363d;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  letter-spacing: 0;
}

.dev-demo-action-btn[data-tooltip]::after {
  content: '';
  top: calc(100% + 2px);
  border: 5px solid transparent;
  border-bottom-color: #30363d;
}

.dev-demo-action-btn[data-tooltip]:hover::before,
.dev-demo-action-btn[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

.dev-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .dev-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 500px) {
  .dev-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dev-stat-card {
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.dev-stat-card:hover {
  background: linear-gradient(135deg, #21262d 0%, #2d333b 100%);
  border-color: #444c56;
}

.dev-stat-card.dev-stat-highlight {
  background: linear-gradient(135deg, rgba(23, 225, 255, 0.1), rgba(138, 115, 255, 0.1));
  border-color: rgba(23, 225, 255, 0.3);
}

.dev-stat-card.dev-stat-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(249, 115, 22, 0.1));
  border-color: rgba(239, 68, 68, 0.3);
}

.dev-stat-card.dev-stat-error .dev-stat-value {
  color: #ef4444;
}

.dev-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e6edf3;
  line-height: 1.2;
}

.dev-stat-highlight .dev-stat-value {
  color: #17e1ff;
}

.dev-stat-label {
  font-size: 0.8rem;
  color: #8b949e;
  margin-top: 0.25rem;
}

.dev-stat-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1c2128;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: #e6edf3;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: none;
}

/* Bridge to prevent gap between card and tooltip */
.dev-stat-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}

.dev-stat-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #30363d;
}

.dev-stat-card:hover .dev-stat-tooltip,
.dev-stat-tooltip:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dev-stat-tooltip-text {
  margin-bottom: 0.35rem;
}

.dev-stat-tooltip-link {
  display: block;
  color: #17e1ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.7rem;
  transition: color 0.15s;
}

.dev-stat-tooltip-link:hover {
  color: #58a6ff;
  text-decoration: underline;
}

/* ============================================
   Top Patterns Table
   ============================================ */

.dev-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.dev-top-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #e6edf3;
}

.dev-top-coverage {
  background: rgba(23, 225, 255, 0.15);
  color: #17e1ff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.dev-table-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #30363d;
  border-radius: 8px;
}

.dev-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dev-table th,
.dev-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #21262d;
}

.dev-table th {
  background: #161b22;
  color: #8b949e;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Table header tooltips */
.dev-th-tooltip {
  position: relative;
  cursor: help;
}

.dev-th-tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #e6edf3;
  min-width: 220px;
  max-width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  pointer-events: none;
}

.dev-th-tip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 20px;
  border: 6px solid transparent;
  border-bottom-color: #30363d;
}

.dev-th-tooltip:hover .dev-th-tip,
.dev-th-tip:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dev-th-tip-text {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.dev-th-tip-link {
  display: inline-block;
  color: #17e1ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.75rem;
  transition: color 0.15s;
}

.dev-th-tip-link:hover {
  color: #58a6ff;
  text-decoration: underline;
}

.dev-th-tip-text:last-child {
  margin-bottom: 0;
}

.dev-table tbody tr {
  background: #0d1117;
  transition: background 0.15s ease;
}

.dev-table tbody tr:hover {
  background: #161b22;
}

.dev-table tbody tr:last-child td {
  border-bottom: none;
}


.dev-level-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.dev-badges-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.dev-pattern-cell {
  max-width: 300px;
  position: relative;
}

.dev-pattern-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e6edf3;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.85rem;
  cursor: help;
}

/* Pattern Tooltip */
.dev-pattern-cell:hover .dev-pattern-tooltip {
  visibility: visible;
  opacity: 1;
}

.dev-pattern-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1000;
  background: #1c2128;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  max-width: 500px;
  min-width: 300px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.dev-pattern-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 20px;
  border: 8px solid transparent;
  border-bottom-color: #30363d;
}

.dev-pattern-tooltip-label {
  font-size: 0.7rem;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.dev-pattern-tooltip-text {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.8rem;
  color: #e6edf3;
  word-break: break-all;
  line-height: 1.4;
}

.dev-service {
  color: #8b949e;
  font-size: 0.85rem;
}

.dev-bytes {
  color: #e6edf3;
  font-weight: 500;
  white-space: nowrap;
}

.dev-pct {
  width: 160px;
  padding-right: 1rem;
}

.dev-pct-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dev-pct-bar {
  height: 8px;
  background: linear-gradient(90deg, #17e1ff, #8a73ff);
  border-radius: 4px;
  min-width: 4px;
  flex: 1;
  max-width: 80px;
}

.dev-pct-value {
  font-weight: 600;
  color: #17e1ff;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ============================================
   Top Patterns Expand/Collapse
   ============================================ */

.dev-pattern-extra {
  display: none;
}

.dev-pattern-extra.dev-pattern-visible {
  display: table-row;
  animation: dev-row-fade-in 0.3s ease forwards;
}

@keyframes dev-row-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dev-row-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-4px); }
}

.dev-expand-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0;
  margin-top: 0.75rem;
  background: rgba(33, 38, 45, 0.6);
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #8b949e;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dev-expand-toggle:hover {
  background: #21262d;
  color: #e6edf3;
  border-color: #444c56;
}

.dev-expand-toggle svg {
  transition: transform 0.3s ease;
}

.dev-expand-toggle.dev-expanded svg {
  transform: rotate(180deg);
}

/* ============================================
   Action Buttons (below Top 10 table)
   ============================================ */

.dev-action-buttons {
  display: flex;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-bottom: 1.5rem;
  justify-content: center;
}

.dev-action-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dev-action-btn-primary {
  background: #21262d;
  border: 1px solid #30363d;
  color: #e6edf3;
}

.dev-action-btn-primary:hover {
  background: #30363d;
  border-color: #444c56;
}

.dev-action-btn-secondary {
  background: #21262d;
  border: 1px solid #30363d;
  color: #8b949e;
}

.dev-action-btn-secondary:hover {
  background: #30363d;
  border-color: #444c56;
  color: #e6edf3;
}

.dev-action-btn-demo {
  background: #21262d;
  border: 1px solid #30363d;
  color: #e6edf3;
  text-decoration: none;
}

.dev-action-btn-demo:hover {
  background: #30363d;
  border-color: #444c56;
  color: #e6edf3;
}

.dev-action-btn-wrapper {
  position: relative;
}

.dev-action-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1c2128 0%, #21262d 100%);
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: #e6edf3;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.dev-action-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #30363d;
}

.dev-action-btn-wrapper:hover .dev-action-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* ============================================
   Charts Row (Concentration + Severity)
   ============================================ */

.dev-charts-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.dev-chart-card {
  flex: 1;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1rem;
}

.dev-chart-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 0.75rem;
}

.dev-chart-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* SVG Donut */
.dev-donut-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.dev-svg-donut {
  width: 100%;
  height: 100%;
}

.dev-svg-slice {
  cursor: pointer;
  transition: opacity 0.15s;
}

.dev-svg-slice:hover {
  opacity: 0.8;
}

.dev-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.dev-donut-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #17e1ff;
  line-height: 1;
}

.dev-donut-label {
  font-size: 0.65rem;
  color: #8b949e;
  margin-top: 3px;
  text-align: center;
}

/* Individual slice tooltip */
.dev-slice-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #1c2128;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: none;
  color: #e6edf3;
  max-width: 300px;
  word-wrap: break-word;
}

.dev-slice-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 30px;
  border: 6px solid transparent;
  border-top-color: #30363d;
}

.dev-chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.dev-chart-legend-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #e6edf3;
}

.dev-chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  order: -1;
}

.dev-chart-pct {
  color: #17e1ff;
  font-weight: 600;
  margin-left: 0.25rem;
}

.dev-chart-link {
  display: block;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #30363d;
  font-size: 0.75rem;
  color: #8b949e;
  text-decoration: none;
  transition: color 0.15s;
}

.dev-chart-link:hover {
  color: #17e1ff;
}

/* ============================================
   ROI Calculator
   ============================================ */

.dev-roi-calculator {
  background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

/* ROI Inputs Row */
.dev-roi-inputs-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dev-roi-input-box {
  flex: 1;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.dev-roi-box-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* Combined cost inputs box */
.dev-roi-cost-inputs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.dev-roi-input-row {
  flex: 1;
}

@media (max-width: 600px) {
  .dev-roi-cost-inputs {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ROI Apps Row (Regulator + Optimizer boxes) */
.dev-roi-apps-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 700px) {
  .dev-roi-inputs-row,
  .dev-roi-apps-row {
    flex-direction: column;
  }
}

.dev-roi-app-box {
  flex: 1;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1rem;
  transition: opacity 0.2s, border-color 0.2s;
}

.dev-roi-app-box.dev-roi-app-disabled {
  opacity: 0.5;
  border-color: #21262d;
}

.dev-roi-app-box-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dev-roi-app-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dev-roi-app-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dev-roi-app-regulator .dev-roi-app-icon,
.dev-roi-app-optimizer .dev-roi-app-icon {
  color: #8b949e;
}

.dev-roi-app-box-title {
  font-weight: 600;
  color: #e6edf3;
  font-size: 0.95rem;
}

.dev-roi-app-box .dev-roi-app-link {
  margin-left: auto;
  font-size: 0.75rem;
  color: #8b949e;
  text-decoration: none;
  transition: color 0.15s;
}

.dev-roi-app-box .dev-roi-app-link:hover {
  color: #17e1ff;
}

.dev-roi-app-desc {
  font-size: 0.8rem;
  color: #8b949e;
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.dev-roi-app-impact {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #30363d;
}

.dev-roi-impact-label {
  font-size: 0.75rem;
  color: #8b949e;
}

.dev-roi-impact-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #17e1ff;
}

.dev-roi-impact-note {
  font-size: 0.7rem;
  color: #6b7280;
}

/* Toggle Switch */
.dev-roi-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dev-roi-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.dev-roi-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dev-roi-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #30363d;
  transition: background-color 0.2s;
  border-radius: 24px;
}

.dev-roi-toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #8b949e;
  transition: transform 0.2s, background-color 0.2s;
  border-radius: 50%;
}

.dev-roi-toggle input:checked + .dev-roi-toggle-slider {
  background-color: rgba(23, 225, 255, 0.3);
}

.dev-roi-toggle input:checked + .dev-roi-toggle-slider::before {
  transform: translateX(20px);
  background-color: #17e1ff;
}

.dev-roi-toggle-label {
  font-size: 0.85rem;
  color: #e6edf3;
}

/* Regulator slider color */
.dev-roi-slider-regulator::-webkit-slider-thumb {
  background: #ef4444;
}

.dev-roi-slider-regulator::-moz-range-thumb {
  background: #ef4444;
}

.dev-roi-app-regulator .dev-roi-slider-value {
  color: #ef4444;
}

.dev-roi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.dev-roi-calculator h3 {
  margin: 0 0 0.25rem 0;
  color: #e6edf3;
  font-size: 1.25rem;
}

.dev-roi-subtitle {
  color: #8b949e;
  font-size: 0.9rem;
  margin: 0 0 1.5rem 0;
}

.dev-roi-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.dev-roi-input-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.dev-roi-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: #8b949e;
}

.dev-roi-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #30363d;
  color: #8b949e;
  font-size: 0.7rem;
  cursor: help;
}

.dev-roi-select {
  width: 100%;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  color: #e6edf3;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.dev-roi-select:hover,
.dev-roi-select:focus {
  border-color: #58a6ff;
  outline: none;
}

.dev-roi-custom-price {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.dev-roi-custom-price-label {
  color: #8b949e;
  font-size: 0.85rem;
  font-weight: 500;
}

.dev-roi-custom-input {
  width: 70px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  color: #17e1ff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.2s;
}

.dev-roi-custom-input:hover,
.dev-roi-custom-input:focus {
  border-color: #17e1ff;
  outline: none;
}

.dev-roi-custom-input::-webkit-inner-spin-button,
.dev-roi-custom-input::-webkit-outer-spin-button {
  opacity: 1;
}

.dev-roi-slider-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dev-roi-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #30363d;
  border-radius: 3px;
  outline: none;
}

.dev-roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #17e1ff;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.dev-roi-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.dev-roi-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #17e1ff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.dev-roi-slider-value {
  font-weight: 600;
  color: #17e1ff;
  font-size: 0.8rem;
  white-space: nowrap;
}

.dev-roi-hint {
  font-size: 0.8rem;
  color: #8b949e;
  font-style: italic;
}

/* App Sections in ROI */
.dev-roi-app-section {
  background: rgba(30, 35, 42, 0.5);
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.dev-roi-app-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #30363d;
}

.dev-roi-app-icon {
  width: 24px;
  height: 24px;
}

.dev-roi-app-name {
  font-weight: 600;
  color: #e6edf3;
  font-size: 0.95rem;
}

.dev-roi-app-link {
  margin-left: auto;
  font-size: 0.8rem;
  color: #8b949e;
  text-decoration: none;
}

.dev-roi-app-link:hover {
  color: #17e1ff;
}

/* Compression Info */
.dev-roi-compression-info {
  text-align: center;
  padding: 0.5rem 0;
}

.dev-roi-compression-achieved {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
}

.dev-roi-compression-value {
  font-size: 2rem;
  font-weight: 700;
  color: #17e1ff;
}

.dev-roi-compression-label {
  font-size: 0.9rem;
  color: #8b949e;
}

/* Flow step colors */
.dev-roi-flow-regulator .dev-roi-flow-label {
  color: #ef4444;
}

.dev-roi-flow-optimizer .dev-roi-flow-label {
  color: #17e1ff;
}

/* Breakdown improvements */
.dev-roi-breakdown-app {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dev-roi-breakdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Flow Diagram */
.dev-roi-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #21262d;
  gap: 0.5rem;
}

.dev-roi-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.dev-roi-flow-label {
  font-size: 0.7rem;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dev-roi-flow-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e6edf3;
  margin-top: 0.25rem;
}

.dev-roi-flow-value.dev-roi-highlight {
  color: #17e1ff;
}

.dev-roi-flow-arrow {
  color: #6b7280;
  font-size: 1.25rem;
}

/* ROI Results */

.dev-roi-results {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1.25rem;
}

.dev-roi-comparison {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #21262d;
}

.dev-roi-before,
.dev-roi-after {
  flex: 1;
  text-align: center;
}

.dev-roi-arrow {
  color: #8b949e;
  font-size: 1.5rem;
}

.dev-roi-results .dev-roi-label {
  font-size: 0.8rem;
  color: #8b949e;
  font-weight: 400;
  justify-content: center;
}

.dev-roi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #e6edf3;
  margin-top: 0.25rem;
}

.dev-roi-value.dev-roi-highlight {
  color: #17e1ff;
}

.dev-roi-savings-box {
  background: linear-gradient(135deg, rgba(23, 225, 255, 0.1), rgba(138, 115, 255, 0.1));
  border: 1px solid rgba(23, 225, 255, 0.3);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
}

/* Potential savings state (when both tools are off) */
.dev-roi-savings-box.dev-roi-potential {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(249, 115, 22, 0.08));
  border: 1px dashed rgba(234, 179, 8, 0.4);
}

.dev-roi-savings-box.dev-roi-potential .dev-roi-savings-label {
  color: #eab308;
}

.dev-roi-savings-box.dev-roi-potential .dev-roi-savings-value {
  color: #eab308;
}

.dev-roi-savings-box.dev-roi-potential .dev-roi-savings-pct {
  color: #f97316;
}

.dev-roi-savings-label {
  font-size: 0.85rem;
  color: #8b949e;
  margin-bottom: 0.25rem;
}

.dev-roi-savings-value {
  font-size: 2rem;
  font-weight: 700;
  color: #17e1ff;
  line-height: 1.2;
}

.dev-roi-savings-pct {
  font-size: 0.9rem;
  color: #8a73ff;
  margin-top: 0.25rem;
}

/* ROI Action Buttons (below calculator) */
.dev-roi-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.dev-roi-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dev-roi-btn-primary {
  background: linear-gradient(135deg, #17e1ff, #8a73ff);
  color: #0d1117;
}

.dev-roi-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 225, 255, 0.3);
}

.dev-roi-btn-secondary {
  background: #21262d;
  border: 1px solid #30363d;
  color: #e6edf3;
}

.dev-roi-btn-secondary:hover {
  background: #30363d;
  border-color: #444c56;
}

.dev-roi-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid #21262d;
  padding-top: 1rem;
}

.dev-roi-breakdown-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #8b949e;
}

.dev-roi-breakdown-item span:last-child {
  color: #e6edf3;
  font-weight: 500;
}

/* ============================================
   Empty State
   ============================================ */

.dev-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #161b22;
  border: 1px dashed #30363d;
  border-radius: 12px;
  max-width: 500px;
  margin: 2rem auto;
}

.dev-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.dev-empty-state h3 {
  color: #e6edf3;
  margin: 0 0 0.5rem 0;
}

.dev-empty-state p {
  color: #8b949e;
  font-size: 0.95rem;
  margin: 0.5rem 0;
}

.dev-empty-code {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.85rem;
  color: #17e1ff;
  margin: 1rem 0;
  display: inline-block;
}

.dev-empty-hint {
  font-size: 0.85rem;
}

.dev-empty-hint a {
  color: #a78bfa;
}

/* ============================================
   Section Container
   ============================================ */

#dev-analysis-section {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

#dev-analysis-section .padding-section-large {
  padding-bottom: 0.5rem !important;
}

#dev-top-patterns {
  margin-bottom: 0;
  padding-bottom: 0;
}

#dev-analysis-section h3 {
  color: #e6edf3;
  margin-bottom: 1rem;
}

.dev-analysis-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .dev-analysis-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Paste JSON Button
   ============================================ */

.dev-paste-json-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(138, 115, 255, 0.1);
  border: 1px solid rgba(138, 115, 255, 0.35);
  border-radius: 6px;
  color: #e6edf3;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  animation: paste-btn-glow 2s ease-in-out 0.5s 2;
}

.dev-paste-json-btn:hover {
  background: rgba(138, 115, 255, 0.18);
  border-color: rgba(138, 115, 255, 0.55);
}

@keyframes paste-btn-glow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(138, 115, 255, 0.3); }
}

.dev-paste-json-btn svg {
  flex-shrink: 0;
}

/* ============================================
   Paste JSON Modal
   ============================================ */

.dev-paste-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.dev-paste-modal {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.dev-paste-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #30363d;
}

.dev-paste-modal-header h3 {
  margin: 0;
  color: #e6edf3;
  font-size: 1.1rem;
}

.dev-paste-modal-close {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

.dev-paste-modal-close:hover {
  color: #e6edf3;
}

.dev-paste-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

.dev-paste-modal-desc {
  color: #8b949e;
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.dev-paste-modal-desc code {
  background: #0d1117;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #17e1ff;
}

.dev-paste-textarea {
  width: 100%;
  min-height: 200px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1rem;
  color: #e6edf3;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.85rem;
  resize: vertical;
  transition: border-color 0.15s;
}

.dev-paste-textarea:focus {
  outline: none;
  border-color: #17e1ff;
}

.dev-paste-textarea::placeholder {
  color: #484f58;
}

.dev-paste-error {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 0.85rem;
}

.dev-paste-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #30363d;
}

.dev-paste-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.dev-paste-btn-primary {
  background: rgba(23, 225, 255, 0.12);
  border: 1px solid rgba(23, 225, 255, 0.4);
  color: #17e1ff;
}

.dev-paste-btn-primary:hover {
  background: rgba(23, 225, 255, 0.2);
  border-color: rgba(23, 225, 255, 0.6);
}

.dev-paste-btn-secondary {
  background: #21262d;
  border: 1px solid #30363d;
  color: #e6edf3;
}

.dev-paste-btn-secondary:hover {
  background: #30363d;
  border-color: #444c56;
}
