/* 统一前端样式 - 蓝紫色主题 */

/* 变量定义 */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #a3bffa;
    --secondary: #764ba2;
    --secondary-light: #9f7aea;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-hover: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
    --text-dark: #1a202c;
    --text-gray: #718096;
    --bg-light: #f7fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
    --shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.1), 0 2px 4px -1px rgba(118, 75, 162, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(102, 126, 234, 0.15), 0 4px 6px -2px rgba(118, 75, 162, 0.1);
    --radius: 16px;
    --radius-sm: 10px;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* 用户端布局 */
.user-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 侧边栏布局 */
.user-app.has-sidebar {
    display: flex;
    flex-direction: row;
}

.user-sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--gradient);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    box-shadow: 2px 0 10px rgba(102, 126, 234, 0.2);
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 24px 20px;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-username {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.sidebar-balance {
    font-size: 12px;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 16px;
    display: inline-block;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s;
    gap: 12px;
    font-size: 14px;
    border-radius: 0 24px 24px 0;
    margin: 2px 12px 2px 0;
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.sidebar-menu-item.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-menu-item .menu-icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .sidebar-menu-item {
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-footer .sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 移动端侧边栏切换 */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 300;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: white;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    font-size: 20px;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
}

.sidebar-overlay.show {
    display: block;
}

@media (max-width: 768px) {
    .user-app.has-sidebar {
        flex-direction: column;
    }

    .user-sidebar {
        transform: translateX(-100%);
        width: 280px;
        max-width: 85vw;
    }
    
    .user-sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 32px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 80px 20px 20px;
        width: 100%;
        max-width: 100%;
    }
}

/* 页面头部 - 紫色渐变 Banner */
.page-header {
    margin-bottom: 28px;
}

.page-header-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 32px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.page-header-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.page-header-banner::after {
    content: '';
    position: absolute;
    bottom: -60%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.page-header-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.page-header-banner-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.page-header-banner-text h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.page-header-banner-text p {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.5;
}

.page-header-banner-badge {
    position: absolute;
    bottom: 0;
    left: 24px;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 12px;
    border-radius: 0 8px 0 0;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

.page-header-banner-deco {
    font-size: 80px;
    opacity: 0.15;
    position: absolute;
    right: 32px;
    bottom: -8px;
    z-index: 0;
    line-height: 1;
}

/* ========== 首页快捷操作卡片 ========== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 4px;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 28px;
    border-radius: 16px;
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.10);
    cursor: pointer;
}

/* 悬停动画 */
.quick-action-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    transition: all 0.5s ease;
    pointer-events: none;
}
.quick-action-card:hover::before {
    top: -20%;
    right: -20%;
}
.quick-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

/* 各卡片渐变色 */
.qa-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.qa-green   { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); }
.qa-blue    { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.qa-orange  { background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%); }

.qa-icon {
    font-size: 38px;
    margin-bottom: 14px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}
.quick-action-card:hover .qa-icon {
    transform: scale(1.15);
}

.qa-label {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.qa-desc {
    font-size: 12px;
    opacity: 0.85;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header-banner {
        padding: 24px 20px;
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
        gap: 12px;
    }
    .page-header-banner-left {
        width: 100%;
        align-items: flex-start;
    }
    .page-header-banner-text h1 {
        font-size: 18px;
        word-break: break-word;
    }
    .page-header-banner-text p {
        font-size: 13px;
        word-break: break-word;
    }
    .page-header-banner-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    .page-header-banner-deco {
        font-size: 60px;
        right: 16px;
        bottom: -4px;
    }
}

/* 保留旧 page-title/page-subtitle 样式兼容 */
.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title .icon {
    font-size: 32px;
}

.page-subtitle {
    color: var(--text-gray);
    font-size: 15px;
}

/* 卡片样式 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .icon {
    font-size: 22px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* 按钮内价格标签 */
.btn-price-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary .btn-price-tag {
    background: rgba(255, 255, 255, 0.3);
}

.btn-primary:hover .btn-price-tag {
    background: rgba(255, 255, 255, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* 统计卡片 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-item {
    background: var(--gradient);
    color: white;
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.stat-item .value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-item .label {
    font-size: 14px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 18px;
}

.empty-state p {
    margin-bottom: 24px;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.login-title {
    text-align: center;
    margin-bottom: 32px;
}

.login-title h1 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-title p {
    color: var(--text-gray);
    font-size: 14px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    background: white;
}

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

table th,
table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

table th {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 2px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 1;
}

table tbody tr {
    transition: all 0.2s ease;
}

table tbody tr:hover {
    background: linear-gradient(90deg, #f8f9ff 0%, #fafafa 100%);
}

table tbody tr:last-child td {
    border-bottom: none;
}

table td {
    color: #333;
}

/* 状态标签 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: rgba(72, 187, 120, 0.15);
    color: #38a169;
}

.status-badge.warning {
    background: rgba(237, 137, 54, 0.15);
    color: #dd6b20;
}

.status-badge.danger {
    background: rgba(245, 101, 101, 0.15);
    color: #e53e3e;
}

.status-badge.info {
    background: rgba(66, 153, 225, 0.15);
    color: #3182ce;
}

/* 分页 - 美化版 */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 13px;
    color: #718096;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    padding: 6px 14px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pagination button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.08);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.pagination button:hover:not(:disabled)::before {
    width: 120%;
    height: 120%;
}

.pagination button:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
}

.pagination button.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: scale(1.08);
}

.pagination button.active::before {
    display: none;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: #e2e8f0;
    color: #a0aec0;
}

.pagination-ellipsis {
    color: #a0aec0;
    padding: 0 8px;
    font-size: 20px;
    letter-spacing: 4px;
    display: flex;
    align-items: center;
    font-weight: bold;
}

/* 记录卡片样式 */
.record-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.record-card:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.record-icon {
    font-size: 32px;
    margin-right: 16px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

.record-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-gray);
}

.record-type {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.record-date {
    color: #a0aec0;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-gray);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 内容详情弹窗（公告、帮助等共用） */
#annDetailModal,
#helpDetailModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 35, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    animation: userDetailModalFadeIn 0.2s ease;
}
@keyframes userDetailModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.ann-modal-box {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 560px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: userDetailModalSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes userDetailModalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.ann-modal-head {
    padding: 28px 32px 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}
#helpDetailModal .ann-modal-head::after {
    content: '❓';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    opacity: 0.12;
}
#annDetailModal .ann-modal-head::after {
    content: '📢';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    opacity: 0.12;
}
.ann-modal-head h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    padding-right: 60px;
}
.ann-modal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    opacity: 0.85;
}
.ann-modal-body {
    padding: 28px 32px;
    max-height: 380px;
    overflow-y: auto;
    line-height: 1.9;
    color: #4a5568;
    font-size: 15px;
    white-space: pre-wrap;
    word-break: break-word;
}
.ann-modal-body::-webkit-scrollbar { width: 4px; }
.ann-modal-body::-webkit-scrollbar-track { background: #f7fafc; }
.ann-modal-body::-webkit-scrollbar-thumb { background: #c3cfff; border-radius: 2px; }
.ann-modal-foot {
    padding: 0 32px 28px;
    display: flex;
    justify-content: flex-end;
}
.ann-close-btn {
    padding: 11px 30px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
    transition: all 0.2s;
}
.ann-close-btn:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.toast.error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.toast.warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* 搜索框样式 - 带搜索按钮 */
.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-box input {
    flex: 1;
    padding: 12px 16px 12px 44px;
    border: none;
    font-size: 14px;
    background: transparent;
    font-family: inherit;
    color: var(--text-dark);
    outline: none;
}

.search-box input::placeholder {
    color: #a0aec0;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #a0aec0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.search-box:focus-within .search-icon {
    color: var(--primary);
}

.search-box .btn-search {
    padding: 10px 20px;
    border: none;
    background: var(--gradient);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.search-box .btn-search:hover {
    background: var(--gradient-hover);
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ============================================================
   移动端响应式全面优化
   ============================================================ */

/* ---- 768px 平板/大手机 ---- */
@media (max-width: 768px) {
    .card {
        padding: 16px;
    }

    .page-title {
        font-size: 22px;
    }

    .btn {
        padding: 10px 18px;
        min-height: 44px;
        min-width: 44px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* 侧边栏用户名截断 */
    .sidebar-username {
        max-width: 140px;
    }

    /* 统计卡片缩小 */
    .stat-item {
        padding: 16px;
    }

    .stat-item .value {
        font-size: 24px;
    }

    /* 表格响应式 */
    table th,
    table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    /* 模态框全宽 */
    .modal-content {
        max-width: 95%;
        margin: 0 10px;
    }

    /* 表单输入增加触摸尺寸 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* 防止iOS自动缩放 */
        padding: 12px;
    }

    /* 快捷操作网格 */
    .action-grid,
    [style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* 搜索框全宽 */
    .search-box {
        max-width: 100%;
    }

    /* 标签页横向滚动 */
    .settings-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .settings-tabs::-webkit-scrollbar {
        display: none;
    }
    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* 分页按钮 */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }
    .pagination button {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 36px;
        min-height: 36px;
    }
}

/* ---- 480px 小手机 ---- */
@media (max-width: 480px) {
    .main-content {
        padding: 80px 12px 16px;
    }

    .page-title {
        font-size: 20px;
    }

    .page-title .icon {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    .card {
        padding: 14px;
        border-radius: 12px;
    }

    /* 统计卡片单列 */
    .stats-row {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .stat-item {
        padding: 14px;
    }

    .stat-item .value {
        font-size: 22px;
    }

    .stat-item .label {
        font-size: 12px;
    }

    /* 模态框极致适配 */
    .modal-content {
        max-width: 98%;
        max-height: 92vh;
        border-radius: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    /* 表单 */
    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    /* 按钮 */
    .btn {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 10px;
    }

    .btn-lg {
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Toast 提示 */
    .toast {
        bottom: 16px;
        left: 12px;
        right: 12px;
        padding: 14px 16px;
        font-size: 13px;
        border-radius: 10px;
    }

    /* 空状态 */
    .empty-state {
        padding: 40px 16px;
    }

    .empty-state .icon {
        font-size: 48px;
    }

    /* 快捷操作 2 列改 1 列 */
    [style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }
}

/* ---- 360px 超小屏（低端安卓）---- */
@media (max-width: 360px) {
    .main-content {
        padding: 76px 8px 12px;
    }

    .card {
        padding: 12px;
        border-radius: 10px;
    }

    .page-title {
        font-size: 18px;
    }

    .stat-item {
        padding: 12px;
    }

    .stat-item .value {
        font-size: 20px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }

    .btn {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 8px;
    }
}

/* ============================================================
   所有页面组件移动端修复
   （优先级最高，覆盖各页面的特殊内联样式）
   ============================================================ */

/* ---- 768px 通用组件修复 ---- */
@media (max-width: 768px) {

    /* ========== 统计网格（index + wallet） ========== */
    .stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* ========== 首页公告栏 ========== */
    #announcementBar {
        padding: 12px !important;
    }
    #announcementBar [style*="font-size: 14px"] {
        font-size: 13px !important;
        white-space: normal !important;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ========== 公告卡片（announcements.html）========== */
    .ann-header-banner {
        padding: 20px 20px !important;
        border-radius: 16px !important;
    }
    .ann-header-banner h2 {
        font-size: 20px !important;
    }
    .ann-header-banner::before {
        font-size: 56px !important;
        right: 16px !important;
    }
    .ann-card-body {
        padding: 14px 16px !important;
    }
    .ann-card-top {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .ann-card-title {
        font-size: 14px !important;
        flex-basis: 100% !important;
    }
    .ann-card-top > div:last-child {
        margin-left: auto !important;
    }
    .ann-badge-new,
    .ann-badge-read {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
    .ann-card-date {
        font-size: 11px !important;
    }

    /* ========== 公告详情弹窗 ========== */
    .ann-modal-box {
        width: 96% !important;
        max-height: 90vh !important;
    }
    .ann-modal-head {
        padding: 20px 20px 16px !important;
    }
    .ann-modal-head h3 {
        font-size: 16px !important;
        padding-right: 48px !important;
    }
    .ann-modal-body {
        padding: 16px 20px !important;
        max-height: calc(90vh - 140px) !important;
        font-size: 14px !important;
    }
    .ann-modal-foot {
        padding: 0 20px 20px !important;
    }
    .ann-close-btn {
        padding: 10px 24px !important;
        font-size: 13px !important;
        width: 100% !important;
    }

    /* ========== 工单系统（ticket.html）========== */
    .ticket-container {
        padding: 0 !important;
    }
    .ticket-form {
        padding: 16px !important;
        border-radius: 14px !important;
    }
    .ticket-form h3 {
        font-size: 16px !important;
        margin-bottom: 16px !important;
    }
    .ticket-list {
        padding: 16px !important;
        border-radius: 14px !important;
    }
    .ticket-list h3 {
        font-size: 16px !important;
        margin-bottom: 16px !important;
    }
    .ticket-item {
        padding: 14px !important;
    }
    .ticket-modal-content {
        max-height: 85vh !important;
        border-radius: 16px !important;
    }
    .ticket-modal-header {
        padding: 16px 16px !important;
    }
    .ticket-modal-header h3 {
        font-size: 16px !important;
    }
    .ticket-modal-body {
        padding: 16px !important;
    }
    .ticket-modal-footer {
        padding: 12px 16px !important;
    }
    .close-btn {
        width: 100% !important;
    }

    /* ========== 钱包页面（wallet.html）========== */
    .stat-item .value {
        font-size: 22px !important;
    }

    /* 充值金额按钮网格 */
    #amountButtons {
        gap: 8px !important;
    }
    .amount-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
        flex: 1 !important;
        min-width: 60px !important;
    }

    /* 支付方式按钮 */
    #paymentMethods > div {
        flex-direction: column !important;
    }
    .payment-btn {
        justify-content: center !important;
    }

    /* 支付弹窗 */
    #paymentModal .modal-content {
        max-width: 96% !important;
        margin: 0 auto !important;
        border-radius: 16px !important;
    }
    #paymentModal .modal-content > div[style*="padding: 24px"] {
        padding: 16px !important;
    }
    #paymentAmountDisplay {
        font-size: 28px !important;
    }
    #qrcodeContainer {
        padding: 14px !important;
    }
    #paymentQrcode,
    #qrcodeContainer [style*="width: 200px"] {
        width: 160px !important;
        height: 160px !important;
    }
    #qrcodeLoading [style*="width: 40px"] {
        width: 32px !important;
        height: 32px !important;
    }
    #paymentInstructions {
        font-size: 12px !important;
    }
    #paymentModal > div > div:last-child {
        flex-direction: column !important;
    }
    #paymentModal > div > div:last-child > button {
        width: 100% !important;
        flex: none !important;
    }

    /* 全部提现记录弹窗 */
    #allWithdrawalModal > div {
        max-width: 96% !important;
        max-height: 88vh !important;
        border-radius: 16px !important;
    }

    /* ========== 邀请页（invite.html）========== */
    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    #inviteLink {
        font-size: 12px !important;
        word-break: break-all !important;
    }

    /* 复制成功弹窗 */
    #copyModal .modal-content {
        max-width: 96% !important;
        border-radius: 18px !important;
    }
    #copyModal .modal-body {
        padding: 24px 16px 20px !important;
    }
    #copyPreviewBox {
        font-size: 12px !important;
        padding: 12px !important;
    }
    #copyModal .modal-footer {
        padding: 0 16px 20px !important;
    }
    #copyModal .modal-footer button {
        width: 100% !important;
    }

    /* ========== 设置页（settings.html）========== */
    .form-row {
        grid-template-columns: 1fr !important;
    }

    /* ========== 文档记录（records.html）========== */
    .toolbar {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .toolbar > .btn-primary {
        width: 100% !important;
        justify-content: center !important;
    }
    .search-box {
        max-width: 100% !important;
    }
}

