/* ============================================================
 * 智慧停车场 · Web 版公共样式（桌面端/大屏）
 * 所有业务页面统一引用此文件，宽度、布局、组件风格统一
 *
 * 布局结构：
 *   body > .web-layout
 *     > .web-topbar    (顶部导航 60px)
 *     > .web-main      (主体容器，padding: 24px, max-width: 1400px)
 *       > .web-page-title
 *       > .web-two-col  (flex 两栏)
 *         > .web-sidebar  (左侧菜单 220px)
 *         > .web-content  (右侧内容 flex:1)
 *           > .web-card   (内容卡片)
 * ============================================================ */

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #2d3748;
    background: #f0f4f8;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 隐藏所有滚动条但保留滚动功能 */
::-webkit-scrollbar { width: 0; height: 0; background: transparent; }

a { color: #4f46e5; text-decoration: none; transition: color .15s; }
a:hover { color: #4338ca; text-decoration: none; }

/* ========== 顶部导航栏 ========== */
.web-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.web-topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.web-topbar-inner {
    max-width: 1400px;
    width: 100%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.web-topbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #2d3748;
    white-space: nowrap;
}
.web-topbar .brand i { color: #4f46e5; font-size: 22px; }
.web-topbar.admin .brand i { color: #e53e3e; }

.brand-sub {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
    background: #f7fafc;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 4px;
}
.brand-sub.admin { background: #fff5f5; color: #e53e3e; }

.web-topbar .top-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
    overflow-x: auto;
}
.web-topbar .top-nav a {
    padding: 8px 14px;
    color: #4a5568;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all .15s;
}
.web-topbar .top-nav a:hover { background: #f7fafc; color: #2d3748; }
.web-topbar .top-nav a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, .3);
}
.web-topbar .top-nav a i { margin-right: 4px; font-size: 12px; opacity: .9; }
.web-topbar .top-nav a.nav-admin {
    background: #edf2f7;
    color: #4a5568;
    margin-left: 8px;
}
.web-topbar .top-nav a.nav-admin:hover { background: #e2e8f0; }

.web-topbar .user-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    white-space: nowrap;
}
.web-topbar .user-area .username {
    color: #4a5568;
    font-weight: 500;
}
.web-topbar .user-area .logout-btn {
    padding: 7px 12px;
    background: #fff5f5;
    color: #e53e3e;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all .15s;
}
.web-topbar .user-area .logout-btn:hover { background: #fed7d7; }

/* ========== 主体容器 ========== */
.web-main {
    flex: 1;
    padding: 28px 32px 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.web-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.web-page-title i {
    color: #667eea;
    background: #ede9fe;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* ========== 两栏布局：侧边栏 + 内容区 ========== */
.web-two-col {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
}

.web-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    padding: 12px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    position: absolute;
    top: 0;
    left: 0;
}

.web-sidebar .nav-label {
    padding: 8px 14px 6px;
    font-size: 11px;
    color: #a0aec0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.web-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #4a5568;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .15s;
    margin-bottom: 2px;
}
.web-sidebar a:hover { background: #f7fafc; color: #2d3748; }
.web-sidebar a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, .3);
}
.web-sidebar a i { width: 18px; text-align: center; font-size: 14px; }

.web-content {
    flex: 1;
    min-width: 0;
    margin-left: 244px; /* 220 sidebar + 24 gap */
    min-height: calc(100vh - 180px);
}

/* ========== 内容卡片 ========== */
.web-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    margin-bottom: 20px;
}

.web-card h2,
.web-card h3 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.web-card .card-desc {
    color: #718096;
    font-size: 13px;
    margin: -10px 0 16px;
}

/* ========== 统计卡片行 ========== */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-card .stat-info .label { color: #718096; font-size: 13px; margin-bottom: 6px; }
.stat-card .stat-info .value { font-size: 26px; font-weight: 700; color: #2d3748; }
.stat-card .icon {
    font-size: 32px;
    color: #cbd5e0;
    background: #f7fafc;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-card.blue   .icon { background: #ebf8ff; color: #4299e1; }
.stat-card.green  .icon { background: #e6fffa; color: #38b2ac; }
.stat-card.orange .icon { background: #fffbeb; color: #ed8936; }
.stat-card.purple .icon { background: #f5f3ff; color: #9f7aea; }
.stat-card.red    .icon { background: #fff5f5; color: #f56565; }

/* ========== 车位网格 ========== */
.park-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 16px 0;
}
.park-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.park-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }

.park-spot-box {
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    cursor: default;
    transition: transform .15s, box-shadow .15s;
    position: relative;
    user-select: none;
    text-align: center;
    padding: 8px;
}
.park-spot-box[data-clickable="1"] { cursor: pointer; }
.park-spot-box[data-clickable="1"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.park-spot-box.free {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 2px 8px rgba(72, 187, 120, .25);
}
.park-spot-box.occ {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    box-shadow: 0 2px 8px rgba(66, 153, 225, .25);
}
.park-spot-box.res {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 2px 8px rgba(237, 137, 54, .25);
}
.park-spot-box.expired {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
}
.park-spot-box .label { font-size: 20px; margin-bottom: 4px; }
.park-spot-box .status { font-size: 12px; opacity: .95; }

/* 车位状态条 */
.park-legend {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin: 16px 0 4px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #4a5568;
}
.park-legend .item { display: flex; align-items: center; gap: 6px; }
.park-legend .dot {
    width: 12px; height: 12px; border-radius: 3px;
}
.park-legend .dot.free  { background: #48bb78; }
.park-legend .dot.occ   { background: #4299e1; }
.park-legend .dot.res   { background: #ed8936; }
.park-legend .dot.used  { background: #a0aec0; }

/* ========== 数据表格 ========== */
.web-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.web-table th, .web-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}
.web-table thead th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid #e2e8f0;
}
.web-table tbody tr:hover { background: #fafbfc; }
.web-table tbody tr:last-child td { border-bottom: none; }

.web-table .tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.tag-green  { background: #c6f6d5; color: #22543d; }
.tag-blue   { background: #bee3f8; color: #2a4365; }
.tag-orange { background: #feebc8; color: #7b341e; }
.tag-red    { background: #fed7d7; color: #742a2a; }
.tag-gray   { background: #edf2f7; color: #4a5568; }
.tag-purple { background: #e9d8fd; color: #553c9a; }

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}
.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.btn-primary   { background: #4f46e5; color: #fff; }
.btn-primary:hover   { background: #4338ca; color: #fff; }
.btn-success   { background: #48bb78; color: #fff; }
.btn-success:hover   { background: #38a169; color: #fff; }
.btn-danger    { background: #e53e3e; color: #fff; }
.btn-danger:hover    { background: #c53030; color: #fff; }
.btn-default   { background: #edf2f7; color: #4a5568; }
.btn-default:hover   { background: #e2e8f0; color: #2d3748; }
.btn-warning   { background: #ed8936; color: #fff; }
.btn-warning:hover   { background: #dd6b20; color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ========== 表单 ========== */
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-row .col { flex: 1; }

.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
    color: #2d3748;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, .15);
}
.form-group input[readonly],
.form-group select[disabled] {
    background: #f7fafc;
    cursor: not-allowed;
}

/* 表单的通用提示文本 */
.form-hint { font-size: 12px; color: #a0aec0; margin-top: 4px; }
.form-error { font-size: 12px; color: #e53e3e; margin-top: 4px; }

/* ========== 通用提示条 ========== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-error   { background: #fed7d7; color: #c53030; border-color: #feb2b2; }
.alert-success { background: #c6f6d5; color: #22543d; border-color: #9ae6b4; }
.alert-warning { background: #feebc8; color: #7b341e; border-color: #fbd38d; }
.alert-info    { background: #bee3f8; color: #2a4365; border-color: #90cdf4; }

/* ========== 通用弹窗 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-dialog {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
}
.modal-title {
    padding: 18px 20px 10px;
    font-size: 17px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-title i { color: #667eea; }
.modal-body { padding: 10px 20px 20px; font-size: 14px; color: #4a5568; line-height: 1.7; }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f7fafc;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #2d3748;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    z-index: 10000;
    opacity: 0;
    transition: all .3s;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast-success { background: #48bb78; }
.toast-error   { background: #e53e3e; }
.toast-warning { background: #ed8936; }
.toast-info    { background: #4299e1; }

/* ========== 钱包页面 ========== */
.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 14px;
    padding: 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, .25);
}
.balance-card .label { font-size: 13px; opacity: .9; margin-bottom: 6px; }
.balance-card .amount { font-size: 36px; font-weight: 700; letter-spacing: 1px; }
.balance-card .amount small { font-size: 16px; font-weight: 500; opacity: .8; margin-left: 4px; }
.balance-card .actions { display: flex; gap: 10px; }
.balance-card .actions .btn {
    background: rgba(255,255,255,.2);
    color: #fff;
    backdrop-filter: blur(10px);
}
.balance-card .actions .btn:hover { background: rgba(255,255,255,.3); }

/* 充值选项 */
.recharge-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 16px 0;
}
.recharge-item {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 10px;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
}
.recharge-item:hover { border-color: #cbd5e0; transform: translateY(-2px); }
.recharge-item.active {
    border-color: #667eea;
    background: #f5f3ff;
    box-shadow: 0 4px 12px rgba(102,126,234,.2);
}
.recharge-item .amount {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}
.recharge-item .gift {
    font-size: 12px;
    color: #e53e3e;
    font-weight: 500;
}
.recharge-item.custom { padding: 14px 10px; }
.recharge-item.custom input {
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    border: none;
    outline: none;
    background: transparent;
}

/* ========== VIP 会员页面 ========== */
.vip-hero {
    background: linear-gradient(135deg, #f6e05e 0%, #ed8936 50%, #dd6b20 100%);
    color: #fff;
    border-radius: 14px;
    padding: 32px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(237, 137, 54, .25);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.vip-hero i { font-size: 50px; margin-bottom: 12px; opacity: .9; }
.vip-hero .title { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.vip-hero .desc  { font-size: 14px; opacity: .95; }
.vip-hero .level-badge {
    display: inline-block;
    background: rgba(255,255,255,.25);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.vip-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 16px 0;
}
.vip-plan {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 2px solid #e2e8f0;
    text-align: center;
    transition: all .15s;
    cursor: pointer;
}
.vip-plan:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.vip-plan.active {
    border-color: #ed8936;
    box-shadow: 0 8px 24px rgba(237,137,54,.25);
}
.vip-plan .icon { font-size: 36px; color: #ed8936; margin-bottom: 8px; }
.vip-plan .title { font-size: 18px; font-weight: 700; color: #2d3748; margin-bottom: 6px; }
.vip-plan .desc  { font-size: 12.5px; color: #718096; margin-bottom: 14px; }
.vip-plan .price { font-size: 28px; font-weight: 700; color: #e53e3e; margin-bottom: 14px; }
.vip-plan .price small { font-size: 14px; font-weight: 500; color: #718096; }

.benefit-list {
    list-style: none;
    text-align: left;
    margin: 16px 0;
}
.benefit-list li {
    padding: 6px 0;
    font-size: 13px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}
.benefit-list li i { color: #48bb78; font-size: 12px; }

/* ========== 用户资料 / 设置页面 ========== */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    background: #edf2f7;
}

.profile-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 32px;
    align-items: start;
}

.info-list { list-style: none; }
.info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
}
.info-list li:last-child { border-bottom: none; }
.info-list .label {
    width: 120px;
    color: #718096;
    font-size: 13px;
    font-weight: 500;
}
.info-list .value {
    flex: 1;
    color: #2d3748;
    font-weight: 500;
}

/* ========== 聊天页面 ========== */
.chat-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    height: 640px;
    max-height: calc(100vh - 200px);
    min-height: 500px;
}

.chat-sidebar {
    background: #f7fafc;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #2d3748;
}
.chat-user-list {
    flex: 1;
    overflow-y: auto;
}
.chat-user-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-bottom: 1px solid #edf2f7;
    transition: background .15s;
}
.chat-user-item:hover { background: #edf2f7; }
.chat-user-item.active { background: #e9d8fd; }
.chat-user-item .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: #667eea; color: #fff; display: flex;
    align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
    flex-shrink: 0;
}
.chat-user-item .info { flex: 1; min-width: 0; }
.chat-user-item .name { font-size: 13.5px; font-weight: 600; color: #2d3748; }
.chat-user-item .preview {
    font-size: 12px;
    color: #718096;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.chat-user-item .badge {
    background: #e53e3e;
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.chat-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
}
.chat-header .chat-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}
.chat-header .chat-status {
    font-size: 12px;
    color: #48bb78;
    display: flex;
    align-items: center;
    gap: 5px;
}
.chat-header .chat-status::before {
    content: '';
    width: 7px; height: 7px; border-radius: 50%;
    background: #48bb78;
    display: inline-block;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f7fafc;
}
.chat-msg {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.chat-msg.self { flex-direction: row-reverse; }
.chat-msg .msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #718096;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.chat-msg.self .msg-avatar { background: #667eea; }
.chat-msg .msg-body { max-width: 70%; }
.chat-msg .msg-name {
    font-size: 12px;
    color: #718096;
    margin-bottom: 4px;
}
.chat-msg .msg-text {
    background: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #2d3748;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    word-wrap: break-word;
}
.chat-msg.self .msg-text {
    background: #667eea;
    color: #fff;
}
.chat-msg .msg-time {
    font-size: 11px;
    color: #a0aec0;
    margin-top: 4px;
}
.chat-msg.self .msg-name,
.chat-msg.self .msg-time { text-align: right; }

.chat-input-area {
    padding: 14px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.chat-input-area textarea {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 42px;
    max-height: 120px;
    transition: border-color .15s;
}
.chat-input-area textarea:focus { border-color: #667eea; }

/* ========== 响应式：平板 ========== */
@media (max-width: 1100px) {
    .recharge-grid { grid-template-columns: repeat(3, 1fr); }
    .vip-plans { grid-template-columns: repeat(2, 1fr); }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .web-main { padding: 20px; }
    .web-topbar-inner { padding: 0 16px; }
    .web-two-col { flex-direction: column; gap: 16px; }
    .web-sidebar {
        width: 100%;
        position: static;
    }
    .web-content { margin-left: 0; }
    .park-grid { grid-template-columns: repeat(3, 1fr); }
    .recharge-grid { grid-template-columns: repeat(2, 1fr); }
    .vip-plans { grid-template-columns: 1fr; }
    .profile-row { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns: 1fr; height: auto; }
    .chat-sidebar { max-height: 240px; border-right: none; border-bottom: 1px solid #e2e8f0; }
    .chat-main { height: 500px; }
}

/* ========== 会员套餐卡片 ========== */
.plan-web-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 16px 0 8px;
}
.plan-web-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all .15s;
}
.plan-web-card:hover {
    border-color: #4299e1;
    box-shadow: 0 4px 12px rgba(66, 153, 225, .15);
    transform: translateY(-2px);
}
.plan-web-card.active {
    border-color: #e53e3e;
    background: #fff5f5;
    box-shadow: 0 4px 12px rgba(229, 62, 62, .15);
}
.plan-web-card.disabled {
    opacity: .55;
    pointer-events: none;
    background: #f7fafc;
}
.plan-web-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.plan-web-title {
    font-weight: 700;
    color: #2d3748;
    font-size: 15px;
}
.plan-web-price {
    font-size: 28px;
    font-weight: 800;
    color: #e53e3e;
    margin: 4px 0 10px;
}
.plan-web-unit {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
    margin-left: 4px;
}
.plan-web-desc {
    color: #4a5568;
    font-size: 13px;
    line-height: 1.6;
}

/* ========== 会员权益块 ========== */
.benefit-web {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #f7fafc;
    border-radius: 10px;
}
.benefit-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 16px;
}
.benefit-icon.vip { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.benefit-icon.svip { background: linear-gradient(135deg, #9f7aea, #805ad5); }

/* ========== 弹窗订单信息 ========== */
.order-info-box {
    background: #f7fafc;
    border-radius: 10px;
    padding: 12px 16px;
}
.order-info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: #4a5568;
    font-size: 14px;
}

/* ========== 支付方式选项 ========== */
.pay-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all .15s;
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}
.pay-option:hover {
    border-color: #4299e1;
    background: #f7fafc;
}
.pay-option.active {
    border-color: #e53e3e;
    background: #fff5f5;
}

.loading-tip {
    color: #4a5568;
    margin: 15px 0;
    display: none;
}
.recharge-money {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 10px 0;
    text-align: center;
}

/* ========== 响应式 ========== */
@media (max-width: 600px) {
    .stat-row { grid-template-columns: 1fr 1fr; }
    .park-grid { grid-template-columns: repeat(2, 1fr); }
    .recharge-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; }
    .web-topbar .top-nav { display: none; } /* 小屏隐藏中间导航 */
    .balance-card .amount { font-size: 28px; }
    .web-page-title { font-size: 18px; }
    .plan-web-row { grid-template-columns: 1fr; }
}
