/* =============================================
   CSS 变量
   ============================================= */
:root {
    --bg: #FFF8F5;
    --bg-card: #ffffff;
    --bg-subtle: #F5F6FA;
    --bg-input: #ffffff;
    --border: #E8EAED;
    --border-sub: #F0F0F0;
    --text-1: #1A1A18;
    --text-2: #5F5E5A;
    --text-3: #B4B2A9;
    --primary: #D85A30;
    --primary-lt: #FEF0E6;
    --primary-dk: #8B3A0F;
    --green: #3B6D11;
    --green-lt: #EAF3DE;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
}

.dark {
    --bg: #111110;
    --bg-card: #1C1C1A;
    --bg-subtle: #242422;
    --bg-input: #2A2A28;
    --border: #2E2E2B;
    --border-sub: #252523;
    --text-1: #F0EFEA;
    --text-2: #A8A7A2;
    --text-3: #5A5A58;
    --primary: #E8724A;
    --primary-lt: #2A1A10;
    --primary-dk: #F0997B;
    --green: #5A9E28;
    --green-lt: #162210;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,.4);
}

/* =============================================
   基础
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    background-color: var(--bg);
    color: var(--text-1);
    transition: background-color .2s, color .2s;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
}

.hidden {
    display: none !important;
}

/* =============================================
   公共布局
   ============================================= */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

.page-content {
    max-width: 1152px;
    margin: 0 auto;
    padding: 32px 16px;
    animation: fade-in .2s ease;
}

.page-section {
    margin-bottom: 48px;
}

.page-h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-1);
    margin: 0 0 6px;
}

.page-sub {
    font-size: 13px;
    color: var(--text-3);
    margin: 0 0 24px;
}

/* =============================================
   导航
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    transition: background-color .2s, border-color .2s;
}

.header-inner {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 22px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.logo-sub {
    font-size: 12px;
    color: var(--text-3);
    display: none;
}

@media(min-width:640px) {
    .logo-sub {
        display: block;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-2);
    transition: background-color .15s, color .15s;
}

    .nav-link:hover {
        background-color: var(--bg-subtle);
        color: var(--text-1);
    }

    .nav-link.active {
        color: var(--primary);
        font-weight: 500;
    }

.theme-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background-color: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-left: 6px;
    transition: background-color .15s;
}

    .theme-btn:hover {
        background-color: var(--border);
    }

/* =============================================
   Footer
   ============================================= */
.site-footer {
    background-color: #111110;
    margin-top: 64px;
}

.footer-inner {
    max-width: 1152px;
    margin: 0 auto;
    padding: 40px 16px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 32px;
    margin-bottom: 32px;
}

@media(min-width:768px) {
    .footer-grid {
        grid-template-columns: repeat(4,1fr);
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

.footer-desc {
    font-size: 13px;
    color: #9CA3AF;
    line-height: 1.7;
}

.footer-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .footer-links a {
        font-size: 13px;
        color: #9CA3AF;
        transition: color .15s;
    }

        .footer-links a:hover {
            color: #fff;
        }

.footer-bottom {
    border-top: 1px solid #1F2937;
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #6B7280;
}

@media(min-width:640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* =============================================
   Hero
   ============================================= */
.hero-section {
    background: linear-gradient(135deg, var(--primary-lt) 0%, var(--bg) 100%);
    padding: 64px 16px;
    transition: background .2s;
}

.dark .hero-section {
    background: linear-gradient(135deg, #2A1A10 0%, #111110 100%);
}

.hero-inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-dk);
    line-height: 1.3;
    margin: 0 0 14px;
}

@media(min-width:768px) {
    .hero-title {
        font-size: 46px;
    }
}

.hero-sub {
    font-size: 15px;
    color: var(--text-2);
    margin: 0 0 32px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.hero-stat {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 0 16px;
}

.stat-n {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-l {
    font-size: 13px;
    color: var(--text-3);
}

.hero-divider {
    width: 1px;
    height: 28px;
    background-color: var(--border);
}

/* =============================================
   章节标题
   ============================================= */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-1);
    margin: 0 0 16px;
}

.section-more {
    font-size: 13px;
    color: var(--primary);
}

    .section-more:hover {
        text-decoration: underline;
    }

/* =============================================
   分类网格
   ============================================= */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 12px;
}

@media(min-width:640px) {
    .cat-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

@media(min-width:1024px) {
    .cat-grid {
        grid-template-columns: repeat(5,1fr);
    }
}

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: box-shadow .2s, border-color .15s, background-color .2s;
}

    .cat-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--primary);
    }

