/* ============================================
   乡镇便民服务中心 - 2026 现代化 UI 设计系统
   完美自适应：PC / 平板 / 手机 / 华为 / iPhone
   ============================================ */

/* ----------------------------- */
/* CSS 变量定义 - 2026新款配色 */
/* ----------------------------- */
:root {
    /* 主色调 - 深邃蓝色系 */
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --primary-light: #4cc9f0;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-gradient: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    --primary-gradient-hover: linear-gradient(135deg, #3a0ca3 0%, #240046 100%);
    
    /* 辅助色 - 翠绿色系 */
    --secondary: #06d6a0;
    --secondary-light: #d0f4de;
    --secondary-dark: #059669;
    --secondary-gradient: linear-gradient(135deg, #06d6a0 0%, #059669 100%);
    
    /* 强调色 - 珊瑚橙 */
    --accent: #f72585;
    --accent-light: #fce7f3;
    --accent-dark: #db2777;
    --accent-gradient: linear-gradient(135deg, #f72585 0%, #db2777 100%);
    
    /* 语义色 - 柔和色调 */
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #059669;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #d97706;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #dc2626;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --info-dark: #2563eb;
    
    /* 中性色 - 更柔和 */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* 背景色 */
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --bg-header: rgba(255, 255, 255, 0.98);
    
    /* 文字色 */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --text-white: #ffffff;
    
    /* 边框 */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: #4361ee;
    
    /* 阴影 - 更柔和 */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.12);
    --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 24px rgba(67, 97, 238, 0.15);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;
    
    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* 间距 */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* 侧边栏宽度 */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    
    /* 字体 */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ----------------------------- */
/* 全局重置与基础样式 */
/* ----------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 选择文本样式 */
::selection {
    background-color: var(--primary-100);
    color: var(--primary-dark);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* 图片响应式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 链接基础样式 */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

/* 按钮重置 */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* 输入框重置 */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ----------------------------- */
/* 排版系统 */
/* ----------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.25rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

/* ----------------------------- */
/* 容器系统 */
/* ----------------------------- */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container { padding: 0 var(--space-6); }
}

@media (min-width: 1024px) {
    .container { padding: 0 var(--space-8); }
}

/* ----------------------------- */
/* 网格系统 */
/* ----------------------------- */
.grid {
    display: grid;
    gap: var(--space-4);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-cols-4, .grid-cols-3, .grid-cols-2 { 
        grid-template-columns: 1fr; 
    }
}

/* Flex 工具类 */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ----------------------------- */
/* 按钮系统 */
/* ----------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn i, .btn svg {
    font-size: 1em;
    flex-shrink: 0;
}

/* 主要按钮 */
.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(79, 106, 245, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 106, 245, 0.3);
    color: var(--text-white);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 次要按钮 */
.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
    color: var(--text-primary);
}

/* 成功按钮 */
.btn-success {
    background: var(--success);
    color: var(--text-white);
    border-color: var(--success);
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.btn-success:hover {
    background: var(--success-dark);
    border-color: var(--success-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
    color: var(--text-white);
}

/* 信息按钮 */
.btn-info {
    background: var(--info);
    color: var(--text-white);
    border-color: var(--info);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.btn-info:hover {
    background: var(--info-dark);
    border-color: var(--info-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    color: var(--text-white);
}

/* 警告按钮 */
.btn-warning {
    background: var(--warning);
    color: var(--gray-900);
    border-color: var(--warning);
    box-shadow: 0 2px 4px rgba(234, 179, 8, 0.2);
}

.btn-warning:hover {
    background: var(--warning-dark);
    border-color: var(--warning-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(234, 179, 8, 0.3);
    color: var(--gray-900);
}

/* 危险按钮 */
.btn-danger {
    background: var(--danger);
    color: var(--text-white);
    border-color: var(--danger);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--danger-dark);
    border-color: var(--danger-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    color: var(--text-white);
}

/* 轮廓按钮 - 主要 */
.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary-50);
    color: var(--primary-dark);
}

/* 轮廓按钮 - 次要 */
.btn-outline-secondary {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-outline-secondary:hover {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-400);
}

/* 轮廓按钮 - 成功 */
.btn-outline-success {
    background: transparent;
    color: var(--success);
    border: 1px solid var(--success);
}

.btn-outline-success:hover {
    background: var(--success-light);
    color: var(--success-dark);
}

/* 轮廓按钮 - 信息 */
.btn-outline-info {
    background: transparent;
    color: var(--info);
    border: 1px solid var(--info);
}

.btn-outline-info:hover {
    background: var(--info-light);
    color: var(--info-dark);
}

/* 轮廓按钮 - 警告 */
.btn-outline-warning {
    background: transparent;
    color: var(--warning-dark);
    border: 1px solid var(--warning);
}

.btn-outline-warning:hover {
    background: var(--warning-light);
    color: var(--warning-dark);
}

/* 轮廓按钮 - 危险 */
.btn-outline-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger-light);
    color: var(--danger-dark);
}

/* 轮廓按钮 */
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

/* 幽灵按钮 */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

/* 按钮尺寸 */
.btn-sm {
    padding: var(--space-1) var(--space-2);
    font-size: 0.75rem;
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: 1rem;
    border-radius: var(--radius-xl);
}

.btn-block {
    width: 100%;
}

/* 图标按钮 */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-lg);
}

