* {
    box-sizing: border-box;
}

:root {
    --bg: #10131a;
    --panel: rgba(23, 28, 39, 0.88);
    --panel-strong: rgba(31, 38, 53, 0.94);
    --text: #eef2f7;
    --muted: #aeb8c7;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #f5a623;
    --accent-2: #ffd166;
    --danger: #ff6b6b;
    --success: #48d597;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 166, 35, 0.16), transparent 34rem),
        linear-gradient(135deg, #0c0f14, #151a23 55%, #0b0d12);
}

a {
    color: var(--accent-2);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 64px;
    padding: 0.75rem 1.4rem;
    background: rgba(9, 12, 18, 0.72);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.brand {
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    flex-wrap: wrap;
}

.nav a,
.nav .disabled {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 0.8rem;
    border-radius: 999px;
    color: var(--muted);
    border: 1px solid transparent;
}

.nav a.active,
.nav a:hover {
    color: #fff;
    border-color: rgba(245, 166, 35, 0.5);
    background: rgba(245, 166, 35, 0.12);
    text-decoration: none;
}

.nav .disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.playerbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}

.playerbox strong {
    color: #fff;
}

.main-content {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 1.4rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.auth-card {
    width: min(520px, 100%);
    margin: 3rem auto 0;
}

h1,
h2,
h3 {
    margin: 0 0 0.7rem;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.08rem;
}

p {
    color: var(--muted);
    line-height: 1.55;
}

.eyebrow {
    margin: 0 0 0.4rem;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
}

.form {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.45rem;
    color: var(--muted);
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 0.9rem;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    outline: none;
}

input:focus {
    border-color: rgba(245, 166, 35, 0.8);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.13);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 1rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

.btn.primary {
    color: #1d1405;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.btn.secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
}

.btn.small {
    min-height: 34px;
    padding: 0 0.75rem;
    border-radius: 10px;
    font-size: 0.88rem;
}

.btn.primary:hover,
.btn.secondary:hover {
    filter: brightness(1.05);
}

.muted {
    color: var(--muted);
}

.error-box,
.flash {
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin: 1rem 0;
}

.error-box,
.flash.error {
    color: #fff;
    background: rgba(255, 107, 107, 0.16);
    border: 1px solid rgba(255, 107, 107, 0.45);
}

.flash.success {
    color: #fff;
    background: rgba(72, 213, 151, 0.14);
    border: 1px solid rgba(72, 213, 151, 0.35);
}

.flash.info {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, rgba(31, 38, 53, 0.96), rgba(20, 24, 34, 0.86));
}

.stats-grid {
    display: grid;
    gap: 0.8rem;
}

.stats-grid.small {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
}

.stat {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem;
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.stat strong {
    display: block;
    color: #fff;
    font-size: 1.35rem;
}

.grid {
    display: grid;
    gap: 1.2rem;
}

.grid.two {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

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

.room-list,
.option-list,
.simple-list {
    display: grid;
    gap: 0.75rem;
}

.room-row,
.option-row,
.notice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
}

.room-row strong,
.room-row span,
.option-row strong,
.option-row span {
    display: block;
}

.room-row span,
.option-row span {
    color: var(--muted);
    margin-top: 0.2rem;
}

.room-meta {
    display: grid;
    gap: 0.25rem;
    text-align: right;
    min-width: 130px;
}

.room-actions,
.action-row {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0.65rem;
    border-radius: 999px;
    color: var(--accent-2);
    background: rgba(245, 166, 35, 0.10);
    border: 1px solid rgba(245, 166, 35, 0.25);
    font-weight: 800;
    font-size: 0.86rem;
}

.todo-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.25);
}

.todo-box ul {
    margin-bottom: 0;
    color: var(--muted);
}

.empty-state {
    padding: 1rem;
    border-radius: 16px;
    border: 1px dashed var(--line);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);
}

.price {
    color: #fff;
    font-weight: 900;
}

@media (max-width: 900px) {
    .topbar,
    .hero,
    .room-row,
    .option-row,
    .notice-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .playerbox {
        flex-wrap: wrap;
    }

    .grid.two,
    .grid.three,
    .stats-grid.small {
        grid-template-columns: 1fr;
    }

    .room-meta {
        text-align: left;
    }

    .room-actions,
    .action-row {
        justify-content: flex-start;
    }
}

