html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr;
}

main {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 50px;
    overflow: auto;
    box-sizing: border-box;
}

#svgContainer,
#svgInnerContainer {
    height: 100%;
}

#svgInnerContainer {
    line-height: 0;
}

#svg {
    display: block;
    width: 100%;
    height: 100%;
}

footer {
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: visible;
}

    footer a, footer span {
        white-space: normal;
        word-wrap: break-word;
    }

    footer * {
        max-width: 98%;
        text-align: center;
    }

.custom-nav {
    margin-bottom: 5px !important;
}

.loaderbody {
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
    position: absolute;
    background-color: rgba(128,128,128,0.2);
    z-index: 2147483647;
}

.loader {
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 2s linear infinite;
    position: fixed;
    top: 45%;
    left: 40%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hide {
    display: none;
}

.disable {
    pointer-events: none;
    opacity: 0.5;
}

a.glyphicon {
    cursor:pointer;
    text-decoration:none;
}

.order-status-added {
    color: green;
}

.order-status-veryfication {
    color: yellow;
}

.order-status-accepted {
    color: darkgreen;
}

.order-status-rejected {
    color: red;
}

.order-status-assigned {
    color: blue;
}

.order-status-inprogres {
    color: yellowgreen;
}

.order-status-presentation {
    color: green;
}

.order-status-clientaccepted {
    color: green;
}

.order-status-clientrejected {
    color: darkred;
}

.order-status-settled {
color:green;
}

.order-status-shared {
    color: green;
}

.orderarea-status-pending{
    color: darkorange
}

.orderarea-status-accepted {
    color: green
}

.orderarea-status-rejected {
    color: red
}

.dropdown-menu {
    min-width: 200px;
}

    .dropdown-menu.columns-2 {
        min-width: 400px;
    }

    .dropdown-menu.columns-3 {
        min-width: 600px;
    }

    .dropdown-menu.columns-4 .row {
        display: flex;
        flex-wrap: nowrap;
    }

    .dropdown-menu.columns-4 .col-sm-3 {
        flex: 1;
        min-width: 200px;
    }

    .dropdown-menu li a {
        padding: 5px 15px;
    }

.multi-column-dropdown {
    list-style: none;
    margin: 0px;
    padding: 0px;
}

    .multi-column-dropdown li a {
        display: block;
        clear: both;
        line-height: 1.428571429;
        color: #333;
        white-space: normal;
    }

@media (max-width: 767px) {
    .dropdown-menu.multi-column {
        min-width: 240px !important;
        overflow-x: hidden;
    }
}

.toggle-vis:link,
.toggle-vis-es:link {
    display: inline-block;
    background-color: green;
    color: white;
    margin: 1px 1px 3px 1px;
    padding: 3px 4px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.toggle-vis:hover,
.toggle-vis-es:hover {
    background-color: green;
    text-decoration: none;
    cursor: pointer;
}

.toggle-vis:visited,
.toggle-vis-es:visited {
    background-color: green;
    color: white;
    cursor: pointer;
}

.toggle-vis:active,
.toggle-vis-es:active {
    background-color: green;
    cursor: pointer;
}


.error {
    border: 2px solid red;
}

input:invalid {
    border: 2px solid red;
    animation: shake 0.2s 2;
}

textarea:invalid {
    border: 2px solid red;
    animation: shake 0.2s 2;
}

@keyframes shake {
    25% {
        transform: translateX(6px);
    }

    50% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

.szukaj + .select2-container .select2-selection .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid lightgrey;
    width: 100% !important;
    z-index: 9999;
}

.select2-dropdown {
    z-index: 9999;
}

.szukaj + .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: black;
    line-height: 34px;
}

#messageArea{
    padding: 10px;
}
.highlight {
    border: 1px solid black;
    background-color: lightgreen;
    color: black;
}
.highlight2 {
    stroke: red;
    stroke-width: 3px;
    filter: drop-shadow(0 0 4px red);
}

.errormessage {
    border: 1px solid black;
    background-color: red;
    color: black;
}
#navbarDropdownCon{
    top: 100%;
    margin-top: -30px;
}

#main-map {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 50px 1fr;
    grid-gap: 1px;
    height: 80vh;
}

#map {
    grid-row: 2 / 3;
}

