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

/* ===== Liquid Glass 设计系统 ===== */
/* 白色背景 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    overscroll-behavior: none; /* 防止浏览器级 pull-to-refresh */
}

/* 移动端白色背景 */
@media (max-width: 768px) {
    body {
        background: #ffffff;
    }
    .container {
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        border-radius: 0;
        border: none;
    }
}

/* 容器 — 玻璃质感（浅色适配） */
.container {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px 20px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: fadeIn 0.5s ease;
    position: relative;
    z-index: 1;
}

/* 登录页：移除白色玻璃背景 */
#loginPage.container {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 40px 20px;
}
#loginPage h2 {
    color: #000 !important;
    text-shadow: none;
}
#loginPage .subtitle,
#loginPage .form-group label {
    color: #000;
    text-shadow: none;
}
#loginPage .form-group input {
    color: #000;
    background: transparent;
    border: none !important;
    border-bottom: none !important;
    outline: none;
    box-shadow: none;
    padding: 10px 0;
}
#loginPage .form-group input::placeholder {
    color: #999;
}
#loginPage .form-group input:focus {
    border: none !important;
    border-bottom: none !important;
    outline: none;
    box-shadow: none;
    background: transparent;
}

.container.shake {
    animation: shake 0.5s ease;
}

/* PC端容器内文字适配浅色玻璃背景 */
@media (min-width: 769px) {
    .container h2 {
        color: #333;
        text-shadow: none;
    }
    .container .subtitle {
        color: #888;
        text-shadow: none;
    }
    .container .form-group label {
        color: #555;
        text-shadow: none;
    }
    .container .pay-type-group > label {
        color: #555;
        text-shadow: none;
    }
    .container .pay-type-label {
        border-color: #d9d9d9;
        color: #666;
    }
    .container .pay-type-option input:checked + .pay-type-label {
        border-color: #1677ff;
        color: #1677ff;
        background: rgba(22, 119, 255, 0.06);
    }
    .container .pay-type-label:hover {
        border-color: #1677ff;
        color: #1677ff;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes checkmark {
    0% { stroke-dashoffset: 50; }
    100% { stroke-dashoffset: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* 标题 */
h2 {
    text-align: center;
    color: #333;
    margin-bottom: 8px;
    font-size: 28px;
    animation: fadeInDown 0.5s ease both;
}

.subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
    font-size: 14px;
    animation: fadeInDown 0.5s ease 0.08s both;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
    animation: slideUp 0.4s ease both;
}

.form-group:nth-child(1) { animation-delay: 0.05s; }
.form-group:nth-child(2) { animation-delay: 0.12s; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 15px;
    outline: none;
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
}

.form-group input::placeholder {
    color: #bbb;
    transition: color 0.3s;
}

.form-group input:focus::placeholder {
    color: #999;
}

.form-group input:focus {
    padding-left: 4px;
}

/* 输入框底部滑动线 */
.form-group {
    position: relative;
}

.form-group::after {
    display: none;
}

.form-group input ~ .error-msg.show {
    animation: shake 0.4s ease;
}

/* 支付方式选择器 */
.pay-type-group {
    margin-bottom: 20px;
    animation: slideUp 0.4s ease 0.18s both;
}

.pay-type-group::after {
    display: none;
}

.pay-type-options {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.pay-type-option {
    flex: 1;
    cursor: pointer;
}

.pay-type-option input {
    display: none;
}

.pay-type-label {
    display: block;
    text-align: center;
    padding: 10px 8px;
    border: 1.5px solid #d9d9d9;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: transparent;
    transition: all 0.25s ease;
}

.pay-type-option input:checked + .pay-type-label {
    border-color: #1677ff;
    color: #1677ff;
    background: rgba(22, 119, 255, 0.06);
}

.pay-type-option input:checked + .pay-type-label:hover {
    background: rgba(22, 119, 255, 0.1);
}

.pay-type-label:hover {
    border-color: #1677ff;
    color: #1677ff;
}

/* 按钮 */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.4s ease 0.2s both;
}

/* 按钮点击波纹 */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s, opacity 0.6s;
    opacity: 0;
}

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

.btn-primary {
    background: #1677ff;
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.3);
}

