/* 云寄售多商户系统 - 蓝橙白高级感主题 */
:root {
    --primary: #1677ff;
    --primary-dark: #0958d9;
    --primary-light: #e6f4ff;
    --accent: #fa8c16;
    --accent-dark: #d46b08;
    --accent-light: #fff3e6;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
    --shadow-lg: 0 4px 12px rgba(15, 23, 42, .06), 0 12px 40px rgba(15, 23, 42, .10);
    --text: #0f172a;
    --text-sub: #64748b;
    --border: #e8efff;
    --sidebar-bg: linear-gradient(180deg, #f8fbff 0%, #fff8f0 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: #f5f8ff; color: var(--text); font-size: 14px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--primary); transition: color .2s; }
a:hover { color: var(--primary-dark); }

/* ================= 登录页 ================= */
.login-wrap {
    width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0b3d91 0%, #1677ff 40%, #fa8c16 100%);
    padding: 24px;
    position: relative; overflow: hidden;
}
.login-wrap::before {
    content: ''; position: absolute; width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 70%);
    top: -200px; right: -150px;
}
.login-wrap::after {
    content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
    bottom: -140px; left: -100px;
}
.login-box {
    background: #fff; border-radius: 20px; padding: 44px 40px; width: 420px;
    box-shadow: 0 24px 64px rgba(7, 34, 84, .28);
    position: relative; z-index: 2;
}
.login-box h2 { text-align: center; font-size: 26px; margin-bottom: 6px; color: var(--text); letter-spacing: -.5px; }
.login-box .sub { text-align: center; color: var(--text-sub); margin-bottom: 32px; font-size: 13px; }
.login-box .brand {
    width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #4aa3ff);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff; box-shadow: 0 8px 24px rgba(22,119,255,.35);
}
.login-box .brand img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }

/* ================= 表单 ================= */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: flex; align-items: center; gap: 6px; margin-bottom: 9px;
    color: #334155; font-weight: 600; font-size: 13.5px;
}
.form-group input, .form-group select {
    width: 100%; height: 50px; padding: 0 16px;
    border: 1.5px solid #e3ecff; border-radius: 12px;
    font-size: 15px; transition: all .22s; background: #fbfdff;
    color: var(--text); font-family: inherit;
    -webkit-appearance: none; appearance: none;
}
.form-group textarea {
    width: 100%; padding: 14px 16px;
    border: 1.5px solid #e3ecff; border-radius: 12px;
    font-size: 14px; line-height: 1.7; transition: all .22s; background: #fbfdff;
    color: var(--text); font-family: inherit; resize: vertical;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 4px rgba(22,119,255,.12);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #a9b6cb; font-weight: 400; }
.form-group select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%238fa3c0' stroke-width='1.5' fill='none'/></svg>");
    background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}

