/* =====================================================
   AES 自动建站平台 —— 全新设计系统 V4
   主题：极昼纯白 + 极夜侧边栏
   原则：零模糊、高对比、强层级、全响应、无多余装饰
   ===================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #F5F5F7;
    --bg-soft: #F0F0F2;
    --white: #ffffff;
    --card: #ffffff;
    --text: #0A0A0A;
    --text2: #505058;
    --text3: #8E8E93;
    --text-muted: #A0A0A6;

    --primary: #0A0A0A;
    --primary-hover: #1E1E1E;
    --primary-active: #000000;
    --primary-soft: #F2F2F4;
    --primary-ultra-light: #F8F8FA;

    --accent: #333333;
    --success: #1C1C1C;
    --success-soft: #F0F0F0;
    --warning: #3A3A3A;
    --warning-soft: #F5F5F5;
    --danger: #0A0A0A;
    --danger-soft: #F0F0F0;
    --info: #2A2A2A;
    --info-soft: #F2F2F4;

    --border: #E0E0E2;
    --border-light: #EBEBED;
    --border-hover: #C8C8CC;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.03);
    --shadow-sm: 0 2px 6px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.08);
    --shadow-xl: 0 20px 50px rgba(0,0,0,.12);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --sidebar-width: 260px;
    --sidebar-bg: #08080A;
    --sidebar-hover: rgba(255,255,255,.07);
    --sidebar-active: rgba(255,255,255,.10);
    --sidebar-text: rgba(255,255,255,.55);
    --sidebar-text-active: #ffffff;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --ease: cubic-bezier(.16,1,.3,1);
    --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

html, body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text2);
    font-size: 14px;
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text2); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--text); }

img { max-width: 100%; height: auto; display: inline-block; vertical-align: middle; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C8C8CC; border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: #A0A0A6; }

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

/* =====================================================
   动画 Animations
   ===================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes loginSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse-dot {
    0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(28,28,28,.35); }
    50% { opacity: .55; box-shadow: 0 0 0 8px rgba(28,28,28,0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* =====================================================
   布局 Layout
   ===================================================== */
.layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.layout::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 30%, rgba(0,0,0,.018) 0%, transparent 45%),
        radial-gradient(circle at 82% 12%, rgba(0,0,0,.01) 0%, transparent 35%);
    pointer-events: none;
    z-index: 0;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,.05);
    animation: fadeIn .45s var(--ease);
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); }

.sidebar .logo {
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 800;
    color: var(--sidebar-text-active);
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    gap: 11px;
    letter-spacing: -.3px;
    min-height: 64px;
    position: relative;
}

.sidebar .logo::before {
    content: '';
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #fff 0%, #d1d1d6 100%);
    box-shadow: 0 0 0 2px rgba(255,255,255,.08);
    flex-shrink: 0;
}

.sidebar .logo small {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.7);
    border-radius: var(--radius-full);
    margin-left: auto;
}

.sidebar .menu {
    padding: 12px 10px;
    flex: 1;
}

.sidebar .menu-group {
    margin-bottom: 4px;
}

.sidebar .menu-group-label {
    display: none;
    padding: 18px 14px 6px;
    font-size: 9.5px;
    font-weight: 700;
    color: rgba(255,255,255,.22);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sidebar .menu a,
.sidebar .menu .menu-toggle-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all .18s var(--ease);
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sidebar .menu a:hover,
.sidebar .menu .menu-toggle-item:hover {
    background: var(--sidebar-hover);
    color: rgba(255,255,255,.9);
    transform: translateX(2px);
}

.sidebar .menu a.active,
.sidebar .menu .menu-toggle-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

.sidebar .menu a.active::before,
.sidebar .menu .menu-toggle-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 3px;
    background: #fff;
    border-radius: 0 3px 3px 0;
}

.sidebar .menu .menu-arrow {
    margin-left: auto;
    transition: transform .25s var(--ease);
    opacity: .45;
    flex-shrink: 0;
}

.sidebar .menu .menu-toggle-item.open .menu-arrow {
    transform: rotate(180deg);
    opacity: .75;
}

.sidebar .menu-sub {
    max-height: 0;
    overflow: hidden;
    padding-left: 12px;
    transition: max-height .35s var(--ease);
}

