/* ====================================
Fonts
==================================== */
@font-face {
  font-family: leetTxt;
  src: url(fonts/Manrope-Regular.ttf);
}
@font-face {
  font-family: leetHead;
  src: url(fonts/geograph-medium.ttf);
}
@font-face {
  font-family: leetThin;
  src: url(fonts/Manrope-Light.ttf) format('truetype');
}
@font-face {
  font-family: leetLogoFont;
  src: url(fonts/geograph-medium.ttf);
}

/* ====================================
Variables
==================================== */
:root {
    --main-bg-color: #ffffff;
    --sec-bg-color: #c8c8c8;
    --thr-bg-color: #efefef;
    --forth-bg-color: #f8f8f8;
   /* --main-acc-color: #4b6b22;*/

    --main-acc-color: #0D59A0;
    --sec-acc-color: #073661;
   /* --main-acc-color-2: #4b6e13;*/
    --main-acc-color-2:#0a4277;
    --sec-acc-color-2: #701302;
    --main-txt-color: #484848;
    --start-blue:#1368E8;
    --start-blue-2:#0a4eb5;
    --bodycolor: #ffffff;

    --badge-done: #4caf50;
    --badge-expired: #c62828;
    --badge-running: #ffcc33;
    --badge-grey: #b0bec5;
    --badge-lock: #c7c7c7;
    --border-color: #d5d5d5;
}

/* ====================================
Reset and Base
==================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  font-size: 14px;
  line-height: 1.5;
  background-color: var(--main-bg-color);
}
body {
  color: var(--main-txt-color);
  font-family: leetTxt, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color:var(--bodycolor);
}
a {
  color:#193a5b;
  text-decoration: none;
}
a:hover {
  /*color: var(--main-acc-color);*/
  color: var(--main-txt-color);
  font-weight: 1000;
}
ul, ol {
  list-style: none;
}
img{
  border-radius: .5rem;
  max-width: 100%;
}
.sessionvars ul{
  font-size: 80%;
}
.logomain{
  padding: 1.3rem 0 1rem 0;
}
/* ====================================
Forms and Buttons
==================================== */

select {
    -webkit-appearance: none; /* Remove default arrow for Safari */
    -moz-appearance: none; /* Remove default arrow for Firefox */
    appearance: none;
    font-size: 16px;
    background: url("/img/i_angle_down.svg");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: calc(100% - .7rem) 50%;
    text-align: left;
    padding: .7rem;
    margin-bottom: .5rem;
    width: 100%;
    border: 0px solid var(--sec-bg-color);
    border-radius: 0.4rem;
    box-shadow: 0 0px 6px rgb(0 0 0 / 0.2);
}

input[type="date"] {
    appearance: none;
    font-size: 16px;
    text-align: left;
    padding: .7rem;
    margin-bottom: .5rem;
    width: 100%;
    border: 0px solid var(--sec-bg-color);
    border-radius: 0.4rem;
    box-shadow: 0 0px 6px rgb(0 0 0 / 0.2);
    -webkit-appearance: none;
    &::-webkit-inner-spin-button,
    &::-webkit-calendar-picker-indicator {
        display: none;
        -webkit-appearance: none;
    }
    background-image: url("/img/i_calendar.svg");
    background-repeat: no-repeat;
    background-size: 16px;
    background-position: calc(100% - 0.7rem) 50%;
}

@-moz-document url-prefix() {
    input[type="date"] {
        background: none;
    }
}

form textarea, form input[type="text"], form input[type="email"], input[type="email"], form input[type="number"],input[type="url"],form input[type="password"], input[type="password"] {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  color: var(--main-txt-color);
  border: 0px solid var(--sec-bg-color);
  border-radius: 0.4rem;
  padding: .7rem;
  font-size: 1rem;
  font-size: 16px !important;
}

form input[type="text"], form textarea, input[type="text"],  input[type="email"], form input[type="password"], input[type="password"] , textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
    color: var(--main-txt-color);
    border: 0px solid var(--sec-bg-color);
    border-radius: .4rem;
    padding: .7rem;
    box-shadow: 0 0px 6px rgb(0 0 0 / 0.2);
    font-size: 1rem;
    font-size: 16px !important;
}

input[type="submit"]{
  margin: 0.6rem 0;
  padding: 0.6rem 1.5rem;
  background-color: var(--main-acc-color);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 4px;
}

input[type="file"] {
  padding: 0.2rem .2rem;
    background-color: var(--border-color);
    border: none;
    color: var(--main-txt-color);
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    text-align:right;
}
.button.small {
  font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    margin: .4rem;
    background: var(--main-acc-color);
    color: var(--main-bg-color);
    border-radius: .5rem;
    text-align: center;
    display: block;
}

button.wide {
  font-size: 1.2rem;
    padding: 0.3rem 0.6rem;
    margin: .4rem;
    background: var(--main-acc-color);
    color: var(--main-bg-color);
    border-radius: .5rem;
    text-align: center;
    display: block;
    width: 100%;
}
.button.benutzerbutton{
    padding: 0.2rem 0.4rem;
    border-radius: .5rem;
    text-align: center;
    display: block;
    font-size: .7rem;
}
.button.benutzerbutton:hover{
    color: var(--main-acc-color);
}
/* Make form elements take full width */
form label,
label
{
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 90%;
    /* margin: 0.6rem 0; */
    /* padding: 0.6rem 1.5rem; */
}

form textarea{
  display: flex;
    width: 100%;
    max-width: 100%;
}


input[type="submit"]{
  margin: .6rem 0;
}

@media (min-width: 768px) {
  .button.small {
    width: auto;
    min-width: 0;
    display: flex;
  }
}
button,
a.button{
  background-color: var(--main-acc-color);
    border: none;
    color: var(--main-bg-color);
    padding: .3rem .5rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin: .5rem;
    border-radius: .5rem;
    min-height: 2rem;
    height: 2rem;
    /*min-width: 45%;*/
    font-size: .9rem;
}
button:hover,
button:hover{
  background-color: var(--main-acc-color-2);
}
.startbutton{
  background-color: var(--main-acc-color);
    border: none;
    color: var(--main-bg-color);
    padding: .3rem .5rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin: .3rem;
    border-radius: .5rem;
    min-height: 2rem;
    height: 2rem;
    width: 45%;
}
.startbutton:hover{
  background-color: var(--main-acc-color-2);
}
.rundbutton{
  background-color: var(--main-acc-color-2);
    border: none;
    color: var(--main-bg-color);
    padding: .3rem .5rem;
    /* text-align: center; */
    text-decoration: none;
    display: inline-block;
    margin: .3rem;
    border-radius: .5rem;
    min-height: 3rem;
    height: 3rem;
    width: 45%;
    font-size: 1.25rem;
    line-height: 1.75rem;

    display: flex;
    justify-content: center;
    align-items: center;
}

.rundbutton:hover{
  background-color: var(--main-acc-color);
  color: var(--main-bg-color);
}

.rundbutton-gray{
  background-color: var(--border-color);
    border: none;
    color: var(--main-txt-color);
    padding: .3rem .5rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin: .3rem;
    border-radius: .5rem;
    min-height: 3rem;
    height: 3rem;
    width: 45%;
    font-size: 1.25rem;
    line-height: 1.75rem;

    display: flex;
    justify-content: center;
    align-items: center;
}

.rundbutton-gray:hover{
  background-color: var(--border-color);
}

.icon-only{
  background: transparent;
  border: none;
  padding: .35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: .4rem;
}
.icon-only img{
    display: block;
    transition: transform .12s ease; /* smooth grow */
    transform-origin: center;
}
.icon-only:hover{ background: transparent; }
.icon-only.danger:hover{ background: transparent; }
.icon-only:focus-visible img{
  transform: scale(1.05); /* +5% on focus */
}
/* ---------------------- Structure ----------------------- */
.indexcontent{
  /* padding-top: 1rem !important; */
  min-height: 90vh;
}
.chrd{
  background-color:#F5F5F5;
}
.wbg{
  background-color:#FFFFFF;
  border-radius: .5rem;
  /* padding: 1rem !important; */
}
.wrapper {
  margin: 0 auto;
  width: 97%;
  padding: 0;
  /*background-color: #F5F5F5;*/
}
.wgrey{
  background-color: #F5F5F5;
}

@media (min-width: 768px) {
  .wrapper {
    padding: 0 15px;
  }
}

@media (min-width: 1200px) {
  .wrapper {
    /* padding: 0 10px; */
    /*max-width: 1200px;*/
  }
}

@media (min-width: 1400px) {
  .wrapper {
    /* padding: 0 10px; */
   /* max-width: 1400px;*/
  }
}

