/* ============================================================
   NavVault - WebStack 风格样式
   亮色 / 暗色主题通过 html[data-theme] 切换
   ============================================================ */

:root {
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

    --accent: #3273dc;
    --accent-strong: #2462c4;
    --accent-soft: rgba(50, 115, 220, .12);
    --accent-line: rgba(50, 115, 220, .35);

    --text: #22303f;
    --text-strong: #14202d;
    --muted: #74849a;
    --muted-2: #93a1b5;

    --bg: #eaf1fa;
    --bg-image:
        radial-gradient(900px 620px at 80% 4%, rgba(64, 132, 224, .26), transparent 62%),
        radial-gradient(720px 540px at 12% 96%, rgba(120, 96, 220, .18), transparent 66%),
        linear-gradient(160deg, #f1f6ff 0%, #e7eefb 52%, #f0f5fc 100%);

    --sidebar: rgba(255, 255, 255, .74);
    --card: rgba(255, 255, 255, .88);
    --card-solid: #ffffff;
    --card-border: rgba(255, 255, 255, .72);
    --input-bg: rgba(255, 255, 255, .82);
    --line: rgba(35, 60, 92, .10);
    --line-strong: rgba(35, 60, 92, .18);
    --hover: rgba(50, 115, 220, .06);

    --shadow: 0 8px 22px rgba(31, 61, 107, .08);
    --shadow-hover: 0 14px 30px rgba(31, 61, 107, .18);

    --danger: #d64545;
    --danger-soft: rgba(214, 69, 69, .12);
    --success: #2f9e6e;
    --success-soft: rgba(47, 158, 110, .13);
    --warning: #b8811f;
    --warning-soft: rgba(214, 154, 45, .15);

    --radius: 10px;
    --radius-lg: 14px;
}

[data-theme="dark"] {
    --accent: #5b9cff;
    --accent-strong: #7cb1ff;
    --accent-soft: rgba(91, 156, 255, .14);
    --accent-line: rgba(91, 156, 255, .4);

    --text: #dfe7f3;
    --text-strong: #f1f6ff;
    --muted: #90a2bb;
    --muted-2: #6c7f9b;

    --bg: #0c1524;
    --bg-image:
        radial-gradient(900px 620px at 80% 4%, rgba(52, 118, 220, .22), transparent 62%),
        radial-gradient(720px 540px at 12% 96%, rgba(107, 79, 214, .16), transparent 66%),
        linear-gradient(160deg, #0c1524 0%, #101c2f 52%, #0b1422 100%);

    --sidebar: rgba(18, 29, 46, .74);
    --card: rgba(24, 38, 59, .82);
    --card-solid: #182639;
    --card-border: rgba(112, 143, 184, .18);
    --input-bg: rgba(15, 25, 40, .65);
    --line: rgba(150, 178, 214, .14);
    --line-strong: rgba(150, 178, 214, .26);
    --hover: rgba(91, 156, 255, .1);

    --shadow: 0 10px 26px rgba(0, 0, 0, .34);
    --shadow-hover: 0 16px 36px rgba(0, 0, 0, .45);

    --danger: #ff7676;
    --danger-soft: rgba(255, 118, 118, .14);
    --success: #54d6a2;
    --success-soft: rgba(84, 214, 162, .14);
    --warning: #f0bb5a;
    --warning-soft: rgba(240, 187, 90, .16);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image: var(--bg-image);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; }
button { font-family: inherit; }

::selection { background: var(--accent-soft); }

/* ---------- 布局 ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 252px;
    display: flex;
    flex-direction: column;
    padding: 22px 16px 14px;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 20;
}

.main {
    flex: 1;
    margin-left: 252px;
    padding: 28px 34px 18px;
    min-width: 0;
}

/* ---------- 品牌 ---------- */
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 6px 18px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-size: 19px;
    background: linear-gradient(135deg, #4f8ef7, #2f6bd8 60%, #2459bd);
    box-shadow: 0 8px 18px rgba(47, 107, 216, .32);
    overflow: hidden;
}

/* 表单辅助提示文字 */
.hint {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
}

.hint a {
    color: var(--accent);
    text-decoration: none;
}

.hint a:hover {
    text-decoration: underline;
}

/* 自定义站点图标：填满品牌图标容器 */
.brand-mark .brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: inherit;
}

.brand-text h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--text-strong);
}

