:root {
    --bg: #191C24;
    --menubg: #21252f;
    --dropbg: #474e62;
    --text: #fff;
    --text-mid: #a6a7ab;
    --text-dark: #191C24;
    --red: #ff0000;/* db141e */
    --green: #66ff33;
    --yellow: #fdb103;
    --blue: #0099ff;
    --attestation: #ff7300;/* the day-timeline attestation bar and its tile icon share this */
    --hl: #00ffff;
    --hov: #393f4f;
    --hov-dark: #333a4c;
    --ttip: #fff;
    --border: #969eb0;
    --border-dark: #474e62;
    --sel: #393f4f;
    --sel-light: #d6d9df;
    --dbox: #2b303d;

    --tool: #717685;
    --bhov: #848ca1;
}

@font-face {
    font-family: "Roboto";
    src: url("../fonts/Roboto-Light.ttf") format("truetype");
}

@-webkit-keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: .5rem;
}

/* Track */
::-webkit-scrollbar-track {
    background: var(--menubg);
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: var(--sel);
}

  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: #474e62;
  }

  :root{
    scrollbar-color: #474e62 var(--menubg) !important;
  }
/* SCROLLBAR END */

::selection {
    color: var(--text);
    background: var(--tool);
}
/* For Mozilla Firefox */
::-moz-selection {
    color: var(--text);
    background: var(--tool);
}

#particles-js{
    position: absolute;
    width: 99%;
    height: 98%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    z-index: 5;
}

html {
    font-family: Roboto, sans-serif;
}

body {
    display: flex;
    flex-direction: row;
    gap: 0;
    min-width: 1600px;
    background: var(--bg);
    font-size: 14px;
    font-weight: 200;
    word-spacing: 2px;
    letter-spacing: 1px;
}

body.login-page {
    min-width: 1600px;
}

h1 {
    display: block;
    color: var(--text);
    cursor: default;
}

h1 span {
    color: var(--hl);
}

h2 {
    display: block;
    margin: 0;
    padding: .25rem 0 .25rem .5rem;
    width: calc(100% - .5rem);
    font-size: .9em;
    line-height: 1.2em;
    font-weight: 300;
    text-transform: uppercase;
    color: var(--text);
    background: var(--dbox);
    border-bottom: 0.05rem solid var(--border);
    cursor: default;
}

h3 {
    display: block;
    margin: 2rem 0 1rem 0;
    padding: 0 0 0 .25rem;
    width: calc(100% - .25rem);
    font-size: .9em;
    line-height: 1.2rem;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--text);
    border-bottom: 0.05rem solid var(--border);
    cursor: default;
}

h3 span {
    text-transform: none;
}

h4 {
    display: block;
    margin: 0 0 .5rem;
    color: var(--text);
    cursor: default;
}

p {
    cursor: default;
    z-index: 1;
}

p, a {
    margin:0;
    line-height: 1.3rem;
    color: var(--text);
}

/* The header band spans the whole strip between the top bar and its own bottom rule: the tab
   container's 1rem top margin is dropped and the band grows by exactly that amount, so the rule -
   and everything below it - stays put while the content sits on the strip's true middle line.
   Every page carrying a data-area gets this, drivers and vehicles alike. */
.tab-container:has(.data-area) {
    margin-top: 0;
}

p.data-area {
    /* --band-h is the strip's height and is reused by every child below, so the text, the info
       icons, the legend and the pin/report buttons all centre on the same line. box-sizing keeps
       the measured height exact incl. the border; padding is zeroed and line-height pinned because
       the overview tab otherwise adds vertical padding and a 0.9em line-height via
       "#driver-overview-tab p". */
    --band-h: calc(25px + 1rem);
    box-sizing: border-box;
    height: var(--band-h);
    margin-bottom: 1rem;
    padding: 0 !important;
    line-height: var(--band-h) !important;
    text-transform: uppercase;
    font-size: 1rem !important;
    background: var(--bg);
    border-bottom: .005rem solid var(--border) !important;
}

/* The activity-detail and night-hours headers stick via .sticky, which also sets inline-table;
   block keeps their measured height exact while position:sticky still holds. */
.data-area.sticky {
    display: block;
}

.data-area .fa-id-badge, .data-area .fa-paperclip, .data-area .fa-file-export, .data-area .fa-clock, .data-area .fa-clipboard-list, .data-area .fa-bus-simple {
    padding: 0 !important;
    height: 1rem !important;
    width: 1rem !important;
}

.data-area .fa-clock , .data-area .fa-paperclip, .data-area .fa-clipboard-list{
    margin-left: 1rem !important;
}

.data-area .fa-file-export{
    margin-left: 4rem !important;
}

.data-area .fa-clock {
    height: .85rem !important;
    width: .85rem !important;
}

/* Each info-bar entry is its own flex line so the icon and its text sit exactly on the band's
   vertical centre; a plain vertical-align leaves the icons ~1px low. The gap replaces the literal
   space between icon and text (flex would otherwise collapse it), vertical-align:top pins the
   full-height span to the line so it stays centred in the band. The fallback covers the weekly
   overview, whose header cell sets its own --band-h. */
.data-area span.info-bar {
    float: none;
    display: inline-flex;
    align-items: center;
    height: var(--band-h, 25px);
    vertical-align: top;
    gap: .3em;
}

.data-area span.info-bar svg {
    margin: 0;
}

/* Legend symbols, the master pin and the report icon float right in the info bar; give each the
   band's full height and centre its own icon so text and icons share one middle line. */
.data-area .activity-legend,
.data-area .activity-timeline-select-all,
.data-area .activity-timeline-report {
    height: var(--band-h, 25px);
    display: flex;
    align-items: center;
}

/* The pin toggle carried a top margin to fake-centre it on the old auto-height bar; the flex
   centring above now does that, so drop the offset. */
.data-area .activity-timeline-select-all-toggle {
    margin-top: 0 !important;
}

a {
    color: var(--text);
    text-decoration: none;
}

a.disabled {
    pointer-events: none;
}

.no-border {
    border: none !important;
}

.table tr.no-border {
    border: none;
}

.table tr.warning, dt.warning, dd.warning {
    background: #8b3329;
}

.table tr.advance-warning {
    background: #8f7001;
}

label {
    color: var(--text);
    font-size: .9em;
}

label.highlight {
    padding-left: 0.25rem;
    border-left: 0.25rem solid var(--hl);
}

.form {
    display: inline-block;
    margin: 0;
    width: 100%;
}
.form input.required, .form .ui.dropdown.required, .form label.required {
    border-color: #b9861e;
}

.sticky {
    display: inline-table;
    width: 100%;
    position: sticky;
    top: -1px;
    z-index: 1;
}

.right {
    float: right;
}

#right-menu {
    float: right;
    display: flex;
}

#right-menu svg {
    padding: 0.8rem 0 .25rem 0;
    margin-right: 2rem;
}

#right-menu a {
    padding: 0;
}

.svg-inline--fa {
    position: relative;
    padding: 0 0.813rem;
    width: 1.375rem;
    height: 1.375rem;
    text-align: center;
    color: var(--text);
}

.svg-inline--fa.fa-copy {
    padding-left: 0;
    width: .8rem !important;
    height: .8rem !important;
}

  /* dropdown menu */
  .dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--dropbg);
    min-width: 8rem;
    z-index: 1;
  }

  .dropdown-content button {
    display: block;
    width: 100%;
    padding: .8rem 1rem;
    color: var(--text);
    background: var(--dropbg);
    text-decoration: none;
    border: none;
  }

  .dropdown-content button:hover {background-color: var(--sel);}
  
  .dropdown:hover .dropdown-content {display: block;}
  
  .dropdown:hover .dropbtn {color: var(--hl);}
/* top bar */
.top-bar {
    display: flex;
    margin-bottom: .125rem;
    height: 3rem;
    background: var(--menubg);
}

.search-section {
    display: flex;
    margin-bottom: 0.125rem;
    padding: 0.75rem;
    height: 1.5rem;
    background: var(--menubg);
}

.filter-section {
    display: flex;
    padding: 0.5rem;
    height: 2rem;
    gap: 2rem;
    width: 100%;
    background: var(--menubg);
}

div.icon.input {
    position: relative;
}

input#search-field {
    margin: 0;
    height: 1rem;
    width: 9rem;
}

.report-units .search-field {
    margin-top: 0;
    height: 1.2rem;
    width: 13.125rem;
}

.report-units .search-section {
    padding: 0 .5rem 1.25rem .5rem;
    background: none;
}

.report-units .icon.input svg.fa-magnifying-glass {
    height: 1.4rem;
}

.download-manager-result {
    width: 100%;
}

.download-manager-overview {
    display: flex;
    flex-direction: column;
    margin-left: 1rem;
}

.reports-wrapper form#download-manager-driver, .reports-wrapper form#download-manager-vehicle {
    flex-direction: column !important;
    width: 20.2rem;
}

div.icon input:not(.ui.dropdown .menu) > .input {
    padding: 0.2rem 2.3rem 0.2rem 0.3rem;
    width: 8rem;
}

#download-manager-driver .report-units h2, #download-manager-vehicle .report-units h2 {
    margin-bottom: 1rem;
}

#download-manager-driver .report-units div.scroll, #download-manager-vehicle .report-units div.scroll {
    max-height: calc(100vh - 23rem);
}

#download-manager-driver .report-units, #download-manager-vehicle .report-units {
    margin: 2rem 0 0 0;
    width: 100%;
}

#download-manager-driver .report-units .search-field, #download-manager-vehicle .report-units .search-field {
    width: 17.7rem;
}

#download-manager-driver button.check-all.button-primary, #download-manager-vehicle button.check-all.button-primary {
    width: 100%;
}

button#generate-preview, button#download-zip-file-driver, button#download-zip-file-vehicle {
    width: 19rem;
    margin-left: 1rem;
    text-transform: uppercase;
}

#download-manager-driver .report-units .search-field, #download-manager-vehicle .report-units .search-field {
    width: 18rem;
}

.download-details {
    width: calc(100% - 2rem);
    padding: 1rem;
    margin-top: .5rem;
    background: var(--dbox);
}

.download-details table thead {
    background-color: var(--dropbg);
}

.download-details .table th, .download-details .table td {
    width: 11%;
}

.download-details .table th:first-child, .download-details .table td:first-child {
    width: 2rem;
}

.download-details .table th:nth-child(2), .download-details .table td:nth-child(2) {
    width: calc(46% - 8rem);
}

.download-details .table th:last-child, .download-details .table td:last-child {
    width: 7%;
}
.download-details .table th:last-child span, .download-details .table td:last-child span {
    padding-left: 1.25rem;
}

.download-details .table th:first-child svg, .download-details .table td:first-child svg {
    margin: 0;
    padding: 0 .5rem;
    width: 1rem;
}

.download-summary {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: .5rem;
}

.download-details .time-ranges .table th, .download-details .time-ranges .table td {
    width: 12%;
}

.download-details .time-ranges .table th:first-child, .download-details .time-ranges .table td:first-child {
    width: calc(28% - 7rem);
}

.download-details .time-ranges .table th:nth-child(3), .download-details .time-ranges .table td:nth-child(3) {
    width: 18%;
}

.download-details .time-ranges .table th:nth-child(4), .download-details .time-ranges .table td:nth-child(4) {
    width: 4%;
    padding-right: 0;
    text-align: right;
}

#files-export-vehicle .download-details .time-ranges .table th:first-child, #files-export-vehicle .download-details .time-ranges .table td:first-child {
    width: 12%;
}

#files-export-vehicle .download-details .time-ranges .table th:nth-child(5), #files-export-vehicle .download-details .time-ranges .table td:nth-child(5) {
    width: calc(28% - 7rem);
}

.download-details .table th span, .download-details .table td span {
    margin-left: 1.25rem;
}

.download-details .driver-data,
.download-details .vehicle-data {
    display: none;
}

.download-details .driver-data.accdata,
.download-details .vehicle-data.accdata {
    border: none;
}

.download-details .table tr {
    border-top: 0.05rem solid var(--border-dark);
    border-bottom: none;
}

.download-summary .yellow {
    color: var(--yellow);
}

.time-ranges {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--hov);
}

.time-ranges h3, .download-details h3 {
    margin-top: 0;
    line-height: 1em;
}

.time-ranges .table thead {
    background-color: var(--dropbg);
}

.download-details-table-scroll,
.time-ranges-table-scroll {
    max-height: calc(100vh - 16rem);
    overflow-y: auto;
    overflow-x: hidden;
}

.download-details-table-scroll .table,
.time-ranges-table-scroll .table {
    width: 100%;
}

.download-details-table-scroll .table thead,
.time-ranges-table-scroll .table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.download-details-table-scroll .table thead th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: .85rem;
}

.download-details-table-scroll .table thead th.sortable::after {
    content: "⇅";
    position: absolute;
    right: .2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .6rem;
    color: var(--tool);
    opacity: .75;
}

.download-details-table-scroll .table thead th.sortable[data-sort-direction="asc"]::after {
    content: "▲";
    color: var(--hl);
    opacity: 1;
}

.download-details-table-scroll .table thead th.sortable[data-sort-direction="desc"]::after {
    content: "▼";
    color: var(--hl);
    opacity: 1;
}

.time-ranges-table-scroll .table.missing-ranges thead {
    z-index: 1;
}

.download-details-table-scroll td.list-details {
    width: calc(100% - 5rem) !important;
    margin-left: 3rem;
}

.time-ranges .table tr {
    border: none;
}

.time-ranges .table tr.border-top {
    border-top: 1px solid var(--border-dark);
}

.time-ranges .table th, .time-ranges .table td {
    width: 15%;
}

.preview-section .download-summary p, .preview-section .download-missing-ranges p {
    font-size: 1.15em;
}

.download-details .table td span.info-tooltip {
    margin: 0 !important;
    padding: 0 !important;
}

.download-details .table td span.info-tooltip svg {
    margin: 0;
    padding: 0;
    height: 1.25rem !important;
    width: 1.25rem !important;
}

.summary-box {
    width: calc(20% - 1.25rem);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem .5rem;
    float: left;
    background: var(--dbox);
}

.summary-box-label {
    margin: 0;
}

.summary-box-label span {
    float: none;
}

.summary-box-value {
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
}

.summary-box svg {
    margin: 0;
    padding: 0;
    vertical-align: bottom;
}

.selection-toggle {
    height: 1.25rem;
    width: 1.25rem;
    color: var(--tool);
    fill: var(--tool);
    cursor: pointer;
}

.selection-toggle.selected {
    color: var(--hl);
    fill: var(--hl);
}

.selection-export {
    margin-left: .5rem !important;
    color: var(--tool);
    cursor: pointer;
}

.selection-export.active {
    color: var(--hl);
}

p span.selected-count {
    float: none;
    margin-right: 1rem;
}

td.acc svg.fa-circle-chevron-right {
    cursor: pointer;
}

.preview-section .download-summary .summary-box-value {
    font-size: 1.75em;
}

.ui.dropdown svg.fa-magnifying-glass, .icon.input svg.fa-magnifying-glass {
    cursor: default;
    position: absolute;
    top: 0.25rem;
    right: 0;
    height: 1rem;
    width: 1rem;
    color: var(--dropbg);
}

span.text {
    font-size: 1em;
    font-weight: 400;
    color: var(--text);
}

#cal {
    height: 2rem;
    font-size: 1em;
    line-height: 2.1rem;
    border: none;
}

#time-range, #start-date {
    margin: 0 .5rem;
}

a#file-upload svg, a#assign-driver-cards-vehicles svg, a#assign-nfc-tags svg {
    cursor: pointer;
}

.top-bar a svg:hover, .top-bar svg.fa-chevron-down:hover {
    color: var(--hl);
}

.report-time-period svg.fa-chevron-down:hover {
    color: var(--hl);
    cursor: pointer;
}

.top-bar a.redD svg, .top-bar a.redV svg {
    border-bottom: .25rem solid var(--red);
}

.top-bar a.yellow svg {
    border-bottom: .25rem solid var(--yellow);
}

svg title {
    background-color: red;
}

svg:focus {
    outline: none;
}

/* CONTENT */
#content {
    display: flex;
    flex-direction: column;
    flex-grow: 100;
}

#content.dash {
    margin-top: 1rem;
    margin-left: 4.125rem;
}

#content.narrow {
    margin-left: 3.125rem;
}

#content.wide {
    margin-left: 3.125rem;
    flex-direction: row;
    position: relative;
}

#content-grid {
    display: flex;
    flex-direction: row;
}

#content.wide #content-grid {
    flex-direction: column;
    overflow: hidden;
}

#content.wide #content-grid .filter-section{
    margin-bottom: 1rem;
}

/* DRIVERS */
#drivers-list-wrapper, #vehicles-list-wrapper {
    margin-left: 3.125rem;
    padding-right: 0.125rem;
    height: 100vh;
    width: 16.5rem;
}

#drivers-list, #vehicles-list {
    padding-right: 0.125rem;
    height: calc(100% - 5.25rem);
    overflow-x: hidden;
    overflow-y: scroll;
}

#drivers-list svg, #vehicles-list svg, #new-driver svg {
    padding: 0;
    height: .8rem;
    width: .8rem;
    padding-left: .35rem !important;
}

#drivers-list .vio-profile svg {
    margin-right: 0.25rem;
    padding: 0 !important;
    height: .9rem;
    width: .9rem;
    vertical-align: bottom;
    color: var(--text-dark);
}

#new-driver, #new-vehicle {
    margin-left: 4rem;
    padding: 0;
    cursor: pointer;
}

#drivers-list div.warning svg {
    padding-left: .5rem !important;
}

#drivers-list-nfc-tags, #nfc-tags-list {
    height: calc(100vh - 27rem);
    overflow-y: scroll;
    overflow-x: hidden;
}

#sort-tile {
    display: flex;
    flex-direction: row;
    margin-bottom: .125rem;
    padding: 0.55rem 0.45rem 0.25rem 0.45rem;
    background: var(--dbox);
    border-bottom: 0.005rem solid var(--border-dark);
}

#sort-tile .sort-option
{
    width: 12%;
    cursor: pointer
}

#sort-tile .sort-title
{
    width: 51%;
    color: var(--text);
    cursor: default;
}

#vehicles-list-wrapper #sort-tile .sort-title {
    width: 63%;
}

#sort-tile svg
{
    height: .8rem;
    width: .8rem;
}

#sort-tile .sort-option.active svg
{
    color: var(--hl);
}

.list-tile {
    display: none;
    position: relative;
    margin: 0 0.125rem 0.125rem 0;
    padding: 0.5rem 0;
    width: 100%;
    height: 3.3rem;
    background: var(--dbox);
    cursor: pointer;
}

.list-tile.visible {
    display: flex;
}

.list-tile.search-hidden, .calendar-row.search-hidden, label.search-hidden, label.filter-hidden {
    display: none !important;
}

.list-tile:hover {
    background: var(--sel);
}

.list-tile.selected {
    width: calc(100% - 0.25rem);
    background: var(--sel);
    border-left: 0.25rem solid var(--hl);
}

.circle {
    margin-left: 0.5rem;
    border-radius: 3%;
    height: 3.3rem;
    width: 3.3rem;
    background:#9fa9bb;
}

.list-tile.selected .circle {
    margin-left: 0.25rem;
}

.circle div.initials {
    margin: 0;
    padding-top: 0.05rem;
    padding-left: 2px;
    font-size: 1.1em;
    font-weight: 800;
    text-align: center;
}

.circle div.inumber {
    margin: 0;
    padding-top: 0.2rem;
    padding-left: 2px;
    height: .8rem;
    font-size: 0.8em;
    text-align: center;
}

.circle div.manufacturer {
    margin: 0;
    padding: 0.25rem 0;
    min-height: 1em;
    padding-left: 2px;
    font-size: .8em;
    text-align: center;
    font-weight: 800;
}

.vio-profile {
    padding: 0.22rem;
    text-align: center;
    font-size: .7em;
    border-radius: 3%;
}

/* With the personnel number gone from this box, the profile badge would leave a gap at the bottom.
   Sit it on the lower edge so initials and badge frame the box as before. Drivers without a card
   have no badge at all, and the vehicle list uses this box for other content - hence the scope. */
#drivers-list .circle {
    display: flex;
    flex-direction: column;
}

#drivers-list .circle .vio-profile {
    margin-top: auto;
}

.list-tile .driver-infos, .list-tile .vehicle-infos {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 8rem;
    letter-spacing: 0;
}

/* The personnel number moved out of the 3.3rem initials box, where long numbers had nowhere to go.
   Here it has the full column width, and `margin-top: auto` drops it onto the bottom edge - that
   collects ALL of the tile's leftover height into one gap above it, instead of space-between
   splitting it into two barely visible ones. The names close up at the top to free that height. */
.list-tile .driver-infos div.last-name {
    margin-top: 0;
}

.list-tile .driver-infos div.first-name {
    margin-top: 0.125rem;
}

.list-tile .driver-infos div.pnumber {
    margin: auto 0 0 0.5rem;
    font-size: .8em;
    color: var(--text);
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-tile .vehicle-infos {
    width: 9.7rem;
}

.list-tile div.last-name, .list-tile div.license-plate {
    margin: 0.5rem 0 0 0.5rem;
    font-size: 1em;
    color: var(--text);
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-tile div.first-name, .list-tile div.card-number {
    margin: 0.25rem 0 0 0.5rem;
    font-size: .8em;
    color: var(--text);
    text-align: left;
}

.list-tile div.unit-manufacturer {
    margin: 0 0 0 0.5rem;
    font-size: .7em;
    color: var(--text);
}

.list-tile div.attention {
    position: absolute;
    margin-left: 0.5rem;
    bottom: 0;
    width: 4rem;
    border-bottom: 0.25rem solid var(--red);
}

.list-tile div.advanced-infos {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 3.5rem;
}

#vehicles-list .list-tile div.advanced-infos {
    width: 2.25rem;
}

.list-tile div.warning, .list-tile div.check, .list-tile div.download {
    display: flex;
    flex-direction: row;
    margin-right: .15rem;
    font-size: .8em;
    text-align: right;
    color: var(--text);
    align-self: flex-end;
}

.list-tile div.warning {
    margin: .5rem .15rem .5rem 0;
   
}

.list-tile div.download.red {
    color: var(--red);
}

.list-tile div.download.yellow {
    color: var(--yellow);
}

.list-tile div.download.status-badge {
    padding: 0 .5rem;
    color: var(--text-dark);
    background-color: var(--green);
    border-radius: 1rem;
}

.list-tile div.download.status-badge.red {
    color: var(--text);
    background-color: var(--red);
}

.list-tile div.download.status-badge.yellow {
    color: var(--text-dark);
    background-color: var(--yellow);
}

.list-tile .check span,
.list-tile .download span {
    padding: 0 .5rem;
    color: var(--text-dark);
    background-color: var(--green);
    border-radius: 1rem;
}

.list-tile .check span.red,
.list-tile .download span.red {
    padding: 0 .5rem;
    color: var(--text);
    background-color: var(--red);
    border-radius: 1rem;
}

.list-tile .check span.yellow,
.list-tile .download span.yellow {
    padding: 0 .5rem;
    color: var(--text-dark);
    background-color: var(--yellow);
    border-radius: 1rem;
}

.list-tile .check i.green,
.list-tile .download i.green {
    color: var(--green);
}

.list-tile .check i.red,
.list-tile .download i.red {
    color: var(--red);
}

.list-tile .check i.yellow,
.list-tile .download i.yellow {
    color: var(--yellow);
}

/* TAB START */
.sub-menu {
    padding: 0 0.125rem;
    width: 10rem;
    display: flex;
    flex-flow: column;
    gap: 0.125rem;
    overflow: hidden;
}

.sub-menu.wide {
    margin-top: .25rem;
    width: 11.25rem;
}

  /* Style the buttons inside the tab */
  .sub-menu button, .popup-menu button {
    width: 100%;
    background: var(--dbox);
    border: none;
    cursor: pointer;
    padding: .5rem .5rem;
    transition: 0.25s;
    font-size: 1em;
    text-align: left;
    color: var(--text);
  }

  .sub-menu button:not(.sub-menu button.child-tab), .popup-menu button
  {
    border-left: 0.25rem solid var(--dbox)
  }

  .sub-menu button.disabled
  {
    opacity: .6;
  }

  .sub-menu button.disabled:hover
  {
     background-color: var(--dbox);
  }

  /* Change background color of buttons on hover */
  .sub-menu button:hover:not(.sub-menu button.child-tab), .popup-menu button:hover {
    background-color: var(--sel);
    border-left: 0.25rem solid var(--sel);
  }

  .sub-menu button:hover:not(.sub-menu button.child-tab), .popup-menu button:hover {
    background-color: var(--sel);
    border-left: 0.25rem solid var(--sel);
  }

  /* Create an active/current tablink class */
  .sub-menu button.active:not(.sub-menu button.child-tab), .popup-menu button.active {
    border-left: 0.25rem solid var(--hl);
    background-color: var(--sel);
  }

  .sub-menu button.child-tab {
    display: none;
    margin-left: 1rem;
    width: calc(100% - 1rem);
  }

  .sub-menu button.child-tab.active {
    display: none;
    margin-left: 1rem;
    width: calc(100% - 1rem);
    background-color: var(--sel);
    border-bottom: 0.125rem solid var(--hl);
  }

  .sub-menu #driver-communication {
    display: flex;
    flex-direction: row;
    gap: 0.125rem;
    margin-top: 1rem;
    width: 100%;
  }

.sub-menu #driver-communication button {
    padding: 0.4rem 0 0.15rem 0;
    width: calc(100% - 0.125rem);
    border-left: none;
}

.sub-menu #driver-communication button svg {
    height: 1.25rem;
    width: 100%;
    padding: 0;
}

.sub-menu #driver-communication button svg.fa-square-whatsapp {
    color: #5ada16;
}

/* Style the tab content */
.tab-container {
    display: none;
    margin: 1rem 0 0 1rem;
    padding-right: 1rem;
    height: calc(100vh - 4.25rem);
    width: 100%;
    color: var(--text);
    overflow-x: hidden;
}

#content.wide .tab-container {
    height: calc(100vh - 1rem);
}

.tab-container.filter {
    margin-top: 0;
}

.popup .tab-container {
    margin: 1rem 0 0 0;
}

.tab-container.scroll {
    overflow-y: scroll !important;
}

.tab-container.active, .sub-menu button.child-tab.visible {
    display: flex;
    flex-direction: column;
}

  .tab-content {
    height: auto;
    width: 100%;
    -webkit-animation: fadeEffect 1s;
    animation: fadeEffect 1s;
  }

  .tab-sidebar {
    margin-left: .125rem;
    width: 15rem;
  }

  .tab-container p.date {
    width: 5rem;
    float: left;
    padding-top: 2.5rem;
    margin-right: 0.5rem;
  }

  .tab-container svg.zs {
    margin-bottom: 2rem;
  }

  #master-data.tab-container {
    margin-right: 1rem;
  }
/* TAB END */

/* DROPDOWN */
.ui.dropdown, label#cal {
    cursor: pointer;
    position: relative;
    display: flex;
    outline: none;
    text-align: left;
    background: var(--menubg);
}

.ui.dropdown .menu {
    cursor: auto;
    position: absolute;
    display: none;
    outline: none;
    top: 100%;
    width: -webkit-max-content;
    width: -moz-max-content;
    min-width: 100%;
    margin: 0em;
    padding: 0em 0em;
    background: var(--dropbg);
    font-size: 1em;
    text-shadow: none;
    text-align: left;
    z-index: 11;
    will-change: transform, opacity;
    border-radius: .375rem;
}

.ui.dropdown .scrolling.menu {
    display: block;
    position: static;
    overflow-y: auto;
    border: none;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    min-width: 100% !important;
    max-height: 20rem;
    width: auto !important;
    border-top: 1px solid var(--sel);
}

