/* =====================================================================
 *  Elektronski dnevnik za roditelje - novi izgled (11/2026)
 *  Mobile-first; bez vanjskih biblioteka i fontova.
 * ===================================================================== */
:root {
	--brand: #0f6cbd;
	--brand-700: #0b5394;
	--brand-50: #eaf3fc;
	--brand-100: #d3e6f8;
	--accent: #22a1e2;
	--bg: #f3f6fa;
	--surface: #ffffff;
	--surface-2: #f8fafc;
	--text: #18212d;
	--muted: #5b6878;
	--subtle: #8a96a6;
	--border: #e2e8f0;
	--ok: #14804f;
	--ok-bg: #e5f5ec;
	--warn: #a35f00;
	--warn-bg: #fdf1dc;
	--bad: #c0392b;
	--bad-bg: #fcebe9;
	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
	--shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--tabbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ed-body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.5;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }
[hidden] { display: none !important; }

.ed-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-ico--sm { width: 16px; height: 16px; }
.ed-ico--lg { width: 24px; height: 24px; }

.ed-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ed-skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.ed-skip:focus { left: 8px; }

:focus-visible { outline: 3px solid rgba(15, 108, 189, .45); outline-offset: 2px; border-radius: 6px; }

/* ---------- Gornja traka ---------- */
.ed-top {
	position: sticky; top: 0; z-index: 20;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--border);
}
.ed-top__in {
	max-width: 1120px; margin: 0 auto; padding: 8px 16px;
	display: flex; align-items: center; gap: 16px; min-height: 64px;
}
.ed-brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; }
.ed-brand img { height: 40px; width: auto; display: block; }
.ed-brand__txt {
	font-size: 12px; line-height: 1.2; font-weight: 600; color: var(--muted);
	border-left: 1px solid var(--border); padding-left: 12px; text-transform: uppercase; letter-spacing: .06em;
}
.ed-nav { display: none; align-items: center; gap: 4px; margin-left: 8px; }
.ed-nav__link {
	position: relative; display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px;
	cursor: pointer; list-style: none; text-decoration: none !important; white-space: nowrap;
}
.ed-nav__link::-webkit-details-marker { display: none; }
.ed-nav__link:hover { background: var(--surface-2); color: var(--text); }
.ed-nav__link.is-active { background: var(--brand-50); color: var(--brand-700); }
.ed-nav__grupa { position: relative; }
.ed-nav__pod {
	position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--surface);
	border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 30;
}
.ed-nav__pod a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: 14px; }
.ed-nav__pod a:hover { background: var(--surface-2); text-decoration: none; }

.ed-badge {
	display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
	border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}

.ed-user { margin-left: auto; position: relative; }
.ed-user__btn {
	display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
	padding: 4px 8px 4px 4px; border-radius: 999px; color: var(--muted);
}
.ed-user__btn::-webkit-details-marker { display: none; }
.ed-user__btn:hover { background: var(--surface-2); }
.ed-user__ime { display: none; font-weight: 600; font-size: 14px; color: var(--text); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-user__meni {
	position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--surface);
	border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 30;
}
.ed-user__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: grid; }
.ed-user__head span { color: var(--subtle); font-size: 13px; }
.ed-user__meni a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 14px; }
.ed-user__meni a:hover { background: var(--surface-2); text-decoration: none; }
.ed-user__meni a.is-odjava { color: var(--bad); }

.ed-avatar {
	width: 48px; height: 48px; border-radius: 50%; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--accent), var(--brand)); color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .02em;
}
.ed-avatar--sm { width: 34px; height: 34px; font-size: 13px; }
.ed-avatar--lg { width: 60px; height: 60px; font-size: 21px; }

/* ---------- Sadržaj ---------- */
.ed-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 16px calc(var(--tabbar-h) + 28px); outline: none; }
.ed-footer { text-align: center; color: var(--subtle); font-size: 12px; padding: 0 16px calc(var(--tabbar-h) + 16px); }

