/* ==========================================================================
   ArPro 深空座舱 UI - 旗舰极致美学版 (Engineering V20)
   ========================================================================== */

/* 1. 视觉底座：商务石板蓝渐变 */
html, body {
    background-color: #1a1f2c !important;
    height: 100% !important;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 20%, #334155 0%, #0F172A 100%) !important;
}

/* 彻底清除全站背景残留 */
.content-wrapper, .main-footer, .main-header, .content,
.card, .card-header, .card-footer, .modal-content, .nav-tabs,
.bg-white, .navbar-white, .navbar-light, #changelist-search,
#toolbar, .actions, .submit-row, fieldset.module {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* 2. 顶部 LOGO 区域 (锁定 V17) */
.brand-link {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(56, 189, 248, 0.2) !important;
    padding: 18px 15px !important;
    transition: all 0.4s ease !important;
}

.brand-link .brand-text {
    font-weight: 900 !important;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 2px !important;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
    transition: all 0.4s ease !important;
}

.brand-link:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-bottom: 2px solid #38bdf8 !important;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2) !important;
}

.brand-link:hover .brand-text {
    color: #38bdf8 !important;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.8) !important;
    letter-spacing: 3px !important;
}
.brand-link .brand-text {
    font-weight: 900 !important; color: #ffffff !important; letter-spacing: 2px !important;
}

/* 3. 顶部导航栏 (锁定 V16) */
.main-header .navbar-nav .nav-link { color: #ffffff !important; font-weight: 700 !important; }

/* 4. 侧边栏 (锁定 V17) */
/* 仅在桌面端(大于992px)隐藏切换按钮，在移动端必须显示，否则无法呼出菜单 */
@media (min-width: 993px) {
    [data-widget="pushmenu"] { display: none !important; }
}

/* 移动端菜单按钮美化 */
@media (max-width: 992px) {
    [data-widget="pushmenu"] {
        display: block !important;
        color: #38bdf8 !important; /* 科技蓝按钮 */
        padding: 10px !important;
    }
}

.main-sidebar, .main-sidebar::before {
    width: 250px !important;
    background: #0b0f19 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.nav-sidebar .nav-header {
    background: transparent !important;
    color: #818cf8 !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    padding: 20px 15px 8px !important;
    text-transform: uppercase;
}

.nav-sidebar .nav-link {
    font-size: 0.78rem !important;
    padding: 10px 18px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #cbd5e1 !important;
}

.nav-sidebar .nav-link:hover {
    background: rgba(56, 189, 248, 0.08) !important;
    color: #38bdf8 !important;
    transform: translateX(6px) !important;
    box-shadow: -3px 0 0 #38bdf8 inset;
}

.nav-sidebar .nav-link.active {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border-left: 4px solid #38bdf8 !important;
    font-weight: 700 !important;
}

/* 5. 文本系统 */
body, h1, h2, h3, h4, h5, h6, .card-title, .form-row, p,
.results table td, .results table th, .breadcrumb-item.active,
.control-label, .col-form-label { color: #f1f5f9 !important; }
.change-form label, .form-row label { color: #06b6d4 !important; }

/* 6. 【终极强化】Select2 强制去白与文字显亮 */
/* 这里的选择器覆盖了所有可能的 Select2 变体 */
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple,
.select2-container--default .select2-selection--single,
.select2-container--bootstrap4 .select2-selection--single {
    background-color: #0f172a !important;
    border: 1px solid #38bdf8 !important;
    height: 35px !important;
}

/* 核心：解决选中文字看不清问题 */
.select2-container .select2-selection__rendered {
    color: #38bdf8 !important; /* 强制亮蓝色 */
    line-height: 33px !important;
}

/* 下拉列表弹窗 */
.select2-dropdown {
    background-color: #1e293b !important;
    border: 1px solid #38bdf8 !important;
    color: #ffffff !important;
}

/* 下拉项与提示文字（获取数据中） */
.select2-results__option, .select2-results__message {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
}

/* 高亮项 */
.select2-results__option--highlighted[aria-selected] {
    background-color: #38bdf8 !important;
    color: #0f172a !important;
}

/* 7. 原生输入框去白 */
input, textarea, select, .form-control {
    background-color: rgba(15, 23, 42, 0.8) !important;
    color: #ffffff !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

/* 8. 列表页美化 */
#changelist-filter { background: rgba(15, 23, 42, 0.8) !important; }
.results table { background: rgba(30, 41, 59, 0.4) !important; }

/* 9. 底部压缩 (锁定) */
.main-footer { padding: 4px 15px !important; height: 30px !important; font-size: 0.7rem !important; background: transparent !important; }
.main-footer .float-right { display: none !important; }
body .content-wrapper { margin-left: 250px !important; width: calc(100% - 250px) !important; }

/* --------------------------------------------------------------------------
   9. 移动端布局适配 (响应式补丁)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    /* 默认隐藏侧边栏 */
    .main-sidebar {
        transform: translate(-250px, 0) !important;
        transition: transform 0.3s ease-in-out !important;
    }

    /* 当点击按钮呼出菜单时（Jazzmin 会在 body 加上 sidebar-open 类） */
    .sidebar-open .main-sidebar {
        transform: translate(0, 0) !important;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5) !important;
    }

    /* 内容区域自适应 */
    body .content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* 移动端顶部标题居中微调 */
    .brand-link {
        text-align: center;
        padding: 12px !important;
    }
}