:root { --bg:#f6f7fb; --card:#fff; --text:#111; --muted:#666; --line:#e7e9f0; }
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial; color:var(--text); background:var(--bg); }
a{ color:#2a5bd7; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{ max-width:1100px; margin:0 auto; padding:16px; }

.app-header{ background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:10; }
.app-header__inner{ display:flex; gap:16px; align-items:center; justify-content:space-between; }
.brand__title{ font-weight:700; }
.brand__sub{ font-size:12px; color:var(--muted); margin-top:2px; }

.nav{ display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
.nav__link{ padding:8px 10px; border-radius:10px; }
.nav__link.is-active{ background:var(--bg); border:1px solid var(--line); }

.app-main{ padding-top:18px; }
.app-footer{ margin-top:26px; padding:18px 0; color:var(--muted); }

h1,h2,h3{ margin:0 0 10px 0; }
p{ line-height:1.45; }

.box, .card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
  margin:12px 0;
  box-shadow:0 1px 6px rgba(0,0,0,.04);
}

table{ width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
th,td{ padding:10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th{ background:#fafbff; font-weight:600; }
tr:last-child td{ border-bottom:none; }

.btn{
  display:inline-block;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
}
.btn:hover{ background:#fafbff; }
.btn-primary{ background:#2a5bd7; border-color:#2a5bd7; color:#fff; }
.btn-secondary{ background:#fff; }
.btn-success{ background:#1f8f4a; border-color:#1f8f4a; color:#fff; }
.form-select, input[type="text"], input[type="search"], select{
  padding:8px 10px; border:1px solid var(--line); border-radius:12px; background:#fff;
}

/* --- Standalone layout (tms-*) --- */
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; }
.tms-header{
  display:block;
  width:100%;
  padding:0;
  background:#fafafa;
  border-bottom:1px solid #ddd;
}

.tms-brand a{
  text-decoration:none;
  font-weight:700;
}

.tms-nav ul{
  list-style:none;
  margin:0;
  padding:0;
}

.tms-nav a{
  text-decoration:none;
  padding:6px 10px;
  border-radius:8px;
  display:inline-block;
}

.tms-nav-item.is-active a{
  background:#eee;
}

.tms-main{
  padding:18px 16px;
  max-width:1100px;
  margin:0 auto;
}

.tms-footer{
  padding:12px 16px;
  border-top:1px solid #ddd;
  color:#666;
  background:#fafafa;
  max-width:1100px;
  margin:0 auto;
}

/* --- Comfort Pack (Variante A) --- */
:root{
  --radius:16px;
}

.container{
  max-width: 980px; /* etwas schmaler = mehr "Premium"-Look */
}

.app-header{
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,.92);
}

.app-header__inner{
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand__title a{
  color: var(--text);
}

.nav{
  gap: 8px;
}

.nav__link{
  border: 1px solid transparent;
  background: transparent;
}

.nav__link:hover{
  background: var(--bg);
  border-color: var(--line);
  text-decoration: none;
}

.nav__link.is-active{
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 10px rgba(0,0,0,.04);
}

.app-main{
  padding-top: 22px;
  padding-bottom: 28px;
}

.box, .card, table{
  border-radius: var(--radius);
}

.box, .card{
  padding: 16px;
}

h1{ font-size: 22px; margin-bottom: 12px; }
h2{ font-size: 18px; margin-bottom: 10px; }
p{ color: var(--text); }

/* Buttons etwas "wertiger" */
.btn{
  border-radius: 14px;
  padding: 10px 14px;
}

.btn-primary{
  box-shadow: 0 6px 18px rgba(42,91,215,.18);
}

/* --- tms-* layout polish (Variante A) --- */
.tms-header{
  background:#fff;
  border-bottom:1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.tms-nav ul{
  list-style:none;
  margin: 8px 0 0 0;
  padding: 0;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.tms-nav a{
  padding:8px 10px;
  border-radius:10px;
  text-decoration:none;
}
.tms-nav-item.is-active a{
  background: var(--bg);
  border:1px solid var(--line);
}
.tms-main{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 28px 16px;
}
.tms-footer{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px;
  color: var(--muted);
}

.tms-nav-item.is-active a{
  background:#fff;
  border-color: var(--line);
  box-shadow: 0 1px 10px rgba(0,0,0,.04);
}

.tms-main{
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 32px 16px;
}

.tms-footer{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px;
  color: var(--muted);
}


/* --- Header centering (layout.php owns header/nav) --- */
.tms-header { width: 100%; }
.tms-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.tms-user { white-space: nowrap; }

.tms-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.tms-user a {
  font-weight: 500;
  text-decoration: none;
}

/* ------------------------------------------------------------
   Tiles (Admin/Vendor Dashboards) - shared UI building block
   ------------------------------------------------------------ */
.tms-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:16px;
  margin:16px 0;
}
.tms-tile{
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  background:#fff;
  transition:box-shadow .15s ease, transform .15s ease;
}
.tms-tile:hover{
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  transform:translateY(-2px);
}
.tms-tile-link{
  display:block;
  padding:12px 14px;
  color:inherit;
  text-decoration:none;
}
.tms-tile-title{
  font-weight:600;
  margin:0 0 6px 0;
}
.tms-tile-desc{
  font-size:13px;
  opacity:.72;
  line-height:1.25;
}

/* Optional: QM callout block for placeholder views */
.qm-note{
  border:1px dashed rgba(0,0,0,.18);
  border-radius:12px;
  padding:12px 14px;
  margin-top:12px;
  background:rgba(0,0,0,.02);
}
.badge {
  display:inline-block;
  padding:2px 8px;
  border-radius:10px;
  font-size:12px;
  background:#eee;
}
.badge-green { background:#d4f5e0; color:#0a5; }
.badge-muted { background:#f2f2f2; color:#999; }

/* --- KPI badges (admin_kpi) --- */
.tms-badge{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  line-height:18px;
  border:1px solid rgba(0,0,0,.15);
  background:#f5f5f5;
  color:#222;
  white-space:nowrap;
}

.tms-badge-ok{
  background:#e7f7ea;
  border-color:#a8e0b2;
  color:#145a23;
}

.tms-badge-next{
  background:#fff3cd;
  border-color:#ffe08a;
  color:#6a4b00;
}

.tms-badge-planned{
  background:#eef1f5;
  border-color:#cfd6df;
  color:#3b4552;
}

.tms-role-switcher{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-left:16px;
}

.tms-role-switcher-label{
  font-size:14px;
  opacity:.8;
}

.tms-role-chip{
  display:inline-block;
  padding:4px 10px;
  border:1px solid rgba(0,0,0,.15);
  border-radius:999px;
  text-decoration:none;
  font-size:13px;
  line-height:1.4;
  background:#fff;
}

.tms-role-chip.is-active{
  font-weight:600;
  pointer-events:none;
  opacity:.9;
}

.tms-dashboard-intro{
  margin: 6px 0 18px;
  color: #555;
}

.tms-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:20px;
  margin-top:20px;
}

.tms-dashboard-card{
  background:#fff;
  border:1px solid #ddd;
  border-radius:12px;
  padding:18px;
  box-shadow:0 4px 12px rgba(0,0,0,0.05);
}

.tms-dashboard-card h3{
  margin:0 0 10px;
  font-size:18px;
}

.tms-dashboard-card p{
  margin:0 0 12px;
  line-height:1.45;
}

.tms-dashboard-link{
  display:inline-block;
  font-weight:600;
  text-decoration:none;
}
.tms-kpi{
  background:#fff;
  border:1px solid #ddd;
  border-radius:10px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.tms-kpi-value{
  font-size:22px;
  font-weight:700;
}
.tms-kpi-label{
  font-size:14px;
  color:#555;
}
.tms-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
  margin-bottom:24px;
}

.tms-kpi{
  background:#fff;
  border:1px solid #ddd;
  border-radius:10px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}

.tms-kpi-value{
  font-size:22px;
  font-weight:700;
}

.tms-kpi-label{
  font-size:14px;
  color:#555;
}

.tms-chart-card{
  min-height:220px;
}

.tms-mini-chart{
  display:flex;
  align-items:flex-end;
  gap:10px;
  min-height:160px;
  margin-top:10px;
}

.tms-mini-chart-col{
  flex:1 1 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}

.tms-mini-chart-value{
  font-size:12px;
  color:#444;
  white-space:nowrap;
}

.tms-mini-chart-bar-wrap{
  height:120px;
  width:100%;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}

.tms-mini-chart-bar{
  width:70%;
  min-width:16px;
  border-radius:8px 8px 0 0;
  background:linear-gradient(180deg,#5aa9ff,#2f6fdd);
}

.tms-mini-chart-bar:hover{
  opacity:0.85;
  transform:scaleY(1.05);
}

.tms-mini-chart-label{
  font-size:12px;
  color:#666;
  text-align:center;
}

/* Statuszeile */
.tms-role-status{
  font-size:12px;
  color:#555;
  margin-bottom:6px;
  line-height:1.35;
}

/* Badge */
.tms-impersonation{
  display:inline-block;
  background:#ffe9b3;
  color:#7a4f00;
  padding:2px 6px;
  border-radius:999px;
  font-size:11px;
  margin-left:6px;
  vertical-align:middle;
}

/* Formular kompakt */
.tms-role-switcher{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:flex-start;
  gap:8px 10px;
}

.tms-role-switcher > div{
  margin:0;
}

.tms-role-switcher label,
.tms-role-switcher .tms-role-switcher-label{
  display:block;
  font-size:11px;
  color:#666;
  margin-bottom:2px;
}

.tms-role-switcher select{
  min-width:140px;
  max-width:220px;
  box-sizing:border-box;
}

  .tms-role-switcher{
    justify-content:flex-start;
  }

  .tms-role-switcher select{
    min-width:120px;
    max-width:100%;
  }


/* Selects etwas kompakter */
.tms-role-switcher select{
  min-width:120px;
  max-width:180px;
  box-sizing:border-box;
}

/* wenn der Button noch bleibt, kleiner */
.tms-role-switcher button{
  padding:3px 8px;
  font-size:12px;
  line-height:1.2;
}


/* Main auf gleiche Innenabstände */
.tms-main{
  padding:18px 20px 24px 20px;
}


.tms-role-status{
  font-size:12px;
  color:#555;
  margin-bottom:6px;
  line-height:1.35;
}

.tms-impersonation{
  display:inline-block;
  background:#ffe9b3;
  color:#7a4f00;
  padding:2px 6px;
  border-radius:999px;
  font-size:11px;
  margin-left:6px;
  vertical-align:middle;
}

/* Switcher kompakt */
.tms-role-switcher{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:flex-start;
  gap:8px 10px;
}

.tms-role-switcher > div{
  margin:0;
}

.tms-role-switcher label,
.tms-role-switcher .tms-role-switcher-label{
  display:block;
  font-size:11px;
  color:#666;
  margin-bottom:2px;
}

.tms-role-switcher select{
  min-width:120px;
  max-width:180px;
  box-sizing:border-box;
}

.tms-role-switcher button{
  padding:3px 8px;
  font-size:12px;
  line-height:1.2;
}

  .tms-role-switcher{
    justify-content:flex-start;
  }

  .tms-role-switcher select{
    min-width:120px;
    max-width:100%;
  }

/* =========================================================
   CLEAN TMS HEADER
   ========================================================= */

.tms-header-row1,
.tms-header-row2,
.tms-main,
.tms-footer{
  width:min(1440px, calc(100% - 32px));
  max-width:1440px;
  margin:0 auto;
  box-sizing:border-box;
}

.tms-header-row1{
  display:grid;
  grid-template-columns:72px minmax(420px, 520px);
  column-gap:18px;
  align-items:start;
  justify-content:start;
  padding:10px 16px 8px 16px;
}

.tms-brand{
  font-weight:700;
  font-size:18px;
  padding-top:6px;
  margin:0;
}

.tms-rolebox{
  width:auto;
  min-width:420px;
  max-width:520px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  box-shadow:0 1px 6px rgba(0,0,0,.04);
}

.tms-header-row2{
  display:block;
  padding:8px 16px 10px 16px;
  border-top:1px solid #e6e6e6;
}

.tms-nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:12px 16px;
  width:100%;
}

.tms-nav ul{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:12px 16px;
  width:100%;
}

.tms-nav a{
  white-space:nowrap;
}

.tms-nav{
  display:flex;
  flex-wrap:wrap;
  gap:14px 20px;
}

.tms-nav a{
  text-decoration:none;
  white-space:nowrap;
}

.tms-nav a:hover{
  text-decoration:underline;
}
/* Logout leicht hervorheben */
.tms-nav a[href*="view=logout"]{
  font-weight:600;
  color:#b00020;
  border:1px solid rgba(176,0,32,0.25);
  padding:6px 10px;
  border-radius:8px;
}

.tms-nav a[href*="view=logout"]:hover{
  background:rgba(176,0,32,0.08);
  text-decoration:none;
}

.tms-flash{
  position:relative;
  max-width:1040px;
  margin:16px auto 0 auto;
  padding:12px 40px 12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  box-sizing:border-box;
}

.tms-flash-success{
  background:#eaf7ee;
  border-color:#b7e1c2;
  color:#14532d;
}

.tms-flash-error,
.tms-flash-danger{
  background:#fdeeee;
  border-color:#efc2c2;
  color:#7a1f1f;
}

.tms-flash-warning{
  background:#fff7e8;
  border-color:#f0d7a1;
  color:#7a5600;
}

.tms-flash-info{
  background:#eef4ff;
  border-color:#c9d8ff;
  color:#1f4aa8;
}

.tms-flash-close{
  position:absolute;
  top:8px;
  right:10px;
  border:0;
  background:transparent;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  color:inherit;
}
/* =========================
   TMS Buttons (Standard)
   ========================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
}

/* Primary */
.btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* Secondary */
.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border-color: #d1d5db;
}
.btn-secondary:hover {
  background: #e5e7eb;
}

/* Danger */
.btn-danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}
.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* spacing */
.btn + .btn {
  margin-left: 6px;
}


/* --- TMS Review UX --- */
.tms-question-badge {
    display: inline-block;
    margin: 0 0 8px 0;
    padding: 4px 8px;
    border-radius: 4px;
    background: #e8f1ff;
    color: #1f4f8a;
    font-size: 12px;
    font-weight: 600;
}

.tms-review-banner {
    margin: 0 0 12px 0;
    padding: 10px 12px;
    border: 1px solid #ffe39a;
    border-radius: 8px;
    background: #fff7db;
    color: #7a5a00;
    font-weight: 600;
}


.tms-answer-feedback {
    margin: 0 0 6px 0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.tms-answer-feedback.correct {
    background: #e6f6e9;
    color: #1f6b2a;
}

.tms-answer-feedback.wrong {
    background: #fdeaea;
    color: #9b1c1c;
}


.tms-answer-correct {
    background: #e6f6e9;
    border: 1px solid #2e7d32;
    padding: 4px 6px;
    border-radius: 4px;
    display: block;
}

.tms-answer-wrong {
    background: #fdeaea;
    border: 1px solid #c62828;
    padding: 4px 6px;
    border-radius: 4px;
    display: block;
}


.tms-answer-explanation {
    margin: 8px 0 10px 0;
    padding: 8px 10px;
    border-left: 4px solid #4a6fa5;
    background: #f4f7fb;
    color: #22384d;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.45;
}


.tms-answer-correct-note {
    margin: 8px 0 10px 0;
    padding: 8px 10px;
    border-left: 4px solid #2e7d32;
    background: #eef8f0;
    color: #1f4d2d;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.45;
}


.tms-result-box {
    margin: 0 0 16px 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d0d8e6;
    background: #f4f7fb;
    font-size: 15px;
}

.tms-result-hint {
    margin-top: 6px;
    color: #8a5a00;
}

.tms-result-success {
    margin-top: 6px;
    color: #2d662d;
}


/* =========================
   TMS Portal v1
   ========================= */

.tms-portal {
    padding: 24px;
}

.tms-portal-hero {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef4ff 0%, #f9fbff 100%);
    border: 1px solid #dbe6f6;
}

.tms-portal-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5c6f91;
    margin-bottom: 10px;
    font-weight: 700;
}

.tms-portal-title {
    margin: 0 0 10px 0;
    font-size: 34px;
    line-height: 1.15;
    color: #1d3557;
}

.tms-portal-subtitle {
    margin: 0 0 18px 0;
    font-size: 16px;
    line-height: 1.55;
    color: #42546b;
    max-width: 700px;
}

.tms-portal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tms-btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.tms-btn:hover {
    transform: translateY(-1px);
}

.tms-btn-primary {
    background: #2f6fed;
    color: #fff;
    border: 1px solid #2f6fed;
}

.tms-btn-secondary {
    background: #fff;
    color: #2f6fed;
    border: 1px solid #c7d7f6;
}

.tms-portal-hero__meta {
    display: grid;
    gap: 12px;
}

.tms-portal-panel {
    padding: 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #dbe6f6;
}

.tms-portal-panel__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #72829a;
    margin-bottom: 6px;
    font-weight: 700;
}

.tms-portal-panel__value {
    color: #1d3557;
    font-size: 16px;
    font-weight: 600;
}

.tms-portal-section {
    margin-bottom: 28px;
}

.tms-portal-section--compact {
    margin-top: 8px;
}

.tms-portal-section__head h2 {
    margin: 0 0 6px 0;
    color: #1d3557;
    font-size: 24px;
}

.tms-portal-section__head p {
    margin: 0 0 18px 0;
    color: #5a6b82;
}

.tms-portal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.tms-portal-card {
    display: block;
    text-decoration: none;
    padding: 18px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #dbe6f6;
    box-shadow: 0 6px 18px rgba(33, 58, 94, 0.05);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.tms-portal-card:hover {
    transform: translateY(-2px);
    border-color: #bfd1f0;
    box-shadow: 0 10px 24px rgba(33, 58, 94, 0.10);
}

.tms-portal-card__top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tms-portal-card__title {
    margin: 0 0 8px 0;
    color: #18314f;
    font-size: 20px;
}

.tms-portal-card__desc {
    margin: 0 0 18px 0;
    color: #5a6b82;
    line-height: 1.5;
    min-height: 70px;
}

.tms-portal-card__footer {
    color: #2f6fed;
    font-weight: 700;
}

.tms-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.tms-badge-area--frontend {
    background: #fcefdc;
    color: #8c5a00;
}

.tms-badge-area--backend {
    background: #eceffd;
    color: #3346a8;
}

.tms-badge-area--hybrid {
    background: #e7f7ef;
    color: #1f6b4a;
}

.tms-badge-status--stabil {
    background: #e8f7ec;
    color: #1d6a37;
}

.tms-badge-status--gut {
    background: #e8f0ff;
    color: #264ea3;
}

.tms-badge-status--in_arbeit {
    background: #fff3d9;
    color: #8a5a00;
}

.tms-badge-status--baustelle {
    background: #ffe7d9;
    color: #a34700;
}

.tms-badge-status--geplant {
    background: #eef1f4;
    color: #617182;
}

.tms-legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 1100px) {
    .tms-portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tms-portal-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .tms-portal {
        padding: 16px;
    }

    .tms-portal-grid {
        grid-template-columns: 1fr;
    }

    .tms-portal-title {
        font-size: 28px;
    }
}


/* =========================
   TMS Hauptmenü
   ========================= */

.tms-main-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #dbe6f6;
}

.tms-main-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tms-main-nav__brand a {
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    color: #1d3557;
}

.tms-main-nav__links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tms-main-nav__link {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.tms-main-nav__link:hover {
    transform: translateY(-1px);
}

.tms-main-nav__link--frontend {
    color: #8c5a00;
    background: #fff6e5;
}

.tms-main-nav__link--backend {
    color: #3346a8;
    background: #eef2ff;
}

.tms-main-nav__link--account {
    color: #1f6b4a;
    background: #eaf7f0;
}

.tms-main-nav__link.is-active {
    box-shadow: inset 0 0 0 2px #2f6fed;
    color: #1d3557;
}

@media (max-width: 780px) {
    .tms-main-nav__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .tms-main-nav__links {
        width: 100%;
    }
}


/* =========================
   TMS Hauptmenü
   ========================= */

.tms-main-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #dbe6f6;
}

.tms-main-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tms-main-nav__brand a {
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    color: #1d3557;
}

.tms-main-nav__links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tms-main-nav__link {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.tms-main-nav__link:hover {
    transform: translateY(-1px);
}

.tms-main-nav__link--frontend {
    color: #8c5a00;
    background: #fff6e5;
}

.tms-main-nav__link--backend {
    color: #3346a8;
    background: #eef2ff;
}

.tms-main-nav__link--account {
    color: #1f6b4a;
    background: #eaf7f0;
}

.tms-main-nav__link.is-active {
    box-shadow: inset 0 0 0 2px #2f6fed;
    color: #1d3557;
}

@media (max-width: 780px) {
    .tms-main-nav__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .tms-main-nav__links {
        width: 100%;
    }
}


/* --- TMS MAIN NAV (SaaS Style) --- */
.tms-main-nav {
    background: linear-gradient(90deg, #1e3a5f, #2b5876);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tms-main-nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 10px 20px;
}

.tms-main-nav__brand a {
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    margin-right: 20px;
}

.tms-main-nav__links {
    display: flex;
    gap: 12px;
}

.tms-main-nav__link {
    color: #e6eef7;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tms-main-nav__link:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.tms-main-nav__link--active {
    background: #ffffff;
    color: #1e3a5f;
    font-weight: bold;
}


/* --- PORTAL --- */

.tms-portal {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.tms-portal-hero {
    background: linear-gradient(135deg, #2b5876, #4e4376);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.tms-portal-hero h1 {
    margin: 0 0 10px 0;
}

.tms-portal-actions {
    margin-top: 15px;
}

.tms-portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.tms-tile {
    display: block;
    padding: 18px;
    border-radius: 10px;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e3e6ea;
    transition: all 0.2s ease;
}

.tms-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.tms-tile-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.tms-tile-desc {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.tms-tile-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* STATUS COLORS */
.tms-status-gut {
    background: #e6f6ea;
    color: #1e7e34;
}

.tms-status-in_arbeit {
    background: #fff3cd;
    color: #856404;
}

.tms-status-baustelle {
    background: #f8d7da;
    color: #721c24;
}

.tms-status-geplant {
    background: #e2e3e5;
    color: #6c757d;
}

/* BUTTONS */
.btn-primary {
    background: #2b5876;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    margin-right: 8px;
}

.btn-secondary {
    background: #eee;
    color: #333;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
}


/* --- PORTAL HERO TEXT IMPROVEMENT --- */

.tms-portal-hero p {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.95;
}

/* optional: leichtes Glow für bessere Lesbarkeit */
.tms-portal-hero h1 {
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.tms-portal-hero p {
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}


/* --- HERO GRADIENT UPGRADE --- */

.tms-portal-hero {
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 40%, #6a82fb 100%);
}


.tms-tile {
    transition: all 0.25s ease;
}

.tms-tile:hover {
    transform: translateY(-4px) scale(1.01);
}


/* --- PORTAL V3 --- */

.tms-portal {
    max-width: 1220px;
    margin: 24px auto;
    padding: 0 20px 30px 20px;
}

.tms-portal-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tms-portal-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 45%, #6a82fb 100%);
    color: #fff;
    padding: 34px;
    border-radius: 18px;
    margin-bottom: 22px;
    box-shadow: 0 14px 30px rgba(45, 63, 99, 0.18);
}

.tms-portal-hero h1 {
    margin: 0 0 12px 0;
    font-size: 36px;
    line-height: 1.15;
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.tms-portal-hero p {
    margin: 0;
    color: #fff;
    font-size: 17px;
    line-height: 1.6;
    opacity: 0.96;
    text-shadow: 0 1px 4px rgba(0,0,0,0.20);
    max-width: 720px;
}

.tms-portal-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tms-portal-hero__right {
    display: grid;
    gap: 12px;
    align-content: start;
}

.tms-portal-mini-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 14px 16px;
    backdrop-filter: blur(6px);
}

.tms-portal-mini-card__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-bottom: 4px;
}

.tms-portal-mini-card__value {
    font-size: 18px;
    font-weight: 700;
}

.tms-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.tms-kpi-card {
    background: #fff;
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(35, 52, 84, 0.06);
}

.tms-kpi-card__title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7890;
    margin-bottom: 6px;
    font-weight: 700;
}

.tms-kpi-card__value {
    font-size: 22px;
    font-weight: 800;
    color: #223553;
    margin-bottom: 6px;
}

.tms-kpi-card__meta {
    color: #5f6c82;
    line-height: 1.45;
    font-size: 14px;
}

.tms-quickstart {
    background: #fff8e8;
    border: 1px solid #f0ddb0;
    color: #6f5112;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 22px;
}

.tms-quickstart__title {
    font-weight: 800;
    margin-bottom: 8px;
}

.tms-quickstart__links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.tms-quickstart__links a {
    color: #7c5710;
    font-weight: 700;
    text-decoration: none;
}

.tms-section-head {
    margin-bottom: 14px;
}

.tms-section-head h2 {
    margin: 0 0 6px 0;
    font-size: 28px;
    color: #243754;
}

.tms-section-head p {
    margin: 0;
    color: #5f6c82;
    line-height: 1.5;
}

.tms-portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.tms-tile {
    display: block;
    padding: 18px;
    border-radius: 14px;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e3e6ea;
    transition: all 0.25s ease;
    box-shadow: 0 6px 14px rgba(0,0,0,0.05);
}

.tms-tile:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 24px rgba(0,0,0,0.10);
}

.tms-tile--frontend {
    border-top: 4px solid #f0b347;
}

.tms-tile--backend {
    border-top: 4px solid #5a6df0;
}

.tms-tile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.tms-tile-icon {
    font-size: 28px;
    line-height: 1;
}

.tms-tile-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #223553;
}

.tms-tile-desc {
    font-size: 14px;
    color: #5c6677;
    line-height: 1.5;
    margin-bottom: 14px;
    min-height: 62px;
}

.tms-tile-link {
    color: #2b5876;
    font-weight: 700;
}

.tms-tile-status {
    font-size: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    display: inline-block;
    font-weight: 700;
    text-transform: capitalize;
}

.tms-status-gut {
    background: #e6f6ea;
    color: #1e7e34;
}

.tms-status-in_arbeit {
    background: #fff3cd;
    color: #856404;
}

.tms-status-baustelle {
    background: #f8d7da;
    color: #721c24;
}

.tms-status-geplant {
    background: #e2e3e5;
    color: #6c757d;
}

.btn-primary {
    background: #ffffff;
    color: #2b5876;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.8);
}

.btn-secondary {
    background: rgba(255,255,255,0.16);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.22);
}

.btn-primary:hover,
.btn-secondary:hover {
    opacity: 0.96;
}

@media (max-width: 900px) {
    .tms-portal-hero {
        grid-template-columns: 1fr;
    }

    .tms-kpi-row {
        grid-template-columns: 1fr;
    }
}


/* --- QUIZ UI CLEANUP --- */

.tms-quiz-box {
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.tms-question {
    margin-bottom: 18px;
}

.tms-question-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #223553;
}

.tms-answer {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tms-answer:hover {
    background: #f5f8fb;
}

/* Feedback */
.tms-answer-feedback {
    margin: 6px 0 10px 0;
    font-weight: bold;
}

.tms-answer-feedback.correct {
    color: #1e7e34;
}

.tms-answer-feedback.wrong {
    color: #c0392b;
}

/* Erklärung */
.tms-answer-explanation {
    margin: 8px 0 12px 0;
    padding: 10px 12px;
    border-left: 4px solid #4a6fa5;
    background: #f4f7fb;
    border-radius: 6px;
}

/* Submit Button */
.tms-quiz-submit {
    margin-top: 20px;
}


/* =========================
   PUBLIC COURSE CATALOG
   ========================= */

.tms-catalog {
    max-width: 1220px;
    margin: 24px auto;
    padding: 0 20px 32px 20px;
}

.tms-catalog-hero {
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
    padding: 30px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f7a94b 0%, #ff7b72 45%, #6a82fb 100%);
    color: #fff;
    box-shadow: 0 14px 30px rgba(70, 46, 92, 0.16);
}

.tms-catalog-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tms-catalog-hero h1 {
    margin: 0 0 12px 0;
    font-size: 36px;
    line-height: 1.15;
}

.tms-catalog-hero p {
    margin: 0 0 18px 0;
    color: #fff;
    font-size: 17px;
    line-height: 1.6;
    opacity: 0.96;
}

.tms-catalog-search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tms-catalog-search__input {
    min-width: 280px;
    flex: 1 1 280px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.95);
    color: #223553;
}

.tms-catalog-search__button {
    padding: 11px 16px;
    border: 0;
    border-radius: 10px;
    background: #223553;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.tms-catalog-hero__meta {
    display: grid;
    gap: 12px;
}

.tms-catalog-stat {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 14px 16px;
    backdrop-filter: blur(6px);
}

.tms-catalog-stat__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-bottom: 4px;
}

.tms-catalog-stat__value {
    font-size: 22px;
    font-weight: 800;
}

.tms-catalog-section {
    margin-bottom: 24px;
}

.tms-catalog-section__head h2 {
    margin: 0 0 6px 0;
    font-size: 28px;
    color: #243754;
}

.tms-catalog-section__head p {
    margin: 0 0 16px 0;
    color: #5f6c82;
    line-height: 1.5;
}

.tms-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.tms-catalog-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e4e9f1;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(35, 52, 84, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tms-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 26px rgba(35, 52, 84, 0.12);
}

.tms-catalog-card__top {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tms-catalog-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.tms-catalog-badge--public {
    background: #fff3cd;
    color: #8a5a00;
}

.tms-catalog-badge--category {
    background: #eef2ff;
    color: #3346a8;
}

.tms-catalog-card__title {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #223553;
}

.tms-catalog-card__desc {
    margin: 0 0 14px 0;
    color: #5f6c82;
    line-height: 1.55;
    min-height: 72px;
}

.tms-catalog-card__meta {
    color: #44556f;
    line-height: 1.5;
    margin-bottom: 14px;
    font-size: 14px;
}

.tms-catalog-card__footer {
    color: #2b5876;
    font-weight: 700;
}

.tms-catalog-empty {
    background: #fff;
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    padding: 20px;
    color: #5f6c82;
}

.tms-catalog-cta {
    background: #fff7e8;
    border: 1px solid #f0ddb0;
    border-radius: 16px;
    padding: 22px;
}

.tms-catalog-cta h2 {
    margin: 0 0 8px 0;
    color: #6f5112;
}

.tms-catalog-cta p {
    margin: 0 0 14px 0;
    color: #7c6225;
}

.tms-catalog-cta__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .tms-catalog-hero {
    overflow: hidden;
        grid-template-columns: 1fr;
    }
}


/* =========================
   PUBLIC COURSE DETAIL
   ========================= */

.tms-course-public-card {
    background: #fff;
    border: 1px solid #e4e9f1;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(35, 52, 84, 0.06);
}

.tms-course-public-prose {
    color: #33445d;
    line-height: 1.6;
}

.tms-course-public-meta {
    margin-top: 16px;
    display: grid;
    gap: 10px;
    color: #44556f;
}

.tms-course-public-dates {
    display: grid;
    gap: 12px;
}

.tms-course-public-date {
    border: 1px solid #e8edf5;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fafcff;
}

.tms-course-public-date__main {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    color: #223553;
}

.tms-course-public-date__meta {
    display: grid;
    gap: 4px;
    color: #55657d;
    font-size: 14px;
}


/* =========================
   PUBLIC COURSE DETAIL V2
   ========================= */

.tms-course-hero {
    padding: 40px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 14px 30px rgba(20, 28, 45, 0.18);
}

.tms-course-hero h1 {
    margin: 0 0 10px 0;
    font-size: 36px;
    line-height: 1.15;
}

.tms-course-hero__subtitle {
    margin: 0 0 14px 0;
    opacity: 0.92;
    font-size: 18px;
    line-height: 1.55;
    max-width: 820px;
}

.tms-course-hero__meta {
    margin: 15px 0 18px 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    opacity: 0.96;
}

.tms-course-section {
    margin: 30px 0;
}

.tms-course-card {
    background: #fff;
    border: 1px solid #e4e9f1;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(35, 52, 84, 0.06);
}

.tms-course-prose {
    color: #33445d;
    line-height: 1.65;
}

.tms-course-meta {
    margin-top: 16px;
    display: grid;
    gap: 10px;
    color: #44556f;
}

.tms-course-dates {
    display: grid;
    gap: 12px;
}

.tms-course-date {
    border: 1px solid #e8edf5;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fafcff;
}

.tms-course-date__main {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    color: #223553;
}

.tms-course-date__meta {
    display: grid;
    gap: 4px;
    color: #55657d;
    font-size: 14px;
}

.tms-course-cta-bottom .btn-primary {
    font-size: 18px;
    padding: 14px 24px;
}

/* FIX: bessere Lesbarkeit im Hero */
.tms-course-hero__subtitle {
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.tms-course-hero__content p {
    color: rgba(255,255,255,0.9);
}

/* HERO V2 */

.tms-course-hero {
    position: relative;
    overflow: hidden;
}

.tms-course-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 40%);
    pointer-events: none;
}

.tms-course-hero__content {
    position: relative;
    z-index: 2;
}

.tms-course-hero__meta span {
    background: rgba(255,255,255,0.12);
    padding: 6px 10px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

/* CTA stärker */
.tms-course-hero .btn-primary {
    font-size: 18px;
    padding: 14px 22px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* =========================
   HERO IMPROVEMENTS (V2)
   ========================= */

/* Preis hervorheben */
.tms-course-hero__meta span:first-child {
    font-weight: 700;
    font-size: 18px;
}

/* optional noch stärker */
.tms-course-hero__meta span:first-child {
    background: rgba(255,255,255,0.18);
    padding: 6px 12px;
    border-radius: 999px;
}

/* CTA stärker */
.tms-course-hero .btn-primary {
    font-size: 18px;
    padding: 14px 22px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    transition: all 0.2s ease;
}

/* Hover Effekt */
.tms-course-hero .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

/* Secondary Button dezenter */
.tms-course-hero .btn-secondary {
    opacity: 0.9;
}

/* =========================
   STICKY CTA BAR
   ========================= */

.tms-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #ffffff;
    border-top: 1px solid #e4e9f1;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* Inhalt */
.tms-sticky-cta__info {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.tms-sticky-cta__price {
    font-weight: 700;
    font-size: 16px;
    color: #1e293b;
}

/* Button */
.tms-sticky-cta .btn-primary {
    padding: 10px 16px;
    font-size: 15px;
    white-space: nowrap;
}

/* Abstand unten, damit nichts überlappt */
body {
    padding-bottom: 70px;
}
/* =========================
   TRUST LAYER
   ========================= */

.tms-trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.tms-trust-card {
    background: #fff;
    border: 1px solid #e4e9f1;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.06);
    transition: all 0.2s ease;
}

.tms-trust-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(30, 41, 59, 0.12);
}

.tms-trust-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.tms-trust-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: #1e293b;
}

.tms-trust-text {
    font-size: 14px;
    color: #55657d;
}


/* =========================
   COURSE IMAGES
   ========================= */

.tms-catalog-card__image-wrap {
    margin: -18px -18px 14px -18px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background: #eef2f7;
}

.tms-catalog-card__image {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.tms-course-hero {
    display: grid;
    grid-template-columns: minmax(260px, 420px) 1fr;
    gap: 24px;
    align-items: stretch;
}

.tms-course-hero__media {
    position: relative;
    z-index: 2;
    border-radius: 14px;
    overflow: hidden;
    min-height: 280px;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 12px 26px rgba(0,0,0,0.18);
}

.tms-course-hero__image {
    width: 100%;
    height: 100%;
    min-height: 280px;
    display: block;
    object-fit: cover;
}

@media (max-width: 900px) {
    .tms-course-hero {
        grid-template-columns: 1fr;
    }

    .tms-course-hero__media,
    .tms-course-hero__image {
        min-height: 220px;
    }
}

.tms-course-nav {
    display: flex;
    gap: 16px;
    margin: 16px 0 24px;
    flex-wrap: wrap;
}

.tms-course-nav a {
    padding: 8px 12px;
    background: #f5f7fa;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    color: #333;
}

.tms-course-nav a:hover {
    background: #e3f2fd;
}

.tms-course-dates {
    display: grid;
    gap: 16px;
}

.tms-date-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    align-items: center;
}

.tms-date-card__main {
    flex: 1;
    min-width: 0;
}

.tms-date-card__date {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.tms-date-card__meta {
    display: grid;
    gap: 6px;
    color: #4b5563;
    font-size: 0.95rem;
}

.tms-date-card__side {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .tms-date-card {
        flex-direction: column;
        align-items: stretch;
    }

    .tms-date-card__side {
        width: 100%;
    }

    .tms-date-card__side .btn-primary {
        display: inline-flex;
        justify-content: center;
        width: 100%;
    }
}

.tms-info-btn {
    margin-left: 6px;
    border: none;
    background: #eef2ff;
    color: #1e3a8a;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
}
.tms-info-btn:hover {
    background: #dbeafe;
}

.tms-backlink {
    display:inline-block;
    padding:8px 12px;
    border-radius:10px;
    background:#f1f5f9;
    color:#1e293b;
    text-decoration:none;
    font-weight:600;
}
.tms-backlink:hover {
    background:#e2e8f0;
}
/* TMS course public: backlink */
.tms-course-topnav {
  margin: 0 0 18px 0;
}

.tms-course-backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.tms-course-backlink:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #111827;
  text-decoration: none;
}

.tms-course-backlink:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.tms-course-backlink__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

/* TMS coursespublic: status badge */
.tms-catalog-badge--status {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
}

.tms-login-hint {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-weight: 500;
}
.tms-date-card {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
}

.tms-date-card__main {
    flex: 1 1 auto;
    min-width: 0;
}

.tms-date-card__side {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.tms-date-card__side form {
    margin: 0;
}

.tms-date-card__side .btn-primary {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .tms-date-card {
        flex-direction: column;
    }

    .tms-date-card__side {
        justify-content: flex-start;
        margin-left: 0;
    }
}

.tms-catalog-hero__meta img {
    display: none;
}
