/* =====================================================
   TEACHER DASHBOARD STYLES
   ===================================================== */

.teacher-dashboard {
    min-height: 100vh;
    background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 30%, #e0f2fe 100%);
    color: #1e293b;
    font-family: 'Quicksand', sans-serif;
    overflow-y: auto;
}

/* Header */
.teacher-header {
    background: linear-gradient(135deg, #0d9488 0%, #6366f1 100%);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.3);
}

.teacher-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.teacher-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.teacher-header h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.6rem;
    margin: 0;
    color: white;
}

.teacher-header h1 span {
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.teacher-header-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 2px 0 0 0;
}

.teacher-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.teacher-welcome {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeWelcome 5s ease-out forwards;
}

@keyframes fadeWelcome {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

.teacher-header .btn-logout {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.teacher-header .btn-logout:hover {
    background: #dc2626;
}

/* Content Area */
.teacher-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 48px;
}

/* Class Management Bar */
.class-management {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.class-selector {
    background: white;
    border: 1px solid #a7f3d0;
    color: #1e293b;
    padding: 10px 16px;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 200px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.class-selector:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

/* Kebab Menu */
.class-kebab-wrap {
    position: relative;
}

.btn-kebab {
    background: white;
    border: 1px solid #a7f3d0;
    color: #475569;
    font-size: 1.3rem;
    width: 38px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.btn-kebab:hover {
    color: #0d9488;
    border-color: #0d9488;
    background: #f0fdf4;
}

.class-kebab-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: white;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 6px 0;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.class-kebab-menu.open {
    display: block;
}

.class-kebab-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #334155;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.class-kebab-menu button:hover {
    background: #f0fdf4;
}

.kebab-divider {
    height: 1px;
    background: #d1fae5;
    margin: 4px 0;
}

.class-kebab-menu .kebab-danger {
    color: #ef4444;
}

.class-kebab-menu .kebab-danger:hover {
    background: #fef2f2;
}

.btn-create-class {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    height: 42px;
    display: inline-flex;
    align-items: center;
}

.btn-create-class:hover {
    background: #6d28d9;
    transform: translateY(-1px);
}

.btn-manage-class {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 10px 16px;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-manage-class:hover {
    color: #f1f5f9;
    border-color: #7c3aed;
}

/* Class Code Display */
.class-code-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    background: white;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 8px 16px;
}

.class-code-label {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
}

.class-code-value {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0d9488;
    letter-spacing: 3px;
}

.btn-copy-code {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
    font-size: 0.85rem;
}

.btn-copy-code:hover {
    color: #0d9488;
}

/* No Classes State */
.no-classes-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 1px dashed #a7f3d0;
}

.no-classes-state .empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.no-classes-state h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.3rem;
    color: #1e293b;
    margin: 0 0 8px;
}

.no-classes-state p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0 0 24px;
}

/* Period Toggle */
.period-toggle {
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
    width: fit-content;
}

