/* ========================================
   零界工坊 - 全局界面增强样式 v2.0
   登录页 + 主界面 + 动画
   ======================================== */

/* ========== 全局基础 ========== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: default;
}
/* 只有输入类元素才显示文本光标 */
input, textarea, [contenteditable="true"],
.n-input .n-input__input-el,
.n-input textarea,
.n-input input {
    cursor: text !important;
}
a, button, .n-button, .n-menu-item, .n-tag,
.n-pagination-item, .n-base-selection,
.n-switch, .n-checkbox, .n-radio,
[role="button"], [onclick], .n-tabs-tab,
.n-base-select-option, .n-dropdown-option,
label, select, .tabs-card-scroll-item {
    cursor: pointer !important;
}
body {
    color: rgba(255, 255, 255, 0.75);
    background: #0a0e1a !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif !important;
}

/* ========== 登录页面 ========== */

.view-account {
    background: #0b0b14 !important;
    position: relative;
    overflow: hidden !important;
}
.view-account::before,
.view-account::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    will-change: transform;
    z-index: 0;
}
.view-account::before {
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
    top: -5%; left: -8%;
    animation: lgGlow1 14s ease-in-out infinite;
}
.view-account::after {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
    bottom: -5%; right: -8%;
    animation: lgGlow2 16s ease-in-out infinite;
}
@keyframes lgGlow1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, 35px) scale(1.08); }
    66% { transform: translate(-25px, 55px) scale(0.95); }
}
@keyframes lgGlow2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, -25px) scale(1.05); }
    66% { transform: translate(30px, -50px) scale(0.92); }
}
.view-account-container {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(25px);
    animation: lgCardEnter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}
@keyframes lgCardEnter {
    to { opacity: 1; transform: translateY(0); }
}
.view-account-top {
    padding: 24px 0 16px !important;
    opacity: 0;
    animation: lgFadeUp 0.6s ease 0.3s forwards;
}
@keyframes lgFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.view-account-top-logo {
    display: inline-block;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.08);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.view-account-top-logo:hover {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.15);
    transform: scale(1.02);
}
.view-account-top-logo img {
    width: 64px !important; height: 64px !important;
    object-fit: contain; border-radius: 8px; display: block;
}
.view-account-top-desc {
    font-size: 20px !important; font-weight: 600 !important;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-top: 16px;
    background: linear-gradient(135deg, #e0e0ff, #a5b4fc);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.view-account-form {
    margin-top: 8px;
    opacity: 0;
    animation: lgFadeUp 0.6s ease 0.5s forwards;
}
.view-account .n-input {
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.view-account .n-input:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
}
.view-account .n-input--focus {
    border-color: rgba(99, 102, 241, 0.5) !important;
    background: rgba(99, 102, 241, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}
.view-account .n-input .n-input__input-el,
.view-account .n-input input { color: #e0e0e0 !important; }
.view-account .n-input .n-input__placeholder { color: rgba(255, 255, 255, 0.25) !important; }
.view-account .default-color,
.view-account .n-checkbox .n-checkbox__label { color: rgba(255, 255, 255, 0.45) !important; }
.view-account .n-button--primary-type {
    border-radius: 10px !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative; overflow: hidden;
}
.view-account .n-button--primary-type:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4) !important;
    filter: brightness(1.1);
}
.view-account .n-button--primary-type:active {
    transform: translateY(0) scale(0.98);
}
.view-account .n-button--primary-type::after {
    content: '';
    position: absolute; top: -50%; left: -60%;
    width: 40%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: skewX(-20deg);
    animation: lgBtnShine 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes lgBtnShine {
    0%, 100% { left: -60%; }
    50% { left: 120%; }
}
.view-account-container::after {
    content: '';
    display: block; width: 0; height: 2px;
    margin: 24px auto 0; border-radius: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
    animation: lgLineExpand 1.5s ease 0.8s forwards;
}
@keyframes lgLineExpand { to { width: 60%; } }

/* 登录页粒子和光晕 */
.login-particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.login-particles .lp {
    position: absolute;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    will-change: transform, opacity;
    animation: lgParticle linear infinite;
}
@keyframes lgParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-5vh) scale(1); opacity: 0; }
}
.login-glow-extra {
    position: fixed; width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
    top: 45%; left: 55%; filter: blur(100px);
    pointer-events: none; z-index: 0;
    animation: lgGlow3 11s ease-in-out infinite;
}
@keyframes lgGlow3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, 25px) scale(1.12); }
}

