/* PV Green Förderportal — customer-facing styles */
/* Mobile-first, responsive, PV Green brand */

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

:root {
    --green: #9ac43a;
    --green-light: #b0d45e;
    --green-bg: #f0f7e0;
    --gray-50: #f8f9fa;
    --gray-100: #f0f2f5;
    --gray-200: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-600: #666;
    --gray-800: #333;
    --red: #d32f2f;
    --radius: 10px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ============================================
   Auth Section
   ============================================ */

#auth-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    z-index: 9999;
}

#auth-card {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 520px;
    margin: 16px;
}

#auth-card h1 {
    font-size: 22px;
    text-align: center;
    margin-bottom: 24px;
    color: var(--green);
}

.brand-pvgreen {
    color: #3c3c3b;
}

.auth-step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.auth-step-info {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 20px;
}

.legal-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    font-size: 12px;
    color: var(--gray-600);
}

.legal-footer a {
    color: var(--gray-600);
    text-decoration: none;
}

.legal-footer a:hover {
    text-decoration: underline;
    color: var(--green);
}

.legal-footer-sep {
    margin: 0 8px;
    color: var(--gray-400);
}

.legal-footer-app {
    margin-top: 48px;
    padding: 16px 0 24px;
    border-top: 1px solid var(--gray-200);
}

.auth-step-info a {
    color: var(--green);
    text-decoration: underline;
}

.program-info-highlight {
    margin-top: 8px;
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--gray-600);
    margin-top: -18px;
    margin-bottom: 20px;
}

.program-info {
    background: var(--green-bg);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--gray-800);
}

.program-info p {
    margin-bottom: 8px;
}

.program-info ul {
    margin: 0;
    padding-left: 18px;
}

.program-info li {
    margin-bottom: 2px;
}

#auth-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

#auth-card input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
}

#auth-card input:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(154, 196, 58, 0.25);
}

#auth-card button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 4px;
}

#auth-request-btn,
#auth-verify-btn {
    background: var(--green);
    color: #fff;
}

#auth-request-btn:hover,
#auth-verify-btn:hover {
    background: var(--green-light);
}

#auth-request-btn:disabled,
#auth-verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-link {
    background: none !important;
    color: var(--green) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    margin-top: 8px !important;
}

.btn-link:hover {
    text-decoration: underline;
}

.auth-info {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ============================================
   Error & Spinner
   ============================================ */

.error-msg {
    background: #fce4ec;
    color: var(--red);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 12px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 12px auto;
}

.spinner-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.spinner-full .spinner {
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   App Layout
   ============================================ */

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* App-Topbar — bewusst auf #app > header gescoped: ein nackter header-Selektor
   würde position:sticky/z-index auch auf verschachtelte <header>-Elemente
   (.vorgang-header, .docs-hero) vererben, die dann beim Scrollen über der
   Topbar kleben. */
#app > header {
    background: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

#app > header h1 {
    font-size: 18px;
    color: var(--green);
}

#user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--gray-600);
}

#user-info .btn-faq,
#user-info .btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--gray-800);
    font-size: 13px;
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

#user-info .btn-faq svg,
#user-info .btn-logout svg {
    width: 15px;
    height: 15px;
    color: var(--gray-600);
    flex-shrink: 0;
}

#user-info .btn-faq:hover,
#user-info .btn-logout:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--gray-800);
}

#user-info .btn-faq:hover svg,
#user-info .btn-logout:hover svg {
    color: var(--gray-800);
}

#user-info .btn-faq:active,
#user-info .btn-logout:active {
    background: rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
    #user-info .btn-faq span,
    #user-info .btn-logout span {
        display: none;
    }
    #user-info .btn-faq,
    #user-info .btn-logout {
        padding: 8px;
    }
}

#main-content {
    flex: 1;
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    padding: 20px 16px;
}

/* ============================================
   Dashboard
   ============================================ */

.welcome {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

#applications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

#applications-header h2 {
    font-size: 18px;
}

/* (legacy #new-application-btn styling removed — replaced by .btn-register-property) */

.btn-edit-profile {
    background: none;
    border: none;
    color: var(--green);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
}

.btn-edit-profile:hover {
    text-decoration: underline;
}

.success-msg {
    background: var(--green-bg);
    color: var(--green);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 12px;
}

#profile-form {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

#profile-form h2 {
    margin-bottom: 24px;
}

#profile-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
}

#profile-btn:hover {
    background: var(--green-light);
}

#profile-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.empty-msg {
    text-align: center;
    color: var(--gray-600);
    padding: 40px 20px;
    font-size: 14px;
}

/* Application Cards */
.application-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.15s;
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.app-number {
    font-weight: 600;
    font-size: 15px;
}

.app-date {
    font-size: 13px;
    color: var(--gray-600);
}

.progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.progress-label {
    font-size: 12px;
    color: var(--gray-600);
}

.progress-current {
    font-size: 12px;
    color: var(--green);
    font-weight: 500;
}

/* Expandable card sections */
.card-section {
    border-top: 1px solid var(--gray-200);
}

.section-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 8px;
}

.section-header:hover {
    background: var(--gray-50);
    margin: 0 -20px;
    padding: 10px 20px;
    width: calc(100% + 40px);
    border-radius: 0;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
}

.section-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--green-bg);
    color: var(--green);
    padding: 1px 8px;
    border-radius: 10px;
}

.section-chevron {
    font-size: 12px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.section-body {
    padding-bottom: 10px;
}

.task-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
}

.task-row-icon {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    font-size: 12px;
}

.task-done .task-row-icon {
    color: var(--green);
    font-weight: bold;
}

.task-active .task-row-icon {
    color: var(--green);
}

.task-active .task-row-subject {
    font-weight: 600;
}

.task-pending .task-row-icon {
    color: var(--gray-400);
}

.task-pending .task-row-subject {
    color: var(--gray-400);
}


.template-btn {
    background: var(--green-bg);
    border: 1px solid var(--green);
    color: var(--green);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.template-btn:hover {
    background: var(--green);
    color: #fff;
}

.template-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Templates list inside section */
.templates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.doc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    background: var(--gray-50);
    font-size: 13px;
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: var(--gray-800);
}

.doc-row:hover {
    background: var(--green-bg);
    border-color: var(--green);
}

.doc-row:disabled {
    opacity: 0.5;
}

.doc-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--gray-600);
}

.doc-name {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-date {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--gray-600);
}

.doc-empty {
    font-size: 13px;
    color: var(--gray-600);
    padding: 4px 0;
}

/* Document checklist */
.checklist-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-200);
}

.checklist-row:last-of-type {
    border-bottom: none;
}

.checklist-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.checklist-done {
    background: var(--green);
    color: #fff;
}

.checklist-auto {
    background: var(--green-bg);
    color: var(--green);
    font-size: 10px;
}

.checklist-missing {
    border: 2px solid var(--gray-400);
    color: var(--gray-400);
    font-size: 10px;
}

.checklist-label {
    flex: 1;
    line-height: 20px;
}

.checklist-pending .checklist-label {
    color: var(--gray-600);
}

.checklist-optional {
    font-size: 11px;
    color: var(--gray-400);
}

.checklist-note {
    display: block;
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 2px;
}

.checklist-note a {
    color: var(--green);
    text-decoration: underline;
}

.checklist-note a:hover {
    text-decoration: none;
}

.checklist-downloadable {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.checklist-downloadable:hover {
    background: var(--green-bg);
    border-radius: 4px;
}

.checklist-dl-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--green);
}

