.department-shell {
    padding: 28px 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.department-hero-card,
.department-sidebar-card,
.department-main-card,
.department-modal {
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid rgba(78, 95, 198, 0.10);
    box-shadow: var(--shadow);
}

.department-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px;
}

.department-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(78, 95, 198, 0.10);
    color: var(--main-color);
    font-size: 13px;
    font-weight: 700;
}

.department-title {
    font-size: 34px;
    line-height: 1.05;
    color: var(--text-color);
    margin-bottom: 6px;
}

.department-subtitle {
    color: var(--muted-text);
    font-size: 15px;
}

.department-primary-button,
.department-secondary-button,
.department-danger-button,
.department-ghost-button,
.department-nav-button {
    border: none;
    border-radius: 14px;
    min-height: 46px;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}

.department-primary-button {
    background: linear-gradient(135deg, #3f76ff, #2657e6);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(38, 87, 230, 0.18);
}

.department-secondary-button {
    background: linear-gradient(135deg, #376fff, #244fda);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(36, 79, 218, 0.16);
}

.department-danger-button {
    background: linear-gradient(135deg, #2a5cd8, #1c43b8);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(28, 67, 184, 0.16);
}

.department-ghost-button {
    background: linear-gradient(135deg, #5a86ff, #3663ef);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(54, 99, 239, 0.16);
}

    .department-primary-button:hover,
    .department-secondary-button:hover,
    .department-danger-button:hover,
    .department-ghost-button:hover,
    .department-nav-button:hover {
        transform: translateY(-1px);
        filter: saturate(1.04);
    }

.department-full-button {
    width: 100%;
}

.department-workspace {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.department-sidebar-card {
    padding: 22px;
    position: sticky;
    top: 98px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.department-sidebar-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.department-sidebar-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--main-color);
}

.department-sidebar-nav,
.department-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.department-sidebar-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(78, 95, 198, 0.18), transparent);
    margin: 18px 0;
}

.department-nav-button {
    min-height: 46px;
    border: 1px solid rgba(78, 95, 198, 0.16);
    background: linear-gradient(180deg, #edf3ff, #dce7ff);
    color: #17326e;
    text-align: left;
    box-shadow: 0 8px 18px rgba(20, 43, 102, 0.06);
}

    .department-nav-button.active {
        background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
        color: #ffffff;
        border-color: transparent;
    }

.department-main-card {
    padding: 24px;
    min-height: 720px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
}

.department-panel {
    display: none;
}

    .department-panel.active {
        display: block;
    }

.department-panel-header {
    margin-bottom: 20px;
}

    .department-panel-header h2 {
        font-size: 28px;
        color: var(--text-color);
        margin-bottom: 6px;
    }

    .department-panel-header p {
        color: var(--muted-text);
    }

.department-placeholder-card {
    padding: 24px;
    border-radius: 18px;
    border: 1px dashed rgba(78, 95, 198, 0.18);
    background: var(--input-bg);
    color: var(--muted-text);
    line-height: 1.5;
}

.department-toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.department-toolbar-row {
    display: grid;
    grid-template-columns: minmax(320px, 1.8fr) minmax(240px, 0.8fr);
    gap: 12px;
}

.department-toolbar-row-secondary {
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
}

.department-date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.department-search-input,
.custom-select-trigger {
    height: 52px;
}

.department-summary-bar {
    color: var(--muted-text);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.department-practices-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(94, 135, 255, 0.18), transparent 22%),
        linear-gradient(165deg, #112351, #15306f 62%, #1a408f);
    border: 1px solid rgba(68, 113, 248, 0.18);
    box-shadow: 0 18px 36px rgba(10, 23, 58, 0.12);
}

.practice-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
    border: 1px solid rgba(78, 95, 198, 0.10);
    border-radius: 22px;
    padding: 16px 16px 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: stretch;
    box-shadow: 0 12px 24px rgba(31, 41, 55, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

    .practice-card:hover {
        transform: translateY(-2px);
        border-color: rgba(78, 95, 198, 0.20);
        box-shadow: 0 22px 44px rgba(31, 41, 55, 0.10);
    }

.practice-card-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.practice-card-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.practice-card-title-block {
    min-width: 0;
}

.practice-index-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(78, 95, 198, 0.10);
    color: var(--main-color);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 10px;
}

.practice-card-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.25;
}

.practice-card-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.practice-side-meta {
    color: var(--muted-text);
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.practice-card-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid rgba(78, 95, 198, 0.12);
}

.practice-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.practice-meta-label {
    color: var(--main-color);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.practice-meta-value {
    color: var(--text-color);
    font-size: 15px;
    word-break: break-word;
}

.practice-meta-separator {
    width: 1px;
    height: 14px;
    background: rgba(78, 95, 198, 0.16);
}

.practice-card-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 10px;
    min-width: 220px;
}

.practice-card-actions .department-primary-button,
.practice-card-actions .department-secondary-button,
.practice-card-actions .department-ghost-button,
.practice-card-actions .department-danger-button {
    width: 100%;
}

.native-select-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    min-height: 52px;
    padding: 0 44px 0 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: 0.2s ease;
}

    .custom-select-trigger:hover {
        background-color: var(--card-bg);
    }

    .custom-select-trigger:focus {
        outline: none;
        border-color: var(--main-color);
        box-shadow: 0 0 0 4px rgba(78, 95, 198, 0.12);
    }

    .custom-select-trigger::after {
        content: "";
        position: absolute;
        right: 14px;
        top: 50%;
        width: 12px;
        height: 12px;
        transform: translateY(-50%);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M5.5 7.5L10 12l4.5-4.5'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: 12px 12px;
        transition: transform 0.18s ease;
    }

.custom-select.open .custom-select-trigger {
    border-color: var(--main-color);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(78, 95, 198, 0.12);
}

    .custom-select.open .custom-select-trigger::after {
        transform: translateY(-50%) rotate(180deg);
    }

.custom-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    display: none;
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(78, 95, 198, 0.12);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: 0 18px 40px rgba(31, 41, 55, 0.16);
}

