/* ============================================
   WERKGURU - HAUPT-STYLESHEET
   Farben: #2c3e50 (Dunkelblau) + #e67e22 (Orange)
   ============================================ */

/* RESET & BASICS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2c3e50;
    --secondary: #e67e22;
    --dark: #1a252f;
    --background: #f8f9fa;
    --text: #1a1a1a;
    --gray: #6c757d;
    --gray-light: #cbd5e1;
    --gray-lighter: #e9ecef;
    --success: #28a745;
    --warning: #ffc107;
    --error: #dc3545;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

/* LOGGED OUT - Weißer Header */
body.logged-out {
    background: #ffffff;
}

/* LOGGED IN - Layout mit Sidebar */
body.logged-in {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR (Desktop)
   ============================================ */
.sidebar {
    width: 240px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(180deg, var(--primary) 0%, var(--dark) 100%);
    border-right: 3px solid var(--secondary);
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h1 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    cursor: pointer;
    transition: all 0.5s ease;
    background: linear-gradient(90deg, #fff 0%, #fff 50%, var(--secondary) 50%, var(--secondary) 100%);
    background-size: 200% 100%;
    background-position: left;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1:hover {
    background-position: right;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    font-size: 15px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border-left-color: var(--secondary);
}

.nav-item.active {
    background: rgba(230, 126, 34, 0.2);
    color: #ffffff;
    border-left-color: var(--secondary);
}

.nav-item svg {
    flex-shrink: 0;
}

.nav-group {
    margin-bottom: 5px;
}

.nav-toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}

.nav-toggle .chevron {
    position: absolute;
    right: 20px;
    transition: transform 0.3s;
}

.nav-group.open .chevron {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.2);
}

.nav-group.open .submenu {
    max-height: 500px;
}

.submenu a {
    display: block;
    padding: 12px 20px 12px 52px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.submenu a:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    padding-left: 56px;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 20px 0;
}

.nav-section-title {
    padding: 10px 20px;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-admin {
    border-left-color: var(--warning);
}

.nav-admin:hover {
    border-left-color: var(--warning);
    background: rgba(255, 193, 7, 0.1);
}

.nav-sales {
    border-left-color: var(--success);
}

.nav-sales:hover {
    border-left-color: var(--success);
    background: rgba(40, 167, 69, 0.1);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.user-details {
    flex: 1;
}

.user-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--error);
    border-color: var(--error);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: 240px;
    flex: 1;
    padding: 30px;
    min-height: 100vh;
}

/* ============================================
   MOBILE TOPBAR & DRAWER
   ============================================ */
.topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--primary);
    border-bottom: 3px solid var(--secondary);
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 999;
}

.menu-toggle {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
}

.topbar-logo {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}

.topbar-user {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--secondary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99998;
}

.drawer-overlay.open {
    display: block;
}

.drawer {
    position: fixed;
    top: 0;
    left: -280px;
    bottom: 0;
    width: 280px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--dark) 100%);
    z-index: 99999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.drawer.open {
    left: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.drawer-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    border: 2px solid var(--primary);
    padding: 12px 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover {
    background: var(--dark);
    border-color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: #ffffff;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    background: #218838;
    border-color: #218838;
}

.btn-danger {
    background: var(--error);
    border-color: var(--error);
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: #ffffff;
    border-top: 3px solid var(--primary);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-lighter);
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: #ffffff;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 13px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    background: #ffffff;
    border: 2px solid var(--gray-lighter);
    border-radius: 8px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--primary);
    color: #ffffff;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--gray-lighter);
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success);
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: var(--error);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning);
    color: #856404;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    overflow-y: auto;
}

.modal-content {
    background: #ffffff;
    margin: 5% auto;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: 700;
    color: var(--gray);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--primary);
}

/* ============================================
   FOOTER (Logged In)
   ============================================ */
.footer {
    background: var(--primary);
    color: #ffffff;
    padding: 20px 30px;
    margin-left: 240px;
    border-top: 3px solid var(--secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-right {
    display: flex;
    gap: 20px;
}

.footer-right a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-right a:hover {
    color: var(--secondary);
}

/* ============================================
   STARTSEITE (Logged Out)
   ============================================ */
.landing-header {
    background: #ffffff;
    border-bottom: 2px solid var(--gray-lighter);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.landing-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

.landing-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.landing-menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.landing-menu a:hover {
    color: var(--secondary);
}

.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: #ffffff;
    padding: 100px 30px;
    text-align: center;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.pricing-section {
    padding: 80px 30px;
    background: #f8f9fa;
}

.pricing-header {
    text-align: center;
    margin-bottom: 60px;
}

.pricing-header h2 {
    font-size: 42px;
    color: var(--primary);
    margin-bottom: 15px;
}

.pricing-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.pricing-card {
    background: #ffffff;
    border: 2px solid var(--gray-lighter);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s;
}

.pricing-card.featured {
    border-color: var(--secondary);
    border-width: 3px;
    transform: scale(1.05);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.pricing-badge {
    display: inline-block;
    background: var(--secondary);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.pricing-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.pricing-price {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.pricing-period {
    color: var(--gray);
    margin-bottom: 30px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-lighter);
    color: var(--text);
}

.pricing-features li:before {
    content: "✓ ";
    color: var(--success);
    font-weight: 700;
    margin-right: 10px;
}

/* ============================================
   FOOTER (Logged Out - Ausführlich)
   ============================================ */
.landing-footer {
    background: var(--primary);
    color: #ffffff;
    padding: 60px 30px 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column-about .footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
}

.footer-description {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.footer-column-links h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-links-list {
    list-style: none;
}

.footer-links-list li {
    margin-bottom: 12px;
}

.footer-links-list a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links-list a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-contact-section {
    margin-top: 30px;
}

.footer-contact-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.footer-contact-icon {
    font-size: 18px;
}

.footer-contact-text {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-bottom-links a:hover {
    color: var(--secondary);
}

/* ============================================
   RESPONSIVE (Mobile)
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .topbar {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
        margin-top: 60px;
        padding: 20px;
    }
    
    .footer {
        margin-left: 0;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}