/* ============================================
   🎨 后台管理系统 - 低饱和度高级感主题
   ============================================ */

/* --- CSS 变量（低饱和度配色方案）--- */
:root {
    --bg-body: #f0f2f6;
    --bg-card: #ffffff;
    --bg-header: linear-gradient(135deg, #62748c 0%, #7a8fa5 100%);
    --bg-sidebar: #2c3e50;
    --bg-sidebar-hover: #34495e;
    --bg-sidebar-active: #34495e;
    --bg-table-hover: #f5f7fb;
    --bg-table-header: #eef1f5;
    --bg-modal-overlay: rgba(44, 62, 80, 0.5);

    --text-primary: #2c3e50;
    --text-secondary: #5d6d7e;
    --text-muted: #95a5a6;
    --text-white: #ffffff;

    --color-primary: #7c8db5;
    --color-primary-hover: #6b7ca3;
    --color-primary-light: #e8ecf5;
    --color-primary-disabled: #b0bcd4;

    --color-success: #8fbc8f;
    --color-success-hover: #7dab7d;
    --color-success-light: #eaf5ea;

    --color-warning: #d4b872;
    --color-warning-hover: #c4a85e;
    --color-warning-light: #f8f2e0;

    --color-danger: #c4847c;
    --color-danger-hover: #b4726a;
    --color-danger-light: #f6e8e6;

    --color-cancel: #a0aab5;
    --color-cancel-hover: #8e98a3;

    --border-color: #e5e9ef;
    --border-light: #f0f2f6;
    --shadow-card: 0 2px 12px rgba(44, 62, 80, 0.06);
    --shadow-card-hover: 0 4px 20px rgba(44, 62, 80, 0.1);
    --shadow-header: 0 2px 8px rgba(44, 62, 80, 0.08);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --sidebar-width: 230px;
    --header-height: 62px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.45s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* --- 页面入场动画 --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* --- Header --- */
.header {
    background: var(--bg-header);
    color: var(--text-white);
    padding: 0 32px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-header);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    animation: fadeIn 0.5s ease;
}

.header h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header h3::before {
    content: '◆';
    font-size: 14px;
    opacity: 0.6;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.header .user-info .nickname-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    backdrop-filter: blur(4px);
    transition: var(--transition-normal);
}

.header .user-info .nickname-badge:hover {
    background: rgba(255, 255, 255, 0.25);
}

.header .user-info a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 6px;
}

.header .user-info a:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.12);
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    z-index: 99;
    padding-top: 12px;
    padding-bottom: 20px;
    overflow-y: auto;
    animation: slideInLeft 0.5s ease;
    box-shadow: 2px 0 10px rgba(44, 62, 80, 0.08);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar .nav-item {
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-normal);
    border-left: 3px solid transparent;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-item::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar .nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: rgba(255, 255, 255, 0.9);
    padding-left: 28px;
}

.sidebar .nav-item.active {
    background: var(--bg-sidebar-active);
    color: var(--text-white);
    border-left-color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.sidebar .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
}

.sidebar .nav-item .nav-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 28px 32px;
    min-height: calc(100vh - var(--header-height));
    animation: fadeInUp 0.6s ease;
}

/* --- Page Header --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    animation: fadeInUp 0.5s ease;
}

.page-header h2 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.page-header .page-subtitle {
    color: var(--text-muted);
    font-size: 13px;
}

/* --- Card --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.6s ease;
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
}

.card .section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card .section-title .badge-count {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 12px;
    padding: 1px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* --- Welcome Card (首页) --- */
.welcome-card {
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f5 100%);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-card);
    animation: fadeInUp 0.7s ease;
    border: 1px solid var(--border-light);
}

.welcome-card .welcome-icon {
    font-size: 56px;
    margin-bottom: 20px;
    display: block;
    opacity: 0.8;
}

.welcome-card h2 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 600;
}

.welcome-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* --- Buttons --- */
.btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 2px 8px rgba(124, 141, 181, 0.3);
}

