/**
 * Mustang Automotive Calculators - Master Stylesheet
 * Strictly scoped with .mac- prefix to ensure 100% isolation from theme & Elementor styles.
 *
 * Theme Colors:
 * - Background: #11161D
 * - Primary Orange: #FE6802
 * - Card Background: #1A222C
 * - Secondary Card: #202A36
 * - Text Primary: #FFFFFF
 * - Text Muted: #AAB4C0
 */

/* Container & CSS Variables */
.mac-calculator-container {
  --mac-bg: #11161D;
  --mac-card-bg: #1A222C;
  --mac-card-sub-bg: #202A36;
  --mac-orange: #FE6802;
  --mac-orange-hover: #FF7F24;
  --mac-orange-glow: rgba(254, 104, 2, 0.25);
  --mac-text: #FFFFFF;
  --mac-text-muted: #AAB4C0;
  --mac-border: rgba(255, 255, 255, 0.08);
  --mac-border-subtle: rgba(255, 255, 255, 0.05);
  --mac-border-hover: rgba(254, 104, 2, 0.4);
  --mac-radius: 12px;
  --mac-radius-sm: 8px;
  --mac-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mac-font-display: 'Chakra Petch', -apple-system, BlinkMacSystemFont, sans-serif;
  --mac-font-mono: 'JetBrains Mono', monospace;

  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px);
  background: var(--mac-bg);
  color: var(--mac-text);
  font-family: var(--mac-font-sans);
  font-size: 15px;
  line-height: 1.5;
  border-radius: var(--mac-radius);
  border: 1px solid var(--mac-border);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  overflow-x: hidden;
}

.mac-calculator-container *,
.mac-calculator-container *::before,
.mac-calculator-container *::after {
  box-sizing: border-box;
  min-width: 0;
}

/* Header Section */
.mac-calc-header {
  margin-bottom: clamp(20px, 3vw, 32px);
  text-align: left;
}

.mac-badge-pill {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mac-orange);
  background: rgba(254, 104, 2, 0.12);
  border: 1px solid rgba(254, 104, 2, 0.25);
  border-radius: 9999px;
  margin-bottom: 10px;
}

.mac-calc-title {
  font-family: var(--mac-font-display);
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--mac-text);
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
}

.mac-calc-intro {
  color: var(--mac-text-muted);
  font-size: clamp(13px, 1.6vw, 15px);
  line-height: 1.6;
  margin: 0;
  max-width: 900px;
}

/* Tab & Mode Bars */
.mac-regional-presets-bar,
.mac-mode-switcher-bar {
  margin-bottom: 24px;
}

.mac-regional-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mac-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.mac-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.mac-btn-tab {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 8px 16px;
  background: var(--mac-card-bg);
  border: 1px solid var(--mac-border);
  color: var(--mac-text-muted);
  border-radius: var(--mac-radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mac-btn-tab:hover {
  background: var(--mac-card-sub-bg);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.mac-btn-tab.active {
  background: rgba(254, 104, 2, 0.15);
  border-color: var(--mac-orange);
  color: var(--mac-orange);
  box-shadow: 0 0 12px rgba(254, 104, 2, 0.2);
}

/* Two-Column Grid */
.mac-calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr);
  gap: clamp(16px, 2.5vw, 28px);
  align-items: start;
}

.mac-calc-inputs-col,
.mac-calc-results-col {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 20px);
  width: 100%;
}

/* Cards */
.mac-card {
  background: var(--mac-card-bg);
  border: 1px solid var(--mac-border);
  border-radius: var(--mac-radius);
  padding: clamp(16px, 2vw, 24px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease;
}

.mac-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.mac-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mac-border-subtle);
}