.headerwrapper{
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.column {
  flex: 1 1 100%;
  min-width: 0;
  /*padding: 0 .7rem;*/
  padding: 0;
}
.columnz {
  flex: 1 1 100%;
  min-width: 0;
}
.column p {
  margin:0;
}

.column-2 {
  flex: 1 1 calc(50% - 1rem);
  /*padding: 0 .7rem;*/
  padding: 0;
}
.column-3 {
  flex: 1 1 calc(33.33% - 1rem);
}
.column-4 {
  flex: 1 1 calc(25% - 1rem);
}
.column-5 {
  flex: 1 1 calc(20% - 1rem);
}

/* Media Queries */
@media (min-width: 768px) {
  /* Structure */
  .column, .columnz {
    flex: 1 1 0;
  }
}

/* ----------------------- Header ---------------------- */
header {
  background-color: var(--main-bg-color);
  border-bottom: 1px solid var(--sec-bg-color);
  padding: 1rem;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
}

  .dropdown .avatar-toggle img.navicon{ display:none; }
  .avatar-toggle{
    display:flex;
    align-items:center;
    gap:.4rem;
    padding:0;
    display: flex !important;
  }
  .avatar-initials{
    width:2.2rem; height:2.2rem; border-radius:9999px;
    display:grid; place-items:center; color:#fff; font-weight:700; font-size:.95rem;
    box-shadow:0 0 0 .12rem rgba(255,255,255,.95), 0 .1rem .3rem rgba(0,0,0,.12);
  }
  .avatar-caret{
    width:.8rem;
    height:.55rem;
    opacity:.8;
    transition:transform .18s ease;
  }
  /* rotate caret when menu is open — support both patterns */
  .dropdown.open .avatar-caret,
  .avatar-toggle[aria-expanded="true"] .avatar-caret {
    transform: rotate(180deg);
  }

footer {
  /* background-color: var(--main-bg-color); */
  border-bottom: 1px solid var(--sec-bg-color);
  padding: 1rem;
  /* box-shadow: 0 3px 10px rgb(0 0 0 / 0.2); */
  margin-top: 2rem;
  z-index: 999;
  position: relative;
}
footer .row { display:flex; align-items:center; }
footer .row .column:last-child { margin-left:auto; text-align:right; }
@media (max-width: 640px){
  footer .row { flex-direction:column; gap:.25rem; }
  footer .row .column:last-child { margin-left:0; text-align:left; }
}
h1, h2, h3, h4, h5, h6 {
  font-family: leetHead, sans-serif;
  font-weight: normal;
  margin: 0.5rem 0 1rem;
  color: var(--main-txt-color);
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  font-family: leetLogoFont, sans-serif;
  color: var(--main-acc-color);
}

h2 {
  font-size: 1.75rem;
  font-family: leetHead, sans-serif;
}

h3 {
  font-size: 1.5rem;
  font-family: leetTxt, sans-serif;
  color: var(--main-txt-color);
}

h4 {
  font-size: 1.25rem;
  font-family: leetTxt, sans-serif;
  color: var(--main-txt-color);
}

h5 {
  font-size: 1rem;
  font-family: leetTxt, sans-serif;
  color: var(--main-txt-color);
}

h6 {
  font-size: 0.875rem;
  font-family: leetThin, sans-serif;
  color: var(--sec-acc-color);
}

p {
  font-family: leetTxt, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0 0 0.8rem;
  color: var(--main-txt-color);
}

small, .small {
  font-size: 0.75rem;
 /* color: var(--sec-acc-color);*/
  display: inline-block;
  margin-top: 0.25rem;
}

code {
  font-family: monospace, monospace;
  font-size: 0.85rem;
  background-color: var(--sec-bg-color);
  color: var(--main-acc-color);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
  background-color: var(--sec-acc-color);
  color: var(--main-bg-color);
  font-size: 0.9rem;
  border-radius: 6px;
}

ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--main-txt-color);
}

ul li {
  margin-bottom: 0.3rem;
}

.sortable {
    cursor: pointer;
}
.sortable:hover {
    text-decoration: underline;
}

hr {
  border-top: 1px solid var(--border-color);
}

nav {
  position: relative;
}

.hidden{display:none;}
.menu-toggle {
  cursor: pointer;
  display: block;
  height: 25px;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
}

.menu-toggle .bar {
  background-color: var(--main-acc-color);
  display: block;
  height: 3px;
  margin: 5px 0;
  transition: all 0.3s ease;
  width: 100%;
}

.nav-list {
  background-color: var(--thr-bg-color);
  border-top: 1px solid var(--sec-bg-color);
  display: none;
  flex-direction: column;
  left: 0;
  padding: 1rem;
  position: absolute;
  top: 100%;
  width: 100%;
  list-style: none;
  z-index: 999;
  font-size: 1.3rem;
  align-items: flex-start;
  justify-content: flex-start;
}

.nav-list.active {
  display: flex;
  position: absolute;
  left: -95vw;
  width: 100%;
  min-width: 100vw;
}

.nav-list li {
  margin: 0.5rem 1rem;
}

.nav-list a {
  padding: 0.5rem;
  font-family: leetTxt, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.05rem;
  font-weight: 400;
  color: var(--main-txt-color);
}

.nav-list a:hover {
  color: var(--main-acc-color);
  text-decoration: none;
}

.navicon{
  height: 15px;
  vertical-align: middle;
  margin-right: 5px;
  /* margin-top: -4px; */
  border-radius: 0rem;
}

/* Media Queries */
@media (min-width: 768px) {
  .nav-list {
    background-color: transparent;
    align-items: center;
    justify-content: center;
  }
  /* Header */
  header {
    position: sticky;
    top: 0;
    z-index: 1000;
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 0rem 2rem;
    margin-bottom: .5rem;
/*    z-index: 9999999999;
    position: relative;*/
  }

  header h1 {
    font-size: 2rem;
    text-align: left;
  }

  .menu-toggle {
    display: none;
  }

  .nav-list {
    border-top: none;
    display: flex;
    flex-direction: row;
    padding: 0;
    padding-top: .7rem;
    position: static;
  }

/*  .nav-list li {
    margin: 0 1rem;
  }*/

  .nav-list a {
    padding: 0;
  }
}
.abs1 {
  margin-top: 1rem !important;
}

.abs2 {
  margin-top: 2rem !important;
}

.abs3 {
  margin-top: 3rem !important;
}

.abs4 {
  margin-top: 4rem !important;
}

.abs5 {
  margin-top: 5rem !important;
}

.abs6 {
  margin-top: 6rem !important;
}

.abs7 {
  margin-top: 7rem !important;
}
/* ----------------------- Modals ---------------------- */
/* jscss/login_style.css */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: var(--thr-bg-color);
    margin: 5% auto;
    padding:1rem;
	font-size: 90%;
    width: 90%;
    max-width: 400px;
    border-radius: 5px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content form label {
    display: block;
    margin: 10px 0 5px;
}

.modal-content form input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.modal-content form input[type="submit"] {
    background-color:var(--main-acc-color);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.modal-content form input[type="submit"]:hover {
    background-color: var(--sec-acc-color);
}
.company-info-box {
    border: 1px solid #ddd;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

/* --------------------------- COURSE FORM -----------------------*/

#courseForm label {
    font-weight: bold;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    color: var(--main-txt-color);
}

#courseForm input[type="text"],
#courseForm input[type="number"],
#courseForm input[type="date"],
#courseForm textarea,
#courseForm select {
    padding: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

#courseForm input[type="checkbox"] {
    margin-right: 0.5rem;
}

#courseForm input[type="submit"] {
    width: fit-content;
    padding: 0.6rem 1.5rem;
    background-color: var(--sec-acc-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#courseForm input[type="submit"]:hover {
    background-color: var(--sec-acc-color);
}

#addBlocksArea {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px dashed var(--sec-bg-color);
    background-color: var(--sec-bg-color);
}

#addBlocksArea select,
#addBlocksArea button {
    margin-top: 0.5rem;
}

/* --------------------------- DASHBOARD COLLAPSIBLES -----------------------*/

.collapsible-section {
    margin-bottom: 1.5rem;
    border: 1px solid var(--sec-bg-color);
    border-radius: 6px;
    overflow: hidden;
}

.collapsible-header {
    background-color: var(--main-acc-color);
    color:var(--main-bg-color);
    padding: 0.2rem 1rem;
    cursor: pointer;
    position: relative;
}

.collapsible-header::after {
    content: '▾';
    position: absolute;
    right: 1rem;
    transition: transform 0.2s ease;
}

.collapsible-header.active::after {
    transform: rotate(180deg);
}

.collapsible-content {
    display: none;
    padding: 1rem 0;
    /*background-color: var(--sec-bg-color);*/
    box-shadow: 0 3px 10px rgb(0 0 0 / 0.4);
}
.header-row {
	font-weight: bold;
}
#idPreviewContainer{
  padding: 1rem;
  border-radius: .4rem;
}

.scheinimg{
  max-height:350px;
}
/* --------------------------- TABLE FOR FIRMENBENUTZER -----------------------*/
.company_users {
  min-width: 100%;
  padding-top: .5rem;
}
/* Adjust column widths as needed (in %, rem, or flex) */
.col-name {
  flex: 2;
}
.col-email {
  flex: 3;
}
.col-role {
  flex: 2;
}
.col-login {
  flex: 2;
}
.col-action {
  flex: 1;
}
/* --------------------------- TABLE FOR BLOCKS IN COURSE_FORM.PHP -----------------------*/

