/**
 * Member Dashboard Styles
 * Zentrales CSS für das Frontend-Mitglieder-Dashboard
 * Version: 1.0.0
 */

/* ================================================
   CSS VARIABLEN
   ================================================ */
:root {
    --dashboard-primary: #3b82f6;
    --dashboard-secondary: #8b5cf6;
    --dashboard-success: #10b981;
    --dashboard-warning: #f59e0b;
    --dashboard-danger: #ef4444;
    --dashboard-bg: #f8fafc;
    --dashboard-card-bg: #ffffff;
    --dashboard-border: #e2e8f0;
    --dashboard-text: #1e293b;
    --dashboard-text-muted: #64748b;
}

/* ================================================
   DASHBOARD WRAPPER
   ================================================ */
.member-dashboard-wrapper {
    min-height: 80vh;
    padding: 2rem 0;
}

/* ================================================
   DASHBOARD HEADER
   ================================================ */
.dashboard-header {
    background: linear-gradient(135deg, var(--dashboard-primary) 0%, var(--dashboard-secondary) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.user-avatar {
    position: relative;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.user-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
}

.user-status.status-active {
    background: var(--dashboard-success);
}

.user-status.status-pending {
    background: var(--dashboard-warning);
}

.user-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: white;
}

.user-role {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
}

/* ================================================
   DASHBOARD BUTTONS
   ================================================ */
.btn-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-dashboard.btn-primary {
    background: var(--dashboard-primary);
    color: white;
}

.btn-dashboard.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-dashboard.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-dashboard.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-dashboard.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-dashboard.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--dashboard-text);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-small:hover {
    background: var(--dashboard-primary);
    color: white;
}

.btn-danger {
    padding: 0.5rem 1rem;
    background: var(--dashboard-danger);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-danger:hover {
    background: #dc2626;
}

/* ================================================
   DASHBOARD NAVIGATION
   ================================================ */
.dashboard-nav {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: var(--dashboard-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f1f5f9;
    color: var(--dashboard-text);
}

.nav-item.active {
    background: var(--dashboard-primary);
    color: white;
}

/* ================================================
   DASHBOARD CONTENT
   ================================================ */
.dashboard-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dashboard-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin: 0 0 1.5rem 0;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.dashboard-sidebar {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--dashboard-border);
    position: sticky;
    top: 1rem;
}

.dashboard-menu-group + .dashboard-menu-group {
    margin-top: 1rem;
}

.dashboard-menu-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--dashboard-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.5rem 0;
}

.dashboard-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dashboard-menu .dash-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 10px;
    color: var(--dashboard-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.dashboard-menu .dash-sidebar-link svg {
    flex: 0 0 auto;
}

.dashboard-menu .dash-sidebar-link:hover {
    background: #f1f5f9;
    color: var(--dashboard-text);
}

.dashboard-menu .dash-sidebar-link.active {
    background: var(--dashboard-primary);
    color: white;
}

.dashboard-menu .dash-sidebar-link.active svg {
    stroke: currentColor;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
        top: auto;
    }
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header-row h2 {
    margin: 0;
}

/* ================================================
   STATUS BANNER
   ================================================ */
.status-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.status-banner.status-pending {
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.status-banner.status-action {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
}

.banner-icon {
    font-size: 2rem;
}

.banner-content strong {
    display: block;
    font-size: 1rem;
    color: var(--dashboard-text);
    margin-bottom: 0.25rem;
}

.banner-content p {
    font-size: 0.875rem;
    color: var(--dashboard-text-muted);
    margin: 0;
}

/* ================================================
   STATS GRID
   ================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--dashboard-border);
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 2rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dashboard-text);
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--dashboard-text-muted);
    margin-top: 0.25rem;
}

/* ================================================
   QUICK ACTIONS
   ================================================ */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin: 0 0 1rem 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--dashboard-border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.action-card:hover {
    border-color: var(--dashboard-primary);
    background: #f8fafc;
    transform: translateY(-2px);
}

.action-icon {
    font-size: 1.75rem;
}

.action-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dashboard-text);
    text-align: center;
}

/* ================================================
   RECENT ACTIVITY
   ================================================ */
.recent-activity h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin: 0 0 1rem 0;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.activity-icon {
    font-size: 1.25rem;
}

.activity-text {
    font-size: 0.875rem;
    color: var(--dashboard-text-muted);
}

/* ================================================
   PROFILE SECTION
   ================================================ */
.profile-edit-card,
.company-edit-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.profile-preview,
.company-preview {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.preview-avatar img,
.preview-logo img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
}

