:root{
    color-scheme: light;
    --bg: hsl(210 40% 96.1%);
    --bg2: #ffffff;
    --bg3: oklch(98.4% 0.003 247.858);
    --bg4: rgb(241, 245, 249);
    --bg5: oklch(81.9% 0.041 260.031);

    --bg-transparent: #ffffffbf;
    --bg-translucid: rgb(255 255 255 / 90%);


    --text: oklch(37.2% 0.044 257.287);
    --text2: oklch(27.9% 0.041 260.031);
    --border: hsl(220 13% 91%);
    --border2: oklch(81% 0.117 11.638);
    --text-red: oklch(0.577 0.245 27.325001);
    
    --color-online: #1F8A3A;
    --color-idle: #B46A00;
    --color-parked: #4A5568;
    --color-offline: #C53030;

    /* status colors (light) */
    --kpi-neutral: #64748b;    /* slate-500 */
    --kpi-green-1: #16a34a;    /* green-600 (nicht zu hell) */
    --kpi-green-2: #15803d;    /* green-700 */
    --kpi-green-3: #166534;    /* green-800 (hoch) */
    --kpi-amber:   #b45309;    /* amber-700 (peak) */

    --kpi-ok:#15803d;
    --kpi-warn:#b45309;
    --kpi-idle:#64748b; /* oder etwas heller/dunkler nach Wunsch */

}
:root[data-theme="dark"]{
    color-scheme: dark;
    --bg: hsl(210 30% 8.1%);
    --bg2: hsl(210 30% 12.1%);
    --bg3: oklch(15.4% 0.003 247.858);
    --bg4: rgb(20, 24, 28);
    --bg5: oklch(27.9% 0.041 260.031);

    --bg-transparent: #14181cbf;
    --bg-translucid: rgb(20 24 28 / 90%);

    --text: oklch(91.6% 0.044 257.287);
    --text2: oklch(81.9% 0.041 260.031);
    --border: hsl(220 13% 18%);
    --border2: oklch(19% 0.117 11.638);
    --text-red: oklch(83.577 0.245 27.325001);

    /* status colors (dark) - etwas leuchtender */
    --kpi-neutral: #94a3b8;    /* slate-400 */
    --kpi-green-1: #86efac;    /* green-300 */
    --kpi-green-2: #22c55e;    /* green-500 */
    --kpi-green-3: #16a34a;    /* green-600 */
    --kpi-amber:   #f59e0b;    /* amber-500 */

    --kpi-ok:#22c55e;
    --kpi-warn:#f59e0b;
    --kpi-idle:#94a3b8;
}



*{
    box-sizing: border-box;
    transition: background-color 200ms, border-color 200ms;
}
*::selection {
  background: rgb(148, 163, 184);
}
*::-moz-selection {
  background: rgb(148, 163, 184);
}
*::-webkit-selection {
  background: rgb(148, 163, 184);
}
html{
    background-color: var(--bg);
}
html, body{
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body{

}
body.is-loading{
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

.bigWrap{
    display: flex;
}
aside{
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background-color: var(--bg2);
   /* width: 350px;*/
    min-height: 100vh;
}
aside .top{
    min-height: 77px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    height: fit-content;
    border-bottom: 1px solid var(--border);
}
aside nav{
    display: flex;
    padding: 12px 8px;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 0;
}
aside nav div{
    padding: 8px 12px;
    border-radius: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    gap:6px;
    cursor: pointer;
}
aside nav div > *{
    pointer-events: none;
}
aside nav div.active, aside nav div:hover{
    background-color: var(--bg3);
}
aside nav svg{
    width: 16px;
    height: 16px;
}
aside .bottom{
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    font-size: 12px;
    line-height: 16px;
    padding: 16px;
}
aside .bottom svg{
    width: 16px;
    height: 16px;
}
aside .bottom .status{
    display: flex;
    gap: 4px;
    align-items:center;
}
aside .bottom .status-message{
    margin: 4px 0 0 0;
}


.btn{
    border-radius: 6px;
    border: none;
    background-color: var(--bg2);
    display: flex;
    align-items: center;
    padding: 8px 16px;
    height: 34px;
    cursor: pointer;
    gap: 6px;
    user-select: none;
    justify-content: center;
}
.btn:hover{
    background-color: var(--bg3)
}
.btn svg{
    width: 16px;
    height: 16px;
}
.btn-black{
    background-color: #000000;
    color: #fff;
}
.btn-black:hover{
    background-color: #000000ad;
}
.btn-border{
    border: 1px solid var(--border);
    /*box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px -1px;
    */
}
.btn-red{
    border: 1px solid var(--text-red);
    color: var(--text-red);
}
.btn-logout{
    color: var(--text-red);
}
.btn-invisible{
    background: transparent;
}
.btn-invisible:hover{
    background-color: var(--bg3);
}
.btn-style2{
    padding: 12px 16px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 12px;
}

.nowrap{
    white-space: nowrap;
}

input.transparent{
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    height: 30px;
    width: 100%;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 15px;
    border: 1px solid var(--border);
}

.user-profile-card{
    display: none;
    position: fixed;
    z-index: 100000;
    top: 0;
    left: 0;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.1) 0px 2px 4px -2px;
    background-color: var(--bg2);
    padding: 4px;
    width: 200px;

}
.separator{
    height: 1px;
    width: 100%;
    background-color: var(--bg4);
}
.user-profile-card .btn{
    padding: 8px;
    justify-content: left;
}
.user-profile-card .user-data{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px 8px;
    font-size: 14px;
    font-weight: 600;
    height: 44px;
}
.user-profile-card .user-data span.email{
    font-size: 12px;
    font-weight: 600;
    opacity: .7;
}




main{
    width: 100%;
}
aside .logo{
    display: flex;
}
aside .logo img{
    max-height: 36px;
}
aside .logo svg{
    max-height: 36px;
    width: auto;
    overflow: visible;
}
/*
aside .logo{
    width: 32px;
    height: 32px;
    background-color: eviolet;
}
aside .logo-text{
    height: 24px;
    line-height: 24px;
    font-weight: 600;
    font-size: 24px;
}*/


.mobileNav{
    height: calc(100vh - 64px);
    position: fixed;
    top: 64px;
    width: 100vw;
    z-index: 1000;
    background-color: var(--bg2);
    display: none;

    padding: 12px 8px;
    flex-direction: column;
    gap: 6px;
}
.mobileNav.active{
    display: flex !important;
}
.mobileNav div:not(.bottom){
    padding: 8px 12px;
    border-radius: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    gap:6px;
    cursor: pointer;
}
.mobileNav div:not(.bottom) > *{
    pointer-events: none;
}
.mobileNav div.active, aside nav div:hover{
    background-color: var(--bg3);
}
.mobileNav .bottom{
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: space-evenly;
}
.mobileNav .bottom .btn{
    width: min-content;
}
.mobileNav svg{
    width: 16px;
    height: 16px;
}



header{
    position: sticky;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg2);
    padding: 0 24px;
    width: 100%;
    height: 64px;
    top: 0;
    z-index: 10000;
}
header .left, header .right{
    display: flex;
    align-items: center;
    gap: 12px;
}
header .burgermenu{
    display: none;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 40px;
    height: 40px;
}
header .burgermenu span{
    display: block;
    background-color: #5c5555;
    width: 35px;
    height: 4px;
    user-select: none;
}