#tableMap {
    flex: 1;
    margin-right: 10px;
    overflow: auto;
}

    #tableMap td {
        padding: 2px;
    }

    #tableMap tr {
        text-align: left;
    }

    #tableMap td {
        display: inline-block;
        margin-right: 2px;
    }

#map {
    grid-row: 2 / 3;
    z-index: 0;
}

/* przyciski navbar mapa */
.transparencyButton {
    background-color: none;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid black;
    height: 27px;
}

    .transparencyButton .glyphicon {
        margin-right: 5px;
    }

.popover {
    max-width: 600px;
    height: auto;
}

/*zawiajnie tekstu w dzienniku systemowym*/
.wrap-text {
    max-width: 200px;
    position: relative;
}

.short-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#svg {
    max-width: 100%;
    height: auto;
    min-height: 60vh;
    padding-top: 5px;
    transform-origin: center center;
    transform: scale(1);
    justify-content: start;
    overflow: auto;
}

#svg .gp .hover ellipse {
    stroke: blue !important;
    fill: blue !important;
    fill-opacity: 1 !important;
}

#svg .ne .hover path {
    stroke: blue !important;
    fill: blue !important;
    fill-opacity: 1 !important;
    stroke-width: 8;
}
#svgInnerContainer {
    transform-origin: center top;
    transform: scale(1);
}

#tableBox {
    display: flex;
    gap: 10px;
}

.icon-group {
    width: auto;
}

.icon-group a {
    margin-top: 3px;
    font-size: 24px;
}

.modal-body2 {
    height: 90vh;
    overflow-y: auto;
}

/*popover na planie schematycznym*/
.svg-element .popover-header {
    background-color: gray;
    color: white;
}

#locationTitle{
    font-size: 13px;
    padding-top: 5px;
}

/*Style dla tabeli z obszarami modelu*/
#InfModelTable th {
    vertical-align: bottom;
    border-color: black;
}
#PosSysTable {
    border-bottom: none;    
}
#PosSysTable,
#PosSysData th,
#InfModelTable tbody td:nth-child(4),
#InfModelTable tbody td:nth-child(5),
#InfModelTable tbody td:nth-child(6) {
    width: 150px;
}

.link-styled {
    margin-left: -155px;
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}

/*Checkboxy i akordeony dla ról*/
.masterCheckbox {
    margin-right: 5px;
    margin-top: 3px;
}

.header-row-1 th,
.header-row-2 th,
.header-row-3 th {
    padding-bottom: 2px !important;
    padding-top: 2px !important;
    padding-left: 15px !important;
}
        .header-row-1 th.sorting::after {
            /*top: 75% !important;*/
            left: 0;
        }
        .header-row-1 th.sorting::before {
            left: 0;
            /*top: 58%;*/
        }
        .header-row-2 th.sorting::after {
            
            left: 0;
        }
        .header-row-2 th.sorting::before {
            left: 0;
        }

.header-row-EIF th {
    padding-bottom: 2px !important;
    padding-top: 2px !important;
    padding-left: 15px !important;
}
    .header-row-EIF th.sorting::after {
        left: 0;
    }
    .header-row-EIF th.sorting::before {
        left: 0;
    }

#area {
    width: auto;
    background-color: white;    
}

/*Poprawa widoku tabel*/
    .custom-top-container {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap;
    }
        .custom-top-container .dataTables_filter {
            order: 1;
            margin: 0;
        }
        .custom-top-container .dt-buttons {
            order: 2;
            margin: 3px 0 0 0;
        }

    .custom-body-container {
        height: 100%;       
    }

    .custom-bottom-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 7px;
        flex-wrap: nowrap;
    }
        .custom-bottom-container .dataTables_length {
            order: 1;
        }
        .custom-bottom-container .dataTables_info {
            order: 2;
            text-align: left;
            margin-bottom: 12px;
            flex-grow: 1;
        }
        .custom-bottom-container .dataTables_paginate {
            order: 3;
            margin-left: auto;
            padding-top: 0px !important;
        }
    
    table.dataTable.no-footer tbody th, table.dataTable tbody td {
        padding: 1px 10px !important;
        border-color: lightgray;
    }

    .pb-3 {
        padding-bottom: 0px !important;
    }    

    .dataTables_scrollBody {
        border-bottom: 1px solid white !important;
    }    

    #tabelaModels ol {
        margin-bottom: 0 !important;
        padding-left: 17px !important;
        font-size: 15px !important;
    }