.job-list {
    display: grid;
    gap: 1rem;
}

.job-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.job-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.job-top h3 {
    margin-top: 0.35rem;
}

.job-top p {
    margin-bottom: 0;
}

.job-reward {
    min-width: 110px;
    text-align: right;
}

.job-reward strong,
.job-reward span {
    display: block;
}

.job-reward strong {
    font-size: 1.25rem;
    color: #fff;
}

.job-reward span {
    color: var(--muted);
    margin-top: 0.2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 0.6rem;
    border-radius: 999px;
    background: rgba(72, 213, 151, 0.12);
    border: 1px solid rgba(72, 213, 151, 0.25);
    color: var(--success);
    font-weight: 800;
    font-size: 0.82rem;
}

.requirement-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.requirement-grid div {
    min-height: 62px;
    padding: 0.7rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.requirement-grid span,
.requirement-grid strong {
    display: block;
}

.requirement-grid span {
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.requirement-grid strong {
    color: #fff;
}

.job-actions {
    border-top: 1px solid var(--line);
    padding-top: 0.8rem;
}

.progress-placeholder {
    padding: 0.9rem;
    border-radius: 14px;
    border: 1px dashed rgba(245, 166, 35, 0.35);
    background: rgba(245, 166, 35, 0.08);
    color: var(--accent-2);
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

@media (max-width: 900px) {
    .job-top {
        flex-direction: column;
    }

    .job-reward {
        text-align: left;
    }

    .requirement-grid {
        grid-template-columns: 1fr;
    }
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.data-table th,
.data-table td {
    padding: 0.85rem 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--accent-2);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-table td {
    color: var(--text);
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-input {
    width: 74px;
    min-height: 34px;
    padding: 0 0.55rem;
    border-radius: 10px;
}

.warning-box {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(255, 209, 102, 0.12);
    border: 1px solid rgba(255, 209, 102, 0.35);
    color: #fff;
}

.progress-box {
    margin-top: 1rem;
    display: grid;
    gap: 0.55rem;
}

.progress-track {
    width: 100%;
    height: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid var(--line);
}

.progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    transition: width 0.3s linear;
}

.progress-label {
    display: flex;
    justify-content: flex-end;
    color: var(--muted);
    font-weight: 700;
}

button:disabled,
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.4);
}

@media (max-width: 760px) {
    .inline-form {
        align-items: stretch;
    }

    .qty-input {
        width: 64px;
    }
}

.stats-grid.small.four {
    grid-template-columns: repeat(4, minmax(105px, 1fr));
}

.action-row.left {
    justify-content: flex-start;
}

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

/* Step 8 - Spielerhandel */
.market-card {
    margin-bottom: 1.2rem;
}

.market-bottom-grid {
    margin-top: 1.2rem;
}

.market-table {
    min-width: 1120px;
}

.inventory-table {
    min-width: 980px;
}

.compact-table {
    min-width: 640px;
}

.compact-form {
    flex-wrap: nowrap;
}

.offer-form {
    display: grid;
    grid-template-columns: 72px 92px auto;
    gap: 0.45rem;
    align-items: center;
}

.price-input {
    width: 92px;
    min-height: 34px;
    padding: 0 0.55rem;
    border-radius: 10px;
}

.small-badge {
    min-height: 22px;
    padding: 0 0.5rem;
    font-size: 0.74rem;
}

@media (max-width: 760px) {
    .offer-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .price-input,
    .offer-form .qty-input {
        width: 100%;
    }
}

/* Step 9 - Fahrzeugakten */
.vehicle-link {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 209, 102, 0.55);
}

.vehicle-link:hover {
    color: var(--accent-2);
    text-decoration: none;
}

.vehicle-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.vehicle-summary-grid .summary-box {
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
}

.vehicle-summary-grid span,
.part-health span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.vehicle-summary-grid strong,
.part-health strong {
    display: block;
    color: #fff;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 0.6rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.status-badge.available {
    color: var(--success);
    background: rgba(72, 213, 151, 0.12);
    border-color: rgba(72, 213, 151, 0.25);
}

.status-badge.in_job {
    color: var(--accent-2);
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.3);
}

