/* RepCenter Design Finetuning v1.0 */

/* ═══ ACCORDION POLISH ═══ */
.accordion-section {
    margin-bottom: 4px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8ecf1;
    background: white;
    transition: box-shadow 0.2s;
}
.accordion-section:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.accordion-section.open {
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.accordion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fafbfc;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid transparent;
}
.accordion-section.open > .accordion-header {
    border-bottom-color: #e8ecf1;
    background: #f7f8fa;
}
.accordion-header:hover {
    background: #f0f2f5;
}

.accordion-chevron {
    display: none;
}

.accordion-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dbeafe;
    border: 2px solid #3b82f6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.accordion-dot::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3b82f6;
}

.accordion-dot.done {
    width: 24px;
    height: 24px;
    background: #dcfce7;
    border: 2px solid #22c55e;
}

.accordion-dot.done::after {
    content: none;
}

.accordion-dot.done svg {
    display: block;
}

.accordion-dot.pending {
    background: #f8fafc;
    border-color: #d1d5db;
}

.accordion-dot.pending::after {
    background: transparent;
}

/* Open-State: Dot hervorheben (wie aktiver Timeline-Schritt) */
.accordion-section.open .accordion-dot {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
    /* Override styles.css: background bleibt wie gesetzt (done=grün, default=blau) */
    background: #dbeafe;
}
.accordion-section.open .accordion-dot.done {
    box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
    background: #dcfce7;
}
.accordion-section.open .accordion-dot.pending {
    box-shadow: none;
    transform: scale(1);
    background: #f8fafc;
}

.accordion-title {
    font-weight: 600;
    font-size: 13.5px;
    color: #1e293b;
    flex: 1;
    text-align: left;
}

.accordion-badge {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.accordion-section.open > .accordion-body {
    max-height: 3000px;
}

.accordion-body-inner {
    padding: 16px;
}

/* ═══ FORM FOOTER ═══ */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin: 8px 0;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e8ecf1;
}

.btn-cancel {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-cancel:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #475569;
}

.btn-save {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 1px 3px rgba(59,130,246,0.3);
}
.btn-save:hover {
    background: #2563eb;
    box-shadow: 0 2px 6px rgba(59,130,246,0.4);
}

/* ═══ SIDEBAR TABS ═══ */
.sidebar-tab {
    flex: 1;
    padding: 10px 0 !important;
    border: none !important;
    font-size: 12px !important;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    font-family: inherit;
}
.sidebar-tab.active,
.sidebar-tab[style*="border-bottom-color: rgb(10, 110, 209)"] {
    background: none !important;
    color: #0a6ed1 !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #0a6ed1 !important;
}
.sidebar-tab:not(.active) {
    color: #6a6d70 !important;
    background: none !important;
    font-weight: 400 !important;
    border-bottom: 2px solid transparent !important;
}
.sidebar-tab:hover:not(.active) {
    color: #32363a !important;
}

/* ═══ INFO STRIP (Gerät/DL/RMA Header) ═══ */
#editFormPage .info-card,
.info-card-new {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

/* ═══ STATUS BADGE POLISH ═══ */
.status-badge-new {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ═══ DIAGNOSE RADIO CARDS ═══ */
.diagnose-option,
.feig-ergebnis-option {
    transition: all 0.15s !important;
    border-radius: 10px !important;
}
.diagnose-option:hover,
.feig-ergebnis-option:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.diagnose-option.selected,
.feig-ergebnis-option.selected {
    box-shadow: 0 1px 6px rgba(0,0,0,0.08) !important;
}

/* ═══ SUB-GROUP LABELS ═══ */
.sub-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
    margin-bottom: 8px;
}

/* ═══ TEXTAREA POLISH ═══ */
.form-textarea {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    resize: vertical;
}
.form-textarea:focus {
    outline: none;
    border-color: #93D600;
    box-shadow: 0 0 0 3px rgba(147, 214, 0, 0.12);
}

/* ═══ SCHNELLAUSWAHL CHECKBOXES ═══ */
.schnellauswahl-grid label {
    transition: background 0.1s;
    border-radius: 6px;
    padding: 4px 6px;
}
.schnellauswahl-grid label:hover {
    background: #f0f9ff;
}

/* ═══ ENGINE DEBUG ═══ */
#engineDebugPanel {
    font-size: 10px;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
}

/* ═══ SCROLLBAR SIDEBAR ═══ */
#sidebarTimelineContent::-webkit-scrollbar,
#sidebarDokumenteContent::-webkit-scrollbar {
    width: 4px;
}
#sidebarTimelineContent::-webkit-scrollbar-thumb,
#sidebarDokumenteContent::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
#sidebarTimelineContent::-webkit-scrollbar-track,
#sidebarDokumenteContent::-webkit-scrollbar-track {
    background: transparent;
}

/* ═══ HISTORIE ═══ */
#historieSection .accordion-badge {
    background: #dbeafe;
    color: #2563eb;
}

/* Änderungshistorie: eigenes SVG-Icon (Uhr) → kein ::after Pseudo-Dot */
#dotHistorie::after {
    content: none;
}
#dotHistorie svg {
    display: block;
}
.accordion-section.open #dotHistorie {
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
}
