/* *****************************************************

    ** Custom Stylesheet **

    Any custom styling you want to apply should be
    defined here.

***************************************************** */

/* Custom CSS for Nexus Theme
 *
 * This file allows you to customize the theme colors and styles for the entire Nexus template.
 *
 * To customize colors:
 * - Replace the var() references with your own hex colors or other CSS values.
 * - For example, instead of --primary: #4b5563; use --primary: #your-color;
 * - You can also override any CSS properties here.
 */

:root {
    --white: #fff;

    /* Neutral shades */
    --neutral-50: #fbf9fa;
    --neutral-100: #f4f5f7;
    --neutral-200: #e4e4e7;
    --neutral-300: #d0d5dd;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --neutral-950: #030712;

    /* Neutral shades */
    /* define own pallet with brand colors */
    --primary-50: var(--neutral-50);
    --primary-100: var(--neutral-100);
    --primary-200: var(--neutral-200);
    --primary-300: var(--neutral-300);
    --primary-400: var(--neutral-400);
    --primary-500: var(--neutral-500);
    --primary-600: var(--neutral-600);
    --primary-700: var(--neutral-700);
    --primary-800: var(--neutral-800);
    --primary-900: var(--neutral-900);
    --primary-950: var(--neutral-900);

    /* Primary colors */
    /* Use shades from comments if `primary` colors use other colors, then neutral */
    --primary: var(--neutral-900);          /* var(--primary-600) */
    --primary-lifted: var(--neutral-800);   /* var(--primary-700) */
    --primary-accented: var(--neutral-700); /* var(--primary-800) */

    /* Secondary colors */
    --secondary: var(--neutral-500);
    --secondary-lifted: var(--neutral-600);
    --secondary-accented: var(--neutral-700);

    /* Success colors */
    --success: #00a63e;
    --success-lifted: #008236;
    --success-accented: #016630;

    /* Info colors */
    --info: #155dfc;
    --info-lifted: #1447e6;
    --info-accented: #193cb8;

    /* Notice colors */
    --notice: #7f22fe;
    --notice-lifted: #7008e7;
    --notice-accented: #5d0ec0;

    /* Warning colors */
    --warning: #f54a00;
    --warning-lifted: #ca3500;
    --warning-accented: #9f2d00;

    /* Error colors */
    --error: #e7000b;
    --error-lifted: #c10007;
    --error-accented: #9f0712;

    /* Grayscale colors */
    --grayscale: var(--neutral-900);
    --grayscale-lifted: var(--neutral-800);
    --grayscale-accented: var(--neutral-700);

    /* Neutral colors */
    --neutral: var(--neutral-500);
    --neutral-lifted: var(--neutral-600);
    --neutral-accented: var(--neutral-700);

    /* Text neutral colors */
    --text-inverted: var(--white);
    --text-muted: var(--neutral-400);
    --text-lifted: var(--neutral-500);
    --text-accented: var(--neutral-600);
    --text: var(--neutral-900);

    /* Border neutral colors */
    --border-muted: var(--neutral-200);
    --border: var(--neutral-300);
    --border-lifted: var(--neutral-400);
    --border-accented: var(--neutral-600);

    /* Background neutral colors */
    --bg: var(--white);
    --bg-muted: var(--neutral-50);
    --bg-lifted: var(--neutral-100);
    --bg-accented: var(--neutral-200);
    --bg-inverted: var(--neutral-900);

    /* Additional colors */
    --yellow-200: #fff085;
    --yellow-300: #ffdf20;
    --teal-300: #46edd5;
    --teal-400: #00d5be;
    --emerald-300: #5ee9b5;
    --pink-400: #fb64b6;

    /* Additional custom properties */
    /* Font sizes */
    --text-xs: 0.625rem;
    --text-sm: 0.75rem;
    --text-md: 0.875rem;
    --text-lg: 1rem;

    /* Spacing */
    --outline-sm: 1px;
    --outline-md: 2px;
    --outline-lg: 3px;

    /* Rounding */
    --rounding-sm: 0.25rem;
    --rounding-md: 0.5rem;
    --rounding-lg: 0.75rem;

    /* Other */
    --letter-spacing: 0em;
    --disabled-opacity: 25%;
}