.btn-icon.btn-sm {
    width: 28px;
    height: 28px;
}

.btn-icon.btn-lg {
    width: 44px;
    height: 44px;
}

/* ----------------------------- */
/* 卡片系统 */
/* ----------------------------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-light);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.card-header h3, .card-header h4, .card-header h5 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-light);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* 卡片变体 */
.card-gradient {
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
}

.card-gradient .card-header {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
}

.card-gradient h3, .card-gradient h4, .card-gradient h5,
.card-gradient p {
    color: var(--text-white);
}

/* 响应式卡片 */
@media (max-width: 640px) {
    .card-header, .card-body, .card-footer {
        padding: var(--space-4);
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-footer {
        justify-content: stretch;
    }
    
    .card-footer .btn {
        flex: 1;
    }
}

/* ----------------------------- */
/* 表单系统 */
/* ----------------------------- */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-label .required {
    color: var(--danger);
    margin-left: var(--space-1);
}

.form-control, .form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    appearance: none;
    -webkit-appearance: none;
}

.form-control:hover, .form-select:hover {
    border-color: var(--gray-400);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-50);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:disabled, .form-select:disabled {
    background-color: var(--gray-100);
    cursor: not-allowed;
    opacity: 0.7;
}

/* 下拉选择框箭头 */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right var(--space-3) center;
    background-repeat: no-repeat;
    background-size: 1.5em;
    padding-right: var(--space-10);
}

/* 文本域 */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* 表单帮助文本 */
.form-text {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--space-2);
}

/* 表单验证状态 */
.form-control.is-valid, .form-select.is-valid {
    border-color: var(--success);
}

