/* 
   ULTRA-HIGH-END DESIGN - RESPONSIVE MASTER VERSION 4.0
   Stil: Luxus-Minimalismus / Sidebar Navigation / Modern Search / Fully Responsive
*/

:root {
    --primary: #0071e3;
    --primary-hover: #005bb5;
    --bg-light: #fbfbfd;
    --white: #ffffff;
    --text: #1d1d1f;
    --text-muted: #86868b;
    --border: rgba(0,0,0,0.08);
    --radius: 24px;
    --radius-pill: 980px;
    --container: 1200px;
    --shadow: 0 20px 60px rgba(0,0,0,0.05);
    --glass: rgba(255, 255, 255, 0.85);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html {
    scroll-behavior: smooth;
}

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text); 
    background: var(--bg-light); 
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

.container { 
    max-width: var(--container); 
    margin: 0 auto; 
    padding: 0 1.5rem; 
    width: 100%;
}

/* --- HEADER --- */
.site-header { 
    background: var(--glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border); 
    padding: 0.8rem 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 4px 30px rgba(0,0,0,0.02);
    width: 100%;
}

.site-header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 10px;
}

.header-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-center { flex-grow: 1; display: flex; justify-content: center; max-width: 500px; }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* --- LOGO --- */
.logo a { 
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo img { height: 28px; width: auto; }
.logo span {
    font-size: 1.2rem; 
    font-weight: 900; 
    color: var(--text); 
    letter-spacing: -1px;
}

/* --- HAMBURGER BUTTON --- */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover span { background-color: var(--primary); }

/* --- SEARCH BAR --- */
.search-bar { width: 100%; position: relative; }
.search-bar form { display: flex; align-items: center; width: 100%; }
.search-bar input {
    width: 100%;
    padding: 8px 15px;
    padding-right: 35px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.04);
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.search-bar button {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

/* --- SIDEBAR --- */
.sidebar {
    position: fixed;
    top: 0;
    left: -350px;
    width: 320px;
    height: 100vh;
    background: var(--white);
    z-index: 2000;
    box-shadow: 20px 0 60px rgba(0,0,0,0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
}

.sidebar.open { left: 0; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sidebar-content::-webkit-scrollbar { width: 4px; }
.sidebar-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.sidebar-nav { list-style: none; margin-bottom: 30px; }
.sidebar-nav li { margin-bottom: 5px; }
.sidebar-nav a {
    display: block;
    text-decoration: none;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 10px 15px;
    border-radius: 14px;
    transition: all 0.3s ease;
    letter-spacing: -0.3px;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(0, 113, 227, 0.08);
    color: var(--primary);
    transform: translateX(5px);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* --- OVERLAY --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.overlay.visible { opacity: 1; visibility: visible; }

/* --- BUTTONS --- */
.btn { 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    padding: 12px 28px; 
    border-radius: var(--radius-pill); 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 15px; 
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); 
    border: none;
    cursor: pointer;
    gap: 8px;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.btn-primary { 
    background: var(--primary); 
    color: var(--white) !important; 
    box-shadow: 0 8px 25px rgba(0, 113, 227, 0.15); 
}

.btn-primary:hover { 
    background: var(--primary-hover); 
    transform: translateY(-2px);
}

.btn-outline { 
    background: var(--white); 
    color: var(--text) !important; 
    border: 1px solid var(--border); 
}

.btn-outline:hover { 
    background: var(--white); 
    border-color: var(--text);
}

/* --- HERO --- */
.hero { padding: 6rem 0 3rem; text-align: center; }
.hero h1 { 
    font-size: clamp(1.8rem, 7vw, 4.5rem); 
    font-weight: 900; 
    color: var(--text); 
    margin-bottom: 1.2rem; 
    letter-spacing: -1.5px; 
    line-height: 1.1;
}
.hero p { font-size: clamp(0.95rem, 2.2vw, 1.3rem); color: var(--text-muted); max-width: 650px; margin: 0 auto 2.5rem; font-weight: 500; }

/* --- CARDS & GRID --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card { 
    padding: clamp(1.2rem, 3.5vw, 3.5rem); 
    border-radius: 28px; 
    background: var(--white); 
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.01);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card h2 {
    font-size: clamp(1.4rem, 4.5vw, 2.2rem);
    word-wrap: break-word;
    margin-bottom: 1.2rem;
}

.card p {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card:hover { transform: translateY(-8px); }

/* --- ADMIN CARDS (For Mobile) --- */
.admin-user-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.admin-user-card .user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--bg-light);
    padding-bottom: 0.8rem;
}

.admin-user-card .user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 1rem;
}

/* --- FORMS --- */
.form-group { margin-bottom: 1.2rem; text-align: left; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fbfbfd;
    font-family: inherit;
    font-size: 0.95rem;
}

/* --- FOOTER --- */
.site-footer { background: var(--white); padding: 4rem 0 2rem; border-top: 1px solid var(--border); margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; }
.footer-col h4 { font-size: 1rem; font-weight: 800; margin-bottom: 1.2rem; }
.footer-col p { color: var(--text-muted); font-size: 0.9rem; }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }

/* --- RESPONSIVE ADJUSTMENTS --- */

/* Tablet (max 1024px) */
@media (max-width: 1024px) {
    .header-center { max-width: 300px; }
}

/* Mobile Large (max 850px) */
@media (max-width: 850px) {
    .header-center { max-width: 250px; }
    .grid { grid-template-columns: 1fr; }
    .admin-table-container { display: none; } /* Verstecke Tabelle auf Mobile */
    .admin-cards-container { display: block; } /* Zeige Karten auf Mobile */
}

/* Desktop Default */
.admin-cards-container { display: none; }

/* Mobile Small (max 480px) */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .site-header { padding: 0.5rem 0; }
    .logo span { font-size: 1rem; }
    .logo img { height: 22px; }
    .hero { padding: 4rem 0 2rem; }
    .card { padding: 1.2rem 1rem; border-radius: 22px; }
    .btn { padding: 10px 18px; font-size: 13px; }
    .sidebar { width: 260px; padding: 25px 15px; }
    
    .header-center { 
        display: flex !important; 
        max-width: 120px; 
        margin: 0 5px;
    }
    .search-bar input { padding: 6px 10px; padding-right: 25px; font-size: 0.75rem; }
    .search-bar button { right: 5px; font-size: 0.7rem; }
    
    .header-right .login-btn-header { 
        display: inline-flex !important; 
        padding: 6px 12px; 
        font-size: 12px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
