/* Dizajn sustav "Rhino produkcija": tamna pozadina, kutovi bez zaobljenja. */
:root {
    --yellow: #fddd04;
    --olive: #3d4133;
    --black: #231f20;
    --surface: #22251c;
    --surface-2: #2e3226;
    --muted: #a8aaa3;
    --text: #f3f3ef;
    --danger: #ff7a59;
    --font: "Swiss 721", "Swiss721BT", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; border-radius: 0; }
html, body { margin: 0; background: var(--surface); color: var(--text); font-family: var(--font); font-weight: 300; }
html { scrollbar-width: none; }
body::-webkit-scrollbar { display: none; }
body { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); line-height: 1.45; }
a { color: var(--yellow); }
h1, h2 { font-weight: 800; letter-spacing: .01em; }
h1 { font-size: 1.6rem; margin: 1.2rem 0 .8rem; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
       padding: .8rem 16px; background: var(--black); border-bottom: 3px solid var(--yellow); }
.brand { font-weight: 800; color: var(--yellow); letter-spacing: .08em; }
.brand b { color: var(--text); font-weight: 300; letter-spacing: 0; }
.logout { display: flex; gap: .8rem; align-items: center; margin: 0; }
.who { color: var(--muted); font-size: .9rem; }
main { padding: 0 16px 2rem; margin: 0 auto; }
main.narrow { max-width: 480px; }
main.wide { max-width: 1440px; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.warn { color: var(--danger); font-weight: 800; }
.stack { display: flex; flex-direction: column; gap: .6rem; }
label { font-size: .9rem; color: var(--muted); }
input[type=email], input[type=text] {
    font: inherit; font-size: 1.1rem; padding: .8rem; background: var(--surface-2); color: var(--text);
    border: 1px solid var(--olive); width: 100%;
}
input:focus { outline: 2px solid var(--yellow); outline-offset: 0; }
button, .button { font: inherit; font-weight: 800; cursor: pointer; border: 0; padding: .9rem 1rem; text-decoration: none; display: inline-block; text-align: center; }
.primary { background: var(--yellow); color: var(--black); }
button.link { background: none; color: var(--yellow); padding: 0; font-weight: 300; text-decoration: underline; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0; }
.stats div { background: var(--surface-2); padding: .8rem; }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: 0; font-size: 1.5rem; font-weight: 800; }
.table-wrap { overflow-x: auto; scrollbar-width: none; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: .5rem .6rem; border-bottom: 1px solid var(--olive); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 300; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--surface-2); }
.tabs { display: flex; gap: 0; background: var(--black); padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { color: var(--muted); text-decoration: none; padding: .7rem 1rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--text); border-bottom-color: var(--yellow); font-weight: 800; }
.notice { background: var(--olive); padding: .7rem .9rem; border-left: 4px solid var(--yellow); }
p.error { background: #3a2620; padding: .7rem .9rem; border-left: 4px solid var(--danger); }
.ok { color: #9fd36b; font-weight: 800; }
td input[type=text], td input[type=email], td input[type=date], td select,
.form-grid input[type=text], .form-grid input[type=email], .form-grid input[type=date], .form-grid select {
    font: inherit; font-size: .95rem; padding: .35rem .45rem; background: var(--surface-2); color: var(--text);
    border: 1px solid var(--olive); max-width: 100%;
}
td input[type=email] { width: 14rem; }
td input[type=text] { width: 11rem; }
td input[type=text].short { width: 3.5rem; }
td.wrap { white-space: normal; min-width: 20rem; }
td button, .form-grid button, .inline button { padding: .4rem .7rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .6rem; align-items: end; margin: .5rem 0 1rem; }
.form-grid label { display: flex; flex-direction: column; gap: .2rem; }
.form-grid label.check { flex-direction: row; align-items: center; gap: .4rem; }
.inline { display: inline; margin: 0; }
.dim td { color: var(--muted); }
pre.report { background: var(--surface-2); padding: .8rem; overflow-x: auto; font-size: .85rem; }
.secondary { background: var(--olive); color: var(--text); }

/* ---------- Mobilni dio (prema prototipu "Evidencija – mobilna proba") ---------- */
:root {
    --heavy: "Swis721 Hv BT", "Swiss 721 Heavy", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --light: "Swis721 Lt BT", "Swiss 721 Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body.m { font-family: var(--light); font-weight: 300; font-size: 16px; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.m h1 { margin: 0; font-family: var(--heavy); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.m-bar { height: 8px; background: var(--yellow); flex-shrink: 0; }
.m-top { height: 60px; padding: 0 18px; background: var(--olive); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.m-logo { width: 40px; height: 40px; }
.m-name { flex: 1; text-align: right; font-size: 15px; }
.m-office { font-family: var(--heavy); font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.m-main { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 18px 16px 96px; display: flex; flex-direction: column; gap: 16px; }
.m-main.m-center { justify-content: center; padding-bottom: 32px; }
.m-head { display: flex; flex-direction: column; gap: 6px; }
.m-label, .m-field, .m-field > legend { font-family: var(--heavy); font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.m-label-warn { color: var(--yellow); }
.m-sub { display: block; font-size: 14px; color: var(--muted); font-family: var(--light); font-weight: 300; letter-spacing: 0; text-transform: none; }
.m-hint { margin: 0; font-size: 13px; color: var(--muted); }
.m-big { font-family: var(--heavy); font-weight: 800; font-size: 22px; }
.m-huge { font-family: var(--heavy); font-weight: 800; font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; }
.m-warn { color: var(--danger); }
.m-card { background: var(--surface-2); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.m-missing { border: 2px solid var(--yellow); }
.m-running { border-left: 6px solid var(--yellow); }
.m-form { display: flex; flex-direction: column; gap: 14px; }
.m-field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; }
.m-field > legend { padding: 0; margin-bottom: 6px; }
.m-field input, .m-field select, .m-field textarea, .m-select {
    font: inherit; font-family: var(--light); font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--text);
    background: var(--surface); border: 1px solid var(--olive); padding: 12px; width: 100%; min-height: 48px; box-sizing: border-box;
}
.m-field textarea { min-height: 72px; resize: vertical; }
.m-field input[type=time], .m-field input[type=date] { color-scheme: dark; }
.m-row { display: flex; gap: 10px; flex-wrap: wrap; }
.m-row > * { flex: 1; }
.m-times > .m-field { min-width: 0; }
.m-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.m-pill { flex: 1 1 auto; position: relative; }
.m-pill input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.m-pill span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--olive);
    background: var(--surface); color: var(--text); font-size: 15px; letter-spacing: 0; text-transform: none; font-family: var(--light); font-weight: 300; cursor: pointer; }
.m-pill input:checked + span { background: var(--yellow); border-color: var(--yellow); color: var(--black); font-family: var(--heavy); font-weight: 800; }
.m-pill input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.m-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border: 2px solid var(--text);
    background: transparent; color: var(--text); font-family: var(--heavy); font-weight: 800; font-size: 13px; letter-spacing: .06em;
    text-transform: uppercase; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.m-btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--black); }
.m-btn-big { height: 88px; font-size: 22px; letter-spacing: .04em; width: 100%; }
.m-btn-wide { width: 100%; }
.m-btn-danger { border-color: var(--danger); color: var(--danger); }
.m-btn:focus-visible, .m-line:focus-visible, .m-day-row:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.m-link { font-size: 14px; }
.m-toast { margin: 0; background: var(--olive); border-left: 4px solid var(--yellow); padding: 12px 14px; }
.m-error { margin: 0; background: #3a2620; border-left: 4px solid var(--danger); padding: 12px 14px; }
.m-flag { background: var(--surface); border-left: 4px solid var(--yellow); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.m-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--olive); color: var(--text); text-decoration: none; }
.m-line-add { color: var(--yellow); }
.m-hours { font-family: var(--heavy); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-tag { display: inline-block; margin: 4px 6px 0 0; padding: 2px 6px; background: var(--olive); color: var(--yellow); font-size: 11px;
    font-family: var(--heavy); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.m-check { display: flex; gap: 12px; align-items: flex-start; }
.m-check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--yellow); flex-shrink: 0; }
.m-check-title { font-family: var(--heavy); font-weight: 800; display: block; }
.m-split { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.m-split .m-sub { display: inline; }
.m-meter { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; background: var(--surface); }
.m-meter::-webkit-progress-bar { background: var(--surface); }
.m-meter::-webkit-progress-value { background: var(--yellow); }
.m-meter::-moz-progress-bar { background: var(--yellow); }
.m-meter-warn::-webkit-progress-value { background: var(--danger); }
.m-meter-warn::-moz-progress-bar { background: var(--danger); }
.m-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 2px; margin: 0; }
.m-stats div { background: var(--surface); padding: 10px; }
.m-stats dt { font-size: 12px; color: var(--muted); }
.m-stats dd { margin: 2px 0 0; font-family: var(--heavy); font-weight: 800; font-size: 18px; }
.m-month-nav { display: flex; align-items: center; gap: 10px; }
.m-month-nav .m-btn { width: 48px; padding: 0; font-size: 22px; }
.m-month-title { flex: 1; text-align: center; font-family: var(--heavy); font-weight: 800; font-size: 18px; }
.m-badge { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--surface-2); border-left: 4px solid var(--muted); }
.m-badge-ok { border-left-color: var(--yellow); }
.m-days { display: flex; flex-direction: column; }
.m-days > .m-label { margin-bottom: 6px; }
.m-day { display: block; color: var(--text); text-decoration: none; border-top: 1px solid var(--olive); }
.m-day-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; padding: 12px 4px; align-items: start; cursor: pointer; list-style: none; color: var(--text); text-decoration: none; }
details.m-day > summary::-webkit-details-marker { display: none; }
.m-day-date { display: flex; flex-direction: column; font-size: 14px; }
.m-day-dow { font-family: var(--heavy); font-weight: 800; font-size: 12px; text-transform: uppercase; color: var(--muted); }
.m-day-we .m-day-dow { color: var(--yellow); }
.m-day-missing { box-shadow: inset 4px 0 0 var(--danger); }
.m-day-missing .m-day-text > span:first-child { color: var(--danger); }
.m-day-neutral .m-day-text > span:first-child { color: var(--muted); }
.m-day-pick { background: var(--surface-2); padding: 4px 12px 8px; }
.m-delete > summary { list-style: none; }
.m-delete > summary::-webkit-details-marker { display: none; }
.m-delete form { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.m-nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    display: flex; border-top: 1px solid var(--olive); background: var(--surface-2); z-index: 10; }
.m-nav a { flex: 1; display: flex; align-items: center; justify-content: center; border-top: 4px solid transparent; color: var(--muted); text-decoration: none;
    font-family: var(--heavy); font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.m-nav a[aria-current="page"] { border-top-color: var(--yellow); color: var(--text); }
.m-logout { margin-top: 8px; }
/* Upis: dijelovi obrasca po vrsti, bez JavaScripta. */
.m-upis .m-sec { display: none; }
.m-upis:has(input[name=kind][value=rad]:checked) .m-sec-rad,
.m-upis:has(input[name=kind][value=OS]:checked) .m-sec-os,
.m-upis:has(input[name=kind][value=SD]:checked) .m-sec-sd,
.m-upis:has(input[name=kind][value=GO]:checked) .m-sec-full,
.m-upis:has(input[name=kind][value=BO]:checked) .m-sec-full { display: flex; flex-direction: column; gap: 14px; }
.m-upis .m-sec.m-hint { gap: 0; }
.m-upis:has(input[name=kind][value=SD]:checked) .m-note,
.m-upis:has(input[name=kind][value=GO]:checked) .m-note,
.m-upis:has(input[name=kind][value=BO]:checked) .m-note { display: none; }
/* Prijedlog projekta i napomena za Tvornicu kulture. */
.m-new-project, .m-hint-tk { display: none; }
form:has(option[value="__new"]:checked) .m-new-project { display: flex; flex-direction: column; gap: 6px; }
form:has(option[data-note]:checked) .m-hint-tk { display: block; color: var(--yellow); }
/* Preglednici bez :has() vide sve dijelove obrasca. */
@supports not selector(:has(*)) {
    .m-upis .m-sec, .m-new-project { display: flex; flex-direction: column; gap: 14px; }
}
.js .m-js-hide { display: none; }
.m-logo-big { width: 96px; height: 96px; }