.checklist-row-with-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--gray-200);
}

.checklist-row-with-actions:last-of-type {
    border-bottom: none;
}

.checklist-row-with-actions .checklist-row,
.checklist-row-with-actions .doc-row {
    flex: 1;
    border-bottom: none;
}

.checklist-template-btn {
    flex-shrink: 0;
    background: var(--green-bg);
    border: 1px solid var(--green);
    color: var(--green);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.checklist-info-btn {
    background: #fff !important;
    border-color: var(--gray-400) !important;
    color: var(--gray-600) !important;
}

.checklist-info-btn:hover {
    background: var(--gray-50) !important;
    color: var(--gray-800) !important;
}

.checklist-template-btn:hover {
    background: var(--green);
    color: #1a3a00;
}

.checklist-delete-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
}

.checklist-delete-btn:hover {
    color: var(--red);
    background: #fce4ec;
}

.checklist-divider {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
    margin-top: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--gray-200);
}

.doc-upload-area {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-file-btn {
    display: inline-block;
    background: var(--gray-50);
    border: 1px dashed var(--gray-400);
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--green);
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

.upload-file-btn:hover {
    background: var(--green-bg);
    border-color: var(--green);
}

.upload-file-btn input[type="file"] {
    display: none;
}

.upload-filename {
    font-size: 12px;
    color: var(--gray-600);
    word-break: break-all;
}

.upload-step2 {
    display: flex;
    gap: 8px;
    align-items: center;
}

.doc-type-select {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
}

.upload-submit-btn {
    flex-shrink: 0;
    padding: 7px 16px;
    background: var(--green);
    color: #1a3a00;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.upload-submit-btn:hover {
    background: var(--green-light);
}

.upload-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Document sections — grouped list cards */
.doc-group-section {
    margin-bottom: 18px;
}

.doc-group-section:last-of-type {
    margin-bottom: 0;
}

.doc-group-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray-600);
    margin: 0 0 8px 4px;
}

.doc-group-list {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    overflow: hidden;
}

.doc-row-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.15s ease;
}

.doc-row-card:last-child {
    border-bottom: none;
}

.doc-row-card:hover {
    background: rgba(0, 0, 0, 0.02);
}

.doc-row-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    color: var(--gray-600);
}

.doc-row-icon svg {
    width: 20px;
    height: 20px;
}

.doc-row-icon-done {
    color: var(--green);
}

.doc-row-icon-waiting {
    color: var(--gray-400);
    background: var(--gray-50);
}

.doc-row-icon-missing {
    color: #2563eb;
    background: #eaf2ff;
    box-shadow: none;
}

.doc-row-icon-neutral {
    color: var(--gray-600);
}

.doc-row-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    padding-top: 2px;
}

.doc-row-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-row-sub {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.3;
}

.doc-row-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 4px;
    margin-top: 8px;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.doc-link svg {
    width: 13px;
    height: 13px;
    color: var(--gray-400);
    transition: color 0.15s ease;
}

.doc-link:hover {
    color: var(--green);
}

.doc-link:hover svg {
    color: var(--green);
}

.doc-link-primary {
    padding: 6px 12px;
    background: #fff;
    color: var(--green);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-weight: 700;
    margin-right: 4px;
}

.doc-link-primary svg {
    width: 14px;
    height: 14px;
    color: var(--green);
}

.doc-link-primary:hover {
    background: var(--green);
    color: #1a3a00;
    box-shadow: 0 2px 6px rgba(154, 196, 58, 0.35);
}

.doc-link-primary:hover svg {
    color: #1a3a00;
}

.doc-link-danger:hover {
    color: #b83838;
}

.doc-link-danger:hover svg {
    color: #b83838;
}

.doc-link-sep {
    color: rgba(0, 0, 0, 0.15);
    font-size: 12px;
    user-select: none;
    margin: 0 2px;
}

/* Hide separator if it's right after a primary button (the pill itself provides the break) */
.doc-link-primary + .doc-link-sep {
    display: none;
}

.doc-row-side {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding-top: 2px;
}

.doc-row-side .doc-row-links {
    margin-top: 0;
    justify-content: flex-end;
}

.doc-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.doc-pill .doc-pill-dot {
    width: 5px;
    height: 5px;
}

.doc-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.doc-pill-done {
    background: var(--green-bg);
}

.doc-pill-done .doc-pill-dot {
    background: var(--green);
}

.doc-pill-auto {
    background: #f3eeff;
}

.doc-pill-auto .doc-pill-dot {
    background: #8b5cf6;
}

.doc-pill-missing {
    background: #eaf2ff;
}

.doc-pill-missing .doc-pill-dot {
    background: #2563eb;
}

.doc-pill-waiting {
    background: rgba(0, 0, 0, 0.06);
}

.doc-pill-waiting .doc-pill-dot {
    background: var(--gray-400);
}

.doc-pill-neutral {
    background: rgba(0, 0, 0, 0.06);
    color: var(--gray-800);
}

.doc-pill-neutral .doc-pill-dot {
    background: var(--gray-400);
}

/* Upload card */
.doc-upload-card {
    margin-top: 22px;
    padding: 18px 18px 16px;
    background: #fff;
    border: 1px dashed rgba(0, 0, 0, 0.12);
    border-radius: 16px;
}

.doc-upload-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.doc-upload-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--green-bg);
    color: var(--green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.doc-upload-texts {
    flex: 1;
    min-width: 0;
}

.doc-upload-title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}

.doc-upload-sub {
    margin: 0;
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.4;
}

.doc-upload-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-upload-body .upload-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    background: var(--gray-50);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--gray-800);
    font-weight: 600;
}

.doc-upload-body .upload-file-btn svg {
    width: 16px;
    height: 16px;
    color: var(--green);
}

.doc-upload-body .upload-file-btn:hover {
    background: var(--green-bg);
    border-color: transparent;
}

.doc-upload-body .upload-filename {
    font-size: 12px;
    color: var(--gray-600);
}

.doc-upload-body .upload-step2 {
    display: flex;
    gap: 8px;
    align-items: center;
}

.doc-upload-body .doc-type-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 13px;
    background: #fff;
}

.doc-upload-body .upload-submit-btn {
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--green);
    color: #1a3a00;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.doc-upload-body .upload-submit-btn:hover {
    background: var(--green-light);
}

@media (max-width: 640px) {
    .doc-row-card {
        flex-wrap: wrap;
    }
    .doc-row-side {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
}

/* Customer data fields */
.data-group-hidden {
    display: none !important;
}

.data-group {
    position: relative;
    margin: 0;
    padding: 20px 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.data-group:first-of-type { padding-top: 4px; }
.data-group:last-of-type { border-bottom: none; padding-bottom: 4px; }

/* When fields share a row, they must claim equal width */
.form-row > .data-field {
    flex: 1;
    min-width: 0;
}


.data-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: var(--gray-800);
    text-align: left;
}

.data-group-title {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.005em;
}

.data-group-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.data-group-collapsed .data-group-chevron {
    transform: rotate(-90deg);
}

.data-group-body {
    margin-top: 12px;
    overflow: hidden;
}

.data-group-collapsed .data-group-body {
    display: none;
}

.data-group-prefill-row {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 14px;
}

.data-group-prefill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: var(--gray-800);
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.data-group-prefill svg {
    width: 13px;
    height: 13px;
    color: var(--gray-600);
    transition: color 0.15s ease;
}

.data-group-prefill:hover {
    background: rgba(0, 0, 0, 0.07);
}

.data-group-prefill:active {
    transform: scale(0.98);
    background: rgba(0, 0, 0, 0.1);
}

.data-group-prefill-done {
    background: var(--green-bg) !important;
    color: var(--green) !important;
}

.data-group-prefill-done svg {
    color: var(--green) !important;
}

/* Completed groups: subtle visual cue */
.data-group-complete .data-group-title {
    color: var(--gray-600);
}

.data-group-complete .data-group-toggle:hover .data-group-title,
.data-group-toggle:hover .data-group-chevron {
    color: var(--gray-800);
}

/* Legacy rule kept for backwards compatibility — rendered as the toggle button now */
.data-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.005em;
}

