:root {
    --bg: #191C24;
    --menubg: #21252f;
    --dropbg: #474e62;
    --text: #ffffff;
    --text-mid: #a6a7ab;
    --text-dark: #191C24;
    --red: #ff0000;/* db141e */
    --green: #66ff33;
    --yellow: #fdb103;
    --blue: #0099ff;
    --hl: #db141e;
    --hov: #393f4f;
    --ttip: #575e74;
    --border: #969eb0;
    --border-dark: #474e62;
    --sel: #393f4f;
    --dbox: #2b303d;

    --tool: #969eb0;
    --bhov: #8990a0;

    /* Motion. The project already had an implicit speed scale - 100/120ms for
       popups and accordions, 200ms for the chevron, 250ms for the tabs - it was
       just never named. These are those values, rounded into three steps. */
    --dur-fast: 120ms;
    --dur: 180ms;
    --dur-slow: 300ms;
    --ease: cubic-bezier(.2, 0, .2, 1);
}

@font-face {
    font-family: "Roboto";
    src: url("../fonts/Roboto-Light.ttf") format("truetype");
}

@keyframes fadeEffect {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 0.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: var(--menubg) #474e62 !important;
  }
/* SCROLLBAR END */

::selection {
    color: var(--text);
    background: var(--sel);
}
/* For Mozilla Firefox */
::-moz-selection {
    color: var(--text);
    background: var(--sel);
}

#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 {
    /* No min-width here any more. It used to be 1920px, which made the body
       wider than the window on anything smaller and put a second scrollbar
       along the bottom of the screen - next to the one the table already
       has. overflow-x:hidden below could not prevent that: it hides what
       overflows *inside* the body, not the body sticking out of the
       viewport. The company list is the only layout that needs the width,
       and it now asks for it itself - see .table.clients. */
    background: var(--bg);
    font-size: 14px;
    font-weight: 200;
    word-spacing: 2px;
    letter-spacing: 1px;
    overflow-x: hidden;
}

body.login-page {
    min-width: 1910px;
}

.content {
    width: 100%
}

h1 {
    display: block;
    color: var(--text);
    cursor: default;
}

h1 span {
    color: var(--hl);
}

h2 {
    display: block;
    margin: 1rem 0 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: 100%;
    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.required {
    border-color: #b9861e;
}

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);
}

p.data-area {
    margin-bottom: 1rem;
    padding-left: 0 !important;
    text-transform: uppercase;
    font-size: 1rem !important;
    background: var(--bg);
    border-bottom: .005rem solid var(--border) !important;
}

th.data-area {
    font-size: 1rem !important;
}

a {
    color: var(--text);
    text-decoration: none;
}

.no-border {
    border: none !important;
}

div.divider {
    border-bottom: 1px solid var(--border-dark);
}

.table tr.no-border {
    border: none;
}

.table tr.search-hidden, div.hidden, p.hidden, button.hidden {
    display: none !important;
}

label {
    color: var(--text);
    font-size: .9em;
}

.form {
    display: inline-block;
    margin: 0;
    width: 100%;
}

.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, #right-menu i.fa-solid, #right-menu i.fa-regular {
    padding: 0.8rem 0 .25rem 0;
    margin-right: 2rem;
}

#right-menu a {
    padding: 0;
}

.svg-inline--fa, .fa-solid, .fa-regular {
    position: relative;
    width: 1.375rem;
    height: 1.375rem;
    text-align: center;
    color: var(--text);
}

  /* 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: 0 0 0.125rem 3.125rem;
    height: 3rem;
    background: var(--menubg);
}

.top-bar svg, .top-bar i.fa-solid, .top-bar i.fa-regular {
    cursor: pointer;
}

.search-section {
    display: flex;
    padding: 0.5rem;
    height: 2rem;
    width: 19em;
    border-right: 0.125rem solid var(--bg);
}

.search-section .svg-inline--fa, .search-section .fa-solid, .search-section .fa-regular {
    padding: 0.35rem 0.2rem 0 0.7rem;
}

.filter-section {
    display: flex;
    padding: 0.5rem;
    height: 2rem;
    gap: 2rem;
    width: 100%;
}

div.icon.input {
    position: relative;
}

input#search-field {
    margin: 0;
    height: 1.5rem;
    width: 12.6rem;
}

div.icon input:not(.ui.dropdown .menu) > .input {
    padding: 0.2rem 2.3rem 0.2rem 0.3rem;
    width: 8rem;
}

svg.fa-magnifying-glass, i.fa-magnifying-glass {
    cursor: default;
    position: absolute;
    top: 0;
    right: 0.313rem;
    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 {
    margin: 0 .5rem;
}

.active-switch {
    display: flex;
    flex-direction: row;
    gap: .25rem;
}

.active-switch .title {
    height: 2rem;
    line-height: 2.1rem;
}

a#file-upload svg, a#file-upload i.fa-solid, a#file-upload i.fa-regular {
    cursor: pointer;
}

.top-bar a svg:hover, .top-bar a i.fa-solid:hover, .top-bar a i.fa-regular:hover, .top-bar svg.fa-chevron-down:hover, .top-bar i.fa-chevron-down:hover {
    color: var(--hl);
}

.top-bar a.red svg, .top-bar a.red i.fa-solid, .top-bar a.red i.fa-regular {
    border-bottom: .25rem solid var(--red);
}

.acc .fa-chevron-right {
    height: .9rem;
    width: .9rem;
    transition: transform var(--dur) var(--ease);
}

svg title {
    background-color: red;
}

/* CONTENT */
#content {
    display: flex;
    margin-left: 3.125rem;
}

/* COMPANIES */
.terminals {
    margin-bottom: 1rem;
}

.terminals-list {
    margin-bottom: 1rem;
    max-height: 15rem;
    overflow: hidden;
    overflow-y: scroll;
}

div.initial-trainings-list {
    margin-top: 4rem;
}

.table.clients {
    /* No max-height any more. calc(100vh - 10rem) assumed the list started
       10rem below the top of the window; it actually starts lower than that,
       so the page ended up taller than the window and the browser added a
       vertical scrollbar next to the one the list already had. The height now
       comes out of the flex chain below, which stays right even when the
       filter bar wraps on a narrow window. */
    display: list-item;
    overflow-y: scroll;
    /* The column widths are percentages of the row, so the row needs a width
       to be a percentage of - that is what body{min-width:1920px} used to
       provide, at the cost of a scrollbar at the edge of the screen. Asking
       for it here keeps the columns at exactly the same size (measured: all
       16 identical) and moves the scrolling inside the table, where
       overflow-y already put it: a non-visible overflow-y turns overflow-x
       into auto, so this needs no second declaration.
       1920 - 3.125rem for the menu - 2rem the tab padding = the width the
       table had on a 1920px window. */
    min-width: calc(1920px - 3.125rem - 2rem);
}
.tg-api-key {
    margin-top: 4rem;
}

.report-logo-title {
    margin-top: 5rem;
}

