﻿/**
 * 璺ㄩ儴闂ㄥ伐浣滆亴璐ｈ褰曠郴缁?- 涓绘牱寮忔枃浠? * 
 * 璁捐椋庢牸锛欰nt Design 椋庢牸
 * 涓昏壊璋冿細#1890ff锛堣摑鑹诧級
 * 
 * 浣滆€咃細EasyClaw
 * 鏃ユ湡锛?026-05-16
 */

/* ==================== 鍩虹閲嶇疆 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #333;
    background: #f0f2f5;
    line-height: 1.5;
}

a {
    color: #1890ff;
    text-decoration: none;
}

a:hover {
    color: #40a9ff;
}

/* ==================== 甯冨眬瀹瑰櫒 ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ==================== 椤甸潰澶撮儴 ==================== */
.header {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    padding: 30px 0;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header h1 {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
}

.header p {
    text-align: center;
    font-size: 14px;
    opacity: 0.85;
    margin-top: 8px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.header-time {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
}

header.header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 40px;
}

/* ==================== 缁熻鍗＄墖 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.tab-pane .stats-grid {
    gap: 10px;
    margin-bottom: 12px;
}

.tab-pane .stats-grid .stat-card {
    padding: 8px 14px;
}

.tab-pane .stats-grid .stat-card .stat-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

.tab-pane .stats-grid .stat-card .stat-value {
    font-size: 22px;
}

.tab-pane .stats-grid .stat-card .stat-label {
    font-size: 12px;
    margin-top: 2px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: default;
}

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

.stat-card .number,
.stat-card .stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #1890ff;
    line-height: 1.2;
}

.stat-card .label,
.stat-card .stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.stat-card .stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-card .stat-info {
    text-align: center;
}

.stat-card.success .number,
.stat-card.success .stat-value {
    color: #52c41a;
}

.stat-card.warning .number,
.stat-card.warning .stat-value {
    color: #fa8c16;
}

.stat-card.error .number,
.stat-card.error .stat-value {
    color: #ff4d4f;
}

/* ==================== 鏍囩椤靛鑸?==================== */
.tabs {
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;
}

.tab-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    font-family: inherit;
}

.tab-btn:hover {
    color: #1890ff;
    background: #e6f7ff;
}

.tab-btn.active {
    color: #1890ff;
    font-weight: 600;
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #1890ff;
}

.tab-content {
    padding: 24px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ==================== 宸ュ叿鏍?==================== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==================== 鎸夐挳鏍峰紡 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn:hover {
    color: #1890ff;
    border-color: #1890ff;
}

.btn-primary {
    background: #1890ff;
    border-color: #1890ff;
    color: white;
}

.btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
    color: white;
}

.btn-success {
    background: #52c41a;
    border-color: #52c41a;
    color: white;
}

.btn-success:hover {
    background: #73d13d;
    border-color: #73d13d;
    color: white;
}

.btn-danger {
    color: #ff4d4f;
    border-color: #ff4d4f;
}

.btn-danger:hover {
    color: #fff;
    background: #ff4d4f;
    border-color: #ff4d4f;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-icon {
    padding: 4px 8px;
}