.data-group-info {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 12px;
    line-height: 1.5;
}

.data-group-info a {
    color: var(--green);
    text-decoration: underline;
}

.data-group-info a:hover {
    text-decoration: none;
}

.data-field {
    margin-bottom: 8px;
}

.data-field > label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 2px;
}

.data-field select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    background: #fff;
}

.data-field select:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(154, 196, 58, 0.2);
}

.data-field-locked-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-600);
    background: var(--gray-50);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--green);
    margin-bottom: 8px;
}

.lock-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: var(--green);
}

.data-group-locked .data-field input,
.data-group-locked .data-field select {
    background: var(--gray-50);
    color: var(--gray-600);
    cursor: not-allowed;
}

.data-field-info {
    display: block;
    font-size: 11px;
    color: var(--gray-600);
    margin-top: 3px;
    font-style: italic;
}

.data-field input:not([type="radio"]):not([type="checkbox"]) {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
}

.data-field input:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(154, 196, 58, 0.2);
}

label.data-checkbox,
label.data-radio {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: normal;
    color: var(--gray-800);
    cursor: pointer;
    margin-bottom: 0;
}

label.data-checkbox > input,
label.data-radio > input {
    margin-top: 3px;
    accent-color: var(--green);
    flex-shrink: 0;
}

label.data-radio {
    border-bottom: 1px solid var(--gray-200);
}

label.data-radio:last-child {
    border-bottom: none;
}

.data-entry {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
}

.data-field-inline {
    margin-bottom: 6px;
}

.data-remove-entry {
    background: none;
    border: none;
    color: var(--red);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
}

.data-remove-entry:hover {
    text-decoration: underline;
}

.data-add-entry {
    background: none;
    border: 1px dashed var(--gray-400);
    border-radius: 5px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--green);
    cursor: pointer;
    width: 100%;
}

.data-add-entry:hover {
    background: var(--green-bg);
    border-color: var(--green);
}

.data-save-btn {
    display: block;
    width: 50%;
    max-width: 320px;
    padding: 12px 20px;
    margin: 28px auto 0;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(154, 196, 58, 0.22);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.data-save-btn:active {
    transform: scale(0.98);
}

/* IBAN field visual feedback + BIC autofill flash */
.data-field input.iban-valid {
    border-color: var(--green) !important;
    box-shadow: 0 0 0 2px rgba(154, 196, 58, 0.18) !important;
}

.data-field input.iban-invalid {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15) !important;
}

.data-field input.bic-autofilled {
    animation: bic-flash 1.2s ease-out;
}

@keyframes bic-flash {
    0%   { background: var(--green-bg); border-color: var(--green); }
    100% { background: #fff; }
}

@media (max-width: 640px) {
    .data-save-btn {
        width: 100%;
        max-width: none;
    }
}

.data-save-btn:hover {
    background: var(--green-light);
}

.data-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.subtype-selector {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 3px solid var(--green);
}

.subtype-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

/* Form section heading + helper text (property form) */
.form-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 24px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gray-200);
}

.form-source {
    color: var(--green);
    font-weight: 600;
    font-size: 13px;
    margin-top: -8px;
    margin-bottom: 18px;
}

.form-help {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 8px;
}

.form-help-block {
    margin-top: 24px;
}

.form-help-list {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
    margin: 0 0 8px 22px;
}

.form-help-note {
    font-style: italic;
    margin-bottom: 16px;
}

/* Applicant type selector */
.type-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.type-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    flex-wrap: wrap;
}

.type-option:hover {
    border-color: var(--green);
}

.type-option.selected {
    border-color: var(--green);
    background: var(--green-bg);
}

.type-option input[type="radio"] {
    accent-color: var(--green);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.type-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    min-width: 150px;
}

.type-info {
    font-size: 13px;
    color: var(--green);
    margin-top: 6px;
    padding: 8px 12px;
    background: var(--green-bg);
    border-radius: 6px;
}

/* Applicant type on card */
.app-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 4px;
}

.app-type-label {
    font-weight: 500;
}

.app-tech {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

/* Document upload */
.doc-upload {
    margin-top: 8px;
}

.upload-btn {
    display: inline-block;
    background: var(--gray-50);
    border: 1px dashed var(--gray-400);
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--green);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.upload-btn:hover {
    background: var(--green-bg);
    border-color: var(--green);
}

.upload-btn input[type="file"] {
    display: none;
}

/* Page-title headings (consistent across main views) */
#register h2,
#edit-profile h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

/* ============================================
   New Application (Immobilie registrieren) — redesigned
   ============================================ */

#new-application .hero {
    margin-bottom: 48px;
    margin-top: 8px;
}

#new-application .hero-kicker {
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

#new-application .hero-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--gray-800);
    margin-bottom: 18px;
}

#new-application .hero-lede {
    font-size: 17px;
    line-height: 1.65;
    color: var(--gray-600);
    max-width: 620px;
    font-weight: 400;
}

/* Step sections */
#new-application .step-section {
    background: #fff;
    border-radius: 28px;
    padding: 56px 56px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 32px;
}

#new-application .step-kicker {
    color: var(--green);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-align: center;
}

#new-application .step-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 14px;
    text-align: center;
    letter-spacing: -0.005em;
    line-height: 1.35;
}

#new-application .step-help {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 auto 24px;
    text-align: center;
    max-width: 560px;
}

/* Inline help hint: question-mark icon with on-hover tooltip */
.help-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    position: relative;
    vertical-align: middle;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.help-hint:hover,
.help-hint:focus-visible {
    background: var(--green);
    color: #fff;
    outline: none;
}

.help-hint::after {
    content: attr(data-hint);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 280px;
    padding: 10px 14px;
    background: var(--gray-800);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.01em;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 50;
    text-align: left;
    white-space: normal;
}

.help-hint::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--gray-800);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 50;
}

.help-hint:hover::after,
.help-hint:hover::before,
.help-hint:focus-visible::after,
.help-hint:focus-visible::before {
    opacity: 1;
}

/* Reuse prior organization data banner */
.org-reuse-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 20px;
    background: var(--green-bg);
    border: 1px solid rgba(154, 196, 58, 0.35);
    border-radius: 14px;
}

.org-reuse-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.org-reuse-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
}

.org-reuse-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-reuse-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: #fff;
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.org-reuse-btn:hover {
    background: var(--green);
    color: #fff;
}

/* Gruppen-Selektor (Eigentums-Frage, Level 1) — tile style (scoped) */
#new-application .group-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