.search{
    display: flex;
    align-items: center;
    gap: 2px;
    width: 228px;
    
}
.search svg{
    position: absolute;
    margin: 0 0 0 8px;
}
.search input{
    background-color: var(--bg2);
    border: none;
    outline: none;
    color: var(--text);
    height: 30px;
    width: 100%;
    padding: 4px 12px 4px 30px;
    border-radius: 6px;
    font-size: 15px;
    border: 1px solid var(--border);
}
.search input:focus{
    box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgb(255, 255, 255) 0px 0px 0px 2px, rgb(148, 163, 184) 0px 0px 0px 4px, rgba(0, 0, 0, 0) 0px 0px 0px 0px;
}
.main .top .search input{
    height: 34px;
    width: 268px;
}

.main{
    padding: 24px;
    display: none;
    min-height: calc(100vh - 64px);
    flex-direction: column;
    gap: 24px;
}
section{
    /*margin: 0 0 24px 0;*/
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
}



section.box-s{

}
section.box-l{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

}
section.box-l .box{

}
section.box-l .box h4, section.box-l .box h5{
    margin: 0;
}


section.box-map-l{
    display: grid;
    grid-template-columns: 2fr minmax(280px, 1fr);
    align-items: stretch;
    padding: 0;

}

section .box{
    padding: 20px;
    border-radius: 16px;
    background-color: var(--bg2);
    border: 1px solid var(--border);
}
section .box-wrapper{
    display: flex;
    flex-direction: row;
    gap: .5rem;
}
section .box-wrapper .box{
    flex: 1;
}

section .box .head{
    display: flex;
    /* height: 16px; */
    justify-content: space-between;
    white-space: nowrap;
    gap: 8px;
    font-size: 16px;
    line-height: 16px;
}
section .box .heading{
    color: var(--text2);
    text-transform: uppercase;
    font-size: 12px;
    line-height: 16px;
}
section .box svg{
    height: 16px;
    width: 16px;
}

section .box .body{
    font-size: 24px;
    /*height: 32px;*/
    line-height: 32px;
    font-weight: 600;
    margin: 8px 0 0 0;
}