.status-badge.repaired {
    color: #9fd0ff;
    background: rgba(117, 186, 255, 0.12);
    border-color: rgba(117, 186, 255, 0.28);
}

.status-badge.inactive {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line);
}

.part-health {
    min-width: 150px;
}

.health-track {
    width: 100%;
    height: 12px;
    margin-top: 0.35rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid var(--line);
}

.health-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.health-text-good {
    color: var(--success);
    font-weight: 800;
}

.health-text-mid {
    color: var(--accent-2);
    font-weight: 800;
}

.health-text-bad {
    color: var(--danger);
    font-weight: 800;
}

.vehicle-table {
    min-width: 980px;
}

.parts-table {
    min-width: 760px;
}

.timeline-table {
    min-width: 760px;
}

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

/* Step 10: abgelaufene Aufträge / NPC-Erledigung */
.status-badge.npc_done {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}

.status-badge.expired {
    border-color: rgba(148, 163, 184, 0.4);
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.1);
}

.small-note {
    margin-top: 0.35rem;
    font-size: 0.82rem;
}

/* Step 11: Werkzeuge, Ausstattung und Verschleiß */
.tool-table {
    min-width: 980px;
}

.tool-owned-table {
    min-width: 840px;
}

.durability-track {
    width: 100%;
    min-width: 140px;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid var(--line);
    margin-bottom: 0.35rem;
}

.durability-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.status-badge.available {
    color: var(--success);
    background: rgba(72, 213, 151, 0.12);
    border-color: rgba(72, 213, 151, 0.25);
}

.status-badge.in_use {
    color: var(--accent-2);
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.3);
}

.status-badge.broken {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.3);
}

/* Step 11a: Ausstattung-Kaufen nicht mehr abgeschnitten */
.tool-buy-card {
    margin-bottom: 1.2rem;
}

.tool-buy-table {
    min-width: 900px;
}

.tool-buy-table td:first-child {
    min-width: 280px;
}

.tool-buy-table th:last-child,
.tool-buy-table td:last-child {
    width: 120px;
    text-align: right;
}

.tool-buy-table .buy-cell form {
    display: flex;
    justify-content: flex-end;
}

.tool-info-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

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

.task-flow-box {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 190, 84, 0.28);
    border-radius: 14px;
    background: rgba(255, 190, 84, 0.07);
}

.task-flow-box > span {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #ffd36a;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.task-flow-box ol {
    margin: 0;
    padding-left: 20px;
}

.task-flow-box li {
    margin: 4px 0;
    color: #dbe7ff;
}

/* Step 22: Raumgebundene Ausstattung */
.compact-select {
    width: 100%;
    max-width: 210px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(15, 23, 42, .92);
    color: #f8fafc;
    font: inherit;
}

.room-select-cell {
    min-width: 180px;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.tool-owned-table th:nth-child(2),
.tool-owned-table td:nth-child(2) {
    min-width: 150px;
}

.tool-buy-table th:nth-child(6),
.tool-buy-table td:nth-child(6) {
    min-width: 180px;
}


/* Step 23: konkrete Arbeitsräume und Raumbelegung */
.room-choice-list {
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.14);
}

.room-choice-list > strong {
    color: var(--accent-2);
    font-size: 0.88rem;
}

.room-choice {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.room-choice span {
    color: #fff;
    font-weight: 800;
}

.room-choice em {
    color: var(--muted);
    font-style: normal;
    text-align: right;
}

.room-choice.ready {
    border-color: rgba(72, 213, 151, 0.35);
    background: rgba(72, 213, 151, 0.08);
}

.room-choice.ready em {
    color: var(--success);
}

.room-choice.blocked {
    border-color: rgba(255, 107, 107, 0.24);
}

.inline-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 260px;
}

.start-task-form {
    align-items: flex-end;
}

@media (max-width: 700px) {
    .room-choice,
    .inline-label,
    .start-task-form {
        align-items: stretch;
        flex-direction: column;
    }

    .room-choice em {
        text-align: left;
    }
}