.ui.dropdown.dropdown .menu > .input {
    width: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin: 0.5rem;
    min-width: 10rem;
}

.ui.dropdown .menu > .divider {
    border-top: 1px solid var(--bg);
    height: 0em;
    margin: 0.5em 0em;
}

.ui.dropdown .menu > .header {
    margin: 0.75rem 0rem;
    padding: 0em 0.75rem;
    color: var(--text);
    font-size: 0.85em;
    font-weight: bold;
    text-transform: uppercase;
}

.ui.dropdown .menu > .item {
    position: relative;
    cursor: pointer;
    display: block;
    border: none;
    height: auto;
    text-align: left;
    border-top: none;
    line-height: 1em;
    color: var(--text);
    padding: 0.75rem !important;
    font-size: 1em;
    -webkit-touch-callout: none;
}

.ui.dropdown .menu > .item.selected {
background: var(--sel);
}

.ui.dropdown .menu > .item:hover {
    background: var(--sel);
    z-index: 13;
}

.ui.dropdown > .text {
    display: inline-block;
    padding: 0.2rem 0.3rem;
    width: 100%;
    -webkit-transition: none;
    transition: none;
    align-self: center;
}

.ui.dropdown > .ui.label.transition.visible {
    padding: 0.5rem 0.3rem;
    font-size: 1em;
}

.ui.dropdown .menu > .input:not(.transparent) input {
    padding: 0.5em 1em;
    margin: 0;
}

.ui.dropdown div.icon svg {
    top: 0.325rem;
    height: 1.25rem;
    width: 1.25rem;
}

.ui.dropdown.active .svg-inline--fa:not(div.icon svg), .ui.dropdown.highlight .svg-inline--fa:not(div.icon svg)  {
    color: var(--hl);
}

.ui.dropdown .svg-inline--fa, label .svg-inline--fa {
    padding: 0;
    height: 1rem;
    width: 1rem;
    align-self: center;
}

.ui.multiple.dropdown .svg-inline--fa {
    height: 1rem;
    width: 3rem;
}

.ui.dropdown.green {
    border-color: var(--green) !important
}

.ui.multiple.dropdown>.label~.text {
    display: none;
}

/* DROPDOWN END */

/* TABLES */

table {
    display: table;
    border-collapse: collapse;
    text-indent: initial;
    border-spacing: 0;
    box-sizing: border-box;
    border: none;
    white-space: nowrap;
}

table thead {
    display: table-header-group;
    background-color: var(--bg);
}

tbody {
    display: table-row-group;
    vertical-align: middle;
    border: none;
}

td, tr {
    vertical-align: middle;
}

.table {
    width: 100%;
}

.table.selectable tbody tr:not(.no-hover):hover {
background: var(--hov);
}

.table tbody tr:last-child {
    border: none;
}

.table th, .table td {
    display: inline-block;
    padding: 0.325rem 0.5rem;
    width: 5.75rem;
    text-align: left;
    font-weight: 300;
    font-size: .9em;
    line-height: 1.2em;
    color: var(--text);
    cursor: default;
}

.table.wide th, .table.wide td {
    width: 3.5rem;
    text-align: center;
}

.table th {
    text-transform: uppercase;
}

.table tr {
    display: table-row;
    border-bottom: 0.05rem solid var(--border-dark);
}

.table td.copy-field {
    cursor: pointer;
}

.table td:first-child svg {
    width: 100%;
}
.table.due-dates tr.advance-warning .id-card {
    color: var(--text);
 }
.table.due-dates tr.warning .pass {
   color: var(--text);
}

.table.due-dates td:first-child svg {
    width: auto;
    margin-right: .5rem;
    padding: 0;
    line-height: 2rem;
    vertical-align: bottom;
}

.due-dates svg.driver-card, .report-units svg.driver-card, .section svg.driver-card, svg.color.driver-card {
    color: #89e1ff;
}

.due-dates svg.driving-license, svg.color.driving-license {
    color: #ffbee7;
}

.due-dates svg.fa-diamond, svg.color.fa-diamond {
    color: #ff7300;
}

.due-dates svg.id-card, svg.color.id-card {
    color: #d8d8b0;
}

.due-dates svg.pass, svg.color.pass {
    color: #9d2a08;
}

.table .svg-inline--fa {
    height: 1rem;
    width: 1rem;
}

.red {
    color: var(--red)
}

.yellow {
    color: var(--yellow);
}

.blue {
    color: var(--blue)
}

svg rect:focus {
    outline: none;
}

svg .red {
    fill: var(--red);
    font-size: 1.1em;
}

.green {
    color: var(--green)
}

.overview-tab .table {
    margin: 0 0.5rem 1.5rem 0;
}

.overview-tab .table thead tr {
    background: var(--hov);
}

.overview-tab .table th, .overview-tab .table td {
    width: 10rem;
}

.overview-tab .table th:first-child, .overview-tab .table td:first-child {
    padding-left: .5rem;
    width: 12rem;
}

.overview-tab .table th:last-child, .overview-tab .table td:last-child {
    width: auto;
}

.overview-tab .table thead tr {
    border-bottom: 0.05rem solid var(--border);
}

.overview-tab .driving-license-controls .table th:first-child, .overview-tab .driving-license-controls .table td:first-child {
    width: 9.5rem;
}

.overview-tab .driving-license-controls .table th:nth-child(2), .overview-tab .driving-license-controls .table td:nth-child(2) {
    width: 6.75rem;
}

.overview-tab .driving-license-controls .table th:nth-child(3), .overview-tab .driving-license-controls .table td:nth-child(3) {
    width: 3.75rem;
}

.overview-tab .driving-license-controls .table th:nth-child(4), .overview-tab .driving-license-controls .table td:nth-child(4) {
    width: 9.5rem;
}

.overview-tab .driving-license-controls .table th:last-child, .overview-tab .driving-license-controls .table td:last-child {
    width: 5.5rem;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#advanced-training {
    margin-bottom: 0;
}

#activities-details-tab .grid, .night-hours-view .grid {
    margin: 0;
}

#activities-details-tab .grid .column:not(:last-child), #shifts-overview-tab .grid .column:not(:last-child), .night-hours-view .grid .column:not(:last-child) {
    padding-right: 1rem;
}

#activities-details-tab .tl-date-map svg, #vehicle-activities .tl-date-map svg {
    width: 1.25rem;
    padding-left: 0;
    cursor: pointer;
}

#activities-details-tab svg.fa-circle-chevron-down, #vehicle-activities svg.fa-circle-chevron-down, .night-hours-view svg.fa-circle-chevron-down {
    height: 1.3rem;
    width: 1.3rem;
    /* The icon is centred in the label, far from any container's right edge, so a right/bottom clip
       can only be the SVG's own box. FontAwesome ships icons with overflow:visible; this app's setup
       leaves the SVG at the UA default overflow:hidden, which shaves the disc's far (bottom/right)
       edge - visible on high-DPI screens. Restore the intended overflow. */
    overflow: visible;
    transition: transform .2s ease;
}

#activities-details-tab .day-wrapper, #vehicle-activities .day-wrapper {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: .75rem;
    padding: .5rem 1rem 0 1rem;
    height: auto;
    background-color: var(--menubg);
}

.activity-timeline-selection {
    position: relative;
    display: block;
    min-width: 0;
    width: 100%;
    height: 7rem;
    box-sizing: border-box;
    vertical-align: top;
    padding: .1rem .5rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}

.activity-timeline-selection.selected {
    border-color: var(--hl);
    background-color: var(--hov);
}

#activities-details-tab .activity-timeline-selection > svg:not(.selection-toggle),
#vehicle-activities .activity-timeline-selection > svg:not(.selection-toggle) {
    display: block;
    width: 100%;
    height: 100%;
}

/* The toggle sits inside the timeline's top strip, vertically centred on the "Verstoesse /
   Genutzte Fahrzeuge" label row (drawn at y=11 in the SVG) rather than floating above the tile
   on its own; right:0 keeps it flush with the tile's right edge. */
#activities-details-tab .activity-timeline-selection svg.selection-toggle,
#vehicle-activities .activity-timeline-selection svg.selection-toggle {
    position: absolute;
    top: -0.3rem;
    right: 0;
    z-index: 1;
    width: 1.25rem;
    height: 1.25rem;
    padding: .2rem;
}

/* activity timeline zoom: a two-sided 15-minute slider crops the timeline SVG to
   the chosen window and stretches it to full width. The cell now grows to fit the
   control, so the SVG keeps its own fixed height instead of filling the cell. */
#activities-details-tab .activity-timeline-selection,
#vehicle-activities .activity-timeline-selection {
    height: auto;
}

#activities-details-tab .activity-timeline-selection > svg:not(.selection-toggle),
#vehicle-activities .activity-timeline-selection > svg:not(.selection-toggle) {
    height: 7rem;
}

/* When zoomed the SVG is cropped to the bar band and stretched horizontally
   (preserveAspectRatio="none"), which distorts labels and markers. Only the
   activity bars stay visible; the ruler below carries the undistorted time
   axis and the bars keep their tooltips. */
svg.tl-zoomed g.tl,
svg.tl-zoomed text,
svg.tl-zoomed image,
svg.tl-zoomed polygon,
svg.tl-zoomed rect.st,
svg.tl-zoomed rect.lp,
svg.tl-zoomed rect.sd,
svg.tl-zoomed rect.tvu,
svg.tl-zoomed rect[style*="fill:blue"] {
    display: none;
}

.tl-zoom {
    margin-top: 0;
}

/* the ruler row keeps its height even when empty, so the tile is the same
   height zoomed or not; only its border and ticks appear while zoomed */
.tl-zoom-ruler {
    position: relative;
    height: .7rem;
    margin-bottom: 0;
    border-top: 1px solid transparent;
}

.tl-zoom.is-zoomed .tl-zoom-ruler {
    border-top-color: var(--border);
}

.tl-zoom-tick {
    position: absolute;
    top: 2px;
    font-size: .62rem;
    color: var(--text-mid);
    white-space: nowrap;
    transform: translateX(-50%);
    font-variant-numeric: tabular-nums;
}

.tl-zoom-tick::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 50%;
    width: 1px;
    height: 2px;
    background: var(--border);
}

.tl-zoom-slider {
    position: relative;
    height: 1.2rem;
}

.tl-zoom-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    transform: translateY(-50%);
    background: var(--hov);
    border-radius: 2px;
}

.tl-zoom-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--hl);
    border-radius: 2px;
}

.tl-zoom-slider input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1.2rem;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
}

.tl-zoom-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--hl);
    border: 2px solid var(--menubg);
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, .5);
}

.tl-zoom-slider input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--hl);
    border: 2px solid var(--menubg);
    cursor: pointer;
}

.tl-zoom-slider input[type="range"]::-moz-range-track {
    background: transparent;
    border: none;
}

.tl-zoom-to {
    z-index: 2;
}

.tl-zoom-readout {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .4rem;
    margin-top: .35rem;
    font-size: .75rem;
    color: var(--text-mid);
}

/* the leading selector beats the global [type="text"] rule; we also have to undo
   its height (.9rem, too short for the text) and its asymmetric margin
   (.75rem right / 0 left, which shoved the separator toward the right field) */
.tl-zoom-readout .tl-zoom-time {
    width: 4.2em;
    box-sizing: border-box;
    height: auto;
    margin: 0;
    padding: .28rem .45rem;
    text-align: center;
    font-size: .8rem;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    background: var(--menubg);
    border: 1px solid var(--border);
    border-radius: .2rem;
}

.tl-zoom-readout .tl-zoom-time:focus {
    outline: none;
    border-color: var(--hl);
}

/* a drawn dash (not a glyph) so it is always vertically centred between the fields */
.tl-zoom-sep {
    flex: none;
    width: .7em;
    height: 2px;
    background: var(--text-mid);
    border-radius: 1px;
}

/* only shown while zoomed: a subtle "back to full day" control, sitting in the
   flow right after the time fields */
.tl-zoom-reset {
    flex: none;
    display: none;
    align-items: center;
    background: none;
    border: none;
    padding: .1rem .25rem;
    cursor: pointer;
    color: var(--tool);
    font-size: .8rem;
    line-height: 1;
}

.tl-zoom.is-zoomed .tl-zoom-reset {
    display: inline-flex;
}

.tl-zoom-reset:hover {
    color: var(--hl);
}

/* activity detail: staggered day-tile reveal (replaces the #tab-loader spinner) */
@keyframes actTileRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes actContentFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
#activities-details-tab .day-wrapper.act-reveal,
#vehicle-activities .day-wrapper.act-reveal,
.night-hours-view .night-wrapper.act-reveal,
#activities-details-tab .accordion.act-reveal,
#vehicle-activities .accordion.act-reveal,
.night-hours-view .accordion.act-reveal {
    animation: actTileRise .45s ease both;
    animation-delay: calc(var(--i, 0) * 65ms);
}
#activities-details-tab .day-wrapper.act-reveal .tl-date-map,
#vehicle-activities .day-wrapper.act-reveal .tl-date-map,
#activities-details-tab .day-wrapper.act-reveal .activity-timeline-selection,
#vehicle-activities .day-wrapper.act-reveal .activity-timeline-selection,
.night-hours-view .night-wrapper.act-reveal .tl-date-map,
.night-hours-view .night-wrapper.act-reveal .night-timeline {
    animation: actContentFade .4s ease both;
    animation-delay: calc(var(--i, 0) * 65ms + 280ms);
}
@media (prefers-reduced-motion: reduce) {
    #activities-details-tab .day-wrapper.act-reveal,
    #vehicle-activities .day-wrapper.act-reveal,
    .night-hours-view .night-wrapper.act-reveal,
    #activities-details-tab .accordion.act-reveal,
    #vehicle-activities .accordion.act-reveal,
    .night-hours-view .accordion.act-reveal,
    #activities-details-tab .day-wrapper.act-reveal .tl-date-map,
    #vehicle-activities .day-wrapper.act-reveal .tl-date-map,
    #activities-details-tab .day-wrapper.act-reveal .activity-timeline-selection,
    #vehicle-activities .day-wrapper.act-reveal .activity-timeline-selection,
    .night-hours-view .night-wrapper.act-reveal .tl-date-map,
    .night-hours-view .night-wrapper.act-reveal .night-timeline {
        animation: none;
    }
}

#activities-details-tab .activity-timeline-log-button,
#vehicle-activities .activity-timeline-log-button {
    width: 1.5rem !important;
    height: 1.5rem;
    cursor: pointer;
    color: var(--tool);
}

#activities-details-tab .activity-timeline-log-button:hover,
#vehicle-activities .activity-timeline-log-button:hover {
    color: var(--hl);
}

#activities-details-tab .activity-timeline-log-button.active,
#vehicle-activities .activity-timeline-log-button.active {
    color: var(--hl);
}

/* The master pin repeats the day tile's pin in the info bar. Highlighted when every day is
   pinned, dimmed while only some of them are, so the bar shows the state at a glance. */
/* Line the pin up with the pins of the day tiles below: those sit at the right edge of the
   timeline column - the day wrapper's 1rem padding away from the row's right edge - inset by
   their own .2rem padding and by the tile's 1px transparent border they are positioned against. */
#activities-details-tab .activity-timeline-select-all,
#vehicle-activities .activity-timeline-select-all {
    margin: 0 calc(1.2rem + 1px) 0 0;
}

/* The bar's spans float right, so the icon sits in a block of its own: a top margin centres it
   on the report icon, free of baseline maths. The width beats the bar's generic "span svg" rule. */
#activities-details-tab .activity-timeline-select-all-toggle,
#vehicle-activities .activity-timeline-select-all-toggle {
    display: block;
    width: 1.25rem !important;
    height: 1.25rem;
    margin: .2rem 0 0 0;
    padding: 0;
}

#activities-details-tab .activity-timeline-select-all-toggle:hover,
#vehicle-activities .activity-timeline-select-all-toggle:hover {
    fill: var(--hl);
}

#activities-details-tab .activity-timeline-select-all-toggle.partial,
#vehicle-activities .activity-timeline-select-all-toggle.partial {
    fill: var(--hl);
    opacity: .5;
}

/* The legend in the info bar is coloured like the day summary: the symbol itself carries the
   activity colour instead of the underline the symbols wear elsewhere. The night views (shift
   and calendar day) share the same info-bar legend, so they get the identical look. */
#activities-details-tab .activity-legend.driving svg,
#vehicle-activities .activity-legend.driving svg,
.night-hours-view .activity-legend.driving svg { fill: #ff0000; border-bottom: none; }
#activities-details-tab .activity-legend.work svg,
#vehicle-activities .activity-legend.work svg,
.night-hours-view .activity-legend.work svg { fill: var(--blue); border-bottom: none; }
#activities-details-tab .activity-legend.available svg,
#vehicle-activities .activity-legend.available svg,
.night-hours-view .activity-legend.available svg { fill: var(--yellow); border-bottom: none; }
#activities-details-tab .activity-legend.break svg,
#vehicle-activities .activity-legend.break svg,
.night-hours-view .activity-legend.break svg { fill: #66ff33; border-bottom: none; }
#activities-details-tab .activity-legend.unknown svg,
#vehicle-activities .activity-legend.unknown svg,
.night-hours-view .activity-legend.unknown svg { border-bottom: none; }

#activities-details-tab  .day-wrapper svg image,  #vehicle-activities .day-wrapper svg image {
    cursor: pointer;
}

/* the accordion continues the day tile (same background), so the toggle sits
   inside it; the gap between days comes from the accordion's bottom margin */
#activities-details-tab .accordion, #vehicle-activities .accordion, .night-hours-view .accordion {
    background-color: var(--menubg);
    margin-bottom: .6rem;
}

/* These tab panels are fixed-height flex columns that scroll (overflow-y). A flex item whose
   overflow is not visible - the accordion (overflow:hidden) - gets an automatic minimum size of
   0, so once the day list is taller than the panel flexbox squeezes the accordions toward 0 and
   overflow:hidden then clips the toggle icon. Pin every row so the panel scrolls instead of
   squashing its children. */
#activities-details-tab > *, #vehicle-activities > *, .night-hours-view > * {
    flex-shrink: 0;
}

#activities-details-tab .accordion-item-label, #vehicle-activities .accordion-item-label, .night-hours-view .accordion-item-label {
    display: inline-flex;
    box-sizing: border-box;
    /* Same width as the date column (.tl-date-map) and lined up under it: the wrapper insets its
       first column by its own 1rem left padding, which the accordion below does not have, so the
       button is nudged 1rem to sit centred right under the date and weekday. */
    width: 5rem;
    margin: 0 0 0 1rem;
    justify-content: center;
    align-items: center;
    padding: .2rem 0 .4rem;
    background: none;
    color: var(--tool);
    cursor: pointer;
}

#activities-details-tab .accordion-item-label:hover, #vehicle-activities .accordion-item-label:hover, .night-hours-view .accordion-item-label:hover {
    color: var(--hl);
}

#vehicle-activities .accordion-item-content {
    max-width: 65rem;
}

/* Smooth expand/collapse instead of an instant jump. Baseline: the content is a grid whose single
   row animates between 0fr (collapsed) and 1fr (open), so the real content height drives it without
   a magic max-height. This animates in engines that interpolate grid tracks (e.g. Firefox). Chromium
   is the exception - it will not interpolate a flexible track growing out of a 0fr row, only one
   collapsing into it, so there the panel snapped open while collapsing stayed smooth. The @supports
   block below gives every engine that has interpolate-size (Chromium 129+) an equivalent
   height 0<->auto animation that expands smoothly too. Scoped to these three timeline views; the
   app's other accordions keep their instant toggle. */
#activities-details-tab .accordion-item-content, #vehicle-activities .accordion-item-content, .night-hours-view .accordion-item-content {
    display: grid;
    grid-template-rows: 0fr;
    max-height: none;
    padding: 0;
    overflow: hidden;
    transition: grid-template-rows .3s ease;
    margin-left: .75rem;
}

#activities-details-tab .accordion-item-content > *, #vehicle-activities .accordion-item-content > *, .night-hours-view .accordion-item-content > * {
    min-height: 0;
    overflow: hidden;
}

/* The vehicle detail carried its padding on the content box (zeroed above so the collapsed row is
   truly 0 high); move it onto the inner child so it clips away together with the animation. */
#vehicle-activities .acc-body {
    padding: 1em;
}

/* The open content is inset .75rem on the left but its padding is zeroed below, so the
   right-hand tiles otherwise sit flush against the edge. Mirror the left inset on the right
   for the driver activity detail and both night views (the vehicle detail is capped at 65rem
   and already stays clear, so it is deliberately left out). */
#activities-details-tab .accordion-item-content, .night-hours-view .accordion-item-content {
    margin-right: .75rem;
}

/* The generic open-accordion rule (.accordion input:checked ~ .accordion-item-content) re-adds
   `padding: 1em`, which the collapsed base rule above deliberately zeroes. The driver/vehicle
   activity selectors carry an id, so they already outweigh it; the night view is class-only and
   lost, so on open it gained 14px of side padding - the content stopped filling the width (a gap
   on the right) and shifted 28px when toggled. Keep the padding zeroed here too so all three views
   fill the same width and the expand/collapse animation has no width reflow to jump on. */
#activities-details-tab .accordion input:checked ~ .accordion-item-content,
#vehicle-activities .accordion input:checked ~ .accordion-item-content,
.night-hours-view .accordion input:checked ~ .accordion-item-content {
    grid-template-rows: 1fr;
    padding: 0;
}

/* Chromium cannot grow a 0fr track (see above), so it snapped these panels open. Where
   interpolate-size exists it lets height:auto join a transition, so swap the grid animation for a
   height 0<->auto one that expands as smoothly as it collapses. Other engines keep the grid path. */
@supports (interpolate-size: allow-keywords) {
    #activities-details-tab, #vehicle-activities, .night-hours-view {
        interpolate-size: allow-keywords;
    }

    #activities-details-tab .accordion-item-content, #vehicle-activities .accordion-item-content, .night-hours-view .accordion-item-content {
        display: block;
        height: 0;
        transition: height .3s ease;
    }

    #activities-details-tab .accordion input:checked ~ .accordion-item-content,
    #vehicle-activities .accordion input:checked ~ .accordion-item-content,
    .night-hours-view .accordion input:checked ~ .accordion-item-content {
        height: auto;
    }
}

/* On the grid path a 0fr track still reserves the item's own padding, margin and border (see the
   shift list for the long version), so the vehicle detail held 28px of every collapsed day open.
   The driver and night panels carry their inset further in and stay at zero, so only .acc-body
   needs folding. The side padding is untouched - it costs no height. */
@supports not (interpolate-size: allow-keywords) {
    #vehicle-activities .acc-body {
        padding-top: 0;
        padding-bottom: 0;
        transition: padding-top .3s ease, padding-bottom .3s ease;
    }

    #vehicle-activities .accordion input:checked ~ .accordion-item-content .acc-body {
        padding-top: 1em;
        padding-bottom: 1em;
    }
}

#activities-details-tab table, .night-hours-view table {
    table-layout: fixed;
}

/* The day summary is split into two stacked rows: the four coloured activity types on top
   (dds-primary), the uncoloured unknown time plus the event/check/violation/vehicle counts
   below (dds-secondary). border-box keeps the 1% padding inside the column width so the
   columns sum to 100% and do not overflow their container. */
#activities-details-tab .driver-day-summary th, #activities-details-tab .driver-day-summary td {
    padding: 1%;
    text-align: center;
    box-sizing: border-box;
}

#activities-details-tab .dds-primary th, #activities-details-tab .dds-primary td {
    width: 15%;
}

/* The working-hours total (driving + work) gets the wide last column, like the night
   summary's total. Its two symbols are joined by a plus so it reads as their sum. */
#activities-details-tab .dds-primary th:last-child, #activities-details-tab .dds-primary td:last-child {
    width: 40%;
}

#activities-details-tab .dds-plus {
    margin: 0 .2rem;
    vertical-align: middle;
    color: var(--text);
    position: relative;
    top: -.5rem;
}

#activities-details-tab .dds-secondary {
    margin-top: .75rem;
}

#activities-details-tab .dds-secondary th, #activities-details-tab .dds-secondary td {
    width: 15%;
}

#activities-details-tab .dds-secondary th:last-child, #activities-details-tab .dds-secondary td:last-child {
    width: 40%;
}

/* Colour the activity symbols in their timeline colour instead of a coloured underline; the
   unknown symbol and the event icons stay uncoloured in the second row. */
#activities-details-tab .driver-day-summary .driving svg { fill: #ff0000; border-bottom: none; }
#activities-details-tab .driver-day-summary .work svg { fill: var(--blue); border-bottom: none; }
#activities-details-tab .driver-day-summary .available svg { fill: var(--yellow); border-bottom: none; }
#activities-details-tab .driver-day-summary .break svg { fill: #66ff33; border-bottom: none; }
#activities-details-tab .driver-day-summary .unknown svg { border-bottom: none; }

/* The vehicle day summary mirrors the driver's: four coloured activity types plus the
   driving+work total on top (vds-primary), and - since a vehicle has no card-specific counts -
   only the drivers that drove it on the second row (vds-secondary). */
#vehicle-activities .vehicle-day-summary {
    table-layout: fixed;
}

#vehicle-activities .vehicle-day-summary th, #vehicle-activities .vehicle-day-summary td {
    padding: 1%;
    text-align: center;
    box-sizing: border-box;
}

#vehicle-activities .vds-primary th, #vehicle-activities .vds-primary td {
    width: 15%;
}

/* The working-hours total (driving + work) gets the wide last column, like the driver summary;
   its two symbols are joined by a plus so it reads as their sum. */
#vehicle-activities .vds-primary th:last-child, #vehicle-activities .vds-primary td:last-child {
    width: 40%;
}

#vehicle-activities .vds-plus {
    margin: 0 .2rem;
    vertical-align: middle;
    color: var(--text);
    position: relative;
    top: -.5rem;
}

/* A single full-width cell listing the drivers, centred by the base rule like the driver summary.
   table-layout:fixed leaves a lone column at its content width (left-aligned in the table), so
   force it to span the whole table - only then does the centred content sit in the middle. */
#vehicle-activities .vds-secondary {
    margin-top: .75rem;
}

#vehicle-activities .vds-secondary th, #vehicle-activities .vds-secondary td {
    width: 100%;
}

/* Several drivers: set each name apart with a gap and a dot, so two names never read as one long
   name. The first name has no leading separator, and a single driver shows none at all. */
#vehicle-activities .vds-secondary .vds-driver:not(:first-child)::before {
    content: "\00B7";
    margin: 0 .65rem;
}

/* Colour the activity symbols in their timeline colour instead of a coloured underline, exactly
   like the driver day summary. */
#vehicle-activities .vehicle-day-summary .driving svg { fill: #ff0000; border-bottom: none; }
#vehicle-activities .vehicle-day-summary .work svg { fill: var(--blue); border-bottom: none; }
#vehicle-activities .vehicle-day-summary .available svg { fill: var(--yellow); border-bottom: none; }
#vehicle-activities .vehicle-day-summary .break svg { fill: #66ff33; border-bottom: none; }

#activities-details-tab .driver-card-insertions td, #activities-details-tab .driver-card-insertions th {
    padding: 1%;
    width: 7%;
}

#activities-details-tab .driver-card-insertions td:first-child, #activities-details-tab .driver-card-insertions th:first-child {
    width: 17%;
}

#activities-details-tab .driver-card-insertions td:nth-child(3), #activities-details-tab .driver-card-insertions th:nth-child(3) {
    width: 12%;
}

#activities-details-tab .driver-card-insertions td:nth-child(4), #activities-details-tab .driver-card-insertions th:nth-child(4) {
    width: 22%;
}

#activities-details-tab .driver-card-insertions td:nth-child(5), #activities-details-tab .driver-card-insertions th:nth-child(5) {
    width: 13%;
}