.mac-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mac-indicator-original { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.mac-indicator-new { background: var(--mac-orange); box-shadow: 0 0 8px var(--mac-orange); }
.mac-indicator-orange { background: var(--mac-orange); }

.mac-card-title {
  font-family: var(--mac-font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--mac-text);
  margin: 0;
  flex: 1;
}

.mac-tire-tag {
  font-family: var(--mac-font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--mac-border);
  border-radius: 6px;
  color: #fff;
}

.mac-orig-label { color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.mac-new-label { color: var(--mac-orange); border-color: rgba(254, 104, 2, 0.3); }

/* Form Controls */
.mac-inputs-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
}

.mac-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.mac-flex-1 { flex: 1 1 0%; }
.mac-flex-2 { flex: 2 1 0%; }

.mac-form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mac-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mac-input,
.mac-select {
  width: 100%;
  max-width: 100%;
  height: 44px;
  padding: 8px 14px;
  background: var(--mac-card-sub-bg);
  border: 1px solid var(--mac-border);
  border-radius: var(--mac-radius-sm);
  color: var(--mac-text);
  font-family: var(--mac-font-mono);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  outline: none;
}

.mac-input:focus,
.mac-select:focus {
  border-color: var(--mac-orange);
  box-shadow: 0 0 0 3px var(--mac-orange-glow);
  background: #253140;
}

.mac-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23AAB4C0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

.mac-form-hint {
  font-size: 11px;
  color: var(--mac-text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.mac-radio-toggle {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.mac-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
}

.mac-radio-label input[type="radio"] {
  accent-color: var(--mac-orange);
  width: 16px;
  height: 16px;
}

/* Presets & Chips */
.mac-presets-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--mac-border-subtle);
}

.mac-presets-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mac-text-muted);
  margin-bottom: 8px;
}

.mac-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mac-chip {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--mac-border);
  color: var(--mac-text-muted);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.mac-chip:hover {
  background: rgba(254, 104, 2, 0.15);
  border-color: var(--mac-orange);
  color: #fff;
}

.mac-chip.active {
  background: rgba(254, 104, 2, 0.2);
  border-color: var(--mac-orange);
  color: var(--mac-orange);
}

/* Action Buttons */
.mac-actions-row {
  margin-top: 16px;
}

.mac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--mac-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  width: 100%;
}

.mac-btn-secondary {
  background: var(--mac-card-sub-bg);
  border-color: var(--mac-border);
  color: var(--mac-text-muted);
}

.mac-btn-secondary:hover {
  background: #2a3746;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Hero Highlight Result Card */
.mac-hero-card {
  background: linear-gradient(135deg, #1e2936 0%, #151d26 100%);
  border: 1px solid rgba(254, 104, 2, 0.3);
  border-radius: var(--mac-radius);
  padding: clamp(20px, 2.5vw, 28px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mac-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--mac-orange);
}

.mac-hero-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mac-text-muted);
  margin-bottom: 8px;
}

.mac-hero-value-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.mac-hero-currency {
  font-family: var(--mac-font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  color: var(--mac-orange);
}

.mac-hero-value {
  font-family: var(--mac-font-mono);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.mac-hero-unit {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
  color: var(--mac-text-muted);
}

.mac-diff-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(254, 104, 2, 0.15);
  border: 1px solid rgba(254, 104, 2, 0.3);
  color: var(--mac-orange);
  margin-left: auto;
}

.mac-badge-safe {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.mac-badge-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.mac-hero-desc {
  font-size: 13px;
  color: var(--mac-text-muted);
  line-height: 1.5;
  margin: 12px 0 0 0;
}

/* Metric Cards Grid */
.mac-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.mac-metric-card {
  background: var(--mac-card-bg);
  border: 1px solid var(--mac-border);
  border-radius: var(--mac-radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mac-metric-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mac-text-muted);
  margin-bottom: 8px;
}

.mac-metric-main-val {
  font-family: var(--mac-font-mono);
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 700;
  color: #ffffff;
}

.mac-metric-dual {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #ffffff;
}

.mac-sub-label {
  font-size: 11px;
  color: var(--mac-text-muted);
  font-weight: normal;
}

.mac-metric-diff {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--mac-border-subtle);
}

.mac-metric-diff-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--mac-orange);
}

/* Visual SVG Diagrams & Charts */
.mac-tire-svg-container {
  width: 100%;
  background: #141c24;
  border: 1px solid var(--mac-border-subtle);
  border-radius: var(--mac-radius-sm);
  padding: 14px;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mac-tire-svg,
.mac-tire-compare-svg,
.mac-offset-svg {
  width: 100%;
  height: auto;
  max-height: 220px;
  display: block;
}

.mac-visual-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--mac-text-muted);
}

.mac-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mac-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mac-legend-orig { background: #3b82f6; }
.mac-legend-new { background: var(--mac-orange); }

.mac-legend-line {
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.mac-legend-hub { background: #10b981; }

/* Responsive Data Tables */
.mac-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
  border-radius: var(--mac-radius-sm);
  border: 1px solid var(--mac-border-subtle);
}

.mac-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.mac-data-table th,
.mac-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--mac-border-subtle);
  white-space: nowrap;
}