.cat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.cat-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1);
}

.cat-card-desc {
    font-size: 11px;
    color: var(--text-3);
    text-align: center;
    line-height: 1.5;
    margin-top: 4px;
}

/* =============================================
   优惠券网格
   ============================================= */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 14px;
}

@media(min-width:640px) {
    .coupon-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

@media(min-width:1024px) {
    .coupon-grid {
        grid-template-columns: repeat(4,1fr);
    }
}

/* =============================================
   优惠券卡片
   ============================================= */
.coupon-card {
    display: block;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, background-color .2s, border-color .2s;
}

    .coupon-card:hover {
        box-shadow: var(--shadow-md);
    }

.cc-top {
    height: 140px;
    position: relative;
    overflow: hidden;
}

.cc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cc-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.cc-plat-name {
    font-size: 14px;
    font-weight: 500;
}

.cc-cat-name {
    font-size: 11px;
    opacity: .7;
}

.cc-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
    opacity: .9;
}

.cc-corner {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
}

.ticket-divider {
    display: flex;
    align-items: center;
    height: 16px;
    background-color: var(--bg-card);
}

.notch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.notch-l {
    margin-left: -8px;
}

.notch-r {
    margin-right: -8px;
}

.dashes {
    flex: 1;
    border-top: 2px dashed var(--border);
}

.cc-body {
    padding: 12px 14px 10px;
}

.cc-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.cc-gate {
    font-size: 11px;
    color: var(--text-3);
    margin: 3px 0 0;
}

.cc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.price-wrap {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.discount {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
}

.orig {
    font-size: 11px;
    color: var(--text-3);
    text-decoration: line-through;
}

.get-btn {
    background-color: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    transition: background-color .15s;
}

.coupon-card:hover .get-btn {
    background-color: var(--primary-dk);
}

.expire {
    font-size: 11px;
    margin: 6px 0 0;
    color: var(--text-3);
}

    .expire.urgent {
        color: #E24B4A;
    }

/* =============================================
   优惠券列表行
   ============================================= */
.coupon-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coupon-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, background-color .2s;
}

    .coupon-row:hover {
        box-shadow: var(--shadow-md);
    }

.row-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.row-info {
    flex: 1;
    min-width: 0;
}

.row-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.row-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.plat-tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
}

.row-gate {
    font-size: 12px;
    color: var(--text-2);
}

.row-expire {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 3px;
}

    .row-expire.urgent {
        color: #E24B4A;
    }

.row-right {
    text-align: right;
    flex-shrink: 0;
}

.row-discount {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    display: block;
}

.row-count {
    font-size: 11px;
    color: var(--green);
    display: block;
    margin-top: 2px;
}

.row-btn {
    display: inline-block;
    background-color: var(--primary-lt);
    color: var(--primary-dk);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 6px;
    transition: background-color .15s;
}

.coupon-row:hover .row-btn {
    background-color: var(--primary);
    color: #fff;
}

/* =============================================
   景区网格 & 卡片
   ============================================= */
.attraction-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media(min-width:640px) {
    .attraction-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media(min-width:1024px) {
    .attraction-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

.acard {
    display: block;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, background-color .2s;
}

    .acard:hover {
        box-shadow: var(--shadow-md);
    }

.acard-cover {
    height: 176px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.free-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}

.acard-body {
    padding: 14px;
}

.acard-name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.acard-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.3;
    margin: 0;
}

.city-tag {
    background-color: var(--green-lt);
    color: var(--green);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.acard-summary {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.acard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.acard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ticket-info {
    font-size: 12px;
    font-weight: 500;
}

.jump-btn {
    background-color: var(--green-lt);
    color: var(--green);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    transition: background-color .15s;
}

.acard:hover .jump-btn {
    background-color: var(--green);
    color: #fff;
}

/* =============================================
   详情页
   ============================================= */
.detail-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 16px 64px;
}

.detail-hero {
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.detail-plat-tag {
    font-size: 13px;
    font-weight: 500;
    opacity: .8;
    margin: 0 0 8px;
}

.detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.4;
    margin: 0 0 16px;
}

.detail-discount-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.detail-discount {
    font-size: 52px;
    font-weight: 700;
    color: var(--primary);
}

.detail-orig {
    font-size: 16px;
    color: var(--text-3);
    text-decoration: line-through;
}

.detail-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: background-color .2s, border-color .2s;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border-sub);
}

    .detail-row:last-child {
        border-bottom: none;
    }

