/* ============================================================
   网址导航 /tools/navi  — 极简纯净 + 三端响应式
   断点：电脑 ≥1024 / 平板 768–1023 / 手机 <768
   配色：纯净白底 + 站点蓝点缀，去边框、弱阴影
   ============================================================ */
/* 占满整个电脑端屏幕：覆盖全站 .app / .main-content 的宽度限制 */
body.page-navi-full .app { max-width: 100%; }
body.page-navi-full .main-content { max-width: 100%; border-right: 0; }
.nv-page { max-width: 100%; margin: 0 auto; padding: 0 16px 40px; }

/* ---------------- 顶部 ---------------- */
.nv-top {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid #eef1f5;
    margin: 0 -16px 18px;
    padding: 12px 16px 10px;
}
.nv-top-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1168px;
    margin: 0 auto;
}
.nv-brand { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.nv-logo { font-size: 22px; }
.nv-brand-name { font-size: 17px; font-weight: 700; color: #1a2b45; letter-spacing: .5px; }

/* 搜索框 */
.nv-search {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
}
.nv-search-input {
    width: 100%;
    border: 1px solid #e3e8f0;
    background: #f7f9fc;
    border-radius: 999px;
    padding: 11px 44px 11px 18px;
    font-size: 15px;
    color: #20304a;
    outline: none;
    transition: border-color .12s, background .12s, box-shadow .12s;
}
.nv-search-input:focus {
    border-color: #136ce9;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(19,108,233,.1);
}
.nv-search-clear {
    position: absolute; right: 38px;
    border: none; background: none; cursor: pointer;
    font-size: 20px; color: #aab2c0; line-height: 1;
}
.nv-search-clear:hover { color: #667; }
.nv-kbd {
    position: absolute; right: 12px;
    font-size: 12px; color: #9aa6bd;
    border: 1px solid #dde2ec; border-radius: 5px;
    padding: 1px 7px; background: #fff;
}

/* 操作按钮 */
.nv-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.nv-btn {
    border: 1px solid #dde2ec;
    background: #fff;
    color: #2a3b55;
    border-radius: 9px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, border-color .12s;
}
.nv-btn:hover { background: #f3f6fc; border-color: #b9c6de; }
.nv-btn-primary { background: #136ce9; border-color: #136ce9; color: #fff; }
.nv-btn-primary:hover { background: #0f5bc9; border-color: #0f5bc9; }

/* 分类横条 */
.nv-cats {
    display: flex;
    gap: 8px;
    margin: 10px auto 0;
    max-width: 1168px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.nv-cats::-webkit-scrollbar { display: none; }
.nv-cat {
    border: 1px solid #e6e9f0;
    background: #fff;
    color: #4a5870;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .12s;
    flex: 0 0 auto;
}
.nv-cat:hover { border-color: #b9c6de; color: #1a2b45; }
.nv-cat.active {
    background: #136ce9; border-color: #136ce9; color: #fff;
}

/* ---------------- 主体 ---------------- */
.nv-section-head {
    display: flex; align-items: baseline; gap: 10px;
    margin: 4px 0 14px;
}
.nv-section-title { font-size: 17px; font-weight: 700; color: #1a2b45; margin: 0; }
.nv-section-count { font-size: 13px; color: #9aa6bd; }

.nv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.nv-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    transition: transform .08s, box-shadow .12s, border-color .12s;
    position: relative;
}
.nv-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(20,40,80,.08);
    border-color: #dbe4f3;
}
.nv-card-fav {
    position: absolute; top: 8px; right: 10px;
    border: none; background: none; cursor: pointer;
    font-size: 15px; line-height: 1; color: #cfd6e2;
}
.nv-card-fav.on { color: #f5a623; }
.nv-card-del {
    position: absolute; top: 6px; right: 30px;
    border: none; background: none; cursor: pointer;
    font-size: 13px; color: #c7ccd6;
}
.nv-card-del:hover { color: #c0392b; }
.nv-card-ico {
    width: 40px; height: 40px; flex: 0 0 auto;
    border-radius: 10px;
    background: #eaf1fd;
    color: #136ce9;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
    overflow: hidden;
}
.nv-card-ico img { width: 100%; height: 100%; object-fit: cover; }
.nv-card-body { min-width: 0; flex: 1; }
.nv-card-name {
    font-size: 14px; font-weight: 600; color: #20304a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nv-card-desc {
    font-size: 12px; color: #8a96ad;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 2px;
}

.nv-empty { text-align: center; color: #aab; padding: 60px 16px; }
.nv-empty-icon { font-size: 40px; margin-bottom: 10px; }

/* ---------------- 页脚 ---------------- */
.nv-foot { text-align: center; margin-top: 30px; font-size: 12px; color: #aab2c0; }

/* ---------------- 弹窗 ---------------- */
.nv-modal-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60;
}
.nv-modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 420px; max-width: 92vw;
    background: #fff; border-radius: 14px;
    z-index: 70; box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
}
.nv-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid #f0f2f6;
}
.nv-modal-head h3 { margin: 0; font-size: 16px; color: #1a2b45; }
.nv-modal-close { border: none; background: none; font-size: 24px; cursor: pointer; color: #99a; line-height: 1; }
.nv-modal-close:hover { color: #136ce9; }
.nv-modal-body { padding: 16px 18px 4px; }
.nv-modal-foot {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 12px 18px 16px;
}
.nv-field { margin-bottom: 14px; }
.nv-field label { display: block; font-size: 12px; color: #6b7790; margin-bottom: 5px; }
.nv-req { color: #e0483b; }
.nv-input {
    width: 100%; border: 1px solid #dde2ec; border-radius: 8px;
    padding: 9px 11px; font-size: 14px; color: #222; background: #fff; outline: none;
    box-sizing: border-box;
}
.nv-input:focus { border-color: #136ce9; box-shadow: 0 0 0 3px rgba(19,108,233,.12); }

/* ---------------- 提示条 ---------------- */
.nv-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
    background: #1a2b45; color: #fff; padding: 10px 18px; border-radius: 999px;
    font-size: 13px; z-index: 90; box-shadow: 0 6px 20px rgba(0,0,0,.25);
    opacity: 0; transition: opacity .2s;
}
.nv-toast.show { opacity: 1; }

/* ============================================================
   平板 768–1023
   ============================================================ */
@media (max-width: 1023px) {
    .nv-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .nv-brand-name { display: none; } /* 平板省空间，仅留图标 */
}

/* ============================================================
   手机 <768
   ============================================================ */
@media (max-width: 767px) {
    .nv-page { padding: 0 12px 32px; }
    .nv-top { margin: 0 -12px 14px; padding: 10px 12px 8px; }
    .nv-top-inner { flex-wrap: wrap; gap: 10px; }
    .nv-brand { order: 1; }
    .nv-search { order: 3; flex: 1 1 100%; }
    .nv-actions { order: 2; margin-left: auto; }
    .nv-btn { padding: 8px 12px; font-size: 13px; }

    .nv-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .nv-card { padding: 10px 12px; gap: 10px; }
    .nv-card-ico { width: 36px; height: 36px; font-size: 16px; }

    .nv-modal { width: 100%; max-width: 100%; height: auto; bottom: 0; top: auto; transform: none; border-radius: 16px 16px 0 0; }
}
