/* ============================================================
   UAV CALC - Fixed-Wing Drone Engineering Calculator
   Professional Aerospace Dashboard Theme
   ============================================================ */

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --bg-card-hover: #1e2a42;
  --bg-input: #0f1629;
  --border-color: #2a3a5c;
  --border-active: #3b82f6;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #22c55e;
  --accent-yellow: #eab308;
  --accent-orange: #f97316;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: 0.25s ease;
}

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

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

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============ HEADER ============ */
.app-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo svg {
  width: 36px;
  height: 36px;
  fill: var(--accent-cyan);
}

.app-logo h1 {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.app-logo .version {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.header-info .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}

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

/* ============ TAB NAVIGATION ============ */
.tab-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  padding: 0 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 0.9rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-cyan);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 2px 2px 0 0;
}

.tab-btn svg {
  width: 16px;
  height: 16px;
}

/* ============ MAIN CONTENT ============ */
.main-content {
  padding: 1.5rem 2rem 3rem;
  max-width: 1600px;
  margin: 0 auto;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ GRID LAYOUTS ============ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.2rem;
}

.grid-1-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.2rem;
}

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: border-color var(--transition);
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-title svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

/* ============ FORM ELEMENTS ============ */
.form-group {
  margin-bottom: 0.8rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-row {
  display: flex;
  gap: 0.8rem;
}

.form-row .form-group {
  flex: 1;
}

select,
input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

select:focus,
input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-color);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  border: none;
}

.input-with-unit {
  position: relative;
}

.input-with-unit input {
  padding-right: 40px;
}

.input-with-unit .unit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* ============ BUTTONS ============ */
.btn {
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
}

.btn-calculate {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============ RESULT DISPLAYS ============ */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
}

.result-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.7rem;
  text-align: center;
  transition: border-color var(--transition);
}

.result-item.highlight {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.05);
}

.result-item .result-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.result-item .result-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.result-item .result-unit {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.result-item.warning { border-color: var(--accent-yellow); background: rgba(234, 179, 8, 0.05); }
.result-item.warning .result-value { color: var(--accent-yellow); }
.result-item.danger { border-color: var(--accent-red); background: rgba(239, 68, 68, 0.05); }
.result-item.danger .result-value { color: var(--accent-red); }
.result-item.success { border-color: var(--accent-green); background: rgba(34, 197, 94, 0.05); }
.result-item.success .result-value { color: var(--accent-green); }

/* ============ MOTOR SPEC TABLE ============ */
.spec-table {
  width: 100%;
  font-size: 0.8rem;
}

.spec-table tr {
  border-bottom: 1px solid rgba(42, 58, 92, 0.5);
}

.spec-table td {
  padding: 0.35rem 0.5rem;
}

.spec-table td:first-child {
  color: var(--text-muted);
  white-space: nowrap;
  width: 45%;
}

.spec-table td:last-child {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

/* ============ WARNINGS PANEL ============ */
.warnings-panel {
  margin-top: 1rem;
}

.warning-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}

.warning-item.warn {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: var(--accent-yellow);
}

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

.warning-item.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
}

.warning-item.ok {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--accent-green);
}

/* ============ CHART CONTAINERS ============ */
.chart-container {
  position: relative;
  height: 320px;
  margin-top: 0.5rem;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ============ THROTTLE SLIDER ============ */
.throttle-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

.throttle-control input[type="range"] {
  flex: 1;
}

.throttle-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============ PROGRESS BARS ============ */
.progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.3rem;
}

.progress-bar .fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease, background 0.3s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ============ GAUGE ============ */
.gauge-row {
  margin-bottom: 0.8rem;
}

.gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
}

.gauge-header .gauge-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gauge-header .gauge-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============ SEARCH INPUT ============ */
.search-box {
  position: relative;
  margin-bottom: 0.5rem;
}

.search-box input {
  padding-left: 32px;
}

.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  fill: var(--text-muted);
}

/* ============ MASS BUDGET TABLE ============ */
.mass-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.mass-table th {
  text-align: left;
  padding: 0.5rem 0.7rem;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
}

.mass-table th:last-child,
.mass-table td:last-child {
  text-align: right;
}

.mass-table td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid rgba(42, 58, 92, 0.4);
  color: var(--text-primary);
}