/* Step 24: Werkzeugservice nach Raum */
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.service-box {
    display: grid;
    gap: 0.35rem;
    align-content: start;
    min-height: 150px;
    padding: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.045);
}

.service-box.highlight {
    border-color: rgba(245, 197, 107, 0.35);
    background: rgba(245, 197, 107, 0.08);
}

.service-box strong {
    color: #fff;
    font-size: 1rem;
}

.service-box span,
.service-box em {
    color: var(--muted);
    font-size: 0.88rem;
    font-style: normal;
}

.service-box b {
    color: var(--accent-2);
    font-size: 1.08rem;
    margin: 0.2rem 0;
}

.service-box form {
    margin-top: 0.35rem;
}

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

@media (max-width: 640px) {
    .section-title-row {
        flex-direction: column;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }
}

/* Step 26: Fahrzeugakte mit echten Einzelteil-Zuständen */
.vehicle-summary-grid-no-general .summary-box strong {
    font-size: 1.05rem;
}

.current-job-card {
    border-color: rgba(245, 166, 35, 0.28);
}

.active-job-list {
    display: grid;
    gap: 0.75rem;
}

.active-job-box {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.045);
}

.active-job-box strong,
.active-job-box span {
    display: block;
}

.active-job-box strong {
    margin-top: 0.45rem;
    color: #fff;
}

.active-job-box span:not(.status-badge) {
    margin-top: 0.25rem;
    color: var(--muted);
}

.active-job-meta {
    min-width: 180px;
    text-align: right;
}

.vehicle-detail-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
}

.part-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.part-status-box {
    min-height: 190px;
    padding: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
}

.part-status-box.critical {
    border-color: rgba(255, 107, 107, 0.30);
    background: rgba(255, 107, 107, 0.08);
}

.part-status-box.watch {
    border-color: rgba(255, 209, 102, 0.30);
    background: rgba(255, 209, 102, 0.08);
}

.part-status-box.good {
    border-color: rgba(72, 213, 151, 0.24);
    background: rgba(72, 213, 151, 0.06);
}

.part-status-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.part-status-head strong {
    color: #fff;
}

.part-status-head span,
.part-status-box em {
    color: var(--muted);
    font-size: 0.88rem;
    font-style: normal;
}

.part-status-box ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.part-status-box li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.part-status-box li:last-child {
    border-bottom: 0;
}

.part-status-box li span {
    color: var(--text);
}

.part-status-box li b {
    white-space: nowrap;
}

.subsection-heading {
    margin-top: 1.1rem;
}

.improved-parts-table {
    min-width: 1040px;
}

.improved-timeline-table {
    min-width: 980px;
}

.improved-vehicle-table {
    min-width: 1180px;
}

.part-row-critical td:first-child {
    border-left: 4px solid rgba(255, 107, 107, 0.70);
}

.part-row-watch td:first-child {
    border-left: 4px solid rgba(255, 209, 102, 0.65);
}

.part-row-good td:first-child {
    border-left: 4px solid rgba(72, 213, 151, 0.55);
}

@media (max-width: 1100px) {
    .vehicle-detail-grid,
    .part-status-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .active-job-box {
        flex-direction: column;
    }

    .active-job-meta {
        min-width: 0;
        text-align: left;
    }
}

/* Step 30: Auftragsplan / Einkaufszettel */
.plan-meta-grid {
    margin-top: 1rem;
}

.plan-material-table {
    min-width: 980px;
}

.plan-row-missing td:first-child {
    border-left: 4px solid rgba(255, 107, 107, 0.75);
}

.plan-row-ok td:first-child {
    border-left: 4px solid rgba(72, 213, 151, 0.65);
}

.task-plan-list {
    display: grid;
    gap: 1rem;
}

.task-plan-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
}

.task-plan-card.done {
    opacity: 0.72;
}

.task-plan-card.active {
    border-color: rgba(245, 166, 35, 0.38);
    background: rgba(245, 166, 35, 0.08);
}

.task-plan-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.task-plan-head h3 {
    margin: 0.45rem 0 0.35rem;
}