.period-btn {
    padding: 8px 24px;
    border: none;
    background: transparent;
    color: #64748b;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn.active {
    background: #0d9488;
    color: white;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.period-btn:hover:not(.active) {
    color: #0d9488;
    background: #f0fdf4;
}

/* Leaderboard Table */
.leaderboard-container {
    background: white;
    border-radius: 16px;
    border: 1px solid #a7f3d0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

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

.leaderboard-table thead th {
    background: #f0fdf4;
    padding: 14px 16px;
    text-align: left;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: #0d9488;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #d1fae5;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.leaderboard-table thead th:hover {
    color: #059669;
}

.leaderboard-table thead th.sorted-asc,
.leaderboard-table thead th.sorted-desc {
    color: #059669;
}

.leaderboard-table thead th.sorted-asc::after {
    content: ' \25B2';
    font-size: 0.65rem;
}

.leaderboard-table thead th.sorted-desc::after {
    content: ' \25BC';
    font-size: 0.65rem;
}

.leaderboard-table thead th:first-child {
    width: 50px;
    text-align: center;
}

.leaderboard-table tbody tr {
    transition: background 0.15s;
    border-bottom: 1px solid #ecfdf5;
}

.leaderboard-table tbody tr:hover {
    background: #f0fdf4;
}

.leaderboard-table tbody tr:last-child {
    border-bottom: none;
}

.leaderboard-table tbody td {
    padding: 14px 16px;
    font-size: 0.95rem;
}

/* Rank Column */
.rank-cell {
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1rem;
}

.rank-1 { color: #d97706; }
.rank-2 { color: #9ca3af; }
.rank-3 { color: #b45309; }

/* Student Name Cell */
.student-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.student-mini-bolt {
    position: relative;
    width: 28px;
    height: 38px;
    flex-shrink: 0;
}

.student-mini-bolt svg {
    display: block;
}

.mini-bolt-face {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    line-height: 1;
}

.student-name-text {
    font-weight: 600;
    color: #1e293b;
}

.student-username-text {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Metric Cells */
.metric-cell {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

.metric-cell.points { color: #d97706; }
.metric-cell.time { color: #0284c7; }
.metric-cell.days { color: #059669; }

/* Last Active Cell */
.last-active-cell {
    font-size: 0.8rem;
    color: #94a3b8;
}

.last-active-cell.recent {
    color: #059669;
}

.last-active-cell.stale {
    color: #dc2626;
}

/* Add Students Footer (inside leaderboard) */
.add-students-footer {
    padding: 12px 16px;
    border-top: 1px solid #d1fae5;
}

.btn-add-students-inline {
    background: transparent;
    border: 1px dashed #a7f3d0;
    color: #64748b;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-students-inline:hover {
    border-color: #0d9488;
    color: #0d9488;
    background: #f0fdf4;
}

/* Empty Leaderboard */
.leaderboard-empty {
    text-align: center;
    padding: 48px 20px;
}

/* Inline Remove Button */
.remove-col-header {
    width: 40px;
    cursor: default !important;
}

.remove-col-header:hover {
    color: #94a3b8 !important;
}

.remove-cell {
    width: 40px;
    text-align: center;
    padding: 8px !important;
}

.btn-remove-inline {
    background: transparent;
    border: none;
    color: transparent;
    font-size: 0.85rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.leaderboard-table tbody tr:hover .btn-remove-inline {
    color: #64748b;
}

.btn-remove-inline:hover {
    color: #ef4444 !important;
    background: #fef2f2;
}

.leaderboard-empty .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.leaderboard-empty h3 {
    font-family: 'Fredoka', sans-serif;
    color: #475569;
    margin: 0 0 8px;
}

.leaderboard-empty p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Student Count Badge */
.student-count-badge {
    background: #d1fae5;
    color: #0d9488;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 8px;
}

/* Create Class Modal */
.create-class-modal {
    max-width: 420px;
}

.create-class-modal h2 {
    font-family: 'Fredoka', sans-serif;
    color: #1e293b;
    margin: 0 0 4px;
}

.create-class-modal .modal-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 20px;
}

.create-class-modal .form-group {
    margin-bottom: 16px;
}

.create-class-modal label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #334155;
}

.create-class-modal input,
.create-class-modal select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.create-class-modal input:focus,
.create-class-modal select:focus {
    outline: none;
    border-color: #7c3aed;
}

.create-class-modal .btn-submit {
    width: 100%;
    padding: 12px;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.create-class-modal .btn-submit:hover {
    background: #6d28d9;
}

.create-class-modal .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Class Created Success */
.class-created-success {
    text-align: center;
    padding: 16px 0;
}

.class-created-success .success-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.class-created-success h3 {
    font-family: 'Fredoka', sans-serif;
    color: #1e293b;
    margin: 0 0 12px;
}

.class-created-success .big-code {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #7c3aed;
    letter-spacing: 6px;
    background: #f3f0ff;
    padding: 12px 24px;
    border-radius: 12px;
    display: inline-block;
    margin: 8px 0 16px;
}

.class-created-success p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 20px;
}

/* Manage Class Modal */
.manage-class-modal {
    max-width: 480px;
}

.manage-class-modal h2 {
    font-family: 'Fredoka', sans-serif;
    color: #1e293b;
    margin: 0 0 20px;
}

.manage-class-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.manage-class-actions button {
    padding: 12px 16px;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-danger {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fee2e2;
}

/* Loading Spinner */
.teacher-loading {
    text-align: center;
    padding: 48px;
    color: #94a3b8;
}

.teacher-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #334155;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .teacher-header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .teacher-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .teacher-content {
        padding: 16px 12px 48px;
    }

    .class-management {
        flex-direction: column;
        align-items: stretch;
    }

    .class-code-display {
        margin-left: 0;
    }

    .class-selector {
        min-width: unset;
        width: 100%;
    }

    .leaderboard-table {
        font-size: 0.85rem;
    }

    .leaderboard-table thead th,
    .leaderboard-table tbody td {
        padding: 10px 8px;
    }

    .student-mini-avatar {
        display: none;
    }
}

/* =====================================================
   STUDENT MANAGEMENT STYLES
   ===================================================== */

/* Add Students Button (class management bar) */
.btn-add-students {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-add-students:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
}

.btn-manage-students {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 10px 16px;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-manage-students:hover {
    color: #f1f5f9;
    border-color: #22c55e;
}

/* Empty state CTA */
.btn-add-students-empty {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
    display: inline-block;
}

.btn-add-students-empty:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Add Students Modal */
.add-students-modal {
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
}

.add-students-modal h2 {
    font-family: 'Fredoka', sans-serif;
    color: #1e293b;
    margin: 0 0 4px;
}

.add-students-modal .modal-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0 0 16px;
}

/* Tab switcher */
.add-students-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 20px;
}

.add-students-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-students-tab.active {
    background: white;
    color: #7c3aed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.add-students-tab:hover:not(.active) {
    color: #334155;
}

/* Bulk names textarea */
.bulk-names-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.bulk-names-textarea:focus {
    outline: none;
    border-color: #7c3aed;
}

.bulk-names-textarea::placeholder {
    color: #94a3b8;
}

/* Preview info */
.bulk-preview-info {
    font-size: 0.9rem;
    color: #475569;
    margin: 0 0 12px;
}

.bulk-preview-info span {
    font-weight: 700;
    color: #7c3aed;
}

/* Preview table wrapper */
.bulk-preview-table-wrap {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 16px;
}

.bulk-preview-table {
    width: 100%;
    border-collapse: collapse;
}

.bulk-preview-table thead th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.bulk-preview-table tbody td {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.bulk-preview-table tbody tr:last-child td {
    border-bottom: none;
}

.bulk-username-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    box-sizing: border-box;
}

.bulk-username-input:focus {
    outline: none;
    border-color: #7c3aed;
}

.bulk-pin-cell {
    font-family: monospace;
    font-weight: 700;
    font-size: 1rem;
    color: #334155;
    letter-spacing: 2px;
}

/* Preview actions */
.bulk-preview-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

/* Progress indicator */
.bulk-progress {
    text-align: center;
    padding: 8px;
    margin-bottom: 12px;
    background: #f0fdf4;
    border-radius: 8px;
    color: #16a34a;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Success section */
.bulk-success-content {
    text-align: center;
    padding: 16px 0;
}

.bulk-success-content .success-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.btn-print-slips {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin: 16px 0 8px;
    display: inline-block;
}

.btn-print-slips:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.print-slips-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 4px 0 20px;
}

/* Existing student info */
.existing-student-info {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #7c3aed;
}

/* Manage Students Modal */
.manage-students-modal {
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
}

.manage-students-modal h2 {
    font-family: 'Fredoka', sans-serif;
    color: #1e293b;
    margin: 0 0 4px;
}

.manage-students-modal .modal-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0 0 16px;
}

.manage-students-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.manage-students-table thead th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}

.manage-students-table tbody td {
    padding: 10px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.manage-students-table tbody tr:hover {
    background: #faf5ff;
}

.manage-students-table tbody tr:last-child td {
    border-bottom: none;
}

.btn-remove-student {
    background: transparent;
    color: #ef4444;
    border: 1px solid #fecaca;
    padding: 5px 12px;
    border-radius: 6px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-student:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.manage-students-empty {
    text-align: center;
    padding: 32px;
    color: #64748b;
}

/* Link Child Modal (Parent) */
.link-child-modal {
    max-width: 420px;
}

.link-child-info {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 20px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #7c3aed;
}

/* Link Child button in parent dashboard header */
.section-header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-link-child {
    background: linear-gradient(135deg, #f3e8ff, #ede9fe);
    border: 2px solid #d8b4fe;
    color: #7c3aed;
    padding: 10px 18px;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-link-child:hover {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-color: #c4b5fd;
    transform: translateY(-1px);
}

/* Shared modal form styles (reused) */
.add-students-modal .form-group,
.manage-students-modal .form-group,
.link-child-modal .form-group {
    margin-bottom: 16px;
}

.add-students-modal label,
.link-child-modal label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #334155;
}

.add-students-modal input[type="text"],
.link-child-modal input[type="text"],
.link-child-modal input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.add-students-modal input[type="text"]:focus,
.link-child-modal input[type="text"]:focus,
.link-child-modal input[type="password"]:focus {
    outline: none;
    border-color: #7c3aed;
}

.add-students-modal .btn-submit,
.link-child-modal .btn-primary,
.manage-students-empty .btn-submit {
    width: 100%;
    padding: 12px;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.add-students-modal .btn-submit:hover,
.link-child-modal .btn-primary:hover,
.manage-students-empty .btn-submit:hover {
    background: #6d28d9;
}

.add-students-modal .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.add-students-modal .btn-secondary {
    padding: 12px 24px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.add-students-modal .btn-secondary:hover {
    background: #e2e8f0;
}

.add-students-modal .form-error,
.link-child-modal .form-error {
    background: #fef2f2;
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Responsive - Student Management */
@media (max-width: 768px) {
    .btn-add-students,
    .btn-manage-students {
        font-size: 0.8rem;
        padding: 8px 14px;
    }

    .add-students-modal,
    .manage-students-modal {
        max-width: 95%;
        margin: 10px;
    }

    .bulk-preview-table-wrap {
        max-height: 200px;
    }

    .section-header-buttons {
        flex-direction: column;
        gap: 6px;
    }

    .btn-link-child {
        font-size: 0.8rem;
        padding: 8px 14px;
    }
}