.detail-label {
    font-size: 13px;
    color: var(--text-2);
}

.detail-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
}

.attraction-cover {
    height: 224px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border-sub);
}

    .info-row:last-child {
        border-bottom: none;
    }

.info-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.info-label {
    font-size: 11px;
    color: var(--text-3);
    display: block;
    margin-bottom: 3px;
}

.info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    display: block;
    line-height: 1.5;
}

.tip-box {
    background-color: var(--green-lt);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
    transition: background-color .2s;
}

    .tip-box h3 {
        font-size: 13px;
        font-weight: 600;
        color: var(--green);
        margin: 0 0 6px;
    }

    .tip-box p {
        font-size: 12px;
        color: var(--green);
        line-height: 1.7;
        margin: 0;
    }

.disclaimer {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.7;
    margin-bottom: 20px;
}

.report-link {
    text-align: center;
    margin-top: 12px;
}

    .report-link a {
        font-size: 12px;
        color: var(--text-3);
        text-decoration: underline;
    }

/* =============================================
   按钮 & 表单
   ============================================= */
.btn-primary {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s;
}

    .btn-primary:hover {
        background-color: var(--primary-dk);
    }

    .btn-primary:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

.btn-disabled {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--bg-subtle);
    color: var(--text-3);
    border-radius: 12px;
    padding: 13px 20px;
    font-size: 16px;
    font-weight: 500;
}

.btn-green {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--green);
    color: #fff;
    border-radius: 12px;
    padding: 13px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    margin-bottom: 32px;
}

    .btn-green:hover {
        opacity: .9;
    }

.search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.input {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 14px;
    color: var(--text-1);
    outline: none;
    transition: border-color .15s, background-color .2s;
    font-family: inherit;
    width: 100%;
}

    .input::placeholder {
        color: var(--text-3);
    }

    .input:focus {
        border-color: var(--primary);
    }

.filter-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    color: var(--text-2);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, color .15s, background-color .2s;
}

    .filter-tag:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

    .filter-tag.active {
        background-color: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

    .filter-tag.active-green {
        background-color: var(--green);
        color: #fff;
        border-color: var(--green);
    }

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    display: inline-block;
    background-color: var(--bg-subtle);
    color: var(--text-2);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
}

.tag-pill-primary {
    background-color: var(--primary-lt);
    color: var(--primary-dk);
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 20px;
}

.tag-pill-green {
    background-color: var(--green-lt);
    color: var(--green);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

    .breadcrumb a {
        color: var(--text-3);
        transition: color .15s;
    }

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

    .breadcrumb .sep {
        margin: 0 4px;
    }

    .breadcrumb .cur {
        color: var(--text-2);
    }

.about-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 28px;
    transition: background-color .2s, border-color .2s;
}

    .about-box h2 {
        font-size: 17px;
        font-weight: 600;
        color: var(--text-1);
        margin: 0 0 12px;
    }

    .about-box p {
        font-size: 14px;
        color: var(--text-2);
        line-height: 1.8;
        margin: 0 0 10px;
    }

        .about-box p:last-child {
            margin-bottom: 0;
        }

