/* Účtovný systém Mensy Slovensko: doplnky k jadru (mysme.css a responsive.css). */

/* Stránka modulu */
.ucto-points { padding-left: 1.1rem; }
.ucto-points li { margin-bottom: .45rem; }
.ucto-points li::marker { color: var(--vz-primary); }

/* Dlaždice modulov na prehľade */
.ucto-mod { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--vz-border-color); border-radius: 8px; color: var(--vz-body-color); height: 100%; transition: border-color .15s, box-shadow .15s; }
.ucto-mod:hover { border-color: var(--vz-primary); box-shadow: 0 2px 8px rgba(13, 68, 118, .08); color: var(--vz-body-color); }
.ucto-mod .ms-tile-ico { width: 40px; height: 40px; font-size: 19px; flex-shrink: 0; }
.ucto-mod-t { font-weight: 600; font-size: 14px; display: block; }
.ucto-mod-s { font-size: 12px; color: var(--vz-secondary-color); display: block; }

/* Denník a zostavy */
.uc-table tr.uc-storno td { color: var(--vz-secondary-color); }
.uc-table tr.uc-storno .ms-t { text-decoration: line-through; }
.uc-lines td { vertical-align: middle; }
.uc-line-more td { background: var(--vz-light-bg-subtle, rgba(0, 0, 0, .02)); border-top: 0; }
.uc-report td, .uc-report th { white-space: nowrap; }
.uc-report td:nth-child(2) { white-space: normal; }
.uc-book .form-select-sm, .uc-book .form-control-sm { font-size: 13px; }