.custom-select.open .custom-select-menu {
    display: block;
}

.custom-select.is-disabled .custom-select-trigger,
.custom-select-trigger:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    background-color: rgba(226, 232, 240, 0.82);
    box-shadow: none;
}

.custom-select-option {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    transition: 0.15s ease;
    line-height: 1.35;
}

    .custom-select-option:hover {
        background-color: rgba(78, 95, 198, 0.08);
    }

    .custom-select-option.selected {
        background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
        color: #ffffff;
        font-weight: 600;
    }

.department-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1500;
}

    .department-modal-backdrop.open {
        display: flex;
    }

.department-modal {
    width: 100%;
    max-width: 920px;
    max-height: calc(100vh - 40px);
    padding: 26px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(78, 124, 255, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 1));
}

.department-modal-large {
    max-width: 1080px;
}

.department-modal-extra-large {
    max-width: 1180px;
}

.department-modal-assignments {
    max-width: 1360px;
    padding: 28px;
    height: calc(100vh - 40px);
    max-height: calc(100vh - 40px);
    min-height: 0;
}

.department-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex: 0 0 auto;
    padding: 18px 20px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(128, 162, 255, 0.20), transparent 24%),
        linear-gradient(140deg, #11234f, #17326a 64%, #1d4488);
    box-shadow: 0 14px 28px rgba(13, 31, 74, 0.16);
}

    .department-modal-header h2 {
        font-size: 28px;
        color: #ffffff;
        margin-bottom: 6px;
    }

    .department-modal-header p {
        color: rgba(226, 236, 255, 0.86);
    }

.department-modal-close {
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.department-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    padding-right: 8px;
}

.department-form-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(247, 249, 255, 0.98), rgba(242, 246, 255, 0.98));
    border: 1px solid rgba(78, 95, 198, 0.08);
}

.department-form-section-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.department-form-section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-color);
}

.department-form-section-caption {
    color: var(--muted-text);
    font-size: 13px;
    font-weight: 600;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background-color: var(--card-bg);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    caret-color: var(--text-color);
}

.form-input:hover {
    background-color: #ffffff;
    border-color: rgba(78, 95, 198, 0.24);
}

.form-input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 4px rgba(78, 95, 198, 0.14);
}

.form-input::placeholder {
    color: #98a2b3;
}

textarea.form-input {
    padding-top: 12px;
    padding-bottom: 12px;
}

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M5.5 7.5L10 12l4.5-4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 12px;
}

.department-form-grid,
.department-repeater-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.department-form-full {
    grid-column: 1 / -1;
}

.department-textarea {
    min-height: 96px;
    resize: vertical;
    padding-top: 12px;
    padding-bottom: 12px;
}

.department-repeaters-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.department-repeater-item {
    padding: 16px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid rgba(78, 95, 198, 0.10);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.department-repeater-actions {
    display: flex;
    justify-content: flex-end;
}

.student-assignment-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-right: 4px;
    padding-bottom: 6px;
}

.student-assignment-practice-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(241, 246, 255, 0.94), rgba(232, 239, 255, 0.96));
    border: 1px solid rgba(78, 95, 198, 0.14);
    box-shadow: 0 16px 30px rgba(18, 41, 98, 0.08);
}

