:root {
    --bg: #f4f5f7;
    --card: #ffffff;
    --text: #1a1a2e;
    --muted: #6b7280;
    --accent: #c9a84c;
    --accent-dark: #a88a38;
    --navy: #1e3a5f;
    --blue: #2b5db5;
    --green: #38a169;
    --border: #e5e7eb;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: #c4c7cc; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* Page header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.header h1 { margin: 0; font-size: 26px; font-weight: 700; }

/* Section header with button */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 36px 0 18px;
}
.section-head h2 { margin: 0; font-size: 22px; font-weight: 700; }

/* Card */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Category section */
.category-section { margin-bottom: 40px; }
.category-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* Course/Module card */
.course-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.course-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.course-card-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    background: #e5e7eb;
}
.course-card-img-placeholder {
    width: 100%;
    height: 280px;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #c5cdd6;
}
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-btn-circle {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.play-btn-circle::after {
    content: "";
    display: block;
    width: 0; height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 14px solid var(--accent);
    margin-left: 3px;
}
.course-card-body { padding: 10px 14px 14px; }
.course-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.4;
    text-align: center;
    margin-bottom: 5px;
}
.course-card-meta {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Ribbon */
.ribbon-wrap { position: relative; overflow: hidden; }
.ribbon {
    position: absolute;
    top: 34px; right: -52px;
    width: 220px;
    background: #f97316; color: #fff;
    font-size: 16px; font-weight: 800;
    text-align: center; padding: 12px 0;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 5;
}

/* Course hero header */
.course-hero {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 12px;
}
.course-hero img {
    width: 100%;
    border-radius: 10px;
    aspect-ratio: 4/3;
    object-fit: cover;
}
.course-hero-placeholder {
    width: 100%;
    border-radius: 10px;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #d4c28a 0%, #c9a84c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
}
.course-hero h1 { margin: 0 0 10px; font-size: 22px; line-height: 1.3; }
.course-hero p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.course-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 700px) { .course-hero { grid-template-columns: 1fr; } }

.module-section-title {
    font-size: 17px;
    font-weight: 700;
    margin: 28px 0 14px;
    color: var(--text);
}

/* Lesson page layout */
.lesson-layout {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 22px;
    align-items: start;
}
@media (max-width: 900px) { .lesson-layout { grid-template-columns: 1fr; } }

