/**
 * 后台管理公共样式
 */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f2f2f2;
}

/* 布局 */
.layui-layout-admin {
    min-height: 100vh;
}

.layui-layout-admin .layui-logo {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.layui-layout-admin .layui-side {
    width: 200px;
}

.layui-layout-admin .layui-body {
    left: 200px;
    bottom: 0;
    padding: 20px;
    overflow: auto;
}

.layui-layout-admin .layui-footer {
    left: 200px;
    text-align: center;
}

/* 头部 */
.layui-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 20px;
}

.layui-header .layui-logo {
    color: #fff;
    font-size: 20px;
    line-height: 60px;
    font-weight: bold;
}

.layui-header .layui-nav {
    background: none;
}

.layui-header .layui-nav-item a {
    color: rgba(255, 255, 255, 0.9);
}

.layui-header .layui-nav-item a:hover {
    color: #fff;
}

/* 侧边栏 */
.layui-side {
    background-color: #263238;
}

.layui-side-scroll {
    width: 200px;
}

.layui-nav-tree .layui-nav-item {
    margin: 0;
}

.layui-nav-tree .layui-nav-item a {
    color: #a0aec0;
    padding: 0 20px;
    height: 48px;
    line-height: 48px;
}

.layui-nav-tree .layui-nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.layui-nav-tree .layui-nav-item.layui-this a,
.layui-nav-tree .layui-nav-item.layui-this > a {
    background-color: #667eea;
    color: #fff;
}

.layui-nav-tree .layui-nav-child a {
    padding-left: 40px;
}

/* 内容区域 */
.main-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 统计卡片 */
.stat-card {
    border-radius: 8px;
    padding: 20px;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.stat-card.bg-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card.bg-orange {
    background: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
}

.stat-card.bg-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.welcome-text {
    margin-bottom: 20px;
}

.welcome-text h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 5px;
}

.welcome-text p {
    color: #999;
    font-size: 14px;
}

/* 搜索栏 */
.search-bar {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.search-form {
    padding: 15px;
    background: #f8f8f8;
    margin-bottom: 15px;
    border-radius: 4px;
}

.search-form .layui-form-item {
    margin-bottom: 0;
}

/* 表格 */
.layui-table th {
    background: #f8f9fa;
}

/* 状态颜色 */
.status-success,
.status-active {
    color: #52c41a;
}

.status-pending {
    color: #faad14;
}

.status-callback {
    color: #1890ff;
}

.status-inactive {
    color: #ff4d4f;
}

/* 表格操作按钮 */
.table-operate .layui-btn {
    padding: 0 8px;
    height: 28px;
    line-height: 28px;
    font-size: 12px;
}

/* 分页 */
.layui-laypage {
    margin-top: 15px;
    text-align: right;
}

/* iframe */
.admin-iframe {
    width: 100%;
    height: calc(100vh - 60px);
    border: none;
}

/* ========== 兼容 ThinkPHP 模板样式 ========== */

/* 栅格系统 */
.row {
    margin: 0;
}

.col-md-12 {
    width: 100%;
    float: none;
}

/* ibox 容器 (Inspinia Admin 风格) */
.ibox {
    clear: both;
    margin-bottom: 0;
    background-color: #fff;
}

.ibox.float-e-margins {
    margin-bottom: 0;
}

.ibox-title {
    background-color: #fff;
    border-bottom: 1px solid #e7eaec;
    border-image: none;
    border-style: solid solid none;
    border-width: 2px 0 0;
    color: inherit;
    margin-bottom: 0;
    padding: 15px 15px 7px;
    min-height: 48px;
}

.ibox-title h5 {
    display: inline-block;
    font-size: 14px;
    margin: 0 0 7px;
    padding: 0;
    text-overflow: ellipsis;
    float: left;
    font-weight: 600;
    color: #333;
}

.ibox-tools {
    display: inline-block;
    float: right;
    margin-top: 0;
    position: relative;
    padding: 0;
}

.ibox-tools a {
    cursor: pointer;
    margin-left: 5px;
    color: #c4c4c4;
}

.ibox-tools .layui-icon {
    font-size: 16px;
    color: #999;
}

.ibox-content {
    background-color: #fff;
    color: inherit;
    padding: 15px 20px 20px;
    border-color: #e7eaec;
    border-image: none;
    border-style: solid solid none;
    border-width: 1px 0;
}

/* 文字颜色 */
.text-success {
    color: #1c84c6;
}

.text-danger {
    color: #ed5565;
}

.text-warning {
    color: #f8ac59;
}

.text-info {
    color: #23c6c8;
}

/* 标签 */
.label {
    display: inline;
    padding: .2em .6em .3em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
}

.label-info {
    background-color: #23c6c8;
}

.label-warning {
    background-color: #f8ac59;
}

.label-danger {
    background-color: #ed5565;
}

.label-success {
    background-color: #1c84c6;
}

/* 分页容器 */
.page {
    margin-top: 15px;
    text-align: right;
}

.page .layui-form {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.page select {
    vertical-align: middle;
}

/* 列表项 */
.list.item {
    margin-top: 10px;
}

/* blockquote 样式增强 */
.layui-elem-quote {
    margin-bottom: 10px;
    border-left: 5px solid #009688;
}

/* glyphicon 兼容（使用 Font Awesome 替代） */
.glyphicon {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.glyphicon-search::before {
    content: "\f002";
}

.glyphicon-export::before {
    content: "\f019";
}

.glyphicon-refresh::before {
    content: "\f021";
}

.glyphicon-plus::before {
    content: "\f067";
}

.glyphicon-minus::before {
    content: "\f068";
}

.glyphicon-edit::before {
    content: "\f044";
}

.glyphicon-trash::before {
    content: "\f1f8";
}

.glyphicon-eye-open::before {
    content: "\f06e";
}

/* 浮动 */
.float-left {
    float: left;
}

.float-right {
    float: right;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