#new-application .group-selector .type-option {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 20px;
    border-radius: 22px;
    border: 1px solid var(--gray-200);
    background: #fff;
    position: relative;
    gap: 20px;
    flex-wrap: nowrap;
    min-height: 210px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#new-application .group-selector .type-option:hover {
    border-color: rgba(154, 196, 58, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: #fff;
}

#new-application .group-selector .type-option.selected,
#new-application .group-selector .type-option:focus-within {
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(154, 196, 58, 0.18);
}

#new-application .group-selector .type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#new-application .group-selector .type-option-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    min-width: 0;
    flex: 0 0 auto;
}

#new-application .group-selector .type-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.45;
    hyphens: auto;
    overflow-wrap: break-word;
    text-align: center;
    letter-spacing: 0.005em;
}

#new-application .group-selector .type-sublabel {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-600);
    line-height: 1.5;
    hyphens: auto;
    overflow-wrap: break-word;
    text-align: center;
    white-space: pre-line;
}

.type-option-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--gray-50);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

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

#new-application .group-selector .type-option:hover .type-option-icon,
#new-application .group-selector .type-option.selected .type-option-icon {
    background: var(--green-bg);
    color: var(--green);
}

.type-option-check {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    color: var(--green);
}

#new-application .group-selector .type-option.selected .type-option-check {
    display: block;
}

/* Subtype selector — list-style under tiles */
#new-application .subtype-selector {
    margin-top: 24px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 16px;
    border-left: none;
}

#new-application .subtype-selector .subtype-label {
    text-align: left;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
}

#new-application .subtype-selector .type-option {
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--gray-200);
    margin-bottom: 8px;
    padding: 12px 16px;
    min-height: 0;
    flex-direction: row;
    text-align: left;
}

#new-application .subtype-selector .type-option:last-child {
    margin-bottom: 0;
}

#new-application .subtype-selector .type-option.selected {
    background: var(--green-bg);
    border-color: var(--green);
    box-shadow: none;
}

#new-application .subtype-selector .type-option input[type="radio"] {
    position: static;
    opacity: 1;
    pointer-events: auto;
    accent-color: var(--green);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Zweizeilige Subtyp-Zeilen: Label + immer sichtbarer Hinweis (hint · Frist) */
#new-application .subtype-selector .type-option-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

#new-application .subtype-selector .type-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.4;
}

#new-application .subtype-selector .type-hint {
    font-size: 13px;
    font-weight: 400;
    color: var(--gray-600);
    line-height: 1.45;
}

/* Info callout */
#new-application .info-callout {
    display: flex;
    gap: 20px;
    padding: 24px 28px;
    background: var(--green-bg);
    border-radius: 20px;
    border: 1px solid rgba(154, 196, 58, 0.25);
    margin-bottom: 32px;
}

#new-application .info-callout-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: var(--green);
    margin-top: 2px;
}

#new-application .info-callout-body {
    font-size: 14px;
    color: var(--gray-800);
    line-height: 1.6;
}

#new-application .info-callout-title {
    font-weight: 700;
    margin-bottom: 6px;
}

#new-application .info-callout-body ol {
    margin: 8px 0 8px 22px;
}

#new-application .info-callout-body ol li {
    margin-bottom: 4px;
}

#new-application .info-callout-note {
    font-style: italic;
    color: var(--gray-600);
    margin-top: 10px;
}

/* Form fields inside new-application get a softer look */
#new-application .form-group label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 6px;
}

#new-application .form-group input,
#new-application .form-group select {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    background: #fff;
    font-size: 15px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#new-application .form-group input:focus,
#new-application .form-group select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(154, 196, 58, 0.22);
}

/* Form footer with disclaimer + CTA */
#new-application .form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}

#new-application .form-footer-note {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
    max-width: 360px;
}

#new-application .form-footer-note a {
    color: var(--green);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* CTA button — pill with green gradient */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(154, 196, 58, 0.28);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(154, 196, 58, 0.36);
}

.btn-cta:active {
    transform: translateY(0);
}

.btn-cta svg {
    width: 20px;
    height: 20px;
}

.btn-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Checkbox confirmation row */
#new-application .form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    margin-top: 16px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

#new-application .form-check:hover {
    background: var(--green-bg);
    border-color: rgba(154, 196, 58, 0.4);
}

#new-application .form-check input[type="checkbox"] {
    accent-color: var(--green);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    cursor: pointer;
}

#new-application .form-check span {
    font-size: 14px;
    color: var(--gray-800);
    line-height: 1.5;
}

/* Technical details section — two-column with live preview */
#new-application .tech-details-layout {
    display: flex;
    gap: 32px;
    align-items: stretch;
}

#new-application .tech-details-fields {
    flex: 1;
    min-width: 0;
}

#new-application .input-with-icon {
    position: relative;
}

#new-application .input-with-icon input {
    padding-right: 44px;
}

#new-application .input-with-icon svg {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    pointer-events: none;
}

#new-application .input-with-icon input:focus ~ svg {
    color: var(--green);
}

/* Install preview card */
.install-preview {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 247, 224, 0.6) 100%);
    border: 1px solid rgba(154, 196, 58, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.install-preview-title {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green);
    margin: 0;
}

.install-preview-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Flow diagram */
.preview-flow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.preview-node {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gray-50);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-node svg {
    width: 20px;
    height: 20px;
}

.preview-node-active {
    background: var(--green-bg);
    color: var(--green);
}

.preview-path {
    flex: 1;
    position: relative;
    height: 4px;
    border-radius: 999px;
    background: var(--gray-100);
    overflow: hidden;
}

.preview-path-fill {
    position: absolute;
    inset: 0;
    background: rgba(154, 196, 58, 0.28);
    animation: preview-pulse 2.4s ease-in-out infinite;
}

.preview-path-dots {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 3px;
}

.preview-path-dots span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(154, 196, 58, 0.55);
}

@keyframes preview-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.preview-caption {
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-600);
    margin: 0;
}

/* Stat cards */
.preview-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.preview-stat {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.preview-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.preview-stat-value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-stat-value span {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1;
}

.preview-stat-value svg {
    width: 14px;
    height: 14px;
    color: var(--green);
}

/* Stellplätze spots grid */
.preview-spots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.preview-spots-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.preview-spots-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-600);
}

.preview-spots-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-800);
    font-variant-numeric: tabular-nums;
}

.preview-spots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 12px;
    max-height: 96px;
    overflow: hidden;
}

.preview-spot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--gray-200);
    transition: background 0.15s;
}

.preview-spot-lp {
    background: var(--green);
    box-shadow: 0 0 0 1px rgba(154, 196, 58, 0.3);
}

.preview-spot-vlp {
    background: var(--green-light);
    opacity: 0.75;
}

.preview-spots-legend {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: var(--gray-600);
}

.preview-spots-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Status row */
.preview-status {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-400);
    flex-shrink: 0;
}

.preview-status.ready .preview-status-dot {
    background: var(--green);
    animation: preview-pulse 1.6s ease-in-out infinite;
}

.preview-status.error .preview-status-dot {
    background: var(--danger, #d94242);
    animation: none;
}

.preview-status-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-600);
}

