* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #111;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 32px;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.login-box h1 {
    margin: 0 0 28px;
}

.login-box label {
    display: block;
    margin: 18px 0 6px;
}

.login-box input[type="email"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #bbb;
    border-radius: 7px;
}

.login-box button {
    width: 100%;
    margin-top: 24px;
    padding: 13px;
    border: 0;
    border-radius: 7px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:disabled {
    opacity: .55;
    cursor: wait;
}

.passkey-login-button {
    margin-top: 0 !important;
    background: #111;
    color: #fff;
}

.passkey-login-status {
    min-height: 1.4em;
    margin: 10px 0 0;
    font-size: 14px;
    color: #555;
}

.login-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 4px;
    color: #777;
    font-size: 14px;
}

.login-separator::before,
.login-separator::after {
    content: "";
    height: 1px;
    background: #ddd;
    flex: 1;
}

.login-error {
    margin-bottom: 16px;
}

@media (max-width: 520px) {
    .login-page {
        padding: 16px;
    }

    .login-box {
        padding: 24px;
    }
}


/* Bassoversum – Projektbasis */

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

.dashboard-shell,
.page-shell,
.form-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0;
}

.dashboard-header,
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-header h1,
.page-header h1,
.form-panel h1 {
    margin: 4px 0 8px;
}

.eyebrow {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #666;
}

.muted {
    color: #6b6b6b;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    background: #fff;
    color: #111;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    border-color: #111;
    background: #111;
    color: #fff;
}

.text-link {
    text-decoration: none;
    font-weight: 600;
}

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

.panel,
.project-card,
.form-panel,
.empty-state {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 24px;
}

.panel h2,
.project-card h2 {
    margin-top: 0;
}

.panel label,
.form-panel label {
    display: block;
    margin: 18px 0 6px;
    font-weight: 600;
}

.panel input,
.form-panel input,
.form-panel textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #bbb;
    border-radius: 7px;
    background: #fff;
    color: #111;
}

.logout-form {
    margin-top: 28px;
}

.notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    background: #fff;
}

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

.project-card-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.project-card h2 {
    margin-bottom: 8px;
}

.status-pill {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid #d5d5d5;
    border-radius: 999px;
    font-size: 12px;
}

.node-count {
    color: #777;
    white-space: nowrap;
}

.project-meta {
    margin: 22px 0;
}

.project-meta > div {
    padding: 10px 0;
    border-top: 1px solid #eee;
}