/* ---- 480px 小屏 ---- */
@media (max-width: 480px) {

    /* 统计网格单列 */
    .stats-row {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* 公告弹窗极致适配 */
    .ann-modal-box {
        width: 98% !important;
        max-height: 92vh !important;
        border-radius: 20px 20px 0 0 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 1% !important;
        top: auto !important;
        animation: slideUpFromBottom 0.3s ease !important;
    }
    @keyframes slideUpFromBottom {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }
    .ann-modal-head {
        padding: 18px 16px 14px !important;
    }
    .ann-modal-head h3 {
        font-size: 15px !important;
        padding-right: 40px !important;
    }
    .ann-modal-body {
        padding: 14px 16px !important;
        max-height: calc(92vh - 110px) !important;
        font-size: 14px !important;
    }
    .ann-modal-foot {
        padding: 0 16px 18px !important;
    }
    .ann-close-btn {
        width: 100% !important;
        border-radius: 12px !important;
    }

    /* 工单详情 */
    .ticket-modal-content {
        max-height: 90vh !important;
        width: 98% !important;
    }
    .ticket-modal-header {
        padding: 14px 14px !important;
    }
    .ticket-modal-body {
        padding: 14px !important;
    }

    /* 支付弹窗极致适配 */
    #paymentModal {
        padding: 10px !important;
        align-items: flex-end !important;
    }
    #paymentModal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        position: relative !important;
        animation: slideUpFromBottom 0.3s ease !important;
    }
    #paymentAmountDisplay {
        font-size: 26px !important;
    }
    #paymentQrcode {
        width: 140px !important;
        height: 140px !important;
    }
    #qrcodeContainer {
        padding: 12px !important;
    }
    #qrcodeLoading {
        width: 140px !important;
        height: 140px !important;
    }
    #paymentInstructions {
        font-size: 11px !important;
    }
    #paymentModal > div > div:last-child {
        flex-direction: column !important;
        gap: 8px !important;
    }
    #paymentModal > div > div:last-child > button {
        width: 100% !important;
    }

    /* 全部提现记录 */
    #allWithdrawalModal {
        padding: 10px !important;
        align-items: flex-end !important;
    }
    #allWithdrawalModal > div {
        width: 100% !important;
        max-height: 85vh !important;
        border-radius: 16px 16px 0 0 !important;
        position: relative !important;
    }
    #allWithdrawalModal > div > div:first-child {
        padding: 16px 16px 12px !important;
        border-radius: 16px 16px 0 0 !important;
    }
    #allWithdrawalModal > div > div:nth-last-child(-n+2) {
        padding: 12px 16px !important;
    }

    /* 邀请复制弹窗 */
    #copyModal {
        align-items: flex-end !important;
    }
    #copyModal .modal-content {
        width: 98% !important;
        border-radius: 18px 18px 0 0 !important;
        position: relative !important;
        animation: slideUpFromBottom 0.3s ease !important;
    }
    #copyModal .modal-body {
        padding: 20px 14px 16px !important;
    }
    #copyPreviewBox {
        font-size: 12px !important;
        max-height: 100px !important;
    }
    #copyModal .modal-footer {
        padding: 0 14px 16px !important;
    }
    #copyModal .modal-footer button {
        border-radius: 12px !important;
    }

    /* 公告卡片 */
    .ann-card-body {
        padding: 12px 14px !important;
    }
    .ann-card-preview {
        font-size: 13px !important;
    }

    /* 工单 */
    .ticket-modal-footer {
        padding: 10px 14px !important;
    }

    /* 快捷操作 */
    .card > div[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

/* ---- 360px 超小屏 ---- */
@media (max-width: 360px) {
    .stats-row {
        gap: 8px !important;
    }
    .stat-item {
        padding: 12px !important;
    }
    .stat-item .value {
        font-size: 20px !important;
    }

    /* 公告弹窗 */
    .ann-modal-head {
        padding: 14px 12px 12px !important;
    }
    .ann-modal-body {
        padding: 12px !important;
    }

    /* 充值按钮 */
    .amount-btn {
        font-size: 12px !important;
        padding: 7px 8px !important;
    }

    /* 支付二维码 */
    #paymentQrcode,
    #qrcodeLoading {
        width: 120px !important;
        height: 120px !important;
    }

    /* 公告卡片 */
    .ann-card {
        margin-bottom: 10px !important;
    }
}

/* ============================================================
   全局移动端安全修复
   ============================================================ */

/* 防止横向滚动 */
html, body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* 移除 iOS 输入框内阴影 */
input, textarea, select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: var(--radius-sm);
}

/* 按钮点击高亮 */
button, .btn, a {
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.1);
}

/* 禁用选择拖动（除文本外） */
.no-select {
    -webkit-user-select: none;
    user-select: none;
}

/* 图片响应式 */
img {
    max-width: 100%;
    height: auto;
}

/* 隐藏溢出内容 */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 移动端触摸友好的下划线链接 */
@media (max-width: 768px) {
    a {
        -webkit-tap-highlight-color: transparent;
    }
}