.form-control.is-valid:focus, .form-select.is-valid:focus {
    box-shadow: 0 0 0 4px var(--success-light);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus, .form-select.is-invalid:focus {
    box-shadow: 0 0 0 4px var(--danger-light);
}

.invalid-feedback {
    display: block;
    font-size: 0.8125rem;
    color: var(--danger);
    margin-top: var(--space-2);
}

.valid-feedback {
    display: block;
    font-size: 0.8125rem;
    color: var(--success);
    margin-top: var(--space-2);
}

/* 复选框和单选框 */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.form-check-input[type="radio"] {
    border-radius: var(--radius-full);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* 输入框组 */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.input-group .form-control:last-child {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.input-group .btn {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--gray-100);
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    color: var(--text-muted);
}

/* 响应式表单 */
@media (max-width: 640px) {
    .form-control, .form-select {
        padding: var(--space-3);
        font-size: 1rem; /* 防止iOS缩放 */
    }
    
    .form-row {
        flex-direction: column;
    }
}

/* ----------------------------- */
/* 表格系统 */
/* ----------------------------- */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.table thead {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.table th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    background: inherit;
}

.table td {
    padding: var(--space-4) var(--space-5);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--primary-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* 表格操作列 */
.table-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .table th, .table td {
        padding: var(--space-3);
        font-size: 0.875rem;
    }
    
    /* 隐藏次要列 */
    .table .hide-mobile {
        display: none;
    }
    
    .table-actions {
        flex-direction: column;
        gap: var(--space-1);
    }
    
    .table-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 表格空状态 */
.table-empty {
    text-align: center;
    padding: var(--space-12) var(--space-4);
    color: var(--text-muted);
}

.table-empty i {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.table-empty p {
    margin: 0;
}

/* ----------------------------- */
/* 徽章系统 */
/* ----------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-dark);
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-info {
    background: var(--info-light);
    color: #1e40af;
}

/* 状态徽章 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-md);
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.status-active, .status-normal {
    background: var(--success-light);
    color: #065f46;
}

.status-active::before, .status-normal::before {
    background: var(--success);
}

.status-pending {
    background: var(--warning-light);
    color: #92400e;
}

.status-pending::before {
    background: var(--warning);
}

.status-inactive, .status-disabled {
    background: var(--danger-light);
    color: #991b1b;
}

.status-inactive::before, .status-disabled::before {
    background: var(--danger);
}

.status-processing {
    background: var(--info-light);
    color: #1e40af;
}

.status-processing::before {
    background: var(--info);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ----------------------------- */
/* 提示框系统 */
/* ----------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    border-left: 4px solid;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.alert-message {
    font-size: 0.9375rem;
    margin: 0;
}

.alert-close {
    padding: var(--space-1);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    cursor: pointer;
}

.alert-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: var(--success-light);
    border-color: var(--success);
    color: #065f46;
}

.alert-warning {
    background: var(--warning-light);
    border-color: var(--warning);
    color: #92400e;
}

.alert-danger {
    background: var(--danger-light);
    border-color: var(--danger);
    color: #991b1b;
}

.alert-info {
    background: var(--info-light);
    border-color: var(--info);
    color: #1e40af;
}

/* ----------------------------- */
/* 统计卡片 */
/* ----------------------------- */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
}

.stat-card-icon.primary {
    background: var(--primary-100);
    color: var(--primary);
}

.stat-card-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-card-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card-value {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--space-2);
}

.stat-card-label {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-top: var(--space-3);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
}

.stat-card-trend.up {
    background: var(--success-light);
    color: #065f46;
}

.stat-card-trend.down {
    background: var(--danger-light);
    color: #991b1b;
}

/* 响应式统计卡片 */
@media (max-width: 640px) {
    .stat-card {
        padding: var(--space-4);
    }
    
    .stat-card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* ----------------------------- */
/* 后台布局系统 */
/* ----------------------------- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    color: var(--text-white);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition-slow);
    overflow-x: hidden;
    overflow-y: auto;
}

.admin-sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

/* 侧边栏头部 */
.sidebar-header {
    padding: var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sidebar-brand-text {
    white-space: nowrap;
    overflow: hidden;
    transition: var(--transition-base);
}

.admin-sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
}

/* 侧边栏导航 */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-4) 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
}

.nav-section {
    margin-bottom: var(--space-2);
}

.nav-section-title {
    padding: var(--space-3) var(--space-6);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.admin-sidebar.collapsed .nav-section-title {
    opacity: 0;
}

.nav-item {
    margin: var(--space-1) var(--space-3);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    font-weight: 500;
    font-size: 0.9375rem;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    text-decoration: none;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.nav-link i {
    width: 24px;
    font-size: 1.125rem;
    text-align: center;
    flex-shrink: 0;
}

.nav-link-text {
    overflow: hidden;
    transition: var(--transition-base);
}

.admin-sidebar.collapsed .nav-link-text {
    opacity: 0;
    width: 0;
}

.admin-sidebar.collapsed .nav-link {
    justify-content: center;
    padding: var(--space-3);
}

/* 子菜单 */
.nav-submenu {
    margin-left: var(--space-8);
    margin-top: var(--space-1);
    display: none;
}

.nav-submenu.show {
    display: block;
}

.nav-submenu .nav-link {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

.admin-sidebar.collapsed .nav-submenu {
    display: none !important;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* 主内容区 */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition-slow);
    position: relative;
    z-index: 1;
}

.admin-sidebar.collapsed ~ .admin-main {
    margin-left: var(--sidebar-collapsed);
}

/* 顶部导航栏 */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.toggle-sidebar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.toggle-sidebar:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.page-title-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* 用户信息 */
.user-dropdown {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-base);
}

.user-dropdown:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 内容区域 */
.admin-content {
    flex: 1;
    padding: var(--space-6);
    overflow-x: hidden;
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    padding: var(--space-5) var(--space-6);
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.page-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-title i {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    color: var(--white);
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.page-actions .btn {
    height: 38px;
    padding: 0 var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.page-actions .btn i {
    font-size: 0.9375rem;
}

.page-header-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.page-header h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 1.875rem);
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--text-light);
}

.breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ----------------------------- */
/* 移动端侧边栏 */
/* ----------------------------- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1039;
    opacity: 0;
    transition: var(--transition-base);
    cursor: pointer;
    pointer-events: none;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ----------------------------- */
/* 响应式后台布局 */
/* ----------------------------- */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        z-index: 1045;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
        z-index: 1045;
    }
    
    .admin-sidebar.collapsed {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }
    
    .admin-sidebar.collapsed.show {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        z-index: 1039;
    }
    
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
    
    .admin-main {
        margin-left: 0;
        z-index: 1;
    }
    
    .admin-content {
        padding: var(--space-4);
    }
    
    .admin-header {
        padding: var(--space-3) var(--space-4);
        z-index: 100;
    }
    
    .user-info {
        display: none;
    }
    
    /* 确保侧边栏链接可点击 */
    .admin-sidebar .nav-link {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 640px) {
    .admin-content {
        padding: var(--space-3);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header-right {
        width: 100%;
    }
    
    .page-header-right .btn {
        flex: 1;
    }
    
    .admin-header {
        padding: var(--space-3);
    }
    
    .header-right {
        gap: var(--space-2);
    }
}

/* ----------------------------- */
/* 前台导航栏 */
/* ----------------------------- */
.public-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-base);
}