.details-accordion {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.telematic-entries {
    margin-top: 3rem;
}

.company-users {
    margin-top: 1rem;
}

.details-accordion-item {
    margin: 0;
    padding: 0;
    background: var(--hov);
    border-radius: 3px;
    overflow: hidden;
}

.details-accordion-toggle {
    width: 100%;
    padding: .5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.details-accordion-toggle .fa-chevron-right {
    transition: transform .2s ease;
}

.details-accordion-item.opened .details-accordion-toggle .fa-chevron-right {
    transform: rotate(90deg);
}

.details-accordion-content {
    display: none;
    padding: 0 .75rem 1rem;
}

.details-accordion-item .button-primary {
    margin: 0 .5rem .5rem 0;
}

.add-telematic-entry {
    float: right;
    cursor: pointer;
    font-size: 1.1rem;
}

/* --- DDD import tile ----------------------------------------------------
   The tile is rendered for every one of the ~1700 companies and therefore
   ships without any job data; app10.js fills it from /company/dddImportStatus
   and puts one of the state classes below on .ddd-import, so the bar and the
   status line can never disagree about what the job is doing. */
.ddd-import h2 {
    margin-top: 4rem;
}

.ddd-progress {
    position: relative;
    height: 1rem;
    margin: 0 0 .75rem 0;
    background: var(--dbox);
    border: .05rem solid var(--border-dark);
    overflow: hidden;
}

/* Driven with transform, never width - same reason as #loading-bar: the
   company list is a document of ~130.000 nodes, and only transform keeps
   moving on the compositor while a table update blocks the main thread. */
.ddd-progress-bar {
    height: 100%;
    background: var(--border);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform var(--dur) var(--ease);
}

/* The label sits on top of the bar, which reaches it at 100% - the shadow is
   what keeps it readable on the bright green fill. */
.ddd-progress-value {
    position: absolute;
    top: 0;
    right: .25rem;
    font-size: .75em;
    line-height: 1rem;
    text-shadow: 0 0 .2rem var(--bg), 0 0 .2rem var(--bg);
}

.ddd-import.running .ddd-progress-bar   { background: var(--blue); }
.ddd-import.done .ddd-progress-bar      { background: var(--green); }
.ddd-import.failed .ddd-progress-bar    { background: var(--red); }

.ddd-import.running .ddd-state          { color: var(--yellow); }
.ddd-import.done .ddd-state             { color: var(--green); }
.ddd-import.failed .ddd-state           { color: var(--red); }

/* Earlier imports of the same company. Nothing is ever overwritten, so this is
   where a second admin's upload keeps the first one visible. */
/* clear, because .button-primary.wide floats right - without it the heading
   climbs up beside the button instead of starting below it. */
.ddd-history {
    clear: both;
    margin-top: 1rem;
    padding-top: .5rem;
}

.ddd-history h3 {
    margin: 0 0 .35rem 0;
    font-size: .85em;
    color: var(--border);
}

.ddd-history-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ddd-history-list li {
    padding: .35rem 0;
    border-top: .05rem solid var(--border-dark);
    font-size: .8em;
    line-height: 1.35;
}

/* Two lines per entry: when and what on the first, who and the outcome on the
   second. The file name is the part that can run long, so it is the one that
   gets truncated rather than pushing the date out of the tile. */
.ddd-history-when {
    color: var(--border);
    margin-right: .5rem;
}

.ddd-history-file,
.ddd-history-who {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ddd-history-when,
.ddd-history-file {
    display: inline-block;
    vertical-align: baseline;
    max-width: 60%;
}

.ddd-history-who {
    color: var(--border);
}

.ddd-history-more {
    margin: .35rem 0 0 0;
    font-size: .75em;
    color: var(--border);
}

/* --- Company notes tile -------------------------------------------------
   Like the DDD tile, this one is rendered for every one of the ~1700
   companies and ships empty; app10.js fills it from /company/notes once the
   row is opened. The entries reuse .details-accordion, so opening one is the
   same handler that opens a telematics entry or a user. */
.company-notes {
    margin-bottom: 1rem;
}

.add-company-note {
    float: right;
    cursor: pointer;
    font-size: 1.1rem;
}

.company-notes-list {
    margin-top: .5rem;
}

/* The heading takes what is left over so the date keeps its place at the
   right edge - a long heading is truncated rather than pushing the date out
   of the collapsed entry. min-width:0 is what allows a flex item to shrink
   below the width of its own text. */
.company-notes-list .note-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-notes-list .note-when {
    flex: 0 0 auto;
    color: var(--border);
    font-size: .8em;
}

/* pre-line, so the line breaks the admin typed survive - the text arrives as
   text and is written with .text(). The two wrap rules are for the other
   direction: a pasted URL has no space to break at and would otherwise widen
   the whole column. */
.company-notes-list .note-body {
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
}

.company-notes-list .note-author {
    margin: .5rem 0 0 0;
    color: var(--border);
    font-size: .8em;
}

/* .button-primary.wide floats right, and the delete button is the last thing in
   the entry - without containment the content box would end above it and the
   button would hang out over the next note. Scoped to the notes rather than to
   .details-accordion-content, so the telematics and user entries next to them
   keep the box they have today.

   A clearfix and NOT display:flow-root: the collapsed state of every accordion
   entry is the display:none on .details-accordion-content, and any display here
   beats it on specificity - which left every note standing open while the
   handler still thought it was closed, so it took two clicks to shut one. */
.company-notes-list .details-accordion-content::after {
    content: "";
    display: block;
    clear: both;
}

.company-notes-list .delete-company-note {
    margin-top: .5rem;
}

.company-notes-more {
    margin: .35rem 0 0 0;
    font-size: .75em;
    color: var(--border);
}

/* The notes sit above the tag list, which can run to hundreds of entries -
   so this is the heading that needs the gap, not the one above it. */
.nfc-tags-title {
    margin-top: 4rem;
}

div.infos {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin: .5rem;
}

div.infos .element {
    display: flex;
    width: 13rem;
    background: var(--dbox);
    border: solid 2px var(--sel);
    border-radius: 3px;
    height: 2.5rem;
}

div.infos .element div.svg {
    border-right: solid 2px var(--sel);
    padding: .5rem;
    height: 1.5rem;
    width: 1.5rem;
}

div.infos .element div.text {
    line-height: 2.5rem;
    padding-left: .5rem;
}

/* TAB START */
.sub-menu {
    margin-left: 1rem;
    padding: 0 0.125rem;
    width: calc(100% - 2rem);
    display: block;
    overflow: hidden;
}

.sub-menu.wide {
    width: 10rem;
}

  /* Style the buttons inside the tab */
  .sub-menu button {
    width: 10%;
    background: var(--dbox);
    border: none;
    cursor: pointer;
    margin-right: 2rem;
    padding: .5rem .5rem;
    transition: background-color var(--dur) var(--ease), border-left-color var(--dur) var(--ease);
    font-size: 1em;
    text-align: left;
    color: var(--text);
  }

  .sub-menu.wide button {
    width: 100%;
    margin-bottom: .25rem;
  }

  /* The tab styling must not reach the seller filters that sit in the same bar.
     ":not(.sub-menu button.child-tab)" also carried the specificity of its own
     argument (0,3,2), which no ".sub-menu button.facet" rule could outweigh. */
  .sub-menu button:not(.child-tab):not(.facet)
  {
    border-left: 0.25rem solid var(--dbox)
  }

  /* Change background color of buttons on hover */
  .sub-menu button:hover:not(.child-tab):not(.facet) {
    background-color: var(--sel);
    border-left: 0.25rem solid var(--sel);
  }

  /* Create an active/current tablink class */
  .sub-menu button.active:not(.child-tab):not(.facet) {
    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);
  }

  /* Seller filters. They keep the position, the colour bar and the weight the
     dead <label>s had, so nothing moves - they just work now. */
  .sub-menu button.facet.seller {
    margin: 0 1rem;
    padding: .25rem;
    width: auto;
    max-width: none;
    float: right;
    /* A <button> does not inherit the page font; the <label> this replaced did. */
    font-family: inherit;
    font-size: .9em;
    font-weight: 800;
    letter-spacing: inherit;
    border: none;
    background: transparent;
    color: var(--text-mid);
    cursor: pointer;
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
  }

  .sub-menu button.facet.seller:hover,
  .sub-menu button.facet.seller[aria-pressed="true"] {
    color: var(--text);
  }

  .sub-menu button.facet.seller[aria-pressed="true"] {
    background-color: var(--sel);
  }

  .sub-menu button.facet.seller.vh {
    border-bottom: .25rem solid #fff;
  }

  .sub-menu button.facet.seller.tz {
    border-bottom: .25rem solid #f07e33;
  }

  /* No it-TELEMATICS filter: there are no such customers. The row colour below
     stays, so should one ever turn up it is still recognisable. */

  .sub-menu button.facet.seller.vv {
    border-bottom: .25rem solid var(--blue);
  }

  .sub-menu button.facet.seller.si {
    border-bottom: .25rem solid #a2bb4d;
  }

/* FILTER BAR */
.filter-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .5rem 1rem 0 1rem;
    padding: .25rem .125rem;
}

.filter-bar .filter-title {
    color: var(--text-mid);
    font-size: .9em;
}

.filter-bar .facet-icons {
    display: flex;
    gap: .25rem;
}

.filter-bar button.facet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    background: var(--dbox);
    color: var(--text-mid);
    font-size: 1rem;
    cursor: pointer;
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

/* ".svg-inline--fa, .fa-solid, .fa-regular" pins every icon to 1.375rem and to
   var(--text). Without overriding both here the icons would sit at 22px in a
   28px button and stay white whatever state the button is in. */
.filter-bar button i {
    width: 1em;
    height: 1em;
    color: inherit;
}

.filter-bar button.facet:hover {
    background: var(--hov);
    color: var(--text);
}

.filter-bar button.facet[aria-pressed="true"] {
    background: var(--sel);
    color: var(--blue);
    box-shadow: inset 0 -2px 0 var(--blue);
}

.filter-bar button.facet.warn[aria-pressed="true"] {
    color: var(--hl);
    box-shadow: inset 0 -2px 0 var(--hl);
}

.filter-bar select.facet-select {
    height: 1.75rem;
    padding: 0 .25rem;
    border: none;
    background: var(--dbox);
    color: var(--text);
    font-family: inherit;
    font-size: .9em;
    cursor: pointer;
}

/* The dropdown list itself is drawn by the platform, which uses the system
   colours unless the option carries its own. */
.filter-bar select.facet-select option,
.filter-bar select.facet-select optgroup {
    background: var(--dbox);
    color: var(--text);
}

.filter-bar .filter-result {
    color: var(--text-mid);
    font-size: .9em;
    margin-left: auto;
}

.filter-bar button.filter-reset {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .5rem;
    border: none;
    background: var(--dbox);
    color: var(--text-mid);
    font-family: inherit;
    font-size: .9em;
    cursor: pointer;
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.filter-bar button.filter-reset:hover {
    background: var(--hov);
    color: var(--text);
}

/* Nothing left after filtering. Sits below the table, which scrolls on its own. */
p.no-results {
    margin: .75rem 1rem;
    color: var(--text-mid);
    font-size: .9em;
}

/* The search box says it is working during the debounce window. Opacity only -
   the browser is busy filtering, and anything else would stutter. */
@keyframes search-pulse {
    50% { opacity: .3; }
}

.search-section.searching i.fa-magnifying-glass {
    animation: search-pulse var(--dur-slow) var(--ease) infinite;
}

  /* Style the tab content */
  .tab-container {
    display: none;
    margin: .5rem 0 0 1rem;
    padding-right: 1rem;
    width: calc(100% - 2rem);
    color: var(--text);
  }

  .tab-container.wide {
    width: calc(100% - 11.75rem);
  }

  .tab-container.wide-menu {
    width: calc(100% - 12.75rem);
  }

.tab-container.scroll, .tab-container.inline-scroll {
    height: calc(100vh - 4.25rem);
}

.tab-container.scroll {
    overflow-y: scroll;
  }

  .tab-container.active, .sub-menu button.child-tab.visible {
    display: flex;
    overflow-x: hidden;
    flex-direction: column;
  }

  .tab-content.narrow {
    padding-right: 1rem;
    width: calc(100% - 15.125rem);
    overflow-y: scroll;
  }

  /* Opacity only, and no fill-mode - both on purpose. A *filled* animation keeps
     a stacking context alive after it ends, and a filled transform additionally
     computes to a matrix instead of none, making the element a containing block.
     The settings popups sit inside .tab-content (the company list keeps its own
     outside), so either one leaves them stuck behind #overlay: the popup opens,
     but all you see is the grey sheet. */
  .tab-content {
    animation: fadeEffect var(--dur) var(--ease);
  }

  /* The company list is wider than the window on anything below 1920px, and
     this is where that width is scrolled - not at the edge of the screen.
     Deliberately not on .tab-content as a whole: the settings popups sit
     inside theirs (see the note above), and a scroll container would clip
     them. The table keeps its own overflow-y, so the sticky header still
     sticks and the column widths stay exactly what they were - measured,
     all 16 unchanged. */
  .tab-content.clients-scroll {
    overflow-x: auto;
  }

  /* The company list fills the window and stops there, so the page itself
     never scrolls - everything is scrolled inside the table. 3.125rem is the
     top bar: 3rem tall plus the 0.125rem gap below it.

     Scoped to .content and .clients-scroll on purpose. Both exist only in
     companies/index.twig; the settings page has neither, and giving its
     content a fixed height would cut it off instead. */
  #content > .content {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 3.125rem);
    min-height: 0;
  }

  /* min-height:0 on each of them: a flex item defaults to min-height:auto and
     would refuse to shrink below its content, which is exactly what pushes a
     long list past the bottom of the window. */
  .content > .tab-container.active {
    flex: 1 1 auto;
    min-height: 0;
  }

  /* The tab bar and the filter bar are flex items of the same column, and the
     tab container's basis is its content - a list far taller than the window.
     With the default flex-shrink:1 that overflow is spread over every item, so
     both bars get squeezed. The filter bar survives only because overflow:visible
     keeps its automatic minimum size; .sub-menu sets overflow:hidden, which turns
     that protection off - it collapsed to 2px and clipped the tab buttons. Only
     the list may shrink. */
  .content > .sub-menu,
  .content > .filter-bar {
    flex: 0 0 auto;
  }

  .tab-content.clients-scroll {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .tab-content.clients-scroll > table.clients {
    flex: 1 1 auto;
    min-height: 0;
  }

  .tab-content.wide {
    width: 100%;
  }

  .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 .menu > .item.filtered {
    display: none;
}

.ui.dropdown > .text {
    display: inline-block;
    padding: 0.2rem 0.3rem;
    width: 100%;
    -webkit-transition: none;
    transition: none;
    align-self: center;
}

.ui.dropdown .menu > .input:not(.transparent) input {
    padding: 0.5em 1em;
    margin: 0;
}

.ui.dropdown div.icon svg, .ui.dropdown div.icon i.fa-solid, .ui.dropdown div.icon i.fa-regular {
    top: 0.325rem;
    height: 1.25rem;
    width: 1.25rem;
}

.ui.dropdown.active .svg-inline--fa:not(div.icon svg):not(div.icon i), .ui.dropdown.active .svg-inline--fa:not(div.icon i.fa-solid), .ui.dropdown.active .svg-inline--fa:not(div.icon i.fa-regular), .ui.dropdown.active .fa-solid:not(div.icon svg):not(div.icon i), .ui.dropdown.active .fa-solid:not(div.icon i.fa-solid), .ui.dropdown.active .fa-solid:not(div.icon i.fa-regular), .ui.dropdown.active .fa-regular:not(div.icon svg):not(div.icon i), .ui.dropdown.active .fa-regular:not(div.icon i.fa-solid), .ui.dropdown.active .fa-regular:not(div.icon i.fa-regular), .ui.dropdown.highlight .svg-inline--fa:not(div.icon svg):not(div.icon i), .ui.dropdown.highlight .svg-inline--fa:not(div.icon i.fa-solid), .ui.dropdown.highlight .svg-inline--fa:not(div.icon i.fa-regular), .ui.dropdown.highlight .fa-solid:not(div.icon svg):not(div.icon i), .ui.dropdown.highlight .fa-solid:not(div.icon i.fa-solid), .ui.dropdown.highlight .fa-solid:not(div.icon i.fa-regular), .ui.dropdown.highlight .fa-regular:not(div.icon svg):not(div.icon i), .ui.dropdown.highlight .fa-regular:not(div.icon i.fa-solid), .ui.dropdown.highlight .fa-regular:not(div.icon i.fa-regular)  {
    color: var(--hl);
}

.ui.dropdown .svg-inline--fa, .ui.dropdown .fa-solid, .ui.dropdown .fa-regular, label .svg-inline--fa, label .fa-solid, label .fa-regular {
    padding: 0;
    height: 1rem;
    width: 1rem;
    align-self: center;
}
/* DROPDOWN END */

/* TABLES */

table {
    display: table;
    border-collapse: collapse;
    text-indent: initial;
    border-spacing: 0;
    box-sizing: border-box;
    border: none;
    white-space: nowrap;
    color: var(--text);
}

table thead {
    display: table-header-group;
    background-color: var(--bg);
}

tbody {
    display: table;
    vertical-align: middle;
    border: none;
    width: 100%;
}

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.25%;
    width: 3.75rem;
    max-width: 3.75rem;
    overflow-x: hidden;
    text-overflow: ellipsis;
    text-align: left;
    font-weight: 300;
    font-size: .9em;
    line-height: 1.2em;
    cursor: default;
    letter-spacing: 0;
}

.table.wide th, .table.wide td {
    width: 3.5rem;
    text-align: center;
}

.table th.w1, .table td.w1 {
    width: 1.5%;
}

/* Chevron column. Sits in front of the ID and marks the row as expandable -
   until now nothing did. Narrow enough that the other columns keep their share. */
.table th.w0, .table td.w0 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: .75rem;
    max-width: .75rem;
    padding-left: 0;
    padding-right: .25rem;
    color: var(--text-mid);
}