.btn-primary:disabled {
    background: var(--color-primary-disabled);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-success {
    background: var(--color-success);
    color: var(--text-white);
}

.btn-success:hover {
    background: var(--color-success-hover);
    box-shadow: 0 2px 8px rgba(143, 188, 143, 0.3);
}

.btn-success:disabled {
    background: #b8d4b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-warning {
    background: var(--color-warning);
    color: var(--text-white);
}

.btn-warning:hover {
    background: var(--color-warning-hover);
    box-shadow: 0 2px 8px rgba(212, 184, 114, 0.3);
}

.btn-danger {
    background: var(--color-danger);
    color: var(--text-white);
}

.btn-danger:hover {
    background: var(--color-danger-hover);
    box-shadow: 0 2px 8px rgba(196, 132, 124, 0.3);
}

.btn-cancel {
    background: var(--color-cancel);
    color: var(--text-white);
}

.btn-cancel:hover {
    background: var(--color-cancel-hover);
}

.btn-sm {
    padding: 5px 14px;
    font-size: 12px;
}

.btn-xs {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 4px;
}

/* --- Search Bar --- */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar select,
.search-bar input {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-fast);
    background: var(--bg-card);
    color: var(--text-primary);
}

.search-bar select:focus,
.search-bar input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.search-bar input {
    flex: 1;
    min-width: 200px;
}

/* --- Tables --- */
.table-container {
    overflow-x: auto;
    animation: fadeInUp 0.5s ease;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    background: var(--bg-table-header);
    padding: 12px 14px;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    font-size: 13px;
    letter-spacing: 0.3px;
}

table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

table tbody tr {
    transition: all var(--transition-fast);
}

table tbody tr:hover {
    background: var(--bg-table-hover);
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    animation: fadeInUp 0.5s ease;
}

.pagination .btn {
    padding: 6px 16px;
    font-size: 13px;
}

.pagination .btn-page {
    min-width: 36px;
    padding: 6px 10px;
    justify-content: center;
}

.pagination span {
    color: var(--text-secondary);
    font-size: 13px;
}

.pagination .page-info {
    padding: 6px 16px;
    background: var(--bg-table-header);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-modal-overlay);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease;
    backdrop-filter: blur(2px);
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    width: 780px;
    max-width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(44, 62, 80, 0.2);
    animation: scaleIn 0.3s ease;
}

.modal h3 {
    margin-bottom: 22px;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.modal .form-group {
    flex: 1;
}

.modal .form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.modal .form-group label .required {
    color: var(--color-danger);
    margin-left: 2px;
}

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-fast);
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.modal .form-group .hint-text {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* --- Empty & Search Tips --- */
.empty-tip {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    font-size: 14px;
    animation: fadeInUp 0.4s ease;
}

.empty-tip .empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.6;
}

.search-tip {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-muted);
    animation: fadeInUp 0.5s ease;
}

.search-tip .search-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 18px;
    opacity: 0.5;
}

