:root {
    --primary: #0056b3;
    --secondary: #6c757d;
    --bg: #f8f9fa;
    --text: #333;
    --border: #dee2e6;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Admin Sidebar */
aside .card { border-left: 5px solid var(--primary); }

/* Navbar */
.navbar { background: #fff; border-bottom: 1px solid var(--border); padding: 15px 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 1.5rem; font-weight: bold; text-decoration: none; color: var(--primary); }
.nav-links { list-style: none; display: flex; gap: 30px; align-items: center; }
.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    padding: 6px 2px;
    position: relative;
    transition: color 0.2s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.btn::after { display: none; }
.nav-links a.btn:hover { opacity: 0.9; }

main { flex: 1; padding: 40px 0; }
.footer { background: #fff; border-top: 1px solid var(--border); padding: 20px 0; text-align: center; margin-top: auto; }
.footer-links { list-style: none; display: flex; justify-content: center; gap: 15px; margin-top: 10px; }
.footer-links a { text-decoration: none; color: var(--secondary); font-size: 0.9rem; }

.btn { display: inline-block; padding: 10px 20px; border-radius: 6px; text-decoration: none; cursor: pointer; border: none; font-size: 1rem; font-weight: 600; transition: background 0.2s, opacity 0.2s, transform 0.15s; }
.btn-primary { background: var(--primary); color: #fff!important;padding: 10px !important; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #333; }

.card { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 25px; border: 1px solid rgba(0,0,0,0.05); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #444; }
.form-control { width: 100%; padding: 12px; border: 1.5px solid var(--border); border-radius: 8px; transition: border-color 0.2s; font-size: 1rem; }
.form-control:focus { outline: none; border-color: var(--primary); }
.alert { padding: 15px 20px; border-radius: 8px; margin-bottom: 25px; font-weight: 500; border-left: 5px solid transparent; }
.alert-error { background: #fee2e2; color: #991b1b; border-color: #ef4444; }
.alert-success { background: #dcfce7; color: #166534; border-color: #22c55e; }
.alert-info { background: #e0f2fe; color: #075985; border-color: #0ea5e9; }

table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 20px; }
th { padding: 15px; background: #f9fafb; border-bottom: 2px solid var(--border); text-align: left; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; color: #666; }
td { padding: 15px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background-color: #f9fafb; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; color: #fff; text-transform: uppercase; }
.badge-admin { background: var(--danger); }
.badge-user { background: var(--info); }
.badge-active { background: var(--success); }
.badge-pending { background: var(--warning); color: #333; }

/* Category Colors */
.cat-funktionale-zahnmedizin { border-left: 5px solid #dc3545; }
.cat-digitale-zahnmedizin { border-left: 5px solid #28a745; }
.cat-aesthetische-zahnmedizin { border-left: 5px solid #ffc107; }

.badge-funktionale-zahnmedizin { background: #dc3545; }
.badge-digitale-zahnmedizin { background: #28a745; }
.badge-aesthetische-zahnmedizin { background: #ffc107; color: #333; }

/* Scrollable Events */
.events-slider {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}
.events-slider .course-card {
    min-width: 300px;
    scroll-snap-align: start;
    flex: 0 0 auto;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    overflow: hidden;
    height: 400px;
    background: #000;
}
.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
}
.slide.active { opacity: 1; }
.slide-content {
    background: rgba(0,0,0,0.5);
    padding: 40px;
    border-radius: 8px;
}
.slide h1 { font-size: 3rem; margin-bottom: 20px; }

/* Global CTA (footer) */
.global-cta {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
}
.global-cta h2 { margin-bottom: 15px; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; align-items: start; }
.course-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.2s; display: flex; flex-direction: column; height: 100%; }
.course-card:hover { transform: translateY(-5px); }
.course-img { width: 100%; height: 200px; object-fit: cover; flex-shrink: 0; }
.course-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.course-body p { flex: 1; }
.course-body .btn { margin-top: auto; }
.course-meta { font-size: 0.9rem; color: var(--secondary); margin-bottom: 10px; }
.referent-list { font-size: 0.85rem; margin-top: 10px; }
.referent-img-small { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 5px; }

/* ============================================================
   Dashboard Sidebar
   ============================================================ */
.dashboard-sidebar {
    width: 240px;
    flex-shrink: 0;
}
.dashboard-sidebar-inner {
    background: var(--primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,86,179,0.2);
    position: sticky;
    top: 20px;
}
.dashboard-sidebar-title {
    padding: 20px 20px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.6);
}
.dashboard-sidebar ul {
    list-style: none;
    padding: 0 0 12px;
}
.dashboard-sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.18s, color 0.18s, padding-left 0.18s;
    border-left: 3px solid transparent;
}
.dashboard-sidebar ul li a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    padding-left: 24px;
}
.dashboard-sidebar ul li a.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-weight: 700;
    border-left-color: rgba(255,255,255,0.7);
}
.dash-icon { font-size: 1rem; opacity: 0.85; }


/* ============================================================
   Index CTA Section
   ============================================================ */
.index-cta {
    background: linear-gradient(135deg, #003d80 0%, #0056b3 60%, #1a73d4 100%);
    color: white;
    text-align: center;
    padding: 70px 20px;
}
.index-cta h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.index-cta p {
    font-size: 1.1rem;
    opacity: 0.88;
    margin-bottom: 30px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.index-cta .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.btn-outline-white {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.8);
    color: #fff;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    display: inline-block;
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}
.btn-white {
    background: #fff;
    color: var(--primary);
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline-block;
}
.btn-white:hover { opacity: 0.92; }

/* Honeypot field – visually invisible */
.hp-field { display: none !important; position: absolute; left: -9999px; visibility: hidden; }

/* ============================================================
   User Dropdown Menu (Navbar)
   ============================================================ */
.user-menu { position: relative; list-style: none; }
.user-trigger {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 5px 10px 5px 5px;
    border-radius: 50px;
    transition: background 0.18s;
    user-select: none;
}
.user-trigger:hover { background: #f0f4ff; }
.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.user-chevron { color: var(--secondary); transition: transform 0.2s; }
.user-menu:hover .user-chevron,
.user-menu.open .user-chevron { transform: rotate(180deg); }
.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    min-width: 194px;
    padding: 16px 16px;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s, visibility 0s 0.18s;
}
.user-menu:hover .user-dropdown,
.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.18s, transform 0.18s, visibility 0s;
}
.user-dropdown a {
    display: block;
    padding: 11px 20px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.93rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.user-dropdown a:hover { background: #f4f6fa; color: var(--primary); }
.user-dropdown a:hover::after { display: none; }
.user-dropdown .dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 5px 0; }
.user-dropdown .dropdown-logout { color: var(--danger) !important; }
.user-dropdown .dropdown-logout:hover { background: #fff5f5 !important; color: var(--danger) !important; }