#activities-details-tab table.driver-card-insertions svg {
    padding: 0 .25rem 0 0;
    vertical-align: text-bottom;
}

#activities-details-tab table.driver-card-insertions svg.fa-rotate-180 {
    padding: 0 0 0 .25rem;
}

#activities-details-tab table.vehicle-activities td {
    display: inline-flex;
    flex-direction: column;
    width: 31%;
    padding: 1%;
}

#activities-details-tab table.vehicle-activities td div.activities {
    display: inline-flex;
    flex-direction: row;
    gap: 0.5rem;
    margin: 0 auto;
}

#activities-details-tab table.vehicle-activities td div.activities div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: .25rem;
    color: var(--text);
    letter-spacing: 0;
}

#activities-details-tab table.vehicle-activities td div.license-plate {
    margin-bottom: .5rem;
    border-bottom: 0.05rem solid var(--border-dark);
    text-align: center;
}

#activities-details-tab table.vehicle-activities td svg {
    width: auto;
    fill: var(--text-dark);
}

/* Use the reworked coloured icons (like the day/night summaries): colour each activity
   symbol itself instead of putting a dark icon on a coloured pill. */
#activities-details-tab table.vehicle-activities td div.vehicle-driving svg {
    fill: var(--red);
}

#activities-details-tab table.vehicle-activities td div.vehicle-work svg {
    fill: var(--blue);
}

#activities-details-tab table.vehicle-activities td div.vehicle-available svg {
    fill: var(--yellow);
}

#activities-details-tab table.vehicle-activities td div.vehicle-break svg {
    fill: var(--green);
}
#activities-details-tab .violations-evaluation th, #activities-details-tab .violations-evaluation td {
    padding: 1%;
    width: 8%;
}

#activities-details-tab .violations-evaluation th:first-child, #activities-details-tab .violations-evaluation td:first-child {
    width: 16%;
}

#activities-details-tab .violations-evaluation th:nth-child(3), #activities-details-tab .violations-evaluation td:nth-child(3) {
    width: 10%;
}

#activities-details-tab .violations-evaluation th:last-child, #activities-details-tab .violations-evaluation td:last-child {
    width: 58.5%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: break-spaces;
}

#activities-details-tab .border-crossings th, #activities-details-tab .border-crossings td {
    padding: 1%;
    width: 18%;
}

#activities-details-tab .loads-unloads th, #activities-details-tab .loads-unloads td {
    padding: 1%;
    width: 22%;
}

#activities-details-tab .events-faults th:first-child, #activities-details-tab .events-faults td:first-child {
    width: 13.5%;
}

#activities-details-tab .events-faults th, #activities-details-tab .events-faults td {
    padding: 1%;
    width: 10%;
}

#activities-details-tab .events-faults th:nth-child(2), #activities-details-tab .events-faults td:nth-child(2) {
    width: 23.5%;
}

#activities-details-tab .events-faults th:last-child, #activities-details-tab .events-faults td:last-child {
    width: 45%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: break-spaces;
}

#activities-details-tab .traffic-control th, #activities-details-tab .traffic-control td {
    padding: 1%;
    width: 10%;
}

#activities-details-tab .traffic-control th:nth-child(2), #activities-details-tab .traffic-control td:nth-child(2) {
    width: 13.5%;
}

#activities-details-tab .traffic-control th:nth-child(3), #activities-details-tab .traffic-control td:nth-child(3) {
    width: 21%;
}

#activities-details-tab .traffic-control th:last-child, #activities-details-tab .traffic-control td:last-child {
    width: 30%;
}

#activities-details-tab .traffic-control svg {
    padding: 0 .5rem 0 0;
    vertical-align: text-bottom;
}

/* Night hours. Mirrors the details tab layout, but one row per night or per calendar day
   instead of per calendar day only. Scoped by class, not by the container id: the shift and
   the calendar view are two containers and would otherwise need every rule here twice.
   The timeline comes from SvgGenerator::generateNightTimeline rather than the day timeline -
   the shift window spans two dates and does not fit the latter's fixed 0-1440 minute axis. */
.night-hours-view .night-wrapper {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: .75rem;
    padding: 1rem 1rem 0 1rem;
    height: auto;
    background-color: var(--menubg);
}

/* The over-midnight view shows two dates next to a time axis, which does not fit the 5rem the
   other timeline views use - it takes the width off the timeline instead. Only this view widens;
   the calendar day shows a single date and stays narrow. All three have to move together: the
   grid column, the date cell inside it and the accordion button below, or the button stops
   sitting centred under the date. Bounded below at 1201px because everything stacks under
   75rem (=1200px), where the column goes full width. */
@media (min-width: 1201px) {
    #night-hours-tab .night-wrapper {
        grid-template-columns: 6.5rem minmax(0, 1fr);
    }

    #night-hours-tab .tl-date-map,
    #night-hours-tab .accordion-item-label {
        width: 6.5rem;
    }
}

.night-hours-view .night-timeline {
    min-width: 0;
    height: 7rem;
    align-self: center;
    display: flex;
    align-items: center;
}

/* Both night timelines take a fixed 7rem height (like the activity timeline) so their size does
   not scale with the column width - the shift view was tiny at FHD, where the inline summary
   narrows the column, and larger at QHD. The shift view's width is automatic (isotropic, from the
   viewBox, so bars are not stretched); the calendar view overrides width to 100% in has-zoom. */
.night-hours-view .night-timeline > svg {
    display: block;
    height: 7rem;
    width: auto;
    max-width: 100%;
}

/* Calendar-day view only: the timeline cell stacks the SVG and the zoom control just like
   the activity view, so the row grows downward and the other cells align to the top. The
   SVG takes the same fixed 7rem height as the activity timeline so the zoom crop keeps a
   constant height instead of springing with the window width. */
.night-hours-view .night-wrapper.has-zoom {
    align-items: start;
}

.night-hours-view .night-wrapper.has-zoom .night-timeline {
    flex-direction: column;
    align-items: stretch;
    align-self: start;
    height: auto;
}

.night-hours-view .night-wrapper.has-zoom .night-timeline > svg {
    height: 7rem;
    width: 100%;
}

/* The window, behind the bars. Marks the whole axis in the shift view and the one or two
   night parts of the day in the calendar view. */
.night-hours-view .nb {
    fill: var(--hl);
    fill-opacity: .12;
}

/* Calendar view: the day around the night, drawn greyed under the coloured night bars. The
   two classes beat the single-class .t0..t4 fill; the bar keeps its type's height. */
.night-hours-view .tg {
    fill: #666;
}

/* The night's total only ever appears labelled - in the summary table and in the accordion
   heading. The bare number that used to sit beside the timeline is gone. */
.night-hours-view .night-total {
    font-weight: 600;
}

.night-hours-view .night-summary th, .night-hours-view .night-summary td {
    padding: 1%;
    width: 15%;
    text-align: center;
    /* Without border-box the 1% padding is added on top of each column's width, so the
       columns sum past 100% and the table overflows its container (the label spilled out
       to the right). border-box folds the padding into the width. */
    box-sizing: border-box;
}

.night-hours-view .night-summary th:last-child, .night-hours-view .night-summary td:last-child {
    width: 40%;
}

/* The used-vehicles table below the night summary, mirroring the day summary's second table.
   Its single column spans the full width - placed after the 40% rule, it wins at equal
   specificity. */
.night-hours-view .night-summary-secondary {
    margin-top: .75rem;
}

.night-hours-view .night-summary-secondary th:last-child,
.night-hours-view .night-summary-secondary td:last-child {
    width: 100%;
}

/* Colour the summary symbols in their activity colour (matching the timeline bars) instead
   of showing a coloured line beneath a white icon; drop that underline. */
.night-hours-view .night-summary .driving svg { fill: #ff0000; border-bottom: none; }
.night-hours-view .night-summary .work svg { fill: var(--blue); border-bottom: none; }
.night-hours-view .night-summary .available svg { fill: var(--yellow); border-bottom: none; }
.night-hours-view .night-summary .break svg { fill: #66ff33; border-bottom: none; }

/* The global `span svg` rule pads every wrapped symbol with 1rem on each side, so each icon in
   the total column's header claims 3rem instead of the 1rem it draws. Two icons still fitted the
   inline summary; the third one a company gets from counting availability as night work pushed
   the header past the column's right edge. The symbols carry their own spacing here. */
.night-hours-view .night-summary th span svg {
    margin: 0 .3rem;
}

/* The "+" between the driving and work symbols in the total column's header, matching the
   day summary. top nudges it back to the icons' optical middle (they sit low on the line). */
.night-hours-view .night-summary .dds-plus {
    margin: 0 .2rem;
    vertical-align: middle;
    color: var(--text);
    position: relative;
    top: -.5rem;
}

.night-hours-view p.hint {
    color: var(--text2);
    font-size: .8rem;
    margin: .5rem 0 0 0;
}

/* Summary tables live in two places: inside the accordion (default) and, at wide
   resolutions, inline to the right of the timeline row. The Twig renders both copies;
   exactly one is visible at a time. Below the thresholds the inline copy stays hidden
   and the accordion keeps the summary, so nothing changes on narrower screens.
     - Activities > detailed overview : QHD and up (>= 2500px)
     - Night hours  > calendar day    : QHD and up (>= 2500px)
     - Night hours  > shift           : FHD and up (>= 1900px, includes QHD) */
.day-summary-inline,
.night-summary-inline {
    display: none;
}

/* FHD and up: the shift view has room for the summary beside the timeline. */
@media (min-width: 1900px) {
    /* Same widened date column as below FHD, now with the inline summary as a third track. */
    #night-hours-tab .night-wrapper {
        grid-template-columns: 6.5rem minmax(0, 1fr) auto;
    }
    #night-hours-tab .night-summary-inline {
        display: block;
        align-self: center;
        width: 24rem;
    }
    #night-hours-tab .night-summary-section {
        display: none;
    }
    /* Every night now carries the inline summary with the same coloured symbols, so the info-bar
       legend is redundant from FHD up - exactly as the activity detail hides its legend. Below
       1900px the summary sits in the accordion and the legend returns. */
    #night-hours-tab .activity-legend {
        display: none;
    }
}

/* QHD and up: the wider activity summary and the calendar-day night summary fit too. */
@media (min-width: 2500px) {
    #activities-details-tab .day-wrapper {
        grid-template-columns: 5rem minmax(0, 1fr) auto;
    }
    #activities-details-tab .day-summary-inline {
        display: block;
        align-self: center;
        width: 30rem;
    }
    #activities-details-tab .day-summary-section {
        display: none;
    }

    /* The vehicle detailed overview gets the same inline summary beside the timeline. */
    #vehicle-activities .day-wrapper {
        grid-template-columns: 5rem minmax(0, 1fr) auto;
    }
    #vehicle-activities .day-summary-inline {
        display: block;
        align-self: center;
        width: 30rem;
    }
    #vehicle-activities .day-summary-section {
        display: none;
    }

    /* The inline summary takes the timeline column's right edge - and with it the tile pins -
       30.75rem further left, so the info bar's pin follows to stay in the same column. */
    #activities-details-tab .activity-timeline-select-all,
    #vehicle-activities .activity-timeline-select-all {
        margin-right: calc(31.95rem + 1px);
    }

    /* Every day/night now carries the inline summary with the same symbols, so the legend in the
       info bar is redundant here. The calendar-day night view reaches its inline summary at this
       same 2500px (the shift view already dropped its legend at 1900px above). Below 2500px the
       summary sits in the accordion and the legend returns. */
    #activities-details-tab .activity-legend,
    #vehicle-activities .activity-legend,
    #night-hours-calendar-tab .activity-legend {
        display: none;
    }

    #night-hours-calendar-tab .night-wrapper {
        grid-template-columns: 5rem minmax(0, 1fr) auto;
    }
    /* The calendar row is taller than the timeline graphic (the zoom slider sits below it), so
       align to the top and centre the summary within the timeline's own 7rem height - it then
       sits level with the timeline bars, like the shift tab. */
    #night-hours-calendar-tab .night-summary-inline {
        display: grid;
        align-items: center;
        align-self: start;
        height: 7rem;
        width: 24rem;
    }
    #night-hours-calendar-tab .night-summary-section {
        display: none;
    }
}

#activities-list-tab svg.fa-circle-chevron-right {
    padding-bottom: 0 !important
}

.activities-table tr {
    display: flex;
    flex-direction: row;
}

/* Centre each row's cells vertically. The activity symbol in the first cell makes a row taller
   than its single line of text, and the flex row's default stretch left the text (and the other
   cells) sitting at the top, so the gap above the text was smaller than the gap below. Centring
   gives every row an equal top/bottom breathing space. Scoped to the three detailed tables:
   activity detail and both night-hours views. */
#activities-details-tab .activities-table tr,
.night-hours-view .activities-table tr {
    align-items: center;
}

/* Match the row height of the driver-card table sitting next to these (the "Fahrerkarte" tile),
   so the two line up. The shared cell rule below pads 1% on every side (~10px top and bottom on a
   wide table) and the first-cell symbol adds another .25rem, which made the rows noticeably taller
   than the neighbour. Trade the percentage vertical padding for a small fixed one and drop the
   symbol's extra vertical padding (align-items above now handles the centring). .52rem lands the
   flex row (whose 1rem symbol is a touch taller than the text line) on the same ~36.5px as the
   neighbour. Horizontal padding stays on the shared 1% rule. Scoped to the three detailed tables. */
#activities-details-tab .activities-table th, #activities-details-tab .activities-table td,
.night-hours-view .activities-table th, .night-hours-view .activities-table td,
#act-list .activities-table th, #act-list .activities-table td,
#driver-shifts .activities-table th, #driver-shifts .activities-table td {
    padding-top: .52rem !important;
    padding-bottom: .52rem !important;
}

#activities-details-tab .activities-table td svg,
.night-hours-view .activities-table td svg,
#act-list .activities-table td svg,
#driver-shifts .activities-table td svg {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.activities-table th, .activities-table td {
    padding: 1% !important;
    width: 12.2% !important;
}

#vehicle-activities .activities-table th, #vehicle-activities .activities-table td {
    padding: 1% !important;
    width: 9.5% !important;
}

#vehicle-activities .activities-table th:nth-child(8), #vehicle-activities .activities-table td:nth-child(8) {
    padding: 1% !important;
    width: 17.5% !important;
}

.activities-table {
    margin-bottom: 2rem;
}

.activities-table td:first-child svg {
    padding-left: 1rem;
    width: 1rem;
    height: 1rem;
    fill: var(--act-color, var(--text));
}

/* --act-color is set per row by the .act-* rules below and inherits down to the symbol; every
   other symbol keeps the plain text colour through the fallback. */
#activities-details-tab table svg, #activities-list-tab table svg, #act-weekly th svg, #driver-shifts-head .head-elements .cell svg, #vehicle-activities table svg, .night-hours-view table svg {
    height: 1rem;
    width: 1rem;
    fill: var(--act-color, var(--text));
    padding-bottom: 0.5rem;
}

/* A row of the detailed activity table wears the colour of its activity type, the same one the
   info-bar legend and the day summary use. The colour rides on custom properties so the symbol
   rule above stays the single place that fills it; --act-rgb carries the same colour as raw
   channels for the translucent derivatives below. The unknown type stays uncoloured, as it is
   in the legend. */
.activities-table tbody tr.act-driving   { --act-color: #ff0000;       --act-rgb: 255, 0, 0; }
.activities-table tbody tr.act-work      { --act-color: var(--blue);   --act-rgb: 0, 153, 255; }
.activities-table tbody tr.act-available { --act-color: var(--yellow); --act-rgb: 253, 177, 3; }
.activities-table tbody tr.act-break     { --act-color: #66ff33;       --act-rgb: 102, 255, 51; }

/* Just a breath of the colour behind the row - the hover highlight sets a solid background and
   wins on specificity, so hovering still reads. */
.activities-table tbody tr.act-driving,
.activities-table tbody tr.act-work,
.activities-table tbody tr.act-available,
.activities-table tbody tr.act-break {
    background-color: rgba(var(--act-rgb), .03);
}

/* The symbol gets a soft halo in its own colour, so it stands out against the tinted row. */
.activities-table tbody tr.act-driving td:first-child svg,
.activities-table tbody tr.act-work td:first-child svg,
.activities-table tbody tr.act-available td:first-child svg,
.activities-table tbody tr.act-break td:first-child svg {
    filter: drop-shadow(0 0 .2rem rgba(var(--act-rgb), .55));
}

#activities-details-tab table svg, .night-hours-view table svg {
    padding-top: .25rem;
    padding-bottom: .25rem;
}

#fs-driving-license {
    margin-bottom: 4rem
}

div#vehicle-technical-data {
    min-width: 18rem;
    max-width: 33%;
}

div#company-locks {
    margin-top: 3rem;
}

div#company-locks dl.scroll {
    max-height: calc(100vh - 24.5rem);
    overflow-y: scroll;
}

div#company-locks dl dt {
    width: calc(33% - 1rem);
    min-width: calc(33% - .5rem);
}

div#company-locks dl dd {
    width: calc(67% - 1rem);
}

#control-driving-license {
    margin-top: .5rem;
}
div#driving-license-controls, .overview-tab .driving-license-controls {
    padding-top: 1rem;
    max-height: calc(100vh - 11rem);
    overflow-y: scroll;
}

div#driving-license-controls .accordion-item-label, .overview-tab .driving-license-controls .accordion-item-label {
    background-color: var(--dbox);
}

div#driving-license-controls .accordion-item-label:hover, .overview-tab .driving-license-controls .accordion-item-label:hover {
    background-color: var(--hov-dark);
}

#driving-license-control .table th,
#driving-license-control .table td {
    width: calc(20% - 1rem);
    text-align: left;
}

span svg {
    margin: 0 1rem;
    height: 1rem;
    width: 1rem !important;
    fill: var(--text);
}

p span {
    float: right;
}

p span.birthdate {
    float: none;
    margin-left: 2rem;
}

th svg.violation {
    height: 2rem !important;
    width: 2.5rem !important;
}

th svg.vehicle {
    height: 2rem !important;
    width: 2rem !important;
}

#driver-overview-tab p, a {
    font-size: .9em;
    padding: 0.375rem .5rem;
    line-height: .9em;
}

#driver-overview-tab p:not(.no-border) {
    border-bottom: .005rem solid var(--border-dark);
}

#driver-overview-tab #overview-graph {
    width: 85%;
    cursor: default;
}

#driver-overview-tab #violations-legend {
    margin: 1rem 0 1rem 1.5rem;
}

#driver-overview-tab #overview-legend {
    display: flex;
    gap: 2rem;
    margin: 4rem 0 1.5rem 1.5rem;
}

#driver-overview-tab p.data-available {
    border-bottom: .25rem solid var(--green);
}

#driver-overview-tab p.no-data-available {
    border-bottom: .25rem solid var(--red);
}

#driver-overview-tab p.driver-present {
    border-bottom: .25rem solid var(--blue);
}

#driver-overview-tab p.not-relevant {
    border-bottom: .25rem solid #eeeeee;
}

#violations-graph svg text {
    cursor: default;
}

#driver-overview-tab g.hand, #driver-overview-tab text.hand {
    cursor: pointer;
}

#driver-overview-tab g.hand:hover circle.cls-2 {
    fill:#00FFFF;
}

#driver-overview-tab div.grid {
    margin-bottom: .5rem;
}

#driver-overview-tab div.grid.big-spacing {
    margin-bottom: 1rem;
}

.opened svg {
    color: var(--hl);
    transform: rotate(90deg) !important;
}

.table th.xtrawide, .table td.xtrawide {
    width: 9rem;
}

.table th.uwide, .table td.uwide {
    width: 25rem;
    text-align: left;
}

#act-weekly.table thead tr {
    /* One header row of the same height as every other page's band: the driver info bar sits in
       the wide first cell and the activity column symbols in theirs, so there is no separate
       symbol row (and its gap) below. Flex rather than block for two reasons: it drops the
       whitespace between the inline cells, which used to push every symbol a further 6px right
       of its own column, and it lets the symbols wrap as one group once the info bar claims the
       whole line (.head-stacked below). */
    box-sizing: border-box;
    height: calc(25px + 1rem);
    display: flex;
    flex-wrap: wrap;
    border-bottom: 0.005rem solid var(--border);
}

/* Each header cell fills the row and centres its own content, so the info bar and the column
   symbols share one middle line. The cells keep their set widths, so they stay aligned with the
   body columns; only the first one keeps its left alignment. */
#act-weekly.table thead th {
    --band-h: calc(25px + 1rem);
    height: var(--band-h);
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Flex items shrink by default; the cells have to keep their column width instead. */
    flex: none;
}

#act-weekly.table thead th:first-child {
    justify-content: flex-start;
}

/* The vehicle column is 12rem wide and left-aligned in the body, so its symbol belongs above the
   plates rather than in the middle of a 3.5rem cell. */
#act-weekly.table thead th:last-child {
    width: 12rem;
    justify-content: flex-start;
}

/* A long driver name used to fill the whole line and print over the activity symbols. Once it no
   longer fits, layoutWeeklyHeader() sets .head-stacked: the info bar then takes a line of its own
   - the same bordered band every other tab shows - and the symbols drop onto a second line, still
   above their own columns. */
#act-weekly.table.head-stacked thead tr {
    height: auto;
}

#act-weekly.table.head-stacked thead th:first-child {
    width: 100%;
    padding-right: 0;
    height: auto;
    min-height: var(--band-h);
    border-bottom: 0.005rem solid var(--border);
    /* A name longer than the entire line wraps onto further lines instead of running out of the
       table; the band grows with it. */
    white-space: normal;
    flex-wrap: wrap;
}

/* Indent the wrapped symbol row by the width of the first body column (its 42rem reservation less
   the 1rem of cell padding the reservation does not cover), so every symbol still sits above the
   column it belongs to. */
#act-weekly.table.head-stacked thead th:nth-child(2) {
    margin-left: calc(100% - 41rem);
}

/* The info bar keeps the driver-page font size, not the smaller table-header size. */
#act-weekly thead th.data-area {
    font-size: 1rem;
}

/* The column symbols carry their activity colour themselves instead of the underline the symbols
   wear elsewhere - the same look the info-bar legend and the day summaries use. Unknown stays
   uncoloured, as it is in the legend. */
#act-weekly thead th.driving svg   { fill: #ff0000;       border-bottom: none; }
#act-weekly thead th.work svg      { fill: var(--blue);   border-bottom: none; }
#act-weekly thead th.available svg { fill: var(--yellow); border-bottom: none; }
#act-weekly thead th.break svg     { fill: #66ff33;       border-bottom: none; }
#act-weekly thead th.unknown svg   { border-bottom: none; }

/* Each activity column wears a breath of its own colour, exactly as the detailed activity table
   tints its rows; --act-rgb carries the colour as raw channels for the translucent background. */
#act-weekly tbody td.act-driving   { --act-rgb: 255, 0, 0; }
#act-weekly tbody td.act-work      { --act-rgb: 0, 153, 255; }
#act-weekly tbody td.act-available { --act-rgb: 253, 177, 3; }
#act-weekly tbody td.act-break     { --act-rgb: 102, 255, 51; }

#act-weekly tbody td.act-driving,
#act-weekly tbody td.act-work,
#act-weekly tbody td.act-available,
#act-weekly tbody td.act-break {
    background-color: rgba(var(--act-rgb), .03);
}

/* The tinted cells have to span the full row height, or the colour breaks into blocks between the
   rows. The day rows are as tall as their timeline cell, so the value cells are stretched to match
   and keep their content on the timeline's baseline. */
#act-weekly.table tbody tr:not(.week):not(.week-details) td:not(:first-child) {
    height: 2.55rem;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
}

#act-weekly.table tbody tr:not(.week):not(.week-details) td:last-child {
    justify-content: flex-start;
}

#act-weekly.table tr {
    border: none;
}

#act-weekly.table td:first-child {
    height: 2.55rem;
    width: calc(100% - 42rem);
    text-align: left;
}

#act-weekly.table th:first-child {
    padding: 0 1rem 0 0;
    width: calc(100% - 42rem);
    text-align: left;
}

#act-weekly.table td {
    padding: 0.375rem 0.5rem;
    vertical-align: bottom;
}

#act-weekly.table td:last-child{
    width: 12rem;
    text-align: left;
}

/* DRIVER SHIFTS START */
#driver-shifts-head, #driver-shifts-head .data-area {
    margin: 0;
    border-bottom: solid 0.005rem var(--border);
    background: var(--bg);
}

#driver-shifts-head .head-elements {
    display: flex;
    flex-direction: row;
    margin: 0.25rem 0;
    height: 2.5rem;
    text-transform: uppercase;
}

#driver-shifts-head div.top-border {
    border-top: 0.005rem solid var(--border);
}

#driver-shifts-head div.left-border {
    margin-left: .5%;
    padding-left: 0 !important;
    border-left: 0.005rem solid var(--border);
}

#driver-shifts-head div.right-border {
    margin-right: .5%;
    padding-right: 0 !important;
    border-right: 0.005rem solid var(--border);
}

#driver-shifts .shift .accordion-item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

#driver-shifts .shift:hover {
    background: var(--hov);
}

/* The column symbols carry their activity colour themselves instead of the underline they wear
   elsewhere, matching the weekly and list overviews. Only the activity symbol is coloured - the
   small FontAwesome markers (single/team, short/long break) merely qualify the column and keep the
   text colour, but lose the underline too. */
#driver-shifts-head .head-elements .cell.driving svg:not(.svg-inline--fa)   { fill: #ff0000;       border-bottom: none; }
#driver-shifts-head .head-elements .cell.work svg:not(.svg-inline--fa)      { fill: var(--blue);   border-bottom: none; }
#driver-shifts-head .head-elements .cell.available svg:not(.svg-inline--fa) { fill: var(--yellow); border-bottom: none; }
#driver-shifts-head .head-elements .cell.break svg:not(.svg-inline--fa)     { fill: #66ff33;       border-bottom: none; }
#driver-shifts-head .head-elements .cell .svg-inline--fa                    { border-bottom: none; }

/* Each activity column wears a breath of its own colour; --act-rgb carries it as raw channels for
   the translucent background. The cells are flex items of the shift row, so they already span its
   full height and the tint reads as one continuous column. The shift's hover colour sits behind
   the 3% tint and stays legible. */
#driver-shifts div.cell.act-driving   { --act-rgb: 255, 0, 0; }
#driver-shifts div.cell.act-work      { --act-rgb: 0, 153, 255; }
#driver-shifts div.cell.act-available { --act-rgb: 253, 177, 3; }
#driver-shifts div.cell.act-break     { --act-rgb: 102, 255, 51; }

#driver-shifts div.cell.act-driving,
#driver-shifts div.cell.act-work,
#driver-shifts div.cell.act-available,
#driver-shifts div.cell.act-break {
    background-color: rgba(var(--act-rgb), .03);
}

/* Smooth expand/collapse instead of an instant jump, the same technique the timeline accordions
   use: a grid whose single row grows out of 0fr, swapped for a height 0<->auto animation wherever
   interpolate-size exists (Chromium will not interpolate a track growing out of 0fr). The panel is
   a flex item of the shift row, so it has to keep its full width while collapsed too - otherwise it
   would sit in the same flex line as the cells instead of below them. */
#driver-shifts .accordion-item-content {
    display: grid;
    grid-template-rows: 0fr;
    max-height: none;
    padding: 0;
    overflow: hidden;
    background: var(--bg);
    transition: grid-template-rows .3s ease;
}

#driver-shifts .accordion-item-content > * {
    min-height: 0;
    overflow: hidden;
}

#driver-shifts .accordion input:checked ~ .accordion-item-content {
    grid-template-rows: 1fr;
    padding: 0;
}

