/**
 * admin.css - 龙辉起重管理后台样式
 * 发票管家风格 - 全面美化版
 */

/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f0f2f5;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #3b8132;
    transition: all 0.2s;
}

a:hover {
    color: #F37021;
}

ul, li {
    list-style: none;
}

/* ========== 顶部白色导航条（不驻留，随页面滚动） ========== */
.topbar {
    height: 52px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.topbar-inner {
    max-width: 100%;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-brand {
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: bold;
    color: #3b8132;
    letter-spacing: 0.5px;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.top-link {
    padding: 7px 14px;
    border-radius: 4px;
    color: #555;
    font-size: 13px;
    transition: all 0.2s;
}

.top-link:hover {
    background: #F37021;
    color: #fff;
}

.top-link-logout:hover {
    background: #e74c3c;
    color: #fff;
}

.top-user {
    margin-left: 12px;
    padding-left: 14px;
    border-left: 1px solid #e5e5e5;
    color: #3b8132;
    font-weight: bold;
    font-size: 13px;
}

/* ========== 绿色功能导航菜单栏（吸顶永久驻留） ========== */
.mainnav {
    height: 42px;
    background: linear-gradient(90deg, #3b8132 0%, #2d6626 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mainnav-inner {
    max-width: 100%;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    overflow-x: auto;
}

.menu-toggle {
    display: none;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    margin-right: 8px;
    border-radius: 4px;
}

.mainnav-item {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 18px;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s;
    position: relative;
}

.mainnav-item:hover {
    background: #F37021;
    color: #fff;
}

.mainnav-item.active {
    background: #F37021;
    color: #fff;
    font-weight: bold;
}

.mainnav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #f0f2f5;
}

/* ========== 地址/筛选条件栏 ========== */
.addrbar {
    height: 38px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.addrbar-inner {
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.breadcrumb {
    font-size: 13px;
    color: #666;
}

.bc-home {
    color: #999;
    margin-right: 6px;
}

.breadcrumb a {
    color: #3b8132;
}

.breadcrumb a:hover {
    color: #F37021;
    text-decoration: underline;
}

.bc-current {
    color: #333;
    font-weight: bold;
}

.bc-sep {
    margin: 0 6px;
    color: #ccc;
}

/* ========== 主体布局 ========== */
.layout {
    display: flex;
    min-height: calc(100vh - 52px - 42px - 38px - 45px);
}

/* ========== 左侧垂直菜单 ========== */
.sidebar {
    width: 210px;
    background: #fff;
    border-right: 1px solid #e5e5e5;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.sidebar-header {
    height: 42px;
    line-height: 42px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: bold;
    color: #999;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    letter-spacing: 1px;
}

.sidebar-nav {
    padding: 6px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #444;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.sidebar-item:hover {
    background: #f5f9f4;
    color: #F37021;
    border-left-color: #F37021;
    padding-left: 24px;
}

.sidebar-item.active {
    background: #f0f7ee;
    color: #3b8132;
    border-left-color: #3b8132;
    font-weight: bold;
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #3b8132;
    border-radius: 50%;
}

/* ========== 右侧主内容区 ========== */
.main-content {
    flex: 1;
    padding: 16px;
    min-width: 0;
}

/* 标题栏 */
.page-titlebar {
    height: 58px;
    background: #fff;
    border-radius: 6px 6px 0 0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #3b8132;
}

.page-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    position: relative;
    padding-left: 12px;
}

.page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #F37021;
    border-radius: 2px;
}

.page-actions {
    display: flex;
    gap: 8px;
}

/* 内容容器 */
.content-box {
    background: #fff;
    border-radius: 0 0 6px 6px;
    padding: 20px;
    min-height: 400px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1.5;
    text-align: center;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #3b8132 0%, #2d6626 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #F37021 0%, #e06010 100%);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: #fff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #F37021 0%, #e06010 100%);
    color: #fff;
}

.btn-default {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
}

.btn-default:hover {
    background: #F37021;
    color: #fff;
    border-color: #F37021;
}

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

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    color: #fff;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #F37021 0%, #e06010 100%);
    color: #fff;
}

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

.btn-info:hover {
    background: linear-gradient(135deg, #F37021 0%, #e06010 100%);
    color: #fff;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 15px;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

/* ========== 数据表格 ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead th {
    background: linear-gradient(180deg, #3b8132 0%, #2d6626 100%);
    color: #fff;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    border: none;
    white-space: nowrap;
}

.data-table thead th:first-child {
    border-radius: 4px 0 0 0;
}

.data-table thead th:last-child {
    border-radius: 0 4px 0 0;
}

.data-table tbody td {
    padding: 11px 10px;
    border-bottom: 1px solid #eee;
    color: #444;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: all 0.15s;
}

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

.data-table tbody tr:hover {
    background: #fff8f3;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .empty-tip {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* 表格操作链接 */
.data-table .op-link {
    color: #3b8132;
    margin-right: 10px;
    font-size: 13px;
}

.data-table .op-link:hover {
    color: #F37021;
    text-decoration: underline;
}

.data-table .op-link.danger {
    color: #e74c3c;
}

.data-table .op-link.danger:hover {
    color: #c0392b;
}

/* ========== 表单样式 ========== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #444;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-label .required {
    color: #e74c3c;
    margin-right: 3px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    outline: none;
    background: #fff;
    color: #333;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #3b8132;
    box-shadow: 0 0 0 3px rgba(59,129,50,0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
}

/* 搜索筛选栏 */
.search-bar {
    background: #f9faf9;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 15px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-bar .form-input,
.search-bar .form-select {
    width: auto;
    min-width: 160px;
}

/* ========== 标签/徽章 ========== */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
}

.tag-green {
    background: #e8f5e9;
    color: #27ae60;
    border: 1px solid #a9dfbf;
}

.tag-blue {
    background: #e3f2fd;
    color: #2980b9;
    border: 1px solid #aed6f1;
}

.tag-orange {
    background: #fff3e0;
    color: #F37021;
    border: 1px solid #f5cba7;
}

.tag-red {
    background: #fdecea;
    color: #e74c3c;
    border: 1px solid #f5b7b1;
}

.tag-gray {
    background: #f0f0f0;
    color: #888;
    border: 1px solid #ddd;
}

/* ========== 统计卡片 ========== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.25s;
    border-left: 4px solid #3b8132;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.stat-card:nth-child(2) {
    border-left-color: #2980b9;
}

.stat-card:nth-child(3) {
    border-left-color: #F37021;
}

.stat-card:nth-child(4) {
    border-left-color: #8e44ad;
}

.stat-info {
    flex: 1;
}

.stat-num {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
}

/* ========== 面板 ========== */
.panel {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

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

.panel-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    position: relative;
    padding-left: 12px;
}

.panel-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: #3b8132;
    border-radius: 2px;
}

.panel-body {
    padding: 20px;
}

.panel-body.no-padding {
    padding: 0;
}

/* ========== 快捷入口 ========== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 26px 12px;
    background: linear-gradient(135deg, #f9faf9 0%, #f0f4ef 100%);
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.25s;
    color: #555;
}

.quick-item:hover {
    background: linear-gradient(135deg, #fff8f3 0%, #ffeedd 100%);
    border-color: #F37021;
    color: #F37021;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243,112,33,0.15);
}

.quick-text {
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========== 提示信息 ========== */
.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-success {
    background: #e8f5e9;
    color: #1e8449;
    border-color: #a9dfbf;
}

.alert-error {
    background: #fdecea;
    color: #c0392b;
    border-color: #f5b7b1;
}

.alert-warning {
    background: #fff8e1;
    color: #b7950b;
    border-color: #f9e79f;
}

.alert-info {
    background: #e3f2fd;
    color: #1a5276;
    border-color: #aed6f1;
}

/* 分页信息（页脚统计） */
.page-info {
    margin-left: 14px;
    color: #999;
    font-size: 13px;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    background: #fff;
    transition: all 0.2s;
    min-width: 32px;
    text-align: center;
}

.pagination a:hover {
    background: #F37021;
    color: #fff;
    border-color: #F37021;
}

.pagination .current {
    background: #3b8132;
    color: #fff;
    border-color: #3b8132;
    font-weight: bold;
}

.pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f9f9f9;
}

/* ========== 图片管理网格 ========== */
.image-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.image-item {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: all 0.2s;
}

.image-item:hover {
    border-color: #F37021;
    box-shadow: 0 4px 12px rgba(243,112,33,0.15);
    transform: translateY(-2px);
}

.image-item .img-wrap {
    width: 100%;
    padding-top: 75%;
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
}

.image-item .img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item .img-info {
    padding: 8px 10px;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #eee;
}

.image-item .img-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.image-item .img-actions {
    display: flex;
    gap: 8px;
}

/* ========== 底部版权栏 ========== */
.footer {
    background: #fff;
    border-top: 1px solid #e5e5e5;
    padding: 12px 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
    height: 45px;
    line-height: 21px;
}

.footer a {
    color: #999;
}

.footer a:hover {
    color: #F37021;
}

/* ========== 登录页样式 ========== */
.login-body {
    background: linear-gradient(135deg, #3b8132 0%, #1a4d15 50%, #2d6326 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -200px;
    right: -150px;
}

.login-body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    bottom: -150px;
    left: -100px;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 45px 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-title {
    font-size: 26px;
    color: #3b8132;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-subtitle {
    font-size: 14px;
    color: #999;
}

.login-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.login-form .form-group {
    margin-bottom: 22px;
}

.login-form .form-label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-form .form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
}

.login-form .form-input:focus {
    border-color: #3b8132;
    box-shadow: 0 0 0 4px rgba(59,129,50,0.1);
}

/* 验证码行（2026-10-18 P0-5 安全加固） */
.captcha-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

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

.captcha-row .captcha-img {
    width: 130px;
    height: 46px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.captcha-row .captcha-img:hover {
    border-color: #3b8132;
}

.login-form .btn-primary {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #3b8132 0%, #2d6326 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    letter-spacing: 4px;
    margin-top: 8px;
}

.login-form .btn-primary:hover {
    background: linear-gradient(135deg, #F37021 0%, #e06010 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243,112,33,0.3);
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: #bbb;
}

/* ========== 信息网格 ========== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.info-item {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}

.info-label {
    color: #888;
    margin-right: 8px;
}

.info-value {
    color: #333;
    font-weight: 500;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .image-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    /* 手机端精简：顶部小图标按钮（控制台/访问官网/系统设置/退出登录）全部隐藏 */
    .topbar-nav { display: none !important; }
    /* 手机端精简：隐藏"菜单"展开按钮（绿色菜单栏可直接横向滑动访问各项） */
    .menu-toggle, #menuToggle { display: none !important; }
    /* 手机端精简：隐藏"控制台"菜单项（绿色菜单栏 + 左侧菜单），保留全局设置及后续项 */
    .mainnav-item[data-key="index"], .sidebar-item[data-key="index"] { display: none !important; }
    /* 手机端精简：面包屑中的"控制台"链接一并隐藏 */
    .addrbar-inner a[href="index.php"] { display: none !important; }
    .topbar-inner {
        padding: 0 12px;
    }
    .topbar-brand {
        font-size: 14px;
    }
    .top-link {
        padding: 5px 8px;
        font-size: 12px;
    }
    .mainnav-inner {
        padding: 0 12px;
    }
    .mainnav-item {
        padding: 0 12px;
        font-size: 13px;
    }
    .menu-toggle {
        display: block;
    }
    .sidebar {
        position: fixed;
        left: 0;
        top: 94px;
        bottom: 0;
        z-index: 998;
        transform: translateX(-100%);
        box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        padding: 10px;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card {
        padding: 16px 14px;
    }
    .stat-num {
        font-size: 22px;
    }
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .login-box {
        padding: 30px 22px;
    }
    .login-title {
        font-size: 22px;
    }
    .page-titlebar {
        padding: 0 14px;
    }
    .page-title {
        font-size: 16px;
    }
    .content-box {
        padding: 14px;
    }
    .data-table {
        font-size: 12px;
    }
    .data-table thead th,
    .data-table tbody td {
        padding: 8px 6px;
    }
    .search-bar {
        padding: 12px;
    }
}

/* 遮罩层（手机端） */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 997;
}

.overlay.show {
    display: block;
}

/* ========== 菜单图标（顶部/主菜单/左侧通用） ========== */
.menu-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    flex-shrink: 0;
    vertical-align: -3px;
}
.top-link .menu-icon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: -2px;
}
.mainnav-item .menu-icon {
    opacity: 0.92;
}
.mainnav-item:hover .menu-icon,
.mainnav-item.active .menu-icon {
    opacity: 1;
}
.sidebar-item .menu-icon {
    color: #7a9a76;
}
.sidebar-item:hover .menu-icon,
.sidebar-item.active .menu-icon {
    color: #3b8132;
}
/* 移动端菜单按钮旁图标（收起态） */
.menu-toggle { display: inline-flex; align-items: center; gap: 5px; }
.menu-toggle::before {
    content: '';
    width: 14px;
    height: 2px;
    background: #fff;
    box-shadow: 0 -5px 0 #fff, 0 5px 0 #fff;
    border-radius: 1px;
}

/* ========== 手机端底部操作栏与适配（2026-11-05） ========== */
.mobile-toolbar { display: none; }

/* 登录页防护标识：九九护盾（2026-11-05） */
.login-shield {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

@media (max-width: 768px) {
    body { padding-bottom: 68px; }
    .mobile-toolbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        height: 56px;
        background: #fff;
        border-top: 1px solid #ddd;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 0 12px;
        box-sizing: border-box;
    }
    .mobile-toolbar a {
        flex: 1;
        max-width: 220px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 42px;
        border-radius: 8px;
        font-size: 16px;
        text-decoration: none;
        box-sizing: border-box;
    }
    .mobile-toolbar-logout {
        color: #fff;
        background: #c0392b;
    }
    /* 内容区：表格改为横向滚动，避免挤压 */
    .content-box { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 620px; }
    /* 标题栏与操作按钮：允许换行、加大触控面积 */
    .page-titlebar { flex-wrap: wrap; gap: 8px; }
    .page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .page-actions .btn { margin: 0; }
    /* 表单控件：满宽、16px 字号防 iOS 聚焦放大 */
    .form-input, .form-select, .form-textarea {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }
    .btn { font-size: 15px; min-height: 40px; }
}


/* 2026-11-06 登录页手机端修正：去掉全局底部留白、按动态视口高度居中 */
@media (max-width: 768px) {
    .login-body { padding-bottom: 0 !important; height: 100dvh; min-height: 100vh; overflow: hidden; }
    .login-wrapper { max-width: 100%; padding: 14px; }
}


/* ================= 手机端后台改版 V6（2026-11-06） ================= */
/* 桌面端：手机专用元素一律隐藏 */
.m-menu-btn { display: none; }
.drawer-close { display: none; }
.drawer-cur { display: none; }
.sidebar-item .nav-desc { display: none; }
.sidebar-item .si-badge { display: none; }

@media (max-width: 768px) {
    /* 顶栏：品牌 + 菜单按钮，固定在顶部 */
    body { padding-bottom: 72px; }
    .topbar {
        position: sticky;
        top: 0;
        z-index: 900;
        box-shadow: 0 1px 6px rgba(0,0,0,.08);
    }
    .topbar-inner { padding: 0 10px; position: relative; }
    .topbar-brand { gap: 8px; min-width: 0; padding-right: 52px; }
    .brand-text {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .m-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        margin: 0;
        padding: 0;
        border: 1px solid #e2e2e2;
        border-radius: 8px;
        background: #fff;
        cursor: pointer;
    }
    .m-bars { display: block; width: 18px; }
    .m-bars i {
        display: block;
        height: 2px;
        margin: 3px 0;
        background: #4a4a4a;
        border-radius: 1px;
    }

    /* 手机端不再用横向菜单条与地址条，导航全部收进左侧抽屉 */
    .mainnav { display: none !important; }
    .addrbar { display: none !important; }

    /* 左侧抽屉：占屏宽 50%，从右侧滑出（右手操作） */
    .layout { display: block; }
    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 50vw !important;
        max-width: 50vw;
        height: 100%;
        margin: 0;
        padding: 0 0 76px;
        box-sizing: border-box;
        background: #fff;
        border-left: 1px solid #e6e6e6;
        border-right: 0;
        box-shadow: -6px 0 18px rgba(0,0,0,.18);
        transform: translateX(104%);
        transition: transform .28s ease;
        z-index: 1001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 50px;
        padding: 0 8px 0 14px;
        position: sticky;
        top: 0;
        z-index: 2;
        background: #f7f7f7;
        border-bottom: 1px solid #ececec;
    }
    .sidebar-title { font-size: 14px; color: #333; font-weight: bold; letter-spacing: 1px; }
    .drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #ececec;
        color: #666;
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
    }
    /* 抽屉顶部当前位置 */
    .drawer-cur {
        display: block;
        padding: 9px 12px 10px;
        background: #fff;
        border-bottom: 1px solid #f0f0f0;
    }
    .drawer-cur .breadcrumb {
        font-size: 12px;
        line-height: 1.6;
        color: #888;
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
        margin: 0;
    }
    .drawer-cur .breadcrumb a { color: #F37021; text-decoration: none; }
    .drawer-cur .breadcrumb .bc-current { color: #555; font-weight: bold; }
    .sidebar-nav { padding: 4px 0 8px; }
    .sidebar-item {
        display: grid;
        grid-template-columns: 20px 1fr;
        grid-template-rows: auto auto;
        column-gap: 9px;
        row-gap: 2px;
        align-items: center;
        position: relative;
        padding: 9px 12px 9px 12px;
        font-size: 14px;
        border-left: 3px solid transparent;
        word-break: keep-all;
    }
    /* 旧规则曾把「控制台」项在手机端隐藏，这里恢复 */
    .sidebar-item[data-key="index"] { display: grid !important; }
    .sidebar-item.active { background: #fff7f0; border-left-color: #F37021; color: #F37021; font-weight: bold; }
    .sidebar-item .menu-icon { width: 18px; height: 18px; margin: 0; grid-column: 1; grid-row: 1 / 3; }
    .sidebar-item .nav-text { grid-column: 2; grid-row: 1; padding-right: 34px; }
    .sidebar-item .nav-desc {
        display: block;
        grid-column: 2;
        grid-row: 2;
        font-size: 11px;
        line-height: 1.35;
        color: #a0a0a0;
        font-weight: normal;
        padding-right: 30px;
    }
    .sidebar-item.active .nav-desc { color: #c98a6a; }
    .sidebar-item .si-badge {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        background: #F37021;
        color: #fff;
        font-size: 10px;
        line-height: 1;
        padding: 3px 5px;
        border-radius: 7px;
        font-weight: normal;
    }

    /* 右侧内容区：整页纵向滚动，表格横向滚动 */
    .main-content { width: 100%; min-width: 0; }
    .content-box { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 760px; }
    .data-table td { word-break: keep-all; }
    .page-titlebar { flex-wrap: wrap; gap: 8px; }
    .page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .page-actions .btn { margin: 0; }
    .form-input, .form-select, .form-textarea { width: 100%; font-size: 16px; box-sizing: border-box; }

    /* 遮罩 */
    .overlay { z-index: 1000; }

    /* 底部快速导航：控制台 / 产品 / 文章 / 菜单 / 退出 */
    .mobile-toolbar {
        display: grid;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        height: 60px;
        grid-template-columns: repeat(5, 1fr);
        background: #fff;
        border-top: 1px solid #e5e5e5;
        box-shadow: 0 -2px 8px rgba(0,0,0,.06);
        padding: 0 2px;
        box-sizing: border-box;
    }
    .mobile-toolbar .mt-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        height: 100%;
        color: #555;
        font-size: 12px;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-toolbar .mt-item .menu-icon {
        width: 19px;
        height: 19px;
        margin: 0;
        color: #666;
    }
    .mobile-toolbar .mt-item.active { color: #F37021; font-weight: bold; }
    .mobile-toolbar .mt-item.active .menu-icon { color: #F37021; }
    .mobile-toolbar .mt-logout { color: #c0392b; }
    .mobile-toolbar .mt-logout .menu-icon { color: #c0392b; }

    /* 页脚在手机端让位给底部导航 */
    .footer { padding-bottom: 8px; }

    /* 列表卡片化（手机端，参照 V7：一条记录一张卡，不再横向滑表格） */
    .m-cards { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
    .m-card {
        background: #fff;
        border: 1px solid #ececec;
        border-radius: 10px;
        padding: 8px 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,.05);
    }
    .m-card .m-row {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 5px 0;
        border-bottom: 1px dashed #f1f1f1;
        font-size: 13px;
        line-height: 1.5;
    }
    .m-card .m-row:last-child { border-bottom: 0; }
    .m-card .m-lead .m-v { font-size: 15px; font-weight: 600; color: #23402a; }
    .m-card .m-k { flex: 0 0 60px; color: #8a8a8a; font-size: 12px; padding-top: 1px; }
    .m-card .m-v { flex: 1 1 auto; min-width: 0; color: #222; word-break: break-all; }
    .m-card .m-v img { max-width: 100%; height: auto; }
    .m-card .m-v input, .m-card .m-v select { width: 100%; max-width: 140px; height: 30px; font-size: 13px; }
    .m-card .m-v .btn, .m-card .m-v button { margin: 2px 4px 2px 0; padding: 4px 10px; font-size: 12px; }
    .content-box { padding-bottom: 78px; }

    /* 登录页手机适配 */
    .login-body { padding-bottom: 0 !important; height: 100dvh; min-height: 100vh; overflow: hidden; }
    .login-wrapper { width: 100%; max-width: 100%; padding: 14px; box-sizing: border-box; }
    .login-box { width: 100%; max-width: 100%; padding: 24px 16px 20px; border-radius: 12px; box-sizing: border-box; }
    .login-title { font-size: 24px; }
    .login-subtitle { font-size: 13px; }
    .login-form .form-input { font-size: 16px; height: 44px; }
    .captcha-row { gap: 8px; }
    .captcha-row img { height: 44px; width: auto; }
    .login-btn, .login-submit { width: 100%; height: 46px; font-size: 16px; }
}

/* ===== v7（2026-11-14）：顶部「菜单」按钮移最右；≤1000px 收起横排菜单，改由按钮弹下拉 ===== */
.mainnav{position:relative}
.mainnav-inner .menu-toggle{margin-left:auto;margin-right:0}
.navdrop{
  position:absolute;top:100%;right:16px;z-index:1500;
  width:240px;max-height:70vh;overflow:auto;
  background:#fff;border-radius:6px;padding:6px 0;
  box-shadow:0 10px 28px rgba(0,0,0,.18);
  display:none;
}
.navdrop.open{display:block}
.navdrop-head{padding:8px 16px 6px;font-size:12px;color:#999;letter-spacing:.5px}
.navdrop-item{display:flex;align-items:center;gap:8px;padding:11px 16px;color:#333;font-size:14px;text-decoration:none;white-space:nowrap}
.navdrop-item .menu-icon{width:16px;height:16px;flex:0 0 auto}
.navdrop-item:hover{background:#f4faf4;color:#3b8132}
.navdrop-item.active{background:#eaf4e9;color:#3b8132;font-weight:600}
@media (min-width:769px) and (max-width:1000px){
  .mainnav-item{display:none!important}
  .mainnav-inner{padding-right:12px}
  .menu-toggle{display:inline-flex!important}
}
@media (max-width:768px){
  .navdrop{display:none!important}
}
/* v7b */
.mainnav{position:sticky}
.navdrop{top:100%;right:16px}
/* v7c */
.mainnav-inner .menu-toggle{white-space:nowrap;flex:0 0 auto;line-height:1;
  writing-mode:horizontal-tb;word-break:keep-all}
/* v7d */
@media (max-width:1500px){
  .mainnav-inner{padding:0 14px}
  .mainnav-item{padding:0 12px;font-size:13px}
  .mainnav-item .menu-icon{width:15px;height:15px}
}

/* ===== v11（2026-11-14）：顶栏并入绿条 ===== */
.mainnav-inner{position:relative}
.mainnav-inner .nav-home{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;
  padding:0 14px;height:100%;color:#fff;font-weight:700;font-size:13.5px;
  text-decoration:none;white-space:nowrap;border-right:1px solid rgba(255,255,255,.24)}
.mainnav-inner .nav-home:hover{background:rgba(255,255,255,.13)}
.mainnav-inner .nav-home.active{background:rgba(255,255,255,.16)}
.mainnav-inner .nav-home .menu-icon{width:16px;height:16px}
.nav-aux{display:inline-flex;align-items:center;gap:2px;margin-left:auto;
  padding-right:2px;white-space:nowrap;flex:0 0 auto}
.nav-aux-item{display:inline-flex;align-items:center;gap:5px;padding:0 8px;height:100%;
  color:rgba(255,255,255,.92);font-size:12.5px;text-decoration:none;white-space:nowrap}
.nav-aux-item:hover{color:#fff;background:rgba(255,255,255,.15)}
.nav-aux-item .menu-icon{width:15px;height:15px}
.nav-aux-user{display:inline-flex;align-items:center;height:26px;padding:0 10px;margin-left:5px;
  border-radius:13px;background:rgba(255,255,255,.16);color:#fff;
  font-size:12.5px;font-weight:700;white-space:nowrap}
.mainnav-inner .menu-toggle{margin-left:0;margin-right:2px}
/* 窄一档：辅助入口只留图标 */
@media (max-width:1560px){
  .mainnav-item{padding:0 10px}
  .nav-home{padding:0 11px;font-size:13px}
  .nav-aux-item .aux-text{display:none}
  .nav-aux-item{padding:0 7px}
}
/* 1000 以下横排收起后空间变宽，辅助入口恢复文字 */
@media (max-width:1000px){
  .nav-aux-item .aux-text{display:inline}
  .nav-aux-item{padding:0 9px}
}
/* 手机：辅助入口收进下拉，绿条只留三横与菜单 */
@media (max-width:768px){
  .nav-aux{display:none}
  .nav-home{border-right:0;padding:0 10px}
}

/* ===== v12（2026-11-14）：绿条密度重排，菜单按钮必须留在视口内 ===== */
.mainnav-item{padding:0 12px;font-size:13px}
.mainnav-item .menu-icon{width:15px;height:15px}
.nav-aux-item .aux-text{display:none}
.nav-aux-item{padding:0 7px}
/* 超宽屏才给辅助入口显示文字 */
@media (min-width:1700px){
  .nav-aux-item .aux-text{display:inline}
  .nav-aux-item{padding:0 8px}
}
/* 1440 及以下：横排缩短 */
@media (max-width:1500px){
  .mainnav-item{padding:0 9px;font-size:12.5px}
  .mainnav-item .menu-icon{width:14px;height:14px}
  .nav-home{padding:0 10px;font-size:12.5px}
}
/* 1000 以下横排收起，辅助入口恢复文字 */
@media (max-width:1000px){
  .nav-aux-item .aux-text{display:inline}
  .nav-aux-item{padding:0 9px}
}

/* ===== v13（2026-11-14）：菜单按钮吸右固定 ===== */
@media (max-width:1500px){
  .mainnav-item{padding:0 8px}
}
@media (max-width:1320px){
  .nav-aux{position:sticky;right:74px;background:#2d6626;z-index:3;
    box-shadow:-10px 0 10px -6px rgba(0,0,0,.18)}
  .nav-aux-item{padding:0 6px}
  .mainnav-inner .menu-toggle{position:sticky;right:0;background:#2d6626;z-index:4}
}

/* ===== v14（2026-11-14）：辅助入口用短文字，1440 挡位去掉图标 ===== */
.nav-aux-item .aux-text{display:inline}
@media (max-width:1560px){
  .nav-aux-item .menu-icon{display:none}
  .nav-aux-item{padding:0 6px;font-size:12px}
  .mainnav-item{padding:0 9px;font-size:12.5px}
  .mainnav-item .menu-icon{width:14px;height:14px}
}

/* ===== v15（2026-11-14）：1700 以下统一紧凑挡 ===== */
@media (max-width:1700px){
  .mainnav-item{padding:0 8px;font-size:12.5px}
  .mainnav-item .menu-icon{width:14px;height:14px}
  .nav-home{padding:0 10px;font-size:12.5px}
  .nav-aux-item{padding:0 5px;font-size:12px}
  .nav-aux-item .menu-icon{display:none}
  .nav-aux-user{height:24px;padding:0 8px;font-size:12px}
}

/* ===== v16（2026-11-14）：去重控制台 + 辅助入口分隔 ===== */
.mainnav-item[data-key="index"]{display:none}
.nav-aux{border-left:1px solid rgba(255,255,255,.22);padding-left:6px;margin-left:auto}

/* ===== v19（2026-11-14）：菜单下拉改通栏竖排 ===== */
.navdrop{left:0 !important;right:0 !important;width:auto !important;max-width:100vw !important;
  border-radius:0 !important;max-height:calc(100vh - 42px);overflow-y:auto;-webkit-overflow-scrolling:touch;
  box-shadow:0 8px 24px rgba(0,0,0,.18);padding:0 0 10px}
.navdrop-head{padding:14px 18px 8px;font-size:12px;color:#8b9089;letter-spacing:.04em;background:#fafbfa}
.navdrop-item{display:flex;align-items:center;gap:10px;padding:13px 18px;font-size:14px;
  border-bottom:1px solid #f1f3f1;color:#333;text-decoration:none;transition:background .15s}
.navdrop-item .menu-icon{width:16px;height:16px;flex:none;opacity:.75}
.navdrop-item:hover{background:#f7faf6}
.navdrop-item.active{background:#eff7ec;color:#2d6626;font-weight:600}
.navdrop-item.active .menu-icon{opacity:1;stroke:#3b8132}
.navdrop-sep{height:1px;background:#eceeec;margin:4px 0 0}

/* ===== v23（2026-11-15）：菜单下拉贴右屏 300px ===== */
.navdrop{left:auto !important;right:0 !important;width:300px !important;max-width:300px !important;
  border-radius:0 0 0 10px !important;box-shadow:-6px 8px 24px rgba(0,0,0,.18) !important}
@media (max-width: 340px){ .navdrop{width:100vw !important;max-width:100vw !important;border-radius:0 !important} }
