:root {
  --tg-bg: #f4f7fb;
  --tg-panel: #ffffff;
  --tg-panel-soft: #f8fafc;
  --tg-sidebar: #0f172a;
  --tg-sidebar-2: #111c33;
  --tg-text: #0f172a;
  --tg-muted: #64748b;
  --tg-line: #e2e8f0;
  --tg-primary: #5b8fca;
  --tg-primary-dark: #3f6f9f;
  --tg-primary-rgb: 91, 143, 202;
  --tg-secondary: #e8f1fb;
  --tg-secondary-strong: #d5e5f7;
  --tg-secondary-rgb: 232, 241, 251;

  /* Compatibility aliases used by older backoffice components */
  --tg-accent: var(--tg-primary);
  --tg-accent-dark: var(--tg-primary-dark);
  --tg-accent-soft: var(--tg-secondary);
  --tg-accent-rgb: var(--tg-primary-rgb);
  --tg-header: var(--tg-primary);
  --tg-header-text: #ffffff;
  --tg-success: #059669;
  --tg-danger: #dc2626;
  --tg-warning: #d97706;
  --tg-radius: 14px;
  --tg-shadow: 0 8px 28px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html, body { background: var(--tg-bg); color: var(--tg-text); }
body { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; }
a { color: var(--tg-accent); }

/* Header */
#header {
  min-height: 68px;
  padding: 0 24px;
  background: var(--tg-header);
  color: var(--tg-header-text);
  border-bottom: 1px solid var(--tg-line);
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 40;
}
#branding { flex: 0 0 auto; }
.tg-branding { display:flex; align-items:center; gap:10px; }
.tg-menu-button { display:none; width:36px; height:36px; border:1px solid var(--tg-line); border-radius:9px; background:#fff; color:#334155; cursor:pointer; font-size:16px; padding:0; }
.tg-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--tg-header-text) !important; text-decoration: none; }
.tg-brand-mark, .tg-mobile-logo {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-grid; place-items: center;
  font-weight: 800; letter-spacing: -.04em; color: #fff;
  background: linear-gradient(145deg, #2563eb, #1e40af);
  box-shadow: 0 7px 18px rgba(37,99,235,.25);
}
.tg-brand-copy { display: grid; line-height: 1.1; }
.tg-brand-copy strong { font-size: 15px; letter-spacing: -.01em; }
.tg-brand-copy small { margin-top: 4px; color: rgba(255,255,255,.78); font-size: 11px; font-weight: 600; }
#user-tools { margin-left: auto; color: rgba(255,255,255,.82); font-size: 12px; text-transform: none; }
#user-tools a { color: #fff; border-bottom: 0; font-weight: 600; }
.tg-top-actions { display: flex; align-items: center; gap: 8px; }
.tg-top-link { padding: 8px 11px; border: 1px solid rgba(255,255,255,.34); border-radius: 9px; text-decoration: none; color: #fff !important; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 700; }
.tg-top-link:hover { border-color: rgba(255,255,255,.58); background: rgba(255,255,255,.2); }

/* Global shell */
#container { min-height: 100vh; background: var(--tg-bg); }
.main { min-height: calc(100vh - 68px); align-items: stretch; }
#content-start { min-width: 0; padding: 26px 30px 42px; }
#content { padding: 0; }
#content h1 { font-size: 26px; line-height: 1.2; color: var(--tg-text); font-weight: 800; letter-spacing: -.025em; margin: 0 0 18px; }
#content h2 { color: var(--tg-text); }
.breadcrumbs { background: transparent; color: var(--tg-muted); padding: 13px 30px 0; font-size: 12px; }
.breadcrumbs a { color: #475569; }

/* Sidebar */
#nav-sidebar { width: 264px; flex: 0 0 264px; background: var(--tg-sidebar); border-right: 0; position: sticky; top: 68px; height: calc(100vh - 68px); overflow: auto; }
#nav-filter { display: none !important; }
.tg-sidebar { min-height: 100%; background: var(--tg-sidebar); color: #cbd5e1; padding: 18px 14px; }
.tg-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 12px; font-size: 11px; font-weight: 800; color: #94a3b8; letter-spacing: .08em; text-transform: uppercase; }
.tg-sidebar-close { display: none; border: 0; background: transparent; color: #94a3b8; font-size: 24px; cursor: pointer; }
.tg-sidebar-search input { width: 100%; padding: 10px 11px; border: 1px solid rgba(148,163,184,.18); background: rgba(255,255,255,.06); color: #e2e8f0; border-radius: 9px; outline: 0; font-size: 12px; }
.tg-sidebar-search input::placeholder { color: #64748b; }
.tg-sidebar-nav { margin-top: 14px; display: grid; gap: 5px; }
.tg-sidebar-home, .tg-nav-children a { text-decoration: none !important; color: #cbd5e1 !important; border-radius: 9px; transition: .16s ease; }
.tg-sidebar-home { display: flex; align-items: center; gap: 9px; padding: 10px 11px; font-size: 13px; font-weight: 700; }
.tg-sidebar-home:hover, .tg-sidebar-home.is-active, .tg-nav-children a:hover, .tg-nav-children a.is-active { background: rgba(37,99,235,.18); color: #fff !important; }
.tg-nav-dot { width: 7px; height: 7px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 4px rgba(96,165,250,.1); }
.tg-nav-group { margin-top: 3px; }
.tg-nav-group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 11px 7px; color: #94a3b8; cursor: pointer; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.tg-nav-group > summary::-webkit-details-marker { display: none; }
.tg-chevron { font-size: 14px; }
.tg-nav-children { display: grid; gap: 2px; padding-bottom: 5px; }
.tg-nav-children a { display: block; padding: 9px 11px 9px 20px; font-size: 12px; font-weight: 600; }
.tg-sidebar-foot { border-top: 1px solid rgba(148,163,184,.13); margin-top: 18px; padding: 14px 8px 4px; display: grid; gap: 8px; }
.tg-sidebar-foot a { color: #94a3b8 !important; text-decoration: none; font-size: 11px; font-weight: 700; }
.tg-sidebar-backdrop { display: none; }

/* Dashboard */
.tg-dashboard-wrap { max-width: 1440px; margin: 0 auto; }
.tg-dashboard-hero { background: linear-gradient(135deg, #0f172a, #16264a); color: #fff; padding: 28px 30px; border-radius: 18px; box-shadow: var(--tg-shadow); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.tg-dashboard-hero h1 { color: #fff !important; font-size: 30px !important; margin: 2px 0 8px !important; }
.tg-dashboard-hero p { margin: 0; max-width: 780px; color: #cbd5e1; line-height: 1.7; }
.tg-eyebrow { margin: 0 0 6px !important; font-size: 10px !important; letter-spacing: .14em; font-weight: 800; color: #60a5fa !important; }
.tg-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 9px; text-decoration: none !important; font-size: 12px; font-weight: 800; }
.tg-btn-secondary { color: #e2e8f0 !important; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.tg-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin: 16px 0; }
.tg-kpi-card { background: var(--tg-panel); border: 1px solid var(--tg-line); border-radius: 13px; padding: 17px 18px; box-shadow: 0 5px 16px rgba(15,23,42,.03); }
.tg-kpi-card span { display: block; color: var(--tg-muted); font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.tg-kpi-card strong { display: block; font-size: 18px; color: var(--tg-text); }
.tg-kpi-card small { display: block; color: #94a3b8; font-size: 10px; margin-top: 4px; }
.tg-panel { background: var(--tg-panel); border: 1px solid var(--tg-line); border-radius: 15px; padding: 22px; box-shadow: 0 6px 22px rgba(15,23,42,.04); }
.tg-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tg-panel-head h2 { margin: 0; font-size: 20px; }
.tg-app-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.tg-app-card { border: 1px solid var(--tg-line); border-radius: 13px; background: #fff; overflow: hidden; }
.tg-app-card-head { display: flex; gap: 11px; align-items: center; padding: 15px; background: #f8fafc; border-bottom: 1px solid var(--tg-line); }
.tg-app-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #dbeafe; color: #1d4ed8; font-weight: 900; }
.tg-app-card-head h3 { margin: 0 0 3px; font-size: 14px; color: var(--tg-text); }
.tg-app-card-head span { font-size: 10px; color: var(--tg-muted); }
.tg-model-list { display: grid; }
.tg-model-row { min-height: 44px; padding: 8px 13px; display: flex; justify-content: space-between; gap: 10px; align-items: center; border-top: 1px solid #f1f5f9; }
.tg-model-row:first-child { border-top: 0; }
.tg-model-row > a:first-child { color: #334155; font-size: 12px; font-weight: 700; text-decoration: none; }
.tg-mini-action { font-size: 10px; font-weight: 800; text-decoration: none; color: #2563eb; background: #eff6ff; padding: 5px 7px; border-radius: 6px; }
.tg-empty-state { border: 1px dashed #cbd5e1; border-radius: 12px; padding: 28px; text-align: center; color: var(--tg-muted); }
.tg-empty-state strong { display: block; color: #334155; margin-bottom: 6px; }

/* Native admin components restyled into TG design */
.module, .inline-group, .submit-row, .selector, fieldset, .results, #changelist-filter, .object-tools a { border-radius: 12px; }
.module, .inline-group, fieldset, #changelist-filter { border: 1px solid var(--tg-line); background: #fff; box-shadow: 0 4px 16px rgba(15,23,42,.03); }
.module h2, .module caption, .inline-group h2 { background: #f8fafc; color: #334155; border-bottom: 1px solid var(--tg-line); font-size: 12px; font-weight: 800; letter-spacing: .01em; }
#changelist { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; }
#changelist .changelist-form-container { min-width: 0; }
#changelist-filter { position: static; width: 250px; padding-bottom: 8px; }
#changelist-filter h2 { background: transparent; color: var(--tg-text); padding: 14px 14px 8px; font-size: 13px; }
#changelist-filter h3 { color: #475569; font-size: 11px; font-weight: 800; }
#changelist-filter li.selected a { color: var(--tg-accent); font-weight: 800; }
#changelist table { border: 1px solid var(--tg-line); border-radius: 12px; overflow: hidden; background: #fff; }
#changelist table thead th { background: #f8fafc; color: #475569; border-bottom: 1px solid var(--tg-line); font-size: 11px; text-transform: none; }
#changelist table tbody tr:hover { background: #f8fbff; }
#changelist table tbody td, #changelist table tbody th { border-top: 1px solid #f1f5f9; padding-top: 12px; padding-bottom: 12px; }
#toolbar { background: #fff; border: 1px solid var(--tg-line); border-radius: 11px; padding: 10px; margin-bottom: 12px; }
#toolbar form input[type="text"] { border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; }
.paginator { border: 0 !important; background: transparent !important; color: var(--tg-muted); }
.object-tools { margin-top: -42px; }
.object-tools a, input[type=submit], button, .button, input[type=button], .submit-row input { background: var(--tg-accent); border: 0; border-radius: 8px; color: #fff; font-weight: 800; box-shadow: none; }
.object-tools a:hover, input[type=submit]:hover, button:hover, .button:hover, input[type=button]:hover { background: var(--tg-accent-dark); }
.submit-row { background: #fff; border: 1px solid var(--tg-line); padding: 12px; }
.submit-row a.deletelink { background: #fff1f2; color: #be123c; border-radius: 8px; }
.form-row { border-bottom: 1px solid #f1f5f9; padding: 13px 14px; }
.form-row label { color: #475569; font-weight: 700; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], textarea, select, .vTextField {
  border: 1px solid #cbd5e1 !important; border-radius: 8px !important; background: #fff !important; color: var(--tg-text) !important; padding: 8px 10px !important; box-shadow: none !important;
}
input:focus, textarea:focus, select:focus { border-color: #60a5fa !important; outline: 3px solid rgba(96,165,250,.14) !important; }
.help, p.help, form p.help { color: var(--tg-muted); }
.messagelist { margin: 0 0 16px; padding: 0; }
ul.messagelist li { border-radius: 9px; border: 1px solid #bbf7d0; background: #ecfdf5; color: #065f46; }

/* Login */
body.tg-login-page { background: #eef3f9; }
body.tg-login-page #header, body.tg-login-page .breadcrumbs { display: none !important; }
body.tg-login-page #main { min-height: 100vh; padding: 0; display: block; }
body.tg-login-page #content-start, body.tg-login-page #content { padding: 0; max-width: none; width: 100%; }
.tg-login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); }
.tg-login-brand-panel { background: radial-gradient(circle at 20% 15%, rgba(37,99,235,.32), transparent 34%), linear-gradient(145deg,#0b1220,#13254b); color: #fff; display: grid; place-items: center; padding: 56px; }
.tg-login-brand-inner { max-width: 520px; }
.tg-login-logo { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: #2563eb; font-size: 21px; font-weight: 900; box-shadow: 0 15px 36px rgba(37,99,235,.3); margin-bottom: 38px; }
.tg-login-brand-panel h1 { color: #fff !important; font-size: 40px !important; margin: 0 0 14px !important; }
.tg-login-lead { color: #cbd5e1; line-height: 1.8; max-width: 470px; }
.tg-login-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 34px; }
.tg-login-feature-grid div { border: 1px solid rgba(255,255,255,.11); background: rgba(255,255,255,.05); border-radius: 11px; padding: 14px; }
.tg-login-feature-grid strong { display: block; color: #fff; font-size: 12px; }
.tg-login-feature-grid span { display: block; color: #94a3b8; font-size: 10px; margin-top: 4px; }
.tg-login-form-panel { display: grid; place-items: center; padding: 44px; background: #f7f9fc; }
.tg-login-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--tg-line); border-radius: 18px; padding: 34px; box-shadow: 0 18px 50px rgba(15,23,42,.09); }
.tg-login-card-head h2 { margin: 0 0 7px; font-size: 25px; color: var(--tg-text); }
.tg-login-card-head > p:not(.tg-eyebrow) { color: var(--tg-muted); margin: 0 0 24px; }
.tg-mobile-logo { display: none; margin-bottom: 22px; }
.tg-login-form { display: grid; gap: 16px; }
.tg-field label { display: block; color: #334155; font-size: 11px; font-weight: 800; margin-bottom: 7px; }
.tg-login-form input[type=text], .tg-login-form input[type=password] { width: 100%; min-height: 44px; font-size: 14px; }
.tg-login-help { text-align: right; margin-top: -5px; }
.tg-login-help a { font-size: 11px; text-decoration: none; font-weight: 700; }
.tg-login-button { min-height: 45px; width: 100%; margin-top: 3px; font-size: 13px; }
.tg-login-foot { text-align: center; color: #94a3b8; font-size: 10px; margin-top: 20px; }
.tg-alert { border-radius: 9px; padding: 10px 12px; font-size: 11px; margin-bottom: 16px; }
.tg-alert-error { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.tg-alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Guide pages share same visual language */
.guide-wrap, .guide-shell { font-family: inherit; }

@media (max-width: 1100px) {
  .tg-app-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tg-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #nav-sidebar { width: 230px; flex-basis: 230px; }
}

@media (max-width: 800px) {
  #header { padding: 0 14px; min-height: 62px; }
  .tg-brand-copy small, .tg-top-actions { display: none; }
  .tg-menu-button { display:inline-grid; place-items:center; }
  #user-tools { font-size: 10px; }
  #nav-sidebar { position: fixed; left: -280px; top: 0; height: 100vh; width: 270px; z-index: 90; transition: left .2s ease; }
  body.tg-sidebar-open #nav-sidebar { left: 0; }
  .tg-sidebar-close { display: block; }
  .tg-sidebar-backdrop { position: fixed; inset: 0; z-index: 80; border: 0; background: rgba(15,23,42,.48); }
  body.tg-sidebar-open .tg-sidebar-backdrop { display: block; }
  #content-start { padding: 18px 14px 32px; }
  .breadcrumbs { padding-left: 14px; padding-right: 14px; }
  .tg-dashboard-hero { padding: 22px; display: block; }
  .tg-hero-actions { margin-top: 18px; }
  .tg-app-grid { grid-template-columns: 1fr; }
  #changelist { grid-template-columns: 1fr; }
  #changelist-filter { width: auto; }
  .tg-login-shell { grid-template-columns: 1fr; }
  .tg-login-brand-panel { display: none; }
  .tg-login-form-panel { min-height: 100vh; padding: 22px; }
  .tg-mobile-logo { display: grid; }
}

@media (max-width: 520px) {
  .tg-kpi-grid { grid-template-columns: 1fr; }
  .tg-login-card { padding: 25px 20px; border-radius: 14px; }
}


/* =========================================================
   恒金商城 V5.2 — 平台首页 / 顶栏 / Message / Clean shell
   ========================================================= */

#content-start {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: none !important;
}
#content {
  width: 100% !important;
  max-width: none !important;
}
.hj-platform-dashboard #content-start {
  padding: 24px 28px 42px;
}
.hj-platform-dashboard #content > h1,
.hj-platform-dashboard .content-title {
  display: none !important;
}

/* clean top user tools */
.tg-userbar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-size: 11px;
}
.tg-userbar-name {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 800;
}
.tg-userbar a,
.tg-logout-form button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #e2e8f0 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #475569 !important;
  text-decoration: none !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  cursor: pointer;
}
.tg-userbar a:hover,
.tg-logout-form button:hover {
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}
.tg-logout-form { margin: 0; display: inline-flex; }

/* message = compact toast; prevent native Django icon repeating */
ul.messagelist {
  position: fixed;
  z-index: 120;
  top: 82px;
  right: 24px;
  width: min(380px, calc(100vw - 40px));
  margin: 0 !important;
  padding: 0 !important;
}
ul.messagelist li,
ul.messagelist li.success,
ul.messagelist li.warning,
ul.messagelist li.error {
  min-height: 0 !important;
  margin: 0 0 8px !important;
  padding: 11px 13px !important;
  border-radius: 10px !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-position: initial !important;
  box-shadow: 0 10px 26px rgba(15,23,42,.12);
  font-size: 11px !important;
  font-weight: 700;
}
ul.messagelist li.success {
  background-color: #ecfdf5 !important;
  border: 1px solid #bbf7d0 !important;
  color: #047857 !important;
}

/* dashboard */
.hj-dashboard {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}
.hj-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 2px 18px;
}
.hj-dashboard-head h1 {
  margin: 0 0 7px !important;
  color: #0f172a !important;
  font-size: 29px !important;
  letter-spacing: -.035em !important;
}
.hj-dashboard-head > div > p:last-child {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}
.hj-dashboard-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.hj-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}
.hj-status-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
}
.hj-status-chip.is-online i { background: #10b981; }

.hj-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}
.hj-stat-card {
  min-height: 132px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15,23,42,.035);
}
.hj-stat-card span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.hj-stat-card strong {
  display: block;
  margin: 13px 0 6px;
  color: #0f172a;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -.04em;
}
.hj-stat-card small {
  color: #94a3b8;
  font-size: 10px;
}

.hj-dashboard-section {
  padding: 21px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15,23,42,.035);
  margin-bottom: 16px;
}
.hj-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 15px;
}
.hj-section-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}
.hj-section-note {
  color: #94a3b8;
  font-size: 10px;
}

.hj-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.hj-module-card {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0,1fr);
  gap: 12px;
  min-height: 102px;
  padding: 16px;
  border: 1px solid #edf1f6;
  border-radius: 13px;
  background: #fbfcfe;
}
.hj-module-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eaf2ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}
.hj-module-card strong {
  display: block;
  margin: 1px 0 5px;
  color: #1e293b;
  font-size: 12px;
}
.hj-module-card span {
  display: block;
  padding-right: 62px;
  color: #7c8ba0;
  font-size: 10px;
  line-height: 1.55;
}
.hj-module-card em {
  position: absolute;
  top: 15px;
  right: 14px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}
.hj-module-card em.is-ready {
  background: #ecfdf5;
  color: #047857;
}

.hj-dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.hj-dashboard-columns .hj-dashboard-section { margin-bottom: 0; }
.hj-quick-list {
  display: grid;
  gap: 8px;
}
.hj-quick-list a {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  column-gap: 10px;
  padding: 13px 14px;
  border: 1px solid #edf1f6;
  border-radius: 11px;
  color: #334155 !important;
  text-decoration: none !important;
  background: #fbfcfe;
}
.hj-quick-list a:hover {
  border-color: #bfdbfe;
  background: #f7faff;
}
.hj-quick-list span {
  font-size: 11px;
  font-weight: 800;
}
.hj-quick-list small {
  grid-column: 1;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 9px;
}
.hj-quick-list b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #3b82f6;
  font-size: 15px;
}

/* sidebar disabled planned items */
.tg-nav-disabled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px 9px 20px;
  border-radius: 9px;
  color: #78879b;
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}
.tg-nav-disabled small {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(148,163,184,.09);
  color: #64748b;
  font-size: 8px;
}

/* don't show native dashboard app module even if Django exposes it */
.hj-platform-dashboard .dashboard #content-main > .module {
  display: none !important;
}

@media (max-width: 1050px) {
  .hj-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hj-module-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .hj-dashboard-head { display: block; }
  .hj-dashboard-head-actions { justify-content: flex-start; margin-top: 14px; }
  .hj-stat-grid,
  .hj-module-grid,
  .hj-dashboard-columns { grid-template-columns: 1fr; }
  .tg-userbar-name { display: none; }
}


/* =========================================================
   恒金商城 V5.3 — 自定义皮肤 / 主题色
   ========================================================= */

/* Header becomes theme-colored instead of native white */
#header {
  background: var(--tg-header) !important;
  border-bottom-color: rgba(255,255,255,.18) !important;
  box-shadow: 0 4px 18px rgba(var(--tg-accent-rgb), .14);
}
.tg-brand-copy strong,
.tg-userbar,
.tg-userbar-name {
  color: #fff !important;
}
.tg-brand-mark {
  background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: none !important;
}
.tg-userbar-name,
.tg-userbar a,
.tg-logout-form button,
.tg-theme-trigger {
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.3) !important;
  color: #fff !important;
}
.tg-userbar a:hover,
.tg-logout-form button:hover,
.tg-theme-trigger:hover {
  background: rgba(255,255,255,.2) !important;
  border-color: rgba(255,255,255,.5) !important;
  color: #fff !important;
}
.tg-menu-button {
  color: #fff !important;
  border-color: rgba(255,255,255,.3) !important;
  background: rgba(255,255,255,.12) !important;
}

/* Theme color propagates to interactive surfaces */
.tg-sidebar-home:hover,
.tg-sidebar-home.is-active,
.tg-nav-children a:hover,
.tg-nav-children a.is-active {
  background: rgba(var(--tg-accent-rgb), .22) !important;
}
.tg-nav-dot {
  background: var(--tg-accent) !important;
  box-shadow: 0 0 0 4px rgba(var(--tg-accent-rgb), .12) !important;
}
.tg-eyebrow,
.hj-quick-list b,
.hj-module-icon,
a {
  color: var(--tg-accent);
}
.hj-module-icon,
.tg-app-icon {
  background: var(--tg-accent-soft) !important;
  color: var(--tg-accent-dark) !important;
}
.tg-mini-action {
  color: var(--tg-accent-dark) !important;
  background: var(--tg-accent-soft) !important;
}
.tg-status-chip,
.hj-status-chip {
  border-color: rgba(var(--tg-accent-rgb), .18);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--tg-accent) !important;
  outline-color: rgba(var(--tg-accent-rgb), .14) !important;
}
#changelist-filter li.selected a {
  color: var(--tg-accent) !important;
}

/* Theme trigger */
.tg-theme-trigger {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.tg-theme-trigger-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background:
    conic-gradient(
      #60a5fa 0 25%,
      #a78bfa 25% 50%,
      #34d399 50% 75%,
      #f472b6 75% 100%
    );
  border: 1px solid rgba(255,255,255,.72);
}

/* Right theme drawer */
.tg-theme-panel {
  position: fixed;
  z-index: 160;
  top: 78px;
  right: 18px;
  width: 318px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 16px;
  background: rgba(255,255,255,.98);
  color: #334155;
  box-shadow: 0 22px 60px rgba(15,23,42,.18);
  transform: translateX(calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}
body.tg-theme-open .tg-theme-panel {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.tg-theme-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 17px 14px;
  border-bottom: 1px solid #e5eaf0;
  background: rgba(248,250,252,.96);
  backdrop-filter: blur(12px);
}
.tg-theme-panel-head > div {
  display: grid;
  gap: 3px;
}
.tg-theme-panel-head span {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}
.tg-theme-panel-head small {
  color: #94a3b8;
  font-size: 9px;
}
.tg-theme-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #64748b !important;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.tg-theme-section {
  padding: 16px 17px 4px;
}
.tg-theme-section-title {
  margin-bottom: 11px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
}
.tg-theme-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.tg-theme-swatch {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0 !important;
  border: 4px solid #f1f5f9 !important;
  border-radius: 50% !important;
  background: var(--swatch) !important;
  box-shadow: 0 3px 10px rgba(15,23,42,.12) !important;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tg-theme-swatch::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-top: 10px solid rgba(255,255,255,.34);
  border-right: 10px solid rgba(15,23,42,.12);
  border-bottom: 10px solid rgba(15,23,42,.08);
  border-left: 10px solid rgba(255,255,255,.16);
  border-radius: 50%;
}
.tg-theme-swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15,23,42,.16) !important;
}
.tg-theme-swatch.is-active {
  outline: 3px solid rgba(var(--tg-accent-rgb), .18);
  outline-offset: 2px;
}
.tg-theme-custom-row {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
}
.tg-theme-color-picker {
  width: 42px;
  height: 38px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.tg-theme-color-picker input[type="color"] {
  width: 58px;
  height: 54px;
  margin: -8px;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  cursor: pointer;
}
.tg-theme-custom-row input[type="text"] {
  min-width: 0;
  height: 38px;
  padding: 0 10px !important;
  border-radius: 8px !important;
  text-transform: lowercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}
.tg-theme-apply,
.tg-theme-reset {
  min-height: 38px;
  padding: 0 11px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}
.tg-theme-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 17px 16px;
  border-top: 1px solid #eef2f7;
}
.tg-theme-panel-foot span {
  color: #94a3b8;
  font-size: 8px;
}
.tg-theme-reset {
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  color: #475569 !important;
}
.tg-theme-backdrop {
  display: none;
  position: fixed;
  z-index: 150;
  inset: 0;
  border: 0 !important;
  background: rgba(15,23,42,.12) !important;
}
body.tg-theme-open .tg-theme-backdrop {
  display: block;
}

/* Keep login page independent from backoffice skin header */
body.hj-space-auth-page #header,
body.tg-login-page #header {
  display: none !important;
}

@media (max-width: 800px) {
  .tg-theme-trigger span:last-child { display: none; }
  .tg-theme-trigger { width: 34px; padding: 0; justify-content: center; }
  .tg-theme-panel {
    top: 70px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 84px);
  }
  .tg-theme-swatches {
    grid-template-columns: repeat(5, minmax(0,1fr));
  }
  .tg-theme-swatch {
    width: 38px;
    height: 38px;
    justify-self: center;
  }
}


/* =========================================================
   恒金商城 V5.4 — 主色 / 辅色双主题
   ========================================================= */

/* PRIMARY: 主要架构 / 主行为 */
#header {
  background: var(--tg-primary) !important;
  box-shadow: 0 4px 18px rgba(var(--tg-primary-rgb), .16) !important;
}
.tg-brand-mark {
  background: rgba(255,255,255,.16) !important;
}
.tg-sidebar-home.is-active,
.tg-nav-children a.is-active {
  background: rgba(var(--tg-primary-rgb), .28) !important;
  color: #fff !important;
}
.tg-sidebar-home:hover,
.tg-nav-children a:hover {
  background: rgba(var(--tg-primary-rgb), .18) !important;
}
.tg-nav-dot {
  background: var(--tg-primary) !important;
  box-shadow: 0 0 0 4px rgba(var(--tg-primary-rgb), .14) !important;
}
.object-tools a,
input[type=submit],
button.button,
.button.default,
input.default,
.submit-row input.default,
.tg-theme-apply {
  background: var(--tg-primary) !important;
  color: #fff !important;
}
.object-tools a:hover,
input[type=submit]:hover,
button.button:hover,
.button.default:hover,
input.default:hover,
.submit-row input.default:hover,
.tg-theme-apply:hover {
  background: var(--tg-primary-dark) !important;
}
a,
.tg-eyebrow,
.hj-quick-list b,
#changelist-filter li.selected a {
  color: var(--tg-primary);
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--tg-primary) !important;
  outline-color: rgba(var(--tg-primary-rgb), .16) !important;
}

/* SECONDARY: 浅色辅助面 / 次行为 */
.hj-module-icon,
.tg-app-icon,
.tg-mini-action {
  background: var(--tg-secondary) !important;
  color: var(--tg-primary-dark) !important;
}
.hj-module-card,
.hj-quick-list a,
.tg-app-card-head,
.module h2,
.module caption,
.inline-group h2,
#changelist table thead th {
  border-color: var(--tg-secondary-strong) !important;
}
.hj-module-card {
  background: color-mix(in srgb, var(--tg-secondary) 54%, #ffffff 46%) !important;
}
.hj-quick-list a:hover,
.tg-app-card:hover {
  background: var(--tg-secondary) !important;
  border-color: var(--tg-secondary-strong) !important;
}
.hj-status-chip,
.tg-status-chip,
.tg-nav-disabled small {
  background: var(--tg-secondary) !important;
  border-color: var(--tg-secondary-strong) !important;
}
.tg-mini-action,
.tg-theme-auto-secondary,
.tg-theme-reset {
  border: 1px solid var(--tg-secondary-strong) !important;
}
.tg-theme-auto-secondary {
  background: var(--tg-secondary) !important;
  color: var(--tg-primary-dark) !important;
}
.tg-theme-auto-secondary:hover {
  background: var(--tg-secondary-strong) !important;
}
.tg-theme-pair.is-active {
  border-color: var(--tg-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--tg-primary-rgb), .11) !important;
}

/* Dual theme panel */
.tg-theme-pairs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
}
.tg-theme-pair {
  position: relative;
  display: grid;
  grid-template-columns: 22px 22px minmax(0,1fr);
  align-items: center;
  gap: 5px;
  min-height: 48px;
  padding: 7px 8px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #475569 !important;
  box-shadow: none !important;
  cursor: pointer;
}
.tg-theme-pair:hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}
.tg-theme-pair i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: block;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(15,23,42,.09);
}
.tg-theme-pair i:first-child { background: var(--pair-primary); }
.tg-theme-pair i:nth-child(2) { background: var(--pair-secondary); }
.tg-theme-pair span {
  min-width: 0;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.tg-theme-dual-editor {
  display: grid;
  gap: 14px;
}
.tg-theme-color-block {
  padding: 12px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  background: #fbfcfe;
}
.tg-theme-color-block .tg-theme-section-title {
  margin-bottom: 3px;
}
.tg-theme-help {
  display: block;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 8px;
  line-height: 1.45;
}
.tg-theme-dual-editor .tg-theme-custom-row {
  grid-template-columns: 42px minmax(0,1fr);
}
.tg-theme-auto-secondary {
  width: 100%;
  min-height: 33px;
  margin-top: 8px;
  padding: 0 9px !important;
  border-radius: 8px !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  cursor: pointer;
}
.tg-theme-actions {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
  padding: 14px 17px 4px;
}
.tg-theme-actions .tg-theme-apply,
.tg-theme-actions .tg-theme-reset {
  min-height: 38px;
  border-radius: 8px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}
.tg-theme-actions .tg-theme-reset {
  padding: 0 12px !important;
  background: #fff !important;
  color: #64748b !important;
}
.tg-theme-panel-foot {
  justify-content: flex-end !important;
  padding-top: 9px !important;
}

/* Old V5.3 swatch UI is obsolete in V5.4 */
.tg-theme-swatches,
.tg-theme-swatch {
  display: none !important;
}

@media (max-width: 800px) {
  .tg-theme-pairs { grid-template-columns: repeat(2, minmax(0,1fr)); }
}


/* =========================================================
   恒金商城 V5.5 — 主题入口下移 / 侧栏跟随主色 / 移除搜索
   ========================================================= */

/* Theme button now lives on Dashboard, not the top header. */
.tg-top-actions .tg-theme-trigger {
  display: none !important;
}

.hj-dashboard-theme-button {
  min-height: 31px;
  padding: 0 11px !important;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--tg-secondary-strong) !important;
  border-radius: 999px !important;
  background: var(--tg-secondary) !important;
  color: var(--tg-primary-dark) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
  cursor: pointer;
}
.hj-dashboard-theme-button:hover {
  border-color: rgba(var(--tg-primary-rgb), .28) !important;
  background: var(--tg-secondary-strong) !important;
}
.hj-dashboard-theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background:
    linear-gradient(
      135deg,
      var(--tg-primary) 0 50%,
      var(--tg-secondary) 50% 100%
    );
  border: 1px solid rgba(var(--tg-primary-rgb), .18);
}

/* The menu rail is part of the main architecture, so it follows Primary. */
:root {
  --tg-sidebar-theme: #24384f;
  --tg-sidebar-theme-strong: #18283a;
}

.tg-sidebar {
  background: var(--tg-sidebar-theme) !important;
  color: rgba(255,255,255,.86) !important;
  border-right: 1px solid rgba(255,255,255,.08);
  transition: background-color .18s ease;
}

.tg-sidebar-head,
.tg-nav-group > summary {
  color: rgba(255,255,255,.64) !important;
}

.tg-sidebar-home,
.tg-nav-children a {
  color: rgba(255,255,255,.86) !important;
}

.tg-sidebar-home:hover,
.tg-nav-children a:hover {
  background: rgba(255,255,255,.10) !important;
  color: #fff !important;
}

.tg-sidebar-home.is-active,
.tg-nav-children a.is-active {
  background: var(--tg-primary) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}

.tg-nav-dot {
  background: var(--tg-secondary) !important;
  box-shadow: 0 0 0 4px rgba(255,255,255,.08) !important;
}

.tg-nav-disabled {
  color: rgba(255,255,255,.54) !important;
}
.tg-nav-disabled small {
  background: var(--tg-secondary) !important;
  color: var(--tg-primary-dark) !important;
}

/* Search is intentionally removed from the platform navigation. */
.tg-sidebar-search {
  display: none !important;
}
.tg-sidebar-nav {
  margin-top: 4px !important;
}

/* Theme panel remains global, but the opener is on the dashboard. */
.hj-dashboard-theme-button + .hj-status-chip {
  margin-left: 2px;
}

@media (max-width: 760px) {
  .hj-dashboard-theme-button span:last-child {
    display: none;
  }
  .hj-dashboard-theme-button {
    width: 31px;
    padding: 0 !important;
    justify-content: center;
  }
}


/* =========================================================
   恒金商城 V5.6 — 首页直接主题预设 + 黑/白主题 + 字体放大
   ========================================================= */

/* Old theme drawer / trigger are retired. */
.tg-theme-panel,
.tg-theme-backdrop,
.tg-theme-trigger,
.hj-dashboard-theme-button {
  display: none !important;
}

/* ---------------------------------------------------------
   Global typography: one readable step larger
   --------------------------------------------------------- */
html {
  font-size: 15px;
}
body {
  font-size: 14px !important;
  line-height: 1.55;
}
.tg-brand-copy strong {
  font-size: 16px !important;
}
.tg-brand-copy small {
  font-size: 12px !important;
}
.tg-userbar,
.tg-userbar a,
.tg-logout-form button,
.tg-top-link {
  font-size: 12px !important;
}
.tg-sidebar-head {
  font-size: 12px !important;
}
.tg-sidebar-home,
.tg-nav-children a,
.tg-nav-disabled {
  font-size: 13px !important;
}
.tg-nav-group > summary {
  font-size: 12px !important;
}
.hj-dashboard-head h1 {
  font-size: 32px !important;
}
.hj-dashboard-head > div > p:last-child {
  font-size: 13px !important;
}
.tg-eyebrow {
  font-size: 11px !important;
}
.hj-stat-card span {
  font-size: 12px !important;
}
.hj-stat-card strong {
  font-size: 34px !important;
}
.hj-stat-card small {
  font-size: 11px !important;
}
.hj-section-head h2,
.hj-theme-home h2 {
  font-size: 20px !important;
}
.hj-section-note,
.hj-theme-home-head span {
  font-size: 11px !important;
}
.hj-module-card strong {
  font-size: 13px !important;
}
.hj-module-card span {
  font-size: 11px !important;
}
.hj-module-card em {
  font-size: 10px !important;
}
.hj-quick-list span {
  font-size: 12px !important;
}
.hj-quick-list small {
  font-size: 10px !important;
}
.hj-status-chip {
  font-size: 11px !important;
}
table,
.form-row,
.help,
p.help,
label,
input,
select,
textarea,
button {
  font-size: 13px;
}

/* ---------------------------------------------------------
   Theme presets live directly on Dashboard
   --------------------------------------------------------- */
.hj-theme-home {
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--tg-line);
  border-radius: 16px;
  background: var(--tg-panel);
  box-shadow: 0 5px 18px rgba(15,23,42,.035);
}
.hj-theme-home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}
.hj-theme-home-head h2 {
  margin: 0 0 3px;
  color: var(--tg-text);
}
.hj-theme-home-head span {
  color: var(--tg-muted);
}
.hj-theme-reset-inline {
  min-height: 34px;
  padding: 0 12px !important;
  border: 1px solid var(--tg-line) !important;
  border-radius: 9px !important;
  background: var(--tg-panel-soft) !important;
  color: var(--tg-text) !important;
  font-weight: 800 !important;
  cursor: pointer;
}
.hj-theme-preset-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(84px, 1fr));
  gap: 8px;
}
.hj-theme-preset {
  min-height: 55px;
  padding: 8px 9px !important;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--tg-line) !important;
  border-radius: 11px !important;
  background: var(--tg-panel-soft) !important;
  color: var(--tg-text) !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.hj-theme-preset:hover {
  transform: translateY(-1px);
  border-color: var(--tg-secondary-strong) !important;
}
.hj-theme-preset.is-active {
  border-color: var(--tg-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--tg-primary-rgb), .10) !important;
}
.hj-theme-preset b {
  font-size: 11px;
  white-space: nowrap;
}
.hj-theme-preview {
  display: flex;
  align-items: center;
  min-width: 34px;
}
.hj-theme-preview i {
  width: 20px;
  height: 20px;
  display: block;
  border-radius: 50%;
  border: 2px solid var(--tg-panel);
  box-shadow: 0 0 0 1px rgba(15,23,42,.09);
}
.hj-theme-preview i:first-child {
  background: var(--preview-primary);
  z-index: 1;
}
.hj-theme-preview i:last-child {
  margin-left: -6px;
  background: var(--preview-secondary);
}
.hj-theme-custom-inline {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) auto auto;
  gap: 9px;
  align-items: end;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--tg-line);
}
.hj-theme-custom-inline label {
  display: grid;
  grid-template-columns: auto 38px minmax(90px, 1fr);
  align-items: center;
  gap: 7px;
}
.hj-theme-custom-inline label > span {
  color: var(--tg-muted);
  font-size: 11px;
  font-weight: 800;
}
.hj-theme-custom-inline input[type="color"] {
  width: 38px;
  height: 34px;
  padding: 2px !important;
  border: 1px solid var(--tg-line) !important;
  border-radius: 8px !important;
  background: var(--tg-panel) !important;
}
.hj-theme-custom-inline input[type="text"] {
  height: 34px;
  padding: 0 9px !important;
  border: 1px solid var(--tg-line) !important;
  border-radius: 8px !important;
  background: var(--tg-panel) !important;
  color: var(--tg-text) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hj-theme-auto-inline,
.hj-theme-apply-inline {
  min-height: 34px;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-weight: 900 !important;
  cursor: pointer;
}
.hj-theme-auto-inline {
  border: 1px solid var(--tg-secondary-strong) !important;
  background: var(--tg-secondary) !important;
  color: var(--tg-primary-dark) !important;
}
.hj-theme-apply-inline {
  border: 1px solid var(--tg-primary) !important;
  background: var(--tg-primary) !important;
  color: #fff !important;
}

/* ---------------------------------------------------------
   White Theme
   --------------------------------------------------------- */
html[data-hj-theme-mode="white"] {
  --tg-bg: #ffffff;
  --tg-panel: #ffffff;
  --tg-panel-soft: #f8fafc;
  --tg-text: #111827;
  --tg-muted: #64748b;
  --tg-line: #e5e7eb;
  --tg-primary: #ffffff;
  --tg-primary-dark: #e5e7eb;
  --tg-primary-rgb: 255,255,255;
  --tg-secondary: #f4f6f8;
  --tg-secondary-strong: #e5e7eb;
  --tg-secondary-rgb: 244,246,248;
  --tg-header: #ffffff;
}
html[data-hj-theme-mode="white"] #header {
  color: #111827 !important;
  border-bottom-color: #e5e7eb !important;
  box-shadow: 0 2px 12px rgba(15,23,42,.06) !important;
}
html[data-hj-theme-mode="white"] .tg-brand,
html[data-hj-theme-mode="white"] .tg-brand-copy strong,
html[data-hj-theme-mode="white"] .tg-userbar,
html[data-hj-theme-mode="white"] .tg-userbar-name,
html[data-hj-theme-mode="white"] .tg-userbar a,
html[data-hj-theme-mode="white"] .tg-logout-form button,
html[data-hj-theme-mode="white"] .tg-top-link {
  color: #111827 !important;
}
html[data-hj-theme-mode="white"] .tg-brand-copy small {
  color: #64748b !important;
}
html[data-hj-theme-mode="white"] .tg-brand-mark {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #e2e8f0 !important;
}
html[data-hj-theme-mode="white"] .tg-userbar-name,
html[data-hj-theme-mode="white"] .tg-userbar a,
html[data-hj-theme-mode="white"] .tg-logout-form button,
html[data-hj-theme-mode="white"] .tg-top-link {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
html[data-hj-theme-mode="white"] .tg-sidebar {
  background: #f8fafc !important;
  border-right-color: #e5e7eb !important;
}
html[data-hj-theme-mode="white"] .tg-sidebar-head,
html[data-hj-theme-mode="white"] .tg-nav-group > summary,
html[data-hj-theme-mode="white"] .tg-sidebar-home,
html[data-hj-theme-mode="white"] .tg-nav-children a {
  color: #475569 !important;
}
html[data-hj-theme-mode="white"] .tg-sidebar-home.is-active,
html[data-hj-theme-mode="white"] .tg-nav-children a.is-active {
  background: #e9eef5 !important;
  color: #111827 !important;
}
html[data-hj-theme-mode="white"] a,
html[data-hj-theme-mode="white"] .tg-eyebrow,
html[data-hj-theme-mode="white"] .hj-quick-list b {
  color: #475569;
}

/* ---------------------------------------------------------
   Black Theme
   --------------------------------------------------------- */
html[data-hj-theme-mode="dark"] {
  color-scheme: dark;
  --tg-bg: #0a0f18;
  --tg-panel: #111827;
  --tg-panel-soft: #172033;
  --tg-text: #e5edf7;
  --tg-muted: #9aa8bb;
  --tg-line: #273449;
  --tg-primary: #111827;
  --tg-primary-dark: #070b12;
  --tg-primary-rgb: 17,24,39;
  --tg-secondary: #1f2937;
  --tg-secondary-strong: #334155;
  --tg-secondary-rgb: 31,41,55;
  --tg-header: #090e16;
}
html[data-hj-theme-mode="dark"] body,
html[data-hj-theme-mode="dark"] #container,
html[data-hj-theme-mode="dark"] .main {
  background: var(--tg-bg) !important;
  color: var(--tg-text) !important;
}
html[data-hj-theme-mode="dark"] #header {
  background: #090e16 !important;
  border-bottom-color: #263246 !important;
}
html[data-hj-theme-mode="dark"] .tg-sidebar {
  background: #0d1420 !important;
  border-right-color: #263246 !important;
}
html[data-hj-theme-mode="dark"] .tg-sidebar-home.is-active,
html[data-hj-theme-mode="dark"] .tg-nav-children a.is-active {
  background: #334155 !important;
}
html[data-hj-theme-mode="dark"] .hj-stat-card,
html[data-hj-theme-mode="dark"] .hj-dashboard-section,
html[data-hj-theme-mode="dark"] .hj-theme-home,
html[data-hj-theme-mode="dark"] .hj-module-card,
html[data-hj-theme-mode="dark"] .hj-quick-list a,
html[data-hj-theme-mode="dark"] .module,
html[data-hj-theme-mode="dark"] .inline-group,
html[data-hj-theme-mode="dark"] #changelist-filter,
html[data-hj-theme-mode="dark"] .submit-row {
  background: var(--tg-panel) !important;
  border-color: var(--tg-line) !important;
  color: var(--tg-text) !important;
}
html[data-hj-theme-mode="dark"] .hj-module-card,
html[data-hj-theme-mode="dark"] .hj-quick-list a,
html[data-hj-theme-mode="dark"] .hj-theme-preset {
  background: var(--tg-panel-soft) !important;
}
html[data-hj-theme-mode="dark"] h1,
html[data-hj-theme-mode="dark"] h2,
html[data-hj-theme-mode="dark"] h3,
html[data-hj-theme-mode="dark"] .hj-stat-card strong,
html[data-hj-theme-mode="dark"] .hj-module-card strong,
html[data-hj-theme-mode="dark"] .hj-quick-list span {
  color: var(--tg-text) !important;
}
html[data-hj-theme-mode="dark"] a,
html[data-hj-theme-mode="dark"] .tg-eyebrow,
html[data-hj-theme-mode="dark"] .hj-quick-list b {
  color: #93c5fd;
}
html[data-hj-theme-mode="dark"] input,
html[data-hj-theme-mode="dark"] select,
html[data-hj-theme-mode="dark"] textarea {
  background: #0f172a !important;
  color: #e5edf7 !important;
  border-color: #334155 !important;
}
html[data-hj-theme-mode="dark"] table,
html[data-hj-theme-mode="dark"] tbody,
html[data-hj-theme-mode="dark"] tr,
html[data-hj-theme-mode="dark"] td,
html[data-hj-theme-mode="dark"] th {
  background: transparent !important;
  color: var(--tg-text) !important;
  border-color: #273449 !important;
}
html[data-hj-theme-mode="dark"] .hj-theme-apply-inline {
  background: #475569 !important;
  border-color: #64748b !important;
}

