:root {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --card: rgba(255, 255, 255, 0.88);
    --card-strong: #ffffff;
    --text: #172033;
    --muted: #6f7b90;
    --line: rgba(148, 163, 184, 0.25);
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --cyan: #22d3ee;
    --green: #10b981;
    --danger: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

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

body {
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.45), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.28), transparent 28rem),
        linear-gradient(145deg, #07101f 0%, #111827 46%, #0f172a 100%);
    overflow-x: hidden;
    transition: background 0.35s ease, color 0.35s ease;
}

a {
    color: inherit;
}

.background-orb {
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(34px);
    opacity: 0.32;
    pointer-events: none;
    z-index: 0;
}

.orb-one {
    left: -120px;
    bottom: 12%;
    background: #6366f1;
}

.orb-two {
    right: -100px;
    top: 22%;
    background: #22d3ee;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 17, 31, 0.72);
    backdrop-filter: blur(18px);
}

.header-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #818cf8, #22d3ee);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.38);
    font-size: 22px;
}

.logo-text {
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.header-actions,
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-info {
    color: #e5e7eb;
}

.main {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 24px 72px;
}

.hero {
    margin: 0 auto 44px;
    padding: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
        rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    color: #fff;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #c7d2fe;
    font-size: 13px;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 20px auto 30px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.8;
}

.search-box {
    width: min(720px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.search-icon {
    padding-left: 12px;
    color: var(--primary);
    font-size: 26px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
}

.search-box button {
    border: none;
    border-radius: 16px;
    padding: 13px 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    font-weight: 700;
    cursor: pointer;
}

.category-section {
    margin-bottom: 38px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: #fff;
}

.category-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.category-title {
    font-size: 24px;
    font-weight: 800;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.nav-card-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    overflow: hidden;
}

.nav-card-wrap:hover {
    transform: translateY(-6px);
    background: var(--card-strong);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.28);
}

.nav-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.nav-card-wrap:hover .nav-card {
    background: var(--card-strong);
}

.nav-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(34, 211, 238, 0.18)),
        #f8fafc;
    color: var(--primary);
    font-size: 28px;
}

.nav-title {
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 800;
}

.nav-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 14px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28);
}

.btn-outline {
    color: var(--primary);
    border: 1.5px solid rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.12);
    font-weight: 600;
}
.btn-outline:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.7);
}

.btn-ghost {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 12px;
    border-radius: 11px;
    font-size: 13px;
}

.header-actions .btn-sm {
    min-height: 36px;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 900;
    white-space: nowrap;
}

.header-actions #loginBtn {
    min-width: 78px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.header-actions #manageBtn {
    min-width: 78px;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.22);
}

.header-actions #logoutBtn {
    color: #475569;
    background: #f8fafc;
    border-color: #dbe4ef;
}

.submit-site-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    bottom: max(24px, env(safe-area-inset-bottom) + 8px);
    z-index: 900;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    padding: 14px 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 16px 38px rgba(79, 70, 229, 0.32);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-site-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 46px rgba(79, 70, 229, 0.42);
}

.buy-ad-btn {
    bottom: 78px;
    bottom: max(78px, env(safe-area-inset-bottom) + 62px);
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

.customer-service-btn {
    bottom: 132px;
    bottom: max(132px, env(safe-area-inset-bottom) + 116px);
    background: linear-gradient(135deg, #10b981, #06b6d4);
    box-shadow: 0 16px 38px rgba(16, 185, 129, 0.28);
}

.public-articles-section {
    margin-top: 34px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.public-articles-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.public-articles-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: #6366f1;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.public-articles-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 26px;
}

.public-articles-head p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.public-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.public-article-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.public-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.public-article-cover {
    height: 128px;
    background-size: cover;
    background-position: center;
}

.public-article-cover-empty {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #eef2ff, #fce7f3);
    font-size: 42px;
}

.public-article-body {
    padding: 16px;
}

.public-article-body h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 17px;
}

.public-article-body p {
    min-height: 42px;
    margin: 0 0 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.public-article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #94a3b8;
    font-size: 12px;
}

.public-article-content {
    color: #334155;
    font-size: 15px;
    line-height: 1.9;
    white-space: normal;
}

.public-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.public-article-content a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
}

.home-anime .public-articles-section {
    border-color: rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.52);
    box-shadow: 0 20px 52px rgba(168, 85, 247, 0.14);
}

.home-anime .public-articles-kicker {
    color: #db2777;
}

.home-anime .public-articles-head h2 {
    color: #581c87;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
}

.status-pending {
    color: #92400e;
    background: #fef3c7;
}

.status-approved {
    color: #065f46;
    background: #d1fae5;
}

.status-rejected {
    color: #991b1b;
    background: #fee2e2;
}

.status-paid,
.status-completed,
.status-replied {
    color: #065f46;
    background: #d1fae5;
}

.status-closed {
    color: #334155;
    background: #e2e8f0;
}

/* 客服会话列表弹窗 */
.cs-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
}

.cs-panel {
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -20px 60px rgba(15, 23, 42, 0.3);
    animation: csSlideUp 0.25s ease;
}

@keyframes csSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cs-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.cs-header h3 {
    flex: 1;
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    font-weight: 800;
    text-align: center;
}

.cs-back,
.cs-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 18px;
    cursor: pointer;
}

.cs-close { font-size: 24px; }

.cs-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 16px;
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.cs-search-icon { font-size: 14px; color: #94a3b8; }

.cs-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.cs-search-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 10px;
    background: #6366f1;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cs-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 16px 20px;
    -webkit-overflow-scrolling: touch;
}

.cs-session-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cs-session-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.cs-session-item:hover { background: #f8fafc; }

.cs-session-item:active { background: #eef2ff; }

.cs-session-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 20px;
    overflow: hidden;
}

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

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

.cs-session-info strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
}

.cs-session-info p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-session-meta {
    flex: 0 0 auto;
    text-align: right;
}

.cs-session-meta small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
}

.cs-session-meta .cs-badge {
    display: inline-block;
    min-width: 18px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.customer-service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.customer-service-card {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 2px 10px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}

.customer-service-card span {
    grid-row: 1 / 3;
    align-self: center;
    font-size: 20px;
}

.customer-service-card strong {
    color: #334155;
    font-size: 12px;
}

.customer-service-card em {
    color: #0f172a;
    font-style: normal;
    font-weight: 800;
    word-break: break-all;
}

.customer-chat-init {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.status-active {
    background: #dcfce7;
    color: #166534;
}
.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* 常用语快捷回复 */
.quick-replies-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
.quick-reply-btn {
    padding: 5px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.quick-reply-btn:hover {
    background: #eef2ff;
    border-color: #6366f1;
    color: #4338ca;
}

.customer-chat-box {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.customer-chat-messages {
    height: 320px;
    overflow-y: auto;
    padding: 14px;
    background: linear-gradient(180deg, #f8fafc, #eef2ff);
}

.chat-message {
    display: flex;
    margin-bottom: 10px;
}

.chat-visitor {
    justify-content: flex-end;
}

.chat-admin,
.chat-system {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 78%;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    word-break: break-word;
}

.chat-visitor .chat-bubble {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.chat-system .chat-bubble {
    background: #e2e8f0;
    color: #475569;
}

.chat-bubble small {
    display: block;
    margin-top: 5px;
    opacity: 0.72;
    font-size: 11px;
}

.customer-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.customer-chat-form input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 12px;
    font: inherit;
}

.admin-chat-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    gap: 14px;
}

.admin-chat-sessions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 520px;
    overflow-y: auto;
}

.admin-chat-session {
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    cursor: pointer;
}

.admin-chat-session.active {
    border-color: #6366f1;
    background: #eef2ff;
}

.admin-chat-session strong,
.admin-chat-session span,
.admin-chat-session em,
.admin-chat-session small {
    display: block;
}

.admin-chat-session strong {
    color: #0f172a;
}

.admin-chat-session span,
.admin-chat-session small {
    color: #64748b;
    font-size: 12px;
}

.admin-chat-session em {
    margin: 6px 0;
    color: #334155;
    font-size: 13px;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-chat-panel {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.admin-chat-messages {
    height: 450px;
}

.data-table small {
    color: var(--muted);
    line-height: 1.7;
}

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

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

.settings-form textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.rich-editor-toolbar button,
.rich-editor-toolbar select,
.rich-editor-toolbar input[type="color"] {
    min-height: 36px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    padding: 7px 10px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.rich-editor-toolbar input[type="color"] {
    width: 44px;
    padding: 4px;
}

.rich-editor {
    min-height: 220px;
    padding: 14px 16px;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    line-height: 1.8;
    outline: none;
    overflow-y: auto;
}

.rich-editor:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
}

.rich-editor:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.rich-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.rich-editor a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: underline;
}

.settings-form {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #f8fafc;
}

.license-card {
    margin-bottom: 18px;
}

.auth-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.auth-overview h2 {
    margin: 10px 0 6px;
    color: #0f172a;
    font-size: 24px;
    font-weight: 900;
}

.auth-overview p {
    margin: 0;
    color: #475569;
    font-weight: 700;
    line-height: 1.7;
}

.auth-overview.auth-success {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
}

.auth-overview.auth-danger {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 100%);
}

.auth-overview.auth-warning {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.auth-section {
    margin-top: 14px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
}

.auth-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.auth-section-title h4 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
}

.auth-section-title span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.auth-config-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.license-raw {
    margin-top: 14px;
    padding: 16px;
    border-radius: 18px;
    background: #0f172a;
    color: #e5e7eb;
}

.license-raw label {
    display: block;
    margin-bottom: 8px;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 900;
}

.license-raw pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.7;
}

.auth-help {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #475569;
    line-height: 1.7;
}

.auth-help strong {
    color: #0f172a;
}

.auth-help code {
    padding: 2px 6px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #1e293b;
    font-weight: 800;
}

.update-dashboard {
    display: grid;
    gap: 16px;
}

.update-license-panel {
    margin-top: 0;
}

.license-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 18px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.license-status span {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 900;
}

.license-active span {
    color: #065f46;
    background: #d1fae5;
}

.license-expired span,
.license-invalid span {
    color: #991b1b;
    background: #fee2e2;
}

.license-missing span {
    color: #92400e;
    background: #fef3c7;
}

.license-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.license-grid div {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
}

.license-grid label {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.license-grid p {
    color: #0f172a;
    font-weight: 800;
    word-break: break-all;
}

.license-form textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    padding: 13px 15px;
    outline: none;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
}

.license-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.license-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(12px);
}
.modal-content {
    margin: 2rem auto;
}

.modal-content {
    width: min(520px, 100%);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.modal-large {
    width: min(1180px, 100%);
    max-height: 92vh;
    background: #ffffff;
    border: 1px solid #e6ebf3;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-large .modal-header {
    flex-shrink: 0;
    padding: 18px 28px;
    background: linear-gradient(120deg, #0f172a 0%, #1e293b 60%, #312e81 100%);
    border-bottom: none;
    color: #fff;
}

.modal-large .modal-header h2 {
    color: #fff;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.modal-large .modal-header h2::before {
    content: "◆";
    margin-right: 8px;
    color: #38bdf8;
    font-size: 16px;
}

.modal-large .modal-header p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
}

.modal-large .modal-header .modal-close {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.modal-large .modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.admin-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 6px;
    padding: 9px 10px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s ease;
}

.admin-menu-toggle:hover {
    background: linear-gradient(135deg, #e0e7ff, #f1f5f9);
    color: #1e293b;
}

.admin-menu-toggle .amt-icon {
    font-size: 16px;
    line-height: 1;
}

.modal-large.admin-menu-compact .modal-body {
    grid-template-columns: 72px minmax(0, 1fr);
}

.modal-large.admin-menu-compact .manage-tabs {
    padding: 16px 8px;
    gap: 8px;
}

.modal-large.admin-menu-compact .menu-group-title,
.modal-large.admin-menu-compact .admin-logout-btn {
    text-indent: -999px;
    overflow: hidden;
    white-space: nowrap;
    padding-left: 0;
    padding-right: 0;
    height: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-large.admin-menu-compact .menu-group-title::before,
.modal-large.admin-menu-compact .admin-logout-btn::before {
    text-indent: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    position: absolute;
}

.modal-large.admin-menu-compact .menu-group-title::after {
    display: none;
}

.modal-large.admin-menu-compact .menu-group-items {
    display: none;
}

.modal-large.admin-menu-compact .admin-menu-toggle {
    text-indent: 0;
    overflow: visible;
    position: relative;
    padding: 0;
    height: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
}

.modal-large.admin-menu-compact .admin-menu-toggle .amt-text {
    display: none;
}

.modal-large.admin-menu-compact .admin-menu-toggle .amt-icon {
    text-indent: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0 auto;
}

.modal-large.admin-menu-compact .tab-btn.active::after {
    display: none;
}

.modal-large .modal-body {
    flex: 1;
    min-height: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 220px 1fr;
    background: #f6f8fb;
    overflow: hidden;
}

.admin-standalone-page {
    min-height: 100vh;
}

.admin-console {
    width: 100%;
    min-height: 100vh;
    background: #f6f8fb;
}

.admin-panel-modal {
    position: static;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    background: #f6f8fb;
}

.admin-panel-modal .modal-content.modal-large {
    width: 100%;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.admin-panel-modal .modal-header {
    flex: 0 0 auto;
}

#adminLogoutBtn {
    color: #fff;
    border-color: rgba(255,255,255,.3);
    background: rgba(255,255,255,.12);
}

#adminLogoutBtn:hover {
    background: rgba(255,255,255,.22);
}

.popup-announcement-mask {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(8px);
}

.popup-announcement-card {
    position: relative;
    width: min(460px, 100%);
    padding: 28px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.35);
}

.popup-announcement-card h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 22px;
}

.popup-announcement-content {
    max-height: 48vh;
    overflow-y: auto;
    color: #475569;
    line-height: 1.75;
    font-size: 14px;
    white-space: normal;
}

.popup-announcement-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 22px;
    cursor: pointer;
}

.popup-announcement-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-large .manage-tabs {
    margin: 0;
    padding: 18px 12px;
    border-radius: 0;
    background: #ffffff;
    border-right: 1px solid #e6ebf3;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-y: auto;
}

.modal-large .menu-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 2px;
}

.modal-large .menu-group-title {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    padding: 11px 32px 11px 40px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    transition: all 0.18s ease;
    cursor: pointer;
}

.modal-large .menu-group-title::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    opacity: 1;
}

.modal-large .menu-group-title::after {
    content: "▸";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.modal-large .menu-group.expanded .menu-group-title::after {
    transform: translateY(-50%) rotate(90deg);
}

.modal-large .menu-group-items {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0 4px 8px;
}

.modal-large .menu-group.expanded .menu-group-items {
    display: flex;
}

.modal-large .menu-group-items .tab-btn,
.modal-large .admin-logout-btn {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    padding: 10px 14px 10px 36px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: transparent;
    box-shadow: none;
    border: none;
    position: relative;
    transition: all 0.18s ease;
    cursor: pointer;
}

.modal-large .menu-group-items .tab-btn::before,
.modal-large .admin-logout-btn::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    opacity: 1;
}

.modal-large .tab-btn[data-tab="admin-comments"]::before { content: "💬"; }
.modal-large .tab-btn[data-tab="admin-users"]::before { content: "👥"; }
.modal-large .tab-btn[data-tab="admin-logs"]::before { content: "📋"; }
.modal-large .tab-btn[data-tab="dashboard"]::before { content: "📊"; }
.modal-large .tab-btn[data-tab="categories"]::before { content: "📁"; }
.modal-large .tab-btn[data-tab="navs"]::before { content: "🔗"; }
.modal-large .tab-btn[data-tab="templates"]::before { content: "🎨"; }
.modal-large .tab-btn[data-tab="updates"]::before { content: "⚡"; }
.modal-large .tab-btn[data-tab="submissions"]::before { content: "📥"; }
.modal-large .tab-btn[data-tab="license"]::before { content: "🔐"; }
.modal-large .tab-btn[data-tab="email"]::before { content: "✉️"; }
.modal-large .tab-btn[data-tab="ad-prices"]::before { content: "💰"; }
.modal-large .tab-btn[data-tab="ad-links"]::before { content: "🔗"; }
.modal-large .tab-btn[data-tab="ads"]::before { content: "🛒"; }
.modal-large .tab-btn[data-tab="customerMessages"]::before { content: "💬"; }
.modal-large .tab-btn[data-tab="customerConfig"]::before { content: "🎧"; }
.modal-large .tab-btn[data-tab="groupChat"]::before { content: "👥"; }
.modal-large .tab-btn[data-tab="keywordConfig"]::before { content: "🔑"; }
.modal-large .tab-btn[data-tab="quickReplyConfig"]::before { content: "💬"; }
.modal-large .tab-btn[data-tab="payments"]::before { content: "💳"; }
.modal-large .tab-btn[data-tab="payConfig"]::before { content: "⚙️"; }
.modal-large .tab-btn[data-tab="siteSettings"]::before { content: "🧩"; }
.modal-large .tab-btn[data-tab="articles"]::before { content: "📝"; }
.modal-large .tab-btn[data-tab="announcement"]::before { content: "📢"; }
.modal-large .admin-logout-btn::before { content: "🚪"; }

.modal-large .menu-group[data-group="console"] .menu-group-title::before { content: "📊"; }
.modal-large .menu-group[data-group="users"] .menu-group-title::before { content: "👥"; }
.modal-large .menu-group[data-group="site"] .menu-group-title::before { content: "📁"; }
.modal-large .menu-group[data-group="ads"] .menu-group-title::before { content: "📢"; }
.modal-large .menu-group[data-group="payment"] .menu-group-title::before { content: "💰"; }
.modal-large .menu-group[data-group="service"] .menu-group-title::before { content: "💬"; }
.modal-large .menu-group[data-group="settings"] .menu-group-title::before { content: "🧩"; }

.modal-large .menu-group-items .tab-btn:hover,
.modal-large .admin-logout-btn:hover {
    background: #eef2ff;
    color: #1e293b;
}

.modal-large .admin-logout-btn {
    margin-top: 8px;
    border: 1px solid transparent;
    color: #dc2626;
    cursor: pointer;
}

.modal-large .admin-logout-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.modal-large .tab-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.35);
}

.modal-large .tab-btn.active::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.modal-large .tab-content {
    padding: 24px 28px 28px;
    overflow-y: auto;
    background: #f6f8fb;
    min-width: 0;
}

.modal-large .panel-toolbar {
    margin: -4px -4px 18px;
    padding: 16px 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 0 #e6ebf3, 0 8px 18px rgba(15, 23, 42, 0.04);
}

.modal-large .panel-toolbar h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-large .data-table {
    background: #fff;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 0 #e6ebf3, 0 8px 18px rgba(15, 23, 42, 0.04);
}

