/* ========================================================================
 * 小星星数据中心 · v3 整体精修层
 * 仅做"叠加增强"，不替换底层 admin-custom.css / dashboard.css
 * 范围：背景层次 / 顶栏 / 侧栏 / 欢迎区 / 区块标题 / KPI 卡片 / 表格 / 按钮
 * ======================================================================== */

/* ---------- 0. 全局：背景增加深空感 + 字体抗锯齿 ---------- */
html,
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body,
.content-wrapper {
    background:
        radial-gradient(1200px 600px at 80% -100px, rgba(34, 158, 217, .08), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(56, 178, 172, .05), transparent 65%),
        #0b1220 !important;
}

/* ---------- 1. 顶部主头：压缩高度 + 底部细渐变线 ---------- */
.main-header.navbar,
body .main-header {
    min-height: 52px !important;
    height: 52px !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, .92), rgba(15, 23, 42, .78)) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .04) !important;
    box-shadow: 0 1px 0 rgba(34, 158, 217, .12);
}

.main-header .navbar-nav .nav-link {
    color: #cbd5e1 !important;
    transition: color .15s, background .15s;
    border-radius: 8px;
    padding: 6px 12px !important;
    margin: 0 2px;
}

.main-header .navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(34, 158, 217, .10) !important;
}

/* ---------- 2. 侧栏：菜单项更精致，激活态左侧高亮条 ---------- */
.main-sidebar {
    background: linear-gradient(180deg, #0c1424 0%, #0a1120 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, .04) !important;
}

html body .main-sidebar .nav-sidebar>.nav-item>.nav-link {
    margin: 2px 4px !important;
    padding: 9px 10px 9px 20px !important;
    border-radius: 8px !important;
    color: #94a3b8 !important;
    font-size: 13.5px !important;
    transition: all .18s cubic-bezier(.4, 0, .2, 1) !important;
    position: relative;
    overflow: hidden;
}

.main-sidebar .nav-sidebar>.nav-item>.nav-link:hover {
    background: rgba(34, 158, 217, .08) !important;
    color: #e2e8f0 !important;
    transform: translateX(2px);
}

.main-sidebar .nav-sidebar>.nav-item>.nav-link.active,
.main-sidebar .nav-sidebar>.nav-item.menu-open>.nav-link {
    background: linear-gradient(135deg, rgba(34, 158, 217, .18), rgba(34, 158, 217, .05)) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 #229ED9, 0 2px 12px -2px rgba(34, 158, 217, .4) !important;
    font-weight: 600 !important;
}

html body .main-sidebar .nav-sidebar .nav-icon {
    color: inherit !important;
    opacity: .9;
    width: 22px !important;
    text-align: center;
    margin-right: 4px !important;
}

/* ---------- 3. 内容区：留白 + 面包屑卡片化 ---------- */
.content-wrapper>.content,
.content-wrapper>section.content {
    padding: 18px 22px 24px !important;
}

.content-header {
    padding: 8px 0 14px !important;
}

.content-header h1,
.content-header .header-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #f1f5f9 !important;
    letter-spacing: 0.3px;
}

.content-header .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    font-size: 12.5px;
    margin: 4px 0 0 !important;
}

.content-header .breadcrumb a {
    color: #64748b !important;
}

.content-header .breadcrumb a:hover {
    color: #4facfe !important;
}

.content-header .breadcrumb .breadcrumb-item.active {
    color: #94a3b8 !important;
}

/* ---------- 4. 欢迎条：更紧凑 + 蓝色辉光 + 顶部装饰线 ---------- */
.dashboard-welcome,
.welcome-banner,
.greeting-banner {
    position: relative;
    background:
        linear-gradient(135deg, rgba(34, 158, 217, .10), rgba(56, 178, 172, .06) 60%, transparent),
        rgba(15, 23, 42, .65) !important;
    border: 1px solid rgba(34, 158, 217, .14) !important;
    border-radius: 14px !important;
    padding: 18px 22px !important;
    overflow: hidden;
    box-shadow: 0 4px 24px -8px rgba(34, 158, 217, .20);
}

