/* 后台全局主题变量 */
:root {
    --primary: #1e40af;
    --primary-dark: #0f172a;
    --primary-light: #3b82f6;
    --accent: #8b5cf6;
    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
    --header-height: 60px;
    --transition: all 0.25s ease;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* ========== 布局骨架 ========== */
.admin-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
}

.toggle-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.brand {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.header-btn {
    display: flex;
    align-items: center;
    height: var(--header-height);
    padding: 0 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    font-size: 14px;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.header-btn i {
    font-size: 18px;
    margin-right: 6px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

/* 侧边栏 */
.admin-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: #0f172a;
    color: #94a3b8;
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow: hidden;
}

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

.sidebar-menu a {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(59, 130, 246, 0.12);
    color: #fff;
    border-left-color: var(--primary-light);
}

.sidebar-menu i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    margin-right: 14px;
    flex-shrink: 0;
}

.menu-text {
    transition: opacity 0.2s;
}

.sidebar-footer {
    padding: 12px 20px;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========== 父子级菜单 ========== */
.menu-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.menu-parent {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 20px;
    color: #94a3b8;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
    user-select: none;
}

.menu-parent:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #fff;
}

.menu-group.expanded .menu-parent {
    background: rgba(59, 130, 246, 0.08);
    color: #fff;
    border-left-color: var(--primary-light);
}

.menu-group.expanded .menu-arrow {
    transform: rotate(90deg);
}

.menu-children {
    background: rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.menu-children a {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 20px 0 54px;
    color: #64748b;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    border-left: 3px solid transparent;
    font-size: 13px;
}

.menu-children a:hover,
.menu-children a.active {
    background: rgba(59, 130, 246, 0.1);
    color: #fff;
    border-left-color: var(--primary-light);
}

.menu-children i {
    font-size: 14px;
    width: 20px;
    text-align: center;
    margin-right: 10px;
    flex-shrink: 0;
}

/* 主内容区 */
.admin-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
    transition: var(--transition);
}

.main-breadcrumb {
    background: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.main-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.main-breadcrumb a:hover {
    color: var(--primary);
}

.main-breadcrumb .layui-icon {
    margin: 0 8px;
    color: #cbd5e1;
    font-size: 12px;
}

.main-breadcrumb span.active {
    color: #333;
    font-weight: 500;
}

.main-container {
    flex: 1;
    padding: 20px;
}

.admin-footer {
    background: #fff;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

/* 移动端遮罩 */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
}

/* 侧边栏折叠 */
.sidebar-collapsed .admin-sidebar {
    width: var(--sidebar-collapsed);
}

.sidebar-collapsed .admin-main {
    margin-left: var(--sidebar-collapsed);
}

.sidebar-collapsed .menu-text,
.sidebar-collapsed .sidebar-footer {
    opacity: 0;
    pointer-events: none;
}

.sidebar-collapsed .sidebar-menu a {
    padding: 0 20px;
    justify-content: center;
}

.sidebar-collapsed .sidebar-menu i {
    margin-right: 0;
}

/* ========== 登录页 ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #4c1d95 100%);
    overflow: hidden;
    padding: 20px;
}

.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
}

.login-page::before {
    width: 500px;
    height: 500px;
    background: #3b82f6;
    top: -120px;
    right: -120px;
}

.login-page::after {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    bottom: -100px;
    left: -100px;
}

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    padding: 40px;
    animation: loginFadeIn 0.6s ease-out;
}

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

.login-brand {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.login-brand h1 {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px;
}

.login-brand p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    margin: 0;
}

.login-input-group {
    position: relative;
    margin-bottom: 20px;
}

.login-input-group .login-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    z-index: 1;
}

.login-input-group input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}

.login-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.login-input-group input:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
}

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

.login-footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    z-index: 2;
}

/* ========== 个人资料页 ========== */
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    margin-bottom: 15px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .mobile-overlay {
        display: block;
    }

    .brand span {
        display: none;
    }

    .header-btn span {
        display: none;
    }

    .header-btn i {
        margin-right: 0;
    }

    .main-container {
        padding: 15px;
    }

    .login-card {
        padding: 30px 24px;
    }

    .layui-table-view,
    .layui-table-box {
        overflow-x: auto;
    }
}

/* ========== Layui 组件微调 ========== */
.layui-card {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.layui-card-header {
    font-weight: 500;
    color: #1e293b;
}

.layui-btn {
    border-radius: 6px;
}

.layui-btn-normal {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.layui-laypage .layui-laypage-curr .layui-laypage-em {
    background-color: var(--primary);
}

/* ==========================================================
   UI美化增强 (2026-07-03)
   ========================================================== */

/* ---------- CSS变量增强 ---------- */
:root {
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.25);

    --duration-fast: 0.15s;
    --duration-base: 0.25s;
    --duration-slow: 0.35s;

    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
}

/* ---------- 统计卡片 ---------- */
.stats-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform var(--duration-base) ease, box-shadow var(--duration-base) ease;
    border: 1px solid rgba(226, 232, 240, 0.6);
    animation: fadeIn 0.5s ease both;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stats-card-compact {
    padding: 12px 14px;
    gap: 10px;
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 22px;
    box-shadow: var(--shadow);
}

.stats-icon.bg-primary { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stats-icon.bg-success { background: linear-gradient(135deg, #10b981, #059669); }
.stats-icon.bg-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stats-icon.bg-danger  { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stats-icon.bg-info    { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.stats-icon.bg-purple  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stats-icon.bg-teal    { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.stats-icon.bg-orange  { background: linear-gradient(135deg, #f97316, #ea580c); }

.stats-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(90deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-label {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
}

.stats-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 6px;
}

.stats-trend.up {
    color: var(--success);
    background: var(--success-light);
}

.stats-trend.down {
    color: var(--danger);
    background: var(--danger-light);
}

.stats-trend i {
    font-size: 12px;
}

/* ---------- 表格优化 ---------- */
.layui-table {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.layui-table thead tr {
    background: linear-gradient(90deg, #0f172a, #1e3a8a);
    color: #fff;
}

.layui-table thead th {
    border-bottom: none;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 15px;
    color: #fff;
}

.layui-table tbody tr {
    transition: background var(--duration-fast) ease;
}

.layui-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.layui-table tbody tr:hover {
    background: #eff6ff !important;
}

.layui-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
}

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

/* ---------- 按钮优化 ---------- */
.layui-btn {
    border-radius: 8px !important;
    transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease, filter var(--duration-fast) ease;
}

.layui-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    filter: brightness(1.05);
}

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

.btn-gradient {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-gradient:hover {
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

/* ---------- 表单优化 ---------- */
.layui-input,
.layui-textarea,
.layui-select {
    border-radius: 8px !important;
    transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, background var(--duration-fast) ease;
    border: 1px solid #e2e8f0;
}

.layui-input:focus,
.layui-textarea:focus,
.layui-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--shadow-glow);
    outline: none;
}

.form-group {
    margin-bottom: 18px;
}

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

/* ---------- 卡片优化 ---------- */
.layui-card {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow) !important;
    transition: box-shadow var(--duration-base) ease, transform var(--duration-base) ease;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.layui-card:hover {
    box-shadow: var(--shadow-md) !important;
}

.card-header-gradient {
    background: linear-gradient(90deg, #0f172a, #1e3a8a);
    color: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 15px;
}

.layui-card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
}

/* ---------- 动画关键帧 ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.animate-fadeIn  { animation: fadeIn  0.5s ease both; }
.animate-slideUp { animation: slideUp 0.5s ease both; }
.animate-scaleIn { animation: scaleIn 0.4s ease both; }

/* 顺序延迟动画 */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.30s; }
.delay-7 { animation-delay: 0.35s; }
.delay-8 { animation-delay: 0.40s; }

/* ---------- 标签 / 徽标 ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1.4;
}

.badge-success { background: var(--success-light); color: #047857; }
.badge-warning { background: var(--warning-light); color: #b45309; }
.badge-danger  { background: var(--danger-light);  color: #b91c1c; }
.badge-info    { background: var(--info-light);    color: #1d4ed8; }
.badge-dark    { background: #e2e8f0;              color: #334155; }

.tag-gradient {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

/* ---------- 布局工具类 ---------- */
.flex          { display: flex; }
.flex-between  { display: flex; justify-content: space-between; align-items: center; }
.flex-center   { display: flex; justify-content: center; align-items: center; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-wrap     { flex-wrap: wrap; }
.flex-col      { flex-direction: column; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

/* ---------- 快捷操作 ---------- */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-actions .layui-btn {
    border-radius: 10px !important;
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}

.quick-actions .layui-btn i {
    font-size: 16px;
}

/* ---------- 图表容器优化 ---------- */
.chart-container {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

/* ---------- 登录页增强 ---------- */
.login-page .floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}

.login-page .shape-1 {
    width: 300px; height: 300px;
    background: #06b6d4;
    top: 10%; left: 10%;
    animation: float 8s ease-in-out infinite;
}

.login-page .shape-2 {
    width: 200px; height: 200px;
    background: #ec4899;
    top: 60%; right: 15%;
    animation: float 10s ease-in-out infinite reverse;
}

.login-page .shape-3 {
    width: 250px; height: 250px;
    background: #10b981;
    bottom: 10%; left: 30%;
    animation: float 12s ease-in-out infinite;
}

.login-page .shape-4 {
    width: 180px; height: 180px;
    background: #f59e0b;
    top: 30%; right: 5%;
    animation: float 9s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* 登录输入框浮动label效果 */
.login-input-group-float {
    position: relative;
    margin-bottom: 20px;
}

.login-input-group-float input {
    width: 100%;
    height: 52px;
    padding: 18px 16px 6px 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 15px;
    transition: all var(--duration-base) ease;
    outline: none;
}

.login-input-group-float input::placeholder {
    color: transparent;
}

.login-input-group-float input:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-input-group-float label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    pointer-events: none;
    transition: all var(--duration-fast) ease;
}

.login-input-group-float input:focus + label,
.login-input-group-float input:not(:placeholder-shown) + label {
    top: 10px;
    transform: translateY(0);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
}

.login-input-group-float .login-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    z-index: 1;
}

/* 按钮ripple效果 */
.login-btn-ripple {
    position: relative;
    overflow: hidden;
}

.login-btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

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

/* ---------- 响应式补充 ---------- */
@media (max-width: 768px) {
    .stats-card {
        padding: 16px;
        gap: 12px;
    }
    .stats-value {
        font-size: 22px;
    }
    .quick-actions {
        gap: 8px;
    }
    .quick-actions .layui-btn {
        padding: 0 14px;
        height: 36px;
        line-height: 36px;
        font-size: 13px;
    }
}

/* ==========================================================
   移动端适配增强 (2026-07-03)
   ========================================================== */

/* ---------- 移动端底部快捷导航栏 ---------- */
.mobile-nav-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: #fff;
        z-index: 1001;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #f1f5f9;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .mobile-nav-bar .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        flex: 1;
        color: #94a3b8;
        text-decoration: none;
        font-size: 11px;
        transition: color 0.2s ease;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-bar .nav-item i {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .mobile-nav-bar .nav-item.active,
    .mobile-nav-bar .nav-item:active {
        color: transparent;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    /* 为底部导航留出空间 */
    .admin-main {
        padding-bottom: 56px;
    }

    .admin-footer {
        margin-bottom: 56px;
    }
}

/* ---------- 移动端触控优化 ---------- */
@media (max-width: 768px) {
    /* 按钮、链接、菜单项最小触控区域 */
    .layui-btn,
    .header-btn,
    .sidebar-menu a,
    .layui-table tbody td a,
    .main-breadcrumb a,
    .layui-tab-title li,
    .layui-laypage a,
    .layui-laypage span,
    .layui-form-switch,
    .layui-form-checkbox {
        min-height: 44px;
        min-width: 44px;
    }

    .layui-tab-title li {
        line-height: 44px;
        padding: 0 16px;
    }

    .sidebar-menu a {
        height: auto;
        min-height: 48px;
        padding: 12px 20px;
    }

    /* 表单输入框优化 */
    .layui-input,
    .layui-textarea,
    .layui-select,
    .login-input-group input,
    .login-input-group-float input {
        min-height: 44px;
        font-size: 16px !important;
    }

    .layui-form-select dl dd {
        min-height: 44px;
        line-height: 44px;
        font-size: 15px;
    }

    /* 表格优化 */
    .layui-table-view,
    .layui-table-box {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .layui-table thead tr {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .layui-table {
        min-width: 600px;
    }
}

/* ---------- 移动端字体适配 ---------- */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .layui-card-header {
        font-size: 15px;
        padding: 12px 15px;
    }

    .layui-card-body {
        font-size: 14px;
    }

    h3 {
        font-size: 18px;
    }

    .stats-card {
        width: 100%;
    }

    .layui-row .layui-col-sm12 + .layui-col-sm12 {
        margin-top: 12px;
    }

    /* 统计卡片在移动端改为双列 */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stats-grid .stats-card {
        flex-direction: column;
        text-align: center;
        padding: 16px 10px;
        gap: 8px;
    }

    .stats-grid .stats-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .stats-grid .stats-value {
        font-size: 20px;
    }

    .stats-grid .stats-label {
        font-size: 12px;
    }
}

/* ---------- 移动端侧边栏优化 ---------- */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 80%;
        max-width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar-open .admin-sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
    }

    .sidebar-menu a {
        padding: 14px 20px;
        font-size: 15px;
    }

    .sidebar-menu i {
        font-size: 20px;
        margin-right: 16px;
    }
}

/* ---------- 移动端表单优化 ---------- */
@media (max-width: 768px) {
    .layui-form-item {
        display: block;
    }

    .layui-form-label {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0 0 6px;
        float: none;
        font-size: 14px;
        font-weight: 500;
    }

    .layui-input-block,
    .layui-input-inline {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .layui-form-item .layui-inline {
        display: block;
        width: 100% !important;
        margin-right: 0;
        margin-bottom: 8px;
    }

    .layui-form-item .layui-inline + .layui-inline {
        margin-left: 0;
    }

    /* 按钮布局 */
    .layui-form-item .layui-input-block .layui-btn,
    .layui-form-item .layui-input-inline .layui-btn {
        width: 100%;
        margin-left: 0;
        margin-bottom: 10px;
    }

    .layui-form-item .layui-input-block .layui-btn:last-child,
    .layui-form-item .layui-input-inline .layui-btn:last-child {
        margin-bottom: 0;
    }

    /* 双列按钮布局选项（需配合HTML使用） */
    .mobile-btn-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mobile-btn-group .layui-btn {
        width: 100%;
        margin: 0;
    }

    /* 个人资料页头像优化 */
    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    /* 快捷操作卡片 */
    .profile-quick-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .profile-quick-actions .layui-btn {
        width: 100%;
        margin: 0;
        height: 44px;
        line-height: 44px;
        font-size: 14px;
    }

    /* 密码强度条 */
    .pwd-strength-bar {
        height: 6px;
        border-radius: 3px;
        background: #e2e8f0;
        margin-top: 8px;
        overflow: hidden;
    }

    .pwd-strength-fill {
        height: 100%;
        width: 0;
        border-radius: 3px;
        transition: width 0.3s ease, background 0.3s ease;
    }

    .pwd-strength-fill.weak {
        width: 33%;
        background: #ef4444;
    }

    .pwd-strength-fill.medium {
        width: 66%;
        background: #f59e0b;
    }

    .pwd-strength-fill.strong {
        width: 100%;
        background: #10b981;
    }

    .pwd-strength-text {
        font-size: 12px;
        margin-top: 4px;
        color: #94a3b8;
    }

    .pwd-strength-text.weak { color: #ef4444; }
    .pwd-strength-text.medium { color: #f59e0b; }
    .pwd-strength-text.strong { color: #10b981; }
}