.dataTable tbody tr:hover {
    background-color: #eef5ff !important;
    cursor: pointer;
}

.add-buttons-container {
    padding-top: 3px;
}

#CPS-dropdown-container {
    position: relative;
    display: inline-block;
}

#CPS-dropdown-content {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    width: 300px;
    z-index: 1000;
    padding: 10px;
    display: none; /* Upewniamy się, że dropdown jest początkowo schowany */
}

#CPS-search-input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
}

#CPS-search-results {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
}

#CPS-search-results li {
    padding: 8px;
    cursor: pointer;
}

#CPS-search-results li:hover {
    background-color: #f0f0f0;
}

.toggle-vis-eif {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 2px 2px;
    display: inline-block;
    background-color: #007bff;
    text-align: center;
}

.toggle-vis-eif:hover {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.context-menu ul {
    padding: 5px 0;
    margin: 0;
    border-radius: 4px;
}

.context-menu li {
    padding: 5px 15px;
    cursor: pointer;
}

.context-menu li:hover {
    background-color: #f0f0f0;
}
    .toggle-vis-eif:hover {
        color: white;
        text-decoration: none;
        font-weight: bold;
    }

.failureView {
    padding: 5px;
}
.tabTitle {
    border-bottom: 1px solid black;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    box-sizing: border-box;
    padding-right: 5px !important;
    background-color: rgba(242, 242, 249, 1);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
    .tabTitle.failure {
        background-color: salmon;
    }

    .tabTitle.repair {
        background-color: deepskyblue;
    }

    .tabTitle.maintenance {
        background-color: lightseagreen;
    }

    .tabTitle.restriction {
        background-color: yellow;
    }

.processSummary {
    margin-bottom: 0px !important;
    border: 1px solid black;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 5px;
    -webkit-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    -moz-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
}
    .processSummaryData {
        padding: 5px;
        margin-bottom: 0px !important;
    }

.symptomsTab {
    margin-bottom: 0px !important;    
    border: 1px solid black;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 5px;
    -webkit-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    -moz-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
}
    .symptomsTabData {
        min-height: 184px;
        padding: 5px;
        margin-bottom: 0px !important;
    }

.workPlanTab {
    margin-bottom: 0px !important;
    border: 1px solid black;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 5px;
    -webkit-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    -moz-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
}
    .workPlanTabData {
        min-height: 225px;
        padding: 5px;
        margin-bottom: 0px !important;
    }

.workingTab {
    margin-bottom: 0px !important;
    border: 1px solid black;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 5px;
    -webkit-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    -moz-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
}

.workingTabData {
    min-height: 225px;
    padding: 5px;
    margin-bottom: 0px !important;
}

.restrictionSummary {
    min-height: 180px;
    margin-bottom: 0px !important;
    border: 1px solid black;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 5px;
    -webkit-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    -moz-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
}

.devicesTab {
    border: 1px solid black;
    border-radius: 5px;
    -webkit-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    -moz-box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
    box-shadow: 0px 0px 7px 2px rgba(213, 213, 219, 1);
}
    .devicesTabData {
        padding:5px;
    }

.tentohalf {
    padding-left:2px;
    padding-top: 2px;
}

.sorting-btn {
    padding: 0px 0px 10px 0px;
    text-decoration: none;
    color: red;
}

.filter {
    font-size: 13px;
    padding: 2px;
    border-radius: 3px;
    border: 2px solid
}

.date-filter {
    width: 125px;
    font-size: 13px;
    padding: 2px;
    border-radius: 3px;
}

.backBtn1758 {
    padding-left: 0px;
    padding-right: 0px;
}

.submitBtn {
    margin-top: 8px;
}

.eikTypeSelect {
    width: 98% !important;
}

body.selecting-end {
    cursor: crosshair !important;
}

body.selecting-start {
    cursor: crosshair !important;
}

.selectPointLink {
    color: steelblue;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.svg-geopoint {
    color: red !important;
    stroke-width: 30px !important;
}

/* Podświetlanie elementów SVG*/

a[data-eikid].selected line,
a[data-eikid].selected circle,
a[data-eikid].selected path {
    stroke: red !important;
    stroke-width: 3px !important;
}

a[data-eikid].selected circle {
    fill: red !important;
}

g.svg-geoPoint.selected ellipse {
    stroke: red !important;
    stroke-width: 2px !important;
    fill: red !important;
}

g.svg-eik.selected {
    filter: drop-shadow(0 0 3px red) !important;
    stroke: red !important;
}

g.ne.selected path {
    stroke: red !important;
    stroke-width: 5px !important;
}

g.eik.selected * {
    stroke: red !important;
    stroke-width: 2px !important;
    fill: orange;
}

.location-type-selector:hover {
    text-decoration: underline;
    color: #007bff;
}

.info-panel {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 14px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
    font-family: Consolas, monospace;
    text-align: center;
    padding: 0 10px;
    line-height: 14px;
    box-sizing: border-box;
    z-index: 9999;
    pointer-events: none;
}

.info-history {
    position: absolute;
    bottom: 14px;
    left: 0;
    width: 100%;
    max-height: 70px; /* 5 linii po 14px */
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 13px;
    font-family: Consolas, monospace;
    padding: 5px 10px;
    box-sizing: border-box;
    z-index: 9998;
    pointer-events: all;
}

#info-message {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icon-btn {
    width: 50px;
    height: 25px;
    padding: 0;
    border: none;
    border-radius: 5px;
    overflow: hidden;
}

    .icon-btn img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block; /* Removes unwanted whitespace */
        border-radius: 5px;
    }


.dropdown-content-profile {
    display: none;
    margin-left: 20px;
}

.user-circle {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background-color: #007bff;
    color: #fff;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

@keyframes blink-yellow {
    0%, 100% {
        background-color: #fffbc1;
    }

    50% {
        background-color: #fff;
    }
}

@keyframes blink-blue {
    0%, 100% {
        background-color: #c1e7ff;
    }

    50% {
        background-color: #fff;
    }
}

@keyframes blink-green {
    0%, 100% {
        background-color: #d4f8d4;
    }

    50% {
        background-color: #ffffff;
    }
}

.highlight-new {
    animation: blink-yellow 1s ease-in-out infinite;
}

.highlight-updated {
    animation: blink-blue 1s ease-in-out infinite;
}

.highlight-assigned {
    animation: blink-green 1s ease-in-out infinite;
}

.highlight-unconfirmed {
    background-color: lightcoral;
}

.confirm-btn {
    margin-left: 10px;
    font-size: 0.85em;
    padding: 2px 6px;
}

.d-none {
    display: none !important;
}

.quick-link-tile {
    min-height: 120px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.quick-link-tile:hover {
    background-color: white !important;
    color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.quick-link-tile:hover .glyphicon {
    color: #0d6efd !important;
}

.remove-tile-button {
    transition: background-color 0.2s ease-in-out;
}

.quick-link-tile:hover + .remove-tile-button,
.remove-tile-button:hover {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

#variablesTable {
    table-layout: fixed;
    width: 100%;
}

    #variablesTable td {
        word-wrap: break-word;
        overflow-wrap: break-word;
        vertical-align: middle;
        padding: 4px;
    }

#variablesTable-wrapper {
    overflow-x: auto;
    max-width: 100%;
}

#variablesTable td:first-child {
    width: 50%;
}

#variablesTable td:last-child {
    width: 50%;
}
.profile5 {
    display: none; /* Ensures it's hidden by default */
}

