/* admin-panel.css
 * 后台管理页面（如 BlankSetting / ElementThreshold）使用的专属样式：
 * 面板、按钮、表格、查询区、Bootstrap 兼容层、模态框、分页、Alert 等。
 * 原内联在 _AdminLayout.cshtml 中，现提取为公共文件供 _DashboardLayout 与 _AdminLayout 共用。
 */

/* 面板样式 */
.new-panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.new-panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.new-panel-header h2 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.new-panel-body {
    padding: 20px;
}

/* 按钮样式 */
.btn-new {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-new-primary {
    background: linear-gradient(135deg, #0072ff, #00c8ff);
    color: #fff;
}

.btn-new-primary:hover {
    box-shadow: 0 5px 20px rgba(0,200,255,0.4);
    transform: translateY(-2px);
}

.btn-new-success {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff;
}

.btn-new-success:hover {
    box-shadow: 0 5px 20px rgba(0,184,148,0.4);
    transform: translateY(-2px);
}

.btn-new-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

.btn-new-danger:hover {
    box-shadow: 0 5px 20px rgba(231,76,60,0.4);
    transform: translateY(-2px);
}

.btn-new-default {
    background: #e0e0e0;
    color: #666;
}

.btn-new-default:hover {
    background: #d0d0d0;
}

.btn-new-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}

.btn-new-info:hover {
    box-shadow: 0 5px 20px rgba(52,152,219,0.4);
    transform: translateY(-2px);
}

.btn-new-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
}

.btn-new-warning:hover {
    box-shadow: 0 5px 20px rgba(243,156,18,0.4);
    transform: translateY(-2px);
}

/* 表单样式 */
.form-control-new {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    width: 100%;
}