.modal-large .data-table th {
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e6ebf3;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.modal-large .data-table td {
    background: #fff;
    border: none;
    border-bottom: 1px solid #f0f3f8;
    border-radius: 0;
    padding: 14px;
    font-size: 13.5px;
}

.modal-large .data-table td:first-child,
.modal-large .data-table td:last-child {
    border-radius: 0;
}

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

.modal-large .data-table tbody tr:hover td {
    background: #f8fafc;
}

.modal-large .settings-form,
.modal-large .license-card,
.modal-large .license-form,
.modal-large .update-card,
.modal-large .version-card,
.modal-large .empty-state,
.modal-large .error-card,
.modal-large .success-card {
    background: #fff;
    border: 1px solid #e6ebf3;
    box-shadow: 0 1px 0 #e6ebf3, 0 8px 18px rgba(15, 23, 42, 0.04);
}

@media (max-width: 760px) {
    .modal {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
        background: rgba(15, 23, 42, 0.72);
    }

    /* 普通弹窗（非大型管理面板）的手机适配 */
    .modal-content:not(.modal-large) {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border: none;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        background: #fff;
    }

    .modal-content:not(.modal-large) .modal-header {
        flex-shrink: 0;
        padding: 14px 18px;
        gap: 12px;
        align-items: center;
    }

    .modal-content:not(.modal-large) .modal-header h3 {
        font-size: 17px;
    }

    .modal-content:not(.modal-large) .modal-header p {
        font-size: 12px;
        margin-top: 3px;
    }

    .modal-content:not(.modal-large) .modal-close {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        font-size: 22px;
        border-radius: 10px;
    }

    .modal-content:not(.modal-large) .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 18px 18px 24px;
    }

    .modal-content:not(.modal-large) .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .modal-content:not(.modal-large) .form-group input,
    .modal-content:not(.modal-large) .form-group select {
        padding: 12px 14px;
        font-size: 15px;
        min-height: 48px;
        border-radius: 12px;
    }

    .modal-content:not(.modal-large) .form-group {
        margin-bottom: 14px;
    }

    .modal-content:not(.modal-large) button[type="submit"] {
        width: 100%;
        padding: 14px;
        font-size: 15px;
        min-height: 48px;
        border-radius: 12px;
        margin-top: 4px;
    }

    .modal-content.modal-large,
    .modal-large {
        width: 100%;
        height: 100dvh;
        max-height: none;
        border: none;
        border-radius: 0;
    }

    .modal-large .modal-header {
        align-items: center;
        gap: 8px;
        padding: 10px 12px 10px 14px;
        background: linear-gradient(120deg, #0f172a 0%, #1e293b 65%, #312e81 100%);
    }

    .modal-large .modal-header > div {
        min-width: 0;
        flex: 1 1 auto;
    }

    .modal-large .modal-header h2 {
        font-size: 16px;
        line-height: 1.2;
    }

    .modal-large .modal-header h2::before {
        margin-right: 6px;
        font-size: 12px;
    }

    .modal-large .modal-header p {
        display: none;
    }

    .modal-large .modal-header .modal-close {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        border-radius: 12px;
        font-size: 20px;
    }

    .modal-large .modal-body {
        height: calc(100dvh - 76px);
        display: grid;
        grid-template-columns: 160px minmax(0, 1fr);
        overflow: hidden;
        background: #f6f8fb;
    }

    .modal-large.admin-menu-compact .modal-body {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .modal-large .manage-tabs {
        z-index: 5;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 6px;
        margin: 0;
        padding: 12px 8px;
        border-right: 1px solid #e6ebf3;
        border-bottom: none;
        background: rgba(255, 255, 255, 0.96);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .modal-large .admin-menu-toggle {
        min-height: 40px;
        margin-bottom: 4px;
        padding: 8px 6px;
        border-radius: 11px;
        font-size: 12px;
    }

    .modal-large .manage-tabs::-webkit-scrollbar {
        display: none;
    }

    .modal-large .manage-tabs::before {
        display: none;
    }

    .modal-large .menu-group {
        display: flex;
        flex-direction: column;
        margin-bottom: 1px;
    }

    .modal-large .menu-group-title {
        width: 100%;
        text-align: left;
        border-radius: 8px;
        padding: 9px 20px 9px 32px;
        font-size: 12px;
        font-weight: 700;
        color: #334155;
        background: transparent;
        border: none;
        position: relative;
        cursor: pointer;
        transition: background 0.15s;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 36px;
        display: flex;
        align-items: center;
    }

    .modal-large .menu-group-title::before {
        left: 10px;
        font-size: 13px;
        width: 16px;
        height: 16px;
    }

    .modal-large .menu-group-title::after {
        right: 6px;
        font-size: 10px;
        color: #94a3b8;
    }

    .modal-large .menu-group.expanded .menu-group-title::after {
        transform: translateY(-50%) rotate(90deg);
    }

    .modal-large .menu-group-items {
        display: none;
        flex-direction: column;
        gap: 2px;
        padding: 2px 0 2px 4px;
    }

    .modal-large .menu-group.expanded .menu-group-items {
        display: flex;
    }

    .modal-large .menu-group-items .tab-btn {
        width: 100%;
        text-align: left;
        border-radius: 8px;
        padding: 8px 6px 8px 30px;
        font-size: 11.5px;
        font-weight: 600;
        color: #475569;
        background: transparent;
        border: none;
        position: relative;
        cursor: pointer;
        transition: all 0.15s;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 34px;
        display: flex;
        align-items: center;
    }

    .modal-large .menu-group-items .tab-btn::before {
        left: 9px;
        font-size: 12px;
        width: 14px;
        height: 14px;
    }

    .modal-large .menu-group-items .tab-btn.active {
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        color: #fff;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }

    .modal-large .menu-group-items .tab-btn.active::after {
        display: none;
    }

    .modal-large .menu-group-items .tab-btn:hover {
        background: #eef2ff;
        color: #1e293b;
    }

    .modal-large .admin-logout-btn {
        margin-top: auto;
        border-radius: 8px;
        padding: 9px 8px 9px 34px;
        font-size: 12px;
        font-weight: 600;
        color: #dc2626;
        background: #fff7f7;
        border: 1px solid #fee2e2;
        cursor: pointer;
        position: relative;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 36px;
        display: flex;
        align-items: center;
    }

    .modal-large .admin-logout-btn::before {
        left: 10px;
        font-size: 13px;
    }

    .modal-large.admin-menu-compact .admin-menu-toggle,
    .modal-large.admin-menu-compact .menu-group-title,
    .modal-large.admin-menu-compact .admin-logout-btn {
        text-indent: -999px;
        overflow: hidden;
        white-space: nowrap;
        padding: 0;
        height: 38px;
        min-height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        margin: 0;
    }

    .modal-large.admin-menu-compact .menu-group-title::before,
    .modal-large.admin-menu-compact .admin-logout-btn::before {
        text-indent: 0;
        font-size: 18px;
        position: static;
        transform: none;
        left: auto;
        top: auto;
    }

    .modal-large.admin-menu-compact .menu-group-title::after {
        display: none;
    }

    .modal-large.admin-menu-compact .menu-group-items {
        display: none !important;
    }

    .modal-large.admin-menu-compact .admin-menu-toggle .amt-icon {
        text-indent: 0;
        font-size: 16px;
    }

    .modal-large .tab-content {
        min-height: 0;
        padding: 14px 12px 90px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #f6f8fb;
    }

    .modal-large .panel-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin: 0 0 12px;
        padding: 14px;
        border-radius: 16px;
    }

    .modal-large .panel-toolbar h3 {
        font-size: 16px;
    }

    .modal-large .panel-toolbar p {
        font-size: 12px;
        line-height: 1.45;
    }

    .modal-large .panel-toolbar .btn,
    .modal-large .panel-toolbar button {
        width: 100%;
        justify-content: center;
    }

    .modal-large .data-table {
        display: block;
        width: 100%;
        min-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        border-radius: 14px;
    }

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

    .modal-large .data-table th {
        min-width: 72px;
    }

    .modal-large .settings-form,
    .modal-large .license-card,
    .modal-large .license-form,
    .modal-large .update-card,
    .modal-large .version-card,
    .modal-large .empty-state,
    .modal-large .error-card,
    .modal-large .success-card {
        border-radius: 16px;
        padding: 14px;
    }

    .modal-large .dashboard {
        gap: 14px;
    }

    .modal-large .dashboard-hero {
        padding: 16px;
        border-radius: 18px;
    }

    .modal-large .dashboard-hero h3 {
        font-size: 20px;
    }

    .modal-large .dashboard-hero p {
        font-size: 12px;
    }

    .modal-large .dashboard-hero-meta {
        gap: 6px;
    }

    .modal-large .stat-grid,
    .modal-large .dashboard-grid,
    .modal-large .runtime-grid,
    .modal-large .template-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modal-large .admin-chat-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 10px;
    }

    .modal-large .admin-chat-sessions {
        max-height: 200px;
        min-height: auto;
        overflow-y: auto;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .modal-large .admin-chat-sessions::-webkit-scrollbar {
        display: none;
    }

    .modal-large .admin-chat-session {
        flex: 0 0 auto;
        min-width: 140px;
        max-width: 180px;
        padding: 10px;
        border-radius: 12px;
    }

    .modal-large .admin-chat-session strong {
        font-size: 13px;
    }

    .modal-large .admin-chat-session span,
    .modal-large .admin-chat-session small {
        font-size: 11px;
    }

    .modal-large .admin-chat-session em {
        font-size: 12px;
        margin: 4px 0;
    }

    .modal-large .admin-chat-panel {
        max-height: none;
        min-height: auto;
        border-radius: 14px;
    }

    .modal-large .admin-chat-messages {
        height: 280px;
        padding: 10px;
    }

    .modal-large .chat-bubble {
        max-width: 85%;
        padding: 8px 10px;
        border-radius: 12px;
        font-size: 13px;
    }

    .modal-large .customer-chat-form {
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px;
    }

    .modal-large .customer-chat-form input {
        width: 100%;
        flex: none;
        padding: 8px 10px;
        font-size: 13px;
    }

    .modal-large .customer-chat-form .btn {
        flex: 1;
        min-height: 36px;
        font-size: 12px;
        padding: 6px 8px;
    }
}

@media (max-width: 760px) {
    .modal-large .dashboard,
    .modal-large .dashboard-hero,
    .modal-large .stat-grid,
    .modal-large .stat-card,
    .modal-large .dashboard-grid,
    .modal-large .dashboard-panel,
    .modal-large .link-check-panel,
    .modal-large .link-check-result,
    .modal-large .link-check-summary {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .modal-large .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .modal-large .dashboard-hero-meta {
        width: 100%;
    }

    .modal-large .hero-chip {
        flex: 1 1 100%;
        justify-content: center;
    }

    .modal-large .stat-card {
        min-width: 0;
        padding: 14px;
    }

    .modal-large .stat-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 20px;
    }

    .modal-large .stat-value {
        font-size: 24px;
    }

    .modal-large .dashboard-panel {
        padding: 14px;
    }

    .link-check-summary {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 760px) {
    .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 2px;
    }

    .header-actions .btn-sm {
        width: 100%;
        min-height: 42px;
        justify-content: center;
        padding: 10px 12px;
        border-radius: 14px;
        font-size: 14px;
    }

    .header-actions #loginBtn {
        min-height: 44px;
        font-size: 15px;
        letter-spacing: 0.03em;
    }

    .header-actions #loginBtn::before {
        content: "🔐";
        margin-right: 6px;
    }

    .header-actions #manageBtn::before {
        content: "⚙️";
        margin-right: 6px;
    }

    .header-actions #logoutBtn::before {
        content: "↩";
        margin-right: 6px;
    }

    .header-actions .user-info {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 8px 8px 8px 14px;
        border: 1px solid #dbe4ef;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.82);
    }

    .header-actions #userName {
        min-width: 0;
        overflow: hidden;
        color: #334155;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-actions .user-info #logoutBtn {
        width: auto;
        min-width: 76px;
        min-height: 36px;
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 760px) {
    .business-header {
        width: min(100% - 28px, 1180px);
        margin-top: 18px;
        padding: 18px;
        align-items: flex-start;
        gap: 14px;
        border-radius: 24px;
    }

    .business-brand {
        width: 100%;
    }

    .business-brand > div {
        min-width: 0;
    }

    .business-brand strong,
    .business-brand small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .modal-large .modal-body {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .modal-large.admin-menu-compact .modal-body {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .modal-large .manage-tabs {
        padding: 10px 6px;
        gap: 5px;
    }

    .modal-large .tab-btn,
    .modal-large .admin-logout-btn {
        min-height: 42px;
        padding: 7px 6px 7px 30px;
        font-size: 11px;
        border-radius: 10px;
    }

    .modal-large .tab-btn::before,
    .modal-large .admin-logout-btn::before {
        left: 8px;
        font-size: 13px;
    }

    .modal-large .tab-content {
        padding: 12px 10px 84px;
    }

}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.modal-header h2,
.modal-header h3 {
    color: #0f172a;
    font-size: 22px;
}

.modal-header p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.modal-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 26px 28px 30px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.manage-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    padding: 6px;
    border-radius: 18px;
    background: #f1f5f9;
}

.tab-btn {
    border: none;
    border-radius: 14px;
    padding: 10px 16px;
    color: #64748b;
    background: transparent;
    font-weight: 800;
    cursor: pointer;
}

.tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.26);
}

.panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-toolbar h3 {
    color: #0f172a;
    font-size: 18px;
}

.panel-toolbar p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.data-table th {
    padding: 0 14px 8px;
    color: #64748b;
    font-size: 12px;
    text-align: left;
}

.data-table td {
    padding: 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 14px;
}

.data-table td:first-child {
    border-left: 1px solid #e2e8f0;
    border-radius: 14px 0 0 14px;
}

.data-table td:last-child {
    border-right: 1px solid #e2e8f0;
    border-radius: 0 14px 14px 0;
    white-space: nowrap;
}

.table-icon {
    font-size: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.form-group input,
.form-group select {
    width: 100%;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    padding: 13px 15px;
    outline: none;
    background: #f8fafc;
    color: #0f172a;
    font-size: 15px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.update-card,
.version-card,
.changelog,
.empty-state,
.error-card,
.success-card {
    border-radius: 22px;
    padding: 20px;
}

.update-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #eef2ff, #ecfeff);
    border: 1px solid #dbeafe;
}

.update-card-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.update-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    color: #fff;
    font-size: 28px;
}

.update-card h3,
.version-card h3 {
    margin-bottom: 6px;
    color: #0f172a;
}

.update-card p,
.version-card p,
.changelog p {
    color: var(--muted);
    line-height: 1.7;
}

.version-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.version-card.has-update {
    border-color: rgba(16, 185, 129, 0.36);
    background: linear-gradient(135deg, #ecfdf5, #f8fafc);
}

.version-label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #047857;
    background: #d1fae5;
    font-size: 12px;
    font-weight: 800;
}

.changelog {
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.changelog h4 {
    margin-bottom: 8px;
}

.empty-state {
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.error-card {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.success-card {
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.update-link {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

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

.template-card {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #f8fafc;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.template-card.active {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 14px 34px rgba(99, 102, 241, 0.18);
}

.template-card:hover {
    transform: translateY(-3px);
}

.template-preview {
    height: 138px;
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
    padding: 16px;
    border-radius: 18px;
    overflow: hidden;
}

.template-preview span {
    display: block;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
}

.template-preview-default {
    background: linear-gradient(135deg, #6366f1, #22d3ee);
}

.template-preview-default span:first-child {
    width: 78%;
}

.template-preview-minimal {
    background: linear-gradient(135deg, #111827, #334155);
}

.template-preview-minimal span:first-child {
    width: 92%;
    height: 34px;
    margin-top: 22px;
}

.template-preview-dashboard {
    grid-template-columns: 0.7fr 1.4fr;
    background: linear-gradient(135deg, #0f172a, #312e81);
}

.template-preview-dashboard span:first-child {
    grid-row: span 3;
}

.template-preview-anime {
    background:
        radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.9), transparent 0.45rem),
        radial-gradient(circle at 72% 34%, rgba(255, 255, 255, 0.8), transparent 0.38rem),
        linear-gradient(135deg, #fb7185, #c084fc 52%, #60a5fa);
}

.template-preview-anime span {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.22);
}

.template-preview-anime span:first-child {
    width: 68%;
    height: 44px;
    border-radius: 999px;
}

.link-check-panel {
    margin-top: 18px;
}

.link-check-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.link-check-stat {
    padding: 16px;
    border: 1px solid #e6ebf3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 0 #e6ebf3, 0 8px 18px rgba(15, 23, 42, 0.04);
}

.link-check-stat strong {
    display: block;
    color: #0f172a;
    font-size: 26px;
    line-height: 1;
}

.link-check-stat span {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.link-check-stat.ok strong { color: #047857; }
.link-check-stat.bad strong { color: #dc2626; }

.link-check-table a {
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    color: #2563eb;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.template-preview-business {
    grid-template-columns: 1fr 1.2fr;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.template-preview-business span {
    background: rgba(250, 204, 21, 0.72);
}

.template-preview-business span:first-child {
    grid-row: span 3;
    background: rgba(255, 255, 255, 0.78);
}

.template-preview-fresh {
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.92), transparent 0.5rem),
        linear-gradient(135deg, #bbf7d0, #a7f3d0 46%, #e0f2fe);
}

.template-preview-fresh span {
    background: rgba(255, 255, 255, 0.82);
}

.template-preview-fresh span:first-child {
    width: 74%;
    border-radius: 999px;
}

.template-info h4 {
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 16px;
}

.template-info p {
    min-height: 44px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.home-minimal {
    background:
        radial-gradient(circle at 50% -10%, rgba(99, 102, 241, 0.36), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.minimal-glow {
    position: fixed;
    inset: 18% auto auto 50%;
    width: 520px;
    height: 520px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    filter: blur(42px);
    pointer-events: none;
}

.header-floating {
    width: min(1120px, calc(100% - 36px));
    margin: 18px auto 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
}

.minimal-main {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100% - 36px));
    margin: 0 auto;
    padding: 76px 0 72px;
}

.minimal-hero {
    max-width: 820px;
    margin: 0 auto 54px;
    text-align: center;
    color: #fff;
}

.minimal-kicker {
    margin-bottom: 14px;
    color: #67e8f9;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2em;
}

.minimal-hero h1 {
    font-size: clamp(42px, 8vw, 82px);
    line-height: 1;
    letter-spacing: -0.07em;
}

.minimal-hero > p {
    max-width: 620px;
    margin: 20px auto 30px;
    color: #cbd5e1;
    line-height: 1.8;
}

.minimal-search {
    border-radius: 999px;
}

.minimal-category {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
}

.minimal-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.minimal-card {
    min-height: 96px;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.minimal-card .nav-title {
    color: #fff;
}

.minimal-card .nav-desc {
    color: #cbd5e1;
}

.home-dashboard {
    background: #e5edf7;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 100vh;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px;
    color: #fff;
    background:
        radial-gradient(circle at top, rgba(34, 211, 238, 0.24), transparent 18rem),
        linear-gradient(180deg, #0f172a, #111827);
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
}

.dashboard-brand strong,
.dashboard-brand small {
    display: block;
}

.dashboard-brand small,
.dashboard-search-note p {
    color: #cbd5e1;
}

.dashboard-search-note {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-search-note span {
    color: #67e8f9;
    font-size: 26px;
}

.dashboard-actions {
    display: grid;
    gap: 12px;
}

.dashboard-main {
    padding: 34px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: end;
    margin-bottom: 28px;
    padding: 32px;
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.dashboard-hero h1 {
    color: #0f172a;
    font-size: clamp(36px, 5vw, 58px);
    letter-spacing: -0.06em;
}

.dashboard-hero p:not(.minimal-kicker) {
    max-width: 560px;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.8;
}

.dashboard-search {
    margin: 0;
    background: #f8fafc;
    box-shadow: none;
}

.dashboard-category {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.dashboard-category .category-title {
    color: #0f172a;
}

.dashboard-category .category-icon {
    background: #eef2ff;
    color: var(--primary);
}

.dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.dashboard-card {
    min-height: 104px;
    background: #f8fafc;
    box-shadow: none;
}

.home-anime {
    min-height: 100vh;
    color: #4a254f;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.78), transparent 0.7rem),
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.72), transparent 0.6rem),
        radial-gradient(circle at 20% 82%, rgba(253, 186, 116, 0.32), transparent 24rem),
        linear-gradient(135deg, #ffe4f1 0%, #f6d7ff 42%, #dbeafe 100%);
}

.anime-sky {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.anime-star {
    position: absolute;
    color: rgba(236, 72, 153, 0.65);
    font-size: 42px;
    text-shadow: 0 8px 28px rgba(236, 72, 153, 0.35);
}

.star-one {
    left: 9%;
    top: 18%;
}

.star-two {
    right: 13%;
    top: 24%;
    color: rgba(124, 58, 237, 0.55);
}

.star-three {
    right: 20%;
    bottom: 18%;
    color: rgba(244, 114, 182, 0.6);
}

.anime-bubble {
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.62);
    filter: blur(0.2px);
}

.bubble-one {
    width: 220px;
    height: 220px;
    left: -70px;
    bottom: 16%;
}

.bubble-two {
    width: 300px;
    height: 300px;
    right: -100px;
    top: 34%;
}

.anime-header {
    position: relative;
    z-index: 2;
    width: min(1160px, calc(100% - 36px));
    margin: 18px auto 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.46);
    box-shadow: 0 20px 60px rgba(236, 72, 153, 0.16);
    backdrop-filter: blur(18px);
}

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

.anime-logo-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #fb7185, #a855f7);
    box-shadow: 0 12px 28px rgba(236, 72, 153, 0.32);
    font-size: 26px;
}

.anime-logo strong,
.anime-logo small {
    display: block;
}

.anime-logo strong {
    color: #4a254f;
    font-size: 20px;
}

.anime-logo small {
    color: rgba(74, 37, 79, 0.68);
}

.anime-main {
    position: relative;
    z-index: 1;
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
    padding: 56px 0 78px;
}

.anime-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: center;
    margin-bottom: 38px;
    padding: 42px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 38px;
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 28px 76px rgba(168, 85, 247, 0.18);
    backdrop-filter: blur(20px);
}

.anime-kicker {
    margin-bottom: 14px;
    color: #db2777;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.anime-hero h1 {
    color: #4c1d95;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.03;
    letter-spacing: -0.06em;
}

.anime-hero-copy > p:not(.anime-kicker) {
    max-width: 640px;
    margin: 20px 0 28px;
    color: rgba(74, 37, 79, 0.72);
    font-size: 16px;
    line-height: 1.8;
}

.anime-search {
    margin: 0;
    border-color: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 40px rgba(236, 72, 153, 0.16);
}

.anime-search button {
    background: linear-gradient(135deg, #fb7185, #a855f7);
}

.anime-character-card {
    min-height: 300px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 18px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 34px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.76), transparent 12rem),
        linear-gradient(160deg, rgba(251, 113, 133, 0.24), rgba(168, 85, 247, 0.22));
}

.anime-face {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 44% 44% 50% 50%;
    background: linear-gradient(145deg, #fff7ed, #ffe4e6);
    box-shadow: inset 0 -10px 22px rgba(251, 113, 133, 0.18), 0 24px 42px rgba(168, 85, 247, 0.18);
}

.anime-face::before,
.anime-face::after {
    content: "";
    position: absolute;
    top: -24px;
    width: 62px;
    height: 62px;
    border-radius: 18px 18px 8px 18px;
    background: #ffe4e6;
}

.anime-face::before {
    left: 18px;
    transform: rotate(28deg);
}

.anime-face::after {
    right: 18px;
    transform: rotate(62deg);
}

.eye {
    position: absolute;
    top: 68px;
    width: 18px;
    height: 28px;
    border-radius: 999px;
    background: #4c1d95;
}

.left-eye {
    left: 48px;
}

.right-eye {
    right: 48px;
}

.mouth {
    position: absolute;
    left: 50%;
    bottom: 46px;
    width: 34px;
    height: 18px;
    border-bottom: 4px solid #fb7185;
    border-radius: 0 0 999px 999px;
    transform: translateX(-50%);
}

.anime-character-card p {
    color: #7e22ce;
    font-weight: 900;
}

.anime-category {
    margin-bottom: 26px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.44);
    box-shadow: 0 20px 48px rgba(236, 72, 153, 0.12);
    backdrop-filter: blur(16px);
}

.anime-category-header .category-title {
    color: #5b21b6;
}

.anime-category-header .category-icon {
    background: rgba(255, 255, 255, 0.64);
    border-color: rgba(255, 255, 255, 0.72);
}

.anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.anime-card {
    min-height: 112px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 34px rgba(168, 85, 247, 0.14);
}

.anime-card:hover {
    box-shadow: 0 24px 46px rgba(236, 72, 153, 0.22);
}

.anime-card .nav-icon {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.18), rgba(168, 85, 247, 0.18));
}

.anime-card .nav-title {
    color: #581c87;
}

.nav-speed-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .16);
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.nav-speed-badge.speed-ok {
    background: rgba(16,185,129,.14);
    color: #047857;
}

.nav-speed-badge.speed-error {
    background: rgba(239,68,68,.13);
    color: #dc2626;
}

.home-business {
    min-height: 100vh;
    color: #172033;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.business-header {
    width: min(1180px, calc(100% - 40px));
    margin: 22px auto 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #dbe4ef;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.business-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.business-logo-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fef3c7;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(30, 64, 175, 0.22);
}

.business-brand strong,
.business-brand small {
    display: block;
}

.business-brand strong {
    color: #0f172a;
    font-size: 20px;
}

.business-brand small {
    color: #64748b;
}

.business-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.business-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 28px;
    padding: 38px;
    border-radius: 28px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92)),
        #0f172a;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.business-kicker {
    margin-bottom: 14px;
    color: #fde68a;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.business-hero h1 {
    max-width: 720px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.business-hero p:not(.business-kicker) {
    max-width: 660px;
    margin-top: 18px;
    color: #cbd5e1;
    line-height: 1.8;
}

.business-search-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
}

.business-search-panel label {
    color: #fde68a;
    font-size: 13px;
    font-weight: 900;
}

.business-search {
    margin: 0;
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
}

.business-search button {
    background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

.business-category {
    margin-bottom: 24px;
    padding: 26px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.business-category-header {
    align-items: flex-start;
}

.business-category-header .category-title {
    color: #0f172a;
}

.business-category-header p {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.business-category-header .category-icon {
    background: #eff6ff;
    color: #1d4ed8;
}

.business-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.business-card {
    min-height: 108px;
    border-color: #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
    box-shadow: none;
}

.business-card:hover {
    box-shadow: 0 18px 38px rgba(30, 64, 175, 0.14);
}

.business-card .nav-icon {
    border-radius: 16px;
    background: #e0ecff;
}

.home-fresh {
    min-height: 100vh;
    color: #164e3f;
    background:
        radial-gradient(circle at 8% 20%, rgba(255, 255, 255, 0.72), transparent 16rem),
        radial-gradient(circle at 90% 12%, rgba(187, 247, 208, 0.42), transparent 24rem),
        linear-gradient(135deg, #f0fdf4 0%, #dcfce7 46%, #ecfeff 100%);
}

.fresh-leaf {
    position: fixed;
    z-index: 0;
    width: 260px;
    height: 160px;
    border-radius: 80% 20% 70% 30%;
    background: rgba(34, 197, 94, 0.12);
    pointer-events: none;
}

.leaf-one {
    left: -80px;
    top: 18%;
    transform: rotate(-18deg);
}

.leaf-two {
    right: -90px;
    bottom: 18%;
    transform: rotate(24deg);
}

.fresh-header {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 36px));
    margin: 18px auto 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 18px 46px rgba(21, 128, 61, 0.12);
    backdrop-filter: blur(18px);
}

.fresh-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fresh-logo-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #14b8a6);
    box-shadow: 0 12px 26px rgba(20, 184, 166, 0.24);
    font-size: 22px;
}

.fresh-brand strong,
.fresh-brand small {
    display: block;
}

.fresh-brand strong {
    color: #14532d;
    font-size: 20px;
}

.fresh-brand small {
    color: #4d7c65;
}

.fresh-main {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    padding: 64px 0 78px;
}

.fresh-hero {
    max-width: 900px;
    margin: 0 auto 44px;
    text-align: center;
}

.fresh-kicker {
    margin-bottom: 14px;
    color: #059669;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.fresh-hero h1 {
    color: #14532d;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.fresh-hero > p {
    max-width: 620px;
    margin: 18px auto 28px;
    color: #4d7c65;
    line-height: 1.8;
}

.fresh-search {
    border-color: rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 18px 42px rgba(20, 184, 166, 0.14);
}

.fresh-search button {
    background: linear-gradient(135deg, #22c55e, #14b8a6);
}

.fresh-category {
    margin-bottom: 26px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 16px 42px rgba(21, 128, 61, 0.1);
    backdrop-filter: blur(16px);
}

.fresh-category-header .category-title {
    color: #14532d;
}

.fresh-category-header .category-icon {
    background: rgba(255, 255, 255, 0.74);
    color: #16a34a;
}

.fresh-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.fresh-card {
    min-height: 106px;
    border: 1px solid rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 14px 30px rgba(20, 184, 166, 0.1);
}

.fresh-card:hover {
    box-shadow: 0 22px 44px rgba(21, 128, 61, 0.14);
}

.fresh-card .nav-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(20, 184, 166, 0.16));
}

.fresh-card .nav-title {
    color: #14532d;
}

.install-page,
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.install-container,
.login-container {
    width: min(430px, 100%);
}

.install-container {
    width: min(760px, 100%);
}

.install-box,
.login-box {
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.install-header,
.login-header {
    margin-bottom: 28px;
    text-align: center;
}

.install-header .logo,
.login-header .logo {
    display: inline-flex;
    width: 72px;
    height: 72px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    color: #fff;
    font-size: 34px;
}

.install-header h1,
.login-header h1 {
    color: #0f172a;
    font-size: 30px;
}

.install-header p,
.login-header p,
.login-footer a {
    color: var(--muted);
}

.install-form {
    display: grid;
    gap: 14px;
}

.install-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    color: #4338ca;
    font-size: 14px;
    font-weight: 900;
}

.install-step-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.install-form small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.install-form code {
    padding: 2px 5px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4338ca;
}

.install-success-panel {
    padding: 8px 0 0;
    text-align: center;
}

.success-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981, #22c55e);
    color: #fff;
    font-size: 42px;
    font-weight: 900;
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.28);
}

.install-success-panel h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 24px;
}

.install-complete-tip {
    margin: 0 0 16px;
    color: #64748b;
}

.install-info-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    text-align: left;
}

