/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #1a1a2e;
    min-height: 100vh;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

/* ===== 背景渐变 ===== */
.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

.background::before,
.background::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
}

.background::before {
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.4);
    top: -100px;
    left: -100px;
    animation: float1 12s ease-in-out infinite;
}

.background::after {
    width: 350px;
    height: 350px;
    background: rgba(240, 147, 251, 0.5);
    bottom: -80px;
    right: -80px;
    animation: float2 14s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(80px, 60px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-60px, -40px); }
}

/* ===== 布局 ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 16px;
    min-width: 0;
}

/* ===== 容器 ===== */
.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: 220px;
    min-height: 100vh;
    border-radius: 0 18px 18px 0;
    padding: 0;
    position: sticky;
    top: 0;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    height: 100%;
}

.sidebar-brand {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 16px;
}

.sidebar-brand h1 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-brand .subtitle {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.9;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    display: block;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.25s ease,
                border-color 0.25s ease,
                color 0.25s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    background: #fff;
    border-radius: 0 3px 3px 0;
    transform: translateY(-50%);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

.nav-item:hover::before {
    height: 60%;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.25));
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nav-item.active::before {
    height: 70%;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-block {
    width: 100%;
}

/* ===== 玻璃拟态通用样式 ===== */
.glass {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.25);
}

/* ===== 头部（已废弃，保留供兼容） ===== */
.header {
    padding: 22px 28px;
    color: #fff;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    text-align: left;
}

.header h1 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.subtitle {
    margin-top: 4px;
    font-size: 14px;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        min-height: auto;
        border-radius: 0 0 18px 18px;
        position: static;
    }
    .sidebar-inner {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    .sidebar-brand {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
        text-align: left;
        flex: 1;
    }
    .sidebar-nav {
        flex-direction: row;
        margin-left: 16px;
    }
    .sidebar-actions {
        flex-direction: row;
        padding-top: 0;
        border-top: none;
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .header-main { text-align: center; justify-content: center; }
}

/* ===== 卡片 ===== */
.card {
    padding: 28px 32px;
}

.card h2 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ===== 表单 ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
}

.form-row-2col {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    color: #fff;
    font-size: 13px;
    margin-bottom: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    font-size: 14px;
    color: #1a1a2e;
    transition: all 0.25s ease;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(26, 26, 46, 0.45);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* ===== 充值录入卡片：限制宽度居中 ===== */
.recharge-card {
    max-width: 720px;
    margin: 0 auto;
}

.recharge-form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.recharge-form .form-actions .btn-primary,
.recharge-form .form-actions .btn-ghost {
    flex: 1;
}

@media (max-width: 640px) {
    .form-row-2col { grid-template-columns: 1fr; gap: 0; }
}

/* ===== 按钮 ===== */
.btn-primary,
.btn-ghost {
    padding: 11px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s ease,
                background 0.25s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #f0e6ff 100%);
    color: #5b3aa6;
    margin-right: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(91, 58, 166, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 22px rgba(91, 58, 166, 0.35), 0 0 0 4px rgba(91, 58, 166, 0.12);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.38);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.8);
}

.btn-ghost:active {
    transform: translateY(0);
}

/* 按钮波纹效果 */
.btn-primary::after,
.btn-ghost::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.btn-primary:active::after,
.btn-ghost:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: 0s;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
}

/* ===== 列表头部 ===== */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.list-header h2 {
    margin-bottom: 0;
}

/* ===== 搜索框 ===== */
.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    font-size: 14px;
    color: #1a1a2e;
    transition: all 0.25s ease;
    font-family: inherit;
}

.search-box input::placeholder {
    color: rgba(26, 26, 46, 0.45);
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-box .btn-sm {
    padding: 0 14px;
    font-size: 18px;
    line-height: 1;
}

/* ===== 统计区 ===== */
.stats {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 130px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
}

.stat-item .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.stat-item .stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
}

/* ===== 表格 ===== */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