section .box-map-l{
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}
section .box-map-l .head{
    height: auto;
    padding: 6px 12px 6px 12px;
}
section .box-map-l .left{
    display: flex;
    gap: 8px;
    align-items: center;
}
section .box-map-l .heading{
    font-size: 14px;
    line-height: 14px;
    height: 14px;
    font-weight: 600;
}
section .box-map-l .icon{
    height: 14px;
    width: 14px;
}
section .box-map-l svg{
    height: 14px;
    width: 14px;
}
section .box-map-l .body{
    height: auto;
    margin: 0;
    /* padding: 0 12px 12px 12px; */
    flex: 1;
    min-height: 0;
    position: relative;
    margin: 0 12px 12px 12px;
}
section .box-map-l .map{
    background-image: linear-gradient(rgba(2, 6, 23, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(2, 6, 23, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    min-height: 350px;
   /* aspect-ratio: 2/1;*/
   /* height: 50vh;*/
   position: relative;
    overflow: hidden;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height:100%;
    /* margin: 0 12px 12px 12px;*/
}


section .box.ops-stack{
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;

    height: auto;        /* Höhe durch Inhalt */
    max-height: 600px;   /* optional: damit sie nicht endlos wächst */
    overflow-y: auto;
    padding: 12px;
}
section.ops-card{
    gap: .5rem;
}
.ops-stack .ops-eyebrow{
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}
.ops-stack .ops-title{
    margin: 10px 0 0 0;
    font-size: 14px;
    font-weight: 400;
}
.ops-stack .ops-badge{
    margin: 4px 0;
    
}
.ops-stack .alert-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex: 1;          /* nimmt verfügbaren Platz im ops-stack flex-container */
    min-height: 0;    /* wichtig: damit flex-child überhaupt scrollt */
}

.alert-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg2);
    border-left: 3px solid var(--red, #ef4444);
    flex-shrink: 0;
}

.alert-item__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.alert-item__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--kpi-warn);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.alert-pill.alert-pill__critical{
    background: rgba(239, 68, 68, 0.15);
    color: var(--red, #ef4444);
}

.alert-time {
    font-size: 12px;
    color: var(--text2);
}

.alert-item strong {
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
}

.alert-text {
    font-size: 13px;
    color: var(--text2);
    margin: 0;
    line-height: 1.4;
}

.alert-text--codes {
    font-size: 12px;
    font-family: monospace;
    color: var(--text3, var(--text2));
    opacity: 0.8;
}

.ops-action {
    align-self: flex-start;
    margin-top: 2px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 150ms;
}
.ops-action:hover {
    background: var(--bg3, var(--bg2));
}





section .rounded-xl{
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    background-color: var(--bg3);
    margin: 0 0 12px 0;
    display: flex;
    justify-content: space-between;
}
section .rounded-xl .left-wrapper{
    display: flex;
    flex-direction: column;
}
section .rounded-xl .left-wrapper .heading{
    font-size: 14px;
    height: 20px;
    line-height: 20px;
    font-weight: 500;
    text-transform: none;
}
section .rounded-xl .left-wrapper .subheading{

    font-size: 12px;
    line-height: 16px;

}
section .rounded-xl .right-wrapper{
    display: flex;
    align-items: center;
}
section .rounded-xl .right-wrapper .badge{
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    border: 1px solid var(--border);
    background-color: var(--bg4);
    padding: 2px 10px;
    border-radius: 10px;
}

section .rounded-xl2{
    flex-direction: row !important;
    align-items: center !important;
    margin: 0 !important;
}

section.box-c1{

    flex-direction: column;
    gap: .5rem;

}
section.box-c1 .box{
    border-radius: 12px;
}
section.box-c1 .top-nav-bar{
    flex-direction: row;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: wrap;
}
section.box-c1 .top-nav-bar .left{
    display: flex;
    align-items: center;
    gap: 12px;
}
section.box-c1 .top-nav-bar .right{
    display: flex;
    gap: 8px;
}
section.box-c1 .big-head{
    width: 100%;
    padding: 12px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    justify-content: space-between;
}   
section.box-c1 .big-head .left, section.box-c1 .big-head .right{
    display: flex;
}
section.box-c1 .big-head .left{
    flex-direction: column;
    gap: 4px;
}
section.box-c1 .big-head .right{
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}
section.box-c1 .big-head .right .card{
    display: flex;
    flex-direction: row;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 6px 8px;
    cursor: pointer;
    gap: 6px;
}
section.box-c1 .big-head .right .card:has(.card2){
    padding: 4px 8px 4px 4px;
}
section.box-c1 .big-head .right .card svg{
    width: 14px;
    height: 14px;
}
section.box-c1 .big-head .right .card2{
    display: flex;
    flex-direction: row;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 4px;
    background-color: var(--bg4);
    cursor: pointer;
}
section.box-c1 .big-head .right .card2 svg{
    width: 16px;
    height: 16px;
}


section.box-c1 .top-nav-bar .left .badge{
    display: flex;
    align-items: center;
    background-color: rgb(61 122 61 / 26%);
    border: 1px solid #2f6b2f;
    border-radius: 12px;
    color: #009500;
    font-size: 12px;
    font-weight: 600;
    line-height: 12px;
    padding: 4px 12px;
    width: fit-content;
}
section.box-c1 .big-head .left .heading{
    font-size: 12px;
    font-weight: 400;
}
section.box-c1 .big-head .left .big-heading{
    font-size: 26px;
    font-weight: 600;
}
section.box-c1 .big-head .left .subheading{
    font-size: 13px;
    font-weight: 400;
    color: var(--text2);
}
section.box-c1 .big-head .left .subheading .highlight{
    color: var(--text)
}





section.box-c1 .big-head .right div{
    display: flex;
    align-items: center;
    gap: 4px;
}
section.box-c1 .big-content{
    display: grid;
    grid-template-columns: 1fr min-content;
    gap: .5rem;
}
section.box-c1 .big-content .right{
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
section.box-c1 .big-content .left{
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: 
        "map"
        "mapc"
        "data1"
        "data2"
        "data3"
        "data4"
        "data5"
        ".";
    gap: .5rem;
    grid-auto-rows: auto;
    grid-auto-flow: row dense;
}
section.box-c1 .big-content .box{
    padding: 12px;
}
section.box-c1 .big-content .box.colnum{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    font-size: 14px;
}
section.box-c1 .big-content .box.colnum .btn{
    padding: 4px 8px;
    height: 30px;
}

.activity-col ol{
    border-left: 1px solid var(--text2);
    margin: 6px 0 0 12px;
    font-size: 14px;
    line-height: 14px;
    font-weight: 400;
}
.activity-col ol li{
    list-style: none;
    margin-bottom: 12px;
}
.activity-col .circle{
    border-radius: 100%;
    background-color: var(--bg);
    border: 1px solid var(--text2);
    width: 12px;
    height: 12px;
    position: absolute;
    margin: 0px 0 0 -46.5px;
}
.activity-col .subheading2{
    color: var(--text2);
    font-size: 13px;
}


section.box-c1 .big-content .box .left, section.box-c1 .big-content .box .right{
    display: flex;
    flex-direction: row;
    width: fit-content;
}
section.box-c1 .big-content .box .heading{
    margin-bottom: 4px;
}
section.box-c1 .big-content .box .inline-1{
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}
section.box-c1 .big-content .box .inline-1 .head{
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
}
section.box-c1 .big-content .box .inline-1 span{
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    color: var(--text2);
}
section.box-c1 .big-content .box .subheading{
    margin-top: 4px;
    font-size: 12px;
    line-height: 16px;
}



section.box-c1 .map{
    background-image: linear-gradient(rgba(2, 6, 23, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(2, 6, 23, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 40vh;
}
section.box-c1 .dataCards{
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
    "one one"
    "two three"
    "four four";
    gap: 8px;
}
section.box-c1 .card{
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 8px;
    cursor: pointer;
}
section.box-c1 .card:hover{
    background-color: var(--bg3);
}
section.box-c1 .card.card-wide{
    grid-area: one;
    color: red;
    font-weight: 600;
    display: none;
}
section.box-c1 .card.card-wide.card-wide2{
    grid-area: four;
    font-weight: inherit;
    color: inherit;

}
section.box-c1 .big-content .heading{
    text-transform: none;
    font-size: 12px;
    line-height: 16px;
    color: var(--text2)
}
section.box-c1 .card a{
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 12px;
    width: fit-content;
    text-decoration: none;
    margin-top: 4px;
}
section.box-c1 .card a:hover{
    background-color: var(--bg2);
}
section.box-c1 .card a svg{
    width: 12px;
    height: 12px;
    
}

section.box-c1 .big-content .body{
    margin-top: 4px;
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
}
section.box-c1 .big-content span.small{
    margin-top: 4px;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}
section.box-c1 .big-content span.small svg{
    width: 16px;
    height: 16px;
}
section.box-c1 .big-content .head{
    justify-content: normal;
}
section.box-c1 .card2{
    display: flex;
    flex-direction: row;
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 8px;
}
section.box-c1 .btn-wrapper{
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
    line-height: 14px;
}
section.box-c1 .btn-wrapper .btn{
    white-space: nowrap;
    padding: 8px;
}


.flex-column{
    display: flex;
    flex-direction: column;
}
.flex-row{
    display: flex;
    flex-direction: row;
}

.gap-6{
    gap: 6px !important;
}
.padding-12{
    padding: 12px !important;
}



section.box-c2{
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
section.box-c2 .box{
    border-radius: 12px;
}
section.box-c2 .box.menu{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
section.box-c2 .box.menu .btn{
    justify-content: flex-start;
    width: 100%;
    padding: 8px;
}
section.box-c2 .box.menu .btn.active{
    background-color: var(--bg3);
}
section.box-c2 .top-nav-bar{
    flex-direction: row;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: wrap;
}
section.box-c2 .top-nav-bar .left{
    display: flex;
    align-items: center;
    gap: 12px;
}
section.box-c2 .top-nav-bar .right{
    display: flex;
    gap: 8px;
}
section.box-c2 .top-nav-bar .left .badge{
    display: flex;
    align-items: center;
    background-color: rgb(61 122 61 / 26%);
    border: 1px solid #00c400;
    border-radius: 12px;
    color: #009500;
    font-size: 12px;
    font-weight: 600;
    line-height: 12px;
    padding: 4px 12px;
    width: fit-content;
}
section.box-c2 .big-content{
    display: grid;
    grid-template-columns: min-content 1fr;
    gap: .5rem;
}
section.box-c2 .big-content .left, section.box-c2 .big-content .right{
    display: flex;
    flex-direction: column;
}
section.box-c2 .big-content .box{
    padding: 12px;
}

section.box-c2 .tab-content-inner{
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
section.box-c2 .tab-content-inner .box{
    padding: 16px;

}
section.box-c2 .tab-content-inner .box .head{
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
section.box-c2 .tab-content-inner .box .head .heading{
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}
section.box-c2 .tab-content-inner .box .head .subheading{
    font-size: 12px;
    line-height: 16px;
    color: var(--text2);
}
section.box-c2 .tab-content-inner .box .bottom{
    display: flex;
    width: 100%;
    /*justify-content: flex-end;*/
    margin-top: 12px;
}
section.box-c2 .tab-content-inner .box .bottom .subheading{
    font-size: 12px;
    line-height: 16px;
    color: var(--text2);
}
section.box-c2 .tab-content-inner .box .center{

}
section.box-c2 .tab-content-inner .box .center .grid-2{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
section.box-c2 .tab-content-inner .box .center .inline{
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

section.box-c2 .tab-content-inner .box .center .email-item{
    display: flex;
    align-items: center;
    gap: 16px;
}
section.box-c2 .tab-content-inner .box .center .email-item div{
    display: flex;
    align-items: center;
    gap: 4px;
}

section.box-c2 .tab-content-inner .grid-2-1{
    display: grid;
    grid-template-columns: min-content 1fr;
    gap: 8px;
}

section.box-c2 .tab-content-inner .role-item{
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    justify-content: space-between;


    white-space: nowrap;
}
section.box-c2 .tab-content-inner .role-item.active{
    background-color: var(--bg4);
}
section.box-c2 .tab-content-inner .role-item .name{
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}
section.box-c2 .tab-content-inner .role-item .desc{
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    color: var(--text2);
}
section.box-c2 .tab-content-inner .role-item .badge{
    white-space: nowrap;
    font-size: 12px;
    font-weight: 400;
    background-color: var(--bg3);
    padding: 4px 8px;
    border-radius: 99px;
    line-height: 12px;
}
section.box-c2 .tab-content-inner .box.box-style1:has(.nodata-text.visible){
    border: 1px dashed var(--border);
    background: transparent;
}
section.box-c2 .tab-content-inner .box.box-style1:not(:has(.nodata-text.visible)){
    background: transparent;
    border: none;
    padding: 0;
    
}
section.box-c2 .tab-content-inner .nodata-text{
    display: flex;
    align-items: center;
    justify-content: center;
}
section.box-c2 .tab-content-inner .box.box-style1 .box{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    background: transparent;
    padding: 8px;
}
section.box-c2 .tab-content-inner .box.box-style1 .box .left{
    display: flex;
    flex-direction: column;

}
section.box-c2 .tab-content-inner .box.box-style1 .box .right{
    display: flex;
    flex-direction: row;
}






section.box-m2{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

section.box-m2 .box{
    max-height: 250px;
}



section.box-m{
    display: grid;
    /*grid-template-columns: repeat(3, minmax(0, 1fr));*/
    /*grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);*/
    grid-template-columns: auto 1fr 2fr;
    row-gap: .5rem;
    column-gap: 1rem;

}
section.box-m .top-nav-bar{
    display: flex;
    align-items: center;
    gap: 12px;
    grid-column-end: span 3;
    grid-column-start: span 3;
}
section.box-m .btn{
    border: 1px solid var(--border);
    box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px -1px;
    font-size: 14px;
    font-weight: 500;
    padding: 2px 16px;
    white-space: nowrap;
}
section.box-m .top .btn{
    height: 26px;
   width: fit-content;

}
section.box-m .top-nav-bar nav{
    display: flex;
    align-items: center;
}
section.box-m .heading{
    text-transform: none;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    height: 20px;
}
section.box-m .subheading{
    font-size: 12px;
    line-height: 16px;
}
section.box-m .search{
    width: 100%;
    margin: 12px 0 0 0;
}
section.box-m .search input{
    height: 40px;
}
section.box-m .stops, section.box-m .routes{
    margin: 16px 0 0 0;
}
section.box-m .top .heading{
    text-transform: uppercase;
    font-size: 12px;
    line-height: 16px;
    height: 16px;
    color: var(--text2);
}
section.box-m .top .btn{
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 2px 10px;
}
section.box-m .top .btn:hover{
    background-color: var(--bg4);
}
section.box-m .top{
    justify-content: space-between;
    margin: 0;
}
section.box-m .rounded-xl{
    margin: 6px 0 0 0;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
}
section.box-m .rounded-xl:hover{
    background-color: var(--bg4);
}
section.box-m .rounded-xl.active{
    /*background-color: oklch(0.962 0.018 272.313995);
    border-color: oklch(0.785 0.115 274.713013);*/

    background-color: var(--bg4);
    border-color: var(--border2);
}
section.box-m .rounded-xl .main-wrapper{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;

}
section.box-m .rounded-xl .heading{
    font-size: 16px;
    height: 24px;
    line-height: 24px;
}
section.box-m .rounded-xl .badge{
    padding: 2px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: oklch(0.98 0 0 / 0.5);
    font-size: 12px;
    height: 22px;
    line-height: 16px;
    font-weight: 600;
    white-space: nowrap;
}
section.box-m .rounded-xl .subheading{
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
}
section.box-m .head{
    height: auto;
}
section.box-m .heading-wrapper{
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}
section.box-m .btn-wrapper{
    display: flex;
    gap: 8px;
}

section.box-m .separator{
    margin: 16px 0;
}
section.box-m .section{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
section.box-m .section label{
    font-size: 14px;
    line-height: 14px;
    font-weight: 500;
}
section.box-m .section .input-wrapper{
}
section.box-m .section .input-wrapper-big{

}
section.box-m .section .double-input-wrap{
    display: flex;
}
section.box-m .button-wrapper{
    width: fit-content;
}
section.box-m .btn-wrapper-2{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}
section.box-m section{
    margin-top: 16px;
    gap: .5rem;
}
section.box-m section .table-container{
    max-height: 60vh;
    overflow-y: scroll;
}
section.box-m section .table-container thead{
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--border);
}
section.box-m section table tbody td{
    padding-top: 6px;
    padding-bottom: 6px;
}

section.box-m .body{
    display: flex;
    flex-direction: column;
    gap: 8px;
}




section.box-big-c1{
    display: grid;
    grid-template-areas: 
    "map legend"
    "time time";
    grid-template-columns: 3fr auto; /*1fr */
    grid-template-rows: 1fr auto;
    height: calc(100vh - 112px);
}
section.box-big-c1 .box{
    padding: 10px;
}
section.box-big-c1 .map{
    background-image: linear-gradient(rgba(2, 6, 23, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(2, 6, 23, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    height: 100%;
}
section.box-big-c1 .timeline{
    min-height: 150px;
}
section.box-big-c1 .box-bigc1-colnum{
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 1rem;
}



#routesVehiclesList1{
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
    overflow: scroll;
    overflow-y: scroll;
    overflow-x:hidden;
    max-height: 350px;
}

/* Basis-Reset für alle Items */
#routesVehiclesList1 div {
    border-radius: 6px;
    background-color: var(--bg4);
    padding: 6px 8px 6px 10px;
    cursor: pointer;
    font-size: 14px;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    transition: background-color 150ms, border-color 150ms, opacity 150ms;
}

#routesVehiclesList1 div.vehicle {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
#routesVehiclesList1 .vehicle-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#routesVehiclesList1 .vehicle-license {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
}
#routesVehiclesList1 .vehicle-badge {
    font-size: 11px;
    background: var(--bg5);
    border-radius: 99px;
    padding: 2px 8px;
    color: var(--text2);
    white-space: nowrap;
}
#routesVehiclesList1 .vehicle-sub {
    font-size: 12px;
    color: var(--text2);
    font-weight: 400;
}
/* Fahrzeug aktiv (mind. eine Route sichtbar) */
#routesVehiclesList1 div.vehicle.active {
    background-color: var(--bg3);
    border-left: 3px solid var(--border2);
}



#routesVehiclesList1 div.route {
    min-width: 0;        /* ← NEU: verhindert Overflow aus Flex */
}
#routesVehiclesList1 div.route span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
/* Route aktiv — nutzt die inline color des Elements */
#routesVehiclesList1 div.route.active {
    background: color-mix(in srgb, currentColor 13%, var(--bg4));
    border-left: 3px solid currentColor;
    font-weight: 500;
}

/* Route inaktiv / ausgeblendet */
#routesVehiclesList1 div.route:not(.active) {
    opacity: 0.4;
}
#routesVehiclesList1 div.route {
    margin-left: 12px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0px;
    padding: 5px 8px;
}

#routesVehiclesList1 .route-main {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

#routesVehiclesList1 .route-num {
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

#routesVehiclesList1 .route-info {
    display: flex;
    gap: 6px;
    flex: 1;
    min-width: 0;
    font-size: 13px;
}

#routesVehiclesList1 .route-dur {
    opacity: 0.7;
}

/* Detail immer sichtbar, aber klein und gedämpft */
#routesVehiclesList1 .route-detail {
    font-size: 11px;
    opacity: 0.55;
    color: var(--text2);
    padding-left: 2px;
    margin-top: 1px;
    transition: opacity 150ms;
}

/* Beim Hover aufhellen */
#routesVehiclesList1 div.route:hover .route-detail {
    opacity: 1;
}




/* Fahrzeug inaktiv */
#routesVehiclesList1 div.vehicle:not(.active) {
    opacity: 0.55;
}
#routesLatestBtn.active {
    background-color: var(--bg3);
    border-color: var(--border2);
    font-weight: 500;
}
.route-card-layout-btn.active {
    background-color: var(--bg3);
    border-color: var(--border2);
    font-weight: 600;
}



