/* ==========================================================================
 * iBLM 泰库智建云平台 v2.13.0 — 门户无损增强与移动端适配样式层
 * 目标：基于 .101:/home/prod/web/dist 真实 Vue 3 + Element Plus DOM 选择器
 * 系统统一署名：合肥筑枢科技有限公司（严禁误改 .header-org .company-name）
 * ========================================================================== */

:root {
  --iblm-primary: #1d4ed8;
  --iblm-primary-dark: #102a4c;
  --iblm-accent: #0284c7;
  --iblm-success: #15803d;
  --iblm-warning: #b45309;
  --iblm-danger: #dc2626;
  --iblm-border: #dbe3ee;
  --iblm-surface: #ffffff;
  --iblm-surface-muted: #f4f7fb;
  --iblm-text: #0f172a;
  --iblm-text-sub: #475569;
}

/* 1. 统一系统署名：隐藏旧上级公司名，仅作用于登录/注册页系统品牌区 */
.login-page .upper-full-name,
.register-page .upper-full-name,
[data-v-9905ce72] .upper-full-name,
[data-v-67b05810] .upper-full-name {
  display: none !important;
}

.iblm-mobile-brand-footer {
  display: none;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.04em;
}

/* 2. 登录/注册页增强提示条与顶部体验条（PC & 移动端通用） */
.iblm-login-banner {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.iblm-login-banner a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
}

.iblm-login-banner-close {
  border: none;
  background: transparent;
  color: #991b1b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

.iblm-login-banner.is-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.iblm-login-banner.is-success .iblm-login-banner-close {
  color: #166534;
}

.iblm-register-guide {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.55;
}

.iblm-register-guide strong {
  color: #1d4ed8;
}

/* 3. 登录后顶栏个人中心工具条 */
.iblm-user-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: 10px;
  z-index: 1200;
}

.iblm-user-bar.iblm-user-bar-floating {
  position: fixed;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--iblm-border);
  border-radius: 999px;
  padding: 4px 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.iblm-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  line-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-sizing: border-box;
}

.iblm-status-pill.is-active {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.iblm-status-pill.is-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.iblm-bar-btn,
.iblm-bar-tel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-height: 28px;
  line-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--iblm-border);
  background: #ffffff;
  color: var(--iblm-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.iblm-bar-btn:hover,
.iblm-bar-tel:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--iblm-primary);
}

.iblm-bar-btn.iblm-bar-admin {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
  font-weight: 600;
}

.iblm-bar-btn.iblm-bar-admin:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.iblm-bar-btn.is-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: var(--iblm-danger);
}

/* 桌面端防止主站左上标题折行与长企业名挤压，并去重原生热线电话 */
.header-logo {
  flex-shrink: 0;
}

.header-logo .title {
  white-space: nowrap;
}

.header-org {
  min-width: 0;
}

.header-org .company-name {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

@media (min-width: 769px) {
  .header-right ~ .iblm-user-bar .iblm-bar-tel,
  header .hotline ~ * .iblm-bar-tel {
    display: none;
  }
}

.iblm-mobile-drawer-actions {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.iblm-mobile-drawer-actions:empty {
  display: none !important;
}

.iblm-drawer-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.iblm-drawer-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  z-index: 2050;
}

/* 4. 移动端温和体验提示条（可关闭） */
.iblm-mobile-hint-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.45;
  position: sticky;
  top: 0;
  z-index: 1500;
}

.iblm-mobile-hint-close {
  border: none;
  background: #dbeafe;
  color: #1e3a8a;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

/* 5. 滑动拼图与忘记密码 / 修改密码模态框（工业工程蓝风格） */
.iblm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.62);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9990;
}

.iblm-modal-panel {
  width: min(94vw, 400px);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
  color: var(--iblm-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.iblm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0f2947 0%, #1d4ed8 100%);
  color: #ffffff;
  border-radius: 11px 11px 0 0;
}

.iblm-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.iblm-modal-close {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.iblm-modal-body {
  padding: 16px 18px 18px;
}

.iblm-field {
  margin-bottom: 12px;
}

.iblm-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.iblm-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.iblm-input:focus {
  border-color: var(--iblm-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

.iblm-inline-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.iblm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--iblm-border);
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.iblm-btn-primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  border-color: #1d4ed8;
  color: #ffffff;
}

.iblm-btn-primary:disabled,
.iblm-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.iblm-btn-block {
  width: 100%;
}

.iblm-form-msg {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
  display: none;
}

.iblm-form-msg.is-error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.iblm-form-msg.is-success {
  display: block;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.iblm-modal-footer-brand {
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
}

/* 滑动拼图舞台与轨道 */
.iblm-captcha-stage {
  position: relative;
  width: 300px;
  max-width: 100%;
  height: 110px;
  margin: 0 auto 12px;
  border-radius: 8px;
  overflow: hidden;
  background: #0f2238;
  border: 1px solid #334155;
  user-select: none;
  touch-action: none;
}

.iblm-captcha-bg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.iblm-captcha-piece {
  position: absolute;
  left: 0;
  top: 20px;
  width: 44px;
  height: 44px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.iblm-captcha-refresh {
  position: absolute;
  top: 6px;
  right: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  border-radius: 6px;
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
}

.iblm-captcha-track {
  position: relative;
  width: 300px;
  max-width: 100%;
  height: 44px;
  margin: 0 auto;
  border-radius: 22px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  user-select: none;
  touch-action: none;
  overflow: hidden;
}

.iblm-captcha-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: rgba(29, 78, 216, 0.16);
}

.iblm-captcha-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #475569;
  pointer-events: none;
}

.iblm-captcha-thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 42px;
  border-radius: 21px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
  touch-action: none;
}

.iblm-captcha-track.is-error .iblm-captcha-thumb {
  background: #dc2626;
}

.iblm-captcha-track.is-success .iblm-captcha-thumb {
  background: #16a34a;
}

/* ==========================================================================
 * 6. 触屏与窄屏卡片操作条常驻（根治 hover 死穴）
 * ========================================================================== */
@media (hover: none), (max-width: 768px) {
  .plan-card .overlay,
  .flooring-card .overlay,
  [data-v-29e7e0d1] .plan-card .overlay,
  [data-v-64dea0d6] .flooring-card .overlay {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: static !important;
    transform: none !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.09) 100%) !important;
    padding: 8px 10px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    border-top: 1px solid #e2e8f0 !important;
  }
}