.dashboard-welcome::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #229ED9, #4facfe, #229ED9, transparent);
    opacity: .55;
}

.dashboard-welcome::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    right: -80px;
    top: -120px;
    background: radial-gradient(closest-side, rgba(79, 172, 254, .18), transparent 70%);
    pointer-events: none;
}

/* ---------- 5. 区块标题：左侧色条 + 字号收紧 ---------- */
.dashboard-section-title,
.section-title,
.kpi-section-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    margin: 22px 0 12px !important;
    letter-spacing: 0.4px;
}

.dashboard-section-title i,
.section-title i {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(34, 158, 217, .20), rgba(34, 158, 217, .06));
    border: 1px solid rgba(34, 158, 217, .30);
    border-radius: 7px;
    color: #4facfe !important;
    font-size: 13px !important;
}

/* ---------- 6. KPI 卡片：顶部色条更突出 + 悬浮抬升 ---------- */
.kpi-card,
.dashboard-kpi-card,
.metric-card {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 40%),
        rgba(15, 23, 42, .55) !important;
    border: 1px solid rgba(255, 255, 255, .06) !important;
    border-radius: 14px !important;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1), border-color .25s, box-shadow .25s !important;
    overflow: hidden;
}

.kpi-card:hover,
.dashboard-kpi-card:hover,
.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 158, 217, .35) !important;
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .5), 0 0 0 1px rgba(34, 158, 217, .20) !important;
}

/* ---------- 7. 通用卡片：玻璃感 ---------- */
.card,
.box {
    background: rgba(15, 23, 42, .55) !important;
    border: 1px solid rgba(255, 255, 255, .05) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 16px -4px rgba(0, 0, 0, .35) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.card-header,
.box-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, .05) !important;
    padding: 14px 18px !important;
}

/* ---------- 8. 按钮：主按钮渐变 + 微光晕 ---------- */
.btn-primary,
.btn-info {
    background: linear-gradient(135deg, #37AEE2 0%, #229ED9 100%) !important;
    border: 0 !important;
    color: #fff !important;
    font-weight: 500;
    box-shadow: 0 2px 8px -2px rgba(34, 158, 217, .45);
    transition: transform .15s, box-shadow .15s !important;
}

.btn-primary:hover,
.btn-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -3px rgba(34, 158, 217, .55), 0 0 0 1px rgba(79, 172, 254, .4) !important;
}

.btn {
    border-radius: 8px !important;
}

/* ---------- 9. 表格：行 hover 高亮 + 表头分隔 ---------- */
.table thead th {
    background: rgba(15, 23, 42, .7) !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    font-size: 12.5px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
}

.table tbody tr {
    transition: background .15s !important;
}

.table tbody tr:hover {
    background: rgba(34, 158, 217, .05) !important;
}

.table tbody td {
    border-top: 1px solid rgba(255, 255, 255, .035) !important;
    color: #cbd5e1;
}

/* ---------- 10. 表单：输入框聚焦发光 ---------- */
.form-control,
.select2-selection,
.form-select {
    background: rgba(11, 18, 32, .7) !important;
    border: 1px solid rgba(148, 163, 184, .18) !important;
    color: #e2e8f0 !important;
    border-radius: 8px !important;
    transition: border-color .15s, box-shadow .15s !important;
}

.form-control:focus {
    border-color: #229ED9 !important;
    box-shadow: 0 0 0 3px rgba(34, 158, 217, .18) !important;
    background: rgba(11, 18, 32, .85) !important;
}

/* ---------- 11. 标签 / 徽章 ---------- */
.label,
.badge {
    border-radius: 6px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px;
    padding: 4px 8px !important;
}

/* ---------- 12. 滚动条：细化 ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .20);
    border-radius: 4px;
    transition: background .15s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 158, 217, .45);
}

/* ---------- 13. 分页器 ---------- */
.pagination .page-item .page-link {
    background: rgba(15, 23, 42, .6) !important;
    border: 1px solid rgba(255, 255, 255, .05) !important;
    color: #cbd5e1 !important;
    border-radius: 6px !important;
    margin: 0 2px;
    min-width: 32px;
    text-align: center;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #37AEE2, #229ED9) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 2px 8px -2px rgba(34, 158, 217, .5);
}