.brand-text p {
    margin: 0;
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: 1px;
}

/* ---------- 搜索框 ---------- */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.search-box > i {
    position: absolute;
    left: 14px;
    font-size: 13px;
    color: var(--muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    height: 42px;
    padding: 0 38px 0 38px;
    font-size: 13px;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.search-box input::placeholder { color: var(--muted-2); }

.search-box input:focus {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: var(--card-solid);
}

.search-clear {
    position: absolute;
    right: 8px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--muted);
    font-size: 12px;
}

.search-clear:hover { background: var(--hover); color: var(--accent); }

/* ---------- 分类导航 ---------- */
.cat-nav {
    flex: 1;
    overflow-y: auto;
    padding: 2px 2px 10px;
    margin-right: -6px;
    scrollbar-width: thin;
}

.cat-nav::-webkit-scrollbar { width: 6px; }
.cat-nav::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }

.cat-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin-bottom: 3px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: background .16s, color .16s;
}

.cat-link i { width: 16px; text-align: center; font-size: 13px; opacity: .85; }
.cat-link span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cat-link em {
    font-style: normal;
    font-size: 11px;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--hover);
    color: var(--muted);
}

.cat-link:hover { background: var(--hover); color: var(--text); }

.cat-link.active {
    background: var(--accent-soft);
    border-left-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.cat-link.active em { background: var(--accent); color: #fff; }

.sidebar-footer {
    border-top: 1px solid var(--line);
    padding: 12px 6px 2px;
    margin-top: auto;
}

.side-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
    padding: 5px 4px;
}

.side-link:hover { color: var(--accent); }

.sidebar-copyright {
    margin: 6px 0 0;
    font-size: 11px;
    color: var(--muted-2);
}

/* ---------- 主区域顶栏 ---------- */
.main-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 0 2px;
}

.topbar-title h2 {
    margin: 0 0 3px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--text-strong);
}

.topbar-title p {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: var(--shadow);
    transition: transform .18s, color .18s, background .18s;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    color: var(--accent);
    background: var(--card-solid);
}

/* ---------- 分类区块 ---------- */
.category-section {
    margin-bottom: 30px;
    scroll-margin-top: 18px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 2px;
}

.section-head h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 15.5px;
    font-weight: 650;
    color: var(--text-strong);
}

.section-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.section-count {
    font-size: 11.5px;
    color: var(--muted-2);
    white-space: nowrap;
}

/* ---------- 站点卡片 ---------- */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 13px;
}

.site-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 13px 14px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.site-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-line);
    color: var(--text);
}

.site-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--card-solid);
    border: 1px solid var(--line);
    overflow: hidden;
}

.site-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.site-icon.is-initial {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, #5b9cff, #2f6bd8);
    font-weight: 700;
    font-size: 17px;
}

.initial-letter { line-height: 1; }

.site-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.site-name {
    font-size: 13.5px;
    font-weight: 650;
    color: var(--text-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-desc {
    font-size: 11.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-open {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--muted-2);
    opacity: 0;
    transform: translateX(-2px);
    transition: opacity .18s, transform .18s;
}

.site-card:hover .site-open { opacity: 1; transform: translateX(0); color: var(--accent); }

.empty-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 12.5px;
    background: var(--card);
}

/* ---------- 空状态 ---------- */
.empty-state,
.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.empty-icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 27px;
    margin-bottom: 16px;
}

.empty-state h3 { margin: 0 0 6px; font-size: 17px; color: var(--text-strong); }
.empty-state p { margin: 0 0 18px; font-size: 13px; }

.search-empty { display: none; padding: 40px 20px; }
.search-empty i { font-size: 26px; margin-bottom: 10px; color: var(--muted-2); }
.search-empty p { margin: 0; font-size: 13px; }

.main-footer {
    padding: 14px 2px 4px;
    border-top: 1px solid var(--line);
    font-size: 11.5px;
    color: var(--muted-2);
    text-align: center;
}