.sidebar .menu-sub.open {
    max-height: 600px;
}

.sidebar .menu-sub a {
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255,255,255,.42);
    border-radius: var(--radius-sm);
    margin-bottom: 1px;
}

.sidebar .menu-sub a:hover { color: rgba(255,255,255,.82); background: var(--sidebar-hover); transform: translateX(1px); }
.sidebar .menu-sub a.active { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .menu-sub a.active::before { top: 6px; bottom: 6px; width: 2px; }

.sidebar .menu-bottom {
    padding: 14px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    animation: fadeInUp .45s var(--ease) .08s both;
}

.topbar {
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 99;
}

.topbar .page-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.3px;
}

.topbar .user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar .user-menu span {
    color: var(--text2);
    font-size: 13px;
    font-weight: 700;
}

.topbar .user-menu a {
    color: var(--text3);
    font-size: 13px;
    font-weight: 700;
}

.topbar .user-menu a:hover { color: var(--danger); }

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

/* =====================================================
   卡片 Card
   ===================================================== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 20px;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: '';
    width: 5px;
    height: 18px;
    background: var(--primary);
    border-radius: 3px;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text3);
    margin-top: 4px;
    font-weight: 500;
}

/* =====================================================
   统计 Stat Cards
   ===================================================== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.info::before { background: var(--info); }
.stat-card.accent::before { background: var(--accent); }

.stat-card .label {
    color: var(--text3);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.5px;
}

.stat-card .change {
    font-size: 12px;
    color: var(--text3);
    margin-top: 8px;
    font-weight: 500;
}

/* =====================================================
   按钮 Button
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s var(--ease);
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1.4;
    background: var(--white);
    color: var(--text2);
    border-color: var(--border);
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg);
    border-color: var(--border-hover);
    color: var(--text);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.btn-success:hover { background: #000; border-color: #000; color: #fff; }

.btn-warning {
    background: var(--warning);
    color: #fff;
    border-color: var(--warning);
}

.btn-warning:hover { background: #000; border-color: #000; color: #fff; }

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

.btn-danger:hover { background: #000; border-color: #000; color: #fff; }

.btn-info {
    background: var(--info);
    color: #fff;
    border-color: var(--info);
}

.btn-info:hover { background: #000; border-color: #000; color: #fff; }

.btn-default {
    background: var(--white);
    color: var(--text2);
    border-color: var(--border);
}

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 5px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }

/* =====================================================
   表单 Form
   ===================================================== */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 13px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: all .2s var(--ease);
    font-family: var(--font);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(10,10,10,.06);
}

textarea.form-control { resize: vertical; min-height: 90px; }

.form-control[disabled],
.form-control[readonly] {
    background: var(--bg);
    color: var(--text3);
    cursor: not-allowed;
}

.form-hint {
    font-size: 12px;
    color: var(--text3);
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* =====================================================
   表格 Table
   ===================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--white);
}

.table th,
.table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table th {
    background: var(--bg-soft);
    font-weight: 800;
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
}

.table tbody tr:hover { background: var(--bg-soft); }

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text3);
    font-size: 13px;
}

/* =====================================================
   搜索栏 Search Bar
   ===================================================== */
.search-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.search-bar form { display: flex; gap: 10px; flex-wrap: wrap; }

/* =====================================================
   标签 Badge
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    background: var(--bg-soft);
    color: var(--text2);
    border: 1px solid var(--border);
}

.badge-success { background: var(--success-soft); color: #1C1C1C; border-color: #D1D1D6; }
.badge-warning { background: var(--warning-soft); color: #3A3A3A; border-color: #D1D1D6; }
.badge-danger { background: var(--danger-soft); color: #0A0A0A; border-color: #D1D1D6; }
.badge-info { background: var(--info-soft); color: #2A2A2A; border-color: #D1D1D6; }
.badge-default { background: var(--bg-soft); color: var(--text3); border-color: var(--border); }
.badge-accent { background: var(--accent-soft); color: var(--text); border-color: var(--border); }

/* =====================================================
   标签页 Tabs
   ===================================================== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.tabs a {
    padding: 10px 18px;
    color: var(--text3);
    font-weight: 700;
    font-size: 13px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all .2s;
}

.tabs a:hover { color: var(--text); }

.tabs a.active {
    color: var(--text);
    border-bottom-color: var(--primary);
}

/* =====================================================
   分页 Pagination
   ===================================================== */
.pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
    background: var(--white);
}

.pagination a:hover { background: var(--bg-soft); color: var(--text); }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* =====================================================
   提示 Alert
   ===================================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.alert-info { background: var(--bg-soft); color: var(--text2); border-color: var(--border); }
.alert-success { background: var(--success-soft); color: #1C1C1C; border-color: #D1D1D6; }
.alert-warning { background: var(--warning-soft); color: #3A3A3A; border-color: #D1D1D6; }
.alert-danger { background: var(--danger-soft); color: #0A0A0A; border-color: #D1D1D6; }

/* =====================================================
   菜单切换按钮
   ===================================================== */
.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-soft);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    margin-right: 12px;
    border-radius: var(--radius-sm);
}

.menu-toggle:hover { background: var(--border-light); }

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text2);
    border-radius: 2px;
    transition: all .25s var(--ease);
}

.menu-toggle span { position: relative; }
.menu-toggle span::before { content: ''; position: absolute; top: -6px; left: 0; }
.menu-toggle span::after { content: ''; position: absolute; top: 6px; left: 0; }

.menu-toggle.active span { background: transparent; }
.menu-toggle.active span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.active span::after { top: 0; transform: rotate(-45deg); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99;
}

.sidebar-overlay.active { display: block; }

/* =====================================================
   登录页 Login
   ===================================================== */
body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg);
    flex-direction: column;
}

body.login-page::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,0,0,.03), transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

body.login-page::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,0,0,.02), transparent 55%);
    border-radius: 50%;
    pointer-events: none;
}

.login-card {
    position: relative;
    z-index: 1;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 38px 34px 32px;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    animation: loginSlideUp .5s var(--ease) both;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.login-logo {
    text-align: center;
    margin-bottom: 26px;
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.login-logo small {
    font-size: 13px;
    color: var(--text3);
    font-weight: 500;
}

.login-logo .logo-icon {
    width: 52px;
    height: 52px;
    background: var(--primary);
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.login-logo h1 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.login-logo p,
.login-sub {
    font-size: 13px;
    color: var(--text3);
    font-weight: 500;
    text-align: center;
    margin-bottom: 22px;
}

body.login-page .tabs {
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    padding: 4px;
    border-bottom: none;
    margin-bottom: 22px;
}

body.login-page .tabs a {
    flex: 1;
    text-align: center;
    border-bottom: none;
    border-radius: 5px;
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text3);
}

body.login-page .tabs a.active {
    background: var(--white);
    color: var(--text);
    box-shadow: var(--shadow-xs);
    font-weight: 800;
}

.source-info {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 18px;
    font-size: 13px;
}

.source-info strong {
    color: var(--text);
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

.login-links a {
    font-size: 13px;
    font-weight: 600;
    color: var(--text3);
}

.login-links a:hover { color: var(--text); }

.login-announcements {
    margin-top: 18px;
    text-align: left;
}

/* =====================================================
   公告条/列表
   ===================================================== */
.announcement-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text2);
    text-align: center;
    font-weight: 600;
    width: 100%;
}

.announcement-bar + .announcement-bar { border-top: 1px solid var(--border-light); }

.announcement-bar.important {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: var(--border);
}

.announcement-bar.success {
    background: var(--success-soft);
    color: var(--success);
    border-color: var(--border);
}

.announcement-bar.info {
    background: var(--info-soft);
    color: var(--info);
    border-color: var(--border);
}

/* 公告弹窗（A1/3 同款，带"我知道了"） */
.aes-announcement-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.aes-announcement-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 520px;
    width: 100%;
    padding: 28px;
    text-align: center;
    animation: modalIn .35s var(--ease);
    position: relative;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.aes-announcement-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
    color: #fff;
}