/* ---------- 14. 模态框 ---------- */
.modal-content {
    background: #111a2e !important;
    border: 1px solid rgba(255, 255, 255, .06) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(34, 158, 217, .10) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
    padding: 16px 20px !important;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, .06) !important;
}

/* ---------- 15. 工具提示 ---------- */
.tooltip-inner {
    background: #0f1729 !important;
    border: 1px solid rgba(34, 158, 217, .22) !important;
    color: #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 12px;
    padding: 6px 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}

/* ========================================================================
 * 16. 备注行内快编辑 - 与 v3 风格全面统一
 *    a) 让"可点击"更明显（默认就显示编辑图标 + 虚线框）
 *    b) popover 升级为玻璃感 + 蓝光晕边框 + 大圆角
 *    c) 保存按钮采用 v3 主按钮同渐变
 * ======================================================================== */
.remark-cell {
    border: 1px dashed rgba(148, 163, 184, .18) !important;
    background: rgba(148, 163, 184, .04) !important;
    transition: all .18s ease !important;
}

.remark-cell:hover {
    border-color: rgba(34, 158, 217, .55) !important;
    background: rgba(34, 158, 217, .10) !important;
    box-shadow: 0 0 0 3px rgba(34, 158, 217, .12);
    transform: translateY(-1px);
}

.remark-cell .remark-edit-ico {
    opacity: .55 !important;
    color: #4facfe !important;
}

.remark-cell:hover .remark-edit-ico {
    opacity: 1 !important;
}

.remark-cell .remark-empty {
    color: #64748b !important;
    font-style: normal !important;
}

.remark-cell .remark-text {
    color: #e2e8f0 !important;
}

.remark-popover {
    background: linear-gradient(180deg, rgba(17, 26, 46, .96), rgba(11, 18, 32, .96)) !important;
    border: 1px solid rgba(34, 158, 217, .30) !important;
    border-radius: 14px !important;
    box-shadow:
        0 24px 60px -12px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(34, 158, 217, .18),
        0 0 32px -8px rgba(34, 158, 217, .30) !important;
    padding: 14px !important;
    width: 320px !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.remark-popover::before {
    content: '\270E  编辑备注';
    display: block;
    font-size: 11px;
    color: #4facfe;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.remark-popover textarea {
    background: rgba(11, 18, 32, .85) !important;
    border: 1px solid rgba(148, 163, 184, .22) !important;
    border-radius: 8px !important;
    min-height: 80px !important;
    font-size: 13.5px !important;
}

.remark-popover textarea:focus {
    border-color: #229ED9 !important;
    box-shadow: 0 0 0 3px rgba(34, 158, 217, .20) !important;
}

.remark-popover-foot {
    margin-top: 12px !important;
}

.remark-popover-tip {
    color: #64748b !important;
    font-size: 11px;
}

.remark-popover-btns button {
    height: 30px !important;
    border-radius: 8px !important;
    padding: 0 14px !important;
    font-size: 12.5px !important;
    transition: all .15s !important;
}

.remark-popover-btns .rk-cancel {
    background: transparent !important;
    border: 1px solid rgba(148, 163, 184, .22) !important;
    color: #94a3b8 !important;
}

.remark-popover-btns .rk-cancel:hover {
    background: rgba(148, 163, 184, .08) !important;
    color: #e2e8f0 !important;
}

.remark-popover-btns .rk-save {
    background: linear-gradient(135deg, #37AEE2, #229ED9) !important;
    border: 0 !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 10px -2px rgba(34, 158, 217, .55) !important;
}

.remark-popover-btns .rk-save:hover {
    transform: translateY(-1px);
    box-shadow:
        0 6px 18px -2px rgba(34, 158, 217, .65),
        0 0 0 1px rgba(79, 172, 254, .5) !important;
}