:root {
  --red: #b61f2e;
  --red-dark: #8e1724;
  --ink: #1d2d33;
  --muted: #738187;
  --line: #e5e9ea;
  --canvas: #f6f8fa;
  --sidebar-width: 248px;
  --topbar-height: 68px;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body { min-height: 100%; margin: 0; color: var(--ink); background: var(--canvas); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.admin-app { min-height: 100vh; }
.topbar { position: fixed; z-index: 50; top: 0; right: 0; left: 0; display: flex; align-items: center; height: var(--topbar-height); color: #34464d; background: rgba(255,255,255,.98); border-bottom: 1px solid #e7eaed; box-shadow: 0 2px 12px rgba(38,54,61,.035); }
.brand { display: flex; flex: 0 0 var(--sidebar-width); align-items: center; height: 100%; padding: 0 24px; color: #24343a; background: #fff; border-right: 1px solid #edf0f2; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 11px); grid-template-rows: repeat(2, 11px); gap: 2px; margin-right: 11px; padding: 7px; background: var(--red); border-radius: 3px; box-shadow: 0 6px 16px rgba(97,13,24,.3); }
.brand-mark i { display: block; background: #fff; }
.brand-mark i:last-child { transform: rotate(45deg) scale(.7); }
.brand-copy { display: flex; min-width: 0; flex-direction: column; }
.brand-copy strong { font-size: 17px; line-height: 1.25; letter-spacing: .07em; }
.brand-copy small { color: #98a3a8; font-size: 9px; line-height: 1.55; letter-spacing: .13em; }

.primary-nav { display: flex; align-self: stretch; align-items: center; gap: 8px; margin-left: 14px; }
.primary-nav-item, .system-switcher-trigger { position: relative; display: flex; align-items: center; border: 0; background: transparent; }
.primary-nav-item { gap: 8px; min-width: 82px; height: 44px; justify-content: center; color: #68777d; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 700; line-height: 1; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.primary-nav-item:hover { color: #344950; background: #f6f8f9; }
.primary-nav-item.active { color: var(--red-dark); background: #fff3f4; border-color: #f3dfe1; }
.primary-nav-icon { position: relative; display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; color: currentColor; }
.nav-icon-home { background: currentColor; clip-path: polygon(50% 4%,100% 43%,88% 43%,88% 96%,61% 96%,61% 67%,39% 67%,39% 96%,12% 96%,12% 43%,0 43%); }
.nav-icon-operations i { position: absolute; top: 2px; left: 2px; width: 5px; height: 5px; background: currentColor; border-radius: 1.5px; box-shadow: 9px 0 currentColor, 0 9px currentColor, 9px 9px currentColor; }
.nav-icon-products::before { position: absolute; inset: 1px 2px; content: ""; border: 1.8px solid currentColor; border-radius: 3px; }
.nav-icon-products::after { position: absolute; top: 6px; left: 6px; width: 7px; height: 1.8px; content: ""; background: currentColor; border-radius: 2px; box-shadow: 0 5px currentColor; }
.nav-icon-transactions::before { position: absolute; inset: -2px 0 0; display: grid; place-items: center; content: "⇄"; font: 700 22px/18px "Segoe UI Symbol", Arial, sans-serif; }
.nav-icon-development::before { position: absolute; inset: 0; display: grid; place-items: center; content: "</>"; font: 800 12px/18px Consolas, monospace; letter-spacing: -2px; }
.nav-icon-certification { background: currentColor; clip-path: polygon(50% 0,91% 16%,86% 65%,72% 84%,50% 100%,28% 84%,14% 65%,9% 16%); }
.nav-icon-certification::after { position: absolute; top: 5px; left: 5px; width: 7px; height: 4px; content: ""; border-bottom: 2px solid #fff; border-left: 2px solid #fff; transform: rotate(-45deg); }

.system-switcher { position: relative; align-self: center; height: 44px; }
.system-switcher-trigger { display: grid; grid-template-columns: 32px minmax(0,1fr) 8px; gap: 10px; height: 44px; min-width: 270px; padding: 0 12px 0 8px; background: #fff; border: 1px solid #e7eaed; border-radius: 9px; line-height: 1; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.system-switcher-trigger:hover, .system-switcher.open .system-switcher-trigger { background: #fff; border-color: #d8dde1; box-shadow: 0 5px 15px rgba(42,57,63,.07); }
.system-switcher-trigger::after { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 80; padding: 6px 9px; color: #fff; content: "切换系统"; background: rgba(34,47,53,.92); border-radius: 4px; opacity: 0; visibility: hidden; transform: translate(-50%,-3px); transition: .14s ease; pointer-events: none; white-space: nowrap; font-size: 10px; font-weight: 400; }
.system-switcher-trigger:hover::after { opacity: 1; visibility: visible; transform: translate(-50%,0); }
.system-switcher.open .system-switcher-trigger::after { display: none; }
.switch-icon { display: grid; grid-template-columns: repeat(2, 5px); grid-template-rows: repeat(2, 5px); gap: 3px; width: 32px; height: 32px; place-content: center; background: #fff0f2; border-radius: 7px; }
.switch-icon i { display: block; background: var(--red); border-radius: 1.5px; }
.switch-copy { display: flex; min-width: 0; align-items: center; }
.switch-copy strong { overflow: hidden; max-width: 198px; color: #34464d; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.caret { width: 7px; height: 7px; border-right: 1.5px solid #889398; border-bottom: 1.5px solid #889398; transform: rotate(45deg) translateY(-2px); transition: .18s ease; }
.open > * > .caret, .open > .system-switcher-trigger .caret { transform: rotate(225deg) translate(-1px,-1px); }

.system-modal-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(45,55,68,.46); opacity: 0; visibility: hidden; backdrop-filter: blur(4px); transition: opacity .18s ease, visibility .18s ease; }
.system-modal-backdrop.open { opacity: 1; visibility: visible; }
.system-modal { width: min(980px,100%); max-height: calc(100vh - 56px); overflow: hidden; background: #fff; border: 1px solid rgba(226,231,239,.95); border-radius: 24px; box-shadow: 0 28px 80px rgba(25,35,48,.22); transform: translateY(12px) scale(.985); transition: transform .2s ease; }
.system-modal-backdrop.open .system-modal { transform: none; }
.system-modal-head { display: flex; align-items: flex-start; justify-content: space-between; min-height: 94px; padding: 28px 28px 22px; border-bottom: 1px solid #e8ebf0; }
.system-modal-head h2 { margin: 0; color: #1b2637; font-size: 21px; line-height: 1.25; }
.system-modal-head p { margin: 4px 0 0; color: #718099; font-size: 12px; }
.system-modal-head > button { display: grid; width: 36px; height: 36px; margin-top: 0; place-items: center; color: #344155; background: transparent; border: 0; border-radius: 50%; font: 400 25px/1 Arial,sans-serif; }
.system-modal-head > button:hover { color: var(--red); background: #f5f7fa; }
.system-modal-body { max-height: calc(100vh - 152px); padding: 18px 24px 26px; overflow-y: auto; }
.system-search { position: relative; display: block; margin-bottom: 20px; }
.system-search > span { position: absolute; top: 50%; left: 18px; width: 15px; height: 15px; border: 1.7px solid #9aa6b8; border-radius: 50%; transform: translateY(-57%); pointer-events: none; }
.system-search > span::after { position: absolute; right: -5px; bottom: -3px; width: 6px; height: 1.7px; content: ""; background: #9aa6b8; border-radius: 2px; transform: rotate(45deg); }
.system-search input { width: 100%; height: 50px; padding: 0 18px 0 48px; color: #29364a; background: #f5f7fb; border: 1px solid #dfe4ec; border-radius: 12px; outline: none; font-size: 14px; }
.system-search input::placeholder { color: #99a3b3; }
.system-search input:focus { background: #fff; border-color: #b8c3d5; box-shadow: 0 0 0 3px rgba(80,102,146,.08); }
.system-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.system-option { position: relative; display: flex; min-width: 0; min-height: 142px; flex-direction: column; align-items: flex-start; width: 100%; padding: 16px; text-align: left; background: #fff; border: 1px solid #dfe5ed; border-radius: 14px; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.system-option:hover { border-color: #bcc7d8; box-shadow: 0 10px 24px rgba(38,51,72,.08); transform: translateY(-2px); }
.system-option.selected { background: linear-gradient(145deg,#fff,#fff9fa); border-color: #e1bfc4; box-shadow: 0 8px 20px rgba(181,31,46,.06); }
.option-emblem { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--system-color); border-radius: 5px; font-size: 15px; font-weight: 800; }
.system-option > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.system-option strong { overflow: hidden; width: 100%; margin-top: 13px; color: #1d293a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.system-option small { display: -webkit-box; min-height: 34px; margin-top: 9px; overflow: hidden; color: #718099; font-size: 10px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.system-option > i { position: absolute; top: 18px; right: 14px; color: #9aa5b5; font-size: 9px; font-style: normal; }
.system-option.selected > i { color: var(--red-dark); font-weight: 700; }
.system-empty { padding: 50px 0 35px; color: #98a3b3; font-size: 13px; text-align: center; }

.topbar-actions { display: flex; align-items: center; height: 100%; margin-left: auto; padding: 0 20px 0 14px; }
.user-menu { position: relative; }
.user-trigger { display: grid; grid-template-columns: 36px minmax(0,1fr) 8px; align-items: center; gap: 10px; min-width: 176px; height: 48px; padding: 5px 9px 5px 6px; background: transparent; border: 1px solid transparent; border-radius: 9px; transition: .15s ease; }
.user-trigger:hover, .user-menu.open .user-trigger { background: #f7f8f9; border-color: #edf0f1; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; background: linear-gradient(145deg, #b61f2e, #74121d); border: 2px solid #f2dfe1; border-radius: 50%; font: 700 10px/1 Arial,sans-serif; }
.avatar.xlarge { width: 58px; height: 58px; font-size: 15px; box-shadow: 0 7px 18px rgba(123,20,31,.16); }
.user-copy { display: flex; min-width: 94px; flex-direction: column; align-items: flex-start; }
.user-copy strong { font-size: 13px; line-height: 1.2; }
.user-copy small { margin-top: 4px; color: #8c979b; font-size: 10px; line-height: 1.2; }
.user-popover { position: absolute; top: calc(100% + 10px); right: 0; width: 344px; padding: 0; overflow: hidden; background: #fff; border: 1px solid #e1e5e8; border-radius: 10px; box-shadow: 0 20px 52px rgba(28,41,47,.16); opacity: 0; visibility: hidden; transform: translateY(-5px); transition: .18s ease; }
.user-menu.open .user-popover { opacity: 1; visibility: visible; transform: translateY(0); }
.user-profile-summary { display: flex; min-height: 142px; flex-direction: column; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(145deg,#fafbfc,#f6f7f9); border-bottom: 1px solid #e5e8eb; }
.user-profile-summary strong { margin-top: 10px; color: #273940; font-size: 14px; }
.user-profile-summary > span:last-child { margin-top: 4px; color: #89969b; font-size: 10px; }
.user-quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-bottom: 1px solid #e5e8eb; }
.user-quick-actions button { display: flex; min-width: 0; min-height: 48px; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; color: #486068; background: #fff; border: 0; font-size: 12px; white-space: nowrap; }
.user-quick-actions button + button { border-left: 1px solid #e5e8eb; }
.user-quick-actions button:hover { color: var(--red-dark); background: #fff7f8; }
.user-action-icon { color: var(--red); font-size: 15px; }
.current-company { display: flex; min-width: 0; flex-direction: column; gap: 5px; margin: 14px 16px 12px; padding: 11px 12px; background: #f7f8f9; border-radius: 6px; }
.current-company span { color: #9aa4a8; font-size: 9px; }
.current-company strong { overflow: hidden; color: #596b72; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.logout-action { display: flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; margin: 0 16px 16px; color: var(--red); background: #fff7f8; border: 1px solid #edbfc5; border-radius: 6px; font-size: 12px; }
.logout-action:hover { color: #fff; background: var(--red); border-color: var(--red); }

.sidebar { position: fixed; z-index: 40; top: var(--topbar-height); bottom: 0; left: 0; display: flex; width: var(--sidebar-width); flex-direction: column; color: #4f6068; background: #fff; border-right: 1px solid #e6eaed; box-shadow: 5px 0 18px rgba(31,46,52,.025); overflow-y: auto; scrollbar-width: thin; }
.system-menu { padding: 18px 12px 150px; }
.system-menu::before { display: block; margin: 0 12px 10px; color: #a4afb3; content: "系统菜单"; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.menu-leaf, .menu-group-trigger, .submenu button { width: 100%; color: inherit; background: transparent; border: 0; }
.menu-leaf, .menu-group-trigger { position: relative; display: grid; grid-template-columns: 28px minmax(0,1fr) 15px; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 7px; font-size: 13px; text-align: left; transition: color .14s ease, background .14s ease; }
.menu-leaf { grid-template-columns: 28px minmax(0,1fr); }
.menu-leaf:hover, .menu-group-trigger:hover { color: #263b43; background: #f5f7f8; }
.menu-leaf.active { color: var(--red-dark); background: #fff1f3; box-shadow: inset 0 0 0 1px rgba(181,31,46,.055); }
.menu-leaf.active::before { position: absolute; top: 11px; bottom: 11px; left: -12px; width: 3px; content: ""; background: var(--red); border-radius: 0 3px 3px 0; }
.menu-icon { display: inline-block; color: #94a0a5; font-size: 15px; text-align: left; }
.menu-leaf.active .menu-icon { color: var(--red); }
.menu-leaf:hover .menu-icon, .menu-group-trigger:hover .menu-icon { color: #50646c; }
.menu-caret { width: 6px; height: 6px; border-right: 1.5px solid #71848a; border-bottom: 1.5px solid #71848a; transform: rotate(45deg); transition: .18s ease; }
.menu-group.expanded .menu-caret { transform: rotate(225deg); }
.menu-group + .menu-group, .menu-leaf + .menu-group, .menu-group + .menu-leaf { margin-top: 3px; }
.submenu { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .22s ease, opacity .16s ease; }
.menu-group.expanded .submenu { max-height: 720px; opacity: 1; }
.submenu { margin-top: 2px; }
.submenu > button, .submenu-group-trigger { position: relative; display: flex; width: 100%; min-height: 38px; align-items: center; padding: 0 13px 0 43px; border: 0; border-radius: 6px; color: #7f8e94; background: transparent; font-size: 12px; text-align: left; }
.submenu > button > span:first-child, .submenu-dot { position: absolute; left: 28px; width: 4px; height: 4px; background: #bdc6c9; border-radius: 50%; }
.submenu > button:hover, .submenu-group-trigger:hover { color: #30464e; background: #f5f7f8; }
.submenu > button.active { color: var(--red-dark); background: #fff1f3; }
.submenu > button.active > span:first-child { background: #e24a59; box-shadow: 0 0 0 3px rgba(226,74,89,.12); }
.submenu-group-trigger { display: grid; grid-template-columns: minmax(0,1fr) 14px; padding-right: 12px; }
.submenu-caret { width: 6px; height: 6px; justify-self: center; border-right: 1.5px solid #87969b; border-bottom: 1.5px solid #87969b; transform: rotate(45deg); transition: transform .18s ease; }
.submenu-group.expanded .submenu-caret { transform: rotate(225deg); }
.thirdmenu { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .2s ease, opacity .16s ease; }
.submenu-group.expanded .thirdmenu { max-height: 170px; opacity: 1; }
.thirdmenu button { position: relative; display: flex; width: 100%; min-height: 34px; align-items: center; padding: 0 12px 0 58px; color: #98a3a7; background: transparent; border: 0; border-radius: 6px; font-size: 11px; text-align: left; }
.thirdmenu button::before { position: absolute; top: 0; bottom: 0; left: 29px; width: 1px; content: ""; background: #edf0f1; }
.thirdmenu-dot { position: absolute; left: 42px; width: 4px; height: 4px; background: #c9d0d3; border-radius: 50%; }
.thirdmenu button:hover { color: #40555d; background: #f7f8f9; }
.thirdmenu button.active { color: var(--red-dark); background: #fff1f3; }
.thirdmenu button.active .thirdmenu-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(181,31,46,.1); }
.sidebar-footer { position: absolute; right: 0; bottom: 0; left: 0; padding: 15px 20px 18px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 16%); }
.service-state { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 11px; background: #f7faf8; border: 1px solid #e4ece7; border-radius: 7px; }
.state-dot { width: 7px; height: 7px; background: #4cc48a; border-radius: 50%; box-shadow: 0 0 0 4px rgba(76,196,138,.08); }
.service-state div { display: flex; flex-direction: column; }
.service-state strong { color: #50645a; font-size: 10px; font-weight: 600; }
.service-state small { margin-top: 3px; color: #98a4a0; font-size: 8px; }
.sidebar-footer > span { color: #adb6b9; font: 700 8px/1 Arial,sans-serif; letter-spacing: .13em; }

.main-content { min-height: 100vh; margin-left: var(--sidebar-width); padding: calc(var(--topbar-height) + 28px) clamp(24px,3vw,44px) 42px; }
.view { display: none; }
.view.active { display: block; animation: view-in .24s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; max-width: 1440px; margin: 0 auto 22px; }
.eyebrow { margin: 0 0 7px !important; color: var(--red) !important; font: 800 9px/1 Arial,sans-serif !important; letter-spacing: .18em; }
.page-heading h1 { margin: 0; color: #203238; font-size: 25px; letter-spacing: .02em; }
.page-heading p { margin: 7px 0 0; color: #7b898e; font-size: 12px; }
.page-meta { display: flex; flex-direction: column; align-items: flex-end; color: #7d8b90; font-size: 10px; }
.page-meta strong { margin-top: 5px; color: #43565d; font-size: 12px; }

.welcome-banner { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 44%; min-height: 286px; max-width: 1440px; margin: 0 auto; overflow: hidden; color: #273941; background: linear-gradient(115deg, #fff 0%, #fff8f8 48%, #eef5f7 100%); border: 1px solid #e5e9eb; border-radius: 10px; box-shadow: 0 12px 32px rgba(47,67,74,.065); }
.welcome-banner::before { position: absolute; inset: 0; content: ""; background: repeating-linear-gradient(100deg, transparent 0 36px, rgba(60,88,98,.022) 37px 38px); pointer-events: none; }
.welcome-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 42px clamp(34px,4vw,60px); }
.welcome-chip { margin-bottom: 14px; padding: 5px 9px; color: var(--red-dark); background: #fff0f2; border: 1px solid #f1d6d9; border-radius: 3px; font-size: 10px; letter-spacing: .12em; }
.welcome-copy h2 { margin: 0; font-size: clamp(26px,2.4vw,36px); font-weight: 700; letter-spacing: .035em; }
.welcome-copy p { margin: 16px 0 0; color: #74848a; font-size: 13px; line-height: 1.85; }
.welcome-copy p span { color: #32474f; font-weight: 700; }
.welcome-actions { display: flex; align-items: center; gap: 22px; margin-top: 26px; }
.primary-button { min-height: 40px; padding: 0 17px; color: #fff; background: var(--red); border: 1px solid var(--red); border-radius: 4px; box-shadow: 0 7px 18px rgba(139,23,35,.14); font-size: 12px; font-weight: 700; }
.primary-button:hover { background: var(--red-dark); transform: translateY(-1px); }
.primary-button span { margin-left: 7px; }
.last-login { color: #9aa5aa; font-size: 9px; }
.welcome-visual { position: relative; min-height: 286px; overflow: hidden; }
.welcome-visual::before, .welcome-visual::after { position: absolute; content: ""; border: 1px solid rgba(86,119,131,.1); border-radius: 50%; }
.welcome-visual::before { top: -120px; right: -70px; width: 380px; height: 380px; }
.welcome-visual::after { top: 26px; right: 56px; width: 220px; height: 220px; }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
.orb-one { top: -50px; right: 30px; width: 180px; height: 180px; background: rgba(213,52,69,.1); }
.orb-two { right: 230px; bottom: -90px; width: 210px; height: 210px; background: rgba(60,120,133,.1); }
.data-tile { position: absolute; color: #4a6068; background: rgba(255,255,255,.78); border: 1px solid rgba(136,157,165,.2); border-radius: 9px; box-shadow: 0 18px 35px rgba(56,76,83,.11); backdrop-filter: blur(8px); }
.tile-main { top: 62px; right: 128px; display: grid; grid-template-columns: repeat(3, 24px); grid-template-rows: 72px 4px; gap: 7px; width: 116px; height: 116px; place-content: center; color: #fff; background: linear-gradient(145deg,#c93242,#9e1c2a); transform: rotate(8deg); }
.tile-main span { grid-column: 1/4; display: grid; place-items: center; font-size: 37px; font-weight: 800; }
.tile-main i { display: block; background: rgba(255,255,255,.5); border-radius: 4px; }
.tile-left { bottom: 35px; left: 5%; display: flex; width: 120px; height: 66px; flex-direction: column; justify-content: center; padding-left: 17px; transform: rotate(-4deg); }
.tile-left b { font: 700 20px/1 Arial,sans-serif; }
.tile-left small, .tile-right small { margin-top: 6px; color: #8a989d; font-size: 9px; }
.tile-right { top: 30px; right: 2%; display: flex; width: 135px; height: 62px; align-items: center; gap: 9px; padding: 0 14px; transform: rotate(3deg); }
.tile-right small { margin: 0; }
.pulse { flex: 0 0 8px; width: 8px; height: 8px; background: #75d9a5; border-radius: 50%; box-shadow: 0 0 0 5px rgba(117,217,165,.12); }

.system-section { max-width: 1440px; margin: 30px auto 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.section-heading h2 { margin: 0; color: #293b41; font-size: 18px; }
.section-heading p { margin: 7px 0 0; color: #839095; font-size: 12px; }
.section-heading > span { color: #879499; font-size: 10px; }
.section-heading > span b { color: var(--red); font: 700 16px/1 Arial,sans-serif; }
.system-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.system-card { position: relative; min-width: 0; min-height: 228px; padding: 18px 17px 16px; overflow: hidden; background: #fff; border: 1px solid #e3e8e9; border-radius: 6px; box-shadow: 0 5px 17px rgba(31,46,52,.035); transition: .18s ease; }
.system-card::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; content: ""; background: var(--system-color); opacity: 0; }
.system-card:hover { border-color: color-mix(in srgb, var(--system-color) 33%, #dfe5e6); box-shadow: 0 11px 28px rgba(30,45,51,.09); transform: translateY(-3px); }
.system-card.selected { background: linear-gradient(145deg,#fff,#fff9f9); border-color: #e4c8cb; }
.system-card.selected::before { opacity: 1; }
.system-card-head { display: flex; align-items: flex-start; justify-content: space-between; }
.card-emblem { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--system-color); border-radius: 5px; font-size: 15px; font-weight: 800; }
.card-state { padding: 4px 6px; color: #819095; background: #f4f6f6; border-radius: 2px; font-size: 9px; }
.selected .card-state { color: var(--red-dark); background: #fff0f1; }
.system-code { display: block; margin-top: 17px; color: #a0a8ab; font: 700 9px/1 Arial,sans-serif; letter-spacing: .14em; }
.system-card h3 { overflow: hidden; margin: 7px 0 0; color: #2b3d43; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.system-card p { display: -webkit-box; min-height: 42px; margin: 10px 0 14px; overflow: hidden; color: #7e8c91; font-size: 11px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.system-card button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 11px 0 0; color: #65767c; background: transparent; border: 0; border-top: 1px solid #eef0f1; font-size: 11px; text-align: left; }
.system-card button:hover { color: var(--system-color); }
.system-card.selected button { color: var(--red-dark); font-weight: 700; cursor: default; }

.notice-strip { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: center; max-width: 1440px; min-height: 64px; margin: 18px auto 0; padding: 12px 18px; background: #fff; border: 1px solid #e4e8e9; border-left: 3px solid var(--red); border-radius: 4px; }
.notice-label { padding: 5px 8px; color: var(--red-dark); background: #fff0f2; border-radius: 2px; font-size: 10px; font-weight: 700; }
.notice-strip p { display: flex; min-width: 0; margin: 0; align-items: center; gap: 18px; }
.notice-strip p strong { flex: 0 0 auto; color: #405158; font-size: 12px; }
.notice-strip p span { overflow: hidden; color: #89959a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.notice-strip time { color: #a0a8ab; font-size: 10px; }

.existing-page-view { min-height: calc(100vh - var(--topbar-height) - 70px); }
.existing-page-view.active { display: grid; place-items: center; }
.existing-page-view span { color: #b0b7ba; font-size: 14px; }
.alliance-list-view { min-height: calc(100vh - var(--topbar-height) - 70px); }
.alliance-list-view.active { display: block; }
.alliance-page { max-width: 1440px; margin: 0 auto; }
.alliance-page-heading { display: flex; min-height: 60px; align-items: flex-end; margin-bottom: 22px; }
.alliance-page-heading p { margin: 0 0 7px; color: #9aa5aa; font-size: 10px; }
.alliance-page-heading h1 { margin: 0; color: #263940; font-size: 25px; letter-spacing: .02em; }
.alliance-search-panel { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 18px; padding: 22px 24px; background: #fff; border: 1px solid #e6eaec; border-radius: 10px; box-shadow: 0 6px 20px rgba(31,46,52,.025); }
.alliance-search-fields { display: grid; min-width: 0; flex: 1; grid-template-columns: repeat(4,minmax(150px,1fr)); gap: 18px; }
.alliance-search-fields label { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.alliance-search-fields label > span { color: #52636a; font-size: 11px; font-weight: 700; }
.alliance-search-fields input, .alliance-search-fields select { width: 100%; height: 38px; padding: 0 12px; color: #33474e; background: #fff; border: 1px solid #dfe4e6; border-radius: 5px; outline: none; font-size: 11px; transition: border-color .15s ease, box-shadow .15s ease; }
.alliance-search-fields input::placeholder { color: #b0b9bd; }
.alliance-search-fields input:focus, .alliance-search-fields select:focus { border-color: #d6a7ad; box-shadow: 0 0 0 3px rgba(182,31,46,.07); }
.alliance-search-fields select { padding-right: 30px; appearance: none; background-image: linear-gradient(45deg,transparent 50%,#8c999e 50%),linear-gradient(135deg,#8c999e 50%,transparent 50%); background-position: calc(100% - 14px) 16px,calc(100% - 10px) 16px; background-repeat: no-repeat; background-size: 4px 4px,4px 4px; }
.alliance-search-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.alliance-search-actions button { height: 38px; padding: 0 18px; border-radius: 5px; font-size: 11px; font-weight: 700; transition: .15s ease; }
.alliance-query-button { color: #fff; background: var(--red); border: 1px solid var(--red); box-shadow: 0 6px 14px rgba(139,23,35,.12); }
.alliance-query-button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.alliance-query-button span { position: relative; display: inline-block; width: 11px; height: 11px; margin-right: 7px; vertical-align: -2px; border: 1.5px solid currentColor; border-radius: 50%; }
.alliance-query-button span::after { position: absolute; right: -4px; bottom: -2px; width: 5px; height: 1.5px; content: ""; background: currentColor; border-radius: 2px; transform: rotate(45deg); }
.alliance-reset-button { color: #5e6f75; background: #fff; border: 1px solid #dfe4e6; }
.alliance-reset-button:hover { color: var(--red-dark); background: #fff8f9; border-color: #e6c9cd; }
.alliance-list-panel { overflow: hidden; background: #fff; border: 1px solid #e6eaec; border-radius: 10px; box-shadow: 0 8px 24px rgba(31,46,52,.035); }
.alliance-list-heading { display: flex; min-height: 68px; align-items: center; padding: 0 24px; border-bottom: 1px solid #edf0f1; }
.alliance-list-heading h2 { margin: 0; color: #33474e; font-size: 15px; }
.alliance-list-heading p { margin: 6px 0 0; color: #9aa5aa; font-size: 10px; }
.alliance-list-heading p strong { color: var(--red-dark); }
.alliance-table-wrap { position: relative; overflow-x: auto; }
.alliance-table { width: 100%; min-width: 1280px; border-collapse: collapse; table-layout: fixed; }
.alliance-table th, .alliance-table td { padding: 0 18px; border-bottom: 1px solid #edf0f1; text-align: left; white-space: nowrap; }
.alliance-table th { height: 48px; color: #7c898e; background: #fafbfc; font-size: 10px; font-weight: 700; }
.alliance-table td { height: 58px; overflow: hidden; color: #586970; font-size: 11px; text-overflow: ellipsis; }
.alliance-table th:first-child, .alliance-table td:first-child { width: 250px; padding-left: 24px; color: #354950; font-weight: 700; }
.alliance-table th:nth-child(2), .alliance-table td:nth-child(2) { width: 110px; }
.alliance-table th:nth-child(3), .alliance-table td:nth-child(3) { width: 95px; }
.alliance-table th:nth-child(4), .alliance-table td:nth-child(4) { width: 150px; }
.alliance-table th:nth-child(5), .alliance-table td:nth-child(5) { width: 150px; }
.alliance-table th:nth-child(6), .alliance-table td:nth-child(6) { width: 100px; }
.alliance-table th:nth-child(7), .alliance-table td:nth-child(7) { width: 230px; }
.alliance-table th:last-child, .alliance-table td:last-child { width: 145px; padding-right: 24px; }
.alliance-table tbody tr:last-child td { border-bottom: 0; }
.alliance-table tbody tr:hover td { background: #fffafb; }
.alliance-empty { display: grid; min-height: 280px; place-items: center; align-content: center; color: #7e8c91; }
.alliance-empty[hidden] { display: none; }
.alliance-empty span { position: relative; display: block; width: 46px; height: 38px; margin-bottom: 14px; border: 1.5px solid #cbd2d5; border-radius: 4px; }
.alliance-empty span::before, .alliance-empty span::after { position: absolute; right: 8px; left: 8px; height: 1px; content: ""; background: #d8dddf; }
.alliance-empty span::before { top: 13px; box-shadow: 0 8px #d8dddf; }
.alliance-empty strong { font-size: 12px; }
.alliance-empty p { margin: 7px 0 0; color: #a5afb3; font-size: 10px; }
.menu-placeholder-view { min-height: calc(100vh - var(--topbar-height) - 70px); }
.menu-placeholder-view.active { display: block; }
.placeholder-page { max-width: 1440px; margin: 0 auto; }
.placeholder-heading { display: flex; min-height: 60px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.placeholder-heading div { min-width: 0; }
.placeholder-heading p { margin: 0 0 7px; color: #9aa5aa; font-size: 10px; }
.placeholder-heading h1 { margin: 0; color: #263940; font-size: 25px; letter-spacing: .02em; }
.placeholder-heading button { min-height: 36px; padding: 0 13px; color: #586a71; background: #fff; border: 1px solid #dfe4e6; border-radius: 6px; font-size: 11px; font-weight: 700; transition: .15s ease; }
.placeholder-heading button:hover { color: var(--red-dark); border-color: #e6c9cd; background: #fff8f9; }
.placeholder-heading button span { margin-right: 3px; }
.placeholder-surface { display: grid; min-height: 420px; place-items: center; align-content: center; padding: 48px; text-align: center; background: #fff; border: 1px solid #e6eaec; border-radius: 10px; box-shadow: 0 8px 24px rgba(31,46,52,.035); }
.placeholder-icon { display: flex; align-items: center; justify-content: center; gap: 4px; width: 52px; height: 52px; margin-bottom: 18px; color: var(--red); background: #fff2f4; border: 1px solid #f2dade; border-radius: 50%; }
.placeholder-icon i { width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.placeholder-surface h2 { margin: 0; color: #43565d; font-size: 16px; }
.placeholder-surface p { max-width: 420px; margin: 10px 0 0; color: #929da1; font-size: 11px; line-height: 1.8; }
.toast { position: fixed; z-index: 100; top: calc(var(--topbar-height) + 14px); left: 50%; display: flex; min-height: 44px; align-items: center; gap: 9px; padding: 10px 17px 10px 12px; color: #344b43; background: rgba(255,255,255,.98); border: 1px solid #dce8e1; border-radius: 8px; box-shadow: 0 12px 34px rgba(37,55,47,.14); opacity: 0; transform: translate(-50%,-12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; font-size: 12px; white-space: nowrap; }
.toast::before { display: grid; flex: 0 0 22px; width: 22px; height: 22px; place-items: center; color: #fff; content: "✓"; background: #35a56f; border-radius: 50%; font: 700 12px/1 Arial,sans-serif; }
.toast.info::before { content: "i"; background: #5b7ba7; font-family: Georgia,serif; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.modal-open { overflow: hidden; }
.partner-list-view { min-height: calc(100vh - var(--topbar-height) - 70px); }
.partner-list-view.active { display: block; }
.partner-page { max-width: 1440px; margin: 0 auto; }
.partner-page-heading { display: flex; min-height: 60px; align-items: flex-end; margin-bottom: 22px; }
.partner-page-heading p { margin: 0 0 7px; color: #9aa5aa; font-size: 10px; }
.partner-page-heading h1 { margin: 0; color: #263940; font-size: 25px; letter-spacing: .02em; }
.partner-search-panel { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 18px; padding: 22px 24px; background: #fff; border: 1px solid #e6eaec; border-radius: 10px; box-shadow: 0 6px 20px rgba(31,46,52,.025); }
.partner-search-fields { display: grid; min-width: 0; flex: 1; grid-template-columns: 220px minmax(280px,520px); gap: 18px; }
.partner-search-fields label, .partner-form-grid label { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.partner-search-fields label > span, .partner-form-grid label > span:first-child { color: #52636a; font-size: 11px; font-weight: 700; }
.partner-search-fields input, .partner-search-fields select, .partner-form-grid input, .partner-form-grid select, .partner-form-grid textarea { width: 100%; padding: 0 12px; color: #33474e; background: #fff; border: 1px solid #dfe4e6; border-radius: 5px; outline: none; font-size: 11px; transition: border-color .15s ease, box-shadow .15s ease; }
.partner-search-fields input, .partner-search-fields select, .partner-form-grid input, .partner-form-grid select { height: 38px; }
.partner-search-fields input:focus, .partner-search-fields select:focus, .partner-form-grid input:focus, .partner-form-grid select:focus, .partner-form-grid textarea:focus { border-color: #d6a7ad; box-shadow: 0 0 0 3px rgba(182,31,46,.07); }
.partner-search-actions { display: flex; gap: 9px; }
.partner-search-actions button, .partner-add-button { height: 38px; padding: 0 18px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.partner-query-button, .partner-add-button, .partner-save-button { color: #fff; background: var(--red); border: 1px solid var(--red); }
.partner-query-button:hover, .partner-add-button:hover, .partner-save-button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.partner-reset-button, .partner-cancel-button { color: #5e6f75; background: #fff; border: 1px solid #dfe4e6; }
.partner-list-panel { overflow: hidden; background: #fff; border: 1px solid #e6eaec; border-radius: 10px; box-shadow: 0 8px 24px rgba(31,46,52,.035); }
.partner-list-heading { display: flex; min-height: 68px; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid #edf0f1; }
.partner-list-heading h2 { margin: 0; color: #33474e; font-size: 15px; }
.partner-list-heading p { margin: 6px 0 0; color: #9aa5aa; font-size: 10px; }
.partner-list-heading p strong { color: var(--red-dark); }
.partner-add-button span { margin-right: 4px; font-size: 15px; vertical-align: -1px; }
.partner-table-wrap { position: relative; overflow-x: auto; }
.partner-table { width: 100%; min-width: 1050px; border-collapse: collapse; table-layout: fixed; }
.partner-table th, .partner-table td { padding: 0 16px; border-bottom: 1px solid #edf0f1; text-align: left; white-space: nowrap; }
.partner-table th { height: 48px; color: #7c898e; background: #fafbfc; font-size: 10px; }
.partner-table td { height: 66px; overflow: hidden; color: #586970; font-size: 11px; text-overflow: ellipsis; }
.partner-table th:first-child, .partner-table td:first-child { width: 88px; padding-left: 24px; }
.partner-table th:nth-child(2), .partner-table td:nth-child(2) { width: 112px; }
.partner-table th:nth-child(3), .partner-table td:nth-child(3) { width: 190px; color: #354950; font-weight: 700; }
.partner-table th:nth-child(4), .partner-table td:nth-child(4) { width: 310px; }
.partner-table th:nth-child(5), .partner-table td:nth-child(5) { width: 230px; }
.partner-table th:last-child, .partner-table td:last-child { width: 125px; padding-right: 24px; }
.partner-table tbody tr:hover td { background: #fffafb; }
.partner-table td a { color: #4e7892; text-decoration: underline; text-underline-offset: 2px; }
.partner-icon-preview { display: grid; width: 36px; height: 36px; place-items: center; object-fit: cover; color: #fff; background: linear-gradient(145deg,#c83c4b,#8e1724); border-radius: 8px; font-size: 13px; font-weight: 800; }
.partner-type { display: inline-flex; padding: 5px 9px; color: #326c68; background: #edf8f6; border-radius: 4px; font-size: 10px; font-weight: 700; }
.partner-type.platform { color: #8e5c26; background: #fff6e9; }
.partner-actions button { padding: 5px 7px; color: #526f83; background: transparent; border: 0; font-size: 11px; }
.partner-actions button:hover { color: var(--red-dark); }
.partner-actions .danger { color: #b04b56; }
.partner-empty { display: grid; min-height: 280px; place-items: center; align-content: center; color: #7e8c91; }
.partner-empty[hidden] { display: none; }
.partner-empty span { width: 46px; height: 38px; margin-bottom: 14px; border: 1.5px solid #cbd2d5; border-radius: 4px; }
.partner-empty strong { font-size: 12px; }
.partner-empty p { margin: 7px 0 0; color: #a5afb3; font-size: 10px; }
.partner-modal-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; padding: 24px; place-items: center; background: rgba(30,43,49,.48); opacity: 0; visibility: hidden; transition: .18s ease; }
.partner-modal-backdrop.open { opacity: 1; visibility: visible; }
.partner-modal { width: min(640px,100%); overflow: hidden; background: #fff; border-radius: 12px; box-shadow: 0 28px 70px rgba(22,35,41,.24); transform: translateY(10px); transition: .18s ease; }
.partner-modal-backdrop.open .partner-modal { transform: none; }
.partner-modal > header { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 18px; border-bottom: 1px solid #edf0f1; }
.partner-modal header p { margin: 0 0 5px; color: #9aa5aa; font-size: 9px; }
.partner-modal header h2 { margin: 0; color: #2c4148; font-size: 18px; }
.partner-modal header > button { width: 32px; height: 32px; color: #77868c; background: transparent; border: 0; border-radius: 50%; font-size: 24px; line-height: 1; }
.partner-modal header > button:hover { color: var(--red); background: #fff3f4; }
.partner-form-body { padding: 22px 24px; }
.partner-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.partner-form-wide { grid-column: 1 / -1; }
.partner-form-grid label b { color: var(--red); }
.partner-form-grid textarea { min-height: 86px; padding-top: 10px; resize: vertical; font-family: inherit; }
.partner-icon-upload { position: relative; display: flex; align-items: center; gap: 14px; min-height: 70px; padding: 10px; border: 1px dashed #d6dcdf; border-radius: 7px; cursor: pointer; }
.partner-icon-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.partner-upload-preview { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; overflow: hidden; color: #9aa6aa; background: #f7f9fa; border-radius: 7px; font-size: 20px; }
.partner-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.partner-upload-copy { display: flex; flex-direction: column; }
.partner-upload-copy strong { color: #53666d; font-size: 11px; }
.partner-upload-copy small { margin-top: 6px; color: #99a4a8; font-size: 9px; }
.partner-modal form > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 24px; background: #fafbfc; border-top: 1px solid #edf0f1; }
.partner-modal footer button { min-width: 76px; height: 36px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.sidebar-toggle, .sidebar-mask { display: none; }

@media (max-width: 1280px) {
  .welcome-banner { grid-template-columns: minmax(0,1fr) 39%; }
  .tile-main { right: 80px; }
  .tile-right { display: none; }
}

@media (max-width: 980px) {
  :root { --sidebar-width: 236px; }
  .brand { flex-basis: 210px; padding-left: 18px; }
  .primary-nav { margin-left: 0; }
  .primary-nav-item { min-width: 78px; }
  .system-switcher-trigger { min-width: 184px; padding: 0 13px; }
  .user-copy { display: none; }
  .user-trigger { grid-template-columns: 36px 8px; min-width: auto; }
  .welcome-banner { grid-template-columns: 1fr; }
  .welcome-visual { position: absolute; inset: 0 0 0 55%; opacity: .68; }
  .welcome-copy { padding-right: 36%; }
  .system-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .topbar { height: 62px; }
  :root { --topbar-height: 62px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .sidebar-toggle { display: grid; width: 42px; height: 42px; margin-left: 6px; place-content: center; gap: 4px; background: transparent; border: 0; }
  .sidebar-toggle span { display: block; width: 18px; height: 1.5px; background: #617178; }
  .primary-nav { margin-left: auto; }
  .primary-nav-item { display: none; }
  .system-switcher-trigger { min-width: auto; padding: 0 12px; border-left: 0; }
  .switch-copy strong { max-width: 86px; font-size: 11px; }
  .system-modal-backdrop { padding: 16px; }
  .system-modal { max-height: calc(100vh - 32px); border-radius: 18px; }
  .system-modal-head { min-height: 82px; padding: 22px 20px 17px; }
  .system-modal-body { max-height: calc(100vh - 114px); padding: 16px 18px 22px; }
  .system-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topbar-actions { margin-left: 0; padding: 0 8px 0 0; }
  .sidebar { transform: translateX(-100%); transition: transform .23s ease; }
  .sidebar.mobile-open { transform: none; }
  .sidebar-mask { position: fixed; z-index: 35; inset: var(--topbar-height) 0 0; background: rgba(23,34,39,.42); opacity: 0; pointer-events: none; transition: .2s ease; }
  .sidebar-mask.show { display: block; opacity: 1; pointer-events: auto; }
  .main-content { margin-left: 0; padding: calc(var(--topbar-height) + 22px) 16px 30px; }
  .page-meta { display: none; }
  .welcome-banner { min-height: 320px; }
  .welcome-copy { justify-content: flex-start; padding: 34px 24px; }
  .welcome-copy p { max-width: 80%; }
  .welcome-visual { inset: auto 0 0 35%; height: 170px; }
  .tile-main { top: 30px; right: 70px; transform: scale(.85) rotate(8deg); }
  .tile-left { bottom: 16px; }
  .last-login { display: none; }
  .system-card-grid { grid-template-columns: 1fr; }
  .system-card { min-height: 214px; }
  .notice-strip { grid-template-columns: auto minmax(0,1fr); }
  .notice-strip p { display: block; }
  .notice-strip p span { display: none; }
  .notice-strip time { display: none; }
}

@media (max-width: 460px) {
  .brand { padding: 0 11px; }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: 15px; }
  .brand-mark { grid-template-columns: repeat(2,9px); grid-template-rows: repeat(2,9px); padding: 6px; }
  .system-switcher-trigger { grid-template-columns: minmax(0,1fr); min-width: 106px; padding: 0 8px; }
  .switch-icon, .system-switcher-trigger > .caret { display: none; }
  .avatar { width: 32px; height: 32px; }
  .user-trigger { padding-right: 0; }
  .user-popover { position: fixed; top: 69px; right: 10px; left: 10px; width: auto; }
  .system-modal-backdrop { padding: 8px; }
  .system-modal { max-height: calc(100vh - 16px); border-radius: 15px; }
  .system-modal-head { min-height: 76px; padding: 19px 16px 15px; }
  .system-modal-head h2 { font-size: 18px; }
  .system-modal-head p { font-size: 10px; }
  .system-modal-body { max-height: calc(100vh - 92px); padding: 14px; }
  .system-search { margin-bottom: 14px; }
  .system-search input { height: 46px; }
  .system-options { grid-template-columns: 1fr; }
  .system-option { min-height: 132px; }
  .welcome-copy p { max-width: 100%; }
  .welcome-visual { opacity: .38; }
}

/* Unified comprehensive-service console */
.primary-nav {
  gap: 4px;
  min-width: 0;
}
.primary-nav-item {
  min-width: 80px;
  padding: 0 13px;
  white-space: nowrap;
  text-decoration: none;
}
.nav-icon-docs {
  width: 16px;
  height: 18px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.nav-icon-docs::before {
  position: absolute;
  top: 4px;
  left: 3px;
  width: 7px;
  height: 1.5px;
  content: "";
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
  border-radius: 2px;
}
.sidebar-menu-heading {
  display: flex;
  min-height: 68px;
  flex-direction: column;
  justify-content: center;
  margin: 0 18px;
  padding: 14px 6px 12px;
  border-bottom: 1px solid #edf0f2;
}
.sidebar-menu-heading span {
  color: #a0aaae;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}
.sidebar-menu-heading strong {
  margin-top: 7px;
  color: #354950;
  font-size: 15px;
  letter-spacing: .03em;
}
.system-menu {
  padding: 8px 12px 150px;
}
.system-menu::before {
  display: none;
  content: none;
}
.menu-group.expanded .submenu {
  max-height: 260px;
}

.welcome-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  min-height: calc(100vh - var(--topbar-height) - 76px);
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(194, 37, 53, .08), transparent 25%),
    linear-gradient(125deg, #fff 0%, #fff 52%, #f3f7f8 100%);
  border: 1px solid #e4e9eb;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(40, 58, 65, .07);
}
.welcome-page::before {
  position: absolute;
  inset: 0;
  content: "";
  background: repeating-linear-gradient(102deg, transparent 0 52px, rgba(59, 83, 92, .023) 53px 54px);
  pointer-events: none;
}
.welcome-page .welcome-copy {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(52px, 7vw, 104px);
}
.welcome-page .welcome-chip {
  margin-bottom: 22px;
  padding: 7px 11px;
  color: var(--red-dark);
  background: #fff2f4;
  border-color: #efd4d8;
  border-radius: 5px;
  font: 800 10px/1 Arial, sans-serif;
  letter-spacing: .18em;
}
.welcome-greeting {
  margin: 0 0 12px !important;
  color: #6f8087 !important;
  font-size: 14px !important;
  letter-spacing: .02em;
}
.welcome-page h1 {
  max-width: 640px;
  margin: 0;
  color: #20343b;
  font-size: clamp(34px, 3.8vw, 52px);
  line-height: 1.22;
  letter-spacing: .035em;
}
.welcome-description {
  max-width: 620px;
  margin: 22px 0 0 !important;
  color: #718188 !important;
  font-size: 14px !important;
  line-height: 1.9 !important;
}
.welcome-guide {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: min(440px, 100%);
  margin-top: 36px;
  padding: 15px 17px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid #e5e9eb;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(46, 64, 71, .045);
}
.guide-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 7px;
  font-size: 18px;
}
.welcome-guide div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.welcome-guide strong {
  color: #364b52;
  font-size: 12px;
}
.welcome-guide small {
  margin-top: 5px;
  color: #8a979c;
  font-size: 10px;
  line-height: 1.55;
}
.welcome-page .welcome-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}
.welcome-page .welcome-visual::before,
.welcome-page .welcome-visual::after {
  display: none;
}
.welcome-orbit {
  position: absolute;
  border: 1px solid rgba(88, 118, 129, .12);
  border-radius: 50%;
}
.welcome-orbit::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  content: "";
  background: #d54a59;
  border: 4px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(157, 31, 44, .2);
}
.orbit-one {
  top: 50%;
  left: 52%;
  width: 430px;
  height: 430px;
  transform: translate(-50%, -50%);
}
.orbit-one::before { transform: translate(-214px, -76px); }
.orbit-two {
  top: 50%;
  left: 52%;
  width: 310px;
  height: 310px;
  transform: translate(-50%, -50%);
}
.orbit-two::before { transform: translate(132px, 42px); background: #4f8290; }
.orbit-three {
  top: 50%;
  left: 52%;
  width: 560px;
  height: 560px;
  border-color: rgba(88, 118, 129, .065);
  transform: translate(-50%, -50%);
}
.orbit-three::before { transform: translate(30px, -286px); background: #d49c4d; }
.welcome-emblem {
  position: absolute;
  top: 50%;
  left: 52%;
  display: grid;
  grid-template-columns: repeat(3, 28px);
  grid-template-rows: 104px 5px;
  gap: 9px;
  width: 166px;
  height: 166px;
  place-content: center;
  color: #fff;
  background: linear-gradient(145deg, #ca3444, #921824);
  border: 9px solid rgba(255, 255, 255, .7);
  border-radius: 30px;
  box-shadow: 0 28px 56px rgba(126, 25, 37, .24);
  transform: translate(-50%, -50%) rotate(7deg);
}
.welcome-emblem span {
  grid-column: 1 / 4;
  display: grid;
  place-items: center;
  font-size: 58px;
  font-weight: 800;
}
.welcome-emblem i {
  display: block;
  background: rgba(255, 255, 255, .55);
  border-radius: 5px;
}
.welcome-float {
  position: absolute;
  display: flex;
  color: #53676f;
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(157, 174, 180, .28);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(56, 76, 83, .12);
  backdrop-filter: blur(10px);
}
.float-one {
  bottom: 18%;
  left: 8%;
  width: 132px;
  height: 78px;
  flex-direction: column;
  justify-content: center;
  padding-left: 20px;
  transform: rotate(-5deg);
}
.float-one b {
  font: 700 24px/1 Arial, sans-serif;
}
.float-one small {
  margin-top: 7px;
  color: #89989e;
  font-size: 10px;
}
.float-two {
  top: 17%;
  right: 4%;
  width: 150px;
  min-height: 64px;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  transform: rotate(4deg);
}
.float-two span {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  background: #52bd85;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(82, 189, 133, .12);
}
.float-two small {
  color: #71848a;
  font-size: 10px;
}

@media (max-width: 1180px) {
  .primary-nav {
    gap: 2px;
    margin-left: 8px;
  }
  .primary-nav-item {
    min-width: 68px;
    padding: 0 9px;
    font-size: 12px;
  }
  .welcome-page {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
  }
  .alliance-search-panel { align-items: stretch; flex-direction: column; }
  .alliance-search-fields { width: 100%; grid-template-columns: repeat(2,minmax(180px,1fr)); }
  .alliance-search-actions { justify-content: flex-end; }
}

@media (max-width: 980px) {
  .welcome-page .welcome-copy {
    padding: 54px 42px;
  }
  .welcome-page .welcome-visual {
    position: relative;
    inset: auto;
    min-height: 460px;
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .primary-nav {
    position: fixed;
    z-index: 45;
    top: var(--topbar-height);
    right: 0;
    left: 0;
    display: flex;
    height: 50px;
    margin: 0;
    padding: 4px 10px;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #e7eaed;
  }
  .primary-nav-item {
    display: flex;
    flex: 0 0 auto;
    min-width: 72px;
    height: 40px;
  }
  .sidebar {
    top: calc(var(--topbar-height) + 50px);
  }
  .sidebar-mask {
    inset: calc(var(--topbar-height) + 50px) 0 0;
  }
  .main-content {
    padding-top: calc(var(--topbar-height) + 72px);
  }
  .welcome-page {
    grid-template-columns: 1fr;
    min-height: 680px;
  }
  .welcome-page .welcome-copy {
    padding: 44px 28px 24px;
  }
  .welcome-page .welcome-visual {
    position: relative;
    inset: auto;
    min-height: 310px;
    opacity: .8;
  }
  .welcome-guide {
    min-width: 0;
  }
  .orbit-one { width: 330px; height: 330px; }
  .orbit-two { width: 240px; height: 240px; }
  .orbit-three { width: 420px; height: 420px; }
  .welcome-emblem { transform: translate(-50%, -50%) rotate(7deg) scale(.82); }
  .float-one { bottom: 10%; }
  .float-two { top: 8%; }
  .alliance-page-heading { margin-bottom: 16px; }
  .alliance-page-heading h1 { font-size: 21px; }
  .alliance-search-panel { gap: 16px; padding: 18px; }
  .alliance-search-fields { grid-template-columns: 1fr; gap: 14px; }
  .alliance-search-actions button { flex: 1; }
  .alliance-list-heading { padding: 0 18px; }
  .partner-page-heading { margin-bottom: 16px; }
  .partner-page-heading h1 { font-size: 21px; }
  .partner-search-panel { align-items: stretch; flex-direction: column; padding: 18px; }
  .partner-search-fields { grid-template-columns: 1fr; }
  .partner-search-actions button { flex: 1; }
  .partner-form-grid { grid-template-columns: 1fr; }
  .partner-form-wide { grid-column: auto; }
  .partner-modal-backdrop { padding: 12px; }
}
