/* ==========================================================
   Obsolete Product Manuals – Dynabrade
   Same design as the Häfele Belt Calculator (../hafelebeltcalculator).
   ========================================================== */
:root {
  --om-orange: #f26a21;
  --om-orange-dark: #d9561a;
  --om-orange-soft: #fff1e8;
  --om-dark: #1f2129;
  --om-ink: #16181d;
  --om-muted: #5d636e;
  --om-border: #e3e6ea;
  --om-bg: #f4f5f7;
  --om-radius: 18px;
}

* { -webkit-font-smoothing: antialiased; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--om-bg);
  color: var(--om-ink);
  font-size: 15px;
}

.om-container { max-width: 1184px; }

/* ---------- Hero ---------- */
.om-hero {
  background:
    radial-gradient(800px 260px at 100% 0%, rgba(242, 106, 33, .35), transparent 70%),
    var(--om-dark);
  color: #fff;
  padding: 24px 0 150px;
}
.om-brand {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 8px 18px;
  margin-bottom: 28px;
}
.om-logo { height: 44px; width: auto; }

.om-title {
  font-weight: 800;
  letter-spacing: -.03em;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.1;
  margin-bottom: 18px;
}
.om-lead { max-width: 640px; color: #dfe2e7; font-size: 16px; line-height: 1.5; margin: 0 0 22px; }

.om-stats { display: flex; gap: 10px; margin: 0; }
.om-stats div {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  padding: 8px 14px;
}
.om-stats dt { font-size: 12px; font-weight: 500; color: #b9bec7; }
.om-stats dd { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

.om-link { color: var(--om-orange-dark); text-decoration: underline; text-underline-offset: 2px; }
.om-link:hover { color: var(--om-orange); }

/* ---------- Card ---------- */
.om-card-wrap { margin-top: -110px; position: relative; z-index: 2; }
.om-card {
  background: #fff;
  border-radius: var(--om-radius);
  overflow: hidden;
  box-shadow: 0 24px 50px -20px rgba(16, 24, 40, .25), 0 2px 6px rgba(16, 24, 40, .04);
}

.om-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 28px 32px 22px;
  border-bottom: 1px solid var(--om-border);
}
.om-card-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.om-card-note { color: var(--om-muted); font-size: 14px; }

.om-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.om-search { position: relative; width: 360px; max-width: 100%; }
.om-search svg {
  position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  fill: none; stroke: var(--om-muted); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.om-input {
  height: 46px;
  border-radius: 8px;
  border-color: var(--om-border);
  font-size: 15px;
  padding-left: 42px;
  padding-right: 40px;
}
.om-input:focus { border-color: var(--om-orange); box-shadow: 0 0 0 .2rem rgba(242, 106, 33, .15); }
.om-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.om-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 6px; background: none;
  color: var(--om-muted); font-size: 22px; line-height: 1;
}
.om-clear:hover { background: var(--om-bg); color: var(--om-ink); }

.om-switch { margin: 0; font-size: 14px; font-weight: 500; }
.om-switch .form-check-input { cursor: pointer; }
.om-switch .form-check-input:checked { background-color: var(--om-orange); border-color: var(--om-orange); }
.om-switch .form-check-input:focus { border-color: var(--om-orange); box-shadow: 0 0 0 .2rem rgba(242, 106, 33, .15); }
.om-switch .form-check-label { cursor: pointer; }

/* ---------- Table ---------- */
.om-table { font-size: 14px; }
.om-table th, .om-table td { padding: 13px 16px; vertical-align: middle; border-color: var(--om-border); }
.om-table th:first-child, .om-table td:first-child { padding-left: 32px; }
.om-table th:last-child, .om-table td:last-child { padding-right: 32px; }
.om-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8f9fa;
  padding-top: 10px;
  padding-bottom: 10px;
  white-space: nowrap;
}
.om-sort {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: none; padding: 0;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
  color: var(--om-muted);
}
.om-sort:hover { color: var(--om-ink); }
.om-sort-icon { width: 10px; height: 12px; opacity: .35; }
.om-sort-icon::before { content: "↕"; font-size: 12px; line-height: 12px; }
th[aria-sort] .om-sort { color: var(--om-orange-dark); }
th[aria-sort] .om-sort-icon { opacity: 1; }
th[aria-sort="ascending"] .om-sort-icon::before { content: "↑"; }
th[aria-sort="descending"] .om-sort-icon::before { content: "↓"; }

.om-table tbody tr:hover > * { background: #fafbfc; }
.om-item { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.om-desc { color: #3b4049; min-width: 260px; }
.om-date { white-space: nowrap; color: var(--om-muted); font-variant-numeric: tabular-nums; }

.om-pdf {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--om-orange-soft);
  color: var(--om-orange-dark);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.om-pdf svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.om-pdf:hover, .om-pdf:focus-visible { background: var(--om-orange); color: #fff; }

.om-offline { display: inline-flex; align-items: center; gap: 6px; min-height: 31px; color: var(--om-muted); white-space: nowrap; }
.om-tag {
  display: inline-block;
  background: #eceef1;
  color: var(--om-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: 1px;
}

.om-empty { padding: 48px 32px; text-align: center; color: var(--om-muted); }
.om-empty-title { color: var(--om-ink); font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.om-btn-outline {
  border: 1px solid var(--om-border); background: #fff; color: var(--om-ink);
  font-weight: 600; height: 42px; border-radius: 8px; padding: 0 18px;
}
.om-btn-outline:hover { border-color: #c4c9d0; background: #fafbfc; }

.om-help { color: var(--om-muted); font-size: 14px; margin: 18px 4px 0; }
.om-footer { color: var(--om-muted); font-size: 13px; padding: 28px 0 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .om-hero { padding: 20px 0 120px; }
  .om-card-wrap { margin-top: -90px; }
  .om-filters, .om-search { width: 100%; }
}

/* Phones: each manual becomes a small card */
@media (max-width: 767.98px) {
  body { font-size: 14px; }
  .om-hero { padding: 16px 0 100px; }
  .om-brand { padding: 6px 12px; margin-bottom: 20px; }
  .om-logo { height: 34px; }
  .om-lead { font-size: 15px; }
  .om-card-wrap { margin-top: -76px; }
  .om-toolbar { padding: 22px 20px 18px; }

  .om-table thead { display: none; }
  .om-table, .om-table tbody, .om-table tr, .om-table td { display: block; width: 100%; }
  .om-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--om-border);
  }
  .om-table tr[hidden] { display: none; }
  .om-table td, .om-table td:first-child, .om-table td:last-child { padding: 0; border: 0; }
  .om-table tbody tr:hover > * { background: none; }
  .om-item { grid-column: 1; grid-row: 1; font-size: 15px; }
  .om-date { grid-column: 2; grid-row: 1; text-align: right; font-size: 13px; }
  .om-desc { grid-column: 1 / -1; min-width: 0; }
  .om-table td[data-label="Manual"] { grid-column: 1 / -1; margin-top: 6px; }
  .om-help { margin-left: 0; margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .om-pdf { transition: none; }
}

@media print {
  body { background: #fff; }
  .om-hero { background: none; color: var(--om-ink); padding: 0 0 12px; }
  .om-lead, .om-stats, .om-filters, .om-footer { display: none !important; }
  .om-card-wrap { margin-top: 0; }
  .om-card { box-shadow: none; }
  .om-table thead th { position: static; }
}
