.ftgui-students {
    width: 100%;
    max-width: calc(100vw - 24px);
    margin: 0 auto;
    color: #162631;
    font-family: inherit;
}

.ftgui-students-head {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    padding: 22px 18px 18px;
    border-bottom: 1px solid #e6edf2;
    background: #fff;
}

.ftgui-students-head h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    color: #101c29;
}

.ftgui-students-head p {
    margin: 6px 0 0;
    color: #60717c;
    font-size: 14px;
}

.ftgui-students-tools {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.ftgui-student-search {
    display: grid;
    gap: 7px;
    min-width: min(340px, 48vw);
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.ftgui-student-search input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #d7e0e6;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    text-transform: none;
    box-sizing: border-box;
}

.ftgui-students-add {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #d6e0e7;
    border-radius: 999px;
    background: #fff;
    color: #172835;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(20, 36, 46, .08);
}

.ftgui-students-add span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #0a7bdc;
    color: #fff;
    font-size: 20px;
    line-height: 1;
}

.ftgui-student-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 24px 18px 28px;
    background: #fff;
}

.ftgui-student-folder {
    min-height: 178px;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    padding: 10px 8px 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #111827;
    text-align: center;
    text-decoration: none;
    font-weight: 900;
    -webkit-tap-highlight-color: transparent;
}

.ftgui-student-folder[hidden] {
    display: none !important;
}

.ftgui-student-folder:hover,
.ftgui-student-folder:focus-visible {
    border-color: #d7e0e6;
    background: #f8fafc;
    color: #111827;
    outline: none;
}

.ftgui-student-folder.is-new {
    border-color: var(--ftgui-student-color, #0f4c5c);
    background: #f8fbfb;
    box-shadow: inset 0 0 0 1px var(--ftgui-student-color, #0f4c5c);
}

.ftgui-student-folder svg {
    width: min(132px, 100%);
    height: auto;
    display: block;
}

.ftgui-student-folder span {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.ftgui-student-folder small {
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef7ff;
    box-shadow: inset 0 0 0 2px var(--ftgui-student-color, #0a7bdc);
    color: #172835;
    font-size: 12px;
    font-weight: 900;
}

.ftgui-student-empty {
    margin: 0 18px 28px;
    padding: 16px;
    border: 1px solid #d7e0e6;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 900;
    text-align: center;
}

.ftgui-students-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.ftgui-students-table {
    width: 100%;
    min-width: 860px;
    border-spacing: 0;
    border-collapse: separate;
    font-size: 14px;
}

.ftgui-students-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 42px;
    padding: 0 14px;
    border-bottom: 1px solid #dfe8ee;
    background: #fff;
    color: #23313c;
    font-size: 13px;
    text-align: left;
}

.ftgui-students-table td {
    height: 52px;
    padding: 0 14px;
    border-bottom: 1px solid #edf2f5;
    color: #273945;
    vertical-align: middle;
    white-space: nowrap;
}

.ftgui-students-table tbody tr:nth-child(even) {
    background: #f6f9fb;
}

.ftgui-students-table tbody tr:hover {
    background: #eaf4ff;
}

.ftgui-student-row {
    position: relative;
}

.ftgui-student-row.ftgui-student-new td:first-child {
    box-shadow: inset 5px 0 0 var(--ftgui-student-color, #0f4c5c);
}

.ftgui-student-name {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    min-height: 44px;
    color: #162631;
    text-decoration: none;
}

.ftgui-student-name:hover strong {
    text-decoration: underline;
}

.ftgui-student-name span,
.ftgui-students-table td span,
.ftgui-students-table td small {
    display: block;
}

.ftgui-student-name strong {
    font-weight: 850;
}

.ftgui-student-name small,
.ftgui-students-table td small {
    margin-top: 2px;
    color: #70828f;
    font-size: 12px;
}

.ftgui-student-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
    background: #dfe8ee;
}

.ftgui-student-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef7ff;
    box-shadow: inset 0 0 0 2px var(--ftgui-student-color, #0f4c5c);
    color: #172835;
    font-weight: 800;
}

.ftgui-student-muted {
    color: #8a99a4;
}

.ftgui-student-modal[hidden] {
    display: none !important;
}

.ftgui-student-modal {
    position: fixed;
    inset: 0;
    z-index: 100020;
    display: grid;
    place-items: center;
    padding: 18px;
}

.ftgui-student-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 24, 32, .45);
    backdrop-filter: blur(4px);
}

.ftgui-student-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 26px 80px rgba(7, 24, 32, .34);
    box-sizing: border-box;
}

.ftgui-student-dialog header h2 {
    margin: 0;
    color: #101c29;
    font-size: 26px;
}

.ftgui-student-dialog header p {
    margin: 8px 0 18px;
    color: #60717c;
}

.ftgui-student-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ftgui-student-dialog label {
    display: block;
    color: #253541;
    font-weight: 800;
}

.ftgui-student-dialog input,
.ftgui-student-dialog select,
.ftgui-student-dialog textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 7px;
    border: 1px solid #cfdbe3;
    border-radius: 8px;
    background: #fff;
    color: #172835;
    font: inherit;
    box-sizing: border-box;
}

.ftgui-student-dialog textarea {
    min-height: 86px;
    padding: 10px 12px;
    resize: vertical;
}

