.personal-home-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 42px;
  margin: 0 16px 16px;
  padding: 8px 10px;
  border: 1px solid #dbe7f8;
  border-radius: 7px;
  background: #f4f8ff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.personal-home-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.personal-home-link:hover { background: #e8f1ff; border-color: #b5cff5; }
.personal-home-link:focus-visible { outline: 3px solid #a5c9ff; outline-offset: 2px; }
[data-personal-center] > main { min-width: 0; }
.personal-center-header { height: auto; min-height: 56px; flex-wrap: wrap; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.personal-header-actions { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; min-width: 0; }
.personal-logout { position: relative; flex-shrink: 0; }
.personal-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #dbe7f3;
  border-radius: 6px;
  background: #fff;
  color: #41566e;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.personal-logout-button svg { width: 16px; height: 16px; flex-shrink: 0; }
.personal-logout-button:hover { background: #f0f6fc; color: #125ca7; border-color: #bfd3e9; }
.personal-logout-button:focus-visible { outline: 2px solid #125ca7; outline-offset: 3px; }
.personal-logout-button:disabled { opacity: .6; cursor: wait; }
.personal-logout-error {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff;
  color: #b42318;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 4px 16px #19334f14;
}
@media (max-width: 640px) {
  [data-personal-center] > aside { width: 136px; flex-shrink: 0; }
  .personal-center-header { padding-left: 10px; padding-right: 10px; }
  .personal-center-header > div:first-child { flex-wrap: wrap; font-size: 12px; gap: 4px; }
  .personal-header-actions { gap: 6px; }
  .personal-header-actions .personal-header-shortcut { display: none; }
  .personal-header-actions > div:first-child { padding-left: 8px; padding-right: 8px; }
  .personal-logout-button { padding: 6px 8px; font-size: 12px; }
}
.sg-header {
  --sg-ink: #19334f;
  --sg-primary: #125ca7;
  --sg-line: #e5edf5;
  --sg-tint: #eef5fc;
  position: relative;
  z-index: 70;
  width: 100%;
  height: 64px;
  min-height: 64px;
  flex-shrink: 0;
  color: var(--sg-ink);
  background: #fff;
  border-bottom: 1px solid var(--sg-line);
  box-shadow: 0 3px 16px #19334f05;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
.sg-header, .sg-header * { box-sizing: border-box; }
.sg-header-fixed { position: fixed; inset: 0 0 auto; }
.sg-header-inner {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  align-items: center;
  gap: 24px;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px;
}
.sg-brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; min-width: 0; text-decoration: none; }
.sg-brand-mark { position: relative; display: block; width: 42px; height: 40px; overflow: hidden; flex-shrink: 0; }
/* The supplied square logo includes a wordmark; its symbol pairs with legible live text here. */
.sg-brand-mark img { position: absolute; display: block; width: 54px; height: 54px; max-width: none; left: -6px; top: -2px; clip-path: inset(14% 6% 34% 9%); }
.sg-brand-copy { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.sg-brand-name { color: var(--sg-ink); font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: .5px; }
.sg-brand-caption { color: #71869b; font-size: 8px; font-weight: 500; line-height: 1.2; letter-spacing: 1px; }
.sg-navigation { display: flex; align-items: center; justify-content: center; gap: 4px; height: 100%; white-space: nowrap; }
.sg-nav-link { position: relative; display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 13px; border-radius: 7px; color: #46596e; text-decoration: none; font-size: 14px; font-weight: 500; transition: background-color .15s, color .15s; }
.sg-nav-link:hover { color: var(--sg-primary); background: #f5f8fc; }
.sg-nav-link.is-active { color: var(--sg-primary); background: var(--sg-tint); font-weight: 600; }
.sg-nav-link.is-active::after { content: ""; position: absolute; width: 18px; height: 3px; left: calc(50% - 9px); bottom: -12px; border-radius: 3px 3px 0 0; background: var(--sg-primary); }
.sg-header-actions { display: flex; align-items: center; justify-content: flex-end; justify-self: end; gap: 10px; min-width: 0; }
.sg-account { position: relative; min-width: 0; }
.sg-header button { font-family: inherit; cursor: pointer; }
.sg-account-button { display: flex; align-items: center; gap: 9px; min-height: 40px; max-width: 220px; padding: 4px 10px 4px 5px; border: 1px solid var(--sg-line); border-radius: 24px; background: #fafcfe; color: #41566e; font-size: 13px; transition: border-color .15s, background-color .15s; }
.sg-account-button:hover, .sg-account-button[aria-expanded="true"] { border-color: #bfd3e9; background: var(--sg-tint); }
.sg-avatar { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; border: 1px solid #d8e6f5; border-radius: 50%; background: linear-gradient(135deg, #f2f9ff, #e0edf9); color: var(--sg-primary); font-size: 13px; font-weight: 600; }
.sg-user-icon { width: 17px; height: 17px; }
.sg-user-name { min-width: 0; max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sg-account-chevron { flex-shrink: 0; width: 14px; height: 14px; color: #8294a8; transition: transform .15s; }
.sg-account-button[aria-expanded="true"] .sg-account-chevron { transform: rotate(180deg); }
.sg-login { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 18px; border: 1px solid var(--sg-primary); border-radius: 7px; background: var(--sg-primary); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background-color .15s; }
.sg-login:hover { background: #0c4e91; }
.sg-account-menu { position: absolute; top: calc(100% + 12px); right: 0; width: 224px; max-width: calc(100vw - 32px); padding: 6px; border: 1px solid var(--sg-line); border-radius: 12px; background: #fff; box-shadow: 0 12px 36px #19334f1a; color: #41566e; }
.sg-account-summary { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 14px; margin-bottom: 5px; border-bottom: 1px solid #edf1f6; }
.sg-account-summary span { color: #8294a8; font-size: 11px; }
.sg-account-summary strong { color: var(--sg-ink); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.sg-account-menu button { display: block; width: 100%; padding: 11px 12px; border: 0; border-radius: 6px; background: transparent; color: #41566e; text-align: left; font-size: 13px; }
.sg-account-menu button:hover { background: var(--sg-tint); color: var(--sg-primary); }
.sg-account-menu button:disabled { opacity: .6; cursor: wait; }
.sg-header-error { margin: 6px 12px 10px; color: #b42318; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.sg-menu-toggle { display: none; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; padding: 9px; border: 1px solid var(--sg-line); border-radius: 8px; background: #fff; color: var(--sg-ink); }
.sg-menu-toggle:hover { background: var(--sg-tint); }
.sg-menu-icon { display: block; width: 20px; height: 20px; }
.sg-header a:focus-visible, .sg-header button:focus-visible { outline: 2px solid var(--sg-primary); outline-offset: 3px; }
.sg-legacy-menu { display: none !important; }
@media (max-width: 1200px) {
  .sg-header-inner { gap: 16px; padding: 0 24px; grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr); }
  .sg-nav-link { padding: 0 10px; }
  .sg-brand-name { font-size: 17px; }
  .sg-brand-caption { letter-spacing: .6px; }
  .sg-user-name { max-width: 105px; }
}
@media (max-width: 1080px) {
  .sg-header-inner { grid-template-columns: minmax(0, 1fr) auto; padding: 0 20px; }
  .sg-navigation { display: none; position: absolute; top: 72px; left: 20px; right: 20px; height: auto; padding: 10px; border: 1px solid var(--sg-line); border-radius: 12px; background: #fff; box-shadow: 0 12px 32px #19334f1a; gap: 6px; white-space: normal; }
  .sg-navigation.is-open { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sg-nav-link { height: 44px; justify-content: flex-start; padding: 0 16px; }
  .sg-nav-link.is-active::after { display: none; }
  .sg-menu-toggle { display: flex; }
}
@media (max-width: 600px) {
  .sg-header-inner { padding: 0 14px; gap: 12px; }
  .sg-brand { gap: 7px; }
  .sg-brand-mark { width: 34px; height: 32px; }
  .sg-brand-mark img { width: 44px; height: 44px; left: -5px; top: -1px; }
  .sg-brand-name { font-size: 16px; letter-spacing: 0; }
  .sg-brand-caption { display: none; }
  .sg-header-actions { gap: 7px; }
  .sg-user-name { display: none; }
  .sg-account-button { gap: 3px; min-height: 38px; padding: 3px 7px 3px 3px; }
  .sg-avatar { width: 28px; height: 28px; }
  .sg-account-chevron { width: 12px; height: 12px; }
  .sg-menu-toggle { width: 38px; height: 38px; padding: 8px; }
  .sg-navigation { left: 14px; right: 14px; }
  .sg-navigation.is-open { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-account-menu { right: -45px; }
  .sg-login { min-height: 36px; padding: 0 11px; font-size: 12px; }
}
@media (max-width: 360px) {
  .sg-header-inner { padding: 0 10px; gap: 8px; }
  .sg-brand-name { font-size: 14px; }
  .sg-brand { gap: 5px; }
  .sg-header-actions { gap: 5px; }
  .sg-login { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .sg-header *, .sg-header *::after { transition: none; }
}
.sg-quick-login { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e5edf5; text-align: left; color: #19334f; }
.sg-quick-login h3 { margin: 0; font-size: 15px; font-weight: 600; }
.sg-quick-intro { margin: 6px 0 12px; font-size: 12px; line-height: 1.6; color: #71869b; }
.sg-quick-accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sg-quick-accounts button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; border: 1px solid #d9e5f1; border-radius: 8px; padding: 12px; background: #f7fbff; cursor: pointer; text-align: left; }
.sg-quick-accounts button:hover { background: #edf5ff; border-color: #91b8de; }
.sg-quick-login button:disabled { opacity: .55; cursor: wait; }
.sg-quick-login button:focus-visible { outline: 2px solid #125ca7; outline-offset: 3px; }
.sg-quick-role { font-size: 14px; font-weight: 600; }
.sg-quick-username { font-size: 12px; color: #64748b; overflow-wrap: anywhere; }
.sg-quick-action { font-size: 12px; color: #125ca7; }
.sg-quick-error { margin: 12px 0 0; color: #b42318; font-size: 13px; line-height: 1.6; }
@media (max-width: 1023px) {
  .sg-login-dialog { max-height: calc(100dvh - 32px); }
  .sg-login-brand { height: 150px; min-height: 150px; flex-shrink: 0; }
  .sg-login-brand > div { padding: 16px; }
  .sg-login-brand > div > div:first-child { margin-bottom: 12px; }
  .sg-login-brand h2 { font-size: 18px; line-height: 1.5; margin: 0; max-width: none; }
  .sg-login-brand .mt-auto { display: none; }
  .sg-login-form { min-height: 0; align-items: flex-start; }
  .sg-login-form > div { max-width: none; }
}
