:root {
  --navy: #123a5a; --navy-d: #0c2338; --blue: #0b5fc6; --blue-50: #eaf2fd; --red: #d8141f; --red-50: #fdecec;
  --ink: #1b2533; --muted: #6b7686; --line: #e3e8ef; --bg: #f3f5f9; --card: #fff; --ok: #157347; --ok-50: #e6f4ec; --warn: #9a6200; --warn-50: #fff4dc;
  --r: 12px; --sh: 0 1px 2px rgba(16, 32, 56, .06), 0 4px 16px rgba(16, 32, 56, .06);
}
* { box-sizing: border-box; }
body.admin { margin: 0; font-family: "Inter", system-ui, sans-serif; font-size: 14.5px; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .6em; color: var(--navy); line-height: 1.25; }
h2 { font-size: 17px; }
code { background: #eef1f6; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.inline { display: inline; margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* raspored */
.a-side { position: fixed; inset: 0 auto 0 0; width: 250px; background: linear-gradient(180deg, var(--navy), var(--navy-d)); color: #c9d6e5; display: flex; flex-direction: column; z-index: 20; overflow-y: auto; }
.a-brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.a-brand:hover { text-decoration: none; }
.a-brand small { display: block; color: #9fb6cf; font-size: 12px; }
.a-brand strong { letter-spacing: .06em; }
.a-side nav { padding: 10px; flex: 1; }
.a-side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #dbe5f0; font-weight: 500; }
.a-side nav a i { width: 18px; text-align: center; color: #8fb3dc; }
.a-side nav a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.a-side nav a.active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.a-side nav a.active i { color: #fff; }
.a-side__sep { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #7d97b4; padding: 16px 12px 6px; }
.a-side__site { margin: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, .07); color: #fff; font-size: 13.5px; }
.a-main { margin-left: 250px; min-height: 100vh; }
.a-top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 12px 28px; }
.a-top h1 { font-size: 20px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-user { display: flex; align-items: center; gap: 14px; }
.a-user a { color: var(--ink); font-weight: 500; }
.a-burger { display: none; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--navy); }
.a-content { padding: 24px 28px 60px; max-width: 1400px; }

/* kartice */
.a-card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 22px; margin-bottom: 20px; }
.a-card--flush { padding: 0; overflow: hidden; }
.a-card--narrow { max-width: 860px; }
.a-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.a-card__head h2 { margin: 0; }
.a-card__head--pad { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.a-head-actions { display: flex; align-items: center; gap: 4px; }
.a-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.a-note { margin-top: 10px; }

/* statistika */
.a-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.a-stat { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 18px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; color: var(--ink); }
.a-stat:hover { text-decoration: none; box-shadow: 0 6px 24px rgba(16, 32, 56, .12); }
.a-stat i { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); font-size: 18px; }
.a-stat:nth-child(even) i { background: var(--red-50); color: var(--red); }
.a-stat strong { font-size: 24px; line-height: 1.1; color: var(--navy); }
.a-stat span { color: var(--muted); font-size: 13px; }
.a-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a-quick a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 500; }
.a-quick a:hover { border-color: var(--blue); background: var(--blue-50); text-decoration: none; }
.a-quick i { color: var(--blue); }
.a-list { list-style: none; margin: 0; padding: 0; }
.a-list li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.a-list li:last-child { border: 0; }
.a-list small { color: var(--muted); white-space: nowrap; }

/* tablice */
.a-table { width: 100%; border-collapse: collapse; }
.a-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.a-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.a-table tr:last-child td { border-bottom: 0; }
.a-table tbody tr:hover td { background: #fafbfd; }
.a-table .num { text-align: right; }
.a-table .actions { text-align: right; white-space: nowrap; width: 1%; }
.a-table .w1 { width: 1%; white-space: nowrap; }
.a-table .thumb { width: 64px; padding-right: 0; }
.a-table .thumb img, .a-thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; display: block; }
.a-table .strong { font-weight: 600; color: var(--navy); }
.a-table .ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-table .indent { color: var(--muted); margin-right: 6px; }
.a-table--form td { vertical-align: top; padding: 8px; }
.a-table--form input, .a-table--form textarea { width: 100%; }
.a-fileicon { color: var(--red); margin-right: 4px; }
.order { white-space: nowrap; }

/* značke i gumbi */
.a-badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #eef1f6; color: #3c4858; border: 0; font-family: inherit; }
.a-badge--ok { background: var(--ok-50); color: var(--ok); }
.a-badge--warn { background: var(--warn-50); color: var(--warn); }
.a-badge--info { background: var(--blue-50); color: var(--blue); }
.a-badge--btn { cursor: pointer; }
.a-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.a-btn:hover { border-color: #c7d0dc; text-decoration: none; background: #f8fafc; }
.a-btn--primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.a-btn--primary:hover { background: #0a52ab; color: #fff; }
.a-btn--ghost { background: transparent; }
.a-btn--sm { padding: 6px 12px; font-size: 13px; }
.a-btn--block { width: 100%; }
.a-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: #536176; cursor: pointer; font-size: 14px; vertical-align: middle; }
.a-icon:hover { background: #eef1f6; color: var(--navy); text-decoration: none; }
.a-icon--danger:hover { background: var(--red-50); color: var(--red); }
.a-icon.ghost { visibility: hidden; }
.a-link { color: var(--blue); cursor: pointer; text-decoration: underline; }

/* alatna traka */
.a-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.a-toolbar p { margin: 0; max-width: 820px; }
.a-filter { display: flex; gap: 8px; }
.a-filter input, .a-filter select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; min-width: 220px; }

/* obrasci */
.a-form--split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.a-card--side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }
.a-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 16px; }
.a-fields--menu { grid-template-columns: 100px 1fr 1fr; }
.a-fields--quick { grid-template-columns: 1fr 1fr 160px 1.4fr; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.a-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.a-field--wide { grid-column: 1 / -1; }
.a-field > span { font-weight: 600; font-size: 13px; color: #334155; }
.a-field small { color: var(--muted); font-size: 12.5px; }
.a-field input, .a-field select, .a-field textarea, .a-table--form input, .a-table--form textarea {
  padding: 10px 12px; border: 1px solid #d5dce6; border-radius: 9px; font: inherit; background: #fff; color: var(--ink); width: 100%; }
.a-field textarea { resize: vertical; min-height: 70px; }
.a-field input:focus, .a-field select:focus, .a-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 95, 198, .15); }
.a-card > .a-field + .a-field { margin-top: 16px; }
.a-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; grid-column: 1 / -1; }
.a-check input { width: 18px; height: 18px; accent-color: var(--blue); }
.a-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.a-actions--sticky { position: sticky; bottom: 0; background: rgba(243, 245, 249, .95); padding: 14px 0; backdrop-filter: blur(6px); }
.a-file__row { display: flex; gap: 8px; flex-wrap: wrap; }
.a-card--side .a-file__row input[type=text] { flex-basis: 100%; }
.a-file__row .loading { opacity: .5; pointer-events: none; }
.a-file__row input[type=text] { flex: 1; }
.a-file__row .a-btn { cursor: pointer; }
.a-file__preview { max-height: 160px; max-width: 100%; border-radius: 9px; margin-top: 6px; object-fit: contain; align-self: flex-start; border: 1px solid var(--line); }
.a-inline-form { display: flex; gap: 14px; align-items: flex-end; padding: 16px 20px; background: #f8fafc; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.a-card .a-inline-form { padding: 0; background: none; border: 0; }
.a-inline-form .a-field { flex: 1; min-width: 220px; }
.a-menuitem--new { border: 2px dashed #cfd8e4; box-shadow: none; }
.a-menuitem h3 { font-size: 15px; }
.a-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.a-tabs a { padding: 7px 14px; border-radius: 999px; background: #fff; box-shadow: var(--sh); color: var(--ink); font-weight: 500; }
.a-tabs a.active { background: var(--navy); color: #fff; }
.a-pages { display: flex; gap: 6px; margin-top: 16px; }
.a-pages a { padding: 6px 12px; background: #fff; border-radius: 8px; box-shadow: var(--sh); }
.a-pages a.active { background: var(--blue); color: #fff; }

/* poruke */
.a-flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; border-left: 4px solid var(--ok); background: var(--ok-50); color: #0f5132; }
.a-flash--err { border-color: var(--red); background: var(--red-50); color: #8a0f16; }
.a-flash--warn { border-color: #e0a100; background: var(--warn-50); color: #6b4500; }
.a-login .a-flash { max-width: 420px; margin: 0 auto 16px; }

/* datoteke */
.a-dropzone { border: 2px dashed #c7d2df; border-radius: 12px; padding: 30px; text-align: center; transition: .2s; }
.a-dropzone.over { border-color: var(--blue); background: var(--blue-50); }
.a-dropzone > i { font-size: 34px; color: var(--blue); }
.a-dropzone p { margin: 8px 0 4px; }
.a-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.a-filecard { background: #fff; border-radius: 11px; box-shadow: var(--sh); overflow: hidden; display: flex; flex-direction: column; }
.a-filecard__prev { height: 120px; display: grid; place-items: center; background: #f1f4f8; font-size: 40px; color: var(--red); }
.a-filecard__prev img { width: 100%; height: 100%; object-fit: cover; }
.a-filecard__body { padding: 10px 12px 4px; min-width: 0; }
.a-filecard__body strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.a-filecard__act { display: flex; justify-content: flex-end; padding: 0 6px 6px; }

/* odabir datoteke (modal) */
.a-modal { position: fixed; inset: 0; background: rgba(12, 35, 56, .55); display: grid; place-items: center; z-index: 100; padding: 20px; }
.a-modal__box { background: #fff; border-radius: 14px; width: min(900px, 100%); max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.a-modal__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 10px; }
.a-modal__head input { flex: 1; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.a-modal__body { overflow: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.a-modal__item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; text-align: left; padding: 0; font: inherit; }
.a-modal__item:hover { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 95, 198, .15); }
.a-modal__item span { display: block; padding: 6px 8px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-modal__item div { height: 96px; display: grid; place-items: center; background: #f1f4f8; font-size: 32px; color: var(--red); }
.a-modal__item img { width: 100%; height: 100%; object-fit: cover; }

/* prijava */
.a-login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 30px 16px; background: radial-gradient(circle at 20% 0%, #24597f, transparent 50%), linear-gradient(160deg, var(--navy), var(--navy-d)); }
.a-login__box { background: #fff; width: 100%; max-width: 420px; margin: 0 auto; border-radius: 16px; padding: 34px 32px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.a-login__box img { margin: -10px auto 0; }
.a-login__box h1 { margin: 0; font-size: 22px; }
.a-login__box p { margin: -8px 0 6px; color: var(--muted); }
.a-login__box .a-field { text-align: left; }
.a-login__back { font-size: 13px; color: var(--muted); }

/* TinyMCE */
.tox-tinymce { border-radius: 10px !important; border-color: #d5dce6 !important; }

@media (max-width: 1100px) {
  .a-form--split { grid-template-columns: 1fr; }
  .a-card--side { position: static; }
  .a-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .a-side { transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .a-side.open { transform: none; }
  .a-main { margin-left: 0; }
  .a-burger { display: block; }
  .a-top { padding: 10px 16px; }
  .a-user a span, .a-user .a-btn { font-size: 0; gap: 0; padding: 8px; }
  .a-user .a-btn i { font-size: 14px; }
  .a-content { padding: 16px 12px 50px; }
  .a-fields, .a-fields--menu, .a-fields--quick { grid-template-columns: 1fr; }
  .a-table { display: block; overflow-x: auto; }
  .a-quick { grid-template-columns: 1fr; }
  .a-filter input, .a-filter select { min-width: 0; width: 100%; }
}