.box-big-c1 .legend{
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.box-big-c1 .legend .heading{
    font-size: 14px;
    line-height: 14px;
    margin-bottom: 4px;
    font-weight: 600;
}
.box-big-c1 .legend .row{
    display: flex;
    flex-direction: row;
    gap: 6px;
}
.box-big-c1 .legend span{
    font-size: 16px;
    line-height: 16px;
}
.box-big-c1 .legend span.route{
    background-color: oklch(0.765 0.177 163.223007);
    border-radius: 10px;
    width: 40px;
    height: 6px;
    margin: 5px 0;
}
.box-big-c1 .legend span.stop{
    background-color: #fbbf24;
    width: 16px;
    height: 16px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 14px;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.box-big-c1 .legend span.warning{
    background-color: oklch(0.712 0.194 13.428);
    width: 16px;
    height: 16px;
    border-radius: 20px;
}





section.box-big{
    display: grid;
    /*grid-template-columns: 1fr 2fr;*/
    grid-template-columns: minmax(260px, 25%) 1fr;
    height: 100%;

}
section.box-big .box{
    padding: 0;
}
section.box-big .head{
    padding: 12px 12px 2px 12px;
    gap: 8px;

}
section.box-big .head .heading{
    font-weight: 600;
    text-transform: none;
    font-size: 14px;
    line-height: 14px;
}
section.box-big .head .meta{
    font-size: 12px;
    line-height: 12px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
}
section.box-big .head .meta .badge{
    border:1px solid var(--border);
    border-radius: 999px;
    padding: 2px 8px;
}
section.box-big .chipbar{
    display: flex;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
}
section.box-big .chipbar .chip{
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg2);
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
section.box-big .chipbar .chip:not(.active):hover{
    background-color: var(--bg3);
}
section.box-big .chipbar .chip.active{
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}
section.box-big .legend{
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);;
    padding: 6px 12px;
    display: flex;
    flex-direction: row;
    gap: 6px 12px;
    font-size: 14px;
    flex-wrap: wrap;
}
section.box-big .legend span{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}
section.box-big .legend span .dot{
    background: green;
    border-radius: 50%;
    width: 8px;
    height: 8px;
}
section.box-big .list{
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
}
section.box-big .list .row{
    display: grid;
    grid-template-columns: 16px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px dotted var(--border);
}

section.box-big .list .row:hover{
    background-color: var(--bg3);
}
section.box-big .list .row .dot{
    border-radius: 50%;
    width: 9px;
    height: 9px;
    margin: 0 0 0 4px;
}
section.box-big .list .row .badge{
    background-color: rgba(0, 128, 0, 0.5);
    border:1px solid rgba(172, 255, 47, 0.5);
    font-size: 10px;
    line-height: 10px;
    border-radius: 8px;
    padding: 2px 4px;
}
section.box-big .veh-title{
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}
section.box-big .veh-sub{
    color: var(--muted);
    font-size: 12px;
}




section.box-big .map{
    background-image: linear-gradient(rgba(2, 6, 23, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(2, 6, 23, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;

    height: calc(100vh - 64px - 110px);
}

section.box-big .maphead{
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
section.box-big .maptitle{
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
}
section.box-big .layerbar{
    display: flex;
    flex-direction: row;
}

section.box-big .mapbox{
    padding: 12px;
    position: relative;
}
section.box-big .mapbox .pillbar{
    position: absolute;
    left: 24px;
    bottom: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    backdrop-filter: saturate(160%) blur(20px);
    background-color: var(--bg-transparent);
    padding: 1px 6px;
    font-size: 14px;
    gap: 4px;

}






.jobmap{
    background-image: linear-gradient(rgba(2, 6, 23, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(2, 6, 23, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    width: 100%;
    height: 100%;

    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    min-height: 300px;
}




.main .top{
    display: flex;
    align-items: center;
    margin:  0 0 16px 0;
    gap: 8px;
    flex-wrap: wrap;
}
.table-container{
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow-y: hidden;
    overflow-x: scroll;
}
table{
    font-size: 14px;
    line-height: 20px;
    width: 100%;

    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
}
table thead{
    background-color: var(--bg3);

}
table thead th{
    padding: 8px 16px;
    text-align: left;
}
table tbody{
    background-color: var(--bg2);
}

table tbody td{
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}
table tbody tr:hover{
    background-color: var(--bg3);
    cursor: pointer;
}
table tbody tr div{
    display: flex;
    align-items: center;
}

.wrapper-availability{
    display: flex;
    flex-direction: row;
    gap: 2px;
    width: fit-content;
    padding: 6px;
    border-radius: 8px;
}
.wrapper-availability .pill-availability{
    background-color: var(--bg4);
    width: 6px;
    height: 10px;
    border-radius: 4px;
    pointer-events:auto;
}
.wrapper-availability .pill-availability:last-child{
    transform: scale(1.15);
}
.wrapper-availability .pill-availability:hover{
    transform: scale(1.3);
}



section.routes{
    display: flex;
    flex-direction: column;
}
section.routes .top-nav-bar{
    display: flex;
    align-items: center;
    gap: 12px;
    grid-column-end: span 2;
    grid-column-start: span 2;
    justify-content: space-between;
}
section.routes .top-nav-bar .left, section.routes .top-nav-bar .right{
    display: flex;
    align-items: center;
    gap: 6px;
}
section.routes .top-nav-bar nav{
    font-weight: 600;
    font-size: 16px;
    line-height: 16px;
}
section.routes .bottom{
    display: grid;
    grid-template-columns: auto .8fr;
    gap: 16px;
}
section.routes .bottom .left{

}

section.routes .bottom .right{
    display: flex;
    flex-direction: column;
    /*gap: 16px;*/
}
section.routes .bottom .head .right{
    flex-direction: row;
    gap: 4px;
}
section.routes .bottom .head .bold-info{
    font-weight: bold;
}
section.routes .heading{
    font-size: 20px;
    line-height: 20px;
    font-weight: 600;
    height: auto;
    text-transform: none;
}
section.routes .head{
    margin: 0 0 10px 0;
}
section.routes .head .left{
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 20px;
    font-weight: 600;
    line-height: 20px;
}
section.routes .head .left svg{
    width: 20px;
    height: 20px;
}
section.routes .start-end-wrapper{
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 16px 0;
}
section.routes .checkbox-wrapper{
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 2px;
}
section.routes .textarea-wrapper{
    display: flex;
    flex-direction: column;
    margin: 0 0 16px 0;
    gap: 4px;
}
section.routes .textarea-wrapper .sublabel{
    font-size: 12px;
    line-height: 16px;
}
section.routes .block{
    display: flex;
    flex-direction: column;
    gap: 6px;
}
section.routes input, section.routes textarea{
    background: transparent;
}
section.routes input{
    height: 34px;
}
section.routes input[type="checkbox"]{
  -webkit-appearance: auto; /* Safari */
  appearance: auto;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 4px;        /* optional */
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  color-scheme: light;
}





section.routes textarea{
    border-radius: 6px;
    border: 1px solid var(--border);
    accent-color: var(--bg4);
    min-height: 80px;
    resize: vertical;
    outline: none;
    color: var(--text);
    font-size: 14px;
}
section.routes label{
    font-size: 14px;
    font-weight: 500;
    line-height: 14px;
}
section.routes .block .search{
    width: 100%;
}
section.routes .map-wrapper{
    height: 100%;
}
section.routes .table-wrapper{
    overflow-x: auto;
}
section.routes .routes-map{
    background-image: linear-gradient(rgba(2, 6, 23, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(2, 6, 23, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    min-height: 300px;
    height: 100%;
}





.vehicleInfoFullWrapper{
    display: contents;
}

/* Modal */
/* todo: use var(--..) instead of hard coded colors*/
.viModal {
  border: none;
  border-radius: 14px;
  padding: 0;
  max-width: 1100px;
  width: calc(100vw - 48px);
  min-height: 40vh;
  max-height: calc(100vh - 80px);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  overflow: hidden;
}
.viModal::backdrop {
  background: var(--bg-translucid);
}

.viModalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--bg3);
  background: var(--bg2);
}
.viModalHeader h2 {
  margin: 0;
  font: 600 17px/1.3 system-ui, sans-serif;
  color: var(--text);
}
.viClose {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.viClose:hover { background: var(--bg3); color: var(--text); }

.viModalBody {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 180px);
  width: 100%;
}
.animated-load{
    position: absolute;
    top: 0;
    left: 0%;
    width: 5%;
    background: #3F51B5;
    height: 5px;

    animation: load-line 2.4s linear infinite;
    will-change: transform;

}
@keyframes load-line {
    0% {
        transform: translateX(-100%);
        width: 30%;
    }
    50% {
        transform: translateX(50vw);
        width: 45%;
    }
    100% {
        transform: translateX(100vw);
        width: 30%;
    }
}

/* animate spin on seco button*/

  .spinner {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
  }

  @keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }

  .btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }


/* Content (Modal) */
.vi{
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
}

.vi .muted{ color: var(--kpi-neutral); }

.vi .row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.vi .subline{
  margin-top: 6px;
  color: var(--kpi-neutral);
  font-size: 13px;
}

.vi .grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.vi .col-12{ grid-column: span 12; }
.vi .col-6{ grid-column: span 6; }
.vi .col-4{ grid-column: span 4; }

@media (max-width: 820px){
  .vi .col-6, .vi .col-4{ grid-column: span 12; }
}

.vi .card{
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}

.vi .card.hero{
  background: linear-gradient(180deg, var(--bg2), var(--bg));
  border-color: var(--border);
}

.vi .card h2{
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text2);
}

.vi .card h3{
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text2);
}

.vi .cardHead{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.vi .cardHeadLeft{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
}

.vi .rightBadges{
  display:flex;
  gap:8px;
  flex-wrap: wrap;
  align-items: center;
}

.vi .summary{
  color: var(--text2);
  font-weight: 650;
  margin: 0;
}

.vi .bullets{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text);
}
.vi .bullets li{ margin: 4px 0; }

/* Badges */
.vi .badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg2);
  font-size: 12px;
  line-height: 1;
  color: var(--text2);
}

.vi .badge.tone-neutral{
  background: var(--bg3);
}

.vi .badge.tone-ok{
  border-color: color-mix(in srgb, var(--kpi-ok), white 70%);
  background: color-mix(in srgb, var(--kpi-ok), white 92%);
  color: var(--kpi-ok);
}

.vi .badge.tone-warn{
  border-color: color-mix(in srgb, var(--kpi-warn), white 70%);
  background: color-mix(in srgb, var(--kpi-warn), white 92%);
  color: var(--kpi-warn);
}

.vi .badge.tone-stop{
  border-color: color-mix(in srgb, var(--text-red), white 70%);
  background: color-mix(in srgb, var(--text-red), white 93%);
  color: var(--text-red);
}

/* Profile rows + 5-step segments */
.vi .profileRows{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.vi .profileRow{
  display:grid;
  grid-template-columns: 110px 1fr 140px;
  gap: 10px;
  align-items:center;
}

@media (max-width: 820px){
  .vi .profileRow{
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.vi .plabel{
  color: var(--kpi-neutral);
  font-size: 12px;
}

.vi .pvalue{
  text-align: right;
  font-weight: 800;
  color: var(--text2);
}

@media (max-width: 820px){
  .vi .pvalue{ text-align: left; }
}

.vi .segbar{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.vi .segbar i{
  height: 10px;
  border-radius: 999px;
  background: var(--bg4);
  border: 1px solid var(--border);
  display:block;
}

.vi .segbar i.on{
  background: linear-gradient(90deg, var(--kpi-neutral), var(--kpi-ok));
  border-color: color-mix(in srgb, var(--kpi-ok), white 70%);
}

/* Metrics chips */
.vi .metricsRow{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.vi .metricChip{
  border: 1px solid var(--border);
  background: var(--bg3);
  border-radius: 12px;
  padding: 8px 10px;
  min-width: 160px;
}

.vi .metricChip .mk{
  font-size: 11px;
  color: var(--kpi-neutral);
  margin-bottom: 2px;
}

.vi .metricChip .mv{
  font-weight: 850;
  color: var(--text2);
}

/* DTC details list */
.vi .dtcList{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.vi .dtcRow{
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: 12px;
  padding: 10px;
}

.vi .dtcRow + .dtcRow{ margin-top: 0; }

.vi .dtcRow .dtcLeft{
  display:flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.vi .dtcCode{
  font-weight: 950;
  color: var(--text2);
  letter-spacing: 0.02em;
}

.vi .dtcMeaning{
  color: var(--text);
  font-weight: 650;
}

.vi .dtcRight{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.vi .dtcOps{
  margin-top: 8px;
  color: var(--kpi-neutral);
  font-size: 12.5px;
}

/* Actions */
.vi .actionsList{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.vi .actionItem{
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: 12px;
  padding: 10px;
}

.vi .actionTop{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vi .actionTitle{
  font-weight: 900;
  color: var(--text2);
}

.vi .actionReason{
  margin-top: 6px;
  color: var(--text);
}

.vi .actionBenefit{
  margin-top: 6px;
  color: var(--kpi-neutral);
  font-size: 12.5px;
}

/* KV list fallback */
.vi .kv{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--bg4);
}

.vi .kv:last-child{ border-bottom:none; }
.vi .k{ color: var(--kpi-neutral); }
.vi .v{ font-weight: 850; color: var(--text2); }


.avSection { margin-bottom: 1.25rem; }
.avSectionLabel { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: #666; display: block; margin-bottom: 0.5rem; }
.avField { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
.avField label { font-size: 0.85rem; color: #ccc; }
.avField input, .avField select { background: #1a1a1a; border: 1px solid #333; border-radius: 6px; padding: 0.5rem 0.75rem; color: #fff; font-size: 0.95rem; }
.avField input:focus, .avField select:focus { outline: none; border-color: #4ade80; }
.avRadioGroup { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.avRadioGroup label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; cursor: pointer; }
.avFieldHint { font-size: 0.75rem; color: #555; }
.avActions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; border-top: 1px solid #222; padding-top: 1rem; }
.avBtnPrimary { background: #4ade80; color: #000; border: none; border-radius: 6px; padding: 0.5rem 1.25rem; font-weight: 600; cursor: pointer; }
.avBtnPrimary:disabled { opacity: 0.4; cursor: not-allowed; }
.avBtnSecondary { background: transparent; color: #aaa; border: 1px solid #333; border-radius: 6px; padding: 0.5rem 1rem; cursor: pointer; }









@media (max-width: 640px) {

aside{
    display: none;
}
header{
    padding: 0 12px;
}
header .right .search{
    display: none;
}
header .right .btn:not(.userbtn){
    display: none;
}
header .right #user-profile-btn-name{
    display: none;
}
header .right #user-profile-btn-mobile-icon{
    display: flex !important;
}

header .burgermenu{
    display: flex;
}
.main{
    padding: 8px;
    gap: 8px;
}
section{
    margin:0 0 12px;
    gap: .5rem;
}
section .box-map-l .map{
    aspect-ratio: auto;
}
section.box-map-l {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
}









section.box-big{
    grid-template-columns: 1fr;
}
section.box-s{
    grid-template-columns: 1fr 1fr;
}
section.box-m{
    grid-template-columns: 1fr;
}
section.box-m2{
    grid-template-columns: 1fr;
}

section.routes .bottom {
    grid-template-columns: auto;
}

section .box .head{
    white-space: normal;
}

section.box-c1 .big-content{
        
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: 
        "map"
        "mapc"
        "rightLiveB"
        "data1"
        "data2"
        "data3"
        "data4"
        "rightData1"
        "rightData2"
        "rightData3"
        "data5"
        "rightData4"
        ".";
    /*grid-auto-rows: auto;
    grid-auto-flow: row dense;*/
}

section.box-c1 .big-content *{
    flex-wrap: wrap;
}

section.box-c1 .big-content .left{
    display: contents;
}
section.box-c1 .big-content .right{
    display: contents;
}


section.box-big-c1{
    display: grid;
    grid-template-areas: 
    "map"
    "legend"
    "time"
    "time";
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    /*height: calc(100vh - 112px);*/
    height: 200vh;
}

}

@media (min-width: 1400px) {

    section.box-c1 .big-content .left{

        display: grid;
        grid-template-columns: 1fr 1.5fr;
        grid-template-areas: 
            "left right"

        /*
        display: grid;
        grid-template-columns: 1.2fr 1fr 1fr;
        grid-template-areas: 
            "data1 map map"
            "data2 mapc mapc"
            "data3 data4 data4";
        grid-auto-rows: auto;
        grid-auto-flow: row dense;*/
    }


    section.box-c1 .box-wrapper{
        flex-wrap: wrap;
        height: fit-content;
    }

    section.box-c1 .big-content .box.colnum{
        height: fit-content;
    }


    .vehicleInfoFullWrapper{
        display: flex;
        flex-direction: column;
        gap:.5rem;
    }
    

}


/* =========================
   MAINTENANCE / WARTUNG TAB
   ========================= */

#tab-maintenance{
    gap: 16px;
}

#tab-maintenance .maintenance-topbar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    grid-template-columns: none;
}

#tab-maintenance .maintenance-topbar-left,
#tab-maintenance .maintenance-topbar-right{
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#tab-maintenance .maintenance-topbar-right .search{
    width: 320px;
}

#tab-maintenance .maintenance-kpis{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

#tab-maintenance .maintenance-kpi{
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 92px;
    justify-content: center;
}

#tab-maintenance .maintenance-kpi-title{
    font-size: 22px;
    line-height: 28px;
    font-weight: 600;
    color: var(--text);
}

#tab-maintenance .maintenance-kpi-subtitle{
    font-size: 13px;
    line-height: 18px;
    color: var(--text2);
}

#tab-maintenance .maintenance-kpi-danger{
    border-color: color-mix(in srgb, var(--text-red) 30%, var(--border));
    background: color-mix(in srgb, var(--text-red) 8%, var(--bg2));
}

#tab-maintenance .maintenance-kpi-warning{
    border-color: color-mix(in srgb, var(--kpi-warn) 35%, var(--border));
    background: color-mix(in srgb, var(--kpi-warn) 10%, var(--bg2));
}

#tab-maintenance .maintenance-shell{
    display: block;
}

#tab-maintenance .maintenance-shell-box{
    padding: 0;
    overflow: hidden;
}

#tab-maintenance .maintenance-toolbar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

#tab-maintenance .maintenance-tabs,
#tab-maintenance .maintenance-filters{
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#tab-maintenance .maintenance-tabs .btn.active{
    background-color: var(--bg3);
    border-color: var(--border2);
}

#tab-maintenance .maintenance-select{
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text);
    padding: 0 12px;
    outline: none;
    font-size: 14px;
}

#tab-maintenance .maintenance-layout{
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 720px;
}

#tab-maintenance .maintenance-vehicles{
    border-right: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg3) 35%, transparent);
    min-width: 0;
}

#tab-maintenance .maintenance-pane-head{
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

#tab-maintenance .maintenance-pane-title{
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    color: var(--text);
}