.btn-secondary {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: 1.5px dashed #ccc;
    border-radius: 12px;
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    border-color: #1677ff;
    color: #1677ff;
    background: rgba(22, 119, 255, 0.05);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* 按钮加载态 */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .btn-text {
    visibility: hidden;
}

.btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-danger {
    background: #ff4757;
    color: #fff;
    width: auto;
    padding: 10px 24px;
}

.btn-danger:hover {
    background: #e84141;
    transform: translateY(-2px);
}

/* 描边按钮 */
.btn-outline {
    padding: 10px 20px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.btn-outline:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* 管理员订单管理 */
#adminOrdersPage {
    padding-bottom: 20px;
}

#adminOrdersSearchInput {
    border-bottom: 1px solid #f0f0f0;
    padding-left: 0;
    font-size: 15px;
}

#adminOrdersSearchInput:focus {
    border-bottom-color: #1890ff;
}

.admin-order-item {
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}

.admin-order-item:last-child {
    border-bottom: none;
}

.admin-order-btn {
    padding: 2px 8px;
    font-size: 11px;
    border: 1px solid;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}

.admin-order-btn:hover {
    opacity: 0.8;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 注册图标按钮 */
.btn-icon-register {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

.btn-icon-register:hover {
    opacity: 1;
    transform: scale(1.15) rotate(-3deg);
    animation: none;
}

.btn-icon-register:active {
    transform: scale(0.95);
}

/* 注册弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 弹窗按钮 */
.modal-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

/* PC端注册图标和文字适配背景图 */
@media (min-width: 769px) {
    .container .btn-icon-register {
        opacity: 0.8;
    }
    .container .btn-icon-register:hover {
        opacity: 1;
    }
}

/* 切换链接 */
.switch-link {
    text-align: center;
    margin-top: 16px;
    color: #888;
    font-size: 14px;
}

.switch-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.switch-link a:hover {
    text-decoration: underline;
}

/* 错误消息 */
.error-msg {
    color: #ff4757;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.error-msg.show {
    display: block;
}

/* 首页 */
.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

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

.user-info {
    text-align: center;
    padding: 20px 0;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    color: #fff;
    font-weight: bold;
}

.user-detail {
    color: #555;
    margin: 6px 0;
    font-size: 15px;
}

.user-detail span {
    color: #333;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

/* 个人资料头部 */
.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding: 20px 4px 20px 16px;
    animation: fadeInDown 0.4s ease both;
}

.profile-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.profile-contact {
    font-size: 14px;
    color: #999;
}

/* 名称行 + 语言切换 */
.profile-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switch {
    position: relative;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 4px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 200;
    min-width: 100px;
    overflow: hidden;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: none;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}

.lang-option:hover {
    background: #f5f5f5;
    color: #1677ff;
}

/* PC 端适配浅色玻璃背景 */
@media (min-width: 769px) {
    .profile-name {
        color: #333;
        text-shadow: none;
    }
    .profile-contact {
        color: #888;
        text-shadow: none;
    }
}

/* 返回按钮 */
.btn-back {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1677ff;
}

/* 固定左上角返回按钮 - 无框架，默认隐藏，只在创建账号界面显示 */
.btn-back-fixed {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 999;
    background: none;
    backdrop-filter: none;
    box-shadow: none;
    border: none;
}

/* 创建结果提示 */
.create-result {
    text-align: center;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 16px;
    animation: fadeIn 0.3s ease;
}

.create-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.create-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

/* 用户管理列表项 */
.user-mgmt-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: all 0.2s;
}

.user-mgmt-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.user-mgmt-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1677ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-mgmt-info {
    flex: 1;
    min-width: 0;
}

.user-mgmt-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.user-mgmt-detail {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.user-mgmt-id {
    font-size: 11px;
    color: #bbb;
    margin-top: 1px;
}

.user-mgmt-role {
    font-size: 11px;
    font-weight: 500;
    border: 1px solid;
    border-radius: 10px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* PC 端用户管理列表适配浅色玻璃背景 */
@media (min-width: 769px) {
    .user-mgmt-item {
        background: transparent;
        backdrop-filter: none;
        border-color: transparent;
    }
    .user-mgmt-name {
        color: #333;
        text-shadow: none;
    }
    .user-mgmt-detail, .user-mgmt-id {
        color: #aaa;
    }
    .user-mgmt-item:hover {
        background: rgba(0, 0, 0, 0.02);
    }
}

/* PC 端返回按钮适配浅色玻璃背景 */
@media (min-width: 769px) {
    .btn-back {
        color: #999;
    }
    .btn-back:hover {
        color: #333;
        background: rgba(0, 0, 0, 0.04);
    }
}

/* ===== 编辑用户弹窗 ===== */
.user-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.user-edit-content {
    background: #fff;
    border-radius: 16px;
    width: 340px;
    max-width: 88%;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    animation: slideUp 0.25s ease;
}
.user-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.user-edit-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}
.user-edit-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}
.user-edit-close:hover {
    background: #f0f0f0;
    color: #333;
}
.user-edit-body {
    padding: 16px 20px 8px;
}
.user-edit-field {
    margin-bottom: 16px;
}
.user-edit-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.user-edit-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.user-edit-input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
}
.user-edit-desc {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    line-height: 1.4;
}
/* 开关样式 */
.user-edit-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.user-edit-switch input {
    display: none;
}
.user-edit-switch-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: #ddd;
    border-radius: 11px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.user-edit-switch-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.user-edit-switch input:checked + .user-edit-switch-slider {
    background: #1677ff;
}
.user-edit-switch input:checked + .user-edit-switch-slider::after {
    left: 21px;
}
.user-edit-switch-label {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}
.user-edit-footer {
    display: flex;
    gap: 10px;
    padding: 12px 20px 18px;
}
.user-edit-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.user-edit-btn-cancel {
    background: #f5f5f5;
    color: #666;
}
.user-edit-btn-cancel:hover {
    background: #ebebeb;
}
.user-edit-btn-save {
    background: #1677ff;
    color: #fff;
}
.user-edit-btn-save:hover {
    background: #1565e0;
}
.user-edit-btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 首页功能卡片 - 网格布局 */
.home-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    padding: 8px 4px 20px;
}

