﻿/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f2f2f2;
    overflow: hidden;
}

/* 布局样式 */
.layui-layout-admin .layui-body {
    bottom: 0;
    padding: 0;
}

/* 卡片样式 */
.layui-card {
    margin: 15px;
    border-radius: 2px;
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.layui-card-header {
    height: 50px;
    line-height: 50px;
    padding: 0 15px;
    border-bottom: 1px solid #f6f6f6;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.layui-card-body {
    padding: 15px;
}

/* 表单样式 */
.layui-form-item {
    margin-bottom: 15px;
}

.layui-form-label {
    width: auto;
    padding: 9px 5px 9px 15px;
}

.layui-input-block {
    margin-left: 100px;
}

.layui-input-inline {
    margin-right: 10px;
}

/* 表格样式 */
.layui-table {
    margin-top: 15px;
}

    .layui-table th {
        font-weight: bold;
        background-color: #f8f8f8;
    }

    .layui-table td, .layui-table th {
        padding: 9px 15px;
    }

/* 标签页样式 */
.layui-tab {
    margin: 0;
}

.layui-tab-title {
    background-color: #fff;
    border-bottom: 1px solid #f6f6f6;
}

    .layui-tab-title li {
        min-width: 100px;
        text-align: center;
    }

.layui-tab-content {
    margin-top:0;
    margin-left:0;
    padding: 0 !important; /* 移除内边距 */
    height: calc(100% - 40px) !important; /* 减去Tab标题栏高度 */
}

    .layui-tab-content .layui-tab-item {
        height: 100% !important;
        padding: 0 !important;
    }

    .layui-tab-content iframe {
        width: 100% !important;
        height: 100% !important;
        border: none;
        display: block;
    }

/* iframe样式 */
.layadmin-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 按钮样式 */
.layui-btn {
    border-radius: 2px;
}

.layui-btn-sm {
    height: 30px;
    line-height: 30px;
    padding: 0 10px;
    font-size: 12px;
}

/* 徽章样式 */
.layui-badge {
    padding: 0 6px;
    border-radius: 2px;
}

/* 侧边栏样式 */
.layui-side {
    width: 220px;
    top: 60px;
}

.layui-nav-tree {
    width: 220px;
    padding: 10px 0;
}

.layui-nav-child {
    padding: 0 !important;
}

    .layui-nav-child a {
        height: 40px;
        line-height: 40px;
        padding-left: 45px !important;
    }

/* 顶部导航样式 */
.layui-header {
    background-color: #23262E;
}

.layui-logo {
    width: 220px;
    color: #fff;
    font-size: 18px;
    text-align: center;
}

.layui-nav-img {
    width: 30px;
    height: 30px;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .layui-side {
        left: -220px;
    }

    .layui-body {
        left: 0;
    }

    .layui-layout-admin .layui-show-md {
        display: none;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* 状态颜色 */
.text-success {
    color: #009688;
}

.text-warning {
    color: #FFB800;
}

.text-danger {
    color: #FF5722;
}

.text-info {
    color: #2F4056;
}

/* 工具类 */
.pull-left {
    float: left;
}

.pull-right {
    float: right;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

/* 登录页样式 */
.login-main {
    width: 350px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
}

    .login-main header {
        font-size: 24px;
        text-align: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
    }

.login-btn {
    width: 100%;
    margin-top: 20px;
}

/* 自定义弹窗样式 */
.layui-layer-title {
    font-weight: bold;
    background-color: #f8f8f8 !important;
    border-bottom: 1px solid #f6f6f6 !important;
}

/* 表单验证错误提示 */
.layui-form-danger + .layui-form-msg {
    color: #FF5722;
}

/* 修复菜单项点击区域 */
.layui-nav-item {
    position: relative;
}

    .layui-nav-item > a {
        padding-right: 30px;
    }

/* 确保子菜单正常显示 */
.layui-nav-child {
    display: none;
    padding: 0;
}

.layui-nav-itemed > .layui-nav-child {
    display: block;
}

/* 菜单图标间距 */
.layui-nav-tree .layui-icon {
    margin-right: 8px;
}

@keyframes watermark-scroll {
    0% {
        transform: rotate(-45deg) translateX(-20%);
    }

    100% {
        transform: rotate(-45deg) translateX(20%);
    }
}

/* 水印容器 */
#watermark-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* 水印项目 - 统一类名 */
.watermark-item {
    position: absolute;
    display: inline-block;
    min-width: 300px;
    min-height: 50px;
    transform: rotate(-45deg);
    transform-origin: 0 0;
    font-size: 24px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.01);
    /*animation: watermark-scroll 60s linear infinite;*/
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .layui-layout-admin .layui-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 50px !important;
    }

    .layui-tab-content,
    .layui-tab-item {
        min-width: 100% !important;
        width: 100% !important;
    }

    /* 修复表格和卡片在移动端的显示 */
    .layui-card-body {
        overflow-x: auto;
    }

    /* 表单元素在移动端的适配 */
    .layui-form-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .layui-inline {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .layui-input-inline {
        width: 100% !important;
    }

    /* 横向滚动容器 */
    .mobile-scroll-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 确保内容足够宽以产生滚动 */
    .layout-container,
    #planForm {
        min-width: 768px;
    }

        .layui-tab-item iframe {
            min-width: 100% !important;
            width: 100% !important;
            overflow-x: auto !important;
        }

        .layui-layout-admin .layui-header .mobile-menu-btn {
            display: inline-block !important;
            position: fixed;
            top: 10px;
            left: 10px;
            z-index: 1001;
            background: rgba(0,0,0,0.5);
            color: white;
            border: none;
            border-radius: 4px;
            padding: 5px 10px;
        }

    .layui-logo {
        margin-left: 40px !important;
    }

    .layui-layout-admin .layui-side {
        position: fixed;
        left: -250px;
        top: 50px;
        bottom: 0;
        width: 250px !important;
        z-index: 999;
        transition: left 0.3s ease;
    }

        .layui-layout-admin .layui-side.layui-side-show {
            left: 0;
        }

    .layui-layout-admin .layui-body {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        bottom: 50px;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .layui-layout-admin .layui-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 50px;
        z-index: 1000;
        text-align: center;
        line-height: 50px;
    }

    .layui-logo {
        font-size: 16px !important;
        padding: 0 15px !important;
    }

    .layui-nav .layui-nav-item {
        line-height: 50px;
    }

    

    /* 标签页适配 */
    .layui-tab {
        margin: 0 !important;
    }

    .layui-tab-title {
        overflow-x: auto;
        white-space: nowrap;
    }

    .layui-tab-item iframe {
        height: calc(100vh - 100px) !important;
    }

    /* 水印隐藏 */
    #watermark-container {
        /*display: none;*/
    }
}

/* 桌面端样式 */
@media screen and (min-width: 769px) {
    .layui-layout-admin .layui-header .mobile-menu-btn {
        display: none !important;
    }
}

/* 通用样式 */
body {
    overflow-x: hidden;
}

.layui-body {
    overflow: auto;
}

    /* 移动端滚动条优化 */
    .layui-body::-webkit-scrollbar {
        width: 5px;
    }

    .layui-body::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }

/* 修复桌面端显示问题 */
.layui-header .mobile-menu-btn {
    display: none !important;
}
/* 在自定义CSS文件中添加 */
.layui-input,
.layui-select,
.layui-textarea,
.layui-table,
.layui-table td,
.layui-table th,
.layui-btn {
    border-color: #B3D8FF !important; /* 改为橙色边框示例 */
}