#tab-maintenance .maintenance-pane-subtitle{
    margin-top: 4px;
    font-size: 12px;
    line-height: 16px;
    color: var(--text2);
}

#tab-maintenance .maintenance-vehicle-list{
    display: flex;
    flex-direction: column;
}

#tab-maintenance .maintenance-vehicle-item{
    padding: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 150ms, border-color 150ms;
}

#tab-maintenance .maintenance-vehicle-item:hover{
    background-color: var(--bg3);
}

#tab-maintenance .maintenance-vehicle-item.active{
    background-color: var(--bg3);
    border-left: 3px solid var(--border2);
    padding-left: 13px;
}

#tab-maintenance .maintenance-vehicle-top{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

#tab-maintenance .maintenance-vehicle-name{
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    color: var(--text);
}

#tab-maintenance .maintenance-vehicle-meta{
    margin-top: 4px;
    font-size: 12px;
    line-height: 16px;
    color: var(--text2);
    word-break: break-word;
}

#tab-maintenance .maintenance-vehicle-highlight{
    margin-top: 10px;
    font-size: 14px;
    line-height: 20px;
    color: var(--text);
}

#tab-maintenance .maintenance-vehicle-sub{
    margin-top: 2px;
    font-size: 12px;
    line-height: 16px;
    color: var(--text2);
}

