:root {
    /* Primary Colors */
    --primary-100: #272343;
    --primary-200: #788e98;
    --primary-300: #F0F5F9;

    /* Accent Colors */
    --accent-100: #788189;
    --accent-200: #e1e4e6;

    /* Text Colors */
    --text-100: #1E2022;
    --text-200: #52616B;

    /* Background Colors */
    --bg-100: #FFFFFF;
    --bg-200: #d6edf8;
    --bg-300: #788e98;

    /* Semantic Colors */
    --success: #2ecc71;
    --warning: #f1c40f;
    --error: #e74c3c;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    /* font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
    font-family: -apple-system,BlinkMacSystemFont,'Helvetica Neue',Helvetica,Segoe UI,Arial,Roboto,'PingFang SC',miui,'Hiragino Sans GB','Microsoft Yahei',sans-serif;
    background-color: var(--bg-100);
    color: var(--text-100);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

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

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(39, 35, 67, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px) perspective(1000px) rotateY(-5deg) rotateX(5deg);
    }

    50% {
        transform: translateY(-20px) perspective(1000px) rotateY(-5deg) rotateX(5deg);
    }

    100% {
        transform: translateY(0px) perspective(1000px) rotateY(-5deg) rotateX(5deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-100);
    font-weight: 700;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.btn-primary {
    background-color: var(--primary-100);
    color: white;
}

.btn-primary:hover {
    background-color: var(--text-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid var(--primary-100);
    color: var(--primary-100);
}

.btn-outline:hover {
    background-color: var(--primary-100);
    color: white;
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--accent-200);
}

header .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-100);
}

.logo span {
    color: var(--primary-200);
}

/* 品牌 SVG：侧栏 logo_white；浅底页顶栏/登录 logo_black（见各页 img src） */
.site-logo-img {
    display: block;
    height: 36px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

header .logo:has(.site-logo-img) {
    font-size: 0;
    line-height: 0;
    gap: 0;
}

header .site-logo-img {
    height: 38px;
    max-width: 240px;
}

.login-card .logo:has(.site-logo-img) {
    gap: 0;
    justify-content: center;
}

.login-card .site-logo-img {
    height: 40px;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
}

.sidebar-header .logo:has(.site-logo-img),
.sidebar-header .logo.logo--brand {
    display: flex;
    align-items: center;
    font-size: 0;
    line-height: 0;
    gap: 0;
    color: transparent;
    text-decoration: none;
}

.sidebar-header .site-logo-img {
    height: 32px;
    max-width: 190px;
    filter: none;
}

@media (max-width: 768px) {
    .mobile-header .site-logo-img {
        height: 28px;
        max-width: 160px;
        filter: none;
    }
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav ul li a:hover {
    color: var(--primary-200);
}

.nav-btns {
    display: flex;
    gap: 1rem;
}

/* Hero Section */
.hero {
    padding-top: 160px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, var(--bg-100) 0%, var(--bg-200) 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary-100), var(--primary-200));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-200);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* Features */
.features {
    padding: 100px 0;
    background-color: var(--bg-100);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-200);
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem;
    background: var(--bg-100);
    border: 1px solid var(--accent-200);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-300);
    color: var(--primary-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-200);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header .container {
        height: 70px;
    }

    nav {
        display: none;
    }

    .nav-btns {
        display: none;
    }

    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--primary-100);
        cursor: pointer;
        position: relative;
        z-index: 2000;
    }

    .hero {
        padding-top: 100px;
        text-align: center;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content p {
        margin: 0 auto 2rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Landing Page Nav Menu */
    header nav.active {
        display: block !important;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 2rem;
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--accent-200);
        animation: slideDown 0.3s ease-out;
    }

    header nav.active ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    @keyframes slideDown {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }

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

.mobile-header {
    display: none;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--primary-100);
    color: white;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    flex: 1;
    padding: 2rem 0;
    overflow-y: auto;
    scrollbar-width: none;
    /* Hide scrollbar for cleaner look */
}

.sidebar-menu::-webkit-scrollbar {
    display: none;
}

.menu-item {
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-base);
    font-size: 0.95rem;
    font-weight: 500;
}

.menu-item i {
    width: 20px;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.menu-item.active {
    border-left: 4px solid var(--bg-200);
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu a.menu-item.is-nav-hidden {
    display: none !important;
}

.sidebar-footer {
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content {
    margin-left: 260px;
    flex: 1;
    min-width: 0;
    padding: 2.5rem;
    background-color: var(--primary-300);
    min-height: 100vh;
    box-sizing: border-box;
}

/* Page Header Standard */
.page-header {
    margin-bottom: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--accent-200);
}

.page-header-info h2 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-100);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.page-header-info p {
    color: var(--text-200);
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.8;
}

.page-header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Dashboard Widgets */
.top-bar {
    background: white;
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--accent-200);
}

.stat-card h4 {
    color: var(--text-200);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-100);
}

.card {
    background: var(--bg-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--accent-200);
    /* overflow: hidden; */
}