.student-assignment-practice-meta-label {
    color: var(--muted-text);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.student-assignment-tabs {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.assignment-tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(78, 95, 198, 0.12);
    background: rgba(255, 255, 255, 0.84);
    color: var(--muted-text);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.assignment-tab-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(31, 41, 55, 0.08);
    border-color: rgba(78, 95, 198, 0.24);
}

.assignment-tab-button.active {
    background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(78, 95, 198, 0.20);
}

.assignment-tab-title {
    white-space: nowrap;
}

.assignment-tab-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(78, 95, 198, 0.12);
    color: var(--main-color);
    font-size: 13px;
    font-weight: 800;
}

.assignment-tab-button.active .assignment-tab-counter {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.student-assignment-practice-meta {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(78, 95, 198, 0.10);
    color: var(--main-color);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.student-assignment-filters-card {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(0, 1.8fr);
    gap: 14px 16px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(241, 246, 255, 0.96), rgba(232, 239, 255, 0.96));
    border: 1px solid rgba(78, 95, 198, 0.14);
    box-shadow: 0 12px 24px rgba(18, 41, 98, 0.06);
}

.student-assignment-search-wrap {
    min-width: 0;
}

.student-filter-field,
.student-assignment-search-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.student-filter-label {
    color: var(--muted-text);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.student-filter-control {
    background-color: var(--input-bg);
}

.student-filter-select .custom-select-trigger {
    min-height: 50px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(78, 95, 198, 0.14);
    box-shadow: 0 10px 24px rgba(20, 43, 102, 0.06);
}

.student-assignment-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.student-assignment-bulk-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(241, 246, 255, 0.96), rgba(229, 238, 255, 0.98));
    border: 1px solid rgba(78, 95, 198, 0.14);
    box-shadow: 0 10px 20px rgba(18, 41, 98, 0.06);
}

.student-assignment-bulk-bar.hidden {
    display: none;
}

.student-bulk-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.student-bulk-checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--main-color);
}

.student-assignment-summary {
    color: var(--text-color);
    font-size: 13px;
    font-weight: 700;
}

.student-assignment-table-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(99, 142, 255, 0.16), transparent 24%),
        linear-gradient(160deg, #10214d, #15306a 62%, #1b3f86);
    border: 1px solid rgba(81, 125, 255, 0.18);
    box-shadow: 0 16px 30px rgba(11, 25, 63, 0.14);
    overflow: hidden;
}

.student-assignment-table-headline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 18px 20px 0;
}

.student-assignment-table-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
}

.student-assignment-table-text {
    margin-top: 4px;
    color: rgba(223, 233, 255, 0.84);
    font-size: 13px;
    line-height: 1.4;
}

.student-assignment-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 430px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 10px 12px 14px;
}

.student-assignment-table {
    width: 100%;
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0 3px;
    table-layout: fixed;
}

.student-assignment-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0 12px 5px;
    background: linear-gradient(180deg, rgba(16, 31, 77, 0.98), rgba(16, 31, 77, 0.92));
    color: rgba(225, 235, 255, 0.92);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    white-space: normal;
}

.student-assignment-table tbody td {
    padding: 6px 8px;
    vertical-align: middle;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(78, 95, 198, 0.08);
    border-bottom: 1px solid rgba(78, 95, 198, 0.08);
}