@supports (interpolate-size: allow-keywords) {
    #driver-shifts {
        interpolate-size: allow-keywords;
    }

    #driver-shifts .accordion-item-content {
        display: block;
        height: 0;
        transition: height .3s ease;
    }

    #driver-shifts .accordion input:checked ~ .accordion-item-content {
        height: auto;
    }
}

/* The chevron turns with the panel rather than snapping to its new angle. */
#driver-shifts .accordion-item-label svg {
    transition: transform .3s ease, color .3s ease;
}

/* .shift-details IS the panel, not a child of it - its width is what makes the panel wrap below the
   cells instead of sharing their flex line. The panel's own padding and border are zeroed above so
   that the collapsed row is truly zero high (padding and a border would still be drawn); the inset
   and the separator move onto the inner .grid, where they are clipped away with the content. The
   geometry stays as it was: separator flush under the shift row, 1em of air, the tiles, 1em of air. */
#driver-shifts div.shift-details {
    width: calc(100% - 1rem);
}

#driver-shifts div.shift-details > .grid {
    margin: 0 0 1em 1em;
    padding-top: 1em;
    border-top: solid 0.005rem var(--border-dark);
}

#driver-shifts div.rest-time {
    width: 81%;
    padding-right: 19%;
    text-align: center;
    line-height: 2rem;
    border-bottom: solid 0.005rem var(--border-dark);
}

#driver-shifts div.cell, #driver-shifts-head .head-elements div.cell {
    display: inline-block;
    padding: .325rem .5%;
    font-weight: 300;
    font-size: .9em;
    line-height: 1.75em;
    cursor: default;
}

#driver-shifts-head .head-elements div.cell {
    line-height: 2.5em;
}

#driver-shifts label.w1, #driver-shifts-head .head-elements div.w1{
    width: 2%;
}

#driver-shifts div.w2, #driver-shifts-head .head-elements div.w2 {
    width: 10%;
}

#driver-shifts div.w3, #driver-shifts-head .head-elements div.w3 {
    width: 4%;
    text-align: center;
}

#driver-shifts div.w4, #driver-shifts-head .head-elements div.w4 {
    width: 24%;
}

#driver-shifts label.w1.accordion-item-label {
    padding: .325rem .5%;
    cursor: pointer;
}

#driver-shifts-head .head-elements .cell .svg-inline--fa {
    padding-left: 0;
    padding-right: 0;
    margin-left: .25rem;
}

#driver-shifts-head svg.fa-person-digging, #driver-shifts-head svg.fa-truck-moving {
    height: 1.35rem !important;
    width: 1.35rem !important;
}

div.shift-details .grid {
    border-bottom: solid 0.005rem var(--border-dark);
}

/* Engines without interpolate-size (Firefox) run the 0fr grid path above. A 0fr track sizes to the
   item's automatic minimum, and min-height:0 only zeroes its content - the item's own margin,
   padding and border still count, so the inset .grid carries kept 30px of every collapsed shift
   row alive and the list read as if every row sat half open. Fold the inset away with the row and
   bring it back on the same curve. Chromium animates height instead and is left untouched. */
@supports not (interpolate-size: allow-keywords) {
    #driver-shifts div.shift-details > .grid {
        margin-bottom: 0;
        padding-top: 0;
        border-top-width: 0;
        border-bottom-width: 0;
        transition: margin-bottom .3s ease, padding-top .3s ease, border-width .3s ease;
    }

    #driver-shifts .accordion input:checked ~ .accordion-item-content > .grid {
        margin-bottom: 1em;
        padding-top: 1em;
        border-top-width: .005rem;
        border-bottom-width: .005rem;
    }
}

div.shift-graph {
    height: calc(100vh - 15rem);
    width:100%;
}
/* DRIVER SHIFTS END */

/* NIGHT HOURS GRAPH START */
/* The night distribution graph reuses .shift-graph, but sits full width below the night's
   tables rather than filling a column on its own, so it takes a fixed, contained height
   instead of the shift graph's viewport-tall one. Scoped to the night view so it outweighs
   both .shift-graph rules (the base one and the responsive one in the media query below). */
.night-hours-view div.night-graph {
    height: 28rem;
    width: 100%;
}
/* NIGHT HOURS GRAPH END */

th svg, span svg {
    padding-bottom: 0.5rem;
}
/* The day detail expands and collapses smoothly instead of jQuery animating a row's width, height
   and opacity at once. Same technique as the timeline accordions: the cell is a grid whose single
   row grows out of 0fr, so the real content height drives it without a magic max-height. Chromium
   refuses to interpolate a track growing out of 0fr, so the @supports block further down swaps in
   an equivalent height 0<->auto animation there. The row itself stays in the layout at zero height,
   hence no border of its own. */
#act-list.table tr.day-data {
    display: flex;
    align-items: flex-start;
    border-bottom: 0;
}

#act-list.table tr.day-data > td.list-details {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows .3s ease;
}

#act-list.table tr.day-data.open > td.list-details {
    grid-template-rows: 1fr;
}

#act-list .list-details > * {
    min-height: 0;
    overflow: hidden;
}

@supports (interpolate-size: allow-keywords) {
    #activities-list-tab {
        interpolate-size: allow-keywords;
    }

    #act-list.table tr.day-data > td.list-details {
        display: block;
        height: 0;
        transition: height .3s ease;
    }

    #act-list.table tr.day-data.open > td.list-details {
        height: auto;
    }
}


/* The chevron turns with the panel rather than snapping to its new angle. */
#act-list .acc svg {
    transition: transform .3s ease, color .3s ease;
}

#act-list.table tr {
    display: flex;
    flex-direction: row;
}

#act-list.table tr.week td {
    width: 100%;
    text-align: center;
}

#act-list th, #act-list td {
    width: 5.5rem;
}

/* The child combinator keeps these column rules on the list itself - the detail tile nested inside
   carries the detailed overview's own table and must not inherit the list's header metrics. */
#act-list > thead th:nth-child(2) {
    line-height: 1.85rem;
}

#act-list th:last-child, #act-list td:last-child {
    padding-left: 0;
    width: auto;
    text-align: left;
}

#act-list td:nth-child(3), .list-details td:nth-child(3) {
    text-align: left;
}

#act-list > thead tr {
    border-bottom: solid 0.005rem var(--border);
}

/* The column symbols carry their activity colour themselves instead of the underline the symbols
   wear elsewhere - the same look the weekly overview and the day summaries use. Unknown stays
   uncoloured, as it is in the legend. */
#act-list > thead th.driving svg   { fill: #ff0000;       border-bottom: none; }
#act-list > thead th.work svg      { fill: var(--blue);   border-bottom: none; }
#act-list > thead th.available svg { fill: var(--yellow); border-bottom: none; }
#act-list > thead th.break svg     { fill: #66ff33;       border-bottom: none; }
#act-list > thead th.unknown svg   { border-bottom: none; }

/* Each activity column wears a breath of its own colour, exactly as the weekly overview tints its
   columns and the detailed table its rows; --act-rgb carries the colour as raw channels for the
   translucent background. The cells are flex items of the row, so they already span its full
   height and the tint reads as one continuous column. */
#act-list > tbody td.act-driving   { --act-rgb: 255, 0, 0; }
#act-list > tbody td.act-work      { --act-rgb: 0, 153, 255; }
#act-list > tbody td.act-available { --act-rgb: 253, 177, 3; }
#act-list > tbody td.act-break     { --act-rgb: 102, 255, 51; }

#act-list > tbody td.act-driving,
#act-list > tbody td.act-work,
#act-list > tbody td.act-available,
#act-list > tbody td.act-break {
    background-color: rgba(var(--act-rgb), .03);
}

#act-list .week {
    line-height: 2rem;
    text-align: center;
    border-bottom: solid 0.005rem var(--border);
}

#act-list .week td {
    height: 2rem;
    line-height: 3rem;
}

/* The cell is only the clipping frame for the animation now - the grey tile is the .section inside
   it, exactly as in the detailed overview. Its vertical breathing room moved onto the wrapper so it
   is clipped away with the rest when the panel closes. */
#act-list .list-details {
    width: 70% !important;
    margin: 0 7rem;
    padding: 0 !important;
    background: none;
}

#act-list .list-details-inner {
    padding-top: 1rem;
}

/* Same as the other two lists: on the grid path the wrapper's own padding survives the 0fr track,
   which left 16px under every collapsed day. Fold it away with the row. */
@supports not (interpolate-size: allow-keywords) {
    #act-list .list-details-inner {
        padding-top: 0;
        transition: padding-top .3s ease;
    }

    #act-list.table tr.day-data.open > td.list-details .list-details-inner {
        padding-top: 1rem;
    }
}

/* The detailed overview shows this tile inside an accordion, where the generic rule zeroes the
   heading's margin; keep it flush here too so the two read the same. */
#act-list .list-details .section h3 {
    margin: 0;
}

/* The list is a .table.wide, and both that and the shared .table rules are descendant selectors -
   they reach past the cell into the tile's own table and would centre its header and shrink its
   text a second time (.9em of an already .9em cell). Put the tile back on the metrics it has in
   the detailed overview; 1em resolves against the surrounding cell, which is that same size. */
#act-list .list-details .section h3,
#act-list .list-details .activities-table th,
#act-list .list-details .activities-table td {
    font-size: 1em;
}

#act-list .list-details .activities-table th,
#act-list .list-details .activities-table td {
    text-align: left;
}

#act-list .list-details .activities-table thead tr {
    border-bottom: .05rem solid var(--border-dark);
}

table#act-list .w3 {
    width: 3rem;
}

div.section {
    padding: 1rem;
    margin: 0 0 1rem 0;
    background: var(--dbox);
}

#activities-details-tab div.section h3 svg, .night-hours-view div.section h3 svg {
    width: 1rem;
    height: 1rem;
    padding: 0 .5rem 0 0;
    vertical-align: text-bottom;
}

.list-details thead, div.section thead {
    background: var(--dbox);
}

.week-details {
    padding: 0;
}

#act-weekly .week-details td:first-child
{
    height: 2rem;
    text-align: right;
    line-height: 2rem;
}

.week-details td{
    height: 2rem;
}

#act-weekly .week td 
{
    padding: 0 .5rem;
}

#act-weekly .week td:first-child
{
    height: 2rem;
    text-align: center;
    line-height: 3rem;
}

#act-weekly tr.week
{
    border-bottom: solid .05rem var(--border);
}

#act-weekly .week-details td:not(:first-child)
{
    line-height: 2rem;
    border-top: solid .05rem var(--border);
}

#ddd-history th, #ddd-history td {
    box-sizing: border-box;
    width:12%;
}

#ddd-history th:first-child, #ddd-history td:first-child {
    width:5%;
}

#ddd-history th:nth-child(2), #ddd-history td:nth-child(2) {
    width:40%;
}

#ddd-history th:nth-child(3), #ddd-history td:nth-child(3) {
    width:22%;
}

#ddd-history th:last-child, #ddd-history td:last-child {
    width:7%;
}

#vehicle-data-popup .grid .column:not(:last-child) {
    padding-right: 10%;
}

#personal-data textarea, #vehicle-data textarea {
    margin-right: 0;
    padding-left: 0.5rem;
    height: 2rem;
    width: calc(100% - 1rem);
    border: none;
    border-bottom: 0.05rem solid var(--border-dark);
    background: transparent;
    resize: vertical;
}

#double-driving-staff {
    margin-top: 3rem
}

#double-driving-staff svg {
    margin: 0.875rem 2rem;
    width: 2rem;
    height: 2rem;
}

#double-driving-staff .button {
    margin: 1rem 0
}

div#double-driving-staff-data {
    display: flex;
    flex-direction: row;
    gap: 5%
}

div#double-driving-staff-data dt, div#double-driving-staff-data dd {
    height: 1.25rem;
}

#double-driving-staff-form input, #double-driving-staff-form label.checkbox {
    margin: 0;
}

#double-driving-staff-form input.half-length {
    float: left;
    width: calc((100% - 2.7rem) / 2);
    margin-right: 0.625rem;
}

#double-driving-staff-form label.fourth-length {
    float: left;
    width: calc((100% - 5.4rem) / 4);
    margin-right: 0.625rem;
}

#double-driving-staff-form
{
    padding: 0 .5rem;
    background: var(--menubg);
}

#double-driving-staff-form dt {
    width: calc(40% - .5rem);
}

#double-driving-staff-form dd {
    width: calc(60% - 1rem);
    overflow: visible;
}

#double-driving-staff-form dd .ui.dropdown .menu {
    margin-left: -.25rem;
}

div#double-driving-staff-data div.driver-data, div#double-driving-staff-data .form {
    width: 30%;
}

div#double-driving-staff-data .form .ui.dropdown {
    display: flex;
    margin: 0;
    padding: 0.2rem 0.3rem;
    height: 0.9rem;
    width: calc(100% - 1.35rem);
    border: 1px solid var(--dropbg);
    font-size: .9em;
}

div#double-driving-staff-data svg.fa-share {
    float:right
}

div#double-driving-staff-data svg.fa-share:hover {
    cursor: pointer;
    color: var(--hl);
}

#old-driver-cards {
    margin-top: 9rem;
}

#old-driver-cards-title {
    margin-top: 6.5rem;
}

#old-driving-licenses {
    margin-top: 3rem
}

#old-driving-licenses-title {
    margin-top: 1rem;
}

#old-driver-cards .accordion-item, #old-driving-licenses .accordion-item {
    background: var(--menubg);
}

#driver-master-data .accordion {
    margin: 1rem 0;
}

#driver-master-data h2 {
    float: left;
}

div#declaration-of-consent {
    margin-top: .25rem;
}   

div#declaration-of-consent, div#acknowledgement-of-receipt {
    display: inline-block;
    width: 100%;
}

#driver-master-data #driver-groups-data, #driver-master-data #driver-locations-data {
    margin-top: 3rem;
}

#driver-master-data #locations-change-list {
    width: 100%;
}

#driver-master-data #update-driver-location label span.info {
    float: right;
    padding: 0.1rem;
}

#driver-master-data #update-driver-location svg {
    height: 0.8rem;
    width: 0.8rem;
    margin-right: 0.75rem;
}

#update-driver-location div.section, #update-vehicle-location div.section {
    width: 100%;
}

#update-vehicle-location div.checkboxText {
    display: inline-block;
    max-width: 27.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#update-vehicle-location label.checkbox {
    text-overflow: ellipsis;
    overflow-x: hidden;
    overflow-y: hidden;
}

.time-line {
    display: flex;
    flex-direction: row;
    margin-bottom: .5rem;
}

/* Carries the year and month toggles on the left and the temporary settings handle on the right. */
.time-line-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

.time-line label:not(.checkbox) {
    line-height: 1.5rem;
}

.time-line label.checkbox {
    width: 4rem;
    margin: 0 0.25rem;
}

#violations-overview {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#violations-overview div.grid, .login-page div.grid {
    margin: 0;
}

#driver-overview-tab div.grid {
    overflow-x: hidden;
}

.violation-list {
    height: calc(100vh - 12.125rem);
    overflow-y: scroll;
    background: var(--menubg);
}

.violation-tile.active {
    display: block;
}

.violation-tile.hidden, input.hidden, div.hidden, button.hidden, svg.hidden, p.hidden {
    display: none !important;
}

.violation-tile {
    display: none;
    margin: 1rem 0;
    border-bottom: 0.05rem solid var(--border-dark);
    padding: 0 0 0.25rem 0;
}

.violation-tile p, .violation-tile h4 {
    padding-left: .25rem;
}

.year-toggle {
    margin-right: 2rem !important;
}

.year-toggle span {
    background: var(--sel) !important;
}
/* TABLES END */

/* GRID START */
div.grid {
    display: flex;
    margin-bottom: 1rem;
    width: 100%;
}

div.grid.big-spacing {
    margin-bottom: 1.5rem;
}

div.grid.no-spacing {
    margin-bottom: 0;
}

.grid .column:not(:last-child) {
    padding-right: 2rem;
}

div.grid .column.one {
 width: 12.5%;
}

div.grid .column.two {
    width: 25%;
}

div.grid .column.three {
    width: 37.5%
}

div.grid .column.four {
    width: 50%;
}

div.grid .column.five {
    width: 62.5%;
}

div.grid .column.six {
    width: 75%;
}

div.grid .column.seven {
    width: 87.5%;
}

div.grid .column.eight {
    width: 100%;
}

div.grid .column.max.four {
    width: 50%;
    max-width: 44rem;
}

div.grid .column.min.four {
    min-width: 50%;
    flex-grow: 100;
}

/* GRID END */

/* FIELDS START */
form .fields {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    width: 100%;
}

form .fields label.title {
    margin: 0.75rem 0 0.35rem 0;
    display: block;
    width: 100%;
}

form .fields .field.one {
 width: 16.66%;
}

form .fields .field.two {
    width: 33.32%;
}

form .fields .field.three {
    width: 49.98%
}

form .fields .field.four {
    width: 66.64%;
}

form .fields .field.five {
    width: 83.3%;
}

form .fields .field.six {
    width: 99.96%;
}

.popup.double form .fields .field.one, .popup.triple form .fields .field.one {
    width: 7.5%;
}

.popup.double form .fields .field.two, .popup.triple form .fields .field.two {
    width: 15%;
}

.popup.double form .fields .field.three, .popup.triple form .fields .field.three {
    width: 22.5%
}

.popup.double form .fields .field.four, .popup.triple form .fields .field.four {
    width: 30%;
}

.popup.double form .fields .field.five, .popup.triple form .fields .field.five {
    width: 37.5%;
}

.popup.double form .fields .field.six, .popup.triple form .fields .field.six {
    width: 45%;
}

form .fields .field.margin {
    margin-right: 10%;
} 

[type=color], [type=date], [type=datetime-local], [type=datetime], [type=email], [type=month], [type=number],
[type=password], [type=search], [type=tel], [type=text], [type=time], [type=url], [type=week], textarea, label.checkbox {
    display: block;
    margin: 0.25rem 0.75rem 0.25rem 0;
    padding: 0.2rem 0.3rem;
    height: .9rem;
    width: calc(100% - 1.35rem);
    border: 1px solid var(--dropbg);
    background-color: var(--menubg);
    font-size: .9em;
    font-weight: 400;
    color: var(--text);
}

input[disabled]:not(input[type="color"]), .ui.dropdown.disabled {
    opacity: .3;
}

[type=color] {
    height: 1.5rem;
}

label.checkbox {
    padding-right: 0;
}

.locations-list label.checkbox {
    width: 100%;
    box-sizing: border-box;
    margin-right: 0;
    padding-right: 0 !important;
    height: auto;
    min-height: 1.1rem;
}

label.checkbox.red {
    border: 0.05rem solid var(--red);
}

label.checkbox.green {
    border: 0.05rem solid var(--green);
}

dd [type=color] {
    margin: 0;
    padding: 0;
    height: 1rem;
    width: 3rem;
}

.field [type=text]:focus, .field [type=date]:focus {
    outline: 0;
    background-color: var(--hov);
    transition: border-color .25s ease-in-out;
}

input::-webkit-datetime-edit-day-field:focus,
input::-webkit-datetime-edit-month-field:focus,
input::-webkit-datetime-edit-year-field:focus {
    background-color: var(--sel);
    outline: none;
}

.checkbox {
    display: block;
    position: relative;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: #191C24;
    line-height: 1.1rem;
  }

/* Hide the browser's default checkbox */
.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }

  /* Create a custom checkbox */
  .checkmark {
    float: left;
    height: .8rem;
    width: .8rem;
    margin-right: 0.25rem;
    background-color: #191C24;
    border: 0.005rem solid var(--border-dark);
  }

  .checkbox span.checkboxText {
    display: inline-block;
    max-width: 9.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .checkbox span.checkboxText.checkboxIcon {
    max-width: calc(100% - 2.25rem);
  }

  /* On mouse-over, add a grey background color */
  .checkbox:hover input ~ .checkmark {
    background-color: #393f4f;
  }

  /* When the checkbox is checked, add a blue background */
  .checkbox input:checked ~ .checkmark {
    background-color: #191C24;
  }

  .checkbox input:checked:hover {
    background-color: #393f4f;
  }

  /* Create the checkmark/indicator (hidden when not checked) */
  .checkmark:after {
    content: "";
    position: absolute;
    display: none;
  }
  
  /* Show the checkmark when checked */
  .checkbox input:checked ~ .checkmark:after {
    display: block;
  }
  
  /* Style the checkmark/indicator */
  .checkbox .checkmark:after {
    left: 0.6rem;
    top: 0.15rem;
    width: 0.25rem;
    height: 0.7rem;
    border: solid var(--hl);
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
  }

.checkbox span.fi {
    margin: 0 .2rem;
}

.checkbox.disabled {
    opacity: .4;
}

.field .ui.dropdown {
    display: flex;
    margin: 0.25rem 0.75rem 0.25rem 0;
    padding: 0.2rem 0.3rem;
    height: 0.9rem;
    width: calc(100% - 1.35rem);
    border: 1px solid var(--dropbg);
    font-size: .9em;
}

.field .ui.dropdown.active.visible {
    background-color: var(--hov);
}

.field .ui.dropdown .menu {
    left: 0;
    width: 100%;
    top: calc(100% + 0.05rem);
}

/* FIELDS END */

/* SVG START */
.st {
    fill: var(--text);
    font-size: .9em;
    cursor: default;
}

.st.red.arrow {
    fill: var(--red);
}

.st.arrow.yellow {
    fill: var(--yellow);
}

.tl {
    stroke:#fff;
    stroke-width:1;
}

.vc {
    fill: var(--text);
    font-size: 2.5em;
}

.om {
    fill: var(--text);
    font-size: 2.5em;
}

.t20 {
    stroke:#66ff33;
    stroke-width:8;
}

.t21 {
    stroke:var(--yellow);stroke-width:12;
}

.t22 {
    stroke:var(--blue);stroke-width:16;
}

.t23 {
    stroke:#ff0000;stroke-width:20;
}

.t24 {
    stroke:#a5a5a5;stroke-width:4;
}

.arrow {
    fill: var(--text);
}

.st.lp:hover, .st.dn:hover {
    fill: var(--hl);
}

#ls1:hover~#als1 {
    fill: var(--hl);
}
#ls1:hover~#tvu1 {
    fill: var(--hl);
}
#ls2:hover~#als2 {
    fill: var(--hl);
}
#ls2:hover~#tvu2 {
    fill: var(--hl);
}
#ls3:hover~#als3 {
    fill: var(--hl);
}
#ls3:hover~#tvu3 {
    fill: var(--hl);
}
#ls4:hover~#als4 {
    fill: var(--hl);
}
#ls5:hover~#als5 {
    fill: var(--hl);
}
#ls6:hover~#als6 {
    fill: var(--hl);
}
#ls7:hover~#als7 {
    fill: var(--hl);
}
#ls8:hover~#als8 {
    fill: var(--hl);
}
#ls9:hover~#als9 {
    fill: var(--hl);
}
#ls10:hover~#als10 {
    fill: var(--hl);
}

.ln {
    stroke:var(--bg);
    stroke-width:2;
}

.lnW {
    stroke:var(--text);
    stroke-width:.8;
}

.sd {
    height: 37px;
    fill:#535353;
}

.tvu {
    height: 37px;
    fill:transparent;
}

.t0 {
    height: 9px;
    fill:#66ff33;
}

.t1 {
    height: 13px;
    fill:var(--yellow);
}

.t2 {
    height: 17px;
    fill:var(--blue);
}

.t3 {
    height: 21px;
    fill:#ff0000;
}

.t4 {
    height: 4px;
    fill:#a5a5a5;
}

/* Marks the periods a recorded attestation covers, on its own line below the day timeline's
   flags and arrows. */
.att {
    fill: var(--attestation);
}

/* The attestation tile icon (Aktivitaeten > Detailuebersicht) wears the same colour as the
   attestation bar on the day timeline (.att above), so the tile and its marked period read as
   one. FontAwesome icons take their colour from `color` (their paths use currentColor). */
.attestation-icon {
    color: var(--attestation);
}

/* The attestation marker is centred in the tile (like the toggle icon) and pulled down onto the
   attestation bar drawn near the bottom of the day timeline - rect.att sits at viewBox y 118/120 of
   the fixed 7rem SVG, so 7.1rem below the tile top lines the icon up with that period line. It is an
   indicator, not a control: the generic `.tl-date-map svg` rule's pointer cursor is reset, and
   overflow:visible keeps the glyph from being shaved like the toggle. */
#activities-details-tab .tl-date-map {
    position: relative;
}
#activities-details-tab .tl-date-map .attestation-icon {
    cursor: pointer;
    overflow: visible;
    position: absolute;
    left: 50%;
    top: 7.1rem;
    /* The file-signature glyph renders its ink ~6.5px left of its box centre, so a plain -50%
       leaves it looking off to the left; the extra +6.5px lines the visible mark up with the
       toggle icon below it. */
    transform: translate(calc(-50% + 6.5px), -50%);
    margin: 0;
}

/* The `.attestation-icon` class now sits on the wrapping <a>, so the icon element inside only carries
   FontAwesome's `.svg-inline--fa { color: var(--text) }` and would render white. Re-apply the
   attestation colour to the icon itself (beats that rule on specificity). */
#activities-details-tab .tl-date-map .attestation-icon svg,
#activities-details-tab .tl-date-map .attestation-icon i {
    color: var(--attestation);
}

.break svg {
    border-bottom: .25rem solid #66ff33;
}

.available svg {
    border-bottom: .25rem solid var(--yellow);
}

.work svg {
    border-bottom: .25rem solid var(--blue);
}

.driving svg {
    border-bottom: .25rem solid #ff0000;
}

.unknown svg {
    border-bottom: .25rem solid #a5a5a5;
}

.ct0 {
    height: 33px;
    fill:#66ff33;
}

.ct1 {
    height: 33px;
    fill:var(--yellow);
}

.ct2 {
    height: 34px;
    fill:var(--blue);
}

.ct3 {
    height: 35px;
    fill:#ff0000;
}

.ct4 {
    height: 33px;
    fill:#a5a5a5;
}

.st0 {
    height: 15px;
    fill:#66ff33;
}

.st1 {
    height: 15px;
    fill:var(--yellow);
}

.st2 {
    height: 15px;
    fill:var(--blue);
}

.st3 {
    height: 15px;
    fill:#ff0000;
}

.st4 {
    height: 15px;
    fill:#a5a5a5;
}

.tl-date-map {
    width: 5rem;
    padding-top: 1.5rem;
    font-size: .8rem;
    text-align: center;
}

/* A night running over midnight carries two dates: it starts on the lower one and ends on the
   upper one. A small time axis beside them says so without words - a dot marks the start at the
   bottom, an arrow head the end at the top. Axis and dates form one group, centred in the column;
   that is why the column is wider here than in the other timeline views (see the 1201px block). */
.night-range {
    display: grid;
    grid-template-columns: .75rem auto;
    justify-content: center;
    align-items: center;
    gap: 0 .4rem;
    line-height: 1.5;
    text-align: left;
}

.night-rail {
    grid-row: 1 / 3;
    align-self: stretch;
    position: relative;
    width: .75rem;
}

/* The rail runs between the two markers, gaining colour towards the end of the night. */
.night-rail::before {
    content: "";
    position: absolute;
    left: 50%;
    top: .45rem;
    bottom: .34rem;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(to top, var(--tool), var(--hl));
}

.night-rail::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: .1rem;
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    transform: translateX(-50%);
    background: var(--tool);
}

.night-rail i {
    position: absolute;
    left: 50%;
    top: .08rem;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: .3rem solid transparent;
    border-right: .3rem solid transparent;
    border-bottom: .44rem solid var(--hl);
}

.night-range-from {
    color: var(--text-mid);
}

