/* ═══════════════════════════════════════════════════════════════════════
   Džemat Sabur Randers — Dizajn sistem (mobile-first)
   Developed by Izudin Ramić · 2026
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --teal-950: #0b3537;
  --teal-900: #0f4447;
  --teal-800: #124e50;
  --teal-700: #1a6b6e;
  --teal-600: #22797c;
  --teal-500: #2a8a8e;
  --teal-100: #d9eeee;
  --teal-50:  #eef7f7;
  --gold-700: #96763a;
  --gold-600: #b08c4a;
  --gold-500: #c5a059;
  --gold-100: #f6ecd8;
  --gold-50:  #fbf7ee;

  --bg: #f2f5f5;
  --surface: #ffffff;
  --surface-2: #f7f9f9;
  --text: #142221;
  --text-2: #3b4d4c;
  --muted: #687877;
  --border: #e2e9e9;
  --border-2: #cfdada;

  --green: #047857;  --green-bg: #e7f6ef;  --green-bd: #b5e3cd;
  --red: #c62828;    --red-bg: #fdecec;    --red-bd: #f6c3c3;
  --amber: #b45309;  --amber-bg: #fff4e0;  --amber-bd: #f9d79b;
  --blue: #1d4ed8;   --blue-bg: #e9f0ff;   --blue-bd: #c3d4fb;
  --violet: #6d28d9; --violet-bg: #f1ebff; --violet-bd: #d8c8fb;
  --viber: #7360f2;

  --r-xl: 22px;
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 9px;

  --sh-1: 0 1px 2px rgba(16, 42, 42, .06), 0 1px 3px rgba(16, 42, 42, .04);
  --sh-2: 0 4px 16px rgba(16, 42, 42, .08), 0 1px 3px rgba(16, 42, 42, .05);
  --sh-3: 0 16px 48px rgba(10, 35, 35, .18);

  --appbar-h: 58px;
  --nav-h: 64px;
  --sidebar-w: 256px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-ar: "Amiri", "Noto Naskh Arabic", "Geeza Pro", "Traditional Arabic", serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
}

/* ── RESET ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-800); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(42, 138, 142, .45); outline-offset: 2px; }
::selection { background: var(--teal-100); }

.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ic-lg { width: 1.45em; height: 1.45em; }
.ic-xl { width: 2em; height: 2em; }
.ar { font-family: var(--font-ar); direction: rtl; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.xs { font-size: .76rem; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-amber { color: var(--amber); } .text-violet { color: var(--violet); }
.mt-0{margin-top:0}.mt-1{margin-top:4px}.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-5{margin-top:24px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:4px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}.mb-5{margin-bottom:24px}
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }

/* ── APP SHELL ─────────────────────────────────────────────────────────── */
.appbar {
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-t);
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 65%, var(--teal-500) 100%);
  color: #fff; box-shadow: 0 2px 14px rgba(10, 40, 40, .18);
}
.appbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-500), transparent); opacity: .9; }
.appbar-in {
  height: var(--appbar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 max(12px, var(--safe-r)) 0 max(12px, var(--safe-l));
  max-width: var(--wrap, 760px); margin: 0 auto;
}
.appbar-title { flex: 1; min-width: 0; line-height: 1.15; }
.appbar-title b { display: block; font-size: 1.02rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-title small { display: block; font-size: .72rem; opacity: .78; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-logo { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.14); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; border: 1px solid rgba(255,255,255,.22); }
.appbar-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.appbar .icon-btn { color: #fff; background: rgba(255,255,255,.12); border-color: transparent; }
.appbar .icon-btn:hover { background: rgba(255,255,255,.22); color: #fff; }

.lang-switch { display: inline-flex; background: rgba(255,255,255,.14); border-radius: 999px; padding: 3px; border: 1px solid rgba(255,255,255,.2); flex-shrink: 0; }
.lang-switch a { color: rgba(255,255,255,.82); font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; min-width: 34px; text-align: center; letter-spacing: .3px; }
.lang-switch a.on { background: #fff; color: var(--teal-800); }
.lang-switch.light { background: var(--surface-2); border-color: var(--border); }
.lang-switch.light a { color: var(--muted); }
.lang-switch.light a.on { background: var(--teal-700); color: #fff; }

.page { max-width: var(--wrap, 760px); margin: 0 auto; padding: 16px max(14px, var(--safe-r)) calc(28px + var(--safe-b)) max(14px, var(--safe-l)); }
.page.has-nav { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.page.has-bar { padding-bottom: calc(110px + var(--safe-b)); }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255,255,255,.96); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--border); display: flex;
  box-shadow: 0 -6px 24px rgba(16, 42, 42, .06);
}
.bottom-nav > * {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .2px; position: relative; padding: 6px 2px;
}
.bottom-nav > * .ic { width: 23px; height: 23px; transition: transform .2s var(--ease); }
.bottom-nav > .on { color: var(--teal-700); }
.bottom-nav > .on .ic { transform: translateY(-1px); stroke-width: 2.3; }
.bottom-nav > .on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold-500); }
.bottom-nav .dot { position: absolute; top: 8px; left: calc(50% + 7px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: .62rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.bottom-nav .dot:empty { min-width: 11px; width: 11px; height: 11px; padding: 0; top: 10px; }
.bottom-nav span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* sticky action bar (dno ekrana) */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  padding: 12px max(14px, var(--safe-r)) calc(12px + var(--safe-b)) max(14px, var(--safe-l));
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); box-shadow: 0 -8px 28px rgba(16, 42, 42, .08);
}
.action-bar-in { max-width: var(--wrap, 760px); margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.action-bar .total { line-height: 1.15; }
.action-bar .total b { display: block; font-size: 1.25rem; font-weight: 800; color: var(--teal-800); }
.action-bar .total small { color: var(--muted); font-size: .74rem; }

/* ── KARTICE ───────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card + .card { margin-top: 12px; }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: .98rem; font-weight: 700; flex: 1; min-width: 0; }
.card-head .ic { color: var(--teal-700); }
.card-body { padding: 16px; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.section-label { font-size: .72rem; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); margin: 22px 4px 8px; display: flex; align-items: center; gap: 8px; }
.section-label:first-child { margin-top: 4px; }
.section-label .ic { color: var(--teal-700); }

.hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl); color: #fff;
  padding: 22px 20px; background: linear-gradient(140deg, var(--teal-900) 0%, var(--teal-700) 60%, var(--teal-500) 100%);
  box-shadow: 0 10px 30px rgba(15, 68, 71, .25);
}
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 85% 15%, rgba(255,255,255,.14), transparent 45%), url("data:image/svg+xml,%3Csvg width='56' height='56' viewBox='0 0 56 56' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28 4l4 9 10 1.4-7.3 7 1.8 10L28 27l-8.5 4.4 1.8-10-7.3-7L24 13z' fill='%23fff' fill-opacity='.05'/%3E%3C/svg%3E"); }
.hero > * { position: relative; }
.hero h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.2px; line-height: 1.2; }
.hero p { opacity: .85; font-size: .9rem; margin-top: 4px; }
.hero .ar { font-size: 1.25rem; opacity: .9; display: block; margin-bottom: 6px; }
.hero-emblem { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; overflow: hidden; }
.hero-emblem img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.hero.center { text-align: center; }
.hero.gold { background: linear-gradient(140deg, var(--gold-700), var(--gold-500)); }

.quote { text-align: center; padding: 18px; border-radius: var(--r-lg); background: var(--gold-50); border: 1px solid var(--gold-100); color: var(--gold-700); }
.quote .ar { font-size: 1.3rem; display: block; color: var(--teal-800); margin-bottom: 4px; line-height: 1.8; }
.quote em { display: block; font-size: .9rem; color: var(--text-2); }
.quote small { display: block; font-size: .74rem; margin-top: 4px; opacity: .8; }

/* tile navigacija (početna) */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 128px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  color: var(--text); transition: transform .15s var(--ease), box-shadow .15s;
}
.tile:hover { color: var(--text); box-shadow: var(--sh-2); transform: translateY(-2px); }
.tile:active { transform: scale(.98); }
.tile .tile-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-700); }
.tile .tile-ic .ic { width: 22px; height: 22px; }
.tile b { font-size: .98rem; line-height: 1.25; }
.tile small { color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: -6px; }
.tile.primary { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; padding: 18px; background: linear-gradient(135deg, var(--teal-800), var(--teal-600)); color: #fff; border: 0; }
.tile.primary .tile-ic { background: rgba(255,255,255,.16); color: #fff; }
.tile.primary small { color: rgba(255,255,255,.8); margin-top: 2px; }
.tile.primary .grow { display: flex; flex-direction: column; }
.tile.gold .tile-ic { background: var(--gold-100); color: var(--gold-700); }
.tile.violet .tile-ic { background: var(--violet-bg); color: var(--violet); }

/* lista */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text); min-height: 60px; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); color: var(--text); }
button.list-item { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.list-item .li-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-700); flex-shrink: 0; }
.list-item .li-ic.gold { background: var(--gold-100); color: var(--gold-700); }
.list-item .li-ic.red { background: var(--red-bg); color: var(--red); }
.list-item .li-ic.violet { background: var(--violet-bg); color: var(--violet); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-main b { display: block; font-weight: 650; font-size: .95rem; }
.list-item .li-main small { display: block; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.list-item .li-end { color: var(--muted); flex-shrink: 0; }
.kv { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: 0; }
.kv .k { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); display: block; }
.kv .v { font-size: .95rem; font-weight: 550; overflow-wrap: anywhere; display: block; }

/* avatar */
.avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: linear-gradient(135deg, var(--teal-700), var(--teal-500)); letter-spacing: .3px; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar.sm { width: 34px; height: 34px; font-size: .74rem; }
.avatar.gold { background: linear-gradient(135deg, var(--gold-600), var(--gold-500)); }
.avatar.green { background: linear-gradient(135deg, #047857, #10b981); }
.avatar.red { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.avatar.violet { background: linear-gradient(135deg, #5b21b6, #8b5cf6); }
.avatar.gray { background: linear-gradient(135deg, #94a3a3, #b6c2c2); }
.avatar.blue { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }

/* ── DUGMAD ────────────────────────────────────────────────────────────── */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent;
  font-size: .95rem; font-weight: 650; line-height: 1.1; white-space: nowrap; text-decoration: none;
  background: var(--surface); color: var(--text); border-color: var(--border-2);
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s, opacity .15s;
  user-select: none; touch-action: manipulation;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, var(--teal-800), var(--teal-600)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(18, 78, 80, .22); }
.btn-primary:hover { color: #fff; background: linear-gradient(135deg, var(--teal-900), var(--teal-700)); }
.btn-gold { background: linear-gradient(135deg, var(--gold-600), var(--gold-500)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(176, 140, 74, .3); }
.btn-gold:hover { color: #fff; filter: brightness(1.05); background: linear-gradient(135deg, var(--gold-600), var(--gold-500)); }
.btn-success { background: #059669; color: #fff; border-color: transparent; }
.btn-success:hover { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; border-color: transparent; }
.btn-danger:hover { background: #a61f1f; color: #fff; }
.btn-soft { background: var(--teal-50); color: var(--teal-800); border-color: var(--teal-100); }
.btn-soft:hover { background: var(--teal-100); color: var(--teal-900); }
.btn-soft-red { background: var(--red-bg); color: var(--red); border-color: var(--red-bd); }
.btn-soft-red:hover { background: #fbdcdc; color: var(--red); }
.btn-soft-amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-bd); }
.btn-soft-violet { background: var(--violet-bg); color: var(--violet); border-color: var(--violet-bd); }
.btn-soft-violet:hover { background: #e6dcff; color: var(--violet); }
.btn-viber { background: var(--viber); color: #fff; border-color: transparent; }
.btn-viber:hover { background: #5f4be0; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--teal-700); }
.btn-ghost:hover { background: var(--teal-50); color: var(--teal-800); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .84rem; border-radius: var(--r-sm); gap: 6px; }
.btn-xs { min-height: 30px; padding: 0 10px; font-size: .78rem; border-radius: 8px; gap: 5px; }
.btn-lg { min-height: 54px; padding: 0 22px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn .spin { display: none; }
.btn.loading { pointer-events: none; opacity: .85; }
.btn.loading .spin { display: inline-block; }
.btn.loading .ic:not(.spin) { display: none; }

.icon-btn {
  -webkit-appearance: none; appearance: none;
  width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); position: relative;
  transition: background .15s, transform .1s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 10px; }
.icon-btn.sm .ic { width: 17px; height: 17px; }
.icon-btn .count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; border-radius: 10px; padding: 0 5px; background: var(--red); color: #fff; font-size: .66rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--teal-800); }
.icon-btn.viber { background: var(--viber); color: #fff; border-color: transparent; }
.icon-btn.call { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-bd); }
.icon-btn.sms { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-bd); }
.icon-btn.danger { color: var(--red); }
.icon-btn.danger:hover { background: var(--red-bg); }

.spin { width: 1.05em; height: 1.05em; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── BADGE / CHIP / STATUS ─────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1.2; white-space: nowrap; border: 1px solid transparent; }
.badge .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.badge-paid { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.badge-unpaid { background: var(--red-bg); color: var(--red); border-color: var(--red-bd); }
.badge-pending { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-bd); }
.badge-info { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-bd); }
.badge-violet { background: var(--violet-bg); color: var(--violet); border-color: var(--violet-bd); }
.badge-gray { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.badge-gold { background: var(--gold-100); color: var(--gold-700); border-color: #ead6ad; }
.badge-solid-red { background: var(--red); color: #fff; }
.badge-new { background: var(--red); color: #fff; font-size: .64rem; padding: 2px 7px; letter-spacing: .4px; }
button.badge { cursor: pointer; font-family: inherit; }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(198, 40, 40, .35); } 70% { box-shadow: 0 0 0 9px rgba(198, 40, 40, 0); } 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0); } }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 2px 4px; margin: 0 -2px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; scroll-snap-align: start;
  min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text-2); font-size: .86rem; font-weight: 600; white-space: nowrap;
}
.chip:hover { color: var(--text); background: var(--surface-2); }
.chip.on { background: var(--teal-800); border-color: var(--teal-800); color: #fff; }
.chip .n { background: rgba(0,0,0,.08); border-radius: 999px; padding: 1px 7px; font-size: .72rem; }
.chip.on .n { background: rgba(255,255,255,.2); }

/* godine (toggle) */
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.year-tog { position: relative; }
.year-tog input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.year-tog span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 54px; border-radius: var(--r); border: 1.5px solid var(--border-2); background: var(--surface);
  font-weight: 750; font-size: .95rem; color: var(--text-2); transition: all .15s; text-align: center; line-height: 1.1; padding: 4px;
}
.year-tog span small { font-size: .62rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.year-tog input:checked + span { background: var(--green-bg); border-color: #34a37a; color: var(--green); }
.year-tog input:checked + span::before { content: "✓"; font-size: .7rem; position: absolute; top: 4px; right: 7px; color: var(--green); }
.year-tog input:focus-visible + span { outline: 3px solid rgba(42,138,142,.45); outline-offset: 2px; }
.year-tog.cur span { border-color: var(--gold-500); box-shadow: inset 0 0 0 1px var(--gold-500); }
.year-tog.cur span small { color: var(--gold-700); }
.year-tog input:disabled + span { opacity: .5; }

/* segmentirana kontrola */
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 4px; gap: 4px; }
.seg label, .seg a, .seg button { flex: 1; position: relative; text-align: center; border: 0; background: none; border-radius: 9px; min-height: 40px; display: grid; place-items: center; font-weight: 700; font-size: .92rem; color: var(--text-2); cursor: pointer; padding: 0 8px; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:has(input:checked), .seg .on { background: var(--surface); color: var(--teal-800); box-shadow: var(--sh-1); }

/* ── FORME ─────────────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.label { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.label .opt { font-weight: 500; color: var(--muted); }
.label .req { color: var(--red); }
.input, .select, .textarea {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; min-height: 48px; padding: 11px 14px;
  font-size: 16px; /* sprječava zoom na iOS */
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border-2); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.input::placeholder, .textarea::placeholder { color: #9aa8a7; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 4px rgba(34, 121, 124, .14); }
.input[readonly] { background: var(--surface-2); }
.select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23687877' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.select-sm { min-height: 38px; padding: 6px 34px 6px 12px; font-size: 15px; border-radius: 10px; background-position: right 10px center; width: auto; }
.input-wrap { position: relative; }
.input-wrap > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap > .input { padding-left: 44px; }
.input-wrap > .clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.input-wrap > .input.has-clear { padding-right: 46px; }
.is-invalid { border-color: var(--red) !important; background: #fffafa; }
.is-invalid:focus { box-shadow: 0 0 0 4px rgba(198, 40, 40, .12) !important; }
.is-valid { border-color: #34a37a; }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: var(--red); font-size: .8rem; font-weight: 600; margin-top: 6px; }
.field-hint { color: var(--muted); font-size: .78rem; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.grid-zip { display: grid; grid-template-columns: 110px 1fr; gap: 0 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--teal-700); flex-shrink: 0; margin: 0; }

.search-box { position: relative; }
.search-box .input { padding-left: 44px; padding-right: 44px; border-radius: 14px; min-height: 50px; }
.search-box > .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 19px; height: 19px; }
.search-box .clear { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); border: 0; background: none; }

/* sugestije (autocomplete) */
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r); box-shadow: var(--sh-3); max-height: 280px; overflow-y: auto; }
.suggest-head { padding: 9px 14px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.suggest-item { display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; font-size: .92rem; }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item.on { background: var(--teal-50); }
.suggest-item small { display: block; color: var(--muted); font-size: .78rem; }

/* DAWA adresni autocomplete */
.dawa-autocomplete-container { position: relative; }
.dawa-autocomplete-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 45; margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r); box-shadow: var(--sh-3); max-height: 260px; overflow-y: auto; }
.dawa-autocomplete-suggestions:empty { display: none; }
.dawa-autocomplete-suggestions .dawa-autocomplete-suggestion { padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: .92rem; }
.dawa-autocomplete-suggestions .dawa-autocomplete-suggestion:last-child { border-bottom: 0; }
.dawa-autocomplete-suggestions .dawa-autocomplete-suggestion.dawa-selected, .dawa-autocomplete-suggestions .dawa-autocomplete-suggestion:hover { background: var(--teal-50); }

/* ── ALERTI ────────────────────────────────────────────────────────────── */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid; font-size: .9rem; line-height: 1.45; }
.alert > .ic { margin-top: 1px; width: 20px; height: 20px; }
.alert b { display: block; }
.alert-danger { background: var(--red-bg); border-color: var(--red-bd); color: #8f1d1d; }
.alert-success { background: var(--green-bg); border-color: var(--green-bd); color: #065f46; }
.alert-warning { background: var(--amber-bg); border-color: var(--amber-bd); color: #8a4108; }
.alert-info { background: var(--blue-bg); border-color: var(--blue-bd); color: #1e3a8a; }
.alert-gold { background: var(--gold-50); border-color: var(--gold-100); color: var(--gold-700); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { width: 44px; height: 44px; stroke-width: 1.5; opacity: .45; margin-bottom: 10px; }
.empty b { display: block; color: var(--text-2); font-size: 1rem; margin-bottom: 4px; }

/* ── TOAST ─────────────────────────────────────────────────────────────── */
.toast-root { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 12px); z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast {
  pointer-events: auto; max-width: 440px; width: max-content; min-width: 0; max-width: min(440px, 100%);
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: #13201f; color: #fff; box-shadow: var(--sh-3); font-size: .9rem; font-weight: 600;
  animation: toastIn .3s var(--ease);
}
.toast.ok { background: #065f46; }
.toast.err { background: #991b1b; }
.toast.warn { background: #92400e; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: all .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }

/* ── SHEET / MODAL ─────────────────────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(8, 26, 26, .5); opacity: 0; transition: opacity .25s; }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 901;
  max-height: calc(100dvh - var(--safe-t) - 24px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--sh-3);
  transform: translateY(105%); transition: transform .32s var(--ease); visibility: hidden;
  padding-bottom: var(--safe-b);
}
.sheet.show { transform: none; visibility: visible; }
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--border-2); margin: 9px auto 0; flex-shrink: 0; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sheet-head h3 { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 750; overflow-wrap: anywhere; }
.sheet-head p { font-size: .82rem; color: var(--muted); }
.sheet-body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1; min-height: 0; }
.sheet-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; background: var(--surface); }
.sheet-foot .btn { flex: 1 1 auto; }
.sheet.full { height: calc(100dvh - var(--safe-t) - 12px); }
body.no-scroll { overflow: hidden; }

.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 108px; border-radius: 16px; border: 2px solid; font-weight: 800; font-size: 1rem; background: none; transition: transform .1s, box-shadow .15s; }
.method-btn:active { transform: scale(.97); }
.method-btn .ic { width: 30px; height: 30px; }
.method-btn.cash { background: var(--amber-bg); border-color: #f2bf63; color: #8a4108; }
.method-btn.mp { background: var(--blue-bg); border-color: #8fb0f7; color: #1e3a8a; }
.method-btn:hover { box-shadow: var(--sh-2); }

/* ── STATISTIKA ────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  position: relative; display: block; padding: 14px; border-radius: var(--r-lg); color: #fff; overflow: hidden; min-height: 104px;
  box-shadow: var(--sh-2); transition: transform .15s var(--ease);
}
.stat:hover { color: #fff; transform: translateY(-2px); }
.stat::after { content: ""; position: absolute; right: -24px; bottom: -24px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,.1); }
.stat .s-l { font-size: .7rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; opacity: .85; }
.stat .s-v { font-size: 1.75rem; font-weight: 850; line-height: 1.1; margin-top: 6px; letter-spacing: -.5px; }
.stat .s-s { font-size: .76rem; opacity: .9; margin-top: 4px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.stat .s-ic { position: absolute; top: 12px; right: 12px; opacity: .45; }
.stat.teal { background: linear-gradient(135deg, var(--teal-900), var(--teal-600)); }
.stat.green { background: linear-gradient(135deg, #065f46, #10b981); }
.stat.gold { background: linear-gradient(135deg, var(--gold-700), #d9b26a); }
.stat.violet { background: linear-gradient(135deg, #4c1d95, #8b5cf6); }
.stat .s-btn { position: absolute; right: 8px; bottom: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 10px; border: 0; background: rgba(255,255,255,.2); color: #fff; display: grid; place-items: center; }
.stat .s-btn .ic { width: 16px; height: 16px; }
.stat .s-new { position: relative; z-index: 2; background: #fff; color: var(--red); border: 0; border-radius: 999px; padding: 2px 8px; font-size: .66rem; font-weight: 800; letter-spacing: .3px; }

.meter { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.meter > i { display: block; height: 100%; border-radius: 6px; }

/* ── STATUS GODINA (član) ──────────────────────────────────────────────── */
.year-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.year-row:last-child { border-bottom: 0; }
.year-row.cur { background: linear-gradient(90deg, var(--teal-50), var(--surface)); }
.year-row .yr { font-size: 1.08rem; font-weight: 800; color: var(--teal-800); line-height: 1.1; }
.year-row .yr small { display: block; font-size: .74rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--border-2); }
.dot.green { background: #10b981; box-shadow: 0 0 0 4px var(--green-bg); }
.dot.amber { background: #f59e0b; box-shadow: 0 0 0 4px var(--amber-bg); }
.dot.red { background: #ef4444; box-shadow: 0 0 0 4px var(--red-bg); }

/* ── PORODICA (član) ───────────────────────────────────────────────────── */
.fam-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
.fam-row:last-child { border-bottom: 0; }
.fam-row.sel { background: var(--violet-bg); }
.fam-row.paid { cursor: default; opacity: .65; }
.fam-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--violet); flex-shrink: 0; margin: 0; }
.tag { display: inline-block; font-size: .66rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--teal-50); color: var(--teal-800); vertical-align: 1px; margin-left: 4px; letter-spacing: .2px; }
.tag.gold { background: var(--gold-100); color: var(--gold-700); }
.tag.violet { background: var(--violet-bg); color: var(--violet); }

/* ── REGISTRACIJA: blok člana ──────────────────────────────────────────── */
.member-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); margin-bottom: 14px; overflow: visible; animation: blockIn .3s var(--ease); }
@keyframes blockIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.member-block-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--border); }
.member-block-head .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--teal-800), var(--teal-500)); flex-shrink: 0; }
.member-block-head .role { flex: 1; min-width: 0; font-weight: 750; font-size: .95rem; }
.member-block-head .role small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; }
.member-block-body { padding: 16px; }

/* ── ADMIN: LAYOUT ─────────────────────────────────────────────────────── */
.admin { --wrap: 1400px; }
.sidebar { display: none; }
.admin-main { min-width: 0; }
.admin .page { max-width: 1400px; }
.topbar-desktop { display: none; }

/* ── ADMIN: LISTA ČLANOVA ──────────────────────────────────────────────── */
.toolbar { display: flex; flex-direction: column; gap: 10px; }
.toolbar .filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.result-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: 14px 4px 8px; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mrow { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px 12px; align-items: start; position: relative; }
.mrow.req { border-color: var(--amber-bd); background: linear-gradient(180deg, #fffaf1, var(--surface) 60%); }
.mrow.head { box-shadow: inset 3px 0 0 var(--violet), var(--sh-1); }
.mrow .m-av { grid-row: 1; grid-column: 1; }
.mrow .m-name { grid-row: 1; grid-column: 2; min-width: 0; }
.mrow .m-name b { font-size: 1rem; font-weight: 750; overflow-wrap: anywhere; display: inline; margin-right: 4px; line-height: 1.3; }
.mrow .m-name .m-tags { display: inline-flex; gap: 5px; flex-wrap: wrap; vertical-align: 2px; }
.mrow .m-name small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; overflow-wrap: anywhere; }
.mrow .m-status { grid-row: 1; grid-column: 3; text-align: right; }
.mrow .m-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.mrow .m-meta .pill { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 650; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; }
.mrow .m-meta .pill .ic { width: 13px; height: 13px; color: var(--muted); }
.mrow .m-req { grid-column: 1 / -1; background: var(--amber-bg); border: 1px solid var(--amber-bd); border-radius: var(--r); padding: 10px 12px; }
.mrow .m-req .req-t { font-size: .84rem; font-weight: 750; color: #8a4108; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mrow .m-req .req-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mrow .m-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--border); flex-wrap: wrap; }
.mrow .m-actions .sp { flex: 1; }
.mrow .m-contact { display: flex; align-items: center; gap: 6px; }
.mrow .vcount { min-width: 26px; height: 26px; border-radius: 999px; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; padding: 0 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; }
.mrow .vcount.has { background: var(--violet-bg); color: var(--violet); border-color: var(--violet-bd); }
.fam-btn { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #5b21b6, #8b5cf6); color: #fff; cursor: pointer; }
.fam-btn .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.mlist-head { display: none; }

.pager { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; color: var(--text-2); }
.pager a:hover { background: var(--surface-2); }
.pager .on { background: var(--teal-800); border-color: var(--teal-800); color: #fff; }
.pager .gap { border: 0; background: none; min-width: 20px; }

/* aktivnosti / notifikacije */
.act { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.act:last-child { border-bottom: 0; }
.act.req { background: #fffaf1; }
.act .act-main { flex: 1; min-width: 0; }
.act .act-main b { font-weight: 700; overflow-wrap: anywhere; }
.act .act-main small { display: block; color: var(--muted); font-size: .8rem; margin-top: 1px; }
.act .act-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.notif { position: relative; display: flex; gap: 12px; padding: 13px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--border-2); margin-bottom: 10px; cursor: pointer; }
.notif.unread { background: var(--gold-50); border-color: var(--gold-100); }
.notif.t-payment_request { border-left-color: #10b981; }
.notif.t-profile_update { border-left-color: #3b82f6; }
.notif.t-login { border-left-color: #8b5cf6; }
.notif.t-new_registration { border-left-color: #f59e0b; }
.notif.t-payment_cancelled { border-left-color: #ef4444; }
.notif .n-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); flex-shrink: 0; font-size: 1.05rem; border: 1px solid var(--border); }
.notif .n-main { flex: 1; min-width: 0; }
.notif .n-main b { display: block; font-size: .92rem; overflow-wrap: anywhere; }
.notif .n-main p { font-size: .84rem; color: var(--text-2); overflow-wrap: anywhere; }
.notif .n-meta { font-size: .76rem; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.notif .n-del { position: absolute; right: 6px; top: 6px; }

.member-head { display: flex; align-items: center; gap: 14px; }
.member-head h1 { font-size: 1.25rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }

/* ── OFFLINE BANNER ────────────────────────────────────────────────────── */
.offline-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 70; background: #13201f; color: #fff; padding: 9px 16px; border-radius: 999px; font-size: .84rem; font-weight: 650; box-shadow: var(--sh-3); display: none; align-items: center; gap: 8px; }
body.offline .offline-bar { display: flex; }

.install-card { display: none; }
.install-card.show { display: flex; }

.foot { text-align: center; color: var(--muted); font-size: .76rem; padding: 22px 10px 6px; }
.foot b { color: var(--teal-700); display: block; font-size: .84rem; }

/* animacije ulaza */
.fade-in { animation: fadeIn .35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ═══════════════════════════════════════════════════════════════════════
   BREAKPOINTI
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 359px) {
  body { font-size: 14px; }
  .tiles { grid-template-columns: 1fr; }
  .grid-zip { grid-template-columns: 92px 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .btn { padding: 0 14px; }
}

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 760px); border-radius: 22px; transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform .25s var(--ease), opacity .2s; }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; }
  .sheet::before { display: none; }
  .sheet-head { padding-top: 16px; }
  .sheet.wide { width: min(860px, calc(100vw - 32px)); }
  .sheet.full { height: auto; }
  .hero { padding: 28px; }
  .page { padding-top: 22px; }
}

@media (min-width: 1240px) {
  .toolbar { flex-direction: row; align-items: center; }
  .toolbar .search-box { flex: 1 1 340px; max-width: 460px; }
}

/* Admin desktop: sidebar + tabela */
@media (min-width: 1024px) {
  .admin .appbar, .admin .bottom-nav { display: none; }
  .admin .page.has-nav { padding-bottom: 40px; }
  .admin-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: linear-gradient(180deg, var(--teal-950), var(--teal-800)); color: #fff; padding: 18px 14px;
  }
  .sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 12px; }
  .sidebar .brand b { display: block; font-size: 1rem; }
  .sidebar .brand small { display: block; font-size: .72rem; opacity: .7; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar .s-label { font-size: .66rem; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; opacity: .5; padding: 14px 12px 6px; }
  .sidebar a, .sidebar button.s-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: rgba(255,255,255,.82); font-weight: 600; font-size: .92rem;
    border: 0; background: none; width: 100%; text-align: left;
  }
  .sidebar a:hover, .sidebar button.s-link:hover { background: rgba(255,255,255,.08); color: #fff; }
  .sidebar a.on { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
  .sidebar .ic { width: 19px; height: 19px; opacity: .9; }
  .sidebar .s-badge { margin-left: auto; background: var(--red); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
  .sidebar .s-badge.gold { background: var(--gold-500); }
  .sidebar .s-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 10px; }
  .sidebar .s-foot small { opacity: .5; font-size: .7rem; text-align: center; }

  .topbar-desktop { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; background: rgba(242,245,245,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 14px 28px; border-bottom: 1px solid var(--border); }
  .topbar-desktop h1 { font-size: 1.25rem; font-weight: 800; flex: 1; }
  .topbar-desktop .icon-btn .count { border-color: var(--bg); }
  .admin .page { padding: 22px 28px 40px; }

}


/* ── Lista članova: kartice → 2 kolone → tabela (container queries) ──── */
.mlist-wrap { container-type: inline-size; }
.mrow .m-end { display: flex; gap: 6px; margin-left: auto; }
.mrow .d-only { display: none !important; }
@container (min-width: 640px) {
  .mlist:not(.as-table) { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
}
@container (min-width: 920px) {
  .mlist.normal { display: block; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
  .mlist.normal .mlist-head, .mlist.normal .mrow {
    display: grid; gap: 0 12px; align-items: center;
    grid-template-columns: 42px minmax(190px, 2fr) minmax(150px, 1.15fr) 54px 84px minmax(200px, 1.4fr) 92px;
  }
}
@container (min-width: 1080px) {
  .mlist.inactive { display: block; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
  .mlist.inactive .mlist-head, .mlist.inactive .mrow {
    display: grid; gap: 0 12px; align-items: center;
    grid-template-columns: 42px minmax(180px, 2fr) minmax(140px, 1.1fr) 54px 84px 84px 90px minmax(190px, 1.4fr) 92px;
  }
}
@container (min-width: 920px) {
  .mlist.normal .mlist-head, .mlist.inactive.tbl .mlist-head { display: grid; padding: 11px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
  .mlist.normal .mrow { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; padding: 11px 18px; background: var(--surface); }
  .mlist.normal .mrow:last-child { border-bottom: 0; }
  .mlist.normal .mrow:hover { background: #fafcfc; }
  .mlist.normal .mrow.req { background: #fffaf1; }
  .mlist.normal .mrow.head { box-shadow: inset 3px 0 0 var(--violet); }
  .mlist.normal .mrow > *, .mlist.normal .mrow .m-meta > *, .mlist.normal .mrow .m-actions > * { grid-row: auto; grid-column: auto; }
  .mlist.normal .mrow .m-meta, .mlist.normal .mrow .m-actions { display: contents; }
  .mlist.normal .m-av { order: 1; } .mlist.normal .m-name { order: 2; } .mlist.normal .m-contact { order: 3; }
  .mlist.normal .pill-age { order: 4; } .mlist.normal .pill-join { order: 5; }
  .mlist.normal .m-status, .mlist.normal .m-req { order: 8; } .mlist.normal .m-end { order: 9; justify-content: flex-end; }
  .mlist.normal .mrow.req .m-status { display: none; }
  .mlist.normal .m-req { padding: 8px 10px; }
  .mlist.normal .m-req .req-t { margin-bottom: 6px; font-size: .8rem; }
  .mlist.normal .pill { justify-self: start; }
  .mlist.normal .pill .lbl, .mlist.normal .m-addr-pill, .mlist.normal .m-actions .sp { display: none !important; }
  .mlist.normal .m-status { text-align: left; }
  .mlist.normal .d-only { display: inline-flex !important; }
  .mlist.normal .m-only { display: none !important; }
}
@container (min-width: 1080px) {
  .mlist.inactive .mlist-head { display: grid; padding: 11px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
  .mlist.inactive .mrow { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; padding: 11px 18px; background: var(--surface); }
  .mlist.inactive .mrow:last-child { border-bottom: 0; }
  .mlist.inactive .mrow.req { background: #fffaf1; }
  .mlist.inactive .mrow > *, .mlist.inactive .mrow .m-meta > *, .mlist.inactive .mrow .m-actions > * { grid-row: auto; grid-column: auto; }
  .mlist.inactive .mrow .m-meta, .mlist.inactive .mrow .m-actions { display: contents; }
  .mlist.inactive .m-av { order: 1; } .mlist.inactive .m-name { order: 2; } .mlist.inactive .m-contact { order: 3; }
  .mlist.inactive .pill-age { order: 4; } .mlist.inactive .pill-join { order: 5; } .mlist.inactive .pill-unpaid { order: 6; } .mlist.inactive .pill-last { order: 7; }
  .mlist.inactive .m-status, .mlist.inactive .m-req { order: 8; } .mlist.inactive .m-end { order: 9; justify-content: flex-end; }
  .mlist.inactive .mrow.req .m-status { display: none; }
  .mlist.inactive .pill { justify-self: start; }
  .mlist.inactive .pill .lbl, .mlist.inactive .m-addr-pill, .mlist.inactive .m-actions .sp { display: none !important; }
  .mlist.inactive .m-status { text-align: left; }
  .mlist.inactive .d-only { display: inline-flex !important; }
  .mlist.inactive .m-only { display: none !important; }
}

@media (min-width: 1500px) {
  .admin .page { padding-left: 40px; padding-right: 40px; }
}

/* ── PRINT (opće) ──────────────────────────────────────────────────────── */
@media print {
  .no-print, .appbar, .bottom-nav, .action-bar, .toast-root, .offline-bar { display: none !important; }
  body { background: #fff; }
}

/* ── dodatno ───────────────────────────────────────────────────────────── */
.mrow .pill.empty { display: none; }
@container (min-width: 920px) { .mlist.normal .pill.empty { display: inline-flex; color: var(--muted); } }
@container (min-width: 1080px) { .mlist.inactive .pill.empty { display: inline-flex; color: var(--muted); } }
body.busy { cursor: progress; }
body.busy::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 2000; background: linear-gradient(90deg, var(--gold-500), var(--teal-500), var(--gold-500)); background-size: 200% 100%; animation: busy 1s linear infinite; }
@keyframes busy { to { background-position: -200% 0; } }
.seg label.on { background: var(--surface); color: var(--teal-800); box-shadow: var(--sh-1); }
.tile { font: inherit; cursor: pointer; }
button.tile { border: 1px solid var(--border); }
.list-item.list { border-radius: var(--r-lg); }
code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.admin .appbar-in { max-width: none; }
.rel { position: relative; }
@media (min-width: 1024px) {
  .sidebar .lang-switch a { display: inline-block; width: auto; padding: 5px 12px; border-radius: 999px; font-size: .74rem; }
  .sidebar .lang-switch a.on { background: #fff; color: var(--teal-800); box-shadow: none; }
}
@media (min-width:1024px){ .sidebar nav.lang-switch { flex-direction: row; display: inline-flex; gap: 0; } }
@media (max-width: 599px) {
  [data-dirty-msg]:not(.text-amber) { display: none; }
  [data-dirty-msg].text-amber { position: absolute; top: -26px; left: 14px; right: 14px; font-size: .74rem; text-align: center; background: var(--amber-bg); border-radius: 8px; padding: 2px 6px; }
  .action-bar-in > .btn { flex: 1; }
}

/* ── Logo (početna) ── */
.brand-logo { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: block; background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 2px 8px rgba(0,0,0,.22); transition: transform .15s var(--ease); }
.brand-logo img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.brand-logo:hover { transform: scale(1.05); }
.brand-logo:active { transform: scale(.92); }
.sidebar .brand .brand-logo { width: 46px; height: 46px; }
.hero-logo { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25), 0 10px 30px rgba(0,0,0,.25); }
.hero-logo img { width: 100%; height: 100%; display: block; border-radius: 50%; }
