/* =========================================================
   Image Sensor Catalog — v2 Design System
   "Precision Dark" — premium engineering tool aesthetic
   ========================================================= */

:root {
  /* Backgrounds */
  --bg:          #07101e;
  --surface:     #0d1a2e;
  --surface-2:   #11203a;
  --elevated:    #172540;
  --elevated-2:  #1d2d4e;

  /* Borders */
  --border:      #1c2d47;
  --border-2:    #263d5c;
  --border-glow: rgba(68, 119, 244, .35);

  /* Text */
  --text:        #dce6f5;
  --text-dim:    #6882a6;
  --text-muted:  #2f4466;

  /* Accent */
  --accent:      #4677f4;
  --accent-2:    #5c8aff;
  --accent-dim:  rgba(70, 119, 244, .12);
  --accent-glow: rgba(70, 119, 244, .22);

  /* Semantic */
  --green:       #2dd4a0;
  --green-dim:   rgba(45, 212, 160, .1);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245, 158, 11, .09);
  --purple:      #a78bfa;
  --purple-dim:  rgba(167, 139, 250, .1);
  --red:         #f87171;
  --red-dim:     rgba(248, 113, 113, .1);
  --cyan:        #22d3ee;
  --cyan-dim:    rgba(34, 211, 238, .1);

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  /* Shadows */
  --shadow-card: 0 4px 32px rgba(0, 0, 0, .55), 0 1px 0 rgba(255,255,255,.04) inset;
  --shadow-sm:   0 2px 12px rgba(0, 0, 0, .4);
  --glow:        0 0 0 3px var(--accent-glow);

  /* Timing */
  --t-fast: 120ms ease;
  --t:      180ms ease;

  /* Fonts */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

/* ---------------------------------------------------------
   Reset / Base
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  /* Subtle dot-grid background — engineering graph paper feel */
  background-image:
    radial-gradient(circle, rgba(70,119,244,.08) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a5278; }

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */
.page-wrapper {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.page-header {
  position: relative;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow: hidden;
}

/* Ambient glow behind title */
.page-header::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -80px;
  width: 700px;
  height: 340px;
  background: radial-gradient(ellipse at 30% 40%,
    rgba(70, 119, 244, .13) 0%,
    rgba(70, 119, 244, .04) 50%,
    transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.page-header > .row { position: relative; z-index: 1; }

/* Logo pill */
.page-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(70, 119, 244, .08);
  border: 1px solid rgba(70, 119, 244, .22);
  border-radius: 20px;
  padding: 4px 12px 4px 6px;
}

.page-logo-icon {
  width: 24px; height: 24px;
  background: rgba(70, 119, 244, .18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.page-logo-icon svg { width: 13px; height: 13px; color: var(--accent-2); }

.page-logo-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-2);
}

/* Title */
.page-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -.032em;
  color: #eef3ff;
  margin: 0 0 4px;
  line-height: 1.2;
}

.page-title-sub {
  display: block;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: -.005em;
  margin-top: 2px;
  margin-bottom: 10px;
}

/* Description */
.page-desc {
  font-size: 0.845rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 760px;
  margin-bottom: 16px;
}

.page-desc strong { color: var(--text); font-weight: 550; }

/* Stat pills — inline below description */
.header-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 5px 12px;
}

.stat-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}

.stat-sep {
  width: 1px; height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

/* Feature pills */
.page-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.71rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.page-pill:hover { border-color: var(--border-2); color: var(--text); }

.pill-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   Cards — glass surface
   --------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  /* Subtle top highlight line */
  background-image: linear-gradient(
    180deg,
    rgba(255,255,255,.04) 0px,
    rgba(255,255,255,.00) 1px
  );
}

.card-body { padding: 20px; }

/* ---------------------------------------------------------
   Filter Panel
   --------------------------------------------------------- */
.filter-card {
  position: sticky;
  top: 10px;
  z-index: 30;
  margin-bottom: 14px;
}

.filter-card .card-body { padding: 16px 20px 14px; }

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.filter-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
}

.filter-section-title svg { width: 12px; height: 12px; color: var(--accent); }

/* Labels */
.filter-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* Select / Input */
.form-select,
.form-control {
  background-color: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-family: var(--font);
  height: 34px;
  padding: 0 28px 0 10px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%232f4466' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
}

.form-select:hover { border-color: var(--border-2); }

.form-select:focus,
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--glow);
  background-color: var(--elevated-2, #1d2d4e);
  color: var(--text);
}