.home-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 16px 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cardFadeIn 0.5s ease both;
}

.home-card:nth-child(1) { animation-delay: 0.05s; }
.home-card:nth-child(2) { animation-delay: 0.12s; }
.home-card:nth-child(3) { animation-delay: 0.19s; }

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.home-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.home-card:active {
    transform: scale(0.96);
    transition-duration: 0.1s;
}

.card-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.card-desc {
    font-size: 12px;
    color: #999;
}

/* ===== 联系人页面 ===== */
#contactsPage,
#adminContactsPage {
    background: #fff;
    width: 100%;
    max-width: 800px;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    border-radius: 0;
}
#contactsPage > div:first-child,
#adminContactsPage > div:first-child {
    position: fixed !important;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    z-index: 999;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* 联系人页面内容顶部留出按钮高度 */
#contactsPage .contacts-panel,
#adminContactsPage .contacts-panel {
    padding-top: 48px;
}

/* 联系人页面去掉父容器 padding */
#userHomePage:has(#contactsPage:not(.hidden)),
#yunhaiHomePage:has(#adminContactsPage:not(.hidden)) {
    padding: 0 !important;
}

.contacts-panel {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    padding-left: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.friend-item:hover {
    background: #fafafa;
}

/* PC 端卡片适配浅色玻璃背景（保留兼容） */
@media (min-width: 769px) {
    .home-card {
        background: transparent;
        backdrop-filter: none;
    }
}

/* 底部导航栏 — Liquid Glass（浅色适配） */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 6px 0;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    color: #bbb;
    transition: all 0.3s ease;
    border-radius: 16px;
    margin: 0 4px;
}

