* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; padding: 0; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #f3f6f5;
    color: #1f2937;
    font-size: 14px;
}

/* 登录 */
.login-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(15, 118, 110, .12), transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(15, 118, 110, .10), transparent 35%),
        linear-gradient(135deg, #eef5f2 0%, #f8faf9 100%);
}
.login-card {
    width: 400px;
    background: #fff;
    border-radius: 14px;
    padding: 36px 40px 30px;
    box-shadow: 0 18px 50px rgba(15, 60, 55, .12);
    border: 1px solid #e5ece9;
}
.login-brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
    width: 52px; height: 52px; border-radius: 13px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff; font-size: 26px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(15, 118, 110, .25);
}
.brand-mark.small { width: 34px; height: 34px; border-radius: 9px; font-size: 18px; box-shadow: none; }
.login-brand h1 { font-size: 21px; margin: 0 0 3px; color: #134e4a; letter-spacing: 1px; }
.login-brand p { margin: 0; font-size: 11px; color: #94a3b8; letter-spacing: .5px; }
.login-subtitle { margin: 26px 0 18px; color: #64748b; font-size: 13px; }
.login-btn { width: 100%; margin-top: 6px; letter-spacing: 6px; }
.login-tip { margin-top: 18px; text-align: center; color: #94a3b8; font-size: 12px; }
.login-footer { margin-top: 26px; color: #94a3b8; letter-spacing: 4px; font-size: 12px; }

/* 布局 */
.layout { height: 100%; }
.sidebar {
    background: #fff;
    border-right: 1px solid #e8eeeb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-brand {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-bottom: 1px solid #eef2f0;
    color: #134e4a;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .5px;
}
.side-menu { flex: 1; border-right: none; overflow-y: auto; padding: 8px 0; }
.menu-group-title {
    padding: 16px 20px 6px;
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 2px;
}
.side-menu .el-menu-item { height: 42px; line-height: 42px; margin: 2px 10px; border-radius: 7px; }
.sidebar-foot { padding: 14px 20px; color: #b6c2bd; font-size: 11px; border-top: 1px solid #eef2f0; }
.main-container { overflow: hidden; }
.header {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid #e8eeeb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.header-left { display: flex; align-items: baseline; gap: 12px; }
.page-title { font-size: 18px; font-weight: 700; color: #1f2937; }
.page-desc { font-size: 12px; color: #94a3b8; }
.header-right { display: flex; align-items: center; gap: 18px; }
.today { color: #64748b; font-size: 12px; }
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; outline: none; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: #e6f4f1; color: #0f766e;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.user-name { font-size: 13px; color: #334155; }
.role-tag {
    background: #f1f5f9; color: #64748b; border-radius: 4px;
    padding: 2px 7px; font-size: 11px;
}
.content { padding: 20px; overflow-y: auto; background: #f3f6f5; }

/* 通用页面元素 */
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 18px; color: #1f2937; }
.page-head .sub { color: #94a3b8; font-size: 12px; margin-top: 4px; }
.filter-bar {
    background: #fff; border: 1px solid #e8eeeb; border-radius: 10px;
    padding: 14px 16px; margin-bottom: 14px;
    display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.table-card {
    background: #fff; border: 1px solid #e8eeeb; border-radius: 10px;
    padding: 4px 0 10px; overflow: hidden;
}
.pager-wrap { display: flex; justify-content: flex-end; padding: 14px 16px 2px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card {
    background: #fff; border: 1px solid #e8eeeb; border-radius: 10px;
    padding: 18px 20px; position: relative; overflow: hidden;
}
.stat-card::after {
    content: ''; position: absolute; right: -18px; top: -18px;
    width: 70px; height: 70px; border-radius: 50%; background: rgba(20,184,166,.07);
}
.stat-label { color: #64748b; font-size: 12px; }
.stat-value { font-size: 28px; font-weight: 700; color: #134e4a; margin-top: 8px; line-height: 1; }
.stat-extra { color: #94a3b8; font-size: 11px; margin-top: 8px; }
.stat-card.warn .stat-value { color: #dc2626; }
.stat-card.warn::after { background: rgba(220,38,38,.06); }
.dash-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .dash-row { grid-template-columns: 1fr; } }
.card-title { font-weight: 700; font-size: 15px; color: #1f2937; margin-bottom: 4px; }
.card-sub { font-size: 12px; color: #94a3b8; margin-bottom: 14px; }
.trend-wrap { width: 100%; height: 210px; }
.trend-svg { width: 100%; height: 100%; overflow: visible; }
.legend { display: flex; gap: 18px; font-size: 12px; color: #64748b; margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.low-stock-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 0; border-bottom: 1px dashed #edf2f0; font-size: 13px;
}
.low-stock-item:last-child { border-bottom: none; }
.money { color: #b45309; font-weight: 600; }
.text-muted { color: #94a3b8; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.form-full { grid-column: 1 / -1; }
.rx-items { border: 1px solid #e8eeeb; border-radius: 8px; overflow: hidden; }
.rx-item-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 32px; gap: 8px; padding: 8px; align-items: center; border-bottom: 1px solid #f1f5f3; }
.rx-item-head { background: #f8faf9; color: #64748b; font-size: 12px; font-weight: 600; }
.rx-total { text-align: right; padding: 12px 8px; font-size: 15px; font-weight: 700; color: #b45309; }
.section-title { font-size: 13px; font-weight: 700; color: #134e4a; margin: 18px 0 10px; padding-left: 9px; border-left: 3px solid #14b8a6; }
.el-table .cell { line-height: 1.5; }
.dialog-footer-total { flex: 1; text-align: left; font-weight: 600; color: #b45309; }
.empty-hint { color: #94a3b8; text-align: center; padding: 18px; font-size: 13px; }
.rx-detail-card { border: 1px solid #e8eeeb; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: #fcfdfd; }
.rx-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #475569; font-size: 13px; margin-bottom: 6px; }
.rx-detail-head b { color: #134e4a; }
.rx-detail-amount { color: #b45309; font-weight: 700; font-size: 15px; margin-left: 10px; }
.rx-detail-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: #64748b; font-size: 12px; margin-bottom: 8px; }
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding: 10px 4px 0; border-bottom: 1px solid #e2e8f0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar { width: 100%; max-width: 44px; background: linear-gradient(180deg, #14b8a6, #0f766e); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-label { font-size: 11px; color: #94a3b8; white-space: nowrap; }
.bar-value { font-size: 11px; color: #475569; }
