/* ==================== Geek Admin 风格 ====================
 * 极客风格管理后台：深色配色、等宽字体、锐利边缘、技术感
 * ==================== */

/* --- 全局基础 --- */
* {
    border-radius: 0 !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
    background: #0d1117;
    color: #c9d1d9;
}

/* --- 导航栏 --- */
.main-header.navbar {
    background: #161b22 !important;
    border-bottom: 1px solid #30363d !important;
}

.main-header.navbar .nav-link {
    color: #8b949e !important;
}

.main-header.navbar .nav-link:hover {
    color: #c9d1d9 !important;
}

.main-header .brand-text {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1rem;
    color: #58a6ff !important;
}

.main-header .nav-item .nav-link i {
    color: #58a6ff;
}

/* --- 侧边栏 --- */
.main-sidebar {
    background: #161b22 !important;
}

.main-sidebar .sidebar {
    padding-top: 0.5rem;
}

.main-sidebar .brand-link {
    background: #0d1117;
    border-bottom: 1px solid #30363d;
    color: #58a6ff;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.main-sidebar .brand-link .brand-image {
    border-radius: 4px !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active:hover {
    background: #1f6feb33 !important;
    border-left: 3px solid #58a6ff;
    color: #58a6ff !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:hover {
    background: #21262d !important;
    color: #c9d1d9 !important;
}

.nav-sidebar .nav-link {
    color: #8b949e !important;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.nav-sidebar .nav-link i {
    color: #8b949e;
    width: 20px;
    text-align: center;
}

.nav-sidebar .nav-link:hover i,
.nav-sidebar .nav-link.active i {
    color: #58a6ff;
}

.nav-sidebar .nav-header {
    color: #484f58 !important;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* --- 主内容区 --- */
.content-wrapper {
    background: #0d1117 !important;
    color: #c9d1d9;
}

.content-wrapper .content-header {
    border-bottom: 1px solid #21262d;
    padding-bottom: 1rem;
}

.content-wrapper .content-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #c9d1d9;
}

/* --- 卡片 --- */
.card {
    background: #161b22;
    border: 1px solid #30363d;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.card .card-header {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    color: #c9d1d9;
    font-weight: 600;
}

.card .card-title {
    color: #c9d1d9;
    font-weight: 600;
}

.card .card-body {
    color: #c9d1d9;
}

/* --- 表格 --- */
.table {
    color: #c9d1d9;
}

.table thead th {
    background: #161b22;
    border-bottom: 2px solid #30363d;
    color: #8b949e;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 0.75rem;
}

.table td {
    border-bottom: 1px solid #21262d;
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: #1c2128 !important;
    color: #c9d1d9;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #161b22;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #0d1117;
}

/* --- 按钮 --- */
.btn {
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.15s ease;
}

.btn-primary {
    background: #238636 !important;
    border-color: #238636 !important;
}

.btn-primary:hover {
    background: #2ea043 !important;
    border-color: #2ea043 !important;
}

.btn-secondary {
    background: #21262d !important;
    border-color: #30363d !important;
    color: #c9d1d9 !important;
}

.btn-secondary:hover {
    background: #30363d !important;
}

.btn-danger {
    background: #da3633 !important;
    border-color: #da3633 !important;
}

.btn-danger:hover {
    background: #f85149 !important;
}

.btn-success {
    background: #238636 !important;
    border-color: #238636 !important;
}

.btn-info {
    background: #1f6feb !important;
    border-color: #1f6feb !important;
}

.btn-warning {
    background: #9e6a03 !important;
    border-color: #9e6a03 !important;
    color: #fff !important;
}

.btn-outline-primary {
    color: #58a6ff !important;
    border-color: #30363d !important;
}

.btn-outline-primary:hover {
    background: #1f6feb33 !important;
    border-color: #58a6ff !important;
}

.btn-outline-secondary {
    color: #8b949e !important;
    border-color: #30363d !important;
}

.btn-outline-secondary:hover {
    background: #21262d !important;
    color: #c9d1d9 !important;
}

/* --- 表单 --- */
.form-control, .select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: #0d1117;
    border: 1px solid #30363d;
    color: #c9d1d9;
    transition: border-color 0.15s ease;
}

.form-control:focus, .form-control:focus-within {
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
    background: #0d1117;
    color: #c9d1d9;
}

.form-control::placeholder {
    color: #484f58;
}

select.form-control, .select2-selection {
    background: #0d1117 !important;
    border-color: #30363d !important;
    color: #c9d1d9 !important;
}