/* Custom video player */
.video-player-wrap {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-player-wrap video {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: 0;
}
.video-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.82) 100%);
    padding: 32px 14px 8px;
    opacity: 0;
    transition: opacity 0.22s;
    pointer-events: none;
}
.video-controls * { pointer-events: auto; }
/* Always visible when paused */
.video-player-wrap.paused .video-controls { opacity: 1; }
/* Visible on hover when playing */
.video-player-wrap:hover .video-controls,
.video-player-wrap:focus-within .video-controls { opacity: 1; }
/* Progress bar */
.video-progress-wrap {
    padding: 10px 0 6px;
    cursor: pointer;
}
.video-progress-wrap:hover .video-progress-bg,
.video-progress-wrap.dragging .video-progress-bg { height: 6px; }
.video-progress-bg {
    position: relative;
    height: 3px;
    background: rgba(255,255,255,0.22);
    border-radius: 4px;
    transition: height 0.15s;
}
.video-progress-watched {
    position: absolute;
    top: 0; left: 0; height: 100%;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: width 0.1s linear;
}
.video-progress-fill {
    position: absolute;
    top: 0; left: 0; height: 100%;
    background: var(--gold, #c9a84c);
    border-radius: 4px;
    transition: width 0.1s linear;
}
.video-controls-row {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 36px;
}
.vbtn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 5px;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.vbtn:hover { color: #fff; background: rgba(255,255,255,0.14); }
.video-time {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
/* Volume */
.video-vol-wrap { display: flex; align-items: center; gap: 2px; }
.vbtn-icon { display: flex; align-items: center; justify-content: center; padding: 4px 5px; }
.vbtn-icon svg { display: block; }
.video-vol-track {
    position: relative;
    width: 72px;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.video-vol-track::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.28);
    border-radius: 3px;
    transition: height 0.15s;
}
.video-vol-wrap:hover .video-vol-track::before { height: 5px; }
.video-vol-fill {
    position: absolute;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255,255,255,0.9);
    border-radius: 3px;
    pointer-events: none;
    transition: height 0.15s;
}
.video-vol-wrap:hover .video-vol-fill { height: 5px; }
.video-vol-thumb {
    position: absolute;
    width: 13px; height: 13px;
    background: #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    left: 100%;
}
/* Settings dropdown */
.vsettings-wrap { position: relative; }
.vsettings-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(20,20,20,0.96);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    min-width: 210px;
    z-index: 99;
    backdrop-filter: blur(6px);
    overflow: hidden;
}
.vsettings-menu.open { display: block; }
/* Main summary rows */
.vsettings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: #fff;
    font-size: 13px;
    padding: 11px 16px;
    cursor: pointer;
    gap: 20px;
    box-sizing: border-box;
}
.vsettings-row:last-child { border-bottom: none; }
.vsettings-row:hover { background: rgba(255,255,255,0.08); }
.vsettings-row-lbl { white-space: nowrap; }
.vsettings-row-val {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    white-space: nowrap;
}
.vsettings-row-val::after { content: "\25B6"; font-size: 7px; opacity: 0.6; }
/* Submenu back button */
.vsettings-back {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.65);
    font-size: 15px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    box-sizing: border-box;
}
.vsettings-back:hover { color: #fff; }
/* Submenu options */
.vsettings-sub-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    padding: 10px 16px;
    cursor: pointer;
    box-sizing: border-box;
}
.vsettings-sub-opt:last-child { border-bottom: none; }
.vsettings-sub-opt:hover { background: rgba(255,255,255,0.08); color: #fff; }
.vsettings-sub-opt.active { color: var(--gold, #c9a84c); font-weight: 600; }
.vsettings-sub-opt.active::after { content: "\2713"; }
/* Skip indicator (double-click) */
.vskip-indicator {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    pointer-events: none;
    opacity: 0;
}
.vskip-indicator.vskip-right { left: auto; right: 0; }
.vskip-indicator svg { width: 36px; height: 36px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
.vskip-indicator span { font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.vskip-ripple {
    position: absolute;
    inset: 0;
    border-radius: 0 100% 100% 0;
    background: rgba(255,255,255,0.12);
    transform: scale(0);
}
.vskip-indicator.vskip-right .vskip-ripple { border-radius: 100% 0 0 100%; }
@keyframes vskip-fade {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes vskip-ripple {
    0%   { transform: scale(0.3); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 0; }
}
.vskip-indicator.vskip-active { animation: vskip-fade 0.7s ease forwards; }
.vskip-indicator.vskip-active .vskip-ripple { animation: vskip-ripple 0.6s ease-out forwards; }

/* Remove old speed-button styles */
.video-speed-wrap { display: none; }
.vbtn-speed { display: none; }

video {
    width: 100%;
    border-radius: 12px;
    background: #000;
    display: block;
}

.lesson-sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.sidebar-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.progress-bar-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 14px;
}
.progress-bar-fill {
    height: 100%;
    background: var(--green);
    border-radius: 99px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    background: #e5e7eb;
    color: var(--text);
    transition: background 0.15s;
    white-space: nowrap;
}
.btn:hover { background: #d1d5db; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #162e4a; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; }

/* Forms */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
input, textarea, select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    background: #fff;
    margin-bottom: 14px;
    outline: none;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
textarea { min-height: 100px; resize: vertical; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .card h3 { margin: 0 0 16px; font-size: 17px; font-weight: 700; }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
}
.table th {
    padding: 10px 14px;
    border-bottom: 2px solid var(--border);
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    background: #fafafa;
    vertical-align: top;
}
.table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafafa; }
.table .filter-input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 6px;
    margin-bottom: 0;
    background: #fff;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: var(--muted);
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }

/* Stat circles */
.stat-circles {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 18px 0 28px;
}
.stat-circle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 90px;
}
.stat-circle {
    width: 88px; height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}
.stat-circle-label {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}
.circle-red    { background: #e57373; }
.circle-orange { background: #f4a261; }
.circle-yellow { background: #f0c040; color: #333; }
.circle-olive  { background: #a8b336; }
.circle-green  { background: #4caf50; }
.circle-gray   { background: #c0c0c0; color: #555; }

/* Statistics: module groups */
.stat-module-group {
    margin-bottom: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.stat-module-head {
    background: #f9fafb;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.stat-lesson-row {
    display: grid;
    grid-template-columns: 1fr 160px 44px 90px;
    gap: 10px;
    padding: 9px 18px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    font-size: 13px;
}
.stat-lesson-row:last-child { border-bottom: none; }
.stat-lesson-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    overflow: hidden;
}
.stat-lesson-name span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prog-bar-bg {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
}
.prog-bar-fg {
    height: 100%;
    border-radius: 99px;
    background: var(--green);
    min-width: 2px;
}
.prog-bar-fg.orange { background: #f4a261; }
.prog-bar-fg.red    { background: #e57373; }
.prog-pct { font-size: 12px; font-weight: 700; text-align: right; }
.prog-members { font-size: 12px; color: var(--muted); }

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}
.tab-btn {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--muted);
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }

/* Member zugänge table */
.access-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.access-table th {
    padding: 8px 12px;
    border-bottom: 2px solid var(--border);
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    background: #fafafa;
}
.access-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.access-table tr:last-child td { border-bottom: none; }

@media (max-width: 600px) {
    .page { padding: 16px; }
    .stat-circles { gap: 8px; }
    .stat-circle { width: 70px; height: 70px; font-size: 15px; }
    .stat-lesson-row { grid-template-columns: 1fr 110px 36px; }
    .prog-members { display: none; }
}

/* ========================
   Hero Section (Homepage)
   ======================== */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    padding: 60px 32px;
    text-align: center;
    background: linear-gradient(135deg, var(--navy) 0%, #2d5488 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-content { max-width: 640px; }
.hero-content h1 {
    font-size: 38px; font-weight: 800; color: #fff;
    margin: 0 0 16px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
    line-height: 1.2;
}
.hero-content p {
    font-size: 17px; color: rgba(255,255,255,0.9);
    margin: 0 0 28px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}
.hero-cta {
    display: inline-block;
    background: var(--accent); color: var(--navy);
    font-weight: 700; padding: 14px 36px;
    border-radius: 100px; text-decoration: none;
    font-size: 16px;
    box-shadow: 0 4px 18px rgba(201,168,76,0.4);
    transition: transform 0.15s;
}
.hero-cta:hover { transform: translateY(-2px); }
/* ========================
   Trainer Profile Card
   ======================== */
.trainer-card {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px 28px;
    margin-bottom: 24px;
    position: relative;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
}
.trainer-card-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--border);
}
.trainer-card-photo-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px dashed var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}
.trainer-card-body { flex: 1; min-width: 0; }
.trainer-card-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
    line-height: 1.3;
}
.trainer-card-bio {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 14px;
}
.trainer-social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.trainer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.15s;
}
.trainer-social-btn:hover { opacity: 0.8; }
.tsb-web      { background: #6b7280; color: #fff; }
.tsb-email    { background: #64748b; color: #fff; }
.tsb-facebook { background: #1877f2; color: #fff; }
.tsb-instagram{ background: #e1306c; color: #fff; }
.tsb-whatsapp { background: #25d366; color: #fff; }
/* ========================
   Site Footer
   ======================== */
.site-footer {
    margin-top: 60px;
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.site-footer a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.site-footer a:hover { color: var(--text); }
.footer-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    text-decoration: none !important;
    transition: color 0.15s, border-color 0.15s;
}
.footer-edit-btn:hover { color: var(--text) !important; border-color: #aaa; }
.site-footer-sep { color: var(--border); }

/* standalone (guest) topbar */
.public-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px; height: 56px;
    background: #fff; border-bottom: 1px solid var(--border);
}
.public-topbar-logo {
    font-weight: 800; font-size: 15px; color: var(--navy); text-decoration: none;
}
.public-topbar-logo span {
    background: var(--navy); color: #fff;
    padding: 4px 8px; border-radius: 6px;
    margin-right: 8px; font-size: 12px;
}

/* ========================
   Topbar Layout (Admin + Member)
   ======================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 24px;
    max-width: 1400px;
    margin: 0 auto;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 0;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}
.topbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 14px;
}
.topbar-logo-mark {
    background: var(--navy);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 5px 9px;
    border-radius: 6px;
    line-height: 1;
}
.topbar-logo-img {
    height: 32px;
    width: auto;
    display: block;
}
.topbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 14px;
    flex-shrink: 0;
}
.topbar-overview-wrap {
    position: relative;
}
.topbar-overview-link {
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    opacity: 0.65;
    transition: opacity 0.13s;
    padding: 6px 0;
    display: block;
}
.topbar-overview-link:hover { opacity: 1; }

/* Übersicht hover dropdown panel */
.topbar-overview-panel {
    display: none;
    position: absolute;
    top: 100%; left: -16px;
    min-width: 300px;
    max-width: 380px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    z-index: 300;
    padding: 16px 0 8px;
    margin-top: 0;
}
/* transparent bridge so hover doesn't break between link and panel */
.topbar-overview-wrap::after {
    content: '';
    position: absolute;
    top: 100%; left: 0; right: 0;
    height: 12px;
    background: transparent;
}
.topbar-overview-wrap:hover .topbar-overview-panel { display: block; }
.topbar-ov-section { margin-bottom: 10px; }
.topbar-ov-cat {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    padding: 4px 20px 6px;
    text-transform: none;
}
.topbar-ov-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 20px;
    font-size: 13.5px;
    color: #374151;
    text-decoration: none;
    transition: background 0.1s;
    line-height: 1.35;
}
.topbar-ov-item:hover { background: var(--bg); }
.topbar-ov-badge {
    display: inline-block;
    white-space: nowrap;
    font-size: 11px;
    background: #e5e7eb;
    color: #374151;
    border-radius: 100px;
    padding: 2px 9px;
    font-weight: 500;
    flex-shrink: 0;
}
.topbar-ov-empty { padding: 12px 20px; font-size: 13px; color: var(--muted); margin: 0; }
.topbar-icon-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    border-radius: 8px;
    color: #64748b;
    transition: background 0.13s, color 0.13s;
}
.topbar-icon-btn:hover { background: var(--bg); color: var(--text); }
.topbar-menu-wrap { position: relative; }
.topbar-menu-btn {
    display: flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 13px;
    background: none; border: 1px solid var(--border); border-radius: 8px;
    font-size: 13px; font-weight: 600; color: var(--text);
    cursor: pointer; transition: background 0.13s;
}
.topbar-menu-btn:hover { background: var(--bg); }
.topbar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px); right: 0;
    width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 300;
    overflow: hidden;
}
.topbar-dropdown.open { display: block; }
.topbar-dd-head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
}
.topbar-dd-head strong {
    display: block;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
}
.topbar-dd-head-links {
    display: flex;
    gap: 10px;
    font-size: 13px;
}
.topbar-dd-head-links a {
    color: var(--accent);
    text-decoration: none;
}
.topbar-dd-head-links a:hover { text-decoration: underline; }
.topbar-dd-sep { height: 1px; background: var(--border); margin: 4px 0; }
.topbar-dd-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13.5px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.1s;
}
.topbar-dd-link:hover { background: var(--bg); }
.topbar-dd-link--active { font-weight: 600; color: var(--accent); }
.topbar-dd-link svg { flex-shrink: 0; opacity: 0.6; }
.topbar-dd-link--active svg { opacity: 1; }
.topbar-search-bar {
    display: none;
    border-top: 1px solid var(--border);
    padding: 10px 24px;
    background: #fff;
}
.topbar-search-bar.visible { display: block; }
.topbar-search-bar input {
    width: 100%;
    max-width: 480px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: var(--bg);
}
.topbar-search-bar input:focus { border-color: var(--accent); background: #fff; }
.topbar-content {
    min-height: calc(100vh - 52px);
    background: var(--bg);
}

/* Legacy admin-main compat */
.admin-shell { display: block; }
.admin-main  { background: var(--bg); }

/* Dashboard stat cards */
.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.admin-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.15s, transform 0.15s;
}
.admin-stat-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.08); transform: translateY(-2px); }
.admin-stat-card .stat-val { font-size: 34px; font-weight: 700; color: var(--text); line-height: 1; }
.admin-stat-card .stat-lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }
.admin-stat-card .stat-icon { font-size: 22px; margin-bottom: 8px; opacity: 0.8; }

/* ========================
   Admin Card Grid Overlay Buttons
   ======================== */
.admin-course-card .course-card-title { color: var(--accent); }
.admin-card-actions {
    position: absolute;
    top: 8px; right: 8px;
    display: flex;
    gap: 4px;
    z-index: 10;
}
.admin-course-card { cursor: grab; }
.admin-course-card:active { cursor: grabbing; }
.admin-course-card.sortable-drag { opacity: 0.5; cursor: grabbing; }
.admin-course-card.sortable-ghost { opacity: 0.3; border: 2px dashed var(--accent); }
.admin-course-card .admin-card-actions { cursor: default; }
.admin-course-card a, .admin-course-card button { cursor: pointer; }
/* Kategorie-Drag */
.category-section.sortable-ghost { opacity: 0.4; outline: 2px dashed var(--accent); border-radius: 8px; }
/* Table drag & drop */
.drag-handle {
    width: 32px;
    text-align: center;
    cursor: grab;
    color: var(--muted);
    font-size: 16px;
    user-select: none;
}
.drag-handle:active { cursor: grabbing; }
tr.sortable-ghost td { background: #f0f9ff; opacity: 0.6; }
.admin-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    color: #64748b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    transition: background 0.12s, color 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.admin-card-btn:hover { background: #f8fafc; color: var(--navy); border-color: #cbd5e1; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.admin-card-btn-danger:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* ========================
   Multi-Tab Editor (course_edit / lesson_edit)
   ======================== */
.editor-header {
    padding: 24px 32px 0;
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.editor-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
}
.editor-title svg, .editor-title .editor-icon {
    color: var(--muted);
    font-size: 20px;
}
.editor-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 16px;
}
.editor-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.editor-tabs::-webkit-scrollbar { display: none; }
.editor-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    user-select: none;
    text-decoration: none;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.editor-tab:hover { color: var(--text); }
.editor-tab.active {
    color: var(--text);
    border-bottom-color: var(--text);
    font-weight: 600;
}
.editor-tab .tab-icon { opacity: 0.6; font-size: 12px; }
.editor-tab.active .tab-icon { opacity: 1; }
.editor-tab-spacer { flex: 1; }
.editor-tab-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.12s, color 0.12s;
    text-decoration: none;
    margin-bottom: 2px;
}
.editor-tab-action:hover { background: var(--bg); color: var(--text); }

