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

:root {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --border: #e9ecef;
  --text: #212529;
  --text-sec: #6c757d;
  --accent: #2563eb;
  --accent-h: #1d4ed8;
  --accent-light: #eff6ff;
  --success: #16a34a;
  --error: #dc2626;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
}

body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; min-height: 100vh; }

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

/* ── Nav ── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1.5rem; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 100;
}
.nav-logo { font-weight: 700; font-size: 1.05rem; color: var(--text); letter-spacing: -.01em; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: .75rem; }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 600px; margin: 0 auto; padding: 0 1.5rem; }
.container-md { max-width: 820px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.1rem; border-radius: var(--radius); border: none;
  font-size: .9rem; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: background .15s, box-shadow .15s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-ghost { background: none; color: var(--text-sec); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-danger { background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: .32rem .7rem; font-size: .82rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-size: .83rem; font-weight: 500; color: var(--text-sec); margin-bottom: .3rem; }
input, textarea, select {
  width: 100%; padding: .55rem .75rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .9rem; font-family: inherit;
  background: var(--bg); color: var(--text); transition: border-color .15s; outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
textarea { resize: vertical; min-height: 80px; }
.input-hint { font-size: .78rem; color: var(--text-sec); margin-top: .25rem; }
.char-count { font-size: .78rem; color: var(--text-sec); text-align: right; margin-top: .2rem; }

/* ── Card ── */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; box-shadow: var(--shadow); }
.card-sm { padding: 1rem; border-radius: var(--radius); }

/* ── Section ── */
.section-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.75rem; gap: 0; overflow-x: auto; }
.tab {
  padding: .65rem 1.15rem; font-size: .9rem; font-weight: 500; color: var(--text-sec);
  border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none;
  transition: color .15s; white-space: nowrap; font-family: inherit;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover:not(.active) { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Badges ── */
.badge { display: inline-block; padding: .18rem .55rem; border-radius: 20px; font-size: .75rem; font-weight: 500; }
.badge-blue { background: var(--accent-light); color: var(--accent); }
.badge-green { background: #f0fdf4; color: var(--success); }
.badge-gray { background: var(--surface); color: var(--text-sec); }
.badge-red { background: #fef2f2; color: var(--error); }

/* ── Alert ── */
.alert { padding: .75rem 1rem; border-radius: var(--radius); font-size: .88rem; margin-bottom: 1rem; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-info { background: var(--accent-light); border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Toggle ── */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; }
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: #d1d5db; border-radius: 22px;
  transition: background .2s; cursor: pointer;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform .2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Business card (index) ── */
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.biz-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
  background: var(--bg); box-shadow: var(--shadow); cursor: pointer;
  transition: box-shadow .2s, border-color .2s; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: .6rem;
}
.biz-card:hover { box-shadow: var(--shadow-md); border-color: #c7d2fe; text-decoration: none; }
.biz-logo { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--text-sec); border: 1px solid var(--border); overflow: hidden; }
.biz-logo img { width: 100%; height: 100%; object-fit: cover; }
.biz-name { font-weight: 600; font-size: .97rem; }
.biz-desc { font-size: .84rem; color: var(--text-sec); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.biz-tags { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ── Time slots ── */
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: .5rem; margin-top: .75rem; }
.slot {
  padding: .5rem; text-align: center; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .88rem; cursor: pointer; transition: background .15s, border-color .15s;
  background: var(--bg); color: var(--text); font-family: inherit;
}
.slot:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.slot.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.slot.zaseden { background: var(--surface); color: #ccc; cursor: not-allowed; border-color: var(--border); }

/* ── Service list ── */
.storitev-row {
  display: flex; align-items: center; gap: .75rem; padding: .65rem .75rem;
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .5rem;
  background: var(--bg);
}
.storitev-row .storitev-ime { flex: 1; font-size: .9rem; }
.storitev-row .storitev-cas { font-size: .83rem; color: var(--text-sec); white-space: nowrap; }

/* ── Rezervacija list ── */
.rez-row {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .6rem;
  background: var(--bg);
}
.rez-datum { min-width: 80px; text-align: center; }
.rez-dan { font-size: 1.3rem; font-weight: 700; line-height: 1; }
.rez-mesec { font-size: .75rem; color: var(--text-sec); text-transform: uppercase; }
.rez-info { flex: 1; }
.rez-ime { font-weight: 600; font-size: .95rem; }
.rez-storitve { font-size: .83rem; color: var(--text-sec); margin-top: .15rem; }
.rez-cas-badge { font-size: .82rem; color: var(--accent); font-weight: 500; }

/* ── Calendar ── */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.cal-header { text-align: center; font-size: .75rem; font-weight: 600; color: var(--text-sec); padding: .3rem 0; }
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); font-size: .88rem; cursor: pointer;
  border: 1px solid transparent; transition: background .15s;
}
.cal-day:hover:not(.cal-empty):not(.cal-past):not(.cal-closed) { background: var(--accent-light); color: var(--accent); border-color: #bfdbfe; }
.cal-day.cal-today { font-weight: 700; border-color: var(--accent); color: var(--accent); }
.cal-day.cal-selected { background: var(--accent); color: #fff; }
.cal-day.cal-past { color: #d1d5db; cursor: default; }
.cal-day.cal-closed { color: #d1d5db; cursor: default; text-decoration: line-through; }
.cal-day.cal-empty { cursor: default; }

/* ── Odmor row ── */
.odmor-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.odmor-row input[type="time"] { width: auto; min-width: 110px; }

/* ── Hero ── */
.hero { padding: 4rem 0 3rem; text-align: center; }
.hero h1 { font-size: 2.2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin-bottom: .75rem; }
.hero p { font-size: 1.05rem; color: var(--text-sec); max-width: 480px; margin: 0 auto 1.75rem; }

/* ── Search ── */
.search-wrap { max-width: 480px; margin: 0 auto; position: relative; }
.search-wrap input { padding-left: 2.5rem; font-size: 1rem; border-radius: 40px; box-shadow: var(--shadow-md); }
.search-icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-sec); font-size: 1rem; pointer-events: none; }

/* ── Logo upload ── */
.logo-upload-area {
  width: 96px; height: 96px; border-radius: 14px; border: 2px dashed var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; position: relative; background: var(--surface);
  transition: border-color .15s;
}
.logo-upload-area:hover { border-color: var(--accent); }
.logo-upload-area img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.logo-upload-txt { font-size: .75rem; color: var(--text-sec); text-align: center; line-height: 1.4; }

/* ── Checkbox storitev ── */
.storitev-check { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .4rem; cursor: pointer; transition: background .12s; }
.storitev-check:hover { background: var(--accent-light); border-color: #bfdbfe; }
.storitev-check.selected { background: var(--accent-light); border-color: var(--accent); }
.storitev-check input[type=checkbox] { width: auto; accent-color: var(--accent); }
.storitev-check-ime { flex: 1; font-size: .9rem; }
.storitev-check-cas { font-size: .83rem; color: var(--text-sec); }

/* ── Utility ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.text-sm { font-size: .85rem; } .text-xs { font-size: .78rem; }
.text-sec { color: var(--text-sec); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-600 { font-weight: 600; }
.hidden { display: none !important; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 640px) {
  nav { padding: .7rem 1rem; }
  .container, .container-sm, .container-md { padding: 0 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .biz-grid { grid-template-columns: 1fr; }
}

/* ── Plan dela ── */
.rez-plan-grid { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
@media (max-width: 720px) { .rez-plan-grid { grid-template-columns: 1fr; } }