.public-navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    gap: var(--space-4);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar-brand i {
    font-size: 1.5rem;
    color: var(--primary);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.navbar-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.navbar-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.navbar-link.active {
    background: var(--primary-100);
    color: var(--primary);
}

.navbar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* 移动端导航 */
@media (max-width: 992px) {
    .navbar-toggle {
        display: flex;
        background: transparent;
        border: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .navbar-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh; /* 动态视口高度，避免地址栏影响 */
        background: var(--bg-card);
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-6);
        padding-top: 4rem; /* 为关闭按钮留出空间 */
        gap: var(--space-2);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-2xl);
        z-index: 1001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* 确保菜单默认隐藏 */
        visibility: hidden;
    }
    
    .navbar-menu.show {
        transform: translateX(0);
        visibility: visible;
    }
    
    .navbar-link {
        padding: var(--space-3) var(--space-4);
        font-size: 1rem;
    }
    
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        pointer-events: none;
    }
    
    .menu-overlay.show {
        display: block;
        pointer-events: auto;
    }
}

@media (max-width: 640px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand i {
        font-size: 1.25rem;
    }
}

/* ----------------------------- */
/* 前台页面头部 Hero */
/* ----------------------------- */
.hero {
    background: var(--primary-gradient);
    color: var(--text-white);
    padding: var(--space-12) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--text-white);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: var(--space-6);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero .btn {
    min-width: 160px;
}

@media (max-width: 640px) {
    .hero {
        padding: var(--space-8) 0;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 var(--space-4);
    }
    
    .hero .btn {
        width: 100%;
    }
}

/* ----------------------------- */
/* 前台页脚 */
/* ----------------------------- */
.public-footer {
    background: var(--gray-900);
    color: var(--text-light);
    padding: var(--space-12) 0 var(--space-6);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-white);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: var(--space-4);
}

.footer-brand i {
    color: var(--primary-light);
}

