:root {
  --brand: #9b001f;
  --brand-dark: #740018;
  --brand-deep: #560011;
  --brand-soft: #fff2f5;
  --accent: #cf003d;
  --ink: #25232a;
  --muted: #686570;
  --line: #ddd9dd;
  --line-strong: #cac3c8;
  --surface: #ffffff;
  --canvas: #f5f4f5;
  --canvas-warm: #faf8f8;
  --success: #147345;
  --success-soft: #edf8f2;
  --warning: #aa5700;
  --warning-soft: #fff6e9;
  --danger: #b51b31;
  --danger-soft: #fff0f2;
  --info: #285c8f;
  --info-soft: #edf5fc;
  --shadow-sm: 0 2px 8px rgba(42, 21, 28, .07);
  --shadow-md: 0 14px 36px rgba(42, 21, 28, .11);
  --radius: 8px;
  --radius-sm: 4px;
  --font: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.brandline, .login-brandline {
  height: 4px;
  background: linear-gradient(90deg, var(--brand-dark) 0%, var(--accent) 46%, #e5005a 100%);
}

/* 品牌与顶栏 */
.site-header { background: var(--surface); box-shadow: 0 1px 0 rgba(40, 22, 28, .08); }
.utility-bar {
  width: min(1180px, calc(100% - 40px));
  height: 31px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #77717a;
  font-size: 11px;
  letter-spacing: .03em;
}
.utility-status { display: inline-flex; align-items: center; gap: 7px; }
.utility-status i { width: 7px; height: 7px; border-radius: 50%; background: #26a269; box-shadow: 0 0 0 3px #dff4e9; }
.header-main {
  width: min(1180px, calc(100% - 40px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 2px 14px 2px 14px;
  color: #fff;
  background: linear-gradient(145deg, #ae002c, #790018);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15);
  font: 800 19px/1 Arial, sans-serif;
  letter-spacing: -.04em;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { color: #590015; font-size: 21px; letter-spacing: .035em; }
.brand-copy small { margin-top: 6px; color: #807982; font-size: 10px; letter-spacing: .2em; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.user-block { display: flex; align-items: center; gap: 10px; padding-left: 22px; border-left: 1px solid var(--line); }
.user-block > span:not(.user-avatar) { display: flex; flex-direction: column; line-height: 1.35; }
.user-block strong { font-size: 13px; }
.user-block small { color: var(--muted); font-size: 11px; }
.user-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-weight: 800; }
.text-button, .icon-button { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.text-button:hover, .icon-button:hover { color: var(--brand); border-color: var(--brand); }
.main-nav { background: linear-gradient(180deg, #970020 0%, #810019 100%); border-bottom: 3px solid #6b0015; }
.nav-inner { width: min(1180px, 100%); min-height: 49px; margin: 0 auto; display: flex; }
.nav-inner a {
  min-width: 150px;
  padding: 0 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: rgba(255,255,255,.9);
  border-left: 1px solid rgba(255,255,255,.16);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  position: relative;
}
.nav-inner a:last-child { border-right: 1px solid rgba(255,255,255,.16); }
.nav-inner a:hover { background: rgba(255,255,255,.09); }
.nav-inner a.active { color: #fff; background: rgba(65,0,14,.42); }
.nav-inner a.active::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 4px; background: #fff; }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.48); border-radius: 50%; font-size: 11px; }
.mobile-only { display: none; }

/* 页面基础 */
.page-shell { width: min(1180px, calc(100% - 40px)); min-height: calc(100vh - 260px); margin: 0 auto; padding: 28px 0 60px; outline: none; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { color: var(--brand); }
.breadcrumbs i { color: #aaa3aa; font-style: normal; }
.page-heading { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.page-heading h1 { margin: 0; font-size: 28px; line-height: 1.25; letter-spacing: .025em; }
.page-heading p { margin: 7px 0 0; color: var(--muted); }
.heading-mark { border-left: 5px solid var(--brand); padding-left: 15px; }
.heading-side { color: var(--muted); font-size: 12px; text-align: right; }
.heading-side strong { display: block; color: var(--ink); font-size: 14px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 15px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.section-link { color: var(--brand); font-size: 12px; font-weight: 700; }
.section-link:hover { text-decoration: underline; }
.page-loading { height: 260px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.spinner { width: 30px; height: 30px; border: 3px solid #e7dadd; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 工作台 */
.welcome-banner {
  min-height: 132px;
  margin-bottom: 22px;
  padding: 26px 31px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  position: relative;
  color: #fff;
  background: linear-gradient(118deg, #690014 0%, #990025 56%, #b00037 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.welcome-banner::after { content: ""; position: absolute; width: 330px; height: 330px; right: -85px; top: -180px; border: 50px solid rgba(255,255,255,.08); border-radius: 50%; }
.welcome-banner::before { content: ""; position: absolute; width: 150px; height: 150px; right: 170px; bottom: -125px; border: 32px solid rgba(255,255,255,.07); border-radius: 50%; }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner .eyebrow { color: #ffd6e0; }
.welcome-banner h1 { margin: 4px 0 3px; font-size: 26px; }
.welcome-banner p { margin: 0; color: rgba(255,255,255,.8); }
.banner-date { min-width: 140px; text-align: right; }
.banner-date strong { display: block; font-size: 27px; letter-spacing: .04em; }
.banner-date span { color: #ffd6e0; font-size: 12px; }
.eyebrow { margin: 0; color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat-card { min-height: 142px; padding: 20px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow-sm); position: relative; }
.stat-card:nth-child(2) { border-top-color: #b72d4b; }
.stat-card:nth-child(3) { border-top-color: #604a8d; }
.stat-card.warning { border-top-color: #d46b13; }
.stat-top { display: flex; justify-content: space-between; align-items: center; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-badge { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 11px; font-weight: 800; }
.stat-card.warning .stat-badge { color: var(--warning); background: var(--warning-soft); }
.stat-value { margin: 9px 0 2px; font-size: 34px; font-weight: 800; line-height: 1.1; }
.stat-meta { color: #88818a; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .7fr); gap: 20px; }
.content-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.content-card-pad { padding: 22px; }
.quick-list { display: grid; gap: 10px; }
.quick-link { padding: 15px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 6px; transition: .16s ease; }
.quick-link:hover { transform: translateY(-1px); border-color: #bd7c8c; box-shadow: var(--shadow-sm); }
.quick-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #fff; background: var(--brand); font-weight: 800; }
.quick-link:nth-child(2) .quick-icon { background: #704e83; }
.quick-link:nth-child(3) .quick-icon { background: #a65a18; }
.quick-link > span:not(.quick-icon):not(.quick-arrow) { display: flex; flex: 1; flex-direction: column; }
.quick-link strong { font-size: 13px; }
.quick-link small { color: var(--muted); font-size: 11px; }
.quick-arrow { color: var(--brand); font-size: 22px; }

/* 表格、队列、标签 */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 13px; color: #5e5861; background: #f3f1f2; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); font-size: 11px; text-align: left; white-space: nowrap; }
.data-table td { padding: 14px 13px; border-bottom: 1px solid #ebe8ea; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fdfafb; }
.table-link { color: var(--brand); font-weight: 800; }
.table-link:hover { text-decoration: underline; }
.table-link-button { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.code-text { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; letter-spacing: .02em; }
.subtext { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-open { color: var(--info); background: var(--info-soft); }
.badge-resolved, .badge-closed { color: var(--success); background: var(--success-soft); }
.badge-hold { color: var(--warning); background: var(--warning-soft); }
.badge-high { color: var(--danger); background: var(--danger-soft); }
.badge-normal { color: #68616a; background: #f1eff0; }
.badge-returned { color: #8a5200; background: #fff0cf; box-shadow: inset 0 0 0 1px #e7bd72; }
.ticket-status-stack { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.empty-state { min-height: 220px; padding: 40px 20px; display: grid; place-items: center; text-align: center; }
.empty-state-icon { width: 52px; height: 52px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-weight: 800; }
.empty-state h3 { margin: 0 0 4px; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.tabs { margin-bottom: 19px; display: flex; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.tab-button { flex: 1; min-height: 52px; padding: 10px 18px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-right: 1px solid var(--line); color: #5d5760; background: #fff; cursor: pointer; font-weight: 700; }
.tab-button:last-child { border-right: 0; }
.tab-button:hover { color: var(--brand); background: #fffafb; }
.tab-button.active { color: #fff; background: linear-gradient(180deg, #a50029, #85001c); }
.tab-count { min-width: 21px; padding: 1px 6px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 10px; }
.tab-button.active .tab-count { color: var(--brand); background: #fff; }
.queue-toolbar { margin-bottom: 14px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.queue-summary { color: var(--muted); font-size: 12px; }
.queue-summary strong { color: var(--brand); font-size: 16px; }
.filter-row { display: flex; align-items: center; gap: 9px; }
.select-compact { min-width: 130px; height: 36px; padding: 0 31px 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); background: #fff; }

/* 工单详情 */
.ticket-hero { margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.ticket-hero-top { padding: 18px 23px 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.ticket-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ticket-title-row h1 { margin: 0; font-size: 21px; }
.ticket-hero-meta { display: flex; align-items: center; justify-content: flex-end; gap: 14px; color: var(--muted); font-size: 12px; }
.ticket-back-button { min-height: 44px; padding-inline: 21px; white-space: nowrap; box-shadow: 0 4px 12px rgba(112,0,26,.22); }
.ticket-code { padding: 22px 23px 24px; background: linear-gradient(95deg, #fff 0%, #fff7f9 100%); }
.ticket-code-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.ticket-code-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ticket-code strong { overflow-wrap: anywhere; color: var(--brand-dark); font: 800 clamp(22px, 3vw, 36px)/1.25 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .035em; }
.ticket-layout { display: grid; grid-template-columns: minmax(280px, .83fr) minmax(420px, 1.35fr); gap: 18px; align-items: start; }
.panel { margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-header { min-height: 57px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 16px; }
.panel-header small { color: var(--muted); }
.panel-body { padding: 18px; }
.return-banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e3b56f;
  border-left: 4px solid #c47b00;
  border-radius: 8px;
  background: #fff8ec;
}
.return-banner strong { display: block; margin-bottom: 4px; color: #8a5200; }
.return-banner p { margin: 4px 0; }
.action-hint.warn { color: #8a1c1c; background: #fff1f1; padding: 10px 12px; border-radius: 6px; }
.info-list { margin: 0; }
.info-list-full .info-row dt { min-width: 7.5em; }
.info-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px dashed #e6e1e4; }
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: var(--muted); font-size: 12px; }
.info-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.action-stack { display: grid; gap: 14px; }
.action-box { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.action-box > summary { padding: 13px 15px; list-style: none; display: flex; align-items: center; justify-content: space-between; color: #413b43; background: #faf8f9; cursor: pointer; font-weight: 700; }
.action-box > summary::-webkit-details-marker { display: none; }
.action-box > summary::after { content: "+"; color: var(--brand); font-size: 19px; line-height: 1; }
.action-box[open] > summary { color: var(--brand); border-bottom: 1px solid var(--line); }
.action-box[open] > summary::after { content: "−"; }
.action-body { padding: 15px; }
.action-hint { margin: 0 0 12px; padding: 9px 11px; color: #635c64; background: #f4f2f3; border-left: 3px solid #988d94; font-size: 11px; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.state-actions { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.state-actions h3 { margin: 0 0 9px; font-size: 12px; }
.copy-button { flex: none; }

/* 表单 */
.form-stack { display: grid; gap: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 6px; }
.field > span:first-child, .field-label { color: #4b454d; font-size: 12px; font-weight: 700; }
.field input, .field textarea, .field select, .search-input {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 82px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(155,0,31,.09); }
.checkbox-field { display: flex; align-items: flex-start; gap: 8px; color: #4d474f; font-size: 12px; }
.checkbox-field input { margin-top: 4px; accent-color: var(--brand); }
.button {
  min-height: 39px;
  padding: 8px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  transition: .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { color: #fff; background: linear-gradient(180deg, #af0030, #89001d); border-color: #750018; box-shadow: 0 2px 4px rgba(112,0,26,.2); }
.button-primary:hover { background: linear-gradient(180deg, #bd0035, #970021); }
.button-secondary { color: var(--brand); background: #fff; border-color: #bd8895; }
.button-secondary:hover { background: var(--brand-soft); }
.button-neutral { color: #4f4951; background: #f6f4f5; border-color: var(--line-strong); }
.button-danger { color: var(--danger); background: var(--danger-soft); border-color: #e7a7b2; }
.button-small { min-height: 32px; padding: 5px 11px; font-size: 11px; }
.button-wide { width: 100%; min-height: 50px; justify-content: space-between; padding: 10px 19px; }
.form-message { display: none; padding: 10px 12px; color: var(--danger); background: var(--danger-soft); border: 1px solid #edbec6; border-radius: var(--radius-sm); font-size: 12px; }
.form-message.visible { display: block; }
.sr-only { width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* L2 LINE 核客工作台：对话优先 */
.workspace-l2 .site-footer { display: none; }
#app.line-desk-shell { width: min(1680px, calc(100% - 32px)); max-width: none; min-height: 0; padding-top: 14px; padding-bottom: 14px; }
.line-desk-topbar { min-height: 42px; margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.line-desk-topbar h1 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: .02em; }
.line-desk-stage { position: relative; }
.line-desk-layout {
  height: calc(100vh - 234px);
  min-height: 0;
  display: grid;
  grid-template-columns: 252px minmax(440px, 1fr) 388px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.line-desk-layout > * { height: 100%; min-height: 0; }
.line-conversation-panel { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; background: #fbfafb; border-right: 1px solid var(--line); }
.line-conversation-panel > header { min-height: 54px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border-bottom: 1px solid var(--line); }
.line-conversation-panel > header strong { font-size: 14px; }
.line-sub-switcher { padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; background: #fff; border-bottom: 1px solid var(--line); }
.line-sub-tab { min-width: 0; min-height: 31px; padding: 5px 7px; display: flex; align-items: center; gap: 6px; color: #4e5652; text-align: left; background: #f5f7f6; border: 1px solid #e0e6e2; border-radius: 999px; cursor: pointer; }
.line-sub-tab > span:nth-child(2) { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.line-sub-tab b { min-width: 17px; height: 17px; margin-left: auto; display: grid; place-items: center; color: #fff; background: #e03b64; border-radius: 999px; font-size: 8px; }
.line-sub-tab.active { color: #0c6b40; background: #eaf8f0; border-color: #8fd3ad; }
.line-sub-dot { width: 7px; height: 7px; flex: none; background: #9aa6a0; border-radius: 50%; }
.line-sub-tab.active .line-sub-dot { background: #16a05f; box-shadow: 0 0 0 3px #d5f1e2; }
.line-sub-empty { grid-column: 1 / -1; padding: 8px; color: var(--muted); background: #f7f6f6; border-radius: 6px; font-size: 10px; text-align: center; }
.line-conversation-list { min-height: 0; overflow-y: auto; }
.line-conversation-list .page-loading { height: 100%; }
.line-conversation { width: 100%; min-height: 76px; padding: 10px 11px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 9px; align-items: center; text-align: left; background: transparent; border: 0; border-bottom: 1px solid #ebe7e9; cursor: pointer; }
.line-conversation:hover { background: #fff; }
.line-conversation.active { background: #eef9f3; box-shadow: inset 3px 0 0 #0f7a4a; }
.line-avatar { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none; color: #fff; background: linear-gradient(145deg, #19a564, #0d7043); border-radius: 50%; font-weight: 800; }
.line-conversation-copy { min-width: 0; display: grid; gap: 3px; }
.line-conversation-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.line-conversation-top strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.line-conversation-top time { color: var(--muted); font-size: 8px; white-space: nowrap; }
.line-preview { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.line-conversation-tags { min-width: 0; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.line-conversation-tags .badge { padding: 1px 5px; font-size: 8px; }
.line-binding-state { width: fit-content; max-width: 100%; padding: 1px 6px; overflow: hidden; color: #7c7379; background: #eee9ec; border-radius: 999px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.line-binding-state.is-bound { color: #0d7043; background: #daf2e5; }
.line-unread { min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; color: #fff; background: #e03b64; border-radius: 999px; font-size: 9px; font-weight: 800; }
.line-list-empty, .line-chat-empty { height: 100%; min-height: 0; padding: 20px; display: grid; place-content: center; color: var(--muted); text-align: center; }
.line-list-empty strong, .line-chat-empty strong { font-size: 13px; font-weight: 650; }

.line-chat-pane { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #f2f7f4; }
.line-chat-pane > .page-loading, .line-chat-pane > .error-panel, .line-chat-pane > .line-chat-empty { grid-row: 1 / -1; }
.line-chat-header { min-height: 58px; padding: 8px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border-bottom: 1px solid var(--line); }
.line-chat-header > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.line-chat-header > div > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.line-chat-header strong, .line-chat-header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-chat-header small { color: var(--muted); font-size: 10px; }
.line-message-stream { min-height: 0; padding: 18px clamp(18px, 3vw, 34px); display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; overflow-y: auto; }
.line-stream-empty { min-height: 0; margin: auto 0; padding: 16px; display: grid; place-content: center; gap: 4px; color: var(--muted); text-align: center; }
.line-stream-empty strong { color: var(--ink); font-size: 14px; }
.line-stream-empty span { font-size: 11px; }
.line-message { max-width: 72%; display: flex; flex-direction: column; align-items: flex-start; }
.line-message.out { margin-left: auto; align-items: flex-end; }
.line-bubble { padding: 9px 12px; white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px solid #d8e1dc; border-radius: 4px 14px 14px 14px; box-shadow: 0 2px 5px rgba(29,64,45,.06); }
.line-message.out .line-bubble { color: #fff; background: #117c4b; border-color: #117c4b; border-radius: 14px 4px 14px 14px; }
.line-message-meta { margin-top: 3px; color: #777f7a; font-size: 9px; }
.line-system-message { margin: 2px auto 7px; display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 10px; }
.line-system-message span { padding: 3px 10px; background: rgba(255,255,255,.76); border-radius: 999px; }
.line-system-message time { margin-top: 2px; font-size: 9px; }
.line-composer { width: 100%; min-width: 0; padding: 10px 13px; grid-row: 3; align-self: end; background: #fff; border-top: 1px solid var(--line); }
.line-composer textarea { width: 100%; min-height: 58px; max-height: 130px; padding: 9px 11px; resize: vertical; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 6px; outline: none; }
.line-composer textarea:focus { border-color: #0f7a4a; box-shadow: 0 0 0 3px rgba(15,122,74,.1); }
.line-composer > div { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.line-composer > div > span { color: var(--muted); font-size: 9px; }

/* 客户摘要；编辑表单仅在明确点击后挂载 */
.line-profile-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; background: #fff; border-left: 1px solid var(--line); }
.line-desk-code-form { min-width: 0; padding: 10px 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; background: #fff; border-bottom: 1px solid var(--line); }
.line-desk-code-form .search-input { min-height: 34px; padding-block: 6px; letter-spacing: .12em; }
.line-customer-pane { min-width: 0; min-height: 0; overflow: hidden; background: #fff; }
.line-customer-pane > .page-loading { height: 100%; }
.line-customer-summary, .line-customer-edit-form { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.line-customer-header { min-height: 86px; padding: 15px 16px 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; background: linear-gradient(120deg, #fff 0%, #fff7f9 100%); border-bottom: 1px solid var(--line); }
.line-customer-identity { min-width: 0; }
.line-customer-header h2 { margin: 0 0 6px; overflow: hidden; color: #1a1a1a; font-size: 21px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.line-customer-code { min-height: 24px; padding: 0; color: #7f001a; background: transparent; border: 0; font: 800 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: left; cursor: copy; user-select: all; }
.line-customer-code span { margin-left: 3px; color: #75676c; font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700; }
.line-customer-code:hover { color: #b00030; text-decoration: underline; }
.line-customer-header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.line-customer-header-actions .badge { padding: 3px 7px; font-size: 11px; }
.line-customer-header-actions .button, .line-customer-actions .button, .line-customer-summary-actions .button { white-space: nowrap; }
.line-customer-binding { max-width: 190px; padding: 5px 9px; color: #5f565c; background: #eee9ec; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center; }
.line-customer-binding.is-bound { color: #0d7043; background: #daf2e5; }
.line-customer-summary-scroll, .line-customer-edit-scroll { min-height: 0; padding: 14px 14px 20px; overflow-y: auto; scrollbar-gutter: stable; }
.line-customer-summary-groups, .line-customer-edit-groups { display: grid; gap: 12px; }
.line-customer-summary-group, .line-customer-edit-group { overflow: hidden; background: #fff; border: 1px solid #ded8db; border-radius: 9px; box-shadow: 0 2px 7px rgba(60,35,44,.045); }
.line-customer-summary-group > h3, .line-customer-edit-group > h3 { margin: 0; padding: 9px 12px; color: #6e0018; background: #faf5f7; border-bottom: 1px solid #e7dfe2; font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.line-customer-summary-grid { margin: 0; padding: 1px 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; }
.line-summary-item { min-width: 0; padding: 10px 0 11px; border-bottom: 1px solid #eee9eb; }
.line-summary-item dt { margin-bottom: 4px; color: #6b6267; font-size: 13px; font-weight: 700; line-height: 1.25; }
.line-summary-item dd { min-height: 21px; margin: 0; overflow-wrap: anywhere; color: #1a1a1a; font-size: 15.5px; font-weight: 720; line-height: 1.4; }
.line-summary-mono dd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.line-summary-emphasis dd { color: #700017; font-size: 16px; font-weight: 800; }
.line-summary-wide { grid-column: 1 / -1; }
.line-customer-summary-grid > .line-summary-item:nth-last-child(-n + 2) { border-bottom-color: transparent; }
.line-customer-summary-grid > .line-summary-wide:last-child { border-bottom-color: transparent; }
.line-customer-summary-group.is-bound > h3 { color: #0d7043; background: #eff9f4; }
.line-customer-remark-group .line-summary-item dd { white-space: pre-wrap; }
.line-customer-fields { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.line-desk-field { min-width: 0; display: grid; gap: 4px; }
.line-desk-field > span { color: #5e555a; font-size: 13px; font-weight: 750; }
.line-desk-field input, .line-desk-field textarea { width: 100%; min-width: 0; padding: 9px 10px; color: #1a1a1a; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 15px; outline: none; }
.line-desk-field textarea { resize: vertical; }
.line-desk-field input:focus, .line-desk-field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(155,0,31,.08); }
.line-desk-field-wide { grid-column: 1 / -1; }
.line-customer-actions, .line-customer-summary-actions { min-height: 58px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 9px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -5px 14px rgba(52,32,40,.045); }
.line-customer-actions .button { flex: 1; }
.line-customer-summary-actions .button { min-height: 38px; padding-inline: 15px; font-size: 13px; }
.ticket-status-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.ticket-status-actions .button { white-space: nowrap; }
.ticket-status-actions-queue { min-width: 190px; }
.line-customer-binding-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ticket-status-actions-l2 { margin-left: auto; flex-wrap: nowrap; }
.line-ticket-reference { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.line-customer-summary-actions:has(.ticket-status-actions-l2) { align-items: center; }

@media (max-width: 1280px) {
  .line-customer-summary-actions { flex-wrap: wrap; }
  .ticket-status-actions-l2 { width: 100%; margin-left: 0; justify-content: stretch; }
  .ticket-status-actions-l2 .button { flex: 1 1 auto; }
}
.line-customer-empty { height: 100%; min-height: 0; padding: 20px; display: grid; place-content: center; color: var(--muted); text-align: center; }
.line-customer-empty strong { font-size: 13px; font-weight: 650; }
.line-customer-empty.is-error strong { color: var(--danger); }

/* 顶栏工单 pills 与右侧抽屉 */
.l2-queue-tabs { display: flex; align-items: center; gap: 6px; }
.l2-queue-tab { min-height: 30px; padding: 4px 6px 4px 10px; display: inline-flex; align-items: center; gap: 7px; color: #5c555b; background: #fff; border: 1px solid #dedadd; border-radius: 999px; cursor: pointer; }
.l2-queue-tab span { font-size: 10px; font-weight: 750; }
.l2-queue-tab b { min-width: 19px; height: 19px; padding: 0 4px; display: grid; place-items: center; color: #625a60; background: #f1eff0; border-radius: 999px; font-size: 9px; }
.l2-queue-tab:hover, .l2-queue-tab.active { color: #0d7043; background: #eaf8f0; border-color: #91d2ae; }
.l2-queue-tab.active b { color: #fff; background: #0f7a4a; }
.l2-queue-drawer { width: min(620px, calc(100% - 252px)); position: absolute; inset: 0 0 0 auto; z-index: 12; overflow: hidden; background: rgba(255,255,255,.99); border: 1px solid #cfd9d3; border-radius: 0 10px 10px 0; box-shadow: -18px 0 44px rgba(40,54,46,.18); }
.l2-queue-drawer[hidden] { display: none; }
.l2-queue-drawer > header { min-height: 56px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.l2-queue-drawer h2 { margin: 0; font-size: 17px; }
.l2-queue-drawer h2 span { color: #0f7a4a; }
.l2-queue-drawer-body { max-height: calc(100% - 56px); padding: 12px 14px 18px; overflow: auto; }
.l2-queue-drawer-body .empty-state { min-height: 220px; }

/* 管理端操作情况 */
.ops-main-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(350px, .8fr); gap: 18px; align-items: start; }
.ops-main-grid .panel { min-width: 0; }
.ops-section-heading { margin-top: 28px; }
.ops-event-list { margin: 0; padding: 0; list-style: none; }
.ops-event-list li { padding: 12px 0; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; border-bottom: 1px solid #eee9ec; }
.ops-event-list li:last-child { border-bottom: 0; }
.ops-event-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 50%; font-size: 10px; font-weight: 800; }
.ops-event-list strong { font-size: 12px; }
.ops-event-list p { margin: 1px 0; color: var(--muted); font-size: 10px; }
.ops-event-list p a { color: var(--brand); font-weight: 700; }
.ops-event-list div > span { display: block; overflow: hidden; color: #5a535b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ops-event-list time, .ops-record-list time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.ops-record-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ops-record-list { margin: 0; padding: 0; list-style: none; }
.ops-record-list li { padding: 10px 0; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #eee9ec; }
.ops-record-list li:last-child { border-bottom: 0; }
.ops-record-list li > div { min-width: 0; display: flex; flex-direction: column; }
.ops-record-list strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ops-record-list span { color: var(--muted); font-size: 10px; }
.ops-empty-inline { margin: 0; padding: 18px 0; color: var(--muted); text-align: center; }
.ops-agent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ops-agent-card { min-width: 0; padding: 13px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 7px; }
.ops-agent-card .user-avatar { width: 38px; height: 38px; }
.ops-agent-card > div { min-width: 0; display: flex; flex-direction: column; }
.ops-agent-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ops-agent-card span, .ops-agent-card small, .ops-agent-card time { color: var(--muted); font-size: 9px; }
.ops-agent-card > div:nth-of-type(2) { align-items: center; }
.ops-agent-card b { color: var(--brand); font-size: 19px; line-height: 1; }
.ops-agent-card time { grid-column: 2 / -1; }

/* 管理端邮局联调只读状态 */
.heading-side .button { margin-bottom: 8px; }
.postal-panel { margin-bottom: 18px; }
.postal-table th { white-space: nowrap; }
.postal-table td { vertical-align: top; }
.postal-table strong { font-size: 12px; }
.postal-id-pair { color: #514a52; font-size: 10px; white-space: nowrap; }
.postal-counts { color: var(--muted); font-size: 10px; white-space: nowrap; }
.postal-counts b { color: var(--success); font-weight: 700; }
.postal-counts em { color: var(--danger); font-style: normal; font-weight: 700; }
.postal-error-text { max-width: 230px; margin-top: 4px; display: block; overflow: hidden; color: var(--danger); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.postal-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); gap: 18px; align-items: start; }
.postal-failure-list { margin: 0; padding: 0; list-style: none; }
.postal-failure-list li { padding: 11px 0; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px; border-bottom: 1px solid #eee9ec; }
.postal-failure-list li:last-child { border-bottom: 0; }
.postal-failure-icon { width: 24px; height: 24px; display: grid; place-items: center; color: var(--danger); background: var(--danger-soft); border-radius: 50%; font-size: 11px; font-weight: 800; }
.postal-failure-list strong { font-size: 11px; }
.postal-failure-list p { margin: 1px 0 4px; color: var(--muted); font-size: 9px; }
.postal-failure-list div > span { display: block; color: #4f484f; font-size: 10px; overflow-wrap: anywhere; }
.postal-failure-list time { grid-column: 2; color: var(--muted); font-size: 9px; }
.postal-cli-tip, .postal-schema-notice { margin-bottom: 18px; padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; border-radius: var(--radius); }
.postal-cli-tip { color: #3f4852; background: var(--info-soft); border: 1px solid #cfe0ef; }
.postal-cli-tip > span { padding: 3px 8px; color: #fff; background: var(--info); border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.postal-cli-tip strong, .postal-schema-notice strong { display: block; font-size: 12px; }
.postal-cli-tip p, .postal-schema-notice p { margin: 2px 0 0; font-size: 10px; }
.postal-cli-tip code, .postal-schema-notice code { padding: 2px 5px; background: rgba(255,255,255,.72); border-radius: 3px; font-size: 10px; }
.postal-schema-notice { display: block; color: #714200; background: var(--warning-soft); border: 1px solid #efd6b6; }
.postal-schema-notice code { margin-top: 8px; display: inline-block; }

/* 时间线 */
.timeline { margin: 0; padding: 2px 0 2px 12px; list-style: none; }
.timeline-item { padding: 0 0 23px 28px; position: relative; border-left: 1px solid #d9cdd1; }
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-dot { width: 13px; height: 13px; position: absolute; left: -7px; top: 4px; border: 3px solid #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 1px #bd7c8c; }
.timeline-head { display: flex; justify-content: space-between; gap: 12px; }
.timeline-head strong { font-size: 13px; }
.timeline-time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.timeline-status { margin-top: 3px; color: var(--muted); font-size: 11px; }
.timeline-note { margin-top: 7px; padding: 8px 10px; color: #5b555c; background: #f7f5f6; border-radius: 4px; font-size: 11px; white-space: pre-wrap; }

/* 客户查询 */
.search-hero { margin-bottom: 20px; padding: 30px; color: #fff; background: linear-gradient(115deg, #700017, #a3002a); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.search-hero h1 { margin: 0 0 6px; font-size: 25px; }
.search-hero p { margin: 0 0 20px; color: rgba(255,255,255,.78); }
.search-form { display: flex; gap: 9px; }
.search-form .search-input { min-height: 48px; border-color: transparent; }
.search-form .button { min-width: 130px; box-shadow: none; color: var(--brand); background: #fff; border-color: #fff; }
.customer-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: 24px; }
.customer-name { margin: 0 0 4px; font-size: 21px; }
.customer-code { color: var(--brand); font-family: ui-monospace, monospace; font-weight: 800; overflow-wrap: anywhere; }
.customer-actions { min-width: 215px; padding-left: 23px; border-left: 1px solid var(--line); }
.customer-actions h3 { margin: 0 0 10px; font-size: 13px; }
.customer-actions .button { width: 100%; margin-top: 8px; }

/* 提示 */
.toast-region { width: min(390px, calc(100% - 30px)); position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 9px; }
.toast { padding: 13px 15px; display: flex; gap: 10px; align-items: flex-start; color: #fff; background: #363139; border-left: 5px solid #9f969d; border-radius: 5px; box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: toast-in .2s ease; }
.toast.success { border-left-color: #5bd291; }
.toast.error { border-left-color: #ff6a82; }
.toast strong { display: block; font-size: 12px; }
.toast span { color: rgba(255,255,255,.82); font-size: 11px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.error-panel { min-height: 250px; padding: 40px; display: grid; place-content: center; justify-items: center; text-align: center; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--danger); border-radius: var(--radius); }
.error-panel strong { margin-bottom: 5px; font-size: 18px; }
.error-panel p { margin: 0 0 15px; color: var(--muted); }

/* 登录 */
.login-page { background: #f3f1f2; }
.login-header { width: min(1160px, calc(100% - 40px)); height: 88px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.secure-caption { color: var(--muted); font-size: 12px; }
.secure-caption span { color: var(--success); }
.login-main { min-height: calc(100vh - 145px); padding: 34px max(28px, calc((100vw - 1160px) / 2)) 52px; display: grid; grid-template-columns: minmax(520px, 1.35fr) minmax(350px, .78fr); gap: 78px; align-items: center; position: relative; background: radial-gradient(circle at 18% 36%, rgba(255,255,255,.98) 0 10%, transparent 34%), linear-gradient(112deg, #fbfafb 0%, #f6f1f3 58%, #eee7e9 100%); overflow: hidden; perspective: 1500px; }
.login-main::before { content: ""; width: 590px; height: 590px; position: absolute; left: -285px; bottom: -390px; border: 85px solid rgba(151,0,35,.04); border-radius: 50%; }
.login-main::after { content: ""; width: 260px; height: 260px; position: absolute; left: 50%; top: -205px; border: 54px solid rgba(151,0,35,.035); border-radius: 50%; }
.login-intro, .login-card { position: relative; z-index: 1; }
.login-intro { width: min(100%, 650px); min-height: 520px; display: flex; flex-direction: column; justify-content: center; perspective: 1100px; }
.login-intro-copy { position: relative; z-index: 8; padding-left: 4px; }
.login-intro h1 { margin: 6px 0 7px; color: #32292e; font-size: clamp(38px, 4vw, 56px); line-height: 1.16; letter-spacing: .075em; }
.login-lead { margin: 0; color: var(--muted); font-size: 14px; letter-spacing: .16em; }

/* 登录页抽象立体装饰 */
.deco-scene { width: 590px; height: 350px; margin: -8px 0 0 3px; position: relative; transform-style: preserve-3d; transform: rotateX(2deg) rotateY(-4deg); }
.deco-halo { width: 310px; height: 310px; position: absolute; left: 102px; top: 18px; border: 1px solid rgba(151,0,35,.12); border-radius: 50%; transform: translateZ(-50px) rotateX(68deg); box-shadow: 0 0 0 38px rgba(151,0,35,.022), 0 0 0 78px rgba(151,0,35,.018); }
.deco-grid { width: 470px; height: 245px; position: absolute; left: 38px; bottom: -12px; opacity: .42; background-image: linear-gradient(rgba(137,99,111,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(137,99,111,.16) 1px, transparent 1px); background-size: 34px 34px; transform-origin: center bottom; transform: rotateX(66deg) translateZ(-48px); -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%); }
.deco-panel { position: absolute; overflow: hidden; background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 28px 50px rgba(74,32,45,.16), inset 0 0 0 1px rgba(151,0,35,.04); transform-style: preserve-3d; backdrop-filter: blur(7px); }
.deco-panel-back { width: 280px; height: 168px; left: 228px; top: 72px; padding: 20px; border-radius: 18px; transform: translateZ(-45px) rotateY(-10deg) rotateZ(5deg); opacity: .73; }
.deco-panel-back .deco-dot { width: 7px; height: 7px; margin-right: 5px; display: inline-block; background: #d8c8ce; border-radius: 50%; }
.deco-panel-back i { width: 76%; height: 8px; margin-top: 22px; display: block; background: linear-gradient(90deg, #eadfe2, rgba(234,223,226,.2)); border-radius: 10px; }
.deco-panel-back i:nth-of-type(2) { width: 55%; margin-top: 12px; }
.deco-panel-back i:nth-of-type(3) { width: 66%; margin-top: 29px; background: linear-gradient(90deg, rgba(151,0,35,.18), rgba(151,0,35,.025)); }
.deco-panel-main { width: 300px; height: 190px; left: 102px; top: 78px; border-radius: 20px; transform: translateZ(52px) rotateY(8deg) rotateZ(-4deg); animation: deco-panel-float 6.5s ease-in-out infinite; }
.deco-panel-top { height: 38px; padding: 0 16px; display: flex; align-items: center; gap: 6px; background: linear-gradient(90deg, #84001b, #b40035); }
.deco-panel-top span { width: 6px; height: 6px; display: block; border-radius: 50%; background: rgba(255,255,255,.48); }
.deco-panel-body { height: calc(100% - 38px); padding: 25px 23px; position: relative; }
.deco-emblem { width: 50px; height: 50px; display: grid; place-items: center; float: left; margin-right: 16px; color: #fff; background: linear-gradient(145deg, #b80034, #760017); border-radius: 5px 17px 5px 17px; box-shadow: 0 10px 20px rgba(126,0,29,.2); font: 800 16px/1 Arial, sans-serif; }
.deco-line { width: 42%; height: 7px; margin: 10px 0; display: block; overflow: hidden; background: #e9dfe2; border-radius: 8px; }
.deco-line-wide { width: 58%; padding-top: 2px; background: #cbb9bf; }
.deco-chip { width: 94px; height: 27px; position: absolute; left: 23px; bottom: 22px; background: linear-gradient(90deg, #f5e4e9, #fff); border: 1px solid #edd4dc; border-radius: 16px; }
.deco-cube { width: 78px; height: 78px; position: absolute; left: 31px; top: 149px; transform-style: preserve-3d; transform: translateZ(95px) rotateX(-20deg) rotateY(35deg) rotateZ(-7deg); animation: deco-cube-float 7s ease-in-out infinite; }
.deco-cube span { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.7); }
.deco-cube span:nth-child(1) { background: linear-gradient(145deg, #bd0036, #87001c); transform: translateZ(39px); box-shadow: 0 18px 30px rgba(116,0,24,.2); }
.deco-cube span:nth-child(2) { background: #6f0017; transform: rotateY(90deg) translateZ(39px); }
.deco-cube span:nth-child(3) { background: #df6a88; transform: rotateX(90deg) translateZ(39px); }
.deco-orb { width: 92px; height: 92px; position: absolute; right: 42px; top: 34px; border-radius: 50%; background: radial-gradient(circle at 31% 27%, #fff 0 4%, #f9b6c7 8%, #bd1647 36%, #720018 75%, #4c0010 100%); box-shadow: inset -16px -18px 28px rgba(46,0,12,.26), 0 24px 38px rgba(86,0,19,.2); transform: translateZ(88px); animation: deco-orb-float 5.7s ease-in-out infinite; }
.deco-orb span { width: 126px; height: 35px; position: absolute; left: -18px; top: 28px; border: 4px solid rgba(173,0,44,.24); border-radius: 50%; transform: rotateX(68deg) rotateZ(-17deg); }
.deco-tile { width: 72px; height: 72px; position: absolute; right: 75px; bottom: 20px; display: grid; place-items: center; color: #a3002b; background: rgba(255,255,255,.9); border: 1px solid #eadde1; border-radius: 17px; box-shadow: 0 19px 35px rgba(74,32,45,.14); transform: translateZ(72px) rotateY(-13deg) rotateZ(10deg); animation: deco-tile-float 6.8s ease-in-out infinite; }
.deco-tile span { font-size: 19px; transform: rotateZ(-10deg); }
.deco-shadow { width: 350px; height: 54px; position: absolute; left: 84px; bottom: 2px; background: radial-gradient(ellipse, rgba(75,34,46,.21), transparent 68%); filter: blur(7px); transform: translateZ(-65px) rotateX(68deg); }
@keyframes deco-panel-float { 0%, 100% { transform: translateZ(52px) rotateY(8deg) rotateZ(-4deg) translateY(0); } 50% { transform: translateZ(66px) rotateY(8deg) rotateZ(-3deg) translateY(-9px); } }
@keyframes deco-cube-float { 0%, 100% { transform: translateZ(95px) rotateX(-20deg) rotateY(35deg) rotateZ(-7deg) translateY(0); } 50% { transform: translateZ(105px) rotateX(-16deg) rotateY(43deg) rotateZ(-3deg) translateY(-12px); } }
@keyframes deco-orb-float { 0%, 100% { transform: translateZ(88px) translateY(0); } 50% { transform: translateZ(101px) translateY(-13px); } }
@keyframes deco-tile-float { 0%, 100% { transform: translateZ(72px) rotateY(-13deg) rotateZ(10deg) translateY(0); } 50% { transform: translateZ(82px) rotateY(-9deg) rotateZ(7deg) translateY(-10px); } }

.login-card { padding: 34px; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.95); border-top: 5px solid var(--brand); border-radius: 12px; box-shadow: -10px 22px 48px rgba(61,29,40,.16), 16px 28px 60px rgba(61,29,40,.1); transform: rotateY(-2.2deg) translateZ(18px); transform-origin: right center; transition: transform .35s ease, box-shadow .35s ease; }
.login-card:hover, .login-card:focus-within { transform: rotateY(-.4deg) translateZ(24px) translateY(-2px); box-shadow: -8px 28px 58px rgba(61,29,40,.18), 18px 34px 70px rgba(61,29,40,.1); }
.login-card-head { margin-bottom: 25px; }
.login-card-head h2 { margin: 5px 0 2px; font-size: 25px; }
.login-card-head > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.input-with-icon { position: relative; display: block; }
.input-with-icon input { height: 47px; padding-left: 43px; }
.field-icon { width: 42px; position: absolute; left: 0; top: 0; bottom: 0; display: grid; place-items: center; z-index: 1; color: #8a7e84; font-size: 11px; }
.login-help { margin: 20px 0 0; padding-top: 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; text-align: center; }
.login-footer, .site-footer { color: #746d75; background: #fff; border-top: 1px solid var(--line); font-size: 11px; }
.login-footer { min-height: 53px; display: grid; place-items: center; }
.site-footer { min-height: 75px; padding: 0 max(20px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer div { display: flex; flex-direction: column; }
.site-footer strong { color: var(--brand-dark); font-size: 12px; }

@media (max-width: 1100px) and (min-width: 901px) {
  .line-desk-layout { grid-template-columns: 224px minmax(350px, 1fr) 348px; }
  .line-customer-summary-scroll, .line-customer-edit-scroll { padding-inline: 10px; }
  .line-customer-summary-grid { column-gap: 14px; }
}

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .ticket-layout { grid-template-columns: 1fr; }
  .nav-inner a { min-width: 0; flex: 1; padding: 0 12px; }
  .login-main { grid-template-columns: 1fr 390px; gap: 35px; }
  .login-intro h1 { font-size: 36px; }
  .line-chat-layout, .ops-main-grid, .postal-bottom-grid { grid-template-columns: 1fr; }
  #app.line-desk-shell { width: calc(100% - 28px); }
  .line-desk-layout { height: auto; grid-template-columns: 1fr; overflow: hidden; }
  .line-desk-layout > * { height: auto; }
  .line-conversation-panel { height: min(360px, calc(100vh - 160px)); border-right: 0; border-bottom: 1px solid var(--line); }
  .line-chat-pane { height: min(620px, calc(100vh - 150px)); }
  .line-profile-column { height: min(620px, calc(100vh - 120px)); border-top: 1px solid var(--line); border-left: 0; }
  .l2-queue-drawer { width: auto; position: fixed; inset: 80px 14px 14px; border-radius: 10px; }
  .ops-record-grid, .ops-agent-grid { grid-template-columns: 1fr 1fr; }
  .deco-scene { margin-top: -16px; transform: scale(.72) rotateX(2deg) rotateY(-4deg); transform-origin: left center; }
}

@media (max-width: 700px) {
  .utility-bar { display: none; }
  .header-main { width: calc(100% - 28px); height: 70px; }
  .brand-mark { width: 40px; height: 40px; font-size: 16px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy small { display: none; }
  .user-block { display: none; }
  .header-actions { gap: 8px; }
  .mobile-only { display: inline-flex; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-inner { display: grid; grid-template-columns: 1fr 1fr; }
  .nav-inner a { min-height: 48px; border-bottom: 1px solid rgba(255,255,255,.13); }
  .page-shell { width: calc(100% - 28px); padding-top: 20px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 23px; }
  .heading-side { display: none; }
  .welcome-banner { padding: 22px; }
  .welcome-banner h1 { font-size: 21px; }
  .banner-date { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 126px; padding: 16px; }
  .stat-value { font-size: 28px; }
  .tabs { overflow: hidden; }
  .tab-button { min-width: 0; padding-inline: 8px; gap: 6px; }
  .queue-toolbar { align-items: flex-start; flex-direction: column; }
  .ticket-hero-top, .ticket-code-row { align-items: flex-start; flex-direction: column; }
  .ticket-hero-meta { width: 100%; align-items: stretch; flex-direction: column; }
  .ticket-back-button { width: 100%; min-height: 48px; }
  .form-grid { grid-template-columns: 1fr; }
  .customer-card { grid-template-columns: 1fr; }
  .customer-actions { min-width: 0; padding: 18px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .login-header { width: calc(100% - 30px); height: 76px; }
  .secure-caption { display: none; }
  .login-main { min-height: calc(100vh - 133px); padding: 34px 20px 50px; display: block; }
  .login-intro { display: none; }
  .login-card, .login-card:hover, .login-card:focus-within { max-width: 430px; margin: 0 auto; padding: 27px 23px; transform: none; }
  .site-footer { padding: 18px 20px; align-items: flex-start; flex-direction: column; gap: 4px; }
  .line-chat-layout { min-height: 0; }
  .line-desk-topbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .line-desk-topbar h1 { font-size: 20px; }
  .l2-queue-tabs { width: 100%; }
  .l2-queue-tab { flex: 1; justify-content: center; }
  .line-customer-binding { max-width: none; }
  .line-sub-switcher { grid-template-columns: 1fr 1fr; }
  .l2-queue-tabs { gap: 5px; }
  .l2-queue-tab { padding-inline: 7px; gap: 5px; }
  .line-customer-fields { grid-template-columns: 1fr; }
  .line-desk-field-wide { grid-column: auto; }
  .line-message-stream { padding: 15px; }
  .line-message { max-width: 88%; }
  .ops-record-grid, .ops-agent-grid { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .stats-grid { grid-template-columns: 1fr; }
  .search-hero { padding: 22px 18px; }
  .search-form { flex-direction: column; }
  .search-form .button { width: 100%; }
  .ticket-code strong { font-size: 19px; }
  .content-card-pad, .panel-body { padding: 15px; }
}

/* 一 / 二 / 三线独立工作台视觉分区 */
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0 28px;
}
.workspace-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.workspace-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.workspace-badge {
  display: inline-grid; place-items: center;
  min-width: 42px; height: 28px; padding: 0 10px;
  border-radius: 999px; color: #fff; font-weight: 700; font-size: 12px;
}
.workspace-card h2 { margin: 12px 0 8px; font-size: 20px; }
.workspace-card p { margin: 0 0 12px; color: var(--muted); }
.workspace-modules { margin: 0 0 16px; padding-left: 18px; color: #3b3640; }
.workspace-modules li { margin: 4px 0; }
.workspace-card strong { color: var(--brand); }
.workspace-card-l1 { border-top: 4px solid #0b5cab; }
.workspace-card-l1 .workspace-badge { background: #0b5cab; }
.workspace-card-l2 { border-top: 4px solid #0f7a4a; }
.workspace-card-l2 .workspace-badge { background: #0f7a4a; }
.workspace-card-l3 { border-top: 4px solid #8f001d; }
.workspace-card-l3 .workspace-badge { background: #8f001d; }

.brandline-l1 { background: linear-gradient(90deg, #074a8a, #1d7ed8 50%, #4aa3ef); }
.brandline-l2 { background: linear-gradient(90deg, #0a5c38, #14965b 50%, #3fc987); }
.brandline-l3 { background: linear-gradient(90deg, #560011, #8f001d 50%, #cf003d); }
.brand-mark-l1 { background: linear-gradient(145deg, #0b5cab, #1d7ed8) !important; }
.brand-mark-l2 { background: linear-gradient(145deg, #0f7a4a, #19a564) !important; }
.brand-mark-l3 { background: linear-gradient(145deg, #8f001d, #cf003d) !important; }
.nav-l1 a.active, .workspace-l1 .main-nav a.active { box-shadow: inset 0 -3px 0 #0b5cab; }
.nav-l2 a.active, .workspace-l2 .main-nav a.active { box-shadow: inset 0 -3px 0 #0f7a4a; }
.nav-l3 a.active, .workspace-l3 .main-nav a.active { box-shadow: inset 0 -3px 0 #8f001d; }
.welcome-l1 { border-left: 6px solid #0b5cab; }
.welcome-l2 { border-left: 6px solid #0f7a4a; }
.welcome-l3 { border-left: 6px solid #8f001d; }
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 0 8px;
}
.module-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 12px;
}
.module-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .04em;
  color: #fff;
  background: #5b5560;
  border-radius: 999px;
  padding: 2px 8px;
}
.workspace-l1 .module-tag { background: #0b5cab; }
.workspace-l2 .module-tag { background: #0f7a4a; }
.workspace-l3 .module-tag { background: #8f001d; }
.module-card h3 { margin: 10px 0 6px; font-size: 15px; }
.module-card p { margin: 0; color: var(--muted); font-size: 13px; }
.compose-panel { margin: 8px 0 18px; }
.compose-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.compose-steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-no {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--brand); font-weight: 700; flex: 0 0 auto;
}
.compose-note {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--brand-soft);
  border: 1px solid #f0d0d8;
}
.footer-l1, .footer-l2, .footer-l3 { font-size: 12px; }

@media (max-width: 960px) {
  .workspace-grid, .module-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
