﻿:root {
    --color-primary: #0F2535;
    --color-accent: #3D9970;
    --color-accent-dark: #2D7A5A;
    --color-bg: #F8FAFC;
    --color-bg-card: #FFFFFF;
    --color-text: #1E293B;
    --color-text-muted: #64748B;
    --color-border: #E2E8F0;
    --color-success: #16A34A;
    --color-success-bg: #F0FDF4;
    --color-warning: #D97706;
    --color-warning-bg: #FFFBEB;
    --color-error: #DC2626;
    --color-error-bg: #FEF2F2;
    --color-info: #0284C7;
    --color-info-bg: #F0F9FF;
    --color-pending: #7C3AED;
    --color-pending-bg: #F5F3FF;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition: all 0.2s ease
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: 'Inter',sans-serif;
    background: #E2E8F0;
    color: var(--color-text);
    line-height: 1.5;
    padding: 40px
}

.page-title {
    text-align: center;
    margin-bottom: 48px
}

    .page-title h1 {
        font-size: 32px;
        font-weight: 800;
        color: var(--color-primary);
        margin-bottom: 8px
    }

    .page-title p {
        color: var(--color-text-muted);
        font-size: 16px
    }

.screen-container {
    max-width: 1400px;
    margin: 0 auto 60px
}

.screen-label {
    background: var(--color-primary);
    color: white;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    align-items: center;
    gap: 10px
}

.screen-frame {
    background: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden
}

/* App Layout inside frame */
.app-layout {
    display: flex;
    min-height: 600px
}

.sidebar {
    width: 260px;
    background: var(--color-primary);
    color: white;
    flex-shrink: 0
}

.sidebar-header {
    padding: 12px 24px;
    /*border-bottom: 1px solid rgba(255,255,255,0.1)*/
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg,var(--color-accent),#4DAA80);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px
}

.logo-text {
    font-weight: 700;
    font-size: 18px
}

.sidebar-nav {
    padding: 12px 0
}

.nav-section {
    margin-bottom: 12px
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
    padding: 0 12px 8px
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 24px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent; 
    text-decoration:none;
}

    .nav-item.active {
        background: rgba(61,153,112,0.15);
        color: #4DAA80;
        border-left-color: var(--color-accent)
    }

    .nav-item svg {
        width: 20px;
        height: 20px
    }

.nav-badge {
    margin-left: auto;
    background: var(--color-accent);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600
}

.sidebar-footer {
    padding: 12px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto
}

.user {
    display: flex;
    align-items: center;
    gap: 12px
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg,#6366F1,#8B5CF6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px
}

.user-name {
    font-weight: 600;
    font-size: 14px
}

.user-email {
    font-size: 12px;
    color: rgba(255,255,255,0.5)
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0
}

.header {
    background: white;
    border-bottom: 1px solid var(--color-border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.page-heading {
    font-size: 20px;
    font-weight: 700
}

.header-btns {
    display: flex;
    gap: 8px
}

.header-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

    .header-btn svg {
        width: 20px;
        height: 20px;
        color: var(--color-text-muted)
    }

.notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-error);
    border-radius: 50%;
    border: 2px solid white
}

.content {
    padding: 32px;
    background: var(--color-bg);
    flex: 1;
    overflow: auto
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition)
}

.btn-primary {
    background: var(--color-accent);
    color: white
}

.btn-secondary {
    background: white;
    color: var(--color-text);
    border: 1px solid var(--color-border)
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted)
}

.btn-danger {
    background: var(--color-error-bg);
    color: var(--color-error)
}

.btn svg {
    width: 18px;
    height: 18px
}

/* Card */
.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.card-title {
    font-size: 16px;
    font-weight: 700
}

/* Table */
.filters {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap
}

.search {
    flex: 1;
    max-width: 400px;
    position: relative
}

    .search input {
        width: 100%;
        padding: 10px 10px 10px 40px;
        border: 1px solid var(--color-border);
        border-radius: 10px;
        font-size: 14px
    }

    .search svg {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        color: var(--color-text-muted)
    }

