:root {
    --page-width: 1040px;
    --border: #dbe2ea;
    --text-main: #0f172a;
    --text-soft: #64748b;
    --primary: #4f7cff;
    --primary-hover: #3f6ae6;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: system-ui, Arial, sans-serif;
    color: var(--text-main);
    background: transparent;
}

.page-header-inner {
    width: min(var(--page-width), calc(100% - 24px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.header-open-link-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.header-open-link:hover {
    background: #ffffff;
}

.header-open-link-primary:hover {
    background: var(--primary-hover);
}

.schnellstart-page {
    padding: 18px 0 28px;
}

.schnellstart-shell {
    width: min(var(--page-width), calc(100% - 16px));
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.intro-bar,
.entry-board {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.intro-bar {
    padding: 18px 20px;
}

.intro-kicker,
.board-title {
    margin: 0;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.intro-bar h1 {
    margin: 4px 0 0;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    line-height: 1.08;
}

.intro-text {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.5;
}

.entry-board {
    padding: 12px 14px 14px;
}

.entry-board-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.primary-actions {
    display: flex;
    align-items: center;
}

.add-row-btn {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.add-row-btn:hover {
    border-color: #b8c5d3;
}

.entry-board-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.secondary-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.secondary-action-btn {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.secondary-action-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.secondary-action-btn:hover {
    border-color: #b8c5d3;
}

.secondary-action-btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.result-panel {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-right: 4px;
}

.result-item {
    min-width: 112px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
}

.result-label {
    display: block;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.result-value {
    display: block;
    margin-top: 3px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
}

.table-shell {
    overflow-x: auto;
}

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

.subject-col {
    width: 31%;
}

.grade-col {
    width: 13.8%;
}

.schnellstart-table thead th {
    padding: 0 4px 6px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.schnellstart-table thead th:not(:first-child),
.schnellstart-table tbody td:not(:first-child) {
    text-align: center;
}

.schnellstart-table tbody td {
    padding: 6px 4px;
    border-top: 1px solid #edf1f5;
}

.schnellstart-table thead th:first-child,
.schnellstart-table tbody td:first-child {
    padding-left: 0;
}

.schnellstart-table thead th:last-child,
.schnellstart-table tbody td:last-child {
    padding-right: 0;
}

.cell-display,
.cell-select {
    width: 100%;
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.cell-display {
    padding: 6px 8px;
    cursor: pointer;
}

.cell-select {
    padding: 6px 8px;
}

.subject-display,
.subject-select {
    background: #ffffff;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grade-display,
.grade-select,
.abi-display,
.abi-select {
    text-align: center;
    padding-left: 6px;
    padding-right: 6px;
}

.grade-display.is-empty:not(.is-status-endgueltig):not(.is-status-programm):not(.is-status-eigene-prognose) {
    color: var(--text-soft);
}

.grade-display.is-status-endgueltig,
.abi-display.is-status-endgueltig {
    background: rgba(46, 125, 50, 0.85);
    border-color: rgba(46, 125, 50, 0.95);
    color: #ffffff;
}

.grade-display.is-status-programm,
.abi-display.is-status-programm {
    background: rgba(40, 95, 170, 0.85);
    border-color: rgba(40, 95, 170, 0.95);
    color: #ffffff;
}

.grade-display.is-status-eigene-prognose,
.abi-display.is-status-eigene-prognose {
    background: rgba(230, 140, 20, 0.85);
    border-color: rgba(230, 140, 20, 0.95);
    color: #ffffff;
}

.grade-display.is-not-eingebracht {
    opacity: 0.4;
    border-style: dashed;
}

.abi-display.is-empty:not(.is-status-endgueltig):not(.is-status-programm):not(.is-status-eigene-prognose) {
    color: var(--text-soft);
    font-size: 13px;
}

.abi-display.is-not-pruefen {
    background: transparent;
    border-color: transparent;
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
}

.is-embedded .simple-page-header,
.is-embedded [data-site-footer] {
    display: none;
}

.is-embedded body {
    background: transparent;
}

.is-embedded .schnellstart-page {
    padding: 0 0 8px;
}

.is-embedded .schnellstart-shell {
    width: 100%;
}

.is-embedded .intro-bar,
.is-embedded .entry-board {
    background: transparent;
    border: none;
    border-radius: 0;
}

.is-embedded .intro-bar {
    padding: 8px 12px 10px;
}

.is-embedded .entry-board {
    padding: 0 12px;
}

@media (min-width: 761px) {
    .page-header-inner {
        width: min(980px, calc(100% - 56px));
    }

    .schnellstart-shell {
        width: min(980px, calc(100% - 56px));
        gap: 16px;
    }

    .intro-bar {
        padding: 24px 28px;
    }

    .intro-kicker,
    .board-title {
        font-size: 13px;
    }

    .intro-bar h1 {
        font-size: clamp(2rem, 3vw, 2.8rem);
    }

    .intro-text {
        font-size: 16px;
    }

    .entry-board {
        padding: 18px 22px 20px;
    }

    .entry-board-head {
        margin-bottom: 12px;
    }

    .entry-board-actions {
        gap: 16px;
    }

    .secondary-actions {
        flex-wrap: nowrap;
        margin-left: auto;
    }

    .subject-col {
        width: 24%;
    }

    .grade-col {
        width: 15.2%;
    }

    .schnellstart-table thead th {
        padding-bottom: 8px;
        font-size: 12px;
    }

    .schnellstart-table tbody td {
        padding: 8px 6px;
    }

    .cell-display,
    .cell-select {
        min-height: 36px;
        font-size: 14px;
        border-radius: 10px;
    }

    .cell-display {
        padding: 7px 10px;
    }

    .cell-select {
        padding: 7px 10px;
    }

    .abi-display.is-not-pruefen {
        font-size: 18px;
    }

    .add-row-btn,
    .secondary-action-btn {
        min-height: 40px;
        padding: 0 14px;
        font-size: 15px;
    }

    .result-item {
        min-width: 124px;
        padding: 9px 14px;
    }

    .result-value {
        font-size: 20px;
    }

    .is-embedded .schnellstart-shell {
        width: min(980px, calc(100% - 56px));
    }

    .is-embedded .intro-bar {
        padding: 10px 0 12px;
    }

    .is-embedded .entry-board {
        padding: 0;
    }
}

@media (max-width: 760px) {
    .page-header-inner {
        width: calc(100% - 20px);
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions a {
        flex: 1;
    }

    .schnellstart-page {
        padding: 8px 0 16px;
    }

    .schnellstart-shell {
        width: 100%;
        gap: 10px;
    }

    .intro-bar {
        padding: 14px 12px;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .entry-board {
        padding: 12px 0 16px;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .entry-board-head {
        padding: 0 12px;
    }

    .table-shell {
        padding: 0 12px;
    }

    .add-row-btn {
        margin-left: 12px;
    }

    .entry-board-actions {
        display: grid;
        gap: 10px;
        padding: 0 12px;
    }

    .secondary-actions {
        width: 100%;
        justify-content: stretch;
    }

    .result-panel {
        width: 100%;
        margin-right: 0;
    }

    .result-item {
        flex: 1 1 0;
        min-width: 0;
    }

    .secondary-action-btn {
        flex: 1 1 0;
        min-width: 120px;
    }

    .cell-display,
    .cell-select {
        min-height: 30px;
        font-size: 12px;
    }

    .cell-display {
        padding: 5px 6px;
    }

    .cell-select {
        padding: 5px 4px;
    }

    .is-embedded .intro-bar {
        padding: 6px 12px 8px;
    }

    .is-embedded .entry-board {
        padding: 0 8px;
    }
}