th {
    background: rgba(91, 58, 166, 0.35);
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

td {
    color: #1a1a2e;
}

tbody tr {
    transition: background 0.2s ease, transform 0.2s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: translateX(2px);
}

td.amount {
    color: #d63384;
    font-weight: 600;
}

td.gift {
    color: #5b3aa6;
    font-weight: 600;
}

td.empty {
    text-align: center;
    color: rgba(26, 26, 46, 0.5);
    padding: 30px;
}

.btn-delete {
    padding: 5px 12px;
    background: rgba(220, 53, 69, 0.85);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: background 0.2s;
}

.btn-delete:hover {
    background: rgba(200, 35, 51, 1);
}

.action-cell {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.btn-detail {
    padding: 5px 12px;
    background: rgba(91, 58, 166, 0.85);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-detail:hover {
    background: rgba(72, 45, 133, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(91, 58, 166, 0.4);
}

.btn-detail:active {
    transform: translateY(0) scale(0.95);
}

.btn-consume {
    padding: 5px 12px;
    background: rgba(255, 152, 0, 0.9);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-consume:hover {
    background: rgba(245, 124, 0, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.4);
}

.btn-consume:active {
    transform: translateY(0) scale(0.95);
}

.btn-recharge {
    padding: 5px 12px;
    background: rgba(40, 167, 69, 0.9);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-recharge:hover {
    background: rgba(30, 140, 55, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}

.btn-recharge:active {
    transform: translateY(0) scale(0.95);
}

/* ===== 记账本：收入/支出标签和金额 ===== */
.tag-income, .tag-expense {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
}
.tag-income { background: rgba(40, 167, 69, 0.85); }
.tag-expense { background: rgba(220, 53, 69, 0.85); }

.acc-income { color: #69f0ae; font-weight: 600; }
.acc-expense { color: #ff8a80; font-weight: 600; }

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    padding: 12px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ===== 修改密码弹窗 ===== */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 16px;
}
.modal-mask.show { display: flex; }

.modal {
    width: 100%;
    max-width: 420px;
    padding: 26px 28px;
    color: #1a1a2e;
    animation: modalIn .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
    from { transform: translateY(-30px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1);        opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.modal-close {
    background: rgba(255,255,255,.3);
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.modal-close:hover { background: rgba(255,255,255,.5); }

.modal .form-group label {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

/* ===== 提示弹层 ===== */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success { border-left: 4px solid #28a745; }
.toast.error { border-left: 4px solid #dc3545; }

/* ===== 页面视图切换 ===== */
.page-view {
    display: none;
    flex-direction: column;
    gap: 16px;
}
.page-view.active {
    display: flex;
    animation: pageIn 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-view.active > .card {
    animation: cardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.page-view.active > .card:nth-child(1) { animation-delay: 0.05s; }
.page-view.active > .card:nth-child(2) { animation-delay: 0.12s; }
.page-view.active > .card:nth-child(3) { animation-delay: 0.19s; }
.page-view.active > .card:nth-child(4) { animation-delay: 0.26s; }

@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== 首页统计卡片 ===== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 22px 16px;
    text-align: center;
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
    cursor: default;
}
.stat-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 14px 32px rgba(31, 38, 135, 0.35);
}
.stat-card:hover .stat-card-icon {
    transform: scale(1.15) rotate(5deg);
}

.stat-card-icon {
    font-size: 30px;
    margin-bottom: 8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}

.stat-card-value {
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    line-height: 1.2;
}

.stat-card-label {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.stat-card.stat-today {
    border: 1px solid rgba(255, 233, 130, 0.7);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25);
}
.stat-card.stat-today .stat-card-icon { filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.5)); }
.stat-card.stat-today .stat-card-value { color: #ffe082; }

/* ===== 排行榜 ===== */
.rank-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    transition: transform 0.2s ease, background 0.2s ease;
    animation: rankIn 0.4s ease backwards;
}
.rank-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.45);
}
@keyframes rankIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.rank-no {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    background: rgba(91, 58, 166, 0.6);
    flex-shrink: 0;
}
.rank-no.top1 { background: linear-gradient(135deg, #ffd700, #ffa500); }
.rank-no.top2 { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); }
.rank-no.top3 { background: linear-gradient(135deg, #cd7f32, #b87333); }

.rank-info {
    flex: 1;
    min-width: 0;
}
.rank-name {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-phone {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.rank-value {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.rank-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 24px;
    font-size: 14px;
}

/* ===== 类型选择 ===== */
.type-radio {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.type-option {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.25s ease;
    color: #fff;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.type-option:hover {
    background: rgba(255, 255, 255, 0.35);
}

.type-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #5b3aa6;
    cursor: pointer;
}

.type-option:has(input:checked) {
    background: rgba(255, 255, 255, 0.55);
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* ===== 会员详情弹窗 ===== */
.modal-detail {
    max-width: 620px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.modal-quick {
    max-width: 400px;
}

.quick-info {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    color: #fff;
    font-size: 13px;
    line-height: 1.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.quick-info .qi-name { font-size: 16px; font-weight: 600; }
.quick-info .qi-balance { color: #ffe082; font-weight: 600; }

.detail-body {
    overflow-y: auto;
    padding: 0 2px;
}

.detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-info-item {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
}

.detail-info-item .label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2px;
}

.detail-info-item .value {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.detail-info-item .value.balance {
    color: #ffe082;
}

.detail-section {
    margin-bottom: 18px;
}

.detail-section h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 6px;
}

.consume-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.consume-form .form-group {
    flex: 1;
    min-width: 120px;
    margin-bottom: 0;
}

.consume-form .btn-primary {
    margin: 0;
    white-space: nowrap;
}

/* 消费记录列表 */
.record-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.record-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    animation: rankIn 0.3s ease backwards;
}

.record-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.record-icon.consume { background: rgba(220, 53, 69, 0.5); }
.record-icon.haircut { background: rgba(40, 167, 69, 0.5); }
.record-icon.recharge { background: rgba(255, 193, 7, 0.6); }

.record-value.add { color: #b9f6ca; }

.record-info {
    flex: 1;
    min-width: 0;
}
.record-action {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.record-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.record-value {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}
.record-value.deduct { color: #ff9a9a; }

.record-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px;
    font-size: 13px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .rank-grid { grid-template-columns: 1fr; }
    .detail-info { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .header h1 { font-size: 22px; }
    .card { padding: 20px; }
    th, td { padding: 8px 10px; font-size: 12px; }
    .stat-card-value { font-size: 24px; }
    .type-option { min-width: 100%; }
}