.student-assignment-row {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.student-assignment-row td:first-child {
    border-left: 1px solid rgba(78, 95, 198, 0.08);
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.student-assignment-row td:last-child {
    border-right: 1px solid rgba(78, 95, 198, 0.08);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.student-assignment-row:hover td {
    box-shadow: 0 16px 28px rgba(18, 41, 98, 0.12);
    border-top-color: rgba(78, 95, 198, 0.18);
    border-bottom-color: rgba(78, 95, 198, 0.18);
}

.student-assignment-row.is-assigned td {
    background: linear-gradient(180deg, rgba(244, 248, 255, 1), rgba(255, 255, 255, 1));
}

.student-assignment-row.is-unavailable {
    opacity: 0.78;
}

.student-assignment-col-check {
    width: 120px;
}

.student-assignment-col-supervisor {
    width: 250px;
}

.student-assignment-toggle {
    display: flex;
    flex-direction: column;
    gap: 1px;
    color: var(--text-color);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.student-assignment-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--main-color);
}

.student-assignment-toggle-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.student-assignment-toggle-state {
    color: var(--muted-text);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
}

.student-assignment-student {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.student-assignment-student-name {
    color: var(--text-color);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
}

.student-assignment-student-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.student-assignment-badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(78, 95, 198, 0.10);
    color: var(--main-color);
    font-size: 9px;
    font-weight: 800;
}

.student-assignment-badge.warning {
    background: #fff4e5;
    color: #b54708;
}

.student-assignment-cell-main {
    color: var(--text-color);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
}

.student-assignment-cell-sub {
    margin-top: 2px;
    color: var(--muted-text);
    font-size: 9px;
    line-height: 1.15;
}

.student-assignment-supervisor-select {
    min-width: 240px;
    background-color: var(--input-bg);
    min-height: 44px;
    font-size: 14px;
}

.student-assignment-supervisor-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.student-assignment-select .custom-select-trigger {
    min-height: 34px;
    height: 34px;
    padding-left: 12px;
    padding-right: 38px;
    font-size: 12px;
    background: #f8fbff;
    border-color: rgba(78, 95, 198, 0.16);
    box-shadow: 0 10px 18px rgba(18, 41, 98, 0.06);
}

.student-assignment-select .custom-select-menu {
    z-index: 90;
}

.student-assignment-empty-state {
    display: none;
    margin: 0 14px 14px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px dashed rgba(78, 95, 198, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: #27438d;
    line-height: 1.5;
}

.student-assignment-empty-state.show {
    display: block;
}

.student-assignment-student .field-error,
.student-assignment-supervisor-wrap .field-error {
    min-height: 0;
    margin-top: 1px;
    font-size: 10px;
    line-height: 1.15;
}

.student-assignment-student .field-error:empty,
.student-assignment-supervisor-wrap .field-error:empty {
    display: none;
}

.department-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    flex: 0 0 auto;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(78, 95, 198, 0.10);
}

.department-details-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 8px;
    padding-bottom: 6px;
}

.department-details-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(129, 165, 255, 0.20), transparent 22%),
        linear-gradient(150deg, #10214f, #17316b 60%, #1d448d);
    box-shadow: 0 16px 30px rgba(12, 29, 73, 0.14);
}

.department-details-overview-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.department-details-overview-label {
    color: rgba(221, 233, 255, 0.8);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.department-details-overview-title {
    color: #ffffff;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
}

.department-details-overview-subtitle {
    color: rgba(226, 236, 255, 0.84);
    font-size: 14px;
    line-height: 1.55;
}

.department-details-overview-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.department-details-overview-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
}

.department-details-overview-stat-label {
    color: rgba(221, 233, 255, 0.76);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.department-details-overview-stat-value {
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.department-details-section {
    padding: 16px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(108, 149, 255, 0.14), transparent 20%),
        linear-gradient(160deg, #10224f, #162d66 62%, #1b3d83);
    border: 1px solid rgba(77, 120, 248, 0.16);
    box-shadow: 0 16px 28px rgba(11, 25, 63, 0.12);
}

.department-details-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 14px;
}

.department-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.department-details-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 26px rgba(15, 32, 78, 0.10);
}

.department-details-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.department-details-value {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.45;
}

.department-details-value-strong {
    font-size: 15px;
    font-weight: 800;
}

.department-details-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.department-details-card {
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(78, 95, 198, 0.08);
    box-shadow: 0 8px 16px rgba(15, 32, 78, 0.08);
}

.department-details-card-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 4px;
}

.department-details-card-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.2;
}

.department-details-chip,
.department-details-inline-chip {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(78, 95, 198, 0.10);
    color: #23479f;
    font-size: 10px;
    font-weight: 800;
}

.department-details-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 4px;
}

.department-details-card-text {
    font-size: 11px;
    color: #4b5b7c;
    line-height: 1.28;
    white-space: pre-line;
}

.department-form-global-error {
    display: none;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.45;
}

    .department-form-global-error.show {
        display: block;
    }

.field-error {
    min-height: 18px;
    margin-top: 6px;
    color: #dc2626;
    font-size: 13px;
    line-height: 1.35;
}

.field-error-block {
    margin-bottom: 8px;
}

.form-input.input-error,
.custom-select-trigger.input-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Preview */
.attestation-preview-container {
    overflow: auto;
    padding-right: 8px;
}

.attestation-preview-sheet {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 36px 42px;
    background: #ffffff;
    color: #111827;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    font-family: "Times New Roman", serif;
    line-height: 1.45;
}