.footer-desc {
    color: var(--gray-400);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-title {
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9375rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-bottom {
    padding-top: var(--space-6);
    border-top: 1px solid var(--gray-800);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .public-footer {
        padding: var(--space-8) 0 var(--space-4);
    }
}

/* ----------------------------- */
/* 模态框 - Bootstrap 5 兼容样式 */
/* ----------------------------- */
/* 注意：不要覆盖 Bootstrap 的 .modal 和 .modal-backdrop 基础样式 */

/* 确保模态框在所有元素之上 */
.modal {
    z-index: 1055 !important;
    position: fixed !important;
}

.modal-backdrop {
    z-index: 1050 !important;
    position: fixed !important;
}

/* 确保模态框内容可以接收点击事件 */
.modal-dialog {
    pointer-events: auto !important;
    position: relative !important;
}

.modal-content {
    pointer-events: auto !important;
    position: relative !important;
}

.modal-body,
.modal-header,
.modal-footer {
    pointer-events: auto !important;
    position: relative !important;
}

/* 确保模态框内的表单元素可以正常交互 */
.modal-body input,
.modal-body select,
.modal-body textarea,
.modal-body button,
.modal-body .btn,
.modal-body .form-control,
.modal-body .form-select,
.modal-footer button,
.modal-footer .btn {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1 !important;
}

/* 修复模态框打开时的 body 样式 */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

/* Bootstrap 模态框增强样式 */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: none;
}

/* 模态框内容样式增强 */
.modal .modal-content {
    border: none;
    border-radius: var(--radius-xl, 12px);
    box-shadow: var(--shadow-2xl, 0 25px 50px -12px rgba(0, 0, 0, 0.25));
}

/* 模态框背景增强 */
.modal-backdrop.show {
    opacity: 0.5;
}

/* Bootstrap 模态框头部增强 */
.modal .modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light, #e5e7eb);
}

/* Bootstrap 模态框标题增强 */
.modal .modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

/* 自定义关闭按钮样式 */
.modal .modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #6b7280);
    transition: var(--transition-fast, 0.15s ease);
    background: transparent;
    border: none;
    cursor: pointer;
}

.modal .modal-close:hover {
    background: var(--gray-100, #f3f4f6);
    color: var(--text-primary, #111827);
}

/* Bootstrap 模态框内容增强 */
.modal .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* Bootstrap 模态框底部增强 */
.modal .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .modal .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal .modal-content {
        border-radius: var(--radius-lg, 8px);
    }
    
    .modal .modal-footer {
        flex-direction: column;
    }
    
    .modal .modal-footer .btn {
        width: 100%;
    }
}

/* ----------------------------- */
/* 分页 */
/* ----------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.pagination-item {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    text-decoration: none;
}

.pagination-item:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.pagination-item.active {
    background: var(--primary-gradient);
    color: var(--text-white);
}

.pagination-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 640px) {
    .pagination-item {
        min-width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
}

/* ----------------------------- */
/* 加载状态 */
/* ----------------------------- */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    color: var(--text-muted);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-4);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 0.9375rem;
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: var(--space-2);
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: var(--space-4);
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.skeleton-card {
    height: 200px;
}

/* ----------------------------- */
/* 工具类 */
/* ----------------------------- */
/* 文本 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-white { color: var(--text-white) !important; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 背景 */
.bg-primary { background: var(--primary-gradient) !important; }
.bg-white { background: var(--bg-card) !important; }
.bg-gray { background: var(--gray-100) !important; }

