﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f1f5f9;
    color: #0f172a;
    overflow-x: hidden;
}

.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* 顶部导航栏 - 现代浅色背景风格 */
.top-header {
    background: #f8fafd;
    border-bottom: 1px solid #e4e9f0;
    padding: 0 32px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0px;
    cursor: pointer;
}

.logo-image {
    height: 23px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.5px;
}

    .logo-text span {
        background: linear-gradient(135deg, #009688, #2c7da0);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        font-weight: 800;
    }

.nav-menu-horizontal {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    background: transparent;
    border-radius: 40px;
    padding: 4px 0;
}

.nav-item-h {
    position: relative;
    padding: 5px 15px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.86rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1e2f3e;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    background: transparent;
}

    .nav-item-h:hover {
        background: #eef2f8;
        color: #009688;
    }

    .nav-item-h.active {
        background: #009688;
        color: white;
        box-shadow: 0 4px 12px rgba(0,150,136,0.25);
    }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: rgba(255,255,255,1);
    border-radius: 20px;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.12);
    min-width: 200px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
    border: 1px solid #eef2f8;
}

.nav-item-h.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 20px;
    font-size: 0.85rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.1s;
}

    .dropdown-item:hover {
        background: #f0f9f7;
        color: #009688;
    }

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notify-icon {
    position: relative;
    font-size: 1.25rem;
    cursor: pointer;
    color: #4b5b6c;
    padding: 6px;
    border-radius: 40px;
}

    .notify-icon:hover {
        background: #eef2f8;
        color: #009688;
    }

.badge-red {
    position: absolute;
    top: 0px;
    right: 0px;
    background: #ef4444;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #f8fafd;
}

.message-popover {
    position: absolute;
    top: 65px;
    right: 140px;
    width: 360px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.25);
    border: 1px solid #eef2f8;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

    .message-popover.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.message-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.message-list {
    max-height: 380px;
    overflow-y: auto;
}

.message-item {
    padding: 14px 20px;
    display: flex;
    gap: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f8fafc;
}

    .message-item:hover {
        background: #f8fafc;
    }

.message-avatar {
    width: 40px;
    height: 40px;
    background: #eef2ff;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.message-content {
    flex: 1;
}

.message-title {
    font-weight: 600;
    font-size: 0.85rem;
}

.message-desc {
    font-size: 0.75rem;
    color: #6c7a8e;
}

.message-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 4px;
}

.message-footer {
    padding: 12px 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #009688;
    cursor: pointer;
    border-top: 1px solid #f0f2f5;
}

.user-dropdown {
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    padding: 6px 12px;
    border-radius: 40px;
    cursor: pointer;
}

    .user-profile:hover {
        background: #eef2f8;
    }

    .user-profile img {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 2px solid #e2e8f0;
    }

.user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.2);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
    border: 1px solid #eef2f8;
}

.user-dropdown:hover .user-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    padding: 10px 20px;
    font-size: 0.85rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

    .user-menu-item:hover {
        background: #f0f9f7;
        color: #009688;
    }

.user-menu-divider {
    height: 1px;
    background: #eef2f8;
    margin: 6px 0;
}

/* Tab选项卡 */
.tabbar-container {
    background: white;
    border-bottom: 1px solid #eef2f8;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.tabs-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 8px 0;
    flex: 1;
    scrollbar-width: thin;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: #f8fafc;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.15s;
}

    .tab-item.active {
        background: #e6f7f5;
        color: #009688;
        border-color: #bcd9d6;
        font-weight: 600;
    }

.tab-close {
    margin-left: 8px;
    font-size: 10px;
    opacity: 0.5;
}

    .tab-close:hover {
        opacity: 1;
        color: #ef4444;
    }

.add-tab-btn {
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 34px;
    cursor: pointer;
    margin-left: 12px;
    color: #009688;
    font-size: 1rem;
}

    .add-tab-btn:hover {
        background: #e2e8f0;
    }

.page-container {
    flex: 1;
    overflow-y: auto;
    background: #f4f6f9;
}

