/* WH智能 后台管理系统 - 样式 */
:root {
    --wh-primary: #0d6efd;
    --wh-sidebar: #212529;
}

body {
    min-height: 100vh;
    background-color: #f4f6f9;
}

/* 登录页 */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}
.login-box .card {
    border: none;
    border-radius: 12px;
}
.login-box .form-control:focus {
    border-color: var(--wh-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 导航 */
.navbar-brand {
    font-weight: 600;
}
.navbar .nav-link.active {
    font-weight: 600;
}

/* 卡片 */
.card {
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,.08);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.08);
    font-weight: 600;
}

/* 表格 */
.table th {
    font-weight: 600;
    color: #495057;
}
.table td a:not(.btn) {
    color: var(--wh-primary);
    text-decoration: none;
}
.table td a:not(.btn):hover {
    text-decoration: underline;
}

/* 按钮组 */
.btn-sm + .btn-sm {
    margin-left: 0.25rem;
}

/* 首页统计卡片 */
.card.border-primary .card-body { border-left: 4px solid var(--bs-primary); }
.card.border-success .card-body { border-left: 4px solid var(--bs-success); }
.card.border-info .card-body { border-left: 4px solid var(--bs-info); }

/* 首页用户数据：圆形统计 */
.dashboard-user-stat .stat-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.stat-circle-inner {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.2);
    z-index: 1;
}
.stat-circle-today {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}
.stat-circle-week {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
}
.stat-circle-month {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
}
.stat-circle-total {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* 环形图：用户状态占比（中心空白圆环） */
.donut-chart {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(
        #198754 0deg calc(var(--pct-active, 0) * 3.6deg),
        #6c757d calc(var(--pct-active, 0) * 3.6deg) 360deg
    );
    flex-shrink: 0;
    position: relative;
}
.donut-chart::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 65%;
    height: 65%;
    margin-left: -32.5%;
    margin-top: -32.5%;
    border-radius: 50%;
    background: #f4f6f9;
}
.donut-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}
.donut-legend {
    font-size: 0.95rem;
}

/* 近 7 日注册柱状图 */
.bar-chart-7d {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    height: 140px;
    padding: 0 4px;
}
.bar-chart-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.bar-chart-bar-wrap {
    width: 100%;
    max-width: 36px;
    height: 100px;
    margin: 0 auto 6px;
    background: #e9ecef;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.bar-chart-bar {
    width: 100%;
    min-height: 4px;
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
}
.bar-chart-item:hover .bar-chart-bar {
    opacity: 0.9;
}
.bar-chart-label {
    font-size: 0.75rem;
    color: #6c757d;
}
.bar-chart-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #212529;
}