.form-select option { background: #162035; color: var(--text); }

/* Search */
.search-wrap { position: relative; }

.search-wrap .search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 13px; height: 13px;
}

#globalSearch {
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-family: var(--font);
  height: 34px;
  width: 100%;
  padding: 0 10px 0 32px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

#globalSearch:hover { border-color: var(--border-2); }

#globalSearch:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--glow);
  background: var(--elevated-2, #1d2d4e);
}

#globalSearch::placeholder { color: var(--text-muted); }

/* Reset button */
.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
}

.btn-reset:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-reset svg { width: 11px; height: 11px; }

/* Active filter tags */
.active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent-2);
  border: 1px solid rgba(70, 119, 244, .25);
  border-radius: 20px;
  padding: 2px 5px 2px 9px;
  cursor: pointer;
  transition: background var(--t-fast);
}

.active-tag:hover { background: rgba(70, 119, 244, .18); }

.active-tag-label { color: rgba(92, 138, 255, .6); }

.active-tag-x {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(70, 119, 244, .2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  color: var(--accent-2);
  transition: background var(--t-fast);
}

.active-tag-x:hover { background: rgba(70, 119, 244, .4); }

/* Hint */
.search-hint {
  font-size: 0.71rem;
  color: var(--text-muted);
  margin: 9px 0 0;
  line-height: 1.55;
}

/* ---------------------------------------------------------
   Table card
   --------------------------------------------------------- */
.table-card .card-body {
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-xl);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 16, 30, .6);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  gap: 12px;
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-title {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

.table-count {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-2);
  background: var(--accent-dim);
  border: 1px solid rgba(70, 119, 244, .22);
  padding: 2px 9px;
  border-radius: 20px;
  min-width: 40px;
  text-align: center;
  transition: color var(--t-fast);
}

.table-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------------
   DataTables core overrides
   --------------------------------------------------------- */
div.dt-container { color: var(--text); }

div.dt-container .dt-layout-row:has(.dt-search),
div.dt-container .dt-length,
div.dt-container .dt-search,
div.dt-container .dt-info,
div.dt-container .dt-layout-row:first-child { display: none !important; }

/* Table */
table#sensorsTable {
  width: 100% !important;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 0 !important;
}

/* Column headers */
table#sensorsTable thead tr th {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  border-top: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--t-fast);
  position: relative;
}

table#sensorsTable thead tr th:hover { color: var(--text-dim); }

table#sensorsTable thead tr th.dt-ordering-asc,
table#sensorsTable thead tr th.dt-ordering-desc {
  color: var(--accent-2) !important;
}

/* Sort indicators */
table#sensorsTable thead th .dt-column-order {
  opacity: .25; margin-left: 4px; font-size: 8px;
}

table#sensorsTable thead th.dt-ordering-asc .dt-column-order,
table#sensorsTable thead th.dt-ordering-desc .dt-column-order {
  opacity: 1; color: var(--accent);
}

/* Rows */
table#sensorsTable tbody tr {
  border-bottom: 1px solid rgba(28, 45, 71, .6);
  transition: background var(--t-fast);
  position: relative;
}

table#sensorsTable tbody tr:nth-child(odd)  { background: var(--surface); }
table#sensorsTable tbody tr:nth-child(even) { background: rgba(13, 26, 46, .5); }

table#sensorsTable tbody tr:hover {
  background: var(--elevated) !important;
}

/* Accent left border on hover */
table#sensorsTable tbody tr:hover td:first-child {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}

table#sensorsTable tbody td {
  padding: 10px 14px;
  color: var(--text);
  vertical-align: middle;
  border: none;
  transition: padding var(--t-fast);
}

/* Manufacturer */
table#sensorsTable tbody td:nth-child(1) {
  font-weight: 550;
  color: var(--text);
  font-size: 0.8rem;
  border-left: 2px solid transparent;
  white-space: nowrap;
}

.mfr-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mfr-avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid;
  font-size: 0.62rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: .02em;
  line-height: 1;
}

.mfr-name {
  line-height: 1.2;
}

/* Column units */
.col-unit {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: .01em;
}

/* Card link button */
.btn-card {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.btn-card:hover {
  color: var(--accent-2);
  border-color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}
.btn-card::after {
  content: '→';
  font-size: 0.72rem;
}

/* Sensor model — monospace */
table#sensorsTable tbody td:nth-child(2) {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: #7aaeff;
  letter-spacing: .01em;
}

