/* ===== COS 文件同步系统 - 自定义样式 ===== */

:root {
    --cos-primary: #2563eb;
    --cos-primary-dark: #1e40af;
    --cos-sidebar-width: 240px;
}

body {
    background-color: #f1f5f9;
}

/* 侧边栏 */
.sidebar {
    width: var(--cos-sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s;
}

.sidebar .brand {
    padding: 20px 24px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .brand i {
    color: var(--cos-primary);
    margin-right: 8px;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(37, 99, 235, 0.15);
    border-left-color: var(--cos-primary);
}

.sidebar .nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    margin-left: var(--cos-sidebar-width);
    padding: 24px;
}

/* 顶部栏 */
.topbar {
    background: #fff;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.topbar h4 {
    margin: 0;
    font-weight: 600;
}

/* 统计卡片 */
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-card .stat-info .stat-value {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.stat-card .stat-info .stat-label,
.stat-card .stat-info p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

/* 数据卡片 */
.data-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

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

.data-card .card-header h6 {
    margin: 0;
    font-weight: 600;
}

.data-card .card-body {
    padding: 24px;
}

/* 进度条 */
.sync-progress {
    height: 24px;
    border-radius: 12px;
    background: #e2e8f0;
    overflow: hidden;
    position: relative;
}

.sync-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* 状态徽章 */
.badge-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending    { background: #f1f5f9; color: #64748b; }
.badge-scanning   { background: #dbeafe; color: #2563eb; }
.badge-syncing    { background: #dbeafe; color: #2563eb; }
.badge-completed  { background: #dcfce7; color: #16a34a; }
.badge-partial_failed { background: #fef3c7; color: #d97706; }
.badge-failed     { background: #fee2e2; color: #dc2626; }
.badge-active     { background: #dcfce7; color: #16a34a; }
.badge-disabled   { background: #f1f5f9; color: #94a3b8; }

/* 目录浏览器 */
.dir-browser {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.dir-browser .dir-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.dir-browser .dir-item:hover {
    background: #f1f5f9;
}

.dir-browser .dir-item.selected {
    background: #dbeafe;
    color: #2563eb;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* 登录页 */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}

.login-card {
    width: 400px;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-card h3 {
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-card .subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 32px;
    font-size: 14px;
}

/* 表格 */
.table th {
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* 按钮 */
.btn-primary {
    background: var(--cos-primary);
    border-color: var(--cos-primary);
}

.btn-primary:hover {
    background: var(--cos-primary-dark);
    border-color: var(--cos-primary-dark);
}

/* 步骤指示器 */
.steps {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
}

.steps .step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 12px;
    color: #94a3b8;
    font-size: 14px;
    border-bottom: 3px solid #e2e8f0;
}

.steps .step.active {
    color: var(--cos-primary);
    border-bottom-color: var(--cos-primary);
    font-weight: 600;
}

.steps .step.done {
    color: #16a34a;
    border-bottom-color: #16a34a;
}

.steps .step i {
    margin-right: 6px;
}

.steps .step-num {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    margin-right: 6px;
}

.steps .step.active .step-num {
    background: var(--cos-primary);
    color: #fff;
}

.steps .step.done .step-num {
    background: #16a34a;
    color: #fff;
}

/* 存储桶选择卡片 */
.bucket-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    height: 100%;
}

.bucket-card:hover {
    border-color: var(--cos-primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.bucket-card.selected {
    border-color: var(--cos-primary);
    background: rgba(37, 99, 235, 0.03);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.15);
}

.stat-card .stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
}