/* Tlač zostáv */
.uc-print .ms-list-table td.uc-num, .uc-print .ms-list-table th.uc-num { text-align: right; white-space: nowrap; }
.uc-print .ms-list-table tr.uc-bold td { font-weight: 600; }
.uc-print .ms-list-table tfoot td { border-top: 2px solid #333; }
.uc-print .ms-list-sheet.uc-wide { width: 297mm; }
@media print { .uc-print .ms-list-sheet.uc-wide { width: auto; } .uc-print .ms-list-table { font-size: 9pt; } }

/* Prehľad hospodárenia */
.uc-kpi-big .uc-kpi-val { font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.uc-kpi-ind .card-body { display: flex; flex-direction: column; gap: 4px; }
.uc-chart { width: 100%; height: auto; display: block; }
.uc-chart .uc-grid { stroke: var(--vz-border-color); stroke-width: 1; }
.uc-chart .uc-axis { fill: var(--vz-secondary-color); font-size: 11px; }
.uc-bar-in { fill: var(--vz-success); background: var(--vz-success); }
.uc-bar-out { fill: var(--vz-danger); background: var(--vz-danger); }
.uc-chart .uc-future { opacity: .35; }
.uc-legend { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.uc-chip:hover { background: var(--vz-primary); color: #fff !important; }
.uc-steps > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-grant-card .progress { height: 6px; }
@media (max-width: 575.98px) {
    .uc-chart .uc-axis { font-size: 15px; }
    .uc-kpi-big .uc-kpi-val { font-size: 1.25rem; }
    .uc-steps { flex-wrap: wrap; }
    .uc-steps > div { flex: 1 1 45%; }
}
@media print {
    .uc-kpi-big, .uc-kpi-ind { break-inside: avoid; }
    .uc-chart .uc-future { opacity: .25; }
    .uc-bar-in, .uc-bar-out, .uc-legend { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* 0.1.9: účtovný rok v menu, platí pre všetky stránky účtovníctva */
.uc-ny-li { list-style: none; padding: 2px 12px 8px; }
.uc-ny { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; padding: 8px 10px 9px; }
.uc-ny-l { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--vz-vertical-menu-title-color); margin-bottom: 4px; padding: 0 4px; }
.uc-ny-closed { text-transform: none; letter-spacing: 0; font-size: 11px; color: #f7b84b; }
.uc-ny-row { display: flex; align-items: center; gap: 6px; }
.uc-ny-arrow { flex: 0 0 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: rgba(255, 255, 255, .08); font-size: 18px; transition: background .15s; }
.uc-ny-arrow:hover, .uc-ny-arrow:focus-visible { background: var(--vz-primary); color: #fff; }
.uc-ny-arrow.is-off { opacity: .25; }
.uc-ny-sel { flex: 1 1 auto; min-width: 0; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-weight: 600; font-size: 16px; text-align: center; text-align-last: center; appearance: none; -webkit-appearance: none; cursor: pointer; padding: 0 4px; }
.uc-ny-sel:hover, .uc-ny-sel:focus { background: rgba(255, 255, 255, .08); outline: none; }
.uc-ny-sel option { color: #212529; background: #fff; }
:root[data-sidebar-size=sm] .uc-ny-li { display: none; }

/* Súhrnné karty, rovnaké na všetkých stránkach */
.uc-stat .card-body { padding: 14px 16px; }
.uc-stat-l { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--vz-secondary-color); margin-bottom: 4px; }
.uc-stat-l i { font-size: 16px; color: var(--vz-primary); }
.uc-stat-v { font-size: 1.15rem; font-weight: 600; white-space: nowrap; line-height: 1.3; }
.uc-stat-r { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.uc-stat-r > span:first-child { color: var(--vz-secondary-color); }
.uc-stat-r > span:last-child { white-space: nowrap; font-weight: 500; }
.uc-stat-s { font-size: 12px; color: var(--vz-secondary-color); margin-top: 2px; }
a.uc-stat-link { color: var(--vz-body-color); border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
a.uc-stat-link:hover { border-color: var(--vz-primary); color: var(--vz-body-color); }
a.uc-stat-link.is-active { border-color: var(--vz-primary); box-shadow: inset 0 -3px 0 var(--vz-primary); }
@media (max-width: 575.98px) { .uc-stat-v { font-size: 1rem; } .uc-stat .card-body { padding: 12px; } }

/* Smer pohybu: dve samostatné tlačidlá s odstupom */
.uc-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.uc-dir .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px !important; border: 1px solid var(--vz-border-color); background: var(--vz-secondary-bg, #fff); color: var(--vz-body-color); font-weight: 500; }
.uc-dir .btn i { font-size: 17px; }
.uc-dir .uc-dir-in i { color: var(--vz-success); }
.uc-dir .uc-dir-out i { color: var(--vz-danger); }
.uc-dir .btn:hover { border-color: var(--vz-primary); }
.uc-dir .btn-check:checked + .uc-dir-in { background: var(--vz-success); border-color: var(--vz-success); color: #fff; }
.uc-dir .btn-check:checked + .uc-dir-out { background: var(--vz-danger); border-color: var(--vz-danger); color: #fff; }
.uc-dir .btn-check:checked + .btn i { color: #fff; }
.uc-dir .btn-check:focus-visible + .btn { box-shadow: 0 0 0 .2rem rgba(13, 68, 118, .25); }

/* Tabuľky účtovníctva: jednotné hlavičky, okraje a riadky */
.uc-page .table > thead > tr > th { background: var(--vz-light-bg-subtle, #f3f6f9); color: var(--vz-secondary-color); font-size: 12px; font-weight: 600; white-space: nowrap; border-bottom-width: 1px; padding-top: .6rem; padding-bottom: .6rem; }
.uc-page .card .table > :not(caption) > tr > :first-child { padding-left: 1rem; }
.uc-page .card .table > :not(caption) > tr > :last-child { padding-right: 1rem; }
.uc-page .card .table-sm > tbody > tr > td { padding-top: .5rem; padding-bottom: .5rem; }
.uc-page .card .table td { font-size: 13px; }
.uc-page .card .table td .ms-t { font-size: 14px; }
.uc-page .card-header .card-title { font-size: 15px; }
.uc-col-bar { width: 140px; }
.ms-tb .ms-tb-year { order: 1; }

/* Graf: zvýraznenie mesiaca a bublina s číslami */
.uc-chart-wrap { position: relative; }
.uc-chart .uc-hit { fill: transparent; }
.uc-chart .uc-m { cursor: pointer; outline: none; }
.uc-chart .uc-m rect:not(.uc-hit) { transition: opacity .15s; }
.uc-chart.is-hover .uc-m:not(.is-on) rect:not(.uc-hit) { opacity: .35; }
.uc-chart .uc-m.is-on .uc-hit, .uc-chart .uc-m:focus-visible .uc-hit { fill: rgba(13, 68, 118, .06); }
.uc-chart .uc-m.uc-future rect:not(.uc-hit) { opacity: .35; }
.uc-tip { position: absolute; z-index: 5; min-width: 190px; background: var(--vz-secondary-bg, #fff); border: 1px solid var(--vz-border-color); border-radius: 8px; box-shadow: 0 6px 18px rgba(8, 31, 52, .15); padding: 8px 10px; font-size: 13px; pointer-events: none; }
.uc-tip-h { font-weight: 600; margin-bottom: 4px; }
.uc-tip-r { display: flex; justify-content: space-between; gap: 14px; }
.uc-tip-l::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.uc-tip-l.is-in::before { background: var(--vz-success); }
.uc-tip-l.is-out::before { background: var(--vz-danger); }
.uc-tip-l.is-pos::before, .uc-tip-l.is-neg::before { background: transparent; }
.uc-tip-v { font-weight: 500; white-space: nowrap; }
.uc-tip-sum { border-top: 1px solid var(--vz-border-color); margin-top: 4px; padding-top: 4px; font-weight: 600; }
.uc-tip-sum .is-neg + .uc-tip-v { color: var(--vz-danger); }
.uc-tip-sum .is-pos + .uc-tip-v { color: var(--vz-success); }

/* Hlavičkový papier tlačových zostáv */
.uc-print-only { display: none; }
.uc-lh { display: flex; align-items: center; justify-content: space-between; gap: 10mm; margin-bottom: 3mm; }
.uc-lh-logo { height: 15mm; width: auto; }
.uc-lh-org { text-align: right; font-size: 8.5pt; line-height: 1.45; color: #3f4a56; }
.uc-lh-name { font-size: 11pt; font-weight: 700; color: #0D4476; }
.uc-lh-stripe { display: flex; height: 1.4mm; margin-bottom: 7mm; }
.uc-lh-stripe span { flex: 1 1 0; }
.uc-lh-stripe span:nth-child(1) { background: #73BBFA; }
.uc-lh-stripe span:nth-child(2) { background: #F5525A; }
.uc-lh-stripe span:nth-child(3) { background: #FAAA00; }
.uc-lh-doc { margin-bottom: 6mm; }
.uc-lh-title { font-size: 16pt; font-weight: 700; color: #0D4476; margin: 0 0 1.5mm; }
.uc-lh-sub { font-size: 9pt; color: #505a66; margin: 0; }
.uc-lh-note { font-size: 7.5pt; color: #6b7785; margin: 4mm 0 0; }
.uc-print .ms-list-table thead th { background: #eef3f8; }
.uc-print .ms-list-table tbody tr:nth-child(even) td { background: #f8fafc; }
@media print {
    .uc-print .ms-list-sheet { padding: 0; }
    .uc-print .ms-list-table thead { display: table-header-group; }
    .uc-print-only { display: block; }
    .uc-lh, .uc-lh-stripe span, .uc-print .ms-list-table thead th, .uc-print .ms-list-table tbody tr td { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    body:has(.uc-page) .app-menu, body:has(.uc-page) #page-topbar, body:has(.uc-page) .footer, body:has(.uc-page) .uc-demo-bar, body:has(.uc-page) .ms-page-title, body:has(.uc-page) .vertical-overlay { display: none !important; }
    body:has(.uc-page) .main-content { margin-left: 0 !important; }
    body:has(.uc-page) .page-content { padding: 0 !important; }
    body:has(.uc-page) .uc-page .card { box-shadow: none !important; border: 1px solid #dfe5ec; break-inside: avoid; }
    .uc-page .btn, .uc-page .uc-tip { display: none !important; }
    .uc-page a { color: inherit; text-decoration: none; }
}
@media (max-width: 575.98px) {
    .uc-stats { --bs-gutter-x: .5rem; --bs-gutter-y: .5rem; }
    .uc-stats .col-4 .uc-stat-v { font-size: .9rem; }
    .uc-stats .col-4 .uc-stat-l { font-size: 12px; }
    .uc-stats .col-4 .uc-stat-l i { display: none; }
    .uc-stats .col-4 .uc-stat .card-body { padding: 10px; }
}
.uc-print .ms-list-table td.uc-nw { white-space: nowrap; }
@media print {
    body:has(.uc-page), body:has(.uc-page) .main-content, body:has(.uc-page) .page-content { background: #fff !important; }
}

/* 0.1.10: rok bez nadpisu v rámčeku, zúžené menu s rokom a šípkami */
.uc-ny { padding: 6px; }
.uc-ny-closed { display: block; text-align: center; font-size: 11px; color: #f7b84b; margin-top: 4px; }
.uc-ny-sm { display: none; list-style: none; }
:root[data-sidebar-size=sm] .uc-ny-sm { display: block; padding: 6px 0 10px; }
:root[data-sidebar-size=sm] .navbar-menu .navbar-nav .uc-ny-sm + .menu-title { display: none; }
.uc-nys { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 0 auto; width: 52px; padding: 6px 0; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.uc-nys-y { color: #fff; font-weight: 600; font-size: 13px; line-height: 1; }
.uc-nys-y.is-closed { color: #f7b84b; }
.uc-nys-a { display: flex; gap: 2px; }
.uc-nys-a a, .uc-nys-a span { width: 22px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: #fff; font-size: 16px; background: rgba(255, 255, 255, .08); }
.uc-nys-a a:hover { background: var(--vz-primary); }
.uc-nys-a .is-off { opacity: .25; }

/* Prepis dokladu */
.uc-read-status { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; background: var(--vz-light-bg-subtle, #f3f6f9); }
.uc-read-status.is-busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border: 2px solid var(--vz-primary); border-right-color: transparent; border-radius: 50%; animation: uc-spin .8s linear infinite; }
.uc-read-status.is-ok { background: rgba(10, 179, 156, .08); border: 1px solid rgba(10, 179, 156, .3); }
.uc-read-status.is-warn { background: rgba(247, 184, 75, .12); border: 1px solid rgba(247, 184, 75, .4); }
.uc-read-list { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; }
.uc-read-list dt { font-weight: 400; color: var(--vz-secondary-color); }
.uc-read-list dd { margin: 0; word-break: break-word; }
.uc-read-filled { background-color: rgba(10, 179, 156, .08) !important; border-color: rgba(10, 179, 156, .6) !important; }
@keyframes uc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .uc-read-status.is-busy::before { animation: none; } }

/* 0.1.11: tlačové zostavy vždy na šírku A4, hlavičky stĺpcov sa môžu zalomiť, pri veľa stĺpcoch menšie písmo */
.uc-print .ms-list-table { table-layout: auto; width: 100%; }
.uc-print .ms-list-table th { white-space: normal; vertical-align: bottom; line-height: 1.25; hyphens: manual; }
.uc-print .ms-list-table th.uc-num { text-align: right; }
.uc-print .ms-list-table td.uc-num { white-space: nowrap; }
.uc-print .uc-dense .ms-list-table { font-size: 7.5pt; }
.uc-print .uc-dense .ms-list-table th, .uc-print .uc-dense .ms-list-table td { padding: 1.4mm 1mm; }
.uc-print .ms-list-sheet.uc-wide { width: 297mm; min-height: 210mm; box-sizing: border-box; padding: 12mm; }
@media print { .uc-print .ms-list-sheet.uc-wide { width: auto; min-height: 0; padding: 0; } }
@media print {
    html, body.uc-print { background: #fff !important; }
    /* Súčet len na konci zostavy, nie na každej strane. Hlavička stĺpcov sa opakuje. */
    .uc-print .ms-list-table tfoot { display: table-row-group; }
}

/* 0.1.13: tabuľky na mobile ako karty (ucto.js pridá uc-cards, popisy buniek a nadpis karty) */
.uc-cn-in { display: none; }
@media (max-width: 767.98px) {
    .table-responsive:has(> table.uc-cards) { overflow: visible; }
    table.uc-cards, table.uc-cards > tbody, table.uc-cards > tfoot, table.uc-cards > tbody > tr, table.uc-cards > tfoot > tr { display: block; width: 100%; }
    table.uc-cards > thead { display: none; }
    table.uc-cards > tbody > tr, table.uc-cards > tfoot > tr { display: flex; flex-direction: column; padding: 10px 14px; border-bottom: 1px solid var(--vz-border-color); }
    table.uc-cards > * > tr > td.uc-ct { order: -1; }
    table.uc-cards > tbody > tr:last-child { border-bottom: 0; }
    table.uc-cards > tfoot > tr { border-top: 1px solid var(--vz-border-color); border-bottom: 0; }
    table.uc-cards > * > tr > td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 0 !important; border: 0 !important; text-align: right !important; white-space: normal; width: auto !important; background: transparent !important; box-shadow: none !important; }
    table.uc-cards > * > tr > td::before { content: attr(data-label); flex: 0 1 auto; text-align: left; font-size: 12px; font-weight: 400; color: var(--vz-secondary-color); }
    table.uc-cards > * > tr > td.uc-ct { display: block; text-align: left !important; font-weight: 500; padding-bottom: 4px !important; }
    table.uc-cards > * > tr > td.uc-ct::before, table.uc-cards > * > tr > td.uc-cn { display: none; content: none; }
    table.uc-cards > * > tr > td.uc-ce { display: none; }
    table.uc-cards > * > tr > td > .d-flex, table.uc-cards > * > tr > td > .progress { flex: 0 1 55%; }
    table.uc-cards .uc-cn-in { display: inline-block; min-width: 22px; margin-right: 6px; font-size: 12px; font-weight: 400; color: var(--vz-secondary-color); }
    table.uc-cards > tbody > tr.table-light { background: var(--vz-light); }
}

/* 0.1.13: na mobile s plávajúcim tlačidlom má pätička bežnú výšku bez bielej plochy. Obsah končí nad tlačidlom, verzia je vľavo od neho. */
@media (max-width: 767.98px) {
    .main-content:has(.ms-tb-add, .ms-fab) .footer { height: 60px !important; padding-bottom: 0 !important; }
    .main-content:has(.ms-tb-add, .ms-fab) .footer .row > div:last-child { padding-right: 72px; }
    .main-content:has(.ms-tb-add, .ms-fab) .page-content { padding-bottom: 96px; }
    .uc-page table.ms-stack td.ms-end { flex: 0 0 auto; max-width: none; overflow: visible; text-overflow: clip; }
}
.uc-zq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.uc-zq-f { display: flex; align-items: center; gap: 6px; }
@media (max-width: 575.98px) {
    .uc-zq { width: 100%; }
    .uc-zq-f { flex: 1 1 calc(50% - 7px); flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; }
    .uc-zq-f .form-select { width: 100% !important; }
    .uc-ch > .card-title { flex: 1 1 100%; }
}
@media (max-width: 767.98px) {
    table.uc-cards > * > tr > td.uc-acts { flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding-top: 6px !important; }
    table.uc-cards > * > tr > td.uc-acts::before { flex: 1 1 100%; }
    table.uc-cards > * > tr > td.uc-acts form { margin: 0; }
}
.uc-demo-bar { position: relative; z-index: 3; }

/* 0.1.13: bunka na konci riadku zoznamu (suma, počet súborov) sa na mobile neoreže */
@media (max-width: 767.98px) { table.ms-stack td.ms-end { flex-shrink: 0; } }
.uc-chart.uc-chart-sm .uc-axis { font-size: 11px; }
@media (max-width: 575.98px) { .uc-chart.uc-chart-sm .uc-axis { font-size: 11px; } }
