﻿/* ===== 北京鸿鹄国际旅行社- 全局样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; line-height: 1.6; color: #333; }

/* 主题色*/
:root {
    --primary-color: #106eb8;
    --primary-light: #2a85d0;
    --primary-dark: #0a5a9e;
    --orange-color: #f18d00;
    --green-color: #5ab530;
    --bg: #ffffff;
    --bg-secondary: #f5f7fa;
    --text: #333333;
    --text-secondary: #666666;
    --border: #e0e0e0;
    --danger: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ===== 导航栏===== */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: #ffffff; z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.navbar .container {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 2rem;
}
.logo {
    display: flex; align-items: center;
    color: #106eb8; font-size: 1.5rem; font-weight: bold; text-decoration: none;
}
.logo img { height: 52px; width: auto; object-fit: contain; }
.logo-text { color: #106eb8; font-size: 1.25rem; }
.logo-text span { color: #f18d00; }
.nav-links { display: flex; list-style: none; }
.nav-links li { margin-left: 2rem; }
.nav-links a { color: #333; text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
.nav-links a:hover { color: #106eb8; }
.nav-links .active { color: #f18d00; font-weight: 600; }
.menu-toggle { display: none; color: #333; font-size: 1.6rem; cursor: pointer; }

/* ===== Hero轮播 ===== */
.hero { margin-top: 70px; position: relative; height: 600px; overflow: hidden; }
.hero-slides { position: relative; width: 100%; height: 100%; }
.hero-slide { position: absolute; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(16,110,184,0.5), rgba(90,181,48,0.3)), rgba(16, 110, 184, 0.4);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    color: #fff; text-align: center;
}
.hero-title { font-size: 3.5rem; font-weight: bold; margin-bottom: 1rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: 1.5rem; margin-bottom: 2rem; opacity: 0.95; }
.hero-btn {
    padding: 12px 30px; background: linear-gradient(135deg, #f18d00, #ffab33);
    color: #fff; text-decoration: none; border-radius: 50px;
    font-weight: 600; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(241, 141, 0, 0.3);
}
.hero-btn:hover { background: linear-gradient(135deg, #d97f00, #f18d00); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(241,141,0,0.4); }
.hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; }
.hero-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s ease;
}
.hero-dot.active { background: #f18d00; transform: scale(1.3); }

/* ===== 通用区域 ===== */
.section { padding: 4rem 0; }
.section-title {
    text-align: center; font-size: 2.5rem; color: #106eb8;
    margin-bottom: 3rem; position: relative;
}
.section-title::after {
    content: ''; position: absolute; bottom: -10px; left: 50%;
    transform: translateX(-50%); width: 60px; height: 4px;
    background: linear-gradient(90deg, #106eb8, #f18d00); border-radius: 2px;
}

/* ===== 公告栏===== */
.announcement-bar {
    width: 100%; overflow: hidden; white-space: nowrap;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 50%, #e8f4fd 100%);
    border-bottom: 1px solid #cce4f7; padding: 10px 0; position: relative;
}
.announcement-bar .container { overflow: hidden; }
.announcement-text {
    display: inline-block; color: #106eb8; font-size: 15px; font-weight: 500;
    letter-spacing: 0.5px; animation: announcement-scroll 20s linear infinite;
    padding: 0 40px; cursor: default;
}
.announcement-text:hover { animation-play-state: paused; }
.announcement-text::before { content: "\01F4E2 "; }
.announcement-text::after { content: attr(data-text); padding-left: 3em; }
@keyframes announcement-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== 产品网格 ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.product-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(16,110,184,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(16,110,184,0.2); }
.product-card:hover .product-image img { transform: scale(1.1); }
.product-image { height: 200px; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-info { padding: 1.5rem; }
.product-title { font-size: 1.3rem; font-weight: bold; color: #106eb8; margin-bottom: 0.5rem; }
.product-destination { color: #666; margin-bottom: 1rem; font-size: 0.95rem; }
.product-price { font-size: 1.6rem; color: #f18d00; font-weight: bold; margin-bottom: 0.5rem; }
.product-days { color: #888; font-size: 0.9rem; margin-bottom: 1rem; }
.product-features { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.feature-tag {
    padding: 4px 12px; background: linear-gradient(135deg, rgba(90,181,48,0.1), rgba(90,181,48,0.15));
    border-radius: 20px; font-size: 0.8rem; color: #5ab530;
    border: 1px solid rgba(90,181,48,0.2);
}
.product-btn {
    display: block; text-align: center; padding: 10px;
    background: linear-gradient(135deg, #106eb8, #2a85d0); color: #fff;
    text-decoration: none; border-radius: 8px; transition: all 0.3s ease; font-weight: 500;
}
.product-btn:hover { background: linear-gradient(135deg, #0a5a9e, #106eb8); box-shadow: 0 4px 12px rgba(16,110,184,0.3); }

/* ===== 关于我们 ===== */
.about-section { background: linear-gradient(135deg, #f0f9ff 0%, #f5f5f5 100%); }
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-text { color: #555; line-height: 1.9; font-size: 1rem; }
.about-text p { margin-bottom: 1rem; }
.about-image img { width: 100%; border-radius: 16px; box-shadow: 0 8px 25px rgba(16,110,184,0.15); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; }
.stat-item {
    text-align: center; padding: 2rem 1rem; background: #fff;
    border-radius: 16px; box-shadow: 0 4px 15px rgba(16,110,184,0.1); border-top: 4px solid;
}
.stat-item:nth-child(1) { border-top-color: #106eb8; }
.stat-item:nth-child(2) { border-top-color: #f18d00; }
.stat-item:nth-child(3) { border-top-color: #5ab530; }
.stat-item:nth-child(4) { border-top-color: #106eb8; }
.stat-number { font-size: 2.5rem; font-weight: bold; color: #106eb8; margin-bottom: 0.5rem; }
.stat-item:nth-child(2) .stat-number { color: #f18d00; }
.stat-item:nth-child(3) .stat-number { color: #5ab530; }
.stat-label { color: #666; font-size: 0.95rem; }

/* ===== 联系我们 ===== */
.contact-section {
    background: linear-gradient(135deg, #106eb8 0%, #0a5a9e 100%); color: #fff;
}
.contact-section .section-title { color: #fff; }
.contact-section .section-title::after { background: linear-gradient(90deg, #f18d00, #5ab530); }
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; }
.contact-icon {
    width: 48px; height: 48px; background: rgba(241,141,0,0.2); border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    color: #f18d00; font-size: 1.3rem; flex-shrink: 0;
}
.contact-item:nth-child(2n) .contact-icon { background: rgba(90,181,48,0.2); color: #5ab530; }
.contact-item h4 { color: #fff; font-size: 1.05rem; margin-bottom: 0.2rem; }
.contact-text { color: rgba(255,255,255,0.85); font-size: 0.95rem; }

.qr-section { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.qr-card {
    background: #fff; padding: 1.5rem; border-radius: 16px;
    text-align: center; box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease; min-width: 200px;
}
.qr-card:hover { transform: translateY(-5px) scale(1.02); }
.qr-card img {
    width: 180px; height: 180px; object-fit: contain;
    border: 3px solid #f18d00; border-radius: 12px; padding: 8px; background: #fff;
}
.qr-card:nth-child(2) img { border-color: #5ab530; }
.qr-card h4 { color: #f18d00; margin-top: 1rem; font-size: 1.1rem; font-weight: bold; }
.qr-card:nth-child(2) h4 { color: #5ab530; }
.qr-card p { color: #666; font-size: 0.85rem; margin-top: 0.3rem; }

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(135deg, #0a3f6e 0%, #062e51 100%);
    color: #fff; padding: 2rem 0;
}
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.footer-section h3 { margin-bottom: 1rem; color: #f18d00; font-size: 1.15rem; }
.footer-section:nth-child(2n) h3 { color: #5ab530; }
.footer-section p { color: rgba(255,255,255,0.75); margin-bottom: 1rem; line-height: 1.8; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.7rem; }
.footer-links a { color: rgba(255,255,255,0.75); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: #f18d00; }
.footer-bottom {
    text-align: center; padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6); font-size: 0.9rem;
}
.footer-ad-link { display: inline-block; margin-top: 0.5rem; font-size: 0.78rem; }
.footer-ad-link a { color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.3s ease; }
.footer-ad-link a:hover { color: rgba(255,255,255,0.7); }

/* ===== 荣誉资质轮播 ===== */
.honors-section {
    background: linear-gradient(135deg, #f9fafb 0%, #eef2f7 100%);
    padding: 5rem 0;
}
.honors-section .section-title { color: #333; }
.honors-container { max-width: 1100px; margin: 0 auto; padding: 0 15px; }

.honors-carousel {
    position: relative;
    overflow: hidden;
}
.honors-track {
    overflow: hidden;
}
.honors-slides {
    display: flex;
    transition: transform 0.4s ease;
}
.honors-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #106eb8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.honors-prev { left: 0; }
.honors-next { right: 0; }
.honors-btn:hover {
    background: #106eb8;
    color: #fff;
}

.honor-slide {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 20px 15px 12px;
    transition: box-shadow 0.3s ease;
}
@media (min-width: 640px) {
    .honor-slide { flex: 0 0 50%; }
}
@media (min-width: 1024px) {
    .honor-slide { flex: 0 0 33.333%; }
}
.honor-slide:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}
.honor-slide img {
    max-height: 180px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 1;
}
.honor-title {
    margin-top: 12px;
    font-size: 0.95rem;
    color: #333;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.honor-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #999;
    font-size: 1rem;
    background: #fff;
    border-radius: 12px;
}

/* 荣誉管理（后台） */
.honor-manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.honor-manage-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.25s;
}
.honor-manage-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.1); }
.honor-manage-card img {
    width: 100%; height: 150px; object-fit: contain;
    background: #fafafa; display: block;
}
.honor-manage-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.honor-manage-title {
    font-size: 0.9rem; font-weight: 600; color: #333;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.honor-manage-actions {
    display: flex; gap: 8px;
}
.honor-manage-actions .btn { flex: 1; text-align: center; }

/* 荣誉轮播响应式*/
@media (max-width: 768px) {
    .honors-section { padding: 3rem 0; }
    .honor-slide { height: 240px; padding: 16px 10px 10px; }
    .honor-slide img { max-height: 140px; }
    .honor-title { font-size: 0.85rem; }
    .honor-manage-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .honor-manage-card img { height: 120px; }
}
@media (max-width: 480px) {
    .honor-slide { height: 200px; padding: 12px 8px 8px; }
    .honor-slide img { max-height: 110px; }
    .honor-title { font-size: 0.78rem; }
    .honor-manage-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ===== 海报弹窗 ===== */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10,63,110,0.75); z-index: 2000; justify-content: center; align-items: center; }
.modal.active { display: flex; }
.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 32px; height: 32px; background: rgba(16,110,184,0.1);
    border: none; border-radius: 50%; cursor: pointer;
    font-size: 1.3rem; color: #106eb8; z-index: 10; transition: all 0.3s ease;
}
.modal-close:hover { background: #f18d00; color: #fff; transform: rotate(90deg); }

.poster-modal {
    background: rgba(0,0,0,0.88) !important; border-radius: 0 !important;
    max-width: none !important; max-height: none !important;
    width: 100vw !important; height: 100vh !important;
    padding: 0 !important; margin: 0 !important; overflow: hidden !important;
}
.poster-modal .modal-close {
    top: 1.2rem; right: 1.2rem; background: rgba(255,255,255,0.15);
    color: #fff; font-size: 1.5rem; line-height: 1; width: 40px; height: 40px; z-index: 10;
}
.poster-modal .modal-close:hover { background: #f18d00; }
.poster-viewer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden; cursor: grab; display: flex;
    justify-content: center; align-items: center;
    user-select: none; -webkit-user-select: none;
}
.poster-viewer.dragging { cursor: grabbing; }
.poster-image {
    max-height: 100vh; width: auto; height: auto; max-width: 100vw;
    border-radius: 0 !important; object-fit: contain;
    box-shadow: 0 4px 40px rgba(0,0,0,0.5);
    transform-origin: center center; transition: transform 0.05s linear;
    will-change: transform;
}
.poster-toolbar {
    position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
    color: #fff; font-size: 0.9rem; background: rgba(0,0,0,0.45);
    padding: 0.5rem 1rem; border-radius: 999px; pointer-events: none;
}

/* ================================================================ */
/*  ad.html 海报墙*/
/* ================================================================ */
.ad-page { padding-top: 70px; min-height: 100vh; }
.ad-header {
    background: linear-gradient(135deg, #106eb8, #0a5a9e);
    color: #fff; padding: 1.5rem 0; text-align: center;
}
.ad-header h2 { margin-bottom: 0.3rem; }

/* 导航栏分类标签（ad页） */
.nav-tabs { display: flex; gap: 0; align-items: stretch; }
.nav-tab-btn {
    padding: 12px 24px; background: transparent; color: #555;
    border: none; cursor: pointer; font-size: 1rem; font-weight: 600;
    border-radius: 10px 10px 0 0; transition: all 0.3s ease;
    position: relative; white-space: nowrap;
}
.nav-tab-btn:hover { color: #106eb8; background: rgba(16,110,184,0.06); }
.nav-tab-btn.active {
    background: linear-gradient(135deg, #106eb8, #0a5a9e); color: #fff;
    box-shadow: 0 -4px 12px rgba(16,110,184,0.3), 0 0 0 2px rgba(16,110,184,0.12);
    z-index: 2;
    border-radius: 10px 10px 0 0;
    margin-bottom: -2px;
    padding-bottom: 14px;
}
.nav-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 16px;
    background: linear-gradient(135deg, #106eb8, #0a5a9e);
    z-index: 3;
    border-radius: 0;
    pointer-events: none;
}

.tab-nav { display: flex; justify-content: center; gap: 10px; margin-top: 1rem; flex-wrap: wrap; }
.tab-btn {
    padding: 12px 28px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px; color: rgba(255,255,255,0.85); cursor: pointer;
    font-size: 1.15rem; font-weight: 600; transition: all 0.3s ease;
    min-width: 80px;
}
.tab-btn:hover { background: rgba(255,255,255,0.22); color: #fff; border-color: rgba(255,255,255,0.45); }
.tab-btn.active { background: rgba(255,255,255,0.92); color: #106eb8; border-color: #f18d00; box-shadow: 0 2px 10px rgba(241,141,0,0.3); }

/* 搜索组件 */
.sub-search-wrap { display: inline-flex; align-items: center; }
.sub-search-btn {
    width: 36px; height: 36px; padding: 0; border: 1px solid #ddd;
    border-radius: 50%; background: #fff; cursor: pointer;
    font-size: 1rem; display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.2s; color: #666; flex-shrink: 0;
}
.sub-search-btn:hover { background: #e8f4fd; border-color: #106eb8; color: #106eb8; }
.sub-search-input {
    width: 0; padding: 0; margin: 0; border: none; outline: none;
    font-size: 0.85rem; transition: all 0.3s ease;
    background: transparent; overflow: hidden;
}
.sub-search-wrap.active .sub-search-input {
    width: 160px; padding: 6px 10px; margin-left: 6px;
    border: 1px solid #106eb8; border-radius: 6px; background: #fff;
}

/* 网格/瀑布流切换按钮*/
.view-toggle-btn {
    width: 36px; height: 36px; padding: 0; border: 1px solid #ddd;
    border-radius: 50%; background: #fff; cursor: pointer;
    font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.2s; color: #666; margin-left: 4px; flex-shrink: 0;
}
.view-toggle-btn:hover, .view-toggle-btn.active { background: #e8f4fd; border-color: #106eb8; color: #106eb8; }

.sub-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 1rem 0; }
.sub-tag {
    padding: 6px 16px; border: 1px solid #106eb8; border-radius: 20px;
    background: #fff; color: #106eb8; cursor: pointer; font-size: 0.9rem;
    transition: all 0.3s ease;
}
.sub-tag:hover, .sub-tag.active { background: #106eb8; color: #fff; }

/* 地区标签 - PC端侧边悬浮*/
.region-filters {
    position: fixed; right: 10px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 6px;
    z-index: 90; background: rgba(255,255,255,0.85);
    padding: 8px 4px; border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}
.region-btn {
    padding: 6px 10px; border: 1px solid #106eb8; border-radius: 6px;
    background: #fff; color: #106eb8; cursor: pointer; font-size: 0.85rem;
    transition: all 0.2s ease; white-space: nowrap; text-align: center;
    min-width: 36px;
}
.region-btn:hover { background: #106eb8; color: #fff; }
.region-btn.active { background: #106eb8; color: #fff; box-shadow: 0 0 8px rgba(16,110,184,0.4); }

/* 海报瀑布流- CSS Column */
.poster-grid {
    column-count: 8; column-gap: 6px; padding: 1rem;
}
@media (max-width: 1400px) { .poster-grid { column-count: 6; } }
@media (max-width: 1024px) { .poster-grid { column-count: 4; } }
@media (max-width: 768px) { .poster-grid { column-count: 3; } }
@media (max-width: 480px) { .poster-grid { column-count: 3; column-gap: 4px; } }

.poster-item {
    break-inside: avoid; margin-bottom: 6px; border-radius: 6px;
    overflow: hidden; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #eee; background: #f5f5f5;
    line-height: 0;
}
.poster-item:hover { transform: scale(1.03); box-shadow: 0 4px 15px rgba(16,110,184,0.25); z-index: 5; }
.poster-item img { width: 100%; height: auto; display: block; }
/* 网格模式 */
.poster-grid.grid-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.poster-grid.grid-mode .poster-item {
    margin-bottom: 0;
}
.poster-grid.grid-mode .poster-item img {
    height: 280px;
    object-fit: cover;
    object-position: top;
}

/* 海报弹窗（带下载按钮）*/
.poster-modal-dl .poster-image { max-height: calc(100vh - 80px); }
.poster-dl-btn {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    padding: 10px 28px; background: #f18d00; color: #fff; border: none;
    border-radius: 8px; cursor: pointer; font-size: 1rem; font-weight: 600;
    transition: all 0.3s ease; z-index: 11;
}
.poster-dl-btn:hover { background: #d97f00; transform: translateX(-50%) translateY(-2px); }

/* ================================================================ */
/*  admin 后台 */
/* ================================================================ */
.admin-body { background: #f0f2f5; min-height: 100vh; }
.admin-header-bar {
    background: #106eb8; color: #fff; padding: 12px 20px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
}
.admin-header-bar h1 { font-size: 1.2rem; font-weight: 600; }
.admin-header-bar .logout-btn {
    background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
}
.admin-header-bar .logout-btn:hover { background: rgba(255,255,255,0.25); }
.admin-container { max-width: 1200px; margin: 70px auto 0; padding: 20px; }
.admin-panel { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); padding: 24px; margin-bottom: 20px; }
.admin-panel h2 { color: #106eb8; font-size: 1.3rem; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid #e8f4fd; }

/* Tab导航 */
.admin-tab-nav { display: flex; gap: 4px; border-bottom: 2px solid #e0e0e0; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab-nav .tab-btn {
    padding: 10px 20px; background: none; border: none; color: #666;
    cursor: pointer; font-size: 0.95rem; font-weight: 500;
    border-radius: 8px 8px 0 0; transition: all 0.3s ease;
    min-height: 44px; display: inline-flex; align-items: center;
}
.admin-tab-nav .tab-btn.active { background: #106eb8; color: #fff; }
.admin-tab-nav .tab-btn:hover:not(.active) { background: #e8f4fd; color: #106eb8; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 通用按钮 */
.btn { padding: 8px 20px; border-radius: 6px; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; min-height: 36px; }
.btn-primary { background: #106eb8; color: #fff; }
.btn-primary:hover { background: #0a5a9e; }
.btn-success { background: #5ab530; color: #fff; }
.btn-success:hover { background: #4a9a26; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: #f18d00; color: #fff; }
.btn-warning:hover { background: #d97f00; }
.btn-outline { background: #fff; color: #106eb8; border: 1px solid #106eb8; }
.btn-outline:hover { background: #e8f4fd; }
.btn-danger-outline { background: #fff; color: #e74c3c; border: 1px solid #e74c3c; }
.btn-danger-outline:hover { background: #fde8e8; }
.btn-sm { padding: 4px 12px; font-size: 0.8rem; min-height: 32px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 表单 */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 500; color: #333; font-size: 0.9rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.9rem; transition: border 0.2s; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: #106eb8; box-shadow: 0 0 0 3px rgba(16,110,184,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* 数据表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
.data-table th { background: #f8fafc; color: #555; font-weight: 600; }
.data-table tr:hover { background: #f8fafc; }
.data-table img { max-width: 80px; max-height: 60px; object-fit: cover; border-radius: 4px; }

/* Toast提示 */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); animation: toastIn 0.3s ease;
    max-width: 360px; word-break: break-all;
}
.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }
.toast.info { background: #106eb8; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* Modal */
.admin-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; justify-content: center; align-items: center; }
.admin-modal.active { display: flex; }
.admin-modal-content { background: #fff; border-radius: 12px; padding: 24px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; }
.admin-modal-content h3 { color: #106eb8; margin-bottom: 1rem; }

/* 登录页（旧版 login-box 已废弃，新版见文件末尾“登录页 (新版)”） */
.login-error { color: #e74c3c; font-size: 0.85rem; margin-top: 0.5rem; display: none; }
.login-error.show { display: block; }

/* 上传区域 */
.upload-zone {
    border: 2px dashed #ccc; border-radius: 8px; padding: 20px;
    text-align: center; color: #999; cursor: pointer; transition: all 0.3s;
    margin-bottom: 1rem; font-size: 0.9rem;
}
.upload-zone:hover, .upload-zone.dragover { border-color: #106eb8; background: #f0f7ff; color: #106eb8; }
.upload-zone img { max-width: 100%; max-height: 200px; margin-top: 10px; border-radius: 6px; }

/* 海报上传网格 */
.poster-upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 768px) { .poster-upload-grid { grid-template-columns: repeat(2, 1fr); } }
.poster-upload-col { }
.poster-upload-col h4 { font-size: 0.85rem; color: #106eb8; margin-bottom: 8px; text-align: center; }
.poster-upload-col .upload-zone { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* 海报管理表格 */
.poster-manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.poster-card {
    background: #fff; border-radius: 8px; overflow: hidden;
    border: 1px solid #eee; position: relative; transition: all 0.2s;
}
.poster-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.poster-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.poster-card .poster-meta { padding: 8px; font-size: 0.75rem; }
.poster-card .poster-tag { color: #106eb8; font-weight: 600; }
.poster-card .poster-region { color: #f18d00; }
.poster-card .expired-badge {
    position: absolute; top: 6px; right: 6px; background: #e74c3c;
    color: #fff; font-size: 0.7rem; padding: 2px 6px; border-radius: 3px;
}
.poster-card .poster-actions { display: flex; gap: 4px; padding: 0 8px 8px; flex-wrap: wrap; }

/* 分类管理 */
.cat-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cat-tag {
    padding: 6px 12px; background: #e8f4fd; border-radius: 6px; color: #106eb8;
    font-size: 0.85rem; display: flex; align-items: center; gap: 6px;
    cursor: grab; border: 1px solid transparent; transition: all 0.2s;
}
.cat-tag:hover { border-color: #106eb8; }
.cat-tag.dragging { opacity: 0.5; }

.sub-cat-section { margin-bottom: 1.2rem; padding: 12px; background: #f8fafc; border-radius: 8px; border-left: 3px solid #106eb8; }
.sub-cat-section h4 { color: #106eb8; margin-bottom: 8px; font-size: 0.95rem; }
.sub-cat-list { display: flex; flex-wrap: wrap; gap: 4px; }

/* 统计卡片 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: #fff; padding: 20px; border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-align: center;
    border-top: 4px solid #106eb8;
}
.stat-card:nth-child(2) { border-top-color: #f18d00; }
.stat-card:nth-child(3) { border-top-color: #5ab530; }
.stat-card .stat-num { font-size: 2rem; font-weight: bold; color: #106eb8; }
.stat-card:nth-child(2) .stat-num { color: #f18d00; }
.stat-card:nth-child(3) .stat-num { color: #5ab530; }
.stat-card .stat-label { color: #888; font-size: 0.85rem; margin-top: 4px; }

/* 进度条*/
.progress-bar-bg { background: #eee; border-radius: 10px; height: 8px; margin-top: 6px; overflow: hidden; }
.progress-bar-fg { background: #106eb8; height: 100%; border-radius: 10px; transition: width 0.3s ease; }

/* 响应式*/
@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: #ffffff; padding: 1rem; border-top: 1px solid #f1f1f1; }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 0.5rem 0; }
    .menu-toggle { display: block; }

    /* 移动端导航栏容器：允许换行*/
    .navbar .container { flex-wrap: wrap; padding: 0.4rem 1rem; gap: 4px; }
    .navbar .logo { flex: 1; min-width: 0; }

    /* ad页导航标签：移动端 sticky 保持可见 */
    /* 确保祖先元素无 overflow:hidden 禁用 sticky */
    .navbar { overflow: visible; }
    .navbar .container { overflow: visible; }
    #navTabs {
        position: sticky; top: 0; z-index: 101;
        background: #fff;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap; gap: 2px;
        padding: 4px 0;
        order: 3; width: 100%;
    }
    #navTabs .nav-tab-btn {
        padding: 10px 16px; font-size: 0.9rem;
        border-radius: 8px 8px 0 0;
        white-space: nowrap; flex-shrink: 0;
    }
    /* 移动端双行导航栏高度补偿，防止遮挡 ad-header */
    .ad-page { padding-top: 95px !important; }
    /* 移动端地区标签：侧边竖排悬浮，极窄模式*/
    .region-filters {
        position: fixed; right: 2px; top: 50%; transform: translateY(-50%);
        display: flex; flex-direction: column; gap: 4px;
        z-index: 90; background: rgba(255,255,255,0.72);
        padding: 6px 2px; border-radius: 8px;
        box-shadow: 0 1px 10px rgba(0,0,0,0.08);
    }
    .region-filters .region-btn {
        padding: 4px 5px; font-size: 0.72rem; border-radius: 4px;
        border-width: 1px; min-width: 28px; line-height: 1.2;
    }
    .hero { height: 450px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .about-content, .contact-content { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .qr-section { flex-direction: column; align-items: center; }
    .logo img { height: 40px; }
    .container { padding: 0 1rem; }
    .section { padding: 2.5rem 0; }
    .section-title { font-size: 1.8rem; }
    .form-row { grid-template-columns: 1fr; }
}

/* ================================================================
   新版后台管理样式 (.admin- 前缀，独立作用域)
   ================================================================ */
/* --- 布局基架 --- */
.admin-body { background: #f0f2f5; margin: 0; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 220px; background: #001529; color: #fff;
    z-index: 1100; display: flex; flex-direction: column; overflow-y: auto;
    transition: transform 0.3s ease; box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}
.admin-sidebar.open { transform: translateX(0); }
.admin-sidebar-logo {
    padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 10px;
}
.admin-sidebar-logo svg { flex-shrink: 0; }
.admin-sidebar-logo img.admin-logo-img { flex-shrink: 0; border-radius: 6px; object-fit: cover; }
.admin-sidebar-logo-text { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.admin-sidebar-logo-text span { display: block; font-size: 0.7rem; font-weight: 400; color: rgba(255,255,255,0.45); }
.admin-sidebar-nav { flex: 1; padding: 8px 0; }
.admin-nav-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: rgba(255,255,255,0.65);
    cursor: pointer; transition: all 0.2s; font-size: 0.9rem; border-left: 3px solid transparent;
    text-decoration: none; min-height: 44px;
}
.admin-nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.admin-nav-item.active { color: #fff; background: #106eb8; border-left-color: #f18d00; }
.admin-nav-item svg { flex-shrink: 0; width: 18px; height: 18px; }
.admin-sidebar-footer {
    padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: space-between;
}
.admin-sidebar-user { font-size: 0.8rem; color: rgba(255,255,255,0.55); }
.admin-sidebar-logout {
    background: none; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.7);
    padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; cursor: pointer;
}
.admin-sidebar-logout:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* 主区域*/
.admin-main { margin-left: 220px; min-height: 100vh; transition: margin-left 0.3s ease; }
.admin-topbar {
    background: #fff; padding: 0 20px; height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100;
}
.admin-topbar-left { display: flex; align-items: center; gap: 12px; }
.admin-menu-toggle {
    display: none; background: none; border: none; font-size: 1.4rem; color: #333;
    cursor: pointer; padding: 4px; border-radius: 4px;
}
.admin-menu-toggle:hover { background: #f0f2f5; }
.admin-topbar-title { font-size: 1.1rem; font-weight: 600; color: #333; }
.admin-topbar-right { display: flex; align-items: center; gap: 10px; }
.admin-sync-btn {
    background: #106eb8; color: #fff; border: none; padding: 6px 14px;
    border-radius: 4px; cursor: pointer; font-size: 0.8rem; transition: background 0.2s;
}
.admin-sync-btn:hover { background: #0a5a9e; }

/* 内容区*/
.admin-content { padding: 20px; }
.admin-page-header {
    margin-bottom: 20px; display: flex; justify-content: space-between;
    align-items: flex-start; flex-wrap: wrap; gap: 12px;
}
.admin-page-header h2 { font-size: 1.4rem; color: #333; font-weight: 600; }
.admin-page-header p { color: #888; font-size: 0.85rem; margin-top: 4px; }

/* 侧边栏遮罩*/
.admin-sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 1090; }
.admin-sidebar-overlay.active { display: block; }

/* --- 组件 --- */
/* 面板/卡片 */
.admin-section {
    background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 20px; margin-bottom: 16px;
}
.admin-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap; gap: 8px;
}
.admin-section-header h3 { font-size: 1rem; color: #333; font-weight: 600; }
.admin-section-actions { display: flex; gap: 6px; }
.admin-section-danger { border: 1px solid #ffe0e0; }
.admin-section-danger .admin-section-header h3 { color: #e74c3c; }

/* 统计卡片 (新版) */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.admin-stat-card {
    background: #fff; border-radius: 8px; padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04); display: flex; align-items: center; gap: 16px;
    transition: box-shadow 0.2s;
}
.admin-stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.admin-stat-icon {
    width: 56px; height: 56px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.admin-stat-body { flex: 1; }
.admin-stat-num { font-size: 1.8rem; font-weight: 700; color: #333; }
.admin-stat-label { font-size: 0.85rem; color: #888; margin-top: 2px; }
.admin-stat-sub { font-size: 0.75rem; color: #aaa; margin-top: 2px; }

/* 表格 (新版) */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.admin-table th { background: #fafafa; color: #555; font-weight: 600; white-space: nowrap; }
.admin-table tr:nth-child(even) { background: #fafbfc; }
.admin-table tr:hover { background: #e8f4fd; }
.admin-table .admin-empty { text-align: center; color: #aaa; padding: 40px 0; }
.admin-table-img { width: 60px; height: 40px; overflow: hidden; border-radius: 4px; }
.admin-table-img img { width: 100%; height: 100%; object-fit: cover; }
.admin-img-placeholder {
    width: 60px; height: 40px; background: #f5f5f5; border-radius: 4px;
    color: #ccc; font-size: 0.7rem; display: flex; align-items: center; justify-content: center;
}
.admin-text-ellipsis { display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.admin-price { color: #f18d00; font-weight: 600; }
.admin-row-actions { display: flex; gap: 4px; flex-wrap: wrap; }

/* 徽章 */
.admin-badge {
    display: inline-block; padding: 2px 10px; border-radius: 10px;
    font-size: 0.75rem; font-weight: 500; white-space: nowrap;
}
.admin-badge-success { background: #e6f9ed; color: #27ae60; }
.admin-badge-danger { background: #fde8e8; color: #e74c3c; }
.admin-badge-warning { background: #fef3e0; color: #f39c12; }
.admin-badge-info { background: #e8f4fd; color: #106eb8; }
.admin-badge-default { background: #f5f5f5; color: #999; }

/* 分页 */
.admin-pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; color: #888;
}
.admin-pagination-btns { display: flex; align-items: center; gap: 4px; }
.admin-page-info { padding: 0 8px; color: #555; }

/* 公司信息布局优化 */
.company-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 20px;
}
.company-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0 20px;
}
.company-images-grid .admin-upload-inline { flex-wrap: wrap; }

/* 表单卡片 */
.admin-form-card { margin-top: 16px; background: #fff; border: 1px solid #e8f4fd; border-radius: 8px; overflow: hidden; }
.admin-form-header {
    background: #f0f7ff; padding: 12px 20px; display: flex;
    align-items: center; justify-content: space-between;
}
.admin-form-header h4 { color: #106eb8; font-size: 1rem; }
.admin-form-close {
    background: none; border: none; font-size: 1.2rem; color: #999; cursor: pointer;
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 4px;
}
.admin-form-close:hover { background: rgba(0,0,0,0.05); color: #333; }
.admin-form-body { padding: 20px; }
.admin-form-footer {
    padding: 12px 20px; border-top: 1px solid #f0f0f0;
    display: flex; justify-content: flex-end; gap: 8px;
}

/* 海报上传网格 (新版) */
.poster-upload-cell {
    background: #fafbfc; border: 1px solid #eee; border-radius: 8px; padding: 12px;
}
.poster-upload-label { font-size: 0.85rem; font-weight: 600; color: #106eb8; margin-bottom: 8px; }
.poster-upload-zone {
    border: 2px dashed #ddd; border-radius: 8px; padding: 16px;
    text-align: center; color: #999; cursor: pointer; transition: all 0.2s;
    min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative;
}
.poster-upload-zone:hover, .poster-upload-zone.drag-over { border-color: #106eb8; background: #f0f7ff; color: #106eb8; }
.poster-upload-zone input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1;
}
.poster-upload-hint { font-size: 0.8rem; pointer-events: none; }
.poster-upload-preview { max-width: 100%; margin-top: 8px; }
.poster-upload-preview img { max-width: 100%; max-height: 120px; border-radius: 4px; }

/* 海报管理卡片 (新版) */
.poster-manage-card {
    background: #fff; border-radius: 8px; overflow: hidden;
    border: 1px solid #eee; position: relative; transition: all 0.2s;
}
.poster-manage-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.poster-manage-card.expired { opacity: 0.6; }
.poster-manage-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; cursor: pointer; }
.poster-expired-tag { position: absolute; top: 8px; left: 8px; }
.poster-manage-info { padding: 8px 10px; }
.poster-manage-path { font-size: 0.8rem; color: #555; margin-bottom: 4px; }
.poster-manage-path strong { color: #106eb8; }
.poster-manage-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.poster-manage-actions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }

/* 海报文件名显示*/
.poster-filename {
    font-size: 0.72rem; color: #999; padding: 2px 8px 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-align: center;
}

/* 海报分类筛选按钮*/
.poster-cat-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.poster-cat-btn {
    padding: 5px 14px; border: 1px solid #d0d0d0; border-radius: 20px;
    background: #fff; color: #666; cursor: pointer; font-size: 0.82rem;
    transition: all 0.2s ease;
}
.poster-cat-btn:hover { border-color: #106eb8; color: #106eb8; }
.poster-cat-btn.active { background: #106eb8; color: #fff; border-color: #106eb8; }

/* 海报多条件筛选栏 */
.poster-filter-bar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.poster-filter-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.poster-filter-label { font-size: 0.8rem; color: #888; font-weight: 500; white-space: nowrap; margin-right: 2px; }
.poster-filter-btn {
    padding: 4px 12px; border: 1px solid #d0d0d0; border-radius: 20px;
    background: #fff; color: #666; cursor: pointer; font-size: 0.78rem;
    transition: all 0.2s ease; white-space: nowrap;
}
.poster-filter-btn:hover { border-color: #106eb8; color: #106eb8; }
.poster-filter-btn.active { background: #106eb8; color: #fff; border-color: #106eb8; }

/* 海报全选栏 */
.poster-select-bar { margin-bottom: 8px; font-size: 0.82rem; }
.poster-select-all { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: #666; }
.poster-select-all input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; }

/* 海报拖拽排序相关 */
.poster-manage-card.selected { box-shadow: 0 0 0 3px #f18d00, 0 4px 16px rgba(241,141,0,0.25); border-color: #f18d00; }
.poster-manage-card.drag-over { border-color: #106eb8; background: #e8f4fd; }
.poster-manage-card.dragging { opacity: 0.5; }
.poster-drag-insert-marker {
    border-left: 3px solid #106eb8; background: rgba(16,110,184,0.06);
    min-height: 40px; margin: 4px 0; border-radius: 4px;
}

/* 海报关联选择器*/
.admin-poster-chain { display: flex; gap: 8px; flex-wrap: wrap; }
.poster-thumb-select { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.poster-thumb-item {
    width: 80px; height: auto; border-radius: 4px; overflow: hidden;
    border: 2px solid transparent; cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; background: #fff;
}
.poster-thumb-item:hover { border-color: #106eb8; }
.poster-thumb-item.selected { border-color: #f18d00; box-shadow: 0 0 0 2px rgba(241,141,0,0.3); }
.poster-thumb-item img { width: 100%; height: 60px; object-fit: cover; flex-shrink: 0; }
.poster-thumb-item .poster-filename {
    font-size: 0.6rem; color: #999; padding: 2px 4px; flex-shrink: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 100%; text-align: center; line-height: 1.4;
}

/* 产品编辑表单双栏布局 */
.product-form-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.product-form-main {}
.product-form-sidebar {}
.form-card {
    background: #fff;
    border: 1px solid #e8f4fd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}
.form-card-title {
    padding: 12px 16px;
    background: #f0f7ff;
    color: #106eb8;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid #e8f4fd;
}
.form-card-body { padding: 16px; }
.product-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
.product-status-badge.online { background: #e8f5e9; color: #2e7d32; }
.product-status-badge.offline { background: #f5f5f5; color: #999; }

/* 分类管理标签 */
.admin-sub-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-sub-tag {
    padding: 6px 14px; background: #e8f4fd; border: 1px solid #cce4f7;
    border-radius: 20px; color: #106eb8; font-size: 0.85rem;
    display: flex; align-items: center; gap: 6px;
}
.admin-sub-tag-disabled { background: #f5f5f5; border-color: #eee; color: #aaa; cursor: default; }
.admin-sub-tag-btn { background: none; border: none; color: #999; cursor: pointer; font-size: 0.8rem; padding: 0 2px; }
.admin-sub-tag-btn:hover { color: #106eb8; }
.admin-sub-tag-del:hover { color: #e74c3c; }
.admin-sub-tag-add { background: #fff; border-style: dashed; border-color: #106eb8; color: #106eb8; cursor: pointer; }
.admin-sub-tag-add:hover { background: #f0f7ff; }

/* 统计编辑器*/
.admin-stats-editor { display: flex; flex-direction: column; gap: 8px; }
.admin-stat-row { display: flex; gap: 8px; align-items: center; }
.admin-stat-input-num { width: 100px; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem; }
.admin-stat-input-label { flex: 1; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem; }

/* 选择器*/
.admin-select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 0.9rem; min-width: 160px; }
.admin-select-sm { padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 0.78rem; }

/* 操作卡片 */
.admin-action-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.admin-action-card {
    background: #fafbfc; border: 1px solid #eee; border-radius: 8px;
    padding: 20px; cursor: pointer; text-align: center; transition: all 0.2s;
}
.admin-action-card:hover { border-color: #106eb8; box-shadow: 0 4px 12px rgba(16,110,184,0.1); }
.admin-action-card-title { font-size: 0.95rem; font-weight: 600; color: #333; margin: 8px 0 4px; }
.admin-action-card-desc { font-size: 0.8rem; color: #999; }

/* 快捷操作 */
.admin-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-version { font-size: 0.75rem; color: #ccc; text-align: center; margin-top: 12px; }

/* 上传组件 */
.admin-upload-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-upload-inline input[type=file] { font-size: 0.85rem; }
.admin-upload-preview { width: 100px; height: 66px; border-radius: 6px; overflow: hidden; border: 1px solid #eee; }
.admin-upload-preview img { width: 100%; height: 100%; object-fit: cover; }

/* 警告/提示框*/
.admin-alert {
    padding: 12px 16px; border-radius: 6px; margin-bottom: 16px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.9rem;
}
.admin-alert-warning { background: #fef3e0; border: 1px solid #fde0a8; color: #c2850a; }
.admin-danger-hint { color: #e74c3c; font-size: 0.88rem; line-height: 1.6; margin-bottom: 12px; }

/* 搜索框*/
.admin-search-box { position: relative; }
.admin-search-input {
    padding: 6px 12px 6px 32px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.85rem; width: 200px; transition: all 0.2s;
}
.admin-search-input:focus { outline: none; border-color: #106eb8; width: 260px; }

/* 加载动画 */
.admin-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 0; color: #999; }
.admin-spinner { width: 24px; height: 24px; border: 3px solid #e8f4fd; border-top-color: #106eb8; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.admin-empty-state { text-align: center; padding: 40px 0; color: #ccc; font-size: 0.9rem; }

/* Toast (新版) */
.admin-toast {
    padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: all 0.3s ease;
    max-width: 360px; word-break: break-all;
}
.toast-success { background: #27ae60; }
.toast-error { background: #e74c3c; }
.toast-info { background: #106eb8; }
.admin-toast.hide { opacity: 0; transform: translateX(40px); }

/* 确认弹窗 (新版) */
.admin-confirm-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.45); z-index: 3000; align-items: center; justify-content: center;
}

/* 通用模态框遮罩层，确保高于侧边栏(z-index: 1100) */
.admin-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.45); z-index: 9999; align-items: center; justify-content: center;
}
.admin-modal-overlay.active { display: flex; }
.admin-modal-box {
    background: #fff; border-radius: 12px; padding: 24px; max-width: 420px; width: 90%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15); position: relative; z-index: 10000;
}
.admin-confirm-modal.active { display: flex; }
.admin-confirm-dialog {
    background: #fff; border-radius: 12px; padding: 24px; max-width: 420px; width: 90%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.admin-confirm-title { font-size: 1.1rem; font-weight: 600; color: #333; margin-bottom: 8px; }
.admin-confirm-msg { color: #666; font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px; }
.admin-confirm-btns { display: flex; justify-content: flex-end; gap: 8px; }

/* 按钮扩展 */
.btn-icon { font-size: 1.1rem; line-height: 0; }
.btn-block { display: block; width: 100%; }
.btn-cancel { background: #f5f5f5; color: #666; border: 1px solid #ddd; border-radius: 6px; padding: 8px 20px; cursor: pointer; font-size: 0.9rem; }
.btn-cancel:hover { background: #eee; }
.btn-danger-outline { background: #fff; color: #e74c3c; border: 1px solid #e74c3c; border-radius: 6px; padding: 4px 12px; cursor: pointer; font-size: 0.8rem; min-height: 32px; }
.btn-danger-outline:hover { background: #fde8e8; }
.btn-warning-outline { background: #fff; color: #f39c12; border: 1px solid #f39c12; border-radius: 6px; padding: 4px 12px; cursor: pointer; font-size: 0.8rem; min-height: 32px; }
.btn-warning-outline:hover { background: #fef3e0; }
.btn-success-outline { background: #fff; color: #27ae60; border: 1px solid #27ae60; border-radius: 6px; padding: 4px 12px; cursor: pointer; font-size: 0.8rem; min-height: 32px; }
.btn-success-outline:hover { background: #e6f9ed; }

/* 表单增强 */
.form-required { color: #e74c3c; }
.form-label { display: block; margin-bottom: 6px; font-weight: 500; color: #333; font-size: 0.9rem; }

/* 登录页(新版) */
.login-wrapper {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; background: linear-gradient(135deg, #0a5a9e 0%, #106eb8 50%, #2a85d0 100%);
    padding: 20px;
}
.login-container {
    background: #fff; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    width: 100%; max-width: 420px; padding: 40px;
}
.login-brand { text-align: center; margin-bottom: 32px; }
.login-logo { margin-bottom: 12px; }
.login-brand h1 { color: #106eb8; font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.login-subtitle { color: #999; font-size: 0.9rem; }
.login-form { }
.login-form .form-group { margin-bottom: 1.2rem; }
.login-form .form-label { margin-bottom: 6px; }
.form-input-wrap {
    position: relative; display: flex; align-items: center;
}
.form-input-icon {
    position: absolute; left: 12px; pointer-events: none;
}
.form-input-wrap input {
    width: 100%; padding: 10px 12px 10px 36px; border: 1px solid #ddd;
    border-radius: 8px; font-size: 0.95rem; transition: all 0.2s;
}
.form-input-wrap input:focus { outline: none; border-color: #106eb8; box-shadow: 0 0 0 3px rgba(16,110,184,0.1); }
.login-remember { margin-bottom: 1.2rem; }
.form-checkbox {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: #666; cursor: pointer;
}
.form-checkbox input[type=checkbox] { display: none; }
.form-checkbox-mark {
    width: 16px; height: 16px; border: 1px solid #ccc; border-radius: 3px;
    display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.form-checkbox input:checked + .form-checkbox-mark { background: #106eb8; border-color: #106eb8; }
.form-checkbox input:checked + .form-checkbox-mark::after { content: ''; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px; }
.login-footer {
    margin-top: 24px; padding-top: 16px; border-top: 1px solid #f0f0f0;
    display: flex; justify-content: space-between; font-size: 0.8rem; color: #aaa;
}
.login-footer a { color: #106eb8; text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }

/* 响应式：后台 */
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-220px); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .admin-menu-toggle { display: block; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 8px 6px; }
    .admin-page-header { flex-direction: column; }
    .admin-page-header h2 { font-size: 1.2rem; }
    .poster-upload-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-section { padding: 12px; }
}

/* ===== 重置模态框（多步确认） ===== */
.admin-reset-overlay { z-index: 10000; }
.admin-reset-box { max-width: 520px; width: 90%; }
.reset-progress { height: 4px; background: #e8e8e8; border-radius: 2px; margin-bottom: 16px; overflow: hidden; }
.reset-progress-bar { height: 100%; background: #e74c3c; border-radius: 2px; transition: width 0.3s; }
.reset-steps-indicator { display: flex; justify-content: space-between; margin-bottom: 20px; padding: 0 4px; }
.reset-step-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; background: #f0f0f0; color: #999; transition: all 0.3s; }
.reset-step-dot.current { background: #e74c3c; color: #fff; box-shadow: 0 0 0 4px rgba(231,76,60,0.2); }
.reset-step-dot.done { background: #5ab530; color: #fff; }
.reset-step { padding: 8px 0; }
.reset-step-desc { font-size: 15px; color: #333; margin-bottom: 12px; }
.reset-hint { font-size: 12px; margin-top: 6px; color: #e74c3c; min-height: 18px; }
.admin-input { width: 100%; padding: 10px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;
    outline: none; box-sizing: border-box; transition: border-color 0.2s; }
.admin-input:focus { border-color: #106eb8; box-shadow: 0 0 0 2px rgba(16,110,184,0.1); }
.reset-checkbox { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 14px; color: #555; line-height: 1.6; }
.reset-checkbox input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; cursor: pointer; }
.reset-countdown { width: 64px; height: 64px; border-radius: 50%; background: #e74c3c; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700;
    margin: 16px auto; }
/* 页脚 favicon 链接 */
.footer-ico-link { display: inline-block; line-height: 1; }
.footer-ico-link:hover img { opacity: 0.8 !important; }

/* ===== 懒加载占位与淡入 ===== */
.lazy-placeholder {
    background: #e8e8e8;
    animation: lazy-shimmer 1.6s ease-in-out infinite;
    background-size: 200% 100%;
}
@keyframes lazy-shimmer {
    0% { background: #e8e8e8; }
    50% { background: #f2f2f2; }
    100% { background: #e8e8e8; }
}
.img-fade-in {
    animation: imgFadeIn 0.4s ease-out;
}
@keyframes imgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
