:root {
  --page: #f1ebe4;
  --cream: #fbf5eb;
  --surface: #ffffff;
  --sand: #efe7dc;
  --taupe: #d8ccbe;
  --taupe-soft: #e7ded2;
  --mauve: #a8998b;
  --mauve-dark: #8c7d6f;
  --espresso: #39342e;
  --ink: #4d463e;
  --muted: #998e80;
  --line: #e4dace;
  --ok: #5e7355;
  --ok-bg: #e9ebe0;
  --err: #9c5b4b;
  --err-bg: #f3e7e0;
  --announce-bg: #c9bba9;
  --shadow-sm: 0 2px 12px rgba(80, 66, 50, 0.06);
  --shadow: 0 18px 50px rgba(80, 66, 50, 0.13);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 20px;
  --radius-sm: 14px;
  --pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background:
    linear-gradient(180deg, rgba(241, 235, 228, 0.62) 0%, rgba(241, 235, 228, 0.72) 100%),
    url("ozadje.png") center center / cover no-repeat fixed;
  background-color: var(--page);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--mauve-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Obvestilni trak ---------- */
.announce {
  background: var(--announce-bg);
  color: var(--espresso);
  overflow: hidden;
  white-space: nowrap;
}
.announce-track {
  display: inline-flex;
  gap: 64px;
  padding: 11px 32px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  will-change: transform;
  animation: marquee 28s linear infinite;
}
.announce-track span { flex: 0 0 auto; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Hero ---------- */
header.site {
  position: relative;
  overflow: hidden;
  min-height: clamp(440px, 72vh, 680px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 70px 22px 84px;
  background:
    linear-gradient(180deg, rgba(57, 52, 46, 0.34) 0%, rgba(57, 52, 46, 0.46) 100%),
    url("ozadje.png") center center / cover no-repeat;
  color: #fff;
}
header.site h1 {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 9vw, 5.2rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 26px rgba(30, 24, 18, 0.32);
}
header.site p {
  position: relative;
  margin-top: 16px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.92;
}
header.site .nav-link {
  position: relative;
  display: inline-block;
  margin-top: 30px;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 30px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--pill);
  backdrop-filter: blur(3px);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
header.site .nav-link:hover {
  background: #fff;
  color: var(--espresso);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Skrbniški dostop — nevsiljiv gumb v kotu (samo na strani za stranke) */
header.site .admin-access {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--pill);
  backdrop-filter: blur(2px);
  opacity: 0.7;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
header.site .admin-access:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  opacity: 1;
}

/* ---------- Postavitev ---------- */
.container {
  max-width: 1080px;
  margin: -52px auto 0;
  padding: 0 22px 90px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 34px 36px;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
  animation: rise 0.55s ease both;
}
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.12s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
  color: var(--espresso);
}
h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 18px 0 8px;
  color: var(--espresso);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--mauve);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  margin: 16px 0 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input::placeholder, textarea::placeholder { color: #b9ad9d; }
input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--mauve);
  box-shadow: 0 0 0 4px rgba(168, 153, 139, 0.18);
}
textarea { resize: vertical; min-height: 92px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238c7d6f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
  cursor: pointer;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--pill);
  padding: 15px 32px;
  background: var(--mauve);
  color: #fff;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}