/* ---------- 通用按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background .16s, color .16s, border-color .16s, transform .12s;
    text-decoration: none;
    white-space: nowrap;
}

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

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

.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--text);
}
.btn-ghost:hover { background: var(--hover); border-color: var(--accent-line); color: var(--accent); }

.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { background: var(--accent); color: #fff; }

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

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

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }

.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { transform: none; }

/* ---------- 提示条 ---------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 12.5px;
    line-height: 1.6;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert i { margin-top: 2px; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: var(--success-soft); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-soft); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-soft); }
.alert-info { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }

/* ---------- 登录 / 关闭页 ---------- */
.auth-page,
.page-closed {
    min-height: 100vh;
    background-color: var(--bg);
    background-image: var(--bg-image);
    background-attachment: fixed;
}

.auth-wrap,
.closed-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px 16px;
}

.auth-card,
.closed-card {
    width: min(420px, 100%);
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    padding: 34px 32px 28px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-logo .brand-mark { width: 46px; height: 46px; flex-basis: 46px; font-size: 20px; }

.auth-logo h1 { margin: 0; font-size: 19px; color: var(--text-strong); }
.auth-logo p { margin: 0; font-size: 11.5px; color: var(--muted); }

.auth-title { margin: 0 0 4px; font-size: 17px; color: var(--text-strong); }
.auth-sub { margin: 0 0 20px; font-size: 12.5px; color: var(--muted); }

.auth-foot {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.closed-card { text-align: center; }
.closed-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warning-soft);
    color: var(--warning);
    font-size: 26px;
}
.closed-card h1 { margin: 0 0 8px; font-size: 19px; color: var(--text-strong); }
.closed-card p { margin: 0 0 22px; font-size: 13px; color: var(--muted); }

/* ---------- 前台访问密码（毛玻璃锁屏） ---------- */
.gate-page {
    position: relative;
    min-height: 100vh;
    margin: 0;
    padding: 40px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg);
    background-image: var(--bg-image);
    background-attachment: fixed;
}

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

.gate-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    will-change: transform;
    animation: gateDrift 20s ease-in-out infinite alternate;
}

.gate-orb-a {
    width: 560px;
    height: 560px;
    top: -180px;
    left: -150px;
    background: radial-gradient(circle, rgba(91, 156, 255, .78), rgba(91, 156, 255, 0) 70%);
}

.gate-orb-b {
    width: 520px;
    height: 520px;
    right: -160px;
    bottom: -190px;
    background: radial-gradient(circle, rgba(150, 108, 255, .7), rgba(150, 108, 255, 0) 70%);
    animation-delay: -7s;
}

.gate-orb-c {
    width: 420px;
    height: 420px;
    top: 42%;
    left: 56%;
    background: radial-gradient(circle, rgba(60, 214, 178, .5), rgba(60, 214, 178, 0) 72%);
    animation-delay: -13s;
}

.gate-grain {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: .18;
    mix-blend-mode: soft-light;
}

[data-theme="dark"] .gate-grain { opacity: .1; }
[data-theme="dark"] .gate-orb-a { opacity: .75; }
[data-theme="dark"] .gate-orb-b { opacity: .7; }
[data-theme="dark"] .gate-orb-c { opacity: .6; }

.gate-shell {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
}

.gate-card {
    position: relative;
    padding: 38px 34px 26px;
    text-align: center;
    border-radius: 26px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .56));
    border: 1px solid rgba(255, 255, 255, .85);
    box-shadow:
        0 34px 74px -30px rgba(23, 51, 102, .5),
        0 2px 6px rgba(23, 51, 102, .05),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    animation: gateIn .5s cubic-bezier(.22, .8, .36, 1) both;
}

[data-theme="dark"] .gate-card {
    background: linear-gradient(160deg, rgba(30, 46, 70, .82), rgba(18, 29, 46, .66));
    border-color: rgba(140, 170, 210, .18);
    box-shadow:
        0 34px 74px -26px rgba(0, 0, 0, .7),
        inset 0 1px 0 rgba(255, 255, 255, .07);
}

.gate-badge {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
}