/* Tab panels */
.editor-body {
    padding: 28px 32px;
    min-height: 320px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Warning banner */
.editor-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 20px;
}
.editor-warning svg, .editor-warning .warn-icon { color: #d97706; flex-shrink: 0; }

/* Editor form fields */
.editor-field { margin-bottom: 20px; }
.editor-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.editor-field input[type="text"],
.editor-field input[type="number"],
.editor-field input[type="date"],
.editor-field input[type="url"],
.editor-field textarea,
.editor-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s;
}
.editor-field input:focus,
.editor-field textarea:focus,
.editor-field select:focus {
    outline: none;
    border-color: var(--accent);
}
.editor-field textarea { min-height: 120px; resize: vertical; }
.editor-field .field-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 5px;
}
.editor-field-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Cover image preview */
.cover-preview {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
}
.cover-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.cover-preview-placeholder {
    width: 100px;
    height: 100px;
    background: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 28px;
    border: 1px solid var(--border);
}
.cover-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }

/* Accordion */
.editor-accordion {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}
.editor-accordion-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    background: #fff;
    user-select: none;
}
.editor-accordion-head:hover { background: var(--bg); }
.editor-accordion-head .acc-arrow { font-size: 11px; color: var(--muted); transition: transform 0.2s; }
.editor-accordion.open .acc-arrow { transform: rotate(90deg); }
.editor-accordion-body { display: none; padding: 16px; border-top: 1px solid var(--border); }
.editor-accordion.open .editor-accordion-body { display: block; }

