/* ═══════════════════════════════════════════════════════
   铭泽系统资源站 · 华为ROM 页面主题
   与主站统一：紫色渐变 #667eea → #764ba2，白色卡片，圆角阴影
   ═══════════════════════════════════════════════════════ */

:root {
  --mz-p1: #667eea;
  --mz-p2: #764ba2;
  --mz-ink: #2c3345;
  --mz-ink2: #5b6478;
  --mz-muted: #939cb0;
  --mz-line: #eef0f7;
  --mz-card: #ffffff;
  --mz-r: 12px;
  --mz-r-lg: 18px;
  --mz-sh-card: 0 10px 34px rgba(52, 38, 96, .14);
  --mz-sh-soft: 0 2px 10px rgba(52, 38, 96, .06);
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
  color: var(--mz-ink);
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

/* 背景：紫色渐变 */
.holder {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  background-attachment: fixed !important;
  padding-bottom: 40px !important;
}

/* 顶部标题区 */
.logHeader, h1, .logHeader b {
  color: #fff !important;
  font-family: inherit !important;
  letter-spacing: .5px;
}

/* 搜索输入框：白色圆角 + 柔和阴影 */
.inputStyle {
  border: 0 !important;
  border-radius: var(--mz-r) !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  color: var(--mz-ink) !important;
  background: #fff !important;
  box-shadow: 0 8px 26px rgba(45, 30, 90, .16) !important;
  transition: box-shadow .18s, transform .18s;
  min-width: 140px !important;
}
.inputStyle::placeholder { color: #a9b2c8 !important; }
.inputStyle:focus {
  outline: none !important;
  box-shadow: 0 8px 26px rgba(45, 30, 90, .2), 0 0 0 3px rgba(255, 255, 255, .45) !important;
}

/* 表格：白色卡片容器 */
.table {
  background: var(--mz-card) !important;
  border-radius: var(--mz-r-lg) !important;
  box-shadow: var(--mz-sh-card) !important;
  overflow: hidden !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin-bottom: 24px !important;
}
.table thead th {
  background: #f7f8fd !important;
  color: var(--mz-ink2) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: .5px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--mz-line) !important;
  padding: 14px 16px !important;
}
.table tbody td {
  border: 0 !important;
  border-bottom: 1px solid var(--mz-line) !important;
  color: var(--mz-ink) !important;
  font-size: 13.5px !important;
  padding: 13px 16px !important;
  vertical-align: middle !important;
}
.table tbody tr:last-child td { border-bottom: 0 !important; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #f9faff !important; }

/* 按钮：站内紫色 */
.btn-teal, .btn.btn-teal {
  background: linear-gradient(135deg, var(--mz-p1), var(--mz-p2)) !important;
  border: 0 !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  box-shadow: 0 3px 10px rgba(102, 126, 234, .35) !important;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-teal:hover, .btn.btn-teal:hover {
  background: linear-gradient(135deg, #7b8ff0, #8a5cb5) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(102, 126, 234, .45) !important;
  color: #fff !important;
}
.btn-teal:focus, .btn.btn-teal:focus { box-shadow: 0 0 0 3px rgba(102, 126, 234, .3) !important; }

.sbtn, .fbtn { margin-right: 5px !important; }

/* 日期小标签 */
.table tbody td .badge, .table tbody td small {
  border-radius: 5px !important;
}
.badge-danger { background: linear-gradient(135deg, #e05780, #c33b6a) !important; }
.badge-info { background: linear-gradient(135deg, var(--mz-p1), var(--mz-p2)) !important; }
.badge-warning { background: linear-gradient(135deg, #f0a55c, #e08a3c) !important; }

/* 弹窗 */
.modal-content {
  border: 0 !important;
  border-radius: var(--mz-r-lg) !important;
  box-shadow: 0 24px 70px rgba(30, 20, 60, .35) !important;
  overflow: hidden;
}
.modal-header {
  background: linear-gradient(135deg, var(--mz-p1), var(--mz-p2)) !important;
  color: #fff !important;
  border: 0 !important;
}
.modal-header .close, .modal-header button.close { color: #fff !important; opacity: .85; }
.modal-title { color: #fff !important; font-weight: 700; }
.modal-body { color: var(--mz-ink); }
.modal-footer { border-top: 1px solid var(--mz-line) !important; }

/* 左下 / 右下悬浮按钮 */
.floatingthingy, .databasesBox, .databasesText {
  background: rgba(255, 255, 255, .92) !important;
  color: var(--mz-ink) !important;
  border-radius: 10px !important;
  box-shadow: var(--mz-sh-soft) !important;
  border: 0 !important;
}
.databasesBox:hover, .floatingthingy:hover { background: #fff !important; }

/* 通知条 */
.Notification {
  background: #fff !important;
  color: var(--mz-ink) !important;
  border-radius: var(--mz-r) !important;
  box-shadow: var(--mz-sh-card) !important;
  border: 0 !important;
}

/* 进度条 */
.progress { background: #eef0f7 !important; border-radius: 6px !important; height: 8px !important; }
.progress-bar {
  background: linear-gradient(90deg, var(--mz-p1), var(--mz-p2)) !important;
}

/* 链接 */
a { color: var(--mz-p1); }
a:hover { color: var(--mz-p2); }

/* 移动端 */
@media (max-width: 760px) {
  .inputStyle { width: 100% !important; margin-right: 0 !important; }
  .table thead th, .table tbody td { padding: 10px 10px !important; font-size: 12.5px !important; }
  .btn-teal, .btn.btn-teal { padding: 7px 12px !important; font-size: 12px !important; }
}

/* ── 修正：固件ID 颜色、次要按钮、行高 ── */
.table tbody td:first-child,
.table tbody td:first-child a,
.table tbody td:first-child span,
.table tbody td:first-child div {
  color: var(--mz-ink) !important;
  font-weight: 700 !important;
}
.table tbody td:first-child .badge,
.table tbody td:first-child a.badge {
  color: #fff !important;
  font-weight: 600 !important;
}

/* 「文件列表」等次要按钮：白底紫边 */
.btn-sm.btn-teal,
.btn.btn-sm.btn-teal,
.table .btn-teal.btn-sm {
  background: #fff !important;
  color: var(--mz-p1) !important;
  border: 1.5px solid rgba(102, 126, 234, .55) !important;
  box-shadow: 0 2px 6px rgba(102, 126, 234, .16) !important;
  font-weight: 600 !important;
}
.btn-sm.btn-teal:hover,
.table .btn-teal.btn-sm:hover {
  background: #f4f6ff !important;
  color: var(--mz-p2) !important;
  border-color: var(--mz-p1) !important;
}

/* 「...」小按钮 */
.table .btn-teal.btn-sm:only-child,
.table td .btn-teal[class*="btn-sm"]:last-child {
  min-width: 38px;
}

/* 行高收紧 */
.table tbody td { padding: 11px 16px !important; line-height: 1.5 !important; }
.table tbody tr { height: auto !important; }
.table tbody td > div { margin: 0 !important; }
.table tbody td .progress { margin: 2px 0 !important; }

/* 让按钮横向排列不换行 */
.table tbody td .btn-teal { margin-bottom: 0 !important; margin-right: 5px !important; }
.table tbody td .btn-teal:last-child { margin-right: 0 !important; }

/* 表格外留白更贴近主站 */
@media (min-width: 761px) {
  .container { max-width: 1140px !important; }
}

/* ── btn-info（文件列表/更多）：站内紫色描边样式 ── */
.btn-info,
.btn.btn-info {
  background: #fff !important;
  color: var(--mz-p1) !important;
  border: 1.5px solid rgba(102, 126, 234, .55) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 6px rgba(102, 126, 234, .16) !important;
  font-weight: 600 !important;
}
.btn-info:hover,
.btn.btn-info:hover,
.btn-info:focus,
.btn.btn-info:focus {
  background: #f4f6ff !important;
  color: var(--mz-p2) !important;
  border-color: var(--mz-p1) !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, .25) !important;
}

/* 按钮组横向排列，不换行 */
.table tbody td { white-space: nowrap; }
.table tbody td:first-child,
.table tbody td:nth-child(3) { white-space: normal; }

/* 「添加固件」主按钮保持紫色实心 */
.btn-teal.fbtn,
.btn.btn-teal.fbtn {
  background: linear-gradient(135deg, var(--mz-p1), var(--mz-p2)) !important;
  color: #fff !important;
  border: 0 !important;
}

/* ── 底部悬浮入口：与站内风格统一 ── */
.floatingthingy, .databasesBox, .databasesText,
div[onclick*="BaseArchive"], div[onclick*="Downgrade"] {
  background: rgba(255, 255, 255, .95) !important;
  color: var(--mz-ink) !important;
  border: 0 !important;
  border-radius: 0 10px 10px 0 !important;
  box-shadow: 0 4px 16px rgba(52, 38, 96, .18) !important;
  font-size: 12.5px !important;
  padding: 7px 12px 7px 9px !important;
}
/* 「...」按钮更紧凑 */
.btn-info.btn-sm:last-child {
  min-width: 34px !important;
  padding: 6px 8px !important;
}

/* 表头区域与主站留白一致 */
.container > .logHeader:first-child,
h1.logHeader {
  font-size: 26px !important;
  font-weight: 700 !important;
  margin-bottom: 14px !important;
}

.databasesBox hr {
  background: var(--mz-line) !important;
  border: 0 !important;
  border-top: 1px solid var(--mz-line) !important;
  margin: 6px 0 !important;
}
.databasesText {
  margin-top: 0 !important;
  height: auto !important;
  max-height: 170px !important;
  overflow: auto !important;
  font-size: 12.5px !important;
  line-height: 1.9 !important;
}
.databasesText a {
  display: block !important;
  color: var(--mz-ink) !important;
  text-decoration: none !important;
  padding: 3px 4px !important;
  border-radius: 5px !important;
  transition: background .15s, color .15s;
}
.databasesText a:hover {
  background: #f4f6ff !important;
  color: var(--mz-p1) !important;
}

/* ══ 右上角「数据库」下拉：只改配色，保留原站 hover 展开机制 ══ */
.databasesBox {
  top: 68px !important;
  right: 20px !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--mz-ink) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(52, 38, 96, .20) !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  padding: 5px 14px !important;
  z-index: 1001 !important;
}
.databasesBox:hover {
  text-align: left !important;
  box-shadow: 0 8px 26px rgba(52, 38, 96, .26) !important;
}
.databasesBox hr {
  border: 0 !important;
  border-top: 1px solid var(--mz-line) !important;
  background: transparent !important;
  margin: 5px 0 !important;
}
.databasesText { font-size: 12.5px !important; }
.databasesText a {
  display: block !important;
  color: var(--mz-ink) !important;
  text-decoration: none !important;
  padding: 3px 4px !important;
  border-radius: 5px !important;
}
.databasesText a:hover { background: #f4f6ff !important; color: var(--mz-p1) !important; }

/* 下拉框：悬停或点击展开（原站 .databasesBox:hover 高度不足，这里加强） */
.databasesBox:hover,
body .databasesBox.mz-open,
body .databasesBox:hover,
div.databasesBox.mz-open {
  height: 210px !important;
  text-align: left !important;
  padding: 8px 14px !important;
  z-index: 1002 !important;
}

/* ══ 「下载」按钮（原「...」）：字体与站点统一 ══ */
.mz-dl-btn,
.btn.btn-info.mz-dl-btn {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: .5px !important;
  min-width: 58px !important;
  padding: 7px 12px !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
}
/* 所有按钮统一字体 */
.table button, .table a.btn, .modal button, .modal .btn {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
}

/* 「下载」按钮：确保完整显示两个汉字，不被省略号截断 */
.mz-dl-btn,
.btn.mz-dl-btn,
.btn-info.mz-dl-btn {
  min-width: 68px !important;
  width: auto !important;
  max-width: none !important;
  padding: 7px 14px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  display: inline-block !important;
  vertical-align: middle !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

/* 操作列：确保三个按钮完整显示，不被表格裁切 */
.table {
  table-layout: auto !important;
  width: 100% !important;
}
.table thead th:last-child,
.table tbody td:last-child {
  min-width: 250px !important;
  white-space: nowrap !important;
  text-align: right !important;
  padding-right: 16px !important;
}
/* 让按钮组不换行且不被裁 */
.table tbody td:last-child .btn,
.table tbody td:last-child button {
  margin-left: 5px !important;
  margin-right: 0 !important;
}
.table tbody td:last-child .btn:first-child { margin-left: 0 !important; }

/* 操作列彻底解决：表格允许横向滚动，列按内容自适应 */
.table {
  display: table !important;
  min-width: 100% !important;
}
.table thead th:last-child,
.table tbody td:last-child {
  min-width: 270px !important;
  width: auto !important;
}
/* 外层容器允许滚动，不裁切 */
.table-responsive,
.table-wrapper,
.table-parent {
  overflow-x: auto !important;
}

.mz-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
  border-radius: 18px;
  box-shadow: var(--mz-sh-card);
  background: #fff;
  margin-bottom: 24px;
}
.mz-table-wrap .table {
  box-shadow: none !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
  min-width: 900px;
}

/* 关键：取消 Bootstrap 等分列，让操作列按内容撑开 */
.table thead th,
.table tbody td {
  width: auto !important;
}
.table thead th:nth-child(1),
.table tbody td:nth-child(1) { width: 15% !important; }
.table thead th:nth-child(2),
.table tbody td:nth-child(2) { width: 20% !important; }
.table thead th:nth-child(3),
.table tbody td:nth-child(3) { width: 25% !important; }
.table thead th:nth-child(4),
.table tbody td:nth-child(4) { width: 14% !important; }
.table thead th:nth-child(5),
.table tbody td:nth-child(5) { width: 26% !important; min-width: 265px !important; }

/* ═══════════════════════════════════════════════════════
   字体全站统一：覆盖原站自定义字体 VeganFont / ComicSans
   ═══════════════════════════════════════════════════════ */
:root {
  --mz-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
             "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
             "Helvetica Neue", Arial, sans-serif;
}

/* 全站字体覆盖（含自定义字体类） */
html, body,
body *, 
.VeganFont, .ComicSans,
[style*="VeganFont"], [style*="ComicSans"],
h1, h2, h3, h4, h5, h6,
p, span, div, a, button, input, textarea, select, table, th, td, label,
.notification, .Notification, .logHeader, .databasesBox, .databasesText,
.floatingthingy, .modal, .modal-content, .btn {
  font-family: var(--mz-font) !important;
}

/* 字体大小与行高统一 */
body { font-size: 14.5px !important; line-height: 1.7 !important; }

h1, .logHeader { font-size: 26px !important; font-weight: 700 !important; }
h2 { font-size: 15px !important; font-weight: 600 !important; }
h3 { font-size: 14.5px !important; font-weight: 600 !important; }

/* 表格内文字统一 */
.table thead th { font-size: 13px !important; font-weight: 700 !important; }
.table tbody td { font-size: 13.5px !important; line-height: 1.55 !important; }
.table tbody td h2, .table tbody td h3 {
  margin: 0 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.55 !important;
}

/* 输入框与按钮统一 */
.inputStyle { font-size: 14px !important; }
.btn, button.btn { font-size: 13px !important; font-weight: 600 !important; }
.badge { font-size: 11.5px !important; font-weight: 600 !important; }

/* 顶部标题区去掉装饰字体 */
.logHeader { letter-spacing: .5px !important; }

/* ══ 表格宽度修正：确保不出屏 ══ */
.mz-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.mz-table-wrap .table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}
/* 操作列给足宽度，其他列压缩 */
.table thead th:nth-child(1), .table tbody td:nth-child(1) { width: 13% !important; }
.table thead th:nth-child(2), .table tbody td:nth-child(2) { width: 17% !important; }
.table thead th:nth-child(3), .table tbody td:nth-child(3) { width: 25% !important; }
.table thead th:nth-child(4), .table tbody td:nth-child(4) { width: 12% !important; }
.table thead th:nth-child(5), .table tbody td:nth-child(5) { width: 33% !important; }

/* 表格单元格允许换行，不撑破容器 */
.table tbody td {
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}
.table tbody td:last-child {
  white-space: nowrap !important;
  word-break: normal !important;
}

/* 容器与主站同宽 */
.container, .holder > .container {
  max-width: 1140px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* ══ 恢复页面纵向滚动（原站靠 .holder 100vh + overflow:auto） ══ */
html, body {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
}
.holder {
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
  overflow-y: visible !important;
}
/* 表格容器不做纵向滚动，交给页面 */
.mz-table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
  height: auto !important;
  max-height: none !important;
}

/* ══ 彻底解除高度锁定，让内容自然撑开 ══ */
html, body, .holder {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
}
.holder {
  overflow: visible !important;
  display: block !important;
}
/* 任何内部容器都不限制高度 */
.holder > *, .holder > * > * {
  max-height: none !important;
}
/* 表格体不做内部滚动 */
table, tbody, thead, tr, td, th {
  max-height: none !important;
}
tbody {
  display: table-row-group !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}