.empty-box {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-3);
}

    .empty-box .icon {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .empty-box p {
        font-size: 14px;
    }

.skeleton {
    background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--border) 50%, var(--bg-subtle) 75%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 16px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

.skeleton-card {
    height: 280px;
}

.skeleton-row {
    height: 112px;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::selection {
    background: var(--primary-lt);
    color: var(--primary);
}

.dark img:not([src*=".svg"]) {
    filter: brightness(.88);
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(4px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* =============================================
   登录页
   ============================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-lt), var(--bg));
}

.dark .login-page {
    background: linear-gradient(135deg, #2A1A10, #111110);
}

.login-box {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-logo {
    text-align: center;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0 4px;
}

.login-sub {
    font-size: 12px;
    color: var(--text-3);
    margin: 0;
}

.login-error {
    color: #E24B4A;
    font-size: 13px;
    text-align: center;
    margin: 0;
}

.form-label {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    font-weight: 500;
    margin-bottom: 5px;
}

/* =============================================
   管理后台 CSS 变量（独立前缀 adm-）
   ============================================= */
:root {
    --adm-bg: #F5F6FA;
    --adm-card: #ffffff;
    --adm-border: #E8EAED;
    --adm-text-1: #1A1A18;
    --adm-text-2: #5F5E5A;
    --adm-text-3: #B4B2A9;
    --adm-primary: #D85A30;
    --adm-green: #3B6D11;
    --adm-warning: #EF9F27;
    --adm-danger: #E24B4A;
    --adm-sidebar: 220px;
}

.dark {
    --adm-bg: #111110;
    --adm-card: #1C1C1A;
    --adm-border: #2E2E2B;
    --adm-text-1: #F0EFEA;
    --adm-text-2: #A8A7A2;
    --adm-text-3: #5A5A58;
}

/* =============================================
   管理后台布局
   ============================================= */
.adm-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--adm-bg);
}

.adm-sidebar {
    width: var(--adm-sidebar);
    background-color: var(--adm-card);
    border-right: 1px solid var(--adm-border);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: background-color .2s;
}

.adm-main {
    margin-left: var(--adm-sidebar);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.adm-content {
    flex: 1;
    padding: 24px;
}

.adm-logo {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.adm-logo-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--adm-primary);
}

.adm-logo-sub {
    font-size: 11px;
    color: var(--adm-text-3);
    margin-top: 1px;
}

.adm-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.adm-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--adm-text-2);
    font-size: 14px;
    transition: all .15s;
}

    .adm-nav-link:hover {
        background-color: var(--adm-bg);
        color: var(--adm-text-1);
    }

    .adm-nav-link.active {
        background-color: #FEF0E6;
        color: var(--adm-primary);
        font-weight: 500;
    }

.dark .adm-nav-link.active {
    background-color: #2A1A10;
}

.adm-user {
    padding: 12px 16px;
    border-top: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.adm-username {
    font-size: 13px;
    color: var(--adm-text-2);
}

.adm-logout {
    font-size: 12px;
    color: var(--adm-text-3);
    background: none;
    border: none;
    cursor: pointer;
}

    .adm-logout:hover {
        color: var(--adm-danger);
    }

.adm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: var(--adm-text-3);
}

/* =============================================
   管理后台页面内容
   ============================================= */
.adm-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.adm-page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--adm-text-1);
    margin: 0;
}

.adm-stat-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 14px;
    margin-bottom: 20px;
}

@media(min-width:768px) {
    .adm-stat-grid {
        grid-template-columns: repeat(3,1fr);
    }
}

@media(min-width:1200px) {
    .adm-stat-grid {
        grid-template-columns: repeat(6,1fr);
    }
}

.adm-stat-card {
    background-color: var(--adm-card);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 18px;
    transition: background-color .2s;
}

.adm-stat-label {
    font-size: 12px;
    color: var(--adm-text-3);
    margin-bottom: 8px;
}

.adm-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--adm-text-1);
}

.adm-stat-sub {
    font-size: 11px;
    color: var(--adm-text-3);
    margin-top: 4px;
}

.adm-stat-card.accent .adm-stat-value {
    color: var(--adm-primary);
}

.adm-stat-card.green .adm-stat-value {
    color: var(--adm-green);
}

.adm-stat-card.warning .adm-stat-value {
    color: var(--adm-warning);
}

.adm-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media(min-width:768px) {
    .adm-two-col {
        grid-template-columns: 1fr 1fr;
    }
}

.adm-card {
    background-color: var(--adm-card);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    transition: background-color .2s;
}

.adm-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.adm-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--adm-text-1);
}

.adm-card-body {
    padding: 18px;
}

.adm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
    font-family: inherit;
}

.adm-btn-primary {
    background-color: var(--adm-primary);
    color: #fff;
}

    .adm-btn-primary:hover {
        opacity: .9;
    }