/* .table th and .table td set cursor:default on the cell, and the cells fill the
   whole row - a rule on the <tr> alone never reaches the pointer. */
.table tr.acc, .table tr.acc td {
    cursor: pointer;
}

.table tr.acc.opened .fa-chevron-right { transform: rotate(90deg); }
.table tr.acc.opened td.w0 { color: var(--hl); }

/* Open row: mark it instead of flooding it, so the seller colour stays readable.
   More specific than the old tr.opened{background:var(--red)} further down. */
.table tbody tr.acc.opened,
.table.selectable tbody tr.acc.opened:hover {
    background: var(--sel);
    box-shadow: inset 0 -2px 0 var(--hl);
}

.table th.w2, .table td.w2 {
    width: 2.5%;
}

.table th.w3, .table td.w3 {
    width: 15%;
    max-width: 15%;
}

.table th.w4, .table td.w4 {
    width: 6.5%;
    max-width: 8%;
}

.table th.w5, .table td.w5 {
    width: 10%;
    max-width: 10%;
}

.table th.w6, .table td.w6 {
    width: 5%;
    max-width: 5%;
}

.table th.w7, .table td.w7 {
    display: inline-flex;
    width: 4.5%;
    max-width: 4.5%;
    border-right: .005rem solid var(--border-dark);
}