.nav-item:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.02);
}

.nav-item.active {
    color: #333;
    background: rgba(0, 0, 0, 0.04);
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* PC 端导航栏适配 */
@media (min-width: 769px) {
    .bottom-nav {
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    .nav-item {
        color: #bbb;
    }
    .nav-item.active {
        color: #333;
    }
}

/* Tab 内容区 */
.tab-content {
    min-height: 80vh;
    padding-bottom: 90px;
    scroll-behavior: smooth;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-panel.active {
    display: block;
}

/* 管理员页面适配浅色玻璃背景 */
@media (min-width: 769px) {
    #yunhaiHomePage .tab-panel h2 {
        color: #333;
        text-shadow: none;
    }
    #yunhaiHomePage .tab-panel p,
    #yunhaiHomePage .tab-panel .user-detail {
        color: #888;
        text-shadow: none;
    }
    #yunhaiHomePage .tab-panel .user-detail span {
        color: #333;
    }
    #yunhaiHomePage .user-home-name {
        color: #222;
        text-shadow: none;
    }
    #yunhaiHomePage .user-home-tag {
        color: #777;
        text-shadow: none;
    }
    #yunhaiHomePage .user-section-title {
        color: #555;
        text-shadow: none;
    }
}

/* 充值金额选择按钮 */
.recharge-amount-btn {
    flex: 1;
    min-width: 50px;
    padding: 10px 0;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}
.recharge-amount-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}
.recharge-amount-btn.active {
    border-color: #1890ff;
    background: #e6f7ff;
    color: #1890ff;
}

/* ===== 移动端布局修复 ===== 
 * 防止底部导航栏跳动、联系人顶部栏跳动
 * 只针对移动端生效
 */
@media (max-width: 768px) {
      /* 首页全屏固定，不依赖 body 居中 */
      #yunhaiHomePage,
      #userHomePage {
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          width: 100%;
          max-width: none;
          margin: 0;
          padding: 0;
          min-height: 0;
          display: flex;
          flex-direction: column;
          overflow: hidden;
          animation: none;
      }
    #yunhaiHomePage .tab-content,
    #userHomePage .tab-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 90px;
        will-change: transform;
        transform: translateZ(0);
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scroll-behavior: smooth;
    }
    /* 联系人 tab 内部全高 */
    #contactsPage,
    #adminContactsPage {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
    }
    #contactsPageContainer,
    #adminContactsContainer {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    #userTabContacts,
    #yunhaiTabContacts {
        height: 100%;
        overflow: hidden;
    }
    #userTabContacts.active,
    #yunhaiTabContacts.active {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
}

/* ===== Liquid Glass 微动效 ===== */
/* 玻璃表面光泽扫光动画 */
@keyframes glassShine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.user-home-banner::before {
    background: linear-gradient(135deg,
        rgba(100, 80, 255, 0.15) 0%,
        rgba(255, 100, 150, 0.1) 50%,
        rgba(0, 200, 255, 0.08) 100%);
    background-size: 200% 200%;
    animation: glassShine 8s ease-in-out infinite alternate;
}

/* 卡片悬浮微光 */
#userHomePage .home-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.03) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#userHomePage .home-card:hover::after {
    opacity: 1;
}

/* 余额卡片微光 */
.user-balance-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 60%);
    pointer-events: none;
    opacity: 0.5;
}

/* ===== 普通用户首页美化 ===== */