.gate-badge-mark {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    font-size: 30px;
    color: #fff;
    background: linear-gradient(140deg, #4f8cff 0%, #7b6bff 55%, #b06bff 100%);
    box-shadow:
        0 16px 30px -10px rgba(79, 140, 255, .7),
        inset 0 1px 0 rgba(255, 255, 255, .45);
}

.gate-badge-mark i { font-size: 30px; }

.gate-badge-mark .brand-logo {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    object-fit: cover;
}

.gate-badge-lock {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    color: #fff;
    background: linear-gradient(140deg, #3fd6a2, #1fae7c);
    border: 2px solid #fff;
    box-shadow: 0 6px 12px -4px rgba(31, 174, 124, .6);
}

[data-theme="dark"] .gate-badge-lock { border-color: #1a2a40; }

.gate-title {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--text-strong);
}

.gate-sub {
    margin: 0 0 22px;
    font-size: 12.5px;
    color: var(--muted);
}

.gate-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 12px;
    text-align: left;
    font-size: 12.5px;
    line-height: 1.5;
    border-radius: 12px;
    color: #c23b3b;
    background: rgba(214, 69, 69, .1);
    border: 1px solid rgba(214, 69, 69, .18);
    animation: gateShake .38s ease;
}

.gate-error i { margin-top: 2px; }

[data-theme="dark"] .gate-error {
    color: #ff9a9a;
    background: rgba(214, 69, 69, .14);
    border-color: rgba(214, 69, 69, .26);
}

.gate-form { margin: 0; }

.gate-field {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.gate-field input[type="password"],
.gate-field input[type="text"] {
    width: 100%;
    height: 50px;
    padding: 0 46px 0 42px;
    font-size: 14px;
    letter-spacing: .3px;
    border-radius: 14px;
    border: 1px solid rgba(120, 145, 180, .3);
    background: rgba(255, 255, 255, .74);
    color: var(--text-strong);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.gate-field input::placeholder { color: var(--muted-2); }

.gate-field input[type="password"]:focus,
.gate-field input[type="text"]:focus {
    outline: none;
    background: #fff;
    border-color: rgba(79, 140, 255, .7);
    box-shadow: 0 0 0 4px rgba(79, 140, 255, .15);
}

[data-theme="dark"] .gate-field input[type="password"],
[data-theme="dark"] .gate-field input[type="text"] {
    background: rgba(13, 22, 36, .68);
    border-color: rgba(130, 160, 200, .22);
}

[data-theme="dark"] .gate-field input[type="password"]:focus,
[data-theme="dark"] .gate-field input[type="text"]:focus {
    background: rgba(13, 22, 36, .92);
    border-color: rgba(91, 156, 255, .65);
    box-shadow: 0 0 0 4px rgba(91, 156, 255, .18);
}

.gate-field-icon {
    position: absolute;
    left: 15px;
    font-size: 13px;
    color: var(--muted-2);
    pointer-events: none;
    transition: color .18s ease;
}

.gate-field:focus-within .gate-field-icon { color: var(--accent); }

.gate-eye {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.gate-eye:hover {
    background: var(--hover);
    color: var(--text);
}

.gate-submit {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .5px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #4f8cff 0%, #6a76ff 55%, #8b6cff 100%);
    box-shadow: 0 16px 28px -14px rgba(79, 124, 255, .95);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.gate-submit:hover {
    transform: translateY(-1px);
    filter: saturate(1.08) brightness(1.03);
    box-shadow: 0 20px 34px -14px rgba(79, 124, 255, 1);
}

.gate-submit:active {
    transform: translateY(0) scale(.995);
}

.gate-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gate-submit i { font-size: 12px; }

.gate-foot {
    margin-top: 20px;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11.5px;
    color: var(--muted);
    border-top: 1px solid rgba(120, 145, 180, .18);
}

[data-theme="dark"] .gate-foot { border-top-color: rgba(140, 170, 210, .14); }

.gate-foot a {
    color: var(--accent);
    font-weight: 600;
}

.gate-foot a:hover { text-decoration: underline; }

@keyframes gateIn {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to { opacity: 1; transform: none; }
}

@keyframes gateShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
}

@keyframes gateDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(34px, -28px, 0) scale(1.09); }
}

@media (prefers-reduced-motion: reduce) {
    .gate-orb, .gate-card, .gate-error { animation: none; }
}

@media (max-width: 480px) {
    .gate-page { padding: 26px 14px; }
    .gate-card { padding: 30px 22px 22px; border-radius: 22px; }
    .gate-title { font-size: 19px; }
}

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }

.field label,
.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 12.5px;
    font-weight: 550;
    color: var(--text);
}