#fullscreen {
    margin-top: 5px;
}
.modal-dialog.custom-wide {
    max-width: 35vw;
}

#gpPositioningTable {
    background-color: #fff;
    border-collapse: collapse;
    width: 100%;
}
#gpPositioningTable-wrapper {
    background-color: #fff;
    padding: 3px;
}
    #gpPositioningTable th,
    #gpPositioningTable td {
        width: 80px;
        max-width: 80px;
        min-width: 80px;
        text-align: center;
        vertical-align: middle;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-bottom: 1px solid #000; /* cienka czarna linia pod wierszem */
    }

        /* pierwsza kolumna – nazwa punktu */
        #gpPositioningTable th:first-child,
        #gpPositioningTable td:first-child {
            width: 180px;
            max-width: 180px;
            min-width: 180px;
            text-align: left;
            border-left: none;
        }

        /* lewa linia dla kolumn X, Y, Z */
        #gpPositioningTable th:not(:first-child),
        #gpPositioningTable td:not(:first-child) {
            border-left: 1px solid #000;
        }

    /* delikatne podświetlenie przy hover */
    #gpPositioningTable tbody tr:hover {
        background-color: #f6f6f6;
    }

.svg-geoPoint.highlight-ring ellipse.geo-ellipse {
    stroke: orange !important;
    stroke-width: 8px !important;  
    filter: drop-shadow(0 0 8px orange) !important;
    transition: all 0.15s ease-in-out !important;
}

