* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-width: 1200px;
    height: 100%;
}

body {
    font-family:
        "Microsoft YaHei",
        "PingFang SC",
        "Noto Sans CJK SC",
        Arial,
        sans-serif;

    font-size: 15px;
    color: #172033;
    background: #f3f6fb;
}


/* ===== 顶部导航 ===== */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 1000;

    height: 54px;

    display: flex;
    align-items: center;

    padding: 0 18px;

    background: #102a5c;
    color: #ffffff;
}


.brand {
    flex: 0 0 auto;

    margin-right: 24px;

    font-size: 18px;
    font-weight: 700;

    white-space: nowrap;
    user-select: none;
}


/* ===== 一级菜单 ===== */

.main-nav {
    display: flex;
    align-items: center;

    gap: 4px;

    height: 100%;
}


.nav-item {
    position: relative;

    display: flex;
    align-items: center;

    height: 100%;
}


.nav-button {
    display: flex;
    align-items: center;

    height: 38px;

    padding: 0 18px;

    border-radius: 8px;

    font-size: 15px;
    font-weight: 500;

    color: #ffffff;

    cursor: default;

    transition:
        background-color 0.15s ease;
}


.nav-item:hover .nav-button {
    background: #285ed3;
}


/* ===== 下拉菜单 ===== */

.dropdown {
    position: absolute;

    top: 50px;
    left: 0;

    display: none;

    width: max-content;

    padding: 14px;

    background: #ffffff;

    border: 1px solid #e4e9f2;
    border-radius: 10px;

    box-shadow:
        0 10px 30px
        rgba(20, 39, 75, 0.12);

    color: #172033;
}


.nav-item:hover .dropdown {
    display: flex;

    align-items: flex-start;

    gap: 12px;
}


/*
 * 点击子菜单以后立即强制关闭。
 */

.nav-item.dropdown-closed .dropdown {
    display: none;
}


.dropdown.dropdown-align-right {
    left: auto;
    right: 0;
}


/* ===== 分组 ===== */

.menu-group {
    width: max-content;
    min-width: 145px;
}


.group-title {
    margin: 0 5px 7px;

    padding-left: 8px;

    border-left:
        3px solid #3167e3;

    color: #66738a;

    font-size: 14px;
    font-weight: 500;

    white-space: nowrap;
}


/* ===== 子菜单 ===== */

.submenu-item {
    display: block;

    width: 100%;

    margin-bottom: 2px;

    padding: 8px 10px;

    border: 0;
    border-radius: 7px;

    background: transparent;

    color: #172033;

    font-family: inherit;
    font-size: 15px;

    text-align: left;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.15s ease;
}


.submenu-item:last-child {
    margin-bottom: 0;
}


.submenu-item:hover {
    background: #eef3fb;
}


/* ===== 时间 ===== */

.clock-area {
    position: relative;

    margin-left: auto;

    height: 100%;

    display: flex;
    align-items: center;
}


.clock {
    padding: 8px 12px;

    border-radius: 8px;

    font-size: 14px;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.15s ease;
}


.clock:hover {
    background:
        rgba(255, 255, 255, 0.10);
}


/* ===== 信息便签 ===== */

.info-note {
    position: absolute;

    top: 50px;
    right: 0;

    display: none;

    width: 300px;
    min-height: 130px;

    padding: 16px;

    background: #f3f6fb;

    border: 1px solid #e0e6ef;
    border-radius: 12px;

    box-shadow:
        0 10px 30px
        rgba(20, 39, 75, 0.13);
}


.info-note.show {
    display: block;
}


.note-title {
    margin-bottom: 10px;
    font-weight: 600;
}


.note-text {
    color: #65728a;

    font-size: 14px;
    line-height: 1.7;
}


/* ===== 标签栏 ===== */

.tabbar {
    position: fixed;

    top: 54px;
    left: 0;
    right: 0;

    z-index: 900;

    height: 46px;

    display: flex;
    align-items: flex-end;

    padding: 5px 14px 0;

    background: #e8edf7;
}


.tabs {
    display: flex;
    align-items: flex-end;

    gap: 5px;

    min-width: 0;
    height: 41px;

    overflow: visible;
}


/* ===== 标签 ===== */

.tab {
    position: relative;

    display: flex;
    align-items: center;

    gap: 8px;

    min-width: 90px;
    max-width: 190px;

    height: 34px;

    padding: 0 12px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #34425b;

    font-size: 14px;

    cursor: pointer;
    user-select: none;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}


.tab:hover {
    background: #dce4f1;
}


/* ===== 激活标签 ===== */

.tab.active {
    position: relative;

    height: 41px;

    background: #f3f6fb;

    color: #173c8c;

    font-weight: 500;

    border-radius: 8px 8px 0 0;
}


/* 激活标签左下方反向圆角 */

.tab.active::before,
.tab.active::after {
    content: "";

    position: absolute;

    bottom: 0;

    width: 10px;
    height: 10px;

    pointer-events: none;
}


/* 左侧凹圆角 */

.tab.active::before {
    left: -10px;

    border-radius: 0 0 10px 0;

    box-shadow: 5px 5px 0 5px #f3f6fb;
}


/* 右侧凹圆角 */

.tab.active::after {
    right: -10px;

    border-radius: 0 0 0 10px;

    box-shadow: -5px 5px 0 5px #f3f6fb;
}


/*
 * 激活标签下面增加一个与主体同色的连接层。
 *
 * 标签本身仍然保留四角圆角，
 * 但视觉上会与下面主体区域连接。
 */


.tab-title {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ===== × ===== */

.tab-close {
    position: relative;
    z-index: 2;

    flex: 0 0 auto;

    width: 22px;
    height: 22px;

    margin-left: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #748198;

    font-size: 16px;
    line-height: 1;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}


.tab-close:hover {
    background:
        rgba(90, 108, 140, 0.12);

    color: #24324a;
}


.tab.dragging {
    opacity: 0.45;
}


/* ===== 页面主体 ===== */

.page-content {
    min-height: 100vh;

    padding-top: 100px;

    background: #f3f6fb;
}


/*
 * 每个标签对应一个独立页面区域。
 */

.page-view {
    display: none;

    min-height:
        calc(100vh - 100px);
}


.page-view.active {
    display: block;
}


/*
 * 当前只是为了验证切页效果。
 * 后续正式业务页面会替换掉这里。
 */

.page-placeholder {
    padding: 24px;

    font-size: 18px;
    font-weight: 600;

    color: #53627a;
}

.app-frame {

    width: 100%;

    height: calc(100vh - 100px);

    border: none;

    background: #f3f6fb;

}