.install-info-list div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.install-info-list span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.install-info-list strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #0f172a;
    font-size: 14px;
}

.install-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.install-actions .btn {
    justify-content: center;
    text-decoration: none;
}

.error-message {
    min-height: 22px;
    margin-bottom: 12px;
    color: var(--danger);
    font-size: 14px;
}

.login-footer {
    margin-top: 18px;
    text-align: center;
}

@media (max-width: 760px) {
    .install-page {
        padding: 14px;
        align-items: flex-start;
    }

    .install-box {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .install-info-list div,
    .install-actions {
        grid-template-columns: 1fr;
    }

    .header-content,
    .panel-toolbar,
    .update-card,
    .version-card,
    .dashboard-hero,
    .anime-hero,
    .business-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .hero {
        padding: 30px 20px;
        border-radius: 26px;
    }

    .search-box {
        align-items: stretch;
        flex-direction: column;
    }

    .search-icon {
        display: none;
    }

    .search-box input {
        width: 100%;
        padding: 8px;
    }

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

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .modal-body,
    .modal-header {
        padding: 20px;
    }

    .submit-site-btn {
        right: 16px;
        right: max(16px, env(safe-area-inset-right) + 8px);
        bottom: 16px;
        bottom: max(16px, env(safe-area-inset-bottom) + 8px);
        padding: 12px 16px;
    }

    .buy-ad-btn {
        bottom: 68px;
        bottom: max(68px, env(safe-area-inset-bottom) + 60px);
    }

    .customer-service-btn {
        bottom: 120px;
        bottom: max(120px, env(safe-area-inset-bottom) + 112px);
    }

    .sp-float-right {
        bottom: 172px !important;
    }

    .public-articles-section {
        margin-top: 22px;
        padding: 18px;
        border-radius: 24px;
    }

    .public-articles-grid {
        grid-template-columns: 1fr;
    }

    .public-article-meta {
        align-items: stretch;
        flex-direction: column;
    }

    .public-article-meta .btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-shell {
        display: block;
    }

    .dashboard-sidebar {
        position: relative;
        height: auto;
    }

    .dashboard-main {
        padding: 18px;
    }

    .dashboard-hero {
        display: flex;
        padding: 24px;
    }

    .anime-header {
        align-items: stretch;
        flex-direction: column;
    }

    .anime-hero {
        display: flex;
        padding: 26px;
    }

    .anime-character-card {
        min-height: 220px;
    }

    .business-header,
    .fresh-header {
        align-items: stretch;
        flex-direction: column;
        border-radius: 24px;
    }

    .business-hero {
        display: flex;
        padding: 26px;
    }

    .fresh-main,
    .business-main {
        width: min(100% - 28px, 1120px);
    }
}

/* ===== 仪表盘 ===== */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.25);
    flex-wrap: wrap;
}

.dashboard-hero h3 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.dashboard-hero p {
    margin: 0;
    color: #fff;
    font-size: 13px;
    opacity: 0.95;
}

.dashboard-hero-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e6ebf3;
    box-shadow: 0 1px 0 #e6ebf3, 0 8px 18px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.12;
}

.stat-card.stat-blue::after { background: #3b82f6; }
.stat-card.stat-green::after { background: #10b981; }
.stat-card.stat-orange::after { background: #f59e0b; }
.stat-card.stat-purple::after { background: #8b5cf6; }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #eef2ff;
    color: #4338ca;
    flex-shrink: 0;
    z-index: 1;
}

.stat-card.stat-blue .stat-icon { background: #dbeafe; color: #1d4ed8; }
.stat-card.stat-green .stat-icon { background: #d1fae5; color: #047857; }
.stat-card.stat-orange .stat-icon { background: #fef3c7; color: #b45309; }
.stat-card.stat-purple .stat-icon { background: #ede9fe; color: #6d28d9; }

.stat-meta { z-index: 1; }
.stat-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.stat-value {
    color: #0f172a;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    margin: 4px 0 2px;
}
.stat-foot {
    color: #94a3b8;
    font-size: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.dashboard-panel {
    background: #fff;
    border: 1px solid #e6ebf3;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 1px 0 #e6ebf3, 0 8px 18px rgba(15, 23, 42, 0.04);
}

.dashboard-panel.dashboard-chart {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.dashboard-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dashboard-panel-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-panel-head .muted {
    color: #94a3b8;
    font-size: 12px;
    text-decoration: none;
}

.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 240px;
    padding: 12px 4px 0;
}

.trend-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    position: relative;
}

.trend-bar-stack {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    position: relative;
}

.trend-bar-fill {
    width: 14px;
    border-radius: 6px 6px 0 0;
    transition: height 0.4s ease;
    min-height: 2px;
}

.trend-bar-fill.orders {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
}
.trend-bar-fill.amount {
    background: linear-gradient(180deg, #34d399, #10b981);
}

.trend-bar-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.trend-bar-value {
    font-size: 11px;
    color: #94a3b8;
}

.status-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.status-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #eef2f6;
    font-size: 13px;
}

.status-list li:last-child { border-bottom: none; }
.status-list span { color: #475569; }
.status-list strong { font-weight: 600; }
.status-list .status-ok { color: #047857; }
.status-list .status-warn { color: #b45309; }
.status-list .status-info { color: #1d4ed8; }

.server-live-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 700;
}

.server-live-dot::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.server-runtime {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.server-runtime-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 2px 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 12px;
}

.server-runtime-icon {
    grid-row: 1 / 3;
    align-self: center;
    font-size: 16px;
}

.server-runtime-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.server-runtime-item strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 13px;
}

.recent-item small {
    color: #94a3b8;
    font-size: 11px;
}

@media (max-width: 980px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-panel.dashboard-chart {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 760px) {
    .modal-large .dashboard {
        width: 100%;
        gap: 12px;
        overflow-x: hidden;
    }

    .modal-large .dashboard-hero {
        width: 100%;
        box-sizing: border-box;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        border-radius: 18px;
    }

    .modal-large .dashboard-hero h3 {
        font-size: 20px;
    }

    .modal-large .dashboard-hero-meta,
    .modal-large .stat-grid,
    .modal-large .dashboard-grid,
    .modal-large .server-runtime {
        width: 100%;
        grid-template-columns: 1fr !important;
        box-sizing: border-box;
    }

    .modal-large .dashboard-hero-meta {
        display: grid;
        gap: 8px;
    }

    .modal-large .hero-chip {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .modal-large .stat-card,
    .modal-large .dashboard-panel {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        border-radius: 16px;
    }

    .modal-large .stat-card {
        padding: 14px;
    }

    .modal-large .stat-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 20px;
    }

    .modal-large .stat-value {
        font-size: 24px;
    }

    .modal-large .dashboard-panel {
        padding: 14px;
    }

    .modal-large .dashboard-panel.dashboard-chart {
        grid-column: auto;
        grid-row: auto;
    }

    .modal-large .trend-chart {
        height: 190px;
        gap: 8px;
    }

    .modal-large .trend-bar-fill {
        width: 10px;
    }

    .modal-large .recent-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

/* 授权站系统公告面板 */
.dashboard-notice-panel {
    grid-column: 1 / -1;
}

.auth-notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.auth-notice-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: noticeFadeIn 0.4s ease-out;
}

.auth-notice-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

.auth-notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.auth-notice-title {
    font-weight: 700;
    font-size: 15px;
    color: #1f2937;
    flex: 1;
}

.auth-notice-time {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

.auth-notice-content {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 8px;
    word-break: break-word;
}

.auth-notice-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #9ca3af;
}

.auth-notice-meta span {
    background: rgba(99, 102, 241, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
}

@keyframes noticeFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 手机端公告样式优化 */
@media (max-width: 640px) {
    .dashboard-notice-panel {
        grid-column: 1 / -1;
    }

    .auth-notice-list {
        max-height: none;
        gap: 10px;
    }

    .auth-notice-item {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .auth-notice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 6px;
    }

    .auth-notice-title {
        font-size: 15px;
        font-weight: 700;
    }

    .auth-notice-time {
        font-size: 11px;
    }

    .auth-notice-content {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 8px;
    }

    .auth-notice-content p {
        margin: 0 0 6px;
    }

    .auth-notice-content p:last-child {
        margin-bottom: 0;
    }

    .auth-notice-meta {
        gap: 8px;
        flex-wrap: wrap;
    }

    .auth-notice-meta span {
        font-size: 11px;
        padding: 2px 6px;
    }
}

/* ========== 前台客服 WeChat 风格 ========== */
.cs-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    position: relative;
}

.cs-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.cs-online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
}

.cs-online-dot.offline {
    background: #94a3b8;
}

.cs-chat-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

.cs-chat-list-item:hover {
    background: #f8fafc;
}

.cs-chat-list-item.active {
    background: #eff6ff;
}

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

.cs-chat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.cs-chat-top strong {
    font-size: 15px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-chat-time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.cs-chat-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-chat-last-msg {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 8px;
}

.cs-chat-status-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
}

.cs-chat-status-badge.open {
    background: #dcfce7;
    color: #16a34a;
}

.cs-chat-status-badge.closed {
    background: #fee2e2;
    color: #dc2626;
}

.cs-chat-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cs-chat-detail-header .cs-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 14px;
}

.cs-msg-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

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

.chat-message-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-message-row.visitor {
    flex-direction: row-reverse;
}

.chat-message-row .chat-bubble {
    max-width: 70%;
}

.chat-message-row.visitor .chat-bubble {
    background: #95ec69;
    color: #1a1a1a;
}

.chat-message-row.system {
    justify-content: center;
}

.chat-message-row.system .chat-bubble {
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    max-width: 80%;
    text-align: center;
}

.cs-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

/* ========== 后台客服管理 IM 样式 ========== */
.cs-admin-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cs-admin-search {
    flex: 1;
    position: relative;
}

.cs-admin-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #94a3b8;
}

.cs-admin-search input {
    width: 100%;
    padding: 8px 10px 8px 32px;
    border: 1px solid #dbe4ef;
    border-radius: 20px;
    font-size: 13px;
    background: #fff;
    outline: none;
}

.cs-admin-search input:focus {
    border-color: #3b82f6;
}

.cs-admin-add-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    font-size: 20px;
    line-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-admin-settings-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-admin-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.cs-admin-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: none;
    border: none;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.cs-admin-tab.active {
    color: #3b82f6;
    font-weight: 600;
}

.cs-admin-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #3b82f6;
    border-radius: 1px;
}

.cs-admin-layout {
    display: flex;
    height: calc(80vh - 120px);
    min-height: 400px;
}

.cs-admin-list {
    width: 320px;
    min-width: 280px;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    background: #fff;
}

.cs-admin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

.cs-admin-item:hover {
    background: #f8fafc;
}

.cs-admin-item.active {
    background: #eff6ff;
}

.cs-admin-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    position: relative;
}

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

.cs-admin-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
}

.cs-admin-online-dot.offline {
    background: #94a3b8;
}

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

.cs-admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.cs-admin-top strong {
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-admin-time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.cs-admin-meta {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.cs-admin-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-admin-lastmsg {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 8px;
}

.cs-admin-unread {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-admin-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cs-admin-chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.cs-admin-chat-panel .customer-chat-messages {
    flex: 1;
    overflow-y: auto;
}

.cs-admin-chat-panel .customer-chat-form {
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .cs-admin-layout {
        flex-direction: column;
        height: auto;
    }
    .cs-admin-list {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        max-height: 300px;
    }
}

/* ===== home-purple-card 紫色卡片风格首页 ===== */
.home-purple-card {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #7c5cfc 0%, #a78bfa 50%, #c4b5fd 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1f2937;
    position: relative;
    overflow-x: hidden;
}

.purple-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 30%, rgba(139, 92, 246, 0.35), transparent 50%),
        radial-gradient(circle at 85% 70%, rgba(167, 139, 250, 0.25), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(196, 181, 253, 0.15), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.purple-bubbles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.purple-bubbles span {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: purpleFloat 8s ease-in-out infinite;
}
.purple-bubbles span:nth-child(1) { width: 80px; height: 80px; left: 10%; top: 20%; animation-delay: 0s; }
.purple-bubbles span:nth-child(2) { width: 120px; height: 120px; left: 70%; top: 10%; animation-delay: 2s; }
.purple-bubbles span:nth-child(3) { width: 60px; height: 60px; left: 40%; top: 60%; animation-delay: 4s; }
.purple-bubbles span:nth-child(4) { width: 100px; height: 100px; left: 85%; top: 50%; animation-delay: 1s; }
.purple-bubbles span:nth-child(5) { width: 50px; height: 50px; left: 20%; top: 75%; animation-delay: 3s; }

@keyframes purpleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-30px) scale(1.1); opacity: 0.3; }
}

.purple-container {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 28px 16px 40px;
}

.purple-header {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}
.purple-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.purple-subtitle {
    font-size: 14px;
    margin: 0;
    opacity: 0.85;
}

.purple-save-bar {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    color: #fff;
    border-radius: 12px;
    padding: 12px 18px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.purple-save-icon {
    font-size: 16px;
}

.purple-search-wrap {
    margin-bottom: 18px;
}
.purple-search {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: none;
    padding: 6px;
}
.purple-search input {
    border: none;
    background: transparent;
    font-size: 15px;
    padding: 10px 12px;
}
.purple-search button {
    border-radius: 10px;
    background: linear-gradient(135deg, #7c5cfc, #a78bfa);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.purple-search button:hover {
    opacity: 0.9;
}

.purple-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 18px;
}

.purple-category {
    margin-bottom: 20px;
}
.purple-category:last-child {
    margin-bottom: 0;
}
.purple-category-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}
.purple-category-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-radius: 10px;
}
.purple-category-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.purple-nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.purple-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f9fafb;
    text-decoration: none;
    color: #1f2937;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.purple-nav-item:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    transform: translateX(4px);
}
.purple-nav-icon {
    font-size: 22px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.purple-nav-body {
    flex: 1;
    min-width: 0;
}
.purple-nav-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 3px;
    color: #1f2937;
}
.purple-nav-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.purple-nav-arrow {
    color: #a78bfa;
    font-size: 14px;
    flex-shrink: 0;
}

.purple-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.purple-stat-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.purple-stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}
.purple-stat-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.purple-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.8;
}
.purple-time {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.6;
}

@media (max-width: 640px) {
    .purple-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .purple-title {
        font-size: 22px;
    }
    .purple-nav-item {
        padding: 12px 14px;
    }
}

/* ===== home-dark-tech 暗黑科技风格首页 ===== */
.home-dark-tech {
    margin: 0;
    min-height: 100vh;
    background: #0a0a0f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #e2e8f0;
    position: relative;
    overflow-x: hidden;
}