.context-menu-cps {
    position: absolute;
    display: none;
    z-index: 2000;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-width: 180px;
    padding: 4px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    font-family: inherit;
}

    .context-menu-cps ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .context-menu-cps li {
        padding: 8px 14px;
        cursor: pointer;
        user-select: none;
        transition: background 0.15s;
        display: block;
        color: #333;
        font-size: 14px;
    }

        .context-menu-cps li a {
            color: inherit;
            text-decoration: none;
            width: 100%;
            display: block;
        }

        .context-menu-cps li:hover {
            background: #007bff;
            color: #fff;
        }

    .context-menu-cps .separator {
        border-top: 1px solid #e0e0e0;
        margin: 4px 0;
    }

    .context-menu-cps .disabled {
        color: #aaa;
        pointer-events: none;
        background: none;
    }

/*Podświetlanie ścieżek i punktów przy dodawaniu profili*/
path.highlight {
    stroke: red;
    stroke-width: 5;
}

.pick-candidate {
    stroke: orange !important;
    stroke-width: 5 !important;
    cursor: pointer;
}

.highlight-gp {
    stroke: red !important;
    stroke-width: 3 !important;
}

.pick-candidate-start {
    stroke: orange !important;
    stroke-width: 4 !important;
}
/* select2 dla profili */
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #ced4da;
    border-radius: 5px;
}
.select2-container--bootstrap-5 .select2-selection:hover {
    border-color: #bfc5ca;
}
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.15rem rgba(13,110,253,.25);
}

.visibility-col-group {
    display: flex;
    flex-wrap: wrap;
    gap: 2px; 
    margin-bottom: 3px;
    padding-bottom: 0;
}

    .visibility-col-group > .btn:nth-child(n+10) {
        margin-bottom: 3px;
    }

    .visibility-col-group .btn {
        display: flex;
        align-items: center;
        height: 30px;
        padding: 0 10px;
        white-space: nowrap;
        font-size: 0.85rem;
    }

.viewbox-link {
    cursor: pointer;
    color: #337ab7;
    margin-left: 6px;
    text-decoration: none;
}

    .viewbox-link:hover {
        color: #23527c;
        text-decoration: none;
    }

.profile-dropdown-text {
    color: #000;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

    .profile-dropdown-text:hover {
        text-decoration: none;
        color: #000;
    }

.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-left: .1rem;
        display: none;
    }

    .dropdown-submenu.show > .dropdown-menu {
        display: block;
    }

    .dropdown-submenu.open-left > .dropdown-menu {
        left: auto;
        right: 100%;
        margin-right: .1rem;
    }

tr.multi-gp {
    background-color: rgba(255, 165, 0, 0.15);
}

.gp-count {
    color: #c97a00;
    font-size: 0.85em;
    margin-left: 4px;
}

.snap-highlight {
    stroke: red !important;
    stroke-width: 3 !important;
    fill: red !important;
}

.audit-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* kolory */
.audit-create {
    background-color: #d1fae5; /* zielony jasny */
    color: #065f46; /* zielony ciemny */
}

.audit-edit {
    background-color: #e0f2fe; /* niebieski jasny */
    color: #075985;
}

.audit-delete {
    background-color: #fee2e2; /* czerwony jasny */
    color: #7f1d1d;
}

/* fallback */
.audit-other {
    background-color: #e5e7eb;
    color: #374151;
}

.audit-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    margin-bottom: 16px;
}

.audit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.audit-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-create {
    background: #d1fae5;
    color: #065f46;
}

.badge-edit {
    background: #e0f2fe;
    color: #075985;
}

.badge-delete {
    background: #fee2e2;
    color: #7f1d1d;
}

.badge-other {
    background: #e5e7eb;
    color: #374151;
}

.kv-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px 16px;
    align-items: start;
}

.kv-key {
    color: #6b7280;
    font-weight: 600;
}

.kv-val {
    word-break: break-word;
}