/* ---------------------------------------------------------
   Color presets remain light UI with Primary/Secondary split
   --------------------------------------------------------- */
html[data-hj-theme-mode="color"] {
  color-scheme: light;
  --tg-bg: #f4f7fb;
  --tg-panel: #ffffff;
  --tg-panel-soft: #f8fafc;
  --tg-text: #0f172a;
  --tg-muted: #64748b;
  --tg-line: #e2e8f0;
}

/* Responsive theme strip */
@media (max-width: 1420px) {
  .hj-theme-preset-row {
    grid-template-columns: repeat(5, minmax(100px, 1fr));
  }
}
@media (max-width: 920px) {
  .hj-theme-preset-row {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .hj-theme-custom-inline {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .hj-theme-preset-row,
  .hj-theme-custom-inline {
    grid-template-columns: 1fr;
  }
  .hj-theme-home-head {
    align-items: flex-start;
  }
}


/* =========================================================
   恒金商城 V5.7 — 高對比導覽 / 字體加大 / 首頁滿版
   ========================================================= */

:root {
  --tg-primary-contrast: #ffffff;
  --tg-secondary-contrast: #0f172a;
  --tg-sidebar-text: #ffffff;
  --tg-sidebar-muted: #cbd5e1;
}

/* ---------------------------------------------------------
   Dashboard uses all available space.
   --------------------------------------------------------- */
.hj-platform-dashboard #content-start {
  width: 100% !important;
  max-width: none !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}
.hj-platform-dashboard #content,
.hj-platform-dashboard #content-main {
  width: 100% !important;
  max-width: none !important;
}
.hj-dashboard {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ---------------------------------------------------------
   Typography: one more step larger than V5.6.
   --------------------------------------------------------- */
html {
  font-size: 17px !important;
}
body {
  font-size: 15px !important;
  line-height: 1.58 !important;
}
.tg-brand-copy strong { font-size: 18px !important; }
.tg-brand-copy small { font-size: 13px !important; }

.tg-userbar,
.tg-userbar a,
.tg-logout-form button,
.tg-top-link {
  font-size: 13px !important;
}

.tg-sidebar-head { font-size: 13px !important; }
.tg-sidebar-home,
.tg-nav-children a,
.tg-nav-disabled {
  font-size: 15px !important;
}
.tg-nav-group > summary { font-size: 13px !important; }
.tg-nav-disabled small { font-size: 10px !important; }

.hj-dashboard-head h1 { font-size: 36px !important; }
.hj-dashboard-head > div > p:last-child { font-size: 14px !important; }
.tg-eyebrow { font-size: 12px !important; }

.hj-theme-home-head span,
.hj-section-note { font-size: 12px !important; }
.hj-theme-preset b { font-size: 12px !important; }
.hj-theme-custom-inline label > span { font-size: 12px !important; }
.hj-theme-custom-inline input,
.hj-theme-auto-inline,
.hj-theme-apply-inline,
.hj-theme-reset-inline {
  font-size: 13px !important;
}

.hj-stat-card span { font-size: 13px !important; }
.hj-stat-card strong { font-size: 38px !important; }
.hj-stat-card small { font-size: 12px !important; }

.hj-section-head h2,
.hj-theme-home h2 { font-size: 22px !important; }
.hj-module-card strong { font-size: 15px !important; }
.hj-module-card span { font-size: 13px !important; }
.hj-module-card em { font-size: 11px !important; }

.hj-quick-list span { font-size: 14px !important; }
.hj-quick-list small { font-size: 11px !important; }
.hj-status-chip { font-size: 12px !important; }

table,
.form-row,
.help,
p.help,
label,
input,
select,
textarea,
button,
.button {
  font-size: 14px !important;
}

/* ---------------------------------------------------------
   All menu levels use calculated contrast colors.
   No menu group keeps a hard-coded white/gray text color.
   --------------------------------------------------------- */
.tg-sidebar {
  color: var(--tg-sidebar-text) !important;
}
.tg-sidebar-head,
.tg-nav-group > summary,
.tg-chevron {
  color: var(--tg-sidebar-muted) !important;
}
.tg-sidebar-home,
.tg-nav-children a {
  color: var(--tg-sidebar-text) !important;
}
.tg-nav-disabled {
  color: var(--tg-sidebar-muted) !important;
}
.tg-sidebar-home:hover,
.tg-nav-children a:hover {
  color: var(--tg-sidebar-text) !important;
}
.tg-sidebar-home.is-active,
.tg-nav-children a.is-active {
  color: var(--tg-primary-contrast) !important;
}
.tg-nav-disabled small {
  color: var(--tg-secondary-contrast) !important;
}

/* Header / primary buttons also remain readable if a pale custom primary is used. */
#header,
#header a,
.tg-brand,
.tg-brand-copy strong,
.tg-brand-copy small,
.tg-userbar,
.tg-userbar-name,
.tg-userbar a,
.tg-logout-form button,
.tg-top-link {
  color: var(--tg-primary-contrast) !important;
}
.object-tools a,
input[type=submit],
button.button,
.button.default,
input.default,
.submit-row input.default,
.hj-theme-apply-inline {
  color: var(--tg-primary-contrast) !important;
}

/* Secondary surfaces use their own contrast color. */
.hj-module-icon,
.tg-app-icon,
.tg-mini-action,
.hj-theme-auto-inline,
.tg-nav-disabled small {
  color: var(--tg-secondary-contrast) !important;
}

/* White theme explicitly uses dark readable navigation. */
html[data-hj-theme-mode="white"] {
  --tg-primary-contrast: #111827;
  --tg-secondary-contrast: #111827;
  --tg-sidebar-text: #334155;
  --tg-sidebar-muted: #64748b;
}
html[data-hj-theme-mode="white"] .tg-sidebar-home.is-active,
html[data-hj-theme-mode="white"] .tg-nav-children a.is-active {
  color: #111827 !important;
}

/* Black theme explicitly uses light readable navigation. */
html[data-hj-theme-mode="dark"] {
  --tg-primary-contrast: #f8fafc;
  --tg-secondary-contrast: #f8fafc;
  --tg-sidebar-text: #f8fafc;
  --tg-sidebar-muted: #aab7c9;
}

/* More generous cards after typography increase. */
.hj-stat-card { min-height: 142px !important; }
.hj-module-card { min-height: 112px !important; }
.hj-quick-list a { padding-top: 15px !important; padding-bottom: 15px !important; }

@media (max-width: 900px) {
  .hj-platform-dashboard #content-start {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}


/* =========================================================
   恒金商城 V5.8 — 側欄寬度 / 母子層級 / 子項目顏色統一
   ========================================================= */

/* Wider rail: Traditional Chinese labels should not wrap. */
#nav-sidebar {
  width: 304px !important;
  flex: 0 0 304px !important;
}
.tg-sidebar {
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* Clear hierarchy:
   - Navigation label = smallest
   - Parent group = larger / stronger
   - Child item = slightly smaller than parent
*/
.tg-sidebar-head {
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
}

.tg-nav-group > summary {
  min-height: 42px;
  padding: 9px 10px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  color: var(--tg-sidebar-text) !important;
  cursor: pointer;
}

.tg-nav-children {
  display: grid;
  gap: 2px;
  padding: 2px 0 8px;
}

.tg-nav-children a,
.tg-nav-disabled {
  min-height: 38px;
  padding: 8px 10px 8px 20px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 9px;
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

/* Critical fix:
   disabled platform children and clickable children use the SAME text color.
   Only the small status pill uses Secondary.
*/
.tg-nav-children a,
.tg-nav-children a > span,
.tg-nav-disabled,
.tg-nav-disabled > span {
  color: var(--tg-sidebar-text) !important;
  opacity: 1 !important;
}

.tg-nav-disabled {
  cursor: default;
}

.tg-nav-disabled small {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 3px 7px !important;
  border-radius: 999px;
  background: var(--tg-secondary) !important;
  border: 1px solid var(--tg-secondary-strong) !important;
  color: var(--tg-secondary-contrast) !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  white-space: nowrap;
}

/* Home is a top-level item, same visual weight as parent groups. */
.tg-sidebar-home {
  min-height: 44px;
  padding: 9px 10px !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
}

/* Parent label should stay readable even on pale themes. */
html[data-hj-theme-mode="white"] .tg-nav-group > summary {
  color: var(--tg-sidebar-text) !important;
}
html[data-hj-theme-mode="dark"] .tg-nav-group > summary {
  color: var(--tg-sidebar-text) !important;
}

/* Keep content responsive after the wider rail. */
@media (max-width: 1180px) {
  #nav-sidebar {
    width: 280px !important;
    flex-basis: 280px !important;
  }
}

@media (max-width: 800px) {
  #nav-sidebar {
    width: 286px !important;
    flex-basis: 286px !important;
    left: -300px;
  }
}


/* =========================================================
   恒金商城 V5.9 — 白色主題導覽修正 + Owner 開發日誌
   ========================================================= */

/* White theme: hard contrast, independent from inline color-mode variables. */
html[data-hj-theme-mode="white"] .tg-sidebar {
  background: #f8fafc !important;
  color: #334155 !important;
}
html[data-hj-theme-mode="white"] .tg-sidebar-head,
html[data-hj-theme-mode="white"] .tg-nav-group > summary,
html[data-hj-theme-mode="white"] .tg-nav-group > summary span,
html[data-hj-theme-mode="white"] .tg-chevron,
html[data-hj-theme-mode="white"] .tg-sidebar-home,
html[data-hj-theme-mode="white"] .tg-sidebar-home span,
html[data-hj-theme-mode="white"] .tg-nav-children a,
html[data-hj-theme-mode="white"] .tg-nav-children a > span,
html[data-hj-theme-mode="white"] .tg-nav-disabled,
html[data-hj-theme-mode="white"] .tg-nav-disabled > span {
  color: #334155 !important;
  opacity: 1 !important;
}
html[data-hj-theme-mode="white"] .tg-sidebar-head,
html[data-hj-theme-mode="white"] .tg-nav-group > summary,
html[data-hj-theme-mode="white"] .tg-chevron {
  color: #64748b !important;
}
html[data-hj-theme-mode="white"] .tg-sidebar-home:hover,
html[data-hj-theme-mode="white"] .tg-nav-children a:hover {
  background: #eef2f7 !important;
  color: #111827 !important;
}
html[data-hj-theme-mode="white"] .tg-sidebar-home.is-active,
html[data-hj-theme-mode="white"] .tg-nav-children a.is-active {
  background: #e4eaf2 !important;
  color: #111827 !important;
}
html[data-hj-theme-mode="white"] .tg-nav-disabled small {
  background: #eef2f7 !important;
  border-color: #d9e0e9 !important;
  color: #334155 !important;
}

/* Owner Development Log */
.hj-development-log-page #content-start {
  width: 100% !important;
  max-width: none !important;
  padding: 22px 22px 42px !important;
}
.hj-development-log-page #content {
  width: 100% !important;
  max-width: none !important;
}
.hj-devlog {
  width: 100%;
  max-width: none;
}
.hj-devlog-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  padding: 4px 2px 18px;
}
.hj-devlog-hero h1 {
  margin: 0 0 6px;
  color: var(--tg-text);
  font-size: 34px;
}
.hj-devlog-hero p:last-child {
  margin: 0;
  color: var(--tg-muted);
  font-size: 13px;
}
.hj-devlog-progress {
  min-width: 200px;
  padding: 14px 16px;
  border: 1px solid var(--tg-line);
  border-radius: 14px;
  background: var(--tg-panel);
  text-align: right;
}
.hj-devlog-progress strong {
  display: block;
  color: var(--tg-primary);
  font-size: 30px;
}
.hj-devlog-progress span {
  color: var(--tg-muted);
  font-size: 11px;
}
.hj-devlog-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.hj-devlog-summary article {
  padding: 15px 16px;
  border: 1px solid var(--tg-line);
  border-radius: 13px;
  background: var(--tg-panel);
}
.hj-devlog-summary span {
  display: block;
  color: var(--tg-muted);
  font-size: 11px;
  font-weight: 800;
}
.hj-devlog-summary strong {
  display: block;
  margin-top: 7px;
  color: var(--tg-text);
  font-size: 22px;
}
.hj-devtree {
  padding: 14px;
  border: 1px solid var(--tg-line);
  border-radius: 16px;
  background: var(--tg-panel);
}
.hj-devtree-row {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  gap: 10px;
  min-height: 50px;
  margin-left: calc(var(--tree-level) * 26px);
  padding: 8px 10px;
  border-radius: 10px;
}
.hj-devtree-row:hover {
  background: var(--tg-panel-soft);
}
.hj-devtree-row.level-0 {
  margin-left: 0;
  background: var(--tg-secondary);
  border: 1px solid var(--tg-secondary-strong);
}
.hj-devtree-row.level-1 {
  margin-top: 6px;
  background: color-mix(in srgb, var(--tg-secondary) 46%, transparent);
}
.hj-devtree-row.level-2::before {
  content: "";
  position: absolute;
  left: -13px;
  top: -8px;
  bottom: -8px;
  width: 1px;
  background: var(--tg-line);
}
.hj-devtree-row.level-2::after {
  content: "";
  position: absolute;
  left: -13px;
  top: 25px;
  width: 13px;
  height: 1px;
  background: var(--tg-line);
}
.hj-devtree-check {
  display: grid;
  place-items: center;
}
.hj-devtree-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  opacity: 1;
  accent-color: var(--tg-primary);
}
.hj-devtree-branch {
  color: var(--tg-primary);
  font-weight: 900;
}
.hj-devtree-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.hj-devtree-title-row strong {
  color: var(--tg-text);
  font-size: 14px;
}
.hj-devtree-row.level-0 .hj-devtree-title-row strong {
  font-size: 17px;
}
.hj-devtree-row.level-1 .hj-devtree-title-row strong {
  font-size: 15px;
}
.hj-devtree-body small {
  display: block;
  margin-top: 3px;
  color: var(--tg-muted);
  font-size: 11px;
}
.hj-dev-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}
.hj-dev-status.done {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
}
.hj-dev-status.doing {
  background: var(--tg-secondary);
  color: var(--tg-secondary-contrast);
  border: 1px solid var(--tg-secondary-strong);
}
.hj-dev-status.todo {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.hj-devlog-rule {
  margin-top: 16px;
  padding: 17px 18px;
  border: 1px solid var(--tg-line);
  border-radius: 14px;
  background: var(--tg-panel);
}
.hj-devlog-rule h2 {
  margin: 0 0 10px;
  color: var(--tg-text);
  font-size: 18px;
}
.hj-devlog-rule p {
  margin: 6px 0;
  color: var(--tg-muted);
  font-size: 12px;
}

html[data-hj-theme-mode="dark"] .hj-dev-status.todo {
  background: #1f2937;
  color: #cbd5e1;
  border-color: #334155;
}

@media (max-width: 900px) {
  .hj-devlog-hero { display: block; }
  .hj-devlog-progress { margin-top: 14px; text-align: left; }
  .hj-devlog-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hj-devtree-row { margin-left: calc(var(--tree-level) * 16px); }
}
