:root { --haccp: #35618c; --haccp-2: #46739f; }
body { background: #f2f5f9; font-size: 15px; }
.bg-haccp { background: var(--haccp); }
.btn-haccp { background: var(--haccp); color: #fff; border-color: var(--haccp); }
.btn-haccp:hover, .btn-haccp:focus { background: var(--haccp-2); color: #fff; }
.text-haccp { color: var(--haccp); }
.objekt-btn { max-width: 46vw; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.page-title { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.page-title h1 { font-size: 1.35rem; margin: 0; }

/* Brze akcije na naslovnici */
.tile { display: block; text-decoration: none; color: inherit; background: #fff; border-radius: .6rem; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); height: 100%; }
.tile:hover { box-shadow: 0 3px 10px rgba(0,0,0,.12); color: inherit; }
.tile i { font-size: 1.8rem; color: var(--haccp); }
.tile .big { font-size: 1.6rem; font-weight: 700; }

/* Unos temperature – velike kartice za mobitel */
.temp-card { background: #fff; border-radius: .6rem; padding: .8rem 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.temp-card.ok { border-left: 5px solid #198754; }
.temp-card.bad { border-left: 5px solid #dc3545; }
.temp-input { font-size: 1.5rem; font-weight: 600; text-align: center; max-width: 9rem; }
.temp-input.is-bad { color: #dc3545; border-color: #dc3545; }

.clean-item { background: #fff; border-radius: .5rem; padding: .6rem .8rem; margin-bottom: .4rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.clean-item.done { background: #eef8f2; }
.clean-item.notdone { background: #fdeeee; }
.clean-item .form-check-input { width: 1.6em; height: 1.6em; margin-top: 0; }

.table-sm td, .table-sm th { vertical-align: middle; }
.badge-odst { background: #dc3545; }
.naknadni { font-size: .75rem; color: #b26a00; }

/* Potpis */
.sig-wrap { position: relative; background: #fff; border: 2px dashed #b9c6d3; border-radius: .6rem; touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; }
.sig-line { position: absolute; left: 8%; right: 8%; bottom: 48px; border-bottom: 1px solid #ccd6e0; pointer-events: none; }
.sig-preview { max-height: 90px; background: #fff; border: 1px solid #dee2e6; border-radius: .4rem; padding: .25rem; }
.potpis { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; vertical-align: middle; }
.potpis img { max-width: 160px; object-fit: contain; }
.potpis small { font-size: .68rem; color: #555; }

/* Izvještaji */
.report { background: #fff; padding: 1rem; border-radius: .5rem; }
.report h2 { font-size: 1.2rem; margin-bottom: .2rem; }
.report .meta { font-size: .85rem; color: #555; }
.rep-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.rep-table th, .rep-table td { border: 1px solid #999; padding: 3px 4px; text-align: center; vertical-align: middle; }
.rep-table th { background: #e8eef5; }
.rep-table td.l, .rep-table th.l { text-align: left; }
.rep-table td.bad { background: #fde2e2; color: #b00; font-weight: 700; }
.rep-table td.miss { background: #fff7e0; }
.rep-table .potpis img { max-width: 70px; }
.sign-row { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 1.2rem; }
.sign-box { min-width: 220px; }
.sign-box .crta { border-bottom: 1px solid #333; min-height: 46px; display: flex; align-items: flex-end; justify-content: center; }
.legenda { font-size: .75rem; color: #555; }

@media print {
  body { background: #fff; font-size: 11px; }
  .no-print, .navbar, .btn, .alert { display: none !important; }
  main.container-xl { max-width: none; padding: 0 !important; }
  .report, .card { box-shadow: none; padding: 0; }
  .rep-table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rep-table td.bad { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: #000; text-decoration: none; }
  tr { page-break-inside: avoid; }
}

/* Obrasci prema Vodiču dobre higijenske prakse (HOK) */
.obrazac { background: #fff; padding: 1rem; border-radius: .5rem; color: #000; }
.ob-head, .ob-foot, .ob-t { width: 100%; border-collapse: collapse; }
.ob-head td { border: 1.5px solid #000; padding: 4px 8px; vertical-align: middle; }
.ob-head .ob-obj { width: 26%; font-size: .8rem; }
.ob-head .ob-tit { text-align: center; font-weight: 700; font-size: 1.05rem; text-transform: uppercase; line-height: 1.25; }
.ob-head .ob-meta { width: 20%; font-size: .78rem; line-height: 1.5; }
.ob-lbl { font-size: .72rem; color: #444; }
.ob-small { font-size: .68rem; color: #444; }
.ob-sub { display: flex; flex-wrap: wrap; gap: 2rem; margin: .6rem 0; font-size: .9rem; }
.ob-sub b { border-bottom: 1px solid #000; padding: 0 .4rem; }
.ob-t { margin-top: .4rem; font-size: .8rem; }
.ob-t th, .ob-t td { border: 1px solid #000; padding: 3px 4px; text-align: center; vertical-align: middle; height: 26px; }
.ob-t th { background: #e8eef5; font-weight: 600; }
.ob-t td.l, .ob-t th.l { text-align: left; }
.ob-t td.bad { background: #fde2e2; color: #b00; font-weight: 700; }
.ob-t td.miss { background: #fff7e0; }
.ob-t .potpis img { max-width: 80px; max-height: 24px; }
.ob-t .potpis small { font-size: .6rem; }
.ob-t td.grp { background: #f3f6fa; font-weight: 700; text-align: left; }
.ob-foot { margin-top: 1rem; font-size: .8rem; }
.ob-foot th, .ob-foot td { border: 1px solid #000; padding: 3px 6px; text-align: center; width: 33%; }
.ob-foot td { height: 52px; }
.ob-nap { font-size: .78rem; margin-top: .6rem; }
.ob-upute { font-size: .76rem; border: 1px solid #000; padding: .4rem .6rem; margin-top: .8rem; }
.ob-upute p { margin: 0 0 .3rem; }
.ob-box { border: 1px solid #000; padding: .5rem .7rem; margin-top: .5rem; font-size: .85rem; }
.ob-chk { display: inline-block; margin-right: 1rem; white-space: nowrap; }
.ob-chk:before { content: "☐ "; }
.ob-chk.on:before { content: "☒ "; font-weight: 700; }
.ob-page { page-break-after: always; break-after: page; margin-bottom: 2rem; }
.ob-page:last-child { page-break-after: auto; break-after: auto; }
.form-list .list-group-item .badge { font-weight: 500; }
@media print {
  .obrazac { padding: 0; }
  .ob-t th, .ob-t td.bad, .ob-t td.grp, .ob-t td.miss { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ob-page { margin-bottom: 0; }
}
@page { @bottom-right { content: "Stranica " counter(page) "/" counter(pages); font-size: 8pt; } }
