/* 后台管理通用样式 */
html,
body {
    height: 100%;
}

body {
    background: #f2f3f5;
}

a {
    cursor: pointer;
}

/* ============ 登录页 ============ */
.admin-login-body {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f2027;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    overflow: hidden;
}

.admin-login-body::before,
.admin-login-body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .045);
}

.admin-login-body::before {
    width: 520px;
    height: 520px;
    top: -180px;
    right: -140px;
}

.admin-login-body::after {
    width: 360px;
    height: 360px;
    bottom: -160px;
    left: -120px;
}

.admin-login-box {
    position: relative;
    z-index: 2;
    width: 390px;
    padding: 36px 34px 24px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.admin-login-title {
    text-align: center;
    margin-bottom: 28px;
}

.admin-login-title h1 {
    font-size: 21px;
    font-weight: 600;
    color: #20222a;
    letter-spacing: 1px;
}

.admin-login-title p {
    margin-top: 8px;
    font-size: 13px;
    color: #999;
    letter-spacing: 4px;
}

.admin-login-form .layui-form-item {
    position: relative;
}

.admin-login-form .admin-input-icon {
    position: absolute;
    left: 13px;
    top: 12px;
    z-index: 3;
    color: #c2c2c2;
    font-size: 18px;
}

.admin-login-form .layui-input {
    height: 44px;
    line-height: 44px;
    padding-left: 42px;
    border-radius: 4px;
}

.admin-login-form .layui-btn {
    height: 44px;
    line-height: 44px;
    font-size: 15px;
    letter-spacing: 4px;
}

.admin-captcha-row {
    display: flex;
    gap: 10px;
}

.admin-captcha-row .layui-input {
    flex: 1;
}

.admin-captcha-row img {
    width: 112px;
    height: 44px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #e6e6e6;
}

.admin-login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #999;
}

.admin-login-footer a {
    color: #999;
}

.admin-login-footer a:hover {
    color: #009688;
}

/* ============ 后台框架 ============ */
.layui-layout-admin .layui-logo {
    width: 200px;
    text-align: center;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

.layui-layout-admin .admin-header {
    background: #20222a;
}

.layui-layout-admin .layui-side {
    top: 60px;
    width: 200px;
    transition: left .2s ease;
}

.layui-layout-admin .layui-body {
    position: absolute;
    left: 200px;
    right: 0;
    top: 60px;
    bottom: 44px;
    padding: 0;
    overflow: hidden;
    transition: left .2s ease;
}

/* 左侧菜单收起状态 */
.layui-layout-admin.admin-side-collapsed .layui-side {
    left: -200px;
}

.layui-layout-admin.admin-side-collapsed .layui-body,
.layui-layout-admin.admin-side-collapsed .admin-footer {
    left: 0;
}

#adminFrame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.admin-footer {
    position: absolute;
    left: 200px;
    right: 0;
    bottom: 0;
    height: 44px;
    line-height: 44px;
    text-align: center;
    color: #999;
    background: #f2f3f5;
    font-size: 13px;
    z-index: 999;
    transition: left .2s ease;
}

/* ============ 内容页通用 ============ */
.admin-page {
    background: #f2f3f5;
}

.admin-page-body {
    padding: 18px;
}

.admin-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.admin-page-head h2 {
    font-size: 20px;
    font-weight: 600;
    color: #20222a;
    line-height: 28px;
}

.admin-page-head span {
    color: #999;
    font-size: 13px;
}

.admin-card {
    background: #fff;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.admin-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #20222a;
    line-height: 1.2;
    margin-bottom: 16px;
    padding-left: 10px;
    border-left: 3px solid #009688;
}

/* 搜索栏 */
.admin-search .layui-form-item {
    margin-bottom: 0;
}

.admin-search .layui-inline {
    margin-bottom: 8px;
}

.admin-search .layui-input,
.admin-search .layui-select {
    height: 32px;
    line-height: 32px;
}

/* ============ 仪表盘 ============ */
.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.admin-stat-card {
    background: #fff;
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.admin-stat-card .stat-label {
    font-size: 13px;
    color: #999;
}

.admin-stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #20222a;
    margin: 6px 0 4px;
    line-height: 1.1;
}

.admin-stat-card .stat-tip {
    font-size: 12px;
    color: #009688;
}

.admin-row {
    display: flex;
    gap: 16px;
}

.admin-chart-card {
    flex: 2;
}

.admin-info-card {
    flex: 1;
}

.admin-bars {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 210px;
    padding: 10px 6px 0;
}

.bar-item {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.bar-wrap {
    width: 100%;
    max-width: 42px;
    height: 150px;
    display: flex;
    align-items: flex-end;
}

.bar {
    width: 100%;
    min-height: 2px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, #16baaa, #009688);
}

.bar-count {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.bar-label {
    margin-top: 2px;
    font-size: 12px;
    color: #999;
}

.admin-info-card ul li {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
    color: #666;
}

.admin-info-card ul li:last-child {
    border-bottom: 0;
}

.admin-info-card ul li b {
    font-weight: 500;
    color: #20222a;
}

/* ============ 表单页 ============ */
.admin-form-page .admin-card {
    max-width: 1100px;
}

.admin-input-inline-sm {
    width: 110px;
}

.admin-upload-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.admin-upload-preview {
    width: 100%;
}

.admin-upload-preview img {
    display: block;
    max-width: 220px;
    max-height: 140px;
    margin-top: 10px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
}

.admin-editor-wrap {
    line-height: normal;
}

.admin-form-actions {
    padding-left: 110px;
}

.admin-narrow-form {
    max-width: 600px;
}

.admin-tips {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* 表格内链接 */
.admin-table a {
    color: #009688;
}

.admin-table a:hover {
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .admin-stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-row {
        flex-direction: column;
    }
}
