/* ============================================================
   IHK Dashboard Styles
   Version: 2026-03-25
   ============================================================ */


/* ------------------------------------------------------------
   Container
   ------------------------------------------------------------ */

#dashboard-container {
    font-family: 'Source Sans 3', -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    color: #1a1a2e;
    line-height: 1.5;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}


/* ------------------------------------------------------------
   Tab-Leiste
   ------------------------------------------------------------ */

#dashboard-tabs {
    background: #e4eef5;
}

#dashboard-tabs .tab {
    padding: 20px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    display: inline-block;
    font-family: inherit;
    line-height: inherit;
}

#dashboard-tabs .tab.active,
#dashboard-tabs .tab:focus {
    color: #1a1a2e;
    border-bottom-color: #ed7123;
}


/* ------------------------------------------------------------
   Filterleiste
   ------------------------------------------------------------ */

#dashboard-filters {
    background: #f7f8fa;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 28px 24px;
    margin-top: 8px;
    flex-wrap: nowrap;
}

#dashboard-filters label {
    font-size: 14px;
    color: #4b5563;
    font-weight: 600;
}

#dashboard-filters select {
    background: #faf0e6;
    border: 1px solid #e0cfc0;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 16px;
}

#dashboard-filters .filter-vs {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 600;
}

#dashboard-filters button[type="submit"],
#dashboard-filters .filter-submit {
    background: #ed7123;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

#dashboard-filters .filter-status {
    font-size: 14px;
    color: #6b7280;
    margin-left: auto;
}


/* ------------------------------------------------------------
   Copy-Link Button
   ------------------------------------------------------------ */

.db-copy-link {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 25px;
    padding: 8px 12px;
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
    margin-top: auto;
}

.db-copy-link:hover {
    color: #374151;
    border-color: #9ca3af;
}

.db-copy-link--copied {
    color: #16a34a;
    border-color: #16a34a;
}


/* ------------------------------------------------------------
   Sektions-Header
   ------------------------------------------------------------ */

.db-section-title {
    font-size: 18px;
    color: #1a1a2e;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
    padding-left: 28px;
    padding-right: 28px;
    margin-top: 24px;
}


/* ------------------------------------------------------------
   Card Grid
   ------------------------------------------------------------ */

.db-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 12px 28px 24px;
}

.db-grid--single {
    grid-template-columns: 1fr;
}


/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */

.db-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.db-card-accent {
    height: 4px;
}

.db-card-body {
    padding: 20px 24px;
}

.db-card-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    font-weight: 700;
}

/* Card color modifiers (accent bar) */

.db-card--zertifikate .db-card-accent {
    background: #1a79bf;
}

.db-card--seminare .db-card-accent {
    background: #edac1a;
}

.db-card--beratungstage .db-card-accent {
    background: #14794b;
}

.db-card--beratungen .db-card-accent {
    background: #a0325c;
}

.db-card--website .db-card-accent {
    background: #ed7123;
}

.db-card--newsletter .db-card-accent {
    background: #c46210;
}

.db-card--youtube .db-card-accent {
    background: #ed233a;
}

.db-card--linkedin .db-card-accent {
    background: #0a66c2;
}


/* ------------------------------------------------------------
   Hero Numbers
   ------------------------------------------------------------ */

.db-hero {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.db-hero-num {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    color: #1a1a2e;
}

.db-hero-label {
    font-size: 16px;
    color: #4b5563;
}


/* ------------------------------------------------------------
   Data Rows
   ------------------------------------------------------------ */

.db-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 16px;
}

.db-row-label {
    color: #374151;
}

.db-row-value {
    font-weight: 600;
    color: #1a1a2e;
}

.db-row-value--positive {
    color: #16a34a;
}


/* ------------------------------------------------------------
   Beratungstage Rows
   ------------------------------------------------------------ */

.db-check-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 16px;
}

.db-check-name {
    flex: 1;
    color: #374151;
}

.db-check-stats {
    display: flex;
    gap: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.db-check-icon {
    font-size: 14px;
    color: #6b7280;
    margin-right: 4px;
}

.db-check-legend {
    display: flex;
    gap: 20px;
    padding: 6px 0 0;
    font-size: 13px;
    color: #6b7280;
}


/* ------------------------------------------------------------
   Event Lists
   ------------------------------------------------------------ */

.db-events {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.db-events-title {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 6px;
}

.db-events ol {
    padding-left: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    list-style: decimal inside;
    margin: 0;
}

.db-events li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide items beyond 3 unless expanded */
.db-events:not(.db-events--expanded) li:nth-child(n+4) {
    display: none;
}

.db-events-toggle {
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px 0;
}

.db-events-toggle:hover {
    color: #374151;
}


/* ------------------------------------------------------------
   Chart Cards
   ------------------------------------------------------------ */

.db-chart-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.db-chart-card--full {
    grid-column: 1 / -1;
}

.db-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 8px;
}

.db-chart-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.db-chart-legend {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.db-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
}

.db-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.db-chart-area {
    padding: 8px 20px 20px;
}

.dashboard-renderarea {
    width: 100%;
    height: 300px;
}


/* ------------------------------------------------------------
   Cachestatus
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   Dashboard Body (Content-Bereich)
   ------------------------------------------------------------ */

#dashboard-body {
    background: #f7f8fa;
    padding-top: 12px;
    padding-bottom: 28px;
}


.db-cachestatus {
    font-size: 14px;
    color: #6b7280;
}


/* ------------------------------------------------------------
   Fade-In Animation
   ------------------------------------------------------------ */

.dashboard-fading-hide {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.dashboard-fading-show {
    opacity: 1;
    transform: translateY(0);
}


/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1365px) {
    .db-grid--produkte {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .db-grid {
        grid-template-columns: 1fr;
    }

    #dashboard-filters {
        flex-wrap: wrap;
    }
}
