/* CSUK Group Manager Styles */

/* Main Container */
.csuk-groups-container {
    margin: 0 auto;
    padding: 5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Enrollment Form */
.csuk-enrollment-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.csuk-enrollment-form h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    text-align: center;
}

.csuk-form-group {
    margin-bottom: 20px;
}

.csuk-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
    letter-spacing: -0.01em;
}

.csuk-form-group input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d6e0ee;
    border-radius: 12px;
    font-size: 15px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.csuk-form-group input:focus {
    outline: none;
    border-color: #60a5fa;
    background: #fefefe;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.csuk-enrollment-footer {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #6c757d;
    font-size: 14px;
}

.csuk-enrollment-footer a {
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
}

.csuk-enrollment-footer a:hover {
    text-decoration: underline;
}

.csuk-student-signup-shell {
    max-width: 960px;
    margin: 0 auto;
}

.csuk-student-signup-card {
    border: 1px solid #dbe6f4;
    border-radius: 28px;
    background: linear-gradient(180deg, #eef5fd 0%, #f8fbff 22%, #ffffff 52%, #f8fbff 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    padding: 28px;
}

.csuk-student-signup-hero {
    margin-bottom: 24px;
}

.csuk-student-signup-hero h2 {
    margin: 12px 0 8px 0;
    color: #0f172a;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    letter-spacing: -0.04em;
}

.csuk-student-signup-hero p {
    margin: 0;
    max-width: 720px;
    color: #64748b;
    line-height: 1.7;
}

.csuk-student-signup-form {
    padding: 24px;
    border: 1px solid #dbe6f4;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.05);
}

.csuk-student-signup-helper-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.csuk-student-signup-helper-card {
    padding: 22px;
    border: 1px solid #dbe6f4;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.04);
}

.csuk-student-signup-helper-card h3 {
    margin: 0 0 10px 0;
    color: #0f172a;
    font-size: 1.05rem;
}

.csuk-student-signup-helper-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.csuk-student-signup-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.csuk-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid #cfe0f3;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.csuk-secondary-btn:hover {
    border-color: #93c5fd;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.csuk-student-signup-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 220px;
    text-decoration: none;
}

.csuk-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 13px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.csuk-submit-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 20px 38px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

.csuk-submit-btn:disabled {
    background: #6c757d;
    box-shadow: none;
    cursor: not-allowed;
}

