@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --brand-primary: #2140ff;
    --brand-primary-soft: #5c7bff;
    --brand-dark: #0b1437;
    --surface-light: #f6f8fb;
    --text-main: #0f172a;
    --text-muted: #475569;
    --radius-lg: 26px;
    --shadow-lg: 0 30px 60px rgba(15, 23, 42, 0.18);
}

body {
    margin: 0;
    font-family: 'Inter', 'KazNet', sans-serif;
    background: radial-gradient(circle at top right, rgba(33, 64, 255, 0.08), transparent 55%),
        radial-gradient(circle at bottom left, rgba(91, 99, 211, 0.1), transparent 50%),
        #eef2ff;
    color: var(--text-main);
    min-height: 100vh;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-primary-soft);
    text-decoration: underline;
}

button, .btn {
    font-family: inherit;
}

.converter-shell {
    display: flex;
    min-height: 100vh;
    background: transparent;
    color: #1f2937;
}

.converter-sidebar {
    width: 260px;
    padding: 32px 20px;
    background: linear-gradient(180deg, var(--brand-dark) 0%, #22305c 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 8px 0 28px rgba(12, 20, 39, 0.35);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(68, 90, 204, 0.9) 0%, rgba(78, 129, 237, 0.9) 100%);
    box-shadow: 0 12px 32px rgba(68, 90, 204, 0.35);
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    display: grid;
    place-items: center;
    font-size: 26px;
}

.profile-name {
    margin: 0;
    font-weight: 700;
    font-size: 18px;
}

.profile-role {
    margin: 0;
    font-size: 14px;
    opacity: 0.75;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sidebar-nav .nav-item:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sidebar-nav .nav-item.active {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: 0 18px 32px rgba(33, 64, 255, 0.38);
}

.converter-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.converter-topbar {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.brand {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #edf2ff;
    display: grid;
    place-items: center;
    color: var(--brand-primary);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
    background: #dbe2ff;
    transform: translateY(-2px);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(33, 64, 255, 0.15);
    background: #fff;
    color: #374151;
    box-shadow: 0 6px 18px rgba(33, 64, 255, 0.18);
}

.converter-main {
    flex: 1;
    padding: 24px 32px 32px;
}

@media (max-width: 1024px) {
    .converter-shell {
        flex-direction: column;
    }

    .converter-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 16px;
        overflow-x: auto;
    }

    .sidebar-profile {
        min-width: 220px;
    }

    .sidebar-nav {
        flex-direction: row;
    }
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row ::deep a, .top-row .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
    }

    .top-row a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row:not(.auth) {
        display: none;
    }

    .top-row.auth {
        justify-content: space-between;
    }

    .top-row a, .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row, article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type {
        padding-top: 1rem;
    }

    .nav-item:last-of-type {
        padding-bottom: 1rem;
    }

    .nav-item ::deep a {
        color: #d7d7d7;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
    }

        .nav-item ::deep a.active {
            background-color: rgba(255,255,255,0.25);
            color: white;
        }

        .nav-item ::deep a:hover {
            background-color: rgba(255,255,255,0.1);
            color: white;
        }

.content {
    padding-top: 1.1rem;
}

.navbar-brand {
    font-size: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Book Management Styles */
.book-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.book-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.book-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
}

.filter-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.sort-dropdown {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.5rem;
}

.search-input {
    border-radius: 25px;
    border: 1px solid #ddd;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

/* Admin Layout */
.admin-shell {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.admin-sidebar {
    width: 280px;
    padding: 2rem 1.25rem;
    background: linear-gradient(180deg, #1a1f36 0%, #0f1419 100%);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

/* 侧边栏装饰背景 */
.admin-sidebar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.admin-sidebar::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 0.35rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* 悬停效果 */
.admin-sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar .nav-link:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #ffffff;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.admin-sidebar .nav-link:hover::before {
    transform: scaleY(1);
}

/* 激活状态 */
.admin-sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    color: #ffffff;
    transform: translateX(0);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.admin-sidebar .nav-link.active::before {
    transform: scaleY(1);
    width: 5px;
    background: linear-gradient(180deg, #818cf8 0%, #a78bfa 100%);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

.admin-sidebar .nav-link.active i {
    color: #a78bfa;
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.5));
}

/* 图标样式 */
.admin-sidebar .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover i {
    transform: scale(1.1);
    color: #c4b5fd;
}

/* 头部样式 */
.admin-sidebar__header {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.admin-sidebar__header a {
    padding: 0.75rem 0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.admin-sidebar__header a:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.admin-sidebar__header .fs-4 {
    font-size: 1.75rem !important;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

/* 底部按钮 */
.admin-sidebar .btn-outline-light {
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.admin-sidebar .btn-outline-light:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

.admin-sidebar .btn-outline-light i {
    transition: transform 0.3s ease;
}

.admin-sidebar .btn-outline-light:hover i {
    transform: translateX(4px);
}

/* 导航分组标题（如果需要添加） */
.nav-section-title {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 1rem 1.25rem 0.5rem;
    margin-top: 1rem;
}

/* 滚动条美化 */
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

.admin-main {
    flex: 1;
    padding: 2.5rem 3rem;
    background-color: #f4f6f9;
}

.admin-main .card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.admin-header {
    gap: 1.5rem;
}

.admin-badge {
    background: rgba(78, 115, 223, 0.15);
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.5rem 1.25rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card__icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

.quick-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-action {
    background: #f8fafc;
    border-radius: 0.85rem;
    padding: 0.9rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    color: inherit;
}

.quick-action__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
}

.quick-action__title {
    font-weight: 600;
    font-size: 1rem;
}

.quick-action__subtitle {
    font-size: 0.85rem;
}

.status-card .card-body {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-card__indicator {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(25, 135, 84, 0.1);
}

/* 响应式设计 */
@media (max-width: 991.98px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        padding: 1.25rem 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .admin-sidebar::before,
    .admin-sidebar::after {
        display: none;
    }

    .admin-sidebar__header {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .admin-sidebar .nav-link {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .admin-sidebar .nav-link:hover {
        transform: translateX(4px);
    }

    .admin-main {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .admin-sidebar {
        padding: 1rem 0.75rem;
    }

    .admin-sidebar__header .fs-4 {
        font-size: 1.5rem !important;
    }

    .admin-sidebar .nav-link {
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }

    .admin-sidebar .nav-link i {
        font-size: 1rem;
        width: 20px;
    }

    .admin-main {
        padding: 1rem 0.75rem;
    }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

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

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.category-filter-btn {
    margin: 0.25rem;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    transition: all 0.3s ease;
}

.category-filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.category-filter-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

/* ========================================
   Enrollments Page Styles
   ======================================== */

/* 页面标题 */
.admin-main h2 {
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-main h2 i {
    color: #6366f1;
    font-size: 1.75rem;
}

/* 卡片美化 */
.enrollments-page .card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.enrollments-page .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

/* 卡片头部 */
.enrollments-page .card-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.enrollments-page .card-header h5 {
    margin: 0;
    font-size: 1.1rem;
}

.enrollments-page .card-header #selectedCount {
    display: inline-block;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0 8px;
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 筛选表单美化 */
.enrollments-page .form-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.enrollments-page .form-select,
.enrollments-page .form-control {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.enrollments-page .form-select:focus,
.enrollments-page .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.enrollments-page .form-control-sm {
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
}

.enrollments-page .form-control-sm:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* 按钮美化 */
.enrollments-page .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.enrollments-page .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.enrollments-page .btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.enrollments-page .btn-secondary {
    background: #64748b;
    color: white;
}

.enrollments-page .btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.enrollments-page .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.enrollments-page .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.enrollments-page .btn-success:disabled {
    background: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.enrollments-page .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.enrollments-page .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.enrollments-page .btn-danger:disabled {
    background: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 徽章美化 */
.enrollments-page .badge {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.enrollments-page .badge.bg-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #78350f;
}

.enrollments-page .badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.enrollments-page .badge.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

.enrollments-page .badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* 表格美化 */
.enrollments-page .table {
    margin: 0;
}

.enrollments-page .table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.enrollments-page .table thead th {
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem;
    border: none;
}

.enrollments-page .table tbody td {
    padding: 1.25rem;
    vertical-align: middle;
    border-color: #f1f5f9;
}

.enrollments-page .table tbody tr {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.enrollments-page .table tbody tr:hover {
    background-color: #f8fafc;
    border-left-color: #6366f1;
    transform: translateX(2px);
}

/* 状态行颜色 */
.enrollments-page .table-warning {
    background-color: rgba(251, 191, 36, 0.08) !important;
    border-left: 3px solid #fbbf24 !important;
}

.enrollments-page .table-warning:hover {
    background-color: rgba(251, 191, 36, 0.15) !important;
}

.enrollments-page .table-success {
    background-color: rgba(16, 185, 129, 0.08) !important;
    border-left: 3px solid #10b981 !important;
}

.enrollments-page .table-success:hover {
    background-color: rgba(16, 185, 129, 0.15) !important;
}

.enrollments-page .table-danger {
    background-color: rgba(239, 68, 68, 0.08) !important;
    border-left: 3px solid #ef4444 !important;
}

.enrollments-page .table-danger:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

/* 复选框美化 */
.enrollments-page .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.enrollments-page .form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.enrollments-page .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* 空状态美化 */
.enrollments-page .text-center.py-4 {
    padding: 3rem 1rem !important;
}

.enrollments-page .text-center.py-4 i {
    color: #cbd5e1;
    display: block;
    margin-bottom: 1rem;
}

.enrollments-page .text-center.py-4 p {
    color: #94a3b8;
    font-size: 1.1rem;
    margin: 0;
}

/* 分页美化 */
.enrollments-page .pagination {
    gap: 0.5rem;
}

.enrollments-page .page-link {
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    color: #475569;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.enrollments-page .page-link:hover {
    background: #e2e8f0;
    color: #1f2937;
    transform: translateY(-2px);
}

.enrollments-page .page-item.active .page-link {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.enrollments-page .page-item.disabled .page-link {
    background: #f1f5f9;
    color: #cbd5e1;
    cursor: not-allowed;
}

/* Alert 美化 */
.enrollments-page .alert {
    border: none;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.enrollments-page .alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    color: #047857;
    border-left: 4px solid #10b981;
}

.enrollments-page .alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

.enrollments-page .alert .btn-close {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.enrollments-page .alert .btn-close:hover {
    opacity: 1;
}

/* 批量操作区域美化 */
.enrollments-page .card-body .row {
    align-items: flex-end;
}

.enrollments-page .form-label.small {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .enrollments-page .card {
        border-radius: 12px;
    }

    .enrollments-page .card-header {
        padding: 1rem;
    }

    .enrollments-page .table thead th,
    .enrollments-page .table tbody td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .enrollments-page .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .enrollments-page h2 {
        font-size: 1.5rem;
    }
}

/* =========================================================
   Tahoe 26 Inspired Visual Refresh
   ========================================================= */
:root {
    --tahoe-page-a: #edf5ff;
    --tahoe-page-b: #f7fbff;
    --tahoe-page-c: #eef8f3;
    --tahoe-glass: rgba(255, 255, 255, 0.64);
    --tahoe-glass-strong: rgba(255, 255, 255, 0.84);
    --tahoe-line: rgba(128, 164, 207, 0.3);
    --tahoe-title: #14253c;
    --tahoe-text: #27415f;
    --tahoe-accent: #2f78ff;
    --tahoe-accent-2: #2db6de;
    --tahoe-danger: #ff456f;
    --tahoe-shadow-lg: 0 20px 45px rgba(18, 51, 96, 0.15);
}

body {
    font-family: "SF Pro Display", "SF Pro Text", "Segoe UI", "Inter", sans-serif !important;
    color: var(--tahoe-text);
    background:
        radial-gradient(1200px 420px at -8% -16%, rgba(113, 173, 255, 0.28), transparent 62%),
        radial-gradient(900px 380px at 112% -12%, rgba(124, 229, 223, 0.22), transparent 58%),
        linear-gradient(165deg, var(--tahoe-page-a) 0%, var(--tahoe-page-b) 42%, var(--tahoe-page-c) 100%) !important;
}

.card,
.editor-panel,
.feature-card,
.stat-card,
.usage-card {
    border: 1px solid var(--tahoe-line) !important;
    border-radius: 22px !important;
    background: var(--tahoe-glass) !important;
    backdrop-filter: blur(16px) saturate(155%);
    -webkit-backdrop-filter: blur(16px) saturate(155%);
    box-shadow: var(--tahoe-shadow-lg) !important;
}

.table,
.table thead,
.table tbody,
.table tr,
.table th,
.table td {
    border-color: rgba(120, 154, 194, 0.2) !important;
}

.table th {
    color: #1b395d;
    font-weight: 700;
}

.btn-primary,
.btn-login,
.btn-register,
button.primary {
    border: 1px solid rgba(65, 138, 234, 0.45) !important;
    background: linear-gradient(142deg, var(--tahoe-accent) 0%, var(--tahoe-accent-2) 100%) !important;
    color: #fff !important;
    box-shadow: 0 12px 20px rgba(48, 128, 233, 0.28) !important;
}

.btn-primary:hover,
.btn-login:hover,
.btn-register:hover,
button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 24px rgba(48, 128, 233, 0.34) !important;
}

button.secondary,
.btn-secondary,
.btn-outline-primary {
    border: 1px solid rgba(101, 147, 204, 0.34) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    color: #1e446f !important;
}

.form-control,
.form-select,
textarea,
input {
    border-radius: 14px !important;
    border: 1px solid rgba(120, 154, 194, 0.32) !important;
    background: rgba(255, 255, 255, 0.86) !important;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus {
    border-color: rgba(57, 128, 231, 0.6) !important;
    box-shadow: 0 0 0 4px rgba(57, 128, 231, 0.14) !important;
}

/* Dashboard cards */
.modern-dashboard .welcome-section {
    background: linear-gradient(145deg, rgba(62, 137, 246, 0.9) 0%, rgba(60, 176, 228, 0.88) 100%) !important;
    box-shadow: 0 24px 44px rgba(37, 107, 194, 0.3) !important;
}

.modern-dashboard .feature-card {
    background: var(--tahoe-glass-strong) !important;
    border: 1px solid rgba(108, 152, 214, 0.28) !important;
}

.modern-dashboard .feature-card:hover {
    box-shadow: 0 20px 34px rgba(30, 87, 164, 0.22) !important;
}

/* Login and register */
.login-container,
.register-container {
    background:
        radial-gradient(1000px 320px at -10% -12%, rgba(113, 173, 255, 0.34), transparent 62%),
        radial-gradient(700px 300px at 110% -10%, rgba(124, 229, 223, 0.24), transparent 56%),
        linear-gradient(155deg, #edf5ff 0%, #f5fbff 48%, #edf8f4 100%) !important;
}

.login-card,
.register-card {
    background: var(--tahoe-glass-strong) !important;
    border: 1px solid rgba(126, 162, 202, 0.34) !important;
    border-radius: 26px !important;
    box-shadow: 0 26px 52px rgba(17, 49, 92, 0.2) !important;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.login-icon,
.register-icon {
    background: linear-gradient(145deg, #3f8cff 0%, #2db6de 100%) !important;
    box-shadow: 0 12px 28px rgba(48, 128, 233, 0.34) !important;
}

.login-card h2,
.register-card h2 {
    color: #15375d !important;
}

.alert-danger {
    border-color: rgba(251, 119, 137, 0.5) !important;
    background: rgba(255, 236, 240, 0.84) !important;
}

.alert-success {
    border-color: rgba(75, 200, 142, 0.5) !important;
    background: rgba(235, 255, 245, 0.85) !important;
}

/* Admin shell accents */
.admin-shell {
    background:
        radial-gradient(980px 380px at -10% -12%, rgba(113, 173, 255, 0.25), transparent 62%),
        radial-gradient(700px 300px at 105% -10%, rgba(124, 229, 223, 0.2), transparent 56%),
        linear-gradient(162deg, #eef5ff 0%, #f7fbff 45%, #eef8f5 100%) !important;
}

.admin-main {
    background: transparent !important;
}

.admin-sidebar {
    background: rgba(33, 55, 82, 0.78) !important;
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    border-right: 1px solid rgba(131, 168, 212, 0.22);
}

@media (max-width: 768px) {
    .login-card,
    .register-card {
        padding: 32px 22px !important;
        border-radius: 20px !important;
    }
}

/* ========================================
   Admin Flat Minimal Refresh
   ======================================== */

:root {
    --admin-brand-1: #7b6ff6;
    --admin-brand-2: #2f84f6;
    --admin-bg: #f3f6fb;
    --admin-surface: #ffffff;
    --admin-surface-soft: #f8faff;
    --admin-border: #dbe3ef;
    --admin-text: #0f172a;
    --admin-muted: #5f6d85;
}

.admin-shell {
    background: linear-gradient(180deg, var(--admin-bg) 0%, #eef2f8 100%) !important;
}

.admin-sidebar,
.admin-sidebar.bg-dark {
    width: 286px;
    padding: 1.1rem 0.85rem 1rem !important;
    background: #111a2a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.16);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar::before,
.admin-sidebar::after {
    display: none !important;
}

.admin-sidebar__header {
    padding: 0 0.45rem 0.95rem !important;
    margin-bottom: 0.75rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar__header .fs-4 {
    font-size: 1.4rem !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: none !important;
    background: linear-gradient(95deg, #b7b8ff 0%, #74b7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-sidebar .nav-link {
    margin-bottom: 0.24rem;
    padding: 0.62rem 0.84rem;
    border-radius: 11px;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.74) !important;
    font-size: 0.9rem;
    font-weight: 600;
    transform: none !important;
    box-shadow: none !important;
}

.admin-sidebar .nav-link::before {
    display: none !important;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

.admin-sidebar .nav-link.active {
    background: linear-gradient(100deg, var(--admin-brand-1) 0%, var(--admin-brand-2) 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 10px 18px rgba(68, 95, 196, 0.35) !important;
    transform: none !important;
}

.admin-sidebar .nav-link i,
.admin-sidebar .nav-link.active i,
.admin-sidebar .nav-link:hover i {
    width: 20px;
    font-size: 0.96rem;
    color: currentColor !important;
    filter: none !important;
    transform: none !important;
}

.admin-sidebar .small,
.admin-sidebar .text-white-50 {
    color: rgba(255, 255, 255, 0.52) !important;
}

.admin-sidebar .btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 11px;
    padding: 0.62rem 0.84rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    color: #e3ebff;
    backdrop-filter: none !important;
}

.admin-sidebar .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

.admin-sidebar .btn-outline-light i,
.admin-sidebar .btn-outline-light:hover i {
    transform: none;
}

.admin-main {
    padding: 1.65rem 1.8rem !important;
    background: transparent !important;
}

.admin-main .card,
.admin-main .stat-card {
    background: var(--admin-surface) !important;
    border: 1px solid var(--admin-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

.admin-main .card-header {
    background: var(--admin-surface) !important;
    border-bottom: 1px solid #e8eef7 !important;
    border-radius: 14px 14px 0 0 !important;
}

.admin-header h1.display-6 {
    color: var(--admin-text) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.admin-header p,
.admin-main .text-muted {
    color: var(--admin-muted) !important;
}

.admin-badge {
    background: rgba(123, 111, 246, 0.12) !important;
    border: 1px solid rgba(123, 111, 246, 0.22);
    color: #4459a9 !important;
}

.stat-card__value {
    color: var(--admin-text) !important;
}

.quick-action {
    background: var(--admin-surface-soft) !important;
    border: 1px solid #e2eaf5;
    border-radius: 12px;
}

.quick-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.status-card__indicator {
    background: rgba(47, 132, 246, 0.12);
    color: #2f84f6;
}

@media (max-width: 991.98px) {
    .admin-sidebar,
    .admin-sidebar.bg-dark {
        width: 100%;
        height: auto;
        position: relative;
        padding: 0.9rem 0.65rem !important;
    }

    .admin-main {
        padding: 1.1rem 0.8rem !important;
    }
}

/* Converter sidebar mobile fallback
   Keeps profile/navigation polished even when converter-layout.css is unavailable. */
@media (max-width: 1024px) {
    .converter-shell .converter-sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
        top: auto;
        border-radius: 0 0 22px 22px;
        padding: 12px 10px 14px;
        gap: 9px;
        flex-direction: column;
        align-items: stretch;
        overflow: visible;
        background: linear-gradient(155deg, #26356c 0%, #1d2e66 45%, #1a2960 100%);
        box-shadow: 0 14px 30px rgba(17, 35, 79, 0.25);
    }

    .converter-shell .converter-sidebar::before,
    .converter-shell .converter-sidebar::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
    }

    .converter-shell .converter-sidebar::before {
        width: 170px;
        height: 170px;
        top: -68px;
        left: -58px;
        background: radial-gradient(circle at center, rgba(103, 144, 246, 0.36) 0%, rgba(103, 144, 246, 0) 74%);
    }

    .converter-shell .converter-sidebar::after {
        width: 138px;
        height: 138px;
        right: -44px;
        bottom: -54px;
        background: radial-gradient(circle at center, rgba(88, 158, 248, 0.3) 0%, rgba(88, 158, 248, 0) 74%);
    }

    .converter-shell .sidebar-profile-card {
        position: relative;
        overflow: hidden;
        margin: 0;
        padding: 12px;
        border-radius: 18px;
        border: 1px solid #dce7f7;
        background: linear-gradient(148deg, #ffffff 0%, #f2f7ff 100%);
        color: #1f2937;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        gap: 10px;
        box-shadow: 0 14px 28px rgba(10, 20, 42, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.97);
    }

    .converter-shell a.sidebar-profile-card,
    .converter-shell a.sidebar-profile-card:link,
    .converter-shell a.sidebar-profile-card:visited,
    .converter-shell a.sidebar-profile-card:hover,
    .converter-shell a.sidebar-profile-card:active {
        color: #1f2937;
        text-decoration: none;
    }

    .converter-shell .profile-card-auth::after {
        content: "";
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, rgba(79, 91, 215, 0.95) 0%, rgba(47, 132, 246, 0.95) 100%);
    }

    .converter-shell .profile-card-head {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .converter-shell .profile-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        flex-shrink: 0;
        position: relative;
        color: #ffffff;
        font-size: 1rem;
        border: 2px solid #e2e8f6;
    }

    .converter-shell .profile-avatar.avatar-online {
        background: linear-gradient(140deg, #4f5bd7 0%, #2f84f6 100%);
    }

    .converter-shell .profile-avatar.avatar-offline {
        background: linear-gradient(140deg, #8b98b6 0%, #6f7f9f 100%);
    }

    .converter-shell .profile-avatar.avatar-online::after,
    .converter-shell .profile-avatar.avatar-offline::after {
        content: "";
        position: absolute;
        right: -1px;
        bottom: -1px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 2px solid #ffffff;
    }

    .converter-shell .profile-avatar.avatar-online::after {
        background: #16a34a;
    }

    .converter-shell .profile-avatar.avatar-offline::after {
        background: #94a3b8;
    }

    .converter-shell .profile-title {
        margin: 0;
        font-size: 0.98rem;
        line-height: 1.15;
        font-weight: 700;
        color: #1f2433;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .converter-shell .profile-subtitle {
        margin: 2px 0 0;
        font-size: 0.69rem;
        font-weight: 500;
        color: #6b7a95;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .converter-shell .profile-metrics {
        display: flex;
        gap: 6px;
        padding: 0;
        border: 0;
        background: transparent;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .converter-shell .profile-metrics::-webkit-scrollbar {
        display: none;
    }

    .converter-shell .profile-metric {
        min-width: 94px;
        padding: 8px 9px;
        border-radius: 11px;
        border: 1px solid #e6edf9;
        background: #ffffff;
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .converter-shell .profile-metric:nth-child(1) {
        background: linear-gradient(180deg, #f3fcf6 0%, #eefaf3 100%);
    }

    .converter-shell .profile-metric:nth-child(2) {
        background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
    }

    .converter-shell .profile-metric:nth-child(3) {
        background: linear-gradient(180deg, #f7f5ff 0%, #f2efff 100%);
    }

    .converter-shell .profile-metric i {
        font-size: 0.65rem;
        color: #23344f;
    }

    .converter-shell .profile-metric span {
        font-size: 0.54rem;
        color: #7f8ba3;
        font-weight: 600;
    }

    .converter-shell .profile-metric strong {
        font-size: 0.73rem;
        color: #1f2f46;
        font-weight: 700;
        white-space: nowrap;
    }

    .converter-shell .profile-card-btn {
        width: 100%;
        height: 38px;
        border-radius: 11px;
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        color: #ffffff;
        background: linear-gradient(180deg, #2a2e39 0%, #1f2430 100%);
        border: 1px solid #232633;
        text-decoration: none;
    }

    .converter-shell .sidebar-nav {
        display: flex;
        flex-direction: row;
        gap: 8px;
        padding: 2px 0 0;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .converter-shell .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .converter-shell .sidebar-nav .nav-item {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 10px 12px;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.22);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
        color: rgba(247, 250, 255, 0.9);
        text-decoration: none;
    }

    .converter-shell .sidebar-nav .nav-item i {
        width: auto;
        font-size: 0.95rem;
    }

    .converter-shell .sidebar-nav .nav-item span {
        white-space: nowrap;
        line-height: 1;
        font-size: 0.8rem;
    }

    .converter-shell .sidebar-nav .nav-item.active {
        border-color: rgba(255, 255, 255, 0.7);
        background: #ffffff;
        color: #2b4fd9;
        box-shadow: 0 10px 22px rgba(13, 30, 74, 0.24);
    }

    .converter-shell .sidebar-nav .nav-item.active i {
        color: #2b4fd9;
    }

    .converter-shell .sidebar-logo-panel {
        display: none;
    }
}

@media (max-width: 420px) {
    .converter-shell .profile-metric {
        min-width: 86px;
        padding: 7px 8px;
    }

    .converter-shell .sidebar-nav .nav-item {
        padding: 9px 10px;
    }

    .converter-shell .sidebar-nav .nav-item span {
        font-size: 0.75rem;
    }
}