.json-block {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #0b1220;
    color: #e5e7eb;
    padding: 12px;
    overflow: auto;
    max-height: 420px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    line-height: 1.35;
    white-space: pre;
}

.json-empty {
    background: #f9fafb;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    padding: 12px;
    font-size: 0.9rem;
}

.three-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 1200px) {
    .three-cols {
        grid-template-columns: 1fr;
    }

    .kv-grid {
        grid-template-columns: 140px 1fr;
    }
}

#svg :is(a.svg-element:hover, .js-selected)
:is(path,line,circle,rect,ellipse,polygon,polyline) {
    stroke: deeppink;
    stroke-opacity: 1;
}

#svg :is(a.svg-element:hover, .js-selected)
:is(path,circle,rect,ellipse,polygon)
:not([fill="none"])
:not([fill="transparent"])
:not([fill="white"])
:not([fill="#fff"])
:not([fill="#ffffff"])
:not([fill="#FFF"])
:not([fill="#FFFFFF"])
:not([fill="rgb(255,255,255)"])
:not([fill="rgb(255, 255, 255)"]) {
    fill: deeppink;
    fill-opacity: 1;
}

#svg :is(a.svg-element:hover, .js-selected)
:is(path,circle,rect,ellipse,polygon)
:is( [fill="none"], [fill="transparent"], [fill="white"], [fill="#fff"], [fill="#ffffff"], [fill="#FFF"], [fill="#FFFFFF"], [fill="rgb(255,255,255)"], [fill="rgb(255, 255, 255)"] ) {
    fill: inherit !important;
}


/* Podświetlanie wszystkich elementów z tym samym netElementId */
.hover [data-netelementid]:hover {
    stroke: blue;
    stroke-opacity: 1;
    fill-opacity: 1;
}

#svg .js-selected :is(path,line,circle,rect,ellipse,polygon,polyline) {
    stroke-width: calc(var(--orig-stroke,1) + 1);
}

.CPS-search-wrapper {
    position: relative;
}

#CPS-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 14px;
    display: none;
    user-select: none;
}

.hiddenScreen {
    display: none !important;
}

.infra-menu-bar .dropdown.d-inline-flex {
    margin-right: 5px;
}

.infra-menu-bar .profile-dropdown-text.dropdown-toggle::after {
    margin-left: 3px;
}

.infra-menu-bar .profile-dropdown-text {
    cursor: pointer;
    user-select: none;
}

#selectedRouteElementsTable tr {
    cursor: grab;
}

    #selectedRouteElementsTable tr:active {
        cursor: grabbing;
    }

.routeSidebarBtn {
    padding-left: 0px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

#collapseRouteEditDetails {
    padding-left: 13px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

#addNextRouteElements {
    padding-top: 3px;
}

.highlight-ne path {
    stroke: red !important;
    stroke-width: 4;
}

#psModalBody table {
    width: 100% !important;
    table-layout: auto;
}

#psModalBody th,
#psModalBody td {
    white-space: nowrap;
}

.calendar-day:hover {
    background-color: #0d6efd !important;
    color: white;
}

.row-never {
    background-color: #fff3cd;
}

.row-overdue {
    background-color: #f8d7da;
}

    .row-overdue:hover {
        background-color: #f5c2c7;
    }

.track-params-wrapper {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.header-row-sim {
    background-color: #f5f5f5;
    font-weight: bold;
}

.table-sim td,
.table-sim th {
    padding: 6px 8px;
    vertical-align: middle;
}

.table-sim {
    border-collapse: collapse;
    width: 100%;
}

    .table-sim th {
        border-bottom: 2px solid #ccc;
    }

    .table-sim td {
        border-bottom: 1px solid #e0e0e0;
    }

    .table-sim tr:hover {
        background-color: #fafafa;
    }

.train-preview {
    opacity: 0.8;
    pointer-events: none;
}

.train-ghost {
    opacity: 0.4;
    pointer-events: none;
}

.sidingtracks {
    border-collapse: collapse;
}

    .sidingtracks th,
    .sidingtracks td {
        border: 1px solid black;
        padding: 8px;
    }

    .sidingtracks thead th {
        text-align: center;
        vertical-align: middle;
    }

    .sidingtracks .vertical {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        white-space: nowrap;
    }

    .sidingtracks tbody td {
        text-align: center;
        vertical-align: middle;
    }