/* ==================== 变量 & 重置 ==================== */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --purple: #8b5cf6;
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.02);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.06);
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-w: 240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ==================== 登录页 ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.login-card {
    background: var(--card-bg);
    padding: 44px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 400px;
    max-width: 90vw;
    border: 1px solid var(--border);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .logo-icon {
    width: 52px;
    height: 52px;
    background: var(--text);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.login-card .logo-icon i {
    font-size: 26px;
    color: #fff;
}

.login-card .logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-top: 12px;
}

.login-card .form-item {
    margin-bottom: 20px;
}

.login-card label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: var(--card-bg);
    color: var(--text);
}

.login-card input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-captcha-row {
    display: flex;
    gap: 10px;
}

.login-captcha-row input { flex: 1; }
.login-captcha-row img {
    height: 42px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    width: 100%;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: scale(0.99); }

.btn-danger  { background: var(--danger); color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-default  { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-default:hover { background: var(--bg); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: rgba(37, 99, 235, 0.05); }
.btn-danger-outline { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger-outline:hover { background: rgba(220, 38, 38, 0.05); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

.login-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

/* ==================== 后台布局 ==================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-w);
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    background: var(--text);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-brand .brand-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.sidebar-brand .brand-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 12px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

.nav-item.active {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    margin-bottom: 8px;
}

.sidebar-footer .user-avatar {
    width: 34px;
    height: 34px;
    background: var(--text);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-footer .user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.sidebar-footer .user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-footer .logout-btn {
    width: 100%;
    padding: 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

.sidebar-footer .logout-btn:hover {
    background: #fef2f2;
    border-color: var(--danger);
    color: var(--danger);
}

/* 主体区域 */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶栏 */
.topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-date {
    font-size: 13px;
    color: var(--text-muted);
    padding: 6px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.topbar-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    position: relative;
}

.topbar-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.topbar-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
}

/* 内容区 */
.content {
    padding: 24px;
    flex: 1;
}

/* ==================== 卡片 ==================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.card + .card { margin-top: 20px; }

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i { color: var(--primary); }

.card-body { padding: 20px; }

.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ==================== 统计卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue   { background: #eff6ff; color: var(--primary); }
.stat-icon.green  { background: #f0fdf4; color: var(--success); }
.stat-icon.orange { background: #fffbeb; color: var(--warning); }
.stat-icon.red    { background: #fef2f2; color: var(--danger); }
.stat-icon.purple { background: #f5f3ff; color: var(--purple); }

.stat-info .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-info .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-info .stat-change {
    font-size: 12px;
    color: var(--success);
    margin-top: 4px;
}

/* ==================== 表格 ==================== */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: #fafafa; }

/* 状态标签 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success  { background: #f0fdf4; color: var(--success); }
.badge-danger   { background: #fef2f2; color: var(--danger); }
.badge-warning  { background: #fffbeb; color: var(--warning); }
.badge-info     { background: #eff6ff; color: var(--primary); }
.badge-primary  { background: #eff6ff; color: var(--primary); }
.badge-purple   { background: #f5f3ff; color: var(--purple); }
.badge-default  { background: var(--bg); color: var(--text-muted); }

/* 操作按钮 */
.action-btns {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
    transition: all 0.15s;
}

.action-btn:hover { background: var(--bg); color: var(--text); }
.action-btn.edit:hover { border-color: var(--primary); color: var(--primary); }
.action-btn.del:hover { background: #fef2f2; border-color: var(--danger); color: var(--danger); }

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.pagination a:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

.pagination a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .info { color: var(--text-muted); }
.pagination .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}
.pagination-wrap {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: var(--card-bg);
    color: var(--text);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

/* 开关 */
.switch-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.25s;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

.switch-label {
    font-size: 14px;
    color: var(--text);
}

/* ==================== 工具栏 ==================== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar .search-box {
    position: relative;
    min-width: 200px;
    max-width: 300px;
}

.toolbar .search-box input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    background: var(--card-bg);
    transition: all 0.2s;
}

.toolbar .search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.toolbar .search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.toolbar select {
    padding: 9px 30px 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    background: var(--card-bg);
    appearance: none;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar select:focus {
    border-color: var(--primary);
}

/* ==================== 弹窗 ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 520px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.2s;
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ==================== Toast ==================== */
.toast-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    min-width: 280px;
    max-width: 400px;
    border-left: 4px solid;
    animation: slideIn 0.25s ease;
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.info    { border-left-color: var(--primary); }
.toast.warning { border-left-color: var(--warning); }

.toast i { font-size: 18px; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error i   { color: var(--danger); }
.toast.info i    { color: var(--primary); }
.toast.warning i { color: var(--warning); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 12px;
    color: #d1d5db;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 16px;
}

/* ==================== 设置页 ==================== */
.settings-section {
    margin-bottom: 32px;
}

.settings-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    gap: 24px;
}

.settings-item:last-child { border-bottom: none; }

.settings-item .item-info .item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.settings-item .item-info .item-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* 移动端菜单按钮默认隐藏 */
.topbar-menu-btn {
    display: none;
}

/* ==================== 响应式 - 移动端 ==================== */
@media (max-width: 768px) {
    /* 基础重置 */
    body {
        font-size: 14px;
    }

    .content {
        padding: 16px 12px !important;
    }

    /* 移动端侧边栏 */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.open {
        transform: translateX(0);
    }

    /* 侧边栏遮罩 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
    }
    .sidebar-overlay.show {
        display: block;
    }

    /* 移动端主内容区 */
    .main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* 顶部栏 */
    .topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        padding: 0 12px !important;
        background: var(--card-bg) !important;
        border-bottom: 1px solid var(--border);
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        z-index: 98;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .topbar-left {
        display: flex !important;
        align-items: center;
        gap: 10px;
    }

    .topbar-menu-btn {
        display: flex !important;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        border: none;
        background: var(--bg);
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-size: 20px;
        color: var(--text);
        padding: 0;
    }

    .topbar-title {
        font-size: 16px !important;
        font-weight: 600;
    }

    .topbar-right {
        display: flex !important;
        align-items: center;
    }

    .topbar-date {
        display: none;
    }

    /* 内容区域增加顶部padding */
    .main .content {
        padding-top: 68px !important;
    }

    /* 统计卡片 - 移动端单列或双列 */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 16px;
    }

    .stat-card {
        padding: 14px !important;
        margin: 0 !important;
    }

    .stat-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }

    .stat-value {
        font-size: 20px !important;
    }

    .stat-label {
        font-size: 11px !important;
    }

    /* 卡片 - 移动端全宽 */
    .card {
        margin: 0 0 12px 0 !important;
        border-radius: var(--radius-sm) !important;
    }

    .card-header {
        padding: 14px 16px !important;
        flex-direction: row !important;
        justify-content: space-between;
    }

    .card-title {
        font-size: 14px !important;
    }

    .card-body {
        padding: 12px 16px !important;
    }

    /* 快捷操作 - 移动端2列 */
    .quick-actions {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .quick-actions a {
        padding: 12px !important;
    }

    .quick-actions .icon-wrap {
        width: 32px !important;
        height: 32px !important;
    }

    .quick-actions .icon-wrap i {
        font-size: 16px !important;
    }

    .quick-actions .label {
        font-size: 13px !important;
    }

    .quick-actions .desc {
        font-size: 11px !important;
    }

    /* 表格 - 移动端 */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }

    table {
        min-width: 500px;
        font-size: 12px;
    }

    th, td {
        padding: 10px 8px !important;
    }

    th {
        font-size: 11px !important;
        white-space: nowrap;
    }

    /* 系统信息卡片 */
    .sys-info-row {
        display: flex !important;
        justify-content: space-between !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid #f3f4f6;
    }

    .sys-info-row:last-child {
        border-bottom: none;
    }

    /* 工具栏 */
    .toolbar {
        flex-direction: column !important;
        gap: 10px;
        margin-bottom: 12px;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    select {
        width: 100%;
        padding: 10px 12px;
    }

    /* 表单 */
    .form-row {
        flex-direction: column !important;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    input.form-control,
    select.form-control,
    textarea.form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* 弹窗 */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 90vh;
        border-radius: 16px 16px 0 0 !important;
        margin: 0;
    }

    .modal-header {
        padding: 16px !important;
        border-bottom: 1px solid var(--border);
    }

    .modal-title {
        font-size: 15px !important;
    }

    .modal-body {
        padding: 16px !important;
        max-height: calc(90vh - 120px);
        overflow-y: auto;
    }

    .modal-footer {
        padding: 12px 16px !important;
        border-top: 1px solid var(--border);
        display: flex !important;
        gap: 10px;
    }

    .modal-footer .btn {
        flex: 1;
        padding: 12px;
    }

    /* 分页 */
    .pagination-wrap {
        padding: 12px 0;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .pagination a,
    .pagination span {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
        padding: 0 8px;
    }

    /* 设置页 */
    .settings-item {
        flex-direction: column !important;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 0;
    }

    .settings-item .item-title {
        font-size: 14px;
    }

    .settings-item .item-desc {
        font-size: 12px;
    }

    /* 操作按钮 */
    .action-btns {
        gap: 4px;
    }

    .action-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Toast */
    .toast-wrap {
        left: 10px;
        right: 10px;
        top: 68px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
        padding: 12px 14px;
        font-size: 13px;
    }

    /* 按钮 */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: var(--radius-sm);
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 头像 */
    .user-avatar {
        width: 36px !important;
        height: 36px !important;
    }

    /* 信息网格 */
    .info-grid {
        grid-template-columns: 1fr !important;
    }

    /* 快捷操作区域 - dashboard */
    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* 下拉选择器美化 */
    select.form-control {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 36px;
    }

    /* 头部样式覆盖 */
    .card-header .card-title i {
        margin-right: 6px;
    }

    /* 底部导航优化 */
    .sidebar-footer {
        padding: 12px !important;
    }

    .sidebar-footer .user-info {
        gap: 10px !important;
    }

    .logout-btn {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    /* 空状态 */
    .empty-state {
        padding: 40px 20px !important;
    }

    .empty-state i {
        font-size: 32px !important;
    }

    /* 头像预览 */
    #avatar-preview,
    #avatar-placeholder {
        width: 60px !important;
        height: 60px !important;
    }
}

/* 极小屏幕优化 */
@media (max-width: 375px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-card {
        flex-direction: row !important;
        gap: 12px;
    }

    .quick-actions {
        grid-template-columns: 1fr !important;
    }
}