.dark-grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.dark-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.dark-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.6), 0 0 20px rgba(0, 255, 255, 0.3);
    animation: darkFloat 10s ease-in-out infinite;
}
.dark-particles span:nth-child(1) { left: 10%; top: 15%; animation-delay: 0s; }
.dark-particles span:nth-child(2) { left: 25%; top: 60%; animation-delay: 1.5s; background: rgba(168, 85, 247, 0.4); box-shadow: 0 0 10px rgba(168, 85, 247, 0.6); }
.dark-particles span:nth-child(3) { left: 50%; top: 25%; animation-delay: 3s; }
.dark-particles span:nth-child(4) { left: 75%; top: 70%; animation-delay: 2s; background: rgba(168, 85, 247, 0.4); box-shadow: 0 0 10px rgba(168, 85, 247, 0.6); }
.dark-particles span:nth-child(5) { left: 85%; top: 40%; animation-delay: 4s; }
.dark-particles span:nth-child(6) { left: 15%; top: 80%; animation-delay: 1s; background: rgba(168, 85, 247, 0.4); }
.dark-particles span:nth-child(7) { left: 40%; top: 10%; animation-delay: 2.5s; }
.dark-particles span:nth-child(8) { left: 60%; top: 85%; animation-delay: 3.5s; background: rgba(168, 85, 247, 0.4); }
.dark-particles span:nth-child(9) { left: 90%; top: 20%; animation-delay: 0.5s; }
.dark-particles span:nth-child(10) { left: 5%; top: 45%; animation-delay: 5s; background: rgba(168, 85, 247, 0.4); }

@keyframes darkFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-40px) scale(1.3); opacity: 0.2; }
}

.dark-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.dark-header {
    text-align: center;
    margin-bottom: 28px;
}
.dark-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.dark-logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.6));
}
.dark-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #22d3ee, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}
.dark-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    letter-spacing: 1px;
}

.dark-search-wrap {
    margin-bottom: 28px;
}
.dark-search {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.08), inset 0 1px 0 rgba(255,255,255,0.05);
    padding: 4px;
}
.dark-search input {
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-size: 15px;
    padding: 12px 14px;
}
.dark-search input::placeholder {
    color: #475569;
}
.dark-search button {
    border-radius: 10px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    color: #fff;
    border: none;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}
.dark-search button:hover {
    opacity: 0.9;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.dark-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.dark-category {
    position: relative;
}
.dark-category-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
}
.dark-category-glow {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #22d3ee, #a855f7);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}
.dark-category-icon {
    font-size: 20px;
    margin-left: 14px;
}
.dark-category-title {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}
.dark-category-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.3), transparent);
    margin-left: 8px;
}

.dark-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.dark-nav-card {
    position: relative;
    display: block;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 14px;
    padding: 18px;
    text-decoration: none;
    color: #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}
.dark-nav-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(34, 211, 238, 0.1);
}
.dark-nav-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.dark-nav-card:hover .dark-nav-glow {
    opacity: 1;
}
.dark-nav-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}
.dark-nav-icon {
    font-size: 26px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid rgba(51, 65, 85, 0.4);
}
.dark-nav-info {
    min-width: 0;
}
.dark-nav-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #f1f5f9;
}
.dark-nav-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark-nav-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}
.dark-nav-card:hover .dark-nav-shine {
    left: 150%;
}

.dark-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 32px;
    margin-bottom: 28px;
}
.dark-stat-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.4);
    border-radius: 14px;
    padding: 18px 10px;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}
.dark-stat-item:hover {
    border-color: rgba(34, 211, 238, 0.2);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}
.dark-stat-num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #22d3ee;
    margin-bottom: 4px;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.3);
}
.dark-stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
}

.dark-footer {
    text-align: center;
    color: #475569;
    font-size: 13px;
    line-height: 1.8;
    padding-top: 16px;
    border-top: 1px solid rgba(51, 65, 85, 0.3);
}
.dark-time {
    margin-top: 4px;
    font-size: 12px;
    color: #334155;
}

.dark-linkcheck {
    margin-bottom: 28px;
}
.dark-linkcheck-header {
    text-align: center;
    margin-bottom: 16px;
}
.dark-check-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
    color: #22d3ee;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.15);
    transition: all 0.3s ease;
}
.dark-check-btn:hover:not(:disabled) {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 6px 24px rgba(6, 182, 212, 0.25);
    transform: translateY(-2px);
}
.dark-check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.dark-linkcheck-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.dark-linkcheck-stat {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.4);
    border-radius: 16px;
    padding: 22px 12px;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}
.dark-linkcheck-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.dark-linkcheck-stat.ok {
    border-color: rgba(16, 185, 129, 0.3);
}
.dark-linkcheck-stat.ok:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(16, 185, 129, 0.1);
}
.dark-linkcheck-stat.ok strong {
    color: #10b981;
    text-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}
.dark-linkcheck-stat.bad {
    border-color: rgba(239, 68, 68, 0.3);
}
.dark-linkcheck-stat.bad:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(239, 68, 68, 0.1);
}
.dark-linkcheck-stat.bad strong {
    color: #ef4444;
    text-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}
.dark-linkcheck-stat.total strong {
    color: #e2e8f0;
    text-shadow: 0 0 16px rgba(226, 232, 240, 0.2);
}
.dark-linkcheck-stat strong {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}
.dark-linkcheck-stat span {
    display: block;
    font-size: 13px;
    color: #64748b;
}
.dark-linkcheck-loading {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    padding: 16px;
}
.dark-linkcheck-error {
    text-align: center;
    color: #ef4444;
    font-size: 14px;
    padding: 16px;
}
.dark-linkcheck-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    margin: 14px 0 10px;
    padding-left: 4px;
}
.dark-linkcheck-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.35);
    margin-bottom: 8px;
    transition: all 0.25s ease;
}
.dark-linkcheck-item:hover {
    background: rgba(15, 23, 42, 0.7);
}
.dark-linkcheck-item.ok {
    border-left: 3px solid #10b981;
}
.dark-linkcheck-item.bad {
    border-left: 3px solid #ef4444;
}
.dark-linkcheck-item-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dark-linkcheck-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
}
.dark-linkcheck-item-url {
    font-size: 12px;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark-linkcheck-item-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.dark-linkcheck-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.dark-linkcheck-badge.ok {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.dark-linkcheck-badge.bad {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.dark-linkcheck-speed {
    font-size: 12px;
    color: #64748b;
    min-width: 48px;
    text-align: right;
}

@media (max-width: 640px) {
    .dark-title { font-size: 26px; }
    .dark-nav-grid { grid-template-columns: 1fr; }
    .dark-stats { grid-template-columns: repeat(2, 1fr); }
    .dark-container { padding: 24px 16px 36px; }
    .dark-linkcheck-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .dark-linkcheck-stat { padding: 16px 6px; }
    .dark-linkcheck-stat strong { font-size: 22px; }
    .dark-linkcheck-stat span { font-size: 11px; }
    .dark-linkcheck-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .dark-linkcheck-item-status { width: 100%; justify-content: space-between; }
}
/* ===== Template Gallery (Reference UI Style) ===== */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 4px 0;
}

.tpl-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tpl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.tpl-preview {
    position: relative;
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #f0f2f5;
}
.tpl-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tpl-preview-fallback {
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

/* 右上角状态标签 */
.tpl-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.tpl-badge-active {
    background: #22c55e;
    color: #fff;
}

/* 底部深色遮罩信息层 */
.tpl-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 14px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
}
.tpl-overlay h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.tpl-overlay .tpl-meta {
    margin: 2px 0 0;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片底部 - 按钮区域 */
.tpl-foot {
    padding: 10px 14px 12px;
    display: flex;
    gap: 8px;
}
.tpl-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.12s ease;
    letter-spacing: 0.2px;
}
.tpl-btn:active { transform: scale(0.96); }
.tpl-btn-use {
    background: #f472b6;
    color: #fff;
}
.tpl-btn-use:hover { background: #ec4899; }
.tpl-btn-current {
    background: #f0f2f5;
    color: #94a3b8;
    cursor: default;
}
.tpl-btn:disabled { cursor: default; }
.tpl-btn-install {
    background: #3b82f6;
    color: #fff;
}
.tpl-btn-install:hover { background: #2563eb; }

/* ===== Templates Tab Header ===== */
.tpl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.tpl-header-left h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}
.tpl-header-left p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #64748b;
}
.tpl-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tpl-select {
    padding: 7px 30px 7px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    appearance: none;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    outline: none;
}
.tpl-select:focus { border-color: #f472b6; box-shadow: 0 0 0 3px rgba(244,114,182,0.1); }

.tpl-save-btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: none;
    background: #f472b6;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tpl-save-btn:hover { background: #ec4899; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .tpl-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .tpl-preview {
        height: 160px;
    }
    .tpl-header {
        flex-direction: column;
        align-items: stretch;
    }
    .tpl-header-right {
        justify-content: stretch;
    }
    .tpl-select {
        flex: 1;
        min-width: 0;
    }
    .tpl-save-btn {
        white-space: nowrap;
    }
}

/* ===== Feature Switches (Redesigned - Grouped Card Layout) ===== */
.fs-form {
    max-width: 680px;
}

.fs-group {
    margin-bottom: 24px;
}

.fs-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 2px;
}
.fs-group-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fce7f3, #fce7f3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.fs-group-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}
.fs-group-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    background: #f1f5f9;
    padding: 1px 10px;
    border-radius: 10px;
    margin-left: auto;
}

.fs-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #edeff2;
    border-radius: 14px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.fs-card:hover {
    border-color: #dce0e8;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.fs-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.fs-left-bar {
    width: 3px;
    height: 32px;
    border-radius: 3px;
    flex-shrink: 0;
}
.fs-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    border: 1px solid #f0f2f5;
}
.fs-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.fs-info strong {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}
.fs-info span {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fs-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.fs-tag {
    font-size: 10.5px;
    font-weight: 600;
    color: #22c55e;
    background: rgba(34,197,94,0.08);
    padding: 2px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* iOS toggle switch */
.fs-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}
.fs-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.fs-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.25s ease;
}
.fs-slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.fs-switch input:checked + .fs-slider {
    background: #f472b6;
}
.fs-switch input:checked + .fs-slider::before {
    transform: translateX(20px);
    box-shadow: 0 2px 8px rgba(244,114,182,0.3);
}
.fs-switch input:focus + .fs-slider {
    box-shadow: 0 0 0 3px rgba(244,114,182,0.15);
}

.fs-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f2f5;
}
.fs-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.12s, transform 0.1s;
    letter-spacing: 0.3px;
}
.fs-save-btn:hover { opacity: 0.92; }
.fs-save-btn:active { transform: scale(0.97); }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .fs-group {
        margin-bottom: 20px;
    }
    .fs-card {
        padding: 12px 14px;
    }
    .fs-left {
        gap: 10px;
    }
    .fs-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .fs-info strong {
        font-size: 13px;
    }
    .fs-info span {
        font-size: 11px;
    }
    .fs-save-btn {
        width: 100%;
        justify-content: center;
    }
    .fs-tag {
        display: none;
    }
}

/* ===== Dashboard QQ Avatar ===== */
.dash-qq-card {
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 14px; padding: 8px 14px;
}
.dash-qq-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    object-fit: cover;
}
.dash-qq-label {
    font-size: 13px; font-weight: 600; color: #c7d2fe;
}
.dashboard-hero-right {
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}

/* ===== Feature Switch QQ Input ===== */
.feature-qq-input-wrap {
    flex-shrink: 0;
}
.feature-qq-input {
    width: 160px; padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; color: #e2e8f0; font-size: 13px;
    outline: none; transition: all 0.2s;
}
.feature-qq-input:focus {
    border-color: rgba(99,102,241,0.4);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

/* ===== Template Preview: Frosted ===== */
.template-preview-frosted .tp-content {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    position: relative;
}
.template-preview-frosted .tp-content::before {
    content: "";
    position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
    width: 60%; height: 28px; border-radius: 999px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
}
.template-preview-frosted .tp-content::after {
    content: "";
    position: absolute; top: 50%; left: 50%; transform: translateX(-50%);
    width: 70%; height: 60px; border-radius: 12px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
}

/* home-sakura: 粉紫渐变柔和背景 + 毛玻璃卡片 */
.template-preview-sakura .tp-content {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3, #ede9fe, #e0e7ff, #f0f9ff);
    position: relative;
}
.template-preview-sakura .tp-content::before {
    content: "";
    position: absolute; top: 26%; left: 50%; transform: translateX(-50%);
    width: 50%; height: 40px; border-radius: 14px;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.02);
}
.template-preview-sakura .tp-content::after {
    content: "";
    position: absolute; bottom: 22%; left: 50%; transform: translateX(-50%);
    width: 75%; height: 44px; border-radius: 10px;
    background: rgba(244,114,182,0.08);
}

/* ===== Responsive for admin cards & features ===== */
@media (max-width: 760px) {
    .tpl-grid {
        gap: 14px;
    }
    .tpl-preview {
        height: 140px;
    }

    .fs-card {
        padding: 12px 14px;
    }

    .feature-qq-input {
        width: 120px;
    }

    .dashboard-hero-right {
        align-items: flex-start;
    }
}

/* ===== Icon Picker — 简洁卡片风格 ===== */
.icon-picker-wrapper {
    border: 1px solid rgba(99,102,241,0.08);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}
.icon-picker-search {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    color: #1e293b;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: background 0.15s;
}
.icon-picker-search::placeholder { color: #94a3b8; }
.icon-picker-search:focus { background: #f8faff; }
.icon-picker-categories {
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbff;
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.icon-picker-categories::-webkit-scrollbar {
    height: 3px;
}
.icon-picker-categories::-webkit-scrollbar-track {
    background: transparent;
}
.icon-picker-categories::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.icon-picker-cat-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.18s ease;
    letter-spacing: 0.02em;
}
.icon-picker-cat-btn:hover { background: #eef2ff; color: #6366f1; }
.icon-picker-cat-btn.active {
    background: #6366f1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    padding: 12px;
    max-height: 248px;
    overflow-y: auto;
}
.icon-picker-grid::-webkit-scrollbar { width: 5px; }
.icon-picker-grid::-webkit-scrollbar-track { background: transparent; }
.icon-picker-grid::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}
button.icon-picker-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    min-height: 40px;
    font-size: 22px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.18s ease;
    background: #f8faff;
    border: 2px solid transparent;
    padding: 0;
    margin: 0;
    user-select: none;
    color: inherit;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
button.icon-picker-item:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.12);
}
button.icon-picker-item.selected {
    background: #eef2ff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2), 0 4px 12px rgba(99,102,241,0.15);
    transform: translateY(-2px) scale(1.05);
}
.icon-picker-selected-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid #f1f5f9;
    background: #fafbff;
    font-size: 13px;
    color: #94a3b8;
}
.icon-picker-selected-preview .preview-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eef2ff;
}
.icon-picker-selected-preview .preview-text {
    color: #6366f1;
    font-weight: 700;
    font-size: 13px;
}
/* 暗黑模式适配 */
body.dark .icon-picker-wrapper {
    background: #0f1729;
    border-color: rgba(99,102,241,0.15);
}
body.dark .icon-picker-search {
    background: #0f1729;
    color: #e2e8f0;
    border-bottom-color: #1e293b;
}
body.dark .icon-picker-search:focus { background: #1a2332; }
body.dark .icon-picker-categories {
    background: #0d1520;
    border-bottom-color: #1e293b;
}
body.dark .icon-picker-cat-btn { color: #64748b; }
body.dark .icon-picker-cat-btn:hover { background: #1e293b; color: #a5b4fc; }
body.dark .icon-picker-cat-btn.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}
body.dark .icon-picker-grid::-webkit-scrollbar-thumb { background: #334155; }
body.dark button.icon-picker-item { background: #1a2332; }
body.dark button.icon-picker-item:hover {
    background: #1e293b;
    border-color: #4f46e5;
}
body.dark button.icon-picker-item.selected {
    background: #1e293b;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.3);
}
body.dark .icon-picker-selected-preview {
    background: #0d1520;
    border-top-color: #1e293b;
    color: #64748b;
}
body.dark .icon-picker-selected-preview .preview-icon { background: #1e293b; }
body.dark .icon-picker-selected-preview .preview-text { color: #a5b4fc; }

/* ==================== v1.1 前台用户认证样式 ==================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
#frontGuestActions {
    display: flex;
    align-items: center;
    gap: 8px;
}
#frontGuestActions .btn {
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 10px;
    backdrop-filter: blur(12px);
    background: rgba(99,102,241,0.12);
    color: #4f46e5;
    border: 1px solid rgba(99,102,241,0.25);
    transition: all 0.2s;
    cursor: pointer;
}
#frontGuestActions .btn:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.4);
    color: #4338ca;
}
#frontGuestActions .btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: #fff;
}
/* ==================== v1.1 前台用户下拉菜单 ==================== */
.front-user-menu {
    position: relative;
    z-index: 200;
}
.front-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.2s;
    color: #e2e8f0;
    white-space: nowrap;
}
.front-user-trigger:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
}
.front-user-menu .front-user-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.front-user-menu .front-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.front-user-menu .front-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.front-user-arrow {
    flex-shrink: 0;
    color: #94a3b8;
    transition: transform 0.2s;
}
.front-user-menu.open .front-user-arrow {
    transform: rotate(180deg);
}
/* 下拉面板 */
.front-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.2s ease;
}
.front-user-menu.open .front-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
/* 当下拉菜单打开时，使用 pc2-dropdown-* 亮色风格覆盖旧的 front-user-dropdown-* 暗色风格 */
.front-user-menu.open .front-user-dropdown {
    background: #ffffff;
    border: 1px solid rgba(148,163,184,0.15);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.front-user-menu.open .front-user-dropdown .pc2-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148,163,184,0.1);
}
.front-user-menu.open .front-user-dropdown .pc2-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.front-user-menu.open .front-user-dropdown .pc2-dropdown-email {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.3;
}
.front-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
}
.front-user-dropdown-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    overflow: hidden;
}
.front-user-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.front-user-dropdown-info {
    overflow: hidden;
}
.front-user-dropdown-name {
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.front-user-dropdown-email {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.front-user-dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 6px 4px;
}
.front-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}
.front-user-dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    color: #f8fafc;
}
.front-user-dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}
.front-user-dropdown-item:hover svg {
    opacity: 1;
}
.front-user-dropdown-logout {
    color: #f87171;
}
.front-user-dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}
.front-user-dropdown-logout:hover svg {
    color: #fca5a5;
}
/* 手机端适配 */
@media (max-width: 768px) {
    .front-user-trigger {
        padding: 4px 10px 4px 4px;
        gap: 6px;
    }
    .front-user-menu .front-user-avatar {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 13px;
    }
    .front-user-menu .front-user-name {
        font-size: 13px;
        max-width: 72px;
    }
    .front-user-dropdown {
        right: -8px;
        min-width: 200px;
    }
}

/* ==================== v1.1 前台模态框 ==================== */
.modal.front-modal .modal-content {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.modal.front-modal .modal-header {
    padding: 24px 24px 0;
    border: none;
}
.modal.front-modal .modal-header h3 {
    color: #f1f5f9;
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}
.modal.front-modal .modal-body {
    padding: 20px 24px 28px;
    display: block; /* 覆盖 modal-large 的 grid 布局 */
}
.front-auth-form label {
    display: block;
    font-size: 12px;
    color: #cbd5e1;
    margin-bottom: 6px;
    font-weight: 600;
}
.front-auth-form input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.6);
    color: #f1f5f9;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}
.front-auth-form input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.front-auth-form .form-group {
    margin-bottom: 14px;
}
.front-auth-error {
    min-height: 18px;
    color: #fca5a5;
    font-size: 12px;
    margin-bottom: 8px;
}
.front-auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #94a3b8;
}
.front-auth-switch a {
    color: #818cf8;
    cursor: pointer;
    text-decoration: none;
}
.front-auth-switch a:hover {
    color: #a5b4fc;
    text-decoration: underline;
}
.front-auth-submit {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s;
    margin-top: 4px;
}
.front-auth-submit:hover {
    filter: brightness(1.08);
}

/* ==================== v1.1 收藏夹面板 ==================== */
.modal .favorites-list, .modal .comments-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 4px 0;
}
.modal .comments-list .empty-state {
    text-align: center;
    padding: 30px 0;
    color: #94a3b8;
    font-size: 14px;
}
.modal .favorites-list::-webkit-scrollbar,
.modal .comments-list::-webkit-scrollbar {
    width: 5px;
}
.modal .favorites-list::-webkit-scrollbar-thumb,
.modal .comments-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}
.favorite-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    margin-bottom: 8px;
    transition: background 0.15s;
}
.favorite-item:hover {
    background: rgba(255,255,255,0.06);
}
.favorite-item-info {
    flex: 1;
    min-width: 0;
}
.favorite-item-info strong {
    color: #f1f5f9;
    font-size: 14px;
    display: block;
}
.favorite-item-info span {
    color: #94a3b8;
    font-size: 12px;
}

/* 收藏夹面板 - 卡片式设计 */
.fpanel-card {
    display: flex;
    align-items: center;
    padding: 14px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.fpanel-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}
.fpanel-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.fpanel-emoji {
    font-size: 22px;
    line-height: 1;
}
.fpanel-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.fpanel-title {
    color: #0f172a;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.fpanel-link {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.fpanel-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.fpanel-btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.fpanel-btn-primary {
    color: #2563eb;
    background: #eff6ff;
}
.fpanel-btn-danger {
    color: #dc2626;
    background: #fef2f2;
}

