* { box-sizing: border-box; }
body { margin: 0; background: #f5f0e6; color: #14213d; font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; }
a { color: #14213d; }
h1 { font-size: 1.5em; margin: 8px 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
h2 { font-size: 1.15em; margin: 0 0 12px; }
h3 { font-size: 1em; margin: 18px 0 8px; }
h3 small { font-weight: 400; color: #64748b; }
small { color: #64748b; display: block; }

.a-in { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main.a-in { padding-top: 20px; padding-bottom: 40px; }
.a-top { background: #14213d; color: #fff; }
.a-top .a-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; }
.a-brand { color: #fff; font-weight: 700; text-decoration: none; }
.a-top { position: sticky; top: 0; z-index: 50; }
.a-top .a-in { flex-wrap: nowrap; }
.a-nav { display: flex; align-items: center; gap: 4px; }
.a-top nav a, .a-linkbtn { color: #cbd5e1; text-decoration: none; font-size: .95em; padding: 8px 12px; border-radius: 8px; transition: background .15s, color .15s; }
.a-top nav a:hover, .a-linkbtn:hover { color: #fff; background: rgba(255,255,255,.1); }
.a-top nav a.is-active { color: #fff; background: rgba(255,255,255,.16); font-weight: 600; }
.a-nav-out { margin-left: 8px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.2); }
.a-burger { display: none; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; border-radius: 8px; cursor: pointer; position: relative; }
.a-burger:hover { background: rgba(255,255,255,.1); }
.a-burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .2s, top .25s; }
.a-burger span:nth-child(1) { top: 15px; }
.a-burger span:nth-child(2) { top: 21px; }
.a-burger span:nth-child(3) { top: 27px; }
.is-open .a-burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.is-open .a-burger span:nth-child(2) { opacity: 0; }
.is-open .a-burger span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
.a-linkbtn { background: none; border: 0; cursor: pointer; font: inherit; font-size: .95em; }
.a-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

.a-card { background: #fffcf5; border: 1px solid #ddd3bf; border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.a-flush { padding: 0; overflow-x: auto; }
.a-narrow { max-width: 460px; }
.a-card.a-narrow { margin-left: auto; margin-right: auto; }
.a-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.a-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.a-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

label { display: block; font-weight: 600; margin: 0 0 12px; font-size: .95em; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=datetime-local], select, textarea {
	display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-weight: 400; background: #fff; color: inherit;
}
.a-inline input[type=password] { width: 150px; margin: 0; padding: 6px 8px; }
.a-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin-bottom: 6px; }
.a-check input { margin-top: 4px; }

.a-btn { display: inline-block; white-space: nowrap; margin-top: 10px; padding: 10px 18px; border: 0; border-radius: 8px; background: #14213d; color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.a-btn--ghost { background: #fff; color: #14213d; border: 1px solid #14213d; }
.a-btn--sm { margin: 0; padding: 6px 10px; font-size: .85em; }
form.a-card .a-btn { width: 100%; }

.a-flash { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.a-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }

.a-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.a-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0; color: inherit; text-decoration: none; font-size: .9em; }
.a-tabs a.is-active { background: #0f172a; color: #fff; border-color: #0f172a; }
.a-tabs i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.a-tabs span { opacity: .65; }
.a-filter { margin-bottom: 12px; max-width: 280px; }

.a-table { width: 100%; border-collapse: collapse; }
.a-table th, .a-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.a-card:not(.a-flush) .a-table th { width: 34%; color: #475569; font-weight: 600; padding-left: 0; }
.a-card:not(.a-flush) .a-table td { padding-right: 0; word-break: break-word; }
.a-list thead th { background: #f8fafc; color: #475569; font-size: .85em; white-space: nowrap; }
.a-list tbody tr { cursor: pointer; }
.a-list tbody tr:hover { background: #f8fafc; }
.a-flush .a-list th, .a-flush .a-list td { padding: 10px 14px; }
.a-trunc { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-btn--danger { color: #b42318; border-color: #e7b4ad; }

/* Overovatelia */
.a-users-layout { display: grid; gap: 16px; align-items: start; }
.a-users { padding: 0; }
.a-user { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 18px; }
.a-user + .a-user { border-top: 1px solid #ebe4d4; }
.a-user.is-disabled .a-user-info { opacity: .55; }
.a-user-name { font-weight: 700; font-size: 1.05em; display: flex; align-items: center; gap: 8px; }
.a-you { font-size: .7em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: #14213d; color: #f5f0e6; padding: 1px 7px; border-radius: 999px; }
.a-user-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.a-login { font-family: ui-monospace, Menlo, monospace; font-size: .88em; color: #6d6656; margin-right: 4px; }
.a-tag { font-size: .78em; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #ebe4d4; color: #4a4437; }
.a-tag--admin { background: #14213d; color: #f5f0e6; }
.a-tag--ok { background: #e3f1ea; color: #1f6b50; }
.a-tag--off { background: #fbe5e2; color: #a12a1c; }
.a-user-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.a-user-actions form { margin: 0; }
.a-pass { display: flex; gap: 6px; }
.a-pass input[type=password] { width: 230px; margin: 0; padding: 6px 10px; font-size: .9em; }
.a-add h2 { margin-bottom: 14px; }
.a-add small { display: inline; font-weight: 400; margin-left: 4px; }
@media (min-width: 1000px) {
	.a-users-layout { grid-template-columns: minmax(0, 1fr) 360px; }
	.a-add { position: sticky; top: 16px; }
}
@media (max-width: 600px) {
	.a-user-actions { width: 100%; }
	.a-pass { width: 100%; }
	.a-pass input[type=password] { flex: 1; width: auto; min-width: 0; }
}
.a-pill { display: inline-block; color: #fff; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.a-empty { padding: 20px; color: #64748b; margin: 0; }

.a-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.a-photos img { width: 160px; height: 160px; object-fit: cover; border-radius: 8px; border: 1px solid #e2e8f0; }
.a-map { height: 320px; border-radius: 10px; border: 1px solid #e2e8f0; }
.a-log { list-style: none; margin: 0; padding: 0; }
.a-log li { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }

@media (max-width: 860px) {
	.a-grid { grid-template-columns: 1fr; }
	.a-photos img { width: 110px; height: 110px; }
	.a-trunc { max-width: 160px; }
}
.a-brand { display: inline-flex; align-items: center; gap: 8px; }
.a-brand img { border-radius: 7px; }


/* Hamburger menu + mobil */
@media (max-width: 760px) {
	.a-burger { display: block; }
	.a-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 16px 16px; background: #14213d; border-top: 1px solid rgba(255,255,255,.12); box-shadow: 0 14px 28px rgba(20,33,61,.3); }
	.is-open .a-nav { display: flex; animation: a-drop .18s ease-out; }
	.a-top nav a, .a-linkbtn { padding: 13px 14px; font-size: 1em; text-align: left; }
	.a-nav-out { margin: 6px 0 0; padding: 6px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.15); display: block; }
	.a-nav-out .a-linkbtn { width: 100%; }
	main.a-in { padding-top: 14px; }
	.a-card { padding: 14px; border-radius: 12px; }
	.a-head .a-btn { margin-top: 0; }
	.a-tabs { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; padding-bottom: 4px; scrollbar-width: none; }
	.a-tabs::-webkit-scrollbar { display: none; }
	.a-tabs a { white-space: nowrap; flex: none; }
	.a-filter { max-width: none; }
	input[type=text], input[type=password], input[type=url], input[type=number], input[type=datetime-local], select, textarea { font-size: 16px; }

	/* zoznam hlásení ako karty */
	.a-flush { overflow: visible; background: none; border: 0; padding: 0; }
	.a-list thead { display: none; }
	.a-list, .a-list tbody { display: block; }
	.a-list tbody tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; background: #fffcf5; border: 1px solid #ddd3bf; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
	.a-flush .a-list td { display: contents; }
	.a-flush .a-list td { padding: 0; border: 0; }
	.a-list td::before { content: attr(data-l); color: #64748b; font-size: .8em; align-self: center; }
	.a-list td > * , .a-list td { min-width: 0; }
	.a-list .a-trunc { max-width: none; white-space: normal; }
	.a-list td[data-l="Číslo"] { }
}
@keyframes a-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .is-open .a-nav { animation: none; } }

.a-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 20px; }
.a-pager a, .a-pager .is-off { padding: 9px 16px; border-radius: 8px; border: 1px solid #14213d; background: #fff; color: #14213d; text-decoration: none; font-weight: 600; font-size: .9em; white-space: nowrap; }
.a-pager a:hover { background: #14213d; color: #fff; }
.a-pager .is-off { opacity: .35; border-color: #cbd5e1; }
.a-pager-info { color: #64748b; font-size: .85em; text-align: center; }
@media (max-width: 480px) { .a-pager-info { order: -1; width: 100%; } .a-pager { flex-wrap: wrap; } .a-pager a, .a-pager .is-off { flex: 1; text-align: center; } }
.a-danger { border-color: #e7b4ad; margin-top: 32px; }
.a-danger h2 { color: #b42318; }
.a-btn--danger { background: #b42318; color: #fff; border-color: #b42318; }

.a-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #c98400; color: #fff; font-size: .75em; font-weight: 700; vertical-align: 1px; }