@media (max-width: 75rem) {
    #activities-details-tab .day-wrapper, #vehicle-activities .day-wrapper, .night-hours-view .night-wrapper {
        grid-template-columns: 1fr;
        gap: .5rem;
    }

    .tl-date-map {
        width: 100%;
        padding-top: 0;
    }

    .activity-timeline-selection {
        width: 100%;
    }

    /* Stacked layout: tile sits above the timeline, so aligning to the bar's height is meaningless -
       let the attestation marker flow under the date again instead of floating at 7.1rem. */
    #activities-details-tab .tl-date-map .attestation-icon {
        position: static;
        transform: none;
    }
}
/* SVG END */

/* LOGIN */
#modules {
    max-width: 27rem;
}

#modules h1 {
    margin: 2rem 0 3rem 0.7rem;
}

.module-info {
    padding-left: .5rem;
    border-left: 0.2rem solid var(--hl);
}

.module-info ul {
    padding-left: 1rem;
    line-height: 1.5em;
    color: var(--text);
}

.module-description {
    margin-bottom: 3rem;
    padding-left: 0.7rem;
}

.module-description p {
    margin-bottom: 0.5rem;
    line-height: 1.1em;
    color: var(--text);
}

#login {
    margin: auto;
    width: 100%;
    max-width: 14rem;
    padding: 1rem 2rem;
    background: var(--sel);
    border-radius: 5px;
}

#login h2 {
    margin-bottom: 1rem;
    text-align: center;
    background: none;
    border: none;
}

#login input, #fa-text input {
    margin-bottom: 0.75rem;
    height: 1.2rem;
    width: calc(100% - .6rem);
    color: var(--text-dark);
    background: var(--text);
}

#login-form {
    position: absolute;
    width: 18rem;
    height: 14rem;
    margin-top: 14rem;
    margin-left: calc((25% - 18rem)/2);
    z-index: 101;
}

#login-form a {
    padding: 0.375rem 2.125rem;
    line-height: 2.9em;
}

#login-page-banner {
    position: absolute; 
    bottom: calc((50vh - 12rem) / 2);
    left: 1rem;
    width: calc(100vw - 2rem);
    z-index: 100
}

.button {
    display: inline-block;
    padding: 0.125rem;
    text-align: center;
    font-weight: 400;
    cursor: pointer;
    border: none;
}

.button-primary {
    margin: 0 0 0 1rem;
    width: 6rem;
    font-size: .9em;
    line-height: 2em;
    letter-spacing: 1px;
    word-spacing: 2px;
    color: var(--text);
    background: var(--tool);
    border: none;
}

.button-primary.wide {
    width: 9rem;
}

.button-primary.wider {
    width: 8rem;
}

.button-primary.midwide {
    width: 10.5rem;
}

.button-primary.xtrawide {
    width: 15rem;
}

.button-primary.uwide {
    width: 22rem;
}

.button-primary:hover {
    background: var(--bhov);
}

#password-change {
    margin: 2rem auto;
    width: 15rem;
}

#password-change-text, #fa-text {
    margin: 10rem auto 0 auto;
    width: 36rem;
    z-index: 101;
}

#fa-text {
    position: absolute;
    padding: 1rem;
    background: var(--sel);
    border-radius: 5px;
    text-align: center;
}

#password-change-text p, #fa-text p {
    margin: 1rem 0;
    width: 100%;
    text-align: center;
}

#password-change-text h3, #fa-text h3 {
    text-align: center;
}

#password-change .button-primary {
    margin: 0;
}

#password-change [type=password] {
    margin: .25rem 0;
    width: calc(100% - .6rem);
}

/* ul */
ul {
    display: block;
    margin: 0;
    padding: 0;
    margin-block-start: 0;
    margin-block-end: 2em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    padding-inline-start: 0;
    list-style-type: disc;
    color: var(--text);
}

ul li {
    display: list-item;
    margin: 0 0 1rem 0;
    padding: 0;
    text-align: -webkit-match-parent;
    list-style: none;
}

/* dl */
dl {
    display: inline-block;
    margin: 0 0 1rem 0;
    height: auto;
    width: 100%;
    color: var(--text);
}

dt, dd {
    display: block;
    flex-wrap: nowrap;
    align-content: space-between;
    justify-content: flex-start;
    align-items: center;
    gap: 0.25rem;
    float: left;
    margin: 0;
    padding: 0.25rem 0.25rem 0.25rem 0.5rem;
    height: 1rem;
    width: calc(50% - 1rem);
    font-size: .9em;
    line-height: 1.25em;
    border-bottom: .05rem solid var(--border-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

dd {
    float: right;
    min-width: calc(50% - .5rem);
}

dt.no-border, dd.no-border {
    border: none;
}

dl.no-border dt, dl.no-border dd {
    border: none;
}

dl.no-border {
    border-bottom: .05rem solid var(--border-dark) !important;
}

dd .svg-inline--fa {
    padding: 0;
    width: 1.125rem;
    height: 1.125rem;
    vertical-align: text-bottom;
}

dd a {
    padding-left: 0;
}


dl#official-form-data dt{
    width: calc(62% - 1rem);
}

dl#official-form-data dd{
    width: calc(38% - 1rem);
    min-width: calc(38% - .5rem);
}


dl.violation-profile p {
    margin-left:.5rem;
}

.popup .working-time-condition, .popup .working-breaks {
    height: 100%;
    background: var(--dbox);
    padding-left: 2%;
    padding-bottom: 0.25rem;
}

.popup .working-breaks-condition {
    height: 100%;
    margin-top: 1rem;
    padding-top: .25rem;
    padding-left: 2%;
    background: var(--dbox);
}

.popup .working-time-condition label.title, .popup .working-breaks label.title {
    margin: 0;
    padding: 0.75rem 0 0.35rem 0;
}

.popup .working-time-condition [type=text], .popup .working-breaks [type=text] {
    margin: 0.25rem 0.75rem 0 0;
}

.popup .high.working-time-condition,.popup .high.working-breaks {
    padding: 0 !important;
}

#work-and-social dl dt, #work-and-social dl dd {
    height: 2rem;
}

#work-and-social dl dt {
    width: calc(65% - 1rem);
    line-height: 2rem;
}

#work-and-social dl dd {
    width: calc(35% - 0.5rem);
    min-width: calc(35% - 0.5rem);
}

#work-and-social a {
    margin: 0 !important;
}

.reminder-settings .settings-group {
    margin-bottom: 1.5rem;
}

.reminder-settings .settings-group:last-child {
    margin-bottom: 0;
}

.reminder-settings .settings-group h3 {
    margin: 0 0 .5rem 0;
}

.reminder-settings .settings-group dl {
    margin: 0;
}

.reminder-settings-form h4 {
    margin: 0.5rem 0 0 0;
    color: var(--text-mid);
}

.reminder-settings-section {
    margin-top: 1.5rem;
}

.reminder-settings-section:first-child {
    margin-top: 0;
}

.reminder-settings-section h3 {
    margin: 0 0 .5rem 0;
}

.popup-content .reminder-settings-section h3 {
    background: none;
    padding: 0 0 0 .25rem;
    width: calc(100% - .25rem);
}

.reminder-column h3 {
    margin-bottom: 1rem;
}

.reminder-column h3.no-top-margin {
    margin-top: 1.5rem;
}

.reminder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
    margin: 0 0 0.75rem;
}

.reminder-grid.single {
    grid-template-columns: minmax(0, 1fr);
}

.reminder-grid .reminder-field,
.reminder-grid .reminder-field.half,
.reminder-grid .reminder-field.full {
    width: auto !important;
    margin: 0 !important;
}

.reminder-grid .reminder-field.full {
    grid-column: 1 / -1;
}

.reminder-grid .reminder-field .ui.dropdown {
    margin: 0.25rem 0.75rem 0.25rem 0;
    width: calc(100% - 1.35rem);
}

.reminder-field {
    margin-bottom: .35rem;
}

#overlay {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--tool);
    width: 100%;
    height: 100%;
    opacity: 0.8;
    z-index: 100;
  }
  .popup {
    display: none;
    position: absolute;
    top: 1rem;
    left: calc((100vw - 35rem)/2);
    height: auto;
    width: 35rem;
    background: var(--bg);
    z-index: 200;
  }

  .popup.wide {
    width: 48rem;
    left: calc((100vw - 48rem)/2);
  }

  .popup.double, .popup.wider {
    width: 72rem;
    left: calc((100vw - 72rem)/2);
  }

  .popup.map {
    width: calc((100vw - 10rem));
    left: 5rem;
  }

  .popup.triple {
    width: 114rem;
    left: calc((100vw - 114rem)/2);
  }

  .popup-close, #temp-settings-close {
    float: right;
    padding: .5rem .5rem 0 .5rem;
    color: var(--text);
    cursor: pointer;
  }

  .popup-content {
    padding: 1.25rem;
    min-height: 20rem;
  }

  .popup-content .grid.scroll {
    overflow-y: scroll;
    max-height: calc(100vh - 5rem);
  }

  .popup div.grid {
    margin: 0;
  }

  .popup .grid .column.hidden {
    display: none;
  }

  .popup-content h3 {
    background: var(--dbox);
    padding: 0.25rem;
    width: calc(100% - .5rem);
  }

  .popup-content h3.no-top-margin {
    margin-top: 0;
  }

  .popup-content textarea {
    max-width: 100%;
  }
  .popup-content p .button {
    margin: 1rem 0 0;
    padding-bottom: 0;
  }

  .popup-content p .button svg{
    padding-top: .125rem;
    height: 1rem;
  }

.popup .button-primary {
    margin: 0 1rem 1rem;
}

#message-popup, #alert-popup, #second-layer-message-popup, #confirm-popup {
    top: calc((100vh - 12rem)/2);
}

#second-layer-message-popup {
    background: var(--dropbg);
}

#message-popup .popup-content, #alert-popup .popup-content, #second-layer-message-popup .popup-content, #confirm-popup .popup-content {
    padding: 1rem 1rem 2rem 1rem;
    min-height: 8rem;
}

#message-popup p, #alert-popup p, #second-layer-message-popup p, #confirm-popup p {
    margin: 0 1rem;
    padding: 1rem 0 4rem 0;
    vertical-align: text-bottom;
    font-size: 1.1em;
}

#message-popup p span,#confirm-popup p span {
    float:none;
}

div.upload {
    display:inline-block;
    position:relative;
    height: auto;
    min-height: 11rem;
    width: 100%;
    color: var(--text);
}

div.upload input[type="file"] {
    position:absolute;
    display: inline-block;
    left:0;
    width: 12rem;
    height: 11rem;
    opacity: 0;
    cursor:pointer;
    z-index: 1000;
}

div.company-logo-request-section {
    clear: both;
    margin-top: 5rem;
}

.logo-request-description-primary {
    margin: 1rem 0;
}

div.upload svg {
    width: 12rem;
    padding: 1.5rem 0 3.5rem 0;
    background: var(--dropbg);
    height: 6rem;
    color: var(--blue);
    border: 0.05rem dashed var(--blue);
}

div.upload p {
    position: absolute;
    top: 9rem;
    left: 0;
    width: 12rem;
    text-align: center;
}

div.upload span.file-names {
    width: calc(100% - 14rem);
    float: right;
    background: var(--dropbg);
    left: 13rem;
    padding: 0.5rem;
    height: 10.2rem;
    font-size: .9em;
    overflow-x: hidden;
    text-overflow: ellipsis;
}

div.upload #choose-files {
    display: none;
}

div#upload-zip-files {
    margin: 0 auto;
    width: 40rem;
}

/* settings slider */
#temp-settings {
    position: absolute;
    right: 0;
    top: 3.125rem;
    height: calc(100% - 3.125rem);
    overflow-x: hidden; /* Needed for initial hidden state */
    z-index: 10;
}

#temp-settings > div {
    height: 100%;
    float: left;
}

#temp-settings-content {
    width: 30rem;
    margin-right: -30rem;
    background-color: var(--dropbg);
}

#temp-settings-content > p {
    padding: 10px;
}

/* Aligned with the first row of year and month toggles it sits next to. */
#temp-settings-handle {
    display: flex;
    align-items: center;
    height: 1.5rem;
}

#temp-settings-handle svg {
    padding: 0 .25rem 0 1rem;
    cursor: pointer;
}

#temp-settings-handle svg:hover {
    color: var(--hl);
}

#temp-settings label.checkbox {
    background: var(--dropbg);
}

#temp-settings h3 {
    margin-top: 1rem;
}

/* output */
.report-settings label {
    display: block;
    margin: 0.25rem 0;
    padding: .2rem .3rem .4rem .3rem;
    width: calc(100% - .75rem);
    font-size: 1em;
    border-bottom: 0.05rem solid var(--border-dark);
}

#attestations label.checkbox, .report-units label.checkbox {
    margin-left: .5rem;
    text-overflow: ellipsis;
    overflow-x: hidden;
    overflow-y: hidden;
}

#download-manager .report-units .button {
    margin-top: .25rem;
    width: 100%;
}

#generate-attestations-report .report-settings label.title {
    margin: 0;
    padding: .35rem .3rem 0 .3rem;
    border: none;
}

#generate-attestations-report .report-settings label.checkbox {
    margin: .05rem 0;
}

#generate-attestations-report input {
    width: calc(100% - .75rem);
}

#generate-attestations-report .report-settings .ui.dropdown {
    margin: .25rem 0;
}

#generated-attestations-reports, #generated-drivers-reports,
#generated-vehicles-reports, #generated-fleet-reports, #generated-official-forms-reports {
    max-height: calc(100vh - 21.75rem);
    overflow-y: scroll;
    overflow-x: hidden;
}

#generated-attestations-reports a, #generated-drivers-reports a,
#generated-vehicles-reports a, #generated-fleet-reports a, #generated-official-forms-reports a
{
    padding: 0;
}

#generated-drivers-reports label.checkbox, #generated-vehicles-reports label.checkbox, #generated-fleet-reports label.checkbox{
    margin: 0.25rem 0.25rem 0.25rem 0;
    width: 100%;
}

#generated-vehicles-reports span.checkboxText {
    max-width: calc(100% - 2rem);
}

#generated-fleet-reports span.checkboxText {
    max-width: calc(100% - 1.25rem);
}

.report-settings [type=text]
{
    width: calc(100% - .75rem);
}

.report-settings label input {
    margin-top: .1rem;
}

.report-settings .ui.dropdown, #cal-drivers, #cal-vehicles {
    margin: .25rem 0 1rem 0;
}

.report-settings .ui.dropdown {
    border: 0.005rem solid var(--border-dark);
}

.report-settings .ui.dropdown .svg-inline--fa {
    margin-right: 0.25rem;
}

input[type='radio']:after {
    width: .7rem;
    height: .7rem;
    top: -1px;
    left: -1px;
    border-radius: .5rem;
    position: relative;
    background-color: var(--tool);
    content: '';
    display: inline-block;
    visibility: visible;
    border: 2px solid var(--bg);
}

input[type='radio']:checked:after {
    width: .7rem;
    height: .7rem;
    top: -1px;
    left: -1px;
    border-radius: .5rem;
    position: relative;
    background-color: var(--hl);
    content: '';
    display: inline-block;
    visibility: visible;
    border: 2px solid var(--bg);
}

p.report-group {
    margin-left: .25rem;
    font-size: .7rem;
}

.check-all.button-primary
{
    width: calc(100% - .6rem);
    margin: 0 0 1rem 0;
}

#generate-driver-report .button-primary
{
    position: relative;
    top: 15rem;
    width: calc(100% - .6rem);
    margin-bottom: -1rem;
}

.report-units {
    display: flex;
    flex-direction: column;
    margin: 0 0 0 3rem;
    width: 15.625rem;
}

.report-units svg {
    margin-right: .25rem;
    height: 1rem;
    width: .75rem;
    vertical-align: top;
}

.report-units div.scroll {
    max-height: calc(100vh - 10rem);
    overflow-x: hidden;
    overflow-y: scroll;
}

.report-units .hidden {
    display: none;
}

label.hidden {
    display: none;
}

input[name="creation_date"] {
    margin-bottom: 1.5rem;
}

#attestations table 
{
    width: 100%;
}

.driver-box {
    margin-bottom: .25rem;
    padding: 0.25rem;
    width: 100%;
    max-width: 17rem;
    background: var(--dbox);
    overflow-x: hidden;
}

.driver-box label.title {
    max-width: 17rem;
    overflow-x: hidden;
    text-overflow: ellipsis;
    display: block;
}


.driver-box label.checkbox {
    margin-left: .5rem;
}

/* digital clock */

#digital-clock {
    display: flex;
    flex-direction: row;
    margin-bottom: 1rem;
    width:100%;
}
#time{
    width: 12rem;
    font-family: "Roboto", 'sans-serif';
    font-size:3em;
}

#date {
    padding-top: 1.25rem;
    width: auto;
    letter-spacing:3px;
    font-size:1.5em;
    font-family: "Roboto",sans-serif;
    color:var(--text);
}

/* reports start */
.reports-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.reports-wrapper form:not(#driver-reports-tab form):not(#vehicle-reports-tab form) {
    display: flex;
    flex-direction: row;
}

.reports-wrapper .report-settings {
    display: flex;
    flex-direction: column;
    width: 20.2rem;
}

#fleet .reports-wrapper .report-settings {
    width: 41rem;
}

.reports-wrapper #report-type, .reports-wrapper #advanced-settings{
    margin-bottom: 3rem;
}

/* The driver file is the only mask with a section below the period picker ("Einstellungen
   optional"), so the period block needs the same gap underneath it that the report list and
   the language block already carry. Scoped to that tab: in the output area the language
   dropdown follows the picker, and it is meant to sit close. */
#driver-reports-tab .report-time-period {
    margin-bottom: 3rem;
}

.reports-wrapper .report-buttons {
    display: flex;
    flex-direction: column;
    margin: 0 2.5rem;
    min-width: 14rem;
    max-width: 17rem;
}

.reports-wrapper .report-buttons svg {
    width: 1rem;
    padding: 0 0.5rem 0 0;
    vertical-align: middle;
}

#generated-drivers-reports {
    margin-bottom: 1rem;
    max-height: calc(100vh - 24rem);
}

#generated-drivers-reports .svg-inline--fa, #generated-vehicles-reports .svg-inline--fa, #generated-fleet-reports .svg-inline--fa {
    padding: 0 .5rem 0 1.5rem;
    width: 1.25rem;
}

#generated-drivers-reports .svg-inline--fa.fa-eye, #generated-vehicles-reports .svg-inline--fa.fa-eye, #generated-fleet-reports .svg-inline--fa.fa-eye {
    cursor: pointer;
}

#generated-drivers-reports table, #generated-vehicle-reports table, #generated-fleet-reports table {
    width: 100%;
}

#generated-drivers-reports table td:first-child,
#generated-vehicles-reports table td:first-child {
    max-width: 13rem;
}

#generated-fleet-reports table td:first-child {
    max-width: 9rem;
}

a.green svg {
    color: var(--green);
}

.preview-wrapper {
    position: absolute;
    left: 77rem;
    -moz-transform: scale(0.58);
    -moz-transform-origin: 0 0;
    transform: scale(0.58);
    -o-transform: scale(0.58);
    transform-origin: 0 0;
    -o-transform-origin: 0 0;
    -webkit-transform: scale(0.58);
    -webkit-transform-origin: 0 0;
}

@media only screen and (min-height: 1000px) and (max-height: 1300px) {
    .preview-wrapper {
        transform: scale(0.63);
        -moz-transform: scale(0.63);
        transform-origin: 0 0;
        -moz-transform-origin: 0 0;
        -o-transform: scale(0.63);
        -o-transform-origin: 0 0;
        -webkit-transform: scale(0.63);
        -webkit-transform-origin: 0 0;
    }
}

@media only screen and (min-height: 1300px) {
    .preview-wrapper {
        transform: scale(0.82);
        -moz-transform: scale(0.82);
        transform-origin: 0 0;
        -moz-transform-origin: 0 0;
        -o-transform: scale(0.82);
        -o-transform-origin: 0 0;
        -webkit-transform: scale(0.82);
        -webkit-transform-origin: 0 0;
    }

    div.shift-graph {
        height: calc(100vh - 30rem);
    }
}

.preview-wrapper.active {
    background: white;
}

.preview
{
    height: 1425px;
    width: 1010px;
    border: 0.05rem solid var(--border-dark);
}

.button-primary.report {
    width: 100%;
    margin: 0 0 1rem 0;
}

.report-actions {
    display: none;
    margin-top: .5rem;
}

.report-actions.visible {
    display: flex;
    flex-direction: column;
}
/* reports end */

/* dash cal */
#dashboard div.grid {
    margin-bottom: 0;
}

#dashboard-doko-summary {
    display: grid;
    grid-template-columns: 12.5% repeat(5, 1fr);
    gap: 1rem;
    margin: 0 1rem 1rem 0;
}

.doko-summary-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 5.5rem;
    padding: .5rem .5rem .75rem;
    background: var(--dbox);
    border-radius: .75rem;
    box-sizing: border-box;
}

.doko-summary-card-title {
    margin-bottom: 0;
    padding: 0 0 .25rem 0;
    font-size: .9em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--text-mid);
    letter-spacing: 0;
    border-bottom: solid .1rem var(--border-dark);
}

.doko-summary-profile .doko-summary-card-title {
    color: var(--text);
    text-transform: none;
}

.doko-summary-card-value {
    font-size: .8em;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: 0;
}

.doko-summary-profile .doko-summary-card-label {
    margin-bottom: .35rem;
}

.doko-summary-profile .doko-summary-card-value {
    font-size: .9em;
    line-height: 3em;
}

.doko-summary-card-label {
    font-size: .9em;
    line-height: 1.4;
    color: var(--text);
    letter-spacing: 0;
    border-bottom: 1px solid var(--border-dark);
}

.doko-summary-stats {
    display: grid;
    gap: .75rem;
}

.doko-summary-stats.three {
    grid-template-columns: repeat(3, 1fr);
}

.doko-summary-stats.two {
    grid-template-columns: repeat(2, 1fr);
}

.doko-summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    text-align: center;
}

.doko-summary-stat .value {
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.5em;
    color: var(--text);
}

.doko-summary-stat .value.ok {
    color: var(--green);
}

.doko-summary-stat .value.soon {
    color: var(--yellow);
}

.doko-summary-stat .value.overdue {
    color: var(--red);
}

.doko-summary-stat .value.neutral {
    color: var(--text);
}

.doko-summary-stats-neutral .doko-summary-stat .value {
    color: var(--text);
}

.doko-summary-stat .value.clickable.has-popup {
    cursor: pointer;
}

.doko-summary-stat .value.clickable.has-popup:hover {
    opacity: .85;
}

.doko-summary-stat .label {
    font-size: .75em;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--text-mid);
    letter-spacing: 0;
    white-space: nowrap;
}

#dashboard.grid .dashboard-left.column:not(:last-child) {
    padding: 0;
    height: calc(100vh - 1rem);
}


#dashboard.grid .dashboard-right.column {
    /* keep the 1rem right gutter (like every other column) so the widgets
       don't touch the screen edge — matches the vertical gap between them */
    padding: 0 1rem 0 0;
    height: calc(100vh - 1rem);
}

#dashboard.grid .column {
   padding-right: 1rem;
}

#dashboard div.grid .column {
    display: flex;
    flex-direction: column;
}

#dashboard h3 {
    margin: 0;
    padding: .125rem 0;
    text-align: center;
}

#dashboard h4 {
    padding-top: 0.75rem;
    font-size: .85em;
    font-weight: 400;
}

#dashboard-banner {
    height: 7rem;
    width: calc(30% - 2.5rem);
    margin-bottom: 1rem;
    padding: 0.5rem 1rem 0 1rem;
    background: var(--dbox);
    border-radius: .75rem;
    z-index: 1;
    font-size: .9em;
    line-height: 1.2em;
}

#dashboard-banner h3 {
    margin-bottom: 0.5rem;
    border-bottom: 0.005rem solid var(--border-dark);
    font-size: 1.2em;
    text-align: left;
}

#dashboard-banner span.holiday-date {
    display: inline-block;
    margin-bottom: 0.5rem;
    border-bottom: 0.125rem solid var(--red);
}

#dashboard-banner .slideshow {
    position: relative;
    padding: 0 1rem;
    height: 4.5rem;
    width: calc(100% - 2rem);
    color: var(--text);
    overflow: hidden;
}

#dashboard-banner .slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 2rem);
    height: 100%;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s, visibility 0.4s;
}

#dashboard-banner .slideshow .slide.is-active {
    visibility: visible;
    opacity: 1;
}

#dashboard-calendar {
    width: calc(30% - 0.5rem);
    aspect-ratio: 1 / 1;
    padding: 1rem;
    background: var(--dbox);
    border-radius: .75rem;
    z-index: 1;
}

#dashboard-calendar .fc .fc-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
}

#dashboard-calendar .fc .fc-toolbar-chunk {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .5rem;
}

.fc .fc-toolbar-chunk:last-child:empty {
    display: none !important;
}

#dashboard-calendar .fc .fc-button-group {
    display: flex;
    flex-wrap: nowrap;
}

#dashboard-calendar .fc .fc-toolbar-title {
    white-space: nowrap;
}

.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events {
    position: relative;
    min-height: 2em;
}

/* Day-cell event icons: lay the (up to three) icons out in a single centered,
   evenly-spaced horizontal row with a constant height. FullCalendar stacks the
   event "harnesses" vertically by default, which made cells — and the whole
   calendar — grow taller with each extra icon. A fixed-height flex row keeps the
   calendar the same height regardless of how many icons a day holds. */
#dashboard-calendar .fc-daygrid-day-events {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    height: 2em;
    min-height: 2em;
    margin-top: 1px;
    overflow: hidden;
}

/* Neutralize FullCalendar's clearfix pseudo-elements so they don't become flex
   items and throw off the centering / spacing. */
#dashboard-calendar .fc-daygrid-day-events::before,
#dashboard-calendar .fc-daygrid-day-events::after {
    content: none;
}

/* Each event becomes an inline icon instead of a stacked block. */
#dashboard-calendar .fc-daygrid-event-harness {
    position: static;
    margin: 0;
    flex: 0 0 auto;
}

#dashboard-calendar .fc-daygrid-event-harness .fc-daygrid-event {
    margin: 0;
}

#dashboard-calendar .fc-daygrid-day-events a {
    padding: .1rem 0;
    line-height: 1;
}

/* The event title is empty, so FullCalendar fills it with a non-breaking space
   that sits to the right of the icon glyph (rendered via ::before) and pushes
   the visible icon off-centre. Collapse that whitespace to zero width and
   restore the glyph size explicitly (12.6px = the former .9em at the 14px
   calendar base) so the icons are truly centred and evenly spaced. */
#dashboard-calendar .fc-daygrid-day-events .fc-event-title {
    font-size: 0;
    padding: 0;
}

#dashboard-calendar .fc-daygrid-day-events .fc-event-title::before {
    font-size: 12.6px;
}

/* The empty "+more" placeholder must not participate in the row. */
#dashboard-calendar .fc-daygrid-day-bottom {
    display: none;
}

#dashboard #violations-graph {
    margin-right: 1rem;
    padding: 1rem;
    height: calc(33.3% - 3rem);
    background: var(--dbox);
}

#dashboard #violations-graph p {
    font-size: .85em;
    border-bottom: .05rem solid var(--border-dark);
}

.conspicuousness {
    margin-bottom: 1rem;
    padding: 1rem;
    width: calc(100% - 2rem);
    background: var(--dbox);
    border-radius: .75rem;
}

.conspicuousness h3 {
    text-align: left;
    border: none;
}

