* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1a2332 100%);
}

.login-card {
    width: 420px;
    max-width: 90vw;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    background-color: #161b22;
    border: 1px solid #30363d;
}

.login-header {
    text-align: center;
}

.login-header h2 {
    color: #58a6ff;
    margin-bottom: 8px;
    font-size: 24px;
}

.login-header p {
    color: #8b949e;
    font-size: 13px;
}

/* 仪表盘 */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.topbar {
    height: 56px;
    background: linear-gradient(90deg, #161b22 0%, #1a2332 100%);
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    flex-shrink: 0;
}

.topbar-left .logo {
    font-size: 18px;
    font-weight: 600;
    color: #58a6ff;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    color: #8b949e;
    font-size: 14px;
    padding: 4px 12px;
    background: #21262d;
    border-radius: 20px;
    border: 1px solid #30363d;
}

/* 状态栏 */
.status-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 24px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-label {
    font-size: 12px;
    color: #8b949e;
}

.status-value {
    font-size: 16px;
    font-weight: 600;
    color: #c9d1d9;
}

.status-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

/* 主体内容 */
.main-content {
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    flex: 1;
    overflow: auto;
}

/* 左侧面板 */
.left-panel {
    width: 340px;
    flex-shrink: 0;
}

/* 右侧面板 */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* 卡片 */
.panel-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    overflow: hidden;
}

.panel-title {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #c9d1d9;
    background: #1c2128;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-body {
    padding: 16px 20px;
}

/* 信息网格 */
.info-grid {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: #8b949e;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #c9d1d9;
}

/* 子标题 */
.sub-title {
    font-size: 13px;
    color: #8b949e;
    margin: 16px 0 8px;
    padding-left: 8px;
    border-left: 3px solid #58a6ff;
}

/* 空文本 */
.empty-text {
    text-align: center;
    color: #484f58;
    padding: 20px;
    font-size: 13px;
}

/* 状态指示器 */
.status-indicators {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-light-group {
    display: flex;
    gap: 16px;
}

.status-light-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-light-text {
    font-size: 12px;
    color: #8b949e;
}

.light-green {
    background-color: #3fb950;
    box-shadow: 0 0 8px #3fb950;
    animation: breathe-green 2s ease-in-out infinite;
}

.light-red {
    background-color: #f85149;
    box-shadow: 0 0 8px #f85149;
    animation: breathe-red 1s ease-in-out infinite;
}

.light-gray {
    background-color: #484f58;
    box-shadow: 0 0 4px #484f58;
}

@keyframes breathe-green {
    0%, 100% {
        box-shadow: 0 0 4px #3fb950;
        opacity: 0.8;
    }
    50% {
        box-shadow: 0 0 12px #3fb950, 0 0 4px #3fb950;
        opacity: 1;
    }
}

@keyframes breathe-red {
    0%, 100% {
        box-shadow: 0 0 4px #f85149;
        opacity: 0.7;
    }
    50% {
        box-shadow: 0 0 12px #f85149, 0 0 4px #f85149;
        opacity: 1;
    }
}

.health-detail-btn {
    font-size: 12px;
    color: #58a6ff;
    cursor: pointer;
    padding: 2px 8px;
    border: 1px solid #30363d;
    border-radius: 10px;
    background: #21262d;
}

.health-detail-btn:hover {
    border-color: #58a6ff;
}

/* 盈亏颜色 */
.profit {
    color: #3fb950 !important;
}

.loss {
    color: #f85149 !important;
}

/* Element Plus 深色主题覆盖 */
.el-card {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #c9d1d9 !important;
}

.el-card__header {
    border-bottom-color: #30363d !important;
}

.el-input__wrapper {
    background-color: #0d1117 !important;
    box-shadow: 0 0 0 1px #30363d inset !important;
}

.el-input__inner {
    color: #c9d1d9 !important;
}

.el-input__wrapper:hover {
    box-shadow: 0 0 0 1px #58a6ff inset !important;
}

.el-form-item__label {
    color: #8b949e !important;
}

.el-divider__text {
    background-color: #161b22 !important;
    color: #8b949e !important;
}

.el-divider {
    border-color: #30363d !important;
}

.el-table {
    background-color: transparent !important;
    color: #c9d1d9 !important;
}

.el-table th.el-table__cell {
    background-color: #1c2128 !important;
    border-bottom-color: #30363d !important;
    color: #8b949e !important;
}

.el-table tr {
    background-color: #161b22 !important;
}

.el-table tr:hover > td {
    background-color: #1c2128 !important;
}

.el-table td.el-table__cell {
    border-bottom-color: #30363d !important;
}

.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
    background-color: #1c2128 !important;
}