.table-blocks {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    border: 1px solid var(--sec-acc-color);
    border-radius: 6px;
    overflow: hidden;
}

.table-row {
    display: flex;
    border-bottom: 1px solid var(--sec-bg-color);
    padding: 0.75rem;
    align-items: center;
}

.table-head {
    font-weight: bold;
    border-bottom: 2px solid var(--sec-bg-color);
}

.table-cell {
    flex: 1;
    padding: 0.25rem 0.5rem;
}

/* --------------------------- SLIDES FORM STYLE -----------------------*/

.image-pair {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.image-box {
    flex: 1;
    min-width: 140px;
    max-width: 50%;
}

.preview-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.preview-wrapper {
    position: relative;
}
.remove-preview-btn {
    margin-top: 0.3rem;
    background-color: var(--sec-bg-color);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
}
.preview-img {
    max-width: 100%;
    display: block;
    margin-bottom: 0.5rem;
}

#courseForm{
  display: block;
}

/* ===============================
Dashboard User Management Styles (Mobile-First)
=============================== */

.users .row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.users .header-row {
  display: none; /* Hidden on mobile */
}

.users .column {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Labels via pseudo-elements */
.users .col-name::before     { content: "Name: "; font-weight: bold; }
.users .col-email::before    { content: "Email: "; font-weight: bold; }
.users .col-role::before     { content: "Role: "; font-weight: bold; }
.users .col-login::before    { content: "Last Login: "; font-weight: bold; }
.users .col-action::before   { content: "Action: "; font-weight: bold; }

.users input[type="email"],
.users select,
.users button {
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem;
  font-size: 0.95rem;
  background-color: #000;
  color: #fff;
  border: 1px solid #444;
}

.users button {
  cursor: pointer;
  background-color: #444;
  transition: background-color 0.2s;
}

.users button:hover {
  background-color: #666;
}

/* ===============================
Larger Screens (Desktop Layout)
=============================== */
@media (min-width: 768px) {
  .users .row {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    min-width: 100%;
  }

  .users .header-row {
    display: flex;
    font-weight: bold;
    padding: 0.5rem 0;
  }

  .users .col-name   { flex: 1.5; }
  .users .col-email  { flex: 2; }
  .users .col-role   { flex: 1.5; }
  .users .col-login  { flex: 1.2; }
  .users .col-action { flex: 1; }

  .users .column::before {
    content: none !important; /* Hide mobile labels */
  }
}

/* ===============================
Courses Section Styles (Mobile-First)
=============================== */

.courses .row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px solid #333;
  padding: .5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.courses .header-row{
  display: none;
}

.courses .row.box {
  align-items: stretch;
}

.courses .column {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Header hidden on mobile */
.courses .row:first-child {
  display: none;
}

/* Labels for mobile view using ::before */
.courses .column:nth-child(1)::before { content: "Title: "; font-weight: bold; }
.courses .column:nth-child(2)::before { content: "Visibility: "; font-weight: bold; }
.courses .column:nth-child(3)::before { content: "Has Exam: "; font-weight: bold; }
.courses .column:nth-child(4)::before { content: "Created On: "; font-weight: bold; }
.courses .column:nth-child(5)::before { content: "Owner: "; font-weight: bold; }
.courses .column:nth-child(6)::before { content: "Actions: "; font-weight: bold; }

@media (min-width: 768px) {
  .courses .row {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    border-bottom: none;
    padding: 2rem 1rem;
    margin-bottom: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  }

  .courses .row:first-child {
    display: flex; /* Show the header row */
    font-weight: bold;
    padding: 1rem;
  }
  .courses .header-row{
    display: flex;
  }
  .courses .column {
    overflow: hidden;
  }

  /* Consistent column widths */
  .courses .column:nth-child(1) { flex: 2; }
  .courses .column:nth-child(2) { flex: 1.5; }
  .courses .column:nth-child(3) { flex: 1.2; }
  .courses .column:nth-child(4) { flex: 1.5; }
  .courses .column:nth-child(5) { flex: 1.2; }
  .courses .column:nth-child(6) { flex: 1.5; }

  /* Hide mobile labels */
  .courses .column::before {
    content: none !important;
  }
}

/* ===============================
Complete Profile
=============================== */
.progress-wrapper {
    display:none;
}
@media (min-width: 768px) {
  .progress-wrapper {
      margin: 20px auto;
      text-align: center;
      display: block;
  }
}
.progress-bar {
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    list-style-type: none;
    position: relative;
}

.progress-bar li {
    position: relative;
    flex: 1;
    color: #999;
    text-align: center;
    font-size: 14px;
}

.progress-bar li::before {
    content: '';
    display: block;
    margin: 0 auto 10px;
    width: 30px;
    height: 30px;
    background: #ccc;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 3px 10px rgb(0 0 0 / 0.4);
    position: relative;
}

.progress-bar li::after {
    content: '';
    position: absolute;
    top: 6px;
    left: -50%;
    height: 16px;
    width: 100%;
    background: #ccc;
    z-index: 1;
    border-radius: 5px;
}
.kreiserlimg{
  max-width: 200px;
  border-radius: 50%;
}
.progress-bar li:first-child::after {
    display: none;
}

.progress-bar li.active {
    color: var(--main-acc-color);
    font-weight: bold;
}

.progress-bar li.active::before {
    background: var(--main-acc-color);
}

/*.progress-bar li.active + li::after {
    background: var(--main-acc-color);
}*/

.progress-bar li.done {
    color: var(--main-acc-color);
    font-weight: normal;
}

.progress-bar li.done::before {
    background: var(--main-acc-color);
}

.progress-bar li.done + li::after {
    background: var(--main-acc-color);
}

.middlebox{
    margin: 2rem auto 0 auto;
    background-color: var(--main-bg-color);
    box-shadow: 0 3px 10px rgb(0 0 0 / 0.4);
    padding: 1rem;
    border-radius: .5rem;
    display: block;
    position: relative;
    z-index: 999;
}
.shadowbox{
    margin: 1rem auto 1rem auto;
    background-color: var(--main-bg-color);
    box-shadow: 0 3px 10px rgb(0 0 0 / 0.4);
    padding: 1rem 0;
    border-radius: .5rem;
}
@media (min-width: 769px) {
    .shadowbox{
        padding: 1rem;
    }
}
.shadowbox_tall{
    margin: 0rem auto 1rem auto;
    background-color: var(--main-bg-color);
    box-shadow: 0 3px 10px rgb(0 0 0 / 0.4);
    padding: .5rem;
    border-radius: .5rem;
    min-height: 90vh;
}
@media (min-width: 769px) {
    .shadowbox_tall{
        padding: 1rem;
    }
}
/* user_management */
.header-row{
  padding-bottom: .7rem;
  font-size: .8rem;
  position: relative;
}
.user-row,
.company-row{
  padding: 0rem;
  font-size: .8rem;
  gap: .1rem;
  position: relative;
}
.header-row::after,
.user-row::after,
.company-row::after{
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, white, grey, white);
}
.firmenuploads{
  margin-top:1rem;
  padding-top:1rem;
  border-top: 2px solid var(--border-color);
}
/* ************************ ansprechpartner ********************** */
.ansprechpartner{
  padding:1rem;
  border-radius: .5rem;
  box-shadow: 0 0px 6px rgb(0 0 0 / 0.2);
}
canvas#userPerMonthChart {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: .6rem;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.compmanagement350{
  padding:1rem;
  border-radius: .5rem;
  height:400px;
}

/* ************************ courses_manage ********************** */
.course-row {
    border: 1px solid var(--main-txt-color) !important;
    border-radius: .5rem;
    margin: 1rem 0;
}

.course-row .course-thumb {
    flex-grow: 1 !important;
}

.course-row .info {
    flex-grow: 3!important;
}

.course-row .actions {
    display: flex;
    flex-grow: 1 !important;
    flex-direction: column;
    gap: 0.5rem;
}

.course-stats {
    margin-bottom: 1rem;
    padding: 1rem;
}

.course-stats .row {
    display: flex;
    gap: 1rem;
}

.course-stats .row .column {
    flex: 1 1 0;
}

.course-stats canvas {
    width: 100% !important;
    height: 240px !important;
    display: block;
}