.table th.w7.border-left, .table td.w7.border-left {
    border-left: .005rem solid var(--border-dark);
}

.table th.w7 span.price, .table td.w7 span.price {
    width: 65%;
    max-width: 65%;
}

.table th.w8, .table td.w8 {
    width: 12%;
    max-width: 12%;
}

.table td.w8 .fa-truck {
    margin-left: 1rem;
}

.table td.w9 {
    width: 100%;
    max-width: 100%;
    /* Without this the cell is 100% *plus* its own padding, so the detail row
       ends ~11px further right than the master rows and slides under the
       table's own scrollbar - which is what hid the corner of the notes tile,
       the + among it. */
    box-sizing: border-box;
}

.table th {
    font-weight: 800;
}

.table tr {
    display: flex;
    border-bottom: 0.05rem solid var(--border-dark);
}

/* The bar every row carries on its left says which seller it belongs to. The
   header row wears .vh as well, purely to reserve the same 0.5rem so its cells
   line up with the body - it stays transparent, only the rows get the colour. */
.table tr.vh {
    border-left: 0.5rem solid transparent;
}

.table tbody tr.vh {
    border-left-color: #fff;
}

.table thead tr {
    background: var(--dropbg);
}

.table tr.tz {
    border-left: .5rem solid #f07e33;
}

.table tr.it {
    border-left: .5rem solid #ffdd00;
}

.table tr.vv {
    border-left: 0.5rem solid var(--blue);
}

.table tr.vr {
    border-left: 0.5rem solid var(--hl);
}

.table tr.si {
    border-left: .5rem solid #a2bb4d;
}

.table th.active {
    color: var(--blue);
}

.table th.sortable {
    position: relative;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease);
}

.table th.sortable:hover {
    color: var(--hl);
}

/* The direction marker is positioned, not laid out. The header cells are flex
   items of a fixed width and some labels ("Gekündigt zum") fill theirs to within
   a pixel, so an inline glyph has nowhere to go: widening the cell pushes the
   marker over the next column, and adding it to the flow silently clips the
   label. The <span> gives the label its own box, which shrinks by the width of
   the marker while the cell itself keeps its measurements. */
.table th.sortable > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table th.sortable.active > span {
    max-width: calc(100% - .55rem);
}

.table th.sortable.active::after {
    content: '\25B2';
    position: absolute;
    right: .05rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .65em;
}

.table th.sortable.active.desc::after {
    content: '\25BC';
}

.table td:first-child svg {
    width: auto;
}

.table .svg-inline--fa, .table .fa-solid, .table .fa-regular {
    height: 1rem;
}

/* A scrolling table takes the height it needs and starts scrolling only when it
   would leave the window. It used to claim that height unconditionally, so an
   empty table reserved a whole screen - and a popup around it grew past the
   bottom of the window and pushed the page open. */
.table.scroll {
    display: block;
    max-height: calc(100vh - 10rem);
    overflow-y: auto;
}

/* In a popup the window is not the limit, the popup is: 100vh minus the space
   the popup needs above and below the table. */
#edit-nfc-popup .table.scroll {
    max-height: calc(100vh - 18rem);
}

/* NFC popup: the two range fields and their buttons sit on one line, and the
   hint below says what is loaded (or what loading everything would mean). */
#nfc-search .field.nfc-search-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: .5rem;
}

/* .button-primary is 3rem wide and floats right - fine for "Speichern", but it
   wraps a two-word label into three lines and stacks the two buttons. */
#nfc-search .field.nfc-search-actions .button {
    float: none;
    width: auto;
    margin: 0;
    padding: .125rem .75rem;
}

p#nfc-tags-hint {
    margin: .5rem 0;
    min-height: 1.2em;
    color: var(--text-mid);
    font-size: .9em;
}

.red {
    color: var(--red)
}

.yellow {
    color: var(--yellow);
}

.blue {
    color: var(--blue)
}

svg .red {
    fill: var(--red);
    font-size: 1.1em;
}

.green {
    color: var(--green)
}

.overview-tab .table {
    margin: 0 0.5rem 2rem 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);
}

#advanced-training {
    margin-bottom: 0;
}

#actdetails svg, #vehicle-activities svg {
    width: calc(100% - 5rem);
}

#actdetails svg.fa-circle-chevron-right, #actdetails i.fa-circle-chevron-right, #vehicle-activities svg.fa-circle-chevron-right, #vehicle-activities i.fa-circle-chevron-right {
    width:1.5rem;
    transform: rotate(325deg);
}

#actdetails .accdata, #vehicle-activities .accdata {
    margin-left: 5rem;
}