.el-tabs__item {
    color: #8b949e !important;
}

.el-tabs__item.is-active {
    color: #58a6ff !important;
}

.el-tabs__active-line {
    background-color: #58a6ff !important;
}

.el-tabs__nav-wrap::after {
    background-color: #30363d !important;
}

.el-descriptions {
    color: #c9d1d9 !important;
}

.el-descriptions__label {
    color: #8b949e !important;
}

.el-descriptions__content {
    background-color: #161b22 !important;
    color: #c9d1d9 !important;
}

.el-descriptions__cell {
    border-color: #30363d !important;
}

.el-alert--warning {
    background-color: #2d2a1f !important;
    border: 1px solid #9e7d2a !important;
}

.el-alert__title {
    color: #d4a02a !important;
}

.el-empty__description p {
    color: #484f58 !important;
}

.el-result__title p {
    color: #c9d1d9 !important;
}

.el-result__subtitle p {
    color: #8b949e !important;
}

.el-input-number {
    .el-input__wrapper {
        background-color: #0d1117 !important;
    }
}

.el-message-box {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
}

.el-message-box__title {
    color: #c9d1d9 !important;
}

.el-message-box__content {
    color: #8b949e !important;
}

/* 管理后台 */
.admin-panel {
    padding: 16px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #58a6ff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #8b949e;
}

/* 响应式 */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
    }

    .admin-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 0 12px;
        height: 50px;
    }

    .topbar-left .logo {
        font-size: 15px;
    }

    .topbar-right {
        gap: 6px;
    }

    .user-badge {
        font-size: 12px;
        padding: 2px 8px;
    }

    .status-bar {
        gap: 10px;
        padding: 10px 12px;
        flex-wrap: wrap;
    }

    .status-item {
        gap: 2px;
    }

    .status-label {
        font-size: 11px;
    }

    .status-value {
        font-size: 14px;
    }

    .status-indicators {
        gap: 8px;
    }

    .status-light-group {
        gap: 10px;
    }

    .status-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
        gap: 6px;
    }

    .main-content {
        padding: 10px 12px;
        gap: 10px;
    }

    .panel-card {
        border-radius: 8px;
    }

    .panel-title {
        padding: 10px 14px;
        font-size: 14px;
    }

    .panel-body {
        padding: 12px 14px;
    }

    .info-grid {
        gap: 12px;
    }

    .info-value {
        font-size: 14px;
    }

    .admin-panel {
        padding: 10px 12px;
    }

    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .admin-stat-card {
        padding: 14px;
    }

    .stat-num {
        font-size: 22px;
    }

    .el-form-item__label {
        font-size: 13px !important;
        width: 80px !important;
    }

    .el-table {
        font-size: 12px !important;
    }

    .el-button {
        padding: 8px 12px !important;
    }
}

@media (max-width: 480px) {
    .topbar-left .logo {
        font-size: 13px;
    }

    .topbar-right .el-button {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }

    .status-bar {
        padding: 8px 10px;
        gap: 8px;
    }

    .status-item {
        gap: 1px;
    }

    .status-label {
        font-size: 10px;
    }

    .status-value {
        font-size: 13px;
    }

    .main-content {
        padding: 8px 10px;
    }

    .panel-title {
        padding: 8px 12px;
        font-size: 13px;
    }

    .panel-body {
        padding: 10px 12px;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .el-form-item__label {
        font-size: 12px !important;
        width: 70px !important;
    }
}
