/* ============================================
   Admin CSS - 管理后台统一样式表
   整合admin目录下所有PHP文件中的CSS样式
   ============================================ */

/* ============ 基础样式 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* ============ 头部样式 ============ */
.admin-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h1 {
    color: #667eea;
    font-size: 24px;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-user-info span {
    color: #666;
}

.admin-user-info .role-badge {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.admin-user-info a {
    color: #667eea;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #667eea;
    border-radius: 6px;
    transition: all 0.3s;
}

.admin-user-info a:hover {
    background: #667eea;
    color: white;
}

/* ============ 侧边栏样式 ============ */
.admin-sidebar {
    width: fit-content;
    min-width: 180px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 70px;
    align-self: flex-start;
    height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-sidebar > ul > li {
    border-bottom: 1px solid #f0f0f0;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.admin-sidebar a:hover {
    background: #f0f4ff;
    color: #667eea;
}

.admin-sidebar a.active {
    background: #f0f4ff;
    color: #667eea;
    border-left: 3px solid #667eea;
    font-weight: 600;
}

.admin-sidebar .menu-item {
    position: relative;
}

.admin-sidebar .menu-item.has-children > a {
    cursor: pointer;
}

.admin-sidebar .menu-item.has-children > a::after {
    content: '▼';
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.3s;
}

.admin-sidebar .menu-item.has-children.expanded > a::after {
    transform: rotate(180deg);
}

.admin-sidebar .submenu {
    display: none;
    background: #f8f9fa;
    padding: 0;
}

.admin-sidebar .menu-item.expanded > .submenu {
    display: block;
}

.admin-sidebar .submenu li {
    border-bottom: none;
}

.admin-sidebar .submenu a {
    padding: 12px 30px 12px 50px;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.admin-sidebar .submenu a.active {
    background: #e8edff;
    color: #667eea;
    border-left-color: #667eea;
}

.admin-sidebar .menu-icon {
    margin-right: 10px;
    font-size: 18px;
}

/* ============ 容器样式 ============ */
.admin-container {
    display: flex;
    height: calc(100vh - 70px);
    width: 100%;
    overflow: hidden;
}

.admin-content {
    flex: 1;
    padding: 15px;
    width: 100%;
    /*max-width: 1920px;*/
    margin: 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f1f5f9;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.admin-content::-webkit-scrollbar {
    width: 10px;
}

.admin-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
    margin: 8px 0;
}

.admin-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e0 0%, #94a3b8 100%);
    border-radius: 5px;
    border: 2px solid #f1f5f9;
}

.admin-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* ============ 页面头部 ============ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h2::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* ============ 统计卡片 ============ */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    /*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);*/
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.12);
}

.stat-card-title {
    font-size: 14px;
    padding: 10px 0px;
    color: #ffffff;
}

.stat-card-value {
    font-size: 24px;
    padding: 5px 0px;
    font-weight: 700;
    color: #ffffff;
}

/* ============ 搜索区域 ============ */



.search-section {
    background: white;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    /*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);*/
    border: 1px solid #e2e8f0;
    width: 100%;
}


.search-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.search-row {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 33px;
    margin-bottom: 0px;
    justify-content: center;
    align-items: center;
}

.search-item {
    /*display: flex;*/
    /*width: fit-content;*/
    min-width: 200px;
    max-width: 300px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.search-item label {
    /*display: flex;*/
    width: 100%;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    text-align: center;
}

.search-item input,
.search-item select {
    width: 100%;
    padding: 0px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    min-height: 40px;
    /*min-width: 40px;*/
    transition: all 0.2s ease;
    background: #f7fafc;
}

.search-item input:focus,
.search-item select:focus {
    outline: none;
    border-color: #667eea;
    width: 100%;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-actions {
    display: flex;
    width: 100%;
    gap: 10px;
    /*margin-top: 8px;*/
    text-align: center;
    justify-content: center;
    align-items: center;
}

/*搜索按钮*/
.search-btn {
    padding: 5px 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    height: fit-content;
    min-height: 40px;
    min-width: 60px;
    font-size: 12px;
    font-weight: 500;
    /*display: flex;*/
    align-items: center;
    /*gap: 8px;*/
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}


/*重置按钮*/
.reset-btn {
    padding: 5px 5px;
    background: white;
    color: #4a5568;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    height: fit-content;
    min-height: 40px;
    min-width: 60px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}


/*重置按钮*/
.crawling-btn {
    padding: 5px 5px;
    background: #ff4d4d;
    color: #ffffff;
    border: 1.5px solid #ba004f;
    border-radius: 8px;
    cursor: pointer;
    height: fit-content;
    min-height: 40px;
    min-width: 60px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.crawling-btn:hover {
    border-color: #5c0020;
    background: #930022;
}

/*导出按钮*/
.export-btn {
    padding: 5px 5px;
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #1a202c;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    height: fit-content;
    min-height: 40px;
    min-width: 60px;
    font-size: 12px;
    font-weight: 500;
    /*display: flex;*/
    align-items: center;
    /*gap: 8px;*/
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(82, 196, 26, 0.4);
}

/* ============ 操作按钮区域 ============ */
.action-buttons-section {
    background: white;
    padding: 15px 25px;
    margin-top: 5px;
    border-radius: 12px 12px 0px 0px;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.action-btn {
    padding: 10px 10px;
    width: fit-content;
    min-width: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    margin-right: 0px;
    margin-left: 0px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.action-btn.primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.action-btn.primary:hover {
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 4px rgba(245, 87, 108, 0.3);
}

.action-btn.secondary:hover {
    box-shadow: 0 4px 8px rgba(245, 87, 108, 0.4);
}

/* ============ 表格样式 ============ */
.table-container {
    background: white;
    border-radius: 12px 12px 0px 0px;
    /*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);*/

    width: 100%;
    /*height: 100%;*/

    position: relative;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 12px 12px 0px 0px;
    border: 1px solid #e2e8f0;
    height: fit-content;
    min-height: 200px;
    max-height: none;
    width: 100%;
}

table {
    width: 100%;
    max-width: 1920px;
    height: 100%;
    border-collapse: collapse;
}

thead {
    width: 100%;
    max-width: 1920px;
}

tbody {
    width: 100%;
    max-width: 1920px;
}

th, td {
    padding: 12px 8px;
    text-align: center;
    font-size: 13px;
    max-width: 1920px;
    min-width: 50px;
    vertical-align: middle;
    box-sizing: border-box;
}

th {
    border-left: 1px solid #365adc;
    background: linear-gradient(15deg, #667eea 0%, #8760e8 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* 操作列的表头左对齐 */
th.user-row-100_800 {
    justify-content: flex-start;
    width: auto !important;
    padding-left: 12px;
}

/*th:nth-child(13) {*/
/*    width: 100%;*/
/*}*/

thead tr {
    display: flex;
    height: fit-content;
    width: 100%;
    align-items: stretch;
}

tbody tr {
    display: flex;
    min-height: 80px;
    height: 80px;
    justify-content: flex-start;
    align-items: stretch;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    width: 100%;
}

tbody tr:hover {
    background: #f8fafc;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

tbody tr:last-child {
    border-bottom: none;
    width: 100%;
}

td {
    color: #2d3748;
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.5;
    overflow-wrap: break-word;
    flex-shrink: 0;
    box-sizing: border-box;
}

td:first-child {
    width: fit-content;
}

/*td:nth-child(13) {*/
/*    width: 100%;*/
/*}*/

td:last-child {
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
}

.action-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100%;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 8px;
    margin: 0;
    overflow: hidden;
}

/* ============ 按钮样式 ============ */
.btn-small {
    padding: 0px 6px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    color: white;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: fit-content;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #193ada 0%, #5a08a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}


.btn-success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #1a202c;
}

.btn-purple {
    background: linear-gradient(135deg, #D37CDE 0%, #9B59B6 100%);
    color: white;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #C063CE 0%, #8E44AD 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(211, 124, 222, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
    color: #1a202c;
}

.btn-canceled {
    background: linear-gradient(135deg, #788ba1 0%, #657795 100%);
    color: #ffffff;
}

.btn-canceled:hover  {
    background: linear-gradient(135deg, #707b9a 0%, #435371 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #1a202c;
}

.btn-info {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}


.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

/* ============ 分页样式 ============ */
.pagination-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0px;
    padding: 20px 24px;
    background: #e8e8e8;
    border-radius: 0px 0px 12px 12px;
    /*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);*/
    border-top: 0px solid #bdc9db;
    border-right: 1px solid #bdc9db;
    border-left: 1px solid #bdc9db;
    border-bottom: 1px solid rgba(0, 9, 43, 0.16);
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    color: #4a5568;
    border-radius: 0px 0px 12px 12px;
    font-size: 14px;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-controls a,
.pagination-controls span {
    padding: 8px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-controls a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
}

.pagination-controls .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.pagination-controls input[type="number"] {
    width: 70px;
    padding: 8px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.pagination-controls input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pagination-controls .goto-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-controls .goto-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.limit-select {
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.limit-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============ 模态框样式 ============ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-content h3 {
    margin: 0;
    color: #1a202c;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #64748b;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* ============ 表单样式 ============ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #f7fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[readonly] {
    background: #edf2f7;
    cursor: not-allowed;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* ============ 消息提示样式 ============ */
.message {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #065f46;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    border-left: 4px solid #10b981;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.error {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    border-left: 4px solid #ef4444;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============ 状态徽章 ============ */
.status-badge {
    padding: 4px 4px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    align-items: center;
    display: flex;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

span.status-badge {
    justify-content: center;
}

.status-active {
    /*background: linear-gradient(135deg, #84fab0 100%, #8fd3f4 100%);*/
    color: #065f46;
    border: 2px solid forestgreen;
    /*border-radius: 20px;*/
    /*box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);*/
    width: fit-content;
}

.status-inactive {
    /*background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);*/
    border: 2px solid #ff6392;
    color: #7c2d12;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.2);
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    margin: 36px 0;
    color: #718096;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    font-weight: 500;
}

/* ============ 复选框 ============ */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* ============ 登录页面样式 ============ */
body.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #5568d3;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 12px;
}

/* ============ 欢迎区域 ============ */
.welcome-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

.welcome-section h2 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 700;
}

.welcome-section p {
    color: #4a5568;
    line-height: 1.8;
    font-size: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* ============ 用户行样式（统一表格列宽，确保表头和内容对齐） ============ */
/* 确保 th 和 td 使用相同的宽度规则 */

th.user-row-input50,
td.user-row-input50 {
    width: fit-content;
    min-width: 50px;
    max-width: 50px;
    padding-left: 8px;
    padding-right: 8px;
    flex-shrink: 0;
}

th.user-row-60,
td.user-row-60 {
    width: fit-content;
    min-width: 60px;
    max-width: 60px;
    flex-shrink: 0;
}

th.user-row-70,
td.user-row-70 {
    width: fit-content;
    min-width: 70px;
    max-width: 70px;
    flex-shrink: 0;
}

th.user-row-80,
td.user-row-80 {
    width: fit-content;
    flex: 1 1 auto;
    min-width: 80px;
    max-width: 80px;
    padding: 0px 3px;
    flex-shrink: 0;
}

th.user-row-84,
td.user-row-84 {
    width: fit-content;
    min-width: 84px;
    max-width: 84px;
    flex-shrink: 0;
}

th.user-row-90,
td.user-row-90 {
    width: fit-content;
    min-width: 90px;
    max-width: 90px;
    flex-shrink: 0;
}

th.user-row-100,
td.user-row-100 {
    width: fit-content;
    min-width: 100px;
    max-width: 100px;
    flex-shrink: 0;
}

th.user-row-110,
td.user-row-110 {
    width: fit-content;
    min-width: 110px;
    max-width: 110px;
    flex-shrink: 0;
}

th.user-row-120,
td.user-row-120 {
    width: fit-content;
    min-width: 120px;
    max-width: 120px;
    flex-shrink: 0;
}

th.user-row-100_200,
td.user-row-100_200 {
    width: 100% !important;
    /*flex: 1 1 auto;*/
    /*min-width: 100px;*/
    max-width: 200px;
    margin: 0 auto;
    flex-shrink: 0;
    justify-items: center;
}

th.user-row-130,
td.user-row-130 {
    width: fit-content;
    min-width: 130px;
    max-width: 130px;
    flex-shrink: 0;
}

th.user-row-160,
td.user-row-160 {
    width: fit-content;
    min-width: 160px;
    max-width: 160px;
    flex-shrink: 0;
}

th.user-row-100_800,
td.user-row-100_800 {
    width: auto !important;
    min-width: 100px;
    max-width: 1200px;
    flex: 1 1 auto;
    padding: 10px 0px;
    justify-content: center;
    align-items:center;
}

th.user-row-max,
td.user-row-max {
    width: auto !important;
    min-width: 100px;
    /*max-width: 1200px;*/
    flex: 1 1 auto;
    padding: 10px 0px;
    justify-content: center;
    align-items:center;
}


/* ============ 检测题库数据表格列宽样式（统一表格列宽，确保表头和内容对齐） ============ */
/* 确保 th 和 td 使用相同的宽度规则 */
th.test-word-row-id,
td.test-word-row-id {
    width: 60px;
    min-width: 60px;
    max-width: 80px;
    padding-left: 8px;
    padding-right: 8px;
    flex-shrink: 0;
}

th.test-word-row-english,
td.test-word-row-english {
    width: 150px;
    min-width: 120px;
    max-width: 200px;
    flex-shrink: 0;
    word-break: break-word;
}

th.test-word-row-chinese,
td.test-word-row-chinese {
    width: 200px;
    min-width: 150px;
    max-width: 300px;
    flex-shrink: 0;
    word-break: break-word;
}

th.test-word-row-phonetic,
td.test-word-row-phonetic {
    width: 120px;
    min-width: 100px;
    max-width: 150px;
    flex-shrink: 0;
}

th.test-word-row-version,
td.test-word-row-version {
    width: 120px;
    min-width: 100px;
    max-width: 150px;
    flex-shrink: 0;
}

th.test-word-row-distractors,
td.test-word-row-distractors {
    width: 240px;
    min-width: 200px;
    max-width: 300px;
    flex-shrink: 0;
    word-break: break-word;
}

th.test-word-row-english-semantic,
td.test-word-row-english-semantic {
    width: 150px;
    min-width: 120px;
    max-width: 200px;
    flex-shrink: 0;
    word-break: break-word;
}



th.test-word-row-difficulty,
td.test-word-row-difficulty {
    width: 110px;
    min-width: 100px;
    max-width: 130px;
    flex-shrink: 0;
}

th.test-word-row-vocabulary_level,
td.test-word-row-vocabulary_level {
    width: 110px;
    min-width: 100px;
    max-width: 130px;
    flex-shrink: 0;
}

th.test-word-row-level_name,
td.test-word-row-level_name {
    width: 160px;
    min-width: 140px;
    max-width: 200px;
    flex-shrink: 0;
}

th.test-word-row-frequency,
td.test-word-row-frequency {
    width: 100px;
    min-width: 80px;
    max-width: 120px;
    flex-shrink: 0;
    text-align: center;
}

th.test-word-row-operation,
td.test-word-row-operation {
    min-width: 200px;
    max-width: 400px;
    flex: 1 1 auto;
    padding-left: 12px;
    padding-right: 12px;
}

th.test-word-row-operation {
    justify-content: flex-start;
}

td.test-word-row-operation {
    justify-content: flex-start;
    align-items: center;
}

td.test-word-row-empty {
    width: 100%;
    padding: 40px;
    text-align: center;
}

/* ============ 其他页面特定样式 ============ */


th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    background: rgba(255, 255, 255, 0.2);
}

th.sortable::after {
    content: ' ↓';
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 5px;
}

.btn-calibrate {
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-calibrate:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}


.admin-word_date-library-actions {
    display: flex;
    gap: 10px;
    margin-top: 0px;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-left: 0px;
}

.admin-word_date-library-details {
    /*width: 20vw;*/
    width: 60%;
    margin-bottom: 0px;
    display: flex;
    /*justify-content: flex-start;*/
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

.admin-word_date-library-details_little {
    /*width: 20vw;*/
    width: 20%;
    margin-bottom: 0px;
    display: flex;
    /*justify-content: flex-start;*/
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

.admin-word_date-library-details_date {
    /*width: 20vw;*/
    width: 100%;
    margin-bottom: 0px;
    display: flex;
    /*justify-content: flex-start;*/
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}


.admin-word_date-title{
    display: flex;
    flex-direction: row;
    font-size: 13px;
    font-weight: normal;
    color: #737373;
    /*gap: 15px;*/
    width:100%;
    min-width: 70px;
    flex: 1 1 auto;
}


.admin-word_date-state{
    display: flex;
    flex-direction: row;
    font-size: 13px;
    font-weight: 800;
    color: #737373;
    width: fit-content;
    min-width: 80px;
    flex: 1 1 auto;
}



.admin-word_date-library-details p {
    width: 100%;
    padding-left: 0px;
    padding-right: 0px;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.admin-word_date-library-details p strong {
    width: 100%;
}


.admin-word_date-library-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 60px;
    font-size: 18px;
    font-weight: 800;
    color: #000099;
}

.admin-word_date-library-header h3 {
    margin: 0;
    flex: 1;
    width: fit-content;
}

.admin-word_date-library-card {
    display: flex;
    flex-direction :row;
    cursor: move;
    position: relative;
}
.admin-word_date-library-card.dragging {
    opacity: 0.5;
}
.admin-word_date-library-card.drag-over {
    border: 2px dashed #667eea;
}
.admin-word_date-library-card:not([draggable="true"]) .drag-handle {
    display: none;
}

.admin-word_date-library-card {
    background: white;
    padding: 10px 20px;
    border-radius: 12px;
    /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    transition: all 0.3s;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
}

.admin-word_date-library-card[draggable="true"] {
    padding-left: 50px;
}

.admin-word_date-library-card.hidden {
    display: none;
}

.admin-word_date-library-card-view-mode {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.admin-word_date-library-card-view-mode .admin-word_date-library-card {
    flex: 1;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

/* ============ 响应式设计 ============ */
@media (max-width: 768px) {
    .admin-content {
        padding: 16px;
    }
    
    .search-row {
        display: flex;
        grid-template-columns: 1fr;
        width: 100%;

    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .pagination-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-small {
        width: fit-content;
    }
    
    /* 检测题库数据表格响应式优化 */
    th.test-word-row-id,
    td.test-word-row-id {
        width: 50px;
        min-width: 50px;
        max-width: 60px;
    }
    
    th.test-word-row-english,
    td.test-word-row-english {
        min-width: 100px;
        max-width: 150px;
    }
    
    th.test-word-row-chinese,
    td.test-word-row-chinese {
        min-width: 120px;
        max-width: 200px;
    }
    
    th.test-word-row-phonetic,
    td.test-word-row-phonetic {
        min-width: 80px;
        max-width: 120px;
    }
    
    th.test-word-row-version,
    td.test-word-row-version {
        min-width: 80px;
        max-width: 120px;
    }


    th.test-word-row-distractors,
    td.test-word-row-distractors {
        min-width: 150px;
        max-width: 250px;
        flex-shrink: 0;
    }
    
    th.test-word-row-english-semantic,
    td.test-word-row-english-semantic {
        min-width: 100px;
        max-width: 150px;
        flex-shrink: 0;
    }
    
    th.test-word-row-difficulty,
    td.test-word-row-difficulty {
        min-width: 90px;
        max-width: 110px;
    }
    
    th.test-word-row-vocabulary_level,
    td.test-word-row-vocabulary_level {
        min-width: 90px;
        max-width: 110px;
    }
    
    th.test-word-row-level_name,
    td.test-word-row-level_name {
        min-width: 120px;
        max-width: 160px;
    }
    
    th.test-word-row-frequency,
    td.test-word-row-frequency {
        min-width: 70px;
        max-width: 100px;
    }
    
    th.test-word-row-operation,
    td.test-word-row-operation {
        min-width: 180px;
        max-width: 350px;
    }
}