.adm-btn-ghost {
    background: transparent;
    color: var(--adm-text-2);
    border: 1px solid var(--adm-border);
}

    .adm-btn-ghost:hover {
        background-color: var(--adm-bg);
    }

.adm-btn-danger {
    background-color: var(--adm-danger);
    color: #fff;
}

    .adm-btn-danger:hover {
        opacity: .9;
    }

.adm-btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.adm-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.adm-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.adm-input {
    background-color: var(--bg-input);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--adm-text-1);
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
    width: 100%;
}

    .adm-input:focus {
        border-color: var(--adm-primary);
    }

textarea.adm-input {
    resize: vertical;
    min-height: 80px;
}

.adm-select {
    background-color: var(--bg-input);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--adm-text-1);
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.adm-table-wrap {
    overflow-x: auto;
}

.adm-table {
    width: 100%;
    border-collapse: collapse;
}

    .adm-table th {
        text-align: left;
        font-size: 12px;
        color: var(--adm-text-3);
        font-weight: 500;
        padding: 10px 12px;
        border-bottom: 1px solid var(--adm-border);
        background-color: var(--adm-bg);
        white-space: nowrap;
    }

    .adm-table td {
        padding: 12px;
        border-bottom: 1px solid var(--adm-border);
        font-size: 13px;
        vertical-align: middle;
    }

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

    .adm-table tr:hover td {
        background-color: var(--adm-bg);
    }

.adm-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
    display: inline-block;
    vertical-align: middle;
}

.adm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

    .adm-badge.success {
        background: #E6F4EA;
        color: #3B6D11;
    }

    .adm-badge.gray {
        background: #F1F1F1;
        color: #999;
    }

    .adm-badge.warning {
        background: #FEF3E2;
        color: #EF9F27;
    }

    .adm-badge.danger {
        background: #FDECEA;
        color: #E24B4A;
    }

.adm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.adm-modal {
    background: var(--adm-card);
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.adm-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    color: var(--adm-text-1);
    flex-shrink: 0;
}

.adm-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--adm-text-3);
    padding: 0 4px;
}

    .adm-modal-close:hover {
        color: var(--adm-text-1);
    }

.adm-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.adm-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--adm-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.adm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.adm-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .adm-form-group.adm-full {
        grid-column: 1/-1;
    }

.adm-form-label {
    font-size: 12px;
    color: var(--adm-text-2);
    font-weight: 500;
}

.adm-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--adm-border);
}

    .adm-list-item:last-child {
        border-bottom: none;
    }

.adm-list-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--adm-text-1);
    margin: 0;
}

.adm-list-sub {
    font-size: 11px;
    color: var(--adm-text-3);
    margin: 2px 0 0;
}

.adm-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 400;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    animation: fade-in .25s ease;
}

    .adm-toast.success {
        background: #2D7D3A;
    }

    .adm-toast.error {
        background: var(--adm-danger);
    }

.adm-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

    .adm-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.adm-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 22px;
    cursor: pointer;
    transition: .3s;
}

    .adm-toggle-slider::before {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        left: 3px;
        bottom: 3px;
        background: white;
        border-radius: 50%;
        transition: .3s;
    }

.adm-toggle input:checked + .adm-toggle-slider {
    background: var(--adm-primary);
}

    .adm-toggle input:checked + .adm-toggle-slider::before {
        transform: translateX(18px);
    }

/* ===== 二维码弹出层 ===== */
.qr-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qr-modal {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px 28px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
}

.qr-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-3);
    cursor: pointer;
    line-height: 1;
}

    .qr-close:hover {
        color: var(--text-1);
    }

.qr-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-1);
    margin: 0 0 6px;
}

.qr-hint {
    font-size: 13px;
    color: var(--text-3);
    margin: 0 0 20px;
}

.qr-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 12px;
    margin: 0 auto 16px;
    display: block;
    background: #fff;
    padding: 8px;
    border: 1px solid var(--border);
}

.qr-sub {
    font-size: 12px;
    color: var(--text-3);
    margin: 0 0 16px;
}

.qr-btn {
    background: var(--bg-subtle);
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 24px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .15s;
}

    .qr-btn:hover {
        background: var(--border);
    }