.search-tip p {
    font-size: 15px;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-add {
    background: var(--color-success-light);
    color: #5a8a5a;
}

.badge-update {
    background: var(--color-warning-light);
    color: #b89a4a;
}

.badge-delete {
    background: var(--color-danger-light);
    color: #a06058;
}

.badge-status {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-status-active {
    background: var(--color-success-light);
    color: #5a8a5a;
}

.badge-status-used {
    background: var(--color-danger-light);
    color: #a06058;
}

.badge-status-disabled {
    background: #f0f0f0;
    color: var(--text-muted);
}

/* --- Module Tag --- */
.module-tag {
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
    font-weight: 500;
}

/* --- Action Buttons Group --- */
.action-btns {
    display: flex;
    gap: 6px;
}

.action-btns .btn {
    padding: 4px 12px;
    font-size: 12px;
}

/* --- Toast --- */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 16px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    z-index: 9999;
    transition: opacity var(--transition-normal);
    max-width: 80vw;
    word-break: break-all;
    backdrop-filter: blur(4px);
    animation: scaleIn 0.25s ease;
    pointer-events: none;
}

/* --- School Row (四级联动) --- */
.school-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.school-row select {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.school-row select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* --- Mobile Check Status --- */
.mobile-checking {
    color: var(--color-warning);
    font-size: 12px;
    margin-left: 6px;
}

.mobile-ok {
    color: var(--color-success);
    font-size: 12px;
    margin-left: 6px;
}

.mobile-exists {
    color: var(--color-danger);
    font-size: 12px;
    margin-left: 6px;
}

/* --- User Info Tag --- */
.user-info-tag {
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: inline-block;
    margin-bottom: 15px;
    font-weight: 500;
}

/* --- Export Area --- */
.export-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8f9fb;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

/* --- Batch Progress --- */
.batch-progress-area {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fb;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.progress-bar-bg {
    background: var(--border-color);
    border-radius: 10px;
    height: 28px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, var(--color-primary), #95a5b6);
    border-radius: 10px;
    transition: width var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 1.5s infinite;
    background-size: 200% 100%;
}

/* --- Filter Row (专业录取) --- */
.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 12px;
}

.filter-row .filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-row .filter-item label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-row .filter-item select,
.filter-row .filter-item input {
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    min-width: 120px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.filter-row .filter-item select:focus,
.filter-row .filter-item input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.filter-btns {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 12px;
}

/* --- 选科网格（分物理/历史两排）--- */
.xuancke-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.xuancke-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.xuancke-row .xk-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 44px;
    padding: 6px 0;
}

.xuancke-grid .xk-item {
    padding: 8px 22px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    user-select: none;
    color: var(--text-secondary);
}

.xuancke-grid .xk-item:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.xuancke-grid .xk-item.active {
    background: var(--color-primary);
    color: var(--text-white);
    border-color: var(--color-primary);
}

/* --- 院校省份网格（一行10个）--- */
.uni-province-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.uni-province-grid .up-item {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    user-select: none;
    color: var(--text-secondary);
    flex: 0 0 calc(10% - 5.4px);
    text-align: center;
    box-sizing: border-box;
}

.uni-province-grid .up-item:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.uni-province-grid .up-item.active {
    background: var(--color-primary);
    color: var(--text-white);
    border-color: var(--color-primary);
}

/* --- 专业选择面板 --- */
.prof-panel-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.prof-panel {
    flex: 1;
    min-width: 180px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fafbfc;
    overflow: hidden;
    max-height: 300px;
}

.prof-panel .panel-header {
    background: var(--bg-header);
    color: var(--text-white);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
}

.prof-panel .panel-search {
    padding: 8px;
    border-bottom: 1px solid var(--border-light);
}

.prof-panel .panel-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    transition: border-color var(--transition-fast);
    background: var(--bg-card);
}

.prof-panel .panel-search input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.prof-panel .panel-list {
    max-height: 210px;
    overflow-y: auto;
    padding: 4px 0;
}

.prof-panel .panel-list .pl-item {
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.prof-panel .panel-list .pl-item:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.prof-panel .panel-list .pl-item.selected {
    background: var(--color-primary);
    color: var(--text-white);
}

.prof-panel .panel-list .pl-item .ckbox {
    width: 14px;
    height: 14px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    transition: all var(--transition-fast);
}

.prof-panel .panel-list .pl-item.selected .ckbox {
    background: var(--text-white);
    color: var(--color-primary);
    border-color: var(--text-white);
}

.prof-panel .panel-list .empty-hint {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* --- 已选标签 --- */
.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    min-height: 30px;
    animation: fadeIn 0.3s ease;
}

.selected-tags .tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    animation: scaleIn 0.2s ease;
}

.selected-tags .tag .del {
    cursor: pointer;
    font-weight: bold;
    margin-left: 2px;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.selected-tags .tag .del:hover {
    opacity: 1;
}

.tag-type-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-right: 2px;
}

.tag-type-cat {
    background: var(--color-primary);
    color: var(--text-white);
}

.tag-type-sub {
    background: var(--color-success);
    color: var(--text-white);
}

.tag-type-major {
    background: var(--color-danger);
    color: var(--text-white);
}

/* --- Confirm Bar --- */
.confirm-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.confirm-bar .hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Export Bar --- */
.export-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border-light);
    margin-top: 16px;
    flex-wrap: wrap;
}