.task-plan-head p {
    margin-bottom: 0;
}

.task-plan-time {
    min-width: 110px;
    text-align: right;
    color: #fff;
    font-weight: 900;
}

.plan-info-box {
    margin-top: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.plan-info-box ul {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
}

.plan-info-box.success {
    color: #d9fff0;
    border-color: rgba(72, 213, 151, 0.28);
    background: rgba(72, 213, 151, 0.08);
}

.plan-info-box.danger {
    color: #fff;
    border-color: rgba(255, 107, 107, 0.32);
    background: rgba(255, 107, 107, 0.08);
}

@media (max-width: 900px) {
    .task-plan-head {
        flex-direction: column;
    }

    .task-plan-time {
        min-width: 0;
        text-align: left;
    }
}

/* Step 31: Meine Jobs / Auftragshistorie */
.myjobs-current-list {
    display: grid;
    gap: 1rem;
}

.myjobs-current-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.045);
}

.myjobs-current-card.active-task {
    border-color: rgba(245, 166, 35, 0.35);
    background: rgba(245, 166, 35, 0.07);
}

.myjobs-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.myjobs-head h3 {
    margin: 0.4rem 0 0.25rem;
}

.myjobs-head p {
    margin: 0;
}

.myjobs-reward {
    min-width: 130px;
    text-align: right;
}

.myjobs-reward strong,
.myjobs-reward span {
    display: block;
}

.myjobs-reward strong {
    color: #fff;
    font-size: 1.15rem;
}

.myjobs-reward span {
    color: var(--muted);
    margin-top: 0.25rem;
}

.myjobs-progress {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.9rem;
}

.myjobs-progress-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.myjobs-history-table {
    min-width: 1120px;
}

.myjobs-history-table td:first-child {
    min-width: 240px;
}

.status-badge.accepted,
.status-badge.awaiting_next_task {
    color: var(--accent-2);
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.3);
}

.status-badge.active_task {
    color: #9fd0ff;
    background: rgba(117, 186, 255, 0.12);
    border-color: rgba(117, 186, 255, 0.28);
}

.status-badge.done {
    color: var(--success);
    background: rgba(72, 213, 151, 0.12);
    border-color: rgba(72, 213, 151, 0.25);
}

.status-badge.cancelled {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.3);
}

@media (max-width: 760px) {
    .myjobs-head {
        flex-direction: column;
    }

    .myjobs-reward {
        min-width: 0;
        text-align: left;
    }

    .myjobs-progress-top {
        flex-direction: column;
        gap: 0.25rem;
    }
}


/* Step 32: Kassenbuch */
.money-positive {
    color: #2ecc71;
}

.money-negative {
    color: #ff6b6b;
}

.money-neutral {
    color: var(--muted);
}

.cashbook-grid {
    align-items: start;
}

.cashbook-table th.num,
.cashbook-table td.num {
    text-align: right;
    white-space: nowrap;
}

.cashbook-table td:nth-child(3) {
    min-width: 260px;
}

.cashbook-reason {
    white-space: nowrap;
}

.cashbook-help .info-box {
    margin-top: 18px;
}

.clean-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
    color: var(--text);
}

@media (max-width: 900px) {
    .cashbook-table td:nth-child(3) {
        min-width: 180px;
    }
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    display: block;
    height: 54px;
    width: auto;
    max-width: min(420px, 28vw);
}

.vehicle-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 1.2rem;
    align-items: start;
}

.vehicle-image-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
}

.vehicle-hero-image {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    display: block;
}

