:root {
    --mrevi-orange: #fd7e14;
    --mrevi-dark-blue: #15273f;
}

html,
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(82, 101, 117, 0.48) transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(82, 101, 117, 0.42);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 119, 163, 0.62);
    background-clip: padding-box;
}

.mrevi-photo-overlay-text {
    color: #ffffff !important;
    text-shadow:
        0 0 1px var(--mrevi-dark-blue),
        0 0 3px var(--mrevi-dark-blue),
        -1px -1px 3px var(--mrevi-dark-blue),
        1px -1px 3px var(--mrevi-dark-blue),
        -1px 1px 3px var(--mrevi-dark-blue),
        1px 1px 3px var(--mrevi-dark-blue),
        0 0 7px rgba(21, 39, 63, 0.86);
}

/* GlobĂˇlnĂ­ styl pro strĂˇnku */
body {
    font-family: 'Arial', sans-serif;
    color: #00b4d8;
    background-color: #15273f;
    margin: 0;
    padding: 20px;
}
body.popup-body {
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 20px;
}
body.inframe-body {
    font-family: 'Arial', sans-serif;
    color: #00b4d8;
    background-color: #15273f;
    margin: 0;
    padding: 0px;
}
nav {
    background-color: #004d66;
    padding: 15px;
    text-align: center;
}
nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

/* Nadpisy pro statusy */
h1 {
    color: #00b4d8; /* TirkisovĂˇ barva */
    margin-top: 10px;
    font-size: 26px;
    font-weight: bold;
}

h2 {
    color: #00b4d8; /* TirkisovĂˇ barva */
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
}
h3 {
    color: #5d8f99; /* TirkisovĂˇ barva */
    margin-top: 5px;
    font-size: 12px;
    font-weight: normal;
}
h4 {
    color: #6e9299; /* TirkisovĂˇ barva */
    margin-top: 3px;
    font-size: 10px;
    font-weight: normal;
}

/* HlavnĂ­ container */
.container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 20px;
}

.device-row {
    margin: 5px 0;
}

/* pod menu */
.top-div {
    background-color: #004d66;
    margin: 0 auto;
    padding: 15px;
}

/* Styl pro tabulky */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 5px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

/* Styl pro zĂˇhlavĂ­ tabulky */
table th, table td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #00b4d8; /* TirkisovĂˇ barva */
    color: #fff;
    font-weight: bold;
}

/* ĹĂˇdky tabulky */
table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

table td {
    color: #333;
}

/* Styl pro container tabulky */
.table-container {
    margin: 5px auto;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.pagination-summary {
    color: #425466;
    font-size: 13px;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pagination-size-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 6px 0 0;
}

.pagination-size-form label {
    color: #425466;
    font-size: 13px;
}

.pagination-size-form select {
    min-height: 34px;
    border: 1px solid #c8d3dd;
    border-radius: 8px;
    padding: 6px 10px;
    background: #fff;
    color: #1f2933;
}

.pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    background: #e8f6fb;
    color: #0b5f75;
    font-weight: 700;
}

.btn.disabled,
.btn.secondary.disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}

/* KompaktnĂ­ nabĂ­dka akcĂ­ v tabulkovĂ©m Ĺ™Ăˇdku. */
.row-action-menu {
    position: relative;
    display: inline-block;
    text-align: left;
}

.row-action-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    list-style: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    user-select: none;
}

.row-action-menu summary::-webkit-details-marker {
    display: none;
}

.row-action-menu[open] summary {
    border-color: #94a3b8;
    background: #f8fafc;
}

.row-action-menu-list {
    position: absolute;
    z-index: 250;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    max-height: min(280px, calc(100vh - 24px));
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
}

.row-action-menu.open-up .row-action-menu-list {
    top: auto;
    bottom: calc(100% + 6px);
}

.row-action-menu-list form {
    margin: 0;
}

.row-action-menu-list a,
.row-action-menu-list button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #0f172a;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.row-action-menu-list a:hover,
.row-action-menu-list a:focus-visible,
.row-action-menu-list button:hover,
.row-action-menu-list button:focus-visible {
    outline: 0;
    background: #f1f5f9;
}

.row-action-menu-list .danger-action {
    color: #b42318;
}

.row-action-menu-list .danger-action:hover,
.row-action-menu-list .danger-action:focus-visible {
    background: #fff0ee;
}

.component-action-controls {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.component-action-controls > form {
    margin: 0;
}

.component-actions-cell,
.components-table tr.action-menu-row-open {
    position: relative;
    overflow: visible !important;
}

.components-table tr.action-menu-row-open {
    z-index: 20;
}

/* Styl pro tlaÄŤĂ­tko zpÄ›t */
.back-button {
    margin-bottom: 10px;
}

.back-button a {
    text-decoration: none;
    color: #00b4d8;
    font-weight: bold;
}

.back-button a:hover {
    text-decoration: underline;
}

/* Nadpis sloĹľky */
.directory-header {
    font-size: 20px;
    color: #333;
    font-weight: bold;
}

/* Nadpisy podsekcĂ­ */
.subheader {
    font-size: 18px;
    color: #00b4d8;
    font-weight: bold;
    margin-top: 10px;
}

/* Seznam sloĹľek a souborĹŻ */
.folder-list, .file-list {
    list-style-type: none;
    padding: 0;
}

.folder-item, .file-item {
    padding: 8px;
    margin: 5px 0;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.folder-item a, .file-item a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.folder-item a:hover, .file-item a:hover {
    color: #00b4d8;
}

/* Ikony pro soubory */
.preview-icon, .download-icon {
    margin-left: 10px;
    font-size: 16px;
    text-decoration: none;
    color: #00b4d8;
}

.preview-icon:hover, .download-icon:hover {
    color: #0077a3;
}
/*************************************************************** logo.png ***************************************************************/
.logo-fixed {
    position: fixed;
    top: 5px;
    left: 25px;
    height: 45px;
    z-index: 9999;
    pointer-events: none; /* logo nebude pĹ™ekĂˇĹľet kliknutĂ­ */
}
@media print {
    .no-print-bacground-logo {
        display: none !important;
    }
}
@media print {
    .print-margin-top {
        height: 30mm;
    }
}
@media print { /* tlaÄŤĂ­tko menu se netiskne */
    .no-print {
        display: none !important;
    }
}

/*************************************************************** menu.php ***************************************************************/
/* Styl hlavnĂ­ho menu */
.main-menu {
    background-color: #00b4d8;
    height: 20px;
    padding: 5px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}


/* Seznam poloĹľek menu */
.main-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

/* Odkazy v menu */
.main-menu ul li {
    margin: 0 12px;
}

.main-menu ul li a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
}

.main-menu ul li a:hover {
    text-decoration: underline;
}

/* Menu odhlĂˇsit*/
.logout-icon {
    font-size: 20px;
    color: white;
    padding: 2px;
}
.logout-icon:hover {
    color: #ffdddd;
}
.logout-icon svg {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    fill: white;
}
.user-info {
    font-size: 0.9em;
    color: white;
    font-weight: normal;
}


/* Odkazy v menu */
.main-menu ul li {
    margin: 10px 10px;
    vertical-align: middle;
}

.main-menu ul li a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 16px;
}

.main-menu ul li a:hover {
    text-decoration: underline;
}

.main-menu li {
    position: relative;
}

.main-menu a {
    text-decoration: none;
    padding: 2px 2px;
    display: block;
}

/* Dochazka - clean enterprise itinerary */
.attendance-itinerary {
    color: #173346;
}
.attendance-itinerary .table-container {
    border: 1px solid #d4e2ec;
    box-shadow: 0 4px 16px rgba(9, 35, 53, 0.08);
}
.attendance-itinerary h2 {
    margin-bottom: 12px;
}
.attendance-itinerary h3 {
    color: #2f5368;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 10px;
}
.attendance-itinerary .table-container form {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 10px;
    align-items: end;
}
.attendance-itinerary .table-container form label {
    display: block;
    margin: 0 0 5px;
    color: #35586c;
    font-size: 12px;
    font-weight: 700;
}
.attendance-itinerary .table-container form input,
.attendance-itinerary .table-container form select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #c9d8e4;
    border-radius: 8px;
    background: #fff;
    color: #153447;
    padding: 7px 10px;
    box-sizing: border-box;
}
.attendance-itinerary .doch-month-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.attendance-itinerary .doch-month-strip .diagnose-button {
    min-width: 88px;
    text-align: center;
}
.attendance-itinerary .doch-month-strip .diagnose-button.active-month {
    background: #0d6d94;
    color: #fff;
    border-color: #0d6d94;
}
.attendance-itinerary .doch-print-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.attendance-itinerary .doch-print-note {
    color: #587182;
    margin: 8px 0 0;
    font-size: 12px;
}
.attendance-itinerary .doch-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
}
.attendance-itinerary .doch-summary-card {
    border: 1px solid #d8e3ec;
    border-radius: 10px;
    padding: 10px;
    background: #f9fcfe;
}
.attendance-itinerary .doch-summary-label {
    color: #5c7483;
    font-size: 12px;
    margin-bottom: 4px;
}
.attendance-itinerary .doch-summary-value {
    color: #17394c;
    font-size: 16px;
    font-weight: 700;
}
.attendance-itinerary .doch-adjustment-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
    align-items: end;
    margin-top: 12px;
}
.attendance-itinerary .doch-adjustment-form label {
    display: block;
    margin: 0 0 5px;
    color: #35586c;
    font-size: 12px;
    font-weight: 700;
}
.attendance-itinerary .doch-adjustment-form input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #c9d8e4;
    border-radius: 8px;
    background: #fff;
    color: #153447;
    padding: 7px 10px;
    box-sizing: border-box;
}
.attendance-itinerary .doch-day {
    border: 1px solid #d8e3ec;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
}
.attendance-itinerary .doch-day-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}
.attendance-itinerary .doch-day-date {
    color: #12394d;
    font-size: 15px;
}
.attendance-itinerary .doch-day-user {
    color: #4c6a7c;
    font-size: 12px;
}
.attendance-itinerary .doch-item {
    border-top: 1px solid #e8eef3;
    padding: 10px 0;
}
.attendance-itinerary .doch-item:first-child {
    border-top: 0;
    padding-top: 0;
}
.attendance-itinerary .doch-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.attendance-itinerary .doch-line-primary {
    font-size: 13px;
    padding: 8px 10px;
    border: 1px solid #e3ebf2;
    border-radius: 8px;
    background: #fbfdff;
}
.attendance-itinerary .doch-line-footer {
    margin-top: 8px;
    justify-content: space-between;
    flex-wrap: nowrap;
    align-items: flex-start;
}
.attendance-itinerary .doch-footer-issues {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
}
.attendance-itinerary .doch-footer-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}
.attendance-itinerary .doch-kind {
    color: #153d54;
    font-weight: 700;
    min-width: 74px;
}
.attendance-itinerary .doch-time {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #1c4a63;
}
.attendance-itinerary .doch-time.is-warn { color: #8a6200; }
.attendance-itinerary .doch-time.is-bad { color: #9a1e2a; }
.attendance-itinerary .doch-time-sep { color: #6d8797; }
.attendance-itinerary .doch-worked {
    font-weight: 700;
    color: #0e5f73;
    border: 1px solid #c7e2ee;
    border-radius: 999px;
    padding: 2px 8px;
    background: #f2fafd;
}
.attendance-itinerary .doch-company {
    color: #445f70;
}
.attendance-itinerary .doch-meta {
    color: #526b7c;
    font-size: 12px;
}
.attendance-itinerary .doch-project-state {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}
.attendance-itinerary .doch-project-state.is-filled {
    color: #17603a;
    background: #eaf8ef;
    border: 1px solid #bfe4cc;
}
.attendance-itinerary .doch-project-state.is-missing {
    color: #962c25;
    background: #fff0ee;
    border: 1px solid #efc3bd;
}
.attendance-itinerary .doch-project-state.is-neutral {
    color: #60717d;
    background: #f1f4f6;
    border: 1px solid #d8e0e5;
}
.attendance-itinerary .doch-activity {
    color: #17394c;
    font-weight: 600;
    flex: 1 1 220px;
    min-width: 180px;
}
.attendance-itinerary .doch-note-inline {
    color: #617887;
    font-size: 12px;
    flex: 1 1 220px;
}
.attendance-itinerary .doch-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}
.attendance-itinerary .doch-badge.bad {
    background: #ffecee;
    color: #9d2733;
    border-color: #ffd1d6;
}
.attendance-itinerary .doch-badge.warn {
    background: #fff5df;
    color: #8a630d;
    border-color: #ffe6b5;
}
.attendance-itinerary .doch-badge.good {
    background: #eaf9ee;
    color: #1d7640;
    border-color: #cdeed7;
}
.attendance-itinerary .doch-action {
    color: #005f86;
    text-decoration: none;
    font-weight: 700;
}
.attendance-itinerary .doch-action:hover {
    text-decoration: underline;
}
.attendance-itinerary .doch-line-footer > .doch-inline-action,
.attendance-itinerary .doch-line-footer > .doch-badge,
.attendance-itinerary .doch-line-footer > .doch-badge-button {
    margin-bottom: 0;
}
.attendance-itinerary .row-is-bad {
    border-left: 3px solid #c9414f;
    padding-left: 6px;
}
.attendance-itinerary .row-is-warn {
    border-left: 3px solid #c2942f;
    padding-left: 6px;
}
.attendance-itinerary .row-is-good {
    border-left: 3px solid #379857;
    padding-left: 6px;
}

@media (max-width: 1024px) {
    .attendance-itinerary .table-container form {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }
    .attendance-itinerary .doch-summary-grid,
    .attendance-itinerary .doch-adjustment-form {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}
@media (max-width: 760px) {
    .attendance-itinerary .table-container form {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 560px) {
    .attendance-itinerary .table-container form {
        grid-template-columns: 1fr;
    }
    .attendance-itinerary .doch-month-strip .diagnose-button {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }
    .attendance-itinerary .doch-summary-grid,
    .attendance-itinerary .doch-adjustment-form {
        grid-template-columns: 1fr;
    }
    .attendance-itinerary .doch-line-primary {
        font-size: 13px;
    }
    .attendance-itinerary .doch-activity,
    .attendance-itinerary .doch-note-inline,
    .attendance-itinerary .doch-meta {
        min-width: 100%;
    }
    .attendance-itinerary .doch-line-footer {
        flex-wrap: wrap;
    }
    .attendance-itinerary .doch-footer-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        white-space: normal;
        flex-wrap: wrap;
    }
}

.has-submenu > a::after {
    content: ' â–Ľ'; /* Ĺ ipka dolĹŻ */
    font-size: 0.7em;
}

.submenu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #00b4d8;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 999;
    flex-direction: column;
}

.submenu a {
    color: #00b4d8;
}

a.submenu-link {
    color: #00b4d8;
}


.submenu-link {
    color: #00b4d8;
}

.submenu li a {
    padding: 8px;
    color: #333;
    background: #00b4d8;
    white-space: nowrap;
}

.has-submenu:hover .submenu {
    display: block !important;
}

.submenu li a:hover {
    background: #0097b5;
}

/* IKONY */
.back-icon i {
    font-size: 18px;
    color: white;
}

/* MREVI_MOBILE_MENU_START */
/* MobilnĂ­ hornĂ­ menu. Breakpoint odpovĂ­dĂˇ skriptu v menu.php, takĹľe nevznikĂˇ
   mezilehlĂˇ varianta mezi desktopovĂ˝m a mobilnĂ­m zobrazenĂ­m. */
.menu-toggle {
    display: none;
}

/* Reset vlastnostĂ­ starĂ©ho responzivnĂ­ho menu, kterĂ© mĹŻĹľe zĹŻstat v cache. */
@media (min-width: 1201px) {
    html body nav.main-menu {
        position: fixed;
        top: 0;
        left: 0;
    }

    html body nav.main-menu .menu-list {
        position: static;
        top: auto;
        right: auto;
        left: auto;
        z-index: auto;
        flex-direction: row;
        background: transparent;
    }

    html body nav.main-menu .menu-list li {
        width: auto;
        border-bottom: 0;
    }

    html body nav.main-menu .menu-list a {
        width: auto;
    }

    html body nav.main-menu .submenu {
        right: auto;
        flex-direction: column;
    }
}

@media (max-width: 1200px) {
    html body nav.main-menu {
        position: fixed;
        top: 12px;
        right: 12px;
        left: auto;
        z-index: 1000;
        display: block;
        width: auto;
        height: auto;
        min-height: 0;
        padding: 0;
        box-sizing: border-box;
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    html body nav.main-menu .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        min-height: 48px;
        height: 48px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #ffffff;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    html body nav.main-menu .menu-toggle:hover,
    html body nav.main-menu .menu-toggle:focus-visible {
        background: transparent;
        border-color: transparent;
    }

    html body nav.main-menu .menu-toggle:focus-visible {
        outline: 3px solid rgba(56, 189, 248, 0.35);
        outline-offset: 2px;
    }

    .menu-toggle__icon {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 28px;
        height: 24px;
        transition: opacity 160ms ease;
    }

    .menu-toggle:hover .menu-toggle__icon {
        opacity: 0.78;
    }

    .menu-toggle__icon span {
        display: block;
        width: 28px;
        height: 3px;
        border-radius: 999px;
        background: currentColor;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.7);
        transform-origin: center;
        transition: transform 180ms ease, opacity 150ms ease;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    html body nav.main-menu .menu-list {
        position: fixed;
        top: 72px;
        right: 12px;
        left: 12px;
        z-index: 1001;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 88px);
        max-height: calc(100dvh - 88px);
        margin: 0;
        padding: 8px;
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        list-style: none;
        color: #e2e8f0;
        background: rgba(15, 23, 42, 0.94);
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 18px;
        box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38), 0 4px 16px rgba(2, 6, 23, 0.18);
        backdrop-filter: blur(20px) saturate(140%);
        -webkit-backdrop-filter: blur(20px) saturate(140%);
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
    }

    html body nav.main-menu .menu-list.is-open {
        display: flex;
        animation: mobile-menu-in 180ms ease-out both;
    }

    html body nav.main-menu .menu-list > li,
    html body nav.main-menu .menu-list > li.compact-user {
        position: relative;
        width: 100%;
        margin: 0;
        border: 0;
    }

    html body nav.main-menu .menu-list > li > a,
    html body nav.main-menu .menu-list > li > .submenu-toggle,
    html body nav.main-menu .user-info,
    html body nav.main-menu .menu-version {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 46px;
        padding: 11px 13px;
        box-sizing: border-box;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: #f1f5f9;
        font: 650 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
        text-align: left;
        text-decoration: none;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    html body nav.main-menu .menu-list > li > a:hover,
    html body nav.main-menu .menu-list > li > a:focus-visible,
    html body nav.main-menu .menu-list > li > .submenu-toggle:hover,
    html body nav.main-menu .menu-list > li > .submenu-toggle:focus-visible {
        background: rgba(56, 189, 248, 0.13);
        color: #ffffff;
        outline: none;
    }

    html body nav.main-menu .menu-version {
        min-height: 34px;
        padding-top: 6px;
        padding-bottom: 6px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 600;
    }

    html body nav.main-menu .ml-auto,
    html body nav.main-menu .menu-list > li.ml-auto {
        margin-left: 0;
    }

    html body nav.main-menu .menu-list > li > .submenu-toggle::after {
        content: "";
        width: 8px;
        height: 8px;
        margin: 0 3px 3px 12px;
        border-right: 2px solid #94a3b8;
        border-bottom: 2px solid #94a3b8;
        transform: rotate(45deg);
        transition: transform 180ms ease, margin 180ms ease;
    }

    html body nav.main-menu .has-submenu.submenu-open > .submenu-toggle::after {
        margin-top: 5px;
        margin-bottom: 0;
        transform: rotate(225deg);
    }

    html body nav.main-menu .has-submenu > .submenu {
        position: static;
        display: none !important;
        min-width: 0;
        margin: 3px 0 6px;
        padding: 5px;
        overflow: hidden;
        list-style: none;
        background: rgba(2, 6, 23, 0.3);
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 12px;
        box-shadow: none;
    }

    html body nav.main-menu .has-submenu.submenu-open > .submenu {
        display: flex !important;
        flex-direction: column;
        gap: 2px;
    }

    html body nav.main-menu .submenu li {
        width: 100%;
        margin: 0;
        border: 0;
    }

    html body nav.main-menu .submenu li a {
        display: block;
        width: auto;
        padding: 10px 12px 10px 18px;
        border-radius: 9px;
        background: transparent;
        color: #cbd5e1;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.35;
        white-space: normal;
    }

    html body nav.main-menu .submenu li a:hover,
    html body nav.main-menu .submenu li a:focus-visible {
        background: rgba(56, 189, 248, 0.13);
        color: #ffffff;
        outline: none;
    }

    html body nav.main-menu .help-icon,
    html body nav.main-menu .settings-icon,
    html body nav.main-menu .logout-icon {
        font-size: 17px;
    }

    @keyframes mobile-menu-in {
        from {
            opacity: 0;
            transform: translateY(-8px) scale(0.985);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

@media (max-width: 1200px) and (prefers-reduced-motion: reduce) {
    html body nav.main-menu .menu-list.is-open {
        animation: none;
    }

    .menu-toggle__icon span,
    html body nav.main-menu .menu-list > li > .submenu-toggle::after {
        transition: none;
    }
}
/* MREVI_MOBILE_MENU_END */
/* Styl pro tlaÄŤĂ­tko zpÄ›t */
.back-button {
    margin-bottom: 10px;
}

.back-button a {
    text-decoration: none;
    color: #00b4d8;
    font-weight: bold;
}

.back-button a:hover {
    text-decoration: underline;
}

/*************************************************************** network_status_view.php ***************************************************************/

/* Styl pro vĂ˝pis zaĹ™Ă­zenĂ­ */
.device-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    font-family: Arial, sans-serif;
    background-color: #ccd3db;
    color: #e0f7fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.device-table th, .device-table td {
    padding: 10px 10px;
    border-bottom: 1px solid #586272;
    text-align: left;
}

.device-table th {
    background-color: #004d66;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.device-table tr:nth-child(even) {
    background-color: #b0c0d6;
    font-size: 12px;
}

.device-table tr {
    background-color: #dbdde0;
    font-size: 12px;
}

.device-table tr:hover {
    background-color: #ffffff;
}

.indent {
    padding-left: 30px;
}
/* Kontejner pro dvÄ› sekce */
.device-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding-top: 30px;
}

/* VĂ˝chozĂ­ styl: sekce pod sebou */
.device-layout .left,
.device-layout .right {
    flex: 1 1 100%;
}

/* Na vÄ›tĹˇĂ­ch obrazovkĂˇch: sekce vedle sebe */
@media (min-width: 768px) {
    .device-layout .left {
        flex: 1 1 58%;
    }
    .device-layout .right {
        flex: 1 1 38%;
    }
}

/* VyskakovacĂ­ okno s informacemi */
.popup {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: black;
    padding: 20px;
    border: 2px solid #004d66;
    border-radius: 8px;
    z-index: 9999;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 39, 63, 0.52);
    backdrop-filter: blur(2px);
    box-sizing: border-box;
}

.popup-overlay[hidden],
.popup[hidden] {
    display: none !important;
}

.popup-overlay .popup {
    position: relative;
    top: auto;
    left: auto;
    width: min(560px, 100%);
    max-width: 100%;
    max-height: min(82vh, 720px);
    padding: 0;
    transform: none;
}

.popup-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 58px 14px 16px;
    border-bottom: 1px solid #dbe3ec;
}

.popup-header h2,
.popup-header h3 {
    margin: 0;
    color: var(--mrevi-dark-blue);
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #475569;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.popup-close:hover {
    color: #b42318;
}

#revision-unsaved-popup .revision-unsaved-popup-header {
    position: relative !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-height: 36px;
    padding: 14px 58px 14px 16px !important;
}

#revision-unsaved-close {
    position: absolute !important;
    top: 8px !important;
    right: 10px !important;
    left: auto !important;
    margin: 0 !important;
}

.popup-content {
    padding: 16px;
}

.popup-content > :first-child {
    margin-top: 0;
}

.popup-content > :last-child {
    margin-bottom: 0;
}

.popup-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid #dbe3ec;
}

.popup-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid #64748b;
    border-radius: 5px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.popup-secondary-button:hover {
    background: #f1f5f9;
}

