/*
 *
 *  移动端适配
 *
*/
html {
    font-size: 17px;
}

@media screen and (max-width: 1024px) {
    html {
        font-size: calc(13px + 0.2vw);
    }

    body {
        background-size: cover;
        font-size: 1rem;
    }

    .yynx_main {
        width: 95% !important;
        max-width: 1020px;
        height: auto;
        min-height: 420px;
        position: absolute;
        top: 45%;
        margin-top: -200px;
        left: 50%;
        margin-left: 0;
        transform: translateX(-50%);
        display: flex;
        flex-wrap: wrap;
    }

    /* 主标题 */
    .yynx_main h1 {
        width: 100%;
        font-size: 5vw !important;
        padding-bottom: 5px;
        margin: 5px 0;
        white-space: nowrap;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .yynx_main h1 img {
        height: 6vw !important;
        min-height: 20px;
        max-height: 35px;
        width: auto !important;
        vertical-align: middle;
        margin-right: 5px;
    }

    .yynx_left {
        width: 60% !important;
        height: 340px;
        border-bottom-left-radius: 10px;
        border-top-left-radius: 10px;
        overflow: hidden;
    }

    /* 通知公告标题  */
    .yynx_left h3 {
        font-size: 4vw !important;
        text-indent: 10px;
        margin-top: 10px;
        margin-bottom: 5px;
    }

    .yynx_right {
        width: 40% !important;
        height: 340px;
        border-bottom-right-radius: 10px;
        border-top-right-radius: 10px;
    }

    /* 用户登录标题 */
    .yynx_right h3 {
        font-size: 4.5vw !important;
        padding-top: 10px;
        padding-bottom: 5px;
        margin: 5px 0;
    }

    /* 公告区域  */
    .tlqd_my {
        width: 98%;
        height: 260px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .tlqd_list {
        width: 100%;
        font-size: 2.5vw;
        line-height: 1.3;
    }

    .tlqd_list table {
        width: 100% !important;
        table-layout: fixed;
    }

    .tlqd_list td {
        font-size: 2.5vw;
        padding: 2px 2px;
        vertical-align: middle;
    }

    .tlqd_list td:first-child {
        width: 75%;
        word-break: break-word;
        white-space: normal;
        line-height: 1.3;
    }

    .tlqd_list td:last-child {
        width: 25%;
        text-align: right;
        white-space: nowrap;
        font-size: 2.2vw;
    }

    .tlqd_list a {
        color: green;
        text-decoration: none;
        display: inline;
        word-break: break-word;
    }

    .tlqd_list a font {
        font-size: 2.5vw !important;
    }

    .tlqd_list td:first-child span {
        font-size: 2.2vw;
        margin-right: 2px;
    }

    /* 登录表单 */
    .hanx {
        border-bottom: 1px solid #ddd;
    }

    .login_tp, .login_tp_num {
        width: 90%;
        display: flex;
        align-items: center;
        margin-top: 8px;
        margin-bottom: 8px;
    }

    .login_tp input, .login_tp_num input {
        width: calc(100% - 40px);
        font-size: 2.8vw;
        flex: 1;
        text-indent: 8px;
    }

    .login_tp input::placeholder,
    .login_tp_num input::placeholder {
        font-size: clamp(10px, 2vw, 14px) !important;
    }

    .login_tp_num input {
        width: calc(100% - 70px);
    }

    .login_tp img {
        width: 5vw !important;
        min-width: 16px;
        max-width: 21px;
        height: auto !important;
        margin-top: 0;
        margin-right: 5px;
    }

    .login_tp_num img {
        width: 14vw !important;
        min-width: 45px;
        max-width: 60px;
        height: auto !important;
        max-height: 22px;
        margin-top: 0;
        margin-right: 3px;
        cursor: pointer;
    }

    /* 登录按钮 */
    .ljdl_ks {
        width: 90%;
        height: 6vw;
        min-height: 28px;
        max-height: 34px;
        line-height: 6vw;
        font-size: 3.5vw;
        border-radius: 20px;
        margin-top: 12px;
    }

    .ljdl_ks a {
        line-height: 6vw;
        min-height: 28px;
        max-height: 34px;
    }

    #falg {
        font-size: 2.2vw;
        height: auto;
        min-height: 16px;
        margin: 2px 0;
    }

    /* 注册/忘记密码  */
    .yynx_right div[style*="text-align:center"] {
        margin-top: 8px !important;
        height: auto;
    }

    .yynx_right a font {
        font-size: 2.8vw !important;
    }

    .footer_db {
        font-size: 2.5vw;
        height: 25px;
        line-height: 25px;
    }

    /* 移动端点击优化 */
    #login {
        min-height: 100vh;
        background-size: cover;
        background-position: center center;
    }

    .login_tp input,
    .login_tp_num input,
    .ljdl_ks a,
    .tlqd_list a,
    .yynx_right a {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }


    /* ========== 响应式布局 - 完全动态计算 ========== */

    /* 展开状态：宽度 = 屏幕宽度的 20%，最小 70px，最大 220px */
    body.fixed-sidebar .navbar-static-side,
    body.canvas-menu .navbar-static-side {
        position: fixed;
        width: clamp(70px, 20vw, 220px) !important;
        z-index: 2001;
        height: 100%;
    }

    #page-wrapper {
        padding: 0 15px;
        position: inherit;
        margin: 0 0 0 clamp(70px, 20vw, 220px) !important;
    }

    /* 收起状态：宽度 = 屏幕宽度的 6%，最小 45px，最大 70px */
    body.fixed-sidebar.mini-navbar .navbar-static-side {
        width: clamp(45px, 6vw, 70px) !important;
    }

    body.fixed-sidebar.mini-navbar #page-wrapper {
        margin: 0 0 0 clamp(45px, 6vw, 70px) !important;
    }

    /* 过渡动画 */
    .navbar-static-side,
    #page-wrapper {
        -webkit-transition: width 0.3s ease, margin 0.3s ease !important;
        transition: width 0.3s ease, margin 0.3s ease !important;
    }

    /* ========== 字体响应式设置、根据屏幕大小自适应 ========== */
    /* 根元素字体大小：屏幕宽度的 0.8%，最小 11px，最大 15px */
    html {
        font-size: clamp(11px, 0.8vw, 15px) !important;
    }

    body {
        font-size: 1rem !important;
    }

    /* 标题字体 */
    h1 { font-size: clamp(13px, 2.5vw, 31px) !important; }
    h2 { font-size: clamp(12px, 2.0vw, 25px) !important; }
    h3 { font-size: clamp(11px, 1.6vw, 19px) !important; }
    h4 { font-size: clamp(11px, 1.4vw, 17px) !important; }
    h5 { font-size: clamp(10px, 1.2vw, 15px) !important; }
    h6 { font-size: clamp(10px, 1.0vw, 13px) !important; }

    /* ========== 伦理系统标题 ========== */
    .nav-header .font-bold {
        font-size: clamp(12px, 1.2vw, 19px) !important;
    }

    /* 导航菜单 */
    .nav > li > a {
        font-size: clamp(11px, 1.0vw, 16px) !important;
    }

    .nav-second-level li a {
        font-size: clamp(10px, 0.9vw, 15px) !important;
    }

    .nav-third-level li a {
        font-size: clamp(10px, 0.8vw, 14px) !important;
    }

    /* ========== 菜单缩进响应式设置 ========== */
    /* 一级菜单缩进：屏幕宽度的 1.8%，最小 12px，最大 25px */
    .nav > li > a {
        padding-left: clamp(12px, 1.8vw, 25px) !important;
        padding-right: clamp(10px, 1.5vw, 20px) !important;
    }

    /* 二级菜单缩进：屏幕宽度的 3.8%，最小 28px，最大 52px */
    .nav-second-level li a {
        padding-left: clamp(28px, 3.8vw, 52px) !important;
        padding-right: clamp(8px, 1.2vw, 15px) !important;
    }

    /* 三级菜单缩进：屏幕宽度的 4.5%，最小 35px，最大 62px */
    .nav-third-level li a {
        padding-left: clamp(35px, 4.5vw, 62px) !important;
        padding-right: clamp(8px, 1.2vw, 15px) !important;
        white-space: nowrap !important;
        display: block !important;
        overflow: visible !important;
    }


    /* 顶部导航 */
    .navbar-top-links li a {
        font-size: clamp(11px, 1.0vw, 16px) !important;
    }

    /* 面板 */
    .panel-heading {
        font-size: clamp(11px, 1.0vw, 16px) !important;
    }

    .panel-body {
        font-size: clamp(10px, 0.9vw, 15px) !important;
    }

    /* Tab 标签响应式宽度 */
    .nav-tabs > li > a {
        padding-left: clamp(10px, 1.5vw, 25px) !important;
        padding-right: clamp(10px, 1.5vw, 20px) !important;
        font-size: clamp(13px, 1.2vw, 15px) !important;
    }

    /* 表格 */
    .table {
        font-size: clamp(9px, 0.9vw, 15px) !important;
    }

    .table > thead > tr > th {
        font-size: clamp(9px, 0.9vw, 15px) !important;
    }

    .table > thead > tr > th,
    .table > tbody > tr > td {
        padding: 3px 4px !important;
        line-height: 1.15 !important;
    }

    /* 按钮 */
    .btn {
        font-size: clamp(10px, 0.9vw, 15px) !important;
    }

    .chosen-select {
        width: clamp(50px, 100%, 300px) !important;
    }

    /* 下拉菜单 */
    .dropdown-menu > li > a {
        font-size: clamp(10px, 0.85vw, 14px) !important;
    }

    /* 标签和徽章 */
    .label, .badge {
        font-size: clamp(9px, 0.8vw, 13px) !important;
    }

    /* 表单 */
    .form-control {
        font-size: clamp(9px, 0.9vw, 15px) !important;
        max-width: 100% !important;
        height: 26px !important;
        padding: 2px 6px !important;
        display: inline-block;
    }

    /* 待办事项 */
    .alert {
        font-size: clamp(10px, 0.9vw, 15px) !important;
    }

    .alert-link {
        font-size: clamp(10px, 0.9vw, 15px) !important;
    }

    /* layui 标签页 */
    .layui-tab-title li {
        font-size: clamp(11px, 1.0vw, 16px) !important;
    }

    /* logo文字 */
    .logo-element {
        font-size: clamp(12px, 1.3vw, 19px) !important;
    }

    /* 图表文字 */
    text, tspan {
        font-size: clamp(9px, 0.8vw, 14px) !important;
    }

    .legendLabel {
        font-size: clamp(9px, 0.8vw, 13px) !important;
    }

    /* 模态框 */
    .modal-title {
        font-size: clamp(13px, 1.6vw, 21px) !important;
    }

    .modal-body {
        font-size: clamp(11px, 1.0vw, 16px) !important;
    }

    /* 箭头图标 */
    .fa.arrow {
        font-size: clamp(10px, 0.8vw, 14px) !important;
    }

    /* 按钮 */
    .minimalize-styl-2 {
        font-size: clamp(11px, 0.9vw, 16px) !important;
    }

    /* 待办事项标题栏  */
    .panel-heading {
        position: relative;
    }

    .panel-heading > div {
        padding-right: 100px !important;  /* 为右侧按钮预留空间 */
    }

    .panel-heading .pull-right {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        float: none !important;
        margin: 0 !important;
    }

    #jqGridHeadDiv .form-group {
        display: inline-block !important;
        margin-right: 10px !important;
        margin-bottom: 8px !important;
    }

    .scrollable-container {
        margin-top: -24px !important;
    }

    .scrollable-container,
    .scrollable-inner {
        height: 100%;
        width: 100%;
        overflow: hidden;
    }
}

