/* Maximstore administration — Bootstrap 5 shell and legacy form adapters. */
:root { --sidebar-width: 264px; --header-height: 80px; --accent: #6366f1; --ink: #17233b; --muted: #718096; --line: #e7ebf3; }
body { margin: 0; background: #f4f6fb; color: var(--ink); font: 14px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: #4f46e5; text-decoration: none; }
a:hover { color: #3730a3; }
:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; }
#obsah { min-height: 100vh; }
#hlavicka { height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 28px 0 18px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.header-start, .logout { display: flex; align-items: center; gap: 14px; }
.sidebar-toggle { color: #64748b; font-size: 21px; border-radius: 12px; padding: 8px 12px; }
.sidebar-toggle:hover { background: #eef2ff; color: var(--accent); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: .06em; line-height: 1.25; }
.brand-light { font-weight: 400; }
.brand small { display: block; color: #94a3b8; font-size: 9px; letter-spacing: .23em; margin-top: 5px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #818cf8, #4f46e5); color: #fff; box-shadow: 0 5px 12px #6366f133; font-size: 22px; }
.workspace-nav { display: flex; gap: 5px; flex-wrap: wrap; }
.workspace-nav a { color: #64748b; padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 500; }
.workspace-nav a:hover, .workspace-nav .active { color: #4f46e5; background: #eef2ff; }
.user-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #f0fdf4; color: #15803d; font-size: 19px; }
.user-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.logout-link { color: #94a3b8; font-size: 19px; padding: 8px; }
#levypanel { position: fixed; inset: var(--header-height) auto 0 0; width: var(--sidebar-width); background: linear-gradient(180deg, #17233b, #111b30); color: #cbd5e1; overflow-x: hidden; overflow-y: auto; z-index: 1020; transition: width .26s ease, transform .26s ease; scrollbar-width: thin; scrollbar-color: #38455e transparent; }
#levypanel-obsah { padding: 22px 14px 32px; }
#menu h2 { font-size: 10px; text-transform: uppercase; letter-spacing: .15em; color: #8291ac; margin: 22px 12px 9px; font-weight: 700; white-space: nowrap; }
#menu h2:first-child { margin-top: 0; }
#menu ul { list-style: none; padding: 0; margin: 0; }
#menu li { margin: 3px 0; }
#menu a { display: flex; align-items: center; gap: 13px; color: #b8c3d9; border-radius: 9px; padding: 9px 12px; min-height: 40px; font-size: 12px; transition: background .18s, color .18s; }
#menu a:hover { background: #ffffff0d; color: #fff; }
#menu a.active { background: linear-gradient(100deg, #6366f1, #4f46e5); color: #fff; box-shadow: 0 4px 14px #0002; }
#menu .bi { flex: 0 0 20px; font-size: 17px; text-align: center; }
.menu-label { white-space: nowrap; transition: opacity .15s; }
#hlavnipanel { margin-left: var(--sidebar-width); min-width: 0; transition: margin-left .26s ease; }
#hlavnipanel-obsah { padding: 30px; min-height: calc(100vh - var(--header-height)); }
#hlavnipanel h1 { font-size: 25px; font-weight: 700; letter-spacing: -.035em; margin: 0 0 24px; line-height: 1.4; }
#hlavnipanel h1 a { color: inherit; }
#hlavnipanel h2 { font-size: 19px; margin: 24px 0 14px; }
.form, .list-div { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 20px #1e293b04; margin-bottom: 22px; max-width: 100%; }
.form { padding: 22px; overflow-x: auto; }
.list-div { overflow-x: auto; }
.list-div .table { margin-bottom: 0; font-size: 13px; --bs-table-color: var(--ink); --bs-table-hover-bg: #f3f5ff; --bs-table-border-color: #edf0f6; }
.list-div th { background: #f8f9fd; color: #7b879c; font-size: 11px; font-weight: 700; letter-spacing: .025em; padding: 13px 14px; white-space: nowrap; }
.list-div td { padding: 12px 14px; vertical-align: middle; }
.list-div tr.alt { --bs-table-bg: #fbfcfe; }
.list-div .first-cell { font-weight: 600; }
.list-div .footer { background: #f8f9fd; text-align: right; }
.legacy-icon { display: inline-block; vertical-align: middle; font-size: 16px; line-height: 1.2; margin: 0 4px; }
a:has(> .legacy-icon) { display: inline-flex; align-items: center; justify-content: center; padding: 6px; border-radius: 7px; color: #64748b; }
a:has(> .legacy-icon):hover { color: var(--accent); background: #eef2ff; }
a:has(> .bi-x-lg):hover { color: #e11d48; background: #fff1f2; }
.bi-check-lg { color: #16a34a; }
.bi-tag { color: #f59e0b; }
input:not([type]), input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=file], select, textarea { border: 1px solid #dce2ed; border-radius: 8px; padding: 8px 11px; color: var(--ink); background-color: #fff; font: inherit; max-width: 100%; }
.form-control, .form-select { display: inline-block; width: auto; font-size: 13px; }
textarea.form-control { display: block; width: 100%; min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px #6366f118; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); cursor: pointer; }
.btn-primary, button:not(.sidebar-toggle):not(.sidebar-backdrop), input[type=submit], input[type=button], input[type=reset] { background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: 8px; padding: 8px 15px; font: inherit; font-weight: 500; cursor: pointer; }
.btn-primary:hover, input[type=submit]:hover { background: #4f46e5; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 0 0 20px; min-width: 0; }
legend { float: none; width: auto; font-size: 14px; font-weight: 700; padding: 0 8px; }
.form table { max-width: 100%; }
.form th { font-weight: 500; color: #64748b; text-align: left; padding: 8px 16px 8px 0; vertical-align: middle; }
.form td { padding: 6px 8px; }
form th, form td { vertical-align: middle; }
form label { margin-bottom: 0; }
form input[type="checkbox"], form input[type="radio"] { margin-top: 0; margin-inline-end: 8px; vertical-align: middle; }
.produktedit th label { display: block; min-width: 130px; }
.line table tr { display: inline-table; }
.flash, .error, .notice, .ok { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; border: 1px solid #c7d2fe; background: #eef2ff; color: #4338ca; }
.error, .flash.error { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.ok, .flash.success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.notice, .flash.warning, .formwarning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.required, em { color: #e11d48; font-style: normal; }
.gray { color: #94a3b8; }
.cleaner { display: none; }
.sidebar-collapsed { --sidebar-width: 76px; }
.sidebar-collapsed #menu .menu-label { width: 0; opacity: 0; overflow: hidden; }
.sidebar-collapsed #menu h2 { font-size: 0; height: 1px; margin: 18px 10px 12px; background: #ffffff15; }
.sidebar-collapsed #menu a { gap: 0; justify-content: center; }
.sidebar-collapsed #levypanel-obsah { padding-left: 10px; padding-right: 10px; }
.sidebar-backdrop { display: none; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 1100; background: #fff; padding: 10px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
#category-container .category-content { position: relative; min-height: 46px; padding: 8px; border-radius: 8px; gap: 6px; }
#category-container .category-content:hover { background: #eef2ff; }
#category-container .actions { position: static; margin-left: auto; display: flex; flex-shrink: 0; gap: 4px; }
#category-container .actions button { background: #fff; color: #64748b; border: 1px solid var(--line); padding: 4px 8px; }
#category-container .category-tree { font-size: 13px; }
#category-container .toggle { flex-shrink: 0; }
.produktedit fieldset tr { min-width: 155px; }
input.datepicker { background-image: url('/images/calendar.png'); background-repeat: no-repeat; background-position: right 8px center; padding-right: 32px; }
@media (max-width: 1100px) { .workspace-nav a { padding: 6px 8px; } .user-name { display: none; } #hlavicka { gap: 12px; } #hlavnipanel-obsah { padding: 22px; } }
@media (max-width: 767px) {
    :root, .sidebar-collapsed { --sidebar-width: 264px; --header-height: 112px; }
    #hlavicka { height: auto; min-height: var(--header-height); flex-wrap: wrap; padding: 12px 14px; gap: 8px; }
    .header-start { gap: 5px; } .brand { font-size: 13px; } .brand-mark { width: 32px; height: 32px; }
    .workspace-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; gap: 2px; }
    .workspace-nav a { white-space: nowrap; font-size: 12px; } .logout { gap: 4px; }
    #levypanel { transform: translateX(-100%); }
    #hlavnipanel { margin-left: 0; } #hlavnipanel-obsah { padding: 18px 12px; }
    .sidebar-open #levypanel { transform: translateX(0); }
    .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: var(--header-height) 0 0; z-index: 1010; background: #0f172a66; border: 0; }
    .sidebar-collapsed #menu .menu-label { width: auto; opacity: 1; }
    .sidebar-collapsed #menu h2 { font-size: 10px; height: auto; margin: 22px 12px 9px; background: none; }
    .sidebar-collapsed #menu a { justify-content: flex-start; gap: 13px; }
    .form { padding: 14px; } #hlavnipanel h1 { font-size: 22px; }
    .produktedit fieldset tr { width: 100%; } .produktedit fieldset input { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { #hlavicka, #levypanel, .sidebar-backdrop { display: none; } #hlavnipanel { margin: 0; } #hlavnipanel-obsah { padding: 0; } .list-div { overflow: visible; box-shadow: none; } }
/* Preserve presenter-supplied row colors through Bootstrap table cells. */
.list-div tr[data-color] > td { color: inherit; }
.form iframe { border: 0; }
.bi-check-circle { color: #16a34a; }
.bi-dash-circle { color: #94a3b8; }
/* Keep product images within the document flow instead of covering controls. */
.legacy-style-13 { position: static; float: right; margin: 0 0 18px 18px; object-fit: contain; }
@media (max-width: 767px) { .list-div table { min-width: 580px; } }
/* Independent, keyboard-accessible menu groups. */
#menu .menu-section h2 { margin: 12px 0 5px; font-size: 10px; height: auto; background: none; }
#menu .menu-section:first-child h2 { margin-top: 0; }
#menu .menu-section-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 8px 12px; color: #9aa9c3; background: transparent; border: 0; border-radius: 8px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-align: left; }
#menu .menu-section-toggle:hover { background: #ffffff0d; color: #fff; }
#menu .section-icon { font-size: 15px; }
#menu .section-label { flex: 1; white-space: nowrap; }
#menu .section-chevron { flex: 0 0 12px; font-size: 10px; transition: transform .24s ease; }
#menu .menu-section-toggle[aria-expanded=false] .section-chevron { transform: rotate(-90deg); }
.menu-section-items { display: grid; grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .24s ease, visibility .24s; }
.menu-section-items > ul { min-height: 0; overflow: hidden; }
.menu-section-items.is-collapsed { grid-template-rows: 0fr; visibility: hidden; }
@media (min-width: 768px) {
    .sidebar-collapsed #menu .menu-section-toggle { justify-content: center; gap: 0; }
    .sidebar-collapsed #menu .section-label, .sidebar-collapsed #menu .section-chevron { display: none; }
}
@media (prefers-reduced-motion: reduce) { .menu-section-items, #menu .section-chevron { transition: none; } }
/* Compact product overview; scrolling is confined to the table. */
.product-list { overflow: hidden; }
.product-table-scroll { overflow-x: auto; scrollbar-color: #818cf8 #eef2ff; scrollbar-width: thin; }
.product-table-scroll::-webkit-scrollbar { height: 10px; }
.product-table-scroll::-webkit-scrollbar-track { background: #eef2ff; }
.product-table-scroll::-webkit-scrollbar-thumb { background: #818cf8; border: 2px solid #eef2ff; border-radius: 8px; }
.product-list table { table-layout: fixed; width: 100%; min-width: 1200px; }
.product-list .table { font-size: 12px; }
.product-list th, .product-list td { padding: 7px 6px; overflow-wrap: anywhere; }
.product-list th { width: auto; font-size: 10px; }
.product-list .legacy-icon { margin: 0 2px; font-size: 14px; }
.product-list a:has(> .legacy-icon) { padding: 4px; }
.product-list td:nth-child(6), .product-list td:nth-child(7), .product-list td:nth-child(9), .product-list td:nth-child(11) { white-space: nowrap; }
.product-col-1 { width: 4%; }
.product-col-2 { width: 6%; }
.product-col-3 { width: 3%; }
.product-col-4 { width: 15%; }
.product-col-5 { width: 14%; }
.product-col-6 { width: 6%; }
.product-col-7 { width: 6%; }
.product-col-8 { width: 8%; }
.product-col-9 { width: 7%; }
.product-col-10 { width: 16%; }
.product-col-11 { width: 4%; }
.product-col-12 { width: 11%; }
.product-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 12px; min-height: 58px; background: #fff; }
.product-pagination:first-child { border-bottom: 1px solid var(--line); }
.product-pagination:last-child { border-top: 1px solid var(--line); }
.pagination-prev { grid-column: 1; grid-row: 1; justify-self: start; white-space: nowrap; }
.pagination-page { grid-column: 2; grid-row: 1; white-space: nowrap; }
.pagination-next { grid-column: 3; grid-row: 1; justify-self: end; white-space: nowrap; }
#paginatorupper, #paginatorbottom { width: 60px; padding: 5px 6px; text-align: center; }
.product-scroll-hint { display: none; }
@media (max-width: 1599px) {
    .product-scroll-hint { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 11px; color: #6366f1; background: #f5f6ff; }
}
@media (max-width: 767px) {
    .product-table-scroll { overflow-x: scroll; }
    .product-pagination { padding: 8px 6px; gap: 4px; font-size: 12px; }
    .product-pagination a:has(> .legacy-icon) { padding: 5px 3px; }
    #paginatorupper, #paginatorbottom { width: 48px; }
}

/* Indent child links without narrowing the collapsed icon rail. */
#menu .menu-section-items > ul { padding-left: 20px; }
@media (min-width: 768px) { .sidebar-collapsed #menu .menu-section-items > ul { padding-left: 0; } }
#back-to-top { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 1040; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid #ffffff40; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 6px 20px #4f46e540; transition: background .18s, transform .18s; }
#back-to-top:hover { background: #4f46e5; transform: translateY(-3px); }
@media (max-width: 767px) { #back-to-top { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { #back-to-top { transition: none; } }
@media print { #back-to-top { display: none; } }

/* The current administration is identified by its URL prefix. */
.workspace-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand-mark { flex-shrink: 0; }
.brand-mark svg { display: block; }
body[data-workspace="demo"] .brand-mark { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 5px 12px #dc262633; }
.workspace-nav a[data-workspace="demo"].active, .workspace-nav a[data-workspace="demo"]:hover { color: #b91c1c; background: #fef2f2; }

/* Demo administration: a distinct red header and sidebar with dark text. */
body[data-workspace="demo"] #hlavicka { background: #fdd; border-bottom-color: #fca5a5; }
body[data-workspace="demo"] .brand small,
body[data-workspace="demo"] .sidebar-toggle,
body[data-workspace="demo"] .logout-link,
body[data-workspace="demo"] .workspace-nav a { color: #7f1d1d; }
body[data-workspace="demo"] .sidebar-toggle:hover,
body[data-workspace="demo"] .logout-link:hover,
body[data-workspace="demo"] .workspace-nav a:hover { color: #450a0a; background: #fecaca; }
body[data-workspace="demo"] .workspace-nav a.active { color: #fff; background: #b91c1c; }
body[data-workspace="demo"] .workspace-nav a.active:hover { background: #991b1b; }
body[data-workspace="demo"] .user-avatar { color: #991b1b; background: #fff1f2; }
body[data-workspace="demo"] #levypanel { color: #7f1d1d; background: #fff1f2; border-right: 1px solid #fecaca; scrollbar-color: #b91c1c #ffe4e6; }
body[data-workspace="demo"] #menu a { color: #7f1d1d; }
body[data-workspace="demo"] #menu .menu-section-toggle { color: #9f1239; }
body[data-workspace="demo"] #menu a:hover,
body[data-workspace="demo"] #menu .menu-section-toggle:hover { color: #450a0a; background: #fecaca; }
body[data-workspace="demo"] #menu a.active { color: #fff; background: #b91c1c; box-shadow: 0 4px 14px #b91c1c20; }
body[data-workspace="demo"] #menu a.active:hover { background: #991b1b; }
body[data-workspace="demo"] #hlavicka :focus-visible,
body[data-workspace="demo"] #menu :focus-visible { outline: 3px solid #9f1239; outline-offset: 2px; }