#tab-maintenance .maintenance-pill{
    white-space: nowrap;
    font-size: 11px;
    line-height: 14px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 600;
}

#tab-maintenance .maintenance-pill-danger{
    color: var(--text-red);
    border-color: color-mix(in srgb, var(--text-red) 35%, var(--border));
    background: color-mix(in srgb, var(--text-red) 10%, var(--bg2));
}

#tab-maintenance .maintenance-pill-warning{
    color: var(--kpi-warn);
    border-color: color-mix(in srgb, var(--kpi-warn) 35%, var(--border));
    background: color-mix(in srgb, var(--kpi-warn) 10%, var(--bg2));
}

#tab-maintenance .maintenance-pill-neutral{
    color: var(--text2);
    background: var(--bg3);
}

#tab-maintenance .maintenance-detail{
    min-width: 0;
    display: flex;
    flex-direction: column;
}

#tab-maintenance .maintenance-detail-head{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

#tab-maintenance .maintenance-detail-title-row{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#tab-maintenance .maintenance-detail-title{
    font-size: 28px;
    line-height: 34px;
    font-weight: 600;
    color: var(--text);
}

#tab-maintenance .maintenance-detail-vin{
    font-size: 13px;
    line-height: 18px;
    color: var(--text2);
}

#tab-maintenance .maintenance-detail-actions{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#tab-maintenance .maintenance-detail-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
}