.preview-avatar,
.preview-logo {
    flex-shrink: 0;
}

.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--dashboard-primary), var(--dashboard-secondary));
    border-radius: 12px;
    font-size: 3rem;
}

.preview-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin: 0 0 0.5rem 0;
}

.preview-info p {
    font-size: 1rem;
    color: var(--dashboard-text-muted);
    margin: 0 0 0.75rem 0;
}

.profile-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.profile-status.publish {
    background: #d1fae5;
    color: #065f46;
}

.profile-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.profile-status.draft {
    background: #e2e8f0;
    color: #475569;
}

.profile-actions,
.company-actions {
    display: flex;
    gap: 0.75rem;
}

/* Profile Completeness */
.profile-completeness {
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.profile-completeness h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dashboard-primary), var(--dashboard-success));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dashboard-text);
}

.completeness-tips {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dashboard-border);
}

.completeness-tips p {
    font-size: 0.875rem;
    color: var(--dashboard-text-muted);
    margin: 0 0 0.75rem 0;
}

.completeness-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.completeness-tips li {
    font-size: 0.875rem;
    color: var(--dashboard-text);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* No Profile Card */
.no-profile-card,
.no-events-card,
.no-company-card {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed var(--dashboard-border);
}

.no-profile-icon,
.no-events-icon,
.no-company-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-profile-card h3,
.no-events-card h3,
.no-company-card h3 {
    font-size: 1.25rem;
    color: var(--dashboard-text);
    margin: 0 0 0.5rem 0;
}

.no-profile-card p,
.no-events-card p,
.no-company-card p {
    font-size: 0.875rem;
    color: var(--dashboard-text-muted);
    margin: 0 0 1.5rem 0;
}

/* ================================================
   EVENTS SECTION
   ================================================ */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--dashboard-border);
}

.event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--dashboard-primary);
    border-radius: 8px;
    color: white;
    flex-shrink: 0;
}

.event-date-badge .day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-date-badge .month {
    font-size: 0.75rem;
    text-transform: uppercase;
}

.event-info {
    flex: 1;
}

.event-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin: 0 0 0.25rem 0;
}

.event-meta {
    font-size: 0.8125rem;
    color: var(--dashboard-text-muted);
    margin: 0 0 0.5rem 0;
}

.event-status {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.event-status.publish {
    background: #d1fae5;
    color: #065f46;
}

.event-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.event-status.draft {
    background: #e2e8f0;
    color: #475569;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
}

/* ================================================
   SETTINGS SECTION
   ================================================ */
.settings-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin: 0 0 1rem 0;
}

.settings-card.danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--dashboard-border);
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-label {
    font-weight: 500;
    color: var(--dashboard-text);
}

.setting-value {
    color: var(--dashboard-text-muted);
    font-size: 0.875rem;
}

.setting-description {
    font-size: 0.8125rem;
    color: var(--dashboard-text-muted);
    margin: 0.25rem 0 0 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--dashboard-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* ================================================
   SUPPORT SECTION
   ================================================ */
.support-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.support-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin: 0 0 1rem 0;
}

.support-card > p {
    font-size: 0.875rem;
    color: var(--dashboard-text-muted);
    margin: 0 0 1rem 0;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--dashboard-border);
}

.faq-item summary {
    padding: 1rem;
    font-weight: 500;
    color: var(--dashboard-text);
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: "▸ ";
    margin-right: 0.5rem;
}

.faq-item[open] summary::before {
    content: "▾ ";
}

.faq-item p {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.875rem;
    color: var(--dashboard-text-muted);
    margin: 0;
}

/* Contact Options */
.contact-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid var(--dashboard-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dashboard-text);
    font-weight: 500;
    transition: all 0.2s;
}

.contact-option:hover {
    border-color: var(--dashboard-primary);
    background: #f8fafc;
}

.option-icon {
    font-size: 1.5rem;
}

/* Docs Links */
.docs-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.doc-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dashboard-text);
    font-weight: 500;
    transition: all 0.2s;
}

.doc-link:hover {
    border-color: var(--dashboard-primary);
    color: var(--dashboard-primary);
}

.doc-icon {
    font-size: 1.25rem;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    .dashboard-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .user-welcome {
        flex-direction: column;
    }
    
    .dashboard-actions {
        width: 100%;
        justify-content: center;
    }
    
    .dashboard-nav {
        padding: 0.25rem;
    }
    
    .nav-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .dashboard-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .profile-preview,
    .company-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-actions,
    .company-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .event-item {
        flex-direction: column;
        text-align: center;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .contact-options {
        flex-direction: column;
    }
}