#actdetails table {
    margin-bottom: 2rem;
}

.activities-table {
    margin-bottom: 2rem;
}

.activities-table th, .activities-table td{
    text-align: left !important;
}

#actlist svg.fa-circle-chevron-right {
    padding-bottom: 0 !important
}

.activities-table tr td:last-child {
    width: 15rem;
}

.list-details td:first-child svg {
    padding-left: 1rem;
}

#actdetails table svg, #actlist table svg, #act-weekly th svg, #driver-shifts th svg, #vehicle-activities table svg {
    height: 1rem;
    width: 1rem;
    fill: var(--text);
    padding-bottom: 0.5rem;
}

#control-driving-license {
    margin-top: .5rem;
}

#driving-license-control .table th,
#driving-license-control .table td {
    width: 30%;
    text-align: left;
}

span svg {
    margin: 0 1rem;
    height: 1rem;
    width: 1rem !important;
    fill: var(--text);
}

p span {
    float: right;
}

th svg.violation {
    height: 2rem !important;
    width: 2.5rem !important;
}

th svg.vehicle, th i.fa-solid.vehicle, th i.fa-regular.vehicle {
    height: 2rem !important;
    width: 2rem !important;
}

th svg.fa-person-digging {
    height: 1.35rem !important;
    width: 1.35rem !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;
}

#driver-overview-tab g.hand, #driver-overview-tab text.hand {
    cursor: pointer;
}

#driver-overview-tab g.hand:hover circle.cls-2 {
    fill:#00FFFF;
}

tr.opened {
   background: var(--red);
}

.table th.xtrawide, .table td.xtrawide {
    width: 9rem;
}

.table th.uwide, .table td.uwide {
    width: 25rem;
    text-align: left;
}

#act-weekly.table thead tr, #adriver-shifts.table thead tr {
    height: 100%;
    border-bottom: 0.005rem solid var(--border);
}

#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 {
    width: calc(100% - 42rem);
    text-align: left;
}

#act-weekly.table td, #driver-shifts.table td {
    padding: 0.375rem 0.5rem;
    vertical-align: bottom;
}

#act-weekly.table td:last-child, #driver-shifts.table td:last-child {
    width: 12rem;
    text-align: left;
}

#driver-shifts.table th .svg-inline--fa, #driver-shifts.table th .fa-solid, #driver-shifts.table th .fa-regular {
    padding-left: 0;
    padding-right: 0;
    margin-left: .25rem;
}

#driver-shifts.table tr:not(:first-child) {
    border-top: 0.005rem solid var(--border-dark);
}

#driver-shifts.table tr.shift, #act-list.table tr.day-data {
    display: none;
    border-top: none;
}

#driver-shifts.table tr.shift td.time-line {
    width: 100%;
}

#driver-shifts thead tr:first-child th {
    width: 100%;
    text-align: left;
}

#driver-shifts.table tr.rest-time td:first-child {
 width: 71rem;
 text-align: center;
 line-height: 2rem;
}

#driver-shifts.table tr.shift td.time-line svg, #driver-shifts.table tr.shift td.time-line i.fa-solid, #driver-shifts.table tr.shift td.time-line i.fa-regular {
    width: 65%;
}

.table .w1a {
    width: 6rem;
}

.table .w2a {
    width: 4rem;
}

.table .w3a {
    width: 12rem;
}

.table .w4a {
    width: 8rem;
}

#driver-shifts thead tr {
    border-bottom: solid 0.005rem var(--border);
}

#driver-shifts.table td svg, #driver-shifts.table td i.fa-solid, #driver-shifts.table td i.fa-regular {
    width: 1rem;
}

#driver-shifts.table .top-border {
    border-top: 0.005rem solid var(--border);
}

#driver-shifts.table .left-border {
    border-left: 0.005rem solid var(--border);
}

#driver-shifts.table .right-border {
    border-right: 0.005rem solid var(--border);
}

th svg, th i.fa-solid, th i.fa-regular, span svg, span i.fa-solid, span i.fa-regular {
    padding-bottom: 0.5rem;
}

#act-list th, #act-list td {
    width: 5.5rem;
}

#act-list th:last-child, #act-list td:last-child {
    width: 20rem;
    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);
}

#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;
}

#act-list .list-details {
    width: 75% !important;
    margin: 1rem 7rem;
    background: var(--dbox);
}

div.list-details {
    padding: 1rem;
    margin: 1rem 0;
    background: var(--dbox);
}

.list-details h3 {
    margin-top: 0;
}

#act-list .list-details table {
    margin-bottom: 0;
}

.list-details 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 {
    width:12%;
}

#ddd-history th:first-child, #ddd-history td:first-child {
    width:40%;
}

#ddd-history th:nth-child(2), #ddd-history td:nth-child(2) {
    width:20%;
}

#ddd-history th:last-child, #ddd-history td:last-child {
    width:7%;
}

#personal-data textarea, #vehicle-data textarea {
    margin-right: 0;
    height: 2rem;
    width: calc(100% - 0.75rem);
    border: none;
    background: transparent;
    resize: vertical;
}

#old-driver-cards-title {
    margin-top: 6.5rem;
}

#old-driving-licenses-title {
    margin-top: 5rem;
}

#driver-master-data .acc {
    margin: 1rem 0;
    cursor: pointer;
}

.time-line {
    display: flex;
    flex-direction: row;
    margin-bottom: .5rem;
}

.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;
}

#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;
}

.violation-list {
    height: calc(100vh - 12.125rem);
    overflow-y: scroll;
    background: var(--menubg);
}

.violation-tile.visible {
    display: block;
}

.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;
}


table#nfc-tags-list th, table#nfc-tags-list td {
    width: 7rem;
    max-width: 7rem;
}

table#nfc-tags-list th:nth-child(2), table#nfc-tags-list td:nth-child(2) {
    width: 18rem;
    max-width: 18rem;
}

dl.nfc-tags {
    max-height: 41rem;
    overflow-y: scroll;
    display: block;
}
/* TABLES END */

/* GRID START */
div.grid {
    display: flex;
    margin-bottom: 2rem;
    width: 100%;
}

div.grid.big-spacing {
    margin-bottom: 2.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%;
}

/* GRID END */

/* FIELDS START */
form .fields {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    width: 100%;
}

form .fields label.title {
    margin-top: .25rem;
    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%;
}

[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);
}

[type=color] {
    height: 1.5rem;
}

dd [type=color] {
    margin: 0;
    padding: 0;
    height: 1rem;
}

.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);
  }

  /* 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(--green);
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
  }


.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;
}

.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;
}

.ln {
    stroke:var(--bg);
    stroke-width:2;
}

.sd {
    height: 37px;
    fill:#535353;
}

.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;
}

.break svg, .break i.fa-solid, .break i.fa-regular {
    border-bottom: .25rem solid #66ff33;
}

.available svg {
    border-bottom: .25rem solid var(--yellow);
}

.work svg, .work i.fa-solid, .work i.fa-regular {
    border-bottom: .25rem solid var(--blue);
}

.driving svg {
    border-bottom: .25rem solid #ff0000;
}

.unknown svg, .unknown i.fa-solid, .unknown i.fa-regular {
    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 {
    width: 5rem;
    padding-top: 1.5rem;
    float: left;
    font-size: .9em;
}
/* SVG END */

/* ACCORDION START */
.table tr.accdata {
    display: none;
}