/* 收藏夹面板 - 手机端适配 */
@media (max-width: 480px) {
    .fpanel-card {
        padding: 10px;
        gap: 8px;
    }
    .fpanel-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    .fpanel-icon img {
        width: 22px;
        height: 22px;
    }
    .fpanel-emoji {
        font-size: 18px;
    }
    .fpanel-name {
        font-size: 14px;
    }
    .fpanel-link {
        font-size: 11px;
    }
    .fpanel-actions {
        flex-direction: column;
        gap: 4px;
    }
    .fpanel-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ==================== v1.1 评论区样式（新设计） ==================== */
.citem {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 8px;
}
.citem-reply {
    background: #f1f5f9;
    margin-left: 20px;
}
.citem-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.citem-body {
    flex: 1;
    min-width: 0;
}
.citem-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.citem-name {
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
}
.citem-time {
    color: #94a3b8;
    font-size: 11px;
}
.citem-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(251, 191, 36, 0.15);
    color: #b45309;
}
.citem-text {
    color: #334155;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}
.citem-replybtn {
    margin-top: 6px;
    padding: 3px 10px;
    font-size: 12px;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}
.citem-replybtn:hover {
    background: #e2e8f0;
    color: #334155;
}
.citem-replies {
    margin-top: 8px;
}
.comment-form-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
.comment-form-title {
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}
.front-comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}
.front-comment-form textarea:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.front-comment-form textarea::placeholder {
    color: #94a3b8;
}
.comment-login-hint {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 13px;
}
.comment-login-hint a {
    color: #4f46e5;
    cursor: pointer;
}

/* ==================== v1.1 个人中心面板 v2（顶部卡片+标签页） ==================== */
.pc2-wrap {
    max-width: 520px;
    width: 94%;
    max-height: 88vh;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}
.pc2-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.25);
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.pc2-close:hover { background: rgba(0,0,0,0.4); }

/* 顶部Hero区域 */
.pc2-hero {
    position: relative;
    overflow: hidden;
    padding-bottom: 0;
}
.pc2-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 0;
}
.pc2-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.15) 0%, transparent 60%);
}
.pc2-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px 20px;
}
.pc2-avatar-box {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    position: relative;
}
.pc2-avatar-box img { width: 100%; height: 100%; object-fit: cover; }
.pc2-avatar-box span { color: #fff; font-size: 28px; font-weight: 700; }
.pc2-avatar-btn {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #667eea;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}
.pc2-avatar-btn:hover { background: #5a6fd6; transform: scale(1.1); }
.pc2-avatar-box { margin-bottom: 12px; }
.pc2-hero-name {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}
.pc2-hero-sub {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    margin-bottom: 10px;
}
.pc2-hero-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.pc2-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
}

/* 标签栏 */
.pc2-tabs {
    display: flex;
    border-bottom: 1px solid #f1f5f9;
    padding: 0 8px;
    background: #fff;
    flex-shrink: 0;
}
.pc2-tab {
    flex: 1;
    padding: 14px 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
}
.pc2-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2.5px;
    border-radius: 2px;
    background: transparent;
    transition: all 0.25s;
}
.pc2-tab:hover { color: #64748b; }
.pc2-tab.active { color: #667eea; font-weight: 600; }
.pc2-tab.active::after { background: linear-gradient(90deg, #667eea, #764ba2); }

/* 内容区 */
.pc2-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    background: #fff;
    flex: 1;
    min-height: 0;
}
/* 认证弹窗内容区填满剩余空间 */
.pc2-auth-wrap .pc2-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.pc2-panel {
    display: none;
    animation: pc2FadeIn 0.2s ease;
}
.pc2-panel.active { display: block; }
@keyframes pc2FadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 表单 */
.pc2-field {
    margin-bottom: 16px;
}
.pc2-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pc2-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.pc2-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
    background: #fff;
}
/* 覆盖浏览器 autofill 样式，强制统一背景色和文字色 */
.pc2-input:-webkit-autofill,
.pc2-input:-webkit-autofill:hover,
.pc2-input:-webkit-autofill:focus,
.pc2-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #f8fafc inset !important;
    -webkit-text-fill-color: #1e293b !important;
    caret-color: #1e293b;
    transition: background-color 5000s ease-in-out 0s;
}
.pc2-field input:-webkit-autofill,
.pc2-field input:-webkit-autofill:hover,
.pc2-field input:-webkit-autofill:focus,
.pc2-field input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #f8fafc inset !important;
    -webkit-text-fill-color: #1e293b !important;
    caret-color: #1e293b;
    transition: background-color 5000s ease-in-out 0s;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #f8fafc inset !important;
    -webkit-text-fill-color: #1e293b !important;
    caret-color: #1e293b;
    transition: background-color 5000s ease-in-out 0s;
}
.pc2-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px 24px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(102,126,234,0.3);
    margin-top: 8px;
}
.pc2-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}
.pc2-btn-primary:active { transform: translateY(0); }