.mac-data-table th {
  background: var(--mac-card-sub-bg);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mac-text-muted);
}

.mac-data-table td {
  color: #fff;
  font-family: var(--mac-font-mono);
}

.mac-data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Footer Info & Formulas */
.mac-calc-footer-info {
  margin-top: clamp(20px, 3vw, 32px);
}

.mac-info-heading {
  font-family: var(--mac-font-display);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 14px 0;
}

.mac-formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mac-formula-item {
  background: var(--mac-card-sub-bg);
  border: 1px solid var(--mac-border-subtle);
  border-radius: var(--mac-radius-sm);
  padding: 12px 14px;
  font-size: 12px;
}

.mac-formula-item strong {
  display: block;
  color: var(--mac-orange);
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
}

.mac-formula-item code {
  font-family: var(--mac-font-mono);
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  font-size: 11px;
}

.mac-formula-item p {
  margin: 4px 0 0 0;
  color: var(--mac-text-muted);
}

.mac-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mac-checklist li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: var(--mac-text-muted);
  line-height: 1.5;
}

.mac-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--mac-orange);
  font-weight: 700;
}

.mac-checklist li strong {
  color: #fff;
}

.mac-disclaimer-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--mac-radius-sm);
}

.mac-disclaimer-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.mac-disclaimer-box p {
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

.mac-disclaimer-box strong {
  color: #f59e0b;
}

/* ========================================================
   RESPONSIVE DESIGN BREAKPOINTS (Down to 320px)
   ======================================================== */

/* Tablet & Below (< 1024px) */
@media screen and (max-width: 1023px) {
  .mac-calc-grid {
    grid-template-columns: 1fr;
  }

  .mac-calc-inputs-col,
  .mac-calc-results-col {
    width: 100%;
  }
}

/* Mobile (< 768px) */
@media screen and (max-width: 767px) {
  .mac-calculator-container {
    padding: 14px;
    border-radius: 8px;
  }

  .mac-btn-tab {
    flex: 1 1 100%;
    min-height: 38px;
    font-size: 12px;
  }

  .mac-inputs-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .mac-inputs-row > .mac-form-group {
    flex: 1 1 calc(50% - 10px);
  }

  .mac-hero-card {
    padding: 18px;
  }

  .mac-hero-value {
    font-size: 34px;
  }
}

/* Small Mobile (< 480px down to 320px) */
@media screen and (max-width: 480px) {
  .mac-calculator-container {
    padding: 12px;
  }

  .mac-inputs-row > .mac-form-group {
    flex: 1 1 100%;
  }

  .mac-metrics-grid {
    grid-template-columns: 1fr;
  }

  .mac-hero-value-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .mac-diff-badge {
    margin-left: 0;
  }

  .mac-data-table th,
  .mac-data-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .mac-formula-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   TOOLS 9–22 DEDICATED COMPONENT STYLES
   ========================================================================== */

/* Stacked Multi-Color Progress Bars */
.mac-progress-stacked {
  display: flex;
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  margin: 10px 0 12px 0;
}

.mac-progress-bar {
  height: 100%;
  transition: width 0.3s ease;
}

.mac-bar-primary { background: #4A90E2; }
.mac-bar-orange  { background: #FE6802; }
.mac-bar-warning { background: #F5A623; }
.mac-bar-success { background: #2ECC71; }
.mac-bar-danger  { background: #E74C3C; }

.mac-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 8px;
}

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

.mac-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Radio Group */
.mac-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mac-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--mac-border);
  border-radius: var(--mac-radius-sm);
  font-size: 13px;
  cursor: pointer;
  color: var(--mac-text);
  transition: all 0.2s;
}

.mac-radio-label:hover {
  border-color: var(--mac-orange);
}

.mac-radio-label input[type="radio"] {
  accent-color: var(--mac-orange);
  margin: 0;
}

/* Comparison Cards Grid (e.g. EV Home vs DC Fast, Lease vs Buy) */
.mac-comparison-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.mac-comp-card {
  background: var(--mac-card-sub-bg);
  border: 1px solid var(--mac-border);
  border-radius: var(--mac-radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mac-comp-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--mac-text-muted);
}

.mac-comp-cost {
  font-size: 20px;
  font-weight: 700;
  color: var(--mac-text);
  font-family: var(--mac-font-display);
}

.mac-comp-rate {
  font-size: 11px;
  color: var(--mac-text-muted);
}

/* Year-by-Year Depreciation Progression */
.mac-dep-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mac-dep-bar-label {
  width: 44px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mac-text-muted);
  flex-shrink: 0;
}

.mac-dep-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
}

.mac-dep-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FE6802, #FF9E4A);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.mac-dep-bar-val {
  width: 70px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--mac-text);
  font-family: var(--mac-font-mono);
  flex-shrink: 0;
}