/* Teacher Dashboard */
.csuk-teacher-dashboard {
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding: 12px;
    border-radius: 24px;
    border: 1px solid #dbe6f4;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

/* Teacher Dashboard Tabs */
.csuk-dashboard-tabs {
    margin-top: 0;
    border: 1px solid #dbe6f4;
    border-radius: 28px;
    background: linear-gradient(180deg, #eef5fd 0%, #f8fbff 22%, #ffffff 52%, #f8fbff 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.csuk-tabs-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
    padding: 24px 24px 0 24px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.csuk-tabs-header-intro h2 {
    margin: 8px 0 6px 0;
    color: #0f172a;
    font-size: clamp(1.5rem, 2vw, 2rem);
    letter-spacing: -0.03em;
}

.csuk-tabs-header-intro p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
    max-width: 780px;
}

.csuk-tabs-kicker,
.csuk-panel-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.csuk-tabs-rail {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 0 4px;
    margin: 0 -4px 0 -4px;
    scrollbar-width: thin;
}

.csuk-tabs-dynamic {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.csuk-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    min-width: 180px;
    border: 1px solid #d5dfec;
    border-bottom: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(229, 239, 251, 0.9) 100%);
    color: #475569;
    border-radius: 22px 22px 0 0;
    padding: 16px 18px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    flex: 0 0 auto;
    z-index: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.csuk-tab:hover {
    border-color: #60a5fa;
    color: #1d4ed8;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
}

.csuk-tab.active {
    background: linear-gradient(180deg, #ffffff 0%, #fdfefe 100%);
    border-color: #cfe0f3;
    color: #0f172a;
    box-shadow: 0 -4px 0 #2563eb inset, 0 14px 28px rgba(37, 99, 235, 0.12);
    margin-bottom: -1px;
    z-index: 2;
}

.csuk-tab.csuk-tab-create {
    background: linear-gradient(180deg, #dff7f2 0%, #c8efe7 100%);
    border-color: #8bd6c8;
    color: #0f766e;
}

.csuk-tab.csuk-tab-create:hover {
    background: linear-gradient(180deg, #d7f5ef 0%, #bdeadd 100%);
    border-color: #5dc6b1;
}

.csuk-tab.csuk-tab-create.active {
    background: linear-gradient(180deg, #ffffff 0%, #fcfffe 100%);
    border-color: #a9ded3;
    color: #0f766e;
    box-shadow: 0 -4px 0 #0d9488 inset, 0 18px 30px rgba(13, 148, 136, 0.12);
}

.csuk-group-tab-label {
    display: block;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

.csuk-group-tab-meta {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.4;
}

.csuk-tab.active .csuk-group-tab-meta {
    color: #475569;
}

.csuk-tabs-content {
    margin-top: -1px;
    background: transparent;
}

.csuk-tab-panel {
    display: none;
    border: none;
    border-top: 1px solid #dbe6f4;
    border-radius: 0;
    background: transparent;
    padding: 28px 24px 24px 24px;
    box-shadow: none;
}

.csuk-tab-panel.active {
    display: block;
}

.csuk-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.csuk-panel-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.csuk-panel-header p {
    margin: 8px 0 0 0;
    color: #64748b;
    max-width: 720px;
    line-height: 1.6;
}

.csuk-form-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
    margin-bottom: 12px;
}

.csuk-inline-create-group-form {
    padding: 22px;
    border: 1px solid #dbe6f4;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
}

.csuk-group-shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.csuk-group-overview-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
    gap: 20px;
    padding: 24px;
    border: 1px solid #dbe6f4;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 55%, #eef7ff 100%);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.06);
}

.csuk-group-overview-copy h2 {
    margin: 12px 0 8px 0;
    color: #0f172a;
    font-size: clamp(1.75rem, 2.8vw, 2.4rem);
    letter-spacing: -0.04em;
}

.csuk-group-overview-copy p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
    max-width: 720px;
}

.csuk-group-overview-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.csuk-group-overview-stat {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #dbe6f4;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.csuk-group-overview-stat span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.csuk-group-overview-stat strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.csuk-group-section-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px;
    border: 1px solid #dbe6f4;
    border-radius: 20px;
    background: linear-gradient(180deg, #f5f9ff 0%, #eef4fb 100%);
}

.csuk-group-section-tab {
    border: none;
    background: transparent;
    color: #475569;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.csuk-group-section-tab:hover {
    background: rgba(255, 255, 255, 0.86);
    color: #1d4ed8;
    transform: translateY(-1px);
}

.csuk-group-section-tab.active {
    background: linear-gradient(135deg, #ffffff 0%, #fdfefe 100%);
    color: #0f172a;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.csuk-group-sections {
    display: flex;
    flex-direction: column;
}

.csuk-group-section-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
}

.csuk-group-section-panel.active {
    max-height: none;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.csuk-group-students-area {
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.csuk-group-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.csuk-group-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.csuk-summary-card {
    border: 1px solid #dbe6f4;
    border-radius: 20px;
    background: linear-gradient(160deg, #ffffff 0%, #f6faff 100%);
    padding: 20px;
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.csuk-summary-label {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.csuk-summary-value {
    color: #0f172a;
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.csuk-summary-link {
    font-size: 16px;
}

.csuk-summary-link a {
    color: #2563eb;
    text-decoration: none;
}

.csuk-summary-link a:hover {
    text-decoration: underline;
}

.csuk-group-tool-grid,
.csuk-group-management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.csuk-group-management-shell {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.csuk-management-tools-panel,
.csuk-roster-panel {
    min-height: 100%;
}

.csuk-tool-launcher-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.csuk-tool-launcher-btn {
    width: 100%;
    text-align: left;
    border: 1px solid #dbe6f4;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 16px 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.csuk-tool-launcher-btn strong {
    color: #0f172a;
    font-size: 15px;
    line-height: 1.2;
}

.csuk-tool-launcher-btn span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.csuk-tool-launcher-btn:hover {
    border-color: #93c5fd;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.csuk-management-support-card {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #dbe6f4;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
}

.csuk-management-support-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.csuk-roster-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef4fb;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.csuk-student-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.csuk-student-cell strong {
    color: #0f172a;
    font-size: 14px;
}

.csuk-student-cell span {
    color: #64748b;
    font-size: 12px;
}

.csuk-tool-modal-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.csuk-tool-modal-intro h4 {
    margin: 10px 0 8px 0;
    color: #0f172a;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.csuk-tool-modal-intro p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.csuk-tool-modal-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.csuk-compact-stat {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #dbe6f4;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.csuk-compact-stat span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.csuk-compact-stat strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 26px;
    line-height: 1.1;
}

.csuk-tool-modal-panel {
    box-shadow: none;
}

.csuk-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.csuk-section-heading h5 {
    margin: 10px 0 0 0;
}

.csuk-section-heading p,
.csuk-group-tool-panel p,
.csuk-group-students-header p {
    margin: 0 0 14px 0;
    color: #6b7280;
    line-height: 1.6;
}

.csuk-section-heading p,
.csuk-group-students-header p {
    margin: 8px 0 0 0;
}

.csuk-signup-instructions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: #374151;
}

.csuk-signup-instructions a {
    color: #2563eb;
}

.csuk-seat-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.csuk-seat-preview-item {
    border: 1px solid #dbe3f0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
}

.csuk-seat-preview-label {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.csuk-seat-preview-item code {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    word-break: break-all;
}

.csuk-bulk-create-panel {
    background: #fbfdff;
}

.csuk-bulk-create-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.csuk-bulk-create-header p {
    margin: 6px 0 0 0;
    color: #6b7280;
}

.csuk-bulk-create-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.csuk-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: #e5eefc;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.csuk-upload-btn input {
    display: none;
}

.csuk-bulk-create-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.csuk-bulk-create-table input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.csuk-bulk-create-table input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.csuk-edit-students-table input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.csuk-edit-students-table input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.csuk-bulk-create-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.csuk-bulk-create-footer .csuk-submit-btn {
    width: auto;
    min-width: 220px;
}

.csuk-bulk-create-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.csuk-bulk-create-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.csuk-bulk-create-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2563eb 0%, #14b8a6 100%);
    transition: width 0.25s ease;
}

.csuk-bulk-create-progress-text {
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.csuk-bulk-create-results .csuk-message {
    margin-bottom: 12px;
}

.csuk-group-students-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.csuk-group-students-header h3 {
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.csuk-data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.csuk-data-table th,
.csuk-data-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 12px;
    font-size: 13px;
    text-align: left;
}

.csuk-data-table th {
    background: #f8fbff;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
}

.csuk-data-table tr:hover td {
    background: #f8fbff;
}

.csuk-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #dbe6f4;
}

.csuk-dashboard-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2rem, 3vw, 2.6rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.csuk-dashboard-subtitle {
    margin: 8px 0 0 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

.csuk-create-group-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.csuk-create-group-btn:hover {
    background: #218838;
}

/* Groups Grid */
.csuk-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.csuk-group-card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.csuk-group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.csuk-group-header {
    margin-bottom: 15px;
}

.csuk-group-name {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
}

.csuk-group-date {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
}

.csuk-group-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
}

.csuk-stat {
    text-align: center;
}

.csuk-stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #007bff;
}

.csuk-stat-label {
    font-size: 0.8em;
    color: #6c757d;
    text-transform: uppercase;
}

.csuk-group-actions {
    display: flex;
    gap: 10px;
}

.csuk-action-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.csuk-view-btn {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: white;
}

.csuk-view-btn:hover {
    background: linear-gradient(135deg, #0f766e 0%, #0f8b82 100%);
    box-shadow: 0 14px 28px rgba(13, 148, 136, 0.2);
    transform: translateY(-1px);
}

.csuk-manage-btn {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

.csuk-manage-btn:hover {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

/* Students Table */
.csuk-students-table {
    width: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #dbe6f4;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05);
}

.csuk-students-table table {
    width: 100%;
    border-collapse: collapse;
}

.csuk-students-table th,
.csuk-students-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.csuk-students-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.csuk-students-table tr:hover {
    background: #f8f9fa;
}

/* Modal */
.csuk-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.csuk-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.csuk-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.csuk-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e5e9;
}

.csuk-modal-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5em;
}

.csuk-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csuk-modal-close:hover {
    color: #495057;
}

/* Messages */
.csuk-message {
    padding: 16px 18px;
    border-radius: 16px;
    margin-bottom: 22px;
    font-weight: 600;
    line-height: 1.6;
}

.csuk-message.success {
    background: linear-gradient(180deg, #ecfdf5 0%, #dcfce7 100%);
    color: #166534;
    border: 1px solid #bbf7d0;
}

.csuk-message.error {
    background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.csuk-message.info {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

/* Loading */
.csuk-loading {
    text-align: center;
    padding: 52px 24px;
    color: #64748b;
    border: 1px dashed #cfe0f3;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
}

.csuk-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Manage Group Modal */
.csuk-manage-modal {
    max-width: 1080px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    border: 1px solid #dbe6f4;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.csuk-group-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.csuk-group-info {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.csuk-group-info h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.3em;
}

.csuk-group-info p {
    margin: 5px 0;
    color: #6c757d;
}

.csuk-section {
    border: 1px solid #dbe6f4;
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.csuk-section h5 {
    margin: 0 0 15px 0;
    color: #0f172a;
    font-size: 1.08em;
    letter-spacing: -0.02em;
}

.csuk-keys-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.csuk-keys-actions .csuk-action-btn {
    flex: 0 0 auto;
}

.csuk-seats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.csuk-seat-item {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    position: relative;
}

.csuk-seat-item.available {
    border-color: #28a745;
    background: #f8fff9;
}

.csuk-seat-item.used {
    border-color: #dc3545;
    background: #fff8f8;
}

.csuk-seat-number {
    font-weight: bold;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.csuk-seat-key {
    font-family: monospace;
    font-size: 12px;
    background: #fff;
    padding: 8px;
    border-radius: 4px;
    margin: 8px 0;
    word-break: break-all;
    border: 1px solid #e1e5e9;
}

.csuk-seat-status {
    font-size: 0.8em;
    margin-bottom: 10px;
}

.csuk-seat-status small {
    display: block;
    margin-top: 8px;
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
}

.status-available {
    color: #28a745;
    font-weight: bold;
}

.status-used {
    color: #dc3545;
    font-weight: bold;
}

.csuk-seat-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.csuk-seat-action {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.csuk-copy-key {
    background: #17a2b8;
    color: white;
}

.csuk-copy-key:hover {
    background: #138496;
}

.csuk-reset-seat {
    background: #dc3545;
    color: white;
}

.csuk-reset-seat:hover {
    background: #c82333;
}

.csuk-settings-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.csuk-settings-form .csuk-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.csuk-settings-form label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.csuk-settings-form input {
    padding: 12px 14px;
    border: 1px solid #d6e0ee;
    border-radius: 12px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.csuk-settings-form input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.csuk-settings-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.csuk-update-group {
    background: #007bff;
    color: white;
}

.csuk-update-group:hover {
    background: #0056b3;
}

.csuk-delete-group {
    background: #dc3545;
    color: white;
}

.csuk-delete-group:hover {
    background: #c82333;
}

.csuk-activity-log {
    max-height: 200px;
    overflow-y: auto;
}

.csuk-activity-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.csuk-activity-item:last-child {
    border-bottom: none;
}

.csuk-activity-time {
    font-size: 0.8em;
    color: #6c757d;
    min-width: 100px;
}

.csuk-activity-text {
    font-size: 0.9em;
    color: #495057;
    flex: 1;
    margin-left: 10px;
}

.csuk-student-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.csuk-student-shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.csuk-student-dashboard-tabs .csuk-tabs-rail {
    align-items: stretch;
}

.csuk-student-tab {
    min-width: 220px;
}

.csuk-student-tab-panel {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
}

.csuk-student-tab-panel.active {
    max-height: none;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.csuk-student-overview-card .csuk-group-overview-copy h2 {
    margin: 12px 0 8px 0;
}

.csuk-student-overview-card .csuk-group-overview-stat strong {
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    line-height: 1.3;
    word-break: break-word;
}

.csuk-student-overview-card .csuk-group-overview-stat {
    min-height: 112px;
}

.csuk-student-analytics-card {
    padding-top: 24px;
}

.csuk-student-analytics-card .csuk-student-progress-slot {
    margin-top: 0;
}

.csuk-student-dashboard .csuk-panel-header {
    margin-bottom: 18px;
}

.csuk-student-meta-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.csuk-student-meta-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.csuk-student-meta-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.csuk-student-meta-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.csuk-student-meta-value {
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.csuk-student-progress-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
}

.csuk-student-progress-description {
    margin: 0 0 16px 0;
    color: #64748b;
    line-height: 1.6;
}

.csuk-student-progress-slot {
    margin-top: 12px;
}

.csuk-student-progress-slot > * {
    width: 100%;
}

/* Responsive adjustments for manage modal */
@media (max-width: 768px) {
    .csuk-manage-modal {
        width: 95%;
        max-height: 95vh;
    }

    .csuk-tabs-header {
        padding: 18px 18px 0 18px;
    }

    .csuk-tabs-rail,
    .csuk-tabs-dynamic {
        gap: 10px;
    }

    .csuk-tab {
        min-width: 160px;
        padding: 14px 16px 16px;
    }

    .csuk-group-overview-card,
    .csuk-group-summary-grid,
    .csuk-group-tool-grid,
    .csuk-group-management-grid,
    .csuk-group-management-shell,
    .csuk-group-overview-stats,
    .csuk-tool-modal-summary,
    .csuk-form-grid {
        grid-template-columns: 1fr;
    }

    .csuk-group-overview-card {
        gap: 16px;
    }

    .csuk-group-section-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .csuk-group-section-tab {
        width: 100%;
        text-align: left;
    }

    .csuk-student-tab {
        min-width: 180px;
    }

    .csuk-bulk-create-header,
    .csuk-bulk-create-footer,
    .csuk-group-students-header,
    .csuk-settings-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .csuk-bulk-create-footer .csuk-submit-btn {
        width: 100%;
        min-width: 0;
    }
    
    .csuk-seats-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .csuk-keys-actions {
        flex-direction: column;
    }
    
    .csuk-settings-actions {
        flex-direction: column;
    }
    
    .csuk-activity-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .csuk-activity-time {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .csuk-groups-container {
        padding: 15px;
    }

    .csuk-student-signup-card,
    .csuk-student-signup-form,
    .csuk-student-signup-helper-card {
        padding: 20px;
    }

    .csuk-student-signup-helper-grid,
    .csuk-student-signup-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .csuk-student-signup-primary-link,
    .csuk-secondary-btn {
        width: 100%;
    }
    
    .csuk-student-meta-grid,
    .csuk-student-progress-grid {
        grid-template-columns: 1fr;
    }

    .csuk-student-overview-card .csuk-group-overview-stat {
        min-height: 0;
    }
    
    .csuk-student-meta-item {
        flex-direction: column;
    }
    
    .csuk-student-meta-value {
        text-align: left;
    }
    
    .csuk-groups-grid {
        grid-template-columns: 1fr;
    }
    
    .csuk-dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .csuk-tab-panel {
        border-radius: 0;
        padding: 22px 18px 18px 18px;
    }
    
    .csuk-form-row {
        grid-template-columns: 1fr;
    }
    
    .csuk-group-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .csuk-students-table {
        font-size: 14px;
    }
    
    .csuk-students-table th,
    .csuk-students-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .csuk-enrollment-form,
    .csuk-teacher-dashboard {
        padding: 20px;
    }

    .csuk-tabs-header {
        padding: 18px 18px 0 18px;
    }

    .csuk-tab-panel {
        padding: 18px;
    }

    .csuk-group-overview-card,
    .csuk-section {
        padding: 18px;
    }

    .csuk-summary-card {
        min-height: auto;
    }
    
    .csuk-group-actions {
        flex-direction: column;
    }
    
    .csuk-modal-content {
        padding: 20px;
    }
}