/* --- 1. 隐藏面包屑导航 (The gray bar) --- */
.breadcrumb, 
.breadcrumb-wrapper, 
#breadcrumb {
    display: none !important;
}

/* 消除面包屑隐藏后可能留下的顶部空白 */
.main-content {
    margin-top: 0 !important;
    padding-top: 20px !important; /* 给主内容留一点呼吸空间 */
}

/* =========================================
   修复：针对紧凑版 Header (.naked-list) 的样式
   包含：定位修复 + 动效回归
   ========================================= */

/* 1. 强制下拉菜单浮动 (防止撑开容器) */
.naked-list .dropdown-menu,
.navbar-nav .dropdown-menu {
    position: absolute !important;
    z-index: 10000 !important;
    float: none !important;
    right: 0 !important;   /* 靠右对齐 */
    left: auto !important;
    margin-top: 5px !important;
}

/* 2. 定义动效关键帧 (从上方滑落) */
@keyframes dropdownSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px); /* 从上方20px处开始 */
    }
    to {
        opacity: 1;
        transform: translateY(0);     /* 落回原位 */
    }
}

/* 3. 触发动效 (当菜单显示时) */
.naked-list .dropdown-menu.show,
.navbar-nav .dropdown-menu.show {
    animation: dropdownSlideDown 0.25s ease-out forwards;
    display: block;
}

/* 4. 确保父容器允许内容溢出 (显示浮动菜单) */
.navbar, .navbar .container-fluid {
    overflow: visible !important;
}

/* --- 缩小顶部 Logo 尺寸 --- */
.logo-img {
    max-height: 35px !important;  /* 建议值：30px - 45px 之间 */
    width: auto !important;       /* 保持宽高比，防止压扁 */
    margin-top: -2px;             /* 微调垂直位置，让它视觉居中 */
}

/* (可选) 如果缩小后觉得 Logo 离右边的字太远，可以调整容器宽度 */
.navbar-brand {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-right: 15px !important; /* Logo 右边的间距 */
}

/* =========================================
   强制页脚沉底 (Sticky Footer)
   解决内容少时页脚浮在中间的问题
   ========================================= */

/* 1. 让整个页面变成一个 Flex 容器，高度至少撑满屏幕 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 视窗高度的 100% */
}

/* 2. 让页头保持自然高度 */
#header {
    flex-shrink: 0;
}

/* 3. 让主要内容区域 (main-body) 自动填充剩余空间 */
/* 这行代码是关键：它会把 footer 狠狠地推到最下面 */
section#main-body {
    flex: 1 0 auto;
}

/* 4. 页脚保持自然高度，不被压缩 */
#footer {
    flex-shrink: 0;
}

/* =========================================
   侧边栏美化 (Sidebar Customization)
   ========================================= */

/* 1. 去掉侧边栏顶部的空白行 (隐藏标题栏) */
.sidebar .card-header {
    display: none !important;
}

/* 2. 定义您的 Logo 蓝色 (请修改这里的颜色代码!) */
:root {
    --logo-blue: #0044b3; /* <--- 请把这个换成您 Logo 的蓝色 hex 代码 */
}

/* 3. 菜单项的基础样式 & 动效 */
.sidebar .list-group-item {
    border: none !important;       /* 去掉边框，更现代 */
    margin-bottom: 5px !important; /* 增加一点间距 */
    border-radius: 5px !important; /* 圆角效果 */
    transition: all 0.3s ease;     /* 添加 0.3秒 顺滑过渡动效 */
    font-weight: 500;
    color: #555;
}

/* 4. 鼠标悬停 (Hover) 时的效果 */
.sidebar .list-group-item:not(.active):hover {
    background-color: #f8f9fa;     /* 浅灰背景 */
    padding-left: 20px !important; /* 文字向右轻微滑动 */
    color: var(--logo-blue);       /* 文字变蓝 */
}

/* 5. 选中 (Active) 时的效果 */
.sidebar .list-group-item.active {
    background-color: var(--logo-blue) !important; /* 背景变蓝 */
    border-color: var(--logo-blue) !important;
    color: #fff !important;        /* 文字变白 */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* 添加一点投影 */
}

