/* ===================================================================
   简约稳重风格美化 - 基于 Bootstrap 2.x
   在原有框架上做精细化调整
   =================================================================== */

/* ---------- 全局 ---------- */
body,
.body,
.body-fullscreen {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: #1d1d1f;
    background: #f0f0f2 !important;
    background-image: none !important;
}
a { color: #555; }
a:hover { color: #1d1d1f; }

/* ---------- 顶部导航栏 ---------- */
.navbar {
    box-shadow: none;
    margin: 0;
}
.navbar .navbar-inner {
    background: #1d1d1f !important;
    background-image: none !important;
    filter: none !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 16px;
    min-height: 40px;
}
.navbar .brand {
    color: #f5f5f7;
    font-weight: 500;
    font-size: 15px;
    text-shadow: none;
    padding: 10px 0 10px 4px;
    margin-left: 0;
    line-height: 20px;
}
.navbar .nav > li > a {
    color: #a1a1a6;
    font-size: 13px;
    text-shadow: none;
    padding: 10px 14px;
    line-height: 20px;
}
.navbar .nav > li:hover { background: #2c2c2e; }
.navbar .nav > li > a:hover { color: #f5f5f7; }
.navbar .nav li.dropdown.open > .dropdown-toggle {
    background: #2c2c2e;
    color: #f5f5f7;
}
.navbar .dropdown-menu {
    border-radius: 8px;
    margin-top: 4px;
    border: 1px solid #e8e8ed;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.navbar .dropdown-menu a {
    font-size: 13px;
    padding: 8px 16px;
    color: #444;
}
.navbar .dropdown-menu a:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

/* ---------- 左侧导航 ---------- */
.sidebar-nav {
    background: #fff;
    position: fixed;
    top: 52px;
    bottom: 12px;
    left: 12px;
    width: 228px;
    border: none;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow-y: auto;
    padding-top: 0;
    z-index: 10;
}
/* 内容区：flex 布局，仅 container-fluid 滚动 */
.content {
    margin-left: 252px !important;
    border-left: none !important;
    height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.content-fullscreen {
    margin-left: 0 !important;
    border-left: none !important;
    height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.content .header { flex-shrink: 0; }
.content .breadcrumb { flex-shrink: 0; }
.content .container-fluid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.content footer { flex-shrink: 0; }

/* 表格标题行固定 */
table.table thead {
    position: sticky;
    top: 0;
    z-index: 3;
}

/* 分页固定在底部 */
.pagination {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: #fff;
    margin: 0;
    padding: 8px 0;
}

/* 防止 Bootstrap collapse 干扰 sticky */
.block-body.collapse.in { overflow: visible !important; }
.sidebar-nav .nav-header {
    background: #fff !important;
    background-image: none !important;
    filter: none !important;
    border-top: none;
    border-bottom: 1px solid #e8e8ed;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 12px;
    line-height: 2.8em;
    padding: 0 0 0 1.2em;
    text-shadow: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidebar-nav .nav-header:hover {
    background: #fbfbfb !important;
    background-image: none !important;
}
.sidebar-nav .nav-list {
    background: #fff;
    border: none;
}
.sidebar-nav .nav-list > li > a {
    color: #555;
    padding: 0.5em 1em 0.5em 2.4em;
    font-size: 13px;
    border-bottom: none;
}
.sidebar-nav .nav-list > li > a:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}
.sidebar-nav .nav-list > .active > a,
.sidebar-nav .nav-list > .active > a:hover {
    background: #e8e8ed;
    color: #1d1d1f;
}
.sidebar-nav .nav-list.collapse.in { border-bottom: none; }
.sidebar-nav .nav-header i[class^="icon-"] {
    margin-right: 0.5em;
    width: 16px;
    text-align: center;
    color: #888;
}
/* 第一个导航分组与导航栏衔接 */
.sidebar-nav .nav-header:first-child {
    border-top: none;
    padding-top: 0;
}

/* ---------- 页面标题 ---------- */
.header {
    background: none !important;
    background-image: none !important;
    filter: none !important;
    border: none !important;
    padding: 0 0 0 0 !important;
    margin: 0 0 12px 0;
}
.header .page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 12px 0 0 0;
    line-height: 1.4;
    padding: 0;
}
.stats { display: none; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
    background: transparent;
    padding: 2px 0 0 0;
    margin: 0 0 16px 0;
    border: none;
    font-size: 12px;
    color: #aaa;
}
.breadcrumb a { color: #888; }
.breadcrumb a:hover { color: #1d1d1f; }
.breadcrumb .active { color: #444; font-weight: 500; }
.breadcrumb .divider { color: #d2d2d7; padding: 0 4px; }

/* ---------- 内容块 ---------- */
.block {
    border: 1px solid #e8e8ed !important;
    background: #fff;
    margin: 0 0 16px 0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.block-heading {
    background: #fff !important;
    background-image: none !important;
    filter: none !important;
    border-bottom: 1px solid #e8e8ed !important;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 13px;
    line-height: 2.8em;
    padding: 0 1.2em;
    border-radius: 10px 10px 0 0;
    border-top: none !important;
}
a.block-heading, .block-heading a {
    border-top: none !important;
    color: #1d1d1f;
}
a.block-heading:hover,
.block-heading a:hover {
    background: #fafafa !important;
    background-image: none !important;
    color: #1d1d1f;
}
.block-heading .block-icon {
    border-right: 1px solid #e8e8ed;
}
.block-body {
    margin: 0;
    padding: 16px 20px;
}
.block-body table { margin-top: 0; }

/* ---------- Well ---------- */
.well {
    background: #fafafa;
    border: 1px solid #e8e8ed;
    border-radius: 8px;
    box-shadow: none;
    padding: 12px 16px;
    margin-top: 0;
    margin-bottom: 12px;
}

/* ---------- 表格 ---------- */
table.table {
    border: none;
    margin-bottom: 0;
}
table.table thead {
    background: #f5f5f7;
}
table.table thead th {
    border-bottom: none;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    padding: 10px 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
table.table td {
    padding: 10px 12px;
    color: #333;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    vertical-align: middle;
}
table.table tr,
table.table tr.odd { color: #333; background: #fff; }
table.table tr:hover { background: #fafafa; }
table.table tr.odd:hover { background: #f5f5f5; }
table.table thead tr:hover { background: #f5f5f7; }
table.table-striped tbody > tr:nth-child(odd) > td,
table.table-striped tbody > tr:nth-child(odd) > th {
    background: #fafafa;
}
table.table-striped tbody > tr:nth-child(odd):hover > td {
    background: #f5f5f5;
}
table.table.list tr:first-child td { border-top: 0; }
table.table td {
    word-break: break-all;
    word-wrap: break-word;
}

/* ---------- 按钮 ---------- */
.btn {
    border-radius: 6px;
    border: none;
    font-weight: 500;
    font-size: 13px;
    padding: 7px 16px;
    box-shadow: none;
    text-shadow: none;
    background-image: none !important;
    filter: none !important;
}
.btn:hover, .btn:active { background-position: 0 0; }
.btn-primary {
    background: #1d1d1f !important;
    color: #fff !important;
}
.btn-primary:hover { background: #2c2c2e !important; }
.btn-primary:active { background: #111 !important; }
.btn-info {
    background: #e8e8ed !important;
    color: #1d1d1f !important;
}
.btn-info:hover { background: #d2d2d7 !important; }
.btn-danger { background: #c43e3e !important; color: #fff !important; }
.btn-danger:hover { background: #a83232 !important; }
.btn-success { background: #34a853 !important; color: #fff !important; }
.btn-success:hover { background: #2d9248 !important; }

/* 操作图标 */
td [class^="icon-"] {
    font-size: 14px;
    color: #aaa;
    transition: color 0.15s;
}
td [class^="icon-"]:hover { color: #1d1d1f; text-decoration: none; }
td a { margin: 0 2px; }

/* ---------- 分页 ---------- */
.pagination { margin: 12px 0; }
.pagination ul {
    box-shadow: none;
    border: none;
    border-radius: 6px;
}
.pagination ul > li > a,
.pagination ul > li > span {
    border: 1px solid #e8e8ed;
    margin-left: -1px;
    color: #555;
    padding: 6px 12px;
    font-size: 13px;
    background: #fff;
}
.pagination ul > li:first-child > a,
.pagination ul > li:first-child > span {
    border-radius: 6px 0 0 6px;
}
.pagination ul > li:last-child > a,
.pagination ul > li:last-child > span {
    border-radius: 0 6px 6px 0;
}
.pagination ul > li > a:hover { background: #f5f5f7; }
.pagination ul > li > span {
    background: #f5f5f7;
    color: #1d1d1f;
    font-weight: 500;
}

/* ---------- Label ---------- */
.label {
    border-radius: 4px;
    font-weight: 500;
    font-size: 11px;
    padding: 2px 8px;
    text-shadow: none;
    box-shadow: none;
    border: none;
}
.label-success { background: #34a853; }
.label-info { background: #5b9bd5; }
.label-important { background: #c43e3e; }
.label-warning { background: #e8a838; }

/* ---------- Alert ---------- */
.alert {
    border-radius: 8px;
    border: none !important;
    text-shadow: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    font-size: 13px;
    padding: 12px 16px;
}
.alert-info { background: #eef2f7; color: #3a6ea5; }
.alert-success { background: #e6f4ea; color: #1e7e34; }
.alert-error { background: #fce8e6; color: #a83232; }

/* ---------- 表单 ---------- */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 13px;
    color: #1d1d1f;
    box-shadow: none;
    transition: border-color 0.15s;
    min-height: auto;
    line-height: 1.4;
}
input:focus,
textarea:focus,
select:focus {
    border-color: #888;
    box-shadow: none;
    outline: none;
}

/* ---------- 搜索栏 ---------- */
.form-search label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    line-height: 30px;
}
.form-search select,
.form-search input {
    margin-bottom: 0;
}
.form-search .btn { vertical-align: top; }

/* ---------- Footer ---------- */
.content footer {
    flex-shrink: 0;
    padding: 8px 20px 12px 20px;
    border-top: 1px solid #e8e8ed;
    background: #fff;
}
.content footer hr { display: none; }
.content footer div[style] {
    color: #aaa !important;
    font-size: 12px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 767px) {
    .sidebar-nav { border-right: none; }
    .block { border-radius: 8px; }
    .block-heading { border-radius: 8px 8px 0 0; }
    table.table thead th { font-size: 11px; padding: 8px; }
    table.table td { font-size: 12px; padding: 8px; }
    .btn { padding: 6px 12px; font-size: 12px; }
}