.accdata td {
    border-bottom: 1px solid var(--red);
    border-left: 1px solid var(--red);
    border-right: 1px solid var(--red);
}
/* ACCORDION 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 {
    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: 6;
}

#tz-login {
    float: right;
    display: flex;
    flex-flow: column;
    margin-top: 7rem;
    padding-right: 5rem;
}

#tz-login svg#logo {
        margin: 0 auto;
        padding: 0 3% 2% 0;
        height: auto;
        width: 100%;
        background: var(--text);
}

.button {
    display: inline-block;
    padding: 0.125rem;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    border: none;
}

.button-primary {
    float: right;
    width: 3rem;
    font-size: .9em;
    line-height: 2em;
    letter-spacing: 1px;
    word-spacing: 2px;
    color: var(--text);
    background: var(--tool);
    border: none;
    cursor: pointer;
}

.button-primary svg, .button-primary i.fa-solid, .button-primary i.fa-regular {
    margin-top: 0.5rem;
}

.button-primary.wide {
    width: 9rem;
    margin-left: 1rem;
}

.button-primary.wider {
    width: 8rem;
}

.button-primary.xtrawide {
    width: 15rem;
}

.button-primary:hover {
    background: var(--bhov);
}

/* ul */
ul {
    display: block;
    margin: 1rem 0 0 0;
    padding: 0 0 0 .5rem;
    margin-block-start: 1em;
    margin-block-end: 2em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    padding-inline-start: 2rem;
    list-style-type: disc;
    color: var(--text);
}

ul li {
    display: list-item;
    margin: 0 0 1rem 0;
    padding: 0;
    text-align: -webkit-match-parent;
}

/* dl */
dl {
    display: table;
    margin: 0 0 1rem 0;
    height: auto;
    width: 100%;
    color: var(--text);
}

dt, dd {
    display: inline-flex;
    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;
}

dd .svg-inline--fa, dd .fa-solid, dd .fa-regular {
    padding: 0;
    width: 1.125rem;
    height: 1.125rem;
}

dd a {
    padding-left: 0;
}

/* other */
#partner-logo {
    float: right;
    display: flex;
    flex-flow: column;
    margin-top: 7rem;
    padding-right: 5rem;
}

/* TOOLTIP START */
.tippy-box[data-theme~='tomato'] {
    background-color: var(--ttip);
    color: var(--text);
    border-radius: 0;
    border: 1px solid var(--hl);
}

.tippy-box[data-theme~='tomato']::after {
    background-color: var(--ttip);
}

.tippy-box[data-theme~='tomato'][data-placement^='top'] > .tippy-arrow::before {
    border-top-color: var(--hl);
    top: calc(100% + 1px);
}

.tippy-box[data-theme~='tomato'][data-placement^='bottom'] > .tippy-arrow::before {
    border-bottom-color: var(--hl);
    top: -9px;
}

/* TOOLTIP END */

#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 {
    width: 72rem;
    left: calc((100vw - 72rem)/2);
  }

  .popup-close {
    float: right;
    padding: .5rem .5rem 0 .5rem;
    color: var(--text);
    cursor: pointer;
  }

  .popup-content {
    padding: 1rem;
    min-height: 14rem;
  }

  .popup div.grid {
    margin: 0;
  }

  .popup .grid .column.hidden {
    display: none;
  }

  .popup-content h2 {
    margin-bottom: 1rem;
  }
  .popup-content h3 {
    padding: 0.25rem;
    margin-top: 1rem;
    background: none;
    width: calc(100% - .5rem);
  }

  .popup-content p svg, .popup-content p i.fa-solid, .popup-content p i.fa-regular {
    margin-right: 1rem;
  }

  .popup-content p .button {
    margin: 1rem 0 0;
    padding-bottom: 0;
  }

  .popup-content p .button svg, .popup-content p .button i.fa-solid, .popup-content p .button i.fa-regular{
    padding-top: .125rem;
    height: 1rem;
  }

.popup .button-primary {
    margin: 0 1rem 2rem;
}

#message-popup, #confirm-popup {
    top: calc((100vh - 12rem)/2);
}

#message-popup .popup-content, #confirm-popup .popup-content {
    padding: 1rem 1rem 2rem 1rem;
    min-height: 8rem;
}

#message-popup p, #confirm-popup p {
    margin: 0 1rem;
    padding: 1rem 0 4rem 0;
    font-size: 1.1em;
}

/* The popup starts at a fixed height, so a long report - the NFC import lists
   the rows it could not take - scrolls inside instead of running off the page. */
#message-popup .popup-content p {
    max-height: calc(50vh - 5rem);
    overflow-y: auto;
}

/* The global "p span" floats every span in a paragraph to the right. In a popup
   that tears a value away from its label - and a long one drops to its own line
   below it. */
#message-popup p span, #confirm-popup p span, #ddd-import-popup p span,
#add-company-note-popup p span {
    float:none;
}

div.upload {
    display:inline-block;
    position:relative;
    height: auto;
    min-height: 5rem;
    width: 100%;
    color: var(--text);
}

div.upload input[type="file"] {
    position:absolute;
    display: inline-block;
    left:0;
    width: 12rem;
    height: 5rem;
    opacity: 0;
    cursor:pointer;
    z-index: 1000;
}

div.upload svg, div.upload i.fa-solid, div.upload i.fa-regular {
    width: 12rem;
    padding: 1.5rem 0 2rem 0;
    background: var(--dropbg);
    height: 2rem;
    color: var(--blue);
    border: 0.05rem dashed var(--blue);
}

div.upload p {
    position: absolute;
    top: 4rem;
    left: 0;
    width: 12rem;
    text-align: center;
}

/* The DDD dropzone carries its own class instead of .file-names, so the NFC
   and logo handlers cannot write into it. */
div.upload span.file-names, div.upload span.ddd-file-names {
    width: calc(100% - 14rem);
    float: right;
    background: var(--dropbg);
    left: 13rem;
    padding: 0.5rem;
    height: 4.625rem;
    font-size: .9em;
    overflow-x: hidden;
    text-overflow: ellipsis;
}

div.upload #choose-files {
    display: none;
}

#company-logo-upload-popup .popup-content, #ddd-import-popup .popup-content,
#upload-file-popup .popup-content {
    min-height: 0;
}

#company-logo-upload-form .logo-company-field {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1001;
}

#company-logo-upload-form .field .ui.dropdown {
    margin-right: 0;
    width: calc(100% - .7rem);
    background-color: var(--menubg);
}

/* The DDD and NFC popups are built the same way - a dropzone above a
   right-aligned action row - so they share these three rules instead of
   repeating them. */
#company-logo-upload-form div.upload,
#ddd-import-form div.upload,
#upload-file-form div.upload {
    margin-bottom: 1.5rem;
}

#company-logo-upload-form .logo-upload-actions,
#ddd-import-form .ddd-import-actions,
#upload-file-form .nfc-upload-actions {
    display: flex;
    justify-content: flex-end;
}

#company-logo-upload-form .logo-upload-actions .button-primary,
#ddd-import-form .ddd-import-actions .button-primary,
#upload-file-form .nfc-upload-actions .button-primary {
    margin: 0 0 1rem 0;
}

/* --- DDD import popup --------------------------------------------------- */
#ddd-import-form .ddd-target {
    margin: 0 0 1rem 0;
    padding: .5rem;
    background: var(--dbox);
    font-size: .9em;
}

#ddd-import-form .ddd-confirm-field {
    margin-bottom: 1rem;
}

#ddd-import-form .ddd-hint,
#ddd-import-form .ddd-size-hint {
    margin: .25rem 0 0 0;
    color: var(--text-mid);
    font-size: .8em;
    white-space: normal;
}

/* The upload limit, right above the dropzone - read before a ZIP is picked. */
#ddd-import-form .ddd-size-hint {
    margin: 0 0 .5rem 0;
}

/* Reserves its line while it is empty, so a rejection does not push the button
   out from under the cursor. */
#ddd-import-form .ddd-import-error,
#upload-file-form .nfc-upload-error {
    margin: 0 0 .5rem 0;
    min-height: 1.2em;
    color: var(--red);
    font-size: .85em;
}

