:root {
  --w-ink: #121518;
  --w-muted: #627078;
  --w-paper: #ffffff;
  --w-bg: #f4f6f4;
  --w-line: #dce1df;
  --w-blue: #0087b6;
  --w-green: #187448;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.warranty-page { margin: 0; color: var(--w-ink); background: var(--w-bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
.warranty-page a { color: inherit; text-decoration: none; }
.warranty-page button, .warranty-page input, .warranty-page select, .warranty-page textarea { font: inherit; }
.warranty-header { display: flex; min-height: 88px; padding: 18px 36px; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--w-line); background: white; }
.warranty-header > a { display: flex; }
.warranty-header img { width: 145px; height: auto; }
.warranty-header nav { display: flex; align-items: center; gap: 28px; font-size: 13px; font-weight: 650; }
.warranty-header nav a[aria-current] { color: var(--w-blue); }
.warranty-header nav a:hover, .warranty-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.warranty-header .header-contact { display: inline-flex; align-items: center; gap: 8px; border-left: 1px solid var(--w-line); padding-left: 28px; }
.warranty-page .lucide, .warranty-check-block .lucide { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.8; }
.warranty-main { max-width: 1160px; margin: 0 auto; padding: 64px 32px 100px; }
.warranty-eyebrow { margin: 0 0 10px; color: var(--w-blue); text-transform: uppercase; font-size: 11px; font-weight: 750; letter-spacing: 0; }
.warranty-heading { margin-bottom: 38px; }
.warranty-heading h1, .card-heading h1 { font-size: 40px; line-height: 1.12; letter-spacing: 0; margin: 0; }
.warranty-heading > p:last-child { margin: 14px 0 0; color: var(--w-muted); }
.check-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.check-panel { background: white; padding: 32px; border: 1px solid var(--w-line); border-radius: 8px; }
.panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.panel-title > .lucide { width: 24px; height: 24px; color: var(--w-blue); }
.panel-title h2 { margin: 0; font-size: 20px; }
.warranty-check-form > label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.warranty-search-row { display: flex; gap: 10px; }
.warranty-page input, .warranty-page select, .warranty-page textarea, .warranty-check-form input { width: 100%; min-width: 0; border: 1px solid #c7cfcc; border-radius: 5px; background: white; color: #121518; padding: 10px 12px; min-height: 44px; font-size: 14px; }
.warranty-check-form input { font-family: ui-monospace, monospace; }
.warranty-page textarea { resize: vertical; min-height: 96px; }
.warranty-page :focus-visible, .warranty-check-block :focus-visible { outline: 2px solid var(--w-blue, #0087b6); outline-offset: 3px; }
.warranty-page [aria-invalid="true"], .warranty-check-block [aria-invalid="true"] { border-color: #ad3434; }
.field-hint { margin: 8px 0 0; color: #627078; font-size: 12px; line-height: 1.5; }
.w-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; min-height: 44px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap; text-decoration: none; }
.w-primary { color: white !important; background: #121518; border-color: #121518; }
.w-primary:hover:not(:disabled) { background: #30383d; }
.w-secondary { color: #121518; background: white; border-color: #c7cfcc; }
.w-secondary:hover:not(:disabled) { background: #eef2f0; }
.w-button:disabled { opacity: 0.4; cursor: not-allowed; }
.warranty-message { color: #984020; font-size: 14px; margin: 16px 0 0; }
.warranty-message:empty, .editor-message:empty { display: none; }
.warranty-result { margin-top: 28px; border-top: 1px solid #dce1df; padding-top: 24px; }
.warranty-status { display: inline-flex; margin: 0 0 16px; border-radius: 4px; padding: 5px 10px; font-size: 12px; font-weight: 750; }
.status-active { background: #e6f3ea; color: #187448; }
.status-expired { background: #fff2df; color: #9d5b00; }
.status-cancelled { background: #fbe8e8; color: #a82d2d; }
.warranty-result h3 { margin: 0; font-size: 22px; line-height: 1.3; }
.warranty-number { margin: 6px 0 24px; color: #627078; font-size: 13px; font-family: ui-monospace, monospace; }
.warranty-details { display: grid; gap: 12px; margin: 0; }
.warranty-details > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; }
.warranty-details dt { color: #627078; font-size: 13px; }
.warranty-details dd { margin: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.check-support { padding: 32px 0; }
.support-logo { object-fit: contain; object-position: left; max-width: 100%; }
.check-support h2 { margin: 26px 0 14px; font-size: 27px; line-height: 1.25; }
.check-support > p { color: var(--w-muted); font-size: 14px; max-width: 290px; }
.support-contact { margin-top: 32px; border-top: 1px solid var(--w-line); padding-top: 24px; }
.support-contact span { display: block; font-size: 12px; color: var(--w-muted); margin-bottom: 6px; }
.support-contact a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; }
.warranty-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 36px; border-top: 1px solid var(--w-line); font-size: 12px; color: var(--w-muted); }
.workspace-label { border-left: 1px solid var(--w-line); padding-left: 28px; color: var(--w-muted); font-weight: 450; }
.admin-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.admin-main { display: grid; place-items: center; width: 100%; flex: 1; padding: 64px 20px; }
.admin-panel { width: min(100%, 400px); padding: 32px; background: white; border: 1px solid var(--w-line); border-radius: 8px; }
.admin-symbol { display: flex; align-items: center; margin-bottom: 24px; color: var(--w-blue); }
.admin-symbol .lucide { width: 28px; height: 28px; }
.admin-panel h1 { margin: 0; font-size: 32px; line-height: 1.2; }
.admin-subtitle { margin: 10px 0 28px; font-size: 14px; color: var(--w-muted); }
.admin-panel label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 650; }
.admin-pin-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
.admin-pin-row input { font-family: ui-monospace, monospace; font-size: 18px; }
.admin-message { font-size: 13px; color: #984020; margin: 12px 0 0; }
.admin-message:empty { display: none; }
.admin-submit { width: 100%; margin-top: 24px; }
.card-main { max-width: 1500px; margin: 0 auto; padding: 36px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.card-heading h1 { font-size: 32px; }
.draft-badge { display: inline-block; padding: 6px 10px; font-size: 12px; font-weight: 650; color: #736b4b; background: #eeece4; border-radius: 4px; }
.draft-badge.is-published { background: #e6f3ea; color: var(--w-green); }
.card-workspace { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 36px; align-items: start; }
.card-editor { padding-right: 28px; border-right: 1px solid var(--w-line); }
.card-editor fieldset { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.card-editor legend { width: 100%; padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--w-line); font-size: 14px; font-weight: 700; }
.card-editor label { display: block; margin: 12px 0 6px; font-size: 12px; font-weight: 600; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
.code-row input { font-family: ui-monospace, monospace; }
.icon-button { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid #c7cfcc; border-radius: 5px; background: white; cursor: pointer; }
.form-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.expiry-note { margin: 12px 0 0; font-size: 12px; color: var(--w-muted); }
.expiry-note strong { color: var(--w-ink); }
.film-fields > .form-columns { grid-template-columns: minmax(0, 1.4fr) minmax(70px, 0.6fr); }
.save-button { width: 100%; }
.editor-message { font-size: 13px; margin: 14px 0; color: #984020; }
.saved-drafts { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--w-line); }
.saved-drafts h2 { font-size: 14px; margin: 0 0 12px; }
.draft-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.draft-actions .w-button { font-size: 12px; padding: 8px; }
.card-editor .import-label { margin: 0; display: flex; }
.export-button { width: 100%; }
.sr-only { position: absolute; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.card-preview-area { position: sticky; top: 24px; min-width: 0; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.preview-toolbar h2 { margin: 0; font-size: 16px; }
.print-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.print-actions select { width: auto; font-size: 12px; }
.preview-caption { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 24px; color: var(--w-muted); font-size: 11px; }
.side-label { margin: 0 0 8px; color: var(--w-muted); text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: 0; }
.print-sheet { container-type: inline-size; margin-bottom: 24px; }
.warranty-card { position: relative; isolation: isolate; width: 100%; aspect-ratio: 19 / 8; background: white; border: 1px solid #d3d9d6; padding: 3.5% 4%; font-size: clamp(5px, 1.45cqw, 14px); line-height: 1.45; overflow: hidden; }
.warranty-card::before { content: ""; position: absolute; z-index: -1; inset: 0; background: url("assets/polar-logo-dark.png") center / 45% auto repeat; opacity: 0.025; pointer-events: none; }
.warranty-card-front { display: grid; grid-template-rows: auto 1fr auto; }
.card-brand-row { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1.2%; border-bottom: 2px solid #0087b6; }
.card-brand-row > span { font-size: 0.65em; font-weight: 750; letter-spacing: 0; }
.card-brand-row img { width: 18%; height: auto; }
.card-front-content { display: grid; grid-template-columns: minmax(0, 1fr) 28%; gap: 5%; padding-top: 3%; }
.card-welcome h2 { margin: 0 0 0.28em; font-size: 2.7em; line-height: 1; }
.card-welcome > p { margin: 0 0 0.65em; max-width: 95%; font-size: 0.82em; }
.card-welcome h3 { margin: 0.6em 0 0.35em; font-size: 0.88em; }
.card-welcome .card-notes { font-size: 0.73em; white-space: pre-line; overflow-wrap: anywhere; }
.card-contact { display: flex; flex-direction: column; margin-top: 0.8em; font-size: 0.78em; line-height: 1.5; }
.card-qr-block { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.3em; min-width: 0; }
.card-qr { display: flex; align-items: center; justify-content: center; width: 63%; aspect-ratio: 1; background: white; font-size: 0.7em; border: 1px solid #dce1df; margin-bottom: 0.6em; }
.card-qr svg { display: block; width: 100%; height: 100%; }
.card-qr-block > strong { font-size: 0.8em; }
.card-code { font-family: ui-monospace, monospace; font-size: 0.7em; overflow-wrap: anywhere; }
.card-check-url { font-size: 0.67em; overflow-wrap: anywhere; max-width: 100%; }
.card-front-footer { display: flex; justify-content: space-between; font-size: 0.66em; color: #627078; border-top: 1px solid #dce1df; padding-top: 1%; }
.warranty-card-back { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 4% 5%; }
.warranty-card-back::before { opacity: 0.015; }
.card-back-brand { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding-bottom: 1.2%; border-bottom: 1px solid #dce1df; }
.card-back-brand img { width: 15%; height: auto; }
.card-back-brand span { font-size: 0.66em; color: #627078; }
.card-vehicle-details, .card-film-details dl { margin: 0; align-self: center; }
.card-vehicle-details > div, .card-film-details dl > div { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 0.6em; margin-bottom: 0.48em; font-size: 0.85em; }
.warranty-card dt { color: #627078; }
.warranty-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.card-vin { font-family: ui-monospace, monospace; }
.card-film-details { align-self: center; border-left: 1px solid #dce1df; padding-left: 6%; }
.card-film-details h3 { margin: 0 0 0.8em; font-size: 1em; }
.card-film-details dl > div { grid-template-columns: 1fr; gap: 0.1em; margin-bottom: 0.85em; }
.card-validity { display: flex; justify-content: space-between; align-items: center; gap: 10px; grid-column: 1 / -1; border-top: 2px solid #0087b6; padding-top: 1.5%; }
.card-validity span { color: #627078; font-size: 0.8em; }
.card-validity strong { font-size: 1.1em; }
.warranty-check-block { --w-blue: #0087b6; max-width: 900px; margin: 0 auto 38px; padding: 28px 0; border-top: 1px solid #dce1df; border-bottom: 1px solid #dce1df; }
.warranty-check-block .panel-title { justify-content: center; margin-bottom: 20px; }
.warranty-check-block .panel-title h3 { margin: 0; font-size: 22px; line-height: 1.3; }
.warranty-check-block .warranty-search-row { max-width: 620px; margin: 0 auto; }
.warranty-check-block .warranty-check-form > label, .warranty-check-block .field-hint { max-width: 620px; margin-left: auto; margin-right: auto; }
.warranty-check-block .warranty-result, .warranty-check-block .warranty-message { max-width: 620px; margin-left: auto; margin-right: auto; }
.warranty-check-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin: 22px 0 0; font-size: 13px; font-weight: 650; }
.warranty-check-links a { display: inline-flex; align-items: center; gap: 6px; }
.warranty-check-links a:hover { text-decoration: underline; }
@media (min-width: 1500px) { .card-workspace { grid-template-columns: 340px minmax(0, 1fr); } }
@media (max-width: 1000px) {
  .card-main { padding: 28px 20px; }
  .card-workspace { grid-template-columns: 280px minmax(0, 1fr); gap: 22px; }
  .card-editor { padding-right: 20px; }
  .print-actions { flex-wrap: wrap; }
  .check-layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; }
  .warranty-search-row { flex-direction: column; }
  .warranty-search-row .w-button { width: 100%; }
}
@media (max-width: 740px) {
  .warranty-header { padding: 16px 20px; min-height: 76px; }
  .warranty-header img { width: 115px; }
  .warranty-header nav { gap: 12px; font-size: 11px; }
  .warranty-header nav > a:first-child { display: none; }
  .warranty-header .header-contact { padding-left: 12px; }
  .workspace-label { display: none; }
  .warranty-main { padding: 40px 20px 60px; }
  .warranty-heading h1 { font-size: 32px; }
  .check-layout { grid-template-columns: 1fr; gap: 20px; }
  .check-panel { padding: 24px 20px; }
  .check-support { padding: 16px 0; }
  .check-support > p { max-width: 100%; }
  .check-support h2 { font-size: 24px; }
  .warranty-footer { padding: 24px 20px; }
  .card-heading { align-items: start; flex-direction: column; }
  .card-heading h1 { font-size: 30px; }
  .card-workspace { display: flex; flex-direction: column; gap: 32px; }
  .card-editor { width: 100%; padding-right: 0; border-right: 0; }
  .card-preview-area { position: static; width: 100%; }
  .preview-toolbar { align-items: start; flex-direction: column; }
  .print-actions { width: 100%; }
  .print-actions select { flex: 1 1 100%; }
  .print-actions button { flex: 1; }
  .print-actions .w-button { font-size: 12px; padding: 10px 12px; }
  .preview-caption { flex-wrap: wrap; }
  .warranty-check-block { padding: 24px 0; }
}
@page { size: A4 portrait; margin: 10mm; }
@media print {
  html, body.warranty-page { width: auto; margin: 0; padding: 0; background: white; }
  .warranty-header, .card-heading, .card-editor, .preview-toolbar, .preview-caption, .side-label { display: none !important; }
  .card-main, .card-workspace, .card-preview-area, .print-document { display: block; margin: 0; padding: 0; width: 190mm; max-width: none; position: static; }
  .print-sheet { margin: 0; padding: 0; width: 190mm; break-after: page; page-break-after: always; }
  .print-sheet:last-child { break-after: auto; page-break-after: auto; }
  .warranty-card { width: 190mm; height: 80mm; aspect-ratio: auto; padding: 6mm 7.6mm; font-size: 9pt; print-color-adjust: exact; -webkit-print-color-adjust: exact; break-inside: avoid; }
  body[data-print-side="front"] .sheet-back, body[data-print-side="back"] .sheet-front { display: none; }
  body[data-print-side="front"] .sheet-front { break-after: auto; page-break-after: auto; }
}