#tab-maintenance .maintenance-card{
    padding: 16px;
    border-radius: 14px;
}

#tab-maintenance .maintenance-card-head{
    margin-bottom: 12px;
}

#tab-maintenance .maintenance-card-title{
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    color: var(--text);
}

#tab-maintenance .maintenance-card-subtitle{
    margin-top: 4px;
    font-size: 12px;
    line-height: 16px;
    color: var(--text2);
}

#tab-maintenance .maintenance-open-list,
#tab-maintenance .maintenance-history-list{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#tab-maintenance .maintenance-open-item,
#tab-maintenance .maintenance-history-item{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg3) 45%, transparent);
}

#tab-maintenance .maintenance-open-left,
#tab-maintenance .maintenance-history-main{
    min-width: 0;
    flex: 1;
}

#tab-maintenance .maintenance-open-top,
#tab-maintenance .maintenance-history-top{
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#tab-maintenance .maintenance-open-title,
#tab-maintenance .maintenance-history-title{
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
    color: var(--text);
}

#tab-maintenance .maintenance-open-date,
#tab-maintenance .maintenance-history-meta{
    margin-top: 4px;
    font-size: 13px;
    line-height: 18px;
    color: var(--text);
}

#tab-maintenance .maintenance-open-note,
#tab-maintenance .maintenance-history-sub{
    margin-top: 2px;
    font-size: 12px;
    line-height: 16px;
    color: var(--text2);
}