button:hover { background: var(--mauve-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
button:active { transform: translateY(0); box-shadow: none; }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
button.secondary {
  background: var(--cream);
  color: var(--espresso);
  border: 1px solid var(--line);
}
button.secondary:hover { background: var(--sand); }
button.danger {
  background: var(--cream);
  color: var(--err);
  border: 1px solid #e2c9bf;
}
button.danger:hover { background: var(--err-bg); }
button.small { padding: 9px 18px; font-size: 0.68rem; }

.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row > * { flex: 1; min-width: 160px; }

.muted { color: var(--muted); font-size: 0.95rem; }
.center { text-align: center; }
.hidden { display: none !important; }

.msg {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 0.94rem;
  font-weight: 500;
}
.msg.ok  { background: var(--ok-bg); color: var(--ok); border: 1px solid #d2d6c2; }
.msg.err { background: var(--err-bg); color: var(--err); border: 1px solid #e4cabf; }

/* ---------- Več informacij (opis storitve) ---------- */
.info-toggle {
  display: inline-block;
  margin-top: 14px;
  background: var(--cream);
  color: var(--espresso);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  padding: 10px 22px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
}
.info-toggle:hover { background: var(--sand); transform: translateY(-1px); }

.svc-info {
  margin-top: 16px;
  padding: 24px 26px;
  background: var(--taupe-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  animation: rise 0.35s ease both;
}
.svc-info-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}
.svc-info-meta {
  margin-top: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--mauve-dark);
}
.svc-info-meta:first-of-type { margin-top: 18px; }

/* ---------- Termini za stranke ---------- */
.day-group { margin-bottom: 30px; }
.day-group:last-child { margin-bottom: 0; }
.day-title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--espresso);
  margin-bottom: 18px;
  text-transform: capitalize;
}
.day-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--taupe), transparent);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.slot-btn {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 18px 18px 22px;
  text-align: left;
  line-height: 1.45;
  overflow: hidden;
  text-transform: none;
  letter-spacing: normal;
  transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.15s ease, background 0.15s ease;
}
.slot-btn::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--mauve);
  opacity: 0.5;
  transition: opacity 0.15s ease, width 0.15s ease;
}
.slot-btn:hover {
  transform: translateY(-2px);
  border-color: var(--mauve);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.slot-btn:hover::before { opacity: 1; width: 6px; }
.slot-btn .time {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--espresso);
}
.slot-btn .svc { font-size: 0.88rem; color: var(--muted); margin-top: 3px; }
.slot-btn .price { font-size: 0.92rem; font-weight: 600; margin-top: 6px; color: var(--mauve-dark); }
.slot-btn.selected {
  background: var(--mauve);
  border-color: var(--mauve-dark);
  box-shadow: var(--shadow);
}
.slot-btn.selected::before { background: #fff; opacity: 0.85; }
.slot-btn.selected .time,
.slot-btn.selected .svc,
.slot-btn.selected .price { color: #fff; }

/* ---------- Tabele (admin) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); }
th {
  color: var(--muted); font-weight: 600; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--sand);
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover td { background: var(--cream); }
.badge {
  display: inline-block;
  padding: 4px 13px;
  border-radius: var(--pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge.free { background: var(--ok-bg); color: var(--ok); }
.badge.booked { background: var(--taupe-soft); color: var(--mauve-dark); }
.badge.off { background: #e8e2d8; color: #8a8175; }

/* ---------- Zavihki ---------- */
.tabs { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.tab {
  background: var(--surface); color: var(--espresso);
  border: 1px solid var(--line);
  padding: 12px 24px; border-radius: var(--pill);
  font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.tab:hover { background: var(--sand); }
.tab.active {
  background: var(--mauve);
  color: #fff; border-color: var(--mauve-dark);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.table-wrap table { font-size: 0.92rem; }
.table-wrap th:first-child, .table-wrap td:first-child { padding-left: 18px; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 40px 22px 50px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  header.site { min-height: 60vh; padding: 54px 18px 64px; }
  header.site .admin-access { top: 12px; right: 12px; font-size: 0.58rem; padding: 6px 12px; }
  .container { margin-top: -40px; padding-bottom: 64px; }
  .card { padding: 24px 20px 26px; }
  .row { flex-direction: column; gap: 14px; }
  .row > * { min-width: 0; }
  h2 { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .announce-track { animation: none; }
  .svc-info { animation: none; }
  * { transition: none !important; }
}

/* ---------- Profil storitve (stranke) ---------- */
.svc-info img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

/* ---------- Skrbniški koledar ---------- */
#calendar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 10px;
}
.fc {
  font-family: var(--sans);
  font-size: 0.9rem;
}
.fc .fc-button {
  background: var(--mauve);
  border-color: var(--mauve-dark);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.fc .fc-button:hover { background: var(--mauve-dark); }
.fc .fc-button-primary:not(:disabled).fc-button-active {
  background: var(--espresso);
  border-color: var(--espresso);
}
.fc .fc-toolbar-title { font-family: var(--serif); color: var(--espresso); }
.fc-event { cursor: pointer; }

.cal-legend {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 8px 0 4px;
}
.cal-legend .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.cal-legend .dot-free { background: #5e7355; }
.cal-legend .dot-booked { background: #a8998b; }

/* ---------- Urejanje storitev (skrbnik) ---------- */
.svc-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}
.svc-img-preview {
  display: block;
  max-width: 220px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  border: 1px solid var(--line);
}

/* ---------- Modalno okno ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 34, 28, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 1000;
  animation: rise 0.2s ease both;
}
.modal-box {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 30px 32px 32px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
}
.modal-box h2 {
  font-size: 1.5rem;
  margin-bottom: 18px;
  padding-right: 28px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
}
.modal-close:hover { background: var(--sand); transform: none; }
.def-row {
  display: flex;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.def-row:last-of-type { border-bottom: none; }
.def-label {
  flex: 0 0 130px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
.def-value { flex: 1; color: var(--ink); word-break: break-word; }
