/* Keep the public interface on a Chinese sans-serif (SimHei) stack. */
html,
body,
button,
input,
select,
textarea {
    --bs-font-sans-serif: "SimHei", "Microsoft YaHei", Arial, sans-serif;
    font-family: "SimHei", "Microsoft YaHei", Arial, sans-serif !important;
}

/* Keep icon glyphs on their own font while replacing text fonts everywhere else. */
body *:not(i):not(svg):not(path):not([class*="ri-"]):not([class*="mdi-"]):not([class*="dripicons-"]):not([class*="fa-"]):not([class*="material-icons"]) {
    font-family: "SimHei", "Microsoft YaHei", Arial, sans-serif !important;
}

/* Keep the brand and primary navigation in one fixed header row. */
#page-topbar {
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #e8ecf4;
    box-shadow: 0 1px 4px rgba(32, 42, 56, 0.08);
}

#page-topbar .navbar-header {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    height: 70px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 12px;
}

#page-topbar .navbar-header > .site-brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-width: 0;
}

#page-topbar .site-logo {
    display: flex;
    align-items: center;
    margin-left: 0 !important;
}

#page-topbar .site-logo .logo {
    display: flex;
    align-items: center;
    line-height: 1;
}

#page-topbar .site-logo .logo-image {
    display: block;
    width: auto;
    max-height: 46px;
}

#page-topbar .header-item {
    color: #495057;
}

#page-topbar .topnav {
    position: static;
    z-index: auto;
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0;
    padding: 0;
    background: #fff;
    box-shadow: none;
}

#page-topbar .topnav .container-fluid {
    padding: 0;
}

#page-topbar .topnav .topnav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 70px;
    padding: 0;
}

#page-topbar .topnav .navbar-collapse {
    justify-content: flex-end;
}

#page-topbar .topnav .navbar-nav {
    align-items: center;
}

#page-topbar .topnav .navbar-nav .nav-link {
    padding: 0.75rem 0.9rem;
    color: #495057 !important;
    line-height: 1.25;
    white-space: nowrap;
}

#page-topbar .topnav .navbar-nav .nav-link:hover,
#page-topbar .topnav .navbar-nav .nav-link:focus {
    color: #0bb197 !important;
    background-color: rgba(11, 177, 151, 0.1);
}

/* Keep the page canvas and footer on the same white background. */
body[data-layout-size="boxed"],
body[data-layout-size="boxed"] #layout-wrapper,
body[data-layout-size="boxed"] .footer {
    background-color: #fff !important;
}

.weather-frame {
    display: none;
    width: 200px;
    height: 28px;
    border: 0;
    vertical-align: middle;
}

.weather-frame.is-loaded {
    display: inline-block;
}

.weather-placeholder {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    color: #6c757d;
}

.latest-records-list {
    display: grid;
    gap: 5px;
}

.latest-record {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    margin-top: 0 !important;
    gap: 8px;
    text-align: left;
}

.latest-record-avatar {
    display: inline-flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    overflow: hidden;
    color: #495057;
    font-size: 9px;
    line-height: 1;
    background-color: #f1f5f7;
    border-radius: 50%;
}

.latest-record-avatar img,
.latest-record-avatar-fallback {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    text-align: center;
}

.latest-record-avatar-fallback {
    padding-top: 8px;
}

.latest-record-type,
.latest-record-time {
    flex: 0 0 auto;
    font-size: 12px;
}

.latest-record-value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-record-nickname {
    flex: 0 1 10em;
    min-width: 0;
    overflow: hidden;
    color: #495057;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-record-nickname:empty {
    display: none;
}

.latest-record[data-qq-profile] .latest-record-type {
    display: none;
}

.latest-record-empty {
    min-height: 40px;
}

@media (max-width: 991.98px) {
    #page-topbar {
        height: auto;
        min-height: 70px;
    }

    #page-topbar .navbar-header {
        flex-wrap: wrap;
        height: auto;
        min-height: 70px;
    }

    #page-topbar .navbar-header > .site-brand {
        justify-content: space-between;
        width: 100%;
        min-height: 70px;
    }

    #page-topbar .topnav {
        flex: 0 0 100%;
        width: 100%;
    }

    #page-topbar .topnav .topnav-menu {
        min-height: 0;
    }

    #page-topbar .topnav .navbar-collapse {
        justify-content: flex-start;
    }

    #page-topbar .topnav .navbar-nav {
        width: 100%;
        padding-bottom: 8px;
    }

    #page-topbar .topnav .navbar-nav .nav-link {
        padding: 0.7rem 0.75rem;
    }
}

@media (max-width: 575.98px) {
    #page-topbar .site-logo .logo-image {
        max-height: 40px;
    }
}