/* --- 徽章 --- */
.badge {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    padding: 0.3em 0.6em;
}

.badge-primary { background: #1f6feb !important; }
.badge-secondary { background: #30363d !important; color: #c9d1d9; }
.badge-success { background: #238636 !important; }
.badge-danger { background: #da3633 !important; }
.badge-warning { background: #9e6a03 !important; color: #fff; }
.badge-info { background: #1f6feb !important; }

/* --- 分页 --- */
.pagination .page-link {
    background: #161b22;
    border-color: #30363d;
    color: #8b949e;
}

.pagination .page-link:hover {
    background: #21262d;
    color: #c9d1d9;
}

.pagination .page-item.active .page-link {
    background: #1f6feb;
    border-color: #1f6feb;
    color: #fff;
}

/* --- 侧边栏折叠按钮 --- */
.nav-sidebar .nav-link > .right,
.nav-sidebar .nav-link > p > .right {
    color: #484f58;
}

/* --- 副标题/面包屑 --- */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0.5rem;
}

.breadcrumb-item a {
    color: #58a6ff;
}

.breadcrumb-item.active {
    color: #8b949e;
}

/* --- 页脚 --- */
.main-footer {
    background: #161b22;
    border-top: 1px solid #30363d;
    color: #484f58;
    font-size: 0.8rem;
}

/* --- 代码/等宽字体 --- */
code, pre, .monospace {
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.85em;
}

/* --- 工具提示 --- */
.tooltip-inner {
    background: #1c2128;
    border: 1px solid #30363d;
    font-size: 0.8rem;
}

/* --- 弹窗/模态框 --- */
.modal-content {
    background: #161b22;
    border: 1px solid #30363d;
    color: #c9d1d9;
}

.modal-header {
    border-bottom: 1px solid #30363d;
}

.modal-footer {
    border-top: 1px solid #30363d;
}

/* --- 时间线/列表组 --- */
.list-group-item {
    background: #161b22;
    border-color: #30363d;
    color: #c9d1d9;
}

.list-group-item:hover {
    background: #1c2128;
    color: #c9d1d9;
}

/* --- 排序表头 --- */
thead th.sorting::before,
thead th.sorting::after,
thead th.sorting_asc::before,
thead th.sorting_asc::after,
thead th.sorting_desc::before,
thead th.sorting_desc::after {
    opacity: 0.4;
}

/* --- 选中行 --- */
tr.selected td {
    background: #1f6feb22 !important;
}

/* --- 回收站链接 --- */
.delete-link, a.text-danger {
    color: #f85149 !important;
}

.delete-link:hover, a.text-danger:hover {
    color: #ff7b72 !important;
}

/* --- 自定义滚动条 --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* --- Widget/通知区 --- */
.user-panel {
    border-bottom: 1px solid #30363d !important;
}

.user-panel .info a {
    color: #c9d1d9 !important;
}

/* --- Select2 下拉 --- */
.select2-dropdown {
    background: #161b22;
    border-color: #30363d;
}

.select2-results__option {
    color: #c9d1d9;
}

.select2-results__option--highlighted {
    background: #1f6feb !important;
}

.select2-search__field {
    background: #0d1117 !important;
    border-color: #30363d !important;
    color: #c9d1d9 !important;
}

/* --- 登录页面 --- */
.login-page {
    background: #0d1117;
}

.login-box {
    width: 380px;
}

.login-logo a {
    color: #58a6ff !important;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-card-body {
    background: #161b22;
    border: 1px solid #30363d;
}

/* --- 错误页面 --- */
.error-page {
    background: #0d1117;
}

.error-page .error-content {
    background: #161b22;
    border: 1px solid #30363d;
}

/* --- 动画 --- */
.main-sidebar,
.content-wrapper,
.main-header {
    transition: none;
}

/* --- Widget 自定义颜色 --- */
.small-box {
    border: 1px solid #30363d;
}

.small-box h3, .small-box p {
    color: #c9d1d9;
}

/* --- Info Box --- */
.info-box {
    background: #161b22;
    border: 1px solid #30363d;
}

.info-box .info-box-text {
    color: #c9d1d9;
}

.info-box .info-box-number {
    color: #c9d1d9;
}

/* --- 禁用 AdminLTE 的圆角 --- */
[class*="bg-"] {
    border-radius: 0 !important;
}

.img-circle, .img-rounded, .user-img, .profile-user-img {
    border-radius: 4px !important;
}