body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #1f2329;
}

#app {
    min-height: 100vh;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f2f5;
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 215, 0, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(212, 175, 55, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(184, 130, 0, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(255, 223, 0, 0.1) 0px, transparent 50%);
}

.login-card {
    width: 400px;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    overflow: hidden;
}

.login-card .el-card__header {
    background: linear-gradient(to right, #b88200, #d4a017);
    color: white;
    border-bottom: none;
    padding: 30px 20px;
}

.login-card .el-card__body {
    padding: 30px 40px;
}

.login-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
}

.login-subtitle {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.8;
}

.login-btn {
    height: 44px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    background: linear-gradient(to right, #b88200, #d4a017) !important;
    border: none !important;
    margin-top: 10px;
}

.login-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    transition: all 0.2s;
}

.top-bar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #ebeef5;
    padding: 0 20px;
}

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

.top-user-area {
    display: flex;
    align-items: center;
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(180deg, #fffdf7 0%, #fff6df 100%);
    border: 1px solid #f3dfab;
    transition: all 0.2s ease;
}

.user-dropdown-trigger:hover {
    border-color: #d4a017;
    box-shadow: 0 6px 18px rgba(184, 130, 0, 0.12);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #b88200, #e0b84d);
}

.user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-meta-name {
    font-size: 14px;
    font-weight: 600;
    color: #5c3b00;
    line-height: 1.2;
}

.user-meta-email {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #9a7b30;
    line-height: 1.2;
    margin-top: 2px;
}

.user-dropdown-icon {
    color: #9a7b30;
}

.container {
    max-width: 1180px;
    margin: 20px auto;
    padding: 0 12px;
}

.dashboard-grid {
    align-items: stretch;
    height: 800px;
}

.dashboard-col {
    display: flex;
    height: 100%;
}

.dashboard-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 16px;
}

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

.panel-card-fill {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.panel-card .el-card__body {
    box-sizing: border-box;
}

.panel-card-fill .el-card__body {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
}

.panel-card-static {
    flex-shrink: 0;
}

/* 报警日志 / 规则列表：桌面端占满剩余高度，内部滚动 */
.panel-scroll-wrap {
    flex: 1;
    min-height: 0;
    height: 100%;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    min-width: 440px;
}

.rules-table {
    min-width: 760px;
}

.big-price {
    text-align: center;
    font-size: 38px;
    font-weight: 700;
    color: #d4380d;
    margin: 10px 0;
}

.sub-text {
    text-align: center;
    color: #86909c;
    font-size: 13px;
}

.chart {
    height: 360px;
}

.list-empty {
    color: #86909c;
    text-align: center;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .container {
        margin: 12px auto;
        padding: 0 10px 18px;
    }

    .top-bar {
        height: auto;
        padding: 12px 16px;
        gap: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

    .top-user-area {
        width: 100%;
    }

    .user-dropdown-trigger {
        width: 100%;
        box-sizing: border-box;
    }

    .user-meta-email {
        max-width: 180px;
    }

    .dashboard-grid {
        height: auto;
    }

    .dashboard-col {
        display: block;
        height: auto;
    }

    .dashboard-stack {
        height: auto;
        gap: 12px;
    }

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

    .panel-card-fill {
        flex: none;
    }

    .panel-card-fill .el-card__body {
        display: block;
    }

    /* 移动端父级无固定高度，给滚动区明确高度 */
    .panel-card-fill .panel-scroll-wrap {
        flex: none;
        height: 40vh;
        max-height: 40vh;
    }

    .panel-card-fill .rules-scroll-wrap {
        height: 50vh;
        max-height: 50vh;
    }

    .panel-scroll-wrap .el-scrollbar {
        height: 100% !important;
    }

    .panel-card .el-card__header {
        padding: 14px 16px;
    }

    .panel-card .el-card__body {
        padding: 14px 16px;
    }

    .big-price {
        font-size: 30px;
    }

    .sub-text {
        font-size: 12px;
    }

    .chart {
        height: 260px;
    }

    .rules-table {
        min-width: 680px;
    }

    .admin-table {
        min-width: 400px;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 18px;
    }

    .user-meta-email {
        max-width: 150px;
    }

    .chart {
        height: 220px;
    }

    .big-price {
        font-size: 26px;
    }
}