/* Most upload failures say what to do next and take two lines - both are
   reserved, as for the NFC upload below. */
#ddd-import-form .ddd-import-error {
    min-height: 2.6rem;
}

/* --- NFC tag upload popup ----------------------------------------------- */
#upload-file-form .nfc-upload-hint {
    margin: 0 0 1rem 0;
    color: var(--text-mid);
    font-size: .85em;
    white-space: normal;
}

/* fileChange() puts one file name per line. */
#upload-file-form span.file-names {
    white-space: pre-line;
}

/* Almost every rejection names the file and takes two lines - both are
   reserved, so the button stays under the cursor. */
#upload-file-form .nfc-upload-error {
    min-height: 2.6rem;
}

/* --- Company note popup -------------------------------------------------- */
#add-company-note-popup .popup-content {
    min-height: 0;
}

#company-note-create .note-target {
    margin: 0 0 1rem 0;
    padding: .5rem;
    background: var(--dbox);
    font-size: .9em;
}

#company-note-create .note-hint {
    margin: .25rem 0 0 0;
    color: var(--text-mid);
    font-size: .8em;
    white-space: normal;
}

/* The shared input rule sets height:.9rem for every field including textarea,
   which would leave the note one line tall. */
#company-note-create textarea {
    height: auto;
    min-height: 9rem;
    resize: vertical;
    line-height: 1.4;
    font-family: inherit;
}

/* Reserves its line while it is empty, so a rejection does not push the button
   out from under the cursor. */
#company-note-create .note-error {
    margin: 1rem 0 .5rem 0;
    min-height: 1.2em;
    color: var(--red);
    font-size: .85em;
}

#company-note-create .note-actions {
    display: flex;
    justify-content: flex-end;
}

#company-note-create .note-actions .button-primary {
    margin: 0 0 1rem 0;
}

/* --- App switches of a company ------------------------------------------ */
/* The heading follows the floating contract button - without the gap it
   climbs up beside the button instead of starting below it. */
.app-rights-title {
    margin-top: 4rem;
}

/* The functions keep their stored value while the app as a whole is off; the
   row shows them greyed out, the popup disables them. .checkbox hides the
   real input, so a disabled box needs a look of its own. */
.app-rights-muted {
    opacity: .5;
}

label.checkbox.is-disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* The popup names the company it is about, as the note popup does. */
#edit-app-rights-popup .app-rights-company {
    margin: 0 0 1rem 0;
    padding: .5rem;
    background: var(--dbox);
    font-size: .9em;
}

#company-app-rights .app-rights-hint {
    margin: .5rem 0 0 0;
    color: var(--text-mid);
    font-size: .8em;
}

/* settings slider */
#drawer {
    position: absolute;
    right: 0;
    top: 3.125rem;
    height: calc(100% - 3.125rem);
    overflow-x: hidden; /* Needed for initial hidden state */
}
#drawer > div {
    height: 100%;
    float: left;
}
#drawer-content {
    width: 15rem;
    margin-right: -15rem;
    background-color: var(--dropbg);
}
#drawer-content > p {
    padding: 10px;
}

#drawer-handle svg, #drawer-handle i.fa-solid, #drawer-handle i.fa-regular {
    padding: 0.8rem 1rem 0 3rem;
}

/* output */
#report-settings label {
    display: block;
    margin: 0.75rem 0;
    padding: .2rem .3rem .4rem .3rem;
    width: calc(100% - .75rem);
    font-size: 1em;
    border-bottom: 0.05rem solid var(--border-dark);
}

#report-settings [type=text]
{
width: calc(100% - .75rem);
}

#report-settings label input {
    margin-top: .1rem;
}

#report-settings .ui.dropdown {
    margin: .25rem 0 2rem 0;
    border: 0.005rem solid var(--border-dark);
}

#report-settings .ui.dropdown .svg-inline--fa, #report-settings .ui.dropdown .fa-solid, #report-settings .ui.dropdown .fa-regular {
    margin-right: 0.25rem;
}

#report-settings .menu.transition.visible {
    width: 100%;
}

#driver #report-settings .litepicker .container__days>div, .litepicker .container__days>a {
    width: 38px;
}

#driver #report-settings .show-week-numbers {
    --litepicker-month-width: 305px;
}

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(--green);
    content: '';
    display: inline-block;
    visibility: visible;
    border: 2px solid var(--bg);
}

.form input.required, .form .ui.dropdown.required, .form label.required {
    border-color: #b9861e;
}

.check-all.button-primary
{
    width: calc(100% - .6rem);
    margin-bottom: 1rem;
}

#generate-driver-report .button-primary
{
    position: relative;
    top: 15rem;
    width: calc(100% - .6rem);
    margin-bottom: -1rem;
}

#report-drivers {
    display: flex;
    flex-direction: column;
}

/* 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 #report-settings {
    display: flex;
    flex-direction: column;
    width: 19.75rem;
}

#reports-wrapper #report-type, #reports-wrapper #advanced-settings{
    margin-bottom: 3rem;
}

#reports-wrapper #report-buttons {
    display: flex;
    flex-direction: column;
    width: 10rem;
    margin: 0 2.5rem;
}

#preview-wrapper {
    position: absolute;
    left: 65rem;
    -ms-zoom: 0.58;
    -moz-transform: scale(0.58);
    -moz-transform-origin: 0 0;
    -o-transform: scale(0.58);
    -o-transform-origin: 0 0;
    -webkit-transform: scale(0.58);
    -webkit-transform-origin: 0 0;
}

#preview 
{
    height: 1415px;
    width: 1000px;
    background: #fff;
    border: none;
}

.button-primary.report {
    width: 100%;
    margin: 0 0 1rem 0;
}

#generate-report.button {
    margin-bottom: 4rem;
}

#report-actions {
    display: none;
}

#report-actions.visible {
    display: flex;
    flex-direction: column;
}
/* reports end */

/* dash cal */
#dashboard.grid {
    margin: 1rem 0 0 1rem;
}

#dashboard div.grid {
    margin-bottom: 0;
}

#dashboard.grid .dashboard-left.column:not(:last-child) {
    padding: 0;
    height: calc(100vh - 1rem);
}

#dashboard.grid .dashboard-right.column {
    padding: 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 {
    font-size: .9em;
}

#dashboard-calendar {
    height: 64%;
    width: calc(100% - 1rem);
    padding: 1rem;
    background: var(--dbox);
    z-index: 1;
}

#dashboard #violations-graph {
    padding: 1rem;
    background: var(--dbox);
}

#dashboard #violations-graph p {
    font-size: .85em;
    border-bottom: .05rem solid var(--border-dark);
}

#conspicuousness {
    margin-top: 1rem;
    padding: 1rem;
    height: 100%;
    width: calc(100% - 2rem);
    background: var(--dbox);
}

#conspicuousness h3 {
    text-align: right;
    border: none;
}

#conspicuousness p {
    font-size: .8em;
    line-height: .9em;
    letter-spacing: 0;
    color: var(--text-mid);
}

#conspicuousness .row {
    display: flex;
    flex-direction: row;
    padding: .5rem 0;
    height: 2.25rem;
    border-bottom: .05rem solid var(--border-dark);
}

#conspicuousness .svg-inline--fa, #conspicuousness .fa-solid, #conspicuousness .fa-regular {
    padding: .25rem 0.5rem;
    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 {
    margin-top: 1rem;
    padding: .5rem;
    background: var(--dbox);
}

#downloads {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    height: 13rem;
    width: 100%;
    margin-top: 1rem;
    background: var(--dbox);
}

#downloads .apexcharts-legend {
    display: none;
}

#downloads div {
    margin: .25rem 1%;
}

#downloads h4
{
    padding-left: 25%;
    margin: 0;
    text-align: left;
    line-height: 0.5rem;
}

