:root {
    /* 主色调 */
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #7c8ff0;
    --secondary-color: #764ba2;
    
    /* 状态颜色 */
    --status-pending: #ffa502;
    --status-processing: #3742fa;
    --status-completed: #2ed573;
    --status-rejected: #ff4757;
    
    /* 中性色 */
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    --border-color: #e0e0e0;
    --background: #f5f7fa;
    --white: #ffffff;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* 间距 */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
}

.admin-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    width: 260px;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 22px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-left: 4px solid var(--white);
}

.nav-item .icon {
    font-size: 20px;
}

.nav-item .badge {
    margin-left: auto;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.api-info h3 {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.api-url {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    margin-bottom: 10px;
    word-break: break-all;
}

.btn-copy {
    width: 100%;
    padding: var(--spacing-xs);
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    background-color: var(--white);
    padding: 25px var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-group input[type="text"],
.filter-group input[type="date"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    min-width: 180px;
    transition: all 0.3s ease;
}

.filter-group input[type="text"]:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e8ebef;
}

.btn-danger {
    background-color: var(--status-rejected);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #ee5a6f;
}

.btn-success {
    background-color: var(--status-completed);
    color: var(--white);
}

.btn-success:hover {
    background-color: #26de81;
}

.btn-warning {
    background-color: var(--status-pending);
    color: var(--white);
}

.btn-warning:hover {
    background-color: #ff7f00;
}

/* 表单列表 */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #999;
}

.form-card-id {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.form-card-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-processing {
    background-color: #cce5ff;
    color: #004085;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}


/* 分页 */
.pagination {
    padding: var(--spacing-lg) var(--spacing-xl);
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.pagination-info {
    margin-right: 20px;
    font-size: 14px;
    color: #666;
}

.pagination button {
    padding: var(--spacing-xs) var(--spacing-md);
    border: 1px solid var(--border-color);
    background-color: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination button.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* 详情查看样式 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span,
.detail-item p {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* SVG图标样式 */
.icon-svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn .icon-svg {
    width: 16px;
    height: 16px;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    padding: var(--spacing-lg);
}

.login-box {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo svg {
    width: 40px;
    height: 40px;
    fill: var(--white);
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .input-group {
    position: relative;
}

.login-form .input-icon {
    position: absolute;
    left: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--text-light);
}

.login-form input {
    padding-left: 45px;
}

.login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 14px;
    color: var(--text-secondary);
}

.remember-me input[type="checkbox"] {
    width: auto;
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: var(--spacing-sm);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background-color: #fee;
    border: 1px solid var(--status-rejected);
    color: var(--status-rejected);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-lg);
    display: none;
    font-size: 14px;
}

.error-message.show {
    display: block;
}

.logout-btn {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state-text {
    font-size: 18px;
    color: #999;
    text-align: center;
    padding: 40px 20px;
}

/* 列表视图样式 */
.list-container {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
}

.list-item {
    background-color: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.list-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.list-item-main {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.list-item-id {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    min-width: 40px;
}

.list-item-field {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.field-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.field-value {
    color: var(--text-primary);
    font-weight: 500;
}

.list-item-description {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 200px;
    font-size: 14px;
}

.list-item-description .field-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.list-item-status {
    margin-left: auto;
}

.list-item-time {
    color: var(--text-light);
    font-size: 13px;
    white-space: nowrap;
}

.list-item-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.btn-icon .icon-svg {
    width: 18px;
    height: 18px;
}

.btn-icon-view {
    color: var(--text-secondary);
}

.btn-icon-view:hover {
    background-color: #e3f2fd;
    color: var(--status-processing);
}

.btn-icon-edit {
    color: var(--primary-color);
}

.btn-icon-edit:hover {
    background-color: #f3e5f5;
    color: var(--secondary-color);
}

.btn-icon-copy {
    color: var(--status-completed);
}

.btn-icon-copy:hover {
    background-color: #e8f5e9;
    color: #1b5e20;
}

.btn-icon-delete {
    color: var(--status-rejected);
}

.btn-icon-delete:hover {
    background-color: #ffebee;
    color: #b71c1c;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .form-info {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 100;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .form-card-footer {
        flex-wrap: wrap;
    }

    .btn-sm {
        flex: 1;
        min-width: 100px;
    }
}

