:root{--card-radius:1rem}body{background:#f6f8fb}.hero{background:linear-gradient(135deg,#111827,#374151);color:white;border-radius:1.25rem;padding:2.5rem}.card{border:0;border-radius:var(--card-radius);box-shadow:0 8px 24px rgba(15,23,42,.08)}.stat{font-size:2rem;font-weight:800}.badge-soft{background:#eef2ff;color:#3730a3}.table img.thumb{width:70px;height:50px;object-fit:cover;border-radius:.5rem}.form-section{max-width:900px}.status-flyable{background:#dcfce7;color:#166534}.status-repair{background:#fef9c3;color:#854d0e}.status-retired,.status-lost,.status-destroyed{background:#fee2e2;color:#991b1b}.rocket-card{transition:.15s transform}.rocket-card:hover{transform:translateY(-2px)}


.stats-hero{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;overflow:hidden;position:relative}.stats-hero:before{content:"";position:absolute;inset:-40% -10% auto auto;width:320px;height:320px;border-radius:999px;background:rgba(255,255,255,.08)}.stat-tile{height:100%;border-radius:1rem;padding:1rem;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.12);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}.stat-tile.primary{background:rgba(59,130,246,.24)}.stat-tile.altitude{background:rgba(16,185,129,.24)}.stat-tile.impulse{background:rgba(249,115,22,.24)}.stat-label{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.72);font-weight:700}.stat-value{font-size:2rem;line-height:1.05;font-weight:900;margin-top:.35rem}.stat-unit{font-size:.85rem;color:rgba(255,255,255,.68);margin-top:.2rem}

