/* 工业深蓝主题 */
:root {
    --primary: #165DFF;
    --primary-dark: #0E42D2;
    --bg-main: #F5F7FA;
    --bg-content: #FFFFFF;
}

/* ========== 全局页面背景：淡青灰+极细点阵暗纹 ========== */
body {
    background-color: #F0F5F9;
    background-image: radial-gradient(rgba(22, 93, 255, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* 主内容区白底柔化 */
#content {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    padding: 20px 30px;
    border-radius: 8px;
    margin: 15px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* ========== 顶部标题栏 ========== */
#header {
    background: linear-gradient(90deg, #165DFF, #0E42D2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ========== 侧边栏模块 ========== */
.module h2, .module caption {
    background: #165DFF;
}
.module {
    border-radius: 6px;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ========== 按钮 ========== */
.button, input[type=submit] {
    background: #165DFF;
    border: none;
    border-radius: 4px;
    transition: 0.2s;
}
.button:hover, input[type=submit]:hover {
    background: #0E42D2;
}

/* ========== 表格 ========== */
table tr:hover {
    background: #F0F7FF;
}
table thead th {
    border-bottom: 2px solid #165DFF;
    background: #F7F9FC;
}

/* ========== 登录页强化：渐变+科技网格+磨砂登录框 ========== */
body.login {
    background: linear-gradient(135deg, #165DFF 0%, #0E42D2 50%, #1D2129 100%);
    position: relative;
    overflow: hidden;
}
body.login::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* 登录框磨砂质感 */
.login #container {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.3);
    margin-top: 8%;
}
.login #header {
    background: linear-gradient(90deg, #165DFF, #0E42D2);
    border-radius: 16px 16px 0 0;
    text-align: center;
    font-size: 18px;
    letter-spacing: 2px;
}

/* 登录输入框美化 */
.login input[type=text], .login input[type=password] {
    border: 1px solid #E5E6EB;
    border-radius: 6px;
    padding: 8px 12px;
    width: 100%;
    box-sizing: border-box;
    transition: 0.2s;
}
.login input[type=text]:focus, .login input[type=password]:focus {
    border-color: #165DFF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(22,93,255,0.1);
}

/* 顶部栏三栏布局 */
#header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
}
#branding {
    flex: 0 0 auto;
}
.header-center {
    flex: 1;
    text-align: center;
}
#user-tools {
    flex: 0 0 auto;
    text-align: right;
    padding: 0;
}

/* 语言选择器适配深蓝主题 */
.lang-switch-form select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}
.lang-switch-form select:hover {
    background: rgba(255,255,255,0.25);
}
.lang-switch-form select option {
    color: #1f2329;
    background: #ffffff;
}

/* 顶部栏flex布局，左标题、中语言、右用户信息 */
#header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
#branding {
    flex: 0 0 auto;
    z-index: 2;
}

/* 语言选择器固定到正中间 */
#header form[action*="set_language"] {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    margin-top: -14px;
    z-index: 1;
}
#header form[action*="set_language"] select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
}
#header form[action*="set_language"] select option {
    color: #1f2329;
    background: #fff;
}

/* 右侧用户信息正常显示，不被遮挡 */
#user-tools {
    flex: 0 0 auto;
    text-align: right;
    z-index: 2;
    padding: 0;
}

/* 顶部三栏布局 */
#header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
}
#branding { flex: 0 0 auto; }
.lang-switch-center { flex: 1; text-align: center; }
#user-tools { flex: 0 0 auto; text-align: right; padding: 0; }

/* 隐藏右上角自带的语言切换按钮 */
#user-tools form[action*="set_language"] {
    display: none !important;
}

/* 中间语言选择器样式适配深蓝主题 */
.lang-switch-center select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}
.lang-switch-center select:hover {
    background: rgba(255,255,255,0.25);
}
.lang-switch-center select option {
    color: #1f2329;
    background: #ffffff;
}

/* 右上角用户工具栏整体左移，不贴边，所有功能完整保留 */
#user-tools {
    margin-right: 30px !important;
}

/* 右上角工具栏整体左移，彻底解决下拉框被屏幕边缘遮挡 */
#user-tools {
    margin-right: 100px !important;
}
