:root {
    --navy: #081b35;
    --navy-2: #102b50;
    --blue: #2563eb;
    --blue-soft: #eaf1ff;
    --green: #087443;
    --green-soft: #ecfdf3;
    --amber: #b54708;
    --amber-soft: #fff7ed;
    --bg: #edf2f7;
    --card: #ffffff;
    --border: #d8e0ea;
    --text: #172033;
    --muted: #64748b;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background: var(--bg);
}

button,
input,
select {
    font: inherit;
}

.topbar {
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    background:
        linear-gradient(
            110deg,
            var(--navy),
            var(--navy-2)
        );
    color: white;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .18);
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #4f8cff);
    font-weight: 800;
    font-size: 15px;
}

.brand strong {
    display: block;
    font-size: 14px;
}

.brand span {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: #b7c5d8;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    font-size: 10px;
    color: #dbeafe;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52,211,153,.14);
}

.workspace {
    max-width: 1700px;
    margin: 0 auto;
    padding: 24px 30px 30px;
}

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

.eyebrow {
    display: block;
    margin-bottom: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--blue);
}

.headline h1,
.board-head h2,
.detail-head h2 {
    margin: 0;
    color: #10233f;
}

.headline h1 {
    font-size: 25px;
}

.headline p {
    margin: 5px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.reload-button {
    padding: 9px 14px;
    border: 1px solid #c8d3df;
    border-radius: 10px;
    background: white;
    color: #243b5a;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.reload-button:hover {
    border-color: var(--blue);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    min-height: 92px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 6px 18px rgba(15,23,42,.045);
}

.stat-card span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 5px;
    font-size: 27px;
    line-height: 1;
    color: #10233f;
}

.stat-card small {
    display: block;
    margin-top: 6px;
    font-size: 9px;
    color: #94a3b8;
}

.stat-card.warning {
    background:
        linear-gradient(
            180deg,
            white,
            var(--amber-soft)
        );
}

.stat-card.warning strong {
    color: var(--amber);
}

.stat-card.ready,
.stat-card.completed {
    background:
        linear-gradient(
            180deg,
            white,
            var(--green-soft)
        );
}

.stat-card.ready strong,
.stat-card.completed strong {
    color: var(--green);
}

.board-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
}

.board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 17px;
    border-bottom: 1px solid #e5eaf0;
}

.board-head h2 {
    font-size: 16px;
}

.board-tools {
    display: flex;
    gap: 8px;
}

.board-tools input,
.board-tools select {
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    color: var(--text);
    font-size: 11px;
    outline: none;
}

.board-tools input {
    width: 280px;
    padding: 0 11px;
}

.board-tools select {
    padding: 0 30px 0 10px;
}

.board-tools input:focus,
.board-tools select:focus {
    border-color: var(--blue);
}

.table-wrap {
    overflow: auto;
    max-height: calc(100vh - 300px);
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    border-bottom: 1px solid #dbe3ed;
    background: #f8fafc;
    text-align: left;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    color: #64748b;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf1f5;
    vertical-align: middle;
    font-size: 11px;
    color: #334155;
}

tbody tr {
    cursor: pointer;
}

tbody tr:hover {
    background: #f7faff;
}

th:nth-child(1),
td:nth-child(1) {
    width: 120px;
}

th:nth-child(2),
td:nth-child(2) {
    width: 150px;
}

th:nth-child(3),
td:nth-child(3) {
    width: 150px;
}

th:nth-child(4),
td:nth-child(4) {
    width: 205px;
}

th:nth-child(6),
td:nth-child(6) {
    width: 110px;
}

th:nth-child(7),
td:nth-child(7) {
    width: 70px;
}

.request-id {
    font-size: 10px;
    font-weight: 700;
    color: #33527a;
}

.summary-cell {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef2f7;
    font-size: 9px;
    font-weight: 750;
    color: #475569;
}

.status-badge.neu {
    background: var(--blue-soft);
    color: #1d4ed8;
}

.status-badge.prüfung {
    background: var(--amber-soft);
    color: var(--amber);
}

.status-badge.umsetzung {
    background: #eef2ff;
    color: #4338ca;
}

.status-badge.abgeschlossen {
    background: var(--green-soft);
    color: var(--green);
}

.loading,
.empty {
    padding: 28px;
    text-align: center;
    color: #94a3b8;
}

.detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(5, 18, 37, .45);
    backdrop-filter: blur(3px);
}

.detail-overlay[hidden] {
    display: none;
}

.detail-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(620px, 94vw);
    height: 100%;
    overflow-y: auto;
    padding: 22px;
    background: #f8fafc;
    box-shadow: -20px 0 50px rgba(15,23,42,.18);
}

.detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid #dbe3ed;
}

.detail-head h2 {
    font-size: 18px;
}

.detail-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: #e9eef5;
    color: #334155;
    font-size: 21px;
    cursor: pointer;
}

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 14px 0;
}

.detail-meta div {
    padding: 10px 11px;
    border: 1px solid #dde5ee;
    border-radius: 10px;
    background: white;
}

.detail-meta span {
    display: block;
    font-size: 9px;
    color: #64748b;
}

.detail-meta strong {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #172033;
}

.detail-section {
    margin-top: 11px;
    padding: 14px;
    border: 1px solid #dde5ee;
    border-radius: 12px;
    background: white;
}

.detail-section h3 {
    margin: 0 0 9px;
    font-size: 12px;
    color: #10233f;
}

.detail-text {
    white-space: pre-wrap;
    font-size: 11px;
    line-height: 1.55;
    color: #475569;
}

.detail-list {
    display: grid;
    gap: 7px;
}

.detail-list-item {
    padding: 8px 10px;
    border-radius: 9px;
    background: #f5f8fc;
    font-size: 11px;
    line-height: 1.45;
    color: #475569;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 800px) {
    .workspace {
        padding: 18px 14px;
    }

    .topbar {
        padding: 0 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .board-head,
    .headline {
        align-items: stretch;
        flex-direction: column;
    }

    .board-tools {
        flex-direction: column;
    }

    .board-tools input,
    .board-tools select {
        width: 100%;
    }
}


/* Partner Board Login */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(
            circle at top,
            #17375f 0,
            #081b35 48%,
            #06162b 100%
        );
}

.login-card {
    width: min(420px, 100%);
    padding: 32px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
        0 28px 70px
        rgba(0,0,0,.30);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 22px;
    border-radius: 12px;
    background:
        linear-gradient(
            135deg,
            #1747a6,
            #2563eb
        );
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
}

.login-card h1 {
    margin: 0;
    font-size: 24px;
    color: #10233f;
}

.login-card > p {
    margin: 6px 0 24px;
    font-size: 12px;
    color: #64748b;
}

.login-form {
    display: grid;
    gap: 15px;
}

.login-form label {
    display: grid;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
}

.login-form input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    color: #172033;
    background: #f8fafc;
}

.login-form input:focus {
    border-color: #2563eb;
    box-shadow:
        0 0 0 3px
        rgba(37,99,235,.10);
}

.login-form button {
    height: 43px;
    margin-top: 4px;
    border: 0;
    border-radius: 11px;
    background:
        linear-gradient(
            135deg,
            #1747a6,
            #2563eb
        );
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.login-error {
    margin-bottom: 15px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fef2f2;
    font-size: 11px;
    color: #b42318;
}