.field .hint { margin-top: 4px; font-size: 11.5px; color: var(--muted-2); }

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    transition: border-color .16s, box-shadow .16s, background .16s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: var(--card-solid);
}

textarea { resize: vertical; min-height: 82px; }
input[type="checkbox"] { accent-color: var(--accent); }

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

.form-grid .span-all { grid-column: 1 / -1; }

.input-with-btn {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.input-with-btn input { flex: 1; min-width: 0; }

.pwd-gen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    background: var(--hover);
    font-size: 12px;
    color: var(--muted);
}

.pwd-gen label { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-size: 12px; }
.pwd-gen input[type="number"] { width: 66px; padding: 5px 7px; }
.pwd-gen .gen-actions { margin-left: auto; }

/* ---------- 复选框行 / 表格小图标 ---------- */
.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.checkbox-row input[type="checkbox"] {
    width: auto;
    margin: 0;
    padding: 0;
}

.table-fav {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    flex: 0 0 18px;
    border-radius: 4px;
}

/* 站点单元格：图标 + 名称 */
.cell-site-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cell-site-name strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-fav-initial {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.security-list {
    margin: 0 0 14px;
    padding-left: 20px;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--text);
}

.security-list li::marker { color: var(--accent); }
.security-list strong { color: var(--text-strong); }

.env-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- 后台 ---------- */
.admin-page {
    min-height: 100vh;
    background-color: var(--bg);
    background-image: var(--bg-image);
    background-attachment: fixed;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 26px;
    background: var(--sidebar);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-strong);
    white-space: nowrap;
}

.admin-brand .brand-mark { width: 34px; height: 34px; flex-basis: 34px; font-size: 15px; border-radius: 9px; }
.admin-brand small { display: block; font-size: 10.5px; font-weight: 400; color: var(--muted); letter-spacing: .5px; }

.admin-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted);
    border: 1px solid transparent;
    transition: background .16s, color .16s;
}

.admin-tab:hover { background: var(--hover); color: var(--text); }

.admin-tab.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 26px 24px 40px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.panel-head h2,
.panel-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    color: var(--text-strong);
}

.panel-head h2 i,
.panel-head h3 i { color: var(--accent); font-size: 14px; }

.panel-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.panel-title-wrap { min-width: 0; }

.panel-sub { margin: -4px 0 14px; font-size: 12px; color: var(--muted); }

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 9px;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
    font-size: 12.5px;
    table-layout: fixed;
}

.data-table th,
.data-table td {
    padding: 6px 10px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table th {
    background: var(--hover);
    color: var(--muted);
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: .3px;
    white-space: nowrap;
}

.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--hover); }

/* ---------- 导航筛选：分类 chip 条（一行显示，点击即筛选） ---------- */
.cat-chip-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 38px;
}
.cat-chip-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-right: 2px;
    flex: 0 0 auto;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.cat-chip:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-soft);
}
.cat-chip.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(50, 115, 220, .28);
}
.cat-chip.is-private::after {
    content: "\f023";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 9px;
    margin-left: 2px;
    opacity: .6;
}
.cat-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 15px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    color: var(--muted);
    background: var(--hover);
    border-radius: 999px;
}
.cat-chip.active .cat-chip-count {
    color: var(--accent);
    background: rgba(255, 255, 255, .9);
}