.course-actions {
    padding: 1rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.course-thumb-placeholder {
    background-color: #eee;
    color: #666;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    text-align: center;
}

.stats-container {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stats-chart {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: .5rem;
    padding: 1rem;
    flex: 1;
    min-width: 300px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    height: 200px;
    margin-top: 1rem;
}

.bar {
    flex: 1;
    background: var(--main-acc-color);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: .5rem .5rem 0 0;
    position: relative;
    max-width: 1rem;
}

.bar span {
    font-size: 0.7rem;
    color: #333;
    margin-top: 0.2rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/***************************** PIE DIAGRAM ****************************/

 .progress-pie {
	text-align: center;
	margin-bottom: 1rem;
    transform: scale(0.8); /* 10% smaller */
    transform-origin: center;
}

.circular-chart {
	display: block;
	margin: 0 auto;
	max-width: 280px;
    max-height: 280px;
}

.circle-bg {
	fill: var(--main-acc-color);
	stroke: var(--main-acc-color);
	stroke-width: 3;
}

.circle {
	fill: var(--main-acc-color-2);
	stroke-width: 2;
	stroke: white;
	stroke-linecap: round;
	/*transform: rotate(-90deg);*/
	transform-origin: center;
	transition: stroke-dasharray 0.5s ease;
}

.circular-chart.green .circle {
	stroke: #dadada;
}

.percentage-main {
	fill: white;
	font-size: 0.5rem;
	font-weight: bold;
	text-anchor: middle;
    margin-left: 1rem;
}
.percentage-sub {
    fill: white;
    font-size: 2.5px;
    font-weight: normal;
    opacity: 0.8;
}
.course-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.course-card.expired {
}

.warning {
    color: #d9534f;
    font-weight: bold;
    margin-top: 0.5rem;
}
.blockdiv{
  display:block;
  min-width: 100%;
}
.flexdiv{
  display: flex;
  min-width: 100%;
  justify-content: space-between;
}
/********************** SLIDER *******************/
.course-slider-wrapper {
	overflow-x: auto;
	overflow-y: hidden;
	width: 100%;
	margin: 2rem 0;
}

.course-slider-wrapper {
  overflow-x: auto;
  padding-bottom: 1rem;
}

.course-slider {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  scroll-padding: 1rem;
  padding-bottom: 1rem;
  width:100%;
  overflow-x: auto;
}

.course-slide {
  flex: 0 0 100%;
}

@media (min-width: 600px) {
  .course-slide {
    flex: 0 0 670px;
    scroll-snap-align: start;
  }
}
.slider-container {
  position: relative;
  overflow: hidden;
}

.scroll-button {
  background: white;
  border: 1px solid #ccc;
  border-radius: .8rem;
  width: 2rem;
  height: 3rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: var(--main-txt-color);
  max-width: 30px !important;
  min-width: 30px !important;
}

.scroll-button.left {
  left: 0.5rem;
}

.scroll-button.right {
  right: 0.5rem;
}
/* --------------------------
 * --- COURSE DASHBOARD -----
 * ------------------------ */
.cstatus{
    display: block;
    text-align: right;
    margin-top: -1rem;
}

.course-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.6rem;
  padding: 2rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  height: 100%;
}
.dashboard-coursecard{
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.6rem;
  padding: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  height: 100%;
  /*margin: 0 1rem;*/
}

.ausbildungsplan-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.6rem;
  padding: 2rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  height: 100%;
}

.ausbildungsplan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}


.ausbildungsplan-dropdown-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ausbildungsplan-dropdown-container .icon {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  display: inline-block;
}

.ausbildungsplan-dropdown-container select {
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid #fff;
  border-radius: 0.4rem;
  background: #fff;
}

.ausbildungsplan-card .row {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0;
  align-items: center;
}

.ausbildungsplan-card .rowhead {
  display:none;
}

.ausbildungsplan-card .row:last-child {
  border-bottom: none;
}

.ausbildungsplan-card .row .column {
  padding: 0 0.5rem;
  flex: 1;
}
  /* Column widths */
  .ausbildungsplan-card .row .column:nth-child(1) {flex: 1 1 100%;}
  .ausbildungsplan-card .row .column:nth-child(2),
  .ausbildungsplan-card .row .column:nth-child(3) {
    order: 2;
    flex: 1 1 45%;
    text-align: left;
  }

  .ausbildungsplan-card .row .column:nth-child(4),
  .ausbildungsplan-card .row .column:nth-child(5) {
    order: 3;
    flex: 1 1 45%;
    text-align: left;
  }

@media (min-width: 768px) {
    .ausbildungsplan-card .row{
      font-size: .7rem;
    }

    .ausbildungsplan-card .rowhead {
      display: flex;
      font-weight: bold;
      border-bottom: 2px solid var(--border-color);
    }

    /* Column widths */
    .ausbildungsplan-card .row .column:nth-child(1) {
      flex: 3; /* Ausbildung – wider */
    }
    .ausbildungsplan-card .row .column:nth-child(2),
    .ausbildungsplan-card .row .column:nth-child(3),
    .ausbildungsplan-card .row .column:nth-child(4) {
      flex: 1.5;
      text-align: center;
    }
    .ausbildungsplan-card .row .column:nth-child(5) {
      flex: 1;
      text-align: right;
    }

    .ausbildungsplan-card .status_laufend {
      font-weight: bold;
    }

    .ausbildungsplan-card .status_blocked {
      font-weight: bold;
    }
}


/* ===============================
Dashboard
=============================== */
.icon_btn::before,.icon_btn_left::before,.icon_btn_neu::before{
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: .5rem;
  vertical-align: middle;

  background-image: url("../img/i_plus.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.icon_btn_neu{
    background-color: transparent;
    border: none;
    color: var(--main-acc-color);
    text-decoration: none;
    display: block;
    margin-top: -2rem;
    font-size: 1rem;
    position: relative;
    padding-bottom: 1.8rem;
}
.icon_btn_neu:hover{
  background-color: transparent;
  border: none;
  color: var(--main-acc-color-2);
  text-decoration: none;
  display: inline-block;
  /*margin-top: 2rem;
  height: 2rem;*/
  font-size: 1rem;
}
.icon_btn{
  background-color: transparent;
  border: none;
  color: var(--main-acc-color);
  text-decoration: none;
  display: inline-block;
  margin-top: 0rem;
  /*height: rem;*/
  font-size: 1rem;
}
.icon_btn:hover{
  background-color: transparent;
  border: none;
  color: var(--main-acc-color-2);
  text-decoration: none;
  display: inline-block;
  /*margin-top: 2rem;
  height: 2rem;*/
  font-size: 1rem;
}
.icon_btn_left{
  background-color: transparent;
    border: none;
    color: var(--main-acc-color);
    text-decoration: none;
    display: inline-block;
    margin-top: 0rem;
    height: 2rem;
    font-size: 1rem;
    text-align: left;
    padding: 1rem 0;
    margin-bottom: 1rem;
}
.icon_btn_left:hover{
  background-color: transparent;
  border: none;
  color: var(--main-acc-color-2);
  text-decoration: none;
  display: inline-block;
  /*margin-top: 2rem;*/
  height: 2rem;
  font-size: 1rem;
}
.course_details{
  padding: 0 0 1rem 0;
}
.chapter-header {
    background: var(--main-acc-color-2);
    color: var(--main-bg-color);
    padding: 1.5rem;
    cursor: pointer;
    font-weight: bold;
    border-radius: .5rem;
    margin-top: .5rem;
}

/*.chapter-header.expanded::after {
    content: ' ▼';
}

.chapter-header:not(.expanded)::after {
    content: ' ►';
}*/
.chapter .block-list {
    display: none;
}
.block-list {
    padding: 0 .5rem;
    border-radius: .5rem;
    border: 1px solid var(--main-acc-color);
    margin: .5rem 0;
}

.block-item {
    padding: .5rem;
    border-radius: .5rem;
    border: 1px solid var(--main-acc-color);
    margin: .5rem 0;
}

.done {
    color: green;
}

.in-progress {
    color: orange;
}

.not-started {
    color: #999;
}
.status-icon {
    margin-left: 0.5rem;
    flex-shrink: 0;
}
.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    font-weight: bold;
    background: #4c772e;
    color: white;
    margin-top: 1rem;
    cursor: pointer;
}
.chapter-header.done {
    background-color: var(--main-acc-color-2)
}

.chapter-header.in_progress {
    background-color: var(--main-acc-color)
}

.chapter-header.not_started {
    background-color: var(--main-acc-color)
}

.course-table-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding: 0.3rem 0.5rem;
  align-items: center;

  height: 3rem;
  min-height: 3rem;
}
.course-table-header{
  display: none;
  padding: 0.3rem 0.5rem;
  height: 3rem;
  min-height: 3rem;
}
.course-table-row:last-child {
  border-bottom: none;
}

.course-table-row > div {
  flex: 1 1 100%;
  /* padding: 0.3rem 0.5rem; */
}

.course-table-row:nth-child(even) {
  background-color: #f9f9f9; /* light grey */
}

/* Default mobile stacking order */
.course-table-row > div:nth-child(1) { order: 1; }
.course-table-row > div:nth-child(2),
.course-table-row > div:nth-child(3) { order: 2; flex: 1 1 45%; }
.course-table-row > div:nth-child(4),
.course-table-row > div:nth-child(5),
.course-table-row > div:nth-child(6) { order: 3; flex: 1 1 45%; }