.aes-announcement-info    .aes-announcement-icon { background: linear-gradient(135deg, #3a3a3a, #555); }
.aes-announcement-success .aes-announcement-icon { background: linear-gradient(135deg, #1a3a2a, #2a5a3a); }
.aes-announcement-warning .aes-announcement-icon { background: linear-gradient(135deg, #5a3a1a, #7a5a2a); }
.aes-announcement-danger  .aes-announcement-icon { background: linear-gradient(135deg, #5a1a1a, #7a2a2a); }

.aes-announcement-info    { border-top: 4px solid #555; }
.aes-announcement-success { border-top: 4px solid #2a5a3a; }
.aes-announcement-warning { border-top: 4px solid #7a5a2a; }
.aes-announcement-danger  { border-top: 4px solid #7a2a2a; }

.aes-announcement-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
    letter-spacing: -.3px;
}

.aes-announcement-content {
    font-size: 13.5px;
    color: var(--text2);
    line-height: 1.75;
    text-align: left;
    margin-bottom: 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.aes-announcement-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 8px 0;
}

.aes-announcement-content a {
    color: var(--primary);
    text-decoration: underline;
}

.aes-announcement-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 32px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: all .2s var(--ease);
    min-width: 140px;
}

.aes-announcement-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 480px) {
    .aes-announcement-overlay { padding: 16px; }
    .aes-announcement-modal { padding: 22px; max-width: 100%; }
}

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.announcement-item {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text2);
    line-height: 1.7;
}

.announcement-item strong {
    display: block;
    color: var(--text);
    font-weight: 800;
    margin-bottom: 4px;
}

/* =====================================================
   弹窗 Modal
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity .3s ease;
}

.modal-overlay.active { display: flex; opacity: 1; }

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    transform: translateY(12px);
    transition: transform .3s var(--ease);
}

.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 15px; font-weight: 800; color: var(--text); }

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text3);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.modal-close:hover { background: var(--bg-soft); color: var(--text); }

.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg-soft); display: flex; gap: 10px; justify-content: flex-end; }

/* =====================================================
   响应式 Responsive
   ===================================================== */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform .3s var(--ease);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0,0,0,.35);
    }

    .sidebar-overlay.active { display: block; }

    .main { margin-left: 0; }

    .topbar { padding: 12px 16px; }
    .content { padding: 16px; }

    .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card .value { font-size: 20px; }

    .card { padding: 18px; }

    .table th, .table td { padding: 10px 12px; font-size: 12px; }

    .form-row { grid-template-columns: 1fr; }

    .login-card { padding: 28px 22px 24px; }

    .search-bar { flex-direction: column; align-items: stretch; }
    .search-bar form { width: 100%; }
    .search-bar form .form-control { flex: 1; }
}

@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr; }
    .login-card { padding: 24px 20px 22px; }
}

/* =====================================================
   网格 Grid
   ===================================================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* =====================================================
   工具类 Utilities
   ===================================================== */
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-muted { color: var(--text3); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* =====================================================
   验证码表单组件样式
   ===================================================== */
.code-input-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.code-input-row .form-control {
    flex: 1;
    width: auto;
}
.btn-code {
    flex: 0 0 110px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.btn-code:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}
.btn-code:active:not(:disabled) {
    transform: translateY(0);
}
.btn-code:disabled {
    background: var(--bg3);
    color: var(--text3);
    cursor: not-allowed;
}
.input-icon-wrap {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text3);
    stroke-width: 1.5;
}
.input-icon-wrap .form-control {
    padding-left: 48px;
}
.form-control:focus + .input-icon,
.input-icon-wrap .form-control:focus ~ .input-icon {
    color: var(--primary);
}

/* =====================================================
   店铺页 Shop Page
   ===================================================== */
body.shop-page {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.shop-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.shop-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.shop-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.shop-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}

.shop-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.shop-meta {
    font-size: 12px;
    color: var(--text3);
    font-weight: 500;
}

.shop-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

.shop-main .hero {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.shop-main .hero h1 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 900;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -.5px;
}

.shop-main .hero p {
    font-size: 14px;
    color: var(--text2);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.shop-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    font-size: 13px;
    color: var(--text3);
    font-weight: 600;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
    display: flex;
    flex-direction: column;
}

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

.product-cover {
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: var(--bg-soft);
}

.product-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.product-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.65;
    margin-bottom: 16px;
    flex: 1;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -.5px;
}

.product-price small {
    font-size: 13px;
    font-weight: 700;
}

.shop-footer {
    text-align: center;
    padding: 24px;
    font-size: 12px;
    color: var(--text3);
    background: var(--white);
    border-top: 1px solid var(--border-light);
}

.become-merchant-bar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
    margin-top: 32px;
}

.become-merchant-bar strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.become-merchant-bar span {
    font-size: 13px;
    color: var(--text3);
    font-weight: 500;
}

/* =====================================================
   子链接落地页 Landing Page
   ===================================================== */
body.landing-page {
    background: var(--bg);
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.landing-card {
    width: 100%;
    max-width: 720px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-soft);
}

.landing-header .brand {
    font-size: 16px;
    font-weight: 900;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-header .brand small {
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    padding: 2px 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 100px;
}

.landing-header .user-bar {
    font-size: 13px;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-body {
    padding: 32px;
}

.landing-body .price {
    font-size: 32px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.landing-body .section {
    margin-bottom: 24px;
}

.landing-body .section h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.landing-body .section p {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.75;
}

.landing-body .actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.carousel {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
    background: var(--bg-soft);
}

.carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .5s ease;
}

.carousel img.active {
    opacity: 1;
}

.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.45);
    cursor: pointer;
    transition: all .2s;
}

.carousel-dots span.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

/* =====================================================
   源码市场 Source Market
   ===================================================== */
.source-market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.source-market-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
    display: flex;
    flex-direction: column;
}

