* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #171717;
    background: #f7f7f7;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.login {
    width: min(320px, calc(100% - 48px));
}

.login h1 {
    margin: 0 0 32px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.04em;
}

.login form {
    display: grid;
    gap: 12px;
}

.login input {
    width: 100%;
    height: 48px;
    padding: 0 14px;

    border: 1px solid #ccc;
    border-radius: 8px;

    background: #fff;
    font: inherit;
    font-size: 18px;
}

.login input:focus {
    outline: 2px solid #222;
    outline-offset: 1px;
}

.login button {
    height: 48px;

    border: 0;
    border-radius: 8px;

    background: #171717;
    color: #fff;

    font: inherit;
    font-weight: 600;

    cursor: pointer;
}

.login-error {
    margin: 8px 0 0;
    font-size: 14px;
    color: #b42318;
}

.app-header {
    height: 64px;
    padding: 0 32px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #ddd;
    background: #fff;
}

.app-header a {
    color: inherit;
}

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
}
.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
    gap: 16px;
    margin-top: 32px;
}

.action-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.action-card:hover {
    border-color: #999;
}

.action-card-title {
    font-weight: 650;
}

.action-card-text {
    color: #666;
    font-size: 14px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-heading h1 {
    margin: 10px 0 4px;
}

.page-heading p {
    margin: 0;
    color: #666;
}

.back-link {
    color: #555;
    font-size: 14px;
    text-decoration: none;
}

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

.table-wrap {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.data-table th {
    background: #fafafa;
    font-size: 13px;
    font-weight: 650;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.notice {
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
}

.notice-error {
    border-color: #e2b8b5;
    color: #8f1f17;
}

@media (max-width: 640px) {
    .app-header {
        padding: 0 20px;
    }

    .dashboard {
        padding: 32px 20px;
    }

    .header-nav {
        gap: 12px;
        font-size: 14px;
    }
}

.brand { font-weight: 700; text-decoration: none; }
.header-nav a { text-decoration: none; color: #555; }
.header-nav a:hover, .header-nav a.active { color: #171717; }
.header-nav a.active { font-weight: 650; }
.sort-link { color: inherit; text-decoration: none; display: block; }
.sort-link:hover { text-decoration: underline; }
.actions-col { text-align: right !important; }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.icon-button { border: 1px solid #d8d8d8; background: #fff; border-radius: 7px; padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.icon-button:hover { background: #f3f3f3; }
.icon-button.danger { color: #a52219; }
.empty-cell { color: #666; text-align: center !important; padding: 32px !important; }
.notice { margin-bottom: 20px; }
.notice-success { border-color: #b9d6c2; color: #226536; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 22px; font-size: 14px; }
.pagination a { color: inherit; }
.modal { border: 0; padding: 0; border-radius: 14px; width: min(620px, calc(100% - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.modal::backdrop { background: rgba(0,0,0,.42); backdrop-filter: blur(2px); }
.modal-card { padding: 24px; }
.modal-card-small { max-width: 460px; }
.modal-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.modal-head h2 { margin: 0 0 5px; font-size: 21px; }
.modal-head p { margin: 0; color: #666; font-size: 14px; }
.close-button { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: #666; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.form-grid input { width: 100%; height: 42px; border: 1px solid #ccc; border-radius: 8px; padding: 0 11px; font: inherit; font-weight: 400; }
.form-grid input:focus { outline: 2px solid #222; outline-offset: 1px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.button { border: 0; border-radius: 8px; padding: 10px 15px; background: #171717; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.button.secondary { background: #ededed; color: #171717; }
.button.danger-button { background: #a52219; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .row-actions { flex-direction: column; } }

/* Seitennavigation der Tabellen */
.pagination { gap: 6px; }
.page-link { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #333 !important; text-decoration: none; }
.page-link:hover { background: #f3f3f3; text-decoration: none; }
.page-link.active { background: #171717; border-color: #171717; color: #fff !important; }
.page-ellipsis { min-width: 28px; text-align: center; color: #777; }

/* GG next Farbwelt */
:root {
    --gg-primary: #286D66;
    --gg-primary-hover: #205a54;
    --gg-primary-soft: #eef6f5;
    --gg-primary-soft-alt: #f8fbfb;
    --gg-primary-border: #c8ddda;
}

/* Hauptfarbe der App */
.login input:focus,
.form-grid input:focus {
    outline-color: var(--gg-primary);
}

.login button,
.button,
.page-link.active {
    background: var(--gg-primary);
    border-color: var(--gg-primary);
}

.login button:hover,
.button:hover {
    background: var(--gg-primary-hover);
}

.brand,
.header-nav a:hover,
.header-nav a.active,
.back-link:hover,
.sort-link:hover {
    color: var(--gg-primary);
}

.action-card:hover {
    border-color: var(--gg-primary);
}

/* Kompaktere Lehrertabelle */
.data-table th,
.data-table td {
    padding: 8px 14px;
}

.data-table tbody tr:nth-child(odd) td {
    background: var(--gg-primary-soft-alt);
}

.data-table tbody tr:nth-child(even) td {
    background: var(--gg-primary-soft);
}

.data-table tbody tr:hover td {
    background: #e2efed;
}

.data-table th {
    background: #e7f1f0;
    border-bottom-color: var(--gg-primary-border);
}

.icon-button {
    padding: 5px 9px;
}

.page-link:hover {
    background: var(--gg-primary-soft);
    border-color: var(--gg-primary-border);
}

/* Werkzeugleiste oberhalb der Lehrertabelle */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.table-toolbar .pagination { margin-top: 0; justify-content: flex-start; }
.readonly-input { background: var(--gg-primary-soft); color: #52615f; }
@media (max-width: 640px) {
    .table-toolbar { align-items: flex-start; flex-direction: column-reverse; }
    .top-pagination-slot { width: 100%; overflow-x: auto; }
}

.password-cell,

/* Login-Inszenierung */
.login-page {
    background: #f4f8f7;
    overflow: hidden;
}

.login-stage {
    width: min(720px, calc(100vw - 40px));
}

.login-shell {
    position: relative;
    width: 100%;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    border-radius: 24px;
    object-fit: cover;
    transition: transform .85s cubic-bezier(.22, .8, .25, 1);
    will-change: transform;
}

.login-content {
    position: absolute;
    left: calc(50% - 205px);
    width: 410px;
    height: 52px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.login-stage.is-shifted .login-logo,
.login-stage-ready .login-logo {
    transform: translateX(-266px);
}

.login-stage.is-shifted .login-content,
.login-stage-ready .login-content {
    opacity: 1;
}

.login-wordmark,
.login-form {
    position: absolute;
    inset: 0;
}

.login-wordmark {
    display: flex;
    align-items: center;
    font-size: 31px;
    font-weight: 650;
    letter-spacing: -0.035em;
    color: #17211f;
    opacity: 1;
    transition: opacity .4s ease, transform .5s ease;
}

.login-cursor {
    width: 2px;
    height: 34px;
    margin-left: 4px;
    background: var(--gg-primary);
    opacity: 0;
}

.login-stage.is-typing .login-cursor {
    opacity: 1;
    animation: gg-cursor .72s steps(1, end) infinite;
}

.login-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 10px;
    align-items: center;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .55s ease, transform .55s ease;
}

.login-input-wrap,
.login-form input {
    width: 100%;
}

.login-form input {
    height: 48px;
    padding: 0 15px;
    border: 1px solid var(--gg-primary-border);
    border-radius: 12px;
    background: #fff;
    color: #17211f;
    font: inherit;
    font-size: 16px;
    box-shadow: 0 7px 20px rgba(40, 109, 102, .06);
}

.login-form input::placeholder {
    color: #657975;
    opacity: 1;
}

.login-form input:focus {
    outline: 2px solid var(--gg-primary);
    outline-offset: 2px;
}

.login-form button {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--gg-primary);
    color: #fff;
    font: inherit;
    font-size: 21px;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.login-form button:hover {
    background: var(--gg-primary-hover);
    transform: translateX(2px);
}

.login-stage.is-form .login-wordmark,
.login-stage-ready .login-wordmark {
    opacity: 0;
    transform: translateY(-8px);
}

.login-stage.is-form .login-form,
.login-stage-ready .login-form {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.login-stage.is-form .login-cursor,
.login-stage-ready .login-cursor {
    animation: none;
    opacity: 0;
}

.login-error {
    position: absolute;
    top: 60px;
    left: 0;
    margin: 0;
    color: #a52219;
    font-size: 14px;
}

@keyframes gg-cursor {
    0%, 48% { opacity: 1; }
    49%, 100% { opacity: 0; }
}

@media (max-width: 680px) {
    .login-stage {
        width: calc(100vw - 32px);
    }

    .login-stage.is-shifted .login-logo,
    .login-stage-ready .login-logo {
        transform: translate(-1px, -76px);
    }

    .login-content {
        left: 0;
        top: 106px;
        width: 100%;
    }

    .login-wordmark {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-logo,
    .login-content,
    .login-wordmark,
    .login-form,
    .login-form button {
        transition: none !important;
        animation: none !important;
    }
}

/* Login v12 – zarter und näher an der Referenz */
.login-stage {
    width: min(590px, calc(100vw - 40px));
}

.login-shell {
    min-height: 76px;
}

.login-logo {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    border-radius: 20px;
}

.login-content {
    left: calc(50% - 154px);
    width: 308px;
    height: 44px;
}

.login-stage.is-shifted .login-logo,
.login-stage-ready .login-logo {
    transform: translateX(-204px);
}

.login-wordmark {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.login-cursor {
    height: 29px;
    margin-left: 3px;
}

.login-form {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
}

.login-form input {
    height: 44px;
    padding: 0 14px;
    border: 1px solid #b9cfcb;
    border-radius: 11px;
    font-size: 15px;
    box-shadow: 0 5px 14px rgba(40, 109, 102, .035);
    outline: none;
}

.login-form input:focus {
    border-color: var(--gg-primary);
    outline: none;
    box-shadow: 0 0 0 1px rgba(40, 109, 102, .10);
}

.login-form button {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 18px;
    font-weight: 400;
}

.login-error {
    top: 54px;
    font-size: 13px;
}

@media (max-width: 680px) {
    .login-stage.is-shifted .login-logo,
    .login-stage-ready .login-logo {
        transform: translate(-1px, -66px);
    }

    .login-content {
        top: 94px;
        width: min(308px, 100%);
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Login v13 – Wortmarke bleibt stehen, Formular fadet darunter ein */
.login-shell {
    min-height: 104px;
}

.login-logo {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
    border-radius: 21px;
}

.login-content {
    left: calc(50% - 154px);
    width: 308px;
    height: 94px;
}

.login-stage.is-shifted .login-logo,
.login-stage-ready .login-logo {
    transform: translateX(-207px);
}

.login-wordmark {
    inset: 0 auto auto 0;
    height: 44px;
    opacity: 1;
    transform: translateY(0);
    transition: transform .9s cubic-bezier(.22,.8,.25,1), opacity .5s ease;
}

.login-form {
    inset: 0;
    top: 50px;
    height: 44px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.35s ease, transform 1.35s cubic-bezier(.22,.8,.25,1);
}

.login-stage.is-form .login-wordmark,
.login-stage-ready .login-wordmark {
    opacity: 1;
    transform: translateY(-50px);
}

.login-stage.is-form .login-form,
.login-stage-ready .login-form {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.login-stage.is-form .login-cursor,
.login-stage-ready .login-cursor {
    animation: none;
    opacity: 0;
}

.login-error {
    top: 100px;
}

@media (max-width: 680px) {
    .login-shell { min-height: 180px; }

    .login-stage.is-shifted .login-logo,
    .login-stage-ready .login-logo {
        transform: translate(-1px, -72px);
    }

    .login-content {
        top: 104px;
        height: 94px;
    }

    .login-stage.is-form .login-wordmark,
    .login-stage-ready .login-wordmark {
        transform: translateY(-50px);
    }
}

/* Login v14 – Wortmarke bleibt sichtbar, ruhiger Übergang */
.login-shell {
    min-height: 126px;
}

.login-content {
    top: 50%;
    height: 100px;
    transform: translateY(-22px);
}

.login-wordmark {
    top: 0;
    bottom: auto;
    height: 44px;
    transform: translateY(0);
    transition: transform 1.25s cubic-bezier(.22,.8,.25,1), opacity .5s ease;
}

.login-form {
    top: 0;
    bottom: auto;
    height: 44px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 2.8s ease .35s, transform 2.4s cubic-bezier(.22,.8,.25,1) .2s;
}

.login-stage.is-form .login-wordmark,
.login-stage-ready .login-wordmark {
    opacity: 1;
    transform: translateY(-38px);
}

.login-stage.is-form .login-form,
.login-stage-ready .login-form {
    opacity: 1;
    transform: translateY(20px);
    pointer-events: auto;
}

@media (max-width: 680px) {
    .login-shell { min-height: 210px; }

    .login-content {
        top: 112px;
        height: 100px;
        transform: translateX(-50%);
    }

    .login-stage.is-form .login-wordmark,
    .login-stage-ready .login-wordmark {
        opacity: 1;
        transform: translateY(-34px);
    }

    .login-stage.is-form .login-form,
    .login-stage-ready .login-form {
        transform: translateY(20px);
    }
}

/* Login v15 – Desktop: Logo rahmt Wortmarke + Eingabe vertikal ein */
@media (min-width: 681px) {
    .login-shell {
        min-height: 82px;
    }

    .login-logo {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
        border-radius: 22px;
    }

    .login-content {
        top: 50%;
        left: calc(50% - 154px);
        width: 308px;
        height: 82px;
        transform: translateY(-50%);
    }

    .login-stage.is-shifted .login-logo,
    .login-stage-ready .login-logo {
        transform: translateX(-211px);
    }

    .login-wordmark {
        top: 0;
        height: 32px;
        align-items: flex-start;
    }

    .login-form {
        top: auto;
        bottom: 0;
        height: 44px;
        transform: translateY(8px);
    }

    .login-stage.is-form .login-wordmark,
    .login-stage-ready .login-wordmark {
        opacity: 1;
        transform: translateY(0);
    }

    .login-stage.is-form .login-form,
    .login-stage-ready .login-form {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .login-error {
        top: 90px;
    }
}

/* Passwort sichtbar/unsichtbar */
.login-input-wrap {
    position: relative;
}

.login-form input {
    padding-right: 46px;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px;
    padding: 0 !important;
    border: 0;
    border-radius: 8px !important;
    background: transparent !important;
    color: var(--gg-primary) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
}

.login-password-toggle:hover {
    background: rgba(40, 109, 102, .07) !important;
    transform: translateY(-50%) !important;
}

.login-password-toggle svg {
    width: 19px;
    height: 19px;
    display: block;
}

.login-submit-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.login-submit-arrow span {
    display: block;
    line-height: 1;
    transform: translateY(-1px);
}

/* Login v16 – Wortmarke startet mittig und Mobile sauber geordnet */
@media (min-width: 681px) {
    .login-wordmark {
        top: 19px;
        height: 44px;
        align-items: center;
        font-size: 25px;
        font-weight: 600;
        transform: translateY(0);
    }

    .login-cursor {
        height: 26px;
    }

    .login-stage.is-form .login-wordmark,
    .login-stage-ready .login-wordmark {
        transform: translateY(-19px);
    }
}

@media (max-width: 680px) {
    .login-stage {
        width: min(360px, calc(100vw - 28px));
    }

    .login-shell {
        min-height: 224px;
        display: block;
    }

    .login-logo {
        position: absolute;
        top: 0;
        left: 50%;
        width: 78px;
        height: 78px;
        transform: translateX(-50%);
    }

    .login-stage.is-shifted .login-logo,
    .login-stage-ready .login-logo {
        transform: translateX(-50%);
    }

    .login-content {
        top: 96px;
        left: 50%;
        width: 100%;
        height: 112px;
        transform: translateX(-50%);
        opacity: 0;
    }

    .login-stage.is-shifted .login-content,
    .login-stage-ready .login-content {
        opacity: 1;
    }

    .login-wordmark {
        top: 20px;
        left: 0;
        width: 100%;
        height: 44px;
        justify-content: center;
        align-items: center;
        font-size: 24px;
        font-weight: 600;
        transform: translateY(0);
    }

    .login-cursor {
        height: 25px;
    }

    .login-form {
        top: auto;
        bottom: 0;
        width: 100%;
        height: 44px;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 9px;
        transform: translateY(8px);
    }

    .login-stage.is-form .login-wordmark,
    .login-stage-ready .login-wordmark {
        transform: translateY(-20px);
    }

    .login-stage.is-form .login-form,
    .login-stage-ready .login-form {
        transform: translateY(0);
    }

    .login-error {
        top: 118px;
        width: 100%;
        text-align: center;
    }
}

/* Login v17 – optische Zentrierung + rahmenloses Eingabefeld */
.login-form input {
    border: 0;
    outline: none;
    background: #fff;
    box-shadow: 0 3px 12px rgba(40, 109, 102, .075);
}

.login-form input:focus {
    border: 0;
    outline: none;
    box-shadow: 0 4px 15px rgba(40, 109, 102, .12);
}

@media (min-width: 681px) {
    /* Wortmarke + Eingabe als Einheit optisch etwas höher zum Logo ausrichten. */
    .login-content {
        transform: translateY(calc(-50% - 3px));
    }
}

/* Login v18 – feinere Proportionen */
@media (min-width: 681px) {
    .login-shell {
        min-height: 88px;
    }

    .login-logo {
        width: 88px;
        height: 88px;
        flex-basis: 88px;
        border-radius: 23px;
    }

    .login-wordmark {
        font-size: 23px;
    }

    /* Endposition nur einen Tick höher als in v17. */
    .login-content {
        transform: translateY(calc(-50% - 5px));
    }
}

@media (max-width: 680px) {
    .login-logo {
        width: 82px;
        height: 82px;
        border-radius: 22px;
    }

    .login-wordmark {
        font-size: 22px;
    }
}


/* Login v19 – ohne Placeholder, kompakteres Kennwortfeld */
@media (min-width: 681px) {
    .login-form {
        width: 276px;
    }
}

@media (max-width: 680px) {
    .login-form {
        width: calc(100% - 28px);
        left: 14px;
    }
}

/* Schüler & Kurse */
.students-courses-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; align-items:start; }
.management-panel { min-width:0; }
.panel-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0 0 10px; }
.panel-head h2 { margin:0; font-size:19px; }
.panel-count { color:#68706f; font-size:13px; }
.compact-table th,.compact-table td { padding:9px 11px; font-size:13px; }
.import-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 24px; padding:14px 16px; border:1px solid var(--gg-primary-border); border-radius:10px; background:var(--gg-primary-soft-alt); }
.import-bar form { display:flex; align-items:end; gap:10px; flex-wrap:wrap; }
.import-bar label { display:grid; gap:5px; font-size:12px; font-weight:650; }
.import-bar input[type="text"],.import-bar input[type="file"] { max-width:260px; min-height:38px; padding:7px 9px; border:1px solid #ccd5d3; border-radius:8px; background:#fff; font:inherit; }
.import-help { max-width:430px; margin:0; color:#68706f; font-size:13px; line-height:1.45; }
@media (max-width:900px) { .students-courses-grid { grid-template-columns:1fr; } .import-bar { align-items:flex-start; flex-direction:column; } }

/* Schüler & Kurse v21 */
.import-bar select,.period-filter select { min-height:38px; padding:7px 30px 7px 9px; border:1px solid #ccd5d3; border-radius:8px; background:#fff; font:inherit; }
.period-filter { display:flex; align-items:end; gap:10px; margin:0 0 18px; flex-wrap:wrap; }
.period-filter label { display:grid; gap:5px; font-size:12px; font-weight:650; }
.table-search { display:flex; align-items:center; gap:7px; margin:0 0 9px; min-height:38px; }
.table-search input[type="search"] { width:min(260px,100%); min-width:0; height:36px; padding:7px 10px; border:1px solid #d3dddb; border-radius:8px; background:#fff; font:inherit; }
.table-search button { height:36px; padding:0 11px; border:0; border-radius:8px; background:var(--gg-primary); color:#fff; cursor:pointer; }
.table-search a { color:var(--gg-primary); font-size:12px; text-decoration:none; }
.sort-link { color:inherit; text-decoration:none; display:block; }
.sort-link:hover { color:var(--gg-primary); }
.mini-pagination { display:flex; align-items:center; gap:4px; min-height:31px; margin:5px 0 9px; flex-wrap:wrap; }
.mini-pagination a,.mini-pagination span { min-width:27px; height:27px; display:inline-flex; align-items:center; justify-content:center; padding:0 6px; border-radius:7px; color:#52605e; text-decoration:none; font-size:12px; }
.mini-pagination a:hover,.mini-pagination .active { background:var(--gg-primary); color:#fff; }
@media (max-width:680px){ .table-search { flex-wrap:wrap; } .table-search input[type="search"] { flex:1 1 180px; } }

/* KL/TUT-Zuordnung nach LUSD-Import */
.assignment-backdrop { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:20px; background:rgba(20,35,33,.34); backdrop-filter:blur(2px); }
.assignment-dialog { width:min(680px,100%); max-height:min(760px,90vh); overflow:auto; background:#fff; border-radius:16px; box-shadow:0 22px 70px rgba(20,35,33,.20); padding:20px; }
.assignment-dialog-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:14px; }
.assignment-dialog-head h2 { margin:0 0 4px; font-size:21px; }
.assignment-dialog-head p { margin:0; color:#68706f; font-size:13px; }
.dialog-close { border:0; background:transparent; color:#66706e; font-size:27px; line-height:1; cursor:pointer; padding:0 4px; }
.assignment-list { display:grid; gap:8px; }
.assignment-row { display:grid; grid-template-columns:minmax(150px,.8fr) minmax(260px,1.2fr); align-items:center; gap:14px; padding:10px 12px; border-radius:10px; background:var(--gg-primary-soft-alt); }
.assignment-row span { display:grid; gap:2px; }
.assignment-row small { color:#68706f; font-weight:400; }
.assignment-row select { width:100%; min-height:39px; padding:7px 30px 7px 9px; border:1px solid #ccd5d3; border-radius:8px; background:#fff; font:inherit; }
.assignment-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:16px; }
.button-secondary { background:#edf2f1; color:#35423f; }
@media (max-width:620px){ .assignment-row { grid-template-columns:1fr; gap:7px; } .assignment-actions { flex-direction:column-reverse; } .assignment-actions .button { width:100%; } }