.conspicuousness p {
    font-size: .8em;
    line-height: .9em;
    letter-spacing: 0;
    color: var(--text-mid);
}
.conspicuousness a {
    padding: 0;
    font-size: .85em;
    line-height: 3em;
    cursor: default;
}
.conspicuousness a.red {
    padding-bottom: 0.15rem;
    line-height: 2.75em;
    color: var(--text);
    border-bottom: .125rem solid var(--red);
    cursor: pointer;
}
.conspicuousness a.blue {
    padding-bottom: 0.15rem;
    line-height: 2.75em;
    color: var(--text);
    border-bottom: .125rem solid var(--blue);
    cursor: pointer;
}
#downloads div.chart-wrapper
{
    width: 33.3%;
    height: 100%;
}

#downloads div.chart-wrapper-single
{
    width: 100%;
    height: 100%;
}

#downloads.single, #legend.single {
    margin: 0;
}

#chart, #chart2, #chart3, #chart4 {
    height: calc(100% - 1.5rem);
}
.conspicuousness .row {
    display: flex;
    flex-direction: row;
    padding: .5rem 0;
    height: 2.13rem;
    border-bottom: .05rem solid var(--border-dark);
}

.conspicuousness .svg-inline--fa {
    padding: .25rem 0.35rem;
    height: 1.75rem;
    color: var(--yellow);
}

.conspicuousness .description {
    width: 100%;
}

.conspicuousness .button-primary {
    margin: .5rem 0 0 0.5rem;
    width: 4rem;
    font-size: .8em;
    line-height: 1.8em;
    color: var(--text);
}

#violations-ratio, #downloads {
    margin: 1rem 1rem 0 0;
    padding: .5rem;
    height: calc(33.3% - 1.7rem);
    background: var(--dbox);
}

#downloads {
    height: calc(33.3% - 4.7rem);
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

#legend {
    margin: 0 1rem 0 0;
    padding: .5rem calc(50% - 7.8rem);
    height: 1.45rem;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    background: var(--dbox);
}

#legend p {
    height: 1rem;
    font-size: .85em;
    line-height: .85em;
}

#legend p.not-due {
    border-bottom: 0.25rem solid var(--green);
}
#legend p.due-soon {
    border-bottom: 0.25rem solid var(--yellow);
}
#legend p.overdue {
    border-bottom: 0.25rem solid var(--red);
}

#downloads div {
    margin: .25rem 0;
}

#downloads h4
{
    margin: 0;
    text-align: center;
    line-height: 0.5rem;
}

#downloads h4 svg
{
    color: var(--yellow);
}

#dashboard-info-popup .section {
    display: none;
    overflow: hidden;
    overflow-y: scroll;
    max-height: calc(100vh - 10rem);
}

#dashboard-info-popup .section.visible {
    display: block;
}

#dashboard button.red {
    border-bottom: .1rem solid var(--red);
    border-right: .1rem solid var(--red);
}

#dashboard button.blue {
    border-bottom: .1rem solid var(--blue);
    border-right: .1rem solid var(--blue);
}

#dashboard button:disabled {
    background: var(--bhov);
}

/* dash cal end */

/* assign popup */
#assign-driver-cards-vehicles-popup dt, #assign-driver-cards-vehicles-popup dd {
    height: 1.5rem;
    line-height: 2em;
}

#assign-driver-cards-vehicles-popup table thead {
    background:none;
}

#assign-driver-cards-vehicles-popup input {
    margin: 0;
    width: calc(100% - .7rem);
}

#assign-driver-cards-vehicles-popup .ui.dropdown {
    border: .005rem solid var(--yellow);
}

#assign-driver-cards-vehicles-popup .ui.dropdown .svg-inline--fa {
    padding: 0 .25rem;
}

dd.dropdown {
    overflow: visible;
}

#dashboard-info-popup .accordion {
    overflow-y: scroll;
    max-height: calc(calc(100vh - 11rem)/2);
}

#new-driver-cards .table th:nth-child(2), #new-driver-cards .table td:nth-child(2),
#refused-driver-cards .table th:nth-child(2), #refused-driver-cards .table td:nth-child(2){
   width: 22rem;
}

#assign-driver-cards-vehicles-popup #new-driver-cards-vehicles {
    max-height: calc(100vh - 4rem);
    overflow-y: scroll;
}
#assign-driver-cards-vehicles-popup .table{
width: calc(100% - 1rem);
margin: .5rem .5rem 2rem .5rem ;
}
#assign-driver-cards-vehicles-popup .table th, #assign-driver-cards-vehicles-popup .table td {
    width: 11rem;
    color: var(--text);
}

#assign-driver-cards-vehicles-popup .table th:first-child, #assign-driver-cards-vehicles-popup .table td:first-child {
    width: 2rem;
}

#assign-driver-cards-vehicles-popup label.checkbox {
    background: none;
    border: none
}

#new-driver-cards-wrapper, #refused-driver-cards-wrapper,
#new-vehicles-wrapper, #refused-vehicles-wrapper {
    background: var(--menubg);
}

div.select-company {
    width: 25rem;
}

:focus-visible {
    outline: none;
}

/* switch start */
.switch {
    position: relative;
    display: block;
    margin-top: .5rem;
    width: 30px;
    height: 18px;
  }

  .switch-wrapper.short .switch {
    margin: 0;
    height: 14px;
  }

  .switch-wrapper {
    display: flex;
    flex-direction: row;
    gap: .25rem;
}

.switch-wrapper .title {
    height: 2rem;
    line-height: 2.1rem;
}

.switch-wrapper.short .title {
    height: .9rem;
    line-height: .9rem;
    font-size: .8em;
}

  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-dark);
    -webkit-transition: .4s;
    transition: .4s;
  }

  .slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text);
    -webkit-transition: .4s;
    transition: .4s;
  }

  .switch-wrapper.short .slider:before {
    height: 8px;
  }

  input:checked + .slider:before {
    background-color: var(--hl);
  }

  input:checked + .slider:before {
    -webkit-transform: translateX(12px);
    -ms-transform: translateX(12px);
    transform: translateX(12px);
  }
  /* switch end */

  /* toggle start */
/* The switch - the box around the slider */
.toggle {
    position: relative;
    display: inline-block;
    margin: 0 .25rem;
    padding: 0.2rem 0.3rem;
    width: 4rem;
    height: .9rem;
    border: 0.05rem solid var(--dropbg);
    color: var(--text);
  }
  
  /* Hide default HTML checkbox */
  .toggle input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* The slider */
  .toggle .check {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--menubg);
    -webkit-transition: .2s;
    transition: .2s;
  }

.toggle span {
    line-height: 1.2rem;
    padding-left: 1rem;
}

  .toggle input:checked + .check {
    border: 0.05rem solid var(--green);
  }
  /* toggle end */

  #user-administration-tab .button-primary, #groups-tab .button-primary,
  #locations-tab .button-primary, #work-profiles-tab .button-primary, #violation-profiles-tab .button-primary{
    margin: 1rem .8rem 1rem 0;
  }

  .work-profile-data span.right {
    width: 50%;
  }

  #administration-groups label.checkbox {
    width: 25rem;
  }

  #administration-groups label.checkbox .checkmark, #user-list label.checkbox .checkmark {
    float: right;
  }

#administration-groups label.checkbox .checkmark::after, #user-list label.checkbox .checkmark::after {
  float: right;
  right: 0.85rem;
  left: auto;
}

#fa-title {
    margin-bottom: 1rem;
}

dl#user-info {
    margin-top: 3.5rem;
}

p.totp-offer {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.buttons-group {
    display: flex;
    flex-direction: row;
}

.permissions label.checkbox {
    margin: 0;
    border: none;
    background: none;
  }

.table.permissions th, .table.permissions td {
    width: 11.25rem;
    padding: 0.125rem 0.175rem;
    text-align: left;
    word-spacing: 1px;
    letter-spacing: 0;
  }

.table.permissions tr {
    border: none;
  }

.dot {
    position: absolute;
    height: 0.313rem;
    width: 0.313rem;
    top: 0.9rem;
    left: 2.2rem;
    background-color: var(--red);
    border-radius: 50%;
    display: inline-block;
}

.status-dot {
    margin-left: 1rem;
    height: 0.5rem;
    width: 0.5rem;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.red {
    background-color: var(--red);
}

.status-dot.green {
    background-color: var(--green);
}

.status-dot.yellow {
    background-color: var(--yellow);
}

.dot.yellow, .main-menu li .tag.yellow
{
    background-color: var(--yellow);
}

/* speed data */
#speed-data-wrapper
{
    display: flex;
    flex-direction: row;
    gap: 3rem;
}

#speed-data-wrapper form {
    width: 20.125rem;
}

#speed-data-wrapper input {
    margin: 1rem 0;
width: calc(100% - 0.675rem);
}

#speed-data-wrapper .litepicker {
    padding: 1rem 0;
    min-height: 14.5rem;
}

#speed-table thead {
    background: var(--dbox);
}

#speed-table tbody {
    display: block;
    height: 19.7rem;
    overflow-y: scroll;
    background: var(--dbox);
}

#speed-table.table {
    width: 18rem;
}

#speed-table.table td {
    width: 7.75rem;
    background: var(--dbox);
}

#speed-table.table th:last-child, #speed-table.table td:last-child {
    padding-left: .5rem;
}

#speed-data-chart {
    padding: 1rem 0.5rem;
    background: var(--dbox);
}

/* info */
#info {
    margin: 0 2rem 0 5rem;
    width: calc(100% - 7rem);
}
#info h3 {
    margin-top: .5rem;
}

#info h1 {
    margin-bottom: 5.35rem;
}

#info .column.four dl {
    width: 46.5rem;
}

#info .column.four {
    margin: 0 calc(100% - 46.5rem)/2;
}

#info .column.four h2 {
    width: 46rem;
    margin-top: 2rem;
}

#info-user {
    width: 100%;
    margin: 3.75rem calc((100% - 47rem)/2);
}

#info-user .table {
    width: auto;
}

#info-messages {
    margin: 10rem 0 0;
    width: 100%;
}

.info-messages-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .5rem;
    padding-bottom: .4rem;
}

#info-messages h2 {
    margin: 0;
}

.info-message-empty {
    margin: 0;
    color: var(--lighttext);
}

.info-message-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.info-message-item {
    appearance: none;
    border: 0;
    box-shadow: none;
    outline: none;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: .25rem .5rem;
    background: var(--dropbg);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.info-message-item.is-new {
}

.info-message-content {
    min-width: 0;
}

.info-message-title {
    min-width: 0;
}

.info-message-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    margin-left: auto;
    align-self: center;
}

.info-message-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: .16rem .5rem;
    background-color: var(--red);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: .9;
    text-transform: uppercase;
    letter-spacing: .04em;
    vertical-align: middle;
}

.info-message-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    padding: 0;
    margin: 0;
    color: var(--lighttext);
    font-size: .8rem;
    line-height: 1;
    align-self: center;
}

.info-message-arrow .svg-inline--fa {
    width: 1rem;
    height: 1rem;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

#info-message-popup .popup-content p {
    white-space: pre-line;
    background: var(--dbox);
    padding: .5rem;
    margin-bottom: 1rem;
}

.main-menu .info-menu-link {
    position: relative;
}

.main-menu .account {
    bottom: 16rem !important;
}

.main-menu .language {
    bottom: 22rem !important;
}

.main-menu .administration {
    bottom: 11.5rem !important;
}

.main-menu .info {
    bottom: 7rem !important;
}

#user-notification-settings {
    margin-bottom: 1rem;
}

.notification-settings-status-table {
    margin-bottom: .75rem;
}

#user-notification-settings .notification-settings-table {
    width: 100%;
    table-layout: fixed;
}

#user-notification-settings .notification-settings-table thead {
    display: table-header-group;
}

#user-notification-settings .notification-settings-table tbody {
    display: table-row-group;
}

#user-notification-settings .notification-settings-table tr {
    display: table-row;
}

#user-notification-settings .notification-settings-table th {
    display: table-cell;
    width: auto;
    font-weight: 300;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

#user-notification-settings .notification-settings-table th:first-child {
    padding-right: 2rem;
}

#user-notification-settings .notification-settings-table td {
    display: table-cell;
    width: auto;
    vertical-align: middle;
}

#user-notification-settings .notification-settings-table td:not(:first-child) {
    text-align: center;
}

#user-notification-settings .notification-settings-label {
    width: 34%;
    white-space: nowrap;
}

#user-notification-settings .notification-settings-label-column {
    width: 34%;
}

#user-notification-settings .notification-settings-state {
    width: 16rem;
}

#user-notification-settings .notification-settings-flag {
    width: 6rem;
    text-align: center;
    white-space: nowrap;
}

#user-notification-settings .notification-settings-flag-column {
    width: 6rem;
}

#user-notification-settings .notification-settings-subhead td {
    background: none;
    text-transform: uppercase;
    color: var(--text-mid);
    padding-top: .35rem;
    padding-bottom: .2rem;
    padding-left: 0;
    font-size: .85em;
    border-bottom: 0.05rem solid var(--border);
}

#user-notification-settings .notification-settings-subhead:not(:first-child) td {
    border-top: .75rem solid transparent;
}

.notification-settings-block {
    max-width: 52rem;
}

#edit-user-notification-settings-popup .notification-settings-block {
    max-width: none;
    width: 100%;
    margin-bottom: 1rem;
}

.notification-toggle {
    margin-bottom: 1rem;
}

.notification-toggle-row {
    margin-bottom: 1.25rem;
}

.notification-toggle-checkbox {
    background: none;
    border: none;
    width: auto;
    min-height: 0;
    padding: 0 0 0 2rem;
    margin: 0;
    display: inline-flex;
    align-items: center;
    line-height: 1rem;
}

.notification-toggle-checkbox .checkmark {
    left: 0;
}

.notification-settings-group {
    margin-top: 1.25rem;
}

.notification-settings-group h3 {
    margin: 0 0 .5rem 0;
    background: none;
    color: var(--text-mid);
    padding: 0 0 0 .25rem;
    width: calc(100% - .25rem);
    font-size: .85em;
    border-bottom: 0.05rem solid var(--border);
}

.notification-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem .75rem;
}

.notification-settings-grid label.checkbox,
.notification-event-checkbox,
.notification-toggle {
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
    height: auto;
    min-height: 1.1rem;
}

.notification-event-checkbox {
    margin-bottom: .35rem;
}

#user-notification-settings .notification-settings-checkbox-cell {
    width: 8.5rem;
    text-align: left;
    white-space: nowrap;
    padding: 0.125rem 0.175rem;
}

#user-notification-settings .notification-settings-status-value {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .35rem;
    white-space: nowrap;
}

#user-notification-settings .notification-settings-flag {
    text-align: left;
}

#user-notification-settings .notification-settings-table td:not(:first-child) {
    text-align: left;
}

#user-notification-settings .notification-settings-checkbox-cell .notification-event-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    min-height: 1rem;
    margin: 0 .25rem;
    padding: 0;
    background: none;
    border: none;
    vertical-align: middle;
}

#user-notification-settings .notification-settings-checkbox-cell .notification-event-checkbox .checkmark {
    float: none;
    position: relative;
    top: 0;
    left: 0;
    margin: 0;
}

.disabled-checkbox {
    opacity: 1;
    cursor: default;
}

#user-notification-settings .disabled-checkbox .checkmark {
    background: transparent;
    border: 0.05rem solid var(--border);
    width: 1rem;
    height: 1rem;
}

#user-notification-settings .disabled-checkbox .checkmark::after {
    float: none;
    left: 0.3rem;
    right: auto;
    top: 0;
}

.reminder-settings-table th,
.reminder-settings-table td {
    display: table-cell;
    width: auto;
    padding: 0.4rem 0.5rem;
    vertical-align: top;
}

.reminder-settings-table {
    width: 100%;
    table-layout: fixed;
}

.reminder-settings-table .label-column {
    width: 46%;
}

.reminder-settings-table .value-column {
    width: 27%;
}

.reminder-settings-table .days-column {
    width: 9rem;
    white-space: nowrap;
}

#edit-user-notification-settings-popup .notification-settings-edit-table .label-column {
    width: 34%;
}

#edit-user-notification-settings-popup .notification-settings-edit-table .days-column {
    width: 8.5rem;
    text-align: left;
}

.notification-settings-empty-cell {
    background: transparent;
}

.notification-settings-edit-table .notification-event-checkbox {
    display: block;
    width: 1rem;
    min-height: 1rem;
    margin: 0 .25rem 0 0;
    padding: 0;
    background: none;
    border: none;
    line-height: 1rem;
}

.notification-settings-edit-table .notification-event-checkbox .checkmark {
    display: block;
    float: none;
    position: relative;
    width: .8rem;
    height: .8rem;
    margin: 0;
    top: 0;
    left: 0;
}

.notification-settings-edit-table .notification-event-checkbox .checkmark::after {
    left: 0.25rem;
    top: 0.02rem;
    width: 0.2rem;
    height: 0.5rem;
}

#edit-user-notification-settings-popup .notification-settings-status-value {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    white-space: nowrap;
}

#edit-user-notification-settings-popup .notification-settings-status-value .notification-event-checkbox {
    margin: 0;
}

#edit-user-notification-settings-popup .notification-settings-edit-table th {
    text-align: left;
}

#edit-user-notification-settings-popup .notification-settings-edit-table td:not(:first-child) {
    text-align: left;
}

.notification-toggle-checkbox .checkmark::after {
    left: 0.25rem;
    top: 0.02rem;
    width: 0.2rem;
    height: 0.5rem;
}

#edit-user-notification-settings-popup .popup-content {
    width: calc(100% - 2rem);
}


.reminder-settings-table .reference-column {
    width: 14rem;
    white-space: nowrap;
}

.reminder-settings-table th {
    white-space: nowrap;
}

.reminder-settings-table-deadlines {
    table-layout: auto;
}

.reminder-settings-table-edit.reminder-settings-table-downloads {
    table-layout: auto;
}

.reminder-settings-table-edit td input,
.reminder-settings-table-edit th input {
    width: calc(100% - 0.8rem);
    margin-top: 0.25rem;
}

.reminder-settings-table-edit td .title {
    display: block;
    margin-bottom: 0.15rem;
}

.reminder-settings-table-edit .days-column input {
    width: calc(100% - 0.8rem);
    min-width: 4.5rem;
}

.reminder-settings-table-edit .reference-column {
    white-space: nowrap;
}

.reminder-settings-table th {
    text-transform: uppercase;
}

.reminder-settings-table th.uwide,
.reminder-settings-table td.uwide {
    width: 16rem;
}

.main-menu .menu-bubble {
    position: absolute;
    top: .25rem;
    left: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
    height: 1rem;
    border-radius: 999rem;
    background-color: var(--red);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.2;
    z-index: 10001;
}

@media (max-width: 900px) {
    #info-messages {
        margin: 2rem 1rem 0 1rem;
        width: calc(100% - 2rem);
    }

    .info-message-item {
        grid-template-columns: 1fr;
    }

    .info-message-arrow {
        display: none;
    }

    .info-message-topline {
        flex-wrap: wrap;
    }
}

/* loader */
#tab-loader{
    display: none;
    position: absolute;
    top: 3rem;
    right: 0;
    bottom: 0;
    padding-top: 5rem;
    width: calc(100% - 30.5rem);
    background: var(--bg);
    z-index: 100;
}

#tab-loader.revert {
    top: calc(100vh - 30rem);
}

.loader {
    margin: 0 auto;
    width: 3.5rem;
}

.loader .circle {
    width: 3rem;
    height: 3rem;
    border: .25rem solid #f3f3f3; /* Light grey */
    border-top: .25rem solid #3498db;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#tab-loader.active {
    display: flex;
}

/* tooltip */
.tippy-box[data-theme~='tg']{background-color:var(--hov);color:var(--ttip);letter-spacing:0;border-radius:5;border:1px solid var(--border)}.tippy-box[data-theme~='tg']::after{background-color:var(--hov)}.tippy-box[data-theme~='tg'][data-placement^='top']>.tippy-arrow::before{border-top-color:var(--ttip)}.tippy-box[data-theme~='tg'][data-placement^='bottom']>.tippy-arrow::before{border-bottom-color:var(--ttip)}

/* main menu */
.main-menu{position:absolute;display:flex;flex-direction:column;top:0;bottom:0;left:0;padding-top:4rem;height:100%;width:3rem;font-size:1.1em;background-color:var(--menubg);transition:width 206ms .3s ease;overflow-x:hidden;overflow-y:hidden;box-sizing:border-box;z-index:100}.main-menu ul,.main-menu li{display:inline-block;list-style:none;outline:0;margin:0;padding:0}.main-menu>ul{height:100%;width:100%;margin-top:5rem;overflow-y:auto;overflow-x:hidden}.main-menu li{margin:.625rem 0;width:15rem}.main-menu li:hover{background-color:var(--hov)}.main-menu li.active svg.svg-inline--fa{padding:0 .813rem 0 .563rem;border-left:.25rem solid var(--hl)}.main-menu li .tag{background-color:var(--red);color:var(--text);padding:.1rem .5em;border-radius:2em;margin-left:auto;margin-right:.75em}.main-menu li a{position:relative;display:flex;padding:.825rem 0;width:100%;align-items:center;vertical-align:middle;white-space:nowrap;color:var(--text);text-decoration:none}.main-menu .svg-inline--fa, .main-menu .language span{padding:0 .813rem;width:1.375rem;height:1.375rem;text-align:center;color:var(--text);z-index:9999}.main-menu .language span{height:1rem}.bottom-menu{position:absolute;display:block!important;bottom:2.5rem;width:100%}.main-menu .info{bottom:7rem}.main-menu .administration{bottom:11.5rem}.main-menu .language{bottom:16rem}input.hamburger{display:none}input.hamburger:checked ~ nav.main-menu{height:100vh}input.hamburger:checked ~ nav.main-menu{width:15rem}input.hamburger:checked ~ label>i{background-color:transparent;transform:rotate(90deg)}input.hamburger:checked ~ label>i:before{transform:translate(-50%,-50%) rotate(45deg)}input.hamburger:checked ~ label>i:after{transform:translate(-50%,-50%) rotate(-45deg)}input.hamburger:checked ~ label close{color:var(--text);width:100%}input.hamburger:checked ~ label open{color:var(--menubg);width:0}label.hamburger{position:fixed;display:block;height:1.4rem;top:1.5rem;left:.8rem;width:1.4rem;z-index:9999}label.hamburger:hover{cursor:pointer}label.hamburger text close,label.hamburger text open{text-transform:uppercase;text-align:center;position:absolute;transform:translateY(24px);text-align:center;overflow:hidden;transition:width .25s .35s,color .45s .35s;font-size:6px}label.hamburger text close{color:var(--text);right:0;width:0}label.hamburger text open{color:var(--text);width:100%}label.hamburger>i{position:absolute;width:100%;height:2px;top:50%;background-color:var(--text);pointer-events:auto;transition-duration:.35s;transition-delay:.35s}label.hamburger>i:before,label.hamburger>i:after{position:absolute;display:block;width:100%;height:2px;left:50%;background-color:var(--text);content:"";transition:transform .35s;transform-origin:50% 50%}label.hamburger>i:before{transform:translate(-50%,-7px)}label.hamburger>i:after{transform:translate(-50%,7px)}


/* accordion */
.accordion {
    overflow: hidden;
}

.accordion input {
    display: none;
}

.accordion-item {
    width: 100%;
    overflow: hidden;
}
.accordion-item-label {
    display: flex;
    justify-content: start;
    gap: 0.5rem;
    padding: 1em;
    cursor: pointer;
}

.vera-settings-locations-accordion .accordion-item-label {
    background: var(--dbox);
    margin: .25rem 4px 0;
}

.accordion .fa-chevron-right {
    height: .9rem;
    width: .9rem;
}

.accordion-item-content {
    display: none;
    max-height: 0;
    padding: 0 1em;
    overflow: hidden;
}

.accordion-item-content h3 {
    margin: 0;
}

.accordion input:checked + .accordion-item-label svg.fa-circle-chevron-right,
.accordion input:checked + .accordion-item-label svg.fa-chevron-right {
   transform: rotate(90deg) !important;
   color: var(--hl);
}
.accordion input:checked + .accordion-item-label svg.fa-circle-chevron-down {
   transform: rotate(180deg) !important;
   color: var(--hl);
}
.accordion input:checked ~ .accordion-item-content {
    display: block;
    max-height: 100%;
    padding: 1em;
}

.popup .accordion-item-label {
    display: block;
    margin-bottom: 1rem;
    font-size: 1em;
    line-height: 1.1em;
    background: var(--dbox);
}

.accordion-item-label span {
    padding: 0.1rem 0.5em;
    margin-left: auto;
    margin-right: 0.85em;
    background-color: var(--red);
    color: var(--text);
    border-radius: 2em;
}

.popup .accordion-item-label:hover {
    background: var(--dropbg);
}

.popup .accordion-item-label svg.fa-chevron-right {
    float: right;
}

.popup .accordion input:checked + .accordion-item-label {
   background: var(--sel);
}

#dashboard-info-popup h2 {
    margin: 1rem 0;
}

#dashboard-info-popup label .svg-inline--fa {
    margin-right: 0.25rem;
    height: 0.9rem;
    width: 1.1rem;
}

#dashboard-info-popup .accordion-item a {
    float: left;
    margin-right: 1rem;
    padding: 0.8rem 0.5rem;
    height: 100%;
    border-right: 1px solid var(--border);
    background: var(--dropbg);
}

#dashboard-info-popup .accordion-item a svg {
    height: 1.1rem;
    width: 1.1rem;
}

#dashboard-info-popup .accordion-item a:hover svg {
    color: var(--red);
}

#dashboard-info-popup ul li {
    padding: 0.25rem 0 0.25rem 0.5rem;
    border-bottom: 0.05rem solid var(--border-dark);
}

#dashboard-calendar-day-popup ul {
    margin: 0;
    padding-left: 1.25rem;
}

#dashboard-calendar-day-popup ul li {
    margin-bottom: .5rem;
}

#dashboard-info-popup .active-list, #dashboard-info-popup .inactive-list {
    display: none;
}

#dashboard-info-popup .active-list.visible, #dashboard-info-popup .inactive-list.visible {
    display: block;
}

#driver-card-validity li:hover, #driving-license-validity li:hover, #birthdays li:hover,
#vehicle-lock li:hover, #tacho-calibration li:hover, #adr-certificate-validity li:hover,
#dqc-validity li:hover, #drivers-checks li:hover, #drivers-nfc li:hover, #drivers-no-nfc li:hover{
    background: var(--hov);
    cursor: pointer;
}

#access-denied {
    margin: 2rem 0 0 5rem;
}

#error-page {
    position: absolute;
    margin-top: 7rem;
    width: 50%;
    text-align: right;
    z-index: 6;
}
#error-page h1 {
    margin: 5.5rem 20rem 1.5rem 0;
}
#error-page a, #error-page p {
    margin: 1.5rem 20rem 1.5rem 0;
    font-size: 1.2em;
}

#error-page a {
background: #fff;
color: #000;
-webkit-box-shadow: 2px 1px 3px 0px rgba(66,66,66,0.88);
box-shadow: 2px 1px 3px 0px rgba(66,66,66,0.88);
border: 1px solid #666;
}

#app-users-tab a {
    display: block;
    margin-bottom: 4rem;
}

#app-users-form .table {
    margin-bottom: 1rem;
}

#app-users-form .table td {
    padding: 0rem 0.5rem;
}

#app-users-form .table th:first-child, #app-users-form .table td:first-child {
    width: 2rem;
}

#app-users-form .table td:first-child label, #create-app-keys-form .table td:first-child label{
    border: none;
    background: none;
}

#app-users-form .table th:nth-child(2), #app-users-form .table td:nth-child(2) {
    width: 3rem;
}

#app-users-form .table th:nth-child(3), #app-users-form .table td:nth-child(3),
#app-users-form .table th:nth-child(4), #app-users-form .table td:nth-child(4),
#app-users-form .table th:nth-child(5), #app-users-form .table td:nth-child(5),
#create-app-keys-form .table th:nth-child(3), #create-app-keys-form .table td:nth-child(3),
#create-app-keys-form .table th:nth-child(4), #create-app-keys-form .table td:nth-child(4),
#create-app-keys-form .table th:nth-child(5), #create-app-keys-form .table td:nth-child(5) {
    width: 10rem;
}