/* 间距 */
.m-0 { margin: 0 !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.p-0 { padding: 0 !important; }
.p-4 { padding: var(--space-4) !important; }
.p-6 { padding: var(--space-6) !important; }

/* 显示 */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* 宽度 */
.w-full { width: 100% !important; }
.w-auto { width: auto !important; }

/* 圆角 */
.rounded { border-radius: var(--radius-lg) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* 阴影 */
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* 响应式显示 */
@media (max-width: 1024px) {
    .hide-tablet { display: none !important; }
}

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .show-mobile-only { display: none !important; }
}

/* ----------------------------- */
/* 动画 */
/* ----------------------------- */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 悬停效果 */
.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-scale {
    transition: var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* ----------------------------- */
/* 特殊设备适配 */
/* ----------------------------- */
/* iPhone 安全区域 */
@supports (padding: max(0px)) {
    .admin-sidebar {
        padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
    }
    
    .public-footer {
        padding-bottom: max(var(--space-6), env(safe-area-inset-bottom));
    }
    
    .modal {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* 高分辨率屏幕 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn, .form-control, .form-select {
        -webkit-font-smoothing: antialiased;
    }
}

/* 暗色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    /* 如需支持暗色模式，在此添加样式 */
}

/* 减少动画（无障碍） */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .admin-sidebar,
    .admin-header,
    .sidebar-overlay,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .admin-main {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}


/* ----------------------------- */
/* 服务分类卡片响应式 */
/* ----------------------------- */
@media (max-width: 1024px) {
    .grid[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .grid[style*="grid-template-columns: repeat(4"],
    .grid[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
    
    /* 搜索表单响应式 */
    form .grid {
        grid-template-columns: 1fr !important;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control {
        border-radius: var(--radius-lg) !important;
        margin-bottom: var(--space-2);
    }
    
    .input-group .btn {
        border-radius: var(--radius-lg) !important;
        width: 100%;
    }
}

/* 服务分类图标容器 */
.category-icon-box {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    transition: var(--transition-base);
}

.card:hover .category-icon-box {
    transform: scale(1.1);
}

/* 服务卡片图标 */
.service-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-base);
}

.card:hover .service-icon-box {
    transform: rotate(5deg);
}


/* ----------------------------- */
/* 移动端菜单优化 */
/* ----------------------------- */
/* 安卓设备优化 */
@media screen and (max-width: 1024px) {
    .admin-sidebar {
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-sidebar .nav-link {
        min-height: 48px; /* 符合触摸目标最小尺寸 */
        padding: var(--space-3) var(--space-4);
    }
    
    .sidebar-nav {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* iPhone 优化 */
@media screen and (max-width: 428px) {
    .admin-sidebar {
        width: 85vw;
        max-width: 320px;
    }
    
    .admin-sidebar .nav-link {
        font-size: 1rem;
        padding: var(--space-4);
    }
    
    .sidebar-header {
        padding: var(--space-4);
    }
    
    .sidebar-brand-text {
        font-size: 1rem;
    }
}

/* iPhone SE 等小屏幕 */
@media screen and (max-width: 375px) {
    .admin-sidebar {
        width: 90vw;
        max-width: 300px;
    }
    
    .admin-sidebar .nav-link {
        font-size: 0.9375rem;
        padding: var(--space-3);
        min-height: 44px;
    }
    
    .nav-section-title {
        font-size: 0.625rem;
        padding: var(--space-2) var(--space-4);
    }
}

/* 平板设备优化 */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .admin-sidebar {
        width: 300px;
    }
    
    .admin-sidebar .nav-link {
        font-size: 0.9375rem;
    }
}

/* 横屏模式优化 */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .admin-sidebar {
        padding-top: var(--space-2);
        padding-bottom: var(--space-2);
    }
    
    .sidebar-header {
        padding: var(--space-3) var(--space-4);
    }
    
    .admin-sidebar .nav-link {
        padding: var(--space-2) var(--space-4);
        min-height: 40px;
    }
    
    .nav-section-title {
        padding: var(--space-1) var(--space-4);
    }
    
    .sidebar-footer {
        padding: var(--space-2) var(--space-4);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .admin-sidebar .nav-link {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
    
    .admin-sidebar .nav-link:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.98);
    }
    
    .toggle-sidebar {
        min-width: 44px;
        min-height: 44px;
    }
    
    .btn {
        min-height: 44px;
    }
    
    .form-control, .form-select {
        min-height: 48px;
        font-size: 16px; /* 防止 iOS 缩放 */
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .admin-sidebar .nav-link {
        border: 1px solid transparent;
    }
    
    .admin-sidebar .nav-link:focus {
        border-color: white;
        outline: 2px solid white;
        outline-offset: 2px;
    }
    
    .admin-sidebar .nav-link.active {
        border-color: white;
    }
}

/* 确保侧边栏在所有设备上可滚动 */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ----------------------------- */
/* 后台页面按钮和链接点击优化 */
/* ----------------------------- */

/* 按钮基础样式 */
.btn,
button,
a.btn,
[role="button"] {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
    touch-action: manipulation;
    user-select: none;
}

/* 移动端触摸优化 */
@media (max-width: 1024px) {
    /* 增大触摸目标 */
    .btn-sm {
        min-height: 36px;
        min-width: 36px;
        padding: var(--space-2) var(--space-3);
    }
    
    .btn-group-sm .btn {
        min-height: 36px;
        min-width: 36px;
    }
    
    /* 表格操作按钮间距 */
    .table td .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-1);
    }
    
    /* 确保链接可点击 */
    a {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
        touch-action: manipulation;
    }
    
    /* 表单控件 */
    .form-control,
    .form-select,
    .form-check-input {
        cursor: pointer;
        touch-action: manipulation;
    }
    
    /* 复选框和单选框 */
    .form-check {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
        margin-right: var(--space-2);
    }
}

/* 小屏幕设备 */
@media (max-width: 640px) {
    /* 按钮全宽 */
    .page-actions .btn {
        padding: var(--space-2) var(--space-3);
        font-size: 0.875rem;
    }
    
    /* 表格响应式 */
    .table-responsive {
        margin: 0 calc(-1 * var(--space-3));
        padding: 0 var(--space-3);
    }
    
    /* 卡片内容 */
    .card-body {
        padding: var(--space-4);
    }
    
    /* 表单布局 */
    .row > [class*="col-md-"] {
        margin-bottom: var(--space-3);
    }
    
    /* 按钮组 */
    .d-flex.gap-2 {
        flex-wrap: wrap;
    }
    
    .d-flex.gap-2 .btn {
        flex: 1 1 auto;
        min-width: 100px;
    }
}

/* 侧边栏链接样式 */
.admin-sidebar .nav-link {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
    touch-action: manipulation;
    user-select: none;
}

.admin-sidebar .nav-link:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.98);
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 侧边栏遮罩层 - 确保默认隐藏 */
.sidebar-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1039;
    opacity: 0;
    pointer-events: none;
}

.sidebar-overlay.show {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

/* ----------------------------- */
/* 统一的页面头部样式 - 2026新款 */
/* ----------------------------- */
.page-header {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    border: 1px solid var(--border-light);
}

.page-header .page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    letter-spacing: -0.01em;
}

.page-header .page-title i {
    font-size: 1.125rem;
    color: var(--primary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
}

.page-header .page-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* 统一的页面操作按钮区域 */
.page-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* 操作按钮统一样式 - 紧凑型 */
.page-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    white-space: nowrap;
    height: 32px;
}

.page-actions .btn i {
    font-size: 0.8125rem;
}

/* 主要操作按钮 - 添加/创建 */
.page-actions .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
    box-shadow: 0 1px 3px rgba(92, 107, 192, 0.3);
}

