/* Moj Trenutak - mobilna aplikacija (PWA, kasnije Android/iOS). Isti obrazac kao ChatSeam mobilna aplikacija:
   ekran = gornja traka + sadrzaj + plutajuca providna traka sa karticama na dnu. Na racunaru isti izgled,
   centriran u koloni telefonske sirine. Boje: :root = svetlo, [data-theme="dark"] = tamno. */

:root {
    --bg: #F0F1F7;
    --list-bg: #FFFFFF;
    --surface: #FFFFFF;
    --glass-fill: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.38));
    --glass-edge: rgba(0, 0, 0, .06);
    --glass-shine: rgba(255, 255, 255, .9);
    --tab-on: rgba(132, 90, 223, .14);
    --tab-on-text: #845ADF;
    --tab-text: #64748B;
    --text: #25252B;
    --muted: #7A7F89;
    --faint: #A5AAB3;
    --line: #E7E9F0;
    --line-soft: #EEF0F5;
    --press: #F4F2FB;
    --input: #F0F1F7;
    --primary: #845ADF;
    --primary-soft: rgba(132, 90, 223, .12);
    --success: #26BF94;
    --warning: #E9A21F;
    --danger: #E6533C;
    --hero-a: #111C43;
    --hero-b: #845ADF;
}

:root[data-theme="dark"] {
    --bg: #17171A;
    --list-bg: #17171A;
    --surface: #232327;
    --glass-fill: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
    --glass-edge: rgba(255, 255, 255, .18);
    --glass-shine: rgba(255, 255, 255, .30);
    --tab-on: rgba(255, 255, 255, .16);
    --tab-on-text: #FFFFFF;
    --tab-text: #D9D9E0;
    --text: #EDEDF2;
    --muted: #9A9AA3;
    --faint: #66666E;
    --line: #34343A;
    --line-soft: #2C2C31;
    --press: #202024;
    --input: #2A2A2F;
    --primary: #9B7BEA;
    --primary-soft: rgba(155, 123, 234, .18);
    --hero-a: #1A1C2E;
    --hero-b: #5E3FB0;
}

