:root {
  --green: #1f4d33; --green-deep: #0f2a1c; --gold: #c6a468; --gold-d: #a8884e; --cream: #f6f1e8; --paper: #fffdf9;
  --ink: #1d1712; --muted: #786d62; --line: #e6dccb; --red: #b2453a; --ok: #2f7a4b; --blue: #3a6ea5;
  --serif: 'Cormorant Garamond', Georgia, serif; --sans: 'Jost', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); font-weight: 400; font-size: 15px; color: var(--ink); background: var(--cream); line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.boot { padding: 80px; text-align: center; color: var(--muted); }

/* Dugmad */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--green); background: var(--green); color: #fff; cursor: pointer; text-decoration: none; font-weight: 500; font-size: 14px; transition: .2s; white-space: nowrap; }
.btn:hover { background: var(--green-deep); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); background: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: var(--gold-d); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: wait; }
.icon-btn { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; line-height: 1; display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover:not([disabled]) { border-color: var(--gold); }
.icon-btn[disabled] { opacity: .3; cursor: default; }
.icon-btn.danger:hover:not([disabled]) { border-color: var(--red); color: var(--red); }

/* Prijava */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--green-deep) radial-gradient(circle at 50% 30%, #1d4430, transparent 70%); padding: 20px; }
.login { width: min(380px, 100%); background: var(--paper); border-radius: 16px; padding: 40px 34px; text-align: center; display: grid; gap: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.login img { width: 150px; margin: 0 auto 4px; }
.login h1 { font-family: var(--serif); font-weight: 500; font-size: 34px; margin: 0; }
.login p { margin: 0 0 10px; color: var(--muted); letter-spacing: .2em; text-transform: uppercase; font-size: 12px; }
.login input { padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 16px; }
.login input:focus { outline: 2px solid var(--gold); border-color: transparent; }
.login .btn { padding: 13px; font-size: 15px; }
.login-err { color: var(--red) !important; letter-spacing: 0 !important; text-transform: none !important; font-size: 14px !important; min-height: 20px; }

/* Raspored */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--green-deep); color: #efe7d9; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 14px; }
.side-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; padding-bottom: 22px; margin-bottom: 14px; border-bottom: 1px solid rgba(198,164,104,.25); }
.side-brand img { width: 130px; }
.side-brand span { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; text-decoration: none; color: #d9cfbf; transition: .15s; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: var(--gold); color: var(--ink); font-weight: 500; }
.side nav i { font-style: normal; width: 20px; text-align: center; opacity: .8; }
.tab-count { margin-left: auto; background: var(--red); color: #fff; border-radius: 20px; font-size: 12px; padding: 1px 8px; font-weight: 500; }
.main { padding: 0 clamp(16px, 3vw, 44px) 140px; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 26px 0 22px; position: sticky; top: 0; background: var(--cream); z-index: 5; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.top h1 { font-family: var(--serif); font-weight: 500; font-size: 36px; margin: 0; }
.top-actions { display: flex; gap: 8px; }
.warn { background: #fff3e6; border: 1px solid #f0c48a; color: #7a4b12; padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; }
.panels { display: grid; gap: 24px; max-width: 1100px; }

/* Paneli */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 26px clamp(18px, 2.4vw, 30px); }
.panel-head { margin-bottom: 20px; }
.panel-head h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; align-items: start; }
.grid > .wide, .grid > .list, .grid > .img-field { grid-column: 1 / -1; }

/* Polja */
.f { display: grid; gap: 6px; min-width: 0; }
.f-label { font-size: 13px; font-weight: 500; color: #4b4037; }
.f-hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.f input:not([type=checkbox]):not([type=color]), .f textarea, .f select, .str-row input, .gal-item input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 15px; transition: border-color .15s;
}
.f textarea { resize: vertical; line-height: 1.55; }
.f input:focus, .f textarea:focus, .f select:focus, .str-row input:focus, .gal-item input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,164,104,.2); }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; padding: 6px 0; }
.toggle input { position: absolute; opacity: 0; }
.sw { width: 42px; height: 24px; border-radius: 20px; background: #d6ccbd; position: relative; transition: .2s; flex: none; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + .sw { background: var(--ok); }
.toggle input:checked + .sw::after { transform: translateX(18px); }
.toggle input:focus-visible + .sw { outline: 2px solid var(--gold); outline-offset: 2px; }
.toggle .f-hint { flex-basis: 100%; }
.color-row { display: flex; gap: 8px; }
.color-row input[type=color] { width: 48px; height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: #fff; cursor: pointer; }
.color-txt { font-family: ui-monospace, monospace; }
.str-row { display: flex; gap: 6px; margin-bottom: 6px; }
.str-row + .btn, .f > .btn { justify-self: start; }

/* Slike */
.img-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.img-prev { width: 200px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #efe7da repeating-linear-gradient(45deg, transparent 0 8px, rgba(0,0,0,.025) 8px 16px); display: grid; place-items: center; color: var(--muted); font-size: 13px; border: 1px solid var(--line); flex: none; }
.img-prev img { width: 100%; height: 100%; object-fit: cover; }
.img-prev.contain img { object-fit: contain; padding: 8px; }
.img-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.img-actions .f-hint { flex-basis: 100%; }

/* Liste (kartice) */
.list { display: grid; gap: 10px; }
.list-head h3 { margin: 6px 0 2px; font-size: 15px; font-weight: 500; }
.list-head p { margin: 0; }
.list > .btn { justify-self: start; }
.card { border: 1px solid var(--line); border-radius: 11px; background: #fff; overflow: hidden; }
.card.open { border-color: var(--gold); box-shadow: 0 4px 18px rgba(80,60,30,.08); }
.card-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 6px; }
.card-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 6px; cursor: pointer; text-align: left; }
.card-thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; }
.card-num { width: 40px; height: 40px; flex: none; border-radius: 8px; background: var(--cream); display: grid; place-items: center; font-family: var(--serif); font-size: 18px; color: var(--gold-d); }
.card-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.chev { font-size: 20px; color: var(--muted); width: 22px; text-align: center; }
.card-tools { display: flex; gap: 4px; }
.card-body { padding: 18px 18px 20px; border-top: 1px solid var(--line); background: #fffdfa; }
.card-body .list .card { background: #fff; }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; margin: 0; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 20px; background: #eee5d6; color: #6b5d4c; white-space: nowrap; }
.badge.ok { background: #dcefe2; color: var(--ok); }
.badge.new { background: #fde6cf; color: #a05a14; }
.badge.bad { background: #f6dcd8; color: var(--red); }
.badge.muted { background: #ece8e1; color: #8a8178; }

/* Sekcije */
.sections-list { display: grid; gap: 8px; }
.sec-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sec-row.fixed { background: var(--cream); color: var(--muted); }
.sec-row.off .sec-name { color: var(--muted); text-decoration: line-through; }
.sec-name { flex: 1; font-weight: 500; }
.toggle.inline { padding: 0; }
.toggle.inline .f-label { min-width: 74px; font-weight: 400; color: var(--muted); }

/* Galerija */
.gal-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.gal-item { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; display: grid; }
.gal-item.off .gal-img img { opacity: .4; }
.gal-img { aspect-ratio: 1; position: relative; background: #eee; }
.gal-img img { width: 100%; height: 100%; object-fit: cover; }
.gal-img .badge { position: absolute; top: 8px; left: 8px; }
.gal-item input { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; font-size: 13.5px !important; }
.gal-btns { display: flex; justify-content: space-between; padding: 8px; gap: 4px; }

/* Rezervacije */
.res-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 14px; cursor: pointer; font-size: 13.5px; }
.chip b { font-weight: 500; color: var(--muted); margin-left: 2px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on b { color: var(--gold); }
.res-actions { display: flex; gap: 8px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.res-card { border: 1px solid var(--line); border-left: 4px solid #d6ccbd; border-radius: 11px; padding: 16px 18px; background: #fff; display: grid; gap: 4px; }
.res-card.new { border-left-color: #e0954a; }
.res-card.ok { border-left-color: var(--ok); }
.res-card.bad { border-left-color: var(--red); }
.res-card header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.res-card header time { margin-left: auto; }
.res-type { font-weight: 500; color: var(--ink); }
.res-card h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 6px 0 0; }
.res-card p { margin: 0; }
.res-when { font-weight: 500; }
.res-ev { color: var(--green); font-size: 14px; }
.res-contact a { color: var(--blue); }
.res-note { background: var(--cream); padding: 8px 10px; border-radius: 8px; font-size: 14px; margin-top: 6px !important; color: #4b4037; font-style: italic; }
.res-card footer { display: flex; gap: 8px; margin-top: 10px; }
.res-card select { flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* Mapa */
.map-prev { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); height: 300px; background: #eee; }
.map-prev iframe { width: 100%; height: 100%; border: 0; }

/* Traka za čuvanje */
.savebar { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 150%); z-index: 60; display: flex; align-items: center; gap: 18px; background: var(--ink); color: #fff; padding: 10px 10px 10px 22px; border-radius: 14px; box-shadow: 0 16px 50px rgba(0,0,0,.3); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.savebar.show { transform: translate(-50%, 0); }
.savebar .btn { padding: 11px 22px; }
.toast { position: fixed; top: 20px; left: 50%; transform: translate(-50%, -150%); z-index: 99; background: var(--ok); color: #fff; padding: 12px 20px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: transform .3s; max-width: calc(100% - 40px); }
.toast.err { background: var(--red); }
.toast.show { transform: translate(-50%, 0); }

/* Telefon */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; z-index: 20; padding: 8px 10px; display: flex; align-items: center; gap: 10px; overflow-x: auto; }
  .side-brand { flex-direction: row; padding: 0 8px 0 0; margin: 0; border: 0; flex: none; }
  .side-brand img { width: 54px; }
  .side-brand span { display: none; }
  .side nav { display: flex; gap: 4px; }
  .side nav a { white-space: nowrap; padding: 8px 12px; font-size: 14px; }
  .side nav i { display: none; }
  .top { position: static; flex-wrap: wrap; padding-top: 18px; }
  .top h1 { font-size: 30px; }
  .grid { grid-template-columns: 1fr; }
  .savebar { left: 12px; right: 12px; transform: translateY(150%); justify-content: space-between; }
  .savebar.show { transform: none; }
}