.popup-toast {
    top: 18px;
    padding: 12px 22px;
    text-align: center;
    font-weight: 700;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.popup-toast.popup-success {
    border-color: #15803d;
    background: #dcfce7;
    color: #166534;
}

.popup-toast.popup-error {
    border-color: #b42318;
    background: #fee2e2;
    color: #7f1d1d;
    text-align: left;
}

.form-validation-popup > div {
    margin-top: 4px;
}

.form-validation-popup ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

.popup-toast.is-closing {
    opacity: 0;
    transform: translate(-50%, -8px);
}

body.popup-open {
    overflow: hidden;
}

.revision-unsaved-status {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
}

.revision-unsaved-status.has-changes {
    color: #9a3412;
}

@media (max-width: 620px) {
    .popup-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    .popup-actions {
        flex-direction: column;
    }

    .popup-actions > button {
        width: 100%;
    }
}
/*************************************************************** TlaÄŤĂ­tka ***************************************************************/

/* Styl tlaÄŤĂ­tek stejnĂ©ho vzhledu jako odkazy */
.diagnose-button,
.diagnose-button:visited,
.diagnose-button:active,
.diagnose-button-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    background-color: #00b4d8;
    color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.2;
    box-sizing: border-box;
    white-space: nowrap;
    margin-top: 1px;
    margin-bottom: 1px;
}

.diagnose-button:hover,
.diagnose-button-button:hover {
    background-color: #0077a3;
}

.diagnose-button:disabled,
.diagnose-button-button:disabled {
    opacity: .55;
    cursor: not-allowed;
    background-color: #64748b;
}

.diagnose-button.diagnose-button-success,
.diagnose-button-button.diagnose-button-success {
    background-color: #16a34a;
    color: #ffffff;
}

.diagnose-button.diagnose-button-success:hover,
.diagnose-button-button.diagnose-button-success:hover {
    background-color: #15803d;
}

.diagnose-button-back {
    gap: 6px;
}

.diagnose-button-back::before {
    content: "\2190";
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

/* SdĂ­lenĂˇ bublinkovĂˇ nĂˇpovÄ›da pro prvky s atributem data-mrevi-tooltip. */
.mrevi-tooltip {
    --mrevi-tooltip-bg: #153449;
    --mrevi-tooltip-border: #00b4d8;
    --mrevi-tooltip-arrow-x: 50%;
    --mrevi-tooltip-arrow-y: 50%;
    position: fixed;
    z-index: 100000;
    width: max-content;
    max-width: min(320px, calc(100vw - 16px));
    padding: 0;
    border: 1px solid var(--mrevi-tooltip-border);
    border-radius: 8px;
    background: var(--mrevi-tooltip-bg);
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 39, 56, .28);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(2px);
    transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
    pointer-events: auto;
    user-select: text;
}

.mrevi-tooltip[hidden] {
    display: none !important;
}

.mrevi-tooltip.is-measuring {
    opacity: 0;
    visibility: hidden;
    transition: none;
}

.mrevi-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.mrevi-tooltip__content {
    max-height: calc(100dvh - 16px);
    padding: 7px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: normal;
}

.mrevi-tooltip::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    background: var(--mrevi-tooltip-bg);
    transform: rotate(45deg);
    pointer-events: none;
}

.mrevi-tooltip[data-placement="top"]::after {
    left: var(--mrevi-tooltip-arrow-x);
    bottom: -5px;
    margin-left: -5px;
    border-right: 1px solid var(--mrevi-tooltip-border);
    border-bottom: 1px solid var(--mrevi-tooltip-border);
}

.mrevi-tooltip[data-placement="bottom"]::after {
    left: var(--mrevi-tooltip-arrow-x);
    top: -5px;
    margin-left: -5px;
    border-top: 1px solid var(--mrevi-tooltip-border);
    border-left: 1px solid var(--mrevi-tooltip-border);
}

.mrevi-tooltip[data-placement="left"]::after {
    right: -5px;
    top: var(--mrevi-tooltip-arrow-y);
    margin-top: -5px;
    border-top: 1px solid var(--mrevi-tooltip-border);
    border-right: 1px solid var(--mrevi-tooltip-border);
}

.mrevi-tooltip[data-placement="right"]::after {
    left: -5px;
    top: var(--mrevi-tooltip-arrow-y);
    margin-top: -5px;
    border-bottom: 1px solid var(--mrevi-tooltip-border);
    border-left: 1px solid var(--mrevi-tooltip-border);
}

@media (prefers-reduced-motion: reduce) {
    .mrevi-tooltip {
        transition: none;
    }
}

.panel-completed-toggle.is-active {
    background-color: #16a34a;
}

.panel-completed-toggle.is-active:hover {
    background-color: #15803d;
}

.diagnose-button-danger,
.diagnose-button-danger:visited,
.diagnose-button-danger:active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    background-color: #d7263d;
    color: #fff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.2;
    box-sizing: border-box;
    white-space: nowrap;
    margin-top: 1px;
    margin-bottom: 1px;
}

#component-bulk-open[hidden],
#component-bulk-delete[hidden],
[data-motor-protection-range][hidden] {
    display: none;
}

.diagnose-button-danger:hover {
    background-color: #a81d30;
}

.reserve-toggle.is-active {
    background-color: #b45309;
}

.reserve-toggle.is-active:hover {
    background-color: #92400e;
}

.components-table tr.row-reserve td {
    background: #fff7ed;
}

.components-table tr.row-cable-ack td {
    background: #ecfdf3;
}

.components-table .component-swap-column[hidden] {
    display: none !important;
}

.components-table .component-swap-column {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    padding: 2px;
    text-align: center;
    box-sizing: border-box;
}

.component-swap-toggle,
.component-swap-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 0;
    border-radius: 5px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.component-swap-toggle {
    padding: 2px 5px;
    background: #fff;
    color: #0077a3;
    vertical-align: middle;
}

.component-swap-toggle:hover,
.component-swap-toggle:focus-visible {
    background: #e6f9fd;
    color: #005f82;
}

.component-swap-toggle[aria-pressed="true"],
.component-swap-toggle[aria-pressed="true"]:hover {
    background: #005f82;
    color: #fff;
}

.component-swap-mobile-toggle {
    display: none;
    margin-bottom: 8px;
    padding: 5px 8px;
    font-size: 12px;
}

.component-swap-button {
    width: 25px;
    height: 25px;
    padding: 0;
    background: #00b4d8;
    color: #fff;
}

.component-swap-button:hover,
.component-swap-button:focus-visible {
    background: #0077a3;
}

.component-swap-toggle:focus-visible,
.component-swap-button:focus-visible {
    outline: 2px solid var(--mrevi-dark-blue);
    outline-offset: 2px;
}

.component-swap-button:disabled {
    opacity: .5;
    cursor: wait;
}

@media (max-width: 760px) {
    .component-swap-mobile-toggle {
        display: inline-block;
    }

    .components-table td.component-swap-column:not([hidden]) {
        display: flex;
        width: 100%;
        max-width: none;
        justify-content: center;
    }
}

.panel-list-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 4px 0 10px 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.3;
    cursor: help;
}

.panel-list-stats strong {
    color: #111827;
    font-size: 11px;
    font-weight: 700;
}

.panel-list-stats .stat-value {
    font-size: 11px;
    font-weight: 700;
}

.panel-list-stats .stat-value.is-error {
    color: #dc2626;
}

.panel-list-stats .stat-value.is-warning {
    color: #d97706;
}

/* Třípolohový přepínač: kladná volba vlevo, neutrální uprostřed, záporná vpravo. */
.mrevi-tristate-control {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 60px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #334155;
    font: inherit;
    cursor: pointer;
}

.mrevi-tristate-track {
    position: relative;
    flex: 0 0 auto;
    width: 60px;
    height: 24px;
    border-radius: 999px;
    background: #9ba8b4;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .24);
    transition: background-color .16s ease;
}

.mrevi-tristate-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    transform: translateX(18px);
    transition: transform .16s ease;
}

.mrevi-tristate-control[data-state="positive"] .mrevi-tristate-track {
    background: #168a45;
}

.mrevi-tristate-control[data-state="positive"] .mrevi-tristate-track::after {
    transform: translateX(0);
}

.mrevi-tristate-control[data-state="negative"] .mrevi-tristate-track {
    background: #d7263d;
}

.mrevi-tristate-control[data-state="negative"] .mrevi-tristate-track::after {
    transform: translateX(36px);
}

.mrevi-tristate-control[data-state="any"] .mrevi-tristate-track::after {
    transform: translateX(18px);
}

.mrevi-tristate-control:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .25);
    outline-offset: 3px;
    border-radius: 999px;
}

/* Posuvný dvoupolohový přepínač. */
.drawing-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #273746;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.drawing-switch {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
}

.drawing-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.drawing-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #9ba8b4;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .24);
    transition: background .16s ease;
}

.drawing-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    transition: transform .16s ease;
}

.drawing-switch input:checked + .drawing-switch-track {
    background: #168a45;
}

.drawing-switch input:checked + .drawing-switch-track::after {
    transform: translateX(18px);
}

.drawing-switch input:focus-visible + .drawing-switch-track {
    outline: 3px solid rgba(37, 99, 235, .25);
    outline-offset: 3px;
}

.external-layer-switches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 8px;
}

.external-layer-switches .drawing-switch-row {
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #dde4ea;
    border-radius: 8px;
    background: #f8fafc;
}

@media (max-width: 620px) {
    .external-layer-switches {
        grid-template-columns: 1fr;
    }
}

/* Výběr existujících kořenových umístění při jejich přidání do objektu. */
#location-editor-dialog {
    width: min(680px, calc(100vw - 28px));
    box-sizing: border-box;
}

#location-editor-dialog h2,
#location-editor-dialog h3 {
    margin-top: 0;
}

.location-object-root-choice[hidden],
.location-object-new-location [hidden] {
    display: none !important;
}

.location-object-root-choice {
    margin-top: 14px;
}

.location-object-root-choice > p {
    margin: -4px 0 10px;
    color: #685970;
    font-size: 13px;
    line-height: 1.45;
}

.location-object-root-choice form {
    display: grid;
    gap: 10px;
}

.location-object-root-choice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.location-object-root-choice-head .diagnose-button {
    min-height: 32px;
    padding-inline: 11px;
    font-size: 12px;
}

.location-object-root-list {
    display: grid;
    gap: 7px;
    max-height: 260px;
    padding: 8px;
    overflow-y: auto;
    border: 1px solid #d9e3ea;
    border-radius: 10px;
    background: #f8fafc;
}

.location-object-root-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #dbe4eb;
    border-radius: 9px;
    background: #fff;
    color: #273746;
    cursor: pointer;
}

.location-object-root-item:hover,
.location-object-root-item:has(input:focus-visible) {
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, .13);
}

.location-object-root-item:has(input:checked) {
    border-color: #168a45;
    background: #eefaf2;
}

.location-object-root-item input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #168a45;
}

.location-object-root-item > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.location-object-root-item strong,
.location-object-root-item small {
    overflow-wrap: anywhere;
}

.location-object-root-item small {
    color: #6b7280;
    font-size: 11px;
}

.location-object-root-empty {
    padding: 12px;
    border: 1px dashed #c8d3dd;
    border-radius: 9px;
    background: #f8fafc;
    color: #60717f;
    font-size: 13px;
}

.location-object-choice-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    color: #75667d;
    font-size: 12px;
    font-weight: 700;
}

.location-object-choice-divider::before,
.location-object-choice-divider::after {
    content: "";
    height: 1px;
    background: #ddd2e6;
}

.location-object-new-location > h3 {
    margin-bottom: 8px;
}

#location-editor-dialog .location-list-filter {
    margin: 0;
}

/* Diagnostické zobrazení a oprava vazeb umístění. */
.location-list-filter .location-list-all-switch {
    align-self: stretch;
    grid-template-columns: 1fr;
    margin: 0;
}

.location-list-filter .location-list-all-switch .drawing-switch-row {
    display: flex;
    min-height: 42px;
    box-sizing: border-box;
}