/* ==================== 琛ㄦ牸鏍峰紡 ==================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
}

thead th {
    background: #fafafa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

tbody tr:hover {
    background: #e6f7ff;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ==================== 鐘舵€佹爣绛?==================== */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.status-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-tag.active {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.status-tag.completed {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-tag.paused {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.status-tag.cancelled {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.status-tag.pending {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.status-tag.confirmed {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

/* ==================== 寮圭獥鏍峰紡 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    animation: modalIn 0.3s ease;
}

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

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

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

.modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
}

/* ==================== 琛ㄥ崟鏍峰紡 ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-label.required::after {
    content: ' *';
    color: #ff4d4f;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

/* ==================== 闄勪欢涓婁紶 ==================== */
.upload-area {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #1890ff;
    background: #e6f7ff;
}

.upload-area .icon {
    font-size: 48px;
    color: #999;
    margin-bottom: 12px;
}

.upload-area .text {
    color: #666;
    font-size: 14px;
}

.upload-area .hint {
    color: #999;
    font-size: 12px;
    margin-top: 8px;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .file-icon {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    font-size: 24px;
    cursor: pointer;
    text-decoration: none;
}

.preview-item .file-icon:hover {
    background: #e8e8e8;
}

.preview-item .file-name {
    font-size: 10px;
    color: #666;
    margin-top: 4px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
}

.preview-item .delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-item:hover .delete-btn {
    opacity: 1;
}

/* ==================== 绛涢€夊櫒 ==================== */
.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    font-family: inherit;
}

.filter-select:focus {
    outline: none;
    border-color: #1890ff;
}

/* ==================== Lightbox 鍥剧墖棰勮 ==================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== 纭寮圭獥 ==================== */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1500;
    display: none;
    justify-content: center;
    align-items: center;
}

.confirm-dialog.show {
    display: flex;
}

.confirm-dialog .dialog {
    background: white;
    border-radius: 8px;
    padding: 24px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.confirm-dialog .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.confirm-dialog .message {
    font-size: 16px;
    color: #333;
    margin-bottom: 24px;
}

.confirm-dialog .actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ==================== 鎻愮ず娑堟伅 ==================== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #3b82f6;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.attachment-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 6px;
    background: #f0f9ff;
    color: #0369a1;
    border-radius: 8px;
    font-size: 11px;
    cursor: default;
}

.no-attachment {
    color: #999;
    font-style: italic;
}

.attachment-file {
    display: inline-block;
    padding: 8px 12px;
    margin: 4px;
    background: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.attachment-file:hover {
    background: #e8e8e8;
}

.attachments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-item {
    width: 80px;
    height: 80px;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
}

.attachment-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 12px 24px;
    border-radius: 4px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastIn 0.3s ease;
    min-width: 300px;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid #52c41a;
}

.toast.error {
    border-left: 4px solid #ff4d4f;
}

.toast.warning {
    border-left: 4px solid #fa8c16;
}

.toast.info {
    border-left: 4px solid #1890ff;
}

.toast .icon {
    font-size: 20px;
}

.toast .content {
    flex: 1;
}

.toast .close {
    cursor: pointer;
    color: #999;
    font-size: 18px;
}

/* ==================== 鏂板鏍峰紡锛堝吋瀹规柊HTML缁撴瀯锛?=================== */

/* 纭瀵硅瘽妗?*/
.confirm-body {
    text-align: center;
    padding: 20px;
}

.confirm-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

#confirmDialog .confirm-body p {
    font-size: 16px;
    color: #333;
}

/* 瀵煎叆鍖哄煙 */
.import-area {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.import-area:hover {
    border-color: #1890ff;
    background: #f0f8ff;
}

.import-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.import-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* 鎸夐挳鍙樹綋 */
.btn-secondary {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #333;
}

.btn-secondary:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d9d9d9;
    color: #333;
}

.btn-outline:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* 灏忓脊绐?*/
.modal-sm {
    max-width: 400px;
}

/* ==================== 鍔犺浇鐘舵€?==================== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==================== 绌虹姸鎬?==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

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

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

/* ==================== 璇︽儏灞曠ず ==================== */
.detail-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px 16px;
}

.detail-label {
    color: #666;
    font-weight: 500;
}

.detail-value {
    color: #333;
}

.detail-value a {
    color: #1890ff;
}

/* ==================== 鍝嶅簲寮?==================== */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .header {
        padding: 20px 0;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-card .number {
        font-size: 28px;
    }
    
    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .toolbar {
        flex-direction: column;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }
    
    .modal {
        margin: 10px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-label {
        margin-bottom: -8px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
    }
}

/* ==================== 閾炬帴鏍峰紡 ==================== */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.links-list a {
    color: #1890ff;
    word-break: break-all;
}

.links-list a:hover {
    text-decoration: underline;
}

/* ==================== 闄勪欢缃戞牸 ==================== */
.attachments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.attachment-item {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attachment-item:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.attachment-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-item .file-preview {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    font-size: 24px;
}

.attachment-item .file-preview .name {
    font-size: 10px;
    color: #666;
    margin-top: 4px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
    width: 100%;
}