.mass-table tr:hover td {
  background: rgba(59, 130, 246, 0.05);
}

.mass-table .total-row td {
  font-weight: 700;
  border-top: 2px solid var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.05);
}

/* ============ SUMMARY PANEL ============ */
.summary-section {
  margin-bottom: 1.5rem;
}

.summary-section h3 {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(42, 58, 92, 0.3);
  font-size: 0.82rem;
}

.summary-item .s-label {
  color: var(--text-secondary);
}

.summary-item .s-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* ============ SCORE INDICATOR ============ */
.score-display {
  text-align: center;
  padding: 1.5rem;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
}

.score-circle .score-number {
  font-size: 2.5rem;
  font-weight: 800;
}

.score-circle .score-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ============ TOOLTIP ============ */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: var(--text-primary);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border: 1px solid var(--border-color);
  z-index: 50;
}

.tooltip:hover::after {
  opacity: 1;
}

/* ============ SECTION DIVIDER ============ */
.section-divider {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .main-content { padding: 1rem; }
  .grid-2, .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .app-header { padding: 0.6rem 1rem; }
  .tab-nav { padding: 0 0.5rem; }
  .tab-btn { padding: 0.7rem 0.8rem; font-size: 0.78rem; }
  .results-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .form-row { flex-direction: column; }
  html { font-size: 13px; }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============ LOADING ============ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* ============ MISSION PHASE EDITOR ============ */
.mission-phase-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  padding: 0.6rem;
  transition: border-color var(--transition);
}

.mission-phase-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.4rem;
}

.phase-icon {
  font-size: 1rem;
  width: 24px;
  text-align: center;
}

.phase-header select {
  flex: 1;
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
}

.btn-phase-del {
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-phase-del:hover {
  background: rgba(239, 68, 68, 0.15);
}

.phase-params {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.phase-params label {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 80px;
}

.phase-params input {
  padding: 0.25rem 0.4rem;
  font-size: 0.78rem;
  width: 100%;
}

/* ============ OPTIMIZER ============ */
.opt-result-row:hover td {
  background: var(--bg-card-hover);
}

/* ============ SAVED CONFIGS ============ */
.saved-config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(42, 58, 92, 0.4);
  gap: 8px;
}

.saved-config-item:hover {
  background: rgba(59, 130, 246, 0.05);
}

.saved-config-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
}

.btn-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
}

/* ============ UNIT CONVERTER ============ */
.converter-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.converter-result {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-align: center;
  padding: 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}

/* ============ CG DIAGRAM ============ */
.cg-canvas-container {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  margin-top: 0.5rem;
}

/* ============ SIDE PANEL ============ */
.side-panel {
  position: fixed;
  right: -420px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 1.5rem;
}

.side-panel.open {
  right: 0;
}

.side-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

.side-panel-header h3 {
  font-size: 1rem;
  color: var(--accent-cyan);
}

.side-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
}

/* ============ PANEL OVERLAY ============ */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  display: none;
}

.panel-overlay.open {
  display: block;
}

/* ============ WING DESIGNER ============ */
#wing-profile-select {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px;
  font-size: 0.82rem;
  cursor: pointer;
}

#wing-profile-select option {
  padding: 4px 8px;
}

#wing-profile-select option:checked {
  background: var(--accent-blue);
  color: white;
}

#wing-profile-info {
  font-size: 0.8rem;
  line-height: 1.5;
}

#wing-profile-info .profile-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-top: 6px;
}

#wing-profile-info .profile-detail-grid span:nth-child(odd) {
  color: var(--text-muted);
}

#wing-profile-info .profile-detail-grid span:nth-child(even) {
  color: var(--accent-cyan);
  font-weight: 500;
  text-align: right;
}

#canvas-airfoil, #canvas-planform {
  image-rendering: auto;
}

/* ============ PRINT ============ */
@media print {
  .app-header, .tab-nav, .btn, input, select, .side-panel, .panel-overlay { display: none; }
  .tab-panel { display: block !important; }
  body { background: white; color: black; }
  .card { border: 1px solid #ccc; box-shadow: none; background: white; }
  .result-item { border: 1px solid #ccc; background: #f5f5f5; }
  .result-item .result-value { color: black; }
}