.attestation-preview-header {
    text-align: center;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attestation-preview-title {
    margin-top: 20px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
}

.attestation-preview-subtitle {
    text-align: center;
    font-size: 14px;
    margin-top: 6px;
    margin-bottom: 20px;
}

.attestation-preview-line {
    margin-top: 14px;
    font-size: 18px;
}

.attestation-preview-line-caption {
    font-size: 12px;
    color: #4b5563;
    margin-top: 2px;
}

.attestation-preview-paragraph {
    margin-top: 18px;
    text-align: justify;
    font-size: 16px;
}

.attestation-preview-section-title {
    margin-top: 22px;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
}

.attestation-preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 15px;
}

    .attestation-preview-table th,
    .attestation-preview-table td {
        border: 1px solid #111827;
        padding: 10px 12px;
        vertical-align: top;
    }

    .attestation-preview-table th {
        text-align: center;
        font-weight: 700;
    }

.attestation-preview-pc {
    font-weight: 700;
    margin-bottom: 8px;
}

.attestation-preview-worktypes {
    white-space: pre-line;
}

.attestation-preview-hours {
    width: 160px;
    text-align: center;
    vertical-align: middle !important;
    font-weight: 600;
}

.attestation-preview-quality {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
}

.attestation-preview-signatures {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.attestation-preview-sign-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
}

.attestation-preview-sign-title {
    font-weight: 700;
}

.attestation-preview-sign-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 6px;
}

.attestation-preview-date {
    margin-top: 4px;
}

@media (max-width: 1250px) {
    .department-workspace {
        grid-template-columns: 1fr;
    }

    .department-sidebar-card {
        position: static;
    }
}

@media (max-width: 980px) {
    .department-toolbar-row,
    .department-toolbar-row-secondary,
    .department-form-grid,
    .department-repeater-grid,
    .department-details-grid,
    .department-details-overview {
        grid-template-columns: 1fr;
    }

    .student-assignment-filters-card,
    .student-assignment-filter-grid {
        grid-template-columns: 1fr;
    }

    .practice-card {
        grid-template-columns: 1fr;
    }

    .supervisor-card {
        grid-template-columns: 1fr;
    }

    .practice-card-actions {
        justify-content: flex-start;
    }

    .supervisor-card-actions {
        min-width: 0;
        justify-content: flex-start;
    }

    .attestation-preview-sign-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .department-hero-card {
        flex-direction: column;
        align-items: stretch;
    }

    .practice-card-top {
        flex-direction: column;
    }

    .practice-card-side {
        align-items: flex-start;
    }

    .practice-card-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .practice-meta-separator {
        display: none;
    }

    .department-modal {
        padding: 20px;
    }

    .attestation-preview-sheet {
        padding: 22px;
    }

    .student-assignment-bulk-bar,
    .student-assignment-practice-bar {
        align-items: stretch;
    }

    .student-assignment-tabs {
        width: 100%;
    }

    .assignment-tab-button {
        flex: 1 1 260px;
    }

    .department-modal-supervisor .department-details-overview-stats {
        grid-template-columns: 1fr;
    }
}


#practiceDetailsAssignments {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 16px;
    padding-right: 4px;
    overscroll-behavior: contain;
}

#practiceDetailsAssignments .department-details-card {
    padding: 7px 9px;
}

#practiceDetailsAssignments .department-details-card-header {
    margin-bottom: 3px;
}

#practiceDetailsAssignments .department-details-card-meta {
    margin-bottom: 3px;
}

.department-details-layout::-webkit-scrollbar,
#practiceDetailsAssignments::-webkit-scrollbar,
.student-assignment-table-wrap::-webkit-scrollbar,
.student-assignment-shell::-webkit-scrollbar,
.custom-select-menu::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.department-details-layout::-webkit-scrollbar-track,
#practiceDetailsAssignments::-webkit-scrollbar-track,
.student-assignment-table-wrap::-webkit-scrollbar-track,
.student-assignment-shell::-webkit-scrollbar-track,
.custom-select-menu::-webkit-scrollbar-track {
    background: rgba(159, 179, 229, 0.18);
    border-radius: 999px;
}

.department-details-layout::-webkit-scrollbar-thumb,
#practiceDetailsAssignments::-webkit-scrollbar-thumb,
.student-assignment-table-wrap::-webkit-scrollbar-thumb,
.student-assignment-shell::-webkit-scrollbar-thumb,
.custom-select-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(78, 124, 255, 0.82), rgba(38, 87, 230, 0.82));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.department-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.department-subtab-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(78, 95, 198, 0.14);
    background: linear-gradient(180deg, #eef3ff, #dce7ff);
    color: #17326e;
    border-radius: 14px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

.department-subtab-button.active {
    background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(32, 70, 188, 0.18);
}

.department-subtab-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    font-size: 12px;
    font-weight: 800;
}