/* 顶部横幅 — Liquid Glass 质感（浅色适配） */
.user-home-banner {
    position: relative;
    padding: 60px 20px 24px;
    overflow: hidden;
    border-radius: 24px;
    margin: 16px 12px 0;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.user-home-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(100, 80, 255, 0.04) 0%, rgba(255, 100, 150, 0.03) 50%, rgba(0, 200, 255, 0.03) 100%);
    border-radius: 24px;
}
.user-home-banner::after {
    display: none;
}
.user-home-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 72px;
}
.user-home-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.user-home-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-home-avatar-frame {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 112px;
    height: 112px;
    z-index: 2;
    pointer-events: none;
}
.user-home-avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.user-home-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.user-home-name {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-home-tag {
    font-size: 13px;
    color: #777;
    font-weight: 500;
}
.user-home-actions {
    position: absolute;
    top: 12px;
    right: 14px;
    display: flex;
    gap: 8px;
    z-index: 2;
}
.user-home-actions button {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}
.user-home-actions button:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.user-home-actions button:active {
    transform: scale(0.92);
}

/* 退出登录按钮 */
.user-logout-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    color: #999;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    white-space: nowrap;
}
.user-logout-btn:hover {
    background: rgba(255, 77, 79, 0.06);
    border-color: rgba(255, 77, 79, 0.15);
    color: #ff4d4f;
}
.user-logout-btn:active {
    transform: scale(0.95);
}
/* 余额卡片 — Liquid Glass（浅色适配） */
.user-balance-card {
    position: relative;
    margin: 16px 12px 12px;
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(100, 80, 255, 0.08), rgba(0, 200, 255, 0.06));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(100, 80, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px rgba(100, 80, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.user-balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(100, 80, 255, 0.1);
}
.user-balance-card:active {
    transform: scale(0.97);
}
.user-balance-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.user-balance-label {
    font-size: 13px;
}
#userTabHome .user-balance-card .user-balance-left .user-balance-label {
    color: #000000;
}
.user-balance-amount {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    letter-spacing: -0.5px;
}
#adminTotalUsersCount {
    color: #ffffff;
}
#adminTotalUsersCard {
    color: #ffffff;
}
.user-balance-right {
    width: 36px;
    height: 36px;
    background: rgba(100, 80, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.user-balance-card:hover .user-balance-right {
    transform: translateX(3px);
}
.user-balance-right svg {
    transform: rotate(180deg);
}

/* 功能卡片区域标题 */
.user-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #555;
    padding: 4px 16px 8px;
}

/* 快捷提示条 */
.home-notice-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 12px 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border-radius: 12px;
    font-size: 13px;
    color: #888;
}
.home-notice-bar .notice-icon {
    font-size: 16px;
}
.home-notice-bar .notice-text {
    flex: 1;
}

/* 底部提示 */
.home-footer-tip {
    text-align: center;
    font-size: 12px;
    color: #bbb;
    padding: 8px 0 4px;
}

/* 三卡片网格 */
#userHomePage .home-cards,
#yunhaiHomePage .home-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 0 12px 20px;
}
#userHomePage .home-card,
#yunhaiHomePage .home-card {
    position: relative;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cardFadeIn 0.5s ease both;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
#userHomePage .home-card:hover,
#yunhaiHomePage .home-card:hover {
    transform: translateY(-4px) scale(1.02);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
}
#userHomePage .home-card:active,
#yunhaiHomePage .home-card:active {
    transform: scale(0.95);
}
#userHomePage .card-title {
    font-size: 14px;
    font-weight: 600;
    color: #444;
}
#userHomePage .card-desc {
    font-size: 11px;
    color: #aaa;
    margin-top: 1px;
}

/* 未支付订单可点击 */
.order-unpaid {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.order-unpaid:hover {
    background: #f0f5ff;
    border-color: #1677ff;
}
.order-unpaid:active {
    transform: scale(0.99);
}
.order-unpaid::after {
    content: '点击重新支付';
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 11px;
    color: #1677ff;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.order-unpaid:hover::after {
    opacity: 1;
}

/* ===== 推送通知设置弹窗 ===== */
.push-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.push-settings-content {
    background: #fff;
    border-radius: 16px;
    width: 300px;
    max-width: 85%;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.25s ease;
}
.push-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.push-settings-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}
.push-settings-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.push-settings-close:hover {
    background: #f0f0f0;
    color: #333;
}
.push-settings-body {
    padding: 16px 18px 20px;
}
.push-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}
.push-settings-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #333;
    font-weight: 500;
}
.push-settings-desc {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    line-height: 1.5;
}

