.deployment-downloads { width: min(840px, 94vw); max-height:90vh; overflow:auto; }
.store-members-dialog > .panel { border:0; box-shadow:none; margin:0; padding:24px; }
.store-members-dialog header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.store-members-dialog h2 { font-size:22px; margin:0; }
.store-members-dialog header button { border:1px solid var(--line); background:white; border-radius:10px; padding:9px 16px; white-space:nowrap; }
.store-members-dialog .compact-form { display:grid; gap:14px; }
.store-members-dialog .compact-form small { color:var(--muted); line-height:1.6; }
.store-members-dialog [data-member] { display:grid; gap:12px; }
.store-members-dialog [data-member] input[type=checkbox] { width:auto; margin-right:8px; }
.deployment-body { padding: 8px 24px 24px; overflow-wrap: anywhere; }
.deployment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.deployment-grid section { border: 1px solid #e6eaf0; border-radius: 16px; padding: 16px; background: #f8fafc; }
.deployment-grid h4 { margin: 0 0 10px; }
.deployment-grid p { min-height: 54px; color: #667085; font-size: 13px; }
.deployment-grid section > div { display: flex; flex-wrap: wrap; gap: 8px; }
.deployment-status { min-height: 26px; color: #2459c4; }
.deployment-status .primary { display: inline-block; text-decoration: none; margin-bottom: 10px; }
@media(max-width: 640px) { .deployment-grid { grid-template-columns: 1fr; } .deployment-grid p { min-height: 0; } }
:root {
  --ink: #172033;
  --ink-soft: #344054;
  --muted: #667085;
  --line: #e6eaf0;
  --line-strong: #d6dce5;
  --paper: #f5f7fb;
  --white: #ffffff;
  --nav: #101828;
  --nav-soft: #1d2939;
  --blue: #3157d5;
  --blue-dark: #2646b1;
  --blue-soft: #eef2ff;
  --cyan: #17a9c4;
  --green: #12a06a;
  --green-soft: #e9f8f1;
  --amber: #db8b17;
  --amber-soft: #fff6e5;
  --red: #d04444;
  --red-soft: #ffeded;
  --violet: #7a5bd3;
  --violet-soft: #f1edff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 5px 16px rgba(16, 24, 40, .04);
  --shadow-md: 0 12px 34px rgba(16, 24, 40, .10);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 9px; color: #a5b4fc; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.dark { color: var(--blue); }

/* 登录页 */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(560px, 1.12fr) minmax(480px, .88fr); background: var(--white); }
.brand-panel { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; padding: 38px clamp(44px, 5.6vw, 92px) 48px; color: white; background: radial-gradient(circle at 86% 17%, rgba(56, 189, 248, .17), transparent 31%), radial-gradient(circle at 8% 92%, rgba(99, 102, 241, .22), transparent 32%), linear-gradient(142deg, #182544 0%, #101828 58%, #111b2f 100%); }
.brand-panel::before { content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom, black, transparent 82%); }
.brand-panel::after { content: ""; position: absolute; width: 440px; height: 440px; right: -245px; top: 23%; border: 1px solid rgba(129, 140, 248, .24); border-radius: 50%; box-shadow: 0 0 0 72px rgba(99, 102, 241, .045), 0 0 0 144px rgba(99, 102, 241, .025); }
.brand-top, .brand-content, .brand-console { position: relative; z-index: 1; }
.brand-top { display: flex; align-items: center; justify-content: space-between; }
.brand-lockup, .side-brand { display: flex; align-items: center; gap: 12px; }
.brand-lockup > div, .side-brand > div { display: grid; gap: 3px; }
.brand-lockup b { font-size: 16px; letter-spacing: .04em; }
.brand-lockup small { color: #8997ae; font-size: 9px; letter-spacing: .15em; }
.logo-mark { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; color: white; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; background: linear-gradient(145deg, #5475ef, #3157d5); font-size: 21px; font-weight: 900; box-shadow: 0 10px 26px rgba(49, 87, 213, .3); }
.edition-pill { padding: 7px 11px; color: #b8c5da; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(255,255,255,.045); font-size: 11px; }
.brand-content { margin: auto 0; padding: 70px 0 46px; }
.brand-content h1 { max-width: 700px; margin: 0; font-size: clamp(42px, 4.35vw, 66px); line-height: 1.16; letter-spacing: -.045em; }
.brand-copy { max-width: 640px; margin: 25px 0 32px; color: #aebbd0; font-size: 16px; line-height: 1.9; }
.promise-list { display: flex; flex-wrap: wrap; gap: 10px; }
.promise-list span { display: flex; align-items: center; gap: 9px; padding: 9px 13px; color: #d9e1ef; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(255,255,255,.045); font-size: 12px; }
.promise-list i { color: #7dd3fc; font-style: normal; font-size: 10px; font-weight: 800; }
.brand-console { width: min(620px, 100%); padding: 10px 16px; border: 1px solid rgba(255,255,255,.10); border-radius: 14px; background: rgba(255,255,255,.045); backdrop-filter: blur(8px); }
.console-head, .console-row { display: grid; align-items: center; }
.console-head { grid-template-columns: 1fr auto; padding: 3px 0 10px; color: #96a6bd; font-size: 11px; }
.console-head em { display: flex; align-items: center; gap: 6px; color: #6ee7b7; font-style: normal; }
.console-head em i, .security-note > i, .system-state i { width: 7px; height: 7px; border-radius: 50%; background: #32d583; box-shadow: 0 0 0 4px rgba(50, 213, 131, .11); }
.console-row { grid-template-columns: 45px 1fr auto; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.07); }
.console-row b { color: #93c5fd; font-size: 14px; }
.console-row span { color: #d0d9e7; font-size: 12px; }
.console-row small { color: #8ca0ba; font-size: 11px; }
.login-panel { min-height: 100vh; display: grid; place-items: center; padding: 42px clamp(34px, 5vw, 84px); background: #fbfcfe; }
.login-wrap { width: min(476px, 100%); }
.login-heading { margin-bottom: 25px; }
.login-kicker { color: var(--blue); font-size: 12px; font-weight: 800; }
.login-heading h2 { margin: 7px 0 8px; font-size: 30px; letter-spacing: -.02em; }
.login-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.login-card { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-md); }
label { display: grid; gap: 8px; margin: 17px 0; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px; color: var(--ink); background: var(--white); outline: none; transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: #98a2b3; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 87, 213, .10); }
textarea { min-height: 100px; resize: vertical; }
.primary { min-height: 40px; border: 0; border-radius: 9px; padding: 10px 16px; color: white; background: var(--blue); font-weight: 800; box-shadow: 0 5px 14px rgba(49, 87, 213, .18); transition: .18s; }
.primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.primary.full { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 22px; }
.primary.full span { font-size: 17px; font-weight: 400; }
.secondary, .danger, .ghost { min-height: 37px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 12px; background: white; color: var(--ink-soft); font-weight: 700; transition: .18s; }
.secondary { color: var(--blue); border-color: #cbd5ff; background: var(--blue-soft); }
.danger { color: var(--red); border-color: #f0c7c7; background: #fffafa; }
.ghost:hover, .secondary:hover { border-color: #aebcf1; color: var(--blue); background: #f8f9ff; }
.danger:hover { border-color: #e79a9a; color: #9f2525; background: #fff0f0; }
.danger.compact, .secondary.compact { min-height: 31px; padding: 6px 9px; font-size: 9px; }
.demo-accounts { margin-top: 27px; padding-top: 21px; border-top: 1px solid var(--line); }
.demo-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.demo-title span { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.demo-title small { color: #98a2b3; font-size: 11px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-grid button { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: 9px; background: #fafbfc; transition: .18s; }
.account-grid button:last-child { grid-column: 1 / -1; }
.account-grid button:hover { border-color: #b9c5f3; background: var(--blue-soft); transform: translateY(-1px); }
.account-grid button i { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue); border-radius: 8px; background: #e7ecff; font-size: 12px; font-style: normal; font-weight: 900; }
.account-grid button span { display: grid; gap: 2px; min-width: 0; }
.account-grid b { color: var(--ink-soft); font-size: 12px; }
.account-grid small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.login-foot { margin: 18px 0 0; color: #98a2b3; text-align: center; font-size: 11px; }
.login-help { margin-top: 24px; padding: 15px 16px; border: 1px solid #e2e8f5; border-radius: 11px; background: #f8faff; }
.login-help b { color: var(--ink-soft); font-size: 12px; }
.login-help p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.notice-card { margin-bottom: 15px; padding: 13px 15px; border: 1px solid #bfe8d7; border-radius: 10px; background: #f0fbf7; }
.notice-card b { color: #147a58; font-size: 12px; }
.notice-card p { margin: 6px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.invitation-url { display: block; margin-top: 10px; padding: 10px 12px; color: var(--blue); border: 1px solid #cbd5ff; border-radius: 8px; background: white; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; text-decoration: none; }
.invitation-url:hover { border-color: #9eafea; background: #f8faff; }
.invitation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.invitation-actions .secondary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 11px; }
.invitation-note { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.invitation-warning { margin-top: 10px; padding: 9px 11px; color: #855d0a; border: 1px solid #efd397; border-radius: 8px; background: var(--amber-soft); font-size: 10px; line-height: 1.6; }
.check-line { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-soft); font-size: 11px; font-weight: 600; line-height: 1.6; }
.check-line input { width: auto; margin-top: 3px; }

/* 公开邀请激活页 */
.public-activation-page { min-height: 100vh; display: grid; place-items: center; padding: 42px 20px; background: radial-gradient(circle at 12% 8%, rgba(49,87,213,.16), transparent 30%), radial-gradient(circle at 88% 92%, rgba(23,169,196,.13), transparent 28%), #f4f7fc; }
.activation-shell { width: min(540px, 100%); }
.activation-brand { display: flex; align-items: center; justify-content: center; gap: 13px; margin-bottom: 22px; }
.activation-brand > div { display: grid; gap: 3px; }
.activation-brand b { color: var(--ink); font-size: 19px; }
.activation-brand small { color: var(--muted); font-size: 11px; }
.activation-card { padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 18px 48px rgba(16,24,40,.12); }
.activation-card h1 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.activation-status { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.activation-status.error { color: var(--red); }
.activation-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 8px; padding: 16px; border: 1px solid #dce5f7; border-radius: 12px; background: #f8faff; }
.activation-summary div { display: grid; gap: 4px; min-width: 0; }
.activation-summary small { color: var(--muted); font-size: 10px; }
.activation-summary b { color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }
.activation-unavailable { margin-top: 22px; padding: 15px 16px; color: #7a550b; border: 1px solid #efd397; border-radius: 12px; background: var(--amber-soft); font-size: 12px; line-height: 1.75; }
.activation-form { margin-top: 18px; }
.activation-code-row { display: grid; grid-template-columns: minmax(0,1fr) 126px; gap: 10px; }
.activation-code-row .secondary { min-height: 42px; }
.activation-back { display: block; margin-top: 22px; color: var(--blue); text-align: center; font-size: 12px; text-decoration: none; }
.activation-back:hover { text-decoration: underline; }
.activation-foot { margin: 15px 0 0; color: #7d899b; text-align: center; font-size: 10px; line-height: 1.6; }

/* 工作台框架 */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 238px; display: flex; flex-direction: column; padding: 24px 15px 20px; color: #e8edf6; background: var(--nav); }
.side-brand { padding: 0 8px 27px; }
.side-brand b { font-size: 14px; }
.side-brand small { color: #7f8ea5; font-size: 10px; }
.logo-mark.small { width: 38px; height: 38px; margin: 0; border-radius: 10px; font-size: 18px; }
.nav-caption { margin: 3px 12px 9px; color: #66758c; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
nav { display: grid; gap: 4px; }
nav button { position: relative; display: flex; gap: 11px; align-items: center; width: 100%; padding: 11px 13px; border: 0; border-radius: 8px; color: #97a6bc; background: transparent; text-align: left; font-size: 13px; font-weight: 700; transition: .18s; }
nav button:hover { color: #e8edf6; background: rgba(255,255,255,.055); }
nav button.active { color: white; background: #253352; }
nav button.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #7c9cff; }
nav .nav-icon { width: 22px; height: 22px; display: grid; place-items: center; color: currentColor; }
nav .nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge { min-width: 18px; height: 18px; display: grid; place-items: center; margin-left: auto; padding: 0 5px; color: white; border-radius: 999px; background: var(--red); font-size: 9px; font-weight: 900; }
.security-note { margin-top: auto; display: flex; gap: 11px; align-items: flex-start; padding: 13px; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; background: rgba(255,255,255,.035); }
.security-note > i { margin-top: 5px; flex: 0 0 auto; }
.security-note div { display: grid; gap: 4px; }
.security-note span { color: #d9e4f2; font-size: 11px; font-weight: 800; }
.security-note small { color: #75859c; font-size: 9px; line-height: 1.5; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 8; height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.topbar .eyebrow { margin-bottom: 4px; font-size: 9px; }
.topbar h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.topbar-actions, .user-menu, .system-state { display: flex; align-items: center; }
.topbar-actions { gap: 20px; }
.system-state { gap: 8px; padding-right: 20px; color: var(--muted); border-right: 1px solid var(--line); font-size: 11px; }
.system-state i { width: 6px; height: 6px; }
.user-menu { gap: 10px; }
.user-menu > div:nth-child(2) { display: grid; min-width: 78px; gap: 2px; }
.user-menu b { color: var(--ink-soft); font-size: 12px; }
.user-menu small { color: var(--muted); font-size: 10px; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #5273ed, #3157d5); border-radius: 9px; font-size: 12px; font-weight: 900; }
.text-button, .icon-button { border: 0; color: var(--muted); background: transparent; }
.text-button { padding: 7px 8px; border-radius: 7px; font-size: 11px; }
.text-button:hover { color: var(--red); background: var(--red-soft); }
.content { width: min(1480px, 100%); margin: 0 auto; padding: 26px 30px 54px; }

/* 总览和业务卡片 */
.hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 28px; min-height: 166px; padding: 27px 30px; border: 1px solid #263b67; border-radius: 14px; color: white; background: radial-gradient(circle at 82% 15%, rgba(56, 189, 248, .16), transparent 28%), linear-gradient(128deg, #1c2f57, #17233d 68%); box-shadow: 0 10px 26px rgba(16, 24, 40, .10); }
.hero::after { content: ""; position: absolute; width: 210px; height: 210px; right: -68px; bottom: -133px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.025); }
.hero > * { position: relative; z-index: 1; }
.hero h3 { margin: 3px 0 10px; font-size: 24px; letter-spacing: -.02em; }
.hero p { max-width: 730px; margin: 0; color: #aebbd0; font-size: 13px; line-height: 1.75; }
.hero-meta { display: inline-flex; margin-top: 18px; padding-top: 14px; color: #8192ac; border-top: 1px solid rgba(255,255,255,.09); font-size: 10px; }
.hero.role-tech { background: radial-gradient(circle at 82% 15%, rgba(56, 189, 248, .18), transparent 28%), linear-gradient(128deg, #17345e, #17233d 68%); }
.hero.role-agent { background: radial-gradient(circle at 82% 15%, rgba(45, 212, 191, .15), transparent 28%), linear-gradient(128deg, #174451, #172c3d 68%); }
.hero.role-regional_manager { background: radial-gradient(circle at 84% 14%, rgba(251, 191, 36, .17), transparent 29%), linear-gradient(128deg, #3d3157, #1d2c48 68%); }
.hero.role-owner, .hero.role-employee { background: radial-gradient(circle at 82% 15%, rgba(129, 140, 248, .17), transparent 28%), linear-gradient(128deg, #29345d, #19233d 68%); }
.hero-tag { align-self: start; display: flex; align-items: center; gap: 7px; padding: 7px 11px; color: #b9c8ff; border: 1px solid rgba(165,180,252,.2); border-radius: 999px; background: rgba(99,102,241,.12); font-size: 10px; white-space: nowrap; }
.hero-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7c9cff; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin: 16px 0; }
.stat-card, .panel { border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow-sm); }
.stat-card { position: relative; overflow: hidden; min-height: 126px; padding: 19px 20px; }
.stat-card::after { content: ""; position: absolute; right: -23px; top: -22px; width: 73px; height: 73px; border-radius: 50%; background: var(--blue-soft); }
.stat-card:nth-child(2)::after { background: #ecf9fb; }
.stat-card:nth-child(3)::after { background: var(--amber-soft); }
.stat-card:nth-child(4)::after { background: var(--green-soft); }
.stat-card small { position: relative; z-index: 1; color: var(--muted); font-size: 11px; font-weight: 700; }
.stat-card b { position: relative; z-index: 1; display: block; margin: 10px 0 3px; font-size: 28px; line-height: 1; letter-spacing: -.03em; }
.stat-card b .muted { font-size: 15px; font-weight: 600; }
.stat-card em { color: #98a2b3; font-size: 10px; font-style: normal; }
.metric-icon { position: absolute; z-index: 1; right: 17px; top: 15px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--blue); border-radius: 8px; background: var(--blue-soft); }
.metric-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-card.tone-green .metric-icon { color: var(--green); background: var(--green-soft); }
.stat-card.tone-amber .metric-icon { color: var(--amber); background: var(--amber-soft); }
.stat-card.tone-violet .metric-icon { color: var(--violet); background: var(--violet-soft); }
.stat-card.tone-red .metric-icon { color: var(--red); background: var(--red-soft); }
.panel { padding: 20px; }
.grid-two { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: 14px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); gap: 14px; }
.dashboard-primary { min-width: 0; }
.panel-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 17px; }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.panel-count { min-width: 30px; height: 30px; display: grid; place-items: center; padding: 0 8px; color: var(--blue); border-radius: 8px; background: var(--blue-soft); font-size: 12px; font-weight: 900; }
.list { display: grid; gap: 10px; }
.dashboard-ticket-list, .store-card-list, .task-list { display: grid; gap: 8px; }
.dashboard-ticket { width: 100%; display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; color: var(--ink); text-align: left; border: 1px solid var(--line); border-radius: 9px; background: #fff; transition: .16s; }
.dashboard-ticket:hover { border-color: #bdc9ec; background: #fafbff; transform: translateX(2px); }
.dashboard-ticket-copy, .dashboard-ticket-meta { display: grid; gap: 5px; min-width: 0; }
.dashboard-ticket-copy b, .dashboard-ticket-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-ticket-copy b { font-size: 11px; }
.dashboard-ticket-copy small, .dashboard-ticket-meta small { color: var(--muted); font-size: 9px; }
.dashboard-ticket-meta { justify-items: end; }
.task-panel { min-width: 0; }
.task-item { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.task-item:last-child { border-bottom: 0; }
.task-item b { font-size: 11px; }
.task-item em { min-width: 24px; color: var(--ink); text-align: right; font-size: 13px; font-style: normal; font-weight: 900; }
.task-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.task-dot.tone-green { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.task-dot.tone-amber { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.task-dot.tone-violet { background: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.task-dot.tone-red { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.store-mini { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 9px; }
.store-mini > div { min-width: 0; display: grid; gap: 4px; }
.store-mini b, .store-mini small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-mini b { font-size: 11px; }
.store-mini small { color: var(--muted); font-size: 9px; }
.store-avatar { width: 36px; height: 36px; display: grid; place-items: center; color: #0b7e78; border-radius: 9px; background: #e5f7f4; font-size: 12px; font-weight: 900; }
.quick-actions { display: grid; gap: 9px; }
.quick-action { position: relative; padding: 15px 38px 15px 15px; border: 1px solid #e2e7f5; border-radius: 10px; text-align: left; color: var(--ink); background: #f8faff; transition: .18s; }
.quick-action::after { content: "→"; position: absolute; right: 15px; top: 50%; color: #8fa3e7; font-size: 16px; transform: translateY(-50%); }
.quick-action:hover { border-color: #bac6ef; background: var(--blue-soft); transform: translateY(-1px); }
.quick-action b, .quick-action small { display: block; }
.quick-action b { font-size: 12px; }
.quick-action small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }

/* 工单、表单和表格 */
.ticket-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: .16s; }
.ticket-row:hover { border-color: #cdd6ec; box-shadow: 0 7px 18px rgba(16,24,40,.05); }
.machine-chip { display: block; min-width: 0; max-width: 100%; min-height: 42px; padding: 8px; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 900; line-height: 26px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-row-content { min-width: 0; }
.ticket-device-identity, .dashboard-ticket-copy .ticket-device-identity { display: block; min-width: 0; max-width: 100%; margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.ticket-row h4 { margin: 0 0 5px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row p { margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row-actions { display: grid; gap: 7px; justify-items: end; }
.ticket-row-actions > div { display: flex; flex-wrap: wrap; gap: 7px; }
.ticket-row-actions button { min-height: 31px; padding: 6px 9px; font-size: 9px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.OPEN { color: #a76308; background: var(--amber-soft); }
.status.IN_PROGRESS { color: var(--blue); background: var(--blue-soft); }
.status.CLOSED { color: #16805b; background: var(--green-soft); }
.status.REMOTE_ACTIVE { color: #b63f3f; background: var(--red-soft); }
.status.REMOTE_CONNECTING { color: #2563a7; background: #e7f1ff; }
.status.WAITING_AUTH { color: #6d50b8; background: var(--violet-soft); }
.status.WAITING_CONFIRM { color: #15738d; background: #e9f7fa; }
.status.WAITING_AGENT { color: #a76308; background: var(--amber-soft); }
.status.ONSITE_IN_PROGRESS { color: #2563a7; background: #e7f1ff; }
.status.CANCELLED { color: #667085; background: #f1f3f6; }
.empty { padding: 34px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line-strong); border-radius: 10px; background: #fafbfc; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.access-unlock-checklist { margin: 18px 0 4px; padding: 17px 18px 13px; border: 1px solid #cfd9f5; border-radius: 12px; background: linear-gradient(145deg, #f8faff, #f2f6ff); }
.access-unlock-checklist legend { padding: 0 8px; color: #263d79; font-size: 13px; font-weight: 900; }
.access-unlock-checklist > p { margin: 0 0 11px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.access-unlock-checklist label { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; padding: 10px 11px; border: 1px solid #e2e8f6; border-radius: 9px; background: rgba(255,255,255,.86); font-size: 11px; line-height: 1.6; }
.access-unlock-checklist input { width: 17px; height: 17px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.access-unlock-checklist b { margin-right: 4px; color: var(--ink); }
.machine-picker { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.machine-picker > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 10px; font-weight: 800; }
.machine-picker > div { display: flex; flex-wrap: wrap; gap: 7px; }
.machine-picker button { padding: 7px 10px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 7px; background: white; font-size: 10px; font-weight: 800; }
.machine-picker button.online { color: #147957; border-color: #bce5d3; background: var(--green-soft); }
.machine-picker button:hover { color: var(--blue); border-color: #aebcf1; background: var(--blue-soft); }
.machine-info { margin: 11px 0 2px; padding: 12px; border-radius: 8px; color: #16684d; background: var(--green-soft); font-size: 11px; }
.machine-info.error { color: #9d3e3e; background: var(--red-soft); }
.toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 16px; padding: 11px; border-radius: 10px; background: #f8f9fb; }
.toolbar input, .toolbar select { width: auto; min-width: 190px; margin: 0; background: white; }
.toolbar-tip { margin-left: auto; color: #98a2b3; font-size: 9px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 15px; }
.mini-stats > div { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfc; }
.mini-stats small, .mini-stats b { display: block; }
.mini-stats small { color: var(--muted); font-size: 9px; }
.mini-stats b { margin-top: 5px; font-size: 18px; }
.table-wrap { overflow: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 11px; white-space: nowrap; }
th { color: #7b8798; background: #fafbfc; font-size: 10px; font-weight: 800; }
tbody tr { transition: background .16s; }
tbody tr:hover { background: #fafbff; }
tbody tr:last-child td { border-bottom: 0; }
.channel-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr); gap: 14px; margin-top: 16px; align-items: start; }
.create-store-panel { position: sticky; top: 98px; }
.store-management-panel { margin-top: 16px; }
.deleted-store-panel { margin-top: 14px; border-color: #e3e6eb; background: #fbfcfd; }
.deleted-store-row { color: var(--muted); }
.deleted-store-row b { color: var(--ink-soft); }
.muted-count { color: var(--muted); background: #eef1f5; }
.table-actions { display: flex; align-items: center; gap: 7px; }
.compact-form label { margin: 12px 0; }
.compact-form label small { color: #98a2b3; font-size: 9px; font-weight: 400; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-note { margin: 12px 0 0; color: #98a2b3; font-size: 9px; line-height: 1.65; }
.code-chip { display: inline-flex; padding: 4px 7px; color: var(--blue); border-radius: 6px; background: var(--blue-soft); font-family: Consolas, monospace; font-size: 10px; font-weight: 800; }
.role-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 9px; margin-bottom: 15px; }
.role-summary > div { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfc; }
.role-summary span, .role-summary b { display: block; }
.role-summary span { color: var(--muted); font-size: 9px; }
.role-summary b { margin-top: 6px; font-size: 18px; }
.user-cell { display: flex; align-items: center; gap: 8px; }
.user-cell > span { width: 26px; height: 26px; display: grid; place-items: center; color: var(--blue); border-radius: 7px; background: var(--blue-soft); font-size: 9px; font-weight: 900; }
.role-chip { display: inline-flex; padding: 5px 8px; color: var(--ink-soft); border-radius: 6px; background: #f1f3f6; font-size: 9px; font-weight: 800; }
.role-chip.role-admin { color: #6941c6; background: var(--violet-soft); }
.role-chip.role-tech { color: var(--blue); background: var(--blue-soft); }
.role-chip.role-agent { color: #087a70; background: #e5f7f4; }
.role-chip.role-regional_manager { color: #8c5b12; background: #fff3d7; }
.role-chip.role-owner { color: #a76308; background: var(--amber-soft); }
.role-chip.role-employee { color: #15738d; background: #e9f7fa; }

/* 自动排单 */
.dispatch-banner { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 16px; padding: 22px 25px; color: white; border: 1px solid #28457c; border-radius: 13px; background: radial-gradient(circle at 88% 20%, rgba(56,189,248,.2), transparent 27%), linear-gradient(125deg, #172e56, #18233c); box-shadow: var(--shadow-sm); }
.dispatch-banner h3 { margin: 4px 0 7px; font-size: 20px; }
.dispatch-banner p { max-width: 760px; margin: 0; color: #afbdd2; font-size: 11px; line-height: 1.7; }
.dispatch-mode { padding: 7px 12px; color: #bccef7; border: 1px solid rgba(165,180,252,.24); border-radius: 999px; background: rgba(99,102,241,.13); font-size: 10px; font-weight: 900; white-space: nowrap; }
.dispatch-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .4fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.technician-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.technician-card { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.technician-head { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 9px; align-items: center; }
.technician-head > div { display: grid; gap: 3px; min-width: 0; }
.technician-head b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.technician-head small { color: var(--muted); font-size: 9px; }
.technician-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue); border-radius: 9px; background: var(--blue-soft); font-size: 11px; font-weight: 900; }
.presence { display: inline-flex; gap: 5px; align-items: center; color: #667085; font-size: 9px; font-weight: 800; }
.presence::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.presence-online { color: #16805b; }
.presence-busy { color: #b86c13; }
.presence-paused { color: #6d50b8; }
.presence-standby { color: #3973c8; }
.load-line { display: flex; justify-content: space-between; margin-top: 14px; color: var(--muted); font-size: 9px; }
.load-track { height: 6px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #e9edf3; }
.load-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4d75d8, #43a4d9); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.skill-tags span { padding: 4px 6px; color: #536174; border-radius: 5px; background: #edf1f6; font-size: 8px; font-weight: 800; }
.skill-tags .skill-p0 { color: #a34633; background: #fff0e8; }
.presence-editor { display: grid; grid-template-columns: auto minmax(110px, 1fr); gap: 10px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 9px; font-weight: 800; }
.presence-editor select { margin: 0; padding: 7px 30px 7px 9px; font-size: 9px; }
.pause-reason { margin: 9px 0 0; color: #6d50b8; font-size: 9px; }
.dispatch-queue-panel { position: sticky; top: 98px; }
.dispatch-queue-list { display: grid; gap: 7px; }
.dispatch-queue-list div { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.dispatch-queue-list span { color: var(--muted); font-size: 10px; }
.dispatch-queue-list b { font-size: 16px; }
.dispatch-footnote { margin: 13px 0 0; color: #98a2b3; font-size: 9px; line-height: 1.6; }
.priority { display: inline-flex; min-width: 30px; justify-content: center; padding: 4px 6px; color: var(--blue); border-radius: 5px; background: var(--blue-soft); font-size: 9px; font-weight: 900; }
.priority-p0 { color: #b23838; background: var(--red-soft); }
.priority-p1 { color: #a76308; background: var(--amber-soft); }
.decision-candidates { display: grid; gap: 8px; }
.candidate { padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfc; }
.candidate-eligible { border-color: #bfe3d3; background: var(--green-soft); }
.candidate > div { display: flex; justify-content: space-between; gap: 12px; }
.candidate b { font-size: 11px; }
.candidate span { color: var(--muted); font-size: 9px; }
.candidate p { margin: 7px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.55; }

/* 工单详情 */
.dialog { width: min(820px, calc(100vw - 32px)); max-height: 90vh; padding: 0; overflow: auto; border: 0; border-radius: 14px; box-shadow: 0 30px 90px rgba(16, 24, 40, .3); }
.dialog::backdrop { background: rgba(15, 23, 42, .58); backdrop-filter: blur(4px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 19px 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.dialog-head h3 { margin: 0; font-size: 18px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; font-size: 23px; }
.icon-button:hover { color: var(--ink); background: #f1f3f6; }
#dialogBody { padding: 22px; }
.dialog-form { max-width: 520px; margin: 0 auto; }
.store-delete-dialog { width: min(560px, calc(100vw - 32px)); }
.store-purge-dialog .deletion-warning b { font-size: 16px; }
.store-purge-dialog .deletion-warning p { font-size: 13px; }
.store-purge-dialog .purge-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; line-height: 1.6; }
.store-purge-dialog .purge-consent input { width: 18px; height: 18px; flex: 0 0 18px; margin: 3px 0 0; }
.store-purge-dialog [data-error] { color: #a82323; font-size: 13px; }
.store-delete-form { padding: 22px; }
.deletion-warning { padding: 15px 16px; color: #8d2929; border: 1px solid #efc5c5; border-radius: 11px; background: #fff7f7; }
.deletion-warning b { font-size: 13px; }
.deletion-warning p { margin: 7px 0 0; color: #8d4d4d; font-size: 11px; line-height: 1.7; }
.store-delete-summary { display: grid; gap: 5px; margin: 15px 0 4px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.store-delete-summary span, .store-delete-summary small { color: var(--muted); font-size: 10px; }
.store-delete-summary b { font-size: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.owner-invitation-dialog { width: min(620px, calc(100vw - 32px)); }
.owner-invitation-body { padding: 22px; }
.owner-account-active { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid #bfe8d7; border-radius: 12px; background: #f0fbf7; }
.owner-account-active > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: white; border-radius: 50%; background: var(--green); font-weight: 900; }
.owner-account-active b, .owner-account-active p, .owner-account-active small { display: block; }
.owner-account-active b { color: #147a58; font-size: 15px; }
.owner-account-active p { margin: 6px 0; color: var(--ink-soft); font-size: 12px; }
.owner-account-active small { color: var(--muted); font-size: 10px; line-height: 1.7; }
.invitation-state-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.invitation-state-row div { display: grid; gap: 5px; }
.invitation-state-row small { color: var(--muted); font-size: 10px; }
.invitation-state-row b { font-size: 15px; }
.invitation-recipient { display: grid; gap: 5px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.invitation-recipient span, .invitation-recipient small { color: var(--muted); font-size: 10px; }
.invitation-recipient b { font-size: 13px; }
.invitation-repeat-note { margin: 12px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.7; }
.invitation-missing-link { margin: 15px 0; padding: 15px; border: 1px solid #efd397; border-radius: 10px; background: var(--amber-soft); }
.invitation-missing-link b { color: #855d0a; font-size: 12px; }
.invitation-missing-link p { margin: 6px 0 0; color: #795f2a; font-size: 10px; line-height: 1.7; }
.security-callout { margin: 0 0 14px; padding: 12px 14px; color: #7a4d0c; border: 1px solid #f2d49d; border-radius: 10px; background: #fff8e8; font-size: 11px; line-height: 1.7; }
#dialogBody > section { margin-top: 21px; }
#dialogBody > section > h4 { margin: 0 0 8px; font-size: 12px; }
#dialogBody > section > p { color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.ticket-editors { display: grid; gap: 10px; margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--line); }
.ticket-editors label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.ticket-editors textarea { min-height: 76px; color: var(--ink); font-weight: 400; }
.ticket-chat-entry { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px; border: 1px solid #dce5fa; border-radius: 11px; background: #f7f9ff; }
.ticket-chat-entry h4 { margin: 0 0 5px; font-size: 12px; }
.ticket-chat-entry p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.ticket-chat-entry button { flex: 0 0 auto; }
.chat-dialog { width: min(760px, calc(100vw - 32px)); height: min(760px, calc(100vh - 40px)); overflow: hidden; }
.chat-dialog[open] { display: flex; flex-direction: column; }
.chat-dialog-head { position: relative; flex: 0 0 auto; }
.chat-dialog-head small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.chat-shell { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: #edf1f5; }
.chat-shell > * { flex: 0 0 auto; }
.chat-shell > .chat-messages { flex: 1 1 0; }
.chat-acceptance { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #edcf85; background: #fff5dc; font-size: 12px; }
.chat-acceptance p { margin: 6px 0 0; max-height: 65px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-acceptance-actions { display: flex; gap: 8px; }
.chat-connection-state { display: flex; gap: 8px; align-items: center; padding: 9px 20px; color: #147a58; border-bottom: 1px solid #dfe5eb; background: rgba(255,255,255,.86); font-size: 10px; font-weight: 700; }
.chat-connection-state i { width: 7px; height: 7px; border-radius: 50%; background: #24b47e; box-shadow: 0 0 0 4px rgba(36,180,126,.12); }
.chat-connection-state.failed { color: #a76308; }
.chat-connection-state.failed i { background: #db8b17; box-shadow: 0 0 0 4px rgba(219,139,23,.12); }
.chat-messages { min-height: 0; overflow-y: auto; padding: 22px 24px 28px; scroll-behavior: smooth; }
.chat-empty { min-height: 100%; display: grid; place-content: center; gap: 7px; color: var(--muted); text-align: center; }
.chat-empty b { color: var(--ink-soft); font-size: 13px; }
.chat-empty span { font-size: 10px; }
.chat-message { display: flex; gap: 10px; align-items: flex-start; margin: 15px 0; }
.chat-message.mine { flex-direction: row-reverse; }
.chat-avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: white; border-radius: 8px; background: linear-gradient(145deg, #5377ef, #3157d5); font-size: 12px; font-weight: 900; box-shadow: 0 4px 12px rgba(49,87,213,.18); }
.chat-message.mine .chat-avatar { background: linear-gradient(145deg, #31b77f, #169b68); box-shadow: 0 4px 12px rgba(22,155,104,.18); }
.chat-message-body { max-width: min(70%, 480px); }
.chat-message-meta { display: flex; gap: 8px; align-items: center; margin: 0 0 5px; color: var(--muted); font-size: 9px; }
.chat-message.mine .chat-message-meta { justify-content: flex-end; }
.chat-message-meta b { color: var(--ink-soft); font-size: 10px; }
.chat-bubble { position: relative; padding: 10px 13px; color: var(--ink); border: 1px solid #dbe1e8; border-radius: 4px 11px 11px; background: white; box-shadow: 0 2px 6px rgba(16,24,40,.04); font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.mine .chat-bubble { border-color: #89d77a; border-radius: 11px 4px 11px 11px; background: #9aeb81; }
.chat-composer { position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr) 42px 82px; gap: 9px; align-items: end; padding: 14px 18px 17px; border-top: 1px solid #dbe1e7; background: white; }
#chatMediaButton { width: 34px; min-width: 34px; height: 44px; border-radius: 11px; font-size: 20px; line-height: 1; }
#chatAttachmentInput { display: none; }
.chat-input-wrap { min-width: 0; display: grid; gap: 8px; }
.chat-composer textarea { min-height: 44px; max-height: 120px; margin: 0; padding: 10px 12px; resize: vertical; }
.chat-composer button { min-width: 82px; }
#chatMediaButton { width: 42px; min-width: 42px; }
#chatVoiceButton { height: 44px; width: 88px; min-width: 88px; padding: 0 8px; border-radius: 999px; }
#chatVoiceButton::before { content: '◉'; margin-right: 5px; font-size: 11px; }
#chatVoiceButton.recording { color: #fff; border-color: #e06c52; background: #e06c52; }
#chatVoiceButton.recording::before { content: '■'; }
#chatVoiceButton.canceling { color: #fff; border-color: #6e7786; background: #6e7786; }
.chat-media-menu { position: absolute; right: 108px; bottom: 73px; z-index: 4; display: grid; gap: 4px; min-width: 106px; padding: 7px; border: 1px solid #dbe3ee; border-radius: 12px; background: #fff; box-shadow: 0 12px 28px rgba(15,23,42,.16); }
.chat-media-menu.hidden { display: none; }
.chat-media-menu button { min-width: 0; padding: 8px 13px; border: 0; border-radius: 8px; color: var(--ink); background: transparent; text-align: left; font-size: 11px; }
.chat-media-menu button:hover { background: #f1f5ff; color: var(--blue); }
.chat-bubble-wrap .chat-bubble { margin-bottom: 6px; }
.chat-inline-action { margin-top: 4px; border: 1px solid #dce7ff; border-radius: 999px; color: #2f56a6; background: #f4f7ff; padding: 3px 10px; font-size: 10px; font-weight: 700; }
.chat-inline-action:hover { background: #edf4ff; }
.chat-uploading { opacity: .82; pointer-events: none; }
.chat-media { display: grid; gap: 6px; }
.chat-media-trigger { width: fit-content; padding: 0; border: 0; background: transparent; text-align: left; }
.chat-media-loading { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 10px; color: var(--muted); background: #f4f6fa; font-size: 10px; }
.chat-media-trigger .chat-media-loading { cursor: pointer; }
.chat-media-trigger:hover .chat-media-loading { color: var(--blue); background: #eef3ff; }
.chat-media img { max-width: 280px; max-height: 220px; border-radius: 12px; border: 1px solid #dce4ef; display: block; cursor: zoom-in; }
.chat-media video, .chat-media audio { max-width: 320px; width: 100%; border-radius: 8px; }
.chat-media-footer { display: flex; align-items: center; gap: 7px; margin-top: 3px; color: var(--muted); font-size: 10px; }
.chat-file-link { color: var(--blue); border: 0; background: transparent; text-underline-offset: 2px; text-decoration: underline; cursor: pointer; }
.chat-readonly-notice { padding: 15px 18px; color: var(--muted); text-align: center; border-top: 1px solid #dbe1e7; background: white; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 18px; }
.detail-item { padding: 12px; border: 1px solid #edf0f4; border-radius: 9px; background: #fafbfc; }
.detail-item small, .detail-item b { display: block; }
.detail-item small { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.detail-item b { font-size: 11px; }
.timeline { display: grid; gap: 0; margin: 14px 0; }
.event { position: relative; padding: 0 0 17px 23px; border-left: 1px solid #dde3ec; }
.event:last-child { padding-bottom: 0; border-left-color: transparent; }
.event::before { content: ""; position: absolute; left: -5px; top: 2px; width: 9px; height: 9px; border: 2px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #aebcf1; }
.event b { font-size: 11px; }
.event p { margin: 4px 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.event small { color: var(--muted); font-size: 9px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.toast { position: fixed; top: 18px; left: 50%; z-index: 999; padding: 11px 16px; color: white; background: #172033; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; box-shadow: var(--shadow-md); opacity: 0; transform: translate(-50%, -14px); pointer-events: none; transition: .25s; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 运营统计 */
.analytics-hero, .permission-banner { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 16px; padding: 24px 27px; color: white; border: 1px solid #28457c; border-radius: 15px; background: radial-gradient(circle at 86% 10%, rgba(99,102,241,.28), transparent 30%), linear-gradient(125deg, #172e56, #18233c); box-shadow: var(--shadow-sm); }
.analytics-hero h3, .permission-banner h3 { margin: 3px 0 7px; font-size: 21px; }
.analytics-hero p, .permission-banner p { margin: 0; color: #afbdd2; font-size: 11px; line-height: 1.7; }
.analytics-realtime { min-width: 190px; padding: 14px 17px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.06); }
.analytics-realtime span, .analytics-realtime b, .analytics-realtime small { display: block; }
.analytics-realtime span { color: #b9c8db; font-size: 10px; }
.analytics-realtime b { margin: 5px 0; font-size: 26px; }
.analytics-realtime small { color: #8fa0b9; font-size: 9px; }
.comparison-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.comparison-card { padding: 19px 21px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: var(--shadow-sm); }
.comparison-card > div:first-child { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.comparison-card span { color: var(--muted); font-size: 10px; }
.comparison-card > div:first-child > span { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.comparison-card > div:first-child small { color: #98a2b3; font-size: 9px; }
.comparison-card > b { display: block; margin: 13px 0 14px; font-size: 31px; letter-spacing: -.04em; }
.comparison-card > b em { margin-left: 4px; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 600; }
.compare-line { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding-top: 11px; border-top: 1px solid var(--line); }
.compare-line strong { font-size: 11px; }
.compare-line i { min-width: 34px; padding: 3px 6px; color: #667085; border-radius: 999px; background: #f1f3f6; text-align: center; font-size: 9px; font-style: normal; font-weight: 800; }
.compare-line i.up { color: #147957; background: var(--green-soft); }
.compare-line i.down { color: #b63f3f; background: var(--red-soft); }
.analytics-filter { display: grid; grid-template-columns: minmax(220px,1fr) auto 150px 150px 120px auto; gap: 10px; align-items: end; margin-bottom: 14px; padding-block: 15px; }
.analytics-filter > div:first-child { display: grid; gap: 4px; align-self: center; }
.analytics-filter > div:first-child b { font-size: 12px; }
.analytics-filter > div:first-child span, .analytics-filter label > span { color: var(--muted); font-size: 9px; }
.analytics-filter label { display: grid; gap: 5px; }
.analytics-filter input, .analytics-filter select { margin: 0; }
.range-presets { display: flex; gap: 5px; }
.analytics-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(310px,.55fr); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.analytics-layout.lower { grid-template-columns: minmax(0,1.1fr) minmax(340px,.9fr); }
.analytics-trend-panel { min-width: 0; }
.analytics-trend-panel .panel-head select { width: auto; min-width: 140px; margin: 0; }
.chart-heading { display: flex; justify-content: space-between; padding: 0 7px 6px; }
.chart-heading b { font-size: 11px; }
.chart-heading span { color: var(--muted); font-size: 9px; }
.trend-svg { width: 100%; min-height: 230px; overflow: visible; }
.trend-svg .chart-area { fill: url(#trendFill); }
.trend-svg .chart-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-svg circle { fill: white; stroke: var(--blue); stroke-width: 2.5; }
.trend-svg text { fill: #98a2b3; font-size: 9px; }
.service-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.service-kpis > div { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfc; }
.service-kpis span, .service-kpis b { display: block; }
.service-kpis span { color: var(--muted); font-size: 9px; }
.service-kpis b { margin-top: 6px; font-size: 19px; }
.service-kpis b small { margin-left: 3px; color: var(--muted); font-size: 8px; }
.distribution-tree { display: grid; gap: 7px; }
.distribution-tree details { border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.distribution-tree summary { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 11px 13px; cursor: pointer; }
.distribution-tree summary b { font-size: 11px; }
.distribution-tree summary span, .distribution-tree p span { color: var(--muted); font-size: 9px; }
.distribution-tree details > div { padding: 0 13px 8px 33px; }
.distribution-tree p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; border-top: 1px dashed var(--line); }
.distribution-tree p b { font-size: 10px; }
.agent-ranking { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.agent-ranking > b { display: block; margin-bottom: 7px; font-size: 11px; }
.agent-ranking > div { display: grid; grid-template-columns: 23px 1fr auto; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.agent-ranking i { width: 22px; height: 22px; display: grid; place-items: center; color: var(--blue); border-radius: 6px; background: var(--blue-soft); font-size: 9px; font-style: normal; font-weight: 900; }
.agent-ranking span { display: grid; gap: 2px; }
.agent-ranking span b { font-size: 10px; }
.agent-ranking span small { color: var(--muted); font-size: 8px; }
.agent-ranking em { color: var(--muted); font-size: 9px; font-style: normal; }
.metric-definition { display: grid; gap: 6px; margin-top: 14px; padding: 15px 17px; color: #536176; border: 1px solid #dce5f5; border-radius: 10px; background: #f5f8ff; font-size: 9px; line-height: 1.55; }
.metric-definition b { color: var(--ink-soft); font-size: 10px; }

/* 管理员人工调度与角色 */
.manual-dispatch { margin-bottom: 14px; }
.manual-ticket-list { display: grid; gap: 9px; }
.manual-ticket { display: grid; grid-template-columns: minmax(280px,1fr) minmax(520px,1.15fr); gap: 14px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.manual-ticket-main { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; min-width: 0; }
.manual-ticket-main b { font-size: 11px; }
.manual-ticket-main p { overflow: hidden; margin: 4px 0; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.manual-ticket-main small { color: #8b96a8; font-size: 8px; }
.manual-ticket-controls { display: grid; grid-template-columns: minmax(160px,.7fr) minmax(220px,1fr) auto; gap: 7px; }
.manual-ticket-controls input, .manual-ticket-controls select { margin: 0; }
.permission-banner { margin-bottom: 14px; }
.impersonation-banner { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 11px 28px; color: #69410a; border-bottom: 1px solid #efd49d; background: #fff7e6; }
.impersonation-banner > div { display: grid; gap: 2px; }
.impersonation-banner b { font-size: 11px; }
.impersonation-banner span { color: #906f3f; font-size: 9px; }
.channel-manager-banner { background: radial-gradient(circle at 86% 10%, rgba(245,158,11,.22), transparent 30%), linear-gradient(125deg, #352d50, #182942); }
.agent-management-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(330px,.45fr); gap: 14px; margin-top: 14px; align-items: start; }
.agent-management-grid > .panel { min-width: 0; }
.create-agent-panel { position: sticky; top: 98px; }
.agent-stats { margin-bottom: 14px; }
.agent-table td:first-child b, .agent-table td:first-child small, .agent-table td:nth-child(4) b, .agent-table td:nth-child(4) small { display: block; }
.agent-table td:first-child small, .agent-table td:nth-child(4) small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.agent-manager-select { min-width: 145px; margin: 0; padding-block: 7px; font-size: 9px; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.primary.compact { min-height: 32px; padding: 7px 10px; font-size: 9px; }
.role-management { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(320px,.55fr); gap: 14px; margin-top: 14px; align-items: start; }
.role-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.role-card { display: grid; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.role-card.disabled { opacity: .58; }
.role-card > div { display: grid; gap: 6px; }
.role-card > div > b { font-size: 12px; }
.role-card > div > small { min-height: 28px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.role-card > p { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.role-card > p em { padding: 4px 6px; color: #526681; border-radius: 5px; background: #eef2f8; font-size: 8px; font-style: normal; }
.role-card footer { display: flex; justify-content: space-between; align-items: center; padding-top: 9px; border-top: 1px solid var(--line); }
.role-card footer span, .role-card footer small { color: var(--muted); font-size: 9px; }
.create-role-panel { position: sticky; top: 98px; }
.permission-groups { display: grid; gap: 8px; margin: 12px 0; }
.permission-groups fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.permission-groups legend { padding: 0 5px; color: var(--muted); font-size: 9px; font-weight: 800; }
.permission-groups label { display: flex; flex-direction: row; gap: 7px; align-items: center; margin: 0; color: var(--ink-soft); font-size: 9px; font-weight: 500; }
.permission-groups input { width: 14px; height: 14px; margin: 0; }
.inline-create-form { display: grid; grid-template-columns: repeat(5,minmax(130px,1fr)) auto; gap: 8px; align-items: end; margin-bottom: 15px; padding: 14px; border: 1px solid #cfdaf8; border-radius: 10px; background: var(--blue-soft); }
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.inline-create-form label { display: grid; gap: 5px; }
.inline-create-form label span { color: var(--muted); font-size: 9px; }
.inline-create-form input, .inline-create-form select { margin: 0; background: white; }
.role-assignment { min-width: 135px; width: auto; margin: 0; padding-block: 7px; }

@media (max-width: 1080px) {
  .login-page { grid-template-columns: minmax(430px, .95fr) minmax(440px, 1.05fr); }
  .brand-panel { padding-inline: 44px; }
  .brand-content h1 { font-size: 46px; }
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { width: 210px; padding: 20px 12px; }
  .workspace { grid-column: 2; }
  .workspace { grid-column: 2; }
  .grid-two { grid-template-columns: 1fr; }
  .dashboard-grid, .channel-grid, .agent-management-grid { grid-template-columns: 1fr; }
  .dispatch-grid, .analytics-layout, .role-management { grid-template-columns: 1fr; }
  .dispatch-queue-panel { position: static; }
  .create-store-panel { position: static; }
  .create-role-panel { position: static; }
  .create-agent-panel { position: static; }
  .analytics-filter { grid-template-columns: 1fr 1fr 1fr; }
  .analytics-filter > div:first-child { grid-column: 1 / -1; }
  .manual-ticket { grid-template-columns: 1fr; }
  .inline-create-form { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 820px) {
  .login-page { grid-template-columns: 1fr; }
  .brand-panel { min-height: auto; padding: 28px 32px 36px; }
  .brand-content { padding: 65px 0 40px; }
  .brand-content h1 { font-size: 42px; }
  .brand-console { display: none; }
  .login-panel { min-height: auto; padding: 45px 28px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .system-state { display: none; }
  .app-shell { display: block; }
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; min-height: 0; flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px; }
  .side-brand { flex: 0 0 auto; margin: 0; padding: 0 8px 0 0; border-bottom: 0; }
  .side-brand > div small, .nav-caption, .security-note { display: none; }
  #mainNav { display: flex; flex: 1; gap: 5px; overflow-x: auto; }
  nav button { flex: 0 0 auto; width: auto; padding: 9px 11px; }
  nav button.active::before { inset: auto 10px 0; width: auto; height: 2px; }
  .workspace { grid-column: auto; }
  .comparison-grid { grid-template-columns: 1fr; }
  .analytics-filter { grid-template-columns: 1fr 1fr; }
  .range-presets { grid-column: 1 / -1; }
  .manual-ticket-controls { grid-template-columns: 1fr; }
  .impersonation-banner { align-items: flex-start; padding-inline: 16px; }
}

@media (max-width: 580px) {
  .brand-panel { padding-inline: 23px; }
  .brand-content h1 { font-size: 35px; }
  .brand-copy { font-size: 14px; }
  .edition-pill { display: none; }
  .login-panel { padding: 34px 16px; }
  .login-card { padding: 21px; }
  .account-grid { grid-template-columns: 1fr; }
  .account-grid button:last-child { grid-column: auto; }
  .topbar { height: 72px; padding: 0 16px; }
  .topbar h2 { font-size: 18px; }
  .content { padding: 18px 14px 42px; }
  .user-menu > div:nth-child(2) { display: none; }
  .stats, .form-grid { grid-template-columns: 1fr; }
  .mini-stats, .role-summary { grid-template-columns: 1fr 1fr; }
  .form-pair { grid-template-columns: 1fr; gap: 0; }
  .hero { min-height: 0; padding: 22px; }
  .hero-tag { display: none; }
  .ticket-row { grid-template-columns: 58px minmax(0, 1fr); }
  .ticket-row > :last-child { grid-column: 2; justify-self: start !important; }
  .ticket-row-actions { justify-items: start; }
  .ticket-chat-entry { align-items: flex-start; flex-direction: column; }
  .chat-dialog { width: calc(100vw - 14px); height: calc(100vh - 14px); max-height: none; }
  .chat-messages { padding: 16px 12px 22px; }
  .chat-composer { padding: 11px; grid-template-columns: 78px minmax(0, 1fr) 34px 64px; gap: 6px; }
  #chatMediaButton { width: 34px; min-width: 34px; height: 40px; }
  #chatVoiceButton { width: 78px; min-width: 78px; height: 40px; padding: 0 4px; }
  #chatSendButton { min-width: 64px; }
  .chat-media-menu { right: 77px; bottom: 61px; }
  .chat-message-body { max-width: 78%; }
  .chat-media img, .chat-media video { max-width: 100%; max-height: 220px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .toolbar input, .toolbar select { width: 100%; }
  .toolbar-tip { margin-left: 0; }
  .dashboard-ticket { grid-template-columns: 52px minmax(0, 1fr); }
  .dashboard-ticket-meta { grid-column: 2; justify-items: start; }
  .technician-grid { grid-template-columns: 1fr; }
  .dispatch-banner { align-items: flex-start; }
  .public-activation-page { padding: 24px 14px; place-items: start center; }
  .activation-card { padding: 24px 20px; border-radius: 18px; }
  .activation-card h1 { font-size: 25px; }
  .activation-summary { grid-template-columns: 1fr; }
  .activation-code-row { grid-template-columns: minmax(0,1fr) 112px; }
}
.invitation-workspace { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.invitation-filters { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.invitation-filters label { flex: 1; min-width: 140px; }
.invitation-history-card { border: 1px solid #e6ebf3; border-radius: 16px; padding: 20px; margin-bottom: 16px; overflow-wrap: anywhere; }
.invitation-history-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.invitation-history-role { font-size: 12px; margin-left: 12px; color: #8693a8; }
.invitation-history-card p { margin: 10px 0; color: #566b86; }
.invitation-history-card small { color: #8996a9; line-height: 1.8; }
.invitation-badge { flex-shrink: 0; border-radius: 8px; padding: 5px 10px; font-size: 12px; color: #7d899b; background: #f0f2f6; }
.invite-ACTIVE { color: #3264c8; background: #edf3ff; }
.invite-USED { color: #148460; background: #e8f7ee; }
.invitation-open { align-self: center; color: #3264c8; }
.invitation-owner-toggle { display: flex; align-items: center; gap: 10px; }
.invitation-owner-toggle input { width: 18px; min-height: 18px; }
.invitation-error { color: #b94545; padding: 12px 0; }
#optionalOwnerFields[hidden], #moreInvitations[hidden] { display: none; }
@media (max-width: 900px) { .invitation-workspace { grid-template-columns: minmax(0, 1fr); } }
.agent-report-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.agent-report-heading h2 { margin:8px 0; font-size:26px; }
.agent-report-heading p { color:#7a879a; margin:0; line-height:1.65; }
.agent-report-layout { display:grid; grid-template-columns:minmax(240px, 0.8fr) minmax(0, 1.7fr); gap:24px; align-items:start; }
.report-store-panel, .report-issue-panel { min-width:0; border-radius:22px; }
.report-store-panel > input { width:100%; box-sizing:border-box; }
.report-store-results { margin-top:16px; max-height:440px; overflow:auto; }
.report-store-option { display:flex; flex-direction:column; text-align:left; gap:7px; width:100%; margin:0 0 10px; padding:16px; background:#f6f8fc; color:#2d4465; border:1px solid transparent; border-radius:14px; white-space:normal; overflow-wrap:anywhere; }
.report-store-option span { font-size:12px; color:#8090a7; }
.report-store-option.selected { background:#edf4ff; border-color:#769bf0; }
.report-selected-store { display:flex; flex-wrap:wrap; align-items:center; gap:12px; background:#edf4ff; color:#2d4e81; border-radius:14px; padding:17px 20px; margin-bottom:24px; overflow-wrap:anywhere; }
.report-selected-store span { color:#6f87aa; font-size:13px; }
#agentReportFields { border:0; padding:0; margin:0; min-width:0; }
#agentReportFields:disabled { opacity:.65; }
.report-small-note { color:#7d8ba0; font-size:13px; line-height:1.7; }
.report-submit-row { display:flex; gap:16px; align-items:center; justify-content:space-between; }
.report-submit-row p { flex:1; min-width:0; font-size:13px; color:#77869c; line-height:1.7; }
.report-submit-row button { flex-shrink:0; }
.agent-ticket-tabs { display:flex; gap:8px; border-radius:13px; background:#edf1f8; width:fit-content; padding:5px; margin-bottom:20px; }
.agent-ticket-tabs button { border:0; padding:11px 18px; color:#72819a; background:transparent; border-radius:10px; }
.agent-ticket-tabs button.selected { background:white; color:#315fc9; box-shadow:0 3px 10px #dce4f0; }
@media(max-width:900px) { .agent-report-layout { grid-template-columns:1fr; } .report-store-results { max-height:250px; } }
@media(max-width:560px) { .agent-report-heading, .report-submit-row { align-items:stretch; flex-direction:column; } .agent-ticket-tabs { width:100%; } .agent-ticket-tabs button { flex:1; padding:10px 7px; } }
.service-term-dialog { width:min(680px,calc(100vw - 32px)); max-height:90vh; }
.service-term-body { padding:20px; overflow:auto; }
.service-term-body form { display:grid; gap:14px; }
.service-term-body label { display:grid; gap:7px; margin:0; font-size:14px; }
.service-term-body .store-delete-summary { margin:0 0 12px; }
.service-term-body .store-delete-summary span { font-size:14px; line-height:1.6; }
.service-term-body [hidden] { display:none!important; }
.service-term-note { color:#52627a; font-size:14px; line-height:1.7; margin:12px 0; }
.service-term-body .service-term-consent { display:flex; align-items:flex-start; gap:10px; }
.service-term-consent input { width:auto; margin-top:4px; }
.service-term-body [data-error] { color:#b42318; background:#fff1ef; padding:10px; border-radius:8px; }
.service-term-history { margin-top:24px; border-top:1px solid #dce4ef; }
.service-term-history article { padding:12px 0; border-bottom:1px solid #e5eaf1; overflow-wrap:anywhere; }
.service-term-history small { display:block; color:#52627a; margin:5px 0; }
.service-term-history p { margin:0; }
.service-term-label { display:inline-block; margin-top:5px; font-size:12px; color:#52627a; }
.service-term-label.expired,.service-term-label.invalid { color:#b42318; }
.service-term-label.pending_unset,.service-term-label.pending_binding { color:#855000; }
.service-term-label.active { color:#067647; }
.store-directory { display:grid; gap:20px; min-width:0; }
.store-directory-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0; }
.store-directory-heading h3 { margin:7px 0; font-size:22px; }
.store-directory-heading p,.store-list-note { color:#52627a; font-size:14px; line-height:1.7; margin:8px 0; }
.store-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.store-metric { display:flex; flex-direction:column; align-items:flex-start; gap:10px; padding:18px; background:#fff; border:1px solid #dce4ef; border-radius:12px; color:#344054; text-align:left; white-space:normal; }
.store-metric.selected { border-color:#315cf1; background:#f1f5ff; box-shadow:inset 0 3px #315cf1; }
.store-metric > span { font-size:15px; font-weight:700; }
.store-metric strong { font-size:30px; line-height:1.1; color:#172d4b; }
.store-metric strong small { font-size:13px; font-weight:400; }
.store-metric em { font-style:normal; font-size:12px; line-height:1.5; color:#52627a; }
.store-directory-list { min-width:0; margin:0; }
.store-directory-tabs { display:flex; gap:8px; border-bottom:1px solid #dce4ef; margin-bottom:20px; }
.store-directory-tabs button { padding:12px 16px; color:#52627a; background:transparent; border:0; border-radius:0; border-bottom:3px solid transparent; font-size:15px; }
.store-directory-tabs button.selected { color:#2b54dc; border-bottom-color:#315cf1; }
.store-directory-tabs b { margin-left:6px; }
.store-query-form { display:grid; gap:14px; padding:18px; border-radius:10px; background:#f6f8fc; }
.store-query-primary { display:grid; grid-template-columns:2fr 1fr 1fr; gap:14px; }
.store-query-secondary { display:flex; align-items:flex-end; flex-wrap:wrap; gap:14px; }
.store-directory label { display:flex; flex-direction:column; gap:7px; margin:0; font-size:13px; color:#344054; min-width:0; }
.store-query-secondary label { flex:1 1 150px; }
.store-directory input,.store-directory select { width:100%; min-width:0; font-size:14px; }
.store-query-buttons { display:flex; gap:8px; padding-bottom:1px; }
.store-result-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:24px; flex-wrap:wrap; }
.store-result-heading h3 { margin:0; font-size:17px; }
.store-result-heading strong { color:#2b54dc; }
.store-result-heading > span { font-size:14px; color:#52627a; }
.store-directory .table-wrap { margin-top:16px; }
.store-directory th,.store-directory td { font-size:14px; }
.store-directory td > small { display:block; margin-top:4px; color:#64748b; }
.store-directory .code-chip,.store-directory .status,.store-directory .compact { font-size:12px; }
.store-directory .deleted-store-panel { box-shadow:none; border:0; padding:0; margin:0; }
.store-directory .deleted-store-panel > .panel-head { display:none; }
.store-pagination { display:flex; gap:16px; align-items:center; flex-wrap:wrap; border-top:1px solid #dce4ef; padding-top:18px; margin-top:16px; font-size:14px; }
.store-pagination label { flex-direction:row; align-items:center; }
.store-pagination select { width:88px; }
.store-page-buttons,.store-pagination form { display:flex; align-items:center; gap:8px; }
.store-pagination input { width:74px; }
.store-directory button:focus-visible { outline:3px solid #91b4ff; outline-offset:2px; }
.store-directory [data-store-query-error] { color:#b42318; padding:16px; font-size:14px; }
.store-assignment-toolbar { display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin:16px 0; padding:12px; background:#eef3ff; border-radius:10px; }
.store-metrics { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.store-directory input[type=checkbox],.regional-confirm input { width:18px; height:18px; flex:none; }
.regional-assignment-dialog,.regional-followup-dialog { width:min(880px,calc(100vw - 32px)); max-height:88vh; overflow:auto; padding:24px; }
.regional-assignment-dialog table { width:100%; min-width:460px; }
.regional-assignment-dialog textarea,.regional-followup-dialog textarea { width:100%; min-height:90px; resize:vertical; }
.regional-assignment-dialog td,.regional-followup-dialog p { overflow-wrap:anywhere; white-space:pre-wrap; }
.regional-assignment-dialog small,.regional-followup-dialog small { display:block; color:#64748b; margin-top:5px; }
.regional-confirm { display:flex; align-items:center; flex-direction:row; gap:10px; }
.regional-confirm[hidden] { display:none; }
.regional-followup-item { padding:16px 0; border-bottom:1px solid #dce4ef; }
.regional-followup-item label { display:block; }
.regional-assignment-dialog [data-error],.regional-followup-dialog [data-error] { color:#b42318; }
@media(max-width:1100px) { .store-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:650px) { .store-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .store-metric { padding:14px; } .store-directory-heading { align-items:flex-start; flex-direction:column; } .store-query-primary { grid-template-columns:1fr; } .store-query-form { padding:12px; } .store-query-buttons { width:100%; } .store-query-buttons button { flex:1; } .store-page-buttons { flex-wrap:wrap; } }