.chips {
    display: flex;
    gap: 8px
}

.chip {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: white;
    display: flex;
    align-items: center;
    gap: 6px
}

    .chip.active {
        background: var(--color-accent);
        color: white;
        border-color: var(--color-accent)
    }

.table-header {
    display: grid;
    grid-template-columns: 2fr 120px 150px 100px 150px;
    gap: 16px;
    padding: 12px 24px;
    background: var(--color-bg);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 120px 150px 100px 150px;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid #F1F5F9;
    align-items: center
}

.company {
    display: flex;
    align-items: center;
    gap: 12px
}

.company-icon {
    width: 40px;
    height: 40px;
    background: var(--color-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0
}

.company-name {
    font-weight: 600;
    font-size: 14px
}

.company-id {
    font-size: 12px;
    color: var(--color-text-muted)
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap
}

    .badge.auskunft {
        background: var(--color-info-bg);
        color: var(--color-info)
    }

    .badge.loeschung {
        background: var(--color-error-bg);
        color: var(--color-error)
    }

    .badge.widerspruch {
        background: var(--color-pending-bg);
        color: var(--color-pending)
    }

    .badge.korrektur {
        background: var(--color-warning-bg);
        color: var(--color-warning)
    }

.status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0
}

.status.pending .status-dot {
    background: var(--color-warning)
}

.status.done .status-dot {
    background: var(--color-success)
}

.status.overdue .status-dot {
    background: var(--color-error)
}

.status.sent .status-dot {
    background: var(--color-info)
}

.date {
    font-size: 12px;
    color: var(--color-text-muted)
}

.actions {
    display: flex;
    gap: 6px
}

.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    flex-shrink: 0
}

    .action-btn svg {
        width: 16px;
        height: 16px
    }

/* Wizard */
.wizard {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 520px
}

.wizard-steps {
    background: var(--color-bg);
    padding: 32px;
    border-right: 1px solid var(--color-border)
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 8px
}

    .step.active {
        background: white;
        box-shadow: var(--shadow-md)
    }

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0
}

.step.active .step-num {
    background: var(--color-accent);
    color: white
}

.step.done .step-num {
    background: var(--color-success);
    color: white
}

.step-label {
    font-size: 14px;
    font-weight: 600
}

.step-desc {
    font-size: 12px;
    color: var(--color-text-muted)
}

.wizard-content {
    padding: 40px;
    overflow: auto
}

.wizard-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px
}

.wizard-subtitle {
    color: var(--color-text-muted);
    font-size: 16px;
    margin-bottom: 40px
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid var(--color-border)
}

.rights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

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

/* Jede Kachel gleich hoch */
.right-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* wichtig für Grid */
    padding: 14px;
    border: 1px solid rgba(148,163,184,.5);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

    .right-card:hover {
        border-color: rgba(59,130,246,.7);
    }

    .right-card input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .right-card:has(input[type="radio"]:checked) {
        border-color: rgba(59,130,246,1);
        box-shadow: 0 0 0 2px rgba(59,130,246,.15);
    }

.right-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px; /* nur Abstand zwischen Name+Icon und Article */
    margin-bottom: 8px;
}

.right-name {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

/* Icon direkt am Text */
.right-icon {
    font-size: 18px;
    margin-right: 6px; /* minimale optische Trennung */
    color: #2563eb;
    line-height: 1;
}

.right-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.right-article {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(59,130,246,.10);
    color: rgba(37,99,235,1);
    white-space: nowrap;
}

/* Beschreibung füllt den verbleibenden Raum */
.right-desc {
    font-size: 13px;
    opacity: .82;
    line-height: 1.4;
    flex-grow: 1; /* <-- Magie für gleiche Höhe */
    min-height: calc(3 * 1.4em); /* <- exakt die Höhe von 3 Zeilen */
}

/* Documents */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 24px
}