/* 开关样式 - 按钮版 */
.push-toggle-btn {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 26px;
    border: none;
    cursor: pointer;
    background: #ccc;
    transition: background 0.3s ease;
    padding: 0;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
}
.push-toggle-btn::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.push-toggle-btn.active {
    background: #1677ff;
}
.push-toggle-btn.active::after {
    transform: translateX(22px);
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== 客服聊天界面美化 ===== */

/* 全屏聊天容器 */
#adminKefuChatFullscreen,
#kefuChatFullscreen {
    background: #f0f2f5 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* 聊天头部 */
#adminKefuChatFullscreen > div:first-child,
#kefuChatFullscreen > div:first-child {
    background: #ffffff !important;
    border-bottom: 1px solid #e8e8e8 !important;
    padding: 14px 16px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    z-index: 10;
    position: relative;
}

#adminKefuChatFullscreen > div:first-child span,
#kefuChatFullscreen > div:first-child span {
    color: #333 !important;
}

#adminKefuChatFullscreen > div:first-child svg,
#kefuChatFullscreen > div:first-child svg {
    fill: #666 !important;
    color: #666 !important;
}

#adminKefuChatFullscreen > div:first-child button svg,
#kefuChatFullscreen > div:first-child button svg {
    fill: #666 !important;
}

#adminKefuChatTitle,
#kefuChatTitle {
    color: #333 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
}

/* 三点菜单下拉 */
#kefuMoreDropdown {
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    border: none !important;
    padding: 6px !important;
}

#kefuMoreDropdown div {
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    transition: background 0.15s ease;
}

#kefuMoreDropdown div:hover {
    background: #f5f5f5 !important;
}

/* 消息区域 */
#adminKefuChatMessages,
#kefuChatMessages {
    background: #f0f2f5 !important;
    padding: 16px !important;
}

/* 消息气泡 - 对方(客户) */
#adminKefuChatMessages div[style*="flex-start"] > div:last-child,
.kefu-msg-bubble[style*="background:#fff"] {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04) !important;
    border: none !important;
    border-radius: 18px 18px 18px 4px !important;
    background: #fff !important;
    color: #333 !important;
    position: relative;
}

/* 消息气泡 - 我方(客服) */
#adminKefuChatMessages div[style*="flex-end"] > div:last-child,
.kefu-msg-bubble[style*="background:#1a73e8"] {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 18px 18px 4px 18px !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25) !important;
    position: relative;
}

/* 管理员聊天消息 - 对方气泡 */
#adminKefuChatMessages > div[style*="flex-start"] > div[style*="max-width"] {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    border: none !important;
    border-radius: 18px 18px 18px 4px !important;
    background: #fff !important;
    color: #333 !important;
}

/* 管理员聊天消息 - 我方气泡 */
#adminKefuChatMessages > div[style*="flex-end"] > div[style*="max-width"] {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 18px 18px 4px 18px !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25) !important;
}

/* 名称时间文字 */
#adminKefuChatMessages span[style*="font-size:11px"],
#kefuChatMessages span[style*="font-size:11px"] {
    color: #999 !important;
    font-size: 11px !important;
    font-weight: 400 !important;
}

/* 已读状态 */
.kefu-read-status {
    font-size: 10px !important;
    color: #4caf50 !important;
    font-weight: 500 !important;
    margin-top: 2px !important;
}

/* 输入区域 */
#adminKefuChatFullscreen > div:last-child,
#kefuInputArea {
    background: #fff !important;
    border-top: 1px solid #e8e8e8 !important;
    padding: 10px 12px !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 4px)) !important;
    gap: 8px !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
    z-index: 10;
}

/* 输入框 */
#adminKefuChatInput,
#kefuChatInput {
    background: #f5f6f8 !important;
    border: 2px solid transparent !important;
    border-radius: 20px !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    transition: border-color 0.2s ease, background 0.2s ease;
}