.project-meta dt {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.project-meta dd {
    margin: 0;
}

.path-value {
    overflow-wrap: anywhere;
    color: #555;
}

.project-next-step {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.form-shell {
    max-width: 760px;
}

.form-panel {
    margin-top: 24px;
}

.security-hint {
    margin: 20px 0 0;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f8f8;
    color: #555;
}

.empty-state {
    max-width: 680px;
}

@media (max-width: 760px) {
    .dashboard-shell,
    .page-shell,
    .form-shell {
        width: min(100% - 28px, 1180px);
        padding: 24px 0;
    }

    .dashboard-header,
    .page-header {
        flex-direction: column;
    }

    .dashboard-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card-top {
        flex-direction: column;
    }
}


/* Read-only Projekt-Scan */

.notice-error {
    border-color: #b9b9b9;
    background: #f0f0f0;
}

.project-card-visual {
    padding: 0;
    overflow: hidden;
}

.project-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 24px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
}

.project-visual img {
    display: block;
    max-width: min(78%, 300px);
    max-height: 105px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.project-logo-placeholder {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 1px solid #d5d5d5;
    border-radius: 22px;
    background: #fff;
    font-size: 34px;
    font-weight: 700;
}

.project-card-body {
    padding: 24px;
}

.scan-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.scan-stats span {
    padding: 6px 9px;
    border: 1px solid #ddd;
    border-radius: 999px;
    font-size: 12px;
}

.scan-time {
    margin: 10px 0 0;
    font-size: 13px;
}


/* Bassoversum – Projekt-Funktionsstruktur */

.project-visual-link,
.project-title-link {
    color: inherit;
    text-decoration: none;
}

.project-visual-link {
    transition: background .15s ease;
}

.project-visual-link:hover {
    background: #f5f5f5;
}

.project-title-link:hover {
    text-decoration: underline;
}

.project-detail-shell {
    max-width: 1320px;
}

.project-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 28px;
}

.project-detail-brand {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.project-detail-brand h1 {
    margin: 6px 0 8px;
}

.project-detail-logo {
    display: grid;
    place-items: center;
    width: 150px;
    height: 100px;
    padding: 14px;
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.project-detail-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.project-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.project-detail-actions form {
    margin: 0;
}

.project-overview-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0 0 34px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.project-overview-strip > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 18px 20px;
    border-right: 1px solid #e6e6e6;
}

.project-overview-strip > div:last-child {
    border-right: 0;
}

.project-overview-strip strong {
    font-size: 20px;
}

.project-overview-strip span {
    color: #777;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.project-detail-section {
    margin-top: 34px;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 18px;
}

.section-heading-row h2 {
    margin: 4px 0 6px;
}

.feature-network {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature-node {
    min-width: 0;
    padding: 18px;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    background: #fff;
}

.feature-node-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.feature-node-head h3 {
    margin: 0 0 3px;
}

.feature-status-dot {
    width: 9px;
    height: 9px;
    margin-top: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #777;
}

.feature-status {
    color: #777;
    font-size: 12px;
}

.feature-children {
    display: grid;
    gap: 7px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.feature-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7f7f7;
}

.feature-child span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.feature-child small {
    flex: 0 0 auto;
    color: #888;
}

.technical-details {
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
}

.technical-details > summary {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 700;
}

.technical-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 0 20px 20px;
}

.technical-group {
    min-width: 0;
}

.technical-group h3 {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.technical-group h3 span {
    color: #888;
    font-weight: 400;
}

.technical-node-list {
    display: grid;
    gap: 6px;
}

.technical-node {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 7px;
    background: #f7f7f7;
}

.technical-node strong,
.technical-node code {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.technical-node code {
    margin-top: 3px;
    color: #777;
    font-size: 11px;
}

.project-source-info {
    padding: 22px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
}

.project-source-info .project-meta {
    margin-bottom: 0;
}

@media (max-width: 1000px) {
    .feature-network {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-overview-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .project-overview-strip > div {
        border-bottom: 1px solid #e6e6e6;
    }
}

@media (max-width: 760px) {
    .project-detail-header,
    .project-detail-brand {
        flex-direction: column;
        align-items: stretch;
    }

    .project-detail-actions {
        justify-content: flex-start;
    }

    .project-detail-logo {
        width: 130px;
        height: 88px;
    }

    .project-overview-strip,
    .feature-network,
    .technical-groups {
        grid-template-columns: 1fr;
    }

    .project-overview-strip > div {
        border-right: 0;
    }

    .technical-details > summary {
        flex-direction: column;
        gap: 5px;
    }
}

/* Bassoversum – AI Projektanalyse */

.notice-warning {
    background: #f7f7f7;
    border-style: dashed;
}

.ai-analysis-meta {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    margin: 0 0 30px;
    padding: 20px 22px;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    background: #fff;
}

.ai-analysis-summary {
    max-width: 760px;
    margin: 6px 0 0;
    line-height: 1.5;
}

.ai-analysis-data {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: 0 0 auto;
    color: #777;
    font-size: 12px;
}

.ai-feature-node {
    border-color: #cfcfcf;
}

.feature-status-dot.status-implemented {
    background: #555;
}

.feature-status-dot.status-partial {
    background: #999;
}

.feature-status-dot.status-unknown {
    background: #c4c4c4;
}

.feature-description {
    margin: 13px 0 0;
    color: #555;
    font-size: 14px;
    line-height: 1.45;
}

.feature-child-rich {
    align-items: flex-start;
}

.feature-child-rich > div {
    min-width: 0;
}

.feature-child-rich strong,
.feature-child-description {
    display: block;
}

.feature-child-description {
    margin-top: 3px;
    color: #777;
    line-height: 1.35;
}

.internal-ai-list {
    display: grid;
    gap: 7px;
    padding: 0 20px 20px;
}

.internal-ai-list .technical-node span {
    display: block;
    margin-top: 3px;
    color: #777;
    font-size: 13px;
}

@media (max-width: 760px) {
    .ai-analysis-meta {
        flex-direction: column;
    }

    .ai-analysis-data {
        align-items: flex-start;
    }
}

/* Bassoversum – Mindmap Projektlandkarte */
.mindmap-heading-row {
    align-items: flex-start;
}

.mindmap-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
    max-width: 620px;
    padding-top: 5px;
    color: #666;
    font-size: 12px;
}

.mindmap-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.legend-dot {
    width: 13px;
    height: 13px;
    border: 1px solid rgba(0,0,0,.16);
    border-radius: 50%;
}

.status-planned { background: #fff !important; }
.status-present { background: #dff3ff !important; }
.status-tested { background: #dff4df !important; }
.status-in_progress { background: #ffe4bf !important; }
.status-incomplete { background: #ffd7d7 !important; }

.mindmap-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    min-height: 690px;
}

.mindmap-viewport {
    position: relative;
    min-width: 0;
    height: 690px;
    overflow: hidden;
    border: 1px solid #d5d5d5;
    border-radius: 14px;
    background-color: #fafafa;
    background-image: radial-gradient(#d7d7d7 1px, transparent 1px);
    background-size: 22px 22px;
    cursor: grab;
    user-select: none;
}

.mindmap-viewport.is-panning {
    cursor: grabbing;
}

.mindmap-stage {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.mindmap-lines {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
}

.mindmap-line {
    fill: none;
    stroke: #b9b9b9;
    stroke-width: 2;
}

.mindmap-line-area {
    stroke: #8f8f8f;
    stroke-width: 2.4;
}

.mindmap-root,
.mindmap-area,
.mindmap-page {
    position: absolute;
    z-index: 2;
}

.mindmap-root {
    display: grid;
    place-items: center;
    width: 180px;
    min-height: 64px;
    padding: 13px 16px;
    border: 2px solid #111;
    border-radius: 13px;
    background: #111;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.mindmap-area {
    width: 210px;
    min-height: 66px;
    padding: 12px 14px;
    border: 1px solid #a9a9a9;
    border-radius: 12px;
    background: #f1f1f1;
    box-shadow: 0 2px 7px rgba(0,0,0,.04);
}

.mindmap-area strong,
.mindmap-area small {
    display: block;
}

.mindmap-area strong {
    font-size: 15px;
}

.mindmap-area small {
    margin-top: 4px;
    color: #777;
    font-size: 11px;
    line-height: 1.25;
}

.mindmap-page {
    width: 220px;
    min-height: 70px;
    padding: 13px 15px;
    border: 1px solid rgba(0,0,0,.17);
    border-radius: 12px;
    color: #111;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,.06);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.mindmap-page:hover,
.mindmap-page.is-selected {
    transform: translateY(-2px);
    border-color: #111;
    box-shadow: 0 7px 18px rgba(0,0,0,.11);
}

.mindmap-page-name,
.mindmap-page-status {
    display: block;
}

.mindmap-page-name {
    padding-right: 22px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.mindmap-page-status {
    margin-top: 6px;
    color: #666;
    font-size: 11px;
}

.mindmap-question-badge {
    position: absolute;
    right: 9px;
    top: 9px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.mindmap-toolbar {
    position: absolute;
    z-index: 20;
    right: 12px;
    top: 12px;
    display: flex;
    gap: 5px;
    padding: 5px;
    border: 1px solid #d4d4d4;
    border-radius: 9px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.mindmap-toolbar button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #f1f1f1;
    cursor: pointer;
    font-weight: 700;
}

.mindmap-detail {
    min-width: 0;
    height: 690px;
    overflow: auto;
    padding: 20px;
    border: 1px solid #d5d5d5;
    border-radius: 14px;
    background: #fff;
}

.mindmap-detail-empty {
    color: #777;
    line-height: 1.45;
}

.mindmap-detail-empty strong {
    color: #111;
}

.mindmap-detail-content h3 {
    margin: 6px 0 10px;
    font-size: 24px;
}

.detail-status-pill {
    display: inline-flex;
    padding: 6px 10px;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.mindmap-detail-list {
    margin: 22px 0 0;
}

.mindmap-detail-list > div {
    padding: 13px 0;
    border-top: 1px solid #ececec;
}

.mindmap-detail-list dt {
    margin-bottom: 5px;
    color: #777;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.mindmap-detail-list dd {
    margin: 0;
    line-height: 1.45;
}

.mindmap-question {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #d1d1d1;
    border-radius: 10px;
    background: #f7f7f7;
}

.mindmap-question p {
    line-height: 1.45;
}

.mindmap-question textarea {
    width: 100%;
    margin: 0 0 10px;
    padding: 10px;
    resize: vertical;
    border: 1px solid #bbb;
    border-radius: 7px;
    background: #fff;
}

@media (max-width: 1050px) {
    .mindmap-layout {
        grid-template-columns: 1fr;
    }

    .mindmap-detail {
        height: auto;
        min-height: 220px;
    }
}

@media (max-width: 760px) {
    .mindmap-heading-row {
        flex-direction: column;
        align-items: stretch;
    }

    .mindmap-legend {
        justify-content: flex-start;
    }

    .mindmap-viewport {
        height: 580px;
    }
}

/* Kompakte Projektübersicht – nur Logokacheln */
.project-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.project-logo-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 170px;
    padding: 24px;
    border: 1px solid #d9d9d9;
    border-radius: 18px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.project-logo-tile:hover {
    transform: translateY(-2px);
    border-color: #bdbdbd;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.project-logo-tile:focus-visible {
    outline: 2px solid #111;
    outline-offset: 3px;
}

.project-logo-tile img {
    display: block;
    width: auto;
    height: auto;
    max-width: 82%;
    max-height: 105px;
    object-fit: contain;
}

.project-logo-placeholder-tile {
    width: 78px;
    height: 78px;
    border-radius: 20px;
}

.project-tile-status-icons {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 6px;
}

@media (max-width: 760px) {
    .project-logo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .project-logo-tile {
        min-height: 130px;
        padding: 18px;
        border-radius: 14px;
    }

    .project-logo-tile img {
        max-width: 88%;
        max-height: 78px;
    }
}