.preview-status.error .preview-status-text {
    color: var(--danger, #d94242);
}

/* Decorative blurred blobs */
.install-preview-blob {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(154, 196, 58, 0.12);
    filter: blur(40px);
    pointer-events: none;
}

.install-preview-blob-tl { top: -60px; left: -60px; }
.install-preview-blob-br { bottom: -60px; right: -60px; }

/* Technical details rendering inside the customer-data panel */
.tech-details-group .tech-details-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.tech-details-group .tech-details-fields {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-details-group .install-preview {
    width: 100%;
    flex: 0 0 auto;
    overflow: hidden;
}

.tech-details-group .stellplaetze-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    font-size: 13px;
}

.tech-details-group .stellplaetze-info strong {
    font-size: 16px;
    color: var(--gray-800);
    font-variant-numeric: tabular-nums;
}

.tech-details-group .stellplaetze-info small {
    color: var(--gray-600);
    font-size: 11px;
}

/* Responsive */
@media (max-width: 860px) {
    #new-application .step-section {
        padding: 36px 28px;
    }
    #new-application .tech-details-layout {
        flex-direction: column;
    }
    #new-application .install-preview {
        flex: 0 0 auto;
    }
}

@media (max-width: 720px) {
    #new-application .hero-title {
        font-size: 26px;
    }
    #new-application .step-section {
        padding: 28px 22px;
        border-radius: 20px;
    }
    #new-application .step-title {
        font-size: 20px;
    }
    #new-application .group-selector {
        grid-template-columns: 1fr;
    }
    #new-application .group-selector .type-option {
        flex-direction: row;
        text-align: left;
        min-height: 0;
        padding: 18px 20px;
    }
    #new-application .group-selector .type-label {
        text-align: left;
    }
    #new-application .form-footer {
        flex-direction: column;
        align-items: stretch;
    }
    #new-application .form-footer-note {
        max-width: none;
    }
    .btn-cta {
        width: 100%;
    }
}

.card-actions {
    margin-top: 10px;
    border-top: 1px solid var(--gray-200);
    padding-top: 8px;
    text-align: right;
}

.btn-withdraw {
    background: none;
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-withdraw:hover {
    background: #fce4ec;
}

.btn-withdraw:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.profile-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-delete-account {
    background: transparent;
    border: 1px solid var(--gray-400);
    color: var(--gray-600);
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-delete-account:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.error-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px 20px;
    text-align: center;
    color: var(--red);
}

.error-card button {
    margin-top: 16px;
    background: var(--green);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* ============================================
   Application Detail
   ============================================ */

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 12px;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: var(--gray-800);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: 999px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-back::before {
    content: '';
    width: 7px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 2px;
    opacity: 0.7;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-back:hover {
    background: rgba(0, 0, 0, 0.07);
    text-decoration: none;
    color: var(--gray-800);
}

.btn-back:hover::before {
    transform: rotate(45deg) translate(-1px, 1px);
    opacity: 1;
}

.btn-back:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.98);
}

#detail-header h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.detail-date {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 24px;
}

/* Task Stepper */
.task-stepper {
    padding: 0;
}

.step {
    display: flex;
    gap: 14px;
    position: relative;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 28px;
}

.step-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.done-icon {
    background: var(--green);
    color: #fff;
}

.active-icon {
    background: #fff;
    border: 3px solid var(--green);
    position: relative;
}

.active-icon::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--green);
    border-radius: 50%;
    position: absolute;
}

.pending-icon {
    background: #fff;
    border: 2px solid var(--gray-400);
}

.step-connector {
    width: 2px;
    flex: 1;
    min-height: 24px;
    margin: 4px 0;
}

.step.done .step-connector {
    background: var(--green);
}

.step.active .step-connector,
.step.pending .step-connector {
    background: var(--gray-400);
}

.step-content {
    padding-bottom: 20px;
    flex: 1;
}

.step-subject {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    line-height: 28px; /* align with icon */
}

.step-description {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.4;
}

.step.pending .step-subject {
    color: var(--gray-400);
}

.step.pending .step-description {
    color: var(--gray-400);
}

/* ============================================
   Registration Form
   ============================================ */

.info-text {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 20px;
}

#register-form {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group {
    flex: 1;
    margin-bottom: 14px;
}

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

.form-group select {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    color: var(--gray-800);
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 1.4;
}

.form-group select:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(154, 196, 58, 0.25);
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(154, 196, 58, 0.25);
}

#register-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
}

#register-btn:hover {
    background: var(--green-light);
}

#register-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   FAQ Button & Modal
   ============================================ */

.btn-faq {
    background: var(--green-bg);
    border: none;
    color: var(--gray-800);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-faq:hover {
    background: #e4efd0;
    color: var(--gray-800);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-content-lg {
    max-width: 760px;
    max-height: 90vh;
}

.modal-intro {
    background: var(--green-bg);
    color: var(--gray-800);
    border-left: 3px solid var(--green);
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.modal-footer .btn-primary {
    background: var(--green);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.modal-footer .btn-primary:hover {
    background: var(--green-light);
}

.modal-footer .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-footer .btn-secondary {
    background: #fff;
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.modal-footer .btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-800);
}

.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
}

.modal-body p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-800);
}

.modal-body p a {
    color: var(--green);
    text-decoration: underline;
    word-break: break-all;
}

.modal-body p a:hover {
    text-decoration: none;
}

.modal-body details {
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 0;
}

.modal-body details:last-child {
    border-bottom: none;
}

.modal-body summary {
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body summary::before {
    content: '+';
    font-size: 18px;
    font-weight: 400;
    color: var(--green);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.modal-body details[open] summary::before {
    content: '-';
}

.modal-body summary::-webkit-details-marker {
    display: none;
}

.modal-body details p,
.modal-body details ul {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--gray-600);
}

.modal-body details ul {
    padding-left: 20px;
}

.modal-body details li {
    margin-bottom: 4px;
}

.modal-body details a {
    color: var(--green);
    font-weight: 500;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 500px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    #applications-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    #app > header h1 {
        font-size: 16px;
    }

    #user-info span {
        display: none;
    }
}

/* ============================================
   Dashboard — redesigned (sidebar + Aktueller Vorgang)
   ============================================ */

.dashboard-welcome-section {
    margin-bottom: 32px;
}

.dashboard-welcome-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.dashboard-welcome-title .welcome-name {
    color: var(--green);
}

.dashboard-welcome-sub {
    font-size: 16px;
    color: var(--gray-600);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 20px;
}

/* Mobile drawer — hidden on desktop, used only below the 900px breakpoint.
   Kept out of the media query so elements exist in the DOM from the start
   and aria state survives resize. */
.dashboard-mobile-bar {
    display: none;
}

.dashboard-drawer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.dashboard-drawer-toggle svg {
    width: 18px;
    height: 18px;
}
.dashboard-drawer-toggle:hover {
    background: var(--gray-50, #f7f7f7);
}

.dashboard-drawer-scrim {
    display: none;
}

.property-panel {
    background: #fff;
    border-radius: 24px;
    padding: 18px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Documents view — vorgang context sidebar + main panel */
.vorgang-context-panel {
    background: #fff;
    border-radius: 32px;
    padding: 28px 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.vorgang-context-panel .context-header {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.vorgang-context-panel .context-kicker {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.vorgang-context-panel .context-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--gray-800);
}

.vorgang-context-panel .context-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.vorgang-context-panel .context-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.vorgang-context-panel .context-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c8ccd4;
}

.vorgang-context-panel .context-value {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.4;
    overflow-wrap: break-word;
}

/* =========================
   Documents view — main layout
   ========================= */
.docs-legacy-target { display: none !important; }

.docs-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 28px 32px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 28px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.docs-hero-text { flex: 1 1 380px; min-width: 0; }

.docs-hero-text h1 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--gray-800);
    line-height: 1.15;
}