#adminKefuChatInput:focus,
#kefuChatInput:focus {
    border-color: #1a73e8 !important;
    background: #fff !important;
    outline: none !important;
}

/* 工具按钮 (图片、快捷回复、话术) */
#adminKefuImageBtn,
#adminKefuQuickReplyBtn,
#adminKefuChatScriptBtn,
#kefuImageBtn,
#kefuQuickReplyBtn,
#kefuChatScriptBtn {
    width: 38px !important;
    height: 38px !important;
    border: none !important;
    border-radius: 50% !important;
    background: #f5f6f8 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0 !important;
}

#adminKefuImageBtn:hover,
#adminKefuQuickReplyBtn:hover,
#adminKefuChatScriptBtn:hover,
#kefuImageBtn:hover,
#kefuQuickReplyBtn:hover,
#kefuChatScriptBtn:hover {
    background: #e8eaf0 !important;
    transform: scale(1.05);
}

#adminKefuImageBtn svg,
#kefuImageBtn svg {
    fill: #555 !important;
}

/* 发送按钮 */
#adminKefuChatFullscreen button[style*="background:#1a73e8"],
#kefuInputArea button[style*="background:#1a73e8"] {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 10px 22px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

#adminKefuChatFullscreen button[style*="background:#1a73e8"]:hover,
#kefuInputArea button[style*="background:#1a73e8"]:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
}

#adminKefuChatFullscreen button[style*="background:#1a73e8"]:active,
#kefuInputArea button[style*="background:#1a73e8"]:active {
    transform: scale(0.97);
}

/* 面板 (快捷回复、话术) 美化 */
#adminKefuQuickReplyPanel,
#adminKefuChatScriptPanel,
#kefuQuickReplyPanel,
#kefuChatScriptPanel {
    border: none !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: 0 -6px 30px rgba(0,0,0,0.12) !important;
    background: #fff !important;
    padding: 14px 16px 10px !important;
    max-height: 320px !important;
}

/* 订单通知横幅 */
#kefuOrderNotify {
    background: linear-gradient(135deg, #fff8e1, #ffecb3) !important;
    border-bottom: 1px solid #ffe082 !important;
}

/* 会话列表中的未读徽章 */
.admin-kefu-unread-badge,
.kefu-unread-badge {
    background: #ff4d4f !important;
    color: #fff !important;
    border-radius: 50% !important;
    min-width: 18px !important;
    height: 18px !important;
    font-size: 11px !important;
    line-height: 18px !important;
    text-align: center !important;
    padding: 0 4px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(255, 77, 79, 0.4) !important;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 2px 6px rgba(255, 77, 79, 0.4); }
    50% { box-shadow: 0 2px 10px rgba(255, 77, 79, 0.6); }
}

/* 消息条目进入动画 */
.kefu-msg-item {
    animation: msgSlideIn 0.25s ease both;
}

@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 订单卡片 */
.kefu-msg-bubble[style*="max-width:320px"] {
    border: none !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
    border-radius: 14px !important;
    overflow: hidden;
}

/* 头像微调 */
#kefuChatMessages img[style*="border-radius:50%"],
#adminKefuChatMessages img[style*="border-radius:50%"] {
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* 快捷回复和话术面板内的文字 */
#adminKefuQuickReplyPanel span,
#adminKefuChatScriptPanel span,
#kefuQuickReplyPanel span,
#kefuChatScriptPanel span {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

/* 弹窗美化 */
#adminKefuPromptModal > div,
#kefuPromptModal > div {
    border-radius: 18px !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15) !important;
    animation: modalPop 0.2s ease both;
}

/* 输入框内部美化 */
#adminKefuQuickReplyPanel input,
#adminKefuChatScriptPanel input,
#kefuQuickReplyPanel input,
#kefuChatScriptPanel input {
    border-radius: 10px !important;
    border: 1px solid #ddd !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    outline: none !important;
    transition: border-color 0.2s;
}