.page-actions .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 2px 6px rgba(92, 107, 192, 0.4);
}

/* 次要操作按钮 */
.page-actions .btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
    background: var(--white);
}

.page-actions .btn-outline-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--text-primary);
}

/* 成功操作按钮 - 批量导入 */
.page-actions .btn-outline-success {
    color: var(--success-dark);
    border-color: var(--success);
    background: var(--white);
}

.page-actions .btn-outline-success:hover {
    background: var(--success-light);
    border-color: var(--success-dark);
}

/* 信息操作按钮 - 统计/分析 */
.page-actions .btn-outline-info {
    color: var(--info-dark);
    border-color: var(--info);
    background: var(--white);
}

.page-actions .btn-outline-info:hover {
    background: var(--info-light);
    border-color: var(--info-dark);
}

/* 警告操作按钮 */
.page-actions .btn-outline-warning {
    color: var(--warning-dark);
    border-color: var(--warning);
    background: var(--white);
}

.page-actions .btn-outline-warning:hover {
    background: var(--warning-light);
    border-color: var(--warning-dark);
}

/* 危险操作按钮 */
.page-actions .btn-outline-danger {
    color: var(--danger-dark);
    border-color: var(--danger);
    background: var(--white);
}

.page-actions .btn-outline-danger:hover {
    background: var(--danger-light);
    border-color: var(--danger-dark);
}

/* 刷新按钮特殊样式 */
.page-actions .btn-refresh {
    color: var(--primary);
    border-color: var(--primary-100);
    background: var(--primary-50);
}