.department-subtab-button:not(.active) .department-subtab-counter {
    background: rgba(23, 50, 110, 0.10);
}

.practice-card-topline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.practice-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.practice-status-chip.active {
    background: rgba(59, 130, 246, 0.10);
    color: #1d4ed8;
}

.practice-status-chip.completed {
    background: rgba(15, 23, 42, 0.09);
    color: #334155;
}

.department-console-wrapper {
    position: relative;
}

.department-console {
    display: none;
    min-height: 520px;
    background: #0f172a;
    color: #d1d5db;
    border-radius: 20px;
    padding: 18px;
    border: 1px solid rgba(78, 95, 198, 0.20);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    font-family: Consolas, "Courier New", monospace;
    flex-direction: column;
}

.department-console.active {
    display: flex;
}

.department-console-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.department-console-empty {
    color: #94a3b8;
    font-size: 14px;
}

.department-console-line {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
    line-height: 1.5;
}

.department-console-line:last-child {
    border-bottom: none;
}

.department-console-date {
    flex: 0 0 165px;
    color: #60a5fa;
}

.department-console-text {
    flex: 1;
    color: #e5e7eb;
}

.department-console-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 18px;
}

.department-console-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(78, 95, 198, 0.24);
    background: rgba(78, 95, 198, 0.10);
    color: #dbe4ff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.16s ease;
}

.department-console-download-button:hover {
    background: rgba(78, 95, 198, 0.18);
    border-color: rgba(78, 95, 198, 0.36);
}

.department-console-body::-webkit-scrollbar {
    width: 10px;
}

.department-console-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.35);
    border-radius: 999px;
}

.department-console-body::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.38);
    border-radius: 999px;
}

.department-supervisors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(94, 135, 255, 0.12), transparent 24%),
        linear-gradient(165deg, #16306c, #1a3a83 62%, #21489b);
    border: 1px solid rgba(68, 113, 248, 0.14);
    box-shadow: 0 16px 30px rgba(10, 23, 58, 0.10);
}

.supervisor-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.98));
    border: 1px solid rgba(78, 95, 198, 0.10);
    border-radius: 22px;
    padding: 18px 18px 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    box-shadow: 0 10px 20px rgba(31, 41, 55, 0.05);
}

.supervisor-card-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.supervisor-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.supervisor-card-avatar {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4c7dff, #2f61eb);
    color: #ffffff;
    font-size: 21px;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(38, 87, 230, 0.14);
}

.supervisor-card-headline {
    min-width: 0;
}

.supervisor-card-name {
    color: var(--text-color);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 5px;
    letter-spacing: -0.01em;
}