/* Maintenance Checklist Rows */
.mac-maint-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.mac-maint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--mac-border-subtle);
  border-radius: var(--mac-radius-sm);
}

.mac-maint-info {
  display: flex;
  flex-direction: column;
}

.mac-maint-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--mac-text);
}

.mac-maint-sub {
  font-size: 11px;
  color: var(--mac-text-muted);
}

.mac-maint-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mac-input-sm {
  width: 70px;
  padding: 4px 6px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--mac-border);
  border-radius: 4px;
  color: var(--mac-text);
  text-align: right;
}

.mac-maint-qty-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mac-text-muted);
}

/* Service Schedule Timeline */
.mac-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.mac-timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--mac-orange);
  border-radius: 0 var(--mac-radius-sm) var(--mac-radius-sm) 0;
}

.mac-timeline-bullet {
  width: 6px;
  height: 6px;
  background: var(--mac-orange);
  border-radius: 50%;
  flex-shrink: 0;
}

.mac-timeline-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mac-timeline-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--mac-text);
}

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

.mac-timeline-cost {
  font-size: 13px;
  font-weight: 700;
  color: var(--mac-orange);
  font-family: var(--mac-font-mono);
}

/* VIN Decoder Anatomy & Report Grid */
.mac-vin-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mac-vin-input {
  text-transform: uppercase;
  font-family: var(--mac-font-mono);
  letter-spacing: 0.08em;
  font-size: 16px;
  font-weight: 600;
  padding-right: 56px;
}

.mac-vin-char-count {
  position: absolute;
  right: 10px;
  font-size: 11px;
  color: var(--mac-text-muted);
  font-family: var(--mac-font-mono);
}

.mac-vin-structure-diagram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.mac-vin-segment {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--mac-border-subtle);
  border-radius: var(--mac-radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.mac-vin-seg-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--mac-orange);
}

.mac-vin-seg-desc {
  font-size: 11px;
  color: var(--mac-text-muted);
  line-height: 1.3;
}

.mac-vin-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mac-vin-report-item {
  background: var(--mac-card-sub-bg);
  border: 1px solid var(--mac-border);
  border-radius: var(--mac-radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mac-vin-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--mac-text-muted);
  letter-spacing: 0.05em;
}

.mac-vin-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--mac-text);
  overflow-wrap: anywhere;
}

.mac-vin-error-alert {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--mac-radius-sm);
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #FF7B6B;
  font-size: 13px;
}

/* Dynamometer Status & Power Tags */
.mac-hpt-status-banner {
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--mac-border);
  border-radius: var(--mac-radius-sm);
  font-size: 13px;
  color: var(--mac-text);
  line-height: 1.5;
}

.mac-status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
  text-transform: uppercase;
}

.mac-tag-blue   { background: rgba(74, 144, 226, 0.2); color: #70A8EC; }
.mac-tag-green  { background: rgba(46, 204, 113, 0.2); color: #2ECC71; }
.mac-tag-orange { background: rgba(254, 104, 2, 0.2);  color: #FE6802; }

/* Responsive tables */
.mac-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.mac-table th {
  padding: 8px 10px;
  color: var(--mac-text-muted);
  border-bottom: 1px solid var(--mac-border);
  font-weight: 600;
}

.mac-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--mac-border-subtle);
  color: var(--mac-text);
}

/* Export Buttons */
.mac-export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mac-btn-ghost {
  background: transparent;
  border: 1px solid var(--mac-border);
  color: var(--mac-text-muted);
  border-radius: var(--mac-radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mac-btn-ghost:hover {
  border-color: var(--mac-orange);
  color: var(--mac-orange);
}