/* ---------- 导航筛选：搜索行（回车筛选） ---------- */
.filter-search-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 12px;
    height: 34px;
}
.filter-search-row > i {
    position: absolute;
    left: 11px;
    font-size: 12px;
    color: var(--muted);
    pointer-events: none;
}
.filter-search-row input {
    flex: 1;
    height: 34px;
    padding: 0 80px 0 30px;
    font-size: 13px;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.filter-search-row input:focus {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.filter-search-clear {
    position: absolute;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    font-size: 11px;
    color: var(--muted);
    border-radius: 6px;
    text-decoration: none;
    transition: color .15s, background .15s;
}
.filter-search-clear:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.cell-url { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; }

/* ---------- 导航序号 ---------- */
.nav-pos {
    font-weight: 700;
    font-size: 13px;
    color: var(--accent);
    margin-right: 3px;
}
.nav-pos-meta {
    font-size: 10px;
    color: var(--muted-2);
    opacity: .65;
}

/* ---------- 内联表单（上移/下移按钮） ---------- */
.inline-form { display: inline-block; }
.inline-form .btn { padding: 4px 7px; }

/* ---------- disabled 按钮 ---------- */
button:disabled,
.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- 旧筛选样式（保留不影响） ---------- */
.filter-bar, .filter-row, .filter-item, .filter-search-wrap, .filter-cat, .filter-q, .filter-actions { display: none !important; }

.cell-ellipsis {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.7;
    white-space: nowrap;
}

.badge-blue { background: var(--accent-soft); color: var(--accent); }
.badge-green { background: var(--success-soft); color: var(--success); }
.badge-gray { background: var(--hover); color: var(--muted); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-orange { background: var(--warning-soft); color: var(--warning); }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .2px; }

.dot-sep { color: var(--muted-2); padding: 0 5px; }

/* ---------- 密码库状态条 ---------- */
.vault-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    background: var(--hover);
}

.vault-status .status-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.vault-status .status-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.vault-status.locked .status-icon { background: var(--warning-soft); color: var(--warning); }
.vault-status.unlocked .status-icon { background: var(--success-soft); color: var(--success); }

.vault-status .status-text strong { display: block; font-size: 13px; color: var(--text-strong); }
.vault-status .status-text span { font-size: 11.5px; color: var(--muted); }

.countdown { font-family: var(--mono); color: var(--success); font-weight: 600; }

.unlock-box {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    padding: 10px 0 6px;
}

.unlock-box .unlock-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    background: var(--accent-soft);
    color: var(--accent);
}

.unlock-box h3 { margin: 0 0 6px; font-size: 16px; color: var(--text-strong); }
.unlock-box p { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); }
.unlock-box form { text-align: left; }

/* ---------- 设置分区 ---------- */
.setting-block + .setting-block {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.setting-block h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    font-size: 14.5px;
    color: var(--text-strong);
}

.setting-block h3 i { color: var(--accent); font-size: 13px; }
.setting-block .block-desc { margin: 0 0 12px; font-size: 12px; color: var(--muted); }

.inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.danger-note {
    border-left: 3px solid var(--danger);
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: 6px;
    padding: 10px 13px;
    font-size: 12px;
    line-height: 1.7;
    margin: 12px 0 0;
}

/* ---------- 提示浮层 ---------- */
.nv-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 14px);
    z-index: 999;
    padding: 10px 20px;
    border-radius: 9px;
    background: rgba(18, 28, 44, .92);
    color: #fff;
    font-size: 12.5px;
    letter-spacing: .2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    max-width: 88vw;
}

.nv-toast.show { opacity: 1; transform: translate(-50%, 0); }
.nv-toast.is-error { background: rgba(166, 40, 40, .94); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .app-shell { display: block; }

    .sidebar {
        position: relative;
        width: auto;
        height: auto;
        bottom: auto;
        padding: 16px 16px 8px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .cat-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        padding: 2px 0 8px;
        margin-right: 0;
    }

    .cat-link {
        flex: 0 0 auto;
        border-left: 0;
        border-radius: 999px;
        background: var(--hover);
        padding: 6px 12px;
        margin-bottom: 0;
        font-size: 12.5px;
    }

    .cat-link em { background: transparent; padding: 0; }
    .cat-link.active em { background: transparent; color: var(--accent); }
    .sidebar-footer { display: none; }

    .main {
        margin-left: 0;
        padding: 22px 17px 16px;
    }

    .main-topbar { margin-bottom: 18px; }
    .topbar-title h2 { font-size: 19px; }
    .site-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
    .site-card { padding: 11px 12px; }
    .site-icon { width: 38px; height: 38px; flex-basis: 38px; }
}