/* Desktop layout */
@media (min-width: 768px) {
  .course-table-header{
    display: flex;
    background-color:var(--border-color);
    /* padding: 0.3rem 0.5rem; */
    border-radius: .5rem 0.5rem 0 0rem;
  }

  .course-table-row > div {
    /* padding: 0.3rem 0.5rem; */
  }

  .course-table-header > div:nth-child(1), .course-table-row > div:nth-child(1) { flex: 2; order: 0; }
  .course-table-header > div:nth-child(2), .course-table-row > div:nth-child(2) { flex: 1.5; text-align: center; order: 0; }
  .course-table-header > div:nth-child(3), .course-table-row > div:nth-child(3) { flex: 1.5; text-align: center; order: 0; }
  .course-table-header > div:nth-child(4), .course-table-row > div:nth-child(4) { flex: 1.5; text-align: center; order: 0; }
  .course-table-header > div:nth-child(5), .course-table-row > div:nth-child(5) { flex: 1.5; text-align: center; order: 0; }
  .course-table-header > div:nth-child(6), .course-table-row > div:nth-child(6) { flex: 1.5; text-align: right; order: 0; }
}

/* ===============================
----------- comptable ---------------
=============================== */
.comptable{
  font-size:85%;
}
.comptable-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  align-items: center;
}

/* clickable company rows */
.comptable-row.rowlink{
  cursor: pointer;
  transition: background 120ms ease, outline-color 120ms ease;
}

/* hover + active use your accent colors mixed over the page bg */
:root{
  --row-hover:  color-mix(in srgb, var(--sec-acc-color) 10%, var(--main-bg-color));
  --row-active: color-mix(in srgb, var(--main-acc-color) 14%, var(--main-bg-color));
}

.comptable-row.rowlink:hover{ background: var(--row-hover); }
.comptable-row.rowlink:active{ background: var(--row-active); }

.comptable-row.rowlink:focus,
.comptable-row.rowlink:focus-visible{
  background: var(--row-hover);
}

/* keep text links neutral inside row */
.comptable-row.rowlink .comptable-cell a{
  color: inherit;
}
.comptable-row.rowlink:hover .comptable-cell a{
  color: var(--sec-acc-color);
}


/* helper for client-side filters */
.comptable-row.hidden { display: none !important; }

.comptable-header{
  display: none;
}
.comptable-row:last-child {
  border-bottom: none;
}

.comptable-row > div {
  flex: 1 1 100%;
  padding: 0.3rem 0.5rem;
}

.comptable-row:nth-child(even) {
  background-color: #f9f9f9; /* light grey */
}

/* Default mobile stacking order */
.comptable-row > div:nth-child(1) { order: 1; }
.comptable-row > div:nth-child(2),
.comptable-row > div:nth-child(3) { order: 2; flex: 1 1 45%; }
.comptable-row > div:nth-child(4),
.comptable-row > div:nth-child(5),
.comptable-row > div:nth-child(6) { order: 3; flex: 1 1 45%; }
.comptable-row > div:nth-child(7) { order: 3; flex: 1 1 45%; }

/* Desktop layout */
@media (min-width: 768px) {
  .comptable-header{
    display: flex;
    background-color:var(--border-color);
    padding: 1rem;
    border-radius: .5rem 0.5rem 0 0rem;
  }

  .comptable-row > div {
    padding: 0.3rem 0.5rem;
  }

  .comptable-header > div:nth-child(1), .comptable-row > div:nth-child(1) { flex: .1; order: 0; }
  .comptable-header > div:nth-child(2), .comptable-row > div:nth-child(2) { flex: 1; order: 0; }
  .comptable-header > div:nth-child(3), .comptable-row > div:nth-child(3) { flex: 1.5; order: 0; }
  .comptable-header > div:nth-child(4), .comptable-row > div:nth-child(4) { flex: 1;  order: 0; }
  .comptable-header > div:nth-child(5), .comptable-row > div:nth-child(5) { flex: 1; order: 0; }
  .comptable-header > div:nth-child(6), .comptable-row > div:nth-child(6) { flex: .7; order: 0; }
  .comptable-header > div:nth-child(7), .comptable-row > div:nth-child(7) { flex: .5; order: 0; }
}
/* ===============================
   comptable (8 columns variant)
   1 ID | 2 Name | 3 E-Mail | 4 Telefon | 5 Firma | 6 Rolle | 7 Kurse | 8 Letzter Login
   =============================== */

.comptable.eightcols .comptable-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}

.comptable.eightcols .comptable-row:last-child {
  border-bottom: none;
}

.comptable.eightcols .comptable-row > div {
  flex: 1 1 100%;
  padding: 0.3rem 0.5rem;
}

/* hide header on mobile */
.comptable.eightcols .comptable-row.header {
  display: none;
}

/* zebra rows (ignore header) */
.comptable.eightcols .comptable-row:not(.header):nth-child(even) {
  background-color: #f9f9f9;
}

/* -------- Mobile layout (pair sensible fields) -------- */
/* ID full width (1) */
.comptable.eightcols .comptable-row > div:nth-child(1) {
  flex: 1 1 100%;
}

/* Name (2) + E-Mail (3) */
.comptable.eightcols .comptable-row > div:nth-child(2),
.comptable.eightcols .comptable-row > div:nth-child(3) {
  flex: 1 1 48%;
}

/* E-Mail: ellipsize, don't push layout */
.comptable.eightcols .comptable-row > div:nth-child(3) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comptable.eightcols .comptable-row > div:nth-child(3) a,
.comptable.eightcols .comptable-row > div:nth-child(3) span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Telefon (4) + Firma (5) */
.comptable.eightcols .comptable-row > div:nth-child(4),
.comptable.eightcols .comptable-row > div:nth-child(5) {
  flex: 1 1 48%;
}

/* Rolle (6) + Kurse (7) */
.comptable.eightcols .comptable-row > div:nth-child(6),
.comptable.eightcols .comptable-row > div:nth-child(7) {
  flex: 1 1 48%;
}

/* Letzter Login (8) full width */
.comptable.eightcols .comptable-row > div:nth-child(8) {
  flex: 1 1 100%;
}

/* -------- Desktop: fixed grid -------- */
@media (min-width: 48rem) {
  .comptable.eightcols .comptable-row.header {
    display: grid;
    grid-template-columns:
      4rem      /* ID */
      1.2fr     /* Name */
      1.8fr     /* E-Mail */
      1fr       /* Telefon */
      1.4fr     /* Firma */
      0.7fr     /* Rolle */
      0.6fr     /* Kurse */
      1.2fr;    /* Letzter Login */
    background-color: var(--border-color);
    padding: 0;
    border-radius: 0.5rem 0.5rem 0 0;
    font-weight: 600;
  }

  .comptable.eightcols .comptable-row {
    display: grid;
    grid-template-columns:
      4rem 1.2fr 1.8fr 1fr 1.4fr 0.7fr 0.6fr 1.2fr;
  }

  .comptable.eightcols .comptable-row > div {
    padding: 0.3rem 0.5rem;
    text-align: center;
  }

  /* left-align text-heavy columns */
  .comptable.eightcols .comptable-row > div:nth-child(2), /* Name */
  .comptable.eightcols .comptable-row > div:nth-child(3), /* E-Mail */
  .comptable.eightcols .comptable-row > div:nth-child(5)  /* Firma */ {
    text-align: left;
  }

  /* E-Mail: ellipsize on desktop too */
  .comptable.eightcols .comptable-row > div:nth-child(3) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ===== user_kurse. KURSE TABLE (8 columns, action removed) ===== */
#coursesTable.comptable.kursecols .comptable-row {
  /* Title | Assigned | Started | Finished | Due | Status | Updated | Cert */
  grid-template-columns:
    minmax(14rem, 2.4fr)  /* 1 Kurs (link, ellipsis) */
    minmax(7rem, 1fr)     /* 2 Zugewiesen */
    minmax(7rem, 1fr)     /* 3 Lernbeginn */
    minmax(7rem, 1fr)     /* 4 Lernende (Finished) */
    minmax(5.5rem, .9fr)  /* 5 Ablauf (Due) */
    minmax(5.5rem, .9fr)  /* 6 Status */
    minmax(7rem, 1.1fr)   /* 7 Letzte Änderung */
    minmax(4.5rem, .8fr); /* 8 Zertifikat */
}

/* make numeric columns line up nicely */
#coursesTable.comptable.kursecols .comptable-row .comptable-cell:nth-child(n+2) {
  font-variant-numeric: tabular-nums;
}

/* clamp long course titles */
#coursesTable.comptable.kursecols .comptable-row .comptable-cell:first-child a {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* center the certificate cell */
#coursesTable.comptable.kursecols .comptable-row .comptable-cell:nth-child(8) {
  justify-content: center;
}

/* header weight */
#coursesTable.comptable.kursecols .comptable-row.header .comptable-cell {
  font-weight: 600;
}

/* “no results” row spans all 8 columns (kept for safety) */
#course-noresults .comptable-cell { grid-column: 1 / -1; }

/* ===== Responsive tweaks ===== */