/* ================= 按钮 ================= */
.btn {
    display: inline-block; padding: 11px 26px; border: none; border-radius: 10px; cursor: pointer;
    font-size: 14px; font-weight: 500; background: var(--primary); color: #fff;
    transition: all .2s; font-family: inherit; text-align: center;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(22,119,255,.28); color: #fff; }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #4aa3ff); }
.btn-success { background: linear-gradient(135deg, #22c55e, #4ade80); }
.btn-danger  { background: linear-gradient(135deg, #ef4444, #f87171); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; }
.btn-default { background: #fff; color: var(--primary); border: 1px solid #bcd4ff; }
.btn-default:hover { background: var(--primary-light); color: var(--primary-dark); box-shadow: none; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }

/* ================= 页面加载遮罩 ================= */
.page-loading {
    position: fixed; inset: 0; z-index: 9999; background: #f5f8ff;
    display: flex; align-items: center; justify-content: center;
    transition: opacity .3s;
}
.page-loading.hide { opacity: 0; pointer-events: none; }
.loading-box { text-align: center; }
.loading-spinner {
    width: 44px; height: 44px; margin: 0 auto 16px;
    border: 3px solid #e3ecff; border-top-color: var(--primary);
    border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text-sub); font-size: 14px; }

/* ================= 后台布局 ================= */
.admin-layout { display: flex; min-height: 100vh; }

/* 手机端抽屉菜单按钮：桌面不显示 */
.menu-trigger {
    display: none; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 10px; border: 1px solid #dbe7fa;
    background: #fff; color: #1677ff; font-size: 13.5px; font-weight: 600;
    cursor: pointer; margin-right: 12px; flex-shrink: 0;
}
.menu-trigger span { font-size: 15px; }
.menu-mask { display: none; }
.sidebar {
    width: 232px; background: var(--sidebar-bg); flex-shrink: 0;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.sidebar .logo {
    height: 76px; display: flex; align-items: center; gap: 10px; padding: 0 24px;
    font-size: 16px; font-weight: 700; color: var(--text);
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sidebar .logo .mark {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), #4aa3ff);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px; overflow: hidden;
}
.sidebar .logo .mark img { width: 100%; height: 100%; object-fit: cover; }
.sidebar .logo .txt { font-size: 15px; line-height: 1.2; }
.sidebar .logo .txt small { display: block; font-size: 11px; color: #94a3b8; font-weight: 400; }

.sidebar .menu { list-style: none; padding: 14px 12px; overflow-y: auto; flex: 1; }
.sidebar .menu li { margin-bottom: 4px; }
.sidebar .menu li a {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px;
    color: #475569; border-radius: 10px; transition: all .18s; font-size: 14px;
}
.sidebar .menu li a:hover { color: var(--primary); background: #f2f7ff; }
.sidebar .menu li a.active {
    color: var(--primary); background: var(--primary-light); font-weight: 600;
    box-shadow: inset 3px 0 0 var(--primary);
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 76px; background: rgba(255,255,255,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
    position: sticky; top: 0; z-index: 10;
}
.topbar .greet { font-size: 15px; font-weight: 500; }
.topbar .greet span { color: var(--text-sub); font-weight: 400; font-size: 13px; display: block; }
.topbar .user-info { display: flex; gap: 16px; align-items: center; font-size: 13px; }
.content { padding: 28px; flex: 1; }

/* ================= 卡片 ================= */
.card {
    background: #fff; border-radius: var(--radius); padding: 26px;
    margin-bottom: 22px; box-shadow: var(--shadow); border: 1px solid #f0f5ff;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-title {
    font-size: 17px; font-weight: 700; margin-bottom: 22px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border); color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.card-title::before {
    content: ''; width: 4px; height: 16px; border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}

/* ================= 统计卡片 ================= */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 26px; }
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); position: relative; overflow: hidden;
    border: 1px solid #f0f5ff; transition: transform .25s, box-shadow .25s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card::after {
    content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px;
    border-radius: 50%; background: linear-gradient(135deg, var(--primary-light), var(--accent-light)); opacity: .8;
}
.stat-card .label { color: var(--text-sub); font-size: 13px; margin-bottom: 10px; position: relative; z-index: 1; }
.stat-card .value { font-size: 30px; font-weight: 700; color: var(--text); position: relative; z-index: 1; letter-spacing: -.5px; }

/* ================= 表格 ================= */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; font-size: 13.5px; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #f1f5ff; vertical-align: middle; }
.table th { background: #f8fbff; font-weight: 600; color: #475569; font-size: 13px; white-space: nowrap; }
.table th:first-child { border-radius: 10px 0 0 0; }
.table th:last-child { border-radius: 0 10px 0 0; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafdff; }

/* ================= 徽章 ================= */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-success { background: #ecfdf3; color: #16a34a; }
.badge-warn    { background: #fffbeb; color: #d97706; }
.badge-info    { background: #eff6ff; color: #2563eb; }
.badge-danger  { background: #fef2f2; color: #dc2626; }
.badge-default { background: #f1f5f9; color: #64748b; }

/* ================= 分页 ================= */
.paginate { margin-top: 22px; text-align: center; }
.paginate a {
    display: inline-block; padding: 8px 14px; margin: 0 4px; border: 1px solid var(--border);
    border-radius: 8px; color: var(--text-sub); font-size: 13px; transition: all .2s;
}
.paginate a:hover { border-color: var(--primary); color: var(--primary); }
.paginate a.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

/* ================= 提示 ================= */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: #ecfdf3; border-left: 4px solid #22c55e; color: #15803d; }
.alert-error   { background: #fef2f2; border-left: 4px solid #ef4444; color: #b91c1c; }
.alert-info    { background: #eff6ff; border-left: 4px solid var(--primary); color: var(--primary-dark); }

/* ================= 网格 ================= */
.row { display: flex; gap: 20px; flex-wrap: wrap; }
.col-6 { flex: 1; min-width: 280px; }

/* ================= 买家端 ================= */
.shop-header {
    background: #fff; box-shadow: 0 2px 16px rgba(15,23,42,.05);
    padding: 0; position: sticky; top: 0; z-index: 10;
    border-bottom: 1px solid var(--border);
}
.shop-header .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 72px; display: flex; align-items: center; justify-content: space-between; }
.shop-logo { font-size: 19px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; }
.shop-logo .mark {
    width: 32px; height: 32px; border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), #4aa3ff);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; overflow: hidden;
}
.shop-logo .mark img { width: 100%; height: 100%; object-fit: cover; }

.goods-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 24px; }
.goods-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: all .25s; border: 1px solid #f0f5ff;
}
.goods-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.goods-card .cover {
    height: 150px; background: linear-gradient(135deg, var(--primary), #69b1ff);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px;
}
.goods-card .info { padding: 18px; }
.goods-card .name { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.goods-card .price { color: #ef4444; font-size: 20px; font-weight: 700; }
.goods-card .price small { font-size: 13px; color: #94a3b8; text-decoration: line-through; margin-left: 8px; font-weight: 400; }

/* ================= 响应式 ================= */
@media (max-width: 900px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .goods-grid { grid-template-columns: repeat(2, 1fr); }

    /* 手机端：侧栏收成抽屉，点左上角「功能选项」才展开 */
    .admin-layout { flex-direction: column; }
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        width: 264px; max-width: 82vw;
        background: #fff; z-index: 60;
        border-right: 1px solid var(--border); border-bottom: none;
        transform: translateX(-100%); transition: transform .26s cubic-bezier(.4,0,.2,1);
        box-shadow: 0 0 40px rgba(15, 35, 70, .2);
        display: flex; flex-direction: column;
    }
    .sidebar.open { transform: none; }
    .sidebar .logo { display: flex; height: 62px; padding: 0 16px; }
    .sidebar .menu {
        display: block; overflow-y: auto; flex: 1; padding: 10px 12px 20px;
    }
    .sidebar .menu li { margin-bottom: 4px; }
    .sidebar .menu li a {
        white-space: normal; font-size: 14px; padding: 11px 14px;
        background: transparent; border-radius: 10px; gap: 10px; color: #33465f;
    }
    .sidebar .menu li a.active { background: var(--primary-light); color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }

    .menu-trigger { display: inline-flex; }
    .menu-mask {
        display: block; position: fixed; inset: 0; z-index: 55;
        background: rgba(12, 26, 48, .45);
        opacity: 0; pointer-events: none; transition: opacity .22s;
    }
    .menu-mask.show { opacity: 1; pointer-events: auto; }

    .topbar { padding: 12px 16px; min-height: 72px; }
    .content { padding: 16px; }

    /* 手机端表格：横向滚动，不挤压 */
    .table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .table th, .table td { padding: 10px 12px; font-size: 12.5px; }
    .table th:first-child { border-radius: 0; }
    .table th:last-child { border-radius: 0; }
}
@media (max-width: 560px) {
    .goods-grid { grid-template-columns: 1fr; }
    .login-box { padding: 32px 24px; width: 100%; }
    .search-stat { display: block; }
}

/* ================= 门户首页（移动优先） ================= */
.portal { background: #fff; }
.portal-head {
    max-width: 1200px; margin: 0 auto; padding: 30px 20px 6px;
    display: flex; align-items: flex-start; justify-content: space-between;
}
.portal-title { font-size: 25px; font-weight: 800; letter-spacing: -.6px; color: #111827; line-height: 1.25; }
.portal-sub { color: #8a94a6; font-size: 13px; margin-top: 8px; }
.portal-login {
    display: flex; align-items: center; gap: 5px; color: #374151; font-size: 14px;
    white-space: nowrap; padding-top: 4px;
}
.portal-login:hover { color: var(--primary); }
.portal-login--solid {
    background: var(--primary); color: #fff !important;
    border-radius: 24px; padding: 10px 24px;
}

.hero-grid {
    max-width: 1200px; margin: 0 auto; padding: 22px 16px;
    display: grid; grid-template-columns: 1.58fr 1fr; gap: 12px;
}
.hero-card {
    width: 100%; box-sizing: border-box;
    border-radius: 20px; padding: 18px 14px; color: #fff; position: relative; overflow: hidden;
    min-height: 160px; display: flex; flex-direction: column; justify-content: space-between;
    transition: transform .25s, box-shadow .25s;
}
.hero-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,.16); }
.hero-card.blue { background: linear-gradient(160deg, #2c8bff 0%, #0c77fe 100%); }
.hero-card.orange { background: linear-gradient(160deg, #ff9d4c 0%, #fe6b1d 100%); }
.hero-card h3 { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.hero-card p { font-size: 11px; opacity: .9; margin-top: 8px; line-height: 1.5; }
.hero-card .foot { font-size: 12px; opacity: .8; }
.hero-card .ico { position: absolute; right: 18px; bottom: 16px; opacity: .95; display: flex; }
.hero-card .ico svg { width: 40px; height: 40px; }

.icon-nav {
    max-width: 1200px; margin: 0 auto; padding: 18px 16px 34px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.icon-nav a { text-align: center; color: #1f2937; font-size: 13.5px; }
.icon-nav a:hover { color: var(--primary); }
.icon-nav .ic {
    width: 52px; height: 52px; margin: 0 auto 8px;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
    transition: transform .2s;
}
.icon-nav .ic svg { width: 36px; height: 36px; }
.icon-nav .ic img { width: 29px; height: 29px; display: block; object-fit: contain; }
.icon-nav a:hover .ic { transform: scale(1.08); }

.info-sec { background: #f8f8f8; padding: 26px 20px 44px; }
.info-inner { max-width: 1200px; margin: 0 auto; }
.info-title { font-size: 19px; font-weight: 700; color: #111827; }
.info-sub { color: #8a94a6; font-size: 13px; margin-top: 6px; }
.tabs { display: flex; gap: 10px; overflow-x: auto; margin: 18px 0 20px; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: 9px 18px; border-radius: 10px; background: #f0f1f3; color: #6b7280;
    font-size: 13.5px; white-space: nowrap; transition: all .2s; border: none; cursor: pointer;
}
.tab.active { background: var(--primary); color: #fff; font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: panelFade .26s ease-out both; }
.tab-panel.active .notice-item { animation: itemIn .5s cubic-bezier(.32,.72,.24,1) both; }
.tab-panel.active .notice-item:nth-child(2) { animation-delay: .04s; }
.tab-panel.active .notice-item:nth-child(3) { animation-delay: .08s; }
.tab-panel.active .notice-item:nth-child(4) { animation-delay: .12s; }
@keyframes panelFade {
    from { opacity: .5; }
    to   { opacity: 1; }
}
@keyframes itemIn {
    from { opacity: 0; transform: translateX(-34px); }
    to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .tab-panel.active, .tab-panel.active .notice-item { animation: none; }
}

.notice-item {
    text-decoration: none; color: inherit;
    background: #fff; border-radius: 16px; padding: 18px 20px; margin-bottom: 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    transition: box-shadow .2s; overflow: hidden;
}
.notice-item:hover { box-shadow: 0 4px 16px rgba(15,23,42,.07); }
.notice-item .ntxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.notice-item .t {
    font-size: 15px; color: #1f2937; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notice-item .d { color: #9aa4b2; font-size: 12.5px; white-space: nowrap; }
.notice-thumb {
    width: clamp(92px, 30vw, 110px); aspect-ratio: 110 / 88; height: auto;
    flex: 0 0 auto; border-radius: 16px; position: relative; overflow: hidden;
    background: #fff; box-shadow: 0 2px 10px rgba(15,23,42,.06);
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    padding: 12px; gap: 4px;
}
.thumb-tag, .thumb-name, .thumb-dot, .thumb-dot2 { position: relative; z-index: 1; }
.thumb-tag { color: #b6bfcc; font-size: clamp(8px, 2.5vw, 9px); letter-spacing: .2px; }
.thumb-name { color: #1f2937; font-size: clamp(12px, 3.9vw, 14px); white-space: nowrap; margin-top: 1px; }
.thumb-dot, .thumb-dot2 { position: absolute; bottom: 13px; width: 8px; height: 8px; border-radius: 50%; }
.thumb-dot2 { left: 19px; background: rgba(57,107,247,.35); z-index: 1; }
.thumb-dot { left: 11px; background: var(--primary); z-index: 2; }
.thumb-cube {
    position: absolute; right: -2%; top: 20%; width: 36%; aspect-ratio: 1 / 1; height: auto; z-index: 0;
}
.thumb-cube .front {
    position: absolute; inset: 0;
    background: #3a6bf5;
    clip-path: polygon(50% 0%, 99% 17%, 99% 85%, 87% 100%, 13% 100%, 1% 85%, 1% 17%);
}
.thumb-cube .side {
    position: absolute; inset: 0;
    background: #7b9df8;
    clip-path: polygon(50% 0%, 99% 17%, 99% 85%, 87% 100%, 50% 100%);
}
.more-link { display: block; text-align: center; color: #c3cad4; font-size: 13.5px; padding: 18px 0 4px; text-decoration: none; }
.empty-notice { text-align: center; color: #9aa4b2; padding: 40px 0; font-size: 14px; }

/* 手机端两个大卡保持并排，整体更紧凑 */
@media (max-width: 560px) {
    .portal-head { padding: 24px 18px 4px; }
    .portal-title { font-size: 23px; }
    .hero-grid { padding: 14px 18px; gap: 12px; }
    .hero-card { padding: 18px; min-height: 150px; border-radius: 18px; }
    .hero-card h3 { font-size: 19px; }
    .hero-card .ico { right: 12px; bottom: 10px; }
    .hero-card .ico svg { width: 36px; height: 36px; }
    .icon-nav { padding: 12px 16px 24px; }
    .icon-nav .ic { width: 46px; height: 46px; font-size: 25px; }
    .icon-nav a { font-size: 12.5px; }
    .info-sec { padding: 22px 16px 36px; }
    .tabs { gap: 8px; }
    .tab { flex: 1 1 0; padding: 9px 4px; font-size: 12.5px; text-align: center; }
    .notice-item { padding: 16px; }
    .notice-thumb { width: clamp(88px, 30vw, 110px); }
}

/* 后台页头大标题 */
.page-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: #111827; line-height: 1.3; }
.page-head p { font-size: 13px; color: #8a94a6; margin-top: 5px; }
.topbar { height: auto; min-height: 84px; padding: 16px 28px; }
.topbar .user-info a { padding: 7px 14px; border-radius: 9px; background: #f5f8ff; font-size: 13px; }
.topbar .user-info a:hover { background: var(--primary-light); }
@media (max-width: 900px) {
    .page-head h1 { font-size: 18px; }
    .topbar { min-height: 72px; padding: 12px 16px; }
}

/* 快捷入口 */
.quick-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 14px; margin-bottom: 24px; }
.quick-nav a {
    background: #fff; border-radius: 16px; padding: 18px 8px 14px; text-align: center;
    box-shadow: var(--shadow); border: 1px solid #f0f5ff; transition: all .2s;
}
.quick-nav a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.quick-nav .qi {
    width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 9px;
    display: flex; align-items: center; justify-content: center; font-size: 21px; background: #f2f7ff;
}
.quick-nav .t { font-size: 13px; color: #374151; }
.quick-nav a:hover .t { color: var(--primary); }


/* 登录页表单强化 */
.login-box .form-group input { height: 52px; font-size: 15px; }
.login-box .form-group label { font-size: 13.5px; }
.login-box .btn { height: 50px; font-size: 15.5px; font-weight: 600; letter-spacing: 1px; }

/* 无卡角标 */
.out-stock-tag {
    position: absolute;
    right: 0;
    bottom: 78px;
    background: linear-gradient(135deg, #ff7a45, #ff4d4f);
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    padding: 4px 12px;
    border-radius: 12px 0 0 12px;
    box-shadow: 0 3px 10px rgba(255, 77, 79, .25);
    z-index: 3;
}
.btn-disabled {
    display: inline-block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    background: #f0f2f5;
    color: #a8abb2;
    cursor: not-allowed;
    font-size: 14px;
}
.btn-disabled:hover { background: #f0f2f5; }

/* 店铺分类导航 */
.cat-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 16px;
    margin-bottom: 8px;
    scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-item {
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: 999px;
    background: #fff;
    color: #444;
    font-size: 14px;
    border: 1px solid #e8edf5;
    text-decoration: none;
    transition: all .18s;
}
.cat-item:hover { border-color: #1677ff; color: #1677ff; }
.cat-item.active {
    background: linear-gradient(135deg, #3b8cff, #1677ff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(22, 119, 255, .28);
}

/* ============ 统一视觉升级 v2.7 ============ */
.card {
    border-radius: 16px;
    border: 1px solid #eef2f9;
    box-shadow: 0 4px 20px rgba(22, 119, 255, .06);
    padding: 24px;
}
.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1b2b47;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f4fa;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, #3b8cff, #1677ff);
}
.table {
    border-radius: 12px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.table th {
    background: #f6f9ff;
    color: #4a5b74;
    font-weight: 600;
    font-size: 13px;
    padding: 13px 14px;
    border-bottom: 1px solid #e8eefa;
}
.table td {
    padding: 13px 14px;
    border-bottom: 1px solid #f4f7fc;
    font-size: 14px;
    color: #2b3445;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafcff; }
.btn { border-radius: 10px; font-weight: 500; transition: all .18s; }
.btn-primary {
    background: linear-gradient(135deg, #3b8cff, #1677ff);
    border: none;
    box-shadow: 0 6px 16px rgba(22, 119, 255, .22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(22, 119, 255, .3); }
.btn-success { background: linear-gradient(135deg, #40c57c, #22a55b); border: none; }
.btn-warning { background: linear-gradient(135deg, #ffb547, #fa8c16); border: none; color: #fff; }
.btn-danger { background: linear-gradient(135deg, #ff7875, #f5222d); border: none; }
.badge { border-radius: 8px; padding: 3px 10px; font-size: 12px; font-weight: 500; }
.badge-success { background: #e8f8ef; color: #1a9c57; }
.badge-warn { background: #fff5e6; color: #d97a00; }
.badge-danger { background: #ffecec; color: #e0333f; }
.badge-default { background: #f1f4f9; color: #6b7a91; }
.badge-info { background: #e8f1ff; color: #1677ff; }
.stat-card {
    border-radius: 16px;
    border: 1px solid #eef2f9;
    background: #fff;
    box-shadow: 0 4px 20px rgba(22, 119, 255, .06);
    padding: 22px;
}
.stat-card .label { font-size: 13px; color: #7b8aa3; margin-bottom: 10px; }
.stat-card .value { font-size: 26px; font-weight: 700; color: #1b2b47; letter-spacing: -.5px; }
.stat-grid { gap: 16px; }
.alert { border-radius: 12px; padding: 14px 18px; font-size: 14px; border: none; }
.alert-success { background: #eaf9f0; color: #19875a; }
.alert-error { background: #ffeeee; color: #cf2f3c; }
.alert-info { background: #eef4ff; color: #1668d8; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=file], select, textarea {
    border-radius: 10px;
    border: 1.5px solid #e2e9f5;
    background: #fff;
    transition: all .18s;
}
input[type=text]:focus, input[type=password]:focus, input[type=number]:focus, input[type=email]:focus, select:focus, textarea:focus {
    border-color: #3b8cff;
    box-shadow: 0 0 0 3px rgba(59, 140, 255, .12);
    outline: none;
}

/* ============ 店铺分类卡片（一行两个） ============ */
.cat-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1b2b47;
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 4px solid #1677ff;
}
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.cat-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border: 1.5px solid #eef2f9;
    border-radius: 14px;
    padding: 16px 14px;
    box-shadow: 0 3px 14px rgba(22, 119, 255, .05);
    transition: all .18s;
    position: relative;
    overflow: hidden;
}
.cat-card:hover {
    transform: translateY(-2px);
    border-color: #bcd7ff;
    box-shadow: 0 8px 22px rgba(22, 119, 255, .13);
}
.cat-card.active {
    border-color: #1677ff;
    background: linear-gradient(180deg, #f4f9ff, #ffffff);
    box-shadow: 0 8px 24px rgba(22, 119, 255, .16);
}
.cat-card.active::after {
    content: "当前";
    position: absolute;
    top: 0;
    right: 0;
    background: #1677ff;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 0 0 0 10px;
}
.cat-card-icon {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 10px;
}
.cat-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1b2b47;
    margin-bottom: 4px;
    word-break: break-all;
}
.cat-card-count {
    font-size: 12px;
    color: #8a9ab0;
}

/* ============ 分类卡片与商品卡片（一行两个） ============ */
.cat-hint {
    background: #fff;
    border: 1px dashed #d8e5fb;
    border-radius: 16px;
    padding: 46px 20px;
    text-align: center;
    color: #8a9ab0;
    font-size: 14px;
    margin-bottom: 20px;
}
.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}
.goods-card {
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(22, 119, 255, .06);
}
.goods-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 119, 255, .13);
}
.goods-card .cover {
    height: 96px;
    font-size: 26px;
}
.goods-card .info {
    padding: 12px;
}
.goods-card .name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.goods-card .info > div[style*="库存"] {
    font-size: 11px !important;
    margin: 6px 0 !important;
}
.goods-card .price {
    font-size: 17px;
}
.goods-card .price small { font-size: 11px; }

/* ============ 分类卡片强化（一眼能看出是卡片） ============ */
.cat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin: 0 0 24px !important;
}
.cat-card {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 96px;
    background: linear-gradient(180deg, #f2f8ff, #ffffff) !important;
    border: 1.5px solid #cfe1fd !important;
    border-radius: 16px !important;
    padding: 18px 12px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(22, 119, 255, .08) !important;
    transition: all .18s;
    position: relative;
    overflow: hidden;
}
.cat-card:hover {
    border-color: #7fb4ff !important;
    box-shadow: 0 8px 22px rgba(22, 119, 255, .16) !important;
    transform: translateY(-2px);
}
.cat-card.active {
    background: linear-gradient(180deg, #1677ff, #3b8cff) !important;
    border-color: #1677ff !important;
    box-shadow: 0 8px 22px rgba(22, 119, 255, .28) !important;
}
.cat-card.active .cat-card-name,
.cat-card.active .cat-card-count { color: #fff !important; }
.cat-card.active::after {
    content: "当前";
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 0 0 0 10px;
}
.cat-card-name {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1b2b47 !important;
    text-align: center;
    line-height: 1.3;
    word-break: break-all;
    margin: 0 !important;
}
.cat-card-count {
    font-size: 12px !important;
    color: #7b8aa3 !important;
    margin-top: 8px !important;
}

/* ============ 店铺购卡协议公告 ============ */
.agreement-card {
    background: linear-gradient(180deg, #f7fbff, #ffffff);
    border: 1.5px solid #d7e6fc;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(22, 119, 255, .07);
}
.agreement-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.agreement-badge {
    background: linear-gradient(135deg, #3b8cff, #1677ff);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}
.agreement-title {
    font-size: 15px;
    font-weight: 700;
    color: #1b2b47;
}
.agreement-body {
    font-size: 13px;
    line-height: 1.8;
    color: #4a5b74;
    max-height: 96px;
    overflow: hidden;
    position: relative;
    transition: max-height .25s;
}
.agreement-body.expanded {
    max-height: 2000px;
}
.agreement-foot {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.agreement-foot .btn { flex: 1; }

/* ============ 购卡协议强制阅读遮罩 ============ */
.agreement-mask {
    position: fixed;
    inset: 0;
    background: rgba(8, 15, 28, .78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.agreement-modal {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 480px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
    overflow: hidden;
    animation: agreementIn .24s ease-out;
}
@keyframes agreementIn {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to { opacity: 1; transform: none; }
}
.agreement-modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid #f0f4fa;
}
.agreement-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #1b2b47;
}
.agreement-modal-body {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.85;
    color: #4a5b74;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}
.agreement-modal-foot {
    padding: 14px 20px 20px;
    border-top: 1px solid #f0f4fa;
    background: #fbfdff;
}
.agreement-modal-foot .btn { width: 100%; }

/* ============ 店铺头部圆形入口 ============ */
.shop-acts {
    display: flex;
    gap: 14px;
    align-items: center;
}
.shop-act {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none !important;
    color: #4a5b74 !important;
    font-size: 12px;
    line-height: 1;
}
.shop-act-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    background: #fff;
    border: 1.5px solid #dce8fb;
    box-shadow: 0 3px 12px rgba(22, 119, 255, .10);
    transition: all .18s;
}
.shop-act:hover .shop-act-icon {
    border-color: #7fb4ff;
    box-shadow: 0 6px 18px rgba(22, 119, 255, .20);
    transform: translateY(-2px);
}

/* ============ 全局防横向溢出 ============ */
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
.agreement-modal-body { overflow-wrap: break-word; word-break: break-word; }
.goods-card .name { overflow-wrap: break-word; }

/* 弹窗小屏适配，避免超出屏幕 */
.agreement-modal {
    width: calc(100% - 8px) !important;
    max-width: 460px !important;
    max-height: 78vh !important;
}
.agreement-mask { padding: 12px !important; }

/* ============ 表格手机端防挤压：可横向滑动，不换行 ============ */
.table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap !important;
    border-collapse: collapse !important;
}
.table th, .table td {
    white-space: nowrap !important;
    vertical-align: middle;
}
.table td .btn, .table td a.btn, .table td button.btn {
    white-space: nowrap !important;
    display: inline-block;
    margin: 2px 4px 2px 0;
}
@media (max-width: 768px) {
    .table th, .table td {
        font-size: 12.5px !important;
        padding: 10px 10px !important;
    }
    .table td .btn, .table th .btn {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }
    .card { padding: 14px 12px !important; }
    .card-title { font-size: 16px !important; }
}

/* ============ 后台分类总览：分类标签卡 ============ */
.cat-tag-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}
.cat-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: linear-gradient(180deg, #f6faff, #ffffff);
    border: 1.5px solid #dbe8fc;
    border-radius: 12px;
    padding: 12px 12px 12px 14px;
    transition: all .16s;
}
.cat-tag:hover {
    border-color: #9ec5ff;
    box-shadow: 0 6px 18px rgba(22, 119, 255, .12);
    transform: translateY(-1px);
}
.cat-tag.empty {
    background: #fafbfd;
    border-color: #e9eef7;
}
.cat-tag-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.cat-tag-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #1b2b47;
    word-break: break-all;
}
.cat-tag-num {
    font-size: 12px;
    color: #8a9ab0;
}
.cat-tag.empty .cat-tag-num { color: #b7c2d4; }
.cat-tag-del {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid #ffe0e0;
    background: #fff5f5;
    color: #e0333f;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s;
}
.cat-tag-del:hover {
    background: #e0333f;
    border-color: #e0333f;
    color: #fff;
}
@media (max-width: 768px) {
    .cat-tag-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cat-tag { padding: 10px 10px 10px 12px; }
}

/* ============ 后台侧边栏：四大分类折叠菜单 ============ */
.menu-group { margin-bottom: 6px; }
.menu-group-head {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; cursor: pointer;
    color: #1b2b47; font-size: 14px; font-weight: 700;
    border-radius: 11px; background: linear-gradient(180deg, #f4f9ff, #edf5ff);
    border: 1px solid #e2ecfb;
    transition: all .16s;
    -webkit-tap-highlight-color: transparent;
}
.menu-group-head:hover { border-color: #bcd9ff; background: #eaf3ff; }
.menu-group.open .menu-group-head {
    background: linear-gradient(135deg, var(--primary), #4aa3ff);
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px rgba(22, 119, 255, .22);
}
.menu-group-head .mg-ico { font-size: 16px; flex-shrink: 0; }
.menu-group-head .mg-txt { flex: 1; }
.menu-group-head .mg-arrow {
    font-size: 14px; color: #9bb0cc; transition: transform .2s;
    display: inline-block;
}
.menu-group.open .menu-group-head .mg-arrow { transform: rotate(90deg); color: rgba(255,255,255,.85); }

.menu-sub {
    list-style: none; margin: 0; padding: 6px 0 4px 0;
    overflow: hidden;
}
.menu-group:not(.open) .menu-sub { display: none; }
.menu-sub li { margin-bottom: 2px; }
.menu-sub li a {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 12px 9px 34px;
    font-size: 13.5px; color: #5b7397; border-radius: 9px;
    transition: all .15s; position: relative;
}
.menu-sub li a .sub-ico { font-size: 13px; opacity: .9; }
.menu-sub li a:hover { color: var(--primary); background: #f2f7ff; }
.menu-sub li a.active {
    color: var(--primary); background: var(--primary-light);
    font-weight: 600; box-shadow: inset 3px 0 0 var(--primary);
}

@media (max-width: 900px) {
    .sidebar { overflow: visible; }
    .sidebar .menu {
        display: block; overflow: visible; padding: 10px 12px; position: relative;
    }
    .menu-group { margin-bottom: 0; }
    .menu-group-head {
        padding: 9px 12px; font-size: 13px; border-radius: 9px;
        background: #f5f8ff;
    }
    .menu-group.open .menu-group-head { box-shadow: none; }
    .menu-sub {
        position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
        background: #fff; padding: 10px 12px 14px;
        box-shadow: 0 14px 28px rgba(21, 43, 82, .16);
        border-bottom: 1px solid #e6eefb;
        max-height: 62vh; overflow-y: auto;
    }
    .menu-sub li a { padding: 11px 14px 11px 30px; font-size: 14px; background: #f7faff; margin-bottom: 5px; }
}

/* ============ 后台分类总览：工具条与操作按钮 ============ */
.cat-toolbar {
    display: flex; gap: 12px; align-items: center; justify-content: space-between;
    flex-wrap: wrap; margin-bottom: 18px;
}
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 11px; font-size: 13.5px;
    background: #fff; border: 1.5px solid #e3ecfa; color: #5b7397;
    transition: all .16s; text-decoration: none;
}
.cat-tab b { font-weight: 700; }
.cat-tab:hover { border-color: #9ec5ff; color: var(--primary); }
.cat-tab.on {
    background: linear-gradient(135deg, var(--primary), #4aa3ff);
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px rgba(22,119,255,.2);
}
.cat-search {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1.5px solid #e3ecfa; border-radius: 11px;
    padding: 8px 14px; min-width: 220px; flex: 1; max-width: 320px;
}
.cat-search span { font-size: 14px; opacity: .6; }
.cat-search input {
    border: none; outline: none; background: transparent;
    font-size: 13.5px; width: 100%; padding: 0;
    box-shadow: none;
}
.cat-search input:focus { box-shadow: none; }

.cat-tag-main {
    display: flex; flex-direction: column; gap: 4px;
    text-decoration: none; min-width: 0; flex: 1;
    cursor: pointer;
}
.cat-tag-acts { display: flex; gap: 5px; flex-shrink: 0; }
.cat-tag-btn {
    width: 26px; height: 26px; border-radius: 8px;
    border: 1px solid #dbe8fc; background: #f7faff; color: #4a6fa5;
    font-size: 14px; line-height: 1; cursor: pointer;
    transition: all .15s; padding: 0;
}
.cat-tag-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.cat-tag-btn.danger { border-color: #ffe0e0; background: #fff5f5; color: #e0333f; }
.cat-tag-btn.danger:hover { background: #e0333f; border-color: #e0333f; color: #fff; }

/* 商品页筛选提示条 */
.filter-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px;
}
.filter-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(180deg,#f4f9ff,#eaf3ff);
    border: 1.5px solid #cfe1fd; border-radius: 11px;
    padding: 9px 16px; font-size: 13.5px; color: #1b2b47;
}
.filter-chip i { color: #8a9ab0; font-style: normal; font-size: 12.5px; }
.filter-chip code { font-size: 12px; color: var(--primary); background: #fff; padding: 2px 7px; border-radius: 6px; }
.filter-clear { font-size: 12.5px; color: #8a9ab0; text-decoration: none; }
.filter-clear:hover { color: var(--primary); }

@media (max-width: 768px) {
    .cat-toolbar { flex-direction: column; align-items: stretch; }
    .cat-search { max-width: none; }
    .cat-tabs { justify-content: space-between; }
    .cat-tab { flex: 1; justify-content: center; padding: 8px 10px; font-size: 12.5px; }
}

/* ============ 后台：抽屉式菜单（左上角按钮弹出）============ */
.menu-mask {
    position: fixed; inset: 0; background: rgba(12, 24, 42, .45);
    z-index: 55; display: none; backdrop-filter: blur(2px);
}
.menu-mask.on { display: block; }

.admin-layout { display: block; }
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 268px; max-width: 86vw;
    background: #fff; border-right: 1px solid var(--border);
    z-index: 60; display: flex; flex-direction: column;
    transform: translateX(-104%);
    transition: transform .26s cubic-bezier(.22,.61,.36,1);
    box-shadow: none;
    overflow: visible;
}
.sidebar.open { transform: translateX(0); box-shadow: 12px 0 34px rgba(12, 24, 42, .16); }
.sidebar .logo { position: relative; padding-right: 52px; }
.menu-close {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border-radius: 9px; border: 1px solid #e6eefb;
    background: #f7faff; color: #6b7f9c; font-size: 17px; line-height: 1;
    cursor: pointer;
}
.menu-close:hover { background: #eaf3ff; color: var(--primary); }
.sidebar .menu { overflow-y: auto; }

.main { width: 100%; }
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.menu-trigger {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 12px; cursor: pointer;
    border: 1.5px solid #dbe8fc; background: linear-gradient(180deg, #f7fbff, #eef6ff);
    color: #1b2b47; font-size: 13.5px; font-weight: 600;
    transition: all .16s; flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.menu-trigger:hover {
    border-color: #9ec5ff; background: linear-gradient(135deg, var(--primary), #4aa3ff);
    color: #fff; box-shadow: 0 6px 16px rgba(22, 119, 255, .22);
}
.menu-trigger .mt-ico { font-size: 16px; }

@media (max-width: 900px) {
    /* 覆盖旧的顶部横条样式，统一走抽屉 */
    .sidebar {
        width: 82vw; max-width: 320px; position: fixed;
        border-bottom: none; border-right: 1px solid var(--border);
        top: 0; bottom: 0;
    }
    .sidebar .logo { display: flex; }
    .sidebar .menu { display: block; overflow-y: auto; padding: 12px 10px; }
    .menu-group { margin-bottom: 6px; }
    .menu-group-head { padding: 11px 12px; font-size: 14px; border-radius: 10px; }
    .menu-sub { position: static; box-shadow: none; border: none; padding: 6px 0 4px; max-height: none; }
    .menu-sub li a { padding: 10px 12px 10px 30px; margin-bottom: 4px; }
    .menu-trigger { padding: 8px 12px; font-size: 13px; }
    .menu-trigger .mt-txt { display: none; }
    .topbar-left { gap: 10px; }
}

/* ===== 通知中心：消息列表 ===== */
.notify-list{display:flex;flex-direction:column;gap:10px;}
.notify-item{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border:1px solid #e8efff;border-radius:14px;background:#fff;transition:.2s;}
.notify-item.unread{background:linear-gradient(135deg,#f3f8ff,#ffffff);border-color:#c7dcff;}
.notify-dot{width:8px;height:8px;border-radius:50%;background:#d0d7e2;margin-top:8px;flex:0 0 8px;}
.notify-item.unread .notify-dot{background:#1677ff;box-shadow:0 0 0 4px rgba(22,119,255,.12);}
.notify-body{flex:1;min-width:0;}
.notify-title{font-weight:600;color:#0f172a;font-size:15px;display:flex;align-items:center;flex-wrap:wrap;gap:4px;}
.notify-content{color:#475569;font-size:14px;line-height:1.7;margin-top:6px;word-break:break-word;}
.notify-meta{color:#94a3b8;font-size:12px;margin-top:8px;}
.notify-read-btn{flex:0 0 auto;align-self:center;font-size:13px;padding:6px 12px;border-radius:8px;border:1px solid #c7dcff;color:#1677ff;background:#f3f8ff;white-space:nowrap;}
.notify-read-btn:hover{background:#e6f0ff;}

@media (max-width:640px){
    .notify-item{flex-direction:column;}
    .notify-read-btn{align-self:flex-start;margin-left:20px;}
}


/* ============ Ant Design 风格勾选框 ============ */
.ant-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    line-height: 1;
}

.ant-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ant-checkbox-inner {
    width: 16px;
    height: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ant-checkbox:hover .ant-checkbox-inner {
    border-color: #1677ff;
}

.ant-checkbox input:checked + .ant-checkbox-inner {
    background: #52c41a;
    border-color: #52c41a;
}

.ant-checkbox-inner::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: all 0.2s;
}

.ant-checkbox input:checked + .ant-checkbox-inner::after {
    transform: rotate(45deg) scale(1);
}

/* Radio 按钮 */
.ant-radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    line-height: 1;
}

.ant-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ant-radio-inner {
    width: 16px;
    height: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 50%;
    background: #fff;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ant-radio:hover .ant-radio-inner {
    border-color: #1677ff;
}

.ant-radio input:checked + .ant-radio-inner {
    border-color: #52c41a;
}

.ant-radio-inner::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #52c41a;
    transform: scale(0);
    transition: all 0.2s;
}

.ant-radio input:checked + .ant-radio-inner::after {
    transform: scale(1);
}



/* ============ 完美Checkbox打勾效果（SVG动画版） ============ */
.perfect-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    line-height: 1;
}

.perfect-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.perfect-checkbox .box {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.perfect-checkbox:hover .box {
    border-color: #1677ff;
}

.perfect-checkbox input:checked + .box {
    background: #22c55e;
    border-color: #22c55e;
}

.perfect-checkbox .box svg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    stroke: #fff;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    transition: stroke-dashoffset 0.3s ease;
}

.perfect-checkbox input:checked + .box svg {
    stroke-dashoffset: 0;
}

/* Radio 也用同样风格 */
.perfect-radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    line-height: 1;
}

.perfect-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.perfect-radio .box {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.perfect-radio:hover .box {
    border-color: #1677ff;
}

.perfect-radio input:checked + .box {
    background: #22c55e;
    border-color: #22c55e;
}

.perfect-radio .box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.perfect-radio input:checked + .box::after {
    transform: rotate(45deg) scale(1);
}



/* ============ 全局Checkbox/Radio 完美样式 ============ */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
    flex-shrink: 0;
}

input[type="checkbox"]:hover {
    border-color: #1677ff;
}

input[type="checkbox"]:checked {
    background: #22c55e;
    border-color: #22c55e;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
    flex-shrink: 0;
}

input[type="radio"]:hover {
    border-color: #1677ff;
}

input[type="radio"]:checked {
    background: #22c55e;
    border-color: #22c55e;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}



/* ============ 侧边栏分组菜单样式 ============ */
.menu-group { margin-bottom: 8px; position: relative; }
.menu-group-head {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px 11px 11px; cursor: pointer;
    color: #1b2b47; font-size: 14px; font-weight: 700;
    border-radius: 11px; background: #fff;
    border: 1px solid #e4edfa; border-left: 4px solid var(--gcolor, #1677ff);
    box-shadow: 0 1px 3px rgba(21, 43, 82, .05);
    transition: all .16s;
    -webkit-tap-highlight-color: transparent;
}
.menu-group-head:hover { background: #f8fbff; border-color: #cfe3ff; border-left-color: var(--gcolor, #1677ff); }
.menu-group.open .menu-group-head {
    background: var(--gsoft, #eaf3ff);
    border-color: var(--gcolor, #1677ff); border-left-width: 4px;
    color: var(--gcolor, #1677ff);
    box-shadow: 0 6px 16px rgba(22, 119, 255, .12);
}
.menu-group-head .mg-ico {
    width: 26px; height: 26px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; border-radius: 8px; background: var(--gsoft, #eaf3ff);
}
.menu-group.open .menu-group-head .mg-ico { background: #fff; }
.menu-group-head .mg-txt { flex: 1; letter-spacing: .3px; }
.menu-group-head .mg-arrow {
    font-size: 13px; color: #a9bdd8; transition: transform .2s;
    display: inline-block;
}
.menu-group.open .menu-group-head .mg-arrow { transform: rotate(90deg); color: var(--gcolor, #1677ff); }

.menu-sub {
    list-style: none; margin: 4px 0 0 20px; padding: 4px 0 2px 10px;
    overflow: hidden; border-left: 2px dashed #e3ecf8;
}
.menu-group:not(.open) .menu-sub { display: none; }
.menu-sub li { margin-bottom: 2px; }
.menu-sub li a {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 12px;
    font-size: 13px; color: #8397b3; border-radius: 9px;
    transition: all .15s; position: relative;
}
.menu-sub li a .sub-ico { font-size: 13px; opacity: .9; }
.menu-sub li a:hover { color: var(--gcolor, #1677ff); background: #f5f9ff; }
.menu-sub li a.active {
    color: var(--gcolor, #1677ff); background: var(--gsoft, #eaf3ff);
    font-weight: 600; box-shadow: inset 3px 0 0 var(--gcolor, #1677ff);
}

