/* ===== Admin Page Styles ===== */

        :root {
            --sidebar-width: 260px;
            --sidebar-bg: #1a1f2b;
            --sidebar-hover: #252b3a;
            --sidebar-active: #1e3a5f;
            --sidebar-text: #b0b8c4;
            --sidebar-text-active: #ffffff;
            --primary: #1a6fb5;
            --primary-hover: #155a94;
            --top-bar-height: 56px;
            --query-area-height: 80px;
            --pagination-height: 56px;
            --bg-main: #f0f2f5;
            --bg-white: #ffffff;
            --border-color: #e0e4e8;
            --text-primary: #2c3e50;
            --text-secondary: #5a6675;
            --danger: #e05555;
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
            --radius: 6px;
            --radius-sm: 4px;
            --transition: 0.2s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
            background: #e8ecf1;
            color: var(--text-primary);
            line-height: 1.5;
            height: 100vh;
            overflow: hidden;
        }

        /* ========== 登录页面 ========== */
        .login-container {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
            width: 100vw;
            background: linear-gradient(135deg, #1a3c5e 0%, #1a5276 25%, #1a6b8a 50%, #1a5c7a 75%, #1a3c5e 100%);
            background-size: 400% 400%;
            animation: gradientShift 15s ease infinite;
            position: relative;
            overflow: hidden;
        }
        @keyframes gradientShift {
            0%,
            100% {
                background-position: 0% 50%;
            }
            25% {
                background-position: 100% 0%;
            }
            50% {
                background-position: 100% 100%;
            }
            75% {
                background-position: 0% 100%;
            }
        }
        .login-container::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
            pointer-events: none;
        }
        .login-bg-pattern {
            position: absolute;
            inset: 0;
            pointer-events: none;
            opacity: 0.06;
            background-image:
                repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255, 255, 255, 0.5) 40px, rgba(255, 255, 255, 0.5) 41px),
                repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255, 255, 255, 0.5) 40px, rgba(255, 255, 255, 0.5) 41px);
        }
        .login-card {
            position: relative;
            z-index: 1;
            background: rgba(255, 255, 255, 0.96);
            border-radius: 16px;
            padding: 44px 40px 36px;
            width: 420px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
            backdrop-filter: blur(6px);
        }
        .login-card .logo-area {
            text-align: center;
            margin-bottom: 30px;
        }
        .login-card .logo-icon {
            width: 56px;
            height: 56px;
            background: linear-gradient(135deg, #1a6fb5, #1a8fd4);
            border-radius: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            color: #fff;
            margin-bottom: 12px;
            box-shadow: 0 8px 24px rgba(26, 111, 181, 0.35);
        }
        .login-card h2 {
            font-size: 22px;
            font-weight: 700;
            color: #1a3c5e;
            letter-spacing: 0.5px;
        }
        .login-card .subtitle {
            font-size: 13px;
            color: #7a8a9a;
            margin-top: 4px;
        }
        .form-group {
            margin-bottom: 18px;
            position: relative;
        }
        .form-group label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #3d4f5f;
            margin-bottom: 6px;
            letter-spacing: 0.3px;
        }
        .form-group input {
            width: 100%;
            padding: 11px 14px;
            border: 2px solid #dce3ea;
            border-radius: 8px;
            font-size: 14px;
            transition: var(--transition);
            background: #f9fafb;
            color: #2c3e50;
            letter-spacing: 0.3px;
        }
        .form-group input:focus {
            outline: none;
            border-color: var(--primary);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.1);
        }
        .captcha-row {
            display: flex;
            gap: 12px;
        }
        .captcha-row input {
            flex: 1;
        }
        .captcha-canvas {
            width: 120px;
            height: 44px;
            border-radius: 8px;
            cursor: pointer;
            border: 2px solid #dce3ea;
            flex-shrink: 0;
            background: #f0f3f7;
            transition: var(--transition);
        }
        .captcha-canvas:hover {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.08);
        }
        .btn-login {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, #1a6fb5, #1a8fd4);
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            letter-spacing: 1px;
            transition: var(--transition);
            box-shadow: 0 4px 14px rgba(26, 111, 181, 0.3);
            margin-top: 4px;
        }
        .btn-login:hover {
            background: linear-gradient(135deg, #155a94, #1678b8);
            box-shadow: 0 6px 20px rgba(26, 111, 181, 0.4);
            transform: translateY(-1px);
        }
        .btn-login:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(26, 111, 181, 0.3);
        }
        .login-error {
            color: var(--danger);
            font-size: 13px;
            text-align: center;
            margin-top: 8px;
            min-height: 20px;
            font-weight: 500;
        }

        /* ========== 后台页面 ========== */
        .admin-container {
            display: none;
            height: 100vh;
            width: 100vw;
            overflow: hidden;
        }
        .admin-container.active {
            display: flex;
        }

        /* 侧边栏 */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--sidebar-bg);
            color: var(--sidebar-text);
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            height: 100vh;
            user-select: none;
            box-shadow: 2px 0 16px rgba(0, 0, 0, 0.18);
            z-index: 10;
        }
        .sidebar-header {
            padding: 20px 18px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
        }
        .sidebar-header .s-logo {
            width: 38px;
            height: 38px;
            background: linear-gradient(135deg, #2980b9, #3498db);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: #fff;
            flex-shrink: 0;
        }
        .sidebar-header .s-title {
            font-size: 14px;
            font-weight: 700;
            color: #e8ecf1;
            letter-spacing: 0.5px;
            line-height: 1.3;
        }
        .sidebar-nav {
            flex: 1;
            overflow-y: auto;
            padding: 10px 0;
        }
        .sidebar-nav .nav-group {
            margin-bottom: 2px;
        }
        .sidebar-nav .nav-parent {
            display: flex;
            align-items: center;
            padding: 12px 18px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            color: #c8d0d8;
            transition: var(--transition);
            gap: 10px;
            letter-spacing: 0.3px;
            position: relative;
        }
        .sidebar-nav .nav-parent:hover {
            background: var(--sidebar-hover);
            color: #e0e6ec;
        }
        .sidebar-nav .nav-parent .arrow {
            margin-left: auto;
            font-size: 11px;
            transition: transform 0.25s ease;
            opacity: 0.7;
        }
        .sidebar-nav .nav-parent.expanded .arrow {
            transform: rotate(90deg);
            opacity: 1;
        }
        .sidebar-nav .nav-parent .nav-icon {
            font-size: 16px;
            width: 22px;
            text-align: center;
            flex-shrink: 0;
        }
        .sidebar-nav .nav-children {
            overflow: hidden;
            max-height: 0;
            transition: max-height 0.35s ease, opacity 0.25s ease;
            opacity: 0;
        }
        .sidebar-nav .nav-children.show {
            max-height: 300px;
            opacity: 1;
        }
        .sidebar-nav .nav-child {
            display: flex;
            align-items: center;
            padding: 10px 18px 10px 50px;
            cursor: pointer;
            font-size: 13px;
            color: #9aa4b0;
            transition: var(--transition);
            letter-spacing: 0.2px;
            position: relative;
            gap: 8px;
        }
        .sidebar-nav .nav-child:hover {
            background: var(--sidebar-hover);
            color: #d0d8e0;
        }
        .sidebar-nav .nav-child.active {
            background: var(--sidebar-active);
            color: #fff;
            font-weight: 600;
            border-left: 3px solid #3498db;
            padding-left: 47px;
        }
        .sidebar-nav .nav-child .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #5a7a9a;
            flex-shrink: 0;
            transition: var(--transition);
        }
        .sidebar-nav .nav-child.active .dot {
            background: #5dade2;
            box-shadow: 0 0 8px rgba(52, 152, 219, 0.6);
        }
        .sidebar-footer {
            padding: 14px 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            font-size: 12px;
            color: #6a7584;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .sidebar-footer .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #3a5068;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #c8d0d8;
            flex-shrink: 0;
        }
        .btn-logout {
            margin-left: auto;
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #b0b8c4;
            padding: 5px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            transition: var(--transition);
            letter-spacing: 0.3px;
        }
        .btn-logout:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            border-color: rgba(255, 255, 255, 0.4);
        }

        /* 右侧主区域 */
        .main-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            height: 100vh;
            min-width: 0;
            background: var(--bg-main);
        }

        /* 右侧上部 - 查询区域（固定） */
        .query-area {
            background: var(--bg-white);
            padding: 14px 20px;
            border-bottom: 1px solid var(--border-color);
            flex-shrink: 0;
            z-index: 5;
            box-shadow: var(--shadow-sm);
            display: flex;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
            min-height: var(--query-area-height);
        }
        .query-area .query-title {
            font-weight: 700;
            font-size: 15px;
            color: var(--text-primary);
            white-space: nowrap;
            letter-spacing: 0.3px;
            margin-right: 4px;
        }
        .query-area select,
        .query-area input {
            padding: 8px 12px;
            border: 1.5px solid #dce3ea;
            border-radius: var(--radius-sm);
            font-size: 13px;
            background: #fafbfc;
            color: var(--text-primary);
            transition: var(--transition);
            min-width: 120px;
        }
        .query-area select:focus,
        .query-area input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.08);
            background: #fff;
        }
        .query-area input {
            width: 160px;
        }
        .btn-query {
            padding: 8px 18px;
            background: var(--primary);
            color: #fff;
            border: none;
            border-radius: var(--radius-sm);
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: var(--transition);
            letter-spacing: 0.4px;
            white-space: nowrap;
        }
        .btn-query:hover {
            background: var(--primary-hover);
            box-shadow: 0 4px 12px rgba(26, 111, 181, 0.25);
        }
        .btn-export {
            padding: 8px 18px;
            background: #fff;
            color: #2c7a4a;
            border: 1.5px solid #2c7a4a;
            border-radius: var(--radius-sm);
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: var(--transition);
            letter-spacing: 0.4px;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .btn-export:hover {
            background: #f0faf3;
            border-color: #1e5e35;
            color: #1e5e35;
            box-shadow: 0 4px 12px rgba(44, 122, 74, 0.15);
        }
        .btn-reset {
            padding: 8px 16px;
            background: #fff;
            color: #6b7d8e;
            border: 1.5px solid #dce3ea;
            border-radius: var(--radius-sm);
            cursor: pointer;
            font-size: 13px;
            transition: var(--transition);
            white-space: nowrap;
            letter-spacing: 0.3px;
        }
        .btn-reset:hover {
            background: #f5f7f9;
            border-color: #bcc5cf;
        }
        .query-result-info {
            font-size: 12px;
            color: var(--text-secondary);
            white-space: nowrap;
            margin-left: auto;
        }

        /* 右侧中部 - 数据展示区（可滚动） */
        .content-area {
            flex: 1;
            overflow-y: auto;
            overflow-x: auto;
            padding: 16px 20px;
            background: var(--bg-main);
        }
        .content-area .table-container {
            background: var(--bg-white);
            border-radius: var(--radius);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
            min-width: max-content;
        }
        .content-area table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            min-width: 1400px;
            table-layout: auto;
        }
        .content-area table thead {
            position: sticky;
            top: 0;
            z-index: 3;
        }
        .content-area table thead th {
            background: #f4f6f9;
            color: #3d4f5f;
            font-weight: 700;
            padding: 12px 10px;
            border-bottom: 2px solid #dce3ea;
            white-space: nowrap;
            font-size: 12px;
            letter-spacing: 0.3px;
            text-align: center;
            position: sticky;
            top: 0;
        }
        .content-area table tbody td {
            padding: 10px;
            border-bottom: 1px solid #eef1f5;
            text-align: center;
            white-space: nowrap;
            color: #3d4f5f;
            vertical-align: middle;
        }
        .content-area table tbody tr {
            transition: background 0.15s ease;
        }
        .content-area table tbody tr:hover {
            background: #f8fafc;
        }
        .content-area table tbody tr:nth-child(even) {
            background: #fafbfc;
        }
        .content-area table tbody tr:nth-child(even):hover {
            background: #f0f4f7;
        }
        .img-thumb {
            width: 48px;
            height: 34px;
            object-fit: cover;
            border-radius: 3px;
            cursor: pointer;
            border: 1.5px solid #dce3ea;
            transition: var(--transition);
            background: #f0f2f5;
            display: inline-block;
        }
        .img-thumb:hover {
            border-color: var(--primary);
            box-shadow: 0 2px 8px rgba(26, 111, 181, 0.2);
            transform: scale(1.08);
        }
        .tag-badge {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.2px;
            background: #e8f4fd;
            color: #1a6fb5;
        }
        .tag-badge.vip {
            background: #fff3e0;
            color: #c7761a;
        }
        .tag-badge.staff {
            background: #e8f5e9;
            color: #2e7d32;
        }
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #9aa4b0;
        }
        .empty-state .empty-icon {
            font-size: 56px;
            margin-bottom: 16px;
            opacity: 0.5;
        }
        .empty-state p {
            font-size: 15px;
            letter-spacing: 0.3px;
        }

        /* 右侧下部 - 分页区（固定） */
        .pagination-area {
            background: var(--bg-white);
            padding: 10px 20px;
            border-top: 1px solid var(--border-color);
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04);
            z-index: 5;
            min-height: var(--pagination-height);
        }
        .pagination-info {
            font-size: 13px;
            color: var(--text-secondary);
            white-space: nowrap;
        }
        .pagination-btns {
            display: flex;
            gap: 4px;
            align-items: center;
        }
        .pagination-btns button {
            padding: 7px 13px;
            border: 1.5px solid #dce3ea;
            background: #fff;
            cursor: pointer;
            border-radius: var(--radius-sm);
            font-size: 13px;
            transition: var(--transition);
            color: #3d4f5f;
            white-space: nowrap;
            min-width: 36px;
            text-align: center;
        }
        .pagination-btns button:hover:not(:disabled):not(.active-page) {
            background: #f0f4f7;
            border-color: #bcc5cf;
        }
        .pagination-btns button:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            background: #f8f9fa;
        }
        .pagination-btns button.active-page {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
            font-weight: 700;
            box-shadow: 0 2px 6px rgba(26, 111, 181, 0.25);
        }
        .page-size-select {
            padding: 6px 10px;
            border: 1.5px solid #dce3ea;
            border-radius: var(--radius-sm);
            font-size: 13px;
            background: #fff;
            cursor: pointer;
        }

        /* 图片放大模态框 */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.75);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            animation: fadeIn 0.2s ease;
        }
        .modal-overlay.show {
            display: flex;
        }
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        .modal-content {
            max-width: 90vw;
            max-height: 90vh;
            position: relative;
            cursor: default;
            animation: zoomIn 0.25s ease;
        }
        @keyframes zoomIn {
            from {
                transform: scale(0.85);
                opacity: 0;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }
        .modal-content img {
            max-width: 90vw;
            max-height: 85vh;
            border-radius: 8px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
            display: block;
            background: #fff;
            object-fit: contain;
        }
        .modal-close {
            position: absolute;
            top: -40px;
            right: 0;
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: #fff;
            font-size: 28px;
            cursor: pointer;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            line-height: 1;
        }
        .modal-close:hover {
            background: rgba(255, 255, 255, 0.35);
            transform: scale(1.1);
        }
        .modal-caption {
            text-align: center;
            color: #fff;
            margin-top: 10px;
            font-size: 14px;
            letter-spacing: 0.3px;
            opacity: 0.9;
        }

        /* 滚动条美化 */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        ::-webkit-scrollbar-track {
            background: transparent;
        }
        ::-webkit-scrollbar-thumb {
            background: #c4cdd6;
            border-radius: 3px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #a0aab4;
        }

        /* Toast提示 */
        .toast {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 2000;
            padding: 12px 20px;
            border-radius: 8px;
            color: #fff;
            font-weight: 600;
            font-size: 14px;
            letter-spacing: 0.3px;
            animation: slideIn 0.3s ease;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
            pointer-events: none;
        }
        @keyframes slideIn {
            from {
                transform: translateX(120%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        .toast.success {
            background: #2e7d32;
        }
        .toast.error {
            background: #c0392b;
        }
        .toast.info {
            background: #1a6fb5;
        }

        /* 响应式 */
        @media (max-width: 768px) {
            .sidebar {
                width: 200px;
            }
            .query-area {
                flex-wrap: wrap;
                gap: 8px;
                padding: 10px 14px;
            }
            .query-area input {
                width: 120px;
            }
            .content-area {
                padding: 10px;
            }
            .login-card {
                width: 92%;
                padding: 28px 20px 24px;
            }
        }
    