#tab-maintenance .maintenance-history-tags{
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

#tab-maintenance .maintenance-tag{
    font-size: 11px;
    line-height: 14px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg4);
    color: var(--text2);
}

#tab-maintenance .maintenance-history-footer{
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

/* optional: rechts Historie etwas höher und scrollbar */
#tab-maintenance .maintenance-history-list{
    max-height: 460px;
    overflow-y: auto;
    padding-right: 4px;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1100px){
    #tab-maintenance .maintenance-layout{
        grid-template-columns: 1fr;
    }

    #tab-maintenance .maintenance-vehicles{
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 640px){
    #tab-maintenance .maintenance-topbar{
        flex-direction: column;
        align-items: stretch;
    }

    #tab-maintenance .maintenance-topbar-right .search{
        width: 100%;
    }

    #tab-maintenance .maintenance-kpis{
        grid-template-columns: 1fr;
    }

    #tab-maintenance .maintenance-toolbar{
        flex-direction: column;
        align-items: stretch;
    }

    #tab-maintenance .maintenance-tabs,
    #tab-maintenance .maintenance-filters,
    #tab-maintenance .maintenance-detail-actions{
        width: 100%;
    }

    #tab-maintenance .maintenance-tabs .btn,
    #tab-maintenance .maintenance-detail-actions .btn{
        flex: 1;
    }

    #tab-maintenance .maintenance-select{
        width: 100%;
    }

    #tab-maintenance .maintenance-open-item,
    #tab-maintenance .maintenance-history-item{
        flex-direction: column;
        align-items: stretch;
    }
}