﻿/* 投资性黄金交易协同系统 - 分销端（门店业务端）原型样式 */

:root {
    --primary-color: #70AD47;
    --primary-dark: #538135;
    --primary-light: #E2EFDA;
    --secondary-color: #2c3e50;
    --gold-color: #c9a962;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --bg-color: #f5f6fa;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #e0e0e0;
    --sidebar-bg: #1a252f;
    --sidebar-width: 240px;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 布局 */
.layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1a252f 0%, #2c3e50 100%);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--primary-color);
}

.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.sidebar-logo h1 {
    font-size: 16px;
    color: #fff;
    font-weight: 500;
}

.sidebar-logo .subtitle {
    font-size: 12px;
    color: var(--primary-color);
    display: block;
}

/* 导航菜单 */
.nav-menu {
    padding: 15px 0;
}

.nav-section {
    padding: 10px 20px 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(112, 173, 71, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-item.active {
    background: rgba(112, 173, 71, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.nav-item .badge {
    float: right;
    background: var(--danger-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* 主内容区 */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

/* 顶部导航 */
.header {
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.header-icon:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.header-icon .notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    border-radius: 50%;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.user-info .name {
    font-size: 14px;
    font-weight: 500;
}

.user-info .role {
    font-size: 12px;
    color: var(--text-muted);
}

/* 页面内容 */
.page-content {
    padding: 25px;
}

.page-header {
    margin-bottom: 25px;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* 卡片 */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary-color);
}

.card-body {
    padding: 20px;
}

/* 统计卡片 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.stat-card.green {
    background: linear-gradient(135deg, #70AD47 0%, #538135 100%);
    color: #fff;
}

.stat-card.green .stat-label,
.stat-card.green .stat-change {
    color: rgba(255, 255, 255, 0.85);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.green { background: rgba(112, 173, 71, 0.15); color: var(--primary-color); }
.stat-icon.blue { background: rgba(52, 152, 219, 0.15); color: var(--info-color); }
.stat-icon.gold { background: rgba(201, 169, 98, 0.15); color: var(--gold-color); }
.stat-icon.orange { background: rgba(243, 156, 18, 0.15); color: var(--warning-color); }
.stat-icon.red { background: rgba(231, 76, 60, 0.15); color: var(--danger-color); }

.stat-card.green .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-change {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.stat-change.up { color: var(--success-color); }
.stat-change.down { color: var(--danger-color); }

/* 表格 */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-color);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: rgba(112, 173, 71, 0.05);
}

.data-table td {
    font-size: 14px;
}

/* 状态标签 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending { background: #fff3cd; color: #856404; }
.status-badge.approved { background: #d4edda; color: #155724; }
.status-badge.rejected { background: #f8d7da; color: #721c24; }
.status-badge.processing { background: #cce5ff; color: #004085; }
.status-badge.completed { background: #d4edda; color: #155724; }
.status-badge.warning { background: #fff3cd; color: #856404; }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(112, 173, 71, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-success { background: var(--success-color); color: #fff; }
.btn-danger { background: var(--danger-color); color: #fff; }
.btn-warning { background: var(--warning-color); color: #fff; }
.btn-info { background: var(--info-color); color: #fff; }

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(112, 173, 71, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* 搜索筛选 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-item label {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}

.filter-item select,
.filter-item input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 14px;
    color: var(--text-muted);
}

.pagination-buttons {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 金价展示 */
.gold-price-display {
    background: linear-gradient(135deg, #c9a962 0%, #a08238 100%);
    border-radius: 12px;
    padding: 25px;
    color: #fff;
    margin-bottom: 20px;
}

.gold-price-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.gold-price-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.gold-price-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.gold-price-value {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
}

.gold-price-unit {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 5px;
}

.gold-price-change {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.change-item {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.change-item.up { color: #27ae60; }
.change-item.down { color: #e74c3c; }

/* 待办任务列表 */
.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.task-item:hover {
    background: rgba(112, 173, 71, 0.05);
}

.task-item:last-child {
    border-bottom: none;
}

.task-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
}

.task-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.task-count {
    background: var(--danger-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}

/* 图表区域 */
.chart-container {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 8px;
    color: var(--text-muted);
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* 预警卡片 */
.alert-card {
    border-left: 4px solid;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-card.warning {
    border-color: var(--warning-color);
    background: rgba(243, 156, 18, 0.1);
}

.alert-card.danger {
    border-color: var(--danger-color);
    background: rgba(231, 76, 60, 0.1);
}

.alert-card.info {
    border-color: var(--info-color);
    background: rgba(52, 152, 219, 0.1);
}

.alert-card.success {
    border-color: var(--success-color);
    background: rgba(39, 174, 96, 0.1);
}

.alert-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.alert-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-color);
    color: var(--danger-color);
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 详情信息 */
.detail-section {
    margin-bottom: 25px;
}

.detail-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 15px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-item:hover {
    color: var(--primary-color);
}

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

/* 时间线 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.timeline-content {
    font-size: 14px;
}

/* 文件上传区域 */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: rgba(112, 173, 71, 0.05);
}

.upload-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.upload-text {
    color: var(--text-muted);
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .stat-cards {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 8px;
}
