/* ============================================================
   荣耀固件包网站 - UI 参考 consumer.huawei.com/cn/phones/
   设计语言: 白底黑字 + #666 灰辅助 + 黑色描边按钮
   ============================================================ */

:root {
    --text: #000000;
    --text-2: #666666;
    --text-3: #999999;
    --line: #e5e5e5;
    --bg: #ffffff;
    --bg-2: #f5f5f5;
    --dark: #000000;
    --dark-2: #1f1f2b;
    --max-w: 1200px;
    --radius: 0;            /* 华为风格偏直角 */
}

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

html { -webkit-font-smoothing: antialiased; }

body {
    font-family: "HarmonyOS Sans", "PingFang SC", "Microsoft YaHei",
                 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 14px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ============ 顶部导航 (白底浅色) ============ */
.navbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0; z-index: 100;
    height: 64px;
}
.navbar .container {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 40px;
}
.brand {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-mark {
    display: inline-block;
    width: 28px; height: 28px;
    background: #000;
    color: #fff;
    text-align: center;
    line-height: 28px;
    font-size: 13px;
    font-weight: 700;
}
.nav-search {
    flex: 1;
    max-width: 380px;
    position: relative;
}
.nav-search input {
    width: 100%;
    height: 36px;
    padding: 0 14px 0 38px;
    background: var(--bg-2);
    border: 1px solid transparent;
    font-size: 13px;
    color: #000;
    transition: all 0.2s;
}
.nav-search input:focus {
    outline: none;
    background: #fff;
    border-color: #000;
}
.nav-search .ico {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: #7f7f7f;
    pointer-events: none;
}
.nav-stats {
    color: var(--text-2);
    font-size: 12px;
    white-space: nowrap;
}

/* ============ Hero 区 (参考华为: 全宽产品大图, 文字居中) ============ */
.hero {
    position: relative;
    background: #000;
    color: #fff;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background:
      radial-gradient(ellipse at 30% 40%, rgba(0,125,255,0.35), transparent 50%),
      radial-gradient(ellipse at 70% 70%, rgba(70,70,90,0.6), transparent 60%),
      linear-gradient(135deg, #1a1a1a 0%, #000 100%);
}
.hero-pattern {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.hero .container {
    position: relative;
    padding: 96px 24px 104px;
    text-align: center;
}
.hero-eyebrow {
    font-size: 13px;
    letter-spacing: 4px;
    opacity: 0.7;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.hero h1 {
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero h1 strong { font-weight: 600; }
.hero p {
    font-size: 16px;
    opacity: 0.7;
    letter-spacing: 1px;
    max-width: 640px;
    margin: 0 auto 32px;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
/* 黑底白字按钮 / 白底黑字按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    border: 1px solid #000;
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
}
.btn-dark { background: #000; color: #fff; border-color: #000; }
.btn-dark:hover { background: #333; border-color: #333; }
.btn-light { background: #fff; color: #000; border-color: #fff; }
.btn-light:hover { background: #f0f0f0; }
.btn-outline { background: transparent; color: #000; border: 1px solid #000; }
.btn-outline:hover { background: #000; color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid #fff; }
.btn-outline-light:hover { background: #fff; color: #000; }
.btn .arr { font-size: 16px; line-height: 1; }

/* ============ 区块通用 ============ */
.section { padding: 80px 0; }
.section-head {
    text-align: center;
    margin-bottom: 48px;
}
.section-head .eyebrow {
    color: var(--text-2);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.section-head h2 {
    font-size: 32px;
    font-weight: 400;
    color: #000;
    letter-spacing: 1px;
    line-height: 1.3;
}
.section-head p {
    margin-top: 12px;
    color: var(--text-2);
    font-size: 14px;
}

/* ============ 系列分组 ============ */
.series-block { margin-bottom: 80px; }
.series-block:last-child { margin-bottom: 0; }
.series-banner {
    background: var(--bg-2);
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 24px;
}
.series-banner .series-title {
    font-size: 22px;
    font-weight: 500;
    color: #000;
    letter-spacing: 2px;
}
.series-banner .series-sub {
    color: var(--text-2);
    font-size: 13px;
    margin-top: 6px;
    letter-spacing: 1px;
}

/* ============ 产品网格 (每行 4 个) ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}
.product-card {
    background: #fff;
    padding: 36px 20px 28px;
    text-align: center;
    position: relative;
    min-height: 280px;
    display: block;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s;
}
.product-card.appear {
    opacity: 1;
    transform: translateY(0);
}
.product-card.skeleton-card {
    opacity: 1;
    transform: none;
    transition: none;
}
.product-card:hover {
    background: var(--bg-2);
}
.product-card .pictogram {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f0, #e5e5e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    color: #000;
    margin: 0 auto 18px;
    letter-spacing: -1px;
}
.product-card .p-name {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #000;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
    line-height: 1.4;
    word-break: break-word;
}
.product-card .p-code {
    display: block;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 12px;
    color: var(--text-2);
    margin: 0 0 14px;
    line-height: 1.4;
}
.product-card .p-meta {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    margin: 0 0 18px;
    line-height: 1.6;
}
.product-card .p-meta span {
    display: inline-block;
    margin: 0 6px;
}
.product-card .p-actions {
    display: block;
    margin-top: 12px;
}
.product-card .p-actions .btn {
    padding: 8px 18px;
    font-size: 12px;
}
.product-card .label-new {
    display: inline-block;
    background: #000;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 500;
}
/* 整个卡片可点击(stretched link) */
.product-card .card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.product-card .p-actions .btn {
    position: relative;
    z-index: 2;
}

/* ============ Why 区块 (暗色卡片网格) ============ */
.why-section {
    background: #000;
    color: #fff;
    padding: 96px 0;
}
.why-section .section-head h2 { color: #fff; }
.why-section .section-head .eyebrow { color: #999; }
.why-section .section-head p { color: #999; }

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-left: 1px solid rgba(255,255,255,0.1);
}
.why-card {
    border-right: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 36px 24px;
    transition: background 0.2s;
    cursor: pointer;
}
.why-card:hover {
    background: rgba(255,255,255,0.05);
}
.why-card .w-icon {
    font-size: 28px;
    margin-bottom: 16px;
    opacity: 0.9;
}
.why-card .w-cat {
    font-size: 11px;
    letter-spacing: 2px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.why-card .w-title {
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    line-height: 1.4;
}

/* ============ 搜索结果 / 空状态 ============ */
.empty {
    text-align: center;
    padding: 120px 20px;
    color: var(--text-3);
}
.empty .ico-big {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.25;
}
.empty p { font-size: 14px; }

/* ============ 分页 ============ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 48px;
}
.pagination a, .pagination span {
    min-width: 36px; height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    font-size: 13px;
    color: #000;
    background: #fff;
    transition: all 0.15s;
}
.pagination a:hover {
    border-color: #000;
}
.pagination .current {
    background: #000;
    color: #fff;
    border-color: #000;
}
.pagination .disabled {
    color: var(--text-3);
    cursor: not-allowed;
    opacity: 0.5;
}

/* ============ 设备详情页 ============ */
.device-hero {
    background: #000;
    color: #fff;
    padding: 80px 0 96px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.device-hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
      radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.05), transparent 60%),
      linear-gradient(180deg, #1a1a1a 0%, #000 100%);
}
.device-hero .container { position: relative; }
.device-hero .codename-big {
    font-size: 56px;
    font-weight: 200;
    letter-spacing: 4px;
    margin-bottom: 12px;
    line-height: 1.1;
}
.device-hero .sub {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    letter-spacing: 1px;
    margin-bottom: 24px;
}
.device-hero .meta-row {
    display: inline-flex;
    gap: 32px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    padding: 12px 24px;
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 32px;
}
.device-hero .meta-row span { letter-spacing: 1px; }

.back-link {
    color: var(--text-2);
    font-size: 13px;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.back-link:hover { color: #000; }

/* 固件列表(表格风) */
.firmware-section {
    padding: 64px 0;
}
.firmware-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.firmware-table thead th {
    background: var(--bg-2);
    color: var(--text-2);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 1px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    text-transform: uppercase;
}
.firmware-table tbody td {
    padding: 18px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.firmware-table tbody tr {
    transition: background 0.15s;
}
.firmware-table tbody tr:hover {
    background: var(--bg-2);
}
.firmware-table .fw-version {
    font-size: 15px;
    font-weight: 500;
    color: #000;
}
.firmware-table .fw-build {
    font-family: "SF Mono", Consolas, monospace;
    font-size: 12px;
    color: var(--text-2);
}
.firmware-table .fw-ui {
    font-size: 13px;
    color: #000;
}
.firmware-table .fw-date {
    font-family: "SF Mono", Consolas, monospace;
    font-size: 12px;
    color: var(--text-2);
}
.firmware-table .fw-size {
    font-size: 13px;
    color: var(--text-2);
    text-align: right;
    white-space: nowrap;
}
.firmware-table .fw-action { text-align: right; white-space: nowrap; }
.firmware-table .badge-new {
    display: inline-block;
    background: #000;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    margin-left: 8px;
    letter-spacing: 1px;
    vertical-align: middle;
}

/* ============ 页脚 ============ */
.footer {
    background: #000;
    color: #999;
    padding: 48px 0 32px;
    border-top: 1px solid #1f1f1f;
}
.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
}
.footer-brand {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}
.footer-meta {
    font-size: 12px;
    color: #666;
    line-height: 1.8;
}
.footer-links {
    display: flex;
    gap: 24px;
    font-size: 12px;
}
.footer-links a { color: #999; }
.footer-links a:hover {
    color: #fff;
}

/* 页脚签名状态栏 */
.footer-status {
    border-top: 1px solid #2a2a2a;
    padding: 14px 0;
    text-align: center;
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}
.footer-status .status-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-status .status-item strong {
    color: #fff;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-weight: 500;
}
.footer-status .status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.footer-status .status-dot.ok {
    background: #00d97e;
    box-shadow: 0 0 6px rgba(0, 217, 126, 0.6);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============ Skeleton 加载动画 ============ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-card {
    pointer-events: none;
}
.skeleton-card .sk {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 4px;
}
.skeleton-card .pictogram {
    width: 72px; height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
}
.skeleton-card .sk-name {
    height: 16px; width: 70%;
    margin: 0 auto 8px;
}
.skeleton-card .sk-code {
    height: 12px; width: 50%;
    margin: 0 auto 14px;
}
.skeleton-card .sk-meta {
    height: 12px; width: 60%;
    margin: 0 auto 18px;
}
.skeleton-card .sk-btn {
    height: 32px; width: 100px;
    margin: 12px auto 0;
}

/* ============ Spinner 旋转 ============ */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

/* ============ 搜索建议下拉 ============ */
.nav-search {
    position: relative;
    flex: 1;
    max-width: 380px;
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 280px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    border-radius: 0;
}
.search-dropdown.show {
    display: block;
    animation: dropdownIn 0.18s ease;
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dropdown-loading {
    padding: 10px 14px;
    color: var(--text-2);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropdown-empty {
    padding: 12px 14px;
    color: var(--text-3);
    font-size: 12px;
    text-align: center;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    transition: background 0.12s;
    color: #000;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover {
    background: var(--bg-2);
}
.dropdown-item .dd-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #000;
    flex-shrink: 0;
}
.dropdown-item .dd-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.dropdown-item .dd-name {
    display: block;
    font-size: 12px;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.dropdown-item .dd-code {
    display: block;
    font-size: 10px;
    color: var(--text-2);
    margin-top: 2px;
}
.dropdown-item .dd-arr {
    color: var(--text-3);
    font-size: 12px;
}
.dropdown-more {
    padding: 10px 14px;
    text-align: center;
    font-size: 11px;
    color: var(--text-2);
    background: var(--bg-2);
    cursor: pointer;
    border-top: 1px solid var(--line);
    transition: background 0.12s;
}
.dropdown-more:hover {
    background: #ececec;
    color: #000;
}

/* 搜索框加载状态 */
.searching-hint {
    color: var(--text-2);
    font-size: 13px;
}
.searching-hint::after {
    content: ' ●';
    color: #000;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* 搜索框输入时小图标 */
.nav-search.loading input {
    background-image: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite linear;
}

/* ============ 固件列表 Skeleton ============ */
.fw-skeleton-row {
    height: 56px;
    background: linear-gradient(90deg, #f5f5f5 25%, #ececec 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite linear;
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    position: relative;
}
.fw-skeleton-row:first-child {
    border-top: 1px solid var(--line);
}

@media (max-width: 1079.98px) {
    .hero h1 { font-size: 36px; }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .why-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767.98px) {
    .navbar .container { gap: 12px; height: 56px; }
    .brand { font-size: 15px; }
    .nav-search { max-width: none; }
    .nav-stats { display: none; }
    .hero .container { padding: 56px 20px 64px; }
    .hero h1 { font-size: 26px; letter-spacing: 2px; }
    .hero p { font-size: 14px; }
    .section { padding: 48px 0; }
    .section-head { margin-bottom: 28px; }
    .section-head h2 { font-size: 22px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .why-section { padding: 56px 0; }
    .device-hero { padding: 48px 0 56px; }
    .device-hero .codename-big { font-size: 32px; }
    .device-hero .meta-row {
        flex-direction: column;
        gap: 8px;
        padding: 8px 16px;
    }
    .firmware-table { display: block; }
    .firmware-table thead { display: none; }
    .firmware-table tbody, .firmware-table tr, .firmware-table td {
        display: block;
        width: 100%;
    }
    .firmware-table tbody tr {
        border-bottom: 1px solid var(--line);
        padding: 12px 0;
    }
    .firmware-table tbody td {
        border-bottom: none;
        padding: 4px 16px;
        text-align: left !important;
    }
    .footer .container { flex-direction: column; }
}

/* ============================================================
   Auth + Admin 新增样式
   ============================================================ */

/* ============ Honor 主色变量 ============ */
:root {
    --honor-blue: #0072CE;
    --honor-blue-dark: #0058a3;
    --honor-blue-light: #e6f1fb;
    --danger: #e54848;
    --danger-dark: #c93b3b;
    --warn: #f5a623;
    --success: #00a672;
    --admin-bg: #f6f7f9;
    --admin-sidebar: #0e0e14;
    --admin-line: #e6e7eb;
    --admin-text: #1f2329;
    --admin-text-2: #6b7075;
    --admin-text-3: #9ca0a4;
    --radius-sm: 4px;
    --radius-md: 6px;
}

/* ============ 通用按钮尺寸变体 ============ */
.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.btn-block {
    width: 100%;
    justify-content: center;
}
.btn-link {
    background: transparent;
    border: none;
    color: var(--honor-blue);
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.btn-link:hover {
    color: var(--honor-blue-dark);
    text-decoration: underline;
}
.btn-link.btn-warn    { color: var(--warn); }
.btn-link.btn-warn:hover { color: #d68910; }
.btn-link.btn-danger { color: var(--danger); }
.btn-link.btn-danger:hover { color: var(--danger-dark); }

/* ============ Avatar 头像 ============ */
.avatar {
    width: 32px; height: 32px;
    background: var(--honor-blue);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.avatar-sm {
    width: 24px; height: 24px;
    background: var(--honor-blue);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 6px;
    vertical-align: middle;
}

/* ============ Navbar 账号菜单 ============ */
.nav-account {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.account-menu {
    position: relative;
    display: inline-block;
}
.account-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.account-trigger:hover {
    border-color: var(--line);
    background: var(--bg-2);
}
.account-trigger .uname {
    font-size: 13px;
    color: var(--text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-trigger .caret {
    color: var(--text-3);
    font-size: 10px;
}
.account-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(0,0,0,0.10);
    padding: 6px 0;
    display: none;
    z-index: 9999;
}
.account-menu:hover .account-dropdown,
.account-menu.open .account-dropdown {
    display: block;
    animation: dropdownIn 0.18s ease;
}
.account-dropdown a {
    display: block;
    padding: 8px 16px;
    color: var(--text);
    font-size: 13px;
    transition: background 0.12s;
}
.account-dropdown a:hover {
    background: var(--bg-2);
}

/* ============ Auth 页面(登录/注册) ============ */
.auth-body {
    background: #fff;
    min-height: 100vh;
}
.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* 左侧暗色品牌区 */
.auth-aside {
    background:
      radial-gradient(ellipse at 30% 40%, rgba(0,114,206,0.35), transparent 50%),
      radial-gradient(ellipse at 70% 70%, rgba(70,70,90,0.6), transparent 60%),
      linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.auth-aside::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.auth-aside-inner {
    position: relative;
    height: 100%;
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
}
.auth-brand {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-brand:hover {
    opacity: 0.85;
}
.auth-tagline {
    margin: auto 0;
}
.auth-eyebrow {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--honor-blue);
    text-transform: uppercase;
    margin-bottom: 16px;
    font-weight: 600;
}
.auth-tagline h1 {
    font-size: 40px;
    font-weight: 300;
    letter-spacing: 2px;
    line-height: 1.2;
    margin-bottom: 16px;
}
.auth-tagline h1 strong {
    font-weight: 600;
}
.auth-tagline p {
    font-size: 14px;
    opacity: 0.7;
    letter-spacing: 0.5px;
    line-height: 1.7;
    max-width: 360px;
}
.auth-aside-foot {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.auth-aside-foot .status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px rgba(0,166,114,0.7);
}

/* 右侧表单区 */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: #fff;
}
.auth-card {
    width: 100%;
    max-width: 380px;
}
.auth-card-head {
    margin-bottom: 28px;
}
.auth-card-head .auth-eyebrow {
    color: var(--honor-blue);
    margin-bottom: 12px;
}
.auth-card-head h2 {
    font-size: 28px;
    font-weight: 400;
    color: #000;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.auth-card-head p {
    color: var(--text-2);
    font-size: 13px;
    letter-spacing: 0.5px;
}
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fef2f2;
    border: 1px solid #fbc8c8;
    color: #c93b3b;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}
.auth-alert .alert-ico {
    width: 18px; height: 18px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.auth-form {
    display: block;
}
.auth-form .field {
    display: block;
    margin-bottom: 18px;
}
.field-label {
    display: block;
    font-size: 12px;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="search"],
.field select,
.field textarea {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 13px;
    color: #000;
    transition: all 0.15s;
    border-radius: var(--radius-sm);
    font-family: inherit;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.auth-form input:focus {
    outline: none;
    border-color: var(--honor-blue);
    box-shadow: 0 0 0 3px rgba(0,114,206,0.12);
}
.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-3);
}
.field-password {
    position: relative;
}
.field-password input {
    padding-right: 60px;
}
.pwd-toggle {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--honor-blue);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
}
.pwd-toggle:hover {
    text-decoration: underline;
}
.auth-foot {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-2);
}
.auth-foot a {
    color: var(--honor-blue);
    margin-left: 4px;
}
.auth-foot a:hover {
    color: var(--honor-blue-dark);
    text-decoration: underline;
}

/* ============ Admin 后台布局 ============ */
.admin-body {
    background: var(--admin-bg);
    color: var(--admin-text);
    font-size: 14px;
}
.admin-shell {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

/* 左侧侧栏 */
.admin-sidebar {
    background: var(--admin-sidebar);
    color: rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-brand {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-brand a {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-brand em {
    font-style: normal;
    font-size: 10px;
    background: var(--honor-blue);
    color: #fff;
    padding: 2px 6px;
    margin-left: 4px;
    letter-spacing: 1px;
    border-radius: 2px;
}
.admin-nav {
    padding: 12px 0;
    flex: 1;
}
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    letter-spacing: 0.5px;
    border-left: 2px solid transparent;
    transition: all 0.15s;
}
.admin-nav a:hover {
    background: rgba(255,255,255,0.04);
    color: #fff;
}
.admin-nav a.active {
    background: rgba(0,114,206,0.12);
    color: #fff;
    border-left-color: var(--honor-blue);
}
.admin-nav a .nav-ico {
    width: 18px;
    display: inline-flex;
    justify-content: center;
    font-size: 13px;
}
.admin-nav-foot {
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.admin-nav-foot a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 24px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    transition: all 0.15s;
}
.admin-nav-foot a:hover {
    background: rgba(255,255,255,0.04);
    color: #fff;
}

/* 右侧主区 */
.admin-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.admin-topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--admin-line);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.topbar-title {
    font-size: 17px;
    font-weight: 500;
    color: var(--admin-text);
    letter-spacing: 0.5px;
    margin: 0;
}
.sidebar-toggle {
    background: transparent;
    border: 1px solid var(--admin-line);
    width: 32px; height: 32px;
    font-size: 16px;
    cursor: pointer;
    color: var(--admin-text);
    display: none;
    border-radius: var(--radius-sm);
}
.topbar-right {
    display: flex;
    align-items: center;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-user .avatar {
    background: var(--honor-blue);
}
.topbar-user .uname {
    font-size: 13px;
    color: var(--admin-text);
}
.role-badge {
    background: var(--honor-blue);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.admin-content {
    flex: 1;
    padding: 24px 28px;
}
.admin-foot {
    border-top: 1px solid var(--admin-line);
    padding: 14px 28px;
    background: #fff;
    font-size: 12px;
    color: var(--admin-text-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-foot strong {
    color: var(--admin-text);
    font-family: 'SF Mono', Consolas, monospace;
}

/* ============ 后台通用组件 ============ */

/* 闪存消息 */
.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    border: 1px solid;
}
.flash-ok  { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.flash-err { background: #fef2f2; color: #c93b3b; border-color: #fbc8c8; }
.flash-ico {
    width: 18px; height: 18px;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.flash-ok  .flash-ico { background: var(--success); }
.flash-err .flash-ico { background: var(--danger); }

/* 统计卡片 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-card {
    background: #fff;
    border: 1px solid var(--admin-line);
    padding: 18px 20px;
    border-radius: var(--radius-md);
    transition: all 0.15s;
}
.stat-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.04);
    border-color: #d4d5d8;
}
.stat-label {
    font-size: 12px;
    color: var(--admin-text-2);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 26px;
    font-weight: 500;
    color: var(--admin-text);
    letter-spacing: 0.5px;
    line-height: 1.1;
}
.stat-foot {
    font-size: 11px;
    color: var(--admin-text-3);
    margin-top: 6px;
}
.stat-card.accent-blue  { border-top: 3px solid var(--honor-blue); }
.stat-card.accent-green { border-top: 3px solid var(--success); }
.stat-card.accent-dark  {
    background: #000;
    color: #fff;
    border-color: #000;
}
.stat-card.accent-dark .stat-label,
.stat-card.accent-dark .stat-foot { color: rgba(255,255,255,0.7); }
.stat-card.accent-dark .stat-value { color: #fff; }

/* Mini 统计行(邀请码页面) */
.stat-mini-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.stat-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--admin-line);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: all 0.15s;
}
.stat-mini a {
    color: var(--admin-text-2);
}
.stat-mini span {
    color: var(--admin-text);
    font-weight: 600;
    background: var(--bg-2);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.stat-mini.active {
    border-color: var(--honor-blue);
    background: var(--honor-blue-light);
}
.stat-mini.active a {
    color: var(--honor-blue-dark);
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.toolbar-search {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
    max-width: 480px;
}
.toolbar-search input {
    flex: 1;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--admin-line);
    background: #fff;
    font-size: 13px;
    color: var(--admin-text);
    border-radius: var(--radius-sm);
}
.toolbar-search input:focus {
    outline: none;
    border-color: var(--honor-blue);
    box-shadow: 0 0 0 3px rgba(0,114,206,0.10);
}

/* Panel 面板 */
.panel {
    background: #fff;
    border: 1px solid var(--admin-line);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}
.panel-head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--admin-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-head h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--admin-text);
    margin: 0;
    letter-spacing: 0.5px;
}
.panel-sub {
    font-size: 12px;
    color: var(--admin-text-3);
}
.panel-link {
    font-size: 12px;
    color: var(--honor-blue);
}
.panel-link:hover {
    color: var(--honor-blue-dark);
    text-decoration: underline;
}
.panel-body {
    padding: 16px 20px;
}
.panel-body.panel-scroll {
    max-height: 480px;
    overflow-y: auto;
}
.panel-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--admin-line);
}

/* 行布局 */
.admin-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.admin-col-4 { grid-column: span 4; }
.admin-col-6 { grid-column: span 6; }
.admin-col-8 { grid-column: span 8; }

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table thead th {
    text-align: left;
    padding: 10px 12px;
    color: var(--admin-text-2);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--admin-line);
    background: #fafbfc;
}
.data-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--admin-line);
    vertical-align: middle;
    color: var(--admin-text);
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr:hover td {
    background: #fafbfc;
}
.data-table a {
    color: var(--honor-blue);
}
.data-table a:hover {
    color: var(--honor-blue-dark);
    text-decoration: underline;
}
.td-mono {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
    color: var(--admin-text-2);
}
.td-time {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
    color: var(--admin-text-2);
    white-space: nowrap;
}
.td-mute { color: var(--admin-text-3); }
.td-note { color: var(--admin-text-2); max-width: 200px; }
.td-ip { color: var(--admin-text-3); }
.td-actions {
    text-align: right !important;
    white-space: nowrap;
}
.td-actions .inline-form {
    display: inline;
}
.uname {
    font-size: 13px;
    color: var(--admin-text);
    vertical-align: middle;
}
.empty-mini {
    text-align: center;
    padding: 32px 16px;
    color: var(--admin-text-3);
    font-size: 13px;
}

/* Tag 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    background: var(--bg-2);
    color: var(--admin-text-2);
    border-radius: 2px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}
.tag-dark    { background: #000; color: #fff; }
.tag-green   { background: #ecfdf3; color: #067647; }
.tag-red     { background: #fef2f2; color: #c93b3b; }
.tag-gray    { background: #f0f1f3; color: #6b7075; }
.tag-you     { background: var(--honor-blue-light); color: var(--honor-blue-dark); }

/* 柱状图 */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 180px;
    padding: 12px 4px 32px;
    position: relative;
}
.bar-chart-sm {
    height: 140px;
}
.bar-col {
    flex: 1;
    min-width: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    position: relative;
    cursor: default;
}
.bar {
    width: 70%;
    background: var(--honor-blue);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: all 0.2s;
}
.bar.bar-dark  { background: #000; }
.bar.bar-light { background: var(--honor-blue); }
.bar-col:hover .bar {
    opacity: 0.85;
}
.bar-val {
    font-size: 10px;
    color: var(--admin-text-2);
    margin-bottom: 4px;
}
.bar-day {
    position: absolute;
    bottom: -22px;
    font-size: 10px;
    color: var(--admin-text-3);
    white-space: nowrap;
    transform: rotate(-45deg);
    transform-origin: top center;
}

/* 圆环图 */
.donut-row {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: center;
    padding: 12px 0;
}
.donut {
    --p1: 50%;
    --p2: 30%;
    width: 120px; height: 120px;
    border-radius: 50%;
    background:
        conic-gradient(
            var(--honor-blue) 0% var(--p1),
            #d4d5d8 var(--p1) calc(var(--p1) + var(--p2)),
            #f0f1f3 calc(var(--p1) + var(--p2)) 100%
        );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.donut::before {
    content: '';
    position: absolute;
    inset: 18px;
    background: #fff;
    border-radius: 50%;
}
.donut-center {
    position: relative;
    text-align: center;
    z-index: 1;
}
.donut-center strong {
    display: block;
    font-size: 22px;
    color: var(--admin-text);
    font-weight: 600;
    line-height: 1.1;
}
.donut-center span {
    font-size: 11px;
    color: var(--admin-text-2);
}
.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--admin-text-2);
}
.donut-legend .dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}
.dot-blue { background: var(--honor-blue); }
.dot-gray { background: #d4d5d8; }

/* 排行榜 */
.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rank-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--admin-line);
    font-size: 13px;
}
.rank-list li:last-child {
    border-bottom: none;
}
.rank-no {
    width: 24px;
    height: 24px;
    background: var(--bg-2);
    color: var(--admin-text-2);
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    flex-shrink: 0;
}
.rank-list li:nth-child(1) .rank-no { background: #000; color: #fff; }
.rank-list li:nth-child(2) .rank-no { background: #555; color: #fff; }
.rank-list li:nth-child(3) .rank-no { background: #999; color: #fff; }
.rank-name {
    flex: 0 0 140px;
    color: var(--admin-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rank-name a {
    color: var(--admin-text);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-name a:hover {
    color: var(--honor-blue);
}
.rank-name .rank-code {
    font-size: 11px;
    color: var(--admin-text-3);
    font-family: 'SF Mono', Consolas, monospace;
}
.rank-bar {
    flex: 1;
    background: var(--bg-2);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}
.rank-bar span {
    display: block;
    height: 100%;
    background: var(--honor-blue);
    border-radius: 3px;
    transition: width 0.3s;
}
.rank-cnt {
    flex: 0 0 60px;
    text-align: right;
    color: var(--admin-text);
    font-weight: 500;
    font-family: 'SF Mono', Consolas, monospace;
}

/* 范围切换 tabs */
.range-tabs {
    display: inline-flex;
    border: 1px solid var(--admin-line);
    background: #fff;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
}
.range-tabs a {
    padding: 6px 16px;
    font-size: 13px;
    color: var(--admin-text-2);
    border-right: 1px solid var(--admin-line);
    transition: all 0.15s;
}
.range-tabs a:last-child { border-right: none; }
.range-tabs a:hover {
    background: var(--bg-2);
    color: var(--admin-text);
}
.range-tabs a.active {
    background: var(--honor-blue);
    color: #fff;
}

/* ============ 邀请码表格特殊样式 ============ */
.invite-table .invite-code {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
    color: var(--admin-text);
    background: var(--honor-blue-light);
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: 0.5px;
}
.btn-copy {
    background: transparent;
    border: 1px solid var(--admin-line);
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 11px;
    color: var(--admin-text-2);
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.15s;
}
.btn-copy:hover {
    border-color: var(--honor-blue);
    color: var(--honor-blue);
}
.btn-copy.copied {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.row-new td {
    background: #fffbe6 !important;
}
.row-new .invite-code {
    background: #fff3cd;
}

/* ============ 模态框 ============ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal.show {
    display: flex;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.18s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-dialog {
    position: relative;
    background: #fff;
    width: 92%;
    max-width: 420px;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0,0,0,0.20);
    animation: modalIn 0.22s cubic-bezier(0.2,0.6,0.3,1);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--admin-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--admin-text);
}
.modal-close {
    background: transparent;
    border: none;
    width: 28px; height: 28px;
    font-size: 22px;
    color: var(--admin-text-3);
    cursor: pointer;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.15s;
}
.modal-close:hover {
    background: var(--bg-2);
    color: var(--admin-text);
}
.modal-form {
    padding: 18px 20px 20px;
}
.modal-form .field {
    margin-bottom: 14px;
}
.modal-info {
    background: var(--honor-blue-light);
    color: var(--honor-blue-dark);
    padding: 8px 12px;
    margin-bottom: 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,114,206,0.2);
}
.modal-info strong {
    font-weight: 600;
}
.modal-hint {
    background: var(--bg-2);
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 11px;
    color: var(--admin-text-2);
    border-radius: var(--radius-sm);
    line-height: 1.6;
}
.modal-hint code {
    background: #fff;
    padding: 1px 6px;
    border-radius: 2px;
    font-family: 'SF Mono', Consolas, monospace;
    color: var(--honor-blue-dark);
}
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--admin-line);
}

/* ============ 用户表格用户名+头像列 ============ */
.user-table td:nth-child(2) {
    white-space: nowrap;
}
.muted { color: var(--admin-text-3); font-size: 12px; }

/* ============ 响应式 ============ */
@media (max-width: 1079.98px) {
    .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .admin-row { grid-template-columns: 1fr; }
    .admin-col-4, .admin-col-6, .admin-col-8 { grid-column: span 1; }
}
@media (max-width: 767.98px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-main { padding: 32px 20px; }
    .auth-tagline h1 { font-size: 28px; }

    .admin-shell {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: fixed;
        left: -220px;
        top: 0;
        width: 220px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.2s;
    }
    .admin-shell.sidebar-open .admin-sidebar {
        left: 0;
    }
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .admin-content { padding: 16px; }
    .stat-grid-4 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .data-table { font-size: 12px; }
    .data-table thead th, .data-table tbody td {
        padding: 8px 6px;
    }
    .range-tabs a { padding: 6px 10px; font-size: 12px; }
    .modal-dialog { max-width: none; margin: 12px; }
}

/* ============================================================
   新增样式: Toast / Modal 登录过期 / Switch 开关 / Settings 表单
   / 卡片悬停动画 / Token 剩余时间显示 / 过渡动画
   ============================================================ */

/* ============ 通用过渡动画 ============ */
.panel,
.stat-card,
.btn,
.btn-link,
.tag,
.admin-nav a,
.range-tabs a,
.stat-mini,
.bar {
    transition: all 0.18s cubic-bezier(0.2, 0.6, 0.3, 1);
}

/* 卡片悬停升起 */
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* ============ Toast 通知 ============ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 12px 14px;
    background: #fff;
    border: 1px solid var(--admin-line);
    border-left: 3px solid var(--honor-blue);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    font-size: 13px;
    color: var(--admin-text);
    min-width: 240px;
    max-width: 380px;
    border-radius: var(--radius-sm);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.25s, transform 0.25s cubic-bezier(0.2, 0.6, 0.3, 1);
    pointer-events: auto;
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast-ico {
    width: 22px; height: 22px;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.toast-ok    { border-left-color: var(--success); }
.toast-ok    .toast-ico { background: var(--success); }
.toast-err   { border-left-color: var(--danger); }
.toast-err   .toast-ico { background: var(--danger); }
.toast-warn  { border-left-color: var(--warn); }
.toast-warn  .toast-ico { background: var(--warn); }

/* ============ 登录过期 Modal(小尺寸) ============ */
.modal-dialog-sm {
    max-width: 380px;
}
.modal-body-text {
    padding: 24px 24px 8px;
    text-align: center;
}
.modal-body-text p {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--admin-text);
    line-height: 1.6;
}
.modal-body-text p.login-expired-sub {
    font-size: 12px;
    color: var(--admin-text-2);
    margin-top: 8px;
}
.login-expired-ico {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.85;
}
.modal-dialog-sm .modal-foot {
    padding: 12px 20px 20px;
    border-top: none;
    justify-content: center;
}

/* ============ Token 剩余时间显示 ============ */
.token-remaining {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-left: 8px;
    background: rgba(0,0,0,0.04);
    color: var(--text-2);
    font-size: 11px;
    font-family: 'SF Mono', Consolas, monospace;
    border-radius: 2px;
    letter-spacing: 0.3px;
    transition: all 0.15s;
}
.token-remaining.warning {
    background: #fef2f2;
    color: var(--danger);
    animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============ Switch 开关 ============ */
.switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.switch label {
    display: inline-block;
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.switch label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.22s cubic-bezier(0.2, 0.6, 0.3, 1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.switch input:checked + label {
    background: var(--honor-blue);
}
.switch input:checked + label::after {
    transform: translateX(18px);
}
.switch-text {
    font-size: 12px;
    color: var(--admin-text-2);
}

/* ============ Settings 表单 ============ */
.settings-form {
    max-width: 880px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
}
.form-grid .field {
    margin-bottom: 0;
}
.field-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--admin-text-3);
    line-height: 1.5;
}
.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* ============ 下载按钮动画 ============ */
.dl-btn {
    transition: all 0.15s;
}
.dl-btn:hover {
    background: var(--honor-blue);
    color: #fff;
    border-color: var(--honor-blue);
    transform: translateY(-1px);
}
.dl-btn:active {
    transform: translateY(0);
}

/* ============ 帐号下拉菜单(改进) ============ */
.account-trigger .uname {
    transition: color 0.15s;
}
.account-dropdown a {
    transition: all 0.12s;
    position: relative;
}
.account-dropdown a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--honor-blue);
    transform: scaleY(0);
    transition: transform 0.15s;
}
.account-dropdown a:hover::before {
    transform: scaleY(1);
}

/* ============ 响应式 ============ */
@media (max-width: 767.98px) {
    .toast-container {
        top: 72px;
        right: 12px;
        left: 12px;
    }
    .toast {
        min-width: 0;
        max-width: none;
    }
    .form-grid { grid-template-columns: 1fr; }
}


