* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background:#f5f7fa;
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

.top-navbar {
    height: 70px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.navbar-title i {
    font-size: 26px;
    opacity: 0.95;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-logout i {
    font-size: 14px;
}

.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 200px;
    height: calc(100vh - 70px);
    background: white;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    z-index: 999;
    transition: all 0.3s ease;
}

.sidebar-menu {
    list-style: none;
    padding: 12px 8px;
    margin: 0;
}

.sidebar-menu-item {
    margin-bottom: 4px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.sidebar-menu-item:last-child {
    margin-bottom: 0;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
    gap: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu-item a:hover {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.08) 0%, rgba(0, 242, 254, 0.08) 100%);
    color: #4facfe;
}

.sidebar-menu-item a.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.sidebar-menu-item a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-menu-item a span {
    font-size: 14px;
}

.main-content {
    margin-top: 70px;
    margin-left: 200px;
    margin-right: 0;
    padding: 20px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
}

.tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border-bottom: 2px solid #e8e8e8;
    height: 42px;
    padding: 0 12px;
    margin-bottom: 16px;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 0;
}

.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 42px;
    line-height: 42px;
    color: #666;
    cursor: pointer;
    position: relative;
    user-select: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0;
}

.tab-item:hover {
    color: #4facfe;
    background: rgba(79, 172, 254, 0.05);
}

.tab-item .title {
    font-size: 13px;
}

.tab-item .close {
    font-size: 16px;
    color: #999;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tab-item .close:hover {
    color: #ff4d4f;
    background: rgba(255, 77, 79, 0.1);
}

.tab-item.active {
    color: #4facfe;
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 2px;
}

.tab-menu {
    position: absolute;
    display: none;
    background: white;
    border: 1px solid #e8e8e8;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 2000;
    min-width: 140px;
    border-radius: 8px;
    overflow: hidden;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-menu .item {
    padding: 10px 14px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-menu .item:hover {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.08) 0%, rgba(0, 242, 254, 0.08) 100%);
    color: #4facfe;
}

.content-container {
    width: 100%;
    margin: 0 auto;
}

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 16px;
    padding: 32px 36px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.3);
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.welcome-text h1 {
    font-size: 26px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    letter-spacing: 0.5px;
}