/* L tablets: hide the least critical middle columns (3 & 4) to reduce squeeze */
@media (max-width: 1100px) {
  #coursesTable.comptable.kursecols .comptable-row {
    grid-template-columns:
      minmax(12rem, 2.6fr)  /* title grows a bit */
      minmax(7rem, 1fr)
      /* 3 hidden */
      /* 4 hidden */
      minmax(5.5rem, .9fr)
      minmax(5.5rem, .9fr)
      minmax(7rem, 1.1fr)
      minmax(4.5rem, .8fr);
  }
  #coursesTable.comptable.kursecols .comptable-row > .comptable-cell:nth-child(3),
  #coursesTable.comptable.kursecols .comptable-row > .comptable-cell:nth-child(4) {
    display: none;
  }
}

/* Phones: turn each row into a compact card (2 cols) */
@media (max-width: 680px) {
  #coursesTable.comptable.kursecols .comptable-row.header {
    display: none; /* hide big header on mobile */
  }
  #coursesTable.comptable.kursecols .comptable-row {
    grid-template-columns: 1fr 1fr;
    row-gap: .25rem;
  }
  /* show only: title (full width), status, updated, cert; hide other cells */
  #coursesTable.comptable.kursecols .comptable-row > .comptable-cell {
    display: none;
  }
  #coursesTable.comptable.kursecols .comptable-row > .comptable-cell:nth-child(1) {
    display: block;
    grid-column: 1 / -1;
    font-weight: 600;
  }
  #coursesTable.comptable.kursecols .comptable-row > .comptable-cell:nth-child(6),
  #coursesTable.comptable.kursecols .comptable-row > .comptable-cell:nth-child(7),
  #coursesTable.comptable.kursecols .comptable-row > .comptable-cell:nth-child(8) {
    display: flex;
  }
  #coursesTable.comptable.kursecols .comptable-row > .comptable-cell:nth-child(8) {
    justify-content: flex-end;
  }
  /* keep “Keine Treffer …” visible */
  #course-noresults { display: flex !important; }
}


/* ===============================
   comptable (9 columns variant)
   1 ID | 2 Name | 3 E-Mail | 4 Telefon | 5 Firma | 6 Rolle | 7 Kurse | 8 Status | 9 Letzter Login
   =============================== */

.comptable.ninecols .comptable-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}

.comptable.ninecols .comptable-row:last-child {
  border-bottom: none;
}

.comptable.ninecols .comptable-row > div {
  flex: 1 1 100%;
  padding: 0.3rem 0.5rem;
}

/* hide header on mobile */
.comptable.ninecols .comptable-row.header {
  display: none;
}

/* zebra rows (ignore header) */
.comptable.ninecols .comptable-row:not(.header):nth-child(even) {
  background-color: #f9f9f9;
}

/* -------- Mobile layout (pair sensible fields) -------- */
/* ID full width (1) */
.comptable.ninecols .comptable-row > div:nth-child(1) {
  flex: 1 1 100%;
}

/* Name (2) + E-Mail (3) */
.comptable.ninecols .comptable-row > div:nth-child(2),
.comptable.ninecols .comptable-row > div:nth-child(3) {
  flex: 1 1 48%;
}

/* prevent the E-Mail cell content from pushing layout; clip inside fixed width */
.comptable.ninecols .comptable-row > div:nth-child(3) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comptable.ninecols .comptable-row > div:nth-child(3) a,
.comptable.ninecols .comptable-row > div:nth-child(3) span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Telefon (4) + Firma (5) */
.comptable.ninecols .comptable-row > div:nth-child(4),
.comptable.ninecols .comptable-row > div:nth-child(5) {
  flex: 1 1 48%;
}

/* Rolle (6) + Kurse (7) */
.comptable.ninecols .comptable-row > div:nth-child(6),
.comptable.ninecols .comptable-row > div:nth-child(7) {
  flex: 1 1 48%;
}

/* Status (8) + Letzter Login (9) */
.comptable.ninecols .comptable-row > div:nth-child(8),
.comptable.ninecols .comptable-row > div:nth-child(9) {
  flex: 1 1 48%;
}

/* -------- Desktop: fixed grid columns -------- */
@media (min-width: 48rem) {
  .comptable.ninecols .comptable-row.header {
    display: grid;
    grid-template-columns:
      4rem      /* ID */
      1.2fr     /* Name */
      1.6fr     /* E-Mail */
      1fr       /* Telefon */
      1.4fr     /* Firma */
      0.9fr     /* Rolle */
      0.8fr     /* Kurse */
      0.8fr     /* Status */
      1.2fr;    /* Letzter Login */
    background-color: var(--border-color);
    padding: .5rem 0;
    border-radius: 0.5rem 0.5rem 0 0;
    font-weight: 600;
  }

  .comptable.ninecols .comptable-row {
    display: grid;
    grid-template-columns:
      4rem 1.2fr 1.6fr 1fr 1.4fr 0.9fr 0.8fr 0.8fr 1.2fr;
  }

  .comptable.ninecols .comptable-row > div {
    padding: 0.3rem 0.5rem;
    text-align: center;
  }

  /* left-align text-heavy columns */
  .comptable.ninecols .comptable-row > div:nth-child(2), /* Name */
  .comptable.ninecols .comptable-row > div:nth-child(3), /* E-Mail */
  .comptable.ninecols .comptable-row > div:nth-child(5)  /* Firma */ {
    text-align: left;
  }

  /* clip E-Mail text inside its fixed column */
  .comptable.ninecols .comptable-row > div:nth-child(3) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .comptable.ninecols .comptable-row > div:nth-child(3) a,
  .comptable.ninecols .comptable-row > div:nth-child(3) span {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ===============================
   comptable peoplecols (8 columns)
   1 ID | 2 Name | 3 E-Mail | 4 Telefon | 5 Kurse | 6 Standort | 7 Firmen-Rolle | 8 Aktivität
   =============================== */

.comptable.peoplecols .comptable-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  border-bottom:1px solid var(--border-color);
  padding:0;
}
.comptable.peoplecols .comptable-row:last-child{ border-bottom:none; }

.comptable.peoplecols .comptable-row > div{
  flex:1 1 100%;
  padding:.3rem .5rem;
}

/* hide header on mobile */
.comptable.peoplecols .comptable-row.header{ display:none; }

/* zebra (ignore header) */
.comptable.peoplecols .comptable-row:not(.header):nth-child(even){
  background:#f9f9f9;
}

/* -------- Mobile layout -------- */
/* (1) ID full width */
.comptable.peoplecols .comptable-row > div:nth-child(1){ flex:1 1 100%; }
/* (2,3) Name + E-Mail */
.comptable.peoplecols .comptable-row > div:nth-child(2),
.comptable.peoplecols .comptable-row > div:nth-child(3){ flex:1 1 48%; }
/* Email: ellipsize */
.comptable.peoplecols .comptable-row > div:nth-child(3){
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.comptable.peoplecols .comptable-row > div:nth-child(3) a,
.comptable.peoplecols .comptable-row > div:nth-child(3) span{
  display:inline-block; max-width:100%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
/* (4,5) Telefon + Kurse */
.comptable.peoplecols .comptable-row > div:nth-child(4),
.comptable.peoplecols .comptable-row > div:nth-child(5){ flex:1 1 48%; }
/* (6,7) Standort + Firmen-Rolle */
.comptable.peoplecols .comptable-row > div:nth-child(6),
.comptable.peoplecols .comptable-row > div:nth-child(7){ flex:1 1 48%; }
/* (8) Aktivität full width */
.comptable.peoplecols .comptable-row > div:nth-child(8){ flex:1 1 100%; }

.comptable-row.header{
    background:var(--border-color);
    padding:.5rem 0;
    border-radius:.5rem .5rem 0 0;
    font-weight:600;
  }

/* -------- Desktop: fixed grid -------- */
@media (min-width:48rem){
  .comptable.peoplecols .comptable-row.header{
        display:grid;
    grid-template-columns:
      .5fr 1.3fr 1.8fr 1.0fr 0.6fr 1.4fr 1.6fr 1.2fr;
  }

  .comptable.peoplecols .comptable-row{
    display:grid;
    grid-template-columns:
      .5fr 1.3fr 1.8fr 1.0fr 0.6fr 1.4fr 1.6fr 1.2fr;
  }

  .comptable.peoplecols .comptable-row > div{
    padding:.3rem .5rem;
    text-align:center;
    min-width:0; /* allow ellipsis */
  }

  /* left-align text-heavy columns */
  .comptable.peoplecols .comptable-row > div:nth-child(2), /* Name */
  .comptable.peoplecols .comptable-row > div:nth-child(3), /* E-Mail */
  .comptable.peoplecols .comptable-row > div:nth-child(6), /* Standort */
  .comptable.peoplecols .comptable-row > div:nth-child(7)  /* Firmen-Rolle */{
    text-align:left;
  }

  /* Email ellipsis on desktop too */
  .comptable.peoplecols .comptable-row > div:nth-child(3){
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }

  /* selects fill wider cells neatly */
  .comptable.peoplecols .comptable-row > div:nth-child(6) select,
  .comptable.peoplecols .comptable-row > div:nth-child(7) select{
    width:100%;
  }
}

/* ===============================
   Teilnehmer table (8 columns)
   =============================== */

/* ===============================
   Teilnehmer table = FLEX (8 columns)
   =============================== */

/* row is flex */
#teilnehmerTable .comptable-row{
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* IMPORTANT: override your global rule:
   .comptable-row > div { flex: 1 1 100%; }  */
#teilnehmerTable .comptable-row > .comptable-cell{
  flex: 0 1 auto;      /* <-- not 1 1 100% */
  min-width: 0;        /* ellipsis works */
  padding: .3rem .5rem;
}

/* Column sizing (8 cells) */
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(1){ flex: 0 0 4.25rem; } /* ID */
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(2){ flex: 2 1 14rem; }   /* Name */
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(3){ flex: 2 1 14rem; }   /* E-Mail */
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(4){ flex: 1.25 1 10rem; }/* Telefon */
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(5){ flex: 1.6 1 12rem; } /* Firma */
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(6){ flex: 0 0 4.5rem; text-align:right; } /* Kurse */
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(7){ flex: 1.4 1 12rem; } /* Letzter Login */
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(8){ flex: 0 0 6.5rem; display:flex; justify-content:center; } /* Aktionen */

/* Header */
#teilnehmerTable .comptable-row.header{
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--border-color);
  font-weight: 600;
}