.docs-hero-text p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--gray-600);
    max-width: 560px;
}

.docs-progress-widget {
    flex: 0 0 auto;
    min-width: 260px;
    background: var(--gray-50);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.docs-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.docs-progress-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray-600);
}

.docs-progress-percent {
    font-size: 22px;
    font-weight: 800;
    color: var(--green);
}

.docs-progress-track {
    height: 6px;
    background: var(--gray-100);
    border-radius: 999px;
    overflow: hidden;
}

.docs-progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.docs-progress-note {
    margin: 0;
    font-size: 13px;
    color: var(--gray-600);
}

/* Upload Hero */
.docs-upload-hero-slot { margin-bottom: 48px; }

.docs-upload-hero {
    position: relative;
    padding: 48px 28px;
    background: #fff;
    border-radius: 32px;
    border: 2px dashed rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.docs-upload-hero:hover {
    border-color: var(--green);
    background: var(--green-bg);
}

.docs-upload-hero-glow {
    position: absolute;
    inset: -8px;
    background: linear-gradient(135deg, rgba(154, 196, 58, 0.15), rgba(154, 196, 58, 0));
    filter: blur(24px);
    border-radius: 40px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.docs-upload-hero:hover .docs-upload-hero-glow { opacity: 1; }

.docs-upload-hero-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.docs-upload-hero-icon {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: var(--green-bg);
    color: var(--green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.docs-upload-hero-icon svg {
    width: 36px;
    height: 36px;
}

.docs-upload-hero-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-800);
    letter-spacing: -0.01em;
}

.docs-upload-hero-sub {
    margin: 0;
    font-size: 14px;
    color: var(--gray-600);
}

.docs-format-pills {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.docs-format-pills span {
    padding: 6px 14px;
    background: var(--gray-50);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-600);
    letter-spacing: 0.04em;
}

.docs-upload-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #fff;
    color: var(--gray-800);
    font-size: 14px;
    font-weight: 700;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    margin-top: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.docs-upload-cta:hover {
    transform: translateY(-1px);
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 6px 16px rgba(154, 196, 58, 0.18);
}

.docs-upload-cta:active { transform: scale(0.98); }

.docs-upload-cta input[type="file"] { display: none; }

.docs-upload-filename {
    font-size: 12px;
    color: var(--gray-600);
    word-break: break-all;
}

.docs-upload-step2 {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 560px;
    margin-top: 4px;
}

.docs-upload-select {
    flex: 1;
    min-width: 220px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    background: #fff;
}

.docs-upload-submit {
    padding: 10px 22px;
    background: var(--green);
    color: #1a3a00;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.docs-upload-submit:hover { background: var(--green-light); }

/* Upload lock — dim upload CTAs while a document upload is in flight so
   the customer doesn't start a second upload that would race weclapp's
   optimistic-lock. Click handler (App._withUploadLock) also blocks with
   an alert; this rule is just visual feedback. */
body.docs-upload-in-progress .docs-upload-cta,
body.docs-upload-in-progress .docs-upload-submit,
body.docs-upload-in-progress .upload-submit-btn {
    opacity: 0.5;
    cursor: wait;
}

/* Grid: 2/3 pending — 1/3 submitted */
.docs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.docs-grid > section {
    min-width: 0;
}

.docs-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-left: 24px;
    padding-right: 12px;
}

.docs-section-head h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-800);
    letter-spacing: -0.01em;
}

.docs-section-pill {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.docs-section-pill-active {
    background: var(--green-bg);
    color: var(--green);
}

.docs-section-pill-done {
    background: var(--green-bg);
    color: var(--green);
}

.docs-section-meta {
    font-size: 13px;
    color: var(--gray-600);
}

/* Pending cards (left column) */
.docs-pending-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.docs-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 28px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: background 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.docs-card:hover {
    background: var(--gray-50);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.docs-card-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.docs-card-head-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Info "i" right next to the doc title — gray default, green on hover */
.docs-card-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 6px;
    padding: 0;
    border: none;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: 50%;
    cursor: help;
    vertical-align: middle;
    transition: background 0.15s, color 0.15s;
}

.docs-card-info-icon svg {
    width: 12px;
    height: 12px;
}

.docs-card-info-icon:hover {
    background: var(--green);
    color: #fff;
}

/* Tooltip-Wrapper — zeigt Note beim Hover ohne Klick */
.docs-card-info-wrap {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}

.docs-card-info-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 320px;
    padding: 10px 14px;
    background: rgba(30, 33, 40, 0.96);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 50;
    white-space: normal;
    text-align: left;
}

.docs-card-info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(30, 33, 40, 0.96);
}

.docs-card-info-wrap:hover .docs-card-info-tooltip,
.docs-card-info-wrap:focus-within .docs-card-info-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

/* Vollmacht-Karte: eingebettete Services-Checkboxen */
.vollmacht-services-list {
    padding: 14px 16px;
    background: var(--green-bg);
    border: 1px solid rgba(154, 196, 58, 0.25);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vollmacht-services-title {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
}

.vollmacht-services-hint {
    margin: 0 0 2px;
    font-size: 11px;
    color: var(--gray-600);
    line-height: 1.5;
}

.vollmacht-service {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-800);
    padding: 4px 2px;
    user-select: none;
}

.vollmacht-service input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.vollmacht-service-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #fff;
    border: 1.5px solid var(--gray-400);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.vollmacht-service-check svg {
    width: 12px;
    height: 12px;
}

.vollmacht-service input:checked ~ .vollmacht-service-check {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.vollmacht-service-label {
    flex: 1;
    line-height: 1.4;
}

/* Vollmacht-Gate — shown on the Vollmacht pending card while any procurable
   doc (Grundbuchauszug, Baulasten, Planunterlagen) is still unresolved.
   Suppresses the template + upload CTAs and tells the customer what to do
   first. */
.vollmacht-gate {
    padding: 14px 16px;
    background: #fff7e6;
    border: 1px solid #f5c87b;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.vollmacht-gate-title {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a85a00;
}
.vollmacht-gate-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--gray-800);
    line-height: 1.5;
}
.vollmacht-gate-list li { margin-bottom: 2px; }
.vollmacht-gate-hint {
    margin: 0;
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Footer-Row mit Upload + Vordruck + CTA nebeneinander */
.docs-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

/* Some cards (z. B. Kostenvoranschlag) sollen ihre CTA-Buttons rechtsbündig zeigen */
.docs-card-footer-right .docs-card-footer {
    justify-content: flex-end;
}

/* Vordruck-Button in unserer UI: gleiches Rounding + Proportionen wie Upload,
   Outline-Look in PV-Green, Hover füllt */
.docs-card-template-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: #fff;
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.docs-card-template-btn svg {
    width: 16px;
    height: 16px;
}

.docs-card-template-btn:hover {
    background: var(--green);
    color: #fff;
}

/* CTA (z.B. "Jetzt beantragen" beim Kostenvoranschlag) — grün gefüllt */
.docs-card-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(154, 196, 58, 0.25);
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.docs-card-cta-btn svg {
    width: 16px;
    height: 16px;
}

.docs-card-cta-btn:hover {
    background: var(--green-light);
    box-shadow: 0 4px 10px rgba(154, 196, 58, 0.35);
    transform: translateY(-1px);
}

/* Delegations-Switch: iOS-style Toggle mit Label */
.docs-delegate-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-800);
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}