/* Groups: give the (max 30-char) name column more room than the shared 10rem. */
#app-users-form .table.app-group-table th:nth-child(3),
#app-users-form .table.app-group-table td:nth-child(3) {
    width: 18rem;
}

#app-users-form h3 {
    margin: 0 0 2rem 0;
    text-transform: none;
}

#app-users-form .app-user-actions .button {
    width: auto;
    white-space: nowrap;
    margin-right: 0.5rem;
}

/* Give the app-account button labels room on the left/right so they don't look
   cramped, and keep them on a single line (e.g. "Änderung speichern"). */
#app-users-form .button,
#app-delete-popup .button,
#app-edit-popup .button {
    width: auto;
    white-space: nowrap;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

#app-delete-popup .popup-content {
    min-height: 0;
    overflow: hidden;
}

#app-delete-popup .app-delete-list {
    margin: 0.5rem 0 1rem;
    padding-left: 1.25rem;
    max-height: 12rem;
    overflow-y: auto;
}

#app-edit-popup .popup-content {
    min-height: 0;
    overflow: hidden;
}

#app-edit-popup .app-edit-code-value {
    margin: 0.35rem 0 0.75rem;
    font-weight: bold;
}

#app-users-tab h3 {
    margin: 0 0 2rem 0;
}

#create-app-keys-form h3 {
    margin: 0 0 1rem 0;
}

#create-app-keys-form .table {
    margin-bottom: 1rem;
}

#create-app-keys-form .table th:nth-child(5), #create-app-keys-form .table td:nth-child(5) {
    width: 32rem;
}

#app-keys-create-popup .popup-content .grid.scroll {
    max-height: calc(100vh - 7rem);
}

#app-keys-create-popup.popup .button-primary {
    margin: 1rem 1rem 1rem;
}

#create-terminal-install-code-form {
    margin-bottom: 3rem;
}

#terminals-install-codes th, #terminals-install-codes td,
#active-terminals th, #active-terminals td {
    width: 14rem;
}

#active-terminals .fa-pencil {
    cursor: pointer;
}

.wsel {
    width: 1000px;
    height: 200px;
}

.sel {
    width: 100px;
    height: 100px;
    padding: 10px;
    background-color: red;
}









.driver-tile {
    display: flex;
    flex-direction: row;
    height:40px;
    width: 15.75%;
    background: var(--dbox);
}

.driver-tile .w1, .head-tile .w1 {
    border-left:1px solid var(--border-dark);
    border-right:1px solid var(--border-dark);
    border-bottom:1px solid var(--border-dark);
    width:18%;
    line-height: 2rem;
    padding: 2%;
    font-size: .9em;
}

.driver-tile .w2, .head-tile .w2 {
    border-bottom:1px solid var(--border-dark);
    width:74%;
    line-height: 2rem;
    padding: 2%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .9em;
}

.driver-tile .w2 span {
    display: inline-block;
    margin-right: 0.25rem;
    width: 0.25rem;
    height: 1em;
}

#drivers-calendar .driver-tile p {
    height: 1.75rem;
    line-height: 1.75rem;
    color: var(--text-dark);
    text-align: center;
}

#drivers-calendar .driver-tile svg.driver-data {
    padding: 0.25rem 0;
}

#drivers-calendar, #drivers-mwl-overview {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 9rem);
    width: 100%;
    overflow-y: scroll;
    background: var(--sel);
}

#drivers-calendar #calendar-head {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background: var(--sel);
}

#calendar-head .calendar-row {
    border-bottom:1px solid var(--border);
}

#calendar-body .calendar-row:hover .driver-tile {
    background: var(--tool);
}

#calendar-body .calendar-row .driver-data {
    color: var(--dbox);
    cursor: pointer;
}

#calendar-body .calendar-row:hover .driver-data {
    color: var(--text);
}

#calendar-head .month-name {
    padding: 0 .25rem;
    line-height: 1.8em;
}

#calendar-head label {
    float: left;
    font-size: 1em;
}

#calendar-head #sort-tile {
    padding: 0;
}

#calendar-head #aza-sort {
    margin: 0 4rem 0 .5rem
}

#driver-names-wrap {
    width: 15.75%;
}

#drivers-calendar .calendar-row, #drivers-mwl-overview .mwl-row{
    display: flex;
    flex-direction: row;
    width:100%;
}

#drivers-calendar #calendar-body .calendar-row, #drivers-mwl-overview #calendar-body .mwl-row{
    display: none;
    width:100%;
}

#drivers-calendar #calendar-body .calendar-row.visible {
    display: flex;
    flex-direction: row;
}

.mwl-row .w3 {
    display: flex;
    flex-direction: column;
    border-right:1px solid var(--border-dark);
    border-bottom:1px solid var(--border-dark);
    width:9%;
    height: 39px;
    padding: 0;
    line-height: 2em;
    text-align: center;
    user-select: none; -o-user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -ms-user-select:none;
}


.calendar-row .w3 .odt {
    height: 33%;
}

.calendar-row .w30 {
    border-right:1px solid var(--border-dark);
    border-bottom:1px solid var(--border-dark);
    width:1374px;
    height: 29px;
    padding: 5px 0 5px 5px;
    cursor: pointer;
}

.calendar-row .w31 {
    border-right:1px solid var(--border-dark);
    border-bottom:1px solid var(--border-dark);
    width:1420px;
    height: 29px;
    padding: 5px 0 5px 5px;
    cursor: pointer;
}

.calendar-row .w3 {
    border-right:1px solid var(--border-dark);
    border-bottom:1px solid var(--border-dark);
    width:2.66%;
    height: 29px;
    padding: 5px 0;
    font-size: .7em;
    text-align: center;
    user-select: none; -o-user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -ms-user-select:none;
    cursor: pointer;
}

.calendar-row .w3 svg {
    float: right;
    height: 0.8rem;
    padding: 0;
}

#drivers-calendar #calendar-body.info .w3 {
    display: none !important;
}

.calendar-row .w3.divider, #calendar-head .month-name {
    border-left:1px solid var(--border);
}

.calendar-row.w30 .w3 {
    width:2.75%;
}

.calendar-row.w29 .w3 {
    width:2.85%;
}

.calendar-row.w28 .w3 {
    width:2.95%;
}

.calendar-row .w3.selected {
    color: var(--text-dark);
    background: var(--sel-light);
}

#drivers-calendar #calendar-head .we {
    color: var(--hl) !important;
}
.calendar-row .we {
    background: var(--hov-dark);
}

#calendar-head .calendar-row .w3 {
    height: 15px;
}

#calendar-head .calendar-row .w3.hover {
    background: var(--tool);
}

.head-tile {
    display: flex;
    height: 26px;
    background: var(--dbox);
}

#drivers-mwl-overview .head-tile {
    height: 100%;
}

#drivers-mwl-overview .head-tile .w1, #drivers-mwl-overview .head-tile .w2 {
    line-height: 2em;
}
.head-tile .w1, .head-tile .w2 {
    line-height: 1.5em;
}

.head-tile svg {
    height: 0.7rem;
    padding: 0;
}

.head-tile .right {
    text-align: right;
}

.tt1 {
    background: #7a9dab !important;
}

.tt2 {
    background: #7a9dab !important;
}

.tt3 {
    background: #1c7f9d !important;
}

.tt4, .tt5, .tt6 {
    background: #099f61c2 !important;
}

#overview-legend {
    height: 1.75rem;
    margin: 0 0 1rem 0;
}

#overview-legend .switch-wrapper {
    float: inline-start;
}

#overview-legend .switch-wrapper label.title {
    font-size: 1em;
}

#overview-legend p.vacation {
    float: right;
    border-bottom: .25rem solid #7a9dab;
}

#overview-legend p.sickness {
    float: right;
    margin: 0 2rem;
    border-bottom: .25rem solid #1c7f9d;
}

p#drivers-off {
    display: inline-flex;
    margin-right: 0.5rem;
    line-height: 1.75em;
    float: right;
    color: var(--yellow);
    word-spacing: 0px;
}

p#drivers-off svg {
    padding: 0 .5rem 0 0 ;
    color: var(--yellow);
}

/* calendar overview  */
#month-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    max-height: calc(100vh - 7.5rem);
    overflow-y: scroll;
}

.month-calendar {
    display: flex;
    flex-direction: column;
    flex: 1 0 30%;
    background: var(--hov);
    border-top: 1px solid var(--border-dark);
    border-left: 1px solid var(--border-dark);
}

.month-calendar .month-name {
    padding: 0.25rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
}

.month-calendar .week-day-names, .month-calendar .calendar-row {
    display: flex;
    flex-direction: row;
}

.month-calendar .week-day-names .we, .month-calendar .calendar-row .we {
    color: var(--yellow) !important;
}

.month-calendar .calendar-row .we span {
    color: var(--text) !important;
}

.month-calendar .week-day-names {
    border-bottom: 1px solid var(--border);
}

.month-calendar .week-day-names .day-name, .month-calendar .calendar-row .calendar-day {
    height: 2rem;
    width: 14.2%;
    text-align: center;
    border-right: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    font-size: .7em;
}

.month-calendar .week-day-names .day-name {
    height: 1rem;
    line-height: 1.75em;
}

.month-calendar .calendar-row .calendar-day {
    height: 3.75rem;
}

.calendar-day .number, .calendar-day .day-info {
    height: 1.5rem;
}

.calendar-day .day-info span
{
    display: inline-block;
    margin: 0 5% .1rem 5%;
    width: 90%;
    line-height: 1.25em;
    cursor: default;
}

.calendar-day .day-info span.u {
    background: #7a9dab;
}

.calendar-day .day-info span.s {
    background: #1c7f9d;
}

#working-times-tab .search-section {
    float: left;
    margin: .25rem 0;
    padding: 0;
    background: none;
}

#working-times-tab .search-section #search-field {
    width: 11rem;
}

#working-times-tab .search-section #new-driver {
    margin: 0 2rem;
}

div.divider {
    border-top: 1px solid var(--border-dark);
    height: 0;
    margin: 1.5em 0 0 0;
}

#driver-data-zema-popup .popup-menu {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    width: 100%;
}

p.whatsapp-head {
    margin: 1rem 0 1.5rem 0;
}

p.whatsapp-head svg {
    margin-right: 0.5rem;
    padding: 0.1rem;
    vertical-align: bottom;
    color: #53cc60;
}

div#message-samples, div#email-samples {
    display: flex;
    flex-direction: row;
    gap: 1.45rem;
    flex-wrap: wrap;
}

div.message-icon {
    margin-top: 1.5rem;
    padding: 1rem 0.5rem;
    height: 4rem;
    width: 6rem;
    background: var(--menubg);
    color: var(--text);
    text-align: center;
    border-radius: 0.5rem;
}

div.message-icon:hover {
    background: var(--hov);
    cursor: pointer;
}

div.message-icon svg {
    height: 3rem;
    width: 4.5rem;
}

div#driver-send-message, div#driver-send-email {
    margin:2rem 0
}

.slideshow {
    position: relative;
    width: 100%;
    height: 220px;
  }
  
  .slideshow .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: opacity 0.4s, visibility 0.4s;
    visibility: hidden;
    opacity: 0;
  }
  
  .slideshow .slide.is-active {
    visibility: visible;
    opacity: 1;
  }
  
  .slideshow .slide img {
    display: block;
    width: 730px;
    height: 220px;
    object-fit: cover;
    margin: 0 auto;
  }
  
  .slideshow .prev,
  .slideshow .next {
    cursor: pointer;
    user-select: none;
    position: absolute;
    font-size: 5em;
    color: #fff;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .slideshow .prev {
    right: auto;
  }

  .preview-section .header, .attestation-of-activities  {
    max-width: 44rem;
  }

  .official-form-sheet {
    max-width: 45rem;
    max-height: 100%;
    overflow: hidden;
  }

  .table.reports {
    display: block;
    max-width: 57.5rem;
    max-height: calc(100vh - 20rem);
    overflow-x: hidden;
    overflow-y: scroll;
    font-size: .7em;
  }

  .table.reports.driver-violations {
    max-height: calc(100vh - 28rem);
  }

  .table.reports tr {
    height: 1rem;
  }

  .table.reports tr.odd{background-color:var(--hov)}
  .table.reports th,.table.reports td{display:table-cell;padding:0 2px;vertical-align:inherit;text-align:left;border-right:1px solid #ddd;width:41px}
  .table.reports th.ra,.table.reports td.ra{text-align:right}
  .table.reports th.la,.table.reports td.la{text-align:left}
  .table.reports tr.empty td{border:none}
  .table.reports.used-vehicles th:first-child{width:67px}
  .table.reports.used-vehicles td:first-child{padding-left:26px}
  .table.reports.used-vehicles th:nth-child(2),.table.reports.used-vehicles td:nth-child(2){width:100px}
  .table.reports.used-vehicles th:nth-child(3),.table.reports.used-vehicles td:nth-child(3){width:136px}
  .table.reports.used-vehicles th:nth-child(4),.table.reports.used-vehicles td:nth-child(4),
  .table.reports.used-vehicles th:nth-child(5),.table.reports.used-vehicles td:nth-child(5){width:156px}
  .table.reports.used-vehicles th:nth-child(6),.table.reports.used-vehicles td:nth-child(6),
  .table.reports.used-vehicles th:nth-child(7),.table.reports.used-vehicles td:nth-child(7){width:86px}
  .table.reports.used-vehicles th:last-child,.table.reports.used-vehicles td:last-child{width:75px}
  .table.reports.used-vehicles td span{background-color:#ffff00; color: var(--text-dark)}

  .table.reports tr.total{font-weight:600;background:#ccc}
  .table.reports tr.total td{color: var(--text-dark)}
  
  .table.reports.driver-shifts th:first-child,.table.reports.driver-shifts td:first-child{padding-left:8px;width:34px}
  .table.reports.driver-shifts th:nth-child(2),.table.reports.driver-shifts td:nth-child(2),
  .table.reports.driver-shifts th:nth-child(3),.table.reports.driver-shifts td:nth-child(3){width:140px}
  .table.reports.driver-shifts th:nth-child(4),.table.reports.driver-shifts td:nth-child(4),.table.reports.driver-shifts th:nth-child(5),
  .table.reports.driver-shifts td:nth-child(5),.table.reports.driver-shifts th:nth-child(6),.table.reports.driver-shifts td:nth-child(6),
  .table.reports.driver-shifts th:nth-child(8),.table.reports.driver-shifts td:nth-child(8){width:58px}
  .table.reports.driver-shifts th:nth-child(7),.table.reports.driver-shifts td:nth-child(7){width:98px}
  .table.reports.driver-shifts th:nth-child(9),.table.reports.driver-shifts td:nth-child(9){width:115px}
  .table.reports.driver-shifts th:last-child,.table.reports.driver-shifts td:last-child{width:85px}


  .table.reports.driver-violations th,.table.reports.driver-violations td{width:53px}
  .table.reports.driver-violations td{padding:20px 2px}
  .table.reports.driver-violations th:first-child,.table.reports.driver-violations td:first-child{padding-left:7px;width:26px}
  .table.reports.driver-violations th:nth-child(2),.table.reports.driver-violations td:nth-child(2){width:83px}
  .table.reports.driver-violations th:last-child,.table.reports.driver-violations td:last-child{padding:0 2px;width:455px;word-spacing: 0;text-wrap: wrap;}
  .table.reports.all-violations{margin-top:50px;width:300px;float:right}
  .table.reports.all-violations td{padding:0 2px}.table.reports.all-violations td:first-child{padding-left:8px;width:240px}
  .table.reports.all-violations td:last-child{width:43px}

  .table.reports.license-controls th,.table.reports.license-controls td{width:160px}
  .table.reports.license-controls th:first-child,.table.reports.license-controls td:first-child{padding-left:8px;width:35px}
  .table.reports.license-controls th:nth-child(4),.table.reports.license-controls td:nth-child(4){width:170px}
  .table.reports.license-controls th:nth-child(5),.table.reports.license-controls td:nth-child(5){width:80px}
  .table.reports.license-controls th:last-child,.table.reports.license-controls td:last-child{width:259px}

  .table.reports.missing-license-controls th,.table.reports.missing-license-controls td,
  .table.reports.drivers-with-nfc-tag th,.table.reports.drivers-with-nfc-tag td
  {width:130px}
  .table.reports.missing-license-controls th:first-child,.table.reports.missing-license-controls td:first-child,
  .table.reports.drivers-with-nfc-tag th:first-child,.table.reports.drivers-with-nfc-tag td:first-child
  {padding-left:8px;width:220px}

  .table.reports.drivers-without-nfc-tag th,.table.reports.drivers-without-nfc-tag td
  {width:190px}
  .table.reports.drivers-without-nfc-tag th:first-child,.table.reports.drivers-without-nfc-tag td:first-child
  {padding-left:8px;width:220px}


  .table.reports.last-dc-download th, .table.reports.last-dc-download td {width:45px}
  .table.reports.last-dc-download th:nth-child(2), .table.reports.last-dc-download td:nth-child(2),
  .table.reports.last-dc-download th:nth-child(4), .table.reports.last-dc-download td:nth-child(4) {width:130px}
  .table.reports.last-dc-download th:nth-child(3), .table.reports.last-dc-download td:nth-child(3) {width:300px}

  .table.reports.last-vehicle-download th, .table.reports.last-vehicle-download td {width:140px}
  .table.reports.last-vehicle-download th:first-child, .table.reports.last-vehicle-download td:first-child,
  .table.reports.last-vehicle-download th:nth-child(5), .table.reports.last-vehicle-download td:nth-child(5) {width:45px}

  .table.reports.unknown-times th,.table.reports.unknown-times td{width: 44rem;}

  .table.reports.unknown-vehicles th,.table.reports.unknown-vehicles td{width:195px}
  .table.reports.unknown-vehicles td:first-child{padding-left:20px;width:177px}
  .table.reports.unknown-vehicles th:nth-child(2),.table.reports.unknown-vehicles td:nth-child(2){width:495px}

  .table.reports.used-driver-cards th,.table.reports.used-driver-cards td{width:41px}
  .table.reports.used-driver-cards th:first-child{width:67px}
  .table.reports.used-driver-cards td:first-child{padding-left:26px}
  .table.reports.used-driver-cards th:nth-child(2),.table.reports.used-driver-cards td:nth-child(2){width:261px}
  .table.reports.used-driver-cards th:nth-child(3),.table.reports.used-driver-cards td:nth-child(3),
  .table.reports.used-driver-cards th:nth-child(4),.table.reports.used-driver-cards td:nth-child(4){width:146px}
  .table.reports.used-driver-cards th:nth-child(5),.table.reports.used-driver-cards td:nth-child(5){width:86px}
  .table.reports.used-driver-cards th:nth-child(6),.table.reports.used-driver-cards td:nth-child(6){width:86px}
  .table.reports.used-driver-cards th:last-child,.table.reports.used-driver-cards td:last-child{width:75px; white-space: break-spaces;}
  .table.reports.used-driver-cards td span{background-color:#ffff00; color: var(--text-dark)}

  .table.reports.unknown-drivers th, .table.reports.unknown-drivers td{width:165px};
  .table.reports.unknown-drivers th:first-child{width:330px}
  .table.reports.unknown-drivers td:first-child{padding-left:20px;width:312px}
  .table.reports.unknown-drivers th:nth-child(3), .table.reports.unknown-drivers td:nth-child(3){width:285px}
  .table.reports.unknown-drivers th:last-child, .table.reports.unknown-drivers td:last-child{width:100px}

    .table.reports.loading-unloading th,.table.reports.loading-unloading td{width:125px}
 
    .table.vehicle-daily-activities.details {
        max-height: none;
        overflow-y: unset;
        overflow-x: auto;
    } 
  .table.reports.vehicle-daily-activities th,.table.reports.vehicle-daily-activities td{width:80px}
  .table.reports.vehicle-daily-activities th:last-child, .table.reports.vehicle-daily-activities td:last-child{width:200px}
  .table.vehicle-daily-activities svg {
    width: .75rem;
    height: .75rem;
    fill: var(--text);
  }

/* ---- Driver report "daily activities details" ---------------------------------------------
   One block per day, laid out like the PDF of the same report: date and legend on one line,
   the detail table below, the day's totals in a bar underneath. The table keeps its own
   horizontal scroll so a narrow preview column never squeezes the ten columns together. */

/* The block reads as a page column like every other report table (57.5rem). The cap sits on the
   day, not on the table, so head bar, table and summary bar share one right edge. */
.daily-activities-report .report-day {
    max-width: 57.5rem;
    margin-bottom: 1.75rem;
}

/* From #content down to the wrapper everything is a flex item with the default min-width:auto,
   so the widest thing inside props the whole column open: the tab grows past the right edge of
   the window and .tab-container{overflow-x:hidden} cuts it off there without a scrollbar - the
   last columns simply were not on screen. Every other report leaves its column half empty and
   never showed it. Letting the chain shrink keeps the report inside the window. */
#content:has(.daily-activities-report),
#content:has(.daily-activities-report) #content-grid,
.tab-container:has(.daily-activities-report),
.tab-container:has(.daily-activities-report) .tab-content,
.reports-wrapper:has(.daily-activities-report) {
    min-width: 0;
}

/* Once the column beside the settings can no longer hold the ten columns - anything below
   roughly a 1750px window - the preview takes a line of its own underneath them, where it has
   the full width, instead of being squeezed and scrolled sideways. */
.reports-wrapper:has(.daily-activities-report) {
    flex-wrap: wrap;
}

/* Under Output > Reports the preview is capped at "everything but 61rem", which on a Full HD
   screen leaves it about 540px - less than this report's ten columns need, so they hung out to
   the right behind a scrollbar. The preview is a flex item next to a fixed-width settings column,
   so the cap only ever gave room away; dropping it for this report hands back around 350px.
   min-width:0 keeps the flex item allowed to shrink, as the default min-width:auto would let the
   table's own minimum push the column wider than its share. The cap is written as
   "#drivers .preview-section", so undoing it needs the id here too - a class-only selector loses. */
#drivers .preview-section:has(.daily-activities-report),
.reports-wrapper .preview-section:has(.daily-activities-report) {
    max-width: none;
    min-width: 0;
    /* The basis is the table's own minimum: is there less room beside the settings, the flex
       container above wraps this onto the next line rather than shrinking it below what it needs. */
    flex: 1 1 42rem;
}

/* A month of days stacks in one scroller, so the date stays in place while its day is on screen. */
.daily-activities-report .report-day-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .2rem 1rem;
    padding: .3rem .5rem;
    background-color: var(--dbox);
    border-bottom: 1px solid var(--border-dark);
}

.daily-activities-report .report-day-date {
    font-weight: 600;
    font-size: .85em;
    white-space: nowrap;
}

.daily-activities-report .report-day-legend {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .2rem .9rem;
    font-size: .7em;
}

/* The legend and the summary spell out the same five activity types, so they share one layout. */
.daily-activities-report .report-day-legend span,
.daily-activities-report .report-day-summary-totals span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
}

.daily-activities-report .report-day-legend svg,
.daily-activities-report .report-day-summary-totals svg {
    width: .7rem;
    height: .7rem;
    fill: var(--act-color, var(--text));
    flex: none;
}

.daily-activities-report .report-day-table {
    overflow-x: auto;
    /* A month of activities runs into thousands of rows; the days that are off screen stay out
       of layout and paint. */
    content-visibility: auto;
    contain-intrinsic-size: auto 20rem;
}

/* The shared .table.reports rules turn every report table into its own vertical scroll box.
   Here the days follow one another in a single flow, so the box is dissolved and the fixed
   layout below takes over the column widths. */
.table.reports.daily-activities-details {
    display: table;
    table-layout: fixed;
    width: 100%;
    /* Below this the German column headings no longer fit; the day block scrolls sideways
       instead of shrinking them into "Einzel/T...". In the driver file the preview column is
       692px wide on anything under a 1900px viewport - the whole grid has to stay inside that,
       which is what the tight cell padding below buys. */
    min-width: 42rem;
    max-width: none;
    max-height: none;
    overflow: visible;
    border-collapse: collapse;
    /* The shared .7em compounds with the .9em on .table th/td down to under 9px. Ten dense
       columns have to stay readable, so the size is set here and the cells inherit it. */
    font-size: .75em;
    /* The body's tracking costs about a tenth of the table width; the PDF grid has none. */
    letter-spacing: normal;
    word-spacing: normal;
}

/* Widths follow the PDF's column grid, widened where a German heading needs it. They are the
   share of the table, so the proportions hold at any width; the cells stay auto so the columns
   win. Every column carries its own heading in full at the min-width above. */
.table.reports.daily-activities-details col.col-begin    { width: 8%; }
.table.reports.daily-activities-details col.col-end      { width: 7%; }
.table.reports.daily-activities-details col.col-duration { width: 8%; }
.table.reports.daily-activities-details col.col-symbol   { width: 3%; }
.table.reports.daily-activities-details col.col-activity { width: 22%; }
.table.reports.daily-activities-details col.col-team     { width: 13%; }
.table.reports.daily-activities-details col.col-slot     { width: 10%; }
.table.reports.daily-activities-details col.col-vehicle  { width: 11%; }
.table.reports.daily-activities-details col.col-km       { width: 7%; }
.table.reports.daily-activities-details col.col-country  { width: 11%; }

.table.reports.daily-activities-details th,
.table.reports.daily-activities-details td {
    width: auto;
    padding: 0 .3rem;
    border-right: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-size: inherit;
}

.table.reports.daily-activities-details tr {
    height: 1.4rem;
}

/* The PDF sets the head off with a rule instead of a fill; a fill would compete with the
   coloured rows underneath. */
.table.reports.daily-activities-details thead tr {
    height: 1.5rem;
    background-color: transparent;
    border-bottom: 1px solid var(--border);
}

.table.reports.daily-activities-details thead th {
    font-weight: 600;
    color: var(--text-mid);
}

.table.reports.daily-activities-details td.symbol {
    padding: 0;
    text-align: center;
}

.table.reports.daily-activities-details td.symbol svg {
    display: block;
    width: .8rem;
    height: .8rem;
    margin: 0 auto;
    fill: var(--act-color, var(--text));
}

/* An event row - vehicle inserted, distance driven, location entry - carries no activity
   colour, so it is set apart by its lighter text instead. */
.table.reports.daily-activities-details tbody tr.event td {
    color: var(--text-mid);
}

/* The colours are the ones the driver file's day table and the info-bar legend use. --act-rgb
   carries the same colour as raw channels for the translucent row tint below. The unknown type
   only colours its symbol, as the PDF does - its row stays untinted, like everywhere else. */
.daily-activities-report .act-driving   { --act-color: var(--red);      --act-rgb: 255, 0, 0; }
.daily-activities-report .act-work      { --act-color: var(--blue);     --act-rgb: 0, 153, 255; }
.daily-activities-report .act-available { --act-color: var(--yellow);   --act-rgb: 253, 177, 3; }
.daily-activities-report .act-break     { --act-color: var(--green);    --act-rgb: 102, 255, 51; }
.daily-activities-report .act-unknown   { --act-color: var(--text-mid); --act-rgb: 166, 167, 171; }

/* No zebra striping here: the activity colours already group the rows, and a stripe on top of
   them made the block restless. The .table hairline keeps two equal rows apart on its own. */

/* Just a breath of the colour behind the row, the same one the driver file's day table uses. */
.table.reports.daily-activities-details tbody tr.act-driving,
.table.reports.daily-activities-details tbody tr.act-work,
.table.reports.daily-activities-details tbody tr.act-available,
.table.reports.daily-activities-details tbody tr.act-break {
    background-color: rgba(var(--act-rgb), .05);
}

/* The symbol gets a soft halo in its own colour, so it stands out against the tinted row. */
.table.reports.daily-activities-details tbody tr.act-driving td.symbol svg,
.table.reports.daily-activities-details tbody tr.act-work td.symbol svg,
.table.reports.daily-activities-details tbody tr.act-available td.symbol svg,
.table.reports.daily-activities-details tbody tr.act-break td.symbol svg {
    filter: drop-shadow(0 0 .2rem rgba(var(--act-rgb), .55));
}

/* The totals claim a line of their own as soon as they no longer fit beside the caption - the
   way the PDF sets them, and the only layout that survives the longer translations. */
.daily-activities-report .report-day-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .2rem 1rem;
    padding: .35rem .5rem;
    background-color: var(--dbox);
    border-top: 1px solid var(--border-dark);
}

.daily-activities-report .report-day-summary-title {
    font-weight: 600;
    font-size: .75em;
    white-space: nowrap;
}

.daily-activities-report .report-day-summary-totals {
    display: flex;
    flex: 1 1 54rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .2rem .8rem;
    font-size: .7em;
}

.daily-activities-report .report-day-summary-totals .km-total {
    font-weight: 600;
}

.daily-activities-report .report-no-data {
    margin-top: 1rem;
    font-size: .8em;
}

/* ---------------------------------------------------------------------------
   Night hours report ("Ueber Mitternacht") preview.

   Three columns only, but the two date cells carry a weekday name in front of the
   date, which is far wider than the 41px .table.reports gives every cell. The shared
   block also clips silently (overflow-x: hidden, no scrollbar), and in the output
   area the preview column is barely 540px wide - so the table is dissolved into a
   real one with percentage columns rather than fought column by column.
   --------------------------------------------------------------------------- */
.table.reports.night-hours {
    display: table;
    table-layout: fixed;
    width: 100%;
    /* Wide enough for the German heads, narrow enough not to look stretched in the
       driver file, where nothing caps the preview. */
    min-width: 22rem;
    max-width: 40rem;
    max-height: none;
    overflow: visible;
    border-collapse: collapse;
    font-size: .75em;
    /* The body tracking costs about a tenth of the table width - see the daily
       activities table, which has to undo it for the same reason. */
    letter-spacing: normal;
    word-spacing: normal;
}

.table.reports.night-hours th,
.table.reports.night-hours td {
    width: auto;
    padding: .1rem .3rem;
    border-right: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-size: inherit;
}

/* The head of the third column is the longest word in the table ("SUMME NACHTSTUNDEN"), and
   in the output area the whole preview is only about 540px wide - hence the near-even split
   rather than two wide date columns and a narrow one. */
.table.reports.night-hours col.col-night-start,
.table.reports.night-hours col.col-night-end {
    width: 33%;
}

.table.reports.night-hours col.col-night-total {
    width: 34%;
}

/* driver-header.twig floats its dt/dd pairs, so #header collapses to zero height and
   everything after it slides up beside the floats - the calculation basis line ends up level
   with the table head, and the table itself is squeezed by the floats it sits next to.
   Cleared under this report's own scope: the shared partial is used by every other report,
   which would shift if it were changed underneath them. */
.night-hours-report #header::after {
    content: "";
    display: table;
    clear: both;
}