.page-pane {
    display: none;
    padding: 8px;
    animation: fadeIn 0.2s ease;
}

    .page-pane.active-pane {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* iframe 路由容器 - 无圆角，优化加载体验 */
.route-iframe {
    width: 100%;
    height: calc(100vh - 143px);
    border: none;
    border-radius: 0px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.route-iframe {
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .route-iframe::-webkit-scrollbar {
        width: 0;
        height: 0;
        background: transparent;
    }
/* 防止iframe加载时的闪动 */
.page-pane {
    background: #f4f6f9;
}

.route-iframe.loading {
    opacity: 0.6;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.stat-card {
    background: white;
    border-radius: 24px;
    padding: 20px 24px;
    border: 1px solid #ecf3fa;
    transition: all 0.2s;
}

    .stat-card:hover {
        box-shadow: 0 8px 20px -12px rgba(0,0,0,0.1);
    }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 12px 0 6px;
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    margin-bottom: 28px;
}

.chart-card, .tasks-card {
    background: white;
    border-radius: 24px;
    border: 1px solid #edf2f7;
    overflow: hidden;
}

.card-header {
    padding: 18px 24px 0;
    font-weight: 600;
    border-bottom: 1px solid #f0f4f9;
    padding-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

.chart-container {
    height: 280px;
    padding: 8px 12px;
}

.tasks-list {
    padding: 8px 20px 20px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.query-table-card {
    background: white;
    border-radius: 24px;
    border: 1px solid #edf2f7;
    overflow: hidden;
    margin-top: 8px;
}

.query-bar {
    padding: 20px 24px;
    background: #fafcff;
    border-bottom: 1px solid #f0f4f9;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.query-input {
    flex: 1;
    min-width: 200px;
}

    .query-input label {
        font-size: 0.75rem;
        color: #5b6e8c;
        display: block;
        margin-bottom: 6px;
        font-weight: 600;
    }

    .query-input input, .query-input select {
        width: 100%;
        padding: 10px 14px;
        border: 1px solid #e2e8f0;
        border-radius: 48px;
        font-size: 0.85rem;
        outline: none;
        transition: 0.2s;
    }

        .query-input input:focus, .query-input select:focus {
            border-color: #009688;
            box-shadow: 0 0 0 2px rgba(0,150,136,0.1);
        }

.query-actions {
    display: flex;
    gap: 12px;
}

.btn-primary {
    background: #009688;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

    .btn-primary:hover {
        background: #00796b;
        transform: translateY(-1px);
    }

.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
}

    .btn-outline:hover {
        background: #f8fafc;
        border-color: #94a3b8;
    }

.table-wrapper {
    overflow-x: auto;
    padding: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table th, .data-table td {
        padding: 14px 20px;
        text-align: left;
        border-bottom: 1px solid #f1f5f9;
    }

    .data-table th {
        background: #fafcff;
        font-weight: 700;
        color: #334155;
    }

.status-badge {
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-pending {
    background: #fff3e3;
    color: #f97316;
}

.status-expired {
    background: #fee2e2;
    color: #ef4444;
}

.footer {
    text-align: center;
    padding: 20px 0;
    font-size: 0.7rem;
    color: #94a3b8;
    border-top: 1px solid #ecf3fa;
}

@media (max-width: 1000px) {
    .two-col-grid {
        grid-template-columns: 1fr;
    }

    .top-header {
        padding: 0 16px;
    }

    .nav-menu-horizontal {
        gap: 4px;
    }

    .nav-item-h {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* 确保用户菜单面板样式正确且可点击 */
.user-dropdown {
    position: relative;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.2);
    min-width: 200px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid #eef2f8;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    padding: 6px 12px;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

    .user-profile:hover {
        background: #eef2f8;
    }

    .user-profile img {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #e2e8f0;
    }

.user-menu-item {
    padding: 10px 20px;
    font-size: 0.85rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

    .user-menu-item:hover {
        background: #f0f9f7;
        color: #009688;
    }

    .user-menu-item i {
        width: 18px;
        color: #6c86a3;
    }

    .user-menu-item:hover i {
        color: #009688;
    }

.user-menu-divider {
    height: 1px;
    background: #eef2f8;
    margin: 6px 0;
}