/* 收藏列表 */
.pc2-fav-header {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 12px;
}
.pc2-fav-header strong { color: #667eea; }
.pc2-fav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pc2-fav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    gap: 10px;
    transition: all 0.2s;
}
.pc2-fav-item:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(102,126,234,0.08); }
.pc2-fav-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
}
.pc2-fav-img { width: 24px; height: 24px; object-fit: contain; }
.pc2-fav-emoji { font-size: 20px; }
.pc2-fav-info { flex: 1; min-width: 0; }
.pc2-fav-name { color: #1e293b; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc2-fav-url { color: #94a3b8; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.pc2-fav-actions { display: flex; gap: 4px; flex-shrink: 0; }
.pc2-fav-go {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(102,126,234,0.08);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.pc2-fav-go:hover { background: rgba(102,126,234,0.15); }
.pc2-fav-del {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: rgba(239,68,68,0.06);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.pc2-fav-del:hover { background: rgba(239,68,68,0.12); }

/* 空状态 */
.pc2-empty {
    text-align: center;
    padding: 32px 16px;
}
.pc2-empty svg { margin-bottom: 10px; }
.pc2-empty div { font-size: 14px; font-weight: 600; color: #94a3b8; margin-bottom: 4px; }
.pc2-empty small { font-size: 12px; color: #cbd5e1; }

/* 暗黑模式 */
body.dark .pc2-wrap { background: #1e293b; }
body.dark .pc2-tabs { border-bottom-color: rgba(148,163,184,0.1); background: #1e293b; }
body.dark .pc2-tab { color: #64748b; }
body.dark .pc2-tab:hover { color: #94a3b8; }
body.dark .pc2-tab.active { color: #a78bfa; }
body.dark .pc2-body { background: #1e293b; }
body.dark .pc2-field label { color: #64748b; }
body.dark .pc2-input { background: rgba(15,23,42,0.6); color: #f1f5f9; border-color: rgba(148,163,184,0.15); }
body.dark .pc2-input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167,139,250,0.1); }
body.dark .pc2-fav-item { background: rgba(30,41,59,0.5); border-color: rgba(148,163,184,0.08); }
body.dark .pc2-fav-item:hover { border-color: rgba(167,139,250,0.25); }
body.dark .pc2-fav-icon { background: rgba(51,65,85,0.5); }
body.dark .pc2-fav-name { color: #e2e8f0; }
body.dark .pc2-fav-url { color: #64748b; }
body.dark .pc2-fav-header { color: #64748b; }
body.dark .pc2-fav-header strong { color: #a78bfa; }
body.dark .pc2-empty div { color: #64748b; }
body.dark .pc2-empty small { color: #475569; }
body.dark .pc2-empty svg { stroke: #475569; }

/* pc2 小号 Hero（用于弹窗） */
.pc2-hero-sm { flex-shrink: 0; }
.pc2-hero-sm .pc2-hero-inner { padding: 24px 24px 16px; }
.pc2-hero-sm .pc2-hero-name { font-size: 16px; }

/* pc2 下拉菜单 */
.pc2-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148,163,184,0.1);
}
.pc2-dropdown-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.pc2-dropdown-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc2-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.pc2-dropdown-email {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.3;
}
.pc2-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}
.pc2-dropdown-item:hover {
    background: rgba(102,126,234,0.06);
    color: #667eea;
}
.pc2-dropdown-item svg {
    color: #94a3b8;
    flex-shrink: 0;
}
.pc2-dropdown-item:hover svg { color: #667eea; }
.pc2-dropdown-logout { color: #ef4444; }
.pc2-dropdown-logout:hover { background: rgba(239,68,68,0.06); color: #ef4444; }
.pc2-dropdown-logout:hover svg { color: #ef4444; }

/* pc2 认证弹窗、收藏夹弹窗、评论弹窗 */
.pc2-auth-wrap, .pc2-fav-wrap, .pc2-comment-wrap {
    max-width: 460px;
    width: 94%;
}
.pc2-comment-wrap {
    max-width: 520px;
}

/* 收藏夹分类标签 */
.favorite-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.favorite-category-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.favorite-category-tag:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}
.favorite-category-tag.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

/* 评论列表在 pc2 风格下 */
.pc2-comment-wrap .comments-list {
    max-height: 45vh;
    overflow-y: auto;
}

/* 暗黑模式 - 下拉菜单 */
body.dark .pc2-dropdown-name { color: #f1f5f9; }
body.dark .pc2-dropdown-email { color: #94a3b8; }
body.dark .pc2-dropdown-item { color: #cbd5e1; }
body.dark .pc2-dropdown-item:hover { background: rgba(167,139,250,0.08); color: #a78bfa; }
body.dark .pc2-dropdown-item:hover svg { color: #a78bfa; }
body.dark .pc2-dropdown-logout { color: #f87171; }
body.dark .pc2-dropdown-logout:hover { background: rgba(248,113,113,0.08); color: #f87171; }
body.dark .favorite-category-tag { background: rgba(51,65,85,0.5); color: #94a3b8; }
body.dark .favorite-category-tag:hover { background: rgba(71,85,105,0.5); }
body.dark .favorite-category-tag.active { background: linear-gradient(135deg, #818cf8, #a78bfa); color: #fff; }

/* 收藏夹面板分类表单 - 修复手机端布局 */
.favorite-category-form {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    align-items: center;
}
.favorite-category-form .form-input {
    flex: 1;
    min-width: 0;
}
.favorite-category-form .btn {
    flex-shrink: 0;
    white-space: nowrap;
}
/* 收藏夹项手机端优化 */
.favorite-item {
    flex-wrap: wrap;
}
.favorite-item-info {
    flex: 1;
    min-width: 0;
}
/* 点赞/收藏状态 */
.action-btn.like-btn.liked { color: #ef4444; }
.action-btn.fav-btn.favorited { color: #f59e0b; }

/* ==================== v1.1 导航卡片扩展（收藏+评论按钮） ==================== */
.nav-card-wrap .nav-card-actions {
    display: flex;
    gap: 6px;
    padding: 0 20px 12px;
    opacity: 0;
    transition: opacity 0.2s;
}
.nav-card-wrap:hover .nav-card-actions {
    opacity: 1;
}
/* 移动端：始终显示按钮（无hover事件） */
@media (max-width: 768px), (hover: none) {
    .nav-card-wrap .nav-card-actions {
        opacity: 1;
    }
}
.nav-card-actions .action-btn {
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.nav-card-actions .action-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}
.nav-card-actions .action-btn.favorited {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    border-color: rgba(234, 179, 8, 0.3);
}

/* ==================== v1.1 后台评论审核/操作日志表格样式增强 ==================== */
.comment-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.data-table td .btn-sm {
    margin: 2px;
}

/* ==================== v1.1 暗黑模式 ==================== */
body.dark,
body.dark .modal-content {
    background: #0f172a;
    color: #e2e8f0;
}
body.dark .header { background: rgba(15, 23, 42, 0.95); border-bottom-color: rgba(148,163,184,0.15); }
body.dark .category-title,
body.dark .category-section h2,
body.dark h1, body.dark h2, body.dark h3 { color: #f1f5f9; }
body.dark .hero h1 { color: #f1f5f9; }
body.dark .hero p { color: #94a3b8; }
body.dark .nav-card-wrap { background: rgba(30, 41, 59, 0.8); border-color: rgba(71,85,105,0.3); }
body.dark .nav-card-wrap:hover { background: rgba(30, 41, 59, 0.95); border-color: rgba(99,102,241,0.4); }
body.dark .nav-title { color: #e2e8f0; }
body.dark .nav-desc { color: #94a3b8; }
body.dark .search-box input { background: rgba(30, 41, 59, 0.8); color: #f1f5f9; border-color: rgba(71,85,105,0.3); }
body.dark .search-box button { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
body.dark .modal-content { background: rgba(15, 23, 42, 0.95); border-color: rgba(71,85,105,0.3); }
body.dark .front-auth-form input,
body.dark .front-comment-form textarea,
body.dark .profile-form-group input { background: rgba(30, 41, 59, 0.6); color: #f1f5f9; border-color: rgba(71,85,105,0.3); }
body.dark .favorite-item,
body.dark .comment-item { background: rgba(30, 41, 59, 0.4); }
body.dark .profile-stat-item { background: rgba(30, 41, 59, 0.4); }
body.dark .data-table { color: #e2e8f0; }
body.dark .data-table th { background: rgba(30, 41, 59, 0.8); color: #e2e8f0; }
body.dark .data-table td { border-color: rgba(71,85,105,0.2); }
body.dark .panel-toolbar h3 { color: #f1f5f9; }
body.dark .panel-toolbar p { color: #94a3b8; }

/* ==================== v1.1 管理后台暗黑模式完整适配 ==================== */
body.dark .admin-panel-modal { background: #0f172a; }
body.dark .modal-large .modal-content { background: #0f172a; border-color: rgba(71,85,105,0.3); }
body.dark .modal-large .modal-header { background: linear-gradient(120deg, #0f172a 0%, #1e293b 60%, #312e81 100%); border-bottom-color: rgba(71,85,105,0.3); }
body.dark .modal-large .modal-body { background: #0f172a; }
body.dark .modal-large .tab-content { background: #0f172a; }
body.dark .modal-large .manage-tabs { background: #1e293b; border-right-color: rgba(71,85,105,0.3); }
body.dark .modal-large .menu-group-title { color: #94a3b8; }
body.dark .modal-large .menu-group-title:hover { background: rgba(99,102,241,0.1); color: #e2e8f0; }
body.dark .modal-large .menu-group-title::after { color: #64748b; }
body.dark .modal-large .tab-btn { color: #94a3b8; }
body.dark .modal-large .tab-btn:hover { background: rgba(99,102,241,0.1); color: #e2e8f0; }
body.dark .modal-large .tab-btn.active { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
body.dark .modal-large .admin-logout-btn { color: #94a3b8; }
body.dark .modal-large .admin-logout-btn:hover { background: rgba(239,68,68,0.1); color: #fca5a5; }
body.dark .modal-large .panel-toolbar { background: #1e293b; box-shadow: 0 1px 0 rgba(71,85,105,0.2), 0 8px 18px rgba(0,0,0,0.15); }
body.dark .data-table tbody tr:hover { background: rgba(30,41,59,0.6); }
body.dark .data-table td { border-color: rgba(71,85,105,0.2); color: #e2e8f0; }
body.dark .form-group label { color: #cbd5e1; }
body.dark .form-group input,
body.dark .form-group select,
body.dark .form-group textarea { background: #1e293b; color: #f1f5f9; border-color: rgba(71,85,105,0.3); }
body.dark .form-group input:focus,
body.dark .form-group select:focus,
body.dark .form-group textarea:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,0.15); }
body.dark .form-group input::placeholder,
body.dark .form-group select::placeholder,
body.dark .form-group textarea::placeholder { color: #64748b; }
body.dark .empty-state { color: #64748b; }
body.dark .error-card { background: rgba(239,68,68,0.08); color: #fca5a5; border-color: rgba(239,68,68,0.2); }
body.dark .success-card { background: rgba(34,197,94,0.08); color: #86efac; border-color: rgba(34,197,94,0.2); }
body.dark .update-card { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .version-card { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .changelog { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .link-check-panel { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .link-check-panel .link-check-result { background: #0f172a; border-color: rgba(71,85,105,0.3); color: #e2e8f0; }
body.dark .admin-login-page { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
body.dark .admin-login-card { background: #1e293b; box-shadow: 0 20px 60px rgba(0,0,0,0.4); border: 1px solid rgba(71,85,105,0.3); }
body.dark .admin-login-header { color: #f1f5f9; }
body.dark .admin-login-form input { background: #0f172a; color: #f1f5f9; border-color: rgba(71,85,105,0.3); }
body.dark .admin-login-form input:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,0.15); }
body.dark .admin-error { background: rgba(239,68,68,0.1); color: #fca5a5; border-color: rgba(239,68,68,0.2); }
body.dark .admin-back { color: #94a3b8; }
body.dark .admin-back:hover { color: #e2e8f0; }
body.dark .btn-outline {
    border-color: rgba(148, 163, 184, 0.5);
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.15);
    font-weight: 600;
}
body.dark .btn-outline:hover {
    background: rgba(148, 163, 184, 0.25);
    border-color: rgba(148, 163, 184, 0.7);
}
body.dark .btn-ghost { color: #94a3b8; }
body.dark .btn-ghost:hover { background: rgba(148,163,184,0.1); color: #e2e8f0; }
body.dark .modal-close { background: #334155; color: #e2e8f0; }
body.dark .modal-close:hover { background: #475569; }
/* ==================== body.dark 前台通用适配 ==================== */
body.dark { background: #0f172a; color: #e2e8f0; }
body.dark .header { background: rgba(15, 23, 42, 0.95); border-bottom-color: rgba(148,163,184,0.15); }
body.dark .category-title,
body.dark h1, body.dark h2, body.dark h3 { color: #f1f5f9; }
body.dark .hero h1 { color: #f1f5f9; }
body.dark .hero p { color: #94a3b8; }
body.dark .nav-card-wrap { background: rgba(30, 41, 59, 0.8); border-color: rgba(71,85,105,0.3); }
body.dark .nav-card-wrap:hover { background: rgba(30, 41, 59, 0.95); border-color: rgba(99,102,241,0.4); }
body.dark .nav-title { color: #e2e8f0; }
body.dark .nav-desc { color: #94a3b8; }
body.dark .search-box input { background: rgba(30, 41, 59, 0.8); color: #f1f5f9; border-color: rgba(71,85,105,0.3); }
body.dark .search-box button { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
body.dark .modal-content { background: rgba(15, 23, 42, 0.95); border-color: rgba(71,85,105,0.3); }
body.dark .front-auth-form input,
body.dark .front-comment-form textarea,
body.dark .profile-form-group input { background: rgba(30, 41, 59, 0.6); color: #f1f5f9; border-color: rgba(71,85,105,0.3); }
body.dark .favorite-item,
body.dark .comment-item { background: rgba(30, 41, 59, 0.4); }
body.dark .profile-stat-item { background: rgba(30, 41, 59, 0.4); }
body.dark .data-table { color: #e2e8f0; }
body.dark .data-table th { background: rgba(30, 41, 59, 0.8); color: #e2e8f0; }
body.dark .data-table td { border-color: rgba(71,85,105,0.2); }
body.dark .panel-toolbar h3 { color: #f1f5f9; }
body.dark .panel-toolbar p { color: #94a3b8; }
body.dark .form-group label { color: #cbd5e1; }
body.dark .form-group input,
body.dark .form-group select,
body.dark .form-group textarea { background: #1e293b; color: #f1f5f9; border-color: rgba(71,85,105,0.3); }
body.dark .form-group input:focus,
body.dark .form-group select:focus,
body.dark .form-group textarea:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,0.15); }
body.dark .form-group input::placeholder { color: #64748b; }
body.dark .empty-state { color: #64748b; }
body.dark .btn-outline { border-color: rgba(148,163,184,0.3); color: #e2e8f0; }
body.dark .btn-outline:hover { background: rgba(148,163,184,0.1); }
body.dark .btn-ghost { color: #94a3b8; }
body.dark .btn-ghost:hover { background: rgba(148,163,184,0.1); color: #e2e8f0; }
body.dark .modal-close { background: #334155; color: #e2e8f0; }
body.dark .modal-close:hover { background: #475569; }
body.dark .dark-mode-toggle { border-color: rgba(148,163,184,0.3); background: rgba(148,163,184,0.1); color: #e2e8f0; }
body.dark .dark-mode-toggle:hover { background: rgba(148,163,184,0.2); }
body.dark .badge { background: #334155; color: #e2e8f0; }
body.dark .badge-success { background: rgba(34,197,94,0.15) !important; color: #86efac !important; }
body.dark .badge-secondary { background: rgba(148,163,184,0.15) !important; color: #94a3b8 !important; }
body.dark .badge-warning { background: rgba(245,158,11,0.15) !important; color: #fcd34d !important; }
body.dark .badge-danger { background: rgba(239,68,68,0.15) !important; color: #fca5a5 !important; }
body.dark .front-user-dropdown { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .front-user-dropdown-header { border-bottom-color: rgba(71,85,105,0.3); }
body.dark .front-user-dropdown-name { color: #f1f5f9; }
body.dark .front-user-dropdown-email { color: #94a3b8; }
body.dark .front-user-dropdown-item { color: #e2e8f0; }
body.dark .front-user-dropdown-item:hover { background: rgba(99,102,241,0.1); }
body.dark .front-user-dropdown-divider { background: rgba(71,85,105,0.3); }
body.dark .toast { background: #1e293b; color: #e2e8f0; border-color: rgba(71,85,105,0.3); }
body.dark .modal-overlay { background: rgba(0,0,0,0.7); }
body.dark .confirm-dialog { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .confirm-dialog-title { color: #f1f5f9; }
body.dark .confirm-dialog-message { color: #94a3b8; }
body.dark .confirm-dialog-btn-cancel { background: #334155; color: #e2e8f0; }
body.dark .action-btn { background: rgba(30,41,59,0.6); color: #94a3b8; border-color: rgba(71,85,105,0.3); }
body.dark .action-btn:hover { background: rgba(99,102,241,0.15); color: #a5b4fc; border-color: rgba(99,102,241,0.3); }
body.dark .pagination button { background: #1e293b; color: #e2e8f0; border-color: rgba(71,85,105,0.3); }
body.dark .pagination button.active { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; }

body.dark .dark-mode-toggle { border-color: rgba(148,163,184,0.3); background: rgba(148,163,184,0.1); color: #e2e8f0; }
body.dark .dark-mode-toggle:hover { background: rgba(148,163,184,0.2); }
body.dark .admin-menu-toggle { color: #94a3b8; }
body.dark .admin-menu-toggle:hover { background: rgba(148,163,184,0.1); color: #e2e8f0; }
body.dark .file-drop-zone { background: #1e293b; border-color: rgba(71,85,105,0.3); color: #94a3b8; }
body.dark .file-drop-zone:hover { border-color: #6366f1; background: rgba(99,102,241,0.05); }
body.dark .tpl-card { background: #191c27; }
body.dark .tpl-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
body.dark .tpl-btn-current { background: rgba(148,163,184,0.1); color: #6b7280; }
body.dark .tpl-btn-use { background: #ec4899; }
body.dark .tpl-btn-use:hover { background: #db2777; }
body.dark .tpl-preview { background: #131620; }
body.dark .tpl-preview-fallback { background: linear-gradient(135deg, #131620, #1a1d29); }
body.dark .tpl-header-left h3 { color: #e2e5ec; }
body.dark .tpl-header-left p { color: #6b7280; }
body.dark .tpl-select { background-color: #191c27; border-color: rgba(71,85,105,0.25); color: #e2e5ec; }
body.dark .tpl-select:focus { border-color: #ec4899; }
body.dark .tpl-save-btn { background: #ec4899; }
body.dark .fs-card { background: #191c27; border-color: rgba(71,85,105,0.2); }
body.dark .fs-card:hover { border-color: rgba(99,102,241,0.3); }
body.dark .fs-info strong { color: #e2e5ec; }
body.dark .fs-info span { color: #6b7280; }
body.dark .fs-icon { background: rgba(71,85,105,0.15); border-color: rgba(71,85,105,0.15); }
body.dark .fs-group-header h4 { color: #e2e5ec; }
body.dark .fs-group-count { background: rgba(148,163,184,0.1); color: #6b7280; }
body.dark .fs-tag { background: rgba(34,197,94,0.12); }
body.dark .fs-actions { border-top-color: rgba(71,85,105,0.15); }
body.dark .fs-save-btn { background: linear-gradient(135deg, #ec4899, #db2777); }
body.dark .fs-save-btn:hover { opacity: 0.9; }
body.dark .license-status-valid { background: rgba(34,197,94,0.1); color: #86efac; }
body.dark .license-status-invalid { background: rgba(239,68,68,0.1); color: #fca5a5; }
body.dark .stat-card { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .stat-card-value { color: #f1f5f9; }
body.dark .stat-card-label { color: #94a3b8; }
body.dark .setting-row { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .setting-row:hover { background: #252f47; }
body.dark .setting-label { color: #e2e8f0; }
body.dark .setting-desc { color: #94a3b8; }
body.dark .setting-value { color: #cbd5e1; }
body.dark .log-item { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .log-item:hover { background: #252f47; }
body.dark .log-time { color: #64748b; }
body.dark .log-user { color: #e2e8f0; }
body.dark .log-action { color: #94a3b8; }
body.dark .comment-item { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .comment-item:hover { background: #252f47; }
body.dark .comment-author { color: #e2e8f0; }
body.dark .comment-content { color: #94a3b8; }
body.dark .user-item { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .user-item:hover { background: #252f47; }
body.dark .user-name { color: #e2e8f0; }
body.dark .user-email { color: #94a3b8; }
body.dark .pagination button { background: #1e293b; color: #e2e8f0; border-color: rgba(71,85,105,0.3); }
body.dark .pagination button:hover { background: #252f47; }
body.dark .pagination button.active { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; }
body.dark .icon-picker-wrapper { background: #0f1729; border-color: rgba(99,102,241,0.15); }
body.dark .icon-picker-search { background: #0f1729; color: #e2e8f0; border-bottom-color: #1e293b; }
body.dark .icon-picker-categories { background: #0d1520; border-bottom-color: #1e293b; }
body.dark .icon-picker-grid button { background: #1a2332; border-color: rgba(71,85,105,0.3); }
body.dark .icon-picker-grid button:hover { background: #1e293b; border-color: #4f46e5; }
body.dark .toast { background: #1e293b; color: #e2e8f0; border-color: rgba(71,85,105,0.3); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
body.dark .toast-success { border-left-color: #22c55e; }
body.dark .toast-error { border-left-color: #ef4444; }
body.dark .toast-warning { border-left-color: #f59e0b; }
body.dark .modal-overlay { background: rgba(0,0,0,0.7); }
body.dark .confirm-dialog { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .confirm-dialog-title { color: #f1f5f9; }
body.dark .confirm-dialog-message { color: #94a3b8; }
body.dark .confirm-dialog-btn-cancel { background: #334155; color: #e2e8f0; }
body.dark .confirm-dialog-btn-cancel:hover { background: #475569; }
body.dark .confirm-dialog-btn-confirm { background: linear-gradient(135deg, #6366f1, #4f46e5); }
body.dark .loading-overlay { background: rgba(15,23,42,0.8); }
body.dark .spinner { border-color: rgba(99,102,241,0.2); border-top-color: #6366f1; }
body.dark .badge { background: #334155; color: #e2e8f0; }
body.dark .badge-success { background: rgba(34,197,94,0.15) !important; color: #86efac !important; }
body.dark .badge-secondary { background: rgba(148,163,184,0.15) !important; color: #94a3b8 !important; }
body.dark .badge-warning { background: rgba(245,158,11,0.15) !important; color: #fcd34d !important; }
body.dark .badge-danger { background: rgba(239,68,68,0.15) !important; color: #fca5a5 !important; }
body.dark .help-text { color: #64748b; }
body.dark .section-title { color: #f1f5f9; }
body.dark .section-desc { color: #94a3b8; }
body.dark .code-block { background: #0f172a; color: #e2e8f0; border-color: rgba(71,85,105,0.3); }
body.dark .preview-panel { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .color-picker-input { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .drag-handle { color: #64748b; }
body.dark .drag-handle:hover { color: #94a3b8; }
body.dark .sort-indicator { color: #64748b; }
body.dark .filter-bar { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .filter-bar input { background: #0f172a; color: #f1f5f9; border-color: rgba(71,85,105,0.3); }
body.dark .filter-bar select { background: #0f172a; color: #f1f5f9; border-color: rgba(71,85,105,0.3); }
body.dark .tag { background: #334155; color: #e2e8f0; }
body.dark .tag:hover { background: #475569; }
body.dark .tag-primary { background: rgba(99,102,241,0.15); color: #a5b4fc; }
body.dark .tag-success { background: rgba(34,197,94,0.15); color: #86efac; }
body.dark .tag-danger { background: rgba(239,68,68,0.15); color: #fca5a5; }
body.dark .progress-bar { background: #334155; }
body.dark .progress-bar-fill { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
body.dark .chart-container { background: #1e293b; border-color: rgba(71,85,105,0.3); }
body.dark .chart-label { color: #94a3b8; }
body.dark .chart-value { color: #f1f5f9; }
body.dark .tooltip { background: #1e293b; color: #e2e8f0; border-color: rgba(71,85,105,0.3); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
body.dark .divider { border-color: rgba(71,85,105,0.3); }
body.dark .scrollbar::-webkit-scrollbar-track { background: #0f172a; }
body.dark .scrollbar::-webkit-scrollbar-thumb { background: #334155; }
body.dark .scrollbar::-webkit-scrollbar-thumb:hover { background: #475569; }
body.dark .kbd { background: #1e293b; color: #e2e8f0; border-color: rgba(71,85,105,0.3); box-shadow: 0 1px 0 rgba(71,85,105,0.3); }
body.dark .highlight { background: rgba(99,102,241,0.15); color: #a5b4fc; }
body.dark .muted { color: #64748b; }
body.dark .text-primary { color: #f1f5f9; }
body.dark .text-secondary { color: #94a3b8; }
body.dark .text-tertiary { color: #64748b; }
body.dark .text-success { color: #86efac; }
body.dark .text-danger { color: #fca5a5; }
body.dark .text-warning { color: #fcd34d; }
body.dark .bg-primary { background: #1e293b; }
body.dark .bg-secondary { background: #0f172a; }
body.dark .border-subtle { border-color: rgba(71,85,105,0.3); }

.dark-mode-toggle {
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    transition: all 0.2s;
    line-height: 1;
}
.dark-mode-toggle:hover { background: rgba(255,255,255,0.15); }

/* ==================== v1.1 Markdown编辑器 ==================== */
.markdown-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(241,245,249,0.6);
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    align-items: center;
}
.markdown-editor-toolbar button {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.markdown-editor-toolbar button:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.markdown-editor {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: #fff;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.7;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    min-height: 200px;
}
.markdown-editor:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.markdown-preview {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 10px 10px;
    background: #fff;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.7;
}
.markdown-preview h1, .markdown-preview h2, .markdown-preview h3,
.markdown-preview h4, .markdown-preview h5, .markdown-preview h6 {
    margin-top: 16px;
    margin-bottom: 8px;
    color: #1e293b;
}
.markdown-preview p { margin-bottom: 10px; color: #334155; }
.markdown-preview code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #ef4444;
}
.markdown-preview pre {
    background: #0f172a;
    padding: 14px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 12px;
}
.markdown-preview pre code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
    font-size: 13px;
}
.markdown-preview blockquote {
    border-left: 3px solid #818cf8;
    padding-left: 12px;
    margin: 10px 0;
    color: #64748b;
}
.markdown-preview ul { margin: 8px 0; padding-left: 20px; }
.markdown-preview li { margin: 4px 0; }
.markdown-preview img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.markdown-preview a { color: #6366f1; }
.markdown-preview hr { border: none; border-top: 1px solid #e2e8f0; margin: 16px 0; }

/* 暗黑模式下的Markdown编辑器 */
body.dark .markdown-editor-toolbar {
    background: rgba(30,41,59,0.6);
    border-color: rgba(71,85,105,0.3);
}
body.dark .markdown-editor-toolbar button {
    background: rgba(30,41,59,0.8);
    color: #cbd5e1;
    border-color: rgba(71,85,105,0.3);
}
body.dark .markdown-editor-toolbar button:hover {
    background: rgba(51,65,85,0.8);
}
body.dark .markdown-editor {
    background: rgba(15,23,42,0.6);
    color: #f1f5f9;
    border-color: rgba(71,85,105,0.3);
}
body.dark .markdown-preview {
    background: rgba(15,23,42,0.6);
    border-color: rgba(71,85,105,0.3);
}
body.dark .markdown-preview h1,
body.dark .markdown-preview h2,
body.dark .markdown-preview h3,
body.dark .markdown-preview h4,
body.dark .markdown-preview h5,
body.dark .markdown-preview h6 { color: #f1f5f9; }
body.dark .markdown-preview p { color: #cbd5e1; }
body.dark .markdown-preview code { background: rgba(30,41,59,0.8); color: #fca5a5; }
body.dark .markdown-preview pre { background: #0f172a; }
body.dark .markdown-preview pre code { color: #e2e8f0; }
body.dark .markdown-preview blockquote { color: #94a3b8; border-left-color: #818cf8; }
body.dark .markdown-preview a { color: #a5b4fc; }
body.dark .markdown-preview hr { border-top-color: rgba(71,85,105,0.3); }

/* ==================== v1.1 移动端响应式 - 个人中心/前台模态框 ==================== */
@media (max-width: 768px) {
    /* 前台模态框（登录/注册/个人中心）手机全屏 */
    .modal.front-modal {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
    }
    .modal.front-modal .modal-content {
        max-width: 100%;
        width: 100%;
        height: 100dvh;
        margin: 0;
        border-radius: 0;
    }
    .modal.front-modal .modal-header {
        padding: 20px 16px 0;
    }
    .modal.front-modal .modal-header h3 {
        font-size: 18px;
    }
    .modal.front-modal .modal-body {
        padding: 16px;
    }
    /* pc2-wrap 手机全屏 */
    .pc2-wrap {
        max-width: 100%;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }
    .pc2-hero-inner { padding: 32px 20px 20px; }
    .pc2-avatar-box { width: 64px; height: 64px; }
    .pc2-avatar-box span { font-size: 26px; }
    .pc2-hero-name { font-size: 18px; }
    .pc2-tab { font-size: 13px; padding: 14px 4px; }
    .pc2-body { padding: 20px 16px 24px; max-height: none; flex: 1; overflow-y: auto; }
    .pc2-input { font-size: 16px; }
    .pc2-close { top: 10px; right: 10px; }
    /* 管理面板移动端 */
    .modal-content.modal-large,
    .modal-large {
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
        margin: 0;
    }
    .modal-content.modal-large .modal-body,
    .modal-large .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .modal-large .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .modal-large .settings-form .form-grid {
        grid-template-columns: 1fr;
    }
    /* 后台管理 - 移动端卡片列表 */
.mobile-card-list { display: none; flex-direction: column; gap: 12px; padding: 12px 0; }
.mobile-card { background: var(--card-strong); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.mobile-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mobile-card-title { font-weight: 600; font-size: 15px; color: var(--text); }
.mobile-card-body { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.mobile-card-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.mobile-card-row span:first-child { color: #94a3b8; }
.mobile-card-row span:last-child { color: var(--text); font-weight: 500; }
.mobile-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 768px) {
    .mobile-card-list { display: flex; }
    #adPricesTableWrap, #adLinksTableWrap { display: none; }
    .panel-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .panel-toolbar > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
    .panel-toolbar select.form-select-sm { flex: 1; min-width: 120px; }
}
}

/* ==================== 前台广告展示 ==================== */

.sp-top {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 0 24px;
}

.sp-link {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sp-link:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.sp-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg2);
}

.sp-content {
    flex: 1;
    min-width: 0;
}

.sp-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-url {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-badge {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* 广告图片统一尺寸 */
.sp-img-el {
    width: auto;
    max-width: 100%;
    max-height: 140px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.sp-label {
    text-align: center;
    padding: 6px 8px 4px;
    font-size: 13px;
    color: var(--muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .sp-img-el {
        max-height: 100px;
    }
    .sp-label {
        font-size: 12px;
        padding: 4px 6px 2px;
    }
}

/* 广告卡片（内嵌在导航网格中） */
.sp-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(56,189,248,0.06), rgba(167,139,250,0.06));
    border: 1px dashed var(--accent);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.sp-card:hover {
    background: linear-gradient(135deg, rgba(56,189,248,0.1), rgba(167,139,250,0.1));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.sp-card::before {
    content: '广告';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 9px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(56,189,248,0.1);
    padding: 1px 6px;
    border-radius: 4px;
}

.sp-card-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg2);
}

.sp-card-content {
    flex: 1;
    min-width: 0;
}

.sp-card-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-card-url {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 移动端广告适配 */
@media (max-width: 768px) {
    .sp-top {
        padding: 0 12px;
        margin-bottom: 16px;
    }
    .sp-link {
        padding: 10px 14px;
        gap: 10px;
    }
    .sp-img {
        width: 36px;
        height: 36px;
    }
    .sp-title {
        font-size: 13px;
    }
}

/* ==================== v1.1 收录审核全新UI ==================== */
.submission-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.submission-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.submission-card:hover {
    box-shadow: 0 8px 24px rgba(99,102,241,0.1);
    border-color: #c7d2fe;
    transform: translateY(-2px);
}

.sub-card-pending {
    border-left: 4px solid #f59e0b;
}

.sub-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.sub-card-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(34,211,238,0.12));
    font-size: 22px;
}

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

.sub-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
}

.sub-card-url a {
    font-size: 12px;
    color: #6366f1;
    text-decoration: none;
    word-break: break-all;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.15s;
}

.sub-card-url a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.sub-card-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

/* 状态徽章 */
.sub-status-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.sub-status-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.sub-status-approved {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.sub-status-rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* 元数据行 */
.sub-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.sub-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #94a3b8;
}

.sub-meta-remark {
    color: #f59e0b !important;
}

/* 操作按钮 */
.sub-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.sub-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: #475569;
}

.sub-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.sub-action-btn svg {
    flex-shrink: 0;
}

.sub-action-approve {
    color: #059669;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.sub-action-approve:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
}

.sub-action-reject {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.sub-action-reject:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.sub-action-edit {
    color: #6366f1;
    border-color: #c7d2fe;
    background: #eef2ff;
}

.sub-action-edit:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
}

.sub-action-delete {
    color: #64748b;
    border-color: #e2e8f0;
}

.sub-action-delete:hover {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

/* 统计栏 */
.submission-stats-bar {
    display: flex;
    gap: 8px;
    padding: 12px 0 4px;
    flex-wrap: wrap;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.stat-chip-total {
    background: #f1f5f9;
    color: #475569;
}

.stat-chip-pending {
    background: #fef3c7;
    color: #92400e;
}

.stat-chip-approved {
    background: #d1fae5;
    color: #065f46;
}

.stat-chip-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* 过滤按钮 */
.submission-filter-bar .filter-btn {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.submission-filter-bar .filter-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.submission-filter-bar .filter-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: subSpinner 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes subSpinner {
    to { transform: rotate(360deg); }
}

@keyframes subToastIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 暗黑模式适配 */
body.dark .submission-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.3);
}

body.dark .submission-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(30, 41, 59, 0.95);
}

body.dark .sub-card-title {
    color: #e2e8f0;
}

body.dark .sub-card-desc {
    color: #94a3b8;
}

body.dark .sub-card-meta,
body.dark .sub-card-actions {
    border-top-color: rgba(71, 85, 105, 0.3);
}

body.dark .sub-action-btn {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.3);
    color: #cbd5e1;
}

body.dark .sub-action-approve {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.1);
}

body.dark .sub-action-approve:hover {
    background: rgba(52, 211, 153, 0.2);
}

body.dark .sub-action-reject {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.1);
}

body.dark .sub-action-reject:hover {
    background: rgba(248, 113, 113, 0.2);
}

body.dark .sub-action-edit {
    color: #a5b4fc;
    border-color: rgba(165, 180, 252, 0.3);
    background: rgba(165, 180, 252, 0.1);
}

body.dark .sub-action-edit:hover {
    background: rgba(165, 180, 252, 0.2);
}

body.dark .sub-action-delete:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.15);
}

body.dark .stat-chip-total {
    background: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
}

body.dark .submission-filter-bar .filter-btn {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.3);
    color: #94a3b8;
}

body.dark .submission-filter-bar .filter-btn:hover {
    background: rgba(30, 41, 59, 0.9);
}

body.dark .submission-filter-bar .filter-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

body.dark .sub-card-icon {
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(34,211,238,0.2));
}

/* =========================================
   Admin: Category & Nav Management
   Class prefix: ac-/an- (unique to admin, no conflicts)
   Principle: operations always visible, clean & professional
   ========================================= */

/* ---------- 分类卡片网格 ---------- */
.ac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  padding: 8px 0;
}

.ac-card {
  position: relative;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e8ecf0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.ac-card:hover {
  border-color: #c8ccd4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.ac-card .ac-bar {
  width: 100%;
  height: 3px;
  flex-shrink: 0;
}

.ac-card .ac-body {
  padding: 18px 14px 12px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ac-card .ac-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: #f5f7fa;
}

.ac-card .ac-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-card .ac-meta {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 12px;
}

.ac-card .ac-acts {
  display: flex;
  gap: 4px;
  padding: 8px 14px 10px;
  width: 100%;
  justify-content: center;
  border-top: 1px solid #f0f2f5;
}

.ac-card .ac-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: none;
  background: #f1f5f9;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #64748b;
  transition: background 0.12s, color 0.12s;
}
.ac-card .ac-btn.ae:hover { background: #6366f1; color: #fff; }
.ac-card .ac-btn.ad:hover { background: #ef4444; color: #fff; }

/* 分类空状态 */
.ac-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 2px dashed #d1d5db;
  color: #94a3b8;
}
.ac-empty .ei { font-size: 36px; margin-bottom: 8px; display: block; }
.ac-empty .et { font-size: 13px; font-weight: 500; }

/* ---------- 导航列表 ---------- */
.an-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
}

.an-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8ecf0;
  cursor: default;
  transition: border-color 0.12s;
}
.an-row:hover { border-color: #c8ccd4; }

.an-row .an-bar {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
}

.an-row .an-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: #f5f7fa;
}

.an-row .an-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.an-row .an-tl {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-row .an-desc {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
  line-height: 1.3;
}

.an-row .an-link {
  font-size: 10.5px;
  color: #6366f1;
  background: #eef2ff;
  padding: 1px 8px;
  border-radius: 4px;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  letter-spacing: -0.2px;
  margin: 1px 0;
}
.an-row .an-link:hover { background: #6366f1; color: #fff; cursor: pointer; }

.an-row .an-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.an-row .an-tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}
.an-row .an-tag.tc { background: #dcfce7; color: #15803d; }
.an-row .an-tag.ts { background: #f1f5f9; color: #64748b; font-family: monospace; }

.an-row .an-acts {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.an-row .an-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #94a3b8;
  transition: background 0.1s, color 0.1s;
}
.an-row .an-btn:hover { background: #f1f5f9; }
.an-row .an-btn.ae:hover { background: #eef2ff; color: #4f46e5; }
.an-row .an-btn.ad:hover { background: #fef2f2; color: #dc2626; }

/* 导航空状态 */
.an-empty {
  text-align: center;
  padding: 60px 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 2px dashed #d1d5db;
  color: #94a3b8;
}
.an-empty .ei { font-size: 36px; margin-bottom: 8px; display: block; }
.an-empty .et { font-size: 13px; font-weight: 500; }

/* ---------- 筛选下拉框 ---------- */
.an-filter {
  padding: 6px 30px 6px 11px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%239093a4' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: border-color 0.12s;
}
.an-filter:focus { border-color: #6366f1; }

.toolbar-right { display: flex; align-items: center; gap: 10px; }

/* ---------- 模态框 ---------- */
.form-modal .modal-content { max-width: 480px; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 16px 40px -8px rgba(0,0,0,0.12); }
.form-modal-content .modal-header { background: #f8fafc; border-bottom: 1px solid #e8ecf0; padding: 14px 20px; flex-shrink: 0; }
.form-modal-content .modal-body { overflow-y: auto; flex: 1; min-height: 0; }
.form-modal-content .modal-header h3 { margin: 0; font-size: 14px; color: #1e293b; font-weight: 600; }
.elegant-form .form-group { margin-bottom: 14px; }
.elegant-form .form-group label { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: #475569; margin-bottom: 4px; }
.elegant-form .form-group input,
.elegant-form .form-group select {
  width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid #e2e8f0;
  background: #fff; color: #1e293b; font-size: 12.5px; outline: none; transition: border-color 0.12s; box-sizing: border-box;
}
.elegant-form .form-group input:focus,
.elegant-form .form-group select:focus { border-color: #6366f1; }
.elegant-form .form-group input::placeholder { color: #94a3b8; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #e8ecf0; }
.label-icon { font-size: 13px; }
.btn-ghost { padding: 8px 16px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; color: #64748b; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background 0.1s; }
.btn-ghost:hover { background: #f8fafc; }
.btn-primary { padding: 8px 18px; border-radius: 8px; border: none; background: #6366f1; color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background 0.1s; display: inline-flex; align-items: center; gap: 4px; }
.btn-primary:hover { background: #4f46e5; }
.form-modal { animation: fIn 0.12s ease; }
@keyframes fIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== Dark mode ===== */
body.dark .ac-card { background: #191c27; border-color: rgba(71,85,105,0.2); }
body.dark .ac-card:hover { border-color: rgba(99,102,241,0.3); }
body.dark .ac-card .ac-name { color: #e2e5ec; }
body.dark .ac-card .ac-meta { background: rgba(148,163,184,0.08); color: #6b7280; }
body.dark .ac-card .ac-acts { border-top-color: rgba(71,85,105,0.15); }
body.dark .ac-card .ac-btn { background: rgba(148,163,184,0.08); color: #6b7280; }
body.dark .ac-card .ac-btn.ae:hover { background: #6366f1; color: #fff; }
body.dark .ac-card .ac-btn.ad:hover { background: #ef4444; color: #fff; }
body.dark .ac-empty { background: #131620; border-color: rgba(71,85,105,0.2); color: #6b7280; }

body.dark .an-row { background: #191c27; border-color: rgba(71,85,105,0.2); }
body.dark .an-row:hover { border-color: rgba(99,102,241,0.3); }
body.dark .an-row .an-tl { color: #e2e5ec; }
body.dark .an-row .an-desc { color: #6b7280; }
body.dark .an-row .an-link { background: rgba(99,102,241,0.12); color: #a5b4fc; font-family: "SF Mono", "Menlo", "Consolas", monospace; }
body.dark .an-row .an-link:hover { background: #6366f1; color: #fff; }
body.dark .an-row .an-tag.tc { background: rgba(22,163,74,0.12); color: #86efac; }
body.dark .an-row .an-tag.ts { background: rgba(148,163,184,0.08); color: #6b7280; }
body.dark .an-row .an-btn { color: #6b7280; }
body.dark .an-row .an-btn:hover { background: rgba(148,163,184,0.08); }
body.dark .an-row .an-btn.ae:hover { background: rgba(99,102,241,0.15); color: #a5b4fc; }
body.dark .an-row .an-btn.ad:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }
body.dark .an-empty { background: #131620; border-color: rgba(71,85,105,0.2); color: #6b7280; }
body.dark .an-filter { background-color: #191c27; border-color: rgba(71,85,105,0.25); color: #e2e5ec; }
body.dark .an-filter:focus { border-color: #6366f1; }
body.dark .form-modal-content .modal-header { background: #191c27; border-bottom-color: rgba(71,85,105,0.12); }
body.dark .form-modal-content .modal-header h3 { color: #e2e5ec; }
body.dark .elegant-form .form-group label { color: #6b7280; }
body.dark .elegant-form .form-group input,
body.dark .elegant-form .form-group select { background: #191c27; border-color: rgba(71,85,105,0.25); color: #e2e5ec; }
body.dark .elegant-form .form-group input:focus,
body.dark .elegant-form .form-group select:focus { border-color: #6366f1; }
body.dark .btn-ghost { background: #191c27; border-color: rgba(71,85,105,0.25); color: #6b7280; }
body.dark .btn-ghost:hover { background: #1f2332; }
body.dark .btn-primary { background: #4f46e5; color: #fff; }
body.dark .btn-primary:hover { background: #6366f1; }
body.dark .form-actions { border-top-color: rgba(71,85,105,0.1); }

/* ==================== 全局暗黑模式基础样式 ==================== */
body.dark {
    background: #0f172a;
    color: #e2e8f0;
}
body.dark a { color: #93c5fd; }
body.dark .sk-section-title { color: #e2e8f0; }
body.dark .sk-header h1 { -webkit-text-fill-color: #f472b6; }
body.dark .sk-header p, body.dark .sk-section-count, body.dark .sk-nav-desc, body.dark .sk-footer { color: #94a3b8; }
body.dark .sk-search { background: rgba(30,41,59,0.8); color: #e2e8f0; }
body.dark .sk-search::placeholder { color: #64748b; }
body.dark .sk-nav { background: rgba(30,41,59,0.75); border-color: rgba(255,255,255,0.08); }
body.dark .sk-nav-title { color: #e2e8f0; }
body.dark .sk-section-icon { background: rgba(30,41,59,0.7); }

/* 确保所有主要文字元素在暗黑模式下可见 */
body.dark .nav-title,
body.dark .dark-nav-name,
body.dark .aurora-nav-name,
body.dark .frosted-nav-title,
body.dark .modern-nav-title,
body.dark .purple-nav-name,
body.dark .nitai-nav-card .nav-title,
body.dark .anime-nav-title,
body.dark .business-nav-title,
body.dark .fresh-nav-title,
body.dark .minimal-nav-title,
body.dark .dashboard-nav-title,
body.dark .nav-name {
    color: #e2e8f0 !important;
}

body.dark .nav-desc,
body.dark .dark-nav-desc,
body.dark .aurora-nav-desc,
body.dark .frosted-nav-desc,
body.dark .modern-nav-desc,
body.dark .purple-nav-desc,
body.dark .nitai-nav-card .nav-desc,
body.dark .anime-nav-desc,
body.dark .business-nav-desc,
body.dark .fresh-nav-desc,
body.dark .minimal-nav-desc,
body.dark .dashboard-nav-desc {
    color: #94a3b8 !important;
}

body.dark .category-title,
body.dark .section-title,
body.dark .dark-category-title,
body.dark .aurora-category-title,
body.dark .frosted-category-title,
body.dark .modern-category-title,
body.dark .purple-category-title,
body.dark .nitai-category-title,
body.dark .anime-category-title,
body.dark .business-category-title,
body.dark .fresh-category-title,
body.dark .minimal-category-title,
body.dark .dashboard-category-title {
    color: #e2e8f0 !important;
}

body.dark header h1,
body.dark .site-name,
body.dark .brand-title {
    color: #e2e8f0 !important;
}

body.dark header p,
body.dark .site-subtitle,
body.dark .brand-subtitle {
    color: #94a3b8 !important;
}

body.dark .search-box input,
body.dark input[type="text"] {
    color: #e2e8f0;
}

body.dark .footer,
body.dark footer {
    color: #94a3b8;
}

body.dark footer a {
    color: #93c5fd;
}

.home-aurora:not(.dark) .aurora-nav-name,
.home-dark-tech:not(.dark) .dark-nav-name {
    color: #fff;
}
.home-aurora:not(.dark) .aurora-nav-desc,
.home-dark-tech:not(.dark) .dark-nav-desc {
    color: rgba(200,210,255,0.65);
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  /* 导航列表 - 移动端横排元素太多，折行排列 */
  .an-row {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    position: relative;
  }
  .an-row .an-bar {
    display: none;
  }
  .an-row .an-ico {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  .an-row .an-info {
    flex: 1 1 55%;
    min-width: 120px;
  }
  .an-row .an-tl {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .an-row .an-desc {
    font-size: 10.5px;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .an-row .an-link {
    font-size: 10px;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
  }
  .an-row .an-tags {
    flex-shrink: 0;
  }
  .an-row .an-acts {
    opacity: 1 !important;
    flex-shrink: 0;
  }

  /* 分类卡片网格 - 移动端单列 */
  .ac-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ac-card {
    flex-direction: row;
    text-align: left;
    align-items: stretch;
  }
  .ac-card .ac-bar {
    width: 4px;
    height: auto;
  }
  .ac-card .ac-body {
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 10px 12px 12px;
  }
  .ac-card .ac-icon {
    width: 36px;
    height: 36px;
    font-size: 17px;
    flex-shrink: 0;
  }
  .ac-card .ac-name {
    font-size: 13px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .ac-card .ac-meta {
    font-size: 10px;
    padding: 1px 8px;
    flex-shrink: 0;
  }
  .ac-card .ac-acts {
    width: auto;
    flex-direction: column;
    border-top: none;
    border-left: 1px solid #f0f2f5;
    padding: 8px 8px 8px 6px;
    justify-content: center;
  }
  body.dark .ac-card .ac-acts {
    border-left-color: rgba(71,85,105,0.15);
  }

  /* 工具栏适配 */
  .panel-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .toolbar-right {
    width: 100%;
    justify-content: stretch;
  }
  .toolbar-right select {
    flex: 1;
    min-width: 0;
  }
  .toolbar-right .btn {
    white-space: nowrap;
  }
}

/* ===== Payment Config (Redesigned - Card Group Layout) ===== */
.pay-form { max-width: 720px; }
.pay-header { margin-bottom: 24px; }
.pay-header-left h3 { margin: 0; font-size: 18px; font-weight: 700; color: #0f172a; }
.pay-header-left p { margin: 3px 0 0; font-size: 13px; color: #64748b; }

.pay-section {
  margin-bottom: 20px; background: #fff; border: 1px solid #edeff2;
  border-radius: 16px; padding: 18px 20px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
  transition: box-shadow 0.2s;
}
.pay-section:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.04); }

.pay-section-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid #f0f2f5;
}
.pay-section-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; flex-shrink: 0;
}
.pay-section-head h4 { margin: 0; font-size: 15px; font-weight: 700; color: #0f172a; }
.pay-section-count, .pay-section-badge {
  margin-left: auto; font-size: 11px; font-weight: 500; color: #94a3b8;
  background: #f1f5f9; padding: 2px 12px; border-radius: 999px;
}
.pay-section-badge { font-weight: 600; }

.pay-toggle-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 16px; background: #f8fafc; border-radius: 12px;
}
.pay-toggle-banner-left { display: flex; flex-direction: column; gap: 2px; }
.pay-toggle-banner-left strong { font-size: 14px; font-weight: 700; color: #0f172a; }
.pay-toggle-banner-left span { font-size: 12px; color: #64748b; line-height: 1.3; }

.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-method-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 16px; background: #f8fafc; border-radius: 12px;
  transition: background 0.15s;
}
.pay-method-card:hover { background: #f1f5f9; }
.pay-method-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.pay-method-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.pay-method-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pay-method-info strong { font-size: 14px; font-weight: 700; color: #0f172a; }
.pay-method-info span { font-size: 11.5px; color: #64748b; }

.pay-field { margin-bottom: 14px; }
.pay-field:last-child { margin-bottom: 0; }
.pay-field-label {
  display: block; font-size: 13px; font-weight: 600;
  color: #334155; margin-bottom: 6px;
}
.pay-input-wrap { position: relative; display: flex; align-items: center; }
.pay-input-icon { position: absolute; left: 12px; font-size: 15px; pointer-events: none; z-index: 1; }
.pay-input {
  width: 100%; padding: 10px 14px 10px 38px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  font-size: 13.5px; color: #0f172a; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pay-input:focus { border-color: #f472b6; box-shadow: 0 0 0 3px rgba(244,114,182,0.1); background: #fff; }
.pay-input::placeholder { color: #94a3b8; }
.pay-input-pwd .pay-input { padding-right: 40px; }
.pay-field-hint { margin: 5px 0 0; font-size: 11.5px; color: #94a3b8; line-height: 1.4; }

.pay-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.pay-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; border-radius: 8px;
  background: transparent; cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 14px; z-index: 1;
}
.pay-eye:hover { background: #f1f5f9; }

.pay-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; cursor: pointer; }
.pay-switch input { opacity: 0; width: 0; height: 0; }
.pay-slider {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px;
  transition: background 0.25s ease;
}
.pay-slider::before {
  content: ""; position: absolute; height: 22px; width: 22px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.pay-switch input:checked + .pay-slider { background: #f472b6; }
.pay-switch input:checked + .pay-slider::before { transform: translateX(20px); box-shadow: 0 2px 8px rgba(244,114,182,0.3); }
.pay-switch input:focus + .pay-slider { box-shadow: 0 0 0 3px rgba(244,114,182,0.15); }

.pay-submit {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 32px; border-radius: 10px; border: none;
  background: linear-gradient(135deg, #f472b6, #ec4899);
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity 0.12s, transform 0.1s; margin-top: 4px;
}
.pay-submit:hover { opacity: 0.92; }
.pay-submit:active { transform: scale(0.97); }

@media (max-width: 768px) {
  .pay-section { padding: 14px 16px 16px; }
  .pay-field-row { grid-template-columns: 1fr; gap: 0; }
  .pay-toggle-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pay-submit { width: 100%; justify-content: center; }
}

body.dark .pay-section { background: #191c27; border-color: rgba(71,85,105,0.2); }
body.dark .pay-section-head { border-bottom-color: rgba(71,85,105,0.15); }
body.dark .pay-section-head h4 { color: #e2e5ec; }
body.dark .pay-header-left h3 { color: #e2e5ec; }
body.dark .pay-header-left p { color: #6b7280; }
body.dark .pay-toggle-banner { background: rgba(71,85,105,0.12); }
body.dark .pay-toggle-banner-left strong { color: #e2e5ec; }
body.dark .pay-toggle-banner-left span { color: #6b7280; }
body.dark .pay-method-card { background: rgba(71,85,105,0.12); }
body.dark .pay-method-card:hover { background: rgba(71,85,105,0.2); }
body.dark .pay-method-info strong { color: #e2e5ec; }
body.dark .pay-method-info span { color: #6b7280; }
body.dark .pay-input { background: rgba(71,85,105,0.1); border-color: rgba(71,85,105,0.2); color: #e2e5ec; }
body.dark .pay-input:focus { background: rgba(71,85,105,0.15); border-color: #ec4899; }
body.dark .pay-field-label { color: #cbd5e1; }
body.dark .pay-section-count, body.dark .pay-section-badge { background: rgba(148,163,184,0.1); color: #6b7280; }
body.dark .pay-eye:hover { background: rgba(71,85,105,0.2); }

/* ============================================================
   ADMIN PANEL - REDESIGNED PAGE STYLES
   Modern card-based layout with glassmorphism & smooth animations
   ============================================================ */

/* ---------- Keyframe Animations ---------- */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* ---------- Common Page Wrapper ---------- */
.admin-page {
  padding: 0;
  animation: pageFadeIn 0.5s ease;
}

/* ---------- Page Header ---------- */
.admin-page-header {
  position: relative;
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 28px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  transition: box-shadow 0.3s ease;
}

.admin-page-header:hover {
  box-shadow: 0 14px 48px rgba(0,0,0,0.16);
}

.admin-page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}

.admin-page-header .header-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.admin-page-header .header-text h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}

.admin-page-header .header-text p {
  font-size: 15px;
  margin: 0;
  opacity: 0.92;
  line-height: 1.5;
  max-width: 600px;
}

/* ---------- Cards ---------- */
.admin-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid rgba(226,232,240,0.8);
  margin-bottom: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* ---------- Section Header Inside Card ---------- */
.admin-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.admin-section-title .section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.admin-section-title .section-text h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: #1e293b;
}

.admin-section-title .section-text p {
  font-size: 13px;
  margin: 0;
  color: #64748b;
}

/* ---------- Form Inputs ---------- */
.admin-input,
.admin-select,
.admin-textarea {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: #1e293b;
  width: 100%;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-sizing: border-box;
}

.admin-input::placeholder,
.admin-textarea::placeholder {
  color: #94a3b8;
}

.admin-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.admin-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.admin-form-group {
  margin-bottom: 20px;
}

.admin-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.admin-form-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.4;
}

/* ---------- Buttons ---------- */
.admin-btn-primary,
.admin-btn-secondary,
.admin-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  text-decoration: none;
  line-height: 1;
}

.admin-btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
}

.admin-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

.admin-btn-primary:active {
  transform: translateY(0);
}

.admin-btn-secondary {
  background: #fff;
  color: #4f46e5;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.admin-btn-secondary:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.admin-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25);
}

.admin-btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
}

/* ---------- Status Toggle Cards ---------- */
.admin-status-card {
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.admin-status-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}

.admin-status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.14);
}

.admin-status-card .status-info {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
}

.admin-status-card .status-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.admin-status-card .status-text h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.admin-status-card .status-text p {
  font-size: 13px;
  margin: 0;
  opacity: 0.92;
}

.admin-status-card .status-toggle {
  z-index: 1;
}

.admin-status-card.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.admin-status-card.inactive {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.admin-status-card.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Custom toggle switch */
.admin-toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: rgba(255,255,255,0.25);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.admin-toggle-switch.on {
  background: rgba(255,255,255,0.45);
}

.admin-toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-toggle-switch.on::after {
  transform: translateX(24px);
}

/* ---------- Tables ---------- */
.admin-table-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid rgba(226,232,240,0.8);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.admin-table thead {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.admin-table th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid #e2e8f0;
}

.admin-table td {
  padding: 14px 18px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s ease;
}

.admin-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.admin-table tbody tr:hover td {
  background: #f1f5f9;
  border-left: 3px solid transparent;
}

.admin-table tbody tr:hover td:first-child {
  border-left: 3px solid #6366f1;
}

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

/* ---------- Badges ---------- */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

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

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

.admin-badge-amber {
  background: #fef3c7;
  color: #92400e;
}

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

.admin-badge-gray {
  background: #f1f5f9;
  color: #475569;
}

/* Action badges for logs */
.admin-badge-login {
  background: #dbeafe;
  color: #1e40af;
}

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

.admin-badge-update {
  background: #fef3c7;
  color: #92400e;
}

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

.admin-badge-other {
  background: #f1f5f9;
  color: #475569;
}

/* ---------- Article Cards ---------- */
.admin-article-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid rgba(226,232,240,0.8);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.admin-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}

.admin-article-card .article-cover {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #cbd5e1;
  overflow: hidden;
  position: relative;
}

.admin-article-card .article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.admin-article-card:hover .article-cover img {
  transform: scale(1.05);
}

.admin-article-card .article-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-article-card .article-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-article-card .article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #64748b;
}

.admin-article-card .article-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.admin-article-card .article-actions .action-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.admin-article-card .article-actions .action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.admin-article-card .article-actions .action-btn.edit:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background: #eef2ff;
}

.admin-article-card .article-actions .action-btn.delete:hover {
  border-color: #ef4444;
  color: #dc2626;
  background: #fef2f2;
}

/* ---------- Markdown Editor ---------- */
.admin-md-editor {
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.admin-md-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  flex-wrap: wrap;
}

.admin-md-toolbar button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.admin-md-toolbar button:hover {
  background: #e2e8f0;
  color: #334155;
}

.admin-md-toolbar button:active {
  background: #cbd5e1;
}

.admin-md-toolbar .toolbar-divider {
  width: 1px;
  height: 20px;
  background: #e2e8f0;
  margin: 0 4px;
}

.admin-md-textarea {
  width: 100%;
  min-height: 300px;
  border: none;
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
  outline: none;
  resize: vertical;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  background: #fff;
}

.admin-md-preview {
  padding: 16px;
  min-height: 300px;
  border-top: 1.5px solid #e2e8f0;
  background: #fafafa;
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
}

/* ---------- Page-Specific Themes ---------- */

/* Email */
.admin-page-email .admin-page-header {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
}

.admin-page-email .admin-section-title .section-icon {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
}

.admin-page-email .admin-input:focus,
.admin-page-email .admin-textarea:focus,
.admin-page-email .admin-select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.admin-page-email .admin-btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

.admin-page-email .admin-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.admin-page-email .admin-table tbody tr:hover td:first-child {
  border-left-color: #7c3aed;
}

/* Logs */
.admin-page-logs .admin-page-header {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.admin-page-logs .admin-section-title .section-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.admin-page-logs .admin-input:focus,
.admin-page-logs .admin-textarea:focus,
.admin-page-logs .admin-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-page-logs .admin-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.admin-page-logs .admin-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.admin-page-logs .admin-table tbody tr:hover td:first-child {
  border-left-color: #3b82f6;
}

/* Settings */
.admin-page-settings .admin-page-header {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.admin-page-settings .admin-section-title .section-icon {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.admin-page-settings .admin-input:focus,
.admin-page-settings .admin-textarea:focus,
.admin-page-settings .admin-select:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.admin-page-settings .admin-btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.25);
}

.admin-page-settings .admin-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
}

.admin-page-settings .admin-table tbody tr:hover td:first-child {
  border-left-color: #06b6d4;
}

/* Articles */
.admin-page-articles .admin-page-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.admin-page-articles .admin-section-title .section-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.admin-page-articles .admin-input:focus,
.admin-page-articles .admin-textarea:focus,
.admin-page-articles .admin-select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.admin-page-articles .admin-btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}

.admin-page-articles .admin-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

.admin-page-articles .admin-table tbody tr:hover td:first-child {
  border-left-color: #f59e0b;
}

/* Announcement */
.admin-page-announcement .admin-page-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.admin-page-announcement .admin-section-title .section-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.admin-page-announcement .admin-input:focus,
.admin-page-announcement .admin-textarea:focus,
.admin-page-announcement .admin-select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.admin-page-announcement .admin-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.admin-page-announcement .admin-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.admin-page-announcement .admin-table tbody tr:hover td:first-child {
  border-left-color: #10b981;
}

/* ---------- Dark Mode Overrides ---------- */
body.dark .admin-card {
  background: #1e293b;
  border-color: rgba(71, 85, 105, 0.4);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

body.dark .admin-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

body.dark .admin-section-title .section-text h3 {
  color: #e2e8f0;
}

body.dark .admin-section-title .section-text p {
  color: #94a3b8;
}

body.dark .admin-input,
body.dark .admin-select,
body.dark .admin-textarea {
  background: #0f172a;
  border-color: rgba(71, 85, 105, 0.4);
  color: #e2e8f0;
}

body.dark .admin-input:focus,
body.dark .admin-select:focus,
body.dark .admin-textarea:focus {
  background: #1e293b;
}

body.dark .admin-form-label {
  color: #cbd5e1;
}

body.dark .admin-form-hint {
  color: #64748b;
}

body.dark .admin-btn-secondary {
  background: #1e293b;
  border-color: rgba(71, 85, 105, 0.4);
  color: #e2e8f0;
}

body.dark .admin-btn-secondary:hover {
  background: #334155;
  border-color: rgba(71, 85, 105, 0.6);
}

body.dark .admin-table-wrap {
  border-color: rgba(71, 85, 105, 0.4);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

body.dark .admin-table {
  background: #1e293b;
}

body.dark .admin-table thead {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

body.dark .admin-table th {
  color: #94a3b8;
  border-bottom-color: rgba(71, 85, 105, 0.4);
}

body.dark .admin-table td {
  color: #cbd5e1;
  border-bottom-color: rgba(71, 85, 105, 0.3);
}

body.dark .admin-table tbody tr:nth-child(even) {
  background: #0f172a;
}

body.dark .admin-table tbody tr:hover td {
  background: #1e293b;
}

body.dark .admin-badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

body.dark .admin-badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

body.dark .admin-badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

body.dark .admin-badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

body.dark .admin-badge-gray {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

body.dark .admin-badge-login {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

body.dark .admin-badge-create {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

body.dark .admin-badge-update {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

body.dark .admin-badge-delete {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

body.dark .admin-badge-other {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

body.dark .admin-article-card {
  background: #1e293b;
  border-color: rgba(71, 85, 105, 0.4);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

body.dark .admin-article-card .article-cover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

body.dark .admin-article-card .article-title {
  color: #e2e8f0;
}

body.dark .admin-article-card .article-meta {
  color: #64748b;
}

body.dark .admin-article-card .article-actions .action-btn {
  background: #0f172a;
  border-color: rgba(71, 85, 105, 0.4);
  color: #94a3b8;
}

body.dark .admin-article-card .article-actions .action-btn:hover {
  background: #1e293b;
  border-color: rgba(71, 85, 105, 0.6);
  color: #e2e8f0;
}

body.dark .admin-md-editor {
  border-color: rgba(71, 85, 105, 0.4);
  background: #1e293b;
}

body.dark .admin-md-toolbar {
  background: #0f172a;
  border-bottom-color: rgba(71, 85, 105, 0.4);
}

body.dark .admin-md-toolbar button {
  color: #94a3b8;
}

body.dark .admin-md-toolbar button:hover {
  background: #334155;
  color: #e2e8f0;
}

body.dark .admin-md-toolbar .toolbar-divider {
  background: rgba(71, 85, 105, 0.4);
}

body.dark .admin-md-textarea {
  background: #1e293b;
  color: #cbd5e1;
}

body.dark .admin-md-preview {
  background: #0f172a;
  border-top-color: rgba(71, 85, 105, 0.4);
  color: #cbd5e1;
}

/* Page-specific dark */
body.dark .admin-page-email .admin-input:focus,
body.dark .admin-page-email .admin-textarea:focus,
body.dark .admin-page-email .admin-select:focus {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

body.dark .admin-page-logs .admin-input:focus,
body.dark .admin-page-logs .admin-textarea:focus,
body.dark .admin-page-logs .admin-select:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.dark .admin-page-settings .admin-input:focus,
body.dark .admin-page-settings .admin-textarea:focus,
body.dark .admin-page-settings .admin-select:focus {
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

body.dark .admin-page-articles .admin-input:focus,
body.dark .admin-page-articles .admin-textarea:focus,
body.dark .admin-page-articles .admin-select:focus {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

body.dark .admin-page-announcement .admin-input:focus,
body.dark .admin-page-announcement .admin-textarea:focus,
body.dark .admin-page-announcement .admin-select:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .admin-page-header {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }

  .admin-page-header .header-icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  .admin-page-header .header-text h2 {
    font-size: 20px;
  }

  .admin-card {
    padding: 20px;
    border-radius: 16px;
  }

  .admin-section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .admin-table-wrap {
    border-radius: 12px;
    overflow-x: auto;
  }

  .admin-table {
    min-width: 600px;
  }

  .admin-btn-primary,
  .admin-btn-secondary,
  .admin-btn-danger {
    width: 100%;
    padding: 14px 24px;
  }

  .admin-status-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .admin-status-card .status-info {
    flex-direction: column;
    gap: 10px;
  }

  .admin-article-card .article-actions {
    flex-direction: column;
  }

  .admin-article-card .article-actions .action-btn {
    width: 100%;
  }

  .admin-md-toolbar {
    gap: 2px;
    padding: 8px;
  }

  .admin-md-toolbar button {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}

/* ---------- Utility helpers for admin pages ---------- */
.admin-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.admin-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.admin-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.admin-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-flex-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

  .admin-flex-between {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------- Pagination (shared admin component) ---------- */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.admin-pagination button {
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-pagination button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.admin-pagination button.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.admin-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

body.dark .admin-pagination button {
  background: #1e293b;
  border-color: rgba(71, 85, 105, 0.4);
  color: #94a3b8;
}

body.dark .admin-pagination button:hover {
  background: #334155;
  border-color: rgba(71, 85, 105, 0.6);
}

body.dark .admin-pagination button.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
}

/* ---------- Empty state ---------- */
.admin-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #94a3b8;
}

.admin-empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.admin-empty-state h4 {
  font-size: 18px;
  font-weight: 700;
  color: #64748b;
  margin: 0 0 8px 0;
}

.admin-empty-state p {
  font-size: 14px;
  margin: 0;
  max-width: 320px;
}

body.dark .admin-empty-state h4 {
  color: #94a3b8;
}

body.dark .admin-empty-state p {
  color: #64748b;
}

/* ---------- Header inner layout helpers ---------- */
.admin-page-header-inner,
.admin-page-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.admin-page-header-icon,
.admin-page-header-left .admin-page-header-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
}

.admin-page-header-icon svg {
  color: #fff;
}

.admin-page-header-text,
.admin-page-header-left + div {
  flex: 1;
}

.admin-page-header-text h3,
.admin-page-header-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #fff;
}

.admin-page-header-text p,
.admin-page-header-desc {
  font-size: 14px;
  margin: 0;
  opacity: 0.92;
  color: #fff;
}

/* ---------- Glass button ---------- */
.admin-btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  background: rgba(255,255,255,0.92);
  color: #4f46e5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.admin-btn-glass:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.admin-btn-glass:active {
  transform: translateY(0);
}

.admin-btn-glass svg {
  flex-shrink: 0;
}

/* ---------- Empty state alias ---------- */
.admin-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #94a3b8;
  gap: 8px;
}

.admin-empty svg {
  margin-bottom: 8px;
  opacity: 0.5;
}

.admin-empty div:first-of-type {
  font-size: 18px;
  font-weight: 700;
  color: #64748b;
}

.admin-empty div:last-of-type {
  font-size: 14px;
  color: #94a3b8;
}

.admin-empty-error {
  color: #ef4444;
}

.admin-empty-error div:first-of-type {
  color: #dc2626;
}

body.dark .admin-empty div:first-of-type {
  color: #94a3b8;
}

body.dark .admin-empty div:last-of-type {
  color: #64748b;
}

/* ---------- Modal ---------- */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: pageFadeIn 0.2s ease;
}

.admin-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  border: 1px solid rgba(226,232,240,0.8);
  animation: slideUp 0.3s ease;
}

.admin-modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #1e293b;
}

.admin-modal-header .modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
}

.admin-modal-header .modal-close:hover {
  background: #e2e8f0;
  color: #334155;
}

.admin-modal-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-modal-body {
  padding: 28px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-modal-footer {
  padding: 20px 28px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

body.dark .admin-modal {
  background: #1e293b;
  border-color: rgba(71, 85, 105, 0.4);
}

body.dark .admin-modal-header {
  border-bottom-color: rgba(71, 85, 105, 0.4);
}

body.dark .admin-modal-header h3 {
  color: #e2e8f0;
}

body.dark .admin-modal-header .modal-close {
  background: #334155;
  color: #94a3b8;
}

body.dark .admin-modal-header .modal-close:hover {
  background: #475569;
  color: #e2e8f0;
}

body.dark .admin-modal-footer {
  border-top-color: rgba(71, 85, 105, 0.4);
}

/* ---------- Search bar ---------- */
.admin-search-bar {
  position: relative;
  max-width: 360px;
  width: 100%;
}

.admin-search-bar input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font-size: 14px;
  color: #334155;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.admin-search-bar input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: #fff;
}

.admin-search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

body.dark .admin-search-bar input {
  background: #0f172a;
  border-color: rgba(71, 85, 105, 0.4);
  color: #e2e8f0;
}

body.dark .admin-search-bar input:focus {
  background: #1e293b;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ---------- Filter chips ---------- */
.admin-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-filter-chip {
  padding: 6px 14px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-filter-chip:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.admin-filter-chip.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

body.dark .admin-filter-chip {
  background: #1e293b;
  border-color: rgba(71, 85, 105, 0.4);
  color: #94a3b8;
}

body.dark .admin-filter-chip:hover {
  background: #334155;
  border-color: rgba(71, 85, 105, 0.6);
}

/* ---------- Stats row ---------- */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.admin-stat-item {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(226,232,240,0.8);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.admin-stat-item .stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.admin-stat-item .stat-label {
  font-size: 13px;
  color: #64748b;
}

body.dark .admin-stat-item {
  background: #1e293b;
  border-color: rgba(71, 85, 105, 0.4);
}

body.dark .admin-stat-item .stat-value {
  color: #e2e8f0;
}

body.dark .admin-stat-item .stat-label {
  color: #64748b;
}

/* ---------- Loading skeleton ---------- */
.admin-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  border-radius: 12px;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

body.dark .admin-skeleton {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
  background-size: 200% 100%;
}

/* ---------- Toast notifications ---------- */
.admin-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.4s ease, pageFadeIn 0.4s ease;
  max-width: 360px;
  line-height: 1.4;
}

.admin-toast.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.admin-toast.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.admin-toast.info {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

@media (max-width: 768px) {
  .admin-toast {
    left: 16px;
    right: 16px;
    top: 16px;
    max-width: none;
  }
}

/* ===== 美化模态框 - 购买广告 & 申请收录 ===== */

/* 玻璃态模态框容器 */
.glass-modal {
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8) !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.5) inset;
    border-radius: 20px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 渐变头部 */
.gradient-header {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 24px 28px !important;
    position: relative;
    overflow: hidden;
    border-bottom: none !important;
}
.gradient-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    pointer-events: none;
}
.gradient-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.gradient-ad {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #db2777 100%) !important;
    color: #fff !important;
}
.gradient-submit {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%) !important;
    color: #fff !important;
}
.gradient-header h3 {
    color: #fff !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 0 4px !important;
    letter-spacing: 0.3px;
}
.gradient-header p {
    color: rgba(255,255,255,0.9) !important;
    font-size: 13px !important;
    margin: 0 !important;
    opacity: 0.85;
}
.gradient-header .modal-close {
    margin-left: auto !important;
    color: #fff !important;
    background: rgba(255,255,255,0.2) !important;
    border: none !important;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    flex-shrink: 0;
}
.gradient-header .modal-close:hover {
    background: rgba(255,255,255,0.35) !important;
    transform: rotate(90deg);
}

/* 头部图标 */
.modal-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}
.modal-header-text {
    flex: 1;
}
.modal-icon-ad { font-size: 26px; }
.modal-icon-submit { font-size: 26px; }

/* 表单区域 */
.glass-modal .modal-body {
    padding: 24px 28px 28px !important;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.form-section {
    margin-bottom: 20px;
}
.form-section:last-of-type {
    margin-bottom: 16px;
}
.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: inline-block;
}

/* 输入框组 */
.glass-modal .form-group {
    margin-bottom: 16px;
}
.glass-modal .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}
.glass-modal input[type="text"],
.glass-modal input[type="url"],
.glass-modal input[type="number"],
.glass-modal select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 14px;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}
.glass-modal select {
    padding: 13px 16px;
    appearance: auto;
    cursor: pointer;
}
.glass-modal input:focus {
    border-color: #818cf8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.glass-modal input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 已选方案卡片 */
.selected-plan-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    margin-bottom: 12px;
}
.selected-plan-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.selected-plan-details {
    flex: 1;
    font-size: 13px;
    color: #475569;
}
.selected-plan-details strong {
    color: #1e293b;
}
#adSelectedAmount {
    color: #6366f1 !important;
    font-weight: 700 !important;
}

/* 错误提示 */
.form-error {
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    font-size: 13px;
    margin-bottom: 12px;
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    pointer-events: none;
}
.btn-submit-ad {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    box-shadow: 0 8px 24px rgba(239,68,68,0.3);
}
.btn-submit-submit {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2) !important;
}
.btn-submit:active {
    transform: translateY(0);
}
.btn-submit-text {
    font-size: 15px;
    letter-spacing: 0.3px;
}
.btn-submit-arrow {
    font-size: 18px;
    transition: transform 0.3s;
}
.btn-submit:hover .btn-submit-arrow {
    transform: translateX(4px);
}

/* 价格选择卡片美化 */
.ad-price-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ad-price-option {
    padding: 16px 18px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    background: #f8fafc !important;
    position: relative !important;
    overflow: hidden !important;
}
.ad-price-option:hover {
    border-color: #a5b4fc !important;
    background: #eef2ff !important;
    transform: translateX(4px);
}
.ad-price-option[style*="border-color: var(--accent-color)"] {
    border-color: #6366f1 !important;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff) !important;
    box-shadow: 0 4px 16px rgba(99,102,241,0.15) !important;
}
.ad-price-option .ad-price-check {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.ad-price-option .ad-price-name {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}
.ad-price-option .ad-price-position-tag {
    font-size: 11px !important;
    color: #6366f1 !important;
    background: rgba(99,102,241,0.1) !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-weight: 600;
}
.ad-price-option .ad-price-money {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #6366f1 !important;
}
.ad-price-option .ad-price-duration {
    font-size: 12px !important;
    color: #64748b !important;
}
.ad-price-option .ad-price-desc {
    font-size: 12px !important;
    color: #94a3b8 !important;
    margin-top: 6px !important;
}

/* 暗黑模式适配 */
body.dark .glass-modal {
    background: rgba(15,23,42,0.97) !important;
    border-color: rgba(71,85,105,0.4) !important;
}
body.dark .form-section-title {
    color: #94a3b8 !important;
}
body.dark .glass-modal .form-group label {
    color: #cbd5e1 !important;
}
body.dark .glass-modal input[type="text"],
body.dark .glass-modal input[type="url"],
body.dark .glass-modal input[type="number"],
body.dark .glass-modal select {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
body.dark .glass-modal input:focus {
    border-color: #818cf8 !important;
    background: #0f172a !important;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.2) !important;
}
body.dark .selected-plan-card {
    background: rgba(99,102,241,0.12) !important;
    border-color: rgba(99,102,241,0.3) !important;
}
body.dark .selected-plan-details {
    color: #94a3b8 !important;
}
body.dark .selected-plan-details strong {
    color: #e2e8f0 !important;
}
body.dark .form-error {
    background: rgba(239,68,68,0.15) !important;
    border-color: rgba(239,68,68,0.3) !important;
    color: #fca5a5 !important;
}
body.dark .ad-price-option {
    background: #1e293b !important;
    border-color: #334155 !important;
}
body.dark .ad-price-option:hover {
    border-color: #6366f1 !important;
    background: rgba(99,102,241,0.1) !important;
}
body.dark .ad-price-option[style*="border-color: var(--accent-color)"] {
    background: rgba(99,102,241,0.15) !important;
    border-color: #818cf8 !important;
}
body.dark .ad-price-option .ad-price-name {
    color: #e2e8f0 !important;
}

/* ===== 全局亮暗切换平滑过渡 ===== */
body.dark,
body.dark *,
body.dark *::before,
body.dark *::after {
    transition-property: background, background-color, border-color, color, box-shadow;
    transition-duration: 0.25s;
    transition-timing-function: ease;
}

/* ===== login.html 暗黑模式 ===== */
body.dark.login-page {
    background: #0f172a;
}
body.dark .login-box {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
body.dark .login-header h1 {
    color: #f1f5f9;
}
body.dark .login-header p {
    color: #94a3b8;
}
body.dark .login-form label {
    color: #cbd5e1;
}
body.dark .login-form input {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.3);
    color: #f1f5f9;
}
body.dark .login-form input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
body.dark .login-footer a {
    color: #94a3b8;
}
body.dark .login-footer a:hover {
    color: #c7d2fe;
}

/* ===== pay.html 暗黑模式 ===== */
body.dark .pay-wrap {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
body.dark .pay-info {
    background: rgba(30, 41, 59, 0.6);
}
body.dark .pay-info .label {
    color: #94a3b8;
}
body.dark .pay-info .value {
    color: #e2e8f0;
}
body.dark .pay-method-title {
    color: #e2e8f0;
}
body.dark .pay-method-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.3);
}
body.dark .pay-method-card:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}
body.dark .pay-method-card.selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.15);
}
body.dark .pay-method-card strong {
    color: #e2e8f0;
}
body.dark .pay-method-card span {
    color: #94a3b8;
}
body.dark .pay-submit-area {
    border-color: rgba(71, 85, 105, 0.3);
    background: rgba(30, 41, 59, 0.4);
}
body.dark .pay-submit-area .hint {
    color: #94a3b8;
}
body.dark .qrcode-area {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}
body.dark .qrcode-area .qrcode-tip {
    color: #a5b4fc;
}
body.dark .status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}
body.dark .status-paid {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}
body.dark .status-cancelled {
    background: rgba(71, 85, 105, 0.2);
    color: #94a3b8;
}

/* ===== disclaimer.html 暗黑模式 ===== */
body.dark .dc-header h1 {
    -webkit-text-fill-color: #f472b6;
}
body.dark .dc-header p {
    color: #94a3b8;
}
body.dark .dc-header .dc-date {
    color: #64748b;
}
body.dark .dc-body .dc-section {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(71, 85, 105, 0.2);
}
body.dark .dc-body .dc-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
body.dark .dc-body .dc-section h2 {
    color: #e2e8f0;
}
body.dark .dc-body .dc-section h2 .tag {
    background: rgba(71, 85, 105, 0.3);
    color: #94a3b8;
}
body.dark .dc-body .dc-section p,
body.dark .dc-body .dc-section ul li {
    color: #94a3b8;
}
body.dark .dc-body .dc-section a {
    color: #a78bfa;
}
body.dark .dc-body .dc-section a:hover {
    color: #c4b5fd;
}
body.dark .dc-body .dc-section blockquote {
    border-left-color: #475569;
    background: rgba(30, 41, 59, 0.5);
    color: #64748b;
}
body.dark .dc-body .dc-section table th,
body.dark .dc-body .dc-section table td {
    border-color: rgba(71, 85, 105, 0.3);
}
body.dark .dc-body .dc-section table th {
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
}
body.dark .dc-body .dc-section table td {
    color: #94a3b8;
}
body.dark .dc-footer {
    color: #64748b;
}
body.dark .dc-footer a {
    color: #f472b6;
}

/* ===== 暗黑模式下的模态框统一适配 ===== */
body.dark .modal {
    background: rgba(2, 6, 23, 0.8);
}
body:not(.dark) .modal {
    background: rgba(2, 6, 23, 0.5);
}