.source-market-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.source-cover-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    background: var(--bg-soft);
    overflow: hidden;
}

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

.source-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
}

.source-owned-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.source-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.source-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.source-meta {
    font-size: 12px;
    color: var(--text3);
    font-weight: 500;
    margin-bottom: 10px;
}

.source-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.65;
    margin-bottom: 14px;
    flex: 1;
}

.source-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 14px;
}

.source-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.5px;
}

.source-price-unit {
    font-size: 12px;
    color: var(--text3);
    font-weight: 500;
}

.source-actions {
    margin-top: auto;
}

/* =====================================================
   工作台组件 Dashboard Components
   ===================================================== */
.hero-card {
    background: linear-gradient(135deg, #0A0A0A 0%, #1E1E1E 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,.08), transparent 60%);
    border-radius: 50%;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 22px;
    position: relative;
    z-index: 1;
}

.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    background: rgba(255,255,255,.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.1);
}

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

.hero-info h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -.3px;
}

.hero-info p {
    font-size: 13px;
    color: rgba(255,255,255,.65);
    margin-bottom: 16px;
    max-width: 520px;
}

.hero-link {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-link input {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    min-width: 260px;
    outline: none;
}

.hero-link input::placeholder { color: rgba(255,255,255,.4); }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.quick-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .2s var(--ease);
    text-decoration: none;
    color: inherit;
}

.quick-item:hover {
    background: var(--white);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.quick-text strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.quick-text span {
    font-size: 12px;
    color: var(--text3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    height: 180px;
    padding: 10px 4px 30px;
    position: relative;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 36px;
    height: 100%;
    position: relative;
}

.chart-bar-inner {
    width: 100%;
    max-width: 32px;
    background: linear-gradient(180deg, #0A0A0A 0%, #505058 100%);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    transition: height .6s var(--ease);
}

.chart-label {
    font-size: 11px;
    color: var(--text3);
    font-weight: 600;
    position: absolute;
    bottom: -22px;
}

.chart-value {
    font-size: 11px;
    color: var(--text2);
    font-weight: 700;
    margin-bottom: 2px;
}

@media (max-width: 640px) {
    .shop-header-inner { padding: 12px 16px; }
    .shop-main { padding: 20px 16px; }
    .shop-main .hero { padding: 32px 20px; }
    .product-grid { grid-template-columns: 1fr; }
    body.landing-page { padding: 0; }
    .landing-card { border-radius: 0; min-height: 100vh; }
    .landing-body { padding: 24px 20px; }
    .carousel { height: 200px; }
    .source-market-grid { grid-template-columns: 1fr; }
    .hero-content { flex-direction: column; align-items: flex-start; }
    .hero-link input { min-width: auto; width: 100%; }
    .quick-grid { grid-template-columns: 1fr; }
    .chart-wrap { height: 150px; }
}