.upload-card {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center
}

    .upload-card.done {
        border-style: solid;
        border-color: var(--color-success);
        background: var(--color-success-bg)
    }

.upload-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: var(--color-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted)
}

    .upload-icon svg {
        width: 32px;
        height: 32px
    }

.upload-card.done .upload-icon {
    background: var(--color-success);
    color: white
}

.upload-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px
}

.upload-card p {
    font-size: 14px;
    color: var(--color-text-muted)
}

.upload-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-success);
    margin-top: 12px
}

    .upload-success svg {
        width: 20px;
        height: 20px
    }

/* Detail */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--color-border)
}

.detail-company {
    display: flex;
    align-items: center;
    gap: 20px
}

.detail-logo {
    width: 72px;
    height: 72px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px
}

.detail-name {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px
}

.detail-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--color-text-muted)
}

.detail-actions {
    display: flex;
    gap: 12px
}

.timeline {
    padding-left: 56px;
    position: relative
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 18px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: var(--color-border)
    }

.timeline-item {
    position: relative;
    padding-bottom: 28px
}

    .timeline-item:last-child {
        padding-bottom: 0
    }

.timeline-dot {
    position: absolute;
    left: -56px;
    top: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center
}

    .timeline-dot svg {
        width: 18px;
        height: 18px
    }

    .timeline-dot.active {
        border-color: var(--color-accent);
        background: var(--color-accent);
        color: white
    }

    .timeline-dot.done {
        border-color: var(--color-success);
        background: var(--color-success);
        color: white
    }

.timeline-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px
}

.timeline-content p {
    font-size: 14px;
    color: var(--color-text-muted)
}

.timeline-time {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 6px
}

/* Settings */
.settings {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 500px
}

.settings-nav {
    background: var(--color-bg);
    padding: 24px;
    border-right: 1px solid var(--color-border)
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 4px
}

    .settings-nav-item.active {
        background: white;
        color: var(--color-accent);
        box-shadow: var(--shadow-md)
    }

    .settings-nav-item svg {
        width: 20px;
        height: 20px
    }

.settings-content {
    padding: 40px
}

.settings-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 28px
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.form-group {
    margin-bottom: 20px
}

    .form-group label {
        display: block;
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 8px
    }

    .form-group input {
        width: 100%;
        padding: 14px;
        border: 1px solid var(--color-border);
        border-radius: 10px;
        font-size: 15px
    }

/* Wizard: Steps links, Content rechts */
.screen-container.app-mode .wizard {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

.screen-container.app-mode .wizard-steps {
    position: sticky;
    top: 0; /* bleibt im sichtbaren Bereich */
    align-self: start;
}

/* Mobile: untereinander */
@media (max-width: 900px) {
    .screen-container.app-mode .wizard {
        grid-template-columns: 1fr;
    }
    .header .header-btns {
        display: none;
    }
}

/* Wizard Checkbox / Consent */
.wizard-consent {
    margin-top: 24px;
}

    .wizard-consent .consent-label {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        cursor: pointer;
        line-height: 1.4;
        user-select: none;
    }

    /* Wizard Consent – Bootstrap-like, aber theme-friendly */
    .wizard-consent .consent-label {
        display: flex;
        align-items: center; /* wichtig: wirkt bei 1 Zeile “normal” */
        gap: 10px;
        cursor: pointer;
    }

    .wizard-consent input[type="checkbox"] {
        /* native checkbox behalten -> Häkchen nie kaputt */
        width: 1.05em;
        height: 1.05em;
        margin: 0;
        flex: 0 0 auto;
        accent-color: #3b82f6; /* Theme-Blau */
    }

    .wizard-consent .consent-text {
        font-size: 14px;
        line-height: 1.45;
        color: #334155;
    }

    .wizard-consent input[type="checkbox"]:focus-visible {
        outline: none;
        box-shadow: 0 0 0 2px rgba(59,130,246,.25);
        border-radius: 4px; /* wirkt je nach Browser */
    }