/* 手机端响应式修复样式 */

/* 基础滚动设置 */
html, body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 登录页面修复 */
@media (max-width: 768px) {
  .signin {
    position: static !important;
    width: 90% !important;
    margin: 50px auto !important;
    height: auto !important;
    max-width: 400px;
  }
  
  .form-signin {
    position: static !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    box-sizing: border-box;
  }
  
  .form-signin .form-control {
    height: 44px !important;
    padding: 8px 16px !important;
  }
  
  .form-signin button {
    height: 44px !important;
    font-size: 16px !important;
  }
}

/* 表格响应式修复 - 为手机提供横向滚动 */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* 按钮修复 - 触摸友好 */
.btn {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

/* 导航栏修复 */
.navbar-nav {
  margin: 0;
}

/* 输入框修复 */
input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
  font-size: 16px;
}

/* Bootstrap 容器和网格修复 */
@media (max-width: 768px) {
  .container,
  .container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
  }
  
  .row {
    margin-right: -15px;
    margin-left: -15px;
    box-sizing: border-box;
  }
  
  /* 确保所有列都能正确显示 */
  [class^="col-"],
  [class*=" col-"] {
    position: relative;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
  }
}

/* 页面容器修复 */
body > div {
  max-width: 100%;
  box-sizing: border-box;
}

/* 图片修复 */
img {
  max-width: 100%;
  height: auto;
}

/* 防止iOS缩放问题 */
@media screen and (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
}

/* 防止iOS上的缩放问题 - 输入框焦点 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  input:focus,
  textarea:focus {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
  }
}

/* 确保整个页面可滚动 */
body {
  overflow-x: hidden;
}