/* HOECK RV SCAN V11.2 SECURE - Self-Hosted Production Stylesheet (No CDN Play Script) */
:root {
  --brand-400: #fbbf24;
  --brand-500: #f59e0b;
  --brand-600: #d97706;
  --victron-400: #38bdf8;
  --victron-500: #0066cc;
  --dark-950: #07080b;
  --dark-900: #0c0e14;
  --dark-850: #11141c;
  --dark-800: #161b26;
  --dark-700: #1f2636;
  --dark-600: #2d374d;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --success: #10b981;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; }

body {
  margin: 0;
  background-color: var(--dark-950);
  color: var(--text-main);
  background-image: radial-gradient(rgba(245, 158, 11, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  line-height: 1.5;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; }

/* Top Navigation Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 14, 20, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dark-700);
  padding: 0.75rem 1.25rem;
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-wrap { display: flex; align-items: center; gap: 0.75rem; }

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-500);
  color: #07080b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
}

.brand-title { font-weight: 800; font-size: 1rem; letter-spacing: 0.02em; color: #fff; }
.brand-sub { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-amber { background: rgba(245, 158, 11, 0.14); color: var(--brand-400); border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-red { background: rgba(239, 68, 68, 0.14); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.badge-green { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.35); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--dark-600);
  background: var(--dark-800);
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--dark-700); border-color: #475569; }
.btn-primary { background: var(--brand-500); color: #07080b; border-color: var(--brand-500); font-weight: 700; }
.btn-primary:hover { background: var(--brand-400); }
.btn-success { background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.btn-danger { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.btn-active { background: var(--brand-500); color: #07080b; border-color: var(--brand-500); }

.container { max-width: 1280px; margin: 1.5rem auto; padding: 0 1.25rem 4rem; }

/* Cards & Grid */
.card {
  background: var(--dark-900);
  border: 1px solid var(--dark-700);
  border-radius: 14px;
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--dark-800);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--brand-400);
  font-weight: 800;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0; }
.card-desc { font-size: 0.8rem; color: var(--text-muted); margin: 0.15rem 0 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.78rem; font-weight: 600; color: #cbd5e1; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--dark-850);
  border: 1px solid var(--dark-600);
  border-radius: 8px;
  padding: 0.58rem 0.75rem;
  color: #f8fafc;
  font-size: 0.88rem;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.75rem; margin-top: 0.85rem; }
.check-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--dark-850);
  border: 1px solid var(--dark-700);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.check-card input[type="checkbox"] { margin-top: 0.2rem; accent-color: var(--brand-500); width: 16px; height: 16px; }

.status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--dark-900);
  border: 1px solid var(--dark-700);
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.25rem;
}

.alert {
  padding: 0.8rem 1rem;
  border-radius: 9px;
  font-size: 0.84rem;
  margin-bottom: 1rem;
  border: 1px solid var(--dark-600);
  background: var(--dark-800);
}
.alert-error { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.45); color: #fecaca; }
.alert-success { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.45); color: #a7f3d0; }

.hidden { display: none !important; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 1rem;
}
.modal-box {
  background: var(--dark-900);
  border: 1px solid var(--dark-600);
  border-radius: 14px;
  max-width: 500px;
  width: 100%;
  padding: 1.4rem;
}

/* Report View (Client & Internal) */
.report-sheet {
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  padding: 2rem;
  max-width: 960px;
  margin: 0 auto;
}
.report-internal-banner {
  background: #fef2f2;
  border: 2px solid #dc2626;
  color: #991b1b;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 3px solid #f59e0b;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.report-section { margin-bottom: 1.4rem; }
.report-section h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e293b;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}
.report-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.report-table td, .report-table th {
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.7rem;
  text-align: left;
}
.report-table th { background: #f8fafc; font-weight: 700; width: 34%; color: #334155; }

.verdict-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
}
.verdict-neutral { background: #f1f5f9; color: #475569; }
.verdict-ok { background: #dcfce7; color: #166534; }
.verdict-warn { background: #fef3c7; color: #92400e; }
.verdict-bad { background: #fee2e2; color: #991b1b; }

.table-list { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table-list th, .table-list td { padding: 0.7rem; border-bottom: 1px solid var(--dark-700); text-align: left; }
.table-list th { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; }

@media print {
  body { background: #fff !important; color: #000 !important; }
  .topbar, .no-print { display: none !important; }
  .container { margin: 0; padding: 0; max-width: 100%; }
  .report-sheet { box-shadow: none; padding: 0; }
}