/* Numeric cells */
table#sensorsTable tbody td:nth-child(3),
table#sensorsTable tbody td:nth-child(4),
table#sensorsTable tbody td:nth-child(5),
table#sensorsTable tbody td:nth-child(7),
table#sensorsTable tbody td:nth-child(8) {
  font-variant-numeric: tabular-nums;
  font-size: 0.76rem;
  color: var(--text-dim);
}

/* Empty / no-results */
table#sensorsTable tbody td.dataTables_empty {
  text-align: center !important;
  padding: 72px 20px !important;
  color: var(--text-muted) !important;
  font-size: 0.875rem !important;
  background: var(--surface) !important;
}

/* Processing indicator */
div.dt-processing {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-2) !important;
  color: var(--text-dim) !important;
  border-radius: var(--r-md) !important;
  box-shadow: var(--shadow-card) !important;
  font-size: 0.78rem !important;
  padding: 10px 20px !important;
}

/* ---------------------------------------------------------
   Sensor-type badges
   --------------------------------------------------------- */
.s-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1;
}

.s-badge-cmos {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(45, 212, 160, .2);
}

.s-badge-ccd {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, .2);
}

.s-badge-bsi {
  background: var(--purple-dim);
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, .2);
}

.s-badge-fsi {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, .2);
}

.s-badge-other {
  background: rgba(255,255,255,.04);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* ---------------------------------------------------------
   Pagination
   DataTables Bootstrap5 renders .pagination > .page-item > .page-link
   Bootstrap's white defaults must be fully overridden here.
   --------------------------------------------------------- */
div.dt-container .dt-paging {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

div.dt-container .dt-paging nav { display: flex; justify-content: flex-end; }

/* Reset Bootstrap defaults */
div.dt-container .dt-paging .pagination {
  display: flex;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

div.dt-container .dt-paging .pagination .page-item { list-style: none; }

/* Base button */
div.dt-container .dt-paging .pagination .page-item .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--r-sm) !important;
  font-size: 0.74rem;
  font-family: var(--font);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  user-select: none;
  box-shadow: none;
  outline: none;
}

/* Hover */
div.dt-container .dt-paging .pagination .page-item:not(.active):not(.disabled) .page-link:hover {
  background: var(--elevated);
  border-color: var(--accent);
  color: var(--accent-2);
}

/* Active / current page */
div.dt-container .dt-paging .pagination .page-item.active .page-link,
div.dt-container .dt-paging .pagination .page-item.active .page-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 14px var(--accent-glow);
  cursor: default;
}

/* Disabled (prev/next/first/last when at boundary) */
div.dt-container .dt-paging .pagination .page-item.disabled .page-link,
div.dt-container .dt-paging .pagination .page-item.disabled .page-link:hover {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  opacity: .3;
  cursor: not-allowed;
  box-shadow: none;
}

/* Focus ring */
div.dt-container .dt-paging .pagination .page-item .page-link:focus {
  outline: none;
  box-shadow: var(--glow);
  border-color: var(--accent);
}

/* ---------------------------------------------------------
   SEO content block
   --------------------------------------------------------- */
.seo-block {
  padding: 32px 0 10px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.seo-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.seo-heading::before {
  content: '';
  display: block;
  width: 3px; height: 14px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.seo-block p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.seo-block p strong { color: var(--text-dim); font-weight: 500; }

/* ---------------------------------------------------------
   Sensor detail page
   --------------------------------------------------------- */
.detail-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 0 40px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: .02em;
  margin-bottom: 24px;
  transition: color var(--t-fast);
}
.detail-back svg { width: 14px; height: 14px; }
.detail-back:hover { color: var(--accent-2); }

/* Hero card */
.detail-hero { padding: 24px 28px; margin-bottom: 4px; }

.detail-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-hero-id {
  display: flex;
  align-items: center;
  gap: 16px;
}

.detail-avatar {
  width: 48px !important;
  height: 48px !important;
  font-size: 0.78rem !important;
  border-radius: 10px !important;
  flex-shrink: 0;
}

.detail-mfr {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: .02em;
  margin-bottom: 3px;
}

.detail-model {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.03em;
  margin: 0;
  font-family: var(--mono);
}

/* Primary spec tiles */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 16px 0 8px;
}

.spec-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 14px 14px;
  text-align: center;
}

.spec-tile-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 5px;
}

.spec-tile-unit {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: .03em;
  margin-left: 2px;
}