@media (max-width: 560px) {
    .brand { padding-bottom: 14px; }
    .site-grid { grid-template-columns: 1fr; }
    .site-open { display: none; }
    .site-desc { font-size: 11px; }
    .auth-card, .closed-card { padding: 26px 20px 22px; }

    .admin-header { padding: 10px 14px; gap: 10px; }
    .admin-brand small { display: none; }
    .admin-tabs { order: 3; width: 100%; flex: 1 0 100%; overflow-x: auto; flex-wrap: nowrap; }
    .admin-tab { white-space: nowrap; padding: 7px 12px; }
    .admin-main { padding: 18px 13px 30px; }
    .panel { padding: 16px 14px; }
    .form-grid { grid-template-columns: 1fr; }
    .vault-status { align-items: flex-start; }
    .pwd-gen .gen-actions { width: 100%; margin-left: 0; }
    .pwd-gen .gen-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ============================================================
   后台弹窗 / 树形分类
   ============================================================ */
.cat-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cat-tree .cat-children {
    list-style: none;
    margin: 2px 0 2px 20px;
    padding-left: 14px;
    border-left: 1px dashed var(--line-strong);
}

.cat-node-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    flex-wrap: wrap;
}

.cat-node-row:hover {
    background: var(--hover);
}

.cat-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.cat-name i {
    color: var(--accent);
}

.cat-name:hover {
    color: var(--accent);
}

.cat-count {
    font-size: 12px;
    color: var(--muted);
}

.cat-node-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-node-actions form {
    margin: 0;
}

.cat-tree-actions {
    margin-top: 16px;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.modal.open {
    display: block;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 21, 36, .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.modal-dialog {
    position: relative;
    width: calc(100% - 32px);
    max-width: 640px;
    margin: 6vh auto 40px;
    background: var(--card-solid);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
}

.modal-head h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-strong);
}

.modal-close {
    border: 0;
    background: none;
    padding: 0 4px;
    font-size: 24px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 18px 20px 20px;
    overflow-y: auto;
}

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

body.modal-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .modal-dialog {
        margin: 3vh auto 20px;
        max-height: 92vh;
    }

    .modal-body {
        padding: 14px;
    }
}

/* ---------- 密码库搜索框 ---------- */
.vault-search {
    max-width: 380px;
    margin: 0 0 14px;
}

/* ---------- 导入弹窗 ---------- */
.import-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.import-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
}

.import-tab:hover {
    background: var(--hover);
    color: var(--text);
}

.import-tab.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-line);
    font-weight: 600;
}

.import-check {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 6px 0;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.import-check input {
    margin-top: 3px;
}

.modal-body input[type="file"] {
    width: 100%;
    padding: 9px 10px;
    font-size: 13px;
    color: var(--text);
    background: var(--input-bg);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.modal-body input[type="file"]:disabled {
    opacity: .55;
}

@media (max-width: 560px) {
    .vault-search {
        max-width: 100%;
    }
}

/* ---------- 批量操作条 ---------- */
.bulk-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.bulk-form { margin: 0; }

.bulk-count {
    font-size: 12px;
    color: var(--muted);
    flex: 0 0 auto;
}

.bulk-count strong {
    color: var(--accent);
    font-size: 13px;
}

.bulk-select {
    max-width: 220px;
    padding: 5px 8px;
    font-size: 12px;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    cursor: pointer;
}

.bulk-select:focus {
    outline: none;
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.bulk-hint {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--muted-2);
}

/* 复选框列 */
.data-table .col-check {
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
}

.col-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* ---------- 密码列表：网站名称链接 ---------- */
.pwd-site-link {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-weight: 600;
}

.pwd-site-link:hover { text-decoration: underline; }

/* ---------- 密码行点击高亮 ---------- */
.pwd-row { cursor: pointer; }

.data-table tbody tr.pwd-row.is-clicked td {
    background: var(--accent-soft);
}

.data-table tbody tr.pwd-row.is-clicked td:first-child {
    box-shadow: inset 3px 0 0 var(--accent);
}

/* ---------- 密码详情弹窗：信息列表 ---------- */
.info-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

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

.info-key {
    flex: 0 0 84px;
    font-size: 12px;
    color: var(--muted);
}

.info-val {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    color: var(--text);
    word-break: break-all;
}

@media (max-width: 560px) {
    .bulk-hint {
        margin-left: 0;
        flex-basis: 100%;
    }

    .bulk-select { max-width: 100%; }

    .info-row {
        flex-direction: column;
        gap: 4px;
    }

    .info-key { flex: none; }
}