.form-control-new:focus {
    border-color: #00c8ff;
    box-shadow: 0 0 5px rgba(0,200,255,0.3);
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

/* 表格样式 */
.table-new {
    width: 100%;
    border-collapse: collapse;
}

.table-new thead {
    background: linear-gradient(135deg, #0a1628, #1a2a4a);
    color: #fff;
}

.table-new th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: none;
}

.table-new td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.table-new tbody tr:hover {
    background: #f5f9fc;
}

.table-new tbody tr:nth-child(even) {
    background: #fafafa;
}

.table-new tbody tr:nth-child(even):hover {
    background: #f5f9fc;
}

/* 查询区域 */
.query-area {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.query-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.query-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.query-item label {
    white-space: nowrap;
    color: #666;
    font-size: 14px;
}

/* ===== 兼容层：旧版 Bootstrap 类名适配新版浅色主题 ===== */

/* 按钮：btn btn-primary → 新版渐变风格 */
.btn { display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 5px; font-size: 14px; cursor: pointer; transition: all 0.3s; padding: 2px 6px; }
.btn:focus { outline: none; }
.btn-primary { background: linear-gradient(135deg, #0072ff, #00c8ff); color: #fff; }
.btn-primary:hover { box-shadow: 0 5px 20px rgba(0,200,255,0.4); transform: translateY(-2px); color: #fff; text-decoration: none; }
.btn-success { background: linear-gradient(135deg, #00b894, #00cec9); color: #fff; }
.btn-success:hover { box-shadow: 0 5px 20px rgba(0,184,148,0.4); transform: translateY(-2px); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; }
.btn-danger:hover { box-shadow: 0 5px 20px rgba(231,76,60,0.4); transform: translateY(-2px); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #f39c12, #e67e22); color: #fff; }
.btn-warning:hover { box-shadow: 0 5px 20px rgba(243,156,18,0.4); transform: translateY(-2px); color: #fff; }
.btn-info { background: linear-gradient(135deg, #3498db, #2980b9); color: #fff; }
.btn-info:hover { box-shadow: 0 5px 20px rgba(52,152,219,0.4); transform: translateY(-2px); color: #fff; }
.btn-default, .btn-link { background: #e0e0e0; color: #666; }
.btn-default:hover { background: #d0d0d0; color: #444; }
.btn-link { background: transparent; border: none; color: #0072ff; padding: 4px 8px; }
.btn-link:hover { color: #00c8ff; text-decoration: underline; transform: none; box-shadow: none; }
.btn-xs { padding: 3px 10px; font-size: 12px; border-radius: 3px; }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn.active, .btn:active { transform: translateY(0); box-shadow: none; }

/* 面板：main-box / panel → new-panel 风格 */
.main-box, .panel, .panel-default { background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 20px; overflow: hidden; }
.main-box-header, .panel-heading, .panel-title { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.main-box-header h2, .panel-heading h2, .panel-title { font-size: 16px; color: #333; margin: 0; font-weight: 600; }
.main-box-body, .panel-body { padding: 20px; }

/* 表格：table / table-striped → table-new 风格 */
.table { width: 100%; border-collapse: collapse; }
.table thead { background: linear-gradient(135deg, #0a1628, #1a2a4a); color: #fff; }
.table th { padding: 12px 15px; text-align: left; font-weight: 600; font-size: 14px; color: #fff; border-bottom: none; text-transform: none; }
.table thead > tr > th { text-transform: none; }
.table td { padding: 12px 15px; border-bottom: 1px solid #eee; font-size: 14px; }
.table-striped tbody tr:nth-child(even) { background: #fafafa; }
.table-bordered { border: 1px solid #ddd; }
.table-bordered > thead > tr > th { border-bottom: 2px solid #1a2a4a; }
.table-bordered > tbody > tr > td { border: 1px solid #eee; }
.table-responsive { overflow-x: auto; }
.table-hover tbody tr:hover { background: #f5f9fc; }
.content-body .table > tbody > tr > td { color: #333; }
.content-body .table > tbody > tr > th { background: transparent; color: #333; font-weight: 600; }

/* 表单：form-control → 新版风格 */
.form-control { padding: 5px 15px; border: 1px solid #ddd; border-radius: 5px; font-size: 14px; outline: none; transition: all 0.3s; color: #333; background: #fff; }
.form-control:focus { border-color: #00c8ff; box-shadow: 0 0 5px rgba(0,200,255,0.3); }
.form-group { margin-bottom: 15px; }
.form-group label, .control-label { color: #666; font-size: 14px; margin-bottom: 5px; display: block; font-weight: normal; }

.input-group { /*! display: flex; */
    align-items: center;
}

.input-group .form-control { border-radius: 5px; }
.input-group-addon { background: #f8f9fa; border: 1px solid #ddd; padding: 10px 12px; color: #666; font-size: 14px; }

/* 标签：label label-xxx → 新版风格 */
.label { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.label-primary { background: linear-gradient(135deg, #0072ff, #00c8ff); color: #fff; }
.label-success { background: linear-gradient(135deg, #00b894, #00cec9); color: #fff; }
.label-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; }
.label-warning { background: linear-gradient(135deg, #f39c12, #e67e22); color: #fff; }
.label-info { background: linear-gradient(135deg, #3498db, #2980b9); color: #fff; }
.label-default { background: #e0e0e0; color: #666; }

/* 模态框：modal → 新版风格 */
.modal-dialog { margin-top: 80px; }
.modal-content { border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); border: none; }
.modal-header { background: linear-gradient(135deg, #0a1628, #1a2a4a); color: #fff; padding: 15px 20px; border-radius: 10px 10px 0 0; border-bottom: none; }
.modal-title { color: #fff !important; font-size: 16px; font-weight: 600; }
.modal-header .close { color: #fff; opacity: 0.8; font-size: 24px; text-shadow: none; }
.modal-header .close:hover { opacity: 1; }
.modal-body { padding: 25px; }
.modal-footer { padding: 15px 20px; border-top: 1px solid #eee; background: #f8f9fa; border-radius: 0 0 10px 10px; }

/* 分页：pagination → 新版风格 */
.pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; }
.pagination > li > a, .pagination > li > span { padding: 8px 14px; border: 1px solid #ddd; border-radius: 5px; color: #333; text-decoration: none; font-size: 14px; transition: all 0.3s; background: #fff; }
.pagination > li > a:hover { background: linear-gradient(135deg, #0072ff, #00c8ff); color: #fff; border-color: transparent; }
.pagination > .active > a, .pagination > .active > span { background: linear-gradient(135deg, #0072ff, #00c8ff); color: #fff; border-color: transparent; }
.pagination > .disabled > a, .pagination > .disabled > span { background: #f0f0f0; color: #999; cursor: not-allowed; }

/* Alert 提示 */
.alert { padding: 12px 20px; border-radius: 8px; font-size: 14px; border: none; }
.alert-success { background: linear-gradient(135deg, #00b894, #00cec9); color: #fff; }
.alert-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; }
.alert-warning { background: linear-gradient(135deg, #f39c12, #e67e22); color: #fff; }
.alert-info { background: linear-gradient(135deg, #3498db, #2980b9); color: #fff; }

/* 下拉菜单 */
.dropdown-menu { background: #fff; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.15); border: 1px solid #eee; padding: 8px 0; }
.dropdown-menu > li > a { color: #333; padding: 8px 20px; font-size: 14px; transition: all 0.2s; }
.dropdown-menu > li > a:hover { background: #f0f8ff; color: #0072ff; }
.dropdown-menu .divider { border-color: #eee; }

/* 状态标签 */
.status-normal { color: #00b894; font-weight: 600; }
.status-abnormal { color: #e74c3c; font-weight: 600; }
.status-pending { color: #f39c12; font-weight: 600; }

/* 查询区域兼容 */
.filter-block { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 内容区域内文字颜色修复 */
.content-body { color: #333; }
.content-body h2, .content-body h3, .content-body h4 { color: #333; }
.content-body .text-muted { color: #95a5a6; }
.content-body .text-danger { color: #e74c3c; }
.content-body .text-success { color: #00b894; }
.content-body .text-center { text-align: center; }
.content-body .text-right { text-align: right; }
.content-body .pull-right { float: right; }

/* 响应式 */
@media (max-width: 768px) {
    .query-row {
        flex-direction: column;
    }

    .query-item {
        width: 100%;
    }
}
