:root {
  --ink: #0a1730; --ink-2: #102347; --ink-3: #18305c;
  --enamel: #1d4396; --sky: #86b6e6;
  --gold: #c8a04b; --gold-soft: #e7d29c;
  --stone: #eef1f6; --paper: #f9fafc;
  --text: #13203a; --muted: #56637c; --muted-dark: #a9b6cc;
  --line: rgba(19, 32, 58, .12); --line-dark: rgba(231, 210, 156, .18);
  --ok: #2f8a5b; --bad: #b5443a;
  --f-display: "Marcellus", "Forum", Georgia, serif;
  --f-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: #050d1d; color: var(--text); font-family: var(--f-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; margin: 0; line-height: 1.15; letter-spacing: .01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Frame: full screen on phones, a phone-sized column on big screens */
#app { max-width: 480px; margin: 0 auto; min-height: 100%; background: var(--paper); position: relative; display: flex; flex-direction: column; box-shadow: 0 0 80px rgba(0, 0, 0, .5); }
@media (min-width: 520px) { body { background: radial-gradient(circle at 50% 0%, #17305e, #050d1d 70%); } }

.demo-bar { position: sticky; top: 0; z-index: 40; background: var(--gold); color: var(--ink); font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: calc(.35rem + var(--safe-t)) .9rem .35rem; }
.demo-bar button { background: none; border: 1px solid rgba(10, 23, 48, .4); border-radius: 99px; padding: .15rem .6rem; font: inherit; letter-spacing: .08em; }

.topbar { position: sticky; top: calc(1.7rem + var(--safe-t)); z-index: 30; background: rgba(10, 23, 48, .96); backdrop-filter: blur(10px); color: #fff; display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; min-height: 56px; border-bottom: 1px solid var(--line-dark); }
.topbar h1 { font-size: 1.15rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .brand { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; text-decoration: none; }
.topbar .brand img { width: 34px; height: 34px; }
.topbar .brand span { font-family: var(--f-display); font-size: .95rem; line-height: 1.1; }
.topbar .brand small { display: block; font-family: var(--f-mono); font-size: .56rem; letter-spacing: .2em; color: var(--gold-soft); text-transform: uppercase; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-dark); background: transparent; display: grid; place-items: center; color: var(--gold-soft); flex: none; position: relative; text-decoration: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: #e2574c; border: 2px solid var(--ink); }

main { flex: 1; padding-bottom: calc(84px + var(--safe-b)); }
.view { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pad { padding: 1.1rem; }
.stack > * + * { margin-top: 1rem; }

/* Tab bar */
.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30; background: rgba(10, 23, 48, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--line-dark); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: var(--safe-b); }
.tabs a { display: grid; justify-items: center; gap: 3px; padding: .55rem 0 .5rem; text-decoration: none; color: var(--muted-dark); font-size: .66rem; letter-spacing: .02em; position: relative; }
.tabs a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--gold-soft); }
.tabs a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--gold); border-radius: 0 0 2px 2px; }

/* Hero */
.hero { background: radial-gradient(circle at 50% 30%, var(--ink-3), var(--ink) 70%); color: #fff; padding: 1.6rem 1.1rem 1.8rem; text-align: center; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 50% 38%, transparent 0 38px, rgba(231, 210, 156, .05) 38px 39px); pointer-events: none; }
.medal { width: 150px; height: 150px; margin: .3rem auto 1rem; perspective: 700px; }
.medal img { width: 100%; height: 100%; animation: spin 14s linear infinite; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .5)); }
@keyframes spin { to { transform: rotateY(360deg); } }
.hero .eyebrow { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); }
.hero h2 { font-size: 1.65rem; margin-top: .35rem; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 1.3rem; border-top: 1px solid var(--line-dark); padding-top: 1rem; position: relative; z-index: 1; }
.hero-stats b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; color: #fff; }
.hero-stats span { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dark); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 1.4rem 0 .7rem; }
.section-title h3 { font-size: 1.25rem; }
.section-title a { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--enamel); text-decoration: none; }
.eyebrow { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--enamel); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: block; text-decoration: none; color: inherit; }
.card.pad { padding: 1rem; }
.news-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.news-card .body { padding: .85rem 1rem 1rem; }
.news-card h4 { font-family: var(--f-display); font-weight: 400; font-size: 1.12rem; margin: .25rem 0 .3rem; line-height: 1.25; }
.news-row { display: grid; grid-template-columns: 92px 1fr; gap: .8rem; align-items: center; padding: .6rem; }
.news-row img { width: 92px; height: 70px; object-fit: cover; border-radius: 9px; }
.news-row h4 { font-family: var(--f-display); font-weight: 400; font-size: 1rem; line-height: 1.25; margin-top: .15rem; }
.list > * + * { margin-top: .7rem; }

.event-row { display: grid; grid-template-columns: 58px 1fr; gap: .9rem; align-items: center; padding: .8rem; }
.datebox { background: var(--ink); color: #fff; border-radius: 10px; text-align: center; padding: .4rem 0; }
.datebox b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.45rem; line-height: 1.1; }
.datebox span { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); }
.event-row h4 { font-weight: 600; font-size: .98rem; margin: 0 0 .15rem; }

.notice { display: flex; gap: .7rem; align-items: center; background: var(--stone); border-radius: 12px; padding: .8rem 1rem; text-decoration: none; font-size: .92rem; }
.notice svg { width: 22px; height: 22px; stroke: var(--enamel); fill: none; stroke-width: 1.7; flex: none; }

