/* Dateiname: dashboard.css */
/* ============================================
   CR8 CONTROL-BOARD STYLES
   Version: 1.1.51 (Mobile Overflow & Scroll Fix)
   ============================================ */

/* 1. CSS Variablen */
:root {
    --cr8-bg: #121212;
    --cr8-surface: #1E1E1E;
    --cr8-surface-hover: #252525;
    --cr8-border: #333;
    --cr8-gold: #C5A47E;
    --cr8-gold-hover: #D7B994;
    --cr8-text: #EAE0D5;
    --cr8-text-mute: #888;
    --cr8-success: #46b450;
    --cr8-error: #b44646;
    --cr8-radius: 12px;
}

/* Base Reset */
.cr8-app-wrapper * { box-sizing: border-box; font-family: 'Open Sans', sans-serif; }

/* 2. APP LAYOUT */
.cr8-app-wrapper {
    display: grid; grid-template-columns: 260px 1fr; background-color: var(--cr8-bg);
    min-height: 500px; height: auto; border-radius: var(--cr8-radius); border: 1px solid var(--cr8-border);
    overflow: visible; color: var(--cr8-text); margin: 40px auto; max-width: 1400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); overscroll-behavior: auto;
}

/* 3. SIDEBAR */
.cr8-sidebar {
    background-color: var(--cr8-surface); border-right: 1px solid var(--cr8-border);
    display: flex; flex-direction: column; padding: 20px; height: auto;
}
.cr8-sidebar-header { margin-bottom: 30px; padding: 0 10px; }
.cr8-logo-text { font-weight: 800; color: var(--cr8-gold); font-size: 1.2rem; letter-spacing: 1px; }
.cr8-nav-items { display: flex; flex-direction: column; gap: 5px; flex-grow: 1; }
.cr8-menu-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 8px; color: var(--cr8-text-mute); cursor: pointer; transition: all 0.2s ease; text-decoration: none;
}
.cr8-menu-item svg { width: 20px; height: 20px; }
.cr8-menu-item:hover { background-color: rgba(255,255,255,0.05); color: #fff; }
.cr8-menu-item.active { background-color: rgba(197, 164, 126, 0.15); color: var(--cr8-gold); }
a.cr8-menu-item.exit-link { margin-top: auto; color: var(--cr8-error); }
a.cr8-menu-item.exit-link:hover { background-color: rgba(180, 70, 70, 0.1); color: #ff6b6b; }
.cr8-sidebar-footer { border-top: 1px solid var(--cr8-border); padding-top: 20px; margin-top: 20px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar-circle { width: 35px; height: 35px; background: var(--cr8-gold); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.user-info { display: flex; flex-direction: column; }
.user-info .name { font-size: 0.9em; font-weight: 600; }
.user-info .role { font-size: 0.7em; color: var(--cr8-text-mute); }

/* 4. MAIN CONTENT */
.cr8-main { padding: 40px; background-color: var(--cr8-bg); overflow: visible; height: auto; }
.cr8-view-header { margin-bottom: 30px; }
.cr8-view-header h1 { margin: 0 0 5px 0; color: #fff; font-size: 1.8rem; line-height: 1.2; }
.cr8-view-header p { margin: 0; color: var(--cr8-text-mute); }
.cr8-view-section { display: none; animation: fadeIn 0.3s ease; }
.cr8-view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 5. CARDS & ELEMENTS */
.cre8or-card { background-color: var(--cr8-surface); border: 1px solid var(--cr8-border); border-radius: var(--cr8-radius); padding: 25px; margin-bottom: 25px; }
.cre8or-card.text-center { text-align: center; padding: 25px; }
.cre8or-card.text-center h2 { font-size: 3em; margin: 0; }

.cr8-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.cre8or-input-field, .cre8or-textarea-field { width: 100%; padding: 12px; background-color: #121212; border: 1px solid var(--cr8-border); color: #fff; border-radius: 6px; margin-bottom: 15px; }
.cre8or-input-field:focus, .cre8or-textarea-field:focus { border-color: var(--cr8-gold); outline: none; }
.cre8or-submit-button { background-color: var(--cr8-gold); color: #000; border: none; padding: 12px 25px; border-radius: 6px; font-weight: bold; cursor: pointer; text-transform: uppercase; margin-top: 10px; width: 100%; transition: background-color 0.2s ease; }
.cre8or-submit-button:hover { background-color: var(--cr8-gold-hover); }

/* NEW WHITE BUTTON STYLE */
.cre8or-white-button { 
    background-color: #f0f0f0; 
    color: #000; 
    border: none; 
    padding: 12px 25px; 
    border-radius: 6px; 
    font-weight: 700; 
    cursor: pointer; 
    text-transform: uppercase; 
    margin-top: 10px; 
    margin-bottom: 10px;
    width: 100%; 
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}
.cre8or-white-button:hover { background-color: #fff; }

.cre8or-text-button { background: transparent; border: none; color: #aaa; cursor: pointer; text-decoration: underline; font-size: 0.9em; padding: 5px; }
.cre8or-text-button:hover { color: #fff; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.cre8or-card label { display: block; margin-bottom: 5px; color: var(--cr8-gold); font-size: 0.9em; font-weight: 600; }
.cre8or-card h3 { margin-top: 0; color: #fff; }

/* Link Box */
.cre8or-link-box-wrapper { display: flex; background: #121212; border: 1px solid var(--cr8-border); border-radius: 6px; overflow: hidden; }
.cre8or-link-box-input { flex-grow: 1; background: transparent; border: none; color: #fff; padding: 12px; font-weight: bold; }
.cre8or-copy-button { background: var(--cr8-gold); border: none; padding: 0 20px; cursor: pointer; display: flex; align-items: center; }
.cre8or-copy-button.copied { background: var(--cr8-success); }

/* Table Styles */
.cre8or-table-wrapper { overflow-x: auto; }
.cre8or-details-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.cre8or-details-table th, .cre8or-details-table td { padding: 12px; border-bottom: 1px solid var(--cr8-border); text-align: left; }
.cre8or-details-table th { color: var(--cr8-text-mute); font-size: 0.85em; text-transform: uppercase; }
.cre8or-code-text { font-family: monospace; color: var(--cr8-gold); font-size: 1.1em; }
.cre8or-code-filters { margin-bottom: 15px; }
.cre8or-code-filters button { background: transparent; border: 1px solid var(--cr8-border); color: #888; padding: 6px 15px; border-radius: 20px; margin-right: 10px; cursor: pointer; }
.cre8or-code-filters button.active { background: var(--cr8-gold); color: #000; border-color: var(--cr8-gold); }
.cre8or-copy-code-button { background: transparent; border: none; color: var(--cr8-gold); cursor: pointer; }

/* 7. NOTICE & FLOATING ELEMENTS (Safe Width Fix) */
.cre8or-notice { 
    position: fixed; 
    top: 20px; 
    left: 50%; 
    transform: translate(-50%, -120px); 
    z-index: 10001; 
    padding: 1rem 1.5rem; 
    border-radius: 8px; 
    width: 90%; 
    max-width: 300px; 
    text-align: center; 
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.5s; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    font-weight: 600; 
}
.cre8or-notice.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.cre8or-notice.cre8or-success { background-color: var(--cr8-success); color: #fff; }

.cre8or-floating-sidebar { position: fixed; left: 20px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 15px; z-index: 10000; padding: 20px 15px; border-radius: 50px; background: rgba(10, 10, 10, 0.3); backdrop-filter: blur(5px); border: 1px solid rgba(197, 164, 126, 0.1); align-items: center; }
.cre8or-sidebar-label { color: var(--cr8-gold); font-size: 12px; font-weight: 800; text-align: center; margin-bottom: 10px; writing-mode: horizontal-tb; max-width: 100px; }

/* FLOAT BUTTONS */
.cre8or-float-btn {
    display: flex; align-items: center; justify-content: center; width: 90px; height: 90px;
    border-radius: 50%; 
    background-color: var(--cr8-gold) !important;
    border: 2px solid #000 !important;
    color: #000 !important;
    transition: all 0.4s; overflow: hidden;
}
.cre8or-float-btn svg { width: 40px; height: 40px; fill: #000 !important; }
.cre8or-float-btn:hover { background-color: var(--cr8-gold-hover) !important; transform: scale(1.1); }

/* PRODUCT STATS */
.cre8or-product-list { display: flex; flex-direction: column; gap: 15px; }
.cre8or-product-stat-item { display: flex; align-items: center; gap: 20px; padding: 15px; background: rgba(255, 255, 255, 0.03); border-radius: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.cre8or-product-stat-item .stat-img { width: 60px; height: 60px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid #333; }
.cre8or-product-stat-item .stat-img img { width: 100%; height: 100%; object-fit: cover; }
.cre8or-product-stat-item .stat-img .no-img { width: 100%; height: 100%; background: #222; }
.cre8or-product-stat-item .stat-content { flex-grow: 1; }
.cre8or-product-stat-item h4 { margin: 0 0 8px 0; color: var(--cr8-gold); font-size: 1.1em; }
.cre8or-product-stat-item .stat-row { display: flex; gap: 20px; }
.stat-badge { display: inline-flex; align-items: center; font-size: 0.85em; color: #aaa; background: rgba(0,0,0,0.3); padding: 4px 10px; border-radius: 4px; }
.stat-badge.down { color: #fff; border-left: 2px solid var(--cr8-gold); }
.stat-badge.lead { color: #fff; border-left: 2px solid var(--cr8-success); }

/* LUXURY FREEBIE GRID */
#cre8or-academy-section { 
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 
    box-sizing: border-box; 
    width: 100%; 
    max-width: 1000px; 
    margin: 0 auto; 
    background-color: transparent; 
    padding: 40px 20px; 
    color: #ffffff; 
    text-align: center;
    overflow-x: hidden;
}
#cre8or-academy-section * { box-sizing: border-box; }
#cre8or-academy-section .aca-header { margin-bottom: 50px; }
#cre8or-academy-section .aca-headline { font-size: 42px; line-height: 1.2; font-weight: 800; margin: 0 0 15px 0; color: #fff; word-wrap: break-word; hyphens: auto; }
#cre8or-academy-section .aca-headline span { color: var(--cr8-gold); background: linear-gradient(135deg, #cb9f68 0%, #f4e4bc 50%, #cb9f68 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
#cre8or-academy-section .aca-intro { font-size: 18px; color: #ccc; margin: 0; }

.cre8or-freebie-grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; width: 100%; }
.cre8or-freebie-card.vertical { background: #111; border: 1px solid rgba(203, 159, 104, 0.2); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-align: center; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; height: 100%; }
.cre8or-freebie-card.vertical:hover { transform: translateY(-5px); border-color: var(--cr8-gold); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.aca-card-image-wrapper { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; position: relative; background: #000; border-bottom: 1px solid #222; }
.aca-card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; max-width: 100%; }
.cre8or-freebie-card.vertical:hover .aca-card-image-wrapper img { transform: scale(1.05); }
.aca-icon-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--cr8-gold); background: rgba(255, 255, 255, 0.05); }
.aca-icon-placeholder svg { width: 60px; height: 60px; fill: currentColor; }
.cre8or-freebie-card.vertical .aca-card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; text-align: center; }
.cre8or-freebie-card.vertical h3 { font-size: 22px; margin: 0 0 15px 0; color: var(--cr8-gold); font-weight: 700; word-wrap: break-word; }
.cre8or-freebie-card.vertical .aca-desc { font-size: 15px; color: #ddd; margin-bottom: 20px; line-height: 1.6; flex-grow: 1; }
.cre8or-freebie-card.vertical .cre8or-trigger-freebie { width: 100%; margin-top: auto; }

/* MODAL FIXES */
.cre8or-modal-overlay { 
    position: fixed; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100% !important; 
    height: 100% !important; 
    margin: 0 !important; 
    background: rgba(0,0,0,0.85); 
    backdrop-filter: blur(8px); 
    z-index: 100000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.cre8or-modal-content { background: #111; border: 1px solid var(--cr8-gold); border-radius: 12px; padding: 40px; max-width: 500px; width: 90%; text-align: center; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.8); margin: auto; }
.cre8or-info-modal .cre8or-modal-content { max-width: 700px; max-height: 90vh; overflow-y: auto; }
.cre8or-modal-close { position: absolute; top: 15px; right: 20px; font-size: 30px; cursor: pointer; color: #666; }
.cre8or-modal-close:hover { color: #fff; }

/* MOBILE RESPONSIVE FIXES */
@media (max-width: 900px) { .cre8or-freebie-grid-container { grid-template-columns: repeat(2, 1fr); } }

/* Default hidden on Desktop */
.mobile-contact-trigger { display: none; }

/* MOBILE STYLES */
@media (max-width: 768px) {
    .cr8-app-wrapper { 
        grid-template-columns: 1fr; 
        border: none; 
        border-radius: 0; 
        margin: 0; 
        min-height: auto; 
        height: auto; 
        /* FIX: Prevents horizontal scrolling/wobbling */
        overflow-x: hidden; 
        width: 100%;
        padding-bottom: 90px; 
        box-shadow: none; 
    }
    .cr8-main { 
        padding: 20px; 
        /* FIX: Ensure content respects width */
        width: 100%; 
        overflow-x: hidden;
        height: auto !important; 
    }
    .form-grid { grid-template-columns: 1fr; }
    .cr8-grid-2 { grid-template-columns: 1fr 1fr; gap: 15px; }
    .cre8or-card.text-center { padding: 15px; }
    .cre8or-card.text-center h2 { font-size: 2em !important; }
    .cre8or-card.text-center p { font-size: 0.8em; }
    .cr8-sidebar-header, .cr8-sidebar-footer { display: none; }
    .cr8-sidebar { position: fixed; bottom: 0; left: 0; width: 100%; height: 75px; background-color: rgba(30, 30, 30, 0.98); backdrop-filter: blur(10px); border-right: none; border-top: 1px solid var(--cr8-border); flex-direction: row; justify-content: space-around; padding: 5px 0; z-index: 10000; box-shadow: 0 -5px 20px rgba(0,0,0,0.5); }
    .cr8-nav-items { flex-direction: row; width: 100%; justify-content: space-around; }
    .cr8-menu-item { flex-direction: column; gap: 4px; padding: 8px; border-radius: 0; background: transparent !important; }
    .cr8-menu-item svg { width: 24px; height: 24px; }
    .cr8-menu-item .label { font-size: 10px; }

    /* MOBILE FLOATING SIDEBAR */
    .cre8or-floating-sidebar {
        left: 50%; top: auto; bottom: 85px; transform: translateX(-50%) translateY(20px);
        width: auto; flex-direction: row; gap: 12px; padding: 15px;
        border-radius: 50px; background: rgba(0, 0, 0, 0.95);
        opacity: 0; visibility: hidden; transition: all 0.3s ease; display: flex !important;
        max-width: 95vw; flex-wrap: wrap; justify-content: center;
    }
    .cre8or-floating-sidebar.active { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
    .cre8or-sidebar-label { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); width: auto; font-size: 8px; padding: 2px 6px; background: rgba(0,0,0,0.8); border-radius: 4px; }
    .cre8or-float-btn { width: 38px; height: 38px; }
    .cre8or-float-btn svg { width: 18px; height: 18px; }
    
    .cre8or-freebie-grid-container { grid-template-columns: 1fr; gap: 20px; width: 100%; }
    #cre8or-academy-section { padding: 30px 15px; width: 100%; max-width: 100%; }
    #cre8or-academy-section .aca-headline { font-size: 24px !important; line-height: 1.3; }

    /* MOBILE TRIGGER BUTTON (HIGH Z-INDEX) */
    .mobile-contact-trigger {
        display: block !important; 
        position: fixed; 
        bottom: 20px !important; 
        left: 50%; 
        transform: translateX(-50%);
        background: var(--cr8-gold) !important; 
        color: #000 !important; 
        padding: 12px 30px; 
        border-radius: 30px;
        font-weight: 800; 
        font-size: 14px; 
        z-index: 999999 !important; /* Maximum Visibility */
        box-shadow: 0 4px 15px rgba(0,0,0,0.5);
        cursor: pointer; 
        text-transform: uppercase; 
        text-align: center; 
        white-space: nowrap;
        max-width: 80vw; /* SAFE WIDTH */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cre8or-modal-content { padding: 20px; width: 95%; } 
    .cre8or-info-modal .cre8or-modal-content { max-height: 85vh; }
    .cre8or-modal-close { top: 10px; right: 10px; font-size: 24px; }
}