/**
 * CCTV NVR Storage Calculator
 * Follows the established /tools look: dark hero with cyan accent, light page,
 * inputs left and a sticky results panel right.
 */

.nvr-wrap { font-family: inherit; color: #1a2236; }
.nvr-wrap *, .nvr-wrap *::before, .nvr-wrap *::after { box-sizing: border-box; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.nvr-hero {
  background: linear-gradient(135deg, #0d1520 0%, #162236 55%, #0d1520 100%);
  padding: 62px 20px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.nvr-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(34, 211, 238, .07) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
}
.nvr-hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.nvr-hero-icon { width: 64px; height: 64px; margin: 0 auto 18px; }
.nvr-hero-icon svg { width: 100%; height: 100%; display: block; }
.nvr-hero-title {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 900; color: #fff;
  margin: 0 0 14px; line-height: 1.15; letter-spacing: -.02em;
}
.nvr-hero-sub {
  font-size: 1rem; color: rgba(255, 255, 255, .68); line-height: 1.72;
  max-width: 620px; margin: 0 auto 26px;
}
.nvr-hero-badges { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.nvr-badge {
  background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .3);
  color: #67e8f9; font-size: .76rem; font-weight: 700; padding: 5px 14px; border-radius: 20px;
}

/* ── Layout ───────────────────────────────────────────────────────────── */
.nvr-outer { max-width: 1180px; margin: 0 auto; padding: 32px 20px 48px; }
.nvr-main-layout { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; }
.nvr-inputs-col { min-width: 0; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.nvr-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 24px 26px; margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
}
.nvr-card-heading {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: #0891b2; margin-bottom: 16px;
}
.nvr-card-sub { margin: -8px 0 18px; font-size: .82rem; color: #6b7280; line-height: 1.55; }

.nvr-row { margin-bottom: 18px; }
.nvr-row:last-child { margin-bottom: 0; }
.nvr-label { display: block; font-size: .85rem; font-weight: 700; color: #374151; margin-bottom: 7px; }
.nvr-hint { font-weight: 500; color: #9ca3af; }
.nvr-note { margin: 8px 0 0; font-size: .78rem; color: #6b7280; line-height: 1.6; }

.nvr-input {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: .92rem; color: #1a2236; background: #fff; font-family: inherit;
}
.nvr-input:focus { outline: 2px solid rgba(8, 145, 178, .35); outline-offset: 1px; border-color: #0891b2; }

.nvr-slider-row { display: flex; align-items: center; gap: 14px; }
.nvr-range { flex: 1; accent-color: #0891b2; height: 4px; }
.nvr-out {
  min-width: 78px; text-align: right; font-size: .9rem; font-weight: 800; color: #0e7490;
  font-variant-numeric: tabular-nums;
}

/* ── Camera groups ────────────────────────────────────────────────────── */
.nvr-group {
  border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px 4px;
  margin-bottom: 14px; background: #f9fafb; position: relative;
}
.nvr-group-hd {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: #6b7280; margin-bottom: 14px;
}
.nvr-del {
  border: none; background: transparent; color: #9ca3af; cursor: pointer;
  font-size: .78rem; font-weight: 700; font-family: inherit; padding: 2px 4px;
}
.nvr-del:hover { color: #dc2626; }
.nvr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nvr-grid2 .nvr-row { margin-bottom: 14px; }
.nvr-bitrate-line {
  font-size: .78rem; color: #0e7490; font-weight: 700; margin: 0 0 14px;
  font-variant-numeric: tabular-nums;
}
.nvr-add {
  width: 100%; padding: 11px; border: 1px dashed #93c5cf; border-radius: 10px;
  background: #f0fbfd; color: #0e7490; font-size: .87rem; font-weight: 800;
  cursor: pointer; font-family: inherit;
}
.nvr-add:hover { background: #e0f6fb; border-color: #0891b2; }

/* ── Results ──────────────────────────────────────────────────────────── */
.nvr-results-col { min-width: 0; }
.nvr-results-sticky { position: sticky; top: 20px; }

.nvr-total-card {
  background: linear-gradient(150deg, #0d1520, #17293b);
  border-radius: 14px; padding: 24px 22px; text-align: center; margin-bottom: 14px;
}
.nvr-total-label {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
  color: #67e8f9; margin-bottom: 8px;
}
.nvr-total-val {
  font-size: 2.3rem; font-weight: 900; color: #fff; line-height: 1.05;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.nvr-total-sub { font-size: .78rem; color: rgba(255, 255, 255, .55); margin-top: 7px; }

.nvr-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.nvr-kpi { background: #fff; border: 1px solid #e5e7eb; border-radius: 11px; padding: 13px 14px; }
.nvr-kpi-lbl {
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: #9ca3af; margin-bottom: 5px; line-height: 1.3;
}
.nvr-kpi-val {
  font-size: 1.06rem; font-weight: 800; color: #1a2236; font-variant-numeric: tabular-nums;
}

.nvr-panel {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 16px 18px; margin-bottom: 14px;
}
.nvr-panel-hd {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em;
  color: #6b7280; margin-bottom: 10px;
}
.nvr-disk-line { font-size: 1rem; font-weight: 800; color: #0e7490; font-variant-numeric: tabular-nums; }
.nvr-panel-note { margin: 8px 0 0; font-size: .78rem; color: #6b7280; line-height: 1.6; }

.nvr-lever { list-style: none; margin: 0; padding: 0; }
.nvr-lever li {
  font-size: .8rem; color: #4b5563; line-height: 1.5; padding: 7px 0;
  border-top: 1px solid #f3f4f6; display: flex; justify-content: space-between; gap: 12px;
}
.nvr-lever li:first-child { border-top: none; padding-top: 0; }
.nvr-lever b { color: #0e7490; font-variant-numeric: tabular-nums; white-space: nowrap; }

.nvr-cta { background: #f0fbfd; border: 1px solid #cdeff6; border-radius: 12px; padding: 16px 18px; }
.nvr-cta p { margin: 0 0 12px; font-size: .78rem; color: #5b6b73; line-height: 1.6; }
.nvr-cta-btn {
  display: inline-block; background: #f05a28; color: #fff; font-size: .85rem; font-weight: 800;
  padding: 10px 18px; border-radius: 8px; text-decoration: none;
}
.nvr-cta-btn:hover { background: #d9481a; color: #fff; text-decoration: none; }

/* ── Explainer ────────────────────────────────────────────────────────── */
.nvr-explain { margin-top: 34px; border-top: 1px solid #e5e7eb; padding-top: 32px; }
.nvr-explain h2 {
  font-size: 1.35rem; font-weight: 800; color: #1a2236; margin: 0 0 22px; letter-spacing: -.01em;
}
.nvr-explain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 34px; }
.nvr-explain h3 { font-size: .98rem; font-weight: 800; color: #0e7490; margin: 0 0 8px; }
.nvr-explain p { font-size: .88rem; color: #4b5563; line-height: 1.72; margin: 0 0 10px; max-width: 62ch; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .nvr-main-layout { grid-template-columns: 1fr; }
  .nvr-results-sticky { position: static; }
  .nvr-explain-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nvr-hero { padding: 46px 16px 40px; }
  .nvr-outer { padding: 24px 16px 36px; }
  .nvr-card { padding: 20px 18px; }
  .nvr-grid2 { grid-template-columns: 1fr; }
  .nvr-kpis { grid-template-columns: 1fr; }
  .nvr-total-val { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nvr-wrap * { transition: none !important; animation: none !important; }
}