/* ========== 主界面 - 侧边栏 ========== */

.layout .layout-sider,
.n-layout-sider {
    background: #0c0f1a !important;
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.04) !important;
}
.n-layout-sider .n-layout-sider-scroll-container {
    background: #0c0f1a !important;
}

/* 侧边栏 Logo 区 */
.logo {
    height: 56px !important;
    line-height: 56px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0 12px !important;
}
.logo img {
    height: 26px !important;
    opacity: 0.9;
    filter: brightness(1.2);
}
.logo .title {
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.85) !important;
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* NaiveUI 菜单样式 */
.n-layout-sider .n-menu {
    padding: 8px !important;
    background: transparent !important;
}
.n-layout-sider .n-menu .n-menu-item {
    margin: 2px 0 !important;
    border-radius: 8px !important;
    height: 40px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: transparent !important;
}
.n-layout-sider .n-menu .n-menu-item-content {
    border-radius: 8px !important;
    padding: 0 12px !important;
}
.n-layout-sider .n-menu .n-menu-item-content::before {
    border-radius: 8px !important;
    left: 4px !important;
    right: 4px !important;
}
.n-layout-sider .n-menu .n-menu-item:not(.n-menu-item--selected):hover .n-menu-item-content::before {
    background: rgba(255, 255, 255, 0.04) !important;
}
.n-layout-sider .n-menu .n-menu-item--selected .n-menu-item-content::before {
    background: rgba(99, 102, 241, 0.08) !important;
    border-left: 3px solid #818cf8 !important;
}
.n-layout-sider .n-menu .n-menu-item--selected .n-menu-item-content {
    color: #c7d2fe !important;
    font-weight: 500 !important;
}
.n-layout-sider .n-submenu > .n-submenu-children {
    padding-left: 4px !important;
}
.n-layout-sider .n-menu .n-submenu > .n-menu-item-content {
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.n-layout-sider .n-menu .n-menu-item-content__icon,
.n-layout-sider .n-menu .n-menu-item-content {
    color: rgba(255, 255, 255, 0.5) !important;
    transition: color 0.2s ease !important;
}
.n-layout-sider .n-menu .n-menu-item:hover .n-menu-item-content,
.n-layout-sider .n-menu .n-menu-item:hover .n-menu-item-content__icon {
    color: rgba(255, 255, 255, 0.85) !important;
}
.n-layout-sider .n-menu .n-menu-item--selected .n-menu-item-content__icon {
    color: #a5b4fc !important;
}
.n-layout-sider .n-menu .n-menu-item-content__arrow,
.n-layout-sider .n-submenu .n-menu-item-content__arrow {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* ========== 主界面 - 顶部头部栏 ========== */

.layout-header {
    background: #0d1120 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.3) !important;
    height: 48px !important;
    min-height: 48px !important;
    z-index: 100 !important;
}
/* 头部内的 n-layout-header */
.layout-header .n-layout-header {
    height: 48px !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 8px !important;
}
/* 头部触发器(折叠按钮) */
.layout-header .layout-header-trigger {
    width: 40px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}
.layout-header .layout-header-trigger .n-icon {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 18px !important;
}
.layout-header .layout-header-trigger:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}
.layout-header .layout-header-trigger:hover .n-icon {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* 顶部左侧区域 */
.layout-header-left {
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

/* 顶部右侧区域 - 修复重叠 */
.layout-header-right {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    padding-left: 12px !important;
    height: 48px !important;
    white-space: nowrap !important;
}
.layout-header-right > * {
    flex-shrink: 0 !important;
    height: auto !important;
    line-height: normal !important;
}
.layout-header .avatar,
.layout-header-right > * {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* 面包屑导航 */
.layout-header .n-breadcrumb {
    white-space: nowrap !important;
    overflow: hidden !important;
}
.layout-header .n-breadcrumb .n-breadcrumb-item__link {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 13px !important;
}
.layout-header .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500 !important;
}
.layout-header .n-breadcrumb .n-breadcrumb-item__separator {
    color: rgba(255, 255, 255, 0.15) !important;
}

/* ====== 顶部状态标签 - 隐藏 ====== */
.layout-header .n-tag--error-type,
.layout-header .n-tag {
    display: none !important;
}

/* 顶部音频播放器 */
.layout-header audio {
    height: 26px !important;
    max-width: 180px !important;
    border-radius: 14px !important;
    opacity: 0.6 !important;
    flex-shrink: 0 !important;
}
.layout-header audio:hover {
    opacity: 0.9 !important;
}

/* 用户信息区域 */
.layout-header .avatar {
    border-radius: 50% !important;
    border: 2px solid rgba(99, 102, 241, 0.3) !important;
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
}
/* 用户名文字 */
.layout-header .username,
.layout-header-right .n-dropdown-menu,
.layout-header .n-dropdown-option .n-dropdown-option-body__label {
    color: rgba(255, 255, 255, 0.75) !important;
    white-space: nowrap !important;
}

/* 头部内所有图标按钮 */
.layout-header .n-icon {
    height: auto !important;
    line-height: normal !important;
}

/* ========== 标签页 ========== */

.tabs-view {
    background: #0c1020 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    padding: 6px 10px !important;
    min-height: 38px !important;
}
.tabs-view-main {
    height: auto !important;
}
.tabs-view-main .tabs-card-scroll-item {
    background: rgba(255, 255, 255, 0.03) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    padding: 4px 14px !important;
    transition: all 0.2s ease !important;
    font-size: 12.5px !important;
    height: 28px !important;
    line-height: 20px !important;
    letter-spacing: 0.3px !important;
}
.tabs-view-main .tabs-card-scroll-item:hover {
    color: rgba(255, 255, 255, 0.75) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}
.tabs-view-main .tabs-card-scroll .active-item {
    color: #c7d2fe !important;
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
    font-weight: 500 !important;
}
.tabs-view-main .tabs-card-scroll-item .n-icon {
    color: rgba(255, 255, 255, 0.2) !important;
    font-size: 14px !important;
}
.tabs-view-main .tabs-card-scroll-item .n-icon:hover {
    color: rgba(255, 255, 255, 0.6) !important;
}
.tabs-view .tabs-close {
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 6px !important;
}
.tabs-view .tabs-close-btn {
    color: rgba(255, 255, 255, 0.35) !important;
}

/* ========== 主内容区 ========== */

.n-layout,
.layout-default-background,
.layout-content,
.layout-content-main {
    background: #0a0e1a !important;
}

.layout-content-main {
    padding: 0 16px 16px !important;
    margin: 0 !important;
}
.main-view-fix {
    padding-top: 44px !important;
}

/* ========== 筛选/搜索栏 ========== */

/* ========== 所有卡片强制暗色（覆盖NaiveUI内联CSS变量） ========== */
.n-card,
.n-card.n-card--bordered {
    background-color: #111528 !important;
    background: #111528 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 0.82) !important;
    transition: all 0.25s ease !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2) !important;
}
.n-card:hover {
    border-color: rgba(99, 102, 241, 0.2) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* 卡片头部 */
.n-card-header,
.n-card .n-card-header {
    padding: 14px 20px 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    background-color: transparent !important;
    background: transparent !important;
}
.n-card-header__main {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    letter-spacing: 0.3px !important;
}

/* 卡片内容 */
.n-card__content,
.n-card .n-card__content {
    padding: 16px 20px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    background-color: transparent !important;
    background: transparent !important;
}

/* 卡片操作栏 */
.n-card__action {
    background-color: rgba(255, 255, 255, 0.02) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
}

/* ========== 应用管理 - 选择卡片特殊样式 ========== */
/* n-grid 里的卡片（应用下载/应用生成选择器） */
.n-grid .n-card,
.n-grid .n-card.n-card--bordered {
    background-color: #111528 !important;
    background: linear-gradient(135deg, #111528 0%, #151a32 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    padding: 8px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}
.n-grid .n-card::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 14px !important;
    padding: 1px !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.05)) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}
.n-grid .n-card:hover {
    background: linear-gradient(135deg, #141830 0%, #1a1f3a 100%) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(99, 102, 241, 0.08) !important;
    transform: translateY(-2px) !important;
}
.n-grid .n-card:hover::before {
    opacity: 1 !important;
}
/* 选择卡片标题 */
.n-grid .n-card .n-card-header__main {
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}
/* 选择卡片内容 */
.n-grid .n-card .n-card__content {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 13px !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* 表单项标签 */
.n-form-item-label,
.n-form-item .n-form-item-label__text {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* 搜索栏 n-grid 行对齐 */
.n-form .n-grid {
    align-items: center !important;
}

/* ========== 表格 ========== */

.n-data-table {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    min-height: 65vh !important;
}
.n-data-table .n-data-table-base-table-body,
.n-data-table .n-data-table-base-table-body .n-scrollbar,
.n-data-table .n-data-table-base-table-body .n-scrollbar-container,
.n-data-table .n-data-table-base-table-body .n-scrollbar-content {
    min-height: 55vh !important;
}

/* 表格基础背景 */
.n-data-table,
.n-data-table-wrapper,
.n-data-table .n-data-table-base-table,
.n-data-table .n-data-table-base-table-body,
.n-data-table .n-scrollbar-content {
    background: #0f1528 !important;
    background-color: #0f1528 !important;
}

/* 表头 */
.n-data-table .n-data-table-thead,
.n-data-table .n-data-table-thead .n-data-table-tr {
    background: #141830 !important;
    background-color: #141830 !important;
}
.n-data-table .n-data-table-th {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1) !important;
    background: #141830 !important;
    background-color: #141830 !important;
    padding: 12px 16px !important;
    text-transform: none !important;
    white-space: nowrap !important;
}
.n-data-table .n-data-table-th__title {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* 表格行 */
.n-data-table .n-data-table-td {
    color: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    background: #0f1528 !important;
    background-color: #0f1528 !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
}
.n-data-table .n-data-table-tr {
    background: #0f1528 !important;
    background-color: #0f1528 !important;
    transition: all 0.15s ease !important;
}
.n-data-table .n-data-table-tr:hover .n-data-table-td {
    background: rgba(99, 102, 241, 0.04) !important;
    background-color: rgba(99, 102, 241, 0.04) !important;
}

/* 表格空状态 */
.n-data-table .n-data-table-empty,
.n-data-table .n-data-table-empty__text,
.n-empty {
    color: rgba(255, 255, 255, 0.25) !important;
    background: transparent !important;
}
.n-empty .n-empty__icon .n-icon {
    color: rgba(255, 255, 255, 0.12) !important;
}
.n-empty__description {
    color: rgba(255, 255, 255, 0.25) !important;
    font-size: 13px !important;
}

/* 表格排序图标 */
.n-data-table .n-data-table-sorter {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* ========== 分页器 ========== */

.n-pagination {
    color: rgba(255, 255, 255, 0.55) !important;
    margin-top: 12px !important;
}
.n-pagination .n-pagination-item {
    color: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 8px !important;
    min-width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
}
.n-pagination .n-pagination-item--active {
    color: #e0e7ff !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    background: rgba(99, 102, 241, 0.15) !important;
    font-weight: 500 !important;
}
.n-pagination .n-pagination-item:hover:not(.n-pagination-item--active) {
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}
.n-pagination .n-pagination-item--disabled {
    color: rgba(255, 255, 255, 0.15) !important;
}
.n-pagination .n-select .n-base-selection {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
.n-pagination .n-pagination-prefix,
.n-pagination .n-pagination-suffix {
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 13px !important;
}

/* ========== 输入框 ========== */

.n-input:not(.view-account .n-input) {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.2s ease !important;
}
.n-input:not(.view-account .n-input):hover {
    border-color: rgba(255, 255, 255, 0.12) !important;
}
.n-input:not(.view-account .n-input).n-input--focus {
    border-color: rgba(99, 102, 241, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08) !important;
    background: rgba(99, 102, 241, 0.03) !important;
}
.n-input .n-input__input-el,
.n-input input {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13px !important;
}
.n-input .n-input__placeholder {
    color: rgba(255, 255, 255, 0.25) !important;
    font-size: 13px !important;
}

/* ========== 按钮 ========== */

.n-button {
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
}
.n-button--primary-type:not(.view-account .n-button--primary-type) {
    background: linear-gradient(135deg, #6366f1, #7c3aed) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25) !important;
    transition: all 0.2s ease !important;
}
.n-button--primary-type:not(.view-account .n-button--primary-type):hover {
    background: linear-gradient(135deg, #7c7ff7, #8b5cf6) !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-1px);
}
.n-button--default-type {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}
.n-button--default-type:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}
.n-button--success-type {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25) !important;
}
.n-button--warning-type {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25) !important;
}
.n-button--error-type {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25) !important;
}
.n-button--text-type {
    color: rgba(255, 255, 255, 0.6) !important;
}
.n-button--text-type:hover {
    color: #a5b4fc !important;
}
.n-button .n-button__content {
    color: inherit !important;
}
.n-button .n-base-icon,
.n-button .n-icon {
    color: inherit !important;
}

/* ========== 开关 ========== */
.n-switch.n-switch--active .n-switch__rail {
    background: #6366f1 !important;
}
.n-switch .n-switch__rail {
    background: rgba(255, 255, 255, 0.12) !important;
}

/* ========== 选择框 ========== */
.n-base-selection {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 8px !important;
}
.n-base-selection:hover {
    border-color: rgba(255, 255, 255, 0.12) !important;
}
.n-base-selection--active {
    border-color: rgba(99, 102, 241, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08) !important;
}
.n-base-selection .n-base-selection-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ========== 弹出层/下拉菜单 ========== */
.n-popover, .n-select-menu, .n-base-select-menu {
    background: #181c2e !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}
.n-base-select-option {
    color: rgba(255, 255, 255, 0.7) !important;
}
.n-base-select-option--selected {
    color: #c7d2fe !important;
    background: rgba(99, 102, 241, 0.1) !important;
}
.n-base-select-option:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* ========== 标签 ========== */
.n-tag {
    border-radius: 6px !important;
    font-size: 12px !important;
}

/* ========== 弹窗/对话框 ========== */
.n-modal,
.n-dialog {
    background: #181c2e !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}
.n-dialog .n-dialog__title {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
}
.n-dialog .n-dialog__content {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* ========== 通知/消息 ========== */
.n-message {
    background: #1c2035 !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border-radius: 10px !important;
}

/* 工具提示 */
.n-tooltip {
    background: #1c2035 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border-radius: 8px !important;
}

/* 上传组件 */
.n-upload .n-upload-dragger {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
}
.n-upload .n-upload-dragger:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* 进度条 */
.n-progress .n-progress-graph-line-fill {
    background: linear-gradient(90deg, #6366f1, #8b5cf6) !important;
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========== 通用动画 ========== */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.2s ease, transform 0.2s ease !important;
}
.fade-enter-from {
    opacity: 0 !important;
    transform: translateY(8px) !important;
}
.fade-leave-to {
    opacity: 0 !important;
}
.layout-content-main > div {
    animation: contentFadeIn 0.3s ease;
}
@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .layout-side-drawer {
        background-color: #0c0f1a !important;
    }
}

/* ========== 额外优化：全局图片在表格中 ========== */
.n-data-table img {
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ========== Grid 网格 ========== */
.n-grid {
    gap: 0 !important;
}

/* ========== Thing 组件（应用管理选择器） ========== */
.n-thing .n-thing-header__title {
    color: rgba(255, 255, 255, 0.82) !important;
}
.n-thing .n-thing-main__description {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* ========== 抽屉 ========== */
.n-drawer,
.n-drawer-content {
    background: #141830 !important;
}
.n-drawer-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.n-drawer-header__main {
    color: rgba(255, 255, 255, 0.88) !important;
}

/* ========== Tabs 组件（非标签页导航，是内容区的Tab） ========== */
.n-tabs .n-tabs-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.n-tabs .n-tabs-tab {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 13px !important;
    transition: color 0.2s ease !important;
}
.n-tabs .n-tabs-tab:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}
.n-tabs .n-tabs-tab--active {
    color: #c7d2fe !important;
    font-weight: 500 !important;
}
.n-tabs .n-tabs-bar {
    background: #6366f1 !important;
}

/* ========== Badge ========== */
.n-badge .n-badge-sup {
    background: #ef4444 !important;
}

/* ========== Checkbox & Radio ========== */
.n-checkbox .n-checkbox-box {
    border-color: rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}
.n-checkbox .n-checkbox-box--checked {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
}