/* 6. (可选) 稍微调整侧边栏整体位置，防止太贴上边 */
.sidebar {
    margin-top: 0 !important;
}

/* =========================================
   配色专项调整 (修正版：实心按钮)
   ========================================= */

/* 1. 右上角用户名称按钮 -> 变成实心蓝色按钮 */
.navbar .nav-item a[href*="clientarea.php?action=details"] {
    background-color: #0044b3 !important; /* 背景设为深蓝 */
    color: #ffffff !important;            /* 文字设为白色 */
    padding: 6px 15px !important;         /* 增加内边距：上下6px，左右15px */
    border-radius: 4px !important;        /* 圆角效果，想要胶囊形状可以改 20px */
    font-weight: 500 !important;
    text-decoration: none !important;     /* 去掉下划线 */
    display: inline-block !important;     /* 确保形状正常显示 */
    transition: background-color 0.2s;    /* 添加一点鼠标悬停动效 */
    
    /* 微调位置，防止加了背景后位置偏高或偏低 */
    line-height: 1.5 !important; 
    margin-top: 2px !important; 
}

/* 鼠标悬停时变深一点，增加交互感 */
.navbar .nav-item a[href*="clientarea.php?action=details"]:hover {
    background-color: #003399 !important;
    color: #ffffff !important;
}

/* 2. 语言切换弹窗背景颜色 (#40a142) */
/* 针对 ID 为 modalChooseLanguage 的弹窗 */
#modalChooseLanguage .modal-content {
    background-color: #40a142 !important;
    color: #fff !important; /* 强制文字变白，防止在绿色背景上看不清 */
}

/* 修正弹窗内选项文字颜色 (防止链接默认是蓝色导致看不清) */
#modalChooseLanguage .modal-body a.item {
    color: #fff !important;
    opacity: 0.8;
    text-decoration: none;
}
/* 鼠标悬停或选中时的效果 */
#modalChooseLanguage .modal-body a.item:hover,
#modalChooseLanguage .modal-body a.item.active {
    color: #fff !important;
    opacity: 1;
    background-color: rgba(255,255,255,0.2); /* 增加一个半透明白色背景表示选中 */
    border-radius: 4px;
}

/* 3. 弹窗中的按钮颜色 (#0044b3) */
/* 针对弹窗底部的“应用/Apply”按钮 */
#modalChooseLanguage .modal-footer .btn {
    background-color: #0044b3 !important;
    border-color: #0044b3 !important;
    color: #fff !important;
}
/* 按钮悬停变深一点 */
#modalChooseLanguage .modal-footer .btn:hover {
    background-color: #003399 !important;
    border-color: #003399 !important;
}

/* (可选) 去掉弹窗底部的分割线，让绿色背景更浑然一体 */
#modalChooseLanguage .modal-footer {
    border-top: none !important;
}

/* =========================================
   全局按钮配色方案 (Global Button Color)
   将全站所有主按钮 (btn-primary) 统一为 #0044b3
   ========================================= */

/* 1. 默认状态：深蓝背景 */
.btn-primary,
.btn-primary.disabled, 
.btn-primary:disabled {
    background-color: #0044b3 !important;
    border-color: #0044b3 !important;
    color: #ffffff !important;
}

/* 2. 交互状态：悬停 (Hover)、聚焦 (Focus)、点击 (Active) */
/* 鼠标放上去时，颜色稍微变深 (#003399)，增加按压感 */
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
    background-color: #003399 !important; /* 比 #0044b3 稍深一点 */
    border-color: #003399 !important;
    color: #ffffff !important;
    box-shadow: none !important; /* 可选：去掉点击时的默认光晕，更扁平 */
}

/* 3. 针对某些特殊表单的提交按钮 (防止漏网之鱼) */
input[type="submit"],
button[type="submit"]:not(.btn-danger):not(.btn-success):not(.btn-default):not(.btn-link) {
    background-color: #0044b3;
    border-color: #0044b3;
    color: #fff;
}
/* 鼠标悬停 */
input[type="submit"]:hover,
button[type="submit"]:not(.btn-danger):not(.btn-success):not(.btn-default):not(.btn-link):hover {
    background-color: #003399;
    border-color: #003399;
}