.card-header {
    padding: 1.5rem 2rem;
    /* border-bottom: 1px solid var(--accent-200); */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-container {
    overflow-x: auto;
}

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

th {
    text-align: left;
    padding: 1rem 1.2rem;
    background: var(--bg-100);
    color: var(--text-200);
    font-size: 0.85rem;
    font-weight: 600;
}

td {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--accent-200);
    vertical-align: middle;
}

/* Status Tags */
.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* 微信支付弹窗：二维码区域居中 */
.pay-scan-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.pay-scan-box .pay-scan-qr {
    display: block;
    margin: 0 auto;
    width: 220px;
    height: 220px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.pay-scan-box p {
    margin: 1rem 0 0;
    width: 100%;
}

/* Global Responsive Overrides */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .sidebar {
        width: 280px !important;
        transform: translateX(-100%) !important;
        position: fixed !important;
        z-index: 1000 !important;
        height: 100vh !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .sidebar.active {
        transform: translateX(0) !important;
    }

    /* 确保菜单导航项区域占满剩余高度 */
    .sidebar .sidebar-menu {
        flex: 1 !important;
        display: block !important;
        overflow-y: auto !important;
        padding: 1rem 0 !important;
        min-height: 0 !important;
    }

    .sidebar .sidebar-header {
        flex-shrink: 0 !important;
        padding: 1.5rem 2rem !important;
    }

    .sidebar .sidebar-footer {
        flex-shrink: 0 !important;
        padding: 1rem 2rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .sidebar .menu-item {
        display: flex !important;
        align-items: center !important;
        padding: 0.9rem 2rem !important;
        color: rgba(255, 255, 255, 0.8) !important;
        font-size: 0.95rem !important;
        gap: 1rem !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.25rem !important;
        padding-top: 90px !important;
        /* Space for fixed header */
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .mobile-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: #272343 !important;
        /* Force dark background */
        padding: 10px 20px !important;
        position: fixed !important;
        /* Use fixed for better reliability */
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        z-index: 9999 !important;
        color: white !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        box-sizing: border-box !important;
    }

    .mobile-header .logo {
        color: white !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        text-decoration: none !important;
        font-weight: 700 !important;
    }

    .mobile-toggle {
        background: rgba(255, 255, 255, 0.15) !important;
        border: none !important;
        color: white !important;
        width: 42px !important;
        height: 42px !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: 0.2s;
    }

    .mobile-toggle:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.25) !important;
    }

    /* Fix for large cards/stats in mobile */
    .stat-card {
        padding: 1.25rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Form and Table fixes */
    .form-section {
        padding: 1.25rem !important;
    }

    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Activity Header Stack */
    .activity-header {
        flex-direction: column !important;
        align-items: center !important;
        padding: 1.5rem !important;
        gap: 1.5rem !important;
        text-align: center;
    }

    .activity-header h1 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
    }

    .activity-header>div:not(.activity-logo) {
        width: 100%;
    }

    /* Target the info rows (calendar, mode etc) */
    .activity-header div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .activity-logo {
        margin: 0 auto;
        width: 100px !important;
        height: 100px !important;
    }

    /* Reset some flex row styles for specific boxes */
    .activity-header div[style*="background: #f8fafc"] {
        display: block !important;
        padding: 0.75rem !important;
    }

    /* Breadcrumbs hide or wrap */
    div[style*="margin-bottom: 2rem"][style*="display: flex"] {
        flex-wrap: wrap;
    }

    /* Form Layouts (Create/Manage) */
    .card {
        padding: 1.5rem !important;
    }

    .form-section div[style*="display: flex"][style*="gap"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
        align-items: stretch !important;
    }

    .form-section div[style*="flex: 0 0 140px"] {
        flex: none !important;
        width: 140px;
        margin: 0 auto;
    }

    .mode-selector {
        grid-template-columns: 1fr !important;
    }

    /* Pricing/Resource Grids */
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .pricing-card {
        padding: 1.5rem !important;
        gap: 1rem !important;
    }

    /* Spacing Tightening */
    .form-section {
        margin-bottom: 2rem !important;
    }

    div[style*="margin-top: 4rem"] {
        margin-top: 2rem !important;
    }

    div[style*="margin-top: 2.5rem"] {
        margin-top: 1.5rem !important;
    }

    /* Action Buttons in footer and main areas */
    .page-header-actions {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 0.75rem !important;
    }

    .page-header-actions .btn,
    .page-header-actions button {
        flex: 1;
        width: auto !important;
        justify-content: center;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .page-header-actions div[style*="display: flex"][style*="gap"],
    div[style*="display: flex"][style*="justify-content: center"],
    div[style*="display: flex"][style*="justify-content: flex-end"] {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.75rem !important;
    }

    div[style*="display: flex"][style*="justify-content: center"] button,
    div[style*="display: flex"][style*="justify-content: flex-end"] button {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    /* Reset breadcrumbs and small inline flex containers */
    div[style*="font-size: 0.85rem"][style*="display: flex"],
    .badge,
    .menu-item,
    .nav-links div {
        flex-direction: row !important;
    }

    /* 评审管理页面筛选框优化 */
    .filter-section {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1.25rem !important;
        padding: 1.25rem !important;
    }

    .filter-col {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .filter-col label {
        text-align: left !important;
    }

    .filter-input {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .filter-section .btn {
        width: 100% !important;
        margin: 0 !important;
    }
}