/* Keep PC fidelity while improving mobile compatibility */
:root { --jx-top-h: 58px; }
@media (min-width: 768px) { :root { --jx-top-h: 64px; } }

/* Shared favicon-friendly base */
html, body { -webkit-font-smoothing: antialiased; }
body { padding-top: var(--jx-top-h); }

/* Remove icon-font dependency for domestic access stability */
.material-symbols-outlined { display: none !important; }

/* Unified top nav */
#jx-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
#jx-topbar .wrap {
  max-width: 1280px;
  margin: 0 auto;
  height: var(--jx-top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
}
#jx-topbar .brand {
  color: #0f172a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}
#jx-topbar .brand img { width: 20px; height: 20px; }
#jx-topbar .links { display: none; gap: 6px; align-items: center; }
#jx-topbar .links a {
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
}
#jx-topbar .links a.active,
#jx-topbar .links a:hover { color: #0f172a; background: rgba(15,23,42,.08); }
#jx-topbar .jx-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
#jx-topbar .menu-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148,163,184,.5);
  border-radius: 8px;
  color: #0f172a;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#jx-topbar .menu-btn .jx-ico { width: 18px; height: 18px; }
#jx-topbar .cta {
  display: none;
  text-decoration: none;
  color: #fff;
  background: #0f172a;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}
#jx-topmenu-mobile {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px 12px;
  background: rgba(255,255,255,.98);
  border-top: 1px solid rgba(15,23,42,.08);
}
#jx-topmenu-mobile.open { display: grid; }
#jx-topmenu-mobile a {
  color: #0f172a;
  text-decoration: none;
  font-size: 12px;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 8px;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
}
#jx-topmenu-mobile a .jx-ico { width: 14px; height: 14px; flex: 0 0 14px; }
#jx-topmenu-mobile a.active { background: #0f172a; color: #fff; }
@media (min-width: 1024px) {
  #jx-topbar .links { display: flex; }
  #jx-topbar .menu-btn { display: none; }
  #jx-topbar .cta { display: inline-flex; align-items: center; }
  #jx-topmenu-mobile { display: none !important; }
}

/* Mobile enhancements for pages with fixed sidebar layout */
@media (max-width: 1023px) {
  aside.w-64.fixed,
  aside.w-64.bg-white.fixed,
  aside.w-64.bg-white.dark\:bg-slate-900.fixed {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgb(226 232 240) !important;
    z-index: auto !important;
  }

  main.ml-64,
  main.flex-1.ml-64,
  main.ml-64.flex-1 {
    margin-left: 0 !important;
  }

  header.px-10,
  header.lg\:px-20,
  header.md\:px-10,
  .px-10,
  .lg\:px-20,
  .md\:px-10 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .w-72.shrink-0.space-y-6 {
    width: 100% !important;
  }

  .max-w-\[1440px\],
  .max-w-\[1280px\],
  .max-w-7xl,
  .max-w-\[1200px\],
  .max-w-\[960px\] {
    max-width: 100% !important;
  }
}

@media (max-width: 767px) {
  .jx-home-table-wrap {
    overflow-x: hidden !important;
  }

  .jx-home-table {
    width: 100%;
    table-layout: fixed;
  }

  .jx-home-table th,
  .jx-home-table td {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    white-space: normal;
    font-size: 0.75rem;
    min-width: 0;
  }

  .jx-home-table th:nth-child(4),
  .jx-home-table td:nth-child(4) {
    display: none;
  }

  .jx-home-table .jx-task-name {
    max-width: 130px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
  }

  .jx-home-table .jx-bid-btn {
    padding: 0.375rem 0.5rem !important;
    white-space: nowrap;
    font-size: 0.6875rem;
    border-radius: 0.625rem;
  }
}
/* hide old per-page top nav bars so all pages use the same nav */
header.jx-hide-nav { display: none !important; }

/* unified logo style applied to all page brands */
.jx-unified-logo {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 6px;
}

@media (prefers-color-scheme: dark) {
  #jx-topbar {
    background: rgba(2, 6, 23, 0.86);
    border-bottom-color: rgba(148,163,184,.18);
  }
  #jx-topbar .brand,
  #jx-topbar .menu-btn { color: #e2e8f0; }
  #jx-topbar .links a { color: #cbd5e1; }
  #jx-topbar .links a.active,
  #jx-topbar .links a:hover { color: #fff; background: rgba(148,163,184,.22); }
  #jx-topbar .cta { background: #f97316; color: #fff; }
  #jx-topmenu-mobile {
    background: rgba(2,6,23,.96);
    border-top-color: rgba(148,163,184,.18);
  }
  #jx-topmenu-mobile a {
    color: #e2e8f0;
    background: rgba(15,23,42,.9);
  }
  #jx-topmenu-mobile a.active { background: #f97316; color: #fff; }
}