#adminKefuQuickReplyPanel input:focus,
#adminKefuChatScriptPanel input:focus,
#kefuQuickReplyPanel input:focus,
#kefuChatScriptPanel input:focus {
    border-color: #1a73e8 !important;
}

/* ===== 会话列表界面美化 ===== */

/* 客服面板容器 - 卡片背景 */
#adminKefuPanel,
#kefuPanel {
    flex: 1;
    overflow-y: auto;
    padding: 0 !important;
    background: transparent !important;
}

#adminKefuSessionListView,
#kefuSessionListView {
    padding: 8px 12px 16px;
}

/* 会话列表标题区 */
#adminKefuSessionListView > div:first-child,
#kefuSessionListView > div:first-child {
    padding: 8px 4px 12px !important;
    background: transparent !important;
}

#adminKefuSessionListView > div:first-child span,
#kefuSessionListView > div:first-child span {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    letter-spacing: -0.3px;
}

/* 刷新按钮 */
#adminKefuSessionListView > div:first-child button,
#kefuSessionListView > div:first-child button {
    background: #f0f2f5 !important;
    border: none !important;
    border-radius: 20px !important;
    color: #555 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 6px 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

#adminKefuSessionListView > div:first-child button:hover,
#kefuSessionListView > div:first-child button:hover {
    background: #e4e6eb !important;
    color: #1a73e8 !important;
}

/* 会话列表中的单个会话项 - 卡片样式 */
#adminKefuSessionList > div,
#kefuSessionList > div {
    background: #fff !important;
    border-radius: 14px !important;
    padding: 14px 14px !important;
    margin-bottom: 8px !important;
    border-bottom: none !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

#adminKefuSessionList > div:hover,
#kefuSessionList > div:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04) !important;
}

#adminKefuSessionList > div:active,
#kefuSessionList > div:active {
    transform: scale(0.98);
}

/* 会话项中的平台头像 */
#adminKefuSessionList > div > div:first-child,
#kefuSessionList > div > div:first-child {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    font-size: 20px !important;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 平台名称文字 */
#adminKefuSessionList > div span:first-child,
#kefuSessionList > div span:first-child {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
}

/* 时间文字 */
#adminKefuSessionList > div span[style*="color:#999"]:first-child,
#kefuSessionList > div span[style*="color:#999"]:first-child {
    font-size: 11px !important;
    color: #aaa !important;
}

/* 客户名 */
#adminKefuSessionList > div div[style*="font-size:12px"],
#kefuSessionList > div div[style*="font-size:12px"] {
    font-size: 13px !important;
    color: #666 !important;
    margin-top: 4px !important;
}

/* 客服名 */
#adminKefuSessionList > div div[style*="font-size:11px"],
#kefuSessionList > div div[style*="font-size:11px"] {
    font-size: 11px !important;
    color: #bbb !important;
    margin-top: 2px !important;
}

/* 整体页面背景 */
#adminContactsPage,
#contactsPage {
    background: #f5f6f8 !important;
}

/* 联系人面板、圈届面板背景 */
#adminFriendsPanel,
#adminCirclePanel,
#friendsPanel,
#circlePanel {
    flex: 1;
    overflow-y: auto;
}

/* 联系人列表也应用卡片样式 */
#adminContactsList > div,
#contactsList > div,
#adminCircleFriendList > div,
#circleChatFriendList > div {
    background: #fff !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#adminContactsList > div:hover,
#contactsList > div:hover,
#adminCircleFriendList > div:hover,
#circleChatFriendList > div:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
}

/* 底部导航栏美化（如果存在） */
#adminContactsPage .contacts-panel,
#contactsPage .contacts-panel {
    flex: 1;
    overflow-y: auto;
}

/* 会话列表加载中和空状态 */
#adminKefuSessionLoading,
#kefuSessionLoading {
    text-align: center;
    padding: 60px 20px !important;
    color: #bbb !important;
    font-size: 14px !important;
}