.supervisor-card-email {
    color: var(--muted-text);
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

.supervisor-card-metrics {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.supervisor-card-metric {
    min-width: 180px;
    padding: 13px 14px 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(242, 246, 255, 0.95), rgba(236, 241, 255, 0.95));
    border: 1px solid rgba(78, 95, 198, 0.07);
}

.supervisor-card-metric-label {
    display: block;
    color: var(--main-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.supervisor-card-metric-value {
    color: var(--text-color);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.supervisor-card-actions {
    min-width: 180px;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.supervisor-card-actions .department-primary-button {
    width: 100%;
}

.department-modal-supervisor {
    max-width: 1100px;
    background:
        radial-gradient(circle at top right, rgba(78, 124, 255, 0.06), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 248, 255, 1));
}

.department-supervisor-layout {
    gap: 14px;
}

.department-modal-supervisor .department-details-overview {
    padding: 20px 22px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(84, 130, 255, 0.12), transparent 24%),
        linear-gradient(165deg, #f4f7ff, #ebf1ff 64%, #e5ecff);
    border: 1px solid rgba(78, 95, 198, 0.10);
    color: var(--text-color);
    box-shadow: none;
}

.department-modal-supervisor .department-details-overview-label {
    color: #3556ad;
}

.department-modal-supervisor .department-details-overview-title {
    color: #132a61;
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.department-modal-supervisor .department-details-overview-subtitle {
    color: #526381;
    font-size: 15px;
    line-height: 1.55;
}

.department-modal-supervisor .department-details-overview-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.department-modal-supervisor .department-details-overview-stat {
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(78, 95, 198, 0.08);
    backdrop-filter: none;
}

.department-modal-supervisor .department-details-overview-stat-label {
    color: #4a64a5;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.department-modal-supervisor .department-details-overview-stat-value {
    color: #17326e;
    font-size: 16px;
    line-height: 1.35;
    word-break: break-word;
}

.department-modal-supervisor .department-subtabs {
    margin-bottom: 6px;
}

.department-modal-supervisor .department-subtab-button {
    min-height: 42px;
    padding: 0 15px;
    border-color: rgba(78, 95, 198, 0.12);
    background: linear-gradient(180deg, #f3f6ff, #e8efff);
    color: #21408d;
    box-shadow: none;
}

.department-modal-supervisor .department-subtab-button.active {
    box-shadow: 0 10px 18px rgba(32, 70, 188, 0.12);
}

.department-modal-supervisor .department-subtab-counter {
    min-width: 26px;
    height: 22px;
    font-size: 11px;
}

.department-modal-supervisor .department-details-section {
    padding: 14px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(108, 149, 255, 0.10), transparent 20%),
        linear-gradient(160deg, #18336f, #1c4389 68%, #2450a1);
    box-shadow: 0 12px 22px rgba(11, 25, 63, 0.09);
}

.department-modal-supervisor .department-details-title {
    margin-bottom: 12px;
    font-size: 15px;
    letter-spacing: 0;
}

.department-modal-supervisor .department-details-list {
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.department-modal-supervisor .department-details-card {
    padding: 12px 13px 11px;
    border-radius: 16px;
    border-color: rgba(78, 95, 198, 0.07);
    box-shadow: 0 8px 16px rgba(15, 32, 78, 0.06);
}

.department-modal-supervisor .department-details-card-header {
    margin-bottom: 7px;
    gap: 10px;
}

.department-modal-supervisor .department-details-card-title {
    font-size: 14px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.department-modal-supervisor .department-details-card-meta {
    gap: 6px;
    margin-bottom: 6px;
}

.department-modal-supervisor .department-details-chip,
.department-modal-supervisor .department-details-inline-chip {
    min-height: 24px;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 800;
}

.department-modal-supervisor .department-details-card-text {
    font-size: 13px;
    line-height: 1.45;
    color: #53627e;
}

.department-supervisor-tab-content {
    display: none;
}

.department-supervisor-tab-content.active {
    display: block;
}

.department-modal-warning {
    max-width: 680px;
}

.department-modal-error {
    max-width: 640px;
}

.department-warning-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0 2px;
}

.department-warning-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.department-warning-badge-error {
    background: rgba(220, 38, 38, 0.10);
    color: #b91c1c;
}

.department-warning-message {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.55;
}

.department-warning-list {
    display: grid;
    gap: 10px;
}

.department-warning-item {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(241, 245, 255, 0.96), rgba(232, 239, 255, 0.96));
    border: 1px solid rgba(78, 95, 198, 0.10);
}

.department-warning-item::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3f76ff, #2657e6);
    box-shadow: 0 0 0 5px rgba(63, 118, 255, 0.12);
}

.department-warning-item-text {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.55;
}

.department-warning-item-text strong {
    color: #17326e;
}

.department-warning-item-accent {
    color: var(--muted-text);
    font-size: 13px;
    line-height: 1.5;
}

.department-warning-item-error {
    background: linear-gradient(180deg, rgba(255, 243, 243, 0.96), rgba(255, 236, 236, 0.96));
    border-color: rgba(220, 38, 38, 0.12);
}

.department-warning-item-error::before {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.12);
}

.supervisor-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark theme polish for DepartmentStaff surfaces */
html[data-theme="dark"] .department-hero-card,
html[data-theme="dark"] .department-sidebar-card,
html[data-theme="dark"] .department-main-card,
html[data-theme="dark"] .department-modal {
    background: linear-gradient(180deg, #1f2937, #182231);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .department-main-card {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 28%),
        linear-gradient(180deg, #1f2937, #172033);
}

html[data-theme="dark"] .department-sidebar-card {
    background: linear-gradient(180deg, #1f2937, #111827);
}

html[data-theme="dark"] .department-nav-button,
html[data-theme="dark"] .department-subtab-button:not(.active),
html[data-theme="dark"] .assignment-tab-button:not(.active) {
    background: linear-gradient(180deg, #253248, #1a2435);
    color: #dbeafe;
    border-color: rgba(148, 163, 184, 0.20);
    box-shadow: none;
}

html[data-theme="dark"] .department-nav-button:hover,
html[data-theme="dark"] .department-subtab-button:not(.active):hover,
html[data-theme="dark"] .assignment-tab-button:not(.active):hover {
    background: linear-gradient(180deg, #2b3a55, #202c41);
    border-color: rgba(96, 165, 250, 0.28);
}

html[data-theme="dark"] .department-subtab-button:not(.active) .department-subtab-counter,
html[data-theme="dark"] .assignment-tab-button:not(.active) .assignment-tab-counter {
    background: rgba(96, 165, 250, 0.16);
    color: #bfdbfe;
}

html[data-theme="dark"] .department-search-input,
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .custom-select-trigger,
html[data-theme="dark"] .student-filter-select .custom-select-trigger,
html[data-theme="dark"] .student-assignment-select .custom-select-trigger,
html[data-theme="dark"] textarea.form-input {
    background: #111827;
    color: #f9fafb;
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: none;
}

html[data-theme="dark"] .department-search-input::placeholder,
html[data-theme="dark"] .form-input::placeholder,
html[data-theme="dark"] textarea.form-input::placeholder {
    color: #94a3b8;
}

html[data-theme="dark"] .custom-select-trigger:hover,
html[data-theme="dark"] .custom-select.open .custom-select-trigger {
    background: #172033;
    border-color: rgba(96, 165, 250, 0.42);
}

html[data-theme="dark"] .custom-select-menu {
    background: #111827;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .custom-select-option:hover {
    background: rgba(96, 165, 250, 0.14);
}

html[data-theme="dark"] .custom-select.is-disabled .custom-select-trigger,
html[data-theme="dark"] .custom-select-trigger:disabled {
    background: rgba(15, 23, 42, 0.72);
    color: #94a3b8;
}

html[data-theme="dark"] .practice-card,
html[data-theme="dark"] .supervisor-card,
html[data-theme="dark"] .department-details-item,
html[data-theme="dark"] .department-details-card,
html[data-theme="dark"] .department-modal-supervisor .department-details-card,
html[data-theme="dark"] .student-assignment-empty-state {
    background: linear-gradient(180deg, #253248, #1b2638);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .practice-card:hover,
html[data-theme="dark"] .supervisor-card:hover {
    border-color: rgba(96, 165, 250, 0.30);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.30);
}

html[data-theme="dark"] .practice-index-chip,
html[data-theme="dark"] .practice-status-chip.active,
html[data-theme="dark"] .practice-status-chip.completed,
html[data-theme="dark"] .department-details-chip,
html[data-theme="dark"] .department-details-inline-chip,
html[data-theme="dark"] .student-assignment-badge {
    background: rgba(96, 165, 250, 0.14);
    color: #bfdbfe;
}

html[data-theme="dark"] .practice-card-meta-row,
html[data-theme="dark"] .department-modal-actions {
    border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .practice-meta-separator {
    background: rgba(148, 163, 184, 0.20);
}

html[data-theme="dark"] .department-form-section,
html[data-theme="dark"] .student-assignment-practice-bar,
html[data-theme="dark"] .student-assignment-filters-card,
html[data-theme="dark"] .student-assignment-bulk-bar,
html[data-theme="dark"] .student-assignment-practice-meta,
html[data-theme="dark"] .department-modal-supervisor,
html[data-theme="dark"] .department-modal-supervisor .department-details-overview {
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 26%),
        linear-gradient(180deg, #253248, #1a2435);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .student-assignment-table tbody td,
html[data-theme="dark"] .student-assignment-row.is-assigned td {
    background: #1f2937;
    border-color: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .student-assignment-row:hover td {
    border-color: rgba(96, 165, 250, 0.30);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .supervisor-card-metric,
html[data-theme="dark"] .department-modal-supervisor .department-details-overview-stat,
html[data-theme="dark"] .department-warning-item {
    background: rgba(15, 23, 42, 0.42);
    border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .department-warning-item-error {
    background: rgba(127, 29, 29, 0.22);
    border-color: rgba(248, 113, 113, 0.20);
}

html[data-theme="dark"] .student-assignment-badge.warning {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

html[data-theme="dark"] .department-form-global-error {
    background: rgba(127, 29, 29, 0.28);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.22);
}

html[data-theme="dark"] .department-modal-supervisor .department-details-overview-label,
html[data-theme="dark"] .department-modal-supervisor .department-details-overview-title,
html[data-theme="dark"] .department-modal-supervisor .department-details-overview-subtitle,
html[data-theme="dark"] .department-modal-supervisor .department-details-overview-stat-label,
html[data-theme="dark"] .department-modal-supervisor .department-details-overview-stat-value,
html[data-theme="dark"] .department-modal-supervisor .department-details-card-text,
html[data-theme="dark"] .department-details-card-text,
html[data-theme="dark"] .department-warning-item-text strong {
    color: var(--text-color);
}

html[data-theme="dark"] .department-details-card-text,
html[data-theme="dark"] .department-modal-supervisor .department-details-card-text,
html[data-theme="dark"] .student-assignment-empty-state {
    color: #cbd5e1;
}