.docs-delegate-switch:hover {
    background: var(--green-bg);
    border-color: rgba(154, 196, 58, 0.35);
}

.docs-delegate-switch input[type="checkbox"] {
    /* Visually hide the native checkbox but keep it clickable so the label
       can toggle it normally. Screen-reader accessible. */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.docs-delegate-slider {
    position: relative;
    flex-shrink: 0;
    width: 38px;
    height: 22px;
    background: var(--gray-400);
    border-radius: 9999px;
    transition: background 0.2s;
}

.docs-delegate-slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.docs-delegate-switch input:checked ~ .docs-delegate-slider {
    background: var(--green);
}

.docs-delegate-switch input:checked ~ .docs-delegate-slider::after {
    transform: translateX(16px);
}

.docs-delegate-switch-label {
    flex: 1;
}

/* Per-Card Upload-Button — groß und prominent, verschwindet bei Delegation */
.docs-card-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: #fff;
    color: var(--gray-800);
    border: 1px dashed var(--gray-400);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    align-self: flex-start;
}

.docs-card-upload-btn svg {
    width: 16px;
    height: 16px;
}

.docs-card-upload-btn:hover {
    background: var(--green-bg);
    border-color: var(--green);
    color: var(--green);
    border-style: solid;
}

/* Upload-Button sits in the footer row now — drop the column-era align */
.docs-card-footer .docs-card-upload-btn {
    align-self: auto;
}

.docs-card-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.docs-card-icon svg {
    width: 18px;
    height: 18px;
}

.docs-card-icon-missing { background: var(--gray-100); color: var(--gray-600); transition: background 0.15s, color 0.15s; }
.docs-card:hover .docs-card-icon-missing { background: var(--green-bg); color: var(--green); }
.docs-card-icon-waiting { background: var(--gray-50); color: var(--gray-400); }
.docs-card-icon-neutral { background: var(--gray-50); color: var(--gray-600); }
.docs-card-icon-delegated { background: var(--green-bg); color: var(--green); }

.docs-card-delegated {
    background: rgba(154, 196, 58, 0.05);
    border-color: rgba(154, 196, 58, 0.25);
}

/* Segmented toggle: "Ich lade hoch" vs. "PV Green übernimmt" */
.docs-delegate-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--gray-50);
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    align-self: flex-start;
}

.docs-delegate-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.docs-delegate-option svg {
    width: 14px;
    height: 14px;
}

.docs-delegate-option:hover {
    color: var(--gray-800);
}

.docs-delegate-option.active {
    background: #fff;
    color: var(--green);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.docs-delegate-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1.5px solid var(--gray-400);
    background: #fff;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.docs-delegate-option.active .docs-delegate-check {
    background: var(--green);
    border-color: var(--green);
}

.docs-delegate-option.active .docs-delegate-check::after {
    content: '';
    width: 7px;
    height: 4px;
    border-left: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.docs-delegate-toggle-solo {
    /* No second option — still render as a pill chooser for consistency */
    background: transparent;
    padding: 0;
    gap: 0;
}

.docs-delegate-toggle-solo .docs-delegate-option {
    background: var(--gray-50);
    padding: 8px 16px;
}

.docs-delegate-toggle-solo .docs-delegate-option.active {
    background: var(--green-bg);
    color: var(--gray-800);
    box-shadow: none;
}

.docs-delegate-toggle-solo .docs-delegate-option.active .docs-delegate-check {
    background: var(--green);
    border-color: var(--green);
}

/* Pill colour for delegated documents */
.doc-pill-delegated {
    background: var(--green-bg);
    color: var(--green);
}

.doc-pill-delegated .doc-pill-dot {
    background: var(--green);
}

.docs-card-text {
    flex: 1;
    min-width: 0;
}

.docs-card-text h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.35;
}

.docs-card-text p {
    margin: 0;
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.45;
    max-width: 420px;
}

.docs-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding-top: 14px;
}

.docs-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.docs-card-action svg {
    width: 14px;
    height: 14px;
    color: var(--green);
}

.docs-card-action:hover {
    background: var(--green);
    color: #1a3a00;
}

.docs-card-action:hover svg { color: #1a3a00; }

.docs-card-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--gray-50);
    color: var(--gray-600);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.docs-card-icon-btn svg { width: 16px; height: 16px; }

.docs-card-icon-btn:hover {
    background: var(--green-bg);
    color: var(--green);
}

/* Submitted rows (right column) */
.docs-submitted-list {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.docs-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease;
}

.docs-row:last-child { border-bottom: none; }

.docs-row:hover { background: var(--gray-50); }

.docs-row-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

/* Pill sits below the title/sub inside the text column */
.docs-row-text .doc-pill {
    align-self: flex-start;
    margin-top: 4px;
}

.docs-row-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.docs-row-icon svg { width: 18px; height: 18px; }

.docs-row-icon-done { background: var(--green-bg); color: var(--green); }
.docs-row-icon-auto { background: #f3eeff; color: #8b5cf6; }
.docs-row-icon-neutral { background: var(--gray-50); color: var(--gray-600); }

.docs-row-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.docs-row-text h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

/* Damit der Text-Block wenigstens Platz für ganze Wörter bekommt */
.docs-row-text {
    flex: 1 1 140px;
}

.docs-row-text p {
    margin: 0;
    font-size: 12px;
    color: var(--gray-600);
}

.docs-row-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    align-items: center;
    margin-left: auto;
}

.docs-row-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: transparent;
    color: var(--gray-400);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.docs-row-icon-btn svg { width: 14px; height: 14px; }

.docs-row-icon-btn:hover {
    background: var(--green-bg);
    color: var(--green);
}

.docs-row-icon-btn-danger:hover {
    background: #fdecec;
    color: #b83838;
}

.docs-submitted-empty {
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    opacity: 0.55;
}

.docs-submitted-empty-line {
    width: 56px;
    height: 3px;
    background: var(--gray-200);
    border-radius: 999px;
}

.docs-submitted-empty p {
    margin: 0;
    font-size: 12px;
    color: var(--gray-600);
    font-style: italic;
}

.docs-empty-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    background: var(--green-bg);
    border-radius: 24px;
    border: 1px solid rgba(154, 196, 58, 0.2);
}

.docs-empty-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #fff;
    color: var(--green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.docs-empty-icon svg { width: 20px; height: 20px; }

.docs-empty-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}

.docs-empty-sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--gray-600);
}

@media (max-width: 960px) {
    .docs-hero { align-items: stretch; }
    .docs-progress-widget { min-width: 0; }
    /* Grid bleibt 2/3 – 1/3 auch auf mittleren Breiten. Nur der Gap schrumpft. */
    .docs-grid { gap: 20px; }
}

@media (max-width: 720px) {
    .docs-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
    .docs-hero-text h1 { font-size: 28px; }
    .docs-card-head { flex-wrap: wrap; }
}

/* The dashboard's section-header, when used as a link (Dokumente) */
.vorgang-section-link .vorgang-section-header {
    cursor: pointer;
}

.vorgang-section-link .vorgang-section-header:hover {
    background: var(--green-bg);
}

.vorgang-section-link .vorgang-section-header:hover .vorgang-section-chevron {
    color: var(--green);
    transform: translateX(2px);
}

.vorgang-section-link .vorgang-section-chevron {
    transition: transform 0.15s ease, color 0.15s ease;
}

.property-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.property-panel-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.property-count-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-800);
    background: var(--green-bg);
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.property-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.property-list-empty {
    font-size: 13px;
    color: var(--gray-600);
    padding: 16px 4px;
}