.spec-tile-lbl {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

/* Detail sections */
.detail-section {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.detail-section-title {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.detail-section-title::before {
  content: '';
  display: block;
  width: 3px; height: 12px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Resource links */
.resource-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  cursor: pointer;
}
.resource-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.resource-ext { width: 11px !important; height: 11px !important; opacity: .6; }

.resource-link--dl {
  background: var(--accent-dim);
  border-color: rgba(70,119,244,.3);
  color: var(--accent-2);
}
.resource-link--dl:hover {
  background: rgba(70,119,244,.18);
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.resource-link--web {
  background: var(--surface-2);
  color: var(--text-dim);
}
.resource-link--web:hover {
  background: var(--elevated);
  border-color: var(--border-2);
  color: var(--text);
}

/* Extended spec table */
.spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.spec-list-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.spec-list-row:last-child,
.spec-list-row:nth-last-child(2):nth-child(odd) { border-bottom: none; }

.spec-list-key {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 110px;
  flex-shrink: 0;
}

.spec-list-val {
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 500;
}

.spec-list-row--empty { opacity: .45; }
.spec-na { color: var(--text-muted); font-weight: 400; }

/* Auto-generated description */
.detail-description {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin: 0;
}
.detail-description strong { color: var(--text); font-weight: 600; }

/* Notes */
.detail-notes {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin: 0;
}

/* Similar sensors grid */
.similar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.similar-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.similar-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  text-decoration: none;
}

.similar-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.similar-avatar {
  width: 30px !important;
  height: 30px !important;
  font-size: 0.58rem !important;
  border-radius: 6px !important;
  flex-shrink: 0;
}

.similar-card-mfr {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.similar-card-model {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.similar-card-specs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.similar-card-specs em {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.63rem;
}


@media (max-width: 767px) {
  .similar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .similar-grid { grid-template-columns: 1fr; }
}

/* Report inaccuracy */
.detail-report {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.detail-report a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.detail-report a:hover { color: var(--accent-2); }

/* 404 */
.detail-404 {
  text-align: center;
  padding: 80px 0;
}
.detail-404-code {
  font-size: 5rem;
  font-weight: 700;
  color: var(--border-2);
  line-height: 1;
  margin-bottom: 12px;
  font-family: var(--mono);
}
.detail-404-msg {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.detail-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: var(--accent-dim);
  border: 1px solid rgba(70,119,244,.3);
  border-radius: var(--r-sm);
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.detail-back-btn:hover { background: rgba(70,119,244,.18); border-color: var(--accent-2); color: var(--accent-2); }

/* Responsive */
@media (max-width: 767px) {
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
  .spec-list  { grid-template-columns: 1fr; }
  .detail-model { font-size: 1.15rem; }
}
@media (max-width: 480px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.page-footer {
  border-top: 1px solid var(--border);
  padding: 16px 0 22px;
  margin-top: 6px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.73rem;
  color: var(--text-muted);
}

.footer-sep { color: var(--border-2); }
.footer-inner a { color: var(--text-muted); transition: color var(--t-fast); }
.footer-inner a:hover { color: var(--accent-2); }

.footer-mfr {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: auto;
}
.footer-mfr a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-mfr a:hover { color: var(--accent-2); }

/* ---------------------------------------------------------
   Bootstrap 5 overrides
   --------------------------------------------------------- */
.row { --bs-gutter-x: 10px; }
.table { --bs-table-bg: transparent; --bs-table-border-color: var(--border); }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 991px) {
  .header-stats { gap: 6px; }
  .stat-pill { padding: 4px 10px; }
  .stat-num { font-size: 0.9rem; }
}

@media (max-width: 767px) {
  .page-wrapper { padding: 0 14px; }
  .page-header { padding: 18px 0 16px; }
  .page-title { font-size: 1.3rem; }
  .filter-card { position: static; }
  .table-toolbar { flex-wrap: wrap; }
  .table-hint { display: none; }
  .card-body { padding: 14px; }
  .filter-card .card-body { padding: 14px 14px 12px; }
  table#sensorsTable tbody td { padding: 8px 10px; }
  table#sensorsTable tbody tr:hover td:first-child {
    border-left-width: 2px; padding-left: 8px;
  }
  .seo-block .row > div + div { margin-top: 20px; }
}

@media (max-width: 575px) {
  .page-title { font-size: 1.15rem; }
  .header-stats { gap: 5px; }
  .stat-sep { display: none; }
}