@media screen and (min-width: 600px) and (max-width: 1024px) {
    .yynx_main h1 {
        font-size: 29px !important;
    }
    .yynx_main h1 img {
        height: 33px !important;
    }
    .yynx_left h3 {
        font-size: 19px !important;
        margin-top: 12px;
    }
    .yynx_right h3 {
        font-size: 21px !important;
        padding-top: 12px;
    }
    .tlqd_list td,
    .tlqd_list a font {
        font-size: 14px !important;
    }
    .tlqd_list td:last-child {
        font-size: 12px !important;
    }
    .login_tp input,
    .login_tp_num input {
        font-size: 15px !important;
    }
    .login_tp, .login_tp_num {
        margin-top: 10px;
        margin-bottom: 10px;
    }
    .login_tp img {
        width: 21px !important;
    }
    .login_tp_num img {
        width: 56px !important;
    }
    .ljdl_ks {
        font-size: 17px !important;
        margin-top: 15px;
    }
    .yynx_right a font {
        font-size: 15px !important;
    }
}

@media screen and (max-width: 400px) {
    .yynx_main {
        width: 98% !important;
        max-width: 380px;
        min-height: 400px;
        margin-top: -190px;
    }

    .yynx_main h1 {
        font-size: 17px !important;
        padding-bottom: 3px;
    }

    .yynx_main h1 img {
        height: 21px !important;
    }

    .yynx_left {
        width: 58% !important;
        height: 320px;
    }

    .yynx_right {
        width: 42% !important;
        height: 320px;
    }

    .yynx_left h3 {
        font-size: 14px !important;
        margin-top: 8px;
        margin-bottom: 3px;
    }

    .yynx_right h3 {
        font-size: 15px !important;
        padding-top: 8px;
        padding-bottom: 3px;
    }

    .tlqd_my {
        height: 245px;
    }

    .tlqd_list td,
    .tlqd_list a font {
        font-size: 11px !important;
    }

    .tlqd_list td:last-child {
        font-size: 10px !important;
    }

    .login_tp, .login_tp_num {
        margin-top: 6px;
        margin-bottom: 6px;
    }

    .login_tp input,
    .login_tp_num input {
        font-size: 12px !important;
        text-indent: 5px;
    }

    .login_tp img {
        width: 17px !important;
    }

    .login_tp_num img {
        width: 46px !important;
        height: 20px !important;
    }

    .ljdl_ks {
        font-size: 14px !important;
        margin-top: 10px;
        height: 28px;
        line-height: 28px;
    }

    .yynx_right a font {
        font-size: 12px !important;
    }

    .yynx_right div[style*="text-align:center"] {
        margin-top: 6px !important;
    }
}