.property-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--gray-50);
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.property-item:hover {
    border-color: rgba(154, 196, 58, 0.35);
}

.property-item.selected {
    border-color: var(--green);
    background: var(--green-bg);
}

.property-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.property-item-icon svg {
    width: 18px;
    height: 18px;
}

.property-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.property-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.property-item-addr {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-item-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--gray-600);
    font-weight: 500;
}

.property-item-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}

.btn-register-property {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--gray-100);
    color: var(--gray-800);
    border: 1px solid transparent;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-register-property:hover {
    background: var(--green-bg);
    color: var(--green);
}

.btn-register-property svg {
    width: 18px;
    height: 18px;
}

/* Secondary widget: PV-Anlage teaser */
.pv-teaser {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 16px;
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(145deg, var(--green) 0%, var(--green-light) 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(154, 196, 58, 0.22);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.pv-teaser::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
}

.pv-teaser:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(154, 196, 58, 0.3);
}

.pv-teaser-icon {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pv-teaser-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.pv-teaser-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pv-teaser-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}

.pv-teaser-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    opacity: 0.95;
}

.pv-teaser-cta svg {
    width: 14px;
    height: 14px;
    transition: transform 0.15s;
}

.pv-teaser:hover .pv-teaser-cta svg {
    transform: translateX(3px);
}

/* Aktueller Vorgang card */
.vorgang-card {
    background: #fff;
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.vorgang-empty {
    background: #fff;
    border-radius: 28px;
    padding: 60px 32px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.vorgang-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: var(--green-bg);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.vorgang-empty h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.vorgang-empty p {
    color: var(--gray-600);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.5;
}

.vorgang-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.vorgang-header-main {
    min-width: 0;
}

.vorgang-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.vorgang-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.01em;
    margin-bottom: 20px;
}

.vorgang-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0;
}

.vorgang-date {
    font-size: 13px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.vorgang-date svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Funding widget — compact primary green card, top-right of vorgang header */
.vorgang-funding-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 18px 20px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--green) 0%, #7aa830 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.vorgang-funding-blob {
    position: absolute;
    right: -36px;
    bottom: -36px;
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    filter: blur(28px);
    pointer-events: none;
    transition: transform 0.7s ease;
}

.vorgang-funding-card:hover .vorgang-funding-blob {
    transform: scale(1.15);
}

.vorgang-funding-label {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.vorgang-funding-amount {
    position: relative;
    z-index: 1;
    margin: 4px 0 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.vorgang-funding-sub {
    position: relative;
    z-index: 1;
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 11px;
    line-height: 1.4;
    opacity: 0.9;
}

.vorgang-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: preview-pulse 1.6s ease-in-out infinite;
}

.vorgang-progress {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.vorgang-progress-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
}

.vorgang-progress-count {
    color: var(--green);
}

.vorgang-progress-bar {
    height: 10px;
    background: var(--gray-100);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 20px;
}

.vorgang-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    border-radius: 9999px;
    transition: width 0.4s ease;
    box-shadow: 0 0 12px rgba(154, 196, 58, 0.3);
}

.vorgang-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.vorgang-stat {
    background: var(--gray-50);
    border-radius: 18px;
    padding: 18px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vorgang-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-800);
    letter-spacing: -0.01em;
}

.vorgang-stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-600);
}

/* Stepper — Gesamtfortschritt visualization */
.vorgang-stepper {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.vorgang-step {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 6px;
}

.vorgang-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(50% + 18px);
    width: calc(100% - 36px);
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
    transition: background 0.3s;
}

.vorgang-step-done:not(:last-child)::after {
    background: var(--green);
}

.vorgang-step-circle {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
    border: 2px solid var(--gray-200);
    color: var(--gray-600);
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    font-variant-numeric: tabular-nums;
}

.vorgang-step-circle svg {
    width: 16px;
    height: 16px;
}

.vorgang-step-done .vorgang-step-circle {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.vorgang-step-active .vorgang-step-circle {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 0 0 4px rgba(154, 196, 58, 0.18);
}

.vorgang-step-label {
    margin-top: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
    line-height: 1.35;
    max-width: 120px;
    hyphens: auto;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
}

.vorgang-step-done .vorgang-step-label,
.vorgang-step-active .vorgang-step-label {
    color: var(--gray-800);
}

.vorgang-step-active .vorgang-step-label {
    font-weight: 700;
}

/* Gated sections (Dokumente + Kostenvoranschlag until Angaben complete) */
.vorgang-section[data-locked="true"] {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.vorgang-sections {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vorgang-section {
    background: var(--gray-50);
    border-radius: 18px;
    overflow: hidden;
    transition: background 0.15s;
}

.vorgang-section:not(.open):hover {
    background: var(--green-bg);
}

.vorgang-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.vorgang-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.vorgang-section-icon svg {
    width: 20px;
    height: 20px;
}

.vorgang-section-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vorgang-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}

.vorgang-section-sub {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 2px;
}

.vorgang-section-badge {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-600);
    min-width: 28px;
    text-align: right;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}

.vorgang-section-badge svg {
    width: 16px;
    height: 16px;
    color: var(--green);
}

.vorgang-section-chevron {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    transition: transform 0.25s;
    flex-shrink: 0;
}

.vorgang-section-header.open .vorgang-section-chevron {
    transform: rotate(90deg);
}

.vorgang-section-body {
    padding: 0 20px 20px;
}

.vorgang-footer {
    padding: 24px 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
}

.btn-withdraw-vorgang {
    padding: 10px 20px;
    background: none;
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.btn-withdraw-vorgang:hover {
    border-color: var(--red);
    color: var(--red);
    background: #fce4ec;
}

.vorgang-tip {
    margin: 16px 32px 32px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: var(--green-bg);
    border-radius: 20px;
    border: 1px solid rgba(154, 196, 58, 0.2);
}

.vorgang-tip svg {
    width: 26px;
    height: 26px;
    color: var(--green);
    flex-shrink: 0;
}

.vorgang-tip p {
    font-size: 13px;
    color: var(--gray-800);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    /* Off-canvas drawer — sidebar translates in from the left instead of
       stacking above the detail view. Toggled via body.dashboard-drawer-open. */
    .dashboard-mobile-bar {
        display: flex;
        margin: 0 0 12px;
    }
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(320px, 85vw);
        background: #fff;
        padding: 16px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 180ms ease;
        z-index: 1000;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    }
    body.dashboard-drawer-open .dashboard-sidebar {
        transform: translateX(0);
    }
    .dashboard-drawer-scrim {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }
    body.dashboard-drawer-open .dashboard-drawer-scrim {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
    .vorgang-header {
        padding: 16px 20px;
        grid-template-columns: 1fr;
    }
    .vorgang-progress {
        padding: 16px 20px;
    }
    .vorgang-step {
        padding: 0 2px;
    }
    .vorgang-step-label {
        font-size: 10px;
        max-width: none;
    }
    .vorgang-step-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .vorgang-step:not(:last-child)::after {
        top: 13px;
        left: calc(50% + 16px);
        width: calc(100% - 32px);
    }
    .vorgang-sections {
        padding: 12px;
    }
    .vorgang-section-body {
        padding-left: 20px;
    }
    .vorgang-tip {
        margin: 12px 20px 20px;
    }
    .dashboard-welcome-title {
        font-size: 24px;
    }
}