.location-repair-issues {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.location-list-diagnostic-summary {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #e5c58e;
    border-radius: 10px;
    color: #6f4a0c;
    background: #fff9ed;
    font-size: 12px;
    font-weight: 700;
}

/* Diagnostika rozvaděčů ze seznamu revizí – sdílí ikony s bočním seznamem rozvaděčů. */
.revision-panel-diagnostic-trigger {
    display: grid;
    gap: 5px;
    width: 100%;
    min-width: 142px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    color: #0f172a;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.revision-panel-diagnostic-trigger:hover,
.revision-panel-diagnostic-trigger:focus-visible {
    border-color: #2563eb;
    background: #eff6ff;
    outline: 2px solid rgba(37, 99, 235, .2);
    outline-offset: 1px;
}

.revision-panel-summary-icons,
.panel-status-icons {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.revision-panel-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 20px;
    color: #475569;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.revision-panel-summary-item svg {
    width: 18px;
    height: 18px;
    overflow: visible;
}

.revision-panel-summary-item svg circle,
.revision-panel-summary-item svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.revision-panel-summary-item.is-completed { color: #15803d; }
.revision-panel-summary-item.is-error { color: #dc2626; }
.revision-panel-summary-item.is-location { color: #94a3b8; }
.revision-panel-summary-item.is-location.is-complete { color: #16a34a; }
.revision-panel-summary-item.is-location.is-warning { color: #d97706; }
.revision-panel-summary-item.is-location.is-error { color: #dc2626; }
.revision-panel-summary-item.is-location svg path { fill: currentColor; stroke: rgba(15, 23, 42, .5); stroke-width: .8; }
.revision-panel-summary-item.is-location svg circle { fill: #fff; stroke: none; }
.revision-panel-summary-item.is-empty,
.panel-fault-count-icon.is-empty { color: #94a3b8; }

.panel-qr-icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
    border: 1px solid #111;
    border-radius: 2px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Crect width='21' height='21' fill='white'/%3E%3Crect x='1' y='1' width='6' height='6' fill='black'/%3E%3Crect x='2.5' y='2.5' width='3' height='3' fill='white'/%3E%3Crect x='14' y='1' width='6' height='6' fill='black'/%3E%3Crect x='15.5' y='2.5' width='3' height='3' fill='white'/%3E%3Crect x='1' y='14' width='6' height='6' fill='black'/%3E%3Crect x='2.5' y='15.5' width='3' height='3' fill='white'/%3E%3Crect x='9' y='9' width='2' height='2' fill='black'/%3E%3Crect x='12' y='9' width='2' height='2' fill='black'/%3E%3Crect x='9' y='12' width='2' height='2' fill='black'/%3E%3Crect x='12' y='12' width='2' height='2' fill='black'/%3E%3Crect x='15' y='12' width='2' height='2' fill='black'/%3E%3Crect x='12' y='15' width='2' height='2' fill='black'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 11px 11px;
}

.panel-location-icon,
.panel-cable-status-icon,
.panel-fault-count-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 18px;
    color: #dc2626;
    vertical-align: middle;
}

.panel-location-icon { width: 14px; color: #eab308; }
.panel-location-icon.is-plan-pin,
.panel-cable-status-icon.is-complete { color: #16a34a; }
.panel-location-icon svg,
.panel-cable-status-icon svg,
.panel-fault-count-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }
.panel-location-icon path { fill: currentColor; stroke: rgba(15, 23, 42, .5); stroke-width: .8; }
.panel-location-icon circle { fill: #fff; }
.panel-cable-status-icon path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.panel-fault-count-icon { overflow: visible; }
.panel-fault-count-icon svg { flex: 0 0 auto; width: 18px; height: 20px; max-width: none; }
.panel-fault-count-icon path { fill: currentColor; stroke: #b91c1c; stroke-width: .7; stroke-linejoin: round; }
.panel-fault-count-icon text { fill: #fff; font-family: Arial, sans-serif; font-size: 11.5px; font-weight: 800; text-anchor: middle; }
.panel-fault-count-icon.is-two-digit text { font-size: 9.2px; }
.panel-fault-count-icon.is-many-digits text { font-size: 7px; }
.panel-fault-count-icon.is-empty path { stroke: #64748b; }

.panel-corner-badges {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.panel-error-badge,
.panel-voltage-missing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 16px;
}

.panel-error-badge { border: 1px solid #fca5a5; color: #991b1b; background: #fecaca; }
.panel-voltage-missing-badge { border: 1px solid #ef4444; color: #dc2626; background: #fff; }

.popup-overlay .revision-panel-diagnostic-popup {
    width: min(920px, 100%);
    max-height: min(90vh, 900px);
}

.revision-panel-diagnostic-subtitle {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 12px;
}

.revision-panel-diagnostic-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.revision-panel-diagnostic-stats > span {
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    color: #334155;
    background: #f8fafc;
    font-size: 11px;
}

.revision-panel-diagnostic-stats b { color: #0f172a; font-size: 18px; }
.revision-panel-diagnostic-stats .is-completed { border-color: #86efac; background: #f0fdf4; }
.revision-panel-diagnostic-stats .is-warning { border-color: #fdba74; background: #fff7ed; }
.revision-panel-diagnostic-stats .is-error { border-color: #fca5a5; background: #fef2f2; }
.revision-panel-diagnostic-stats .is-fault { border-color: #fda4af; background: #fff1f2; }
.revision-panel-diagnostic-list { display: grid; gap: 10px; }

.revision-panel-diagnostic-card {
    position: relative;
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
}

.revision-panel-diagnostic-card.is-completed { border-color: #86efac; background: #f0fdf4; }
.revision-panel-diagnostic-card.is-warning { border-color: #fdba74; background: #fff7ed; }
.revision-panel-diagnostic-card.is-error { border-color: #f472b6; background: #fdf2f8; }
.revision-panel-diagnostic-card-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.revision-panel-diagnostic-card-body { display: grid; min-width: 0; flex: 1 1 auto; gap: 7px; }
.revision-panel-diagnostic-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding-right: 52px; }
.revision-panel-diagnostic-title-row > a { color: #312047; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.revision-panel-completion { padding: 3px 7px; border: 1px solid #fdba74; border-radius: 999px; color: #9a3412; background: #ffedd5; font-size: 10px; font-weight: 800; }
.revision-panel-completion.is-completed { border-color: #86efac; color: #166534; background: #dcfce7; }
.revision-panel-diagnostic-facts { display: flex; gap: 5px 12px; flex-wrap: wrap; color: #475569; font-size: 11px; }
.revision-panel-diagnostic-details { display: grid; gap: 3px; margin: 0; font-size: 12px; }
.revision-panel-diagnostic-details > div { display: grid; grid-template-columns: minmax(105px, 150px) minmax(0, 1fr); gap: 8px; }
.revision-panel-diagnostic-details dt { color: #64748b; font-weight: 700; }
.revision-panel-diagnostic-details dd { min-width: 0; margin: 0; color: #1e293b; overflow-wrap: anywhere; }
.revision-panel-diagnostic-photo { width: 82px; height: 82px; flex: 0 0 auto; border: 1px solid #cbd5e1; border-radius: 9px; object-fit: cover; }
.revision-panel-diagnostic-problems { border: 1px solid #fca5a5; border-radius: 8px; background: rgba(255, 255, 255, .72); overflow: hidden; }
.revision-panel-diagnostic-problems.is-fault { border-color: #fda4af; }
.revision-panel-diagnostic-problems summary { padding: 6px 8px; color: #991b1b; font-size: 12px; font-weight: 800; cursor: pointer; }
.revision-panel-diagnostic-problems ul { margin: 0; padding: 0 10px 8px 25px; color: #7f1d1d; font-size: 11px; }
.revision-panel-diagnostic-empty { margin: 0; padding: 18px; border: 1px dashed #cbd5e1; border-radius: 10px; color: #64748b; text-align: center; }

@media (max-width: 680px) {
    .revision-panel-diagnostic-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .revision-panel-diagnostic-card-main { display: grid; }
    .revision-panel-diagnostic-photo { grid-row: 1; width: 68px; height: 68px; }
    .revision-panel-diagnostic-details > div { grid-template-columns: 1fr; gap: 1px; }
}

.location-repair-badge,
.location-repair-ok {
    width: fit-content;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.25;
}

.location-repair-badge {
    border: 1px solid #efb36b;
    color: #8a4300;
    background: #fff1dd;
}

.location-repair-ok {
    border: 1px solid #9bcbae;
    color: #176534;
    background: #e8f7ed;
}

#location-editor-dialog .location-repair-fields {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 11px;
    border: 1px solid #e5c58e;
    border-radius: 10px;
    background: #fff9ed;
}

#location-editor-dialog .location-repair-fields[hidden] {
    display: none !important;
}

#location-editor-dialog .location-repair-help {
    grid-column: 1 / -1;
    margin: 0;
    color: #6f5b3b;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 620px) {
    #location-editor-dialog .location-repair-fields {
        grid-template-columns: 1fr;
    }

    #location-editor-dialog .location-repair-help {
        grid-column: 1;
    }
}

/* Global: sjednoceni vysky poli v radcich komponent */
.comp-table-form {
    --ctl-h: 34px;
}

.comp-table-form .g8 {
    align-items: start;
}

.comp-table-form .g8 > div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
}

.component-unknown-fault-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.component-unknown-fault-form > div {
    min-width: 0;
}

@media (max-width: 700px) {
    .component-unknown-fault-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

.container .comp-table-form input[type="text"],
.container .comp-table-form input[type="number"],
.container .comp-table-form select {
    width: 100%;
    max-width: 100%;
    padding: 4px 6px;
    margin: 0;
    height: var(--ctl-h);
    min-height: var(--ctl-h);
    line-height: 1.25;
    font-size: 12px;
    box-sizing: border-box;
}

.comp-table-form .select-plus {
    align-items: flex-start;
}

.comp-table-form .select-plus .mrevi-search-select {
    align-self: flex-start;
    margin: 0;
    padding: 0;
}

.comp-table-form .mrevi-search-select,
.comp-table-form .mrevi-search-select-toggle,
.comp-table-form .mrevi-search-select-input {
    min-height: var(--ctl-h);
    height: var(--ctl-h);
    padding: 4px 8px;
    font-size: 12px;
    box-sizing: border-box;
}

.comp-table-form .mrevi-search-select-toggle {
    display: flex;
    align-items: center;
}

.comp-table-form textarea.auto-grow {
    width: 100%;
    max-width: 100%;
    padding: 4px 6px;
    margin: 0;
    min-height: var(--ctl-h);
    line-height: 1.25;
    font-size: 12px;
    box-sizing: border-box;
}

.comp-table-form .select-plus,
.comp-table-form .inline-pair,
.comp-table-form .input-plus-field {
    align-items: flex-start;
}

/* Zakladni vzhled formulĂˇĹ™ovĂ˝ch polĂ­ (globĂˇlnÄ› v kontejnerech) */
.container form input[type="text"],
.container form input[type="number"],
.container form input[type="search"],
.container form input[type="email"],
.container form input[type="password"],
.container form input[type="date"],
.container form input[type="time"],
.container form input[type="file"],
.container form select,
.container form textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #b8c1cc;
    border-radius: 8px;
    background: #fff;
    color: #1f2933;
    font-size: 14px;
    line-height: 1.3;
    box-sizing: border-box;
    margin-top: 1px;
    margin-bottom: 1px;
}

.container form textarea {
    min-height: 84px;
    resize: vertical;
}

.container form input[type="file"] {
    padding: 6px 8px;
    min-height: 40px;
}

.container form input[type="text"]:focus,
.container form input[type="number"]:focus,
.container form input[type="search"]:focus,
.container form input[type="email"]:focus,
.container form input[type="password"]:focus,
.container form input[type="date"]:focus,
.container form input[type="time"]:focus,
.container form input[type="file"]:focus,
.container form select:focus,
.container form textarea:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.18);
}

/* ELR: aktivni pole rozvadece (zobrazi se jen pro pole 2+) */
.elr-active-field-badge {
    position: fixed;
    top: 84px;
    right: 16px;
    z-index: 1200;
    background: #0ea5e9;
    color: #fff;
    border: 1px solid #0284c7;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}
@media (max-width: 760px) {
    .elr-active-field-badge {
        position: fixed !important;
        top: calc(env(safe-area-inset-top, 0px) + 44px);
        right: 10px;
        padding: 5px 8px;
        font-size: 11px;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
}


/*************************************************************** companies.php ***************************************************************/
.companies-page .btn,
.companies-page .btn:visited,
.companies-page .btn:active {
    display: inline-block;
    padding: 6px 10px;
    background: #00b4d8;
    color: #fff;
    border-radius: 4px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.25;
    margin: 2px 4px 2px 0;
}

.companies-page .btn:hover {
    background: #0077a3;
}

.companies-page .btn.secondary {
    background: #6c757d;
}

.companies-page .filters .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 6px 0;
}

.companies-page .filters label {
    display: inline-block;
    min-width: 100px;
    color: #333;
}

.companies-page .filters input[type="search"] {
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 14px;
    min-width: min(420px, 100%);
    box-sizing: border-box;
}

.companies-page .filters select {
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 14px;
    min-height: 36px;
    background: #fff;
    color: #1f2933;
    box-sizing: border-box;
}

.companies-page .filters input[type="search"]:focus,
.companies-page .filters select:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.2);
}

.companies-page .company-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.companies-page .company-toolbar-form {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin: 0;
}

.companies-page .muted {
    color: #666;
    font-size: 12px;
}

.companies-page .company-add-panel[hidden] {
    display: none;
}

.companies-page .table-container {
    overflow-x: auto;
}

.companies-page .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.companies-page .form-field {
    display: flex;
    flex-direction: column;
}

.companies-page .form-field label {
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.companies-page .form-field .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    font-weight: 600;
}

.companies-page .form-field input,
.companies-page .form-field textarea,
.companies-page .form-field select {
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    color: #1f2933;
    background: #fff;
    box-sizing: border-box;
}

.companies-page .form-field textarea {
    min-height: 80px;
    resize: vertical;
}

.companies-page .form-field input:focus,
.companies-page .form-field textarea:focus,
.companies-page .form-field select:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.2);
}

.companies-page .form-field-full {
    grid-column: 1 / -1;
}

.companies-page .edit-row,
.companies-page .access-row {
    display: none;
    background: #fff;
}

.companies-page tr.clickable-row {
    cursor: pointer;
}

.companies-page .companies-table td {
    vertical-align: top;
}

.companies-page .companies-table td small {
    color: #666;
}

.companies-page .companies-table .actions-cell {
    white-space: nowrap;
}

.companies-page .company-separator-row td {
    background: #e7f6fb;
    color: #005b73;
    font-weight: bold;
    border-top: 2px solid #00b4d8;
    border-bottom: 1px solid #bfe8f2;
    padding: 8px 10px;
}

.companies-page .company-separator-row span {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 4px;
    background: #00b4d8;
    color: #fff;
    font-size: 12px;
}

.companies-page .badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    display: inline-block;
}

.companies-page .badge.active {
    background: #28a745;
    color: #fff;
}

.companies-page .badge.inactive {
    background: #6c757d;
    color: #fff;
}

.companies-page .company-access-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.companies-page .company-access-form select {
    min-width: 280px;
    max-width: 100%;
    padding: 6px;
}

.companies-page .btn-inline {
    display: inline-block;
    margin-right: 6px;
}

.companies-page .ares-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.companies-page .ares-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.companies-page .ares-row .diagnose-button,
.companies-page .ares-row .btn {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.companies-page .ares-msg {
    margin-top: 4px;
    font-size: 12px;
    color: #5d8f99;
    min-height: 16px;
}

/*************************************************************** projects.php ***************************************************************/
.projects-page .btn,
.projects-page .btn:visited,
.projects-page .btn:active {
    display: inline-block;
    padding: 6px 10px;
    background: #00b4d8;
    color: #fff;
    border-radius: 4px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.25;
    margin: 2px 4px 2px 0;
}

.projects-page .btn:hover {
    background: #0077a3;
}

.projects-page .btn.secondary {
    background: #6c757d;
}

.projects-page .filters .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 6px 0;
}

.projects-page .filters label {
    display: inline-block;
    min-width: 100px;
    color: #333;
}

.projects-page .filters input[type="search"],
.projects-page .filters select {
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 14px;
    box-sizing: border-box;
}

.projects-page .filters input[type="search"] {
    min-width: min(420px, 100%);
}

.projects-page .filters input[type="search"]:focus,
.projects-page .filters select:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.2);
}

.projects-page .muted {
    color: #666;
    font-size: 12px;
}

.projects-page .table-container {
    overflow-x: auto;
}

.projects-page .project-sync {
    color: #333;
}

.projects-page .project-sync-error {
    border-left: 4px solid #dc3545;
}

.projects-page .projects-table td {
    vertical-align: top;
}

.projects-page .projects-table td small {
    color: #666;
}

.projects-page .project-note-preview {
    display: inline-block;
    max-width: 360px;
    color: #4b5f6d;
}

.projects-page .project-title-link {
    color: #0077a3;
    text-decoration: none;
}

.projects-page .project-title-link:hover {
    text-decoration: underline;
}

.projects-page .projects-table tr[data-project-row] {
    cursor: pointer;
}

.projects-page .projects-table .actions-cell {
    white-space: nowrap;
}

.projects-page .project-properties summary {
    color: #0077a3;
    cursor: pointer;
    font-weight: bold;
}

.projects-page .project-detail-status {
    margin: 5px 0;
    min-height: 16px;
}

.projects-page .project-detail-error {
    color: #b02a37;
}

.projects-page .project-properties pre {
    max-width: 520px;
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f7fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    padding: 8px;
    color: #1f2933;
    font-size: 12px;
}

.projects-page .project-sync a {
    margin-left: 8px;
    color: #0077a3;
    font-weight: bold;
}

.projects-page .project-loading {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.projects-page .project-loading::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #b8dbe5;
    border-top-color: #00b4d8;
    border-radius: 50%;
    animation: project-spin 0.8s linear infinite;
}

@keyframes project-spin {
    to {
        transform: rotate(360deg);
    }
}

.app-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-loading::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid #b8dbe5;
    border-top-color: #00b4d8;
    border-radius: 50%;
    animation: project-spin 0.8s linear infinite;
}

.app-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(2px);
}

.app-loading-overlay[hidden] {
    display: none;
}

.app-loading-dialog {
    width: min(92vw, 420px);
    padding: 22px 24px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    text-align: center;
}

.app-loading-dialog .app-loading {
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.app-loading-note {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.45;
    color: #475569;
}

.project-detail-page .project-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.project-detail-page .project-detail-head h2 {
    margin-bottom: 4px;
}

.project-detail-page .project-detail-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.project-detail-page .project-detail-actions form {
    margin: 0;
}

.project-detail-page .project-user-state-panel h3 {
    margin: 0 0 4px;
}

.project-detail-page .project-user-state-form {
    display: grid;
    grid-template-columns: 150px minmax(240px, 520px);
    gap: 8px 12px;
    align-items: start;
    margin-top: 12px;
}

.project-detail-page .project-user-state-form label {
    padding-top: 7px;
    font-weight: bold;
}

.project-detail-page .project-user-state-form select,
.project-detail-page .project-user-state-form textarea {
    box-sizing: border-box;
    width: 100%;
}

.project-detail-page .project-user-state-form button {
    grid-column: 2;
    justify-self: start;
}

.project-detail-page .project-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 12px;
}

.project-detail-page .project-detail-box {
    border: 0;
    border-radius: 6px;
    padding: 10px;
    background: #f7fafc;
}

.project-detail-page .project-detail-box h3,
.project-detail-page .project-detail-texts h3 {
    margin-top: 0;
    color: #1f2933;
    font-size: 15px;
    font-weight: bold;
}

.project-detail-page dl {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 6px 10px;
    margin: 0;
    color: #1f2933;
}

.project-detail-page dt {
    font-weight: bold;
    color: #4b5f6d;
}

.project-detail-page dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.project-detail-page .project-detail-note {
    margin-top: 8px;
    color: #1f2933;
}

.project-detail-page .project-rich-head {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.project-detail-page .project-detail-note p {
    margin: 4px 0 0;
    white-space: normal;
}

.project-detail-page .project-description-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: Consolas, monospace;
    color: #1f2933;
    background: #fff;
    resize: vertical;
}

.project-detail-page .project-description-actions {
    margin-top: 8px;
}

.project-detail-page .project-html-preview {
    width: 100%;
    min-height: 260px;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.project-detail-page .project-html-preview-full {
    min-height: 520px;
}

.project-detail-page .project-details-collapsible summary {
    cursor: pointer;
    font-weight: bold;
    color: #1f2933;
}

.project-detail-page .project-editor-inline {
    border: 0;
    border-radius: 0;
    background: #fff;
    padding: 0;
}

.project-detail-page .project-editor-inline > textarea {
    display: none;
}

.project-detail-page .project-editor-inline .tox,
.project-detail-page .project-editor-inline .tox-editor-container {
    border-radius: 6px;
}

.project-detail-page .project-editor-inline .tox .tox-toolbar,
.project-detail-page .project-editor-inline .tox .tox-toolbar__overflow,
.project-detail-page .project-editor-inline .tox .tox-toolbar__primary {
    background: #f7fafc;
}

.project-detail-page .project-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.project-detail-page .project-section-head h3 {
    margin: 0;
}

.project-detail-page .project-attendance-panel {
    overflow: hidden;
}

.project-detail-page .project-attendance-table {
    width: 100%;
    table-layout: fixed;
}

.project-detail-page .project-attendance-table th:nth-child(1),
.project-detail-page .project-attendance-table td:nth-child(1) {
    width: 22%;
}

.project-detail-page .project-attendance-table th:nth-child(2),
.project-detail-page .project-attendance-table td:nth-child(2) {
    width: 16%;
}

.project-detail-page .project-attendance-table th:nth-child(3),
.project-detail-page .project-attendance-table td:nth-child(3) {
    width: 16%;
}

.project-detail-page .project-attendance-table th:nth-child(4),
.project-detail-page .project-attendance-table td:nth-child(4) {
    width: 18%;
}

.project-detail-page .project-attendance-table th:nth-child(5),
.project-detail-page .project-attendance-table td:nth-child(5) {
    width: 28%;
}

.project-detail-page .project-attendance-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.project-detail-page .project-attendance-stat {
    background: #f7fafc;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-detail-page .project-attendance-stat .label {
    color: #526b7c;
    font-size: 12px;
    font-weight: 700;
}

.project-detail-page .project-attendance-stat strong {
    color: #16384c;
    font-size: 20px;
}

.project-detail-page .project-attendance-stat.is-warning {
    background: #fff4df;
}

.project-detail-page .project-attendance-table tfoot th,
.project-detail-page .project-attendance-table tfoot td {
    background: #f7fafc;
    font-weight: 700;
}

.project-detail-page .project-cost-warning-text {
    color: #a55300;
    font-size: 12px;
    margin-top: 4px;
}

.project-detail-page .project-attendance-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #005f86;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.project-detail-page .project-attendance-toggle strong {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.project-detail-page .project-attendance-toggle::after {
    content: 'v';
    font-size: 12px;
    color: #6b7f8d;
}

.project-detail-page .project-attendance-toggle[aria-expanded="true"]::after {
    content: '^';
}

.project-detail-page .project-attendance-detail-row td {
    background: #fbfdfe;
}

.project-detail-page .project-attendance-detail-wrap {
    padding: 6px 0 2px;
}

.project-detail-page .project-attendance-detail-table {
    width: 100%;
    margin: 0;
    box-shadow: none;
    border: 1px solid #e4ebf0;
}

.project-detail-page .project-attendance-detail-table th,
.project-detail-page .project-attendance-detail-table td {
    font-size: 12px;
    padding: 6px 8px;
}

.project-detail-page .project-revision-assign {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 10px;
    margin: 8px 0 14px;
}

.project-detail-page .project-revision-assign form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: end;
    background: #f7fafc;
    border-radius: 6px;
    padding: 8px;
}

.project-detail-page .project-revision-assign label {
    grid-column: 1 / -1;
    font-size: 12px;
    color: #333;
    font-weight: bold;
}

.project-detail-page .project-revision-assign select {
    width: 100%;
    min-width: 0;
    padding: 6px;
}

.project-detail-page .project-revisions-panel h4 {
    color: #1f2933;
    font-size: 14px;
    font-weight: bold;
    margin: 14px 0 6px;
}

.project-detail-page .project-entities-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.project-detail-page .project-entities-grid > section {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e0e8ee;
    border-radius: 8px;
    background: #f9fbfc;
}

.project-detail-page .project-entities-grid h4 {
    margin: 0 0 8px;
    color: #1f2933;
    font-size: 14px;
}

.project-detail-page .project-entity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.project-detail-page .project-entity-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid #e5ebef;
}

.project-detail-page .project-entity-list li:first-child {
    border-top: 0;
}

.project-detail-page .project-entity-list small {
    display: block;
    margin-top: 2px;
    color: #667987;
}

.project-detail-page .project-entity-actions {
    flex: 0 0 auto;
    white-space: nowrap;
}

.project-detail-page .project-revisions-table {
    margin-top: 6px;
}

.project-detail-page .project-revisions-table .actions {
    white-space: nowrap;
}

.project-detail-page .inline-project-unassign {
    display: inline;
    margin-left: 8px;
}

.project-detail-page .inline-project-unassign button {
    border: 0;
    background: transparent;
    color: #c0392b;
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}

.project-detail-page .pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.project-detail-page .pill.active {
    background: #d1fae5;
    color: #065f46;
}

.project-detail-page .pill.inactive {
    background: #e5e7eb;
    color: #374151;
}

.project-detail-page .project-detail-json {
    max-height: 520px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f7fafc;
    border: 1px solid #dbe5ea;
    border-radius: 6px;
    padding: 10px;
    color: #1f2933;
    font-size: 12px;
}

@media (max-width: 900px) {
    .project-detail-page .project-user-state-form {
        grid-template-columns: 1fr;
    }

    .project-detail-page .project-user-state-form label {
        padding-top: 0;
    }

    .project-detail-page .project-user-state-form button {
        grid-column: 1;
    }

    .project-detail-page .project-detail-grid {
        grid-template-columns: 1fr;
    }

    .project-detail-page .project-attendance-summary {
        grid-template-columns: 1fr;
    }

    .project-detail-page dl {
        grid-template-columns: 1fr;
    }

    .project-detail-page .project-revision-assign {
        grid-template-columns: 1fr;
    }

    .project-detail-page .project-entities-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .project-detail-page .project-revision-assign form {
        grid-template-columns: 1fr;
    }

    .project-detail-page .revision-list-table thead {
        display: none;
    }

    .project-detail-page .revision-list-table,
    .project-detail-page .revision-list-table tbody,
    .project-detail-page .revision-list-table tr,
    .project-detail-page .revision-list-table td {
        display: block;
        width: 100%;
    }

    .project-detail-page .revision-list-table tr {
        border: 1px solid #dbe3ef;
        border-radius: 8px;
        padding: 8px;
        margin-bottom: 10px;
        background: #fff;
    }

    .project-detail-page .revision-list-table td {
        border: 0;
        padding: 4px 0;
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 8px;
        align-items: start;
        white-space: normal;
    }

    .project-detail-page .revision-list-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #334155;
    }

    .project-detail-page .revision-list-table td.actions {
        display: block;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px solid #e5e7eb;
        white-space: normal;
    }

    .project-detail-page .revision-list-table td.actions::before {
        content: "Akce";
        display: block;
        font-weight: bold;
        color: #334155;
        margin-bottom: 4px;
    }

    .project-detail-page .inline-project-unassign {
        display: block;
        margin: 6px 0 0;
    }

    .project-detail-page .project-entity-list li {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-detail-page .project-entity-actions {
        white-space: normal;
    }
}

/*************************************************************** VyhledĂˇvacĂ­ selecty ***************************************************************/
.select2-container {
    max-width: 100%;
    min-width: 0;
    font-size: 13px;
}

.select2-container--default.select2-container .select2-selection--single {
    min-height: 32px;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    background: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1f2933;
    line-height: 30px;
    padding-left: 8px;
    padding-right: 26px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 30px;
}

.select2-container--default.select2-container .select2-selection--multiple {
    min-height: 32px;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    background: #fff;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.15);
}

.select2-dropdown {
    border-color: #c8d3dd;
    color: #1f2933;
    z-index: 3000;
}

.select2-search--dropdown {
    padding: 6px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 6px 8px;
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.12);
}

.select2-results__option {
    padding: 6px 8px;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #00b4d8;
}

@media (max-width: 760px) {
    .select2-container {
        width: 100% !important;
    }
}

/*************************************************************** SdĂ­lenĂ© moduly ***************************************************************/
.module-panel {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
    margin-top: 16px;
}

.module-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.module-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.module-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.module-split-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.module-top-gap {
    margin-top: 12px;
}

.module-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.module-field input[type="text"],
.module-field input[type="email"],
.module-field input[type="number"],
.module-field input[type="password"],
.module-field select,
.module-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfd8df;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

.module-field textarea {
    min-height: 180px;
    resize: vertical;
}

.module-check {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 10px 0 4px;
}

.module-check label {
    margin: 0;
    font-weight: 700;
}

.module-note {
    color: #5f6b73;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 8px;
}

.module-soft-box {
    background: #f7fafc;
    border: 1px solid #dbe5ea;
    border-radius: 10px;
    padding: 14px;
}

.module-soft-box strong {
    display: block;
    margin-bottom: 8px;
}

.module-tab-active {
    background: #004d66 !important;
}

.module-tab-active:hover {
    background: #00384b !important;
}

.module-flash-ok {
    margin-top: 12px;
    background: #ecfff1;
    border: 1px solid #98d7aa;
    color: #12522b;
    padding: 12px 14px;
    border-radius: 8px;
}

.module-flash-err {
    margin-top: 12px;
    background: #fff4e5;
    border: 1px solid #f2b46d;
    color: #7a4b00;
    padding: 12px 14px;
    border-radius: 8px;
}

@media (max-width: 900px) {
    .module-panel {
        padding: 12px;
        margin-top: 12px;
    }

    .module-actions {
        gap: 6px;
    }

    .module-grid-2,
    .module-split-2 {
        grid-template-columns: 1fr;
    }
}

/*************************************************************** email_settings.php ***************************************************************/
.email-settings-page .container {
    max-width: 1120px;
    padding-top: 16px;
    padding-bottom: 28px;
}

.email-settings-page .module-panel {
    border: 1px solid rgba(0, 180, 216, 0.12);
}

.email-settings-page .module-panel h1,
.email-settings-page .module-panel h2 {
    margin: 0 0 10px;
}

.email-settings-page .module-actions {
    margin-bottom: 0;
}

.email-settings-page .module-actions .diagnose-button,
.email-settings-page .module-actions .diagnose-button-button,
.email-settings-page .module-actions button.diagnose-button {
    min-height: 0;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    line-height: normal;
}

.email-settings-page .module-actions .diagnose-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.email-settings-page .module-grid-2,
.email-settings-page .module-grid-1,
.email-settings-page .module-split-2 {
    margin-top: 10px;
}

.email-settings-page .module-field label {
    color: #334;
    font-weight: 600;
}

.email-settings-page .module-field input[type="text"],
.email-settings-page .module-field input[type="email"],
.email-settings-page .module-field input[type="number"],
.email-settings-page .module-field input[type="password"],
.email-settings-page .module-field select,
.email-settings-page .module-field textarea {
    min-height: 44px;
    font-size: 15px;
    line-height: 1.45;
    color: #1d2a35;
    border-color: #cfd8e3;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.email-settings-page .module-field textarea {
    min-height: 180px;
    font-family: Arial, sans-serif;
}

.email-settings-page .module-field input:focus,
.email-settings-page .module-field select:focus,
.email-settings-page .module-field textarea:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.email-settings-page .module-check {
    background: #f7fafc;
    border: 1px solid #dbe5ea;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 14px;
}

.email-settings-page .module-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00b4d8;
    flex: 0 0 auto;
}

.email-settings-page .module-note {
    max-width: 90ch;
}

.email-settings-page .module-soft-box {
    height: 100%;
    box-sizing: border-box;
}

.email-settings-page .module-flash-ok,
.email-settings-page .module-flash-err {
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

@media (max-width: 900px) {
    .email-settings-page .container {
        padding-top: 12px;
        padding-bottom: 18px;
    }
}

@media (max-width: 700px) {
    .email-settings-page .module-actions .diagnose-button,
    .email-settings-page .module-actions .diagnose-button-button,
    .email-settings-page .module-actions button.diagnose-button {
        flex: 1 1 auto;
        width: auto;
        padding: 10px 20px;
        font-size: 14px;
    }

    .email-settings-page .module-field input[type="text"],
    .email-settings-page .module-field input[type="email"],
    .email-settings-page .module-field input[type="number"],
    .email-settings-page .module-field input[type="password"],
    .email-settings-page .module-field select,
    .email-settings-page .module-field textarea {
        font-size: 16px;
    }
}

@media (max-width: 900px) {
    .companies-page .form-grid {
        grid-template-columns: 1fr;
    }

    .companies-page .ares-row {
        flex-wrap: wrap;
    }
}

/*************************************************************** VyhledĂˇvacĂ­ selecty ***************************************************************/
.select2-container {
    max-width: 100%;
    min-width: 140px;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    min-height: 40px;
    color: #1f2933;
    background: #fff;
    box-sizing: border-box;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    min-height: 38px;
    padding: 6px 32px 6px 10px;
    line-height: 26px;
    color: #1f2933;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    min-height: 38px;
    right: 6px;
}

.select2-container--default .select2-selection--multiple {
    padding: 3px 6px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.18);
}

.select2-dropdown {
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
    z-index: 2500;
}

.select2-search--dropdown {
    padding: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 14px;
    box-sizing: border-box;
}

.select2-results__option {
    padding: 7px 10px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #00b4d8;
}

.table-container .select2-container,
.form-field .select2-container,
.module-field .select2-container {
    width: 100% !important;
}

.mrevi-search-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.mrevi-search-select {
    position: relative;
    width: 100%;
    min-width: 0;
    color: #1f2933;
}

.mrevi-search-select-toggle {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    background: #fff;
    color: #1f2933;
    padding: 6px 10px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mrevi-search-select-toggle:focus,
.mrevi-search-select.is-open .mrevi-search-select-toggle {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.15);
}

.mrevi-search-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mrevi-search-select-arrow {
    flex: 0 0 auto;
    color: #4b5f6d;
}

.mrevi-search-select-panel {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    z-index: 3200;
    width: max(100%, 280px);
    max-width: min(620px, 92vw);
    background: #fff;
    border: 1px solid #c8d3dd;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    padding: 6px;
    overflow: hidden;
}

.mrevi-search-select-portal {
    z-index: 99999 !important;
}

.mrevi-search-select.is-open .mrevi-search-select-panel {
    display: block;
}

.mrevi-search-select-panel.is-open {
    display: block;
}

.mrevi-search-select-input {
    width: 100% !important;
    min-height: 32px;
    box-sizing: border-box;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 5px 8px;
    margin: 0 0 6px;
    line-height: 1.25;
    color: #1f2933;
    background: #fff;
}

.mrevi-search-select-input:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.12);
}

.mrevi-search-select-action {
    display: block;
    min-height: 32px;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 5px 8px;
    margin: 0 0 6px;
    line-height: 1.25;
    font-size: 13px;
    text-decoration: none;
    color: #1f2933;
    background: #f8fbfd;
    box-sizing: border-box;
}

.mrevi-search-select-action:hover,
.mrevi-search-select-action:focus {
    border-color: #00b4d8;
    background: #eefbff;
    outline: none;
}

.mrevi-search-select-list {
    max-height: 260px;
    overflow: auto;
}

/* Pole input s plus/akcĂ­ vpravo */
.input-plus-field {
    position: relative;
    width: 100%;
    min-width: 0;
}

.input-plus-field > input[type="text"],
.input-plus-field > input[type="search"],
.input-plus-field > input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding-right: 48px;
}

.input-plus-action {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #111;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
}

.input-plus-action:hover,
.input-plus-action:focus {
    color: #00b4d8;
    outline: none;
}

.mrevi-search-select-group {
    padding: 7px 8px 3px;
    color: #6b7280;
    font-size: 12px;
    font-weight: bold;
}

.mrevi-search-select-option {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #1f2933;
    padding: 7px 8px;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.mrevi-search-select-option:hover,
.mrevi-search-select-option:focus {
    outline: none;
    background: #e6f7fb;
}

.mrevi-search-select-option.is-selected {
    background: #00b4d8;
    color: #fff;
}

.mrevi-search-select-option.is-assigned:not(.is-selected) {
    background: #f0fdf4;
    color: #15803d;
    font-weight: 800;
}

.mrevi-search-select.has-assigned-value .mrevi-search-select-toggle {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
    font-weight: 800;
}

.mrevi-search-select-empty {
    padding: 9px 8px;
    color: #6b7280;
}

@media (max-width: 760px) {
    .mrevi-search-select-panel {
        width: 100%;
        max-width: calc(100vw - 24px);
    }
}

/*************************************************************** elektroinstalace_revize_list.php ***************************************************************/
.elr-page .container {
    width: 100%;
    max-width: 1680px !important;
    padding: 8px !important;
}

.elr-page .revision-template-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.elr-page .revision-template-field,
.elr-page .revision-template-action {
    min-width: 0;
}

.elr-page .revision-template-field label {
    display: block;
    margin-bottom: 4px;
    color: #333;
    font-size: 12px;
    font-weight: 700;
}

.elr-page .revision-template-field select {
    width: 100%;
    min-height: 38px;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 6px 8px;
    background: #fff;
    color: #1f2933;
}

.elr-page .revision-template-action .diagnose-button {
    min-width: 150px;
}

.elr-page .editor-top {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: start;
    margin: 14px 0 18px;
}

.elr-page .editor-top > .field {
    display: flex;
    grid-column: span 3;
    flex-direction: column;
    min-width: 0;
    margin: 0;
}

.elr-page .editor-top > .revision-field-wide {
    grid-column: span 6;
}

.elr-page .editor-top .field label,
.elr-page .toolbar .field label {
    display: block;
    margin-bottom: 4px;
    color: #333;
    font-size: 12px;
    font-weight: bold;
}

.elr-page .editor-top input[type="text"],
.elr-page .editor-top input[type="number"],
.elr-page .editor-top select,
.elr-page .toolbar input[type="text"],
.elr-page .toolbar select {
    width: 100% !important;
    min-height: 38px;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 6px 8px;
    color: #1f2933;
    background: #fff;
    box-sizing: border-box;
}

.elr-page .editor-top input[type="text"]:focus,
.elr-page .editor-top input[type="number"]:focus,
.elr-page .editor-top select:focus,
.elr-page .toolbar input[type="text"]:focus,
.elr-page .toolbar select:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.15);
}

.elr-page .editor-top .select2-container,
.elr-page .toolbar .select2-container {
    width: 100% !important;
}

.elr-page .editor-top .mrevi-search-select-toggle {
    min-height: 38px;
}

.elr-page .editor-top .hint {
    margin-top: 5px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.elr-page .editor-top .field label.revision-panel-order-switch {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 38px;
    margin: 0 !important;
    padding: 6px 8px;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

.elr-page .editor-top .field label.revision-panel-order-switch > span:not(.drawing-switch) {
    line-height: 1.25;
}

.elr-page .revision-check-row {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0 0 !important;
    color: #1f2933 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3;
}

.elr-page .revision-check-row input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px !important;
    height: 18px;
    min-height: 0;
    margin: 0;
}

.elr-page .revision-active-control {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 6px 8px;
    background: #fff;
}

.elr-page .revision-active-control .revision-check-row,
.elr-page .revision-active-control .pill {
    margin: 0 !important;
}

.elr-page .elr-required-choice {
    margin: 10px 0 12px;
    padding: 10px;
    border: 1px solid #c8d3dd;
    border-radius: 8px;
    background: #f8fafc;
    color: #1f2933;
}

.elr-page .elr-required-choice legend {
    max-width: calc(100% - 10px);
    padding: 0 5px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.elr-page .elr-yes-no-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 2px 0 8px;
}

.elr-page .elr-choice-editor {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.elr-page .elr-yes-no-options label {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    border: 1px solid #c8d3dd;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    box-sizing: border-box;
}

.elr-page .elr-yes-no-options label:has(input:checked) {
    border-color: #00b4d8;
    background: #eafaff;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.12);
}

.elr-page .elr-yes-no-options input[type="radio"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #00b4d8;
}

.elr-page .elr-choice-text-label {
    color: #44515d;
    font-size: 12px;
    font-weight: 700;
}

.elr-page .elr-choice-editor textarea {
    width: 100%;
    min-height: 74px;
    margin: 0;
    box-sizing: border-box;
    resize: vertical;
}

.elr-page .elr-continuity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 8px 0;
}

.elr-page .elr-continuity-grid label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
    border: 1px solid #c8d3dd;
    border-radius: 7px;
    padding: 9px 10px;
    background: #fff;
    color: #1f2933;
    font-size: 12px;
    font-weight: 700;
}

.elr-page .elr-continuity-grid .doc-input {
    min-height: 34px;
    font-size: 16px;
}

.panel-wizard-voltage,
.panel-voltage-control {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.panel-wizard-voltage select,
.panel-wizard-voltage input,
.panel-voltage-control select,
.panel-voltage-control input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.panel-wizard-voltage [data-panel-voltage-custom-wrap][hidden],
.panel-voltage-control [data-panel-voltage-custom-wrap][hidden] {
    display: none;
}

.panel-voltage-save-status {
    min-height: 17px;
    color: #52606d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.panel-voltage-save-status.is-saving {
    color: #075d66;
}

.panel-voltage-save-status.is-saved {
    color: #166534;
}

.panel-voltage-save-status.is-error {
    color: #b42318;
}

@media (max-width: 1180px) {
    .elr-page .editor-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .elr-page .editor-top > .field {
        grid-column: span 1;
    }

    .elr-page .editor-top > .revision-field-wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .elr-page .container {
        padding: 4px !important;
    }

    .elr-page .revision-template-form,
    .elr-page .editor-top {
        grid-template-columns: minmax(0, 1fr);
    }

    .elr-page .editor-top > .field,
    .elr-page .editor-top > .revision-field-wide {
        grid-column: 1;
    }

    .elr-page .revision-template-action .diagnose-button {
        width: 100%;
        min-width: 0;
    }

    .elr-page .elr-yes-no-options {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* Help widget */
.help-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1500;
}

.help-widget-fab {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-weight: 800;
    font-size: 30px;
    line-height: 1;
    background: linear-gradient(135deg, #0a6f8f, #00a6c8);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.help-widget-fab:hover,
.help-widget-fab:focus {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #095a74, #008ba8);
}

.help-widget-overlay {
    position: fixed;
    inset: 0;
    z-index: 1499;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(11, 20, 30, 0.52);
    backdrop-filter: blur(3px);
}

.help-widget-overlay[hidden] {
    display: none;
}

.help-widget-dialog {
    width: min(920px, 96vw);
    max-height: min(88vh, 920px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid #cfdbe5;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.help-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e6edf2;
    background: linear-gradient(180deg, #f7fafc, #f0f6fa);
}

.help-widget-header h2 {
    margin: 0;
    font-size: 19px;
    color: #142433;
}

.help-widget-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-widget-edit-link {
    font-size: 13px;
    text-decoration: none;
    color: #0a6f8f;
    font-weight: 700;
}

.help-widget-close {
    border: 0;
    background: transparent;
    color: #3a4f63;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.help-widget-content {
    padding: 16px;
    overflow: auto;
    color: #1f2933;
    line-height: 1.5;
}

.help-widget-content h1,
.help-widget-content h2,
.help-widget-content h3,
.help-widget-content h4 {
    margin-top: 1.1em;
    margin-bottom: 0.45em;
}

.help-widget-content h1:first-child,
.help-widget-content h2:first-child,
.help-widget-content h3:first-child,
.help-widget-content h4:first-child {
    margin-top: 0;
}

.help-widget-content a {
    color: #0a6f8f;
}

.help-widget-content .help-button-link {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: #fff;
    background: #0a6f8f;
}

.help-widget-content .help-button-link:hover,
.help-widget-content .help-button-link:focus {
    background: #095a74;
}

.help-widget-content .help-embed,
.help-widget-content .help-video-embed,
.help-node-body .help-video-embed,
.help-editor-content .help-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 12px 0;
    border: 1px solid #d6e0e7;
    border-radius: 10px;
    overflow: hidden;
    background: #f6f8fb;
}

.help-widget-content .help-embed iframe,
.help-video-embed .help-video-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.help-video-frame {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    margin: 12px 0;
    border: 1px solid #d6e0e7;
    border-radius: 10px;
    background: #000;
}

.help-video-embed .help-video-frame {
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    aspect-ratio: auto;
}

body.help-open {
    overflow: hidden;
}

/* GlobĂˇlnĂ­ uĹľivatelskĂ© poznĂˇmky */
.note-user-widget {
    position: fixed;
    right: 88px;
    bottom: 18px;
    z-index: 1510;
}

.note-user-fab {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #7137a8, #a14dd1);
    box-shadow: 0 10px 28px rgba(62, 24, 91, .34);
}

.note-user-fab:hover,
.note-user-fab:focus-visible {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #5f2c91, #873bb8);
}

.note-user-fab svg {
    width: 28px;
    height: 28px;
}

.note-user-radio-fab {
    position: absolute;
    right: 70px;
    bottom: 0;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    box-shadow: 0 10px 28px rgba(127, 29, 29, .38);
}

.note-user-radio-fab svg {
    width: 29px;
    height: 29px;
}

.note-user-radio-fab.is-arming {
    opacity: .72;
}

.note-user-radio-fab.is-recording {
    background: #7f1d1d;
    animation: note-user-radio-pulse .75s infinite;
}

.note-user-radio-fab.is-playing {
    background: #991b1b;
    box-shadow: 0 0 0 6px rgba(239, 68, 68, .22), 0 10px 28px rgba(127, 29, 29, .38);
}

.note-user-radio-fab:disabled {
    cursor: not-allowed;
}

.note-user-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

.note-user-overlay {
    position: fixed;
    inset: 0;
    z-index: 1509;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(20, 13, 27, .56);
    backdrop-filter: blur(3px);
}

.note-user-overlay[hidden],
.note-user-composer[hidden],
.note-user-detail[hidden],
.note-user-message[hidden],
.note-user-link-banner[hidden],
.note-user-empty[hidden] {
    display: none !important;
}

.note-user-dialog {
    width: min(1120px, 97vw);
    max-height: min(92vh, 980px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d9cce5;
    border-radius: 18px;
    background: #f8f6fb;
    box-shadow: 0 28px 75px rgba(0, 0, 0, .4);
}

.note-user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #e6dced;
    background: #fff;
}

.note-user-header h2 {
    margin: 0;
    color: #44205f;
    font-size: 20px;
}

.note-user-header small {
    display: block;
    max-width: 65vw;
    overflow: hidden;
    color: #786786;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-user-header-actions,
.note-user-composer-actions,
.note-user-composer-row {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.note-user-header-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    box-sizing: border-box;
    width: 29px;
    height: 29px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #fff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .2);
    cursor: pointer;
    text-decoration: none;
}

.note-user-header-icon svg { width: 16px; height: 16px; }
.note-user-header-icon.list { background: #7c3aed; }
.note-user-header-icon.close { color: #fff; background: #c62828; font-size: 20px; line-height: 1; }
.note-user-header-icon:hover,
.note-user-header-icon:focus-visible { filter: brightness(1.1); transform: translateY(-1px); }

.note-user-close,
.note-user-composer-head button {
    padding: 0 5px;
    border: 0;
    color: #503b60;
    background: transparent;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.note-user-close.note-user-header-icon {
    width: 29px;
    height: 29px;
    padding: 0;
    color: #fff;
    background: #c62828;
    font-size: 20px;
}

.note-user-message,
.note-user-link-banner {
    margin: 10px 14px 0;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 13px;
}

.note-user-message {
    color: #18543a;
    background: #dcfce7;
}

.note-user-message.is-error {
    color: #8c1d1d;
    background: #fee2e2;
}

.note-user-link-banner {
    color: #55306e;
    background: #f0e6f7;
}

.note-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: 4px;
    align-content: start;
    align-items: start;
    column-gap: 7px;
    row-gap: 4px;
    min-height: 100px;
    padding: 8px;
    overflow: auto;
}

.note-user-empty {
    padding: 28px 16px;
    color: #6f6477;
    text-align: center;
}

.note-user-card {
    min-width: 0;
    height: auto;
    align-self: start;
    padding: 12px;
    border: 1px solid #dfd4e7;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(54, 29, 72, .08);
    cursor: grab;
}

.note-user-card.is-dragging {
    opacity: .48;
}

.note-user-card.is-drop-target {
    border-color: #8b3fbc;
    box-shadow: 0 0 0 3px rgba(139, 63, 188, .2);
}

.note-user-card.is-selected {
    border-color: #8b3fbc;
    box-shadow: 0 0 0 2px rgba(139, 63, 188, .16), 0 8px 20px rgba(54, 29, 72, .12);
}

.note-user-card-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.note-user-card-head strong,
.note-user-card p,
.note-user-card-meta span {
    overflow-wrap: anywhere;
}

.note-user-card-head span,
.note-user-card-meta,
.note-user-components small {
    color: #776b7e;
    font-size: 11px;
}

.note-user-card p {
    margin: 8px 0;
    color: #352d3a;
    font-size: 13px;
    line-height: 1.45;
}

.note-user-card-media img,
.note-user-card-media video,
.note-user-detail-media img,
.note-user-detail-media video {
    display: block;
    width: 100%;
    max-height: 190px;
    object-fit: cover;
    border-radius: 9px;
    background: #211a26;
}

.note-user-card-media audio,
.note-user-detail-media audio {
    width: 100%;
}

.note-user-transcript {
    font-style: italic;
}

.note-user-components ul,
.note-user-history {
    margin: 5px 0;
    padding-left: 18px;
}

.note-user-components li,
.note-user-history li {
    margin: 4px 0;
}

.note-user-components li span,
.note-user-history li span {
    display: block;
    color: #766c7c;
    font-size: 11px;
}

.note-user-history details {
    margin-top: 3px;
}

.note-user-history pre {
    max-width: 100%;
    max-height: 180px;
    margin: 4px 0;
    padding: 7px;
    overflow: auto;
    border-radius: 7px;
    background: #f5f1f7;
    font: 11px/1.4 ui-monospace, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.note-user-card-meta {
    display: grid;
    gap: 2px;
    margin-top: 8px;
}

.note-user-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.note-user-card-actions button:not(.note-user-card-action) {
    padding: 5px 8px;
    border: 1px solid #cfbfda;
    border-radius: 7px;
    color: #55306e;
    background: #f7f0fb;
    cursor: pointer;
    font-size: 11px;
}

.note-user-composer {
    margin: 0 14px 12px;
    padding: 13px;
    overflow: auto;
    border: 1px solid #d9cce4;
    border-radius: 13px;
    background: #fff;
}

.note-user-composer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.note-user-composer label {
    display: grid;
    min-width: 0;
    gap: 4px;
    margin-bottom: 8px;
    color: #4b3c55;
    font-size: 12px;
    font-weight: 700;
}

.note-user-composer input,
.note-user-composer textarea,
.note-user-composer select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.note-user-composer-row > label {
    flex: 1 1 190px;
}

.note-user-detail {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e8e0ed;
}

.note-user-toolbar {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px 8px;
    border-top: 1px solid #e5daeb;
    background: rgba(255, 255, 255, .96);
}

.note-user-toolbar button {
    position: relative;
    display: grid;
    place-items: center;
    width: 31px;
    min-width: 31px;
    height: 31px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .24);
    transition: transform .15s ease, filter .15s ease;
}

.note-user-toolbar button:hover,
.note-user-toolbar button:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.note-user-toolbar button svg {
    display: block;
    width: 17px;
    height: 17px;
    color: #fff;
}

.note-user-toolbar button small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.note-user-tool-button.photo { background: #4b5563; }
.note-user-tool-button.video { background: #dc2626; }
.note-user-tool-button.audio { background: #087fbd; }
.note-user-tool-button.text { background: #7c3aed; }

.note-user-toolbar button.is-recording {
    color: #fff;
    background: #c62828;
    animation: note-user-pulse 1.2s infinite;
}

@keyframes note-user-pulse {
    50% { box-shadow: 0 0 0 7px rgba(198, 40, 40, .16); }
}

@keyframes note-user-radio-pulse {
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, .2), 0 10px 28px rgba(127, 29, 29, .38); }
}

.note-user-incoming-overlay,
.note-user-video-overlay {
    position: fixed;
    inset: 0;
    z-index: 1650;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(17, 12, 21, .66);
    backdrop-filter: blur(4px);
}

.note-user-incoming-overlay[hidden],
.note-user-video-overlay[hidden],
.note-user-incoming-reply[hidden],
.note-user-radio-status[hidden],
.note-user-radio-fab[hidden] {
    display: none !important;
}

.note-user-incoming-dialog,
.note-user-video-dialog {
    width: min(720px, 96vw);
    max-height: calc(100dvh - 32px);
    border: 1px solid #dacde3;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(0, 0, 0, .42);
}

.note-user-incoming-dialog {
    overflow: auto;
}

.note-user-video-dialog {
    height: min(850px, calc(100dvh - 32px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.note-user-incoming-dialog > header,
.note-user-video-dialog > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    border-bottom: 1px solid #e9e0ed;
    background: #faf7fc;
}

.note-user-incoming-dialog h2,
.note-user-video-dialog h2 {
    margin: 0;
    color: #452457;
    font-size: 20px;
}

.note-user-incoming-dialog header small {
    color: #75677d;
}

.note-user-incoming-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
}

.note-user-round-action {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.note-user-round-action svg {
    width: 19px;
    height: 19px;
}

.note-user-round-action.reply { background: #7c3aed; }
.note-user-round-action.delete { background: #c62828; }
.note-user-round-action.close { background: #475569; }
.note-user-round-action[hidden] { display: none !important; }

.note-user-incoming-body {
    padding: 16px;
    color: #302735;
    line-height: 1.55;
}

.note-user-incoming-body > p {
    margin: 0 0 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.note-user-incoming-media {
    display: grid;
    gap: 10px;
}

.note-user-incoming-media img,
.note-user-incoming-media video {
    display: block;
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 11px;
    background: #17111b;
}

.note-user-incoming-media audio {
    width: 100%;
}

.note-user-incoming-reply {
    padding: 0 16px 16px;
}

.note-user-incoming-reply textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin-bottom: 8px;
}

.note-user-incoming-reply > div,
.note-user-video-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

[data-note-user-incoming-reply-audio].is-recording {
    color: #fff;
    background: #c62828;
}

.note-user-video-dialog > header > button {
    padding: 0 5px;
    border: 0;
    color: #4b3b53;
    background: transparent;
    cursor: pointer;
    font-size: 29px;
}

.note-user-video-dialog video {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    background: #09070a;
}

.note-user-video-dialog > header,
.note-user-video-tools,
.note-user-video-status,
.note-user-video-actions {
    flex: 0 0 auto;
}

.note-user-video-status {
    padding: 10px 14px 0;
    color: #5c4c65;
    text-align: center;
}

.note-user-video-actions {
    justify-content: center;
    padding: 12px 14px 15px;
}

.note-user-radio-status {
    position: fixed;
    right: 18px;
    bottom: 90px;
    z-index: 1640;
    display: grid;
    min-width: 210px;
    max-width: min(360px, calc(100vw - 24px));
    gap: 3px;
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #7f1d1d;
    background: rgba(255, 247, 247, .97);
    box-shadow: 0 12px 32px rgba(89, 20, 20, .24);
}

.note-user-radio-status span {
    overflow-wrap: anywhere;
    font-size: 12px;
}

.note-user-radio-status b {
    color: #b91c1c;
    font-size: 18px;
}

.note-user-card {
    position: relative;
    padding: 8px;
}

.note-user-card-head {
    align-items: center;
}

.note-user-card-head strong {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    color: #3d2948;
    font-size: 13px;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.note-user-card-drag,
.note-user-card-action,
.note-user-mini-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    touch-action: none;
}

.note-user-card-actions .note-user-card-action,
.note-user-list-icon-actions .note-user-card-action,
.note-user-list-card-head-actions .note-user-card-drag {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 29px;
    min-width: 29px;
    height: 29px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background-image: none;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .18);
    font-size: 0;
    line-height: 1;
}

.note-user-card-drag { color: #64748b; background: #eef2f6; }
.note-user-card-drag svg,
.note-user-card-action svg { width: 17px; height: 17px; }
.note-user-card-action.edit { background: #b76e00; }
.note-user-card-action.location { background: #e87916; }
.note-user-card-action.calendar { background: #087fbd; }
.note-user-card-action.share { background: #169348; }
.note-user-card-action.move { background: #7c3aed; }
.note-user-card-action.delete,
.note-user-mini-icon.delete { background: #c62828; }
.note-user-card-action.link { background: #169348; }
.note-user-mini-icon.confirm { background: #169348; font-size: 20px; }

.note-user-source-link,
.note-user-location-link {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin: 4px 0;
    color: #5b2b75;
    font-size: 11px;
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.note-user-card-context-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
}

.note-user-card-context-icon {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 999px;
    color: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
}

.note-user-card-context-icon.source { background:#7c3aed; }
.note-user-card-context-icon.location { background:#e87916; }
.note-user-card-context-icon svg { width:13px; height:13px; }

.note-user-source-link:hover,
.note-user-location-link:hover { text-decoration: underline; }
.note-user-source-link svg,
.note-user-location-link svg { flex: 0 0 auto; width: 15px; height: 15px; }
.note-user-location-link { color: #b45309; }

.note-user-card-text {
    max-height: 2.8em;
    margin: 5px 0;
    overflow: hidden;
    cursor: pointer;
    font-size: 12px !important;
    line-height: 1.35 !important;
}

.note-user-card-text.is-expanded {
    max-height: none;
    white-space: pre-wrap;
}

.note-user-card-media {
    margin-top: 5px;
}

.note-user-video-frame {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #160f1b;
}

.note-user-media-fullscreen {
    position: absolute;
    z-index: 4;
    top: 7px;
    right: 7px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    color: #fff;
    background: rgba(32, 22, 39, .82);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .36);
    cursor: pointer;
}

.note-user-media-fullscreen svg {
    width: 18px;
    height: 18px;
}

.note-user-media-fullscreen:hover,
.note-user-media-fullscreen:focus-visible {
    outline: 0;
    background: #7c3aed;
}

.note-user-video-viewer {
    position: fixed;
    z-index: 1900;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #000;
}

.note-user-video-viewer[hidden] {
    display: none !important;
}

.note-user-video-viewer-stage {
    display: grid;
    place-items: center;
    width: 100vmin;
    height: 100vmin;
    width: min(100vw, 100dvh);
    height: min(100vw, 100dvh);
    max-width: 100vw;
    max-height: 100dvh;
    background: #000;
}

.note-user-video-viewer-stage video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
}

.note-user-video-viewer .note-user-video-viewer-close {
    position: absolute;
    z-index: 2;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    color: #fff;
    background: rgba(32, 22, 39, .82);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
    cursor: pointer;
    font-size: 27px;
    line-height: 1;
}

body.note-user-video-viewer-open {
    overflow: hidden;
}

video:fullscreen,
.note-user-card-media video:fullscreen,
.note-user-list-media video:fullscreen,
.note-user-incoming-media video:fullscreen,
.note-user-detail-media video:fullscreen {
    display: block !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 0 !important;
    background: #000 !important;
}

video:-webkit-full-screen,
.note-user-card-media video:-webkit-full-screen,
.note-user-list-media video:-webkit-full-screen,
.note-user-incoming-media video:-webkit-full-screen,
.note-user-detail-media video:-webkit-full-screen {
    display: block !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 0 !important;
    background: #000 !important;
}

.note-user-card-media img,
.note-user-card-media video {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: #160f1b;
}

.note-user-card-media-play {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #271a2e;
    cursor: pointer;
}

.note-user-card-media-play > span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .62);
    transform: translate(-50%, -50%);
}

.note-user-card-media-play.is-playing > span { opacity: 0; }
.note-user-card-media-play.audio {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    min-height: 29px;
    border-radius: 999px;
    background: #087fbd;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .2);
}
.note-user-card-media-play.audio > span {
    position: static;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    margin: 0;
    border-radius: 0;
    background: transparent;
    transform: none;
}
.note-user-card-media-play.audio > span svg { width: 17px; height: 17px; color:#fff; }
.note-user-card-media-play.audio.is-playing { background:#169348; }
.note-user-card-media-play.audio.is-playing > span { opacity:1; }
.note-user-card--audio .note-user-card-media { display:flex; align-items:center; min-height:29px; margin-top:3px; }
.note-user-card--audio { padding:6px; }
.note-user-icon-actions { display: none; justify-content: flex-end; margin-top: 7px; }
.note-user-card.is-selected .note-user-icon-actions { display: flex; }
.note-user-card.is-dragging { z-index: 2; opacity: .66; cursor: grabbing; transform: scale(.98); box-shadow: 0 14px 30px rgba(63, 35, 76, .22); }

.note-user-action-overlay {
    position: fixed;
    inset: 0;
    z-index: 1700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(20, 13, 27, .68);
    backdrop-filter: blur(4px);
}

.note-user-action-overlay[hidden],
.note-user-action-dialog form[hidden],
.note-user-action-dialog fieldset[hidden] { display: none !important; }

.note-user-action-dialog {
    width: min(470px, 96vw);
    overflow: hidden;
    border: 1px solid #dacde3;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 24px 65px rgba(0, 0, 0, .4);
}

.note-user-action-dialog > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 13px;
    background: #faf7fc;
}

.note-user-action-dialog h2 { margin: 0; color: #452457; font-size: 18px; }
.note-user-action-dialog > header button { border: 0; color: #475569; background: transparent; cursor: pointer; font-size: 27px; }
.note-user-action-dialog form { display: grid; gap: 10px; padding: 14px; }
.note-user-action-dialog label { display: grid; min-width: 0; gap: 4px; }
.note-user-action-dialog select,
.note-user-action-dialog input[type="datetime-local"] { box-sizing: border-box; width: 100%; min-width: 0; }
.note-user-action-dialog fieldset { display: grid; gap: 7px; margin: 0; padding: 9px; border: 1px solid #ddd2e5; border-radius: 9px; }
.note-user-action-dialog fieldset label { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; }

.note-user-video-tools {
    display: flex;
    gap: 7px;
    padding: 8px;
    background: #151019;
}

.note-user-video-tools select { flex: 1 1 auto; min-width: 0; }
.note-user-video-tools select,
.note-user-video-tools button { padding: 7px 9px; border: 1px solid #514359; border-radius: 8px; color: #fff; background: #27202c; }
.note-user-video-record { display: grid; place-items: center; width: 78px; height: 78px; padding: 0; border: 4px solid #fff; border-radius: 50%; background: #d7d1da; cursor: pointer; box-shadow: 0 0 0 4px rgba(124,58,237,.12); }
.note-user-video-record > span { width: 56px; height: 56px; border-radius: 50%; background: #e11d48; transition: border-radius .15s, width .15s, height .15s; }
.note-user-video-record.is-recording > span { width: 31px; height: 31px; border-radius: 6px; background: #dc2626; }
.note-user-video-record:disabled { cursor: wait; opacity: .55; }

body.note-user-open {
    overflow: hidden;
}

body.note-user-incoming-open,
body.note-user-media-open {
    overflow: hidden;
}

.help-admin-page .help-admin-form {
    display: grid;
    gap: 10px;
}

.help-admin-page .help-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.help-admin-page .help-active-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.help-admin-page .help-admin-list-wrap {
    margin-top: 16px;
}

@media (max-width: 760px) {
    .elr-page .elr-continuity-grid {
        grid-template-columns: 1fr;
    }

    .help-widget {
        right: 12px;
        bottom: 12px;
    }

    .help-widget-fab {
        width: 52px;
        height: 52px;
        font-size: 25px;
    }

    .help-widget-overlay {
        padding: 10px;
        align-items: stretch;
    }

    .help-widget-dialog {
        width: 100%;
        max-height: 100%;
        border-radius: 12px;
    }

    .note-user-widget {
        right: 72px;
        bottom: 12px;
    }

    .note-user-fab {
        width: 52px;
        height: 52px;
    }

    .note-user-fab svg {
        width: 25px;
        height: 25px;
    }

    .note-user-radio-fab {
        right: 64px;
        width: 52px;
        height: 52px;
    }

    .note-user-radio-fab svg {
        width: 26px;
        height: 26px;
    }

    .note-user-overlay {
        padding: 0;
        align-items: stretch;
    }

    .note-user-dialog {
        width: 100%;
        max-height: 100%;
        border-radius: 0;
        background: #f0edf3;
    }

    .note-user-header {
        padding: 10px;
    }

    .note-user-header-actions .diagnose-button {
        padding: 7px 8px;
        font-size: 11px;
    }

    .note-user-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 5px;
        row-gap: 3px;
        padding: 5px;
    }

    .note-user-composer {
        margin: 0 10px 8px;
    }

    .note-user-composer-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .note-user-toolbar {
        gap: 4px;
        padding: 5px 6px max(6px, env(safe-area-inset-bottom));
    }

    .note-user-toolbar button {
        flex: 0 0 auto;
        width: 30px;
        min-width: 30px;
        height: 30px;
        padding: 0;
        border-radius: 50%;
    }

    .note-user-toolbar button svg { width: 16px; height: 16px; }
    .note-user-header { gap: 5px; }
    .note-user-header h2 { font-size: 16px; }
    .note-user-header small { max-width: 48vw; }
    .note-user-card { padding: 6px; border-radius: 9px; }
    .note-user-card-head strong { font-size: 12px; }
    .note-user-card-action,
    .note-user-card-drag { width: 27px; height: 27px; }
    .note-user-icon-actions { gap: 4px; }
    .note-user-card-text { font-size: 11px !important; }
    .note-user-media-fullscreen { top: 5px; right: 5px; width: 29px; min-width: 29px; height: 29px; }

    .note-user-incoming-overlay,
    .note-user-video-overlay {
        box-sizing: border-box;
        padding: 7px;
        align-items: stretch;
    }

    .note-user-incoming-dialog,
    .note-user-video-dialog {
        width: 100%;
        max-height: calc(100dvh - 14px);
        border-radius: 12px;
    }

    .note-user-video-dialog {
        height: calc(100dvh - 14px);
    }

    .note-user-incoming-dialog > header,
    .note-user-video-dialog > header {
        padding: 10px;
    }

    .note-user-incoming-dialog h2,
    .note-user-video-dialog h2 {
        font-size: 17px;
    }

    .note-user-round-action {
        width: 32px;
        height: 32px;
    }

    .note-user-radio-status {
        right: 12px;
        bottom: 76px;
    }
}

/* Help admin (v2) */
.help-admin-page .help-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.help-admin-page .help-admin-form {
    display: grid;
    gap: 12px;
}

.help-admin-page .help-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.help-editor-shell {
    border: 1px solid #d3e0ea;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.help-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid #e6edf3;
    background: #f4f8fb;
}

.help-editor-toolbar button {
    border: 1px solid #c6d6e4;
    border-radius: 8px;
    background: #ffffff;
    color: #173246;
    min-width: 38px;
    height: 34px;
    padding: 0 10px;
    cursor: pointer;
    font-weight: 600;
}

.help-editor-toolbar button:hover,
.help-editor-toolbar button:focus {
    background: #e8f4fb;
    border-color: #9bc3dd;
}

.help-editor-mode-switch,
.help-editor-format-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.help-editor-mode-switch {
    padding-right: 8px;
    margin-right: 2px;
    border-right: 1px solid #cfdce6;
}

.help-editor-toolbar .help-editor-mode-switch button.is-active {
    border-color: #2878a5;
    background: #2878a5;
    color: #fff;
}

.help-editor-content {
    min-height: 300px;
    padding: 14px;
    line-height: 1.55;
    outline: none;
}

.help-editor-source {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 300px;
    margin: 0;
    padding: 14px;
    border: 0;
    border-radius: 0;
    outline: none;
    resize: vertical;
    background: #17212b;
    color: #edf5fa;
    font: 14px/1.55 Consolas, Monaco, 'Courier New', monospace;
    tab-size: 2;
}

.help-editor-source[hidden],
.help-editor-format-actions[hidden] {
    display: none;
}

.help-editor-mode-hint {
    margin-top: -6px;
    color: #526b7c;
    font-size: 0.9rem;
}

.help-editor-content:empty::before {
    content: 'PiĹˇte obsah nĂˇpovÄ›dyâ€¦';
    color: #8093a3;
}

.help-admin-page .help-active-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.help-admin-page .help-admin-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.help-admin-page .help-admin-list-wrap {
    margin-top: 16px;
}

.help-admin-page .help-list-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-admin-page .help-list-actions form {
    margin: 0;
}

.help-admin-page .help-delete-btn {
    border: 0;
    background: transparent;
    color: #c0392b;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

/* Help images */
.help-widget-content .help-image-link {
    display: inline-block;
    margin: 8px 0;
}

.help-widget-content .help-image-thumb {
    display: block;
    width: auto;
    max-width: min(260px, 100%);
    max-height: 160px;
    object-fit: cover;
    border: 1px solid #d4e1eb;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(10, 20, 30, 0.18);
}

.help-widget-image-overlay {
    position: fixed;
    inset: 0;
    z-index: 1700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 11, 18, 0.78);
    padding: 18px;
}

.help-widget-image-overlay[hidden] {
    display: none;
}

.help-widget-image-wrap {
    position: relative;
    max-width: min(96vw, 1400px);
    max-height: min(92vh, 980px);
}

.help-widget-image-wrap img {
    display: block;
    max-width: 100%;
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.help-widget-image-close {
    position: absolute;
    top: -14px;
    right: -12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #fff;
    background: rgba(20, 30, 42, 0.9);
}

@media (max-width: 900px) {
    .help-admin-page .help-admin-grid {
        grid-template-columns: 1fr;
    }

    .help-editor-content {
        min-height: 230px;
    }

    .help-widget-content .help-image-thumb {
        max-width: min(200px, 100%);
        max-height: 130px;
    }
}



/* Help document page */
.help-doc-page .help-doc-header h1 {
    margin-bottom: 4px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
}

.help-doc-page .help-doc-header p {
    margin-top: 0;
    color: #435667;
}

.help-doc-toolbar {
    display: grid;
    gap: 10px;
}

.help-doc-toolbar input[type="search"] {
    width: 100%;
    max-width: 680px;
    border: 1px solid #b8c1cc;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.3;
    box-sizing: border-box;
    background: #fff;
    color: #1f2933;
}

.help-doc-pdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.help-doc-section-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.help-doc-section-form select {
    min-width: 260px;
}

.help-doc-content {
    margin-top: 12px;
}

.help-tree-level {
    display: grid;
    gap: 8px;
}

.help-tree-level-1,
.help-tree-level-2,
.help-tree-level-3,
.help-tree-level-4 {
    margin-left: 16px;
    margin-top: 8px;
}

.help-node {
    border: 1px solid #d8e2eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.help-node-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: #f7fbff;
    border-bottom: 1px solid #e5edf4;
}

.help-node-summary::-webkit-details-marker {
    display: none;
}

.help-node-title {
    font-weight: 800;
    font-size: 18px;
    color: #1b3245;
    line-height: 1.15;
}

.help-node-key {
    font-size: 12px;
    color: #4f6578;
    white-space: nowrap;
}

.help-node-body {
    padding: 12px 14px;
}

.help-node-actions {
    margin: 10px 0 2px;
}

.help-node-intro,
.help-node-main,
.help-node-outro {
    margin-bottom: 10px;
}

.help-node-outro {
    border-top: 1px dashed #dae4ec;
    padding-top: 10px;
    color: #2d4659;
}

/* Help admin additions */
.help-admin-page .help-admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.help-admin-page .help-admin-grid-4 {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.help-admin-page .help-admin-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

@media (max-width: 1100px) {
    .help-admin-page .help-admin-grid-4 {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .help-doc-pdf-actions,
    .help-doc-section-form,
    .help-admin-page .help-admin-header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .help-doc-section-form select {
        min-width: 0;
    }

    .help-admin-page .help-admin-grid-4 {
        grid-template-columns: 1fr;
    }

    .help-node-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .help-tree-level-1,
    .help-tree-level-2,
    .help-tree-level-3,
    .help-tree-level-4 {
        margin-left: 10px;
    }
}


/* Help admin drag-drop tree */
.help-admin-tree-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.help-reorder-status {
    font-size: 13px;
    color: #3a596f;
}

.help-reorder-status.is-error {
    color: #b03a2e;
}

.help-admin-tree {
    margin-top: 8px;
}

.help-admin-tree-level {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-admin-tree-level[data-parent-id="0"] {
    margin-top: 6px;
}

.help-admin-tree-level .help-admin-tree-level {
    border-left: 1px solid #d7e1ea;
    margin-left: 14px;
}

.help-admin-tree-item {
    margin: 0;
    padding: 2px 0;
}

.help-admin-tree-item.is-dragging {
    opacity: 0.45;
}

.help-admin-tree-row {
    display: grid;
    grid-template-columns: 22px minmax(150px, 1fr) minmax(120px, 1fr) auto auto auto;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid #ebf1f6;
    padding-top: 7px;
    padding-bottom: 7px;
}

.help-drag-handle {
    cursor: grab;
    color: #6a8296;
    font-size: 16px;
    line-height: 1;
}

.help-admin-tree-title {
    font-weight: 700;
    color: #1d3448;
}

.help-admin-tree-key {
    color: #496277;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.help-admin-tree-meta {
    color: #5a7084;
    font-size: 12px;
}

.help-admin-tree-link {
    color: #0a6f8f;
    font-weight: 700;
    text-decoration: none;
}

.help-admin-tree-link:hover,
.help-admin-tree-link:focus {
    text-decoration: underline;
}

/* Help page tree (always visible headings, collapsible content) */
.help-node {
    margin: 4px 0;
}

.help-node-summary {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #e6edf3;
    background: #f9fcff;
}

.help-node-toggle {
    width: 24px;
    height: 24px;
    border: 1px solid #b9cfde;
    border-radius: 6px;
    background: #fff;
    color: #1e4158;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
}

.help-node-body {
    padding: 10px;
    border-bottom: 1px solid #eaf0f5;
}

.help-tree-level .help-tree-level {
    margin-left: 18px;
    border-left: 1px solid #deE7ef;
    padding-left: 6px;
}

@media (max-width: 900px) {
    .help-admin-tree-row {
        grid-template-columns: 22px 1fr;
        gap: 6px;
    }

    .help-admin-tree-key,
    .help-admin-tree-meta,
    .help-admin-tree-link {
        grid-column: 2;
    }

    .help-node-summary {
        grid-template-columns: 30px 1fr;
    }

    .help-node-key {
        grid-column: 2;
    }
}


/*************************************************************** settings_revize_spotrebicu.php ***************************************************************/
.revset-page .revset-form {
    margin-top: 8px;
}

.revset-page .revset-form label {
    display: block;
    margin: 10px 0 6px;
    color: #334;
    font-weight: 600;
}

.revset-page .revset-form input[type="text"],
.revset-page .revset-form select,
.revset-page .revset-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.45;
    background: #fff;
    color: #1d2a35;
}

.revset-page .revset-form input[type="text"],
.revset-page .revset-form select {
    min-height: 44px;
}

.revset-page .revset-form textarea {
    resize: vertical;
    min-height: 180px;
    font-family: Arial, sans-serif;
}

.revset-page .revset-form textarea[name="subject_text"] {
    min-height: 130px;
}

.revset-page .revset-form textarea[name="conclusion_text"] {
    min-height: 320px;
}

.revset-page .revset-form textarea[name="verdict_text"] {
    min-height: 140px;
}

.revset-page .revset-form input:focus,
.revset-page .revset-form select:focus,
.revset-page .revset-form textarea:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.revset-page .revset-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/*************************************************************** elektroinstalace_revize_rozvadec_new.php ***************************************************************/
.panel-wizard-page {
    max-width: 1200px;
}

.panel-wizard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.panel-wizard-card {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.panel-wizard-progress {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 12px 0;
}

.panel-wizard-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.panel-wizard-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.panel-wizard-progress-bar > span {
    display: block;
    height: 100%;
    background: #00b4d8;
    width: 0;
    transition: width .2s linear;
}

.panel-wizard-shell {
    display: grid;
    grid-template-columns: minmax(190px, 245px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.panel-wizard-step-content {
    min-width: 0;
}

.panel-wizard-step-rail {
    position: sticky;
    top: 10px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    padding: 4px 0;
}

.panel-wizard-step-rail::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 19px;
    top: 22px;
    bottom: 22px;
    width: 2px;
    background: #cbd5e1;
}

.panel-wizard-step-link {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    min-width: 0;
    color: #243447;
    text-decoration: none;
}

.panel-wizard-page[data-active-step="0"] .panel-wizard-step-link {
    padding: 6px 9px 6px 2px;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 1px 2px rgba(15,23,42,.06);
}

.panel-wizard-step-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #c62828;
    color: #fff;
    box-shadow: 0 0 0 1px rgba(15,23,42,.22);
    font-weight: 800;
}

.panel-wizard-step-link.is-partial .panel-wizard-step-number { background: #e98300; }
.panel-wizard-step-link.is-complete .panel-wizard-step-number { background: #168a45; }
.panel-wizard-step-link.is-active .panel-wizard-step-number { background: #087fbd; box-shadow: 0 0 0 3px rgba(8,127,189,.2); }
.panel-wizard-step-copy { display: block; min-width: 0; }
.panel-wizard-step-label { display: block; min-width: 0; color: #111827; overflow-wrap: anywhere; font-size: 15px; font-weight: 800; line-height: 1.25; }
.panel-wizard-step-status { display: block; margin-top: 2px; color: #b91c1c; font-size: 11px; font-weight: 700; line-height: 1.2; }
.panel-wizard-step-link.is-partial .panel-wizard-step-status { color: #a84b00; }
.panel-wizard-step-link.is-complete .panel-wizard-step-status { color: #13723b; }

.panel-wizard-page[data-active-step]:not([data-active-step="0"]) .panel-wizard-shell {
    grid-template-columns: 54px minmax(0, 1fr);
}

.panel-wizard-page[data-active-step]:not([data-active-step="0"]) .panel-wizard-step-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.panel-wizard-active-head {
    position: sticky;
    top: 0;
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(203,213,225,.9);
    border-radius: 10px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(7px);
}

.panel-wizard-active-head h3 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.panel-wizard-active-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.panel-wizard-close-step { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #334155; color: #fff; text-decoration: none; font-size: 25px; line-height: 1; }

.panel-wizard-bottom-actions {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 19;
    display: flex;
    justify-content: flex-end;
    margin: 14px 0 4px;
    padding: 8px;
    border: 1px solid rgba(203,213,225,.9);
    border-radius: 12px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 3px 14px rgba(15,23,42,.12);
    backdrop-filter: blur(7px);
}

.panel-wizard-next-button {
    min-width: min(100%, 280px);
    min-height: 52px;
    padding: 13px 28px;
    font-size: 18px;
    font-weight: 800;
}

.panel-wizard-step-pane { display: none; min-width: 0; overflow-wrap: anywhere; }
.panel-wizard-page[data-active-step="1"] [data-wizard-pane="1"],
.panel-wizard-page[data-active-step="2"] [data-wizard-pane="2"],
.panel-wizard-page[data-active-step="3"] [data-wizard-pane="3"],
.panel-wizard-page[data-active-step="4"] [data-wizard-pane="4"],
.panel-wizard-page[data-active-step="5"] [data-wizard-pane="5"],
.panel-wizard-page[data-active-step="6"] [data-wizard-pane="6"],
.panel-wizard-page[data-active-step="7"] [data-wizard-pane="7"] { display: block; }

.legacy-wizard-grid { display: block; }
.legacy-wizard-photos,
.legacy-wizard-documentation,
.legacy-wizard-cables,
.legacy-wizard-finish { display: none; }
.panel-wizard-page[data-active-step="6"] .legacy-wizard-photos,
.panel-wizard-page[data-active-step="6"] .legacy-wizard-documentation,
.panel-wizard-page[data-active-step="4"] .legacy-wizard-cables,
.panel-wizard-page[data-active-step="0"] .legacy-wizard-finish,
.panel-wizard-page[data-active-step="8"] .legacy-wizard-finish { display: block; }

.panel-wizard-relation-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 10px; }
.panel-wizard-relation-list > span { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 7px; border: 1px solid #cbd5e1; border-radius: 7px; background: #f8fafc; overflow-wrap: anywhere; }
.panel-wizard-relation-list button { flex: 0 0 auto; border: 0; background: transparent; color: #b91c1c; font-size: 20px; line-height: 1; cursor: pointer; }
.panel-wizard-parent-save-status { margin: -3px 0 9px; color: #0b6b99; font-weight: 700; }
.panel-wizard-location-plan { margin-top: 10px; padding: 10px; border: 1px dashed #94a3b8; border-radius: 9px; background: #f8fafc; }

.panel-wizard-count-buttons,
.panel-wizard-system-buttons,
.panel-wizard-field-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 12px; }
.panel-wizard-count-buttons button,
.panel-wizard-system-buttons button,
.panel-wizard-field-tabs a { min-width: 40px; min-height: 40px; padding: 7px 10px; border: 1px solid #94a3b8; border-radius: 8px; background: #fff; color: #1e293b; text-decoration: none; cursor: pointer; font-weight: 700; }
.panel-wizard-count-buttons button.is-selected,
.panel-wizard-system-buttons button.is-selected,
.panel-wizard-field-tabs a.is-active { border-color: #087fbd; background: #087fbd; color: #fff; }

.panel-supply-control {
    width: 100%;
    box-sizing: border-box;
    margin: 10px 0 14px;
    padding: 12px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
}
.panel-supply-control .panel-supply-heading { margin-bottom: 3px; color: #0f172a; font-size: 15px; font-weight: 800; }
.panel-supply-control .revision-supply-choices { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.panel-supply-control .revision-supply-choice { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 40px; box-sizing: border-box; padding: 8px 12px; border: 1px solid #94a3b8; border-radius: 8px; background: #fff; color: #0f172a; font-weight: 700; cursor: pointer; user-select: none; }
.panel-supply-control .revision-supply-choice:hover { border-color: #64748b; background: #f1f5f9; }
.panel-supply-control .revision-supply-choice.is-selected { border-color: #22c55e; background: #dcfce7; color: #166534; box-shadow: inset 0 0 0 1px #22c55e; }
.panel-supply-control .revision-supply-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.panel-supply-control .revision-supply-split-point { margin-top: 11px; padding: 10px; border-left: 4px solid #22c55e; border-radius: 6px; background: #f0fdf4; }
.panel-supply-control .revision-supply-split-point label { display: block; margin-bottom: 6px; }
.panel-supply-control .revision-supply-split-point input { width: 100%; min-height: 38px; box-sizing: border-box; }
.panel-supply-control .panel-supply-legacy { margin-top: 9px; padding: 8px 10px; border-radius: 6px; background: #fff7ed; color: #9a3412; font-size: 12px; }

@media (max-width: 520px) {
    .panel-supply-control { padding: 10px; }
    .panel-supply-control .revision-supply-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel-supply-control .revision-supply-choice { width: 100%; }
}

.panel-wizard-photo-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 9px 0; }
.panel-wizard-photo-summary-item { position: relative; display: block; min-width: 0; overflow: hidden; padding: 0; border: 1px solid #dbe3ea; border-radius: 10px; background: #eef2f6; color: #fff; text-decoration: none; box-shadow: 0 2px 7px rgba(15,23,42,.1); }
.panel-wizard-photo-summary-item img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: #eef2f6; transition: transform .2s ease; }
.panel-wizard-photo-summary-item:hover img,
.panel-wizard-photo-summary-item:focus-visible img { transform: scale(1.035); }
.panel-wizard-photo-summary-item span { position: absolute; right: 0; bottom: 0; left: 0; display: block; min-width: 0; padding: 28px 8px 8px; background: linear-gradient(to bottom, transparent, rgba(2,6,23,.88)); }
.panel-wizard-photo-summary-item strong,
.panel-wizard-photo-summary-item small { display: block; overflow-wrap: anywhere; line-height: 1.2; }
.panel-wizard-photo-summary-item strong { color: #fff; font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.panel-wizard-photo-summary-item small { margin-top: 3px; color: rgba(255,255,255,.88); font-size: 11px; text-shadow: 0 1px 2px rgba(0,0,0,.8); }

.panel-wizard-related-create[hidden] { display: none; }
.panel-wizard-overview p,
.panel-wizard-card p { overflow-wrap: anywhere; }

.panel-wizard-form label,
.panel-wizard-cat-form label {
    display: block;
    font-weight: 600;
    color: #334;
    margin: 8px 0 6px;
}

.panel-wizard-form input[type="text"],
.panel-wizard-form textarea,
.panel-wizard-form select,
.panel-wizard-cat-form input[type="file"],
.panel-wizard-photo-cat select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #c8d3dd;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.panel-wizard-form textarea {
    min-height: 90px;
    resize: vertical;
}

.panel-wizard-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.panel-wizard-cats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.panel-wizard-cat-form {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    background: #f8fbfd;
}

.panel-wizard-page .cam-attach {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.panel-wizard-page .cam-btn-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
}

.panel-wizard-page .cam-picked {
    font-size: 12px;
    color: #1f7a3a;
}

.panel-wizard-photo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.panel-wizard-photo-item {
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.panel-wizard-photo-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dbe3ea;
    display: block;
    margin-bottom: 8px;
}

.panel-wizard-thumb {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    margin: 0 auto 6px;
}

.panel-wizard-photo-cat {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.panel-wizard-inline-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.panel-wizard-thumb-wrap {
    position: relative;
    width: 96px;
    height: 96px;
}

.panel-wizard-thumb-wrap .panel-wizard-thumb {
    margin: 0 !important;
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
}

.panel-wizard-upload-progress {
    display: none;
    margin-top: 6px;
}

.panel-wizard-upload-progress.is-active {
    display: block;
}

.panel-wizard-upload-progress .bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.panel-wizard-upload-progress .bar > span {
    display: block;
    height: 100%;
    width: 0;
    background: #00b4d8;
    transition: width .15s linear;
}

.panel-wizard-upload-progress .txt {
    margin-top: 4px;
    font-size: 12px;
    color: #4b5563;
}

.panel-wizard-page .cam-picked {
    display: none !important;
}

.panel-wizard-thumb-close {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 3;
    width: 18px;
    height: 18px;
    line-height: 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.75);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    text-align: center;
}

@media (max-width: 900px) {
    .panel-wizard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .panel-wizard-page { width: 100%; max-width: none; padding-left: 7px; padding-right: 7px; box-sizing: border-box; overflow-x: hidden; }
    .panel-wizard-page > h2 { margin: 8px 0 4px; font-size: 20px; overflow-wrap: anywhere; }
    .panel-wizard-progress { padding: 8px; }
    .panel-wizard-shell,
    .panel-wizard-page[data-active-step]:not([data-active-step="0"]) .panel-wizard-shell { grid-template-columns: 45px minmax(0, 1fr); gap: 7px; }
    .panel-wizard-page[data-active-step="0"] .panel-wizard-shell { grid-template-columns: minmax(0, 1fr); }
    .panel-wizard-page[data-active-step="0"] .panel-wizard-step-rail { position: relative; top: auto; }
    .panel-wizard-page[data-active-step="0"] .panel-wizard-step-link { grid-template-columns: 38px minmax(0, 1fr); }
    .panel-wizard-step-rail::before { left: 17px; }
    .panel-wizard-step-number { width: 35px; height: 35px; font-size: 13px; }
    .panel-wizard-step-content { width: 100%; min-width: 0; }
    .panel-wizard-active-head { align-items: flex-start; padding: 7px; }
    .panel-wizard-active-head h3 { padding-top: 4px; font-size: 17px; line-height: 1.2; }
    .panel-wizard-active-actions { gap: 4px; }
    .panel-wizard-active-actions .diagnose-button-button { min-width: 0; padding: 8px 9px; }
    .panel-wizard-close-step { width: 34px; height: 34px; font-size: 22px; }
    .panel-wizard-card { min-width: 0; padding: 9px; }
    .panel-wizard-actions > a,
    .panel-wizard-actions > button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
    .panel-wizard-form input,
    .panel-wizard-form select,
    .panel-wizard-form textarea { min-width: 0; max-width: 100%; }
    .panel-wizard-photo-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .panel-wizard-bottom-actions { justify-content: stretch; padding: 7px; }
    .panel-wizard-next-button { width: 100%; min-width: 0; min-height: 56px; font-size: 19px; }
    .panel-wizard-cats { gap: 7px; }
    .panel-wizard-cat-form { padding: 7px; }
    .panel-wizard-thumb,
    .panel-wizard-thumb-wrap,
    .panel-wizard-thumb-wrap .panel-wizard-thumb { width: 72px !important; height: 72px !important; max-width: 72px !important; max-height: 72px !important; }

    .panel-wizard-photo-list {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        gap: 8px;
    }

    .panel-wizard-photo-item {
        padding: 6px;
    }

    .panel-wizard-photo-item img {
        max-width: 96px;
        margin: 0 auto 6px;
        border-radius: 6px;
    }
}

.wizard-doc-drafts {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.panel-cables-section > h4 {
    margin: 0 0 10px;
}

.panel-cables-grid {
    display: grid;
    gap: 10px;
}

.panel-cables-column > label {
    display: block;
    margin-bottom: 8px;
}

.panel-cable-mini-form {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
}

.panel-cable-mini-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 9px;
}

.panel-cable-mini-head > * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.panel-cable-fields {
    display: grid;
    grid-template-columns: minmax(70px, .55fr) repeat(3, minmax(105px, .85fr)) minmax(120px, 1fr);
    gap: 8px;
    align-items: end;
}

.panel-cable-fields > div,
.panel-cable-edit-fields,
.panel-cables-grid,
.panel-cables-section,
.panel-cables-column {
    min-width: 0;
    max-width: 100%;
}

.panel-cable-fields .panel-cable-source-component {
    grid-column: 1 / -1;
}

.panel-cable-fields.panel-cable-fields-stacked {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.panel-cable-fields.panel-cable-fields-stacked .panel-cable-source-component {
    grid-column: auto;
}

.panel-cables-column .elr-standalone-source-row .panel-cable-fields {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.panel-cables-column .elr-standalone-source-row .panel-cable-source-component {
    grid-column: auto;
}

.panel-cable-saved {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    padding: 7px 8px;
    border: 1px solid #86efac;
    border-radius: 7px;
    background: #f0fdf4;
    color: #166534;
}

.panel-cable-saved-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.panel-cable-saved span {
    font-size: 12px;
}

.panel-cable-edit-toggle {
    flex: 0 0 auto;
}

.panel-cable-edit-fields {
    margin-top: 8px;
}

.panel-cable-target {
    margin-bottom: 8px;
}

.panel-cable-fields label {
    display: block;
    margin-bottom: 4px;
}

.panel-cable-fields select,
.panel-cable-fields input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.panel-cable-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 9px;
}

.panel-cable-actions .diagnose-button-button,
.panel-cable-actions .diagnose-button {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.panel-cable-transfer {
    flex-wrap: wrap;
    gap: 8px;
}

.panel-cable-transfer select {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 100%;
}

.panel-cable-transfer button {
    flex: 1 1 180px;
}

.panel-cable-outgoing {
    overflow-wrap: anywhere;
}

@media (max-width: 850px) {
    .panel-cable-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .panel-cable-fields {
        grid-template-columns: 1fr;
    }
}

.wizard-doc-error {
    color: #b91c1c;
}

.wizard-doc-camera button:disabled,
.wizard-doc-draft-actions button:disabled {
    cursor: wait;
    opacity: .6;
}

.wizard-doc-draft {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}

.wizard-doc-draft-head,
.wizard-doc-draft-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wizard-doc-draft-head {
    justify-content: space-between;
    margin-bottom: 9px;
}

.wizard-doc-pages {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 10px;
}

.wizard-doc-page {
    flex: 0 0 104px;
    margin: 0;
}

.wizard-doc-page img {
    display: block;
    width: 104px;
    height: 78px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #e2e8f0;
}

.wizard-doc-page figcaption {
    margin-top: 3px;
    font-size: 11px;
    color: #64748b;
    text-align: center;
}

.wizard-doc-camera {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(2, 6, 23, .82);
}

.wizard-doc-camera-card {
    width: min(100%, 1050px);
    max-height: calc(100dvh - 20px);
    overflow: hidden;
    border: 1px solid #334155;
    border-radius: 15px;
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: 0 30px 70px rgba(2, 6, 23, .5);
}

.wizard-doc-camera-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid #334155;
}

.wizard-doc-camera-head span {
    flex: 1 1 auto;
    color: #cbd5e1;
    font-size: 13px;
}

.wizard-doc-camera-head button {
    min-width: 40px;
    min-height: 36px;
    border: 1px solid #475569;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.wizard-doc-camera-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: calc(100dvh - 88px);
    overflow: hidden;
    background: #000;
}

.wizard-doc-camera-stage video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.wizard-doc-review {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 14px;
    background: rgba(2, 6, 23, .92);
}

.wizard-doc-review-image-wrap {
    width: min(76%, 720px);
    height: min(82%, 640px);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .8);
    border-radius: 12px;
    background: #020617;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
}

.wizard-doc-review-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.15);
    transform-origin: right bottom;
}

.wizard-doc-review-zoom {
    position: absolute;
    left: 14px;
    top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid #475569;
    border-radius: 9px;
    background: rgba(15, 23, 42, .9);
}

.wizard-doc-review-zoom input {
    width: min(34vw, 230px);
}

.wizard-doc-camera-meta {
    position: absolute;
    left: 12px;
    bottom: 14px;
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(2, 6, 23, .72);
    color: #e2e8f0;
    font-size: 12px;
}

.wizard-doc-live-actions,
.wizard-doc-review-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.wizard-doc-live-actions .diagnose-button {
    border-color: rgba(255, 255, 255, .75);
    background: rgba(15, 23, 42, .88);
    color: #fff;
}

.wizard-doc-shutter {
    width: 76px;
    height: 76px;
    border: 4px solid #fff;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .12);
    cursor: pointer;
}

.wizard-doc-shutter:active {
    transform: scale(.96);
}

.wizard-doc-body-lock {
    overflow: hidden;
}

@media (max-width: 700px) {
    .wizard-doc-camera {
        align-items: flex-start;
        padding: 5px;
    }

    .wizard-doc-camera-card {
        max-height: calc(100dvh - 10px);
    }

    .wizard-doc-camera-stage {
        max-height: calc(100dvh - 65px);
    }

    .wizard-doc-review-image-wrap {
        width: 82%;
        height: 76%;
    }

    .wizard-doc-review-zoom {
        right: 10px;
        left: 10px;
        top: 10px;
    }
}

.doch-quick-edit {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.hidden {
    display: none !important;
}

.doch-quick-edit-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 10px;
    align-items: end;
}

.doch-quick-edit-form label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.doch-quick-edit-form input,
.doch-quick-edit-form select {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
}

.doch-quick-edit-wide {
    grid-column: span 2;
}

.doch-quick-edit-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.doch-inline-action {
    display: inline-flex !important;
    margin: 0;
    flex: 0 0 auto;
}

.doch-badge-button {
    border: 0;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.doch-missing-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px;
}

.doch-missing-date {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .doch-quick-edit-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .doch-quick-edit-wide {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .doch-quick-edit-form {
        grid-template-columns: 1fr;
    }

    .doch-quick-edit-wide {
        grid-column: auto;
    }
}
/* Popisky bodů a schématických značek v půdorysu: červený text s bílým obrysem. */
.plan-drawing-label,
.plan-viewport .pin .lbl,
.location-plan-viewport .plan-marker-label,
.location-plan-overlay-point-label {
  color: #d12323 !important;
  fill: #d12323 !important;
  stroke: #fff !important;
  stroke-width: 1.5px !important;
  paint-order: stroke fill;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-shadow:
    -1px -1px 0 #fff,
     0   -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  0   0 #fff,
     1px  0   0 #fff,
    -1px  1px 0 #fff,
     0    1px 0 #fff,
     1px  1px 0 #fff !important;
}

/* Schématická značka rozvaděče – vnější obdélník 4:1 a vnitřní plný obdélník. */
.panel-schematic-symbol {
  position: relative;
  display: block;
  width: 64px;
  height: 16px;
  box-sizing: border-box;
  border: 2px solid #d12323;
  border-radius: 1px;
  background: #fff;
  outline: 1px solid #fff;
  box-shadow: none;
  transform-origin: center;
}
.panel-schematic-symbol-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 7px;
  border-radius: 1px;
  background: #d12323;
  transform: translate(-50%, -50%);
}
.pin.panel-pin.is-schematic .lbl,
.plan-marker--panel.is-schematic .plan-marker-label,
.panel-plan-marker.is-schematic .panel-plan-marker-label {
  left: 38px !important;
}
.pin.panel-pin.selected .panel-schematic-symbol {
  outline: 2px dashed #169348;
  outline-offset: 3px;
}
.symbol-marker-action.panel-schematic-toggle {
  background: #f2a64a;
}
.symbol-marker-action.panel-schematic-toggle svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: #fff;
  filter: drop-shadow(0 1px 1px rgba(95, 50, 0, .28));
}

/* Sdílené ovládání bodů půdorysu: šedé zrušení a ikona odstranění. */
.symbol-marker-action.cancel-neutral {
  background: #d1d5db;
  color: #111;
  font-weight: 800;
}
.symbol-marker-action.cancel-neutral:hover {
  background: #b8bec6;
}
.mrevi-icon-trash {
  position: relative;
  display: block;
  width: 12px;
  height: 13px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}
.mrevi-icon-trash::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -4px;
  width: 14px;
  border-top: 2px solid currentColor;
}
.mrevi-icon-trash::after {
  content: "";
  position: absolute;
  left: 2px;
  top: -7px;
  width: 4px;
  height: 3px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.plan-route-edit-button,
.plan-main-route-snap-button,
.plan-route-close-button,
.plan-history-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 2px 0 0 -2px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .2);
  cursor: pointer;
  pointer-events: auto;
}

.plan-route-edit-button {
  padding: 0;
  background: #7c3aed;
  color: #fff;
}

.plan-route-edit-button:hover,
.plan-route-edit-button.is-active {
  background: #5b21b6;
}

.plan-main-route-snap-button {
  margin-top: 2px;
  background: #f2b705;
  color: #332500;
}

.plan-main-route-snap-button:hover,
.plan-main-route-snap-button.is-active {
  background: #ffd84d;
}

.plan-main-route-snap-button[hidden] {
  display: none !important;
}

.mrevi-icon-main-route-snap {
  position: relative;
  display: block;
  width: 16px;
  height: 15px;
  box-sizing: border-box;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.mrevi-icon-main-route-snap::before,
.mrevi-icon-main-route-snap::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 6px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
}

.mrevi-icon-main-route-snap::before { left: -3px; }
.mrevi-icon-main-route-snap::after { right: -3px; }

.plan-route-close-button {
  padding: 0;
  background: #e5e7eb;
  color: #111827;
}

.plan-history-button {
  background: #475569;
  color: #fff;
}

.plan-history-button:hover:not(:disabled) {
  background: #334155;
  transform: scale(1.05);
}

.plan-history-button:disabled {
  background: #d1d5db;
  color: #6b7280;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .12);
  cursor: default;
}

.mrevi-icon-history-undo,
.mrevi-icon-history-redo {
  display: block;
  width: 24px;
  height: 24px;
  font: 900 24px/22px "Segoe UI Symbol", Arial, sans-serif;
  text-align: center;
}

.mrevi-icon-history-undo::before { content: "↶"; }
.mrevi-icon-history-redo::before { content: "↷"; }

.plan-route-close-button:hover {
  background: #cbd5e1;
}

.plan-route-edit-status {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  min-height: 32px;
  max-width: min(420px, 42vw);
  margin: 2px 0 0 -2px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 2px 7px rgba(76, 29, 149, .13);
  color: #4c1d95;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-route-edit-status[hidden] { display: none !important; }

.plan-realtime-status {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  min-height: 32px;
  max-width: min(360px, 40vw);
  margin: 2px 0 0 -2px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid #86efac;
  border-radius: 999px;
  background: rgba(240, 253, 244, .97);
  color: #166534;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-realtime-status.is-error {
  border-color: #fca5a5;
  background: rgba(254, 242, 242, .97);
  color: #991b1b;
}

.plan-realtime-status[hidden] { display: none !important; }

.mrevi-icon-route-edit {
  position: relative;
  display: block;
  width: 19px;
  height: 14px;
}

.mrevi-icon-route-edit::before,
.mrevi-icon-route-edit::after {
  position: absolute;
}

.mrevi-icon-route-edit::before {
  content: "↔";
  inset: -2px 0 0;
  font: 900 20px/14px Arial, sans-serif;
  text-align: center;
}

.mrevi-icon-route-edit::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 1px;
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  opacity: .55;
}

.mrevi-icon-close-neutral {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
}

.mrevi-icon-close-neutral::before,
.mrevi-icon-close-neutral::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 1px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.mrevi-icon-close-neutral::before { transform: rotate(45deg); }
.mrevi-icon-close-neutral::after { transform: rotate(-45deg); }

.plan-wrap.is-route-editing { cursor: default; }
.plan-wrap.is-main-route-snap-mode { cursor: crosshair; }
.plan-wrap.is-main-route-snap-mode .pin.electrical-symbol-pin,
.plan-wrap.is-main-route-snap-mode .plan-text-anchor[data-point-type="symbol"],
.plan-wrap.is-main-route-snap-mode .plan-text-anchor[data-point-type="symbol"] .lbl {
  cursor: crosshair !important;
}
.plan-wrap.is-main-route-snap-mode.is-main-route-snap-busy .pin.electrical-symbol-pin,
.plan-wrap.is-main-route-snap-mode.is-main-route-snap-busy .plan-text-anchor[data-point-type="symbol"] {
  cursor: progress !important;
}
.plan-wrap.is-main-route-snap-mode .cable-hit,
.plan-wrap.is-main-route-snap-mode .main-route-hit,
.plan-wrap.is-main-route-snap-mode .pin:not(.electrical-symbol-pin),
.plan-wrap.is-main-route-snap-mode .external-panel-card {
  pointer-events: none !important;
}
.plan-wrap.is-route-editing .pin.panel-pin,
.plan-wrap.is-route-editing .pin.electrical-symbol-pin { cursor: pointer; }
.plan-wrap.is-route-editing .plan-text-anchor[data-point-type="panel"],
.plan-wrap.is-route-editing .plan-text-anchor[data-point-type="panel"] .lbl,
.plan-wrap.is-route-editing .plan-text-anchor[data-point-type="symbol"],
.plan-wrap.is-route-editing .plan-text-anchor[data-point-type="symbol"] .lbl { cursor: pointer !important; }
.plan-wrap.is-route-editing .pin:not(.panel-pin):not(.electrical-symbol-pin),
.plan-wrap.is-route-editing .cable-hit,
.plan-wrap.is-route-editing .main-route-hit,
.plan-wrap.is-route-editing .plan-free-drawing-hit,
.plan-wrap.is-route-editing .plan-callout-hit,
.plan-wrap.is-route-editing .plan-callout-text { pointer-events: none !important; }
body.plan-route-edit-active .edit-top-grid > details:not(.drawing-card),
body.plan-route-edit-active .drawing-card .drawing-tool-section:not(:first-child),
body.plan-route-edit-active #quickStartCalloutDrawing,
body.plan-route-edit-active .location-photo-point-fab,
body.plan-route-edit-active .location-add-widget {
  opacity: .42;
  pointer-events: none !important;
}
.cable-segment.is-route-edit-highlight {
  stroke: #38bdf8 !important;
  stroke-width: calc(4.8px * var(--plan-element-scale, 1)) !important;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .95));
}
.pin.is-route-edit-anchor { z-index: 95 !important; }
.pin.is-route-edit-anchor > .dot,
.pin.is-route-edit-anchor > .electrical-symbol-icon,
.pin.is-route-edit-anchor > .panel-schematic-symbol {
  outline: 3px solid #f59e0b;
  outline-offset: 4px;
  border-radius: 5px;
}
.pin.electrical-symbol-pin.is-route-edit-connected > .electrical-symbol-icon {
  filter: drop-shadow(0 0 3px #38bdf8);
}
.route-panel-component-menu {
  position: absolute;
  left: 0;
  top: 0;
  width: min(280px, calc(100% - 16px));
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #c4b5fd;
  border-radius: 9px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 22px rgba(44, 25, 55, .24);
  color: #4c1d95;
  font-size: 10px;
  font-weight: 800;
  cursor: default;
  isolation: isolate;
  pointer-events: auto !important;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 120;
}
.route-panel-component-menu > strong {
  display: block;
  margin-bottom: 6px;
}
.route-panel-component-list {
  display: grid;
  gap: 4px;
  max-height: min(360px, 52dvh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  touch-action: none;
  cursor: grab;
  pointer-events: auto;
}
.route-panel-component-list.is-dragging {
  cursor: grabbing;
}
.route-panel-component-option {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #263746;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  touch-action: none;
}
.route-panel-component-option:hover,
.route-panel-component-option.is-active {
  border-color: #7c3aed;
  background: #f3e8ff;
  color: #4c1d95;
}

.route-edit-menu-actions {
  display: flex;
  margin-top: 9px;
}

.route-bulk-rename-open {
  width: 100%;
  border-color: #7c3aed;
  color: #4c1d95;
  font-weight: 800;
}

.route-bulk-rename-open:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.route-bulk-rename-dialog {
  width: min(720px, calc(100vw - 24px));
  max-height: min(86vh, 820px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #172033;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
}

.route-bulk-rename-dialog::backdrop {
  background: rgba(15, 23, 42, .52);
}

.route-bulk-rename-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.route-bulk-rename-head h2 {
  margin: 0;
  color: #4c1d95;
  font-size: 19px;
}

.route-bulk-rename-head p {
  margin: 5px 0 0;
  color: #52606d;
  font-size: 12px;
}

.route-bulk-rename-body {
  display: grid;
  gap: 13px;
  max-height: calc(min(86vh, 820px) - 82px);
  padding: 16px 18px 18px;
  overflow: auto;
}

.route-bulk-rename-body .form-row {
  display: grid;
  gap: 5px;
}

.route-bulk-rename-body input {
  width: 100%;
  min-height: 39px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #94a3b8;
  border-radius: 7px;
  background: #fff;
  color: #0f172a;
}

.route-bulk-rename-body input:focus {
  border-color: #7c3aed;
  outline: 2px solid rgba(124, 58, 237, .16);
}

.route-bulk-rename-example {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f3e8ff;
  color: #4c1d95;
  font-size: 12px;
}

.route-bulk-rename-message {
  min-height: 18px;
  color: #52606d;
  font-size: 12px;
  font-weight: 700;
}

.route-bulk-rename-message.is-error {
  color: #b91c1c;
}

.route-bulk-rename-message.is-ok {
  color: #166534;
}

.route-bulk-rename-preview {
  display: grid;
  gap: 5px;
  max-height: 320px;
  overflow: auto;
  padding: 7px;
  border: 1px solid #dbe3ea;
  border-radius: 9px;
  background: #f8fafc;
}

.route-bulk-rename-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

.route-bulk-rename-preview-row.is-duplicate {
  outline: 2px solid #dc2626;
  background: #fff1f2;
}

.route-bulk-rename-preview-current,
.route-bulk-rename-preview-new {
  min-width: 0;
  overflow-wrap: anywhere;
}

.route-bulk-rename-preview-current {
  color: #64748b;
}

.route-bulk-rename-preview-new {
  color: #172033;
  font-weight: 800;
}

.route-bulk-rename-preview-arrow {
  color: #7c3aed;
  text-align: center;
}

.route-bulk-rename-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .route-bulk-rename-preview-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-bulk-rename-preview-arrow {
    transform: rotate(90deg);
  }
}

.symbol-marker-action.symbol-photo-camera,
.symbol-marker-action.symbol-photo-folder {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  align-self: center;
  background: #3f4850;
}

.symbol-marker-action.symbol-photo-camera svg,
.symbol-marker-action.symbol-photo-folder svg {
  display: block;
  width: 15px;
  height: 15px;
  margin: auto;
  fill: #fff;
  stroke: none;
  transform: none;
  filter: drop-shadow(0 1px 1px rgba(25, 32, 38, .28));
}

.symbol-marker-action.symbol-photo-camera:hover,
.symbol-marker-action.symbol-photo-folder:hover {
  background: #252c32;
}

.mrevi-camera-file-button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #64748b;
  border-radius: 8px;
  background: #3f4850;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.mrevi-camera-file-button:hover:not(:disabled) {
  background: #252c32;
}

.mrevi-camera-file-button:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.mrevi-camera-file-button:disabled {
  cursor: wait;
  opacity: .65;
}

.plan-wrap.is-photo-placement,
.plan-wrap.is-photo-placement .pin,
.plan-wrap.is-photo-placement .cable-hit,
.plan-wrap.is-photo-placement .main-route-hit {
  cursor: crosshair !important;
}

.symbol-main-route-guide {
  display: grid;
  gap: 6px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  background: #f7fafc;
}

.symbol-main-route-guide > label:not(.symbol-main-route-guide-switch) {
  display: grid;
  gap: 3px;
  color: #46596a;
  font-size: 11px;
  font-weight: 700;
}

.symbol-main-route-guide select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 6px 7px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
  color: #263746;
  font-size: 12px;
}

.symbol-main-route-guide-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #263746;
  font-size: 12px;
  font-weight: 800;
}

.symbol-main-route-guide-switch input {
  width: auto;
  margin: 0;
}

.symbol-main-route-guide small {
  color: #687987;
  font-size: 10px;
  line-height: 1.35;
}

.main-route-line.is-symbol-guide {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .95)) drop-shadow(0 0 3px rgba(30, 100, 190, .75));
}

.main-route-line.is-editing {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .95)) drop-shadow(0 0 3px rgba(22, 163, 74, .8));
}

.main-route-line.is-snap-mode-route {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .98)) drop-shadow(0 0 4px rgba(242, 183, 5, .95));
}

.cable-segment.is-main-route-snap-flash {
  --route-snap-base-color: #d12323;
  animation: mrevi-main-route-snap-flash .46s ease-in-out 3;
}

@keyframes mrevi-main-route-snap-flash {
  0%, 100% {
    stroke: var(--route-snap-base-color);
    filter: none;
  }
  50% {
    stroke: #ffd400;
    stroke-width: calc(4.2px * var(--plan-element-scale, 1));
    filter: drop-shadow(0 0 5px rgba(255, 212, 0, .98));
  }
}

.main-route-list-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.main-route-list-row .main-route-list-actions .btn-mini {
  width: auto;
  height: auto;
  min-height: 25px;
  padding: 4px 7px;
  white-space: nowrap;
}

.main-route-list-row .main-route-list-actions .btn-mini.is-active {
  border-color: #168a45;
  background: #e8f6ed;
  color: #126834;
}

.panel-hover-card {
  position: fixed;
  z-index: 2200;
  display: none;
  width: min(350px, calc(100vw - 24px));
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #d0d7de;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .22);
  pointer-events: none;
}

.panel-hover-card.is-visible { display: block; }
.panel-hover-card.is-symbol-gallery,
.panel-hover-card.is-photo-gallery { pointer-events: auto; }

.panel-hover-card.is-menu-attached {
  width: min(250px, calc(100vw - 24px));
  box-shadow: 0 12px 28px rgba(15, 23, 42, .3);
}

.panel-hover-card.is-menu-attached::after {
  content: "";
  position: absolute;
  left: var(--panel-hover-anchor-x, 50%);
  bottom: -8px;
  width: 14px;
  height: 14px;
  border-right: 1px solid #d0d7de;
  border-bottom: 1px solid #d0d7de;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.panel-hover-card.is-menu-attached.is-attached-below::after {
  top: -8px;
  bottom: auto;
  border: 0;
  border-top: 1px solid #d0d7de;
  border-left: 1px solid #d0d7de;
}

.panel-hover-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.panel-hover-gallery.is-single { grid-template-columns: minmax(0, 1fr); }
.panel-hover-gallery-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #eef2f6;
}

.panel-hover-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
  background: #eef2f6;
}

.panel-hover-photo-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c62828;
  color: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .34);
  cursor: pointer;
  font: 800 19px/1 Arial, sans-serif;
}

.panel-hover-photo-delete:hover { background: #991b1b; }
.panel-hover-title {
  margin-top: 8px;
  color: #213547;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.panel-hover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 124px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 8px;
  background: #eef2f6;
  color: #506274;
  font-size: 12px;
  text-align: center;
}

.panel-hover-gallery-item.is-main-photo::after,
.photo-point-photo.is-main-photo::after,
.plan-photo-popup-item.is-main-photo::after {
  content: "Hlavní";
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 4;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(185, 28, 28, .92);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  pointer-events: none;
}

.panel-hover-gallery-item > img[data-photo-gallery-open] {
  cursor: zoom-in;
}

.plan-photo-gallery-dialog {
  width: min(900px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .38);
}

.plan-photo-gallery-dialog::backdrop {
  background: rgba(2, 6, 23, .78);
}

.plan-photo-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #dce3e8;
}

.plan-photo-gallery-head h2 {
  margin: 0;
  font-size: 18px;
}

.plan-photo-popup-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: calc(100dvh - 100px);
  padding: 16px;
  overflow: auto;
}

.plan-photo-popup-item {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #eef2f6;
  cursor: zoom-in;
}

.plan-photo-popup-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.elr-photo-lightbox {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  background: rgba(2, 6, 23, .88);
  box-sizing: border-box;
}

.elr-photo-lightbox[hidden] {
  display: none;
}

.elr-photo-lightbox-dialog {
  position: relative;
  width: min(900px, 90vw, 90vh);
  height: min(900px, 90vw, 90vh);
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 10px;
  background: #020617;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .7);
  touch-action: pan-y;
}

.elr-photo-lightbox-track {
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform .3s cubic-bezier(.22, .75, .2, 1);
  will-change: transform;
}

.elr-photo-lightbox-slide {
  display: flex;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
}

.elr-photo-lightbox-slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.elr-photo-lightbox-title {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 50%;
  max-width: calc(100% - 120px);
  transform: translateX(-50%);
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}

.elr-photo-lightbox-counter {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  opacity: .88;
}

.elr-photo-lightbox-arrow,
.elr-photo-lightbox-close {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
}

.elr-photo-lightbox-arrow {
  top: 50%;
  width: 54px;
  height: 84px;
  transform: translateY(-50%);
  border-radius: 10px;
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
}

.elr-photo-lightbox-arrow:hover,
.elr-photo-lightbox-arrow:focus,
.elr-photo-lightbox-close:hover,
.elr-photo-lightbox-close:focus {
  background: rgba(255, 255, 255, .08);
  outline: 1px solid rgba(255, 255, 255, .42);
  outline-offset: 1px;
}

.elr-photo-lightbox-prev { left: 10px; }
.elr-photo-lightbox-next { right: 10px; }
.elr-photo-lightbox-arrow[hidden] { display: none; }

.elr-photo-lightbox-close {
  top: 10px;
  right: 10px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

body.elr-photo-lightbox-open {
  overflow: hidden;
}

.location-photo-point-fab {
  position: fixed;
  right: 158px;
  bottom: 18px;
  z-index: 1512;
  display: grid;
  place-items: center;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #4b545c, #2f373e);
  color: #fff;
  box-shadow: 0 10px 28px rgba(29, 36, 42, .34);
  cursor: crosshair;
  box-sizing: border-box;
  overflow: hidden;
  line-height: 0;
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
}

.location-photo-point-fab svg {
  display: block;
  width: 25px;
  min-width: 25px;
  max-width: 25px;
  height: 25px;
  min-height: 25px;
  max-height: 25px;
  flex: 0 0 25px;
  margin: auto;
  overflow: hidden;
  fill: currentColor;
  stroke: none;
  pointer-events: none;
}

.location-photo-point-fab svg circle {
  fill: #3f4850;
  stroke: #fff;
  stroke-width: 1.8;
}

.location-photo-point-fab:hover,
.location-photo-point-fab:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #3b444b, #20272d);
}

.location-photo-point-fab.is-active {
  outline: 3px solid #16a34a;
  outline-offset: 3px;
}

.location-photo-point-fab:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.location-add-widget {
  position: fixed;
  right: 228px;
  bottom: 18px;
  z-index: 1513;
  width: 58px;
  height: 58px;
  margin: 0;
}

.location-add-fab,
.location-add-menu-action {
  display: grid;
  place-items: center;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 10px 28px rgba(80, 55, 0, .34);
  font: 800 29px/1 Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.location-add-fab {
  background: linear-gradient(135deg, #c98d00, #f4bf2a);
  -webkit-appearance: none;
  appearance: none;
}

.location-add-fab:hover,
.location-add-fab:focus-visible,
.location-add-widget.is-open .location-add-fab {
  background: linear-gradient(135deg, #aa7600, #dda817);
  transform: translateY(-1px);
}

.location-add-widget.is-open .location-add-fab {
  outline: 3px solid rgba(229, 169, 0, .3);
  outline-offset: 3px;
}

.location-add-widget.is-open .location-add-fab span {
  transform: rotate(45deg);
}

.location-add-fab span {
  display: block;
  transition: transform .15s ease;
}

.location-add-menu {
  position: absolute;
  right: 0;
  bottom: 70px;
  display: grid;
  gap: 10px;
}

.location-add-menu[hidden] {
  display: none;
}

.location-add-menu-action {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  font-size: 22px;
  box-shadow: 0 10px 28px rgba(64, 25, 105, .34);
  -webkit-appearance: none;
  appearance: none;
}

.location-add-menu-action:hover,
.location-add-menu-action:focus-visible,
.location-add-menu-action.is-active {
  background: linear-gradient(135deg, #4c1d95, #6d28d9);
  transform: translateY(-1px);
}

.panel-revision-link-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 7px);
    left: 50%;
    display: grid;
    min-width: min(290px, calc(100vw - 28px));
    max-width: min(380px, calc(100vw - 28px));
    padding: 8px;
    gap: 4px;
    border: 1px solid rgba(71, 85, 105, .34);
    border-radius: 11px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .24);
    color: #172033;
    font-size: 13px;
    line-height: 1.25;
    text-align: left;
    transform: translateX(-50%);
}

.panel-revision-link-menu.is-floating {
    position: fixed;
    z-index: 5200;
    top: 0;
    left: 0;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: none;
    pointer-events: auto;
}

.panel-marker-toolbar .symbol-marker-action.link[aria-busy="true"] {
    cursor: wait;
    opacity: .58;
}

.panel-revision-link-menu strong {
    padding: 3px 6px 6px;
    font-size: 12px;
    color: #64748b;
}

.panel-revision-link-menu a,
.panel-revision-link-menu .panel-revision-link-action {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 7px 8px;
    overflow-wrap: anywhere;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #5b21b6;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.panel-revision-link-menu a:hover,
.panel-revision-link-menu a:focus-visible,
.panel-revision-link-menu .panel-revision-link-action:hover,
.panel-revision-link-menu .panel-revision-link-action:focus-visible {
    background: #f3e8ff;
    outline: none;
}

.panel-revision-link-menu .panel-revision-link-action:disabled {
    cursor: wait;
    opacity: .55;
}

.panel-revision-link-menu .panel-revision-link-standalone {
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 7px 7px;
    color: #334155;
}

.panel-revision-link-menu .panel-revision-link-empty {
    padding: 6px 8px;
    color: #64748b;
}

.panel-inventory-picker {
    display: grid;
    max-height: 430px;
    margin-top: 8px;
    gap: 7px;
    overflow: auto;
    overscroll-behavior: contain;
}

.panel-inventory-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid #d8d0df;
    border-radius: 10px;
    background: #fff;
}

.panel-inventory-picker-row > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.panel-inventory-picker-row small {
    color: #64748b;
    overflow-wrap: anywhere;
}

.panel-inventory-picker-row[hidden] {
    display: none;
}

.panel-inventory-page {
    max-width: 1280px;
    margin: 22px auto;
    padding: 0 14px 70px;
}

.panel-inventory-head,
.panel-inventory-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.panel-inventory-head h1,
.panel-inventory-detail-head h2 {
    margin: 0;
    color: #43205c;
}

.panel-inventory-head p,
.panel-inventory-detail-head p {
    margin: 5px 0 0;
    color: #64748b;
}

.panel-inventory-view,
.panel-inventory-row-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.panel-inventory-detail,
.panel-inventory-browser {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #ddd2e6;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(53, 25, 70, .07);
}

.panel-inventory-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 18px;
    margin-top: 14px;
}

.panel-inventory-edit-form,
.panel-inventory-revisions {
    display: grid;
    align-content: start;
    gap: 10px;
}

.panel-inventory-edit-form label {
    display: grid;
    gap: 4px;
    font-weight: 700;
}

.panel-inventory-edit-form input,
.panel-inventory-edit-form select,
.panel-inventory-edit-form textarea,
#panel-inventory-search,
#existing-panel-search {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cbbdd5;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font: inherit;
}

.panel-inventory-edit-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.panel-inventory-revisions {
    padding: 12px;
    border-radius: 11px;
    background: #f7f3fa;
}

.panel-inventory-revisions h3,
.panel-inventory-revisions h4 {
    margin: 0;
}

.panel-inventory-revisions > a {
    padding: 8px;
    border-radius: 8px;
    background: #fff;
    color: #5b21b6;
    text-decoration: none;
}

.panel-inventory-revisions form,
.panel-inventory-revisions form button {
    width: 100%;
    margin: 0;
}

#panel-inventory-search {
    margin-top: 5px;
}

.panel-inventory-count {
    color: #64748b;
    font-size: 13px;
}

.panel-inventory-group {
    margin-top: 10px;
    border: 1px solid #ddd2e6;
    border-radius: 11px;
    overflow: hidden;
}

.panel-inventory-group > summary {
    padding: 11px 13px;
    background: #eee8f2;
    color: #43205c;
    font-weight: 800;
    cursor: pointer;
}

.panel-inventory-location {
    padding: 10px 12px 13px;
}

.panel-inventory-location + .panel-inventory-location {
    border-top: 1px solid #e7e0eb;
}

.panel-inventory-location > h2 {
    margin: 0 0 8px;
    color: #5a4962;
    font-size: 15px;
}

.panel-inventory-list {
    display: grid;
    gap: 8px;
}

.panel-inventory-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 10px;
    border: 1px solid #d8d2dc;
    border-radius: 10px;
    background: #fff;
}

.panel-inventory-row[hidden] {
    display: none;
}

.panel-inventory-row > img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
}

.panel-inventory-row h3,
.panel-inventory-row p {
    margin: 0;
}

.panel-inventory-row p {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.panel-inventory-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.panel-inventory-badges span {
    padding: 3px 6px;
    border-radius: 999px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 11px;
    font-weight: 700;
}

.panel-inventory-badges .is-standalone {
    background: #e2e8f0;
    color: #475569;
}

@media (max-width: 760px) {
    .panel-inventory-page { margin-top: 10px; padding-inline: 7px; }
    .panel-inventory-detail-grid { grid-template-columns: 1fr; }
    .panel-inventory-edit-columns { grid-template-columns: 1fr; }
    .panel-inventory-row { grid-template-columns: auto minmax(0, 1fr); }
    .panel-inventory-row-actions { grid-column: 1 / -1; }
}

.location-add-menu-action.free-drawing-pencil-action {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 10px 28px rgba(127, 29, 29, .34);
}

.location-add-menu-action.free-drawing-pencil-action:hover,
.location-add-menu-action.free-drawing-pencil-action:focus-visible,
.location-add-menu-action.free-drawing-pencil-action.is-active {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

.location-add-menu-action.plan-text-add-action {
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 10px 28px rgba(154, 52, 18, .34);
  font: 800 28px/1 Arial, sans-serif;
}

.location-add-menu-action.plan-text-add-action:hover,
.location-add-menu-action.plan-text-add-action:focus-visible,
.location-add-menu-action.plan-text-add-action.is-active {
  background: linear-gradient(135deg, #f97316, #c2410c);
}

.free-drawing-pencil-action svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.location-add-fab.free-drawing-finish-fab {
  background: linear-gradient(135deg, #22c55e, #15803d) !important;
  box-shadow: 0 10px 28px rgba(20, 83, 45, .36);
  outline: 3px solid rgba(34, 197, 94, .28);
  outline-offset: 3px;
}

.location-add-fab.free-drawing-finish-fab span {
  transform: none !important;
}

.free-drawing-palette {
  position: absolute;
  right: 70px;
  bottom: 0;
  z-index: 2;
  display: grid;
  width: min(330px, calc(100vw - 94px));
  gap: 8px;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid rgba(120, 43, 43, .28);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 38px rgba(31, 41, 55, .28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.free-drawing-palette[hidden],
.free-drawing-edit-actions[hidden] {
  display: none !important;
}

.free-drawing-palette-title {
  color: #4b2330;
  font-size: 12px;
  font-weight: 800;
}

.free-drawing-palette-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.free-drawing-tool-button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #64748b;
  color: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .24);
  cursor: pointer;
  font: 800 15px/1 Arial, sans-serif;
  -webkit-appearance: none;
  appearance: none;
}

.free-drawing-tool-button:hover,
.free-drawing-tool-button:focus-visible,
.free-drawing-tool-button.is-active {
  outline: 2px solid #16a34a;
  outline-offset: 1px;
  transform: translateY(-1px);
}

.free-drawing-tool-button:disabled {
  opacity: .45;
  cursor: wait;
}

.free-drawing-tool-button[data-drawing-color],
.free-drawing-tool-button[data-plan-text-color] {
  background: var(--drawing-color, #d12323);
}

.free-drawing-tool-button[data-drawing-shape] svg,
.free-drawing-tool-button[data-drawing-action] svg,
.free-drawing-tool-button[data-plan-text-action] svg {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.free-drawing-tool-button.is-danger {
  background: #dc2626;
}

.free-drawing-width-control {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  gap: 7px;
  align-items: center;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.free-drawing-width-control input {
  width: 100%;
  margin: 0;
}

.free-drawing-width-control output {
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.plan-text-content-input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 7px 9px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font: 500 13px/1.3 Arial, sans-serif;
  resize: vertical;
}

.plan-text-content-input:focus {
  border-color: #f97316;
  outline: 2px solid rgba(249, 115, 22, .2);
}

.plan-text-edit-controls {
  display: grid;
  gap: 8px;
}

.plan-text-edit-controls[hidden] {
  display: none !important;
}

.free-drawing-palette-hint {
  color: #64748b;
  font-size: 10px;
  line-height: 1.3;
}

.plan-free-drawing-root {
  pointer-events: none;
}

.plan-free-drawing-shape {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.plan-free-drawing-shape.is-selected {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .95));
}

.plan-free-drawing-hit {
  stroke: transparent;
  stroke-width: 18;
  stroke-linecap: round;
  pointer-events: stroke;
  cursor: crosshair;
  touch-action: none;
}

.plan-free-drawing-capture {
  pointer-events: all;
  cursor: crosshair;
}

.is-free-drawing-active .plan-free-drawing-capture {
  touch-action: none;
}

.plan-wrap.is-free-drawing-active .cable-layer,
.location-plan-wrap.is-free-drawing-active .location-plan-overlays {
  z-index: 60;
  pointer-events: auto;
}

/* Schématické značky zůstávají i při kreslení vizuálně nad trasami a tvary. */
.plan-wrap.is-free-drawing-active .pins-layer,
.location-plan-wrap.is-free-drawing-active .location-plan-markers {
  z-index: 61;
  pointer-events: none !important;
}

.plan-wrap.is-free-drawing-active .pins-layer *,
.location-plan-wrap.is-free-drawing-active .location-plan-markers *,
.location-plan-wrap.is-free-drawing-active .location-plan-electrical-symbol {
  pointer-events: none !important;
}

.plan-free-drawing-handle {
  fill: rgba(255, 255, 255, .96);
  stroke: #dc2626;
  stroke-width: 2;
  pointer-events: all;
  cursor: move;
  touch-action: none;
  vector-effect: non-scaling-stroke;
}

.plan-free-drawing-handle.is-selected {
  fill: #22c55e;
  stroke: #fff;
  stroke-width: 2.5;
}

.plan-text-root {
  pointer-events: none;
}

.plan-text-object {
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  paint-order: stroke fill;
  font-family: Arial, sans-serif;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.plan-text-object.is-selected {
  filter: drop-shadow(0 0 2px rgba(249, 115, 22, .8));
}

.plan-text-hit {
  pointer-events: all;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.plan-text-capture {
  pointer-events: all;
  cursor: crosshair;
  touch-action: none;
}

.plan-text-handle {
  fill: #22c55e;
  stroke: #fff;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  cursor: move;
  touch-action: none;
}

.plan-wrap.is-plan-text-active .cable-layer,
.location-plan-wrap.is-plan-text-active .location-plan-overlays {
  z-index: 60;
  pointer-events: auto;
}

.is-free-drawing-active .plan-text-hit,
.is-plan-text-active .plan-free-drawing-hit {
  pointer-events: none !important;
}

@media (max-width: 760px) {
  .free-drawing-palette {
    right: 60px;
    width: min(294px, calc(100vw - 76px));
    gap: 6px;
    padding: 8px;
  }

  .free-drawing-tool-button {
    width: 30px;
    height: 30px;
    min-width: 30px;
  }
}

body:has(.note-user-radio-fab:not([hidden])) .location-photo-point-fab {
  right: 88px;
  bottom: 88px;
}

@media (max-width: 760px) {
  .location-add-widget {
    right: 192px;
    bottom: 12px;
    width: 52px;
    height: 52px;
  }

  .location-add-fab,
  .location-add-menu-action {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
  }

  .location-add-fab {
    font-size: 27px;
  }

  .location-add-menu {
    bottom: 62px;
  }

  .location-photo-point-fab {
    right: 132px;
    bottom: 12px;
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
  }

  .location-photo-point-fab svg {
    width: 23px;
    min-width: 23px;
    max-width: 23px;
    height: 23px;
    min-height: 23px;
    max-height: 23px;
    flex-basis: 23px;
  }

  body:has(.note-user-radio-fab:not([hidden])) .location-photo-point-fab {
    right: 72px;
    bottom: 76px;
  }
}
.symbol-marker-action.rotate-custom {
  background: #087fbd;
  color: #fff;
  font-weight: 800;
}
.symbol-marker-action.rotate-preset {
  background: #52677d;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: -.35px;
}

/* Editor kopií fotografií v půdorysu. */
body.location-photo-editor-open { overflow: hidden; }
.location-photo-editor {
  width: min(1180px, calc(100vw - 20px));
  max-width: none;
  height: min(820px, calc(100dvh - 20px));
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #111827;
  color: #f8fafc;
  box-shadow: 0 24px 70px rgba(0,0,0,.52);
  overflow: hidden;
}
.location-photo-editor::backdrop { background: rgba(15,23,42,.72); backdrop-filter: blur(2px); }
.location-photo-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 7px 10px 7px 16px;
  background: #1f2937;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.location-photo-editor-head > div { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.location-photo-editor-head strong { font-size: 16px; }
.location-photo-editor-head span { overflow: hidden; color: #cbd5e1; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.location-photo-editor-layout { display: grid; grid-template-columns: minmax(0,1fr) 250px; height: calc(100% - 52px); min-height: 0; }
.location-photo-editor-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  background: #05080d;
  touch-action: none;
}
.location-photo-editor-stage canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  background: #000;
  cursor: crosshair;
  touch-action: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16);
}
.location-photo-editor-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #e2e8f0; background: rgba(2,6,23,.72); }
.location-photo-editor-loading[hidden] { display: none; }
.location-photo-editor-tools { display: grid; align-content: start; gap: 13px; min-height: 0; padding: 14px; overflow-y: auto; background: #f8fafc; color: #1f2937; }
.location-photo-editor-tools section { display: grid; gap: 7px; }
.location-photo-editor-palette,
.location-photo-editor-shapes,
.location-photo-editor-annotation-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.location-photo-editor-palette button,
.location-photo-editor-shapes button,
.location-photo-editor-annotation-tools button,
.photo-edit-action {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(15,23,42,.28);
}
.location-photo-editor-palette button { background: var(--photo-editor-color); }
.location-photo-editor-shapes button,
.location-photo-editor-annotation-tools button { background: #52677d; color: #fff; }
.location-photo-editor-shapes svg,
.location-photo-editor-annotation-tools svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap:round; stroke-linejoin:round; }
.location-photo-editor-annotation-tools button { position:relative; font:800 17px/1 Arial,sans-serif; }
.location-photo-editor-annotation-tools button svg { position:absolute; right:3px; bottom:2px; width:15px; height:15px; }
.location-photo-editor-annotation-tools button.is-active { background:#eab308; outline:3px solid rgba(34,197,94,.38); outline-offset:1px; }
.location-photo-editor-palette button.is-selected,
.location-photo-editor-shapes button.is-selected { outline: 3px solid #22c55e; outline-offset: 1px; }
.location-photo-editor-annotations { padding:9px; border:1px solid #d6dee6; border-radius:10px; background:#fff7ed; }
.location-photo-editor-annotations textarea { width:100%; min-width:0; box-sizing:border-box; margin:0; padding:7px 8px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#1f2937; font:inherit; resize:vertical; }
.location-photo-editor-annotation-edit { display:grid; gap:8px; padding-top:8px; border-top:1px solid #fed7aa; }
.location-photo-editor-annotation-edit[hidden] { display:none; }
.location-photo-editor-annotation-edit label { display:grid; gap:4px; }
.location-photo-editor-annotation-edit label[hidden] { display:none; }
.location-photo-editor-annotation-edit label > span { display:flex; justify-content:space-between; gap:8px; font-size:12px; font-weight:700; }
.location-photo-editor-annotation-edit input[type="range"] { width:100%; margin:0; }
.location-photo-editor-annotations small { color:#64748b; font-size:10px; line-height:1.3; }
.location-photo-editor-width,
.location-photo-editor-target { display: grid; gap: 6px; }
.location-photo-editor-width span { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.location-photo-editor-target-open { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-width:0; padding:8px 10px; border:1px solid #b8c4ce; border-radius:8px; background:#fff; color:#1f2937; font-weight:700; text-align:left; cursor:pointer; }
.location-photo-editor-target-open > span:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.location-photo-editor-target-picker { display:grid; gap:7px; padding:8px; border:1px solid #b8c4ce; border-radius:10px; background:#fff; box-shadow:0 8px 22px rgba(15,23,42,.18); }
.location-photo-editor-target-picker[hidden] { display:none; }
.location-photo-editor-target-picker input[type="search"] { width:100%; min-width:0; margin:0; padding:8px; border:1px solid #b8c4ce; border-radius:8px; }
.location-photo-editor-target-list { display:grid; gap:8px; max-height:260px; overflow:auto; overscroll-behavior:contain; }
.location-photo-editor-target-group { display:grid; gap:4px; }
.location-photo-editor-target-group[hidden] { display:none; }
.location-photo-editor-target-group > strong { color:#64748b; font-size:10px; text-transform:uppercase; letter-spacing:.04em; }
.location-photo-editor-target-item { display:grid; grid-template-columns:34px minmax(0,1fr); align-items:center; gap:7px; width:100%; min-width:0; padding:5px; border:1px solid #d7dfe7; border-radius:8px; background:#f8fafc; color:#1f2937; text-align:left; cursor:pointer; }
.location-photo-editor-target-item[hidden] { display:none; }
.location-photo-editor-target-item.is-selected { border-color:#16a34a; background:#ecfdf3; box-shadow:0 0 0 2px rgba(34,197,94,.18); }
.location-photo-editor-target-item > span:last-child { display:grid; min-width:0; }
.location-photo-editor-target-item strong { overflow:hidden; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.location-photo-editor-target-item small { overflow:hidden; color:#64748b; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.location-photo-editor-target-icon { display:grid; place-items:center; width:34px; height:34px; overflow:hidden; border-radius:7px; background:#e2e8f0; color:#3f2852; font-size:15px; font-weight:800; }
.location-photo-editor-target-icon img { display:block; width:100%; height:100%; object-fit:contain; }
.location-photo-editor-target-empty { color:#64748b; font-size:11px; }
.location-photo-editor-target-empty[hidden] { display:none; }
.location-photo-editor-history,
.location-photo-editor-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.location-photo-editor-actions { justify-content: flex-end; }
.location-photo-editor-drawing-edit { display:grid; gap:6px; padding:8px; border:1px solid #86d7a8; border-radius:9px; background:#ecfdf3; }
.location-photo-editor-drawing-edit[hidden] { display:none; }
.location-photo-editor-drawing-edit span { color:#466154; font-size:10px; line-height:1.3; }
.location-photo-editor-symbols {
  padding: 9px;
  border: 1px solid #d6dee6;
  border-radius: 10px;
  background: #eef2f6;
}
.location-photo-editor-symbol-row { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 7px; align-items:center; }
.location-photo-editor-symbol-preview { display:grid; place-items:center; grid-row:1 / span 2; width:42px; height:42px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#d12323; overflow:hidden; }
.location-photo-editor-symbol-preview:empty::before { content:"?"; color:#94a3b8; font-weight:800; }
.location-photo-editor-symbol-preview svg,
.location-photo-editor-symbol-preview img { display:block; width:32px; height:32px; object-fit:contain; }
.location-photo-editor-symbol-row select { width: 100%; min-width: 0; padding: 7px; border: 1px solid #b8c4ce; border-radius: 8px; background: #fff; }
.location-photo-editor-symbol-row .btn-mini { grid-column:2; }
.location-photo-editor-symbol-row .btn-mini.is-active { background: #f59e0b; color: #fff; outline: 3px solid rgba(34,197,94,.42); }
.location-photo-editor-symbol-edit { display: grid; gap: 8px; padding-top: 9px; border-top: 1px solid #cbd5e1; }
.location-photo-editor-symbol-edit[hidden] { display: none; }
.location-photo-editor-symbol-edit label { display: grid; gap: 4px; }
.location-photo-editor-symbol-edit label > span { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.location-photo-editor-symbol-edit input[type="range"] { width: 100%; margin: 0; }
.location-photo-editor-symbols small { color: #64748b; font-size: 10px; line-height: 1.3; }
.location-photo-editor-stage canvas[data-editor-mode="symbol_place"] { cursor: copy; }
.location-photo-editor-stage canvas[data-editor-mode="text_place"],
.location-photo-editor-stage canvas[data-editor-mode="callout_target"],
.location-photo-editor-stage canvas[data-editor-mode="callout_origin"] { cursor:crosshair; }
.location-photo-editor-stage canvas[data-editor-mode="symbol_select"],
.location-photo-editor-stage canvas[data-editor-mode="shape_select"] { cursor: move; }
.location-photo-editor-status { min-height: 18px; color: #9a3412; font-size: 12px; font-weight: 700; }
.photo-edit-action { position: absolute; z-index: 3; right: 5px; bottom: 5px; background: #f59e0b; color: #fff; }
.photo-edit-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.photo-point-photo .photo-edit-action {
  top: auto;
  right: 5px;
  bottom: 5px;
  width: 34px;
  height: 34px;
  background: #f59e0b;
  color: #fff;
}
.photo-point-photo > button:not(.photo-edit-action) { z-index: 3; }
.route-photo-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.route-photo-strip button { position: relative; width: 54px; height: 54px; padding: 0; overflow: hidden; border: 1px solid #b9c5cf; border-radius: 7px; background: #e5e7eb; cursor: pointer; }
.route-photo-strip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.route-photo-strip button::after { content: '✎'; position: absolute; right: 2px; bottom: 2px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #f59e0b; color: #fff; font: 700 12px/1 Arial,sans-serif; }

@media (max-width: 760px) {
  .location-photo-editor { width: 100vw; height: 100dvh; border-radius: 0; }
  .location-photo-editor-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) auto; }
  .location-photo-editor-tools { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 10px; max-height: 42dvh; padding: 9px 10px; }
  .location-photo-editor-tools > .muted,
  .location-photo-editor-annotations,
  .location-photo-editor-symbols,
  .location-photo-editor-status,
  .location-photo-editor-actions { grid-column: 1 / -1; }
  .location-photo-editor-stage { padding: 4px; }
}

/* Docházka odvozená z časů revizí spotřebičů. */
.doch-appliance-report { max-width: 1380px; }
.doch-appliance-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin:18px 0; }
.doch-appliance-heading h2 { margin:0 0 5px; color:#17343a; }
.doch-appliance-heading p { margin:0; color:#5c7176; }
.doch-appliance-filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; }
.doch-appliance-filters > div { min-width:0; }
.doch-appliance-filter-user { flex:1 1 260px; }
.doch-appliance-filter-select { flex:1 1 245px; }
.doch-appliance-filter-revision { flex-basis:320px; }
.doch-appliance-filter-date { flex:0 1 155px; }
.doch-appliance-filter-margin { flex:0 1 170px; }
.doch-appliance-filters label { display:block; margin-bottom:5px; color:#294d54; font-size:13px; font-weight:700; }
.doch-appliance-filters input,
.doch-appliance-filters select { width:100%; min-width:0; box-sizing:border-box; }
.doch-appliance-minute-input { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px; }
.doch-appliance-minute-input span { color:#60767b; font-weight:700; }
.doch-appliance-quick-periods { display:flex; flex:1 1 390px; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:7px; }
.doch-appliance-quick-periods .diagnose-button { flex:0 1 auto; padding-right:12px; padding-left:12px; white-space:nowrap; }
.doch-appliance-quick-periods .diagnose-button.is-active { background:#075d66; box-shadow:inset 0 0 0 2px rgba(255,255,255,.45); }
.doch-appliance-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin:14px 0; }
.doch-appliance-summary .doch-summary-card { min-width:0; padding:14px 16px; border:1px solid #c8dfe2; border-radius:10px; background:linear-gradient(145deg,#fff,#f1f8f8); box-shadow:0 3px 12px rgba(21,70,76,.07); }
.doch-appliance-summary .doch-summary-label { margin-bottom:5px; color:#60767b; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.doch-appliance-summary .doch-summary-value { overflow-wrap:anywhere; color:#0d6670; font-size:20px; font-weight:800; }
.doch-appliance-table-wrap { overflow-x:auto; }
.doch-appliance-table { width:100%; border-collapse:collapse; }
.doch-appliance-table th { background:#087f8c; color:#fff; }
.doch-appliance-table th,
.doch-appliance-table td { padding:9px 10px; border:1px solid #d5e2e4; text-align:left; vertical-align:middle; }
.doch-appliance-table tbody tr:nth-child(even) { background:#f5f9f9; }
.doch-appliance-table tbody tr:hover { background:#e9f5f5; }
.doch-appliance-table td small { display:block; margin-top:2px; color:#718488; font-size:11px; }
.doch-appliance-table tfoot th { background:#dceff0; color:#17343a; }
.doch-appliance-evidence { margin-top:14px; border:1px solid #d5e2e4; border-radius:9px; background:#f8fbfb; }
.doch-appliance-evidence > summary { padding:10px 12px; color:#146d76; font-weight:800; cursor:pointer; }
.doch-appliance-evidence-day { padding:0 12px 10px; }
.doch-appliance-evidence-day h4 { display:flex; justify-content:space-between; gap:12px; margin:8px 0 5px; color:#294d54; }
.doch-appliance-evidence-day h4 span { color:#718488; font-size:12px; }
.doch-appliance-evidence-day ul { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:4px 14px; margin:0; padding:0; list-style:none; }
.doch-appliance-evidence-day li { display:flex; gap:8px; min-width:0; padding:5px 7px; border-radius:5px; background:#fff; }
.doch-appliance-evidence-day time { flex:0 0 auto; color:#0d6670; font-weight:800; }
.doch-appliance-evidence-day li span { min-width:0; overflow-wrap:anywhere; color:#435b60; }
.doch-appliance-note { margin:12px 0 0; color:#60767b; font-size:13px; }
.doch-appliance-brand { margin:18px 0 8px; color:#718488; font-size:12px; text-align:center; }
.doch-appliance-brand a { color:#087f8c; font-weight:800; text-decoration:none; }
.doch-appliance-brand a:hover,
.doch-appliance-brand a:focus { text-decoration:underline; }
.doch-appliance-message { margin-top:14px; }
.doch-appliance-message.is-error { border-left:4px solid #c93b32; color:#8f2721; }

@media (max-width: 900px) {
  .doch-appliance-filter-user { flex-basis:100%; }
  .doch-appliance-filter-select { flex:1 1 280px; }
  .doch-appliance-filter-date,
  .doch-appliance-filter-margin { flex:1 1 180px; }
  .doch-appliance-quick-periods { flex-basis:100%; justify-content:flex-start; }
  .doch-appliance-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .doch-appliance-heading { align-items:stretch; flex-direction:column; }
  .doch-appliance-heading .diagnose-button { width:100%; box-sizing:border-box; text-align:center; }
  .doch-appliance-filters { align-items:stretch; flex-direction:column; }
  .doch-appliance-filter-user,
  .doch-appliance-filter-select,
  .doch-appliance-filter-date,
  .doch-appliance-filter-margin,
  .doch-appliance-quick-periods { width:100%; flex:0 0 auto; }
  .doch-appliance-filters > .diagnose-button { width:100%; box-sizing:border-box; text-align:center; }
  .doch-appliance-quick-periods { display:grid; grid-template-columns:1fr; }
  .doch-appliance-quick-periods .diagnose-button { width:100%; box-sizing:border-box; text-align:center; }
  .doch-appliance-summary { grid-template-columns:1fr; }
  .doch-appliance-table,
  .doch-appliance-table tbody,
  .doch-appliance-table tr,
  .doch-appliance-table td { display:block; width:100%; box-sizing:border-box; }
  .doch-appliance-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .doch-appliance-table tbody tr { margin-bottom:10px; overflow:hidden; border:1px solid #cbdcdf; border-radius:9px; background:#fff; }
  .doch-appliance-table tbody td { display:grid; grid-template-columns:minmax(110px,42%) minmax(0,1fr); gap:8px; padding:7px 10px; border:0; border-bottom:1px solid #e6eeee; text-align:right; }
  .doch-appliance-table tbody td:last-child { border-bottom:0; }
  .doch-appliance-table tbody td::before { content:attr(data-label); color:#526d72; font-weight:700; text-align:left; }
  .doch-appliance-table tfoot { display:block; }
  .doch-appliance-table tfoot tr { display:grid; grid-template-columns:1fr 1fr; }
  .doch-appliance-table tfoot th { display:block; padding:8px; border:1px solid #cbdcdf; }
  .doch-appliance-table tfoot th[colspan] { grid-column:1 / -1; }
  .doch-appliance-table tfoot th:empty { display:none; }
}

/* Rastr editoru půdorysu: dočasné zjemnění, nápověda a použité rozteče. */
.drawing-range-caption {
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.drawing-help-bubble {
  display:inline-grid;
  place-items:center;
  width:17px;
  height:17px;
  padding:0;
  border:1px solid #8fa1b2;
  border-radius:50%;
  background:#fff;
  color:#42596d;
  font:700 11px/1 Arial, sans-serif;
  cursor:help;
}

.snap-grid-used {
  display:grid;
  gap:5px;
}

.snap-grid-used-title {
  color:#46596a;
  font-size:11px;
  font-weight:700;
}

.snap-grid-used-values {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  max-height:72px;
  overflow:auto;
}

.snap-grid-used-badge {
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:2px 7px;
  border:1px solid #cbd7e0;
  border-radius:999px;
  background:#fff;
  color:#34495b;
  font-size:10px;
  font-weight:700;
  white-space:nowrap;
  cursor:pointer;
}

.snap-grid-used-badge:hover,
.snap-grid-used-badge:focus-visible {
  border-color:#3f2852;
  background:#f4eff8;
  color:#3f2852;
  outline:none;
}
/* Vrstvy půdorysu */
.plan-layers-panel{width:min(520px,calc(100vw - 24px));display:grid;gap:12px}
.plan-layer-switcher{display:flex;flex-wrap:wrap;gap:6px}
.plan-layer-chip{display:inline-flex;align-items:center;min-height:30px;padding:4px 10px;border:1px solid #b9a8c4;border-radius:999px;background:#fff;color:#4b2f58;text-decoration:none;font-weight:700;font-size:13px}
.plan-layer-chip:hover,.plan-layer-chip:focus-visible{border-color:#795087;background:#f5eef8}
.plan-layer-chip.is-active{border-color:#694178;background:#694178;color:#fff}
.plan-layer-view-options,.plan-layer-form{display:grid;gap:8px;padding:10px;border:1px solid #ddd3e2;border-radius:10px;background:#fcfafd}
.plan-layer-view-options>label:not(.plan-layer-my-drawing){display:grid;grid-template-columns:minmax(130px,1fr) minmax(130px,.8fr);gap:8px;align-items:center}
.plan-layer-my-drawing-options{display:grid;gap:5px;padding-bottom:8px;border-bottom:1px solid #e6dfea}
.plan-layer-my-drawing{display:grid;grid-template-columns:auto 1fr;column-gap:7px;align-items:center;font-weight:700}
.plan-layer-my-drawing small{grid-column:2;color:#69616d;font-weight:400}
.plan-layer-my-drawing-routes{display:grid;grid-template-columns:auto 1fr;column-gap:7px;align-items:center;margin-left:22px;color:#514657;font-size:12px;font-weight:700}
.plan-layer-my-drawing-routes small{grid-column:2;color:#746b77;font-weight:400}
.plan-layer-my-drawing-routes:has(input:disabled){opacity:.55}
.plan-layer-form input[type="text"],.plan-layer-form select{box-sizing:border-box;width:100%;min-height:36px;padding:7px 9px;border:1px solid #c9c2cc;border-radius:7px;background:#fff}
.plan-layer-create-form{grid-template-columns:1fr}
.plan-layer-transfer{display:grid;gap:8px;padding:10px;border:1px solid #cbbbd4;border-radius:10px;background:#f9f5fb}
.plan-layer-transfer-toggle{display:flex;align-items:center;gap:8px;font-weight:800;color:#52315f;cursor:pointer}
.plan-layer-transfer-options{display:grid;gap:9px;padding-top:8px;border-top:1px solid #ded4e4}
.plan-layer-transfer-options>label{display:grid;grid-template-columns:minmax(115px,.7fr) minmax(150px,1fr);gap:8px;align-items:center}
.plan-layer-transfer-options select{box-sizing:border-box;width:100%;min-height:36px;padding:7px 9px;border:1px solid #c9c2cc;border-radius:7px;background:#fff}
.plan-layer-transfer-modes{display:flex;flex-wrap:wrap;gap:8px 16px;margin:0;padding:8px 10px;border:1px solid #ded7e2;border-radius:8px}
.plan-layer-transfer-modes legend{padding:0 5px;font-weight:700;color:#52315f}
.plan-layer-transfer-modes label{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.plan-layer-transfer-help{margin:0;color:#625a66;font-size:12px;line-height:1.4}
.plan-layer-transfer-status{display:block;min-height:18px;color:#4d3158;font-size:12px;font-weight:700}
.plan-layer-transfer-status.is-ok{color:#13713c}
.plan-layer-transfer-status.is-error{color:#b42318}
.plan-layer-bulk-actions{display:flex;flex-wrap:wrap;gap:5px}
.plan-layer-item-groups{display:grid;gap:8px;max-height:320px;overflow:auto;overscroll-behavior:contain;padding-right:3px}
.plan-layer-item-groups fieldset{display:grid;gap:4px;margin:0;padding:7px;border:1px solid #ded7e2;border-radius:8px}
.plan-layer-item-groups legend{padding:0 5px;font-weight:700;color:#52315f}
.plan-layer-item-groups label{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:6px;align-items:start;padding:3px 2px;font-weight:400}
.plan-layer-item-groups label small{color:#766d79;white-space:nowrap}
.plan-layer-delete-form{margin:0}
.symbol-placement-photo[hidden]{display:none!important}
.plan-connection-info{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:3px;width:max-content;max-width:min(360px,80vw);max-height:160px;overflow:auto;padding:5px 8px;border:1px solid #d0d7de;border-radius:8px;background:#fff;color:#263746;font-size:9px;line-height:1.4;box-shadow:0 3px 12px rgba(0,0,0,.15);white-space:normal;pointer-events:auto}
.plan-connection-info-row{display:flex;gap:3px 10px;align-items:baseline}
.plan-connection-info-row:empty{display:none}
.plan-connection-info-row>span{min-width:0;overflow-wrap:anywhere}
.plan-panel-connection-info{max-width:min(280px,80vw)}
.plan-panel-connection-info summary{cursor:pointer;font-size:inherit;font-weight:600;padding:2px 0}
.plan-panel-connection-info details>div{padding:2px 0;overflow-wrap:anywhere}
.plan-panel-connection-info details details{margin-top:3px;padding-left:8px}
.plan-connection-link{display:inline;padding:0;border:0;background:transparent;color:#145ea8;font:inherit;text-align:left;text-decoration:underline;cursor:pointer}
.plan-connection-link:hover,.plan-connection-link:focus-visible{color:#a31414}
.symbol-placement-photo[aria-pressed="true"]{background:#b91c1c;color:#fff;border-color:#991b1b;box-shadow:0 0 0 2px rgba(185,28,28,.18)}
.plan-layer-muted{opacity:.24!important;filter:grayscale(1)!important;pointer-events:none!important}
.plan-layer-muted .lbl,.plan-layer-muted.location-plan-overlay-point-label{color:#747474!important;fill:#747474!important}
.plan-layer-hidden{display:none!important}
.plan-wrap.is-layer-transfer-mode .pin.electrical-symbol-pin{cursor:copy!important}
.plan-wrap.is-layer-transfer-mode[data-layer-transfer-mode="move"] .pin.electrical-symbol-pin{cursor:move!important}
.plan-wrap.is-layer-transfer-mode .pin.electrical-symbol-pin .electrical-symbol-icon,
.plan-wrap.is-layer-transfer-mode .plan-text-anchor[data-point-type="symbol"],
.plan-wrap.is-layer-transfer-mode .plan-text-anchor[data-point-type="symbol"] .lbl{cursor:copy!important;pointer-events:auto!important}
.plan-wrap.is-layer-transfer-mode[data-layer-transfer-mode="move"] .pin.electrical-symbol-pin .electrical-symbol-icon,
.plan-wrap.is-layer-transfer-mode[data-layer-transfer-mode="move"] .plan-text-anchor[data-point-type="symbol"],
.plan-wrap.is-layer-transfer-mode[data-layer-transfer-mode="move"] .plan-text-anchor[data-point-type="symbol"] .lbl{cursor:move!important}
.plan-wrap.is-layer-transfer-mode .pin.electrical-symbol-pin.plan-layer-muted,
.plan-wrap.is-layer-transfer-mode .plan-text-anchor[data-point-type="symbol"].plan-layer-muted{pointer-events:auto!important}
.plan-wrap.is-layer-transfer-busy .pin.electrical-symbol-pin,
.plan-wrap.is-layer-transfer-busy .plan-text-anchor[data-point-type="symbol"]{cursor:progress!important}
.location-plan-layer-menu{position:relative}
.location-plan-layer-menu>summary{list-style:none;cursor:pointer}
.location-plan-layer-menu>summary::-webkit-details-marker{display:none}
.location-plan-layer-menu-body{position:absolute;z-index:140;top:calc(100% + 6px);left:0;display:grid;gap:9px;width:min(390px,calc(100vw - 28px));max-height:min(70vh,560px);overflow:auto;padding:12px;border:1px solid #cfc2d7;border-radius:12px;background:#fff;box-shadow:0 16px 38px rgba(39,22,47,.28)}
.location-plan-layer-mode-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(125px,.75fr);gap:8px;align-items:center}
.location-plan-layer-mode-row select{width:100%;min-height:34px;padding:5px 7px;border:1px solid #c9c2cc;border-radius:7px;background:#fff}
.location-pdf-plan-layers{margin-bottom:12px!important;border-color:#ae8fba!important;background:#faf6fc}
.location-pdf-plan-layers legend{padding:0 6px;font-weight:800;color:#563363}

/* MREVI_FOTOFILM_START */
.fotofilm,
.fotofilm * {
    box-sizing: border-box;
}
.fotofilm {
    position: fixed;
    z-index: 1800;
    top: 8px;
    right: 8px;
    bottom: 8px;
    display: flex;
    flex-direction: column;
    width: var(--fotofilm-width, 382px);
    max-width: calc(100vw - 16px);
    overflow: hidden;
    border: 0;
    background: transparent;
    color: #fff;
    font: 13px/1.35 Arial, sans-serif;
    text-align: left;
    box-shadow: none;
    isolation: isolate;
    pointer-events: none;
}
.fotofilm[hidden],
.fotofilm [hidden] {
    display: none !important;
}
.fotofilm-photo-tools {
    position: absolute;
    z-index: 20;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    transition: top .38s cubic-bezier(.22, .75, .2, 1), right .38s cubic-bezier(.22, .75, .2, 1);
}
.fotofilm .fotofilm-control {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 32px;
    min-height: 32px;
    margin: 0;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 6px;
    background: #0077a3;
    color: #fff;
    font: bold 13px/1.1 Arial, sans-serif;
    cursor: pointer;
    pointer-events: auto;
}
.fotofilm .fotofilm-control:hover {
    background: #00a1c4;
}
.fotofilm .fotofilm-control:disabled {
    opacity: .35;
    cursor: default;
}
.fotofilm .fotofilm-close {
    width: 32px;
    padding: 0;
    background: #973335;
    font-size: 25px;
}
.fotofilm .fotofilm-close:hover {
    background: #c3383c;
}
.fotofilm-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}
.fotofilm-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    touch-action: pan-x pinch-zoom;
    overscroll-behavior: contain;
    background: transparent;
    pointer-events: none;
}
.fotofilm .fotofilm-photo {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: var(--fotofilm-photo-width, 350px);
    height: var(--fotofilm-photo-height, 350px);
    aspect-ratio: 1 / 1;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 3px;
    overflow: hidden;
    border: 1px solid #89adbb;
    border-radius: 7px;
    background: transparent;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
    transform: translate(-50%, -50%) translateY(var(--fotofilm-photo-y, 0px));
    transition: transform .38s cubic-bezier(.22, .75, .2, 1), width .38s, height .38s, opacity .25s, visibility .38s;
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
}
.fotofilm .fotofilm-photo.is-current {
    border: 2px solid var(--mrevi-orange, #fd7e14);
    cursor: zoom-in;
}
.fotofilm .fotofilm-photo.is-outside {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
.fotofilm-photo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    border: 0;
    border-radius: 3px;
    pointer-events: none;
    -webkit-user-drag: none;
}
.fotofilm-photo.is-unavailable img {
    color: #fff;
    font-size: 12px;
}
.fotofilm-caption {
    flex: 0 0 auto;
    max-height: 3.5em;
    margin: 0;
    padding: 5px 10px 0;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    text-align: center;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 3px #15273f, 0 0 5px #15273f;
}
.fotofilm-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px;
}
.fotofilm-counter {
    min-width: 45px;
    color: #fff;
    font-size: 12px;
    text-align: center;
    text-shadow: 0 1px 3px #15273f, 0 0 5px #15273f;
}
.fotofilm-message {
    flex: 1;
    margin: 0;
    padding: 24px 14px;
    color: #e4eff3;
    font-size: 13px;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 3px #15273f, 0 0 5px #15273f;
}
.fotofilm-rotate {
    display: none;
    margin: 0;
    padding: 14px 52px 14px 12px;
    color: #fff;
    background: rgba(21, 39, 63, .9);
    border-radius: 8px;
    font-size: 13px;
}
.fotofilm.is-expanded {
    width: min(880px, calc(100vw - 24px));
}
.fotofilm.is-expanded .fotofilm-photo.is-current {
    cursor: zoom-in;
}
.fotofilm.is-fullscreen {
    inset: 0;
    width: 100vw;
    max-width: none;
    background: #101820;
    pointer-events: auto;
}
.fotofilm.is-fullscreen .fotofilm-photo.is-current {
    cursor: zoom-out;
}
.fotofilm.is-portrait {
    top: auto;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(320px, calc(100vw - 16px));
}
.fotofilm.is-portrait .fotofilm-content {
    display: none;
}
.fotofilm.is-portrait .fotofilm-rotate {
    display: block;
}
.fotofilm.is-portrait .fotofilm-size {
    display: none;
}
.fotofilm-toggle.is-active {
    background: #0077a3;
    box-shadow: inset 0 0 0 2px #fd7e14;
}
.fotofilm :focus-visible {
    outline: 2px solid #00d2f6;
    outline-offset: -3px;
}
@media (max-height: 500px) {
    .fotofilm-actions { padding: 3px; }
    .fotofilm-caption { padding-top: 2px; font-size: 11px; max-height: 2.8em; }
}
@media (prefers-reduced-motion: reduce) {
    .fotofilm .fotofilm-photo, .fotofilm-photo-tools { transition: none; }
}
@media print {
    .fotofilm { display: none !important; }
}
/* MREVI_FOTOFILM_END */
