: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-tickets { width: 18px; height: 14px; border: 1.8px solid currentColor; border-radius: 2px; }
.nav-icon-tickets::before, .nav-icon-tickets::after { position: absolute; content: ""; }
.nav-icon-tickets::before { top: 3px; left: 3px; width: 10px; height: 6px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.nav-icon-tickets::after { top: 6px; left: -3px; width: 4px; height: 2px; background: currentColor; box-shadow: 19px 0 currentColor; }
.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: 1700px; 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-table th:nth-child(8), .alliance-table td:nth-child(8) { width: 150px; }
.alliance-table th:nth-child(9), .alliance-table td:nth-child(9) { width: 110px; }
.alliance-table th:nth-child(10), .alliance-table td:nth-child(10) { width: 240px; }
.alliance-table th:last-child, .alliance-table td:last-child { width: 90px; }
.alliance-table td.alliance-remark { padding-top: 14px; padding-bottom: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.alliance-status { display: inline-block; padding: 5px 9px; border-radius: 4px; font-size: 10px; }
.alliance-status.pending { color: #a46f17; background: #fff5df; }
.alliance-status.approved { color: #26825c; background: #eaf7f0; }
.alliance-status.rejected { color: var(--red); background: #fff0f2; }
.alliance-process-button { padding: 4px 0; color: var(--red); background: transparent; border: 0; font-size: 11px; }
.alliance-process-button:disabled { color: #b0b9bd; cursor: default; }
.alliance-empty strong { font-size: 12px; }
.demand-review-view.active { display: block; }
.demand-page { margin: 0 auto; max-width: 1800px; }
.demand-tabs { display: flex; gap: 28px; margin-bottom: 18px; border-bottom: 1px solid #e6eaec; }
.demand-tabs button { position: relative; padding: 12px 3px; color: #687980; background: transparent; border: 0; font-size: 12px; }
.demand-tabs button.active { color: var(--red); font-weight: 700; }
.demand-tabs button.active::after { position: absolute; bottom: -1px; right: 0; left: 0; height: 2px; content: ''; background: var(--red); }
.demand-search { align-items: center; justify-content: space-between; }
.demand-search > label { display: flex; align-items: center; gap: 18px; width: min(620px,100%); font-size: 12px; color: #52636a; }
.demand-search input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid #dfe4e6; border-radius: 5px; }
.demand-table { width: 100%; min-width: 2420px; border-collapse: collapse; table-layout: fixed; }
.demand-table th, .demand-table td { padding: 12px 14px; border-bottom: 1px solid #edf0f1; text-align: left; font-size: 11px; }
.demand-table th { color: #7c898e; background: #fafbfc; height: 48px; font-weight: 700; }
.demand-table td { color: #586970; height: 58px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demand-table tbody tr:hover { background: #fffafb; }
.demand-table th:first-child { width: 230px; }
.demand-table th:nth-child(2) { width: 65px; }
.demand-table th:nth-child(3), .demand-table th:nth-child(4) { width: 110px; }
.demand-table th:nth-child(5) { width: 110px; }
.demand-table th:nth-child(6) { width: 230px; }
.demand-table th:nth-child(7) { width: 115px; }
.demand-table th:nth-child(8), .demand-table th:nth-child(13) { width: 240px; }
.demand-table th:nth-child(9), .demand-table th:nth-child(11), .demand-table th:nth-child(12) { width: 110px; }
.demand-table th:nth-child(10) { width: 140px; }
.demand-table th:nth-child(14) { width: 180px; }
.demand-table th:nth-child(15) { width: 210px; }
.demand-table th:last-child { width: 120px; }
.alliance-table th:last-child, .alliance-table td:last-child,
.demand-table th:last-child, .demand-table td:last-child { position: sticky; z-index: 1; right: 0; background: #fff; box-shadow: -4px 0 8px rgba(31,46,52,.06); }
.alliance-table th:last-child, .demand-table th:last-child { z-index: 2; background: #fafbfc; }
.demand-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demand-name, .demand-actions button { padding: 4px 0; color: var(--red); background: transparent; border: 0; font-size: 11px; }
.demand-actions button + button { margin-left: 14px; }
.demand-actions [data-demand-action="delete"] { color: #8b969b; }
.demand-table td.demand-remark { white-space: pre-wrap; overflow-wrap: anywhere; }
.demand-modal { max-height: calc(100dvh - 48px); overflow-y: auto; }
.demand-detail p { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 16px; margin: 0; padding: 10px 0; border-bottom: 1px solid #edf0f1; font-size: 12px; }
.demand-detail strong { color: #7c898e; font-weight: 500; }
.demand-detail span { color: #33474e; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) { .demand-tabs { gap: 18px; } .demand-search > label { width: 100%; } .demand-modal { max-height: calc(100dvh - 24px); } }
.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; }
.partner-modal-backdrop.partner-drawer-backdrop { padding: 0; place-items: stretch end; overflow: hidden; }
.partner-drawer-backdrop > .partner-modal { display: flex; flex-direction: column; width: min(960px,100vw); height: 100dvh; border-radius: 0; transform: translateX(100%); transition: transform .24s ease; }
.partner-drawer-backdrop.open > .partner-modal { transform: translateX(0); }
.partner-drawer-backdrop .partner-modal > header { flex-shrink: 0; padding: 24px 32px; }
.partner-drawer-backdrop form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.partner-drawer-backdrop .partner-form-body { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 32px; overscroll-behavior: contain; }
.partner-drawer-backdrop form > footer { flex-shrink: 0; padding: 18px 32px; }
.partner-details-field { display: flex; flex-direction: column; gap: 8px; }
.partner-details-field > span { color: #52636a; font-size: 11px; font-weight: 700; }
.partner-rich-editor { overflow: hidden; border: 1px solid #dfe4e6; border-radius: 5px; }
.partner-rich-editor:focus-within { border-color: #d6a7ad; box-shadow: 0 0 0 3px rgba(182,31,46,.07); }
.partner-rich-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #fafbfc; border-bottom: 1px solid #e6eaec; }
.partner-rich-toolbar button { min-width: 30px; height: 30px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: #52636a; font-size: 12px; }
.partner-rich-toolbar button:hover, .partner-rich-toolbar button[aria-pressed="true"] { background: #f8e9eb; color: var(--red); }
.partner-rich-content { min-height: 260px; padding: 16px; outline: none; color: #33474e; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.partner-rich-content:empty::before { content: attr(data-placeholder); color: #9aa5aa; pointer-events: none; }
.partner-rich-content p { margin: 0 0 12px; }
.partner-rich-content h2 { margin: 0 0 12px; font-size: 20px; }
@media (max-width: 600px) {
  .partner-drawer-backdrop .partner-modal > header, .partner-drawer-backdrop .partner-form-body, .partner-drawer-backdrop form > footer { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .partner-drawer-backdrop > .partner-modal { transition: none; } }

/* Ticket management */
.ticket-pagination { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid #edf0f1; color: #738187; font-size: 12px; }
.ticket-pagination label, .ticket-page-numbers { display: flex; align-items: center; gap: 6px; }
.ticket-pagination button, .ticket-pagination select { height: 32px; min-width: 32px; padding: 0 9px; border: 1px solid #dfe4e6; border-radius: 5px; background: #fff; }
.ticket-pagination button[aria-current="page"] { color: var(--red); background: #fff3f4; border-color: #e6c9cd; }
.ticket-pagination button:disabled { color: #bbc2c5; background: #f7f8fa; cursor: not-allowed; }
.ticket-list-view { min-height: calc(100vh - var(--topbar-height) - 70px); }
.ticket-list-view.active { display: block; }
.ticket-page { max-width: 1440px; margin: 0 auto; }
.ticket-page-heading { display: flex; min-height: 60px; align-items: flex-end; margin-bottom: 22px; }
.ticket-page-heading p { margin: 0 0 7px; color: #9aa5aa; font-size: 10px; }
.ticket-page-heading h1 { margin: 0; color: #263940; font-size: 25px; letter-spacing: .02em; }
.ticket-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); }
.ticket-search-fields { display: grid; min-width: 0; flex: 1; grid-template-columns: minmax(240px,1fr) minmax(180px,.75fr) 150px 150px; gap: 18px; }
.ticket-attachments { padding: 0 26px 26px; }
.ticket-attachments h3 { font-size: 14px; margin: 0 0 14px; }
.ticket-attachments a, .ticket-attachments button { display: inline-flex; width: 220px; padding: 0; flex-direction: column; margin-right: 14px; overflow: hidden; text-align: left; background: #fff; border: 1px solid #dfe5ed; border-radius: 6px; }
.ticket-attachments button:hover { border-color: #d6a7ad; box-shadow: 0 4px 14px rgba(131,31,43,.1); }
.ticket-attachments img { width: 100%; height: 130px; object-fit: cover; }
.ticket-attachments span { padding: 10px; color: #536b82; font-size: 11px; }
.ticket-field-tooltip { position: fixed; z-index: 150; max-width: min(420px,calc(100vw - 24px)); padding: 9px 12px; color: #fff; background: #263940; border-radius: 5px; box-shadow: 0 5px 18px #0002; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; pointer-events: none; }
.ticket-field-tooltip[hidden] { display: none; }
[data-ticket-end-note][hidden] { display: none; }
.ticket-search-fields label { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.ticket-search-fields label > span, .ticket-detail-reply label > span { color: #52636a; font-size: 11px; font-weight: 700; }
.ticket-search-fields input, .ticket-search-fields select, .ticket-detail-reply textarea { width: 100%; 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; }
.ticket-search-fields input, .ticket-search-fields select { height: 38px; padding: 0 12px; }
.ticket-search-fields input:focus, .ticket-search-fields select:focus, .ticket-detail-reply textarea:focus { border-color: #d6a7ad; box-shadow: 0 0 0 3px rgba(182,31,46,.07); }
.ticket-search-actions { display: flex; gap: 9px; }
.ticket-search-actions button { height: 38px; padding: 0 18px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.ticket-query-button, .ticket-reply-submit { color: #fff; background: var(--red); border: 1px solid var(--red); }
.ticket-query-button:hover, .ticket-reply-submit:hover { background: var(--red-dark); border-color: var(--red-dark); }
.ticket-export-button { color: #52636a; background: #fff; border: 1px solid #d8dfe2; }
.ticket-export-button:hover { color: var(--red); border-color: #d6a7ad; background: #fff8f8; }
.ticket-reset-button { color: #5e6f75; background: #fff; border: 1px solid #dfe4e6; }
.ticket-list-panel { overflow: hidden; background: #fff; border: 1px solid #e6eaec; border-radius: 10px; box-shadow: 0 8px 24px rgba(31,46,52,.035); }
.ticket-create-button { min-height: 36px; padding: 0 14px; color: #fff; background: var(--red); border: 1px solid var(--red); border-radius: 5px; font-size: 11px; font-weight: 700; }
.ticket-create-button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.ticket-list-heading { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px; border-bottom: 1px solid #edf0f1; }
.ticket-list-heading h2 { margin: 0; color: #33474e; font-size: 15px; }
.ticket-list-heading p { margin: 6px 0 0; color: #9aa5aa; font-size: 10px; }
.ticket-list-heading p strong { color: var(--red-dark); }
.ticket-status-legend { display: flex; gap: 12px; color: #8a979c; font-size: 9px; }
.ticket-status-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ticket-status-legend span::before { width: 6px; height: 6px; content: ""; background: #d49a37; border-radius: 50%; }
.ticket-status-legend .processing::before { background: #4a86a8; }
.ticket-status-legend .closed::before { background: #9aa5aa; }
.ticket-table-wrap { position: relative; overflow-x: auto; }
.ticket-table { width: 100%; min-width: 2280px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.ticket-table th, .ticket-table td { padding: 0 14px; border-bottom: 1px solid #edf0f1; text-align: left; white-space: nowrap; }
.ticket-table th { height: 48px; color: #7c898e; background: #fafbfc; font-size: 10px; font-weight: 700; }
.ticket-table td { height: 64px; overflow: hidden; color: #586970; font-size: 11px; text-overflow: ellipsis; }
.ticket-table th:first-child, .ticket-table td:first-child { width: 190px; padding-left: 24px; }
.ticket-table th:nth-child(2), .ticket-table td:nth-child(2) { width: 110px; }
.ticket-table th:nth-child(3), .ticket-table td:nth-child(3) { width: 220px; color: #354950; font-weight: 700; }
.ticket-table th:nth-child(4), .ticket-table td:nth-child(4) { width: 320px; }
.ticket-table th:nth-child(5), .ticket-table td:nth-child(5) { width: 90px; }
.ticket-table th:nth-child(6), .ticket-table td:nth-child(6) { width: 140px; }
.ticket-table th:nth-child(7), .ticket-table td:nth-child(7) { width: 90px; }
.ticket-table th:nth-child(8), .ticket-table td:nth-child(8) { width: 240px; }
.ticket-table th:nth-child(9), .ticket-table td:nth-child(9) { width: 145px; }
.ticket-table th:nth-child(10), .ticket-table td:nth-child(10) { width: 150px; }
.ticket-table th:nth-child(11), .ticket-table td:nth-child(11) { width: 170px; }
.ticket-table th:nth-child(12), .ticket-table td:nth-child(12) { width: 92px; }
.ticket-table th:last-child, .ticket-table td:last-child { position: sticky; right: 0; z-index: 2; width: 170px; padding-right: 24px; background: #fff; box-shadow: -5px 0 8px -5px rgba(30,43,49,.2); }
.ticket-table th:last-child { z-index: 3; background: #fafbfc; }
.ticket-number-link { color: #1677d2; }
.ticket-number-link:hover { color: #095ba5; text-decoration: underline; }
.ticket-table tbody tr:hover td { background: #fffafb; }
.my-ticket-table { min-width: 1130px; }
.my-ticket-table th:first-child, .my-ticket-table td:first-child { width: 165px; }
.my-ticket-table th:nth-child(2), .my-ticket-table td:nth-child(2) { width: 85px; }
.my-ticket-table th:nth-child(3), .my-ticket-table td:nth-child(3) { width: 170px; }
.my-ticket-table th:nth-child(4), .my-ticket-table td:nth-child(4) { width: 250px; }
.my-ticket-table th:nth-child(5), .my-ticket-table td:nth-child(5) { width: 75px; }
.my-ticket-table th:nth-child(6), .my-ticket-table td:nth-child(6) { width: 110px; }
.my-ticket-table th:nth-child(7), .my-ticket-table td:nth-child(7) { width: 135px; }
.my-ticket-table th:nth-child(8), .my-ticket-table td:nth-child(8) { width: 75px; }
.my-ticket-table th:last-child, .my-ticket-table td:last-child { width: 65px; }
.ticket-status { display: inline-flex; align-items: center; padding: 5px 9px; color: #9a681d; background: #fff7e9; border-radius: 4px; font-size: 10px; font-weight: 700; }
.ticket-status.processing { color: #356f91; background: #edf6fb; }
.ticket-status.closed { color: #737f84; background: #f1f3f4; }
.ticket-actions { overflow: visible !important; }
.ticket-actions button { padding: 5px 7px; color: #526f83; background: transparent; border: 0; font-size: 11px; }
.ticket-actions button:hover:not(:disabled) { color: var(--red-dark); }
.ticket-actions .danger { color: #b04b56; }
.ticket-actions button:disabled { color: #b7bec1; cursor: not-allowed; }
.ticket-empty { display: grid; min-height: 280px; place-items: center; align-content: center; color: #7e8c91; }
.ticket-empty[hidden] { display: none; }
.ticket-empty span { position: relative; width: 46px; height: 38px; margin-bottom: 14px; border: 1.5px solid #cbd2d5; border-radius: 4px; }
.ticket-empty span::before { position: absolute; top: 13px; right: 8px; left: 8px; height: 1px; content: ""; background: #d8dddf; box-shadow: 0 8px #d8dddf; }
.ticket-empty strong { font-size: 12px; }
.ticket-empty p { margin: 7px 0 0; color: #a5afb3; font-size: 10px; }
.ticket-detail-view { min-height: calc(100vh - var(--topbar-height) - 70px); }
.ticket-detail-view.active { display: block; }
.ticket-detail-page { max-width: 1440px; margin: 0 auto; }
.ticket-detail-heading { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.ticket-detail-heading p { margin: 0 0 7px; color: #9aa5aa; font-size: 10px; }
.ticket-detail-heading h1 { margin: 0; color: #263940; font-size: 25px; letter-spacing: .02em; }
.ticket-detail-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; }
.ticket-detail-heading button:hover { color: var(--red-dark); background: #fff8f9; border-color: #e6c9cd; }
.ticket-detail-heading button span { margin-right: 4px; }
.ticket-detail-card, .ticket-communication-card { overflow: hidden; background: #fff; border: 1px solid #e6eaec; border-radius: 10px; box-shadow: 0 8px 24px rgba(31,46,52,.035); }
.ticket-detail-title { display: flex; min-height: 112px; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 22px 26px; border-bottom: 1px solid #edf0f1; }
.ticket-detail-title > div:first-child { min-width: 0; }
.ticket-detail-title > div:first-child > span { display: inline-flex; margin-bottom: 8px; padding: 4px 8px; color: #6c7880; background: #f1f4f5; border-radius: 4px; font-size: 9px; font-weight: 700; }
.ticket-detail-title h2 { margin: 0; color: #172c3d; font-size: 23px; line-height: 1.5; overflow-wrap: anywhere; }
.ticket-detail-title p { margin: 8px 0 0; color: #8c99aa; font-size: 12px; }
.ticket-title-status { margin-top: 8px; }
.ticket-title-status .ticket-status { border-radius: 20px; }
.ticket-title-status .ticket-status.closed { color: #26967d; background: #eaf7f0; }
.ticket-detail-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.ticket-detail-actions button { height: 34px; padding: 0 13px; color: #b04b56; background: #fff; border: 1px solid #e9cdd1; border-radius: 5px; font-size: 10px; font-weight: 700; }
.ticket-detail-actions button:hover:not(:disabled) { color: #fff; background: var(--red); border-color: var(--red); }
.ticket-detail-actions button:disabled { color: #a9b1b4; background: #f3f5f6; border-color: #e5e8e9; cursor: not-allowed; }
.ticket-detail-actions [data-ticket-back] { color: #586a71; border-color: #dfe4e6; }
.ticket-detail-info { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px 32px; margin: 26px; padding: 24px 20px; background: #f6f8fa; border-radius: 8px; }
.ticket-detail-info div { display: flex; min-width: 0; flex-direction: column; gap: 11px; }
.ticket-detail-info [data-ticket-operator-only][hidden] { display: none; }
.ticket-detail-info div:first-child { padding-left: 0; border-left: 0; }
.ticket-detail-info span { color: #8c99aa; font-size: 11px; }
.ticket-detail-info strong { color: #233749; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ticket-detail-description { padding: 4px 26px 28px; }
.ticket-detail-description h3 { margin: 0; color: #172c3d; font-size: 16px; }
.ticket-detail-description p { margin: 14px 0 0; color: #536b82; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-communication-card { margin-top: 18px; }
.ticket-communication-card > header { display: flex; min-height: 68px; align-items: center; padding: 0 26px; border-bottom: 1px solid #edf0f1; }
.ticket-communication-card header h2 { margin: 0; color: #33474e; font-size: 15px; }
.ticket-communication-card header p { margin: 6px 0 0; color: #9aa5aa; font-size: 9px; }
.ticket-detail-conversation { margin: 0; padding: 22px 26px 26px; list-style: none; border-bottom: 1px solid #edf0f1; }
.ticket-message { position: relative; padding: 0 0 24px 30px; }
.ticket-message:last-child { padding-bottom: 0; }
.ticket-message::before { position: absolute; top: 8px; bottom: -8px; left: 7px; width: 1px; content: ""; background: #dfe5ed; }
.ticket-message:last-child::before { display: none; }
.ticket-message::after { position: absolute; top: 3px; left: 0; width: 10px; height: 10px; content: ""; background: #e92542; border: 3px solid #ffe8ec; border-radius: 50%; }
.ticket-progress-heading { display: flex; align-items: baseline; gap: 16px; margin-bottom: 10px; min-height: 20px; }
.ticket-progress-heading time { color: #526878; font-size: 12px; font-weight: 700; }
.ticket-progress-content { padding: 15px 16px; background: #f8fafc; border: 1px solid #e1e6ed; border-radius: 6px; }
.ticket-message.admin .ticket-progress-content { background: #f3f8ff; border-color: #d3e5ff; }
.ticket-message.transfer::after { background: #7b61c9; border-color: #eee9ff; }
.ticket-message.transfer .ticket-progress-content { background: #f7f4ff; border-color: #ded5fa; }
.ticket-progress-content > span { display: block; margin-bottom: 8px; color: #ce2940; font-size: 11px; font-weight: 700; }
.ticket-message.admin .ticket-progress-content > span { color: #0670cf; }
.ticket-message.transfer .ticket-progress-content > span { color: #6546bb; }
.ticket-progress-content p { margin: 0; color: #435b73; font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-message-attachments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ticket-message-attachments button { width: 112px; padding: 0; overflow: hidden; background: #fff; border: 1px solid #dce3e8; border-radius: 6px; box-shadow: 0 3px 10px rgba(39,55,63,.06); }
.ticket-message-attachments button:hover { border-color: #d6a7ad; box-shadow: 0 4px 14px rgba(131,31,43,.1); }
.ticket-message-attachments img { display: block; width: 100%; height: 76px; object-fit: cover; }
.ticket-message-attachments span { display: block; padding: 7px 8px; overflow: hidden; color: #6c7b81; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .ticket-progress-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .ticket-message { padding-left: 25px; }
}
.ticket-detail-reply { padding: 22px 26px; }
.ticket-transfer-modal { width: min(560px,100%); }
.ticket-detail-reply[hidden] { display: none; }
.ticket-detail-page.has-reply-button { padding-bottom: 85px; }
.ticket-floating-actions { position: fixed; z-index: 36; bottom: 22px; left: calc(50% + var(--sidebar-width) / 2); display: flex; align-items: center; justify-content: center; gap: 12px; transform: translateX(-50%); }
.ticket-floating-actions button { min-width: 126px; height: 44px; padding: 0 22px; color: #fff; border-radius: 22px; font-size: 12px; font-weight: 700; transition: transform .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease; }
.ticket-supplement-floating { background: var(--red); border: 1px solid var(--red); box-shadow: 0 12px 30px rgba(150,27,41,.28); }
.ticket-supplement-floating:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); }
.ticket-supplement-floating:focus-visible { outline: 3px solid rgba(182,31,46,.2); outline-offset: 3px; }
.ticket-transfer-floating { background: #4d6fae; border: 1px solid #4d6fae; box-shadow: 0 12px 28px rgba(55,82,139,.24); }
.ticket-transfer-floating:hover { background: #3e5f99; border-color: #3e5f99; transform: translateY(-1px); }
.ticket-transfer-floating:focus-visible { outline: 3px solid rgba(77,111,174,.22); outline-offset: 3px; }
.ticket-floating-actions button[hidden], .ticket-reply-modal-backdrop[hidden] { display: none; }
.ticket-reply-modal-backdrop { position: fixed; z-index: 121; inset: 0; display: grid; padding: 24px; place-items: center; background: rgba(30,43,49,.5); backdrop-filter: blur(3px); }
.ticket-reply-modal-backdrop .ticket-detail-reply { width: min(680px,100%); max-height: calc(100dvh - 48px); overflow-y: auto; background: #fff; border: 1px solid #e0e5e7; border-radius: 12px; box-shadow: 0 28px 80px rgba(18,29,34,.28); }
.ticket-reply-modal-header { display: none; }
.ticket-reply-modal-backdrop .ticket-reply-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: -22px -26px 20px; padding: 20px 24px 17px; border-bottom: 1px solid #edf0f1; }
.ticket-reply-modal-header h2 { margin: 0; color: #263940; font-size: 18px; }
.ticket-reply-modal-header p { margin: 6px 0 0; color: #8b989d; font-size: 10px; }
.ticket-reply-modal-header button { flex: 0 0 32px; width: 32px; height: 32px; color: #77868c; background: transparent; border: 0; border-radius: 50%; font-size: 24px; line-height: 1; }
.ticket-reply-modal-header button:hover { color: var(--red); background: #fff3f4; }
.ticket-detail-reply label { display: flex; flex-direction: column; gap: 8px; }
.ticket-detail-reply label b { color: var(--red); }
.ticket-detail-reply textarea { min-height: 100px; padding: 11px 12px; resize: vertical; font-family: inherit; line-height: 1.6; }
.ticket-reply-upload { margin-top: 14px; }
.ticket-reply-upload[hidden] { display: none; }
.ticket-reply-upload input[type="file"] { width: 100%; padding: 9px 11px; color: #52636a; background: #fafbfc; border: 1px solid #dfe4e6; border-radius: 5px; font-size: 10px; }
.ticket-reply-upload small { color: #98a3a7; font-size: 9px; font-weight: 400; }
[data-ticket-reply-file-list] { display: flex; flex-wrap: wrap; gap: 8px; }
[data-ticket-reply-file-list] span { max-width: 260px; padding: 5px 8px; overflow: hidden; color: #586b72; background: #f3f6f7; border-radius: 4px; font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.ticket-detail-reply > p { margin: 9px 0 0; color: #939fa3; font-size: 9px; }
.ticket-detail-reply footer { display: flex; justify-content: flex-end; margin-top: 16px; }
.ticket-detail-reply footer button { min-width: 88px; height: 36px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.ticket-closed-notice { display: flex; align-items: center; gap: 13px; margin: 22px 26px; padding: 15px 17px; color: #69797f; background: #f5f7f8; border: 1px solid #e5e9ea; border-radius: 7px; }
.ticket-closed-notice[hidden] { display: none; }
.ticket-closed-notice > span { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; color: #fff; background: #8f9ca1; border-radius: 50%; font-size: 13px; }
.ticket-closed-notice div { display: flex; flex-direction: column; gap: 4px; }
.ticket-closed-notice strong { font-size: 11px; }
.ticket-closed-notice p { margin: 0; color: #96a1a5; font-size: 9px; }
.ticket-image-viewer { position: fixed; z-index: 180; inset: 0; display: grid; padding: 54px; place-items: center; background: rgba(12,19,23,.9); }
.ticket-image-viewer[hidden] { display: none; }
.ticket-image-viewer > button { position: fixed; top: 20px; right: 24px; width: 42px; height: 42px; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); border-radius: 50%; font-size: 27px; line-height: 1; }
.ticket-image-viewer > button:hover { background: rgba(255,255,255,.22); }
.ticket-image-viewer figure { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; flex-direction: column; margin: 0; }
.ticket-image-viewer img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; box-shadow: 0 20px 70px rgba(0,0,0,.35); }
.ticket-image-viewer figcaption { margin-top: 14px; color: rgba(255,255,255,.82); font-size: 12px; }

/* User ticket center */
.ticket-submit-view { min-height: calc(100vh - var(--topbar-height) - 70px); }
.ticket-submit-view.active { display: block; }
.ticket-submit-page { max-width: 1040px; margin: 0 auto; }
.ticket-submit-card { overflow: hidden; background: #fff; border: 1px solid #e6eaec; border-radius: 10px; box-shadow: 0 8px 24px rgba(31,46,52,.035); }
.ticket-submit-card > header { padding: 25px 28px 22px; border-bottom: 1px solid #edf0f1; }
.ticket-submit-card > header p { margin: 0 0 7px; color: #9aa5aa; font-size: 10px; }
.ticket-submit-card > header h2 { margin: 0; color: #263940; font-size: 22px; }
.ticket-submit-card > header span { display: block; margin-top: 9px; color: #8a979c; font-size: 11px; }
.ticket-submit-card form { margin: 0; }
.ticket-submit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 24px; padding: 26px 28px 30px; }
.ticket-submit-grid label { display: flex; min-width: 0; flex-direction: column; gap: 8px; color: #52636a; font-size: 11px; font-weight: 700; }
.ticket-submit-grid label b { color: var(--red); }
.ticket-submit-grid input, .ticket-submit-grid select, .ticket-submit-grid textarea { width: 100%; color: #33474e; background: #fff; border: 1px solid #dfe4e6; border-radius: 5px; outline: none; font-family: inherit; font-size: 11px; line-height: 1.6; transition: border-color .15s ease, box-shadow .15s ease; }
.ticket-submit-grid input, .ticket-submit-grid select { height: 40px; padding: 0 12px; }
.ticket-submit-grid textarea { min-height: 130px; padding: 11px 12px; resize: vertical; }
.ticket-submit-grid input:focus, .ticket-submit-grid select:focus, .ticket-submit-grid textarea:focus { border-color: #d6a7ad; box-shadow: 0 0 0 3px rgba(182,31,46,.07); }
.ticket-submit-grid input[readonly] { color: #74848a; background: #f6f8f9; }
.ticket-submit-wide { grid-column: 1 / -1; }
.ticket-file-field input[type="file"] { height: auto; padding: 10px 12px; background: #fafbfc; }
.ticket-file-field small { color: #98a3a7; font-size: 9px; font-weight: 400; }
[data-ticket-file-list] { display: flex; flex-wrap: wrap; gap: 8px; }
[data-ticket-file-list] span { max-width: 280px; padding: 5px 8px; overflow: hidden; color: #586b72; background: #f3f6f7; border-radius: 4px; font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.ticket-submit-card form > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 28px; background: #fafbfc; border-top: 1px solid #edf0f1; }
.ticket-submit-card form > footer button { min-width: 88px; height: 38px; 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; }
  .ticket-page-heading { margin-bottom: 16px; }
  .ticket-page-heading h1 { font-size: 21px; }
  .ticket-search-panel { align-items: stretch; flex-direction: column; padding: 18px; }
  .ticket-search-fields { grid-template-columns: 1fr; }
  .ticket-search-actions button { flex: 1; }
  .ticket-status-legend { display: none; }
  .ticket-detail-heading { align-items: flex-start; gap: 16px; }
  .ticket-detail-heading h1 { font-size: 21px; }
  .ticket-detail-heading button { flex: 0 0 auto; }
  .ticket-detail-title { align-items: flex-start; flex-direction: column; padding: 20px; }
  .ticket-detail-actions { order: -1; width: 100%; justify-content: flex-end; }
  .ticket-detail-info { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 20px; padding: 20px; }
  .ticket-detail-info div { padding-left: 0; border-left: 0; }
  .ticket-detail-description, .ticket-detail-conversation, .ticket-detail-reply { padding-right: 20px; padding-left: 20px; }
  .ticket-reply-modal-backdrop { padding: 14px; }
  .ticket-reply-modal-backdrop .ticket-detail-reply { max-height: calc(100dvh - 28px); padding: 18px 20px; }
  .ticket-reply-modal-backdrop .ticket-reply-modal-header { margin: -18px -20px 18px; padding: 18px 20px 15px; }
  .ticket-floating-actions { bottom: 16px; left: 50%; }
  .ticket-communication-card > header { padding: 0 20px; }
  .ticket-closed-notice { margin-right: 20px; margin-left: 20px; }
  .ticket-submit-grid { grid-template-columns: 1fr; padding: 20px; }
  .ticket-submit-wide { grid-column: auto; }
  .ticket-submit-card > header { padding: 22px 20px 19px; }
  .ticket-submit-card form > footer { padding: 15px 20px; }
}