/* Phase 4 reporting/printing */
.print-card { border-width: 2px; }
@media print {
  .navbar, .no-print, footer, .btn, .btn-group { display: none !important; }
  main.container { width: 100% !important; max-width: none !important; padding: 0 !important; }
  .card { border: 0 !important; box-shadow: none !important; }
  body { background: #fff !important; }
}

/* Phase 5 polish */
:root[data-bs-theme="dark"] body{background:#0b1120;color:#e5e7eb}
:root[data-bs-theme="dark"] .card{background:#111827;color:#e5e7eb;box-shadow:0 8px 24px rgba(0,0,0,.35)}
:root[data-bs-theme="dark"] .table{--bs-table-bg:#111827;--bs-table-color:#e5e7eb;--bs-table-border-color:#374151}
:root[data-bs-theme="dark"] .hero{background:linear-gradient(135deg,#020617,#1e293b)}
:root[data-bs-theme="dark"] .form-control,:root[data-bs-theme="dark"] .form-select{background:#0f172a;color:#e5e7eb;border-color:#334155}
:root[data-bs-theme="dark"] .text-muted{color:#9ca3af!important}
.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem}.btn-icon{display:inline-flex;align-items:center;gap:.35rem}.empty-state{border:2px dashed #cbd5e1;border-radius:1rem;padding:2rem;text-align:center}.small-help{font-size:.875rem;color:#64748b}.responsive-actions{display:flex;gap:.4rem;flex-wrap:wrap}@media(max-width:576px){.hero{padding:1.5rem}.stat-value{font-size:1.55rem}.navbar-brand{font-size:1rem}.responsive-actions .btn{width:100%}}

/* Navigation cleanup */
.app-navbar .navbar-brand{white-space:nowrap}.app-navbar .dropdown-menu{border:0;border-radius:.85rem;box-shadow:0 16px 40px rgba(15,23,42,.18);padding:.45rem}.app-navbar .dropdown-item{border-radius:.55rem;padding:.55rem .75rem}.app-navbar .dropdown-item.active,.app-navbar .dropdown-item:active{background:#2563eb;color:#fff}.app-navbar .nav-link.active{font-weight:700;color:#fff}.app-navbar .dropdown-divider{margin:.4rem .25rem}@media(min-width:992px){.app-navbar .navbar-nav .dropdown:hover>.dropdown-menu{display:block;margin-top:0}.app-navbar .navbar-nav .dropdown:hover>.nav-link{color:#fff}.app-navbar .navbar-nav{align-items:center}.app-navbar .nav-link{border-radius:.6rem;padding-left:.7rem!important;padding-right:.7rem!important}.app-navbar .nav-link.active{background:rgba(255,255,255,.10)}}

/* Rocket fleet photos */
.rocket-thumb-wrap{display:block;background:#f3f4f6;text-decoration:none}.rocket-thumb{width:100%;height:210px;object-fit:cover;display:block}.rocket-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:4rem;color:#6c757d;background:linear-gradient(135deg,#f8f9fa,#e9ecef)}.rocket-detail-photo{width:100%;max-height:420px;object-fit:cover;border-radius:.75rem;border:1px solid rgba(0,0,0,.08)}.rocket-detail-empty{height:260px;display:flex;align-items:center;justify-content:center;font-size:5rem;background:linear-gradient(135deg,#f8f9fa,#e9ecef);color:#6c757d}.rocket-photo-preview{max-width:220px;max-height:180px;object-fit:cover;border-radius:.5rem;border:1px solid rgba(0,0,0,.12)}.rocket-photo-placeholder{height:120px;border:1px dashed #adb5bd;border-radius:.5rem;display:flex;align-items:center;justify-content:center;color:#6c757d;background:#f8f9fa}
[data-bs-theme="dark"] .rocket-thumb-wrap,[data-bs-theme="dark"] .rocket-thumb-empty,[data-bs-theme="dark"] .rocket-detail-empty,[data-bs-theme="dark"] .rocket-photo-placeholder{background:#222;color:#adb5bd;border-color:#444}

/* Stats chart rendering fix */
#flightsByMonth,
#motorClassChart,
#resultChart,
#topRocketChart {
  min-height: 260px;
}

/* Flight card generator */
.flight-card{background:#fff;color:#111827;border:1px solid #d1d5db;border-radius:18px;box-shadow:0 18px 45px rgba(15,23,42,.14);padding:1.25rem;max-width:980px;margin:0 auto 2rem;overflow:hidden}.flight-card-header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;border-bottom:3px solid #111827;padding-bottom:.9rem;margin-bottom:1rem}.flight-card-eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:.72rem;font-weight:800;color:#64748b}.flight-card h2{font-size:2rem;line-height:1;margin:.25rem 0 .35rem;font-weight:900}.flight-card-subtitle{color:#475569;font-weight:600}.flight-card-date{text-align:right;white-space:nowrap}.flight-card-date strong{display:block;font-size:1.05rem}.flight-card-date span{color:#64748b;font-weight:700}.flight-card-body{display:grid;grid-template-columns:280px 1fr;gap:1rem;align-items:stretch}.flight-card-photo-wrap{min-height:220px}.flight-card-photo{width:100%;height:100%;min-height:220px;object-fit:cover;border-radius:14px;border:1px solid #e5e7eb;background:#f8fafc}.flight-card-photo-empty{display:flex;align-items:center;justify-content:center;font-size:5rem;color:#64748b}.flight-card-big-stat{background:linear-gradient(135deg,#0f172a,#1e293b);color:white;border-radius:14px;padding:1rem;margin-bottom:1rem}.flight-card-big-stat span{display:block;text-transform:uppercase;letter-spacing:.1em;font-size:.75rem;color:rgba(255,255,255,.72);font-weight:800}.flight-card-big-stat strong{display:block;font-size:2.4rem;line-height:1.05;font-weight:950;margin-top:.25rem}.flight-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.flight-card-grid div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:.7rem}.flight-card-grid span{display:block;text-transform:uppercase;letter-spacing:.08em;font-size:.68rem;font-weight:800;color:#64748b}.flight-card-grid strong{display:block;font-size:1rem;margin-top:.2rem;color:#111827}.flight-card-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr))}.flight-card-section{margin-top:1rem}.flight-card-section h3{font-size:.9rem;text-transform:uppercase;letter-spacing:.1em;color:#334155;font-weight:900;margin-bottom:.6rem}.flight-card-notes{margin-top:1rem;border-top:1px solid #e5e7eb;padding-top:.9rem;font-size:.95rem}.flight-card-notes p{margin-bottom:.4rem}.flight-card-half{max-width:760px}.flight-card-half .flight-card-body{grid-template-columns:220px 1fr}.flight-card-half .flight-card-photo{min-height:180px}.flight-card-half .flight-card-big-stat strong{font-size:2rem}.flight-card-index{max-width:520px;padding:1rem}.flight-card-index .flight-card-body{grid-template-columns:1fr}.flight-card-index .flight-card-photo-wrap,.flight-card-index .flight-card-rocket-specs{display:none}.flight-card-index h2{font-size:1.55rem}.flight-card-index .flight-card-big-stat strong{font-size:1.8rem}.flight-card-index .flight-card-grid,.flight-card-index .flight-card-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem}.flight-card-index .flight-card-grid div{padding:.5rem}.flight-card-index .flight-card-section{margin-top:.7rem}@media(max-width:768px){.flight-card-body{grid-template-columns:1fr}.flight-card-header{display:block}.flight-card-date{text-align:left;margin-top:.5rem}.flight-card-grid,.flight-card-grid.compact{grid-template-columns:1fr 1fr}}
@media print{@page{margin:.35in}.flight-card{box-shadow:none!important;border:2px solid #111827!important;break-inside:avoid;page-break-inside:avoid}.flight-card-large{max-width:none}.flight-card-half{width:7.5in;max-width:7.5in}.flight-card-index{width:5in;max-width:5in}.flight-card *{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* Final stats dashboard chart sizing: compact horizontal bars */
.chart-box{position:relative;width:100%;height:260px;max-height:430px}.chart-box canvas{width:100%!important;height:100%!important}.chart-short{height:240px}.chart-medium{height:260px}.chart-tall{height:320px}.accordion .card-body .chart-empty{padding:.75rem;border:1px dashed #cbd5e1;border-radius:.75rem;background:#f8fafc}
@media(max-width:768px){.chart-box{height:260px}.chart-tall{height:300px}}

.recommended-motors-box {
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 0.5rem;
  padding: 0.75rem;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.92rem;
}
[data-bs-theme="dark"] .recommended-motors-box {
  background: #111827;
  border-color: #374151;
}