.welcome-text .welcome-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.welcome-decoration {
    position: relative;
    width: 120px;
    height: 120px;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.decoration-circle:first-child {
    width: 80px;
    height: 80px;
    top: 0;
    right: 0;
    animation: float 3s ease-in-out infinite;
}

.decoration-circle:last-child {
    width: 50px;
    height: 50px;
    bottom: 0;
    right: 40px;
    animation: float 3s ease-in-out infinite 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.action-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.action-card:hover::before {
    transform: scaleY(1);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.action-icon.add {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.action-icon.ad {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

.action-icon.debt {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.3);
}

.action-icon.customer {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
}

.action-icon.config {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-text h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.action-text p {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* 系统信息 */
.system-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.info-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4facfe;
    font-size: 20px;
}

.info-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin: 0 0 4px 0;
}

.info-content p {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.page-header {
    margin-bottom: 20px;
    padding: 20px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.page-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.page-header p {
    font-size: 13px;
    color: #999;
    margin: 6px 0 0 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: white;
}

.stat-card .icon i {
    font-size: 22px;
}

.stat-card .label {
    color: #888;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.stat-card .trend {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card .trend i {
    font-size: 14px;
    opacity: 0.7;
}

.stat-card .trend .up {
    color: #52c41a;
    font-weight: 600;
}

.stat-card .trend .down {
    color: #ff4d4f;
    font-weight: 600;
}

.stat-card.customer .icon { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white; }
.stat-card.customer::before { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-card.ad .icon { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; }
.stat-card.ad::before { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-card.debt .icon { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); color: white; }
.stat-card.debt::before { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.stat-card.completed .icon { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); color: white; }
.stat-card.completed::before { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.charts-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.chart-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.chart-card .title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card .title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 2px;
}

.chart-container {
    height: 280px;
}

.todo-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.todo-card {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.todo-card .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.todo-card .header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.todo-card .header .count {
    background: #f5f7fa;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: #666;
}

.todo-card .header .count.warn {
    background: #fff7e6;
    color: #fa8c16;
}

.todo-list {
    max-height: 180px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 6px;
}

.todo-item:hover {
    background: #f5f7fa;
}

.todo-item:last-child {
    margin-bottom: 0;
}

.todo-item .icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.todo-item .info {
    flex: 1;
}

.todo-item .title {
    font-size: 12px;
    color: #333;
    margin-bottom: 2px;
}

.todo-item .time {
    font-size: 11px;
    color: #999;
}

.todo-item .action {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: white;
}

.todo-item .action.view {
    background: #1890ff;
}

.todo-item .action.ocr {
    background: #52c41a;
}

.empty-state {
    text-align: center;
    padding: 30px 15px;
    color: #999;
}

.empty-state i {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
    opacity: 0.3;
}

.empty-state p {
    font-size: 12px;
}

.loading {
    text-align: center;
    padding: 30px 15px;
}

.loading i {
    font-size: 24px;
    color: #1890ff;
}

.loading p {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }

    .stat-card {
        padding: 18px 20px;
    }
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .charts-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chart-container {
        height: 300px;
    }
}

@media (max-width: 992px) {
    .main-content {
        padding: 16px;
    }

    .page-header {
        padding: 16px 20px;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        height: 52px;
        padding: 0 16px;
    }

    .navbar-title {
        font-size: 16px;
    }

    .navbar-title i {
        font-size: 20px;
    }

    .user-name {
        display: none;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 12px;
    }

    .btn-logout span {
        display: none;
    }

    .sidebar {
        width: 64px;
    }

    .sidebar-menu {
        padding: 8px 4px;
    }

    .sidebar-menu-item a {
        padding: 12px 10px;
        justify-content: center;
    }

    .sidebar-menu-item a span {
        display: none;
    }

    .sidebar-menu-item a i {
        font-size: 20px;
        width: auto;
    }

    .main-content {
        margin-top: 52px;
        margin-left: 64px;
        padding: 12px;
    }

    .tabs {
        height: 38px;
        padding: 0 8px;
        margin-bottom: 12px;
    }

    .tab-item {
        padding: 0 10px;
        height: 38px;
        line-height: 38px;
        font-size: 12px;
    }

    .welcome-banner {
        padding: 24px 20px;
        margin-bottom: 16px;
    }

    .welcome-text h1 {
        font-size: 20px;
    }

    .welcome-text .welcome-desc {
        font-size: 13px;
    }

    .welcome-decoration {
        display: none;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }

    .action-card {
        padding: 16px;
    }

    .action-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .action-text h3 {
        font-size: 13px;
    }

    .action-text p {
        font-size: 11px;
    }

    .page-header {
        padding: 14px 16px;
        margin-bottom: 14px;
    }

    .page-header h2 {
        font-size: 17px;
    }

    .page-header p {
        font-size: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 14px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 12px;
    }

    .stat-card .icon i {
        font-size: 18px;
    }

    .stat-card .label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .stat-card .value {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .stat-card .trend {
        font-size: 11px;
    }

    .charts-section {
        gap: 12px;
        margin-bottom: 14px;
    }

    .chart-card {
        padding: 16px;
    }

    .chart-card .title {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .chart-container {
        height: 240px;
    }

    .system-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .info-card {
        padding: 16px;
    }

    .info-icon {
        width: 44px;
        height: 44px;
    }

    .info-content h4 {
        font-size: 12px;
    }

    .info-content p {
        font-size: 15px;
    }

    .todo-section {
        grid-template-columns: 1fr;
    }

    .todo-card {
        padding: 14px;
    }

    .todo-list {
        max-height: 160px;
    }
}

@media (max-width: 480px) {
    .top-navbar {
        height: 48px;
        padding: 0 12px;
    }

    .navbar-title {
        font-size: 15px;
    }

    .user-info {
        padding: 4px 10px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .main-content {
        margin-top: 48px;
        margin-left: 0;
        padding: 12px;
    }

    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .tabs {
        height: 36px;
        padding: 0 6px;
        margin-bottom: 10px;
    }

    .tab-item {
        padding: 0 8px;
        font-size: 12px;
    }

    .welcome-banner {
        padding: 20px 16px;
        margin-bottom: 14px;
    }

    .welcome-text h1 {
        font-size: 18px;
    }

    .welcome-text .welcome-desc {
        font-size: 12px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 14px;
    }

    .action-card {
        padding: 14px;
    }

    .action-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .action-icon i {
        font-size: 18px;
    }

    .action-text h3 {
        font-size: 14px;
    }

    .action-text p {
        font-size: 12px;
    }

    .page-header {
        padding: 12px 14px;
        margin-bottom: 12px;
    }

    .page-header h2 {
        font-size: 16px;
    }

    .page-header p {
        font-size: 11px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 14px 16px;
    }

    .stat-card .value {
        font-size: 24px;
    }

    .stat-card .icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .stat-card .icon i {
        font-size: 20px;
    }

    .chart-card {
        padding: 14px;
    }

    .chart-card .title {
        font-size: 13px;
    }

    .chart-container {
        height: 220px;
    }

    .system-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .info-card {
        padding: 14px;
    }

    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .info-icon i {
        font-size: 18px;
    }

    .info-content h4 {
        font-size: 12px;
    }

    .info-content p {
        font-size: 15px;
    }

    .empty-state {
        padding: 24px 12px;
    }

    .empty-state i {
        font-size: 32px;
    }
}