.ed-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ed-page-head h1 { font-size: 24px; line-height: 1.25; letter-spacing: -.01em; }
.ed-page-head p { color: var(--muted); margin-top: 4px; }

.ed-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.ed-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.ed-card__head h2, .ed-card__head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ed-card__head .ed-ico { color: var(--brand); }
.ed-card__body { padding: 14px 18px 18px; }
.ed-stack > * + * { margin-top: 16px; }

.ed-grid-2 { display: grid; gap: 16px; }

/* ---------- Zaglavlje polaznika ---------- */
.ed-hero {
	display: flex; align-items: center; gap: 16px; padding: 18px;
	background: linear-gradient(135deg, #0f6cbd 0%, #1a8ad6 60%, #27a7e6 100%);
	color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.ed-hero::after {
	content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
	background: rgba(255, 255, 255, .08);
}
.ed-hero .ed-avatar { background: rgba(255, 255, 255, .18); border: 2px solid rgba(255, 255, 255, .35); }
.ed-hero h1 { font-size: 22px; line-height: 1.2; }
.ed-hero p { opacity: .9; margin-top: 4px; font-size: 14px; }
.ed-hero__txt { min-width: 0; flex: 1; position: relative; z-index: 1; }
.ed-hero__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ed-hero .ed-chip { background: rgba(255, 255, 255, .18); color: #fff; }

/* ---------- Izbor kursa ---------- */
.ed-kursevi { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 16px 0 4px; scrollbar-width: thin; }
.ed-kurs {
	flex: none; display: grid; gap: 2px; text-align: left; cursor: pointer;
	padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
	min-width: 180px; max-width: 260px;
}
.ed-kurs:hover { border-color: var(--brand-100); }
.ed-kurs strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-kurs span { font-size: 12px; color: var(--muted); }
.ed-kurs[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.ed-kursevi__naslov { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 16px; }

/* ---------- Statistika ---------- */
.ed-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.ed-stat {
	display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
	padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
	box-shadow: var(--shadow); color: var(--text); min-width: 0;
}
.ed-stat:hover { border-color: var(--brand-100); }
.ed-stat__top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.ed-stat__ico { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand); flex: none; }
.ed-stat__ico .ed-ico { width: 17px; height: 17px; }
.ed-stat__val { font-size: 24px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; }
.ed-stat__val small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ed-stat__sub { font-size: 13px; color: var(--muted); }
.ed-stat--ok .ed-stat__ico { background: var(--ok-bg); color: var(--ok); }
.ed-stat--warn .ed-stat__ico { background: var(--warn-bg); color: var(--warn); }
.ed-stat--bad .ed-stat__ico { background: var(--bad-bg); color: var(--bad); }

.ed-progress { height: 8px; border-radius: 999px; background: #e8edf3; overflow: hidden; }
.ed-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .4s ease; }
.ed-progress--ok > span { background: var(--ok); }
.ed-progress--warn > span { background: #e0a030; }
.ed-progress--bad > span { background: var(--bad); }

/* ---------- Čipovi ---------- */
.ed-chip {
	display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
	font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 1px solid transparent;
}
.ed-chip .ed-ico { width: 14px; height: 14px; }
.ed-chip--ok { background: var(--ok-bg); color: var(--ok); }
.ed-chip--warn { background: var(--warn-bg); color: var(--warn); }
.ed-chip--bad { background: var(--bad-bg); color: var(--bad); }
.ed-chip--brand { background: var(--brand-50); color: var(--brand-700); }
.ed-chip--line { background: transparent; border-color: var(--border); }

/* ---------- Tabovi ---------- */
.ed-tabs {
	display: flex; gap: 4px; overflow-x: auto; margin: 22px 0 14px; padding: 4px;
	background: #e9eef5; border-radius: 14px; scrollbar-width: none;
}
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tab {
	flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	padding: 9px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted);
	font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.ed-tab:hover { color: var(--text); }
.ed-tab[aria-selected="true"] { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow); }
.ed-tab .ed-count { font-size: 12px; color: var(--subtle); font-weight: 600; }

/* ---------- Liste ---------- */
.ed-list { list-style: none; margin: 0; padding: 0; }
.ed-list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.ed-list > li:first-child { border-top: 0; }
.ed-list__ico { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--surface-2); color: var(--muted); }
.ed-list__ico--ok { background: var(--ok-bg); color: var(--ok); }
.ed-list__ico--bad { background: var(--bad-bg); color: var(--bad); }
.ed-list__ico--brand { background: var(--brand-50); color: var(--brand); }
.ed-list__main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ed-list__title { font-weight: 650; }
.ed-list__sub { font-size: 13px; color: var(--muted); }
.ed-list__aside { text-align: right; display: grid; justify-items: end; gap: 4px; flex: none; }
.ed-list__amount { font-weight: 750; font-size: 16px; white-space: nowrap; }
.ed-list__opis { margin-top: 6px; font-size: 14px; color: var(--text); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; }

.ed-list--compact > li { padding: 8px 0; gap: 10px; }
.ed-list--compact .ed-list__ico { width: 30px; height: 30px; border-radius: 9px; }
.ed-list--compact .ed-list__ico .ed-ico { width: 17px; height: 17px; }
.ed-list--compact .ed-list__title { font-weight: 600; font-size: 14px; }
@media (min-width: 700px) {
	.ed-list--compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 28px; }
	.ed-list--compact > li { border-top: 1px solid var(--border) !important; }
}

.ed-mjesec { font-size: 12px; font-weight: 700; color: var(--subtle); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 2px; }
.ed-mjesec:first-child { margin-top: 0; }

/* ---------- Prisustvo: kvadratići ---------- */
.ed-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.ed-dot { width: 18px; height: 18px; border-radius: 5px; background: #dfe5ec; }
.ed-dot--ok { background: #2fae6f; }
.ed-dot--bad { background: #e2574c; }
.ed-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.ed-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ed-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- Ključ / vrijednost ---------- */
.ed-kv { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.ed-kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); }
.ed-kv > div:first-child { border-top: 0; }
.ed-kv dt { color: var(--muted); }
.ed-kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: break-word; flex: 0 1 auto; max-width: 65%; }
.ed-kv dt { min-width: 0; }
.ed-kv .is-total dt, .ed-kv .is-total dd { color: var(--text); font-weight: 750; }
.ed-kv .is-ok dd { color: var(--ok); }
.ed-kv .is-bad dd { color: var(--bad); }

.ed-fin-head { display: grid; gap: 10px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.ed-fin-head__val { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.ed-fin-head__val small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.ed-fin-head__row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

/* ---------- Uputstvo za uplatu ---------- */
.ed-uputstvo { white-space: pre-wrap; font-size: 14px; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; color: var(--text); }
.ed-racun { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--brand-50); margin-bottom: 12px; }
.ed-racun span { font-size: 12px; color: var(--brand-700); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ed-racun strong { display: block; font-size: 18px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* ---------- Ocjene ---------- */
.ed-ocjene { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ed-ocjena { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 4px; background: var(--surface); }
.ed-ocjena__broj { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; background: var(--subtle); margin-bottom: 6px; }
.ed-ocjena__broj--5 { background: #14804f; }
.ed-ocjena__broj--4 { background: #2a9d8f; }
.ed-ocjena__broj--3 { background: #d39318; }
.ed-ocjena__broj--2 { background: #e0742f; }
.ed-ocjena__broj--1 { background: #c0392b; }
.ed-ocjena small { color: var(--muted); font-size: 13px; }

/* ---------- Dugmad ---------- */
.ed-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 16px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
	font-weight: 650; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.ed-btn:hover { background: var(--surface-2); }
.ed-btn:disabled { opacity: .55; cursor: default; }
.ed-btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ed-btn--primary:hover { background: var(--brand-700); }
.ed-btn--danger { color: var(--bad); }
.ed-btn--sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.ed-btn--ghost { border-color: transparent; background: transparent; color: var(--brand); }
.ed-btn--ghost:hover { background: var(--brand-50); }
.ed-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Prazno / greška / učitavanje ---------- */
.ed-empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.ed-empty .ed-ico { width: 34px; height: 34px; color: var(--subtle); margin-bottom: 8px; }
.ed-empty strong { display: block; color: var(--text); margin-bottom: 4px; }
.ed-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--bad-bg); color: #7f2318; }
.ed-alert--info { background: var(--brand-50); color: var(--brand-700); }
.ed-alert--warn { background: var(--warn-bg); color: #7a4700; }
.ed-alert .ed-ico { margin-top: 1px; }

.ed-skel { background: linear-gradient(90deg, #e8edf3 25%, #f3f6fa 37%, #e8edf3 63%); background-size: 400% 100%; animation: ed-skel 1.3s ease infinite; border-radius: 10px; }
@keyframes ed-skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.ed-skel--hero { height: 104px; border-radius: var(--radius); }
.ed-skel--stat { height: 118px; border-radius: var(--radius); }
.ed-skel--card { height: 240px; border-radius: var(--radius); margin-top: 16px; }

/* ---------- Dijalog ---------- */
.ed-dialog {
	border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
	box-shadow: var(--shadow-lg); color: var(--text); background: var(--surface);
}
.ed-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.ed-dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.ed-dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.ed-dialog__head h2 { font-size: 18px; }
.ed-dialog__body { padding: 8px 20px 4px; overflow: auto; }
.ed-dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 20px; }
.ed-x { border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 8px; cursor: pointer; display: inline-flex; }
.ed-x:hover { background: var(--surface-2); }

.ed-field { display: grid; gap: 6px; margin-bottom: 14px; }
.ed-field label, .ed-field .ed-label { font-weight: 650; font-size: 14px; }
.ed-field small { color: var(--muted); font-size: 12px; }
.ed-input, .ed-select, .ed-textarea {
	width: 100%; padding: 10px 12px; border: 1px solid #cfd8e3; border-radius: 11px; background: #fff; color: var(--text); font: inherit;
}
.ed-textarea { min-height: 140px; resize: vertical; }
.ed-input:focus, .ed-select:focus, .ed-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.ed-stars { display: flex; gap: 6px; }
.ed-star { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; width: 48px; height: 48px; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; color: var(--subtle); font-size: 11px; font-weight: 700; }
.ed-star .ed-ico { width: 20px; height: 20px; }
.ed-star.is-on { color: #e2a60b; border-color: #f2d38a; background: #fff9e8; }
.ed-star.is-on .ed-ico { fill: #f5b915; stroke: #e2a60b; }

/* ---------- Toast ---------- */
.ed-toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); }
.ed-toast { background: #1f2937; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; display: flex; gap: 10px; align-items: center; animation: ed-in .2s ease; }
.ed-toast--ok .ed-ico { color: #4ade80; }
.ed-toast--bad .ed-ico { color: #f87171; }
@keyframes ed-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Donja traka (mobitel) ---------- */
.ed-tabbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex;
	background: rgba(255, 255, 255, .97); border-top: 1px solid var(--border);
	padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(8px);
}
.ed-tabbar__link {
	flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	height: var(--tabbar-h); color: var(--subtle); font-size: 11px; font-weight: 650; text-decoration: none !important;
}
.ed-tabbar__link.is-active { color: var(--brand); }
.ed-tabbar__ico { position: relative; display: inline-flex; }
.ed-tabbar__ico .ed-ico { width: 23px; height: 23px; }
.ed-tabbar__ico .ed-badge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; font-size: 10px; }

/* ---------- Poruke ---------- */
.ed-filter { display: inline-flex; gap: 4px; padding: 4px; background: #e9eef5; border-radius: 12px; }
.ed-filter button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-weight: 650; font-size: 13px; color: var(--muted); cursor: pointer; }
.ed-filter button[aria-pressed="true"] { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow); }
.ed-inbox { display: grid; gap: 16px; }
.ed-msgs { list-style: none; margin: 0; padding: 6px; }
.ed-msg { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 0; background: transparent; padding: 12px; border-radius: 12px; cursor: pointer; color: var(--text); }
.ed-msg:hover { background: var(--surface-2); }
.ed-msg.is-active { background: var(--brand-50); }
.ed-msg__main { flex: 1; min-width: 0; }
.ed-msg__top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ed-msg__ko { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.ed-msg__ko .ed-ico { width: 14px; height: 14px; color: var(--subtle); }
.ed-msg__dat { font-size: 12px; color: var(--subtle); white-space: nowrap; }
.ed-msg__prev { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.ed-msg.is-new .ed-msg__ko { color: var(--text); }
.ed-msg.is-new .ed-msg__prev { color: var(--text); font-weight: 550; }
.ed-msg__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 6px; }
.ed-msg__dot.is-read { background: transparent; }
.ed-read-head { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.ed-read-head h2 { font-size: 17px; }
.ed-read-head p { color: var(--muted); font-size: 13px; }
.ed-read-body { white-space: pre-wrap; padding: 16px 0; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.ed-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; }

/* ---------- Početna ---------- */
.ed-welcome { padding: 20px; }
.ed-welcome h1 { font-size: 24px; letter-spacing: -.01em; }
.ed-welcome p { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.ed-child { padding: 18px; display: grid; gap: 14px; }
.ed-child__head { display: flex; gap: 12px; align-items: center; }
.ed-child__head h2 { font-size: 18px; line-height: 1.25; }
.ed-child__head p { color: var(--muted); font-size: 13px; }
.ed-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ed-mini > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; min-width: 0; }
.ed-mini span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ed-mini strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-quick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ed-quick a { display: flex; gap: 12px; align-items: center; padding: 16px; color: var(--text); text-decoration: none !important; }
.ed-quick a:hover { border-color: var(--brand-100); }
.ed-quick strong { display: block; }
.ed-quick small { color: var(--muted); font-size: 13px; }
.ed-quick .ed-ico.right { margin-left: auto; color: var(--subtle); }

/* ---------- Veći ekrani ---------- */
@media (min-width: 560px) {
	.ed-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ed-hero h1 { font-size: 26px; }
}
@media (min-width: 860px) {
	:root { --tabbar-h: 0px; }
	body.ed-body { font-size: 15px; }
	.ed-nav { display: flex; }
	.ed-user__ime { display: block; }
	.ed-tabbar { display: none; }
	.ed-main { padding: 28px 24px 40px; }
	.ed-footer { padding-bottom: 24px; }
	.ed-toasts { bottom: 24px; }
	.ed-top__in { padding: 8px 24px; }
	.ed-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ed-hero { padding: 24px 26px; }
	.ed-grid-2 { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; }
	.ed-inbox { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: start; }
	.ed-inbox .ed-back { display: none; }
	.ed-inbox__read { position: sticky; top: 88px; }
}
@media (max-width: 859px) {
	.ed-inbox.is-reading .ed-inbox__list { display: none; }
	.ed-inbox:not(.is-reading) .ed-inbox__read { display: none; }
}
.ed-child__head, .ed-read-head { flex-wrap: wrap; }
.ed-child__head > div, .ed-read-head > div { flex: 1 1 180px; min-width: 0; }
@media (max-width: 559px) {
	.ed-welcome h1, .ed-page-head h1 { font-size: 21px; }
	.ed-mini { grid-template-columns: 1fr; gap: 8px; }
	.ed-mini > div { grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
	.ed-mini > div .ed-progress { grid-column: 1 / -1; }
	.ed-mini strong { font-size: 16px; }
	.ed-tabs { margin: 18px 0 12px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; padding: 4px; }
	.ed-tab { grid-column: span 2; padding: 9px 4px; font-size: 13.5px; min-width: 0; }
	.ed-tab:nth-child(n+4) { grid-column: span 3; }
	.ed-tab .ed-ico, .ed-tab .ed-count { display: none; }
	.ed-hero { align-items: flex-start; }
	.ed-hero .ed-avatar--lg { width: 48px; height: 48px; font-size: 17px; }
	.ed-list__aside .ed-actions { justify-content: flex-end; }
}
@media (max-width: 420px) {
	.ed-brand__txt { display: none; }
	.ed-stat__val { font-size: 21px; }
	.ed-mini strong { font-size: 15px; }
	.ed-tab { padding: 8px 11px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
 *  Prijava i promjena lozinke (home.php, reset.php)
 * ===================================================================== */
body.ed-auth { background: var(--bg); min-height: 100vh; display: block; }
.ed-auth__wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.ed-auth__brand {
	position: relative; overflow: hidden; color: #fff; padding: 28px 20px 84px;
	background: linear-gradient(150deg, #0b5394 0%, #0f6cbd 45%, #22a1e2 100%);
}
.ed-auth__brand::before, .ed-auth__brand::after {
	content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.ed-auth__brand::before { width: 340px; height: 340px; right: -120px; top: -120px; }
.ed-auth__brand::after { width: 220px; height: 220px; left: -80px; bottom: -110px; }
.ed-auth__logo { display: inline-flex; background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); position: relative; z-index: 1; }
.ed-auth__logo img { height: 46px; width: auto; display: block; }
.ed-auth__title { position: relative; z-index: 1; margin-top: 22px; }
.ed-auth__title h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.ed-auth__title p { margin-top: 8px; opacity: .92; max-width: 46ch; }
.ed-auth__features { display: none; position: relative; z-index: 1; list-style: none; padding: 0; margin: 32px 0 0; gap: 14px; }
.ed-auth__features li { display: flex; gap: 12px; align-items: flex-start; }
.ed-auth__features .ed-auth__fico { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .16); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ed-auth__features strong { display: block; }
.ed-auth__features span { opacity: .85; font-size: 14px; }

.ed-auth__main { display: flex; align-items: flex-start; justify-content: center; padding: 0 16px 32px; margin-top: -60px; position: relative; z-index: 2; }
.ed-auth__card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 26px 22px; }
.ed-auth__card h2 { font-size: 22px; letter-spacing: -.01em; }
.ed-auth__card > p { color: var(--muted); margin: 4px 0 20px; font-size: 14px; }
.ed-auth__card .ed-alert { margin-bottom: 16px; font-size: 14px; }
.ed-auth__card .ed-alert--ok { background: var(--ok-bg); color: #0e5c39; }
.ed-pass { position: relative; }
.ed-pass .ed-input { padding-right: 46px; }
.ed-pass button {
	position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
	border: 0; background: transparent; color: var(--muted); padding: 8px; border-radius: 8px; cursor: pointer; display: inline-flex;
}
.ed-pass button:hover { background: var(--surface-2); color: var(--text); }
.ed-auth .ed-input { font-size: 16px; padding: 12px 14px; } /* 16px: iOS ne zumira polje */
.ed-auth .ed-btn--block { width: 100%; padding: 13px 16px; font-size: 15px; }
.ed-auth__links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; }
.ed-auth__help { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; display: flex; gap: 10px; }
.ed-auth__help .ed-ico { color: var(--subtle); margin-top: 1px; }
.ed-pravila { list-style: none; padding: 0; margin: -4px 0 16px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.ed-pravila li { display: flex; align-items: center; gap: 6px; }
.ed-pravila li .ed-ico { width: 15px; height: 15px; color: var(--subtle); }
.ed-pravila li.is-ok { color: var(--ok); }
.ed-pravila li.is-ok .ed-ico { color: var(--ok); }
#poklapanje { color: var(--bad); font-weight: 600; }
.ed-auth__foot { text-align: center; color: var(--subtle); font-size: 12px; margin-top: 18px; }

@media (min-width: 900px) {
	.ed-auth__wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
	.ed-auth__brand { padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
	.ed-auth__title h1 { font-size: 36px; }
	.ed-auth__title p { font-size: 17px; }
	.ed-auth__features { display: grid; }
	.ed-auth__main { margin-top: 0; align-items: center; padding: 40px; }
	.ed-auth__card { padding: 34px 32px; }
}