.page-actions .btn-refresh:hover {
    background: var(--primary-100);
    border-color: var(--primary);
}

/* 按钮分组 */
.page-actions .btn-group {
    display: flex;
    gap: 0;
}

.page-actions .btn-group .btn {
    border-radius: 0;
}

.page-actions .btn-group .btn:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.page-actions .btn-group .btn:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* 按钮分隔线 */
.page-actions .btn-divider {
    width: 1px;
    height: 20px;
    background: var(--gray-300);
    margin: 0 var(--space-1);
}

/* 响应式页面头部 */
@media (max-width: 768px) {
    .page-header {
        padding: var(--space-3);
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }
    
    .page-header .page-title {
        font-size: 1.125rem;
        justify-content: center;
    }
    
    .page-actions {
        justify-content: center;
        width: 100%;
    }
    
    .page-actions .btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .page-actions .btn span {
        display: none;
    }
    
    .page-actions .btn i {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .page-actions {
        flex-wrap: wrap;
    }
    
    .page-actions .btn {
        flex: 0 0 calc(50% - 4px);
        height: 36px;
    }
}

/* ----------------------------- */
/* 统一的表格样式 - 2026新款 */
/* ----------------------------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-3) var(--space-4);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.card-body {
    padding: var(--space-4);
}

.table {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.8125rem;
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    padding: 10px 12px;
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* 表格操作按钮 - 统一小尺寸 */
.table .btn-group-sm .btn,
.table .btn-sm,
.table-actions .btn {
    padding: 4px 8px;
    font-size: 0.6875rem;
    height: 26px;
    border-radius: var(--radius-sm);
}

.table-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* 状态徽章 - 统一样式 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    line-height: 1.4;
}

.badge-success, .bg-success {
    background: var(--success-light) !important;
    color: var(--success-dark) !important;
}

.badge-warning, .bg-warning {
    background: var(--warning-light) !important;
    color: var(--warning-dark) !important;
}

.badge-danger, .bg-danger {
    background: var(--danger-light) !important;
    color: var(--danger-dark) !important;
}

.badge-info, .bg-info {
    background: var(--info-light) !important;
    color: var(--info-dark) !important;
}

.badge-secondary, .bg-secondary {
    background: var(--gray-100) !important;
    color: var(--gray-700) !important;
}

.badge-primary, .bg-primary {
    background: var(--primary-50) !important;
    color: var(--primary-dark) !important;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: var(--space-10);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

/* 加载状态 */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    color: var(--text-muted);
}

.loading-state .spinner-border {
    margin-right: var(--space-2);
}

/* 移动端页面优化 */
@media (max-width: 992px) {
    /* 防止页面横向滚动 */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* 优化容器宽度 */
    .container {
        max-width: 100%;
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
    
    /* 菜单关闭按钮样式 */
    .show-mobile-only {
        display: block !important;
    }
    
    /* 遮罩层优化 */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .menu-overlay.show {
        display: block;
        opacity: 1;
    }
    
    /* 防止菜单打开时页面滚动 */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* 桌面端隐藏移动端专用元素 */
@media (min-width: 993px) {
    .show-mobile-only {
        display: none !important;
    }
    
    .menu-overlay {
        display: none !important;
    }
}
/* iOS Safari 专用修复 */
@supports (-webkit-touch-callout: none) {
    /* iOS 设备检测 */
    
    /* 修复 iOS 100vh 问题 */
    @media (max-width: 992px) {
        .navbar-menu {
            height: -webkit-fill-available;
        }
    }
    
    /* 防止 iOS 双击缩放 */
    * {
        touch-action: manipulation;
    }
    
    /* 优化 iOS 滚动 */
    .navbar-menu {
        -webkit-overflow-scrolling: touch;
    }
    
    /* 防止 iOS 橡皮筋效果影响布局 */
    body {
        position: relative;
        overflow-x: hidden;
    }
    
    /* 修复 iOS 输入框缩放 */
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* 防止页面在菜单打开时滚动 - iOS 专用 */
@media (max-width: 992px) {
    body.menu-open {
        position: fixed;
        width: 100%;
        height: 100vh;
        overflow: hidden;
    }
}