/* A rule under the heads instead of a filled bar, matching the PDF. */
.table.reports.night-hours thead tr {
    height: 1.4rem;
    background-color: transparent;
    border-bottom: 1px solid var(--border);
}

.table.reports.night-hours thead th {
    font-weight: 600;
    color: var(--text-mid);
}

.table.reports.night-hours tbody tr {
    height: 1.2rem;
}

/* What the sum is made of, set against the right edge below the header block - the
   same place the PDF puts it. */
.night-hours-report .report-calc-basis {
    /* Same cap as the table below it, so the line ends flush with the last column instead of
       drifting off to the right of a preview that is wider than the table. */
    max-width: 40rem;
    margin: .5rem 0 .75rem;
    text-align: right;
    font-size: .8em;
    color: var(--text-mid);
}

.night-hours-report .report-calc-basis .calc-basis-label {
    margin-right: .2rem;
}

/* "p span { float: right }" turns this line inside out - the label lands on the right and the
   symbols read backwards, and the paragraph collapses to zero height because nothing is left
   in the flow. The attestation report undoes the same rule the same way. */
.night-hours-report .report-calc-basis span {
    float: none;
}

/* The symbols are raw SVGs with nothing but a viewBox: without a size rule they render
   at the CSS default of 300x150px. "span svg" already sizes every symbol in the app to 1rem
   with !important and pads it away from the toolbar it was written for, so both have to be
   answered here. The colour travels as a custom property because a plain fill would lose
   against the id-scoped fill rules elsewhere in this file. */
.night-hours-report .report-calc-basis svg {
    width: .8rem !important;
    height: .8rem;
    margin: 0;
    padding-bottom: 0;
    fill: var(--act-color, var(--text));
    vertical-align: -.1rem;
    border-bottom: none;
}

.night-hours-report .act-driving   { --act-color: var(--red); }
.night-hours-report .act-work      { --act-color: var(--blue); }
.night-hours-report .act-available { --act-color: var(--yellow); }

.night-hours-report .dds-plus {
    margin: 0 .15rem;
    color: var(--text-mid);
    vertical-align: middle;
}

.night-hours-report .report-note {
    margin-top: .75rem;
    font-size: .7em;
    color: var(--text-mid);
}

/* The calendar day variant: five columns instead of three, so it needs a little more room and
   its own split. The four-class selector settles the tie with the night variant's col rules,
   which match the same elements through the shared "night-hours" class. */
.table.reports.night-hours.night-hours-calendar {
    min-width: 30rem;
    max-width: 48rem;
}

/* The basis line ends flush with the last column, so it has to follow this table's wider cap. */
.night-hours-calendar-report .report-calc-basis {
    max-width: 48rem;
}

.table.reports.night-hours.night-hours-calendar col.col-night-weekday {
    width: 10%;
}

.table.reports.night-hours.night-hours-calendar col.col-night-date {
    width: 18%;
}

.table.reports.night-hours.night-hours-calendar col.col-night-total {
    width: 28%;
}

/* col-night-piece deliberately carries no width: the pieces share what is left, which is one
   column for a window inside a single day and two for one that wraps midnight. */

/* Two lines in the head now (the caption and the basis under it), so it may not be pinned to
   the single-line height the night variant uses. */
.table.reports.night-hours.night-hours-calendar thead tr {
    height: auto;
}

/* The captions may wrap rather than be cut: in the output area the preview is barely 540px
   wide, and "Summe Nachtstunden" does not fit its column on one line there. The rows keep
   their nowrap - only the head is allowed the second line. */
.table.reports.night-hours.night-hours-calendar thead th {
    padding-top: .2rem;
    padding-bottom: .2rem;
    vertical-align: top;
    white-space: normal;
}

  div#tacho-maintenance-data, div#fleet-ef-data, div#fleet-so-data, div#driver-shifts-violations-data {
    max-height: calc(100vh - 12rem);
    overflow-y: scroll;
  }

  .table.reports.tacho-maintenance {
    margin: .25rem 0 .5rem 0;
    overflow-y: hidden;
  }

  #fleet-ef-data .events-and-faults, #fleet-so-data .speeding-offences  {
    margin: .5rem 0 2rem 0;
    overflow-y: hidden;
  }

  .table.reports.tacho-data {
    margin: .25rem 0 1.5rem 0;
    overflow-y: hidden;
  }

  .table.reports.tacho-maintenance th, .table.reports.tacho-maintenance td,
  .table.reports.tacho-data th, .table.reports.tacho-data td{width:92px}
  .table.reports.tacho-maintenance th:nth-child(2), .table.reports.tacho-maintenance td:nth-child(2){width:105px !important}
  .table.reports.tacho-maintenance th:nth-child(3), .table.reports.tacho-maintenance td:nth-child(3){width:155px !important}
  .table.reports.tacho-maintenance th:last-child, .table.reports.tacho-maintenance td:last-child{width:312px !important}

  .table.reports.events-and-faults th, .table.reports.events-and-faults td {width:110px}
  .table.reports.events-and-faults th:first-child, .table.reports.events-and-faults td:first-child{width:150px !important}
  .table.reports.events-and-faults th:nth-child(2), .table.reports.events-and-faults td:nth-child(2){width:55px !important}
  .table.reports.events-and-faults th:nth-child(5), .table.reports.events-and-faults td:nth-child(5){width:280px !important}
  .table.reports.events-and-faults th:last-child, .table.reports.events-and-faults td:last-child{width:40px !important}

  .table.reports.speeding-offences th, .table.reports.speeding-offences td {width:120px}
  .table.reports.speeding-offences th:first-child, .table.reports.speeding-offences td:first-child{width:250px !important}
  .table.reports.speeding-offences th:nth-child(2), .table.reports.speeding-offences td:nth-child(2){width:75px !important}
  .table.reports.speeding-offences th:nth-child(5), .table.reports.speeding-offences td:nth-child(5){width:90px !important}
  .table.reports.speeding-offences th:last-child, .table.reports.speeding-offences td:last-child{width:90px !important}

  .table.reports.mileage-summary th, .table.reports.mileage-summary td {width:135px}
  .table.driver-validities {
    margin-bottom: 2rem;
    overflow: hidden;
  }
  .table.reports.driver-validities th, .table.reports.driver-validities td {width:200px; border: none;}

  .table.reports.country-codes th, .table.reports.country-codes td {width:135px; padding: 0 .25rem;}
  div.fleet-country-codes {
    max-height: calc(100vh - 18rem);
    overflow-x: hidden;
    overflow-y: scroll;
  }

  div.fleet-country-codes .table.reports.country-codes {
    overflow-y: visible;
    max-height: fit-content;
  }

  .reports.table.driver-shifts-violations {
    margin: .5rem 0;
    overflow-y: hidden;
  }

  .reports.table.driver-shifts-violations th, .reports.table.driver-shifts-violations td {
    border: none;
  }

  #drivers .preview-section {
    max-width: calc(100% - 61rem);
  }

  #vehicles .preview-section {
    max-width: calc(100% - 57.5rem);
  }

  .preview-section h1 {
    font-size: 1.5rem;
  }

.preview-section dl {
    width: 35rem;
}

.preview-section dd {
    width: 22.5rem;
    font-size: .8em;
}

.preview-section dt {
    width: 11rem;
    font-size: .8em;
}

.preview-section p {
    font-size: .8em;
}

/* Match the merged-reports checkbox to the .button-primary.report buttons below it (same outer size and 1rem gap). */
.report-actions label.checkbox.merged-reports {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    margin: 0 0 1rem 0;
    padding: calc(0.125rem - 1px) 0.125rem;
    line-height: 2em;
}

/* display:flex above outweighs the generic label.hidden rule, so hide explicitly at higher specificity. */
.report-actions label.checkbox.merged-reports.hidden {
    display: none;
}

.report-actions label.checkbox.merged-reports .checkmark {
    /* The span follows the text in the markup; order pulls the box to the left of the label text. */
    order: -1;
    float: none;
    flex: 0 0 auto;
    position: relative;
    margin: 0 0.4rem 0 0;
}

.report-actions label.checkbox.merged-reports .checkmark:after {
    left: 0.3rem;
    top: -0.05rem;
}









.official-form-sheet h2 {
    background: transparent;
    border: none;
}
.official-form-sheet table{display:table;width:100%;border-collapse:separate;box-sizing:border-box;text-indent:initial;border-spacing:0}
.official-form-sheet table tr{display:flex;line-height:14px;border:1px solid;border-bottom:none}
.official-form-sheet table tbody tr:last-child{border-bottom:1px solid;}
.official-form-sheet table tr.tall{height:35px}
.official-form-sheet table th,.official-form-sheet table td{display:inline-block;padding:0 2px;vertical-align:inherit;text-align:left;border-right:1px solid;width:50%}
.official-form-sheet table td{padding:1px 2px}
.official-form-sheet table th:last-child,.official-form-sheet table td:last-child{border:none}
.official-form-sheet table th.wide,.official-form-sheet table td.wide{width:100% !important}
.official-form-sheet table th p{margin: 3px 0;font-size: 14px;font-weight: 400;}
.official-form-sheet #departure-control th{width:40%;border:none}
.official-form-sheet #departure-control td{width:33%}
.official-form-sheet #departure-control td p{float:left; width: 82%;}
.official-form-sheet #vehicle-data tbody tr {height: 40px;}
.official-form-sheet #vehicle-data #first-line td{width:30%}
.official-form-sheet #vehicle-data #first-line td:nth-child(2){width:40%}
.official-form-sheet #vehicle-data #second-line td{width:25%}
.official-form-sheet #vehicle-data #third-line td{width:33%}
.official-form-sheet #vehicle-data td .one {
    float: left;
    margin: 0 8px;
    padding-top: 20px;
}
.official-form-sheet #vehicle-data td .two, .official-form-sheet #vehicle-data td .two-row {
    float: left;
    display: flex;
    flex-direction: column;
    margin: 0 8px;
    padding-top: 4px;
}
.official-form-sheet #vehicle-data td .two-row {
    flex-direction: row;
    padding-top: 21px;
}
.official-form-sheet td svg {
    height: 14px;
    width: 14px;
    fill: var(--text);
}
.official-form-sheet p {
    line-height: 1rem;
    white-space: normal;
}
.official-form-sheet p svg {
    height: 16px;
    width: 16px;}
.official-form-sheet p.right { text-align: right }
.official-form-sheet #daily-control-sheet svg {
    float: right;
    height: 16px;
    width: 16px;
}
.official-form-sheet p.bold {
    font-weight: 800;
}

.official-form-sheet #vehicle-data p.bold
{
    font-size: 11px;
    padding: 6px;
}
.official-form-sheet #daily-control-sheet #first-line td{width:23%}
.official-form-sheet #daily-control-sheet #first-line td:first-child{width:31%}

.official-form-sheet #daily-control-sheet .hours {border-top:none}
.official-form-sheet #daily-control-sheet .hours td{padding-top: 0;width:45px}
.official-form-sheet #daily-control-sheet .hours td:first-child{width:113px}

.official-form-sheet #daily-control-sheet .time-line td{width:11.5px;padding: 2px 0}
.official-form-sheet #daily-control-sheet .time-line td:first-child{width:117px; display: flex; flex-direction: row;}
.official-form-sheet #daily-control-sheet .time-line p {width:75%}
.official-form-sheet #daily-control-sheet .total p {width:90%}
.official-form-sheet #daily-control-sheet .time-line svg, .official-form-sheet #daily-control-sheet .total svg {float:right}
.official-form-sheet #daily-control-sheet .no-border {border:none}
.official-form-sheet #daily-control-sheet .bottom-border{border:none; border-bottom: 1px solid}
.official-form-sheet #daily-control-sheet .right, .official-form-sheet #daily-control-sheet .right td {text-align: right;}

.official-form-sheet #daily-control-sheet tr.places td {padding: 3px 0;}
.official-form-sheet #daily-control-sheet tr.total {border-top: none;}
.official-form-sheet #daily-control-sheet .border-top {border-top: 1px solid !important;}
.official-form-sheet #daily-control-sheet .total td{width:141px; padding: 3px 2px;}
.official-form-sheet #daily-control-sheet .total td:nth-child(3) {width:115px}
.official-form-sheet #daily-control-sheet .total td:nth-child(4) {width:30px}
.official-form-sheet #daily-control-sheet .total td:nth-child(5) {width:103px;display: flex; flex-direction: row;}
.official-form-sheet #daily-control-sheet .total td:last-child{width:160px;}
.official-form-sheet #footer p {margin-top:3px;font-size:9px}
.official-form-sheet #footer svg {
    width: 12px; height: 12px
}
.official-form-sheet .time-line {
    max-height: 1rem;
}
.official-form-sheet #daily-control-sheet tr:last-child td:first-child{width:67%}
.official-form-sheet #daily-control-sheet tr:last-child td:last-child{width:33%}
.official-form-sheet div.box{float: right;margin-right: 10px;width:16px; height:16px;border: 1px solid}

.attestation-of-activities h1,.attestation-of-activities h2,.attestation-of-activities h3{display: block;margin:0;padding:0;font-weight: 400;text-transform: uppercase;font-size: 11px;line-height: 12px; text-align: center; background: transparent;border: none;}
.attestation-of-activities p{display: block;margin: 0; padding: 0 15px;font-size:10px;line-height: 18px}
.attestation-of-activities p span{font-weight: 600; float:none}
.attestation-of-activities p span.space{padding-left:34px}
.attestation-of-activities p span.space-long{padding-left:25px}
.attestation-of-activities p.space-up{margin-top:10px}
.attestation-of-activities h3{font-weight: 600}input{margin:0 10px 0 0; padding: 0}
.attestation-of-activities h4{display: block;margin:0;padding:6px 0;font-size:11px;line-height: 15px;font-weight:400;text-align: center}
.attestation-of-activities h5{display: block;margin: 0; padding: 8px 15px;font-size:11px;line-height: 15px}
.attestation-of-activities span.up{font-size: 11px;vertical-align: super}
.attestation-of-activities #header{padding: 25px 45px 15px}
.attestation-of-activities #content, #footer{display: block;width: 100%;padding:0}
.attestation-of-activities #content{padding-bottom:5px;border:1px solid #fff}
.attestation-of-activities #footer{padding-top:2px;}
.attestation-of-activities #footer p{padding: 2px 15px}
.attestation-of-activities #notes{margin: 0 20px}
.attestation-of-activities #notes p{padding:0}
.attestation-of-activities #notes p span.space-long{padding-left:50px}
.attestation-of-activities div.line{margin:5px 0;width: 40%; border-top:1px solid #fff}
.attestation-of-activities #country p{padding: 5px 8px 0 20px;font-family: Arial, Helvetica, sans-serif; font-size: 40px; line-height: 40px; color: #808080}
.attestation-of-activities p span.left{float: left}
.attestation-of-activities p span.right{float:right}

#map { height: calc(100vh - 10rem); width: calc(100vw - 12rem) }
.leaflet-popup {
    min-width: 14rem;
}
.leaflet-popup-content {
    min-width: 15rem;
    text-align: left;
}
.leaflet-popup-tip
{
    display: none;
}

i.icon.delete:before{
    font-family: 'Font Awesome\ 5 Free';
    content: "\f057";
    font-style: normal;
    margin-left: .25rem;
}

.notification-reminder-link {
    color: inherit !important;
    text-decoration: none;
    margin-left: 3rem;
}

.notification-reminder-link i {
    color: var(--hl) !important;
    width: .7rem;
    height: .7rem;
}

.notification-reminder-link .svg-inline--fa,
a.notification-reminder-link .svg-inline--fa {
    width: .7rem !important;
    height: .7rem !important;
}

.notification-reminder-link.is-disabled i {
    color: var(--bhov) !important;
}

a.notification-reminder-link.is-disabled i,
a.notification-reminder-link.is-disabled svg {
    color: var(--bhov) !important;
}

/* Two-line cells, shared by all three attestation lists (driver file -> documents, the archive and
   the day tile in the activity accordion): the fact on top, its detail quietly underneath. Cells
   that carry only one line still line up with it, which is what the top alignment on those tables
   is for. */
#driver-attestations .a-main, #attestations-archive-table .a-main, .driver-attestation-day .a-main {display: block;}
#driver-attestations .a-sub, #attestations-archive-table .a-sub, .driver-attestation-day .a-sub {display: block;
    margin-top: .1rem;
    color: var(--text-mid);
    font-size: .8em;}
/* DRIVER FILE -> DOCUMENTS (generated attestations) */
/* The base .table cells are inline-block with a fixed 5.75rem width, content-box sizing and
   nowrap inherited from <table>. Without own border-box widths the long occasion text runs into
   the neighbouring columns, so every column gets an explicit share and is allowed to wrap. */
#driver-attestations {width: 100%;}
#driver-attestations th, #driver-attestations td {box-sizing: border-box;
    flex: 0 0 auto;
    width: 14%;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;}
/* Same whitespace trap as the archive below: six gaps between the inline-block cells added 41px
   that Gecko renders and Chromium drops, carrying the icon column out of the clipped tab. */
#driver-attestations,
#driver-attestations thead,
#driver-attestations tbody {display: block;}
#driver-attestations tr {display: flex;}
#driver-attestations th:nth-child(2), #driver-attestations td:nth-child(2) {width: calc(24% - 6rem);}
#driver-attestations th:nth-child(3), #driver-attestations td:nth-child(3) {width: 19%;}
#driver-attestations th:nth-child(4), #driver-attestations td:nth-child(4) {width: 13%;}
#driver-attestations th:nth-child(5), #driver-attestations td:nth-child(5) {width: 8%;}
/* Widest column of the row, so the preview icon takes its space from here rather than from the
   occasion text next to it - the one column that has to wrap anyway. */
#driver-attestations th:nth-child(6), #driver-attestations td:nth-child(6) {width: calc(22% - 3.5rem);}
/* Fixed width for the icon column - see the archive table for why a percentage spills. Four icons
   now, the same set the archive carries, so the same 9.5rem. */
#driver-attestations th:last-child, #driver-attestations td:last-child {width: 9.5rem;
    text-align: right;
    white-space: nowrap;}
#driver-attestations tr {border-bottom: 0.05rem solid var(--border-dark);}
#driver-attestations td {padding-top: .5rem;
    padding-bottom: .5rem;}
#driver-attestations td:last-child a {padding: 0 .35rem;
    cursor: pointer;}
#driver-attestations td:last-child .svg-inline--fa {width: 1rem;
    height: 1rem;
    padding: 0;}
#driver-attestations td:last-child a:hover {color: var(--hl);}
#driver-attestations td .fi {margin-right: .35rem;}
/* Attestation tile inside the daily accordion. Like its sibling day tables the columns need
   explicit widths (the .table base is a fixed 5.75rem, nowrap); border-box keeps the padding in. */
#activities-details-tab .driver-attestation-day th, #activities-details-tab .driver-attestation-day td {box-sizing: border-box;
    flex: 0 0 auto;
    padding: 1%;
    width: 32%;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;}
/* Three gaps between the inline-block cells, 21px that only Gecko renders - same trap as above. */
#activities-details-tab .driver-attestation-day,
#activities-details-tab .driver-attestation-day thead,
#activities-details-tab .driver-attestation-day tbody {display: block;}
#activities-details-tab .driver-attestation-day tr {display: flex;}
#activities-details-tab .driver-attestation-day th:first-child, #activities-details-tab .driver-attestation-day td:first-child {width: 30%;}
#activities-details-tab .driver-attestation-day th:nth-child(2), #activities-details-tab .driver-attestation-day td:nth-child(2) {width: 26%;}
#activities-details-tab .driver-attestation-day th:nth-child(3), #activities-details-tab .driver-attestation-day td:nth-child(3) {width: 12%;}
#activities-details-tab .driver-attestation-day td .fi {margin-right: .35rem;}
/* ATTESTATION ARCHIVE (output -> certificates -> archive) */
/* .tab-content is content-box with width:100%, so its padding has to be contained - otherwise the
   list pushes past the tab container and swallows the spacing towards the right screen edge. */
#attestations-archive .tab-content {box-sizing: border-box;
    padding: .25rem 1rem 1rem 1rem;}
#attestations-archive .archive-scroll {max-height: calc(100vh - 6.5rem);
    overflow-y: auto;
    overflow-x: hidden;}
/* The .table base gives every cell a fixed 5.75rem and nowrap, so each column needs an explicit
   border-box width and the long occasion text has to be allowed to wrap. Everything else
   (padding, type, hover) stays on the base so the list matches the other tables. */
#attestations-archive-table th, #attestations-archive-table td {box-sizing: border-box;
    flex: 0 0 auto;
    width: 10%;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;}
/* The cells are inline-block, so the line breaks the template writes between the <td>s arrive as
   real spaces inside the anonymous table cell the row wraps them in. Chromium drops that
   whitespace, Gecko keeps it: seven gaps add up to ~48px, which carries the fixed action column
   past the right edge where overflow-x:hidden cuts the delete icon off. Letting the row lay its
   own cells out removes the gaps in every engine - flex: 0 0 auto above keeps each column at
   exactly the width set below. */
#attestations-archive-table,
#attestations-archive-table thead,
#attestations-archive-table tbody {display: block;}
#attestations-archive-table tr {display: flex;}
/* Sticky has to sit on the thead: on a th it is ignored here, the cells are inline-block.
   The opaque fill belongs on the row, not on the cells: an empty header cell (the action
   column) collapses to padding height and shows up as a detached bar above the icons. */
#attestations-archive-table thead {position: sticky;
    top: 0;
    z-index: 2;}
#attestations-archive-table thead tr {background: var(--bg);}
/* Driver names are the one column that can take any leftover, so it absorbs whatever the fixed
   action column takes and the row still adds up to 100%. */
#attestations-archive-table th:nth-child(2), #attestations-archive-table td:nth-child(2) {width: calc(27% - 9.5rem);}
#attestations-archive-table th:nth-child(3), #attestations-archive-table td:nth-child(3) {width: 14%;}
#attestations-archive-table th:nth-child(4), #attestations-archive-table td:nth-child(4) {width: 14%;}
#attestations-archive-table th:nth-child(5), #attestations-archive-table td:nth-child(5) {width: 13%;}
#attestations-archive-table th:nth-child(6), #attestations-archive-table td:nth-child(6) {width: 7%;}
#attestations-archive-table th:nth-child(7), #attestations-archive-table td:nth-child(7) {width: 15%;}
/* Four fixed-size icons: a percentage width shrinks below them on narrow windows and the
   icons then spill out of the cell (nowrap + overflow:visible) past the right screen edge. */
#attestations-archive-table th:last-child, #attestations-archive-table td:last-child {width: 9.5rem;
    text-align: right;
    white-space: nowrap;}
#attestations-archive-table td:last-child a {padding: 0 .35rem;
    cursor: pointer;}
/* The base .svg-inline--fa carries padding: 0 .813rem - that is what made the icons 42px wide
   and pushed the third one out of the cell across the right screen edge. */
#attestations-archive-table td:last-child .svg-inline--fa {width: 1rem;
    height: 1rem;
    padding: 0;}
#attestations-archive-table td:last-child a:hover {color: var(--hl);}
#attestations-archive-table td .fi {margin-right: .35rem;}
#attestations-archive .archive-empty {padding: 1rem 0;
    color: var(--text-mid);}
/* Reading an attestation on screen. Sized like the map popup - the other full-bleed one - and
   given an explicit height: the pdf viewer inside the iframe brings none of its own. */
#attestation-preview-popup {width: calc(100vw - 10rem);
    left: 5rem;}
#attestation-preview-popup .popup-content {display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: calc(100vh - 3rem);}
#attestation-preview-popup .popup-content h3 {flex: none;
    margin-top: 0;}
#attestation-preview-popup iframe {flex: 1;
    margin-top: .75rem;
    border: none;
    background: var(--menubg);}
/* The document takes a moment to be rebuilt, so the spinner holds the space until it is there. */
#attestation-preview-popup .preview-loader {display: none;
    flex: 1;
    align-items: center;}
#attestation-preview-popup .preview-loader.active {display: flex;}
#attestation-preview-popup .preview-loader.active + iframe {display: none;}

/* report generation notice - same popup family as the message dialogs, minus the close control */
#pdf-progress-popup {
    top: calc((100vh - 12rem)/2);
}

#pdf-progress-popup .popup-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 2rem 1rem;
    min-height: 8rem;
}

#pdf-progress-popup .loader {
    margin: 0;
    width: auto;
}

#pdf-progress-popup .loader .circle {
    width: 2rem;
    height: 2rem;
}

#pdf-progress-popup p {
    margin: 0;
    font-size: 1.1em;
}
