/* IPCCTV Firmware camere — folosește variabilele temei ipcctv (light + html[data-theme="dark"]). */
.ipfw { padding-top: clamp(1.6rem, 3vw, 2.6rem); }
.ipfw h1 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); margin-bottom: .7rem; overflow-wrap: anywhere; }
.ipfw .ipfw-h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: 2.4rem 0 1rem; }
.ipfw-intro { max-width: 900px; margin-bottom: 1.4rem; }
.ipfw-intro p { margin-bottom: .6rem; }
.ipfw-muted, .ipfw-sub { color: var(--muted); font-size: .9rem; }
.ipfw-sub { display: block; line-height: 1.45; margin-top: .15rem; }
.ipfw code { font-size: .82em; word-break: break-all; }

/* căutare */
.ipfw-search { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin: 1rem 0 1.6rem; }
.ipfw-search.compact { padding: .9rem 1rem; }
.ipfw-label { display: block; font-weight: 700; color: var(--ink); margin-bottom: .5rem; font-size: .95rem; }
.ipfw-qwrap { position: relative; }
.ipfw-search textarea { width: 100%; min-height: 3.2rem; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem;
  font: 500 .98rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg); color: var(--ink); }
.ipfw-search textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(225, 29, 42, .12); }
.ipfw-form-row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-top: .8rem; }
.ipfw-hint { color: var(--muted); font-size: .86rem; flex: 1 1 260px; }
.ipfw-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; margin-top: 4px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); max-height: 340px; overflow: auto; }
.ipfw-suggest button { display: flex; width: 100%; gap: .6rem; align-items: baseline; justify-content: space-between; padding: .55rem .8rem; border: 0;
  background: none; color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.ipfw-suggest button:hover, .ipfw-suggest button.on { background: var(--blue-soft); }
.ipfw-suggest b { color: var(--ink); }
.ipfw-suggest small { color: var(--muted); white-space: nowrap; }

/* rezultate */
.ipfw-summary { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.ipfw-pill { padding: .35rem .8rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }
.ipfw-pill.up { color: #b45309; } .ipfw-pill.ok { color: #15803d; } .ipfw-pill.no { color: var(--muted); }
.ipfw-results { display: grid; gap: 1.1rem; margin-bottom: 1.2rem; }
.ipfw-res { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--bg); box-shadow: var(--shadow-sm); }
.ipfw-res-h { font-size: 1.1rem; margin-bottom: .7rem; overflow-wrap: anywhere; }
.ipfw-res-h span { color: var(--muted); font-weight: 500; font-size: .92rem; }
.ipfw-res-brand + .ipfw-res-brand { border-top: 1px dashed var(--line); margin-top: 1rem; padding-top: 1rem; }
.ipfw-res-bh { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--blue); margin-bottom: .5rem; }
.ipfw-res-model { display: flex; gap: .9rem; align-items: center; padding: .4rem 0; color: var(--text); }
.ipfw-res-model:hover strong { color: var(--blue); }
.ipfw-res-model strong { color: var(--ink); overflow-wrap: anywhere; }
.ipfw-res-thumb { flex: 0 0 64px; height: 64px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.ipfw-res-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ipfw-more { display: block; font-size: .84rem; color: var(--blue); margin-top: .15rem; }
.ipfw-status { margin: .7rem 0; padding: .65rem .9rem; border-radius: 12px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; }
.ipfw-status.up { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.ipfw-status.ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.ipfw-status.info, .ipfw-status.nover { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }
.ipfw-status.no, .ipfw-status.cat { background: var(--bg-soft); color: var(--text); border-color: var(--line); }
.ipfw-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0; }
.ipfw-chips .chip { font-size: .85rem; padding: .4rem .85rem; }

/* avertisment */
.ipfw-warn { margin: 1.2rem 0; padding: .9rem 1.1rem; border-radius: 14px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: .93rem; line-height: 1.55; }

/* pagina modelului */
.ipfw-hero { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: clamp(1.2rem, 3vw, 2.6rem); align-items: start; margin-bottom: 1rem; }
.ipfw-hero-img { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; padding: 1rem; }
.ipfw-hero-img img { width: 100%; height: 100%; object-fit: contain; }
.ipfw-eyebrow { display: inline-block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--blue); margin-bottom: .5rem; }
.ipfw-name { color: var(--muted); margin-bottom: .8rem; }
.ipfw-latest { display: inline-block; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: .55rem .9rem; margin: .2rem 0 .8rem; }
.ipfw-latest strong { color: var(--ink); }
.ipfw-latest.none { color: var(--muted); }
.ipfw-facts { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 1rem; }
.ipfw-facts li { font-size: .84rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: var(--blue-soft); color: var(--ink); }
.ipfw-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.ipfw-actions .btn { padding: .75rem 1.3rem; }
.ipfw-text { max-width: 900px; }
.ipfw-check { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0 0; font-size: .92rem; }
.ipfw-check input[type=text] { flex: 0 1 260px; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; }

/* tabele */
.ipfw-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.ipfw-fw { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ipfw-fw th { text-align: left; background: var(--bg-soft); color: var(--ink); font-weight: 700; padding: .65rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ipfw-fw td { padding: .75rem .8rem; border-top: 1px solid var(--line-soft); vertical-align: top; }
.ipfw-fw tr:first-child td { border-top: 0; }
.ipfw-ver { font-weight: 700; color: var(--ink); white-space: nowrap; }
.ipfw-links { display: flex; flex-wrap: wrap; gap: .45rem .8rem; align-items: center; }
.ipfw-links .btn-sm { padding: .5rem .95rem; }
.ipfw-notes-link { color: var(--blue); font-size: .88rem; text-decoration: underline; }
.ipfw-nt { margin-top: .5rem; }
.ipfw-nt summary { cursor: pointer; color: var(--blue); font-size: .86rem; }
.ipfw-nt div { margin-top: .4rem; font-size: .86rem; color: var(--text); max-height: 22rem; overflow: auto; background: var(--bg-soft); border-radius: 10px; padding: .6rem .8rem; }
.ipfw-specs { columns: 2 420px; column-gap: 1.6rem; }
.ipfw-spec-group { break-inside: avoid; margin-bottom: 1.2rem; }
.ipfw-spec-group h3 { font-size: 1rem; margin-bottom: .45rem; }
.ipfw-spec { width: 100%; border-collapse: collapse; font-size: .88rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ipfw-spec th { text-align: left; width: 42%; font-weight: 600; color: var(--ink); background: var(--bg-soft); padding: .45rem .7rem; vertical-align: top; }
.ipfw-spec td { padding: .45rem .7rem; overflow-wrap: anywhere; }
.ipfw-spec tr + tr th, .ipfw-spec tr + tr td { border-top: 1px solid var(--line-soft); }
.ipfw-docs { margin: 0 0 1rem 1.2rem; }
.ipfw-docs li { margin-bottom: .3rem; }
.ipfw-docs a { color: var(--blue); text-decoration: underline; overflow-wrap: anywhere; }
.ipfw-aliases { margin-top: 1.4rem; overflow-wrap: anywhere; }

/* grile de carduri */
.ipfw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.ipfw-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .18s; color: var(--text); }
.ipfw-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ipfw-card-img { aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.ipfw-card-img img { width: 100%; height: 100%; object-fit: contain; padding: .6rem; }
.ipfw-card-body { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .85rem .85rem; }
.ipfw-card-type { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ipfw-card-model { font-weight: 800; color: var(--ink); overflow-wrap: anywhere; line-height: 1.3; }
.ipfw-card-fw { font-size: .83rem; color: #15803d; }
.ipfw-card-fw.none { color: var(--muted); }
.ipfw-noimg { color: #c2ccdd; display: grid; place-items: center; width: 100%; height: 100%; }
.ipfw-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.ipfw-brand { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; background: var(--bg); box-shadow: var(--shadow-sm); transition: border-color .15s; }
.ipfw-brand:hover { border-color: var(--blue); }
.ipfw-brand-name { display: block; font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.ipfw-types { margin: .4rem 0 .8rem; }
.ipfw-types .chip { font-size: .85rem; }
.ipfw-pages { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 1.8rem 0 .5rem; }
.ipfw-gap { padding: .5rem .3rem; color: var(--muted); }
.ipfw-howto { margin-top: 2.4rem; max-width: 900px; }

/* temă întunecată */
html[data-theme="dark"] .ipfw-status.up { background: rgba(234, 88, 12, .14); color: #fdba74; border-color: rgba(234, 88, 12, .35); }
html[data-theme="dark"] .ipfw-status.ok { background: rgba(22, 163, 74, .14); color: #86efac; border-color: rgba(22, 163, 74, .35); }
html[data-theme="dark"] .ipfw-status.info, html[data-theme="dark"] .ipfw-status.nover { background: rgba(37, 99, 235, .14); color: #bfdbfe; border-color: rgba(37, 99, 235, .35); }
html[data-theme="dark"] .ipfw-warn { background: rgba(217, 119, 6, .12); color: #fcd34d; border-color: rgba(217, 119, 6, .35); }
html[data-theme="dark"] .ipfw-card-fw { color: #86efac; }
html[data-theme="dark"] .ipfw-pill.up { color: #fdba74; } html[data-theme="dark"] .ipfw-pill.ok { color: #86efac; }

@media (max-width: 760px) {
  .ipfw-hero { grid-template-columns: 1fr; }
  .ipfw-hero-img { max-width: 300px; }
  .ipfw-fw thead { display: none; }
  .ipfw-fw, .ipfw-fw tbody, .ipfw-fw tr, .ipfw-fw td { display: block; width: 100%; }
  .ipfw-fw tr { border-top: 1px solid var(--line); padding: .4rem 0; }
  .ipfw-fw tr:first-child { border-top: 0; }
  .ipfw-fw td { border: 0; padding: .3rem .8rem; }
  .ipfw-fw td::before { content: attr(data-th); display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .ipfw-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
}

/* ===================== /firmware-camere/ — pagina principală ===================== */
.ipfw-home .ipfw { padding-top: 0; }
.ipfw-hero2 { position: relative; text-align: center; max-width: 880px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.6rem) 0 1.2rem; }
.ipfw-hero2::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 50% 0%, var(--bg-tint), transparent 70%); }
.ipfw-kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: .9rem; }
.ipfw-hero2 h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -.035em; margin-bottom: .8rem; }
.ipfw-lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.14rem); max-width: 640px; margin: 0 auto 1.6rem; line-height: 1.6; }
.ipfw-hero2 .ipfw-search { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: 1rem 1rem .9rem;
  box-shadow: var(--shadow-lg); margin: 0; }
.ipfw-hero2 .ipfw-label { font-size: .85rem; color: var(--muted); font-weight: 600; margin: 0 .2rem .45rem; }
.ipfw-hero2 .ipfw-search textarea { border: 0; background: var(--bg-soft); font-size: 1.05rem; min-height: 6.2rem; padding: .9rem 1rem; }
.ipfw-hero2 .ipfw-search textarea:focus { box-shadow: 0 0 0 2px var(--blue); }
.ipfw-hero2 .ipfw-form-row { margin-top: .75rem; }
.ipfw-hero2 .ipfw-form-row .btn { padding: .85rem 1.8rem; }
.ipfw-examples { margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem .5rem; font-size: .87rem; color: var(--muted); }
.ipfw-examples a { padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
.ipfw-examples a:hover { border-color: var(--blue); color: var(--blue); }
.ipfw-results-wrap { max-width: 980px; margin: 1.4rem auto 0; }

/* logo-uri: o singură linie, derulare lentă */
.ipfw-logos { margin: clamp(2rem, 4vw, 3rem) 0 .5rem; }
.ipfw-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.ipfw-marquee-inner { display: flex; width: max-content; animation: ipfw-scroll var(--ipfw-dur, 110s) linear infinite; }
.ipfw-marquee:hover .ipfw-marquee-inner, .ipfw-marquee:focus-within .ipfw-marquee-inner { animation-play-state: paused; }
.ipfw-marquee-track { display: flex; flex-wrap: nowrap; gap: 12px; list-style: none; margin: 0; padding: 4px 12px 4px 0; }
.ipfw-marquee-track li { flex: 0 0 auto; }
@keyframes ipfw-scroll { to { transform: translateX(-50%); } }
.ipfw-logo { display: flex; align-items: center; justify-content: center; height: 54px; min-width: 112px; padding: 0 18px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.ipfw-logo img { display: block; height: 28px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .62; transition: filter .2s, opacity .2s; }
.ipfw-logo:hover, .ipfw-logo:focus-visible { border-color: #cdd8ea; box-shadow: var(--shadow-sm); }
.ipfw-logo:hover img, .ipfw-logo:focus-visible img { filter: none; opacity: 1; }
.ipfw-wordmark { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; color: #7b879c; white-space: nowrap; line-height: 28px; transition: color .2s; }
.ipfw-logo:hover .ipfw-wordmark { color: #0c1626; }
@media (prefers-reduced-motion: reduce) {
  .ipfw-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; scrollbar-width: thin; }
  .ipfw-marquee-inner { animation: none; }
  .ipfw-marquee-track[aria-hidden="true"] { display: none; }
}

/* cum funcționează */
.ipfw-steps ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0; padding: 0; counter-reset: none; }
.ipfw-steps li { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.3rem 1.2rem; background: var(--bg); box-shadow: var(--shadow-sm); }
.ipfw-steps h3 { font-size: 1.05rem; margin: .7rem 0 .35rem; }
.ipfw-steps p { color: var(--muted); font-size: .93rem; line-height: 1.55; }
.ipfw-step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-weight: 800; }

/* firmware recente: listă compactă */
.ipfw-recent ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.ipfw-recent li + li { border-top: 1px solid var(--line-soft); }
.ipfw-recent a { display: grid; grid-template-columns: 96px 130px 1fr auto; gap: .8rem; align-items: baseline; padding: .7rem 1rem; color: var(--text); font-size: .93rem; }
.ipfw-recent a:hover { background: var(--bg-soft); }
.ipfw-recent time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .86rem; }
.ipfw-r-brand { font-weight: 600; color: var(--muted); }
.ipfw-r-model { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.ipfw-r-ver { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; color: var(--blue); white-space: nowrap; }

/* întrebări */
.ipfw-faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); margin-bottom: .6rem; }
.ipfw-faq summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.ipfw-faq summary::-webkit-details-marker { display: none; }
.ipfw-faq summary::after { content: "+"; color: var(--blue); font-weight: 800; }
.ipfw-faq details[open] summary::after { content: "–"; }
.ipfw-faq details p { padding: 0 1.1rem 1rem; color: var(--text); line-height: 1.6; }

/* ajutor IPCCTV */
.ipfw-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 2.4rem 0 .5rem; padding: 1.1rem 1.3rem;
  border-radius: var(--radius); border: 1px dashed var(--line); background: var(--bg-soft); }
.ipfw-cta strong { display: block; color: var(--ink); margin-bottom: .15rem; }
.ipfw-cta span { color: var(--muted); font-size: .92rem; }

@media (max-width: 760px) {
  .ipfw-steps ol { grid-template-columns: 1fr; }
  .ipfw-recent a { grid-template-columns: 82px 1fr; row-gap: .1rem; }
  .ipfw-r-model { grid-column: 1 / -1; }
  .ipfw-r-ver { grid-column: 1 / -1; }
  .ipfw-hero2 .ipfw-hint { display: none; }
  .ipfw-logo { height: 48px; min-width: 96px; padding: 0 14px; }
  .ipfw-logo img { height: 24px; }
}
html[data-theme="dark"] .ipfw-hero2 .ipfw-search { background: var(--bg-soft); }
html[data-theme="dark"] .ipfw-hero2 .ipfw-search textarea { background: var(--bg); }