.ftgui-student-message {
    min-height: 22px;
    margin: 14px 0 0;
    color: #0f766e;
    font-weight: 800;
}

.ftgui-student-message.is-error {
    color: #b42318;
}

.ftgui-student-dialog footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.ftgui-student-primary,
.ftgui-student-secondary {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    font-weight: 850;
    cursor: pointer;
}

.ftgui-student-primary {
    min-height: 48px;
    border: 1px solid #86efac;
    border-radius: 10px;
    background: #dcfce7;
    color: #111827;
}

.ftgui-student-secondary {
    border: 1px solid #d6e0e7;
    background: #fff;
    color: #172835;
}

.ftgui-student-primary:hover,
.ftgui-student-primary:focus-visible {
    border-color: #4ade80;
    background: #bbf7d0;
    color: #111827;
}

body.ftgui-student-modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .ftgui-students-head {
        align-items: stretch;
        flex-direction: column;
        padding: 18px 12px;
    }

    .ftgui-students-tools {
        display: grid;
        gap: 10px;
    }

    .ftgui-student-search {
        min-width: 0;
    }

    .ftgui-students-head h1 {
        font-size: 24px;
    }

    .ftgui-students-add {
        justify-content: center;
        width: 100%;
    }

    .ftgui-student-folder-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 18px 12px 22px;
    }

    .ftgui-student-form-grid {
        grid-template-columns: 1fr;
    }

    .ftgui-student-dialog {
        padding: 18px;
    }
}

/* Kompakte Business-UI fuer Schueleruebersicht und Anlegen-Dialog. */
.ftgui-students,
.ftgui-student-dialog {
    --ftgui-ui-text: 14px;
    --ftgui-ui-label: 12px;
    --ftgui-ui-input: 14px;
    --ftgui-ui-radius: 12px;
    --ftgui-ui-radius-lg: 16px;
    --ftgui-ui-pill: 24px;
    --ftgui-ui-shadow: 0 14px 38px rgba(7, 24, 32, .18);
    font-size: var(--ftgui-ui-text);
}

.ftgui-students-head {
    gap: 12px;
    padding: 18px 16px 14px;
}

.ftgui-students-head h1 {
    font-size: clamp(30px, 3vw, 34px);
    line-height: 1.08;
}

.ftgui-students-head p {
    margin-top: 4px;
}

.ftgui-students-tools {
    gap: 10px;
}

.ftgui-student-search {
    gap: 6px;
    min-width: min(320px, 46vw);
    font-size: var(--ftgui-ui-label);
    font-weight: 700;
}

.ftgui-student-search input {
    min-height: 50px;
    padding: 12px 14px;
    border-radius: var(--ftgui-ui-radius);
    font-size: var(--ftgui-ui-input);
    font-weight: 600;
}

.ftgui-students-add {
    min-height: 50px;
    padding: 0 20px;
    border-radius: var(--ftgui-ui-pill);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(20, 36, 46, .06);
    transition: background-color .12s ease, border-color .12s ease;
}

.ftgui-student-folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 20px 16px 24px;
}

.ftgui-student-folder {
    min-height: 164px;
    gap: 7px;
    padding: 9px 8px 12px;
    border-radius: var(--ftgui-ui-radius-lg);
    font-weight: 700;
    contain: layout paint;
}

.ftgui-student-folder svg {
    width: min(120px, 100%);
}

.ftgui-student-folder small {
    min-height: 22px;
    font-weight: 700;
}

.ftgui-students-table {
    font-size: 14px;
}

.ftgui-students-table th {
    height: 38px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
}

.ftgui-students-table td {
    height: 48px;
    padding: 0 12px;
}

.ftgui-student-name {
    min-height: 42px;
}

.ftgui-student-name strong,
.ftgui-student-badge {
    font-weight: 700;
}

.ftgui-student-modal-overlay {
    background: rgba(7, 24, 32, .36);
    backdrop-filter: none;
}

.ftgui-student-modal {
    padding: 16px;
}

.ftgui-student-dialog {
    width: min(820px, calc(100vw - 28px));
    max-height: calc(100vh - 32px);
    padding: 22px;
    border: 1px solid #d7e0e6;
    border-radius: var(--ftgui-ui-radius-lg);
    box-shadow: var(--ftgui-ui-shadow);
    contain: layout paint;
}

.ftgui-student-dialog header h2 {
    font-size: 24px;
    line-height: 1.14;
}

.ftgui-student-dialog header p {
    margin: 6px 0 14px;
}

.ftgui-student-form-grid {
    gap: 12px;
}

.ftgui-student-dialog label {
    font-size: var(--ftgui-ui-label);
    font-weight: 700;
}

.ftgui-student-dialog input,
.ftgui-student-dialog select,
.ftgui-student-dialog textarea {
    min-height: 50px;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: var(--ftgui-ui-radius);
    font-size: var(--ftgui-ui-input);
    font-weight: 600;
}

.ftgui-student-dialog textarea {
    min-height: 92px;
    line-height: 1.38;
}

.ftgui-student-dialog footer {
    margin-top: 14px;
}

.ftgui-student-primary,
.ftgui-student-secondary {
    min-height: 48px;
    padding: 0 22px;
    border-radius: var(--ftgui-ui-pill);
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 720px) {
    .ftgui-student-dialog {
        width: min(820px, calc(100vw - 18px));
        max-height: calc(100vh - 20px);
        padding: 18px;
    }
}