@media screen and (max-width: 320px) {
    .yynx_main h1 {
        font-size: 15px !important;
    }
    .yynx_main h1 img {
        height: 19px !important;
    }
    .yynx_left h3 {
        font-size: 13px !important;
    }
    .yynx_right h3 {
        font-size: 14px !important;
    }
    .tlqd_list td,
    .tlqd_list a font {
        font-size: 10px !important;
    }
    .login_tp img {
        width: 15px !important;
    }
    .login_tp_num img {
        width: 41px !important;
        height: 18px !important;
    }
    .ljdl_ks {
        margin-top: 8px;
    }
}

@media (max-width: 768px) {
    .panel-heading > div {
        padding-right: 0 !important;
        padding-bottom: 30px !important;
    }

    .panel-heading .pull-right {
        position: absolute !important;
        right: 15px !important;
        top: auto !important;
        bottom: 8px !important;
        transform: none !important;
    }
}

.pull-right a {
    white-space: nowrap !important;
}

/* 检索框响应式*/
#jqGridHeadDiv .form-control {
    width: clamp(50px, 10vw, 100px) !important;
}

.tabs-vertical-margin {
    margin-top: 5px;
}

.tabs-pagebody-margin {
    margin-top: 5px;
}

.tabs-meetingReview-margin{
    margin-top: 10px;
}