/* Instructor card */
.instructor-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 32px;
    position: relative;
}
.instructor-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--muted);
    overflow: hidden;
}
.instructor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.instructor-info h3 { font-size: 16px; font-weight: 700; color: #c9822a; margin: 0 0 6px; }
.instructor-info p { font-size: 13px; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.instructor-social { display: flex; gap: 8px; }
.instructor-social a {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: #fff; text-decoration: none;
}
.instructor-social .soc-web { background: #718096; }
.instructor-social .soc-email { background: #718096; }
.instructor-social .soc-fb { background: #1877f2; }
.instructor-social .soc-ig { background: #e1306c; }
.instructor-social .soc-wa { background: #25d366; }
.instructor-card-gear {
    position: absolute; top: 14px; right: 16px;
    color: var(--muted); font-size: 15px; cursor: pointer;
    text-decoration: none;
}
.instructor-card-gear:hover { color: var(--text); }

/* Save action bar */
.editor-save-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.btn-save {
    padding: 9px 22px;
    background: #e2e8f0;
    color: var(--text);
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-save:hover { background: #cbd5e0; }
.btn-publish {
    padding: 9px 22px;
    background: #e2e8f0;
    color: var(--text);
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-publish:hover { background: #cbd5e0; }
.badge-unpublished {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 100px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
}

/* Access sources table */
.access-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.access-table th {
    text-align: left;
    padding: 8px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.access-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.access-table tr:last-child td { border-bottom: none; }

/* Drip table */
.drip-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.drip-table th {
    padding: 8px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
    text-align: left;
}
.drip-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.drip-table .drip-module td { background: #f8f9fb; font-weight: 600; }
.drip-table input[type="date"], .drip-table input[type="number"] {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12.5px;
    width: 140px;
}

/* Section header within tab */
.editor-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* Info box */
.editor-info {
    background: #f0f4ff;
    border: 1px solid #bfcfe8;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #3b5a8a;
    margin-bottom: 16px;
    line-height: 1.5;
}
.editor-info a { color: #2563eb; }

/* Toggle checkbox style */
.toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 14px;
}
.toggle-row input[type="checkbox"] {
    width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; cursor: pointer;
    accent-color: var(--navy);
}
.toggle-row label { font-size: 14px; font-weight: 500; cursor: pointer; margin: 0; }
.toggle-row .toggle-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* Sub-tabs (nested, for Zeitliche Steuerung) */
.sub-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.sub-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    user-select: none;
    transition: color 0.12s;
}
.sub-tab:hover { color: var(--text); }
.sub-tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.sub-panel { display: none; }
.sub-panel.active { display: block; }

/* Upload button style */
.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #e2e8f0;
    color: var(--text);
    border: none;
    border-radius: 100px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-upload:hover { background: #cbd5e0; }
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}
.btn-secondary:hover { background: var(--bg); }

/* Themenblock section */
.themenblock-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.themenblock-row select { flex: 1; }

/* Info block editor rows */
.infoblock-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--card, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}
.infoblock-fields { flex: 1; min-width: 0; }
.infoblock-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--muted, #94a3b8);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    margin-top: 2px;
}
.infoblock-remove:hover { color: #ef4444; background: #fef2f2; }

/* Editor page outer wrapper */
.editor-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 28px 48px;
}
.editor-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}