/* AMOT CMS – administratorski panel */
:root {
  --p: #1d4ed8; --p-d: #1e40af; --p-l: #eef2ff;
  --ink: #101828; --ink-2: #475467; --muted: #667085; --line: #e4e7ec; --bg: #f5f7fa; --card: #fff;
  --ok: #067647; --ok-bg: #ecfdf3; --warn: #b54708; --warn-bg: #fffaeb; --err: #b42318; --err-bg: #fef3f2;
  --r: 12px; --sb: 260px;
  --sh: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--p); text-decoration: none; }
a:hover { color: var(--p-d); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.25; }
h1 { font-size: 1.55rem; letter-spacing: -.01em; }
h2 { font-size: 1.02rem; }
img { max-width: 100%; }
code { background: #f2f4f7; padding: .1rem .35rem; border-radius: 5px; font-size: .86em; }
:focus-visible { outline: 3px solid #93c5fd; outline-offset: 1px; }
.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.muted { color: var(--muted); }
.grow { flex: 1; }
[hidden] { display: none !important; }

/* Sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb); background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; z-index: 40; transition: transform .25s; }
.sb-brand { display: flex; gap: .7rem; align-items: center; padding: 1.1rem 1.2rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.07); }
.sb-brand strong { display: block; font-size: 1rem; }
.sb-brand small { color: #94a3b8; font-size: .76rem; }
.sb-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.1rem; flex: none; }
.sb-mark.big { width: 64px; height: 64px; font-size: 1.8rem; border-radius: 16px; }
.sb-nav { flex: 1; overflow-y: auto; padding: .6rem .7rem 1rem; }
.sb-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #64748b; padding: 1rem .7rem .4rem; font-weight: 700; }
.sb-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 8px; color: #cbd5e1; font-weight: 500; margin-bottom: 1px; }
.sb-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-nav a.active { background: #1e293b; color: #fff; box-shadow: inset 3px 0 0 #3b82f6; }
.sb-nav a .icon { opacity: .8; }
.pill { background: #ef4444; color: #fff; font-size: .7rem; padding: 0 .45rem; border-radius: 99px; margin-left: .3rem; }
.sb-foot { padding: .8rem 1.2rem; font-size: .74rem; color: #64748b; border-top: 1px solid rgba(255,255,255,.07); }
.sb-backdrop { display: none; }

/* Main */
.main { margin-left: var(--sb); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .8rem; padding: 0 1.4rem; }
.tb-title { flex: 1; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-btn { display: inline-flex; align-items: center; gap: .4rem; height: 38px; min-width: 38px; justify-content: center; padding: 0 .6rem; border: 1px solid var(--line); background: #fff; border-radius: 9px; color: var(--ink-2); cursor: pointer; font: inherit; }
.tb-btn:hover { color: var(--p); border-color: #c7d2fe; }
.sb-toggle { display: none; }
.tb-user { display: flex; align-items: center; gap: .6rem; padding-left: .8rem; border-left: 1px solid var(--line); }
.tb-user form { margin: 0; }
.tb-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--p-l); color: var(--p); display: grid; place-items: center; font-weight: 700; }
.tb-user-info { display: flex; flex-direction: column; line-height: 1.2; }
.tb-user-info small { color: var(--muted); font-size: .75rem; }
.content { padding: 1.6rem 1.6rem 4rem; max-width: 1440px; width: 100%; }

/* Header stranice */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin: 0; }
.page-head .back { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.ph-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* Dugmad */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: 9px; border: 1px solid transparent; font: 600 .9rem var(--font); cursor: pointer; line-height: 1.2; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn-primary { background: var(--p); color: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.1); }
.btn-primary:hover { background: var(--p-d); color: #fff; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: #c7d2fe; color: var(--p); }
.btn-link { background: none; color: var(--p); padding-left: .4rem; padding-right: .4rem; }
.btn-danger { background: #d92d20; color: #fff; }
.btn-danger:hover { background: #b42318; }
.btn-danger-ghost { background: none; color: var(--err); border-color: #fecdca; }
.btn-danger-ghost:hover { background: var(--err-bg); }
.btn-sm { padding: .38rem .7rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-file { position: relative; overflow: hidden; }

/* Kartice */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); margin-bottom: 1.2rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; }
.card-head a { font-size: .85rem; }
.card-body { padding: 1.2rem; }
.card-foot { padding: .9rem 1.2rem; border-top: 1px solid var(--line); background: #fcfcfd; border-radius: 0 0 var(--r) var(--r); display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.card-foot.stack { flex-direction: column; align-items: stretch; }
.card-section > summary { cursor: pointer; padding: .9rem 1.2rem; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.card-section > summary::after { content: "▾"; color: var(--muted); }
.card-section[open] > summary { border-bottom: 1px solid var(--line); }
.card-section[open] > summary::after { content: "▴"; }
.sticky { position: sticky; top: 76px; }

/* Forme */
.fg { margin-bottom: 1rem; }
.fg > label, .mi-form label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .35rem; color: #344054; }
.req { color: #d92d20; }
.input { width: 100%; padding: .55rem .75rem; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: #84adff; box-shadow: 0 0 0 4px rgba(41, 112, 255, .12); }
textarea.input { resize: vertical; min-height: 70px; }
.input-xl { font-size: 1.25rem; font-weight: 600; padding: .7rem .9rem; }
.input-sm { padding: .38rem .6rem; font-size: .85rem; }
.has-error .input, .has-error .editor { border-color: #f97066; }
.err { display: block; color: var(--err); font-size: .8rem; margin-top: .3rem; }
.help { display: block; color: var(--muted); font-size: .8rem; margin-top: .3rem; }
.counter { float: right; font-size: .75rem; color: var(--muted); font-weight: 500; }
.counter.over { color: var(--err); }
.input-prefix { display: flex; border: 1px solid #d0d5dd; border-radius: 8px; overflow: hidden; background: #fff; }
.input-prefix span { background: #f9fafb; color: var(--muted); padding: .55rem .6rem; font-size: .8rem; border-right: 1px solid var(--line); white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.input-prefix .input { border: 0; border-radius: 0; }
.color-row { display: flex; align-items: center; gap: .6rem; }
.color-row input[type=color] { width: 54px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.switch { position: relative; display: flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 500; margin: .3rem 0 .8rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slider { width: 38px; height: 22px; background: #d0d5dd; border-radius: 99px; position: relative; flex: none; transition: .2s; }
.slider::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--p); }
.switch input:checked + .slider::after { left: 19px; }
.switch input:focus-visible + .slider { outline: 3px solid #93c5fd; }
.chk { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; font-size: .88rem; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-narrow { max-width: 780px; }
.form-actions { display: flex; gap: .5rem; margin-top: 1rem; }
h3.sep { margin: 1.4rem 0 .3rem; font-size: .95rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
.edit-grid.single { grid-template-columns: minmax(0, 900px); }
.side-col .card { margin-bottom: 1.2rem; }
.danger-zone { margin-top: .5rem; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4rem; }
.settings-grid .span-2 { grid-column: 1 / -1; }
.icon-picker { display: flex; flex-wrap: wrap; gap: .35rem; }
.icon-picker label { cursor: pointer; }
.icon-picker input { position: absolute; opacity: 0; }
.icon-picker span { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-2); }
.icon-picker input:checked + span { border-color: var(--p); background: var(--p-l); color: var(--p); box-shadow: 0 0 0 2px #c7d2fe; }
.icon-picker input:focus-visible + span { outline: 3px solid #93c5fd; }
.doc-current { display: flex; align-items: center; gap: .4rem; margin-bottom: .5rem; padding: .5rem .7rem; background: #f9fafb; border-radius: 8px; border: 1px solid var(--line); }

/* Media polje */
.media-field { display: flex; flex-direction: column; gap: .6rem; }
.mf-preview { border: 1px dashed #d0d5dd; border-radius: 10px; min-height: 120px; display: grid; place-items: center; overflow: hidden; background: #f9fafb; }
.mf-preview img { width: 100%; max-height: 220px; object-fit: cover; }
.mf-empty { color: var(--muted); display: flex; gap: .4rem; align-items: center; font-size: .85rem; }
.mf-actions { display: flex; gap: .4rem; }

/* Galerija u formi */
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.gallery-edit.large { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ge-item { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: grab; }
.ge-item.dragging { opacity: .4; }
.ge-item.over { box-shadow: 0 0 0 2px var(--p); }
.ge-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; pointer-events: none; }
.ge-item .input { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.ge-remove { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(16,24,40,.7); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.ge-remove:hover { background: #d92d20; }

/* SERP pregled */
.serp { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; background: #fff; font-family: arial, sans-serif; }
.serp small { color: var(--muted); display: block; margin-bottom: .4rem; font-family: var(--font); }
.serp-url { color: #202124; font-size: .8rem; }
.serp-title { color: #1a0dab; font-size: 1.15rem; margin: .15rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.serp-desc { color: #4d5156; font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Tabele */
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.toolbar .input { width: auto; flex: 0 1 200px; }
.toolbar .input[type=search] { flex: 1 1 260px; }
.toolbar .hint { color: var(--muted); font-size: .82rem; display: inline-flex; gap: .3rem; align-items: center; margin-left: auto; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: .7rem 1rem; background: #f9fafb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .7rem 1rem; border-bottom: 1px solid #f2f4f7; vertical-align: middle; }
.table tbody tr:hover { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: 0; }
.col-main a { font-weight: 600; color: var(--ink); }
.col-main a:hover { color: var(--p); }
.col-thumb { width: 64px; }
.thumb { width: 52px; height: 38px; object-fit: cover; border-radius: 6px; display: block; }
.thumb-empty { display: grid; place-items: center; background: #f2f4f7; color: #98a2b3; }
.num { text-align: right; white-space: nowrap; }
.actions { white-space: nowrap; text-align: right; }
.actions form { display: inline; margin: 0; }
.w-actions { width: 1%; text-align: right; }
.w-drag { width: 28px; }
.ab { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer; vertical-align: middle; }
.ab:hover { background: #f2f4f7; color: var(--p); border-color: var(--line); }
.ab-danger:hover { color: var(--err); background: var(--err-bg); border-color: #fecdca; }
.ab-ok:hover { color: var(--ok); background: var(--ok-bg); }
.drag { cursor: grab; color: #98a2b3; letter-spacing: -2px; user-select: none; }
tr.dragging { opacity: .4; }
tr.child-row td.col-main { padding-left: 2rem; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); vertical-align: middle; }
.list-icon { color: var(--p); display: inline-flex; }
.file-chip { background: #fef3f2; color: #b42318; font-size: .7rem; font-weight: 700; padding: .1rem .4rem; border-radius: 4px; }
.star { color: #f79009; }
.status { display: inline-block; font-size: .74rem; font-weight: 600; padding: .18rem .55rem; border-radius: 99px; background: #f2f4f7; color: #344054; white-space: nowrap; }
.status-published { background: var(--ok-bg); color: var(--ok); }
.status-draft, .status-hidden { background: #f2f4f7; color: #475467; }
.status-review { background: var(--warn-bg); color: var(--warn); }
.status-scheduled { background: #eff8ff; color: #175cd3; }
.status-unpublished { background: var(--err-bg); color: var(--err); }
.role { font-size: .76rem; font-weight: 600; padding: .15rem .5rem; border-radius: 6px; background: #f2f4f7; }
.role-super_admin { background: #fdf2fa; color: #c11574; }
.role-admin { background: #eef4ff; color: #3538cd; }
.role-editor { background: #ecfdf3; color: #067647; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .icon { width: 34px; height: 34px; opacity: .5; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: #eaecf0; padding: 3px; border-radius: 10px; margin-bottom: 1rem; }
.seg a { padding: .42rem .85rem; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .86rem; display: inline-flex; gap: .35rem; align-items: center; }
.seg a.active { background: #fff; color: var(--ink); box-shadow: var(--sh); }
.unread td { font-weight: 600; }
.dot { width: 8px; height: 8px; background: var(--p); border-radius: 50%; display: inline-block; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: .4rem 1rem; margin: 0 0 1.2rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.message-body { background: #f9fafb; border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; white-space: normal; line-height: 1.7; }
.act { font-size: .78rem; font-weight: 600; }
.act-delete, .act-login_failed { color: var(--err); }
.act-create, .act-publish { color: var(--ok); }

/* Pagination */
.pagination ul { list-style: none; display: flex; gap: .3rem; padding: 0; margin: 1rem 0; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; min-width: 36px; height: 36px; align-items: center; justify-content: center; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink-2); font-weight: 600; font-size: .85rem; }
.pagination .active a { background: var(--p); color: #fff; border-color: var(--p); }
.pagination .disabled span { opacity: .45; }
.pagination .gap span { border: 0; background: none; }

/* Alerti */
.alert { position: relative; padding: .8rem 2.4rem .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid; font-weight: 500; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #abefc6; }
.alert-error { background: var(--err-bg); color: var(--err); border-color: #fecdca; }
.alert-info { background: #eff8ff; color: #175cd3; border-color: #b2ddff; }
.alert-x { position: absolute; right: .6rem; top: .5rem; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: .6; }

/* Dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; box-shadow: var(--sh); color: var(--ink); display: flex; flex-direction: column; gap: .2rem; transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(16,24,40,.25); color: var(--ink); }
.stat-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: .5rem; }
.stat-val { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: .82rem; }
.stat-blue .stat-ico { background: #eff8ff; color: #175cd3; }
.stat-green .stat-ico { background: var(--ok-bg); color: var(--ok); }
.stat-amber .stat-ico { background: var(--warn-bg); color: var(--warn); }
.stat-violet .stat-ico { background: #f4f3ff; color: #5925dc; }
.stat-teal .stat-ico { background: #f0fdf9; color: #107569; }
.stat-slate .stat-ico { background: #f2f4f7; color: #344054; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; align-items: start; }
.seo-grid { grid-template-columns: 1.3fr 1fr; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem 1.2rem; border-bottom: 1px solid #f2f4f7; }
.list li:last-child { border-bottom: 0; }
.list a { display: flex; flex-direction: column; min-width: 0; color: var(--ink); }
.list a strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.list small { color: var(--muted); }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; padding: 1.2rem; }
.quick { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; padding: .9rem .4rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: .8rem; font-weight: 600; }
.quick:hover { border-color: #c7d2fe; background: var(--p-l); color: var(--p); }
.quick .icon { width: 22px; height: 22px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.mini-stats div { padding: .8rem 1rem; border-right: 1px solid #f2f4f7; border-bottom: 1px solid #f2f4f7; display: flex; flex-direction: column; }
.mini-stats b { font-size: 1.2rem; }
.mini-stats span { color: var(--muted); font-size: .78rem; }
.timeline { list-style: none; margin: 0; padding: 1rem 1.2rem; }
.timeline li { display: flex; gap: .8rem; padding-bottom: .9rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 2px; background: #f2f4f7; }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: #98a2b3; margin-top: 5px; flex: none; position: relative; z-index: 1; }
.tl-create .tl-dot, .tl-publish .tl-dot { background: #12b76a; }
.tl-delete .tl-dot, .tl-login_failed .tl-dot { background: #f04438; }
.tl-update .tl-dot, .tl-settings .tl-dot { background: #2e90fa; }
.timeline p { margin: .1rem 0; color: var(--ink-2); }
.timeline small { color: var(--muted); }
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.roles div { display: flex; flex-direction: column; gap: .2rem; }
.roles span { color: var(--muted); font-size: .82rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li { padding: .45rem 0 .45rem 1.8rem; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li::before { position: absolute; left: 0; top: .45rem; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.checklist li.ok::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.checklist li.bad::before { content: "!"; background: var(--warn-bg); color: var(--warn); }

/* Medijska biblioteka */
.dropzone { border: 2px dashed #b2ccff; background: #f5f8ff; border-radius: var(--r); padding: 1.6rem; text-align: center; margin-bottom: 1.2rem; color: var(--ink-2); transition: .15s; }
.dropzone.over { background: #eef4ff; border-color: var(--p); }
.dropzone .icon { width: 30px; height: 30px; color: var(--p); }
.dropzone p { margin: .4rem 0; }
.dropzone small { color: var(--muted); }
.dropzone .link { color: var(--p); cursor: pointer; font-weight: 600; text-decoration: underline; }
.dz-progress { height: 6px; background: #e0eaff; border-radius: 99px; overflow: hidden; margin: .8rem auto 0; max-width: 420px; }
.dz-progress span { display: block; height: 100%; width: 0; background: var(--p); transition: width .2s; }
.media-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.folder-list { list-style: none; margin: 0; padding: .5rem; }
.folder-list a { display: flex; justify-content: space-between; padding: .45rem .6rem; border-radius: 7px; color: var(--ink-2); flex: 1; }
.folder-list a.active, .folder-list a:hover { background: var(--p-l); color: var(--p); }
.folder-row { display: flex; align-items: center; }
.folder-row form { margin: 0; }
.count { background: #f2f4f7; color: var(--muted); font-size: .72rem; padding: 0 .45rem; border-radius: 99px; }
.folder-new { display: flex; gap: .4rem; padding: .7rem; border-top: 1px solid var(--line); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; }
.media-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--sh); display: flex; flex-direction: column; }
.media-item.editing { box-shadow: 0 0 0 2px var(--p); }
.mi-thumb { display: block; aspect-ratio: 4/3; background: #f2f4f7; }
.mi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mi-doc { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; color: #b42318; gap: .3rem; }
.mi-doc .icon { width: 36px; height: 36px; }
.mi-info { padding: .6rem .75rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.mi-info strong { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-info small { color: var(--muted); font-size: .76rem; }
.mi-info .warn { color: var(--warn); }
.mi-info .used { color: var(--ok); }
.media-item details { border-top: 1px solid var(--line); margin-top: auto; }
.media-item summary { padding: .5rem .75rem; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--p); }
.mi-form { padding: 0 .75rem .6rem; display: grid; gap: .5rem; }
.mi-form label { font-size: .76rem; margin: 0; }
.mi-form label .input { margin-top: .2rem; font-weight: 400; }
.media-item details > form:last-child { padding: 0 .75rem .75rem; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(16, 24, 40, .55); z-index: 100; display: grid; place-items: center; padding: 1rem; }
.modal-box { background: #fff; border-radius: 14px; box-shadow: 0 24px 48px -12px rgba(16,24,40,.35); width: 100%; max-height: 92vh; display: flex; flex-direction: column; padding: 1.3rem; }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 1000px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; align-items: center; }
.mm-toolbar { display: flex; gap: .6rem; margin-bottom: .6rem; }
.mm-status { font-size: .85rem; color: var(--muted); min-height: 1.2em; margin-bottom: .4rem; }
.mm-status.err { color: var(--err); }
.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; overflow-y: auto; min-height: 200px; max-height: 56vh; padding: 3px; }
.mm-item { position: relative; border: 2px solid transparent; border-radius: 9px; overflow: hidden; cursor: pointer; background: #f2f4f7; aspect-ratio: 1; padding: 0; }
.mm-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-item.sel { border-color: var(--p); box-shadow: 0 0 0 3px #c7d2fe; }
.mm-item.sel::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }

/* WYSIWYG editor */
.editor { border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; overflow: clip; }
.editor:focus-within { border-color: #84adff; box-shadow: 0 0 0 4px rgba(41, 112, 255, .12); }
.ed-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: .4rem; border-bottom: 1px solid var(--line); background: #fcfcfd; position: sticky; top: 60px; z-index: 5; }
.ed-toolbar button, .ed-toolbar select { height: 32px; min-width: 32px; padding: 0 .45rem; border: 1px solid transparent; background: none; border-radius: 6px; cursor: pointer; color: #344054; font: 600 .85rem var(--font); display: inline-grid; place-items: center; }
.ed-toolbar select { border-color: var(--line); background: #fff; font-weight: 500; }
.ed-toolbar button:hover { background: #f2f4f7; border-color: var(--line); }
.ed-toolbar button.on { background: var(--p-l); color: var(--p); border-color: #c7d2fe; }
.ed-sep { width: 1px; background: var(--line); margin: 4px 3px; }
.ed-area { min-height: 340px; max-height: 70vh; overflow-y: auto; padding: 1rem 1.2rem; outline: none; font-size: 1rem; line-height: 1.7; }
.ed-area:empty::before { content: attr(data-placeholder); color: #98a2b3; }
.ed-area h2 { font-size: 1.45rem; margin: 1.2em 0 .5em; } .ed-area h3 { font-size: 1.2rem; margin: 1em 0 .4em; } .ed-area h4 { font-size: 1.05rem; }
.ed-area p { margin: 0 0 .9em; }
.ed-area img { max-width: 100%; height: auto; border-radius: 6px; }
.ed-area img.sel-img { outline: 3px solid #84adff; }
.ed-area .img-left { float: left; margin: .2em 1em .6em 0; max-width: 45%; } .ed-area .img-right { float: right; margin: .2em 0 .6em 1em; max-width: 45%; } .ed-area .img-center { display: block; margin: 0 auto; }
.ed-area table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.ed-area th, .ed-area td { border: 1px solid #d0d5dd; padding: .4rem .6rem; min-width: 40px; }
.ed-area th { background: #f9fafb; }
.ed-area blockquote { border-left: 4px solid #84adff; margin: 1em 0; padding: .5em 1em; background: #f9fafb; }
.ed-area iframe { width: 100%; aspect-ratio: 16/9; border: 0; }
.ed-source { width: 100%; min-height: 340px; border: 0; padding: 1rem; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; outline: none; resize: vertical; }
.ed-foot { display: flex; justify-content: space-between; padding: .35rem .8rem; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); background: #fcfcfd; }

/* Prijava */
.login-page { background: #0f172a; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: radial-gradient(800px 500px at 20% 20%, rgba(59,130,246,.35), transparent 60%), radial-gradient(700px 500px at 90% 90%, rgba(201,162,75,.25), transparent 60%), #0f172a; color: #e2e8f0; display: grid; place-items: center; padding: 3rem; }
.la-inner { max-width: 420px; }
.la-inner h2 { font-size: 2.2rem; color: #fff; margin: 1.2rem 0 .6rem; }
.la-inner p { color: #94a3b8; font-size: 1.05rem; }
.login-box { background: #fff; display: grid; place-items: center; padding: 2rem; }
.login-form { width: 100%; max-width: 380px; }
.login-form h1 { font-size: 1.5rem; }
.login-form .sub { color: var(--muted); margin-bottom: 1.4rem; }
.login-form .btn { padding: .75rem; font-size: 1rem; margin-top: .4rem; }
.back-site { display: block; text-align: center; margin-top: 1.2rem; color: var(--muted); font-size: .88rem; }

/* Responzivnost */
@media (max-width: 1280px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) {
  .edit-grid, .dash-grid, .seo-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .roles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(16,24,40,.5); z-index: 35; }
  .main { margin-left: 0; }
  .sb-toggle { display: inline-flex; }
  .tb-user-info, .tb-site span { display: none; }
  .content { padding: 1rem 1rem 3rem; }
  .media-layout { grid-template-columns: 1fr; }
  .settings-grid, .form-2 { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .ed-toolbar { top: 0; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .roles { grid-template-columns: 1fr; }
  .toolbar .input { flex: 1 1 100%; }
  /* tabele kao kartice */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: .6rem 0; }
  .table td { border: 0; padding: .25rem 1rem; text-align: left; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .78rem; }
  .table td.col-main::before { content: none; }
  .table td.actions { text-align: left; }
  .col-thumb { display: none !important; }
  .page-head { align-items: flex-start; }
  h1 { font-size: 1.3rem; }
  .dl { grid-template-columns: 1fr; }
}