.export-bar input {
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    min-width: 180px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.export-bar input:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* --- Total Badge --- */
.total-badge {
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* --- Login Page Specific --- */
.login-body {
    background: linear-gradient(135deg, #e8ecf1 0%, #d5dce6 50%, #e0e5ec 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(124, 141, 181, 0.08);
    top: -100px;
    right: -100px;
}

.login-body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(143, 188, 143, 0.08);
    bottom: -80px;
    left: -80px;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(44, 62, 80, 0.12);
    padding: 44px 40px;
    width: 400px;
    max-width: 92vw;
    position: relative;
    z-index: 1;
    animation: scaleIn 0.5s ease;
    backdrop-filter: blur(10px);
}

.login-container h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 32px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
}

.login-container h2::before {
    content: '◆ ';
    color: var(--color-primary);
    font-size: 18px;
}

.login-container .form-group {
    margin-bottom: 22px;
}

.login-container .form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.login-container .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition-normal);
    background: var(--bg-card);
    color: var(--text-primary);
}

.login-container .form-group input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.login-container .captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.login-container .captcha-row input {
    flex: 1;
}

.login-container .captcha-row img {
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: opacity var(--transition-fast);
}

.login-container .captcha-row img:hover {
    opacity: 0.85;
}

.login-container .btn-login {
    width: 100%;
    padding: 12px;
    background: var(--bg-header);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    letter-spacing: 2px;
}

.login-container .btn-login:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(98, 116, 140, 0.3);
}

.login-container .btn-login:active {
    transform: translateY(0);
}

.login-container .error-msg {
    background: var(--color-danger-light);
    color: #a06058;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 22px;
    font-size: 13px;
    border: 1px solid rgba(196, 132, 124, 0.2);
    animation: fadeInUp 0.3s ease;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--border-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-cancel);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-cancel-hover);
}

/* --- Tr transition for table rows (paginated reload) --- */
@keyframes rowEnter {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

table tbody tr {
    animation: rowEnter 0.3s ease;
    animation-fill-mode: backwards;
}

table tbody tr:nth-child(1) { animation-delay: 0.02s; }
table tbody tr:nth-child(2) { animation-delay: 0.04s; }
table tbody tr:nth-child(3) { animation-delay: 0.06s; }
table tbody tr:nth-child(4) { animation-delay: 0.08s; }
table tbody tr:nth-child(5) { animation-delay: 0.10s; }
table tbody tr:nth-child(6) { animation-delay: 0.12s; }
table tbody tr:nth-child(7) { animation-delay: 0.14s; }
table tbody tr:nth-child(8) { animation-delay: 0.16s; }
table tbody tr:nth-child(9) { animation-delay: 0.18s; }
table tbody tr:nth-child(10) { animation-delay: 0.20s; }
table tbody tr:nth-child(11) { animation-delay: 0.22s; }
table tbody tr:nth-child(12) { animation-delay: 0.24s; }
table tbody tr:nth-child(13) { animation-delay: 0.26s; }
table tbody tr:nth-child(14) { animation-delay: 0.28s; }
table tbody tr:nth-child(15) { animation-delay: 0.30s; }
table tbody tr:nth-child(16) { animation-delay: 0.32s; }
table tbody tr:nth-child(17) { animation-delay: 0.34s; }
table tbody tr:nth-child(18) { animation-delay: 0.36s; }
table tbody tr:nth-child(19) { animation-delay: 0.38s; }
table tbody tr:nth-child(20) { animation-delay: 0.40s; }

/* --- Page transition animation wrapper --- */
.page-transition {
    animation: fadeInUp 0.5s ease;
}

/* --- Loading spinner --- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .header {
        padding: 0 16px;
    }

    .modal .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .modal {
        padding: 20px;
        width: 100%;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar input {
        min-width: unset;
        width: 100%;
    }

    .prof-panel-wrap {
        flex-direction: column;
    }

    .prof-panel {
        max-height: 220px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-row .filter-item select,
    .filter-row .filter-item input {
        min-width: unset;
        width: 100%;
    }

    .school-row {
        flex-direction: column;
    }
}
