:root {
    --fs-bg: #f7f4ee;
    --fs-paper: #fffdf8;
    --fs-ink: #1f2933;
    --fs-muted: #6b7280;
    --fs-primary: #0f766e;
    --fs-primary-dark: #115e59;
    --fs-ok: #15803d;
    --fs-repair: #b91c1c;
    --fs-border: #e5ded4;
    --fs-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

html { font-size: 16px; }
body {
    background: radial-gradient(circle at top left, #fff5dc, transparent 30%), linear-gradient(180deg, #f8f2e7 0%, var(--fs-bg) 100%);
    color: var(--fs-ink);
    min-height: 100vh;
}
body, input, textarea, select, button { font-family: "Trebuchet MS", "Segoe UI", sans-serif; }
.auth-body { display: grid; place-items: center; min-height: 100vh; }
.auth-shell { padding: 1.5rem; width: min(100%, 28rem); }
.auth-card, .app-card { background: var(--fs-paper); border: 1px solid var(--fs-border); border-radius: 1.5rem; box-shadow: var(--fs-shadow); }
.auth-card { padding: 1.5rem; }
.app-header { padding: 1rem 0; background: #0b3b38; color: white; }
.narrow-shell { max-width: 52rem; }
.header-brand, .list-header, .review-row, .summary-strip, .top-nav, .header-user { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top-nav { justify-content: flex-start; flex-wrap: wrap; margin-top: 0.75rem; }
.top-nav a { color: rgba(255,255,255,.9); text-decoration: none; }
.page-shell { padding-top: 1.25rem; padding-bottom: 5rem; }
.eyebrow, .label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--fs-muted); margin-bottom: 0.35rem; }
.muted { color: var(--fs-muted); }
.stack-sm > * + * { margin-top: 0.5rem; }
.stack-md > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.btn-primary { background: var(--fs-primary); border-color: var(--fs-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--fs-primary-dark); border-color: var(--fs-primary-dark); }
.btn-xl, .btn-lg { border-radius: 1rem; min-height: 3.25rem; }
.progress-hero { margin-bottom: 1rem; }
.progress-thick { height: 0.8rem; border-radius: 999px; background: rgba(15, 118, 110, 0.12); }
.progress-bar { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.grid-2 { display: grid; gap: 1rem; }
.check-card { border: 1px solid var(--fs-border); border-radius: 1.25rem; padding: 1rem; background: white; }
.check-card h2 { font-size: 1.05rem; margin: 0; }
.segmented-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1rem; }
.segmented-option { position: relative; display: block; cursor: pointer; }
.segmented-option input { position: absolute; opacity: 0; }
.segmented-option span { display: flex; align-items: center; justify-content: center; min-height: 3.75rem; border-radius: 1rem; border: 2px solid var(--fs-border); font-weight: 700; background: #fff; }
.segmented-option.ok input:checked + span { border-color: var(--fs-ok); background: rgba(21, 128, 61, 0.09); color: var(--fs-ok); }
.segmented-option.repair input:checked + span { border-color: var(--fs-repair); background: rgba(185, 28, 28, 0.09); color: var(--fs-repair); }
.sticky-footer { position: sticky; bottom: 0.75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding-top: 1rem; background: linear-gradient(180deg, rgba(247,244,238,0), rgba(247,244,238,1) 30%); }
.sticky-footer.inline { position: static; background: none; padding-top: 0; }
.summary-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; padding: 1rem; border-radius: 1rem; background: #f4f8f8; }
.status-badge, .pill { border-radius: 999px; padding: 0.45rem 0.85rem; font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.status-badge.ok, .pill.ok { background: rgba(21, 128, 61, 0.12); color: var(--fs-ok); }
.status-badge.repair, .pill.repair { background: rgba(185, 28, 28, 0.12); color: var(--fs-repair); }
.status-badge.pending { background: rgba(180, 83, 9, 0.14); color: #92400e; }
.status-badge.neutral { background: rgba(71, 85, 105, 0.12); color: #334155; }
.list-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--fs-border); border-radius: 1rem; text-decoration: none; color: inherit; background: white; }
.declaration-box, .signature-card { border: 1px solid var(--fs-border); border-radius: 1rem; padding: 1rem; background: white; }
.check-affirmation { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; }
.signature-pad { width: 100%; max-width: 100%; border: 2px dashed var(--fs-border); border-radius: 1rem; background: white; touch-action: none; }
.signature-image { max-width: 100%; border: 1px solid var(--fs-border); border-radius: 0.75rem; background: white; }
.signature-summary { display: grid; gap: 1rem; }
.filter-grid { display: grid; gap: 0.75rem; }
.filter-check { min-height: 2.75rem; }
.success-card { margin-top: 2rem; }
@media (min-width: 768px) {
    .grid-2, .filter-grid { grid-template-columns: repeat(2, 1fr); }
    .summary-strip, .compact-grid { grid-template-columns: repeat(4, 1fr); }
    .signature-summary { grid-template-columns: repeat(2, 1fr); }
}
@media print {
    body { background: white; }
    .app-header, .d-print-none, .sticky-footer { display: none !important; }
    .page-shell { max-width: 100%; padding: 0; }
    .app-card { border: 1px solid #ccc; box-shadow: none; }
}