html, body { height: 100%; margin: 0; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
body { font-family: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
#app { min-height: 100%; }
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }

/* Ucitavanje: logo tacno na sredini ekrana, sa krugom koji se vrti i blagim pulsiranjem (kao na racunaru). */
.boot { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; background: var(--list-bg); }
.boot-box { position: relative; width: 112px; height: 112px; display: flex; align-items: center; justify-content: center; }
.boot-box img { width: 64px; height: 64px; object-fit: contain; animation: pulse 1.4s ease-in-out infinite; }
.boot-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(132, 90, 223, .18); border-top-color: var(--primary, #845ADF); animation: boot-spin .8s linear infinite; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.94); opacity: .75; } }

#blazor-error-ui { background: #fff3cd; color: #25252B; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 2000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

.offline { position: sticky; top: 0; z-index: 600; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px calc(6px); padding-top: calc(6px + env(safe-area-inset-top)); background: #3B2F0B; color: #FCD34D; font-size: 12.5px; font-weight: 600; }

/* ---- Okvir ekrana (na racunaru: kolona telefonske sirine) ---- */
.screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--list-bg); padding-top: env(safe-area-inset-top); max-width: 720px; margin: 0 auto; }
@media (min-width: 760px) { .screen { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.topbar { position: sticky; top: 0; z-index: 400; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--list-bg); border-bottom: 1px solid var(--line); min-height: 58px; }
.topbar .titles { flex: 1; min-width: 0; }
.topbar .title { font-family: Manrope, Inter, sans-serif; font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { border: 0; background: transparent; padding: 7px; border-radius: 50%; color: inherit; display: inline-flex; cursor: pointer; position: relative; }
.iconbtn:active { background: var(--press); }
.content { flex: 1; padding-bottom: 116px; }

/* ---- Izbor proslave (cip) ---- */
.celchip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 10px 6px 8px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.celchip:disabled { cursor: default; }
.celchip .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cel, var(--primary)); flex: none; }
.celchip .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picklist { display: flex; flex-direction: column; gap: 4px; }
.pickrow { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; padding: 10px 8px; border-radius: 12px; cursor: pointer; }
.pickrow.on { background: var(--primary-soft); }
.pickrow .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pickrow .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickrow .sub { font-size: 12.5px; color: var(--muted); }

/* ---- Avatar ---- */
.avatar { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px; overflow: hidden; background: var(--primary); }
.avatar.soft { background: var(--primary-soft); color: var(--primary); }
.avatar.big { width: 72px; height: 72px; font-size: 26px; }

/* ---- Liste ---- */
.list { background: var(--list-bg); }
.row { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; }
.row::after { content: ""; position: absolute; left: 68px; right: 0; bottom: 0; height: 1px; background: var(--line-soft); }
.row:active { background: var(--press); }
.row .main { flex: 1; min-width: 0; }
.row .line1 { display: flex; align-items: baseline; gap: 8px; }
.row .name { flex: 1; font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.row .preview { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .preview.wrap { white-space: normal; }
.row.unread .name { font-weight: 800; }
.row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); flex: none; }
.row.done .name { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.group-title { padding: 14px 14px 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 64px 24px; text-align: center; color: var(--muted); }

/* ---- Oznake ---- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: rgba(38, 191, 148, .14); color: var(--success); }
.pill.no { background: rgba(230, 83, 60, .13); color: var(--danger); }
.pill.wait { background: rgba(233, 162, 31, .15); color: var(--warning); }
.pill.muted { background: var(--input); color: var(--muted); }

/* ---- Pretraga i filteri ---- */
.toolbar { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 10px; background: var(--list-bg); }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--input); border-radius: 22px; padding: 0 12px; height: 40px; color: var(--muted); }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); font-family: inherit; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chips button.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- Pocetna ---- */
.hero { margin: 12px; padding: 18px 18px 16px; border-radius: 20px; color: #fff; background: linear-gradient(140deg, var(--hero-a) 0%, var(--hero-a) 35%, var(--hero-b) 130%); box-shadow: 0 10px 30px rgba(17, 28, 67, .25); }
.hero .date { font-size: 12.5px; opacity: .8; display: flex; align-items: center; gap: 6px; }
.hero .h { font-family: Manrope, Inter, sans-serif; font-size: 24px; font-weight: 800; margin-top: 4px; line-height: 1.2; }
.hero .s { font-size: 13.5px; opacity: .85; margin-top: 2px; }
.countdown { display: flex; gap: 8px; margin-top: 14px; }
.countdown div { flex: 1; background: rgba(255,255,255,.13); border-radius: 12px; padding: 8px 4px; text-align: center; }
.countdown b { display: block; font-size: 22px; line-height: 1.1; }
.countdown span { font-size: 11px; opacity: .8; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; }
.tile:active { background: var(--press); }
.tile .ic { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.tile .v { font-size: 22px; font-weight: 800; margin-top: 8px; line-height: 1.1; }
.tile .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.bar { height: 6px; border-radius: 3px; background: var(--input); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--success); border-radius: 3px; }
.quick { display: flex; gap: 10px; padding: 12px; overflow-x: auto; scrollbar-width: none; }
.quick button { flex: 1 0 auto; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 14px; background: var(--primary-soft); color: var(--primary); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }

/* ---- Plutajuce dugme (+) ---- */
.fab { position: fixed; right: max(18px, calc(50% - 360px + 18px)); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 450; width: 56px; height: 56px; border: 0; border-radius: 18px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(132, 90, 223, .45); cursor: pointer; }
.fab:active { transform: scale(.96); }
.fab.wide { width: auto; padding: 0 20px 0 16px; gap: 8px; font: inherit; font-size: 15px; font-weight: 700; }

/* ---- Prijava ---- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(32px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom)); background: var(--list-bg); max-width: 460px; margin: 0 auto; }
.login .brand { text-align: center; margin-bottom: 28px; }
.login .brand img { width: 84px; height: 84px; }
.login .brandname { font-family: Manrope, Inter, sans-serif; font-size: 22px; font-weight: 800; margin-top: 6px; }
.login h1 { font-family: "Source Serif 4", Georgia, serif; font-size: 30px; margin: 0 0 4px; text-align: center; font-weight: 600; }
.login .hint, .hint { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.login .hint { text-align: center; }
.login .mud-input-control { flex: none; margin: 0; }
.login .mud-button-root { flex: none; }
.login .forgot { text-align: right; margin: 12px 0 22px; font-size: 14px; font-weight: 600; }
.login .linkrow { text-align: center; margin-top: 16px; font-size: 14px; font-weight: 600; }
.bigbtn { height: 52px; border-radius: 14px !important; font-weight: 700 !important; letter-spacing: .03em; }
.sent { text-align: center; margin-bottom: 18px; }
.sent-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }

/* ---- Podesavanja / Vise ---- */
.profile { background: var(--bg); }
.profile .hero { text-align: center; }
.hero-name { font-size: 19px; font-weight: 800; margin-top: 10px; }
.hero-sub { font-size: 13px; opacity: .8; }
.profile .card { background: var(--surface); margin: 0 12px; padding: 2px 14px; border-radius: 16px; border: 1px solid var(--line); }
.profile .item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; color: inherit; }
.profile .item:last-child { border-bottom: 0; }
.profile .item.static { cursor: default; }
.profile .item .label { flex: 1; min-width: 0; font-weight: 600; }
.profile .item .label small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 1px; }
.profile .item .chev { color: var(--faint); }
.profile .item.danger { color: var(--danger); }
.profile .section-title { padding: 18px 26px 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.soon { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--input); padding: 2px 8px; border-radius: 999px; }
.segmented { display: flex; gap: 6px; background: var(--input); border-radius: 12px; padding: 4px; margin: 10px 0; }
.segmented button { flex: 1; border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 9px 4px; font: inherit; font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
:root[data-theme="dark"] .segmented button.on { background: var(--primary); color: #fff; }
.segmented button:disabled { cursor: default; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.codes span, .codes.single { background: var(--input); border-radius: 8px; padding: 6px 8px; text-align: center; }
.codes.single { display: block; cursor: pointer; letter-spacing: .08em; }

/* ---- Donja traka (providna, plutajuca) ---- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 560px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 500; display: flex; gap: 2px; padding: 6px; border-radius: 30px; background: var(--glass-fill); -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8); border: 1px solid var(--glass-edge); box-shadow: 0 10px 34px rgba(0,0,0,.22), inset 0 1px 0 var(--glass-shine); }
.tabbar .tab { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 7px 2px 6px; border: 0; border-radius: 24px; background: transparent; color: var(--tab-text); font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.tabbar .tab.on { background: var(--tab-on); color: var(--tab-on-text); }
.tabbar .tab .tabbadge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* ---- Kockice za kod ---- */
.otp { display: flex; gap: 8px; justify-content: center; }
.otp-box { width: 44px; height: 52px; text-align: center; font-size: 22px; font-weight: 700; border: 1.5px solid var(--faint); border-radius: 10px; background: var(--surface); color: inherit; font-family: inherit; -webkit-appearance: none; appearance: none; }
.otp-box:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.otp-box:disabled { opacity: .6; }

/* ---- Dijalozi ---- */
.mud-overlay-scrim { background-color: rgba(15, 18, 40, .45) !important; backdrop-filter: blur(6px) !important; -webkit-backdrop-filter: blur(6px) !important; }
.mud-dialog-position-bottomcenter .mud-dialog { border-radius: 22px 22px 0 0 !important; margin-bottom: 0 !important; padding-bottom: env(safe-area-inset-bottom); }
.formgrid { display: flex; flex-direction: column; gap: 6px; }
.formrow { display: flex; gap: 12px; }
.formrow > * { flex: 1; min-width: 0; }
.fieldlabel { font-size: 12px; color: var(--muted); font-weight: 700; margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .05em; }

/* ---- Raspored (lista stolova) ---- */
.note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 12px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.4; color: var(--muted); background: var(--input); }
.note .mud-icon-root { color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.warnbox { margin: 0 12px 10px; padding: 10px 12px; border-radius: 12px; background: rgba(233, 162, 31, .14); color: var(--warning); font-size: 13px; cursor: pointer; }
.warnbox ul { margin: 8px 0 0; padding-left: 18px; color: var(--text); }
.warnbox li { margin-bottom: 4px; }
.tablecard { margin: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 14px; overflow: hidden; }
.tablecard.full { border-left-color: var(--success); }
.tablecard.over { border-left-color: var(--danger); }
.tablehead { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.tablehead:active { background: var(--press); }
.tablehead .main { flex: 1; min-width: 0; }
.tablehead .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tablehead .preview { font-size: 12.5px; color: var(--muted); }
.tablenum { flex: none; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.tableguests { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.gchip { border: 1px solid var(--line); background: var(--input); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* ---- Deljenje linka (galerija, pozivnice) ---- */
.sharecard { display: flex; gap: 14px; align-items: center; margin: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.sharecard img { width: 92px; height: 92px; border-radius: 10px; background: #fff; padding: 4px; flex: none; }
.sharecard .main { min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.sharecard .main b { color: var(--text); font-size: 14.5px; }

/* ---- Galerija ---- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 3px; }
@media (min-width: 560px) { .grid3 { grid-template-columns: repeat(4, 1fr); } }
.grid3 .cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--input); overflow: hidden; cursor: pointer; }
.grid3 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid3 .processing { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.badge-video, .badge-fav { position: absolute; display: inline-flex; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.badge-video { left: 4px; bottom: 4px; }
.badge-fav { right: 4px; top: 4px; color: #FF5C8A; }
.viewer-content { padding: 0 !important; }
.viewer { position: fixed; inset: 0; background: #000; color: #fff; display: flex; flex-direction: column; z-index: 1; }
.viewer-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; font-size: 13px; }
.viewer-top .iconbtn { color: #fff; }
.viewer-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-media { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.viewer-media img, .viewer-media video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-media .nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.16); color: #fff; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.viewer-media .prev { left: 8px; } .viewer-media .next { right: 8px; }
.viewer-actions { display: flex; justify-content: space-around; padding: 10px 10px calc(14px + env(safe-area-inset-bottom)); }
.viewer-actions button { border: 0; background: transparent; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 11.5px; cursor: pointer; }
.viewer-actions button:disabled { opacity: .5; }

/* ---- Recenzije i beleske ---- */
.stars { color: #F5B849; font-size: 18px; letter-spacing: 2px; }
.stars.small { font-size: 14px; margin-top: 2px; }
.reviewcard { margin: 10px 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.reviewcard p { margin: 6px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sumgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sumgrid div { background: var(--input); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.sumgrid span { font-size: 11.5px; color: var(--muted); }
.sumgrid b { font-size: 15px; }

/* ---- Cet (Pomoc) ---- */
.chatscreen { height: 100vh; height: 100dvh; min-height: 0; }
.chat { flex: 1; overflow-y: auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.bubble { max-width: 82%; padding: 7px 10px 5px; border-radius: 14px; font-size: 15px; line-height: 1.4; display: flex; flex-direction: column; gap: 4px; }
.bubble.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble img { max-width: 220px; max-height: 260px; border-radius: 10px; cursor: pointer; }
.bubble .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .meta { align-self: flex-end; font-size: 11px; opacity: .7; display: inline-flex; align-items: center; gap: 3px; }
.bubble .tick { font-size: 15px; }
.bubble .tick.seen { color: #7fd8ff; }
.bubble.out .meta:has(.tick.seen) { opacity: 1; }
.bubble.typing { flex-direction: row; gap: 4px; padding: 12px 14px; }
.bubble.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted, #999); animation: mm-typing 1.2s infinite ease-in-out; }
.bubble.typing span:nth-child(2) { animation-delay: .15s; }
.bubble.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mm-typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--list-bg); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; border-radius: 20px; padding: 10px 14px; background: var(--input); color: var(--text); font: inherit; font-size: 15px; max-height: 120px; }
.composer .iconbtn { cursor: pointer; color: var(--primary); }
.sendbtn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.sendbtn:disabled { opacity: .45; }

/* Kratka obavestenja iznad donje trake. */
.mud-snackbar-location-bottom-center { bottom: calc(92px + env(safe-area-inset-bottom)) !important; }

/* Konstelacija (mojtrenutak.js) iza sadrzaja ljubicastih kartica i prijave. */
.hero, .login { position: relative; overflow: hidden; isolation: isolate; }
.mm-stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.login { background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%), var(--list-bg); }

/* Ljubicasta kartica od vrha ekrana, od ivice do ivice (Pocetna, Vise) - umesto zaglavlja. */
.hero.top { margin: 0 0 14px; border-radius: 0 0 28px 28px; padding: calc(26px + env(safe-area-inset-top)) 22px 22px; box-shadow: 0 12px 30px rgba(17, 28, 67, .28); }
.hero-chip { margin-bottom: 12px; }
.hero-chip .celchip { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; }

.screen:has(> .content > .hero.top) { padding-top: 0; }

/* Kartica sa poljima forme na ekranu (npr. Proslava). */
.formcard { margin: 12px; padding: 6px 16px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 4px; }

/* Podesavanja: nazad, naslov i slika profila (dodir menja sliku) u ljubicastoj kartici. */
.hero-back { position: absolute; left: 10px; top: calc(10px + env(safe-area-inset-top)); width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.hero-title { font-family: Manrope, Inter, sans-serif; font-weight: 800; font-size: 17px; margin: -12px 0 14px; }
.avatar-edit { position: relative; display: inline-block; cursor: pointer; }
.avatar-edit img.avatar { object-fit: cover; border: 2px solid rgba(255, 255, 255, .6); }
.avatar-edit .avatar.big { width: 88px; height: 88px; font-size: 30px; }
.avatar-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.hero-link { margin-top: 8px; border: 0; background: none; color: #fff; opacity: .8; font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }

/* Galerija: prvi kadar videa u mrezi; pregled se pomera prstom (kratka animacija pri prelasku). */
.grid3 video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.viewer-media { touch-action: pan-y; }
.viewer-media img.slide-next { animation: mm-slide-next .22s ease-out; }
.viewer-media img.slide-prev { animation: mm-slide-prev .22s ease-out; }
@keyframes mm-slide-next { from { transform: translateX(40px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes mm-slide-prev { from { transform: translateX(-40px); opacity: .3; } to { transform: none; opacity: 1; } }

/* Poruka sa "Vrati" (UndoToast): tekst gore, dugme ispod na sredini, traka koja se smanjuje. */
.undotoast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 1500; width: calc(100% - 32px); max-width: 420px; padding: 12px 14px 0; border-radius: 16px; background: #2E9E78; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px; animation: mm-toast-in .2s ease-out; }
.undotoast .msg { display: flex; align-items: flex-start; gap: 8px; align-self: stretch; font-size: 14.5px; line-height: 1.35; }
.undotoast .msg span { overflow-wrap: anywhere; }
.undotoast .undo { border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; padding: 7px 26px; border-radius: 999px; cursor: pointer; margin-bottom: 12px; }
.undotoast .timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255, 255, 255, .85); transform-origin: left; animation: mm-toast-timer linear forwards; }
@keyframes mm-toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes mm-toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Izabrana proslava u listi agencije. */
.row.selected { background: var(--primary-soft); }

/* Agencija: linija u boji izabrane proslave ispod zaglavlja (na Pregledu ispod ljubicaste kartice). */
.celtint .topbar { border-bottom: 3px solid var(--cel); }
.celtint .hero.top { border-bottom: 4px solid var(--cel); }

/* Bez zumiranja ekrana: ni dupli dodir ni dva prsta (touch-action + mojtrenutak.js), a iPhone ne zumira polje pri kucanju
   kad je tekst u polju najmanje 16px. */
html, body { touch-action: pan-x pan-y; }
input, textarea, select, .mud-input-slot { font-size: 16px !important; }

/* Uputstvo za instalaciju: koraci sa brojevima. */
.steps { margin: 12px; display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.step .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.step .txt { font-size: 14.5px; line-height: 1.45; }
.step .txt b { font-weight: 700; }
.step .txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.step .ic { display: inline-flex; vertical-align: -5px; color: var(--primary); }
.benefits { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.benefits div { display: flex; gap: 10px; align-items: center; font-size: 14px; }

/* Prijava je fiksna (ne skroluje i ne "odskace" gore-dole na telefonu). */
.login { position: fixed; inset: 0; box-sizing: border-box; min-height: 0; height: 100dvh; overflow: hidden; }
html.lock-scroll, html.lock-scroll body { overflow: hidden; overscroll-behavior: none; height: 100%; }

/* Docek gostiju: veliki krug "stigao", red stiglog gosta zelenkast, dugme mape. */
.checkin { flex: none; border: 0; background: transparent; padding: 4px; border-radius: 50%; color: var(--faint); display: inline-flex; cursor: pointer; }
.checkin .mud-icon-root { font-size: 30px; }
.checkin.on { color: var(--success); }
.checkin:disabled { opacity: .55; cursor: default; }
.row.arrived { background: color-mix(in srgb, var(--success) 9%, transparent); }
.row.arrived .name { color: var(--success); }
.mapbtn { color: var(--primary); background: var(--primary-soft); border-radius: 12px; }
.group-title .count { font-size: 12px; letter-spacing: 0; text-transform: none; }

/* Mapa sale (iframe "Gde sedim") preko celog ekrana. */
.mapframe { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--list-bg); }
.mapframe-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; border-bottom: 1px solid var(--line); }
.mapframe-top .titles { min-width: 0; }
.mapframe-top .t { font-weight: 800; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapframe-top .s { font-size: 12.5px; color: var(--primary); font-weight: 600; }
.mapframe iframe { flex: 1; width: 100%; border: 0; background: #F0F1F7; }

/* Administrator: kartice sa podacima (Worker, MinIO) i detalj loga. */
.infocard { margin: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 6px; }
.infocard .head { display: flex; align-items: center; gap: 8px; }
.infocard .head b { flex: 1; font-size: 15px; }
.infocard .kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.infocard .kv span:last-child { color: var(--text); text-align: right; overflow-wrap: anywhere; }
.infocard .err { font-size: 12.5px; color: var(--danger); overflow-wrap: anywhere; }
.logdetail { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--input); border-radius: 10px; padding: 10px; max-height: 50vh; overflow: auto; }

/* Traka rezima naloga (probni period / samo pregled) - iznad sadrzaja, kao traka "Nema interneta". */
.modebar { position: sticky; top: 0; z-index: 590; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px; padding-top: calc(6px + env(safe-area-inset-top)); font-size: 12.5px; font-weight: 600; text-align: center; max-width: 720px; margin: 0 auto; }
.modebar.info { background: var(--primary-soft); color: var(--primary); }
.modebar.danger { background: rgba(230, 83, 60, .14); color: var(--danger); }

/* Docek: skener QR pozivnica */
.qrscan-cam { position: relative; flex: 1; min-height: 0; background: #16141F; overflow: hidden; }
.qrscan-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qrscan-frame { position: absolute; left: 50%; top: 50%; width: min(64vw, 260px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid rgba(255, 255, 255, .85); border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); pointer-events: none; }
.qrscan-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 28px; text-align: center; color: #fff; font-size: 14.5px; background: rgba(22, 20, 31, .85); }
.qrscan-bottom { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.qrscan-result { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; color: #fff; margin-bottom: 8px; }
.qrscan-result.ok { background: var(--success); }
.qrscan-result.used { background: #E9A21F; }
.qrscan-result.bad { background: var(--danger); }
.qrscan-result .mud-icon-root { font-size: 32px; flex: none; }
.qrscan-result .n { font-size: 18px; font-weight: 800; line-height: 1.2; }
.qrscan-result .t { font-size: 14px; font-weight: 700; }
.qrscan-result .m { font-size: 13px; opacity: .95; }

/* Restoran i program */
.venue-time { flex: none; min-width: 52px; font-weight: 800; color: var(--primary); font-size: 15px; }
.venue-text { white-space: pre-line; font-size: 14px; line-height: 1.5; }

/* Ponuda za push obavestenja */
.pushoffer { display: flex; align-items: center; gap: 10px; margin: 10px 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.pushoffer .t { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; color: var(--text); }
.pushoffer .t small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.pushoffer .on { border: 0; border-radius: 10px; padding: 8px 14px; background: var(--primary); color: #fff; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.pushoffer .on:disabled { opacity: .6; }
.pushoffer .x { border: 0; background: transparent; color: var(--muted); display: inline-flex; padding: 4px; cursor: pointer; }

/* Kreiranje naloga (/kreiraj-nalog): zaglavlje sa korakom, sadrzaj, dugme dole. */
.signup { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--list-bg); max-width: 560px; margin: 0 auto; padding-top: env(safe-area-inset-top); }
.signup-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; }
.signup-title { display: flex; flex-direction: column; min-width: 0; padding-left: 4px; }
.signup-title b { font-family: Manrope, Inter, sans-serif; font-size: 19px; font-weight: 800; }
.signup-title span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.signup-progress { height: 4px; margin: 0 16px; border-radius: 99px; background: var(--primary-soft); overflow: hidden; }
.signup-progress i { display: block; height: 100%; border-radius: 99px; background: var(--primary); transition: width .25s ease; }
.signup-body { flex: 1; padding: 16px 16px 12px; }
.signup-body .hint { text-align: left; }
.signup-body .group-title { padding: 6px 0 4px; }
.signup-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.signup-actions { position: sticky; bottom: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--list-bg); border-top: 1px solid var(--line); }
.signup-actions .bigbtn { border-radius: 14px; height: 50px; font-weight: 700; }
.signup-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.signup-total b { font-size: 18px; color: var(--text); }
.pkg { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 10px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.pkg.on { border-color: var(--primary); background: var(--primary-soft); }
.pkg-check { display: inline-flex; color: var(--muted); }
.pkg.on .pkg-check { color: var(--primary); }
.pkg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pkg-main b { font-size: 15.5px; }
.pkg-main span { font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.pkg-price { font-weight: 800; white-space: nowrap; }
.signup-card { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.signup-card .row-kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.signup-card .row-kv span { color: var(--muted); }
.signup-card .row-kv b { text-align: right; }
.signup-card .row-kv.total b { font-size: 18px; color: var(--primary); }
.signup-card .sep { height: 1px; background: var(--line); margin: 8px 0; }
.pay { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); }
.pay > div { flex: 1; display: flex; flex-direction: column; }
.pay span { font-size: 12.5px; color: var(--muted); }
.pay.on { border-color: var(--primary); color: var(--primary); }
.pay.on b { color: var(--text); }
.pay.off { opacity: .5; }
.signup-turnstile { margin-top: 18px; min-height: 65px; }
.signup-done { text-align: center; padding: 30px 8px 0; }
.signup-done-icon { display: inline-flex; color: var(--success); }
.signup-done-icon .mud-icon-root { font-size: 72px; }
.signup-done h2 { font-family: Manrope, Inter, sans-serif; font-size: 22px; margin: 12px 0 8px; }
.signup-done p { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.signup-done p b { overflow-wrap: anywhere; }

/* Dugmad u prozorima (preko celog ekrana i donji "sheet"): siroka, preko cele sirine, sa razmakom od zaobljenih uglova
   i donje ivice telefona - ne stoje vise u donjem desnom uglu gde ih ugao telefona sece. */
.mud-dialog-fullscreen .mud-dialog-actions,
.mud-dialog-position-bottomcenter .mud-dialog-actions { gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)) !important; border-top: 1px solid var(--line); background: var(--surface); }
.mud-dialog-position-bottomcenter .mud-dialog-actions { padding-bottom: 14px !important; }
.mud-dialog-fullscreen .mud-dialog-actions .flex-grow-1,
.mud-dialog-position-bottomcenter .mud-dialog-actions .flex-grow-1 { display: none; }
.mud-dialog-fullscreen .mud-dialog-actions .mud-button-root:not(.mud-icon-button),
.mud-dialog-position-bottomcenter .mud-dialog-actions .mud-button-root:not(.mud-icon-button) { flex: 1; min-height: 48px; border-radius: 14px; margin: 0 !important; }

/* Kreiranje naloga: isticanje probnog perioda - precrtana cena, 0 EUR prvih N dana */
.trial-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.35; color: #fff; background: linear-gradient(120deg, #1fa67a, var(--success)); box-shadow: 0 8px 22px rgba(52, 195, 143, .3); }
.trial-banner .mud-icon-root { flex: none; }
.pkg-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.pkg-price s { font-size: 12px; font-weight: 600; color: var(--muted); }
.pkg-price small { font-size: 11px; font-weight: 700; color: var(--success); }
.signup-total small { display: block; font-size: 11px; font-weight: 700; color: var(--success); }
.signup-total s { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.signup-card .row-kv.trial span, .signup-card .row-kv.trial b { color: var(--success); font-weight: 700; }
.signup-card .row-kv.trial b { font-size: 18px; }
