* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #1f2937;
}

.app-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.brand {
    font-size: 20px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 28px 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
}

.top-tab {
    padding: 12px 16px;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.top-tab:hover {
    color: #111827;
}

.top-tab.active {
    color: #111827;
    font-weight: 700;
    border-bottom-color: #111827;
}

.page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 28px 40px;
}

.button {
    height: 38px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
}

.meta {
    color: #6b7280;
    font-size: 13px;
}

.placeholder-card {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.placeholder-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.placeholder-desc {
    color: #6b7280;
}

@media (max-width: 620px) {
    .page,
    .app-header,
    .top-tabs {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* =========================================================
   Account menu
   ========================================================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}


.account-menu {
    position: relative;
}


.account-button {
    position: relative;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #dbe3ed;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}


.account-button:hover {
    border-color: #aebdcb;
    background: #f8fafc;
}


.account-avatar {
    width: 32px;
    height: 32px;
    display: block;
    margin: 2px;
    border-radius: 50%;
    object-fit: cover;
}


.account-avatar-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #496a8c;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}


.account-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    padding: 6px 9px;
    border-radius: 6px;
    background: #253247;
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-3px);
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
    z-index: 1001;
}


.account-button:hover .account-tooltip {
    opacity: 1;
    transform: translateY(0);
}


.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    display: none;
    overflow: hidden;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    z-index: 1000;
}


.account-dropdown.open {
    display: block;
}


.account-dropdown-header {
    padding: 12px 14px;
    border-bottom: 1px solid #edf1f5;
}


.account-dropdown-name {
    overflow: hidden;
    color: #253247;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.account-dropdown form {
    margin: 0;
}


.account-logout {
    width: 100%;
    padding: 11px 14px;
    border: 0;
    background: #ffffff;
    color: #c43e3e;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
}


.account-logout:hover {
    background: #fff3f2;
}



/* =========================================================
   Common loading popup
   ========================================================= */

.common-loading-popup {
    position: fixed;
    left: 50%;
    top: 86px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 11px 16px;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
    color: #253247;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    transform: translateX(-50%);
}

.common-loading-popup-spinner {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 2px solid #dbe3ed;
    border-top-color: #496a8c;
    border-radius: 50%;
    animation: CommonLoadingPopupSpin 0.8s linear infinite;
}

.common-loading-popup-message {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes CommonLoadingPopupSpin {
    to {
        transform: rotate(360deg);
    }
}