/* Ellipsis for long stuff */
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(3),
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(4){
  overflow: hidden;
}
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(3) a,
#teilnehmerTable .comptable-row > .comptable-cell:nth-child(4) a{
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ===============================
   Responsive hiding (FLEX version)
   =============================== */

/* hide Firma (5) */
@media (max-width: 1100px){
  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(5){ display:none; }

  /* re-balance remaining cols */
  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(2){ flex: 2.2 1 14rem; }
  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(3){ flex: 2.2 1 14rem; }
}

/* hide Telefon (4) */
@media (max-width: 860px){
  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(4){ display:none; }

  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(2){ flex: 2.4 1 14rem; }
  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(3){ flex: 2.4 1 14rem; }
}

/* hide E-Mail (3) */
@media (max-width: 680px){
  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(3){ display:none; }

  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(2){ flex: 1 1 12rem; } /* Name */
  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(7){ flex: 1 1 10rem; } /* Login */
  #teilnehmerTable .comptable-row > .comptable-cell:nth-child(8){ flex: 0 0 6rem; }  /* Actions */
}

/* ===============================
   comptable (courses, 9 columns)
   =============================== */
.comptable.kursecols .comptable-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  padding: 0;
  align-items: center;
}
.comptable.kursecols .comptable-row:last-child { border-bottom: none; }

.comptable.kursecols .comptable-row > div {
  flex: 1 1 100%;
  padding: 0.3rem 0.5rem;
}

/* Hide header on mobile */
.comptable.kursecols .comptable-row.header { display: none; }

/* Zebra */
.comptable.kursecols .comptable-row:nth-child(even) { background-color: #f9f9f9; }

/* Mobile pairings (keep it simple) */
.comptable.kursecols .comptable-row > div:nth-child(1) { /* Kurs (full width) */
  flex: 1 1 100%;
}
.comptable.kursecols .comptable-row > div:nth-child(2),
.comptable.kursecols .comptable-row > div:nth-child(3) { /* Zugewiesen + Lernbeginn */
  flex: 1 1 48%;
}
.comptable.kursecols .comptable-row > div:nth-child(4),
.comptable.kursecols .comptable-row > div:nth-child(5) { /* Lernende + Ablauf */
  flex: 1 1 48%;
}
.comptable.kursecols .comptable-row > div:nth-child(6),
.comptable.kursecols .comptable-row > div:nth-child(7) { /* Status + Letzte Änderung */
  flex: 1 1 48%;
}
/* Zertifikat (8) + Aktion (9) stay full width on small screens */

/* Desktop layout */
@media (min-width: 48rem) {
  .comptable.kursecols .comptable-row.header {
    display: grid;
    grid-template-columns:
      2.6fr   /* 1 Kurs (wider) */
      0.9fr   /* 2 Zugewiesen */
      0.9fr   /* 3 Lernbeginn */
      0.9fr   /* 4 Lernende */
      0.9fr   /* 5 Ablauf */
      0.9fr   /* 6 Status */
      1.1fr   /* 7 Letzte Änderung */
      0.8fr   /* 8 Zertifikat */
      0.9fr;  /* 9 Aktion */
    padding: 0;
    background: var(--border-color, #e5e7eb);
    border-radius: .5rem .5rem 0 0;
    font-weight: 600;
  }

  .comptable.kursecols .comptable-row {
    display: grid;
    grid-template-columns:
      2.6fr 0.9fr 0.9fr 0.9fr 0.9fr 0.9fr 1.1fr 0.8fr 0.9fr;
  }

  /* Text alignment */
  .comptable.kursecols .comptable-row > div:nth-child(1),
  .comptable.kursecols .comptable-row > div:nth-child(6) {
    text-align: left;
  }

  /* Truncate long course names nicely */
  .comptable.kursecols .comptable-row > div:nth-child(1) {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .comptable.kursecols .comptable-row > div:nth-child(1) a
  {
    display: inline-block; max-width: 100%; color: inherit; text-decoration: none;
  }
/* Kurs column (3rd cell) link: grey + underlined */
#lernstandTable .comptable-row:not(.header) > .comptable-cell:nth-child(3) > a,
#lernstandTable .comptable-row:not(.header) > .comptable-cell:nth-child(3) > a:link,
#lernstandTable .comptable-row:not(.header) > .comptable-cell:nth-child(3) > a:visited{
/*  color: #6b7280;*/              /* grey */
}

#lernstandTable .comptable-row:not(.header) > .comptable-cell:nth-child(3) > a:hover,
#lernstandTable .comptable-row:not(.header) > .comptable-cell:nth-child(3) > a:focus{
  color: #4b5563;              /* slightly darker on hover/focus */
  text-decoration: underline;
}

  .comptable.kursecols .comptable-row > div:nth-child(1) a:hover {
    text-decoration: underline;
  }
}


/* ===============================
   comptable (10 columns variant)
   =============================== */

.comptable.tencols .comptable-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  align-items: center;
}

.comptable.tencols .comptable-row:last-child {
  border-bottom: none;
}

.comptable.tencols .comptable-row > div {
  flex: 1 1 100%;
  padding: 0.3rem 0.5rem;
}

.comptable.tencols .comptable-row.header {
  display: none; /* hide header on mobile */
}

/* zebra */
.comptable.tencols .comptable-row:nth-child(even) {
  background-color: #f9f9f9;
}

/* Mobile: sensible pairing */
.comptable.tencols .comptable-row > div:nth-child(2),
.comptable.tencols .comptable-row > div:nth-child(3) { /* Name + E-Mail */
  flex: 1 1 48%;
}
.comptable.tencols .comptable-row > div:nth-child(4),
.comptable.tencols .comptable-row > div:nth-child(5) { /* Telefon + Firma */
  flex: 1 1 48%;
}
.comptable.tencols .comptable-row > div:nth-child(6),
.comptable.tencols .comptable-row > div:nth-child(7) { /* Rolle + Kurse */
  flex: 1 1 48%;
}
.comptable.tencols .comptable-row > div:nth-child(8),
.comptable.tencols .comptable-row > div:nth-child(9) { /* Status + Letzter Login */
  flex: 1 1 48%;
}
/* ID (1) and Aktion (10) stay full width on mobile */