/* ==========================================================================
 * 7. 移动端核心响应式布局（<= 768px）
 * ========================================================================== */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100% !important;
    -webkit-overflow-scrolling: touch;
  }

  /* 登录 / 注册页单列化 + 精简蓝渐变头部 + 底部 合肥筑枢科技有限公司 署名 */
  .login-page,
  .register-page,
  .login-page[data-v-9905ce72],
  .register-page[data-v-67b05810] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 100vh !important;
    height: auto !important;
    padding: 0 0 24px !important;
    overflow-y: auto !important;
    background: #f1f5f9 !important;
  }

  .login-page .left-panel,
  .login-page .login-left,
  .register-page .left-panel,
  .register-page .register-left,
  [data-v-9905ce72] .left-panel,
  [data-v-67b05810] .left-panel {
    width: 100% !important;
    min-height: 112px !important;
    height: auto !important;
    padding: 20px 16px !important;
    background: linear-gradient(135deg, #0d2542 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .login-page .left-panel .full-name,
  .register-page .left-panel .full-name {
    display: none !important;
  }

  .login-page .right-panel,
  .login-page .login-box,
  .login-page .login-card,
  .register-page .right-panel,
  .register-page .register-box,
  .register-page .register-card,
  [data-v-9905ce72] .login-box,
  [data-v-67b05810] .register-box {
    width: min(92vw, 400px) !important;
    max-width: 92vw !important;
    height: auto !important;
    margin: -18px auto 16px !important;
    padding: 20px 18px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12) !important;
    box-sizing: border-box !important;
  }

  .iblm-mobile-brand-footer {
    display: block !important;
  }

  /* 44px 触控控件 & 16px 输入字号（防 iOS Safari 聚焦缩放） */
  .login-page input,
  .register-page input,
  .login-page .el-input__inner,
  .register-page .el-input__inner,
  .iblm-input {
    font-size: 16px !important;
    min-height: 44px !important;
  }

  .login-page button,
  .register-page button,
  .login-page .el-button,
  .register-page .el-button,
  .iblm-btn {
    min-height: 44px !important;
  }

  /* 收敛 PC 浏览器兼容弹窗与各类 Element Plus Dialog（960px 建项 / 380px 二维码） */
  .messageBox_class,
  .el-message-box.messageBox_class,
  .el-message-box {
    width: min(92vw, 380px) !important;
    max-width: 92vw !important;
  }

  .el-dialog,
  [data-v-d2c60a45] .el-dialog {
    width: min(94vw, 960px) !important;
    max-width: 94vw !important;
    margin: 14px auto !important;
  }

  /* 顶栏紧凑化与工具条换行 */
  header,
  .top-header,
  [data-v-504451f5] {
    height: auto !important;
    min-height: 52px !important;
    padding: 6px 10px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .iblm-user-bar {
    flex-wrap: wrap;
    white-space: normal;
    margin-left: 0;
    max-width: 100%;
  }

  .iblm-drawer-toggle {
    display: inline-flex !important;
  }

  .iblm-mobile-drawer-actions {
    display: flex;
  }

  .iblm-mobile-drawer-actions .iblm-bar-btn,
  .iblm-mobile-drawer-actions .iblm-bar-admin {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    box-sizing: border-box;
  }

  .iblm-mobile-hint-bar {
    display: flex;
  }

  /* 左侧 .project-tree 滑出抽屉 + 右侧 .project-detail 全宽 */
  .project-tree,
  [data-v-29e7e0d1] .project-tree {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: min(82vw, 320px) !important;
    max-width: 82vw !important;
    background: #ffffff !important;
    z-index: 2100 !important;
    transform: translateX(-106%) !important;
    transition: transform 0.24s ease !important;
    overflow-y: auto !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.22) !important;
    padding-top: 14px !important;
  }

  body.iblm-drawer-open .project-tree,
  body.iblm-drawer-open [data-v-29e7e0d1] .project-tree {
    transform: translateX(0) !important;
  }

  body.iblm-drawer-open .iblm-drawer-mask {
    display: block !important;
  }

  .project-detail,
  [data-v-29e7e0d1] .project-detail,
  [data-v-64dea0d6] .project-detail {
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
  }

  /* 项目详情横向步骤条 */
  .el-steps,
  [data-v-29e7e0d1] .el-steps,
  [data-v-64dea0d6] .el-steps {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    padding-bottom: 6px !important;
  }

  /* 工程量 / 造价表格触控横滑 & 图表纵排 */
  .el-table,
  .el-table__body-wrapper,
  [data-v-deb350f5] .el-table,
  [data-v-a2dc4b9d] .el-table,
  [data-v-de80ffa2] .el-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
  }

  [data-v-ebd66b82],
  [data-v-21bab65e],
  [data-v-20c8dfb5] {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  /* 3D 控制面板与 PDF 目录浮层窄屏收敛 */
  [data-v-87c268e1],
  [data-v-60ad08d7],
  [data-v-4f5386e7] {
    max-width: 94vw !important;
    left: 3vw !important;
    right: 3vw !important;
  }
}