.vehicle-table-entry {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.vehicle-table-thumb {
    width: 88px;
    height: 54px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    padding: 0.2rem;
}

@media (max-width: 900px) {
    .brand-logo {
        height: 44px;
        max-width: 220px;
    }

    .vehicle-hero {
        grid-template-columns: 1fr;
    }
}


.intake-stack {
    display: grid;
    gap: 1.2rem;
}

.intake-stack > .card {
    width: 100%;
}

.intake-vehicle-preview {
    display: grid;
    grid-template-columns: minmax(180px, 260px) 1fr;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.intake-vehicle-preview a {
    display: block;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.intake-vehicle-preview img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: contain;
    padding: 0.35rem;
}

.intake-vehicle-preview span {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
    margin-bottom: 0.25rem;
}

.intake-vehicle-preview strong {
    display: block;
    font-size: 1.25rem;
    color: var(--text);
}

.intake-vehicle-preview p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

@media (max-width: 720px) {
    .intake-vehicle-preview {
        grid-template-columns: 1fr;
    }
}


.workshop-vehicle-preview {
    margin-top: 1rem;
    margin-bottom: 1rem;
}


/* Raum-Hintergründe
   Lege die Bilder unter assets/rooms/ ab:
   buero.png, werkstatt.png, lackierkabine.png, motorenraum.png
*/
body::before {
    content: "";
    position: fixed;
    inset: 64px 0 0 0;
    z-index: -2;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.34;
    filter: saturate(1.04) contrast(1.02);
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 64px 0 0 0;
    z-index: -1;
    background:
        radial-gradient(circle at top left, rgba(245, 166, 35, 0.18), transparent 34rem),
        linear-gradient(90deg, rgba(10, 13, 19, 0.86), rgba(13, 17, 25, 0.72) 42%, rgba(9, 12, 18, 0.88));
    pointer-events: none;
}

body.page-buero::before,
body.page-raeume::before,
body.page-kassenbuch::before,
body.page-meine_jobs::before {
    background-image: url("rooms/buero.png");
}

body.page-werkstatt::before,
body.page-lager::before,
body.page-ausstattung::before,
body.page-markt::before,
body.page-repair_intake::before,
body.page-fahrzeugakte::before {
    background-image: url("rooms/werkstatt.png");
}

body.page-lackierkabine::before {
    background-image: url("rooms/lackierkabine.png");
}

body.page-motorenraum::before {
    background-image: url("rooms/motorenraum.png");
}

.main-content {
    position: relative;
    z-index: 1;
}

.topbar {
    background: rgba(7, 10, 15, 0.92);
}

.card,
.hero,
.job-card,
.market-card {
    backdrop-filter: blur(12px);
}

@media (max-width: 900px) {
    body::before,
    body::after {
        inset-top: 92px;
    }
}

/* Schritt 36: Raumhintergründe heller/originalnäher anzeigen */
body.room-bg::before,
body.has-room-bg::before,
body.workshop-bg::before,
body.office-bg::before,
body.storage-bg::before,
body.paint-bg::before,
body.engine-bg::before,
.room-background-overlay,
.page-bg-overlay {
    background: rgba(0, 0, 0, 0.16) !important;
}

body.room-bg,
body.has-room-bg,
body.workshop-bg,
body.office-bg,
body.storage-bg,
body.paint-bg,
body.engine-bg {
    background-blend-mode: normal !important;
}

.main-content {
    background: transparent;
}

.card,
.hero,
.job-card {
    backdrop-filter: blur(6px);
}

/* Schritt 38: Alle Arbeitsschritte in der Werkstatt anzeigen */
.job-step-overview {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(10, 13, 19, 0.34);
}

.step-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.step-overview-head span {
    color: var(--muted);
    font-size: 0.9rem;
}

.task-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.task-timeline-item {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 0.8rem;
    align-items: start;
    padding: 0.8rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.035);
}

.task-timeline-item.current {
    border-color: rgba(245, 166, 35, 0.55);
    background: rgba(245, 166, 35, 0.10);
}

.task-timeline-item.done {
    border-color: rgba(72, 213, 151, 0.28);
}

.task-timeline-item.active {
    border-color: rgba(245, 166, 35, 0.45);
}

.task-timeline-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
    font-weight: 800;
}

.task-timeline-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.task-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid var(--line);
    color: var(--muted);
}

.task-status-pill.done {
    color: var(--success);
    background: rgba(72, 213, 151, 0.10);
    border-color: rgba(72, 213, 151, 0.30);
}

.task-status-pill.active,
.task-status-pill.current {
    color: var(--accent-2);
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.38);
}

.task-status-pill.pending {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

.task-timeline-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.45rem 0.75rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.task-timeline-meta b {
    color: var(--text);
}