/* Desktop: 10-cols — Rolle narrow, Standort & Firmen-Rolle wider */
@media (min-width: 48rem) {
  .comptable.tencols .comptable-row.header {
    display: grid;
    grid-template-columns:
      4rem      /* 1 ID */
      1.3fr     /* 2 Name */
      1.8fr     /* 3 E-Mail */
      1.0fr     /* 4 Telefon */
      0.4fr     /* 5 Rolle (narrower) */
      0.5fr     /* 6 Kurse */
      1.4fr     /* 7 Standort (wider) */
      1.6fr     /* 8 Firmen-Rolle (wider) */
      0.8fr     /* 9 Aktiviert */
      1.2fr;    /* 10 Aktivität */
    padding: 0;
    background: var(--border-color);
    border-radius: .5rem .5rem 0 0;
    font-weight: 600;
  }

  .comptable.tencols .comptable-row {
    display: grid;
    grid-template-columns:
      4rem 1.3fr 1.8fr 1.0fr 0.4fr 0.5fr 1.4fr 1.6fr 0.8fr 1.2fr;
  }

  /* keep text-heavy columns left-aligned */
  .comptable.tencols .comptable-row > div:nth-child(1),
  .comptable.tencols .comptable-row > div:nth-child(2), /* Name */
  .comptable.tencols .comptable-row > div:nth-child(3), /* E-Mail */
  .comptable.tencols .comptable-row > div:nth-child(5), /* Rolle label if text */
  .comptable.tencols .comptable-row > div:nth-child(7), /* Standort */
  .comptable.tencols .comptable-row > div:nth-child(8)  /* Firmen-Rolle */{
    text-align: left;
  }

  /* E-Mail: clip long addresses without shifting columns */
  .comptable.tencols .comptable-row > div:nth-child(3){
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* make selects fill their wider cells neatly */
  .comptable.tencols .comptable-row > div:nth-child(7) select,
  .comptable.tencols .comptable-row > div:nth-child(8) select{
    width: 100%;
  }
}
/* ===============================
   comptable (11 columns variant)
   =============================== */

.comptable.elevencol .comptable-row{
  display:flex;
  flex-wrap:wrap;
  border-bottom:1px solid var(--border-color);
  padding:0;
  align-items:center;
}
.comptable.elevencol .comptable-row:last-child{ border-bottom:none; }

.comptable.elevencol .comptable-row > div{
  flex:1 1 100%;
  padding:0.3rem 0.5rem;
  min-width:0;                 /* ellipsis */
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* hide header on mobile */
.comptable.elevencol .comptable-row.header{ display:none; }

/* zebra */
.comptable.elevencol .comptable-row:nth-child(even){ background-color:#f9f9f9; }

/* Mobile pairings (11 cols total)
   1: ID (full width)
   2-3: Name + Firma
   4-5: Kurs + Lernzeit
   6-7: Fortschritt + Lernbeginn
   8-9: Lernende + Ablauf
   10-11: Status + Letzter Login
*/
.comptable.elevencol .comptable-row > div:nth-child(2),
.comptable.elevencol .comptable-row > div:nth-child(3),
.comptable.elevencol .comptable-row > div:nth-child(4),
.comptable.elevencol .comptable-row > div:nth-child(5),
.comptable.elevencol .comptable-row > div:nth-child(6),
.comptable.elevencol .comptable-row > div:nth-child(7),
.comptable.elevencol .comptable-row > div:nth-child(8),
.comptable.elevencol .comptable-row > div:nth-child(9),
.comptable.elevencol .comptable-row > div:nth-child(10),
.comptable.elevencol .comptable-row > div:nth-child(11){
  flex:1 1 48%;
}

/* Desktop */
@media (min-width:48rem){
  .comptable.elevencol .comptable-row.header{
    display:grid;
    grid-template-columns:
      5.5rem   /* 1: ID */
      1.15fr   /* 2: Name */
      1.4fr    /* 3: Firma */
      1.3fr    /* 4: Kurs */
      0.8fr    /* 5: Lernzeit */
      0.9fr    /* 6: Fortschritt */
      1.1fr    /* 7: Lernbeginn */
      1.1fr    /* 8: Lernende */
      0.9fr    /* 9: Ablauf */
      0.9fr    /* 10: Status */
      1.2fr;   /* 11: Letzter Login */
    background-color:var(--border-color);
    padding:.5rem 0;
    border-radius:.5rem .5rem 0 0;
    font-weight:600;
  }

  .comptable.elevencol .comptable-row{
    display:grid;
    grid-template-columns:
      5.5rem 1.15fr 1.4fr 1.3fr 0.8fr 0.9fr 1.1fr 1.1fr 0.9fr 0.9fr 1.2fr;
  }

  .comptable.elevencol .comptable-row > div{
    padding:0.3rem 0.5rem;
    text-align:center;
  }

  /* left-align text-heavy columns: Name, Firma, Kurs, Letzter Login */
  .comptable.elevencol .comptable-row > div:nth-child(2),
  .comptable.elevencol .comptable-row > div:nth-child(3),
  .comptable.elevencol .comptable-row > div:nth-child(4),
  .comptable.elevencol .comptable-row > div:nth-child(11){
    text-align:left;
  }
}

/* hidden rows for JS filters */
.comptable.elevencol .comptable-row.hidden{ display:none !important; }

/* ===============================
   childc lernstand
   =============================== */
.comptable.lstandcols .comptable-row {
  display: grid;
  /* ID | Name | Kurs | Min | % | Start | Ende | Fällig | Status | Letzter Login */
  grid-template-columns: 3.5rem 1.6fr 2.2fr 0.8fr 0.8fr 1.1fr 1.1fr 1.1fr 0.9fr 1fr;
  column-gap: .75rem;
  align-items: center;
}

.comptable.lstandcols .comptable-row.header {
  font-weight: 600;
}

.comptable.lstandcols .comptable-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hide via .hidden if you filter rows */
.comptable.lstandcols .comptable-row.hidden { display: none !important; }

/* Responsive tweaks */
@media (max-width: 1100px) {
  .comptable.lstandcols .comptable-row {
    grid-template-columns: 3rem 1.3fr 2fr 0.7fr 0.7fr 1fr 1fr 1fr 0.8fr 0.9fr;
  }
}
@media (max-width: 900px) {
  .comptable.lstandcols { overflow-x: auto; }
  .comptable.lstandcols .comptable-row { min-width: 980px; }
}


/* ===============================
   Kurszuweisung rows
   =============================== */
/* base rows */
#kurszuweisung .user-row{
  align-items: center;
  background: #fff;
  padding: .35rem .5rem;
}
#kurszuweisung .user-row:nth-child(even){ background:#fafafa; }
#kurszuweisung .user-row:hover{ background:#f3f7ff; }

/* header */
#kurszuweisung .header-row{
  background: var(--border-color);
  border-radius: .5rem .5rem 0 0;
  font-weight: 600;
  color: var(--main-txt-color);
  padding: .6rem .5rem;
}

/* desktop layout: switch rows to grid so columns line up nicely */
@media (min-width: 48rem){
  #kurszuweisung .header-row,
  #kurszuweisung .user-row{
    display: grid !important;             /* override inline flex */
    grid-template-columns:
      2.2rem   /* checkbox/status */
      4.5rem   /* ID */
      1.6fr    /* Name */
      1.9fr    /* E-Mail */
      0.8fr    /* Rolle */
      1.1fr    /* Firma */
      1.1fr;   /* Letzter Login */
    gap: .25rem .5rem;
  }

  #kurszuweisung .header-row > .column,
  #kurszuweisung .user-row > .column{
    padding: .3rem .5rem;
    text-align: center;
    min-width: 0;                          /* allow ellipsis */
  }

  /* left-align text-heavy columns */
  #kurszuweisung .user-row > .column:nth-child(3), /* Name */
  #kurszuweisung .user-row > .column:nth-child(4), /* E-Mail */
  #kurszuweisung .user-row > .column:nth-child(6), /* Firma */
  #kurszuweisung .header-row > .column:nth-child(3),
  #kurszuweisung .header-row > .column:nth-child(4),
  #kurszuweisung .header-row > .column:nth-child(6){
    text-align: left;
  }

  /* clip long emails, keep column width */
  #kurszuweisung .user-row > .column:nth-child(4),
  #kurszuweisung .header-row > .column:nth-child(4){
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* center the tiny checkbox/status col */
  #kurszuweisung .user-row > .column:nth-child(1),
  #kurszuweisung .header-row > .column:nth-child(1){
    justify-self: center;
  }
}

/* tidy checkbox look */
#kurszuweisung input[type="checkbox"]{
  width: 1.05rem;
  height: 1.05rem;
  vertical-align: middle;
}

/* name link styling */
#kurszuweisung .user-row a{
  color: var(--main-acc-color);
  text-decoration: none;
}
#kurszuweisung .user-row a:hover{
  color: var(--main-acc-color-2);
  text-decoration: underline;
}


/* Dashboard KPIs */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}
.kpi {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
}
.kpi-label {
  font-size: 0.9rem;
  color: #666;
}
.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

/* Charts */
.chart-card {
  position: relative;
  height: 14rem; /* lock the container height */
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.chart-card h3 { margin: 0 0 0.5rem 0; }

/* Let canvas fill the card */
.chart-card canvas {
  display: block;
  width: 100%;
  height: calc(100% - 1.8rem); /* account for the h3 line; tweak if needed */
}

/* On larger screens you can give a bit more height if you like */
@media (min-width: 48rem) {
  .chart-card { height: 18rem; }
}


@media (min-width: 48rem) {
  .kpi-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .chart-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* ===============================
----------- BADGES ---------------
=============================== */
.badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 1rem;
  color: #fff;
  line-height: 1;
  min-width: 10rem;
  max-width: 10rem;
  text-align: center;
}

.badge-done {
  background-color: var(--badge-done);
}

.badge-expired {
  background-color: var(--badge-expired);
}

.badge-running {
  background-color: var(--badge-running);
  color: #000; /* override for yellow */
}

.badge-grey {
  background-color: var(--badge-grey);
}

.badge-lock {
  background-color: var(--badge-lock);
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  background-image: url('../img/i_lock.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem;
  text-indent: -9999px; /* hide text */
  overflow: hidden;
}

/* --------------------------
 * --- COMPANY INFO -----
 * ------------------------ */
.company-card {
  min-width: 0;
  padding: 0 .7rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  height: 100%;
}
.company-man-card{
  min-width: 0;
  padding: 0 .7rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  display: block;
}

#subunternehmenForm{
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--main-txt-color);
}

.bbutton {
    background-color: var(--main-acc-color);
    color: var(--main-bg-color);
}