@media screen and (max-width: 768px) {

    /* 横向滚动 */
    .jqGrid_wrapper {
        overflow-x: auto !important;
        overflow-y: visible !important;
        position: relative;
        width: 100%;
    }

    .table-responsive {
        overflow-x: auto !important;
    }

    /* jqGrid整体宽度根据内容自适应，宽度不够出现滚动条 */
    .ui-jqgrid {
        width: max-content !important;
        min-width: 100%;
    }

    .ui-jqgrid-view,
    .ui-jqgrid-hdiv,
    .ui-jqgrid-bdiv {
        width: auto !important;
    }

    .ui-jqgrid-htable,
    .ui-jqgrid-btable {
        width: auto !important;
        table-layout: auto !important;
    }

    /* 单元格内容 */
    .ui-jqgrid tr.jqgrow td {
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        height: auto !important;
        line-height: 1.4;
        padding: 6px 8px !important;
        font-size: clamp(10px, 1.2vw, 12px) !important;
    }

    /* 表头标题*/
    .ui-jqgrid .ui-jqgrid-htable th {
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        height: auto !important;
        line-height: 1.4;
        padding: 8px 5px;
        vertical-align: middle;
        font-weight: bold;
        font-size: clamp(11px, 1.2vw, 14px) !important;
    }

    .ui-jqgrid-bdiv {
        overflow-x: auto !important;
        overflow-y: auto !important;
        box-sizing: border-box !important;
    }

    .jqGrid_wrapper,
    .ui-jqgrid-view,
    .ui-jqgrid-hdiv {
        box-sizing: border-box !important;
    }

    /*滚动条样式*/
    ::-webkit-scrollbar {
        height: 5px;
        width: 5px;
    }

    ::-webkit-scrollbar-track {
        background: #e8e8e8;
        border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb {
        background: #c0c0c0;
        border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #999999;
    }

    .ui-jqgrid-bdiv::-webkit-scrollbar {
        height: 5px;
        width: 5px;
    }

    .ui-jqgrid-bdiv::-webkit-scrollbar-thumb {
        background: #bbbbbb;
        border-radius: 4px;
    }

    .ui-jqgrid-bdiv::-webkit-scrollbar-thumb:hover {
        background: #888888;
    }

    /* 滚动条 */
    * {
        scrollbar-width: thin;
        scrollbar-color: #c0c0c0 #e8e8e8;
    }

    /* 分页区域移动端调整 */
    .ui-jqgrid-bdiv {
        max-height: calc(100vh - 350px) !important;
    }

    .ui-jqgrid-pager {
        height: auto !important;           /* 高度自动适应换行 */
        min-height: 55px !important;       /* 保证最小高度 */
        overflow: visible !important;
    }

    .ui-paging-info,
    .ui-pg-table {
        font-size: 11px !important;
    }

    .ui-pg-selbox,
    .ui-pg-input {
        font-size: 11px !important;
        height: 24px !important;
    }

    /* 弹窗容器*/
    .dialogPageContent {
        display: flex !important;
        flex-direction: column !important;
        height: 70vh !important;  /* 固定高度为70% */
        max-height: 550px !important;
        min-height: 400px !important;
        overflow: hidden !important;
    }

    /* 中间内容区域 - 可滚动 */
    .dialogPageBody {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: auto !important;
        padding: 15px !important;
        min-height: 0 !important;
    }

    /* 底部按钮 - 固定，不滚动 */
    .dialogPageFooter {
        flex-shrink: 0 !important;
        padding: 12px 15px !important;
        text-align: center !important;
        border-top: 1px solid #e7eaec !important;
        background: #fff !important;
    }

    /* 底部按钮间距 */
    .dialogPageFooter .btn {
        margin: 0 8px !important;
    }

    #mainFrame {
        transition: none !important;
        -webkit-transition: none !important;
    }


    /* 人员列表 - 在上方，纵向，限制高度 */
    .col-xs-3,
    .col-sm-3,
    .col-md-3 {
        width: 100% !important;
        float: none !important;
        display: block !important;
        max-height: 100px !important;
        overflow-y: auto !important;
        margin-bottom: 15px !important;
        background: #f5f5f5 !important;
        border-radius: 8px !important;
        padding: 8px !important;
    }

    /* 人员纵向排列 */
    .jstree-container-ul {
        display: block !important;
    }
    .jstree-node {
        display: block !important;
    }
    .jstree-anchor {
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    /* 投票内容 - 在下方 */
    .col-xs-9,
    .col-sm-9,
    .col-md-9 {
        width: 100% !important;
        float: none !important;
        display: block !important;
        overflow: visible !important;
    }


    /* 按钮区域 */
    .tabPageFooter {
        flex-shrink: 0 !important;
        position: relative !important;
        display: block !important;
        background: #fff !important;
        padding: 12px 15px !important;
        text-align: center !important;
        border-top: 1px solid #e7eaec !important;
        z-index: 10 !important;
    }

    /* 图表容器宽度自适应 */
    #irbTypeWorkloads,
    #reviewNumberBar {
        width: 100% !important;
        height: auto !important;
    }

    /* 自适应宽度 */
    #irbTypeWorkloads svg,
    #reviewNumberBar svg {
        width: 100% !important;
        height: auto !important;
    }

    .row[style*="height"] {
        display: flex !important;
        flex-direction: column !important;
    }

    .row[style*="height"] .col-xs-4,
    .row[style*="height"] .col-sm-4,
    .row[style*="height"] .col-md-3,
    .row[style*="height"] .col-xs-3,
    .row[style*="height"] .col-sm-3,
    .row[style*="height"] .col-md-4,
    .row[style*="height"] .col-xs-8,
    .row[style*="height"] .col-sm-8,
    .row[style*="height"] .col-md-8 {
        width: 100% !important;
        flex: 1;
        margin-bottom: 10px;
    }

    /* 左侧文件列表区域 */
    .row[style*="height"] .col-xs-4 {
        flex: 0 0 45%;
        min-height: 200px;
        overflow: auto;
    }

    .row[style*="height"] .col-xs-3 {
        flex: 0 0 45%;
        min-height: 200px;
        overflow: auto;
    }

    /* 右侧预览区域 */
    .row[style*="height"] .col-xs-8 {
        flex: 0 0 45%;
        min-height: 200px;
        overflow: auto;
    }

    /* 横向滚动容器 */
    .scrollable-container {
        overflow-x: auto;
        overflow-y: visible;
    }

    .scrollable-inner {
        min-width: 768px;
    }

    #chartCol {
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px;
    }
    .col-xs-6:last-child {
        width: 100% !important;
        float: none !important;
    }
    #projectPie svg {
        width: 100%;
        height: auto;
    }

    .tabs-vertical-margin {
        margin-top: 30px;
    }

    .tabs-pagebody-margin {
        margin-top: 30px;
    }

    .tabs-meeting-margin{
        margin-top: 30px;
    }

    .tabs-meetingReview-margin{
        margin-top: -14px;
    }

    .tabs-committee-margin{
        margin-top: 24px;
    }

    .tabs-application-margin {
        margin-top: 0px;
    }
}