#downloads h4 svg
{
    color: var(--yellow);
}

#dashboard-info-popup .section {
    display: none;
}

#dashboard-info-popup .section.visible {
    display: block;
}

#dashboard .red button {
    border-bottom: .1rem solid var(--red);
    border-right: .1rem solid var(--red);
}

#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 input {
    margin: 0;
    width: calc(100% - .7rem);
}

#assign-driver-cards-vehicles-popup .ui.dropdown {
    border: .005rem solid var(--border-dark);
}

#assign-driver-cards-vehicles-popup .ui.dropdown > .text {
    padding: 0 .3rem;
    height: 1.45rem;
    font-size: .9em;
}

#assign-driver-cards-vehicles-popup .ui.dropdown .svg-inline--fa, #assign-driver-cards-vehicles-popup .ui.dropdown .fa-solid, #assign-driver-cards-vehicles-popup .ui.dropdown .fa-regular {
    padding: 0 .25rem;
}

dd.dropdown {
    overflow: visible;
}

#new-driver-cards, #dashboard-info-popup ul {
    overflow-y: scroll;
    max-height: calc(100vh - 10rem);
}

:focus-visible {
    outline: none;
}

:focus {
    outline: none;
}

/* switch start */
.switch {
    position: relative;
    display: block;
    margin-top: .5rem;
    width: 30px;
    height: 18px;
  }

  .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;
  }

  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 h3 {
    width: 90%;
  }

  #user-administration-tab .button-primary {
    margin: 1rem .8rem 1rem 0;
  }

  #administration-groups label.checkbox {
    width: 25rem;
  }

  #user-list {
     display: inline-block;
     width: 100%;
  }

  #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;
}

  #user-administration-tab .permissions label.checkbox {
    margin: 0;
    border: none;
    background: none;
  }

  #user-administration-tab .table.permissions th, #user-administration-tab .table.permissions td {
    width: 11.25rem;
    padding: 0.125rem 0.175rem;
    text-align: left;
    word-spacing: 1px;
    letter-spacing: 0;
  }

  #user-administration-tab .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;
}

/* 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;box-shadow:1px 0 15px var(--bg);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, .main-menu li.active i.fa-solid, .main-menu li.active i.fa-regular{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 .fa-solid, .main-menu .fa-regular{padding:0 .813rem;width:1.375rem;height:1.375rem;text-align:center;color:var(--text);z-index:9999}.bottom-menu{position:absolute;display:block!important;bottom:2.5rem;width:100%}.settings{bottom:7rem}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;align-text: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)}


/* ==========================================================================
   Stage B - motion and feedback
   ========================================================================== */

/* --- Global loading bar -------------------------------------------------
   Sits in the 2px gap that .top-bar's bottom margin already leaves, so it
   colours an existing edge instead of looking bolted on.

   Animated with transform, never width: the twelve long-running requests end
   by injecting ~1.3 MB of HTML per table, which blocks the main thread for a
   second or more. Only transform and opacity keep moving on the compositor
   during that block - a width animation would freeze exactly when the user
   most needs to see that something is happening. */
#loading-bar {
    position: fixed;
    top: 3rem;              /* bottom edge of .top-bar (height 3rem) */
    left: 3.125rem;         /* clear of .main-menu, same as #content */
    right: 0;               /* not width: body is overflow-x:hidden at min-width 1920px */
    height: .125rem;
    z-index: 300;           /* above .popup (200) and #overlay (100) */
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) linear;
}

body.login-page #loading-bar { top: 0; left: 0; }

#loading-bar .bar {
    height: 100%;
    background: var(--hl);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* The page ships ~3,9 MB of markup; this bridges the parse, not a request.
   Removed again on DOMContentLoaded - see the inline block in base.html.twig. */
body.booting #loading-bar { opacity: 1; }
body.booting #loading-bar .bar { animation: loading-creep-a 2.4s cubic-bezier(.1, .9, .2, 1) forwards; }

/* Set by JavaScript around XHR activity.
   The delay keeps sub-100ms requests from flashing the bar. */
#loading-bar.active { opacity: 1; transition-delay: 100ms; }

/* Two identical animations under different names. The JS alternates between
   .a and .b so a new request restarts the keyframes; the usual trick - toggling
   the class and reading offsetWidth - would force a synchronous layout of the
   whole document, which is exactly what must not happen here. */
#loading-bar.active.a .bar { animation: loading-creep-a 12s cubic-bezier(0, .6, .2, 1) forwards; }
#loading-bar.active.b .bar { animation: loading-creep-b 12s cubic-bezier(0, .6, .2, 1) forwards; }

/* Lower specificity than the .active.a/.b rules above, so it cannot win on its
   own - stopLoadingBar() drops the a/b class along with it. Do not "simplify"
   this by removing the class juggling in the JS. */
#loading-bar.done .bar {
    animation: none;
    transform: scaleX(1);
    transition: transform 140ms ease-out;
}

/* Deliberately stops at 92%: the bar must never reach the end on its own,
   or it promises a completion it cannot know about. */
@keyframes loading-creep-a {
    0%   { transform: scaleX(.02); }
    12%  { transform: scaleX(.30); }
    40%  { transform: scaleX(.62); }
    100% { transform: scaleX(.92); }
}

@keyframes loading-creep-b {
    0%   { transform: scaleX(.02); }
    12%  { transform: scaleX(.30); }
    40%  { transform: scaleX(.62); }
    100% { transform: scaleX(.92); }
}

/* --- Hover states -------------------------------------------------------
   Every hover in the app was a hard switch except the tab buttons. The three
   that matter when working through the company list: */
.table.selectable tbody tr:not(.no-hover) {
    transition: background-color var(--dur-fast) var(--ease);
}

.main-menu li { transition: background-color var(--dur-fast) var(--ease); }

.button-primary { transition: background-color var(--dur-fast) var(--ease); }

/* --- Reduced motion -----------------------------------------------------
   Targeted rather than a blanket "*" reset: the wildcard would also kill the
   transitions that carry meaning (the accordion chevron showing open/closed).
   jQuery's own fadeIn/fadeOut are not reachable from CSS - they are switched
   off separately via $.fx.off. */
@media (prefers-reduced-motion: reduce) {
    .tab-content                                { animation: none; }
    .sub-menu button                            { transition: none; }
    .details-accordion-toggle .fa-chevron-right,
    .acc .fa-chevron-right                      { transition: none; }
    .table.selectable tbody tr:not(.no-hover)   { transition: none; }
    .main-menu, .main-menu li                   { transition: none; }
    .button-primary                             { transition: none; }
    body.booting #loading-bar .bar,
    #loading-bar.active.a .bar,
    #loading-bar.active.b .bar                  { animation: none; transform: scaleX(1); }
    .table th.sortable                          { transition: none; }
    .filter-bar button.facet,
    .filter-bar button.filter-reset             { transition: none; }
    .search-section.searching i.fa-magnifying-glass { animation: none; opacity: .5; }
    .ddd-progress-bar                           { transition: none; }
}


/* --- Field skeletons ----------------------------------------------------
   The edit popups empty their .fields and only then open, so the user is
   guaranteed to look at an empty box until the request comes back. These
   placeholders are .field siblings just like the real markup, so the popup has its
   final height from the first frame and nothing jumps when the data lands. */
@keyframes sk-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

.fields .sk-line {
    display: block;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--hov) 25%, var(--dbox) 37%, var(--hov) 63%);
    background-size: 200% 100%;
    animation: sk-shimmer 1.4s ease-in-out infinite;
}

.fields .sk-label { height: .75rem; width: 45%; margin-top: .5rem; }
.fields .sk-input { height: 1.5rem; width: 100%; margin-top: .4rem; }

@media (prefers-reduced-motion: reduce) {
    .fields .sk-line { animation: none; }
}