/* Search & members */
.search { position: sticky; top: calc(1.7rem + 56px + var(--safe-t)); z-index: 5; background: var(--paper); padding: .9rem 1.1rem .6rem; }
.search input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .8rem 1rem .8rem 2.7rem; font-size: 1rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356637c' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 1rem center; background-size: 18px; }
.member-row { display: grid; grid-template-columns: 46px 1fr auto; gap: .8rem; align-items: center; padding: .7rem .9rem; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--enamel), var(--ink)); color: var(--gold-soft); display: grid; place-items: center; font-family: var(--f-display); font-size: 1.05rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-row b { display: block; font-weight: 600; }
.member-row small { color: var(--muted); font-size: .8rem; }
.badge-no { font-family: var(--f-mono); font-size: .78rem; color: var(--enamel); letter-spacing: .06em; }
.pill { display: inline-block; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 99px; background: rgba(47, 138, 91, .12); color: var(--ok); }
.pill.off { background: rgba(181, 68, 58, .1); color: var(--bad); }
mark { background: rgba(200, 160, 75, .35); color: inherit; border-radius: 2px; }

/* Member card (sheet) */
.idcard { background: radial-gradient(circle at 80% 0%, var(--ink-3), var(--ink) 65%); color: #fff; border-radius: 18px; padding: 1.3rem; position: relative; overflow: hidden; border: 1px solid var(--line-dark); }
.idcard::before { content: ""; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; background: url(img/seal.webp) center/contain no-repeat; opacity: .14; }
.idcard .top { display: flex; gap: 1rem; align-items: center; }
.idcard .avatar { width: 66px; height: 66px; font-size: 1.5rem; border: 2px solid var(--gold); }
.idcard h3 { font-size: 1.4rem; }
.idcard dl { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin: 1.2rem 0 0; }
.idcard dt { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.idcard dd { margin: .15rem 0 0; }

/* Sheets, dialogs, toasts */
.scrim { position: fixed; inset: 0; background: rgba(5, 13, 29, .6); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--paper); width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: .6rem 1.1rem calc(1.2rem + var(--safe-b)); max-height: 90vh; overflow: auto; animation: up .35s var(--ease) both; }
.sheet::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto .9rem; }
@keyframes up { from { transform: translateY(100%); } }
.sheet h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); z-index: 70; background: var(--ink); color: #fff; border: 1px solid var(--line-dark); border-radius: 14px; padding: .75rem .9rem .75rem 1.1rem; display: flex; align-items: center; gap: 1rem; width: calc(100% - 2rem); max-width: 440px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: toast .35s var(--ease) both; font-size: .95rem; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 20px); } }
.toast span { flex: 1; }
.toast svg { width: 22px; height: 22px; stroke: #7dd3a5; fill: none; stroke-width: 2.2; flex: none; }
.toast button { background: var(--gold); color: var(--ink); border: 0; border-radius: 99px; padding: .45rem .9rem; font-weight: 700; font-size: .85rem; }

/* Forms & buttons */
.field { display: grid; gap: .3rem; }
.field label { font-size: .85rem; font-weight: 600; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid rgba(19, 32, 58, .2); background: #fff; border-radius: 12px; padding: .8rem .9rem; font-size: 1rem; min-height: 50px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--enamel); outline: 0; box-shadow: 0 0 0 3px rgba(29, 67, 150, .15); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; }
.check input { width: 22px; height: 22px; accent-color: var(--enamel); flex: none; margin-top: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.btn { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 54px; border-radius: 14px; border: 0; background: var(--ink); color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; padding: .7rem 1rem; transition: transform .15s; }
.btn:active { transform: scale(.98); }
.btn.gold { background: linear-gradient(135deg, #e7d29c, #c8a04b 55%, #a8812f); color: var(--ink); }
.btn.ghost { background: transparent; border: 1px solid rgba(19, 32, 58, .25); color: var(--text); }
.btn.danger { background: var(--bad); }
.btn.sm { min-height: 42px; width: auto; font-size: .88rem; border-radius: 99px; padding: .5rem 1rem; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btns { display: grid; gap: .6rem; }
.btns.two { grid-template-columns: 1fr 1fr; }
.error { color: var(--bad); font-size: .88rem; }
.warn { background: #fff4dc; border: 1px solid #ecd08e; color: #6b4d0e; border-radius: 12px; padding: .8rem 1rem; font-size: .92rem; }

/* Menu list */
.menu { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.menu a, .menu button { display: flex; align-items: center; gap: .9rem; padding: .95rem 1rem; text-decoration: none; width: 100%; background: none; border: 0; text-align: left; font-size: 1rem; }
.menu > * + * { border-top: 1px solid var(--line); }
.menu svg { width: 22px; height: 22px; fill: none; stroke: var(--enamel); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu .chev { margin-left: auto; color: var(--muted); }
.menu .count { margin-left: auto; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 99px; padding: .1rem .5rem; }
.menu .on { margin-left: auto; color: var(--enamel); font-weight: 700; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.cal-head h3 { font-size: 1.3rem; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .dow { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em; color: var(--muted); padding: .3rem 0; text-transform: uppercase; }
.cal button { aspect-ratio: 1; border: 0; border-radius: 10px; background: #fff; font-size: .9rem; position: relative; }
.cal button.out { visibility: hidden; }
.cal button.today { outline: 2px solid var(--gold); }
.cal button.has { background: var(--ink); color: #fff; }
.cal button.has::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--gold); }
.cal button.sel { box-shadow: 0 0 0 2px var(--enamel); }

/* Gallery */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid3 button { padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; background: var(--stone); position: relative; }
.grid3 img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.grid3 .x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; background: rgba(181, 68, 58, .95); color: #fff; display: grid; place-items: center; font-size: 1.1rem; line-height: 1; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(5, 13, 29, .95); display: grid; place-items: center; padding: 1rem; animation: fade .25s both; }
.lightbox img { max-height: 85vh; border-radius: 8px; }

/* Admin */
.admin-hero { background: var(--ink); color: #fff; padding: 1.2rem 1.1rem 1.4rem; }
.admin-hero .role { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.admin-hero h2 { font-size: 1.5rem; margin-top: .3rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem; text-decoration: none; display: grid; gap: .5rem; min-height: 112px; position: relative; text-align: left; }
.tile svg { width: 30px; height: 30px; fill: none; stroke: var(--enamel); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile b { font-size: 1rem; }
.tile small { color: var(--muted); font-size: .8rem; }
.tile .count { position: absolute; top: .8rem; right: .8rem; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 99px; padding: .1rem .5rem; }
.tile.locked { opacity: .45; }
.tile.locked::after { content: ""; position: absolute; top: .9rem; right: .9rem; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356637c' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat; }
.role-pick { display: grid; gap: .8rem; }
.role-pick button { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; display: grid; gap: .2rem; }
.role-pick b { font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; }

.toolbar { display: flex; gap: .5rem; overflow-x: auto; padding: 0 1.1rem .6rem; scrollbar-width: none; }
.toolbar::-webkit-scrollbar { display: none; }
.toolbar select { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .5rem .8rem; font-size: .85rem; flex: none; max-width: 170px; }
.admin-row { display: grid; grid-template-columns: 42px 1fr auto; gap: .7rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; }
.admin-row .avatar { width: 42px; height: 42px; font-size: .95rem; }
.admin-row b { display: block; font-weight: 600; font-size: .95rem; line-height: 1.2; }
.admin-row small { color: var(--muted); font-size: .78rem; }
.admin-row .acts { display: flex; align-items: center; gap: .3rem; }
.mini { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; }
.mini svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini.del svg { stroke: var(--bad); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #c6ccd8; border-radius: 99px; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.fab { position: fixed; right: max(1rem, calc(50% - 240px + 1rem)); bottom: calc(1.2rem + var(--safe-b)); z-index: 35; background: linear-gradient(135deg, #e7d29c, #c8a04b 55%, #a8812f); color: var(--ink); border: 0; border-radius: 99px; padding: .95rem 1.3rem; font-weight: 700; display: flex; gap: .4rem; align-items: center; box-shadow: 0 10px 26px rgba(10, 23, 48, .35); text-decoration: none; }
.fab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.app-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.app-card h4 { font-size: 1.05rem; margin: 0 0 .2rem; }
.app-card dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: .6rem 0 .9rem; font-size: .9rem; }
.app-card dt { color: var(--muted); }
.app-card dd { margin: 0; }
.log-row { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.log-row time { font-family: var(--f-mono); font-size: .7rem; color: var(--muted); white-space: nowrap; padding-top: .15rem; }
.img-pick { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem; }
.img-pick button { flex: none; width: 76px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; background: var(--stone); }
.img-pick button.on { border-color: var(--gold); }
.img-pick img { width: 100%; height: 100%; object-fit: cover; }
.img-pick .up { display: grid; place-items: center; font-size: 1.6rem; color: var(--enamel); border: 2px dashed rgba(29, 67, 150, .35); }

/* Stats */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .8rem; }
.kpi b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.8rem; line-height: 1.1; }
.kpi span { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chart { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.chart h4 { font-size: .95rem; margin: 0 0 .8rem; }
.bars { display: grid; gap: .45rem; }
.bar { display: grid; grid-template-columns: 7.5rem 1fr 2rem; gap: .5rem; align-items: center; font-size: .82rem; }
.bar span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar i { display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--enamel), var(--sky)); transform-origin: left; animation: grow .8s var(--ease) both; }
.bar b { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
@keyframes grow { from { transform: scaleX(0); } }
.cols { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.cols div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.cols i { display: block; width: 100%; background: linear-gradient(180deg, var(--gold), #a8812f); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: growY .8s var(--ease) both; }
.cols b { font-size: .65rem; font-weight: 600; }
.cols span { font-family: var(--f-mono); font-size: .55rem; color: var(--muted); text-transform: uppercase; }
@keyframes growY { from { transform: scaleY(0); } }
.donut { display: flex; align-items: center; gap: 1.2rem; }
.donut svg { width: 120px; height: 120px; flex: none; }
.legend { display: grid; gap: .4rem; font-size: .88rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .45rem; vertical-align: -1px; }
table.stat { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.stat th { text-align: left; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: .5rem .3rem; border-bottom: 1px solid var(--line); }
table.stat td { padding: .55rem .3rem; border-bottom: 1px solid var(--line); }
table.stat td.n, table.stat th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.stat tfoot td { font-weight: 700; border-bottom: 0; }

/* Registration */
.reg-hero { background: radial-gradient(circle at 50% 20%, var(--ink-3), var(--ink) 70%); color: #fff; text-align: center; padding: 1.4rem 1.2rem 1.6rem; }
.reg-hero .medal { width: 110px; height: 110px; margin-bottom: .7rem; }
.reg-hero h2 { font-size: 1.6rem; }
.reg-hero p { color: var(--muted-dark); font-size: .92rem; margin-top: .5rem; }
.reg-lang { display: flex; justify-content: center; gap: .35rem; margin-top: 1rem; flex-wrap: wrap; }
.reg-lang button { background: transparent; border: 1px solid var(--line-dark); color: var(--muted-dark); border-radius: 99px; padding: .3rem .7rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; }
.reg-lang button.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.pending { text-align: center; padding: 2.5rem 1.4rem; }
.pending .clock { width: 86px; height: 86px; margin: 0 auto 1.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--stone); }
.pending .clock svg { width: 42px; height: 42px; stroke: var(--enamel); fill: none; stroke-width: 1.6; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .6; } }
.pending h2 { font-size: 1.6rem; margin-bottom: .6rem; }

.cookie { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + var(--safe-b)); width: calc(100% - 1.4rem); max-width: 460px; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem; box-shadow: 0 16px 40px rgba(10, 23, 48, .25); animation: toast .4s var(--ease) both; }
.cookie p { font-size: .9rem; margin-bottom: .8rem; }
.cookie a { font-size: .85rem; color: var(--enamel); }

.article img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.article h2 { font-size: 1.7rem; margin: .4rem 0 .8rem; }
.article p { font-size: 1.05rem; line-height: 1.7; }
.leader { display: grid; grid-template-columns: 74px 1fr; gap: .9rem; align-items: center; }
.leader img { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold); }
.leader b { font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; display: block; }
.org { display: grid; gap: .5rem; justify-items: center; text-align: center; }
.org div { background: var(--ink); color: #fff; border-radius: 12px; padding: .8rem 1rem; width: 100%; font-family: var(--f-display); }
.org div:last-child { background: var(--stone); color: var(--text); font-family: var(--f-body); font-size: .9rem; }
.org i { width: 1px; height: 18px; background: var(--gold); }
.seg { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .5rem .9rem; font-size: .88rem; }
.seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.verify-res { border-radius: 14px; padding: 1rem; display: flex; gap: .8rem; align-items: center; font-weight: 600; animation: viewIn .4s var(--ease) both; }
.verify-res.ok { background: rgba(47, 138, 91, .1); color: var(--ok); }
.verify-res.no { background: rgba(181, 68, 58, .08); color: var(--bad); }
.verify-res svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.install-steps { counter-reset: s; display: grid; gap: .7rem; }
.install-steps p { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.toolbar .btn.sm { flex: none; white-space: nowrap; }


/* =====================================================================
   v2 — smireniji, ozbiljniji premium izgled
   ===================================================================== */
:root {
  --paper: #f6f7fa; --stone: #eceff5; --card: #ffffff;
  --line: rgba(15, 27, 51, .09); --line-2: rgba(15, 27, 51, .16);
  --shadow-1: 0 1px 2px rgba(10, 23, 48, .04), 0 4px 16px -8px rgba(10, 23, 48, .12);
  --shadow-2: 0 2px 6px rgba(10, 23, 48, .05), 0 18px 40px -18px rgba(10, 23, 48, .28);
  --gold: #b8924a; --gold-soft: #e4cf9d; --gold-ink: #6d5222;
  --r: 16px;
}
body { font-size: 15.5px; letter-spacing: -.003em; }
h1, h2, h3 { letter-spacing: 0; }
#app { background: var(--paper); }

/* tanka demo traka */
.demo-bar { background: #0b1830; color: rgba(228, 207, 157, .85); font-size: .6rem; letter-spacing: .16em; padding: calc(.3rem + var(--safe-t)) 1rem .3rem; border-bottom: 1px solid rgba(228, 207, 157, .14); }
.demo-bar button { border-color: rgba(228, 207, 157, .3); color: inherit; font-size: .58rem; }
.topbar { top: calc(1.55rem + var(--safe-t)); background: rgba(10, 23, 48, .94); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); min-height: 58px; padding: .65rem 1.1rem; }
.topbar h1 { font-size: 1.12rem; letter-spacing: .01em; }
.icon-btn { border-color: rgba(228, 207, 157, .2); background: rgba(255, 255, 255, .03); }
.search { top: calc(1.55rem + 58px + var(--safe-t)); }

/* donja traka */
.tabs { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid var(--line); }
.tabs a { color: #8a94a8; font-size: .64rem; font-weight: 500; padding: .5rem 0 .55rem; }
.tabs a svg { width: 22px; height: 22px; stroke-width: 1.7; }
.tabs a.on { color: var(--ink); }
.tabs a.on::before { left: 50%; right: auto; width: 38px; margin-left: -19px; height: 3px; top: 0; background: var(--gold); border-radius: 0 0 3px 3px; }
.tabs a.on svg { stroke-width: 2; }

/* kartice */
.card, .menu, .member-row, .admin-row, .app-card, .chart, .kpi, .tile, .install-steps p { border: 1px solid var(--line); box-shadow: var(--shadow-1); border-radius: var(--r); }
.section-title { margin: 1.7rem 0 .8rem; }
.section-title h3 { font-size: 1.18rem; }
.section-title a { font-family: var(--f-body); font-size: .78rem; font-weight: 600; letter-spacing: .01em; text-transform: none; color: var(--enamel); }
.eyebrow { font-size: .62rem; letter-spacing: .18em; color: var(--gold-ink); }
.muted { color: #5d6880; }

/* hero */
.hero { padding: 1.8rem 1.2rem 1.6rem; background: radial-gradient(120% 90% at 50% 0%, #1c3768 0%, #0e1f40 45%, #0a1730 100%); }
.hero::after { background: repeating-radial-gradient(circle at 50% 34%, transparent 0 44px, rgba(228, 207, 157, .045) 44px 45px); }
.hero h2 { font-size: 1.75rem; }
.hero-stats { margin-top: 1.5rem; background: rgba(255, 255, 255, .04); border: 1px solid rgba(228, 207, 157, .14); border-radius: 14px; padding: .9rem 0; }
.hero-stats > div + div { border-left: 1px solid rgba(228, 207, 157, .14); }
.hero-stats b { font-size: 1.6rem; }

/* novosti */
.news-card { position: relative; border: 0; }
.news-card img { aspect-ratio: 4/3; }
.news-card .body { position: absolute; inset: auto 0 0 0; padding: 2.6rem 1.1rem 1rem; background: linear-gradient(to top, rgba(8, 18, 38, .92), rgba(8, 18, 38, .55) 60%, transparent); color: #fff; }
.news-card .body .eyebrow { color: var(--gold-soft); }
.news-card h4 { font-size: 1.28rem; color: #fff; }
.news-card .muted { color: rgba(255, 255, 255, .78); }
.news-row { grid-template-columns: 1fr 96px; padding: .75rem .75rem .75rem 1rem; gap: 1rem; }
.news-row img { order: 2; width: 96px; height: 76px; border-radius: 12px; }
.news-row h4 { font-size: 1.02rem; margin-top: .25rem; }
.article img { aspect-ratio: 4/3; }
.article .pad { padding: 1.4rem 1.2rem 2rem; }
.article h2 { font-size: 1.8rem; line-height: 1.2; }
.article p { font-size: 1.04rem; line-height: 1.75; color: #24304a; }
.article p + p { margin-top: 1rem; }

/* događaji */
.event-row { grid-template-columns: 56px 1fr; padding: .85rem; }
.event-row.has-img { grid-template-columns: 56px 1fr 72px; }
.ev-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.datebox { background: linear-gradient(180deg, #14295a, #0a1730); border-radius: 12px; }
.going-mini { display: flex; align-items: center; gap: .3rem; font-size: .74rem; color: var(--ok); margin-top: .25rem; font-weight: 600; }
.going-mini svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.ev-cover { position: relative; }
.ev-cover img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.ev-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 23, 48, .45), transparent 50%); }
.ev-date { position: absolute; left: 1.1rem; bottom: -1.6rem; z-index: 1; background: #fff; border-radius: 14px; box-shadow: var(--shadow-2); width: 64px; text-align: center; padding: .45rem 0; }
.ev-date b { display: block; font-family: var(--f-display); font-size: 1.7rem; line-height: 1; color: var(--ink); }
.ev-date span { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.event-page .ev-cover + .pad { padding-top: 2.4rem; }
.ev-title { font-size: 1.7rem; line-height: 1.2; margin-top: .3rem; }
.ev-facts { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.ev-facts > * { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; text-decoration: none; }
.ev-facts > * + * { border-top: 1px solid var(--line); }
.ev-facts svg { width: 21px; height: 21px; fill: none; stroke: var(--enamel); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ev-facts b { display: block; font-weight: 600; text-transform: capitalize; }
.ev-facts small { color: var(--muted); font-size: .8rem; }
.ev-facts .chev { margin-left: auto; display: grid; }
.ev-facts .chev svg { stroke: #9aa3b5; width: 18px; }
.ev-text { font-size: 1.03rem; line-height: 1.75; color: #24304a; }
.ev-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ev-gallery button { padding: 0; border: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--stone); position: relative; }
.ev-gallery img { width: 100%; height: 100%; object-fit: cover; }
.ev-gallery .up { display: grid; place-items: center; align-content: center; gap: .2rem; color: var(--enamel); border: 1.5px dashed rgba(29, 67, 150, .35); background: #fff; font-size: .72rem; font-weight: 600; }
.ev-gallery .up svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.ev-gallery .x { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; background: rgba(10, 23, 48, .75); color: #fff; display: grid; place-items: center; font-size: 1rem; }
.cal button { border: 1px solid var(--line); }
.cal button.has { background: var(--ink); border-color: var(--ink); }

/* članovi */
.search { display: flex; gap: .5rem; align-items: center; }
.search input { flex: 1; box-shadow: var(--shadow-1); }
.verify-chip { flex: none; display: flex; align-items: center; gap: .35rem; border: 1px solid var(--line-2); background: #fff; border-radius: 99px; padding: .7rem .9rem; font-size: .8rem; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-1); }
.verify-chip svg { width: 17px; height: 17px; fill: none; stroke: var(--ok); stroke-width: 2; }
.member-row { grid-template-columns: 48px 1fr auto; padding: .75rem .9rem; }
.avatar { width: 48px; height: 48px; background: linear-gradient(160deg, #dfe5ef, #c9d2e1); color: #7b879d; position: relative; flex: none; }
.avatar .sil { width: 72%; height: 72%; fill: #f4f6fa; margin-top: 22%; }
.avatar.lg { width: 60px; height: 60px; }
.avatar.xl { width: 104px; height: 104px; }
.avatar.xxl { width: 128px; height: 128px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(184, 146, 74, .5), var(--shadow-2); }
.mr-side { display: grid; justify-items: end; gap: .3rem; }
.vstate { display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 600; letter-spacing: .02em; padding: .15rem .5rem .15rem .35rem; border-radius: 99px; }
.vstate svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.vstate.ok { background: rgba(47, 138, 91, .1); color: var(--ok); }
.vstate.off { background: rgba(93, 104, 128, .1); color: #6a7488; }
.profile { text-align: center; display: grid; justify-items: center; gap: .3rem; padding-top: .4rem; }
.profile h3 { font-size: 1.55rem; margin-top: .9rem; }
.vbig { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; border-radius: 14px; padding: .85rem 1rem; margin: .9rem 0 .2rem; }
.vbig svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.9; flex: none; }
.vbig b { display: block; }
.vbig span { font-family: var(--f-mono); font-size: .78rem; opacity: .85; }
.vbig.ok { background: rgba(47, 138, 91, .09); color: #1f6e46; }
.vbig.off { background: var(--stone); color: #5d6880; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; width: 100%; margin: .6rem 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-align: left; overflow: hidden; }
.facts div { padding: .7rem .9rem; }
.facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
.facts dt { font-family: var(--f-mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: .2rem 0 0; font-weight: 600; text-transform: capitalize; }
.lock-ico { width: 64px; height: 64px; border-radius: 50%; margin: .4rem auto .8rem; display: grid; place-items: center; background: linear-gradient(160deg, #14295a, #0a1730); box-shadow: 0 0 0 5px rgba(184, 146, 74, .18); }
.lock-ico svg { width: 28px; height: 28px; fill: none; stroke: var(--gold-soft); stroke-width: 1.7; }
.vsheet { text-align: center; }
.vsheet form, .vsheet #vres2 { text-align: left; }
.verify-card { display: flex; gap: .9rem; align-items: center; border-radius: 14px; padding: .9rem; animation: viewIn .4s var(--ease) both; }
.verify-card b { display: block; font-size: 1.05rem; }
.verify-card span { font-size: .85rem; color: var(--muted); }
.verify-card em { display: flex; align-items: center; gap: .35rem; font-style: normal; font-weight: 600; font-size: .85rem; margin-top: .3rem; }
.verify-card em svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.verify-card.ok { background: rgba(47, 138, 91, .08); }
.verify-card.ok em { color: var(--ok); }
.verify-card.no { background: rgba(181, 68, 58, .07); }
.verify-card.no em { color: var(--bad); }

/* prijava */
.reg-hero { padding: 1.6rem 1.2rem 1.7rem; background: radial-gradient(120% 90% at 50% 0%, #1c3768 0%, #0e1f40 50%, #0a1730 100%); }
.reg-hero .eyebrow { color: var(--gold-soft); display: block; margin-bottom: .4rem; }
.reg-form { padding-top: 1.4rem; }
.photo-pick { display: flex; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 1rem; }
.photo-ring { width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--stone); border: 1.5px dashed rgba(29, 67, 150, .4); overflow: hidden; }
.photo-ring svg { width: 30px; height: 30px; fill: none; stroke: var(--enamel); stroke-width: 1.7; }
.photo-ring.has { border: 2px solid var(--gold); }
.photo-ring img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick b { font-weight: 600; }
.link-btn { display: inline-block; margin-top: .4rem; color: var(--enamel); font-weight: 600; font-size: .88rem; cursor: pointer; }
.city-field { position: relative; }
.city-list { position: absolute; left: 0; right: 0; top: 78px; z-index: 20; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-2); overflow: hidden; }
.city-list button { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; background: none; border: 0; padding: .75rem .9rem; font-size: .98rem; }
.city-list button + button { border-top: 1px solid var(--line); }
.city-list button:active, .city-list button:hover { background: var(--stone); }
.city-list svg { width: 17px; height: 17px; fill: none; stroke: var(--gold); stroke-width: 1.8; flex: none; }
.field input:disabled { background: var(--stone); color: #8a94a8; }
.field input, .field select, .field textarea { border-color: var(--line-2); border-radius: 12px; }
.reg-links { display: flex; justify-content: center; gap: 1.4rem; padding-top: .4rem; }
.reg-links a { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); text-decoration: none; }
.reg-links svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* čekanje */
.pend-photo { position: relative; width: 104px; margin: 0 auto 1.2rem; }
.pend-badge { position: absolute; right: -4px; bottom: -2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); border: 3px solid var(--paper); }
.pend-badge.no { background: var(--bad); }
.pend-badge svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; }
.steps { list-style: none; padding: 0; margin: 2rem 0 0; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.steps li { display: flex; gap: .9rem; padding: .95rem 1rem; align-items: flex-start; }
.steps li + li { border-top: 1px solid var(--line); }
.steps li > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--f-mono); font-size: .8rem; background: var(--stone); color: var(--muted); }
.steps li.done > span { background: var(--ok); color: #fff; }
.steps li.done svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.steps li.now > span { background: var(--ink); color: var(--gold-soft); box-shadow: 0 0 0 4px rgba(184, 146, 74, .2); }
.steps b { font-weight: 600; }
.pend-foot { margin-top: 2rem; }
.pend-foot a { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--muted); text-decoration: none; }
.pend-foot svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* više */
.me-card { display: flex; gap: 1rem; align-items: center; padding: 1.1rem; border-radius: var(--r); color: #fff; background: radial-gradient(120% 140% at 100% 0%, #1c3768, #0a1730 70%); box-shadow: var(--shadow-2); position: relative; overflow: hidden; }
.me-card::after { content: ""; position: absolute; right: -36px; top: -36px; width: 140px; height: 140px; background: url(img/seal.webp) center/contain no-repeat; opacity: .12; }
.me-card .avatar { box-shadow: 0 0 0 2px var(--gold); }
.me-card b { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; display: block; }
.me-card p { font-size: .85rem; color: rgba(255, 255, 255, .7); }
.me-card .badge-no { color: var(--gold-soft); }
.group-label { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 1.5rem 0 -.4rem .3rem; }
.menu a, .menu button { padding: .8rem 1rem; }
.menu .mi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--stone); flex: none; }
.menu .mi svg { width: 19px; height: 19px; }
.menu .ml { display: grid; }
.menu .ml b { font-weight: 500; }
.menu .ml small { font-size: .76rem; color: var(--muted); }
.menu .chev { display: grid; }
.menu .chev svg { width: 17px; height: 17px; stroke: #a1a9ba; }
.menu .on { font-weight: 500; font-size: .88rem; color: var(--muted); }
.app-ver { text-align: center; font-family: var(--f-mono); font-size: .6rem; letter-spacing: .16em; color: #a1a9ba; text-transform: uppercase; padding: 1rem 0 0; }

/* o savezu */
.seg { background: var(--stone); padding: 4px; border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 9px; font-weight: 500; font-size: .84rem; color: #5d6880; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(10, 23, 48, .12); }
.org div { border-radius: 14px; box-shadow: var(--shadow-1); }
.leader { box-shadow: var(--shadow-1); }

/* privatnost */
.priv-hero { text-align: center; padding: .4rem 0 .2rem; }
.priv-hero h2 { font-size: 1.6rem; margin-bottom: .4rem; }
.toc { display: grid; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.toc a { display: flex; gap: .8rem; padding: .75rem 1rem; text-decoration: none; font-weight: 500; }
.toc a + a { border-top: 1px solid var(--line); }
.toc span { font-family: var(--f-mono); font-size: .75rem; color: var(--gold-ink); padding-top: .1rem; }
.priv-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 1.1rem; scroll-margin-top: 110px; }
.ps-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.ps-head .mi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--stone); flex: none; }
.ps-head svg { width: 19px; height: 19px; fill: none; stroke: var(--enamel); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ps-head h3 { font-size: 1.12rem; }
.priv-sec p { line-height: 1.7; color: #2b3650; }

/* admin */
.admin-login { padding-top: 1.6rem; }
.app-head { display: flex; gap: .8rem; align-items: center; margin-bottom: .2rem; }
.admin-hero { background: radial-gradient(120% 140% at 100% 0%, #1c3768, #0a1730 70%); }
.btn { border-radius: 14px; font-weight: 600; letter-spacing: .005em; }
.btn.gold { background: var(--gold); color: #fff; box-shadow: 0 6px 18px -8px rgba(184, 146, 74, .8); }
.btn.gold svg { stroke: #fff; }
.btn:disabled { opacity: .5; }
.fab { background: var(--gold); color: #fff; }

/* loading ekran */
#loader { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: .3rem; background: radial-gradient(110% 80% at 50% 40%, #1a3466 0%, #0b1a36 55%, #050d1d 100%); color: #fff; transition: opacity .6s ease, visibility .6s; }
#loader.done { opacity: 0; visibility: hidden; }
.ld-seal { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin-bottom: 1.2rem; }
.ld-seal img { width: 100px; height: 100px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); animation: ldIn .9s cubic-bezier(.2, .7, .1, 1) both; }
.ld-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ld-ring circle { fill: none; stroke-width: 1.2; }
.ld-ring .t { stroke: rgba(228, 207, 157, .15); }
.ld-ring .p { stroke: #e4cf9d; stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; animation: ldRing 1.2s cubic-bezier(.65, 0, .35, 1) .1s forwards; }
.ld-shine { position: absolute; inset: 16px; border-radius: 50%; overflow: hidden; pointer-events: none; }
.ld-shine::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 240, 200, .55), transparent); transform: skewX(-15deg); animation: ldShine 1.3s ease .35s forwards; }
.ld-name { font-family: var(--f-display); font-size: 1rem; letter-spacing: .02em; color: rgba(255, 255, 255, .9); animation: ldUp .8s ease .25s both; }
.ld-abbr { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .4em; color: #e4cf9d; animation: ldUp .8s ease .4s both; }
@keyframes ldRing { to { stroke-dashoffset: 0; } }
@keyframes ldShine { to { left: 120%; } }
@keyframes ldIn { from { opacity: 0; transform: scale(.9); } }
@keyframes ldUp { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .ld-ring .p { animation: none; stroke-dashoffset: 0; } .ld-shine { display: none; } }

.stat-item { display: flex; gap: .9rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 1rem; }
.stat-item > span { font-family: var(--f-mono); font-size: .75rem; color: var(--gold-ink); padding-top: .2rem; }
.stat-item h3 { font-size: 1.08rem; margin-bottom: .25rem; }
.reg-hero .eyebrow { letter-spacing: .12em; font-size: .56rem; }
.about-intro { font-family: var(--f-display); font-size: 1.15rem; line-height: 1.5; }

/* ispravke */
button.icon-btn { padding: 0; font: inherit; line-height: 0; cursor: pointer; }
.icon-btn svg { display: block; margin: auto; }
.lightbox { touch-action: manipulation; }
.lb-x { position: fixed; top: calc(14px + var(--safe-t)); right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); display: grid; place-items: center; padding: 0; }
.lb-x svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; }
/* v3: instalacija s weba */
.install .ins-hero{text-align:center;padding:.6rem 0 .2rem}
.install .ins-hero img{width:92px;height:92px;border-radius:22px;margin:0 auto .8rem;display:block;box-shadow:0 14px 34px rgba(10,23,48,.28)}
.install .ins-hero h2{font-family:Marcellus,Georgia,serif;font-weight:400;font-size:1.5rem;margin:0 0 .3rem}
.ins-seg{justify-content:center}
.ins-seg button{min-width:118px}
.ins-big{width:100%;justify-content:center;min-height:54px;font-size:1rem}
.ins-steps{list-style:none;margin:0;padding:0;display:grid;gap:.7rem}
.ins-steps li{display:flex;gap:.85rem;align-items:flex-start;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-1);border-radius:var(--r);padding:.95rem 1rem}
.ins-steps p{margin:0;line-height:1.5}
.ins-n{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--ink);color:#e7d29c;font-weight:700;font-size:.85rem}
.ins-ico{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:7px;background:#eef2fb;color:#1d6ff2;vertical-align:middle;margin:0 .15rem}
.ins-ico svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ins-arrow{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:.2rem;z-index:30;pointer-events:none;color:var(--ink);animation:insb 1.4s ease-in-out infinite}
.ins-arrow span{background:var(--ink);color:#fff;font-size:.8rem;padding:.35rem .7rem;border-radius:99px;white-space:nowrap}
.ins-arrow svg{width:30px;height:30px}
@keyframes insb{50%{transform:translate(-50%,8px)}}
/* v1.0: prava verzija (prijava, server) */
.join-box{display:flex;flex-direction:column;align-items:center;gap:.6rem;margin-top:.6rem;padding:1.1rem;border:1px dashed var(--line);border-radius:var(--r);background:#fff}
.join-box span{color:var(--muted);font-size:.92rem}
.join-box .btn{width:100%;justify-content:center}
.link-center{display:block;text-align:center;font-size:.92rem;color:var(--enamel);margin-top:.2rem}
.empty-note{display:flex;gap:.8rem;align-items:center;margin-top:1.2rem;padding:1.1rem;background:#fff;border:1px solid var(--line);border-radius:var(--r);color:var(--muted);font-size:.94rem}
.empty-note svg{width:24px;height:24px;flex:none;fill:none;stroke:var(--gold);stroke-width:1.8}
.login-box{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;justify-content:space-between;padding:.8rem 1rem;border:1px solid var(--line);border-radius:12px;background:#fafbfd}
.login-box p{display:flex;gap:.4rem;align-items:center;margin:0}
.login-box svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.temp-pass{font-family:var(--f-mono,"IBM Plex Mono",monospace);font-size:1.5rem;letter-spacing:.08em;text-align:center;background:#f4f1e6;border:1px solid #e3d6a8;border-radius:12px;padding:.8rem;margin:1rem 0 .6rem;user-select:all;word-break:break-all}
.nologin{color:#a0600b}
.mi-round{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#eef2fb;color:var(--enamel)}
.mi-round svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9}
.btn.busy{opacity:.6;pointer-events:none}
.pend-foot{display:flex;gap:1.4rem;justify-content:center;align-items:center}
.pend-foot .link-btn{display:inline-flex;gap:.35rem;align-items:center;background:none;border:0;color:var(--muted);font:inherit;font-size:.82rem;cursor:pointer;padding:0}
.menu button{width:100%;text-align:left;font:inherit;background:none;border:0;cursor:pointer}
/* v1.0.1: bez demo trake — zaglavlje na vrhu, pretraga odmah ispod (popravka preklapanja) */
.topbar { top: 0; padding-top: calc(.65rem + var(--safe-t)); min-height: calc(58px + var(--safe-t)); }
.search { top: calc(58px + var(--safe-t)); }
.am-row { grid-template-columns: 42px 1fr; }
.am-row .acts { grid-column: 1 / -1; justify-content: flex-end; gap: .5rem; border-top: 1px solid var(--line); padding-top: .55rem; margin-top: .1rem; }
.am-row .acts .act-label { margin-right: auto; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
@media (max-width: 380px) { .verify-chip span { display: none; } .verify-chip { padding: .7rem; } }
.about-intro { font-family: var(--f-display); font-size: 1.2rem; line-height: 1.45; }
.about p { line-height: 1.6; }
.val-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.val { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: .9rem; box-shadow: var(--shadow-1); }
.val b { display: block; margin-bottom: .25rem; color: var(--ink); }
.val b::before { content: ""; display: inline-block; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); margin-right: .5rem; vertical-align: middle; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 .4rem; border-left: 2px solid var(--line); display: grid; gap: 1rem; }
.timeline li { display: grid; grid-template-columns: 3.4rem 1fr; gap: .6rem; position: relative; padding-left: .8rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid var(--paper); }
.timeline span { font-family: var(--f-mono); font-size: .8rem; color: var(--enamel); padding-top: .15rem; }
.org > div small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.org > div b { font-weight: 600; }
.leader { display: grid !important; gap: .7rem; }
.leader-top { display: flex; gap: .9rem; align-items: center; }
.leader-top img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.leader-top b { display: block; }
.partner { display: flex; gap: .8rem; align-items: center; text-decoration: none; color: inherit; }
.partner b { display: block; margin-bottom: .2rem; }
.partner .chev { margin-left: auto; color: var(--enamel); }
@media (max-width: 360px) { .val-grid { grid-template-columns: 1fr; } }
.leader { grid-template-columns: 1fr !important; align-items: start; }
.org > div:nth-child(n+5) { background: var(--stone); color: var(--text); font-family: var(--f-body); }
/* bez bočnog pomjeranja ekrana pri swipe-u */
html { overflow-x: hidden; overscroll-behavior-x: none; }
body { overflow-x: clip; max-width: 100vw; }
#app, main, .view { max-width: 100%; }
img, video { max-width: 100%; }
.seg, .toolbar { overscroll-behavior-x: contain; }
.row2 > * { min-width: 0; }
.field input, .field select, .field textarea { min-width: 0; max-width: 100%; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; min-width: 0; width: 100%; }

/* loader kao početni ekran telefona: bijela pozadina i logo Saveza */
#loader { background: #fff !important; }
.ld-logo { width: 46vw; max-width: 200px; margin-bottom: 1.1rem; animation: ldIn .9s cubic-bezier(.2, .7, .1, 1) both; }
.ld-logo img { width: 100%; height: auto; display: block; }
.ld-abbr2 { font-family: var(--f-display); font-size: 2rem; letter-spacing: .04em; color: #0a1730; margin: 0; animation: ldUp .8s ease .2s both; }
#loader .ld-name { color: #56637c; font-size: .9rem; animation: ldUp .8s ease .3s both; }
.ld-bar { display: block; width: 120px; height: 2px; margin-top: 1.2rem; background: linear-gradient(90deg, #c8a04b, #e7d29c) left / 0 100% no-repeat, rgba(10, 23, 48, .08); animation: ldBar 1.1s cubic-bezier(.65, 0, .35, 1) .2s forwards; }
@keyframes ldBar { to { background-size: 100% 100%, auto; } }

.ins-banner { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: .6rem .6rem .6rem .7rem; box-shadow: 0 14px 40px rgba(10, 23, 48, .22); animation: insUp .45s cubic-bezier(.2, .7, .1, 1) both; max-width: 520px; margin: 0 auto; }
.ins-banner.above-tabs { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
.ins-banner img { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.ins-banner > div { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.ins-banner b { font-size: .92rem; }
.ins-banner span { font-size: .78rem; color: var(--muted); }
.ins-banner .btn { flex: none; width: auto; min-height: 38px; padding: .45rem .9rem; }
.ins-x { flex: none; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; padding: 0; }
.ins-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
@keyframes insUp { from { opacity: 0; transform: translateY(16px); } }

.ins-big { font-size: 1.05rem; min-height: 58px; box-shadow: 0 10px 26px rgba(200, 160, 75, .35); }
.menu-arrow { position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); right: 10px; z-index: 300; display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; max-width: 250px; pointer-events: none; animation: insUp .4s ease both; }
.menu-arrow svg { width: 34px; height: 34px; fill: none; stroke: #c8a04b; stroke-width: 2.4; margin-right: 4px; animation: maB 1s ease-in-out infinite; }
.menu-arrow span { background: #0a1730; color: #fff; font-size: .86rem; line-height: 1.4; padding: .6rem .8rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
@keyframes maB { 50% { transform: translateY(-6px); } }

.ins-done { display: grid; justify-items: center; gap: .8rem; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem 1rem; box-shadow: var(--shadow-1); }
.ins-done > svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: #e3f4ea; stroke: #1f7a4d; fill: none; stroke-width: 2.4; }
.ins-done b { font-size: 1.05rem; }
.ins-done .btn { width: 100%; justify-content: center; }
