QALoop / qa_annotate /static /css /manager.css
jackkuo's picture
Add Hugging Face Space deployment
35e7795
Raw
History Blame Contribute Delete
18.9 kB
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: #f5f5f5;
height: 100vh;
overflow: hidden;
}
.hidden {
display: none !important;
}
.app-container {
display: flex;
height: 100vh;
}
/* 侧边栏 */
.sidebar {
width: 250px;
background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
color: white;
display: flex;
flex-direction: column;
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}
.sidebar-header {
padding: 24px 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.sidebar-header h1 {
font-size: 20px;
font-weight: 600;
}
.sidebar-nav {
flex: 1;
padding: 20px 0;
overflow-y: auto;
display: flex;
flex-direction: column;
}
.nav-group {
display: flex;
flex-direction: column;
}
.nav-divider {
height: 1px;
background: rgba(255, 255, 255, 0.2);
margin: 12px 20px;
flex-shrink: 0;
}
.nav-item {
width: 100%;
padding: 16px 20px;
background: transparent;
border: none;
color: rgba(255, 255, 255, 0.8);
text-align: left;
cursor: pointer;
display: flex;
align-items: center;
gap: 12px;
transition: all 0.3s ease;
font-size: 15px;
}
.nav-item-link {
opacity: 0.9;
}
.nav-item-link:hover {
opacity: 1;
}
.nav-item:hover {
background: rgba(255, 255, 255, 0.1);
color: white;
}
.nav-item.active {
background: rgba(255, 255, 255, 0.2);
color: white;
font-weight: 600;
}
.nav-icon {
font-size: 20px;
width: 24px;
text-align: center;
}
.sidebar-footer {
padding: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.2);
display: flex;
flex-direction: column;
gap: 12px;
}
.btn-language-switch {
width: 100%;
padding: 10px;
background: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.25);
border-radius: 8px;
color: white;
font-size: 13px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.btn-language-switch:hover {
background: rgba(255, 255, 255, 0.25);
}
.btn-logout {
width: 100%;
padding: 12px;
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 8px;
color: white;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-logout:hover {
background: rgba(255, 255, 255, 0.3);
}
/* 主内容区 */
.main-content {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background: #f5f5f5;
}
.content-section {
display: none;
flex: 1;
flex-direction: column;
overflow: hidden;
padding: 24px;
}
.content-section.active {
display: flex;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.section-header h2 {
font-size: 24px;
font-weight: 600;
color: #333;
}
.header-actions {
display: flex;
gap: 12px;
}
.section-content-wrapper {
flex: 1;
display: flex;
flex-direction: column;
background: white;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
min-height: 0;
}
.section-content {
flex: 1;
overflow-y: auto;
padding: 24px;
display: flex;
flex-direction: column;
min-height: 0;
}
/* 标签页 */
.tabs {
display: flex;
gap: 8px;
margin: 0;
border-bottom: 2px solid #e0e0e0;
background: white;
padding: 0 24px;
flex-shrink: 0;
position: sticky;
top: 0;
z-index: 10;
border-radius: 8px 8px 0 0;
}
.tab-btn {
padding: 12px 24px;
background: transparent;
border: none;
border-bottom: 2px solid transparent;
color: #666;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
margin-bottom: -2px;
}
.tab-btn:hover {
color: #667eea;
}
.tab-btn.active {
color: #667eea;
border-bottom-color: #667eea;
font-weight: 600;
}
.tab-content {
display: none;
flex: 1;
min-height: 0;
overflow: visible;
}
.tab-content.active {
display: flex;
flex-direction: column;
}
/* 项目列表容器 */
#projects-list {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
}
/* 项目详情页容器 */
#project-detail-container {
display: none;
flex-direction: column;
flex: 1;
min-height: 0;
overflow-y: auto;
}
/* 过滤栏 */
.filter-bar {
display: flex;
gap: 12px;
margin-bottom: 20px;
align-items: center;
}
.form-control {
padding: 10px 14px;
border: 2px solid #e0e0e0;
border-radius: 6px;
font-size: 14px;
transition: all 0.3s ease;
min-width: 200px;
}
.form-control:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
/* 表格容器 - 统一样式 */
.table-container {
overflow-x: auto;
overflow-y: auto;
position: relative;
flex: 1;
min-height: 0;
max-height: calc(100vh - 200px);
}
/* 表格基础样式 */
.data-table {
width: 100%;
border-collapse: collapse;
}
.data-table thead {
background: #f8f9fa;
position: sticky;
top: 0;
z-index: 5;
}
.data-table th {
padding: 12px;
text-align: left;
font-weight: 600;
font-size: 13px;
color: #666;
text-transform: uppercase;
letter-spacing: 0.5px;
border-bottom: 2px solid #e0e0e0;
background: #f8f9fa;
position: sticky;
top: 0;
z-index: 5;
box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}
.data-table td {
padding: 14px 12px;
border-bottom: 1px solid #e0e0e0;
font-size: 14px;
color: #333;
}
.data-table tbody tr:hover {
background: #f8f9fa;
}
.data-table td.loading {
text-align: center;
color: #999;
padding: 40px;
font-style: italic;
}
/* 按钮 */
.btn {
padding: 10px 20px;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 6px;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #5a6268;
}
.btn-success {
background: #28a745;
color: white;
}
.btn-success:hover {
background: #218838;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}
.btn-info {
background: #17a2b8;
color: white;
}
.btn-info:hover {
background: #138496;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}
.btn-warning {
background: #ffc107;
color: #212529;
}
.btn-warning:hover {
background: #e0a800;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}
.btn-danger {
background: #dc3545;
color: white;
}
.btn-danger:hover {
background: #c82333;
}
.btn-sm {
padding: 6px 12px;
font-size: 12px;
}
.btn-compact {
padding: 8px 12px;
font-size: 13px;
}
.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
/* 状态标签 */
.status-badge {
display: inline-block;
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
}
.status-badge.active {
background: #d4edda;
color: #155724;
}
.status-badge.inactive {
background: #f8d7da;
color: #721c24;
}
.status-badge.superuser {
background: #d1ecf1;
color: #0c5460;
}
.status-badge.user {
background: #e2e3e5;
color: #383d41;
}
/* 模态框 */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
align-items: center;
justify-content: center;
}
.modal.active {
display: flex;
}
.modal-content {
background: white;
border-radius: 12px;
width: 90%;
max-width: 600px;
max-height: 90vh;
display: flex;
flex-direction: column;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
animation: modalSlideUp 0.3s ease-out;
}
@keyframes modalSlideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.modal-header {
padding: 20px 24px;
border-bottom: 1px solid #e0e0e0;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
font-size: 20px;
font-weight: 600;
color: #333;
}
.modal-close {
background: none;
border: none;
font-size: 28px;
color: #999;
cursor: pointer;
line-height: 1;
padding: 0;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: all 0.3s ease;
}
.modal-close:hover {
background: #f0f0f0;
color: #333;
}
.modal-body {
padding: 24px;
overflow-y: auto;
flex: 1;
}
.modal-footer {
padding: 20px 24px;
border-top: 1px solid #e0e0e0;
display: flex;
justify-content: flex-end;
gap: 12px;
}
/* 表单 */
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
color: #333;
font-weight: 500;
font-size: 14px;
}
.form-group input,
.form-group textarea,
.form-group select {
width: 100%;
padding: 10px 14px;
border: 2px solid #e0e0e0;
border-radius: 6px;
font-size: 14px;
transition: all 0.3s ease;
font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.form-group textarea {
resize: vertical;
min-height: 100px;
}
.form-group .form-check {
display: flex;
align-items: center;
gap: 8px;
}
.form-group .form-check input[type="checkbox"] {
width: auto;
}
/* 响应式设计 */
@media (max-width: 768px) {
.sidebar {
width: 200px;
}
.section-header {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.header-actions {
width: 100%;
}
.modal-content {
width: 95%;
max-height: 95vh;
}
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
/* 分页容器 */
.pagination-container {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 16px;
padding: 12px 0;
border-top: 1px solid #e0e0e0;
flex-shrink: 0;
}
.pagination-info {
color: #666;
font-size: 14px;
}
.pagination-controls {
display: flex;
gap: 8px;
align-items: center;
}
/* 项目详情页样式 - 紧凑版 */
.project-detail-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 8px;
padding: 12px 16px;
margin-bottom: 12px;
box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
}
.project-detail-header-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.project-detail-title-section {
display: flex;
flex-direction: column;
gap: 4px;
}
.project-detail-actions {
display: flex;
align-items: center;
gap: 8px;
}
.project-detail-title {
font-size: 16px;
font-weight: 600;
color: white;
margin: 0;
}
.project-detail-name {
font-size: 13px;
color: rgba(255, 255, 255, 0.9);
font-weight: 400;
}
.project-detail-header .btn-secondary {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
backdrop-filter: blur(10px);
padding: 6px 12px;
font-size: 12px;
}
.project-detail-header .btn-secondary:hover {
background: rgba(255, 255, 255, 0.3);
border-color: rgba(255, 255, 255, 0.4);
}
.project-info-container {
display: grid;
grid-template-columns: 1fr auto;
gap: 12px;
margin-bottom: 12px;
}
.project-info-card {
background: white;
border-radius: 8px;
padding: 12px 16px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
border: 1px solid #f0f0f0;
}
.project-info-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px 16px;
}
.project-info-item.project-info-description {
grid-column: 1 / -1;
margin-top: 4px;
}
.project-info-item {
display: flex;
flex-direction: column;
gap: 3px;
}
.project-info-label {
font-size: 11px;
color: #999;
text-transform: uppercase;
letter-spacing: 0.3px;
font-weight: 500;
}
.project-info-value {
font-size: 13px;
color: #333;
font-weight: 500;
}
.project-description {
color: #666;
line-height: 1.5;
font-size: 12px;
padding: 6px 8px;
background: #f8f9fa;
border-radius: 4px;
border-left: 2px solid #667eea;
margin-top: 4px;
max-height: 60px;
overflow-y: auto;
}
.project-stats-card {
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
border-radius: 8px;
padding: 12px 16px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
border: 1px solid #f0f0f0;
display: flex;
flex-direction: column;
gap: 10px;
min-width: 140px;
}
.project-stat-item {
display: flex;
align-items: center;
gap: 10px;
}
.project-stat-icon {
font-size: 20px;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 8px;
box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
flex-shrink: 0;
}
.project-stat-content {
display: flex;
flex-direction: column;
gap: 2px;
}
.project-stat-value {
font-size: 18px;
font-weight: 700;
color: #333;
line-height: 1;
}
.project-stat-label {
font-size: 11px;
color: #666;
font-weight: 500;
}
/* 响应式优化 */
@media (max-width: 768px) {
.project-detail-header-content {
flex-direction: column;
align-items: flex-start;
gap: 8px;
}
.project-detail-header .btn-secondary {
width: 100%;
justify-content: center;
}
.project-detail-header-content {
flex-direction: column;
gap: 12px;
}
.project-info-container {
grid-template-columns: 1fr;
}
.project-info-grid {
grid-template-columns: repeat(2, 1fr);
}
.project-stats-card {
flex-direction: row;
justify-content: space-around;
}
}
/* 项目卡片样式 */
.projects-card-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 20px;
padding: 0;
}
.project-card {
background: white;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
display: flex;
flex-direction: column;
overflow: hidden;
border: 1px solid #e0e0e0;
}
.project-card:hover {
transform: translateY(-4px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.project-card-header {
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
}
.project-card-title-section {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 4px;
overflow: hidden;
}
.project-card-title {
font-size: 18px;
font-weight: 600;
margin: 0;
color: white;
line-height: 1.3;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.project-card-id {
font-size: 12px;
color: rgba(255, 255, 255, 0.8);
font-weight: 400;
}
.project-card-header .status-badge {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
backdrop-filter: blur(10px);
padding: 4px 12px;
font-size: 12px;
flex-shrink: 0;
white-space: nowrap;
}
.project-card-body {
padding: 20px;
flex: 1;
display: flex;
flex-direction: column;
gap: 16px;
}
.project-card-description {
color: #666;
font-size: 14px;
line-height: 1.6;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
min-height: 4.8em;
}
.project-card-meta {
display: flex;
flex-direction: column;
gap: 8px;
padding-top: 12px;
border-top: 1px solid #f0f0f0;
}
.project-card-meta-item {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 13px;
}
.project-card-meta-label {
color: #999;
font-weight: 500;
}
.project-card-meta-value {
color: #333;
font-weight: 500;
}
.project-card-stats {
display: flex;
gap: 16px;
padding-top: 12px;
border-top: 1px solid #f0f0f0;
}
.project-card-stat-item {
display: flex;
align-items: center;
gap: 10px;
flex: 1;
}
.project-card-stat-icon {
font-size: 24px;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 8px;
box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
flex-shrink: 0;
}
.project-card-stat-content {
display: flex;
flex-direction: column;
gap: 2px;
}
.project-card-stat-value {
font-size: 20px;
font-weight: 700;
color: #333;
line-height: 1;
}
.project-card-stat-label {
font-size: 12px;
color: #666;
font-weight: 500;
}
.project-card-footer {
padding: 16px 20px;
background: #f8f9fa;
border-top: 1px solid #e0e0e0;
display: flex;
gap: 8px;
justify-content: flex-end;
}
.project-card-footer .btn {
flex-shrink: 0;
}
/* 响应式设计 */
@media (max-width: 768px) {
.projects-card-container {
grid-template-columns: 1fr;
}
.project-card-footer {
flex-direction: column;
}
.project-card-footer .btn {
width: 100%;
}
}
/* 项目懒加载指示器 */
.projects-loader {
grid-column: 1 / -1;
padding: 20px;
text-align: center;
}