:root {
  --ink: #1d2a3b;
  --muted: #7c8999;
  --line: #e8edf2;
  --canvas: #f6f8fb;
  --panel: #ffffff;
  --nav: #10283c;
  --nav-soft: #193a51;
  --teal: #0a947c;
  --teal-soft: #e8f8f4;
  --blue: #3d7ee8;
  --orange: #e89a42;
  --purple: #8c6cdc;
  --red: #d85f67;
  --customer-link-hover: #2f76ff;
  --customer-link-focus-ring: rgba(47, 118, 255, 0.16);
  --shadow: 0 12px 30px rgba(37, 59, 82, 0.06);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 21px 14px 16px; color: #dce8f1; background: var(--nav); }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 26px; color: white; }
.brand-mark { width: 42px; height: 42px; display: block; flex: 0 0 42px; object-fit: contain; border-radius: 12px; background: #fff; padding: 4px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16); }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; letter-spacing: .2px; }
.brand span { margin-top: 3px; color: #8ba5b7; font-size: 10px; letter-spacing: .8px; }
.nav-list { display: grid; gap: 5px; flex: 1 1 auto; min-height: 0; align-content: start; overflow-y: auto; padding-right: 2px; scrollbar-width: none; }
.nav-list::-webkit-scrollbar { width: 0; height: 0; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 8px; color: #a9bdcb; background: transparent; text-align: left; transition: .2s ease; }
.nav-item:hover, .nav-item.active { color: #fff; background: var(--nav-soft); }
.nav-item.active { box-shadow: inset 3px 0 #62d7bf; }
.nav-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: #80b1bc; }
.nav-icon svg { width: 18px; height: 18px; display: block; }
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { color: #cfe8f7; }
.sidebar-bottom { margin-top: 12px; flex: 0 0 auto; }
.sidebar-tip { display: flex; gap: 9px; margin: 0 5px 14px; padding: 12px 9px; border-bottom: 1px solid rgba(255,255,255,.08); }
.tip-dot { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #68d9aa; box-shadow: 0 0 0 4px rgba(104,217,170,.12); }
.tip-dot.is-fresh { background: #68d9aa; box-shadow: 0 0 0 4px rgba(104,217,170,.12); }
.tip-dot.is-warm { background: #f2bd63; box-shadow: 0 0 0 4px rgba(242,189,99,.16); }
.tip-dot.is-stale { background: #f07d86; box-shadow: 0 0 0 4px rgba(240,125,134,.16); }
.sidebar-tip strong, .sidebar-tip span { display: block; font-size: 10px; }
.sidebar-tip span { margin-top: 0; color: #7894a6; }
.sidebar-sync-copy { width: 100%; display: grid; justify-items: center; gap: 6px; }
.sidebar-sync-line { display: grid; justify-items: center; gap: 1px; text-align: center; }
.sidebar-sync-label { margin-top: 0; }
.sidebar-sync-value { margin-top: 0; }
.sidebar-tip #sidebar-sync-time { display: none !important; }
.sidebar-tip .sidebar-sync-meta { display: none !important; }
.sidebar-sync-refresh {
  justify-self: center;
  min-height: 24px;
  padding: 0 12px;
  border: 1px solid rgba(126, 240, 213, 0.2);
  border-radius: 999px;
  color: #bfeee4;
  background: rgba(126, 240, 213, 0.08);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}
.sidebar-sync-refresh:hover,
.sidebar-sync-refresh:focus-visible {
  border-color: rgba(126, 240, 213, 0.42);
  color: #efffff;
  background: rgba(126, 240, 213, 0.14);
  outline: none;
  transform: translateY(-1px);
}
.sidebar-sync-refresh:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
}
.theme-switcher { display: flex; justify-content: center; width: fit-content; max-width: calc(100% - 10px); margin: 0 auto 14px; padding: 2px 0; border: 0; background: transparent; overflow: hidden; }
.theme-switcher-head { display: none; }
.theme-switcher-buttons { display: grid; grid-template-columns: repeat(3, 20px); justify-content: center; gap: 6px; width: auto; }
.theme-mode-button { min-width: 20px; min-height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 0; color: #8ea4b7; background: transparent; box-shadow: none; transition: color .2s ease, opacity .2s ease, transform .2s ease; }
.theme-mode-button:hover,
.theme-mode-button:focus-visible { color: #dff4ff; opacity: 1; transform: translateY(-1px); }
.theme-mode-button.active { color: #7ef0d5; background: transparent; box-shadow: none; }
.theme-mode-button span { font-size: 16px; line-height: 1; }
.user-card { width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 6px; border: 0; color: #fff; background: transparent; text-align: left; }
.avatar { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; color: #145263; background: #a9e0da; font-size: 10px; font-weight: 800; }
.avatar.has-image { color: transparent; background-color: #d7e6f8; background-position: center; background-repeat: no-repeat; background-size: cover; }
.user-card strong, .user-card small { display: block; }
.user-card strong { font-size: 12px; }
.user-card small { margin-top: 3px; color: #8ca4b2; font-size: 10px; }
.dots { margin-left: auto; color: #77919f; }
.main-content { min-width: 0; padding: 24px 32px 40px; }
.topbar, .section-heading, .panel-header, .view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: 4px; font-size: 24px; letter-spacing: -.6px; }
h2 { font-size: 20px; letter-spacing: -.4px; }
h3 { margin-top: 4px; font-size: 16px; letter-spacing: -.2px; }
.eyebrow { color: #91a0ae; font-size: 9px; font-weight: 800; letter-spacing: 1.3px; }
.topbar-actions, .toolbar-actions { display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 10px; width: 320px; padding: 6px 8px 6px 14px; border: 1px solid var(--line); border-radius: 12px; color: #98a6b5; background: #fff; box-shadow: 0 8px 20px rgba(29, 42, 59, 0.05); }
.search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.search input::placeholder { color: #97a5b3; }
.search-button { width: 42px; height: 42px; display: inline-grid; place-items: center; flex: 0 0 42px; border: 0; border-radius: 10px; color: #fff; background: var(--teal); box-shadow: 0 8px 18px rgba(10, 148, 124, 0.24); transition: background .2s ease, transform .2s ease; }
.search-button:hover { background: #087c69; transform: translateY(-1px); }
.system-topbar-icon { width: 18px; height: 18px; display: block; flex: 0 0 18px; }
.notification-icon { transform: scaleX(-1); transform-origin: center; }
.notification-wrap { position: relative; }
.icon-button { position: relative; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; color: #6d7c8c; background: #fff; }
.icon-button b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; border-radius: 999px; color: #fff; background: var(--red); font-size: 10px; font-weight: 700; line-height: 1; }
.notification-button { display: inline-grid; place-items: center; transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease; }
.notification-button:hover { border-color: #cfd9e4; color: #365170; background: #f6f9fc; transform: translateY(-1px); }
.notification-button[aria-expanded="true"] { border-color: #b9d2f6; color: #2f76ff; background: #edf4ff; }
.notification-panel { position: absolute; top: calc(100% + 12px); right: 0; z-index: 50; width: 360px; max-width: calc(100vw - 56px); padding: 8px; border: 1px solid #dce5f0; border-radius: 20px; background: #fff; box-shadow: 0 24px 48px rgba(28, 46, 69, 0.16); }
.notification-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 10px 12px; }
.notification-panel-title { min-width: 0; }
.notification-panel-head strong { display: block; color: #34495f; font-size: 14px; }
.notification-panel-head span { display: block; margin-top: 4px; color: #8da0b3; font-size: 11px; }
.notification-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.notification-stat-pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 28px; margin-top: 0; padding: 0 10px; border: 1px solid transparent; border-radius: 999px; color: #5f7185; background: #f1f5f9; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.notification-stat-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; }
.notification-stat-pill:hover { transform: translateY(-1px); }
.notification-stat-pill:focus-visible { box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.16); outline: none; }
.notification-stat-pill.is-active { border-color: rgba(47, 118, 255, 0.22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62); }
.notification-stat-pill.is-total { color: #315982; background: #eef5ff; }
.notification-stat-pill.is-total::before { background: #2f76ff; }
.notification-stat-pill.is-unread { color: #bd485b; background: #fff0f2; }
.notification-stat-pill.is-unread::before { background: var(--red); }
.notification-stat-pill.is-read { color: #16816e; background: #eaf8f4; }
.notification-stat-pill.is-read::before { background: var(--teal); }
.notification-mark-all { padding: 0; border: 0; color: #2f76ff; background: transparent; font-size: 11px; font-weight: 700; white-space: nowrap; }
.notification-mark-all:disabled { color: #9fb0c0; cursor: not-allowed; }
.notification-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: 0 2px 2px; }
.notification-item { padding: 12px; border: 1px solid #e1e8f0; border-radius: 16px; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); transition: border-color .2s ease, transform .2s ease; }
.notification-item:hover { border-color: #cedaed; transform: translateY(-1px); }
.notification-item.is-read { opacity: .78; }
.notification-item.high { border-color: #f0d4d9; }
.notification-item.medium { border-color: #e6dcc0; }
.notification-item.low { border-color: #d7e2f0; }
.notification-item-main { width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.notification-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notification-item-top small { color: #93a4b5; font-size: 10px; }
.notification-level { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.notification-level.high { color: #bd485b; background: #fff0f2; }
.notification-level.medium { color: #986d1f; background: #fff6e6; }
.notification-level.low { color: #2f76ff; background: #edf4ff; }
.notification-item strong { display: block; margin-top: 10px; color: #33485d; font-size: 13px; }
.notification-item p { margin-top: 6px; color: #6f8294; font-size: 11px; line-height: 1.55; }
.notification-item-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.notification-item-link, .notification-item-read { padding: 0; border: 0; background: transparent; font-size: 11px; font-weight: 700; }
.notification-item-link { color: #2f76ff; }
.notification-item-read { color: #93a4b5; }
.notification-item-read:disabled { color: #b0becb; cursor: default; }
.notification-empty { padding: 22px 16px; color: #8da0b3; font-size: 12px; line-height: 1.6; text-align: center; }
.guide-hero-panel,
.guide-panel { overflow: hidden; }
.guide-hero-panel { padding: 22px 24px 22px; }
.guide-hero-head { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, .72fr); gap: 16px; align-items: start; }
.guide-hero-main h3 { margin-top: 6px; font-size: 18px; letter-spacing: -.3px; }
.guide-hero-copy { max-width: 860px; margin-top: 12px; color: #6f8294; font-size: 12px; line-height: 1.8; }
.guide-hero-aside { display: grid; gap: 12px; align-content: start; }
.guide-hero-aside-block { min-height: 100%; padding: 16px 18px; border: 1px solid #e4ebf2; border-radius: 18px; background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.guide-hero-label { display: inline-block; color: #8ea1b5; font-size: 10px; font-weight: 800; letter-spacing: .8px; }
.guide-hero-note { margin-top: 10px; color: #6f8194; font-size: 11px; line-height: 1.75; }
.guide-overview-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.guide-overview-card { padding: 16px; border: 1px solid #e4ebf2; border-radius: 16px; background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%); }
.guide-overview-card span { display: block; color: #90a0b1; font-size: 10px; }
.guide-overview-card strong { display: block; margin-top: 10px; color: #2e4861; font-size: 20px; letter-spacing: -.4px; }
.guide-overview-card small { display: block; margin-top: 6px; color: #728496; font-size: 11px; line-height: 1.55; }
.guide-overview-card.is-actionable {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.guide-overview-card.is-actionable:hover,
.guide-overview-card.is-actionable:focus-visible {
  border-color: #c8d9ea;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
  box-shadow: 0 12px 24px rgba(23, 41, 66, 0.08);
  transform: translateY(-1px);
}
.guide-overview-card strong {
  font-variant-numeric: tabular-nums;
}
.guide-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 14px; margin-top: 14px; }
.guide-layout + .guide-panel,
#guide-view > .guide-panel + .guide-panel { margin-top: 14px; }
#guide-view .guide-panel .panel-header { padding: 18px 18px 14px; }
.guide-quickstart,
.guide-role-grid,
.guide-rule-grid,
.guide-tip-grid { padding: 0 18px 18px; }
.guide-quickstart { display: grid; gap: 12px; }
.guide-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border: 1px solid #e4ebf2; border-radius: 16px; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); }
.guide-step-index { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #2f76ff; background: #edf4ff; font-size: 13px; font-weight: 800; }
.guide-step strong { display: block; color: #33495f; font-size: 13px; }
.guide-step p { margin-top: 6px; color: #718395; font-size: 11px; line-height: 1.65; }
.guide-role-grid { display: grid; gap: 12px; }
.guide-role-card { padding: 14px 16px; border: 1px solid #e4ebf2; border-radius: 16px; background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%); }
.guide-role-card.is-current { border-color: #b8d2ff; background: linear-gradient(180deg, #f4f8ff 0%, #eef5ff 100%); box-shadow: inset 0 0 0 1px rgba(47, 118, 255, 0.06); }
.guide-role-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.guide-role-card strong { color: #30485f; font-size: 13px; }
.guide-role-badge { padding: 4px 8px; border-radius: 999px; color: #2f76ff; background: #edf4ff; font-size: 10px; font-weight: 700; }
.guide-role-card p { margin-top: 8px; color: #708294; font-size: 11px; line-height: 1.65; }
.guide-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-rule-card { padding: 16px; border: 1px solid #e4ebf2; border-radius: 18px; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); }
.guide-rule-card-highlight {
  border-color: rgba(47, 118, 255, 0.45);
  box-shadow: 0 18px 38px rgba(47, 118, 255, 0.13), inset 0 0 0 1px rgba(47, 118, 255, 0.12);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.guide-rule-card span { display: inline-block; color: #90a0b2; font-size: 10px; font-weight: 700; letter-spacing: .7px; }
.guide-rule-card strong { display: block; margin-top: 8px; color: #33495f; font-size: 14px; }
.guide-rule-card p { margin-top: 8px; color: #6f8193; font-size: 11px; line-height: 1.7; }
.guide-rule-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.guide-rule-list li { position: relative; padding-left: 16px; color: #617588; font-size: 11px; line-height: 1.6; }
.guide-rule-list li::before { content: ""; position: absolute; top: 7px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: #7ccab7; box-shadow: 0 0 0 4px rgba(124, 202, 183, 0.12); }
.guide-rule-footer { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #d8e3ed; color: #7f90a2; font-size: 10px; line-height: 1.6; }
.guide-tip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.guide-tip-card { padding: 16px; border: 1px solid #e4ebf2; border-radius: 16px; background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%); }
.guide-tip-card strong { display: block; color: #334a60; font-size: 13px; }
.guide-tip-card p { margin-top: 8px; color: #6f8193; font-size: 11px; line-height: 1.7; }
.primary-button, .secondary-button, .ghost-button { border-radius: 7px; font-size: 12px; font-weight: 700; transition: .2s ease; }
.primary-button { padding: 10px 14px; border: 0; color: #fff; background: var(--teal); }
.primary-button:hover { background: #087c69; }
.secondary-button { padding: 9px 12px; border: 1px solid var(--line); color: #5d6d7c; background: #fff; }
.secondary-button:hover { border-color: #c9d4dd; color: var(--ink); }
.secondary-button:disabled { cursor: not-allowed; opacity: .55; }
.view { display: none; }
.view.active { display: block; }
.hero-card { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; padding: 25px 27px; border-radius: 11px; color: #fff; background: linear-gradient(115deg, #096f72, #118a7b 70%, #1d9f84); box-shadow: var(--shadow); overflow: hidden; }
.hero-card h2 { margin: 9px 0 7px; font-size: 23px; }
.hero-card p:last-child { color: #caece6; font-size: 12px; }
.hero-card strong { color: #fff; }
.hero-eyebrow { color: #a8ddd6; }
.ghost-button { padding: 10px 14px; border: 1px solid rgba(255,255,255,.28); color: #fff; background: rgba(255,255,255,.08); }
.section-heading { margin: 26px 0 12px; }
.compact-select { padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: #647383; background: #fff; font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { position: relative; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); box-shadow: var(--shadow); }
.metric-card strong { display: block; margin: 12px 0 3px; font-size: 23px; letter-spacing: -.6px; }
.metric-card small { color: var(--muted); font-size: 11px; }
.metric-note-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease, opacity .2s ease;
}
.metric-note-button:hover,
.metric-note-button:focus-visible {
  color: #2f76ff;
}
.metric-note-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.14);
  border-radius: 8px;
}
.metric-icon { position: absolute; right: 15px; top: 16px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; }
.metric-icon.blue { color: var(--blue); background: #edf4ff; }
.metric-icon.green { color: var(--teal); background: var(--teal-soft); }
.metric-icon.orange { color: var(--orange); background: #fff4e6; }
.metric-icon.purple { color: var(--purple); background: #f2edff; }
.metric-meta { display: flex; align-items: center; gap: 8px; color: #6e7e8d; font-size: 12px; }
.metric-meta b { padding: 2px 5px; border-radius: 10px; font-size: 9px; }
.up { color: #178b72; background: #e8f7f3; }
.down { color: #d36369; background: #fff0f1; }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr .85fr; gap: 14px; margin-top: 14px; }
.panel { border: 1px solid var(--line); border-radius: 9px; background: var(--panel); box-shadow: var(--shadow); }
.panel-header { padding: 16px 18px 12px; }
.text-button, .small-add { border: 0; color: var(--teal); background: transparent; font-size: 11px; font-weight: 800; }
.small-add { width: 26px; height: 26px; border-radius: 50%; color: #fff; background: var(--teal); font-size: 18px; line-height: 1; }
.funnel-bars { display: grid; gap: 13px; padding: 9px 18px 19px; }
.funnel-row { display: grid; grid-template-columns: 64px 1fr 32px 72px; align-items: center; gap: 10px; color: #6d7b89; font-size: 11px; }
.bar-track { height: 7px; overflow: hidden; border-radius: 8px; background: #eef2f5; }
.bar { height: 100%; border-radius: 8px; }
.funnel-row b { color: var(--ink); font-size: 11px; }
.funnel-row em { color: #8997a5; font-size: 10px; font-style: normal; text-align: right; }
.task-list { display: grid; gap: 0; padding: 2px 16px 11px; }
.task-item { display: grid; grid-template-columns: 18px 1fr auto; gap: 9px; align-items: start; padding: 11px 1px; border-bottom: 1px solid var(--line); }
.task-item:last-child { border-bottom: 0; }
.task-check { width: 15px; height: 15px; margin-top: 1px; border: 1px solid #c8d2da; border-radius: 4px; color: #fff; background: #fff; font-size: 10px; line-height: 13px; text-align: center; }
.task-main-button { width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.task-main-button:hover .task-name { color: var(--teal); }
.task-item.done .task-check { border-color: var(--teal); background: var(--teal); }
.task-item.done .task-name { color: #a0aab4; text-decoration: line-through; }
.task-item.done .task-detail { color: #b6c0c8; }
.task-main-stack { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.task-name { display: block; color: #405162; font-size: 12px; font-weight: 700; }
.task-customer { display: block; margin-top: 4px; color: #9aa5af; font-size: 10px; }
.task-assignee { display: block; color: #7f8f9d; font-size: 10px; font-weight: 600; }
.task-detail { display: block; margin-top: 4px; color: #728291; font-size: 10px; line-height: 1.55; white-space: pre-line; }
.task-time { color: #8e9aa6; font-size: 10px; }
.task-time-inline { display: block; margin-top: 2px; text-align: left; }
.task-time.overdue { color: var(--red); }
.recent-panel { margin-top: 14px; }
.channel-panel { margin-top: 14px; }
.panel-note { color: #a0aab3; font-size: 10px; }
.channel-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.channel-card { padding: 15px 17px; background: #fff; }
.channel-card span, .channel-card small { display: block; color: #8997a4; font-size: 10px; }
.channel-card strong { display: block; margin: 8px 0 5px; color: #405162; font-size: 20px; }
.channel-line { height: 4px; margin-top: 10px; overflow: hidden; border-radius: 5px; background: #edf1f4; }
.channel-line b { display: block; height: 100%; border-radius: 5px; background: var(--teal); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 10px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #9aa6b1; background: #fbfcfd; font-size: 9px; letter-spacing: .5px; text-align: left; text-transform: uppercase; }
td { padding: 13px 18px; border-bottom: 1px solid var(--line); color: #697887; font-size: 11px; }
tr:last-child td { border-bottom: 0; }
.checkbox-column, .customer-select-cell { width: 48px; padding-right: 10px; padding-left: 16px; text-align: center; }
.checkbox-column { vertical-align: middle; }
.table-checkbox { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); cursor: pointer; }
.customer-cell { display: flex; align-items: center; gap: 9px; }
.customer-logo { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #38708d; background: #eef6fa; font-size: 10px; font-weight: 800; }
.customer-cell strong { display: block; color: #344556; font-size: 11px; }
.customer-cell small { display: block; margin-top: 3px; color: #a0aab3; font-size: 9px; }
.country { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.country-flag { font-size: 14px; line-height: 1; }
.country-code { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 6px; border-radius: 999px; color: #42647d; background: #edf5fa; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.country-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stage { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 10px; background: #f4f6f8; color: #687887; font-size: 10px; }
.stage::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #a5b2bd; }
.stage.negotiation { color: #8a641c; background: #fff7e4; }
.stage.negotiation::before { background: var(--orange); }
.stage.quote { color: #3470ad; background: #edf5ff; }
.stage.quote::before { background: var(--blue); }
.stage.won { color: #197b69; background: #eaf8f4; }
.stage.won::before { background: var(--teal); }
.owner { min-width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 999px; color: #fff; background: #63889b; font-size: 9px; font-weight: 800; }
.view-toolbar { margin: 28px 0 13px; }
.muted-copy { color: var(--muted); font-size: 12px; }
.rule-hint { margin-top: 6px; color: #16816e; font-size: 10px; }
.selection-meta { color: #738291; font-size: 11px; white-space: nowrap; }
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid #edf2f7;
  flex-wrap: wrap;
}

.pagination-summary {
  color: #738291;
  font-size: 11px;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-button {
  min-width: 40px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  color: #51657e;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.pagination-button:hover,
.pagination-button:focus-visible {
  border-color: #b9d0f2;
  color: #2f76ff;
}

.pagination-button.active {
  border-color: #2f76ff;
  color: #2f76ff;
  background: #eef4ff;
}

.pagination-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: #94a2b1;
  font-size: 12px;
}

.more-button { border: 0; color: #9ca9b3; background: transparent; font-weight: 800; }
.customer-workspace { display: grid; grid-template-columns: minmax(240px, .5fr) minmax(0, 1.05fr) minmax(340px, .9fr); gap: 14px; }
.customer-views-panel, .customer-list-panel { min-width: 0; }
.customer-view-list { display: grid; gap: 8px; padding: 0 16px 16px; }
.customer-view-item { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; color: #5f6f7f; background: linear-gradient(180deg, #ffffff, #fbfcfd); text-align: left; transition: .2s ease; }
.customer-view-item:hover { border-color: #d3dde6; transform: translateY(-1px); }
.customer-view-item.active { border-color: #8fd7c7; background: linear-gradient(180deg, #fbfffe, #eefaf6); box-shadow: 0 10px 24px rgba(10, 148, 124, 0.09); }
.customer-view-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.customer-view-top strong { color: #405162; font-size: 12px; }
.customer-view-top span { min-width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 999px; color: var(--teal); background: var(--teal-soft); font-size: 10px; font-weight: 800; }
.customer-view-item small { display: block; margin-top: 6px; color: #8f9ca8; font-size: 10px; line-height: 1.45; }
.customer-list-panel { min-width: 0; }
.customer-list-header { padding-bottom: 0; }
.customer-table-row { cursor: pointer; }
.customer-table-row.is-selected td { background: #f0faf7; }
.customer-table-row.is-selected:hover td { background: #e6f7f2; }
.customer-table-row:focus-visible td { background: #f4f9ff; }
.customer-name-button { width: 100%; padding: 0; color: inherit; text-align: left; }
.customer-name-button strong { cursor: pointer; }
.customer-link-button { display: inline; padding: 0; border: 0; border-radius: 8px; color: inherit; background: transparent; font: inherit; line-height: inherit; text-align: left; cursor: pointer; }
.customer-link-button,
.task-customer-button,
.customer-link-strong,
.customer-link-table,
.customer-link-fallback { transition: color .2s ease, box-shadow .2s ease; }
.customer-link-button:hover,
.customer-link-button:focus-visible { outline: none; color: var(--customer-link-hover); box-shadow: 0 0 0 3px var(--customer-link-focus-ring); }
.customer-link-strong { color: #405162; font-weight: 700; }
.customer-link-table { color: #405162; font-weight: 700; }
.order-id-button {
  padding: 0;
  border: 0;
  color: #5d7691;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease;
}

.order-id-button strong {
  font-weight: 800;
}

.order-id-button:hover,
.order-id-button:focus-visible {
  color: var(--teal);
}

.order-id-button:focus-visible {
  outline: 2px solid rgba(55, 125, 255, 0.24);
  outline-offset: 4px;
  border-radius: 8px;
}
.customer-link-inline { display: inline; }
.customer-link-fallback { color: inherit; }
.task-customer-button { align-self: flex-start; padding: 0; border: 0; color: #9aa5af; background: transparent; font-size: 12px; }
.task-customer-button:hover,
.task-customer-button:focus-visible { outline: none; color: var(--customer-link-hover); box-shadow: 0 0 0 3px var(--customer-link-focus-ring); }
.customer-detail-panel { min-height: 640px; display: flex; flex-direction: column; overflow: hidden; }
.customer-detail-empty { display: grid; place-items: center; flex: 1; padding: 30px; color: #8c99a5; text-align: center; }
.customer-detail-empty strong { display: block; margin-bottom: 8px; color: #405162; font-size: 15px; }
.detail-shell { display: flex; flex-direction: column; min-height: 100%; }
.detail-hero { padding: 20px 20px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fcfefd, #f4faf7); }
.detail-breadcrumb { color: #94a0ab; font-size: 10px; letter-spacing: .2px; }
.detail-hero-top, .detail-hero-meta, .detail-kpi-grid, .detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-hero h3 { margin-top: 8px; font-size: 20px; }
.detail-hero-copy { margin-top: 10px; color: #70808d; font-size: 12px; line-height: 1.65; }
.detail-hero-meta { margin-top: 16px; flex-wrap: wrap; justify-content: flex-start; }
.detail-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; color: #61727f; background: #eef3f6; font-size: 10px; }
.detail-kpis { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.detail-kpi-grid { align-items: stretch; }
.detail-kpi-card { flex: 1; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.detail-kpi-card span { color: #84929f; font-size: 10px; }
.detail-kpi-card strong { display: block; margin-top: 8px; color: #405162; font-size: 18px; }
.detail-tabs { display: flex; gap: 8px; padding: 14px 20px 0; overflow-x: auto; }
.detail-tab { padding: 7px 11px; border: 1px solid transparent; border-radius: 999px; color: #7d8b98; background: transparent; font-size: 11px; white-space: nowrap; }
.detail-tab:hover { color: #405162; background: transparent; }
.detail-tab.active { border-color: transparent; color: var(--teal); background: transparent; font-weight: 700; }
.detail-body { padding: 16px 20px 20px; display: grid; gap: 13px; }
.detail-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.detail-card p { color: #6f7f8d; font-size: 11px; line-height: 1.65; }
.detail-card strong { color: #405162; }
.detail-section-head { justify-content: flex-start; }
.detail-section-head strong { font-size: 12px; }
.detail-section-actions,
.detail-inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-section-actions { margin-left: auto; justify-content: flex-end; }
.detail-inline-actions { margin-left: auto; }
.contact-detail-card { padding: 18px 20px; }
.contact-section-head { align-items: flex-start; gap: 18px; margin-bottom: 14px; }
.contact-list-actions,
.contact-info-actions { gap: 14px; row-gap: 12px; }
.contact-item-actions { gap: 14px; row-gap: 10px; }
.contact-list-actions .mini-button,
.contact-info-actions .mini-button,
.contact-item-actions .mini-button { min-width: 92px; justify-content: center; }
.contact-list-actions .detail-inline-note,
.contact-item-actions .detail-inline-note { padding-top: 2px; }
.detail-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.detail-grid-2.contact-info-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.contact-info-grid .detail-mini-card { padding: 10px 12px; }
.contact-info-grid .detail-mini-card strong { margin-top: 4px; }
.detail-mini-card { padding: 12px; border-radius: 9px; background: #f7fafc; }
.detail-mini-card span { display: block; color: #93a0ac; font-size: 10px; }
.detail-mini-card strong { display: block; margin-top: 6px; color: #405162; font-size: 12px; }
.detail-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.detail-list li { padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.detail-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.detail-list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-list-title { color: #405162; font-size: 12px; font-weight: 700; }
.detail-list-copy { display: block; margin-top: 5px; color: #71808d; font-size: 11px; line-height: 1.55; }
.detail-inline-note { color: #94a0ab; font-size: 10px; }
.detail-tag-group { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.detail-list-action { width: 100%; min-width: 0; padding: 10px 11px; margin: -4px 0 0; border: 1px solid transparent; border-radius: 12px; color: inherit; background: transparent; text-align: left; cursor: pointer; transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.detail-list-action:hover { border-color: #c8e7df; background: linear-gradient(180deg, #fbfffe, #f4faf8); box-shadow: 0 8px 22px rgba(30, 91, 78, .08); transform: translateY(-1px); }
.detail-list-action:focus-visible { outline: none; border-color: #78cfc0; box-shadow: 0 0 0 3px rgba(35, 180, 156, .18); }
.customer-timeline-head { align-items: flex-start; }
.customer-timeline-list { gap: 12px; }
.customer-timeline-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.customer-timeline-type { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 20px; padding: 3px 7px; border-radius: 999px; color: #2f6d62; background: #e8f7f3; font-size: 10px; font-weight: 800; line-height: 1; }
.customer-timeline-type.type-inquiry { color: #3769b0; background: #e8f0ff; }
.customer-timeline-type.type-order { color: #8a5a12; background: #fff3d9; }
.customer-timeline-type.type-task { color: #7a4d9a; background: #f3eafb; }
.customer-timeline-type.type-mail { color: #22616f; background: #e3f6fa; }
.customer-timeline-type.type-workflow,
.customer-timeline-type.type-agent { color: #196f61; background: #def6ef; }
.customer-timeline-type.type-audit { color: #6d7480; background: #eef2f6; }
.customer-timeline-warning { margin: 8px 0 12px; padding: 9px 11px; border: 1px solid #f2d2a7; border-radius: 12px; color: #8a5a12; background: #fff8ec; }
.customer-timeline-meta { margin-top: 8px; }
.detail-inquiry-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.detail-inquiry-footer .detail-tag-group { min-width: 0; margin-top: 0; }
.detail-open-hint { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 26px; padding: 5px 10px; border: 1px solid #d7e8f2; border-radius: 999px; color: #2f70ff; background: #f4f8ff; font-size: 10px; font-weight: 700; white-space: nowrap; }
.detail-subtle { color: #8fa0ab; font-size: 10px; }
.portrait-panel { margin-bottom: 13px; overflow: hidden; }
.portrait-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; padding: 0 18px 18px; }
.portrait-summary-card { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(180deg, #ffffff, #f9fbfd); }
.portrait-summary-card span { color: #7f8d99; font-size: 10px; }
.portrait-summary-card strong { display: block; margin-top: 10px; font-size: 22px; letter-spacing: -.4px; }
.portrait-summary-card small { display: block; margin-top: 4px; color: #9aa7b2; font-size: 10px; line-height: 1.5; }
.portrait-layout { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(0, 1.38fr); align-items: start; gap: 16px; padding: 0 18px 18px; }
.portrait-cards { display: grid; grid-template-columns: 1fr; align-content: start; gap: 10px; max-height: min(760px, calc(100vh - 220px)); overflow: auto; padding-right: 4px; scrollbar-gutter: stable; }
.portrait-workspace { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(280px, .82fr); align-items: start; gap: 14px; min-width: 0; }
.portrait-card { display: grid; gap: 10px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; box-shadow: 0 8px 20px rgba(37, 59, 82, 0.04); transition: .2s ease; }
.portrait-card:hover { border-color: #cae5dd; transform: translateY(-1px); }
.portrait-card.active { border-color: #82cfbf; box-shadow: 0 10px 24px rgba(10, 148, 124, 0.12); }
.portrait-card-top, .portrait-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.portrait-card h4 { margin: 0; font-size: 14px; }
.portrait-card p { margin: 0; color: #7f8c98; font-size: 11px; line-height: 1.55; }
.portrait-card-meta { margin-top: 0; padding-top: 10px; border-top: 1px dashed #e4edf3; color: #8ea0ab; font-size: 10px; }
.portrait-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.portrait-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.portrait-badge.target { color: #0e7b68; background: #eaf8f4; }
.portrait-badge.target::before { background: var(--teal); }
.portrait-badge.non-target { color: #b9565d; background: #fff0f1; }
.portrait-badge.non-target::before { background: var(--red); }
.portrait-badge.focus { color: #0e7b68; background: #eaf8f4; }
.portrait-badge.focus::before { background: var(--teal); }
.portrait-badge.progress { color: #3559a7; background: #edf3ff; }
.portrait-badge.progress::before { background: #5d84da; }
.portrait-badge.warning { color: #9b5a12; background: #fff5e6; }
.portrait-badge.warning::before { background: #e4a34c; }
.portrait-badge.neutral { color: #58677a; background: #eef2f6; }
.portrait-badge.neutral::before { background: #94a0ab; }
.portrait-badge.danger { color: #b9565d; background: #fff0f1; }
.portrait-badge.danger::before { background: var(--red); }
.customer-level-cell { white-space: nowrap; }
.customer-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}
.customer-level-badge.level-a { color: #0f7c68; background: #e8f8f3; border-color: #caece2; }
.customer-level-badge.level-b { color: #2b67cb; background: #eef4ff; border-color: #d7e4ff; }
.customer-level-badge.level-c { color: #6a5cc7; background: #f2efff; border-color: #e1dcff; }
.customer-level-badge.level-d { color: #ad7a26; background: #fff5e6; border-color: #ffe3b7; }
.customer-level-badge.level-e { color: #b65f67; background: #fff1f3; border-color: #ffd8de; }
.portrait-chip-list, .portrait-traits, .portrait-detail-tags, .portrait-detail-summary { display: flex; gap: 7px; flex-wrap: wrap; }
.portrait-traits { margin-top: 12px; }
.portrait-chip { padding: 5px 8px; border-radius: 999px; color: #617280; background: #f2f5f7; font-size: 10px; line-height: 1.4; }
.portrait-chip.emphasis { color: #8a641c; background: #fff7e4; }
.portrait-detail { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #fcfefd, #f6fbf9); }
.portrait-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.portrait-detail-head h3 { margin-top: 8px; font-size: 18px; }
.portrait-detail-copy { margin: 14px 0 16px; color: #6f7e8c; font-size: 12px; line-height: 1.7; }
.portrait-detail-block + .portrait-detail-block { margin-top: 18px; }
.portrait-detail-block strong { display: block; margin-bottom: 9px; color: #405162; font-size: 12px; }
.portrait-detail-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.portrait-detail-list li { display: grid; grid-template-columns: 22px 1fr; gap: 9px; color: #607180; font-size: 12px; line-height: 1.65; }
.portrait-detail-list li b { color: var(--teal); font-size: 12px; }
.portrait-filter-note { margin-top: 16px; padding-top: 16px; border-top: 1px dashed #d9e7e2; color: #71808d; font-size: 11px; line-height: 1.6; }
.portrait-filter-note strong { color: #405162; }
.portrait-cell { display: flex; flex-direction: column; gap: 6px; }
.portrait-caption { color: #94a0ab; font-size: 9px; }
.strategy-caption { max-width: 180px; color: #6d7b88; font-size: 10px; line-height: 1.5; white-space: normal; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.kanban-column { min-height: 510px; display: flex; flex-direction: column; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f1f4f7; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 3px 3px 10px; color: #5d6e7d; font-size: 11px; font-weight: 800; }
.kanban-count { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: #8896a4; background: #e2e7ec; font-size: 10px; }
.kanban-card-list { flex: 1 1 auto; min-width: 0; }
.kanban-pagination { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #dde7f1; }
.kanban-pagination .pagination-summary { text-align: center; font-size: 10px; }
.kanban-pagination .pagination-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kanban-pagination .pagination-button { min-width: 0; height: 32px; padding: 0 8px; border-radius: 10px; font-size: 11px; }
.deal-card { margin-bottom: 9px; padding: 12px; border: 1px solid #e3e8ec; border-radius: 7px; background: #fff; box-shadow: 0 4px 9px rgba(31, 57, 76, .04); cursor: pointer; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.deal-card:hover { border-color: #c7d6e6; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(31, 57, 76, .08); }
.deal-card:focus-visible { border-color: #7aa6ff; box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.16); outline: none; }
.deal-card-meta-line { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; }
.deal-card-assignee { display: inline-flex; align-items: center; color: #7f8f9d; font-size: 10px; font-weight: 700; line-height: 1.55; }
.deal-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.deal-card h4 { margin: 0 0 6px; color: #405162; font-size: 12px; }
.deal-card p { margin: 10px 0 0; color: #91a0ad; font-size: 10px; line-height: 1.7; }
.deal-delete-button { width: 28px; height: 28px; flex: 0 0 28px; display: inline-grid; place-items: center; padding: 0; border: 1px solid #d8e1eb; border-radius: 8px; color: #8fa0b1; background: #f7fafc; font-size: 0; line-height: 0; transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease; }
.deal-delete-button::before { content: "×"; display: block; color: currentColor; font-size: 22px; font-weight: 700; line-height: 1; transform: translateY(-1px); }
.deal-delete-button:hover { border-color: #d98793; color: #c74a5c; background: #fff2f4; transform: translateY(-1px); }
.deal-delete-button:focus-visible { border-color: #d46c7d; color: #c74a5c; box-shadow: 0 0 0 3px rgba(199, 74, 92, 0.14); outline: none; }
.deal-value { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--teal); font-size: 11px; font-weight: 800; }
.stage-actions { display: inline-flex; align-items: center; gap: 8px; }
.advance-button { min-width: 28px; height: 28px; display: inline-grid; place-items: center; padding: 0 8px; border: 0; border-radius: 8px; color: #617689; background: #eef3f8; font-weight: 800; transition: background .2s ease, color .2s ease, transform .2s ease; }
.advance-button:hover:not(:disabled) { color: #2f76ff; background: #e6f0ff; transform: translateY(-1px); }
.advance-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.inquiry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.approval-rules { display: grid; grid-template-columns: .8fr .8fr 1.8fr; gap: 10px; margin-bottom: 13px; }
.approval-rules div { padding: 12px 14px; border: 1px solid #d8ebe6; border-radius: 8px; background: #f4fbf9; }
.approval-rules span, .approval-rules strong { display: block; }
.approval-rules span { color: #7e908f; font-size: 10px; }
.approval-rules strong { margin-top: 6px; color: #197b69; font-size: 12px; }
.inquiry-approval-panel { margin: 0 0 14px; padding: 10px; border: 1px solid rgba(47, 118, 255, 0.18); border-radius: 18px; background: linear-gradient(135deg, rgba(47, 118, 255, 0.08), rgba(25, 123, 105, 0.06)); }
.inquiry-approval-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 72px; padding: 12px 14px; border: 0; border-radius: 14px; color: inherit; background: rgba(255, 255, 255, 0.56); text-align: left; cursor: pointer; }
.inquiry-approval-toggle:hover { background: rgba(255, 255, 255, 0.78); }
.inquiry-approval-toggle:focus-visible { box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.18); outline: none; }
.inquiry-approval-toggle h3 { margin: 4px 0 4px; }
.inquiry-approval-toggle p { max-width: 760px; margin: 0; color: #728393; font-size: 11px; line-height: 1.55; }
.inquiry-approval-toggle-meta { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.inquiry-approval-count-stack { justify-content: flex-end; }
.inquiry-approval-chevron { color: #2f76ff; font-size: 11px; font-weight: 900; }
.inquiry-approval-content { padding: 12px 4px 2px; }
.inquiry-approval-list { display: grid; gap: 10px; }
.inquiry-approval-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid rgba(210, 224, 242, 0.9); border-radius: 16px; background: rgba(255, 255, 255, 0.86); box-shadow: 0 14px 30px rgba(38, 65, 98, 0.08); }
.inquiry-approval-main h4 { margin: 6px 0 6px; font-size: 15px; }
.inquiry-approval-main p { margin: 0; color: #718293; font-size: 11px; line-height: 1.5; }
.inquiry-approval-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inquiry-approval-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.inquiry-approval-empty { padding: 14px; border: 1px dashed rgba(126, 144, 159, 0.32); border-radius: 14px; background: rgba(255, 255, 255, 0.62); }
.inquiry-approval-empty strong { display: block; margin-bottom: 4px; }
.inquiry-approval-empty p { margin: 0; color: #7b8a99; font-size: 11px; }
.inquiry-approval-pagination { margin-top: 10px; padding-top: 10px; }
.inquiry-card { padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); cursor: pointer; }
.inquiry-card:focus-visible { border-color: #7aa6ff; box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.16); outline: none; }
.inquiry-card-top { display: flex; align-items: center; justify-content: space-between; }
.inquiry-id { color: #9ba8b3; font-size: 10px; font-weight: 800; letter-spacing: .5px; }
.inquiry-card h3 { margin: 14px 0 6px; }
.inquiry-card p { min-height: 34px; color: #83909c; font-size: 11px; line-height: 1.55; }
.inquiry-assignee { margin-top: 10px; color: #7f8f9d; font-size: 10px; font-weight: 700; }
.inquiry-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: #93a0ac; font-size: 10px; }
.approval-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); color: #8a98a4; font-size: 10px; }
.approval-reason { min-height: 14px; margin-top: 8px; color: #8b98a4; font-size: 10px; line-height: 1.4; }
.approval-reason b { color: #637483; }
.approval-status, .release-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 10px; font-size: 10px; white-space: nowrap; }
.approval-status::before, .release-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #a6b1ba; }
.approved, .released { color: #167b69; background: #eaf8f4; }
.approved::before, .released::before { background: var(--teal); }
.pending { color: #93661b; background: #fff7e4; }
.pending::before { background: var(--orange); }
.rejected, .blocked { color: #b9565d; background: #fff0f1; }
.rejected::before, .blocked::before { background: var(--red); }
.task-page-panel { padding-top: 4px; }
.integration-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.integration-card { display: flex; align-items: flex-start; gap: 13px; min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.integration-action-card {
  width: 100%;
  cursor: pointer;
  color: inherit;
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.integration-action-card:hover,
.integration-action-card:focus-visible {
  border-color: #bfd5eb;
  box-shadow: 0 18px 38px rgba(36, 54, 77, .11);
  outline: none;
  transform: translateY(-1px);
}
.integration-card.wide { grid-column: 1 / -1; }
.integration-icon { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .4px; }
.integration-icon.excel { background: #25805c; }
.integration-icon.ali { background: #ef8a3e; }
.integration-icon.mail { background: #4e7dd3; font-size: 18px; }
.integration-icon.wa { background: #1f9b76; }
.integration-main { flex: 1; min-width: 0; }
.integration-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.integration-title h3 { min-width: 0; margin-top: 0; line-height: 1.35; overflow-wrap: anywhere; }
.integration-card p { margin-top: 10px; color: #84929f; font-size: 11px; line-height: 1.6; }
.integration-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.integration-card-meta span {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  color: #63778d;
  background: #f2f6fa;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}
.integration-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.integration-card-actions .compact-action-button {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 11px;
}
.integration-status { display: inline-flex; padding: 4px 7px; border-radius: 10px; white-space: nowrap; font-size: 10px; font-weight: 700; }
.integration-status.planning { color: #8f691f; background: #fff7e4; }
.integration-status.required { color: #3d70ac; background: #edf5ff; }
.integration-status.active { color: #197b69; background: #eaf8f4; }
.integration-status.blocked { color: #b9565d; background: #fff0f1; }
.integration-workbench-panel { margin-top: 13px; overflow: hidden; }
.mail-integration-modal {
  width: min(1180px, calc(100vw - 36px));
  max-height: min(90vh, 920px);
  overflow: auto;
}
.mail-integration-modal .integration-workbench-panel {
  margin-top: 0;
  border: 0;
  box-shadow: none;
}
.mail-integration-modal .panel-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}
.mail-help-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 18px 16px;
  padding: 13px 14px;
  border: 1px solid #d7e5f3;
  border-radius: 12px;
  background: linear-gradient(135deg, #f6fbff 0%, #eef6ff 100%);
}
.mail-help-copy {
  min-width: 0;
}
.mail-help-copy span {
  display: block;
  color: #5f7894;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
}
.mail-help-copy strong {
  display: block;
  margin-top: 5px;
  color: #39526c;
  font-size: 12px;
  line-height: 1.55;
}
.mail-help-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.mail-help-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #c7dcef;
  border-radius: 999px;
  color: #376fa7;
  background: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.mail-help-links a:hover,
.mail-help-links a:focus-visible {
  border-color: #8fb9df;
  color: #245d96;
  background: #fff;
  outline: none;
}
.integration-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; padding: 0 18px 18px; }
.integration-workbench-layout { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(300px, .66fr); gap: 13px; padding: 0 18px 18px; }
.integration-setup-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 13px; padding: 0 18px 18px; }
.integration-config-panel, .integration-side-panel { border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); }
.integration-side-stack { display: grid; gap: 13px; align-content: start; }
.integration-config-form { padding: 0 16px 16px; }
.integration-config-grid { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); align-items: start; gap: 14px 12px; }
.integration-config-field-wide { grid-column: 1 / -1; }
.integration-config-grid > label {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 7px;
}
.integration-config-grid label span, .integration-check-item span, .integration-log-item span { display: block; color: #7f8f9e; font-size: 10px; }
.integration-config-grid input, .integration-config-grid select, .integration-config-grid textarea { width: 100%; margin-top: 0; }
.integration-config-grid input, .integration-config-grid select { min-height: 42px; }
.integration-config-grid textarea { min-height: 104px; resize: vertical; }
.integration-checkbox-grid { margin-top: 7px; }
.integration-checkbox-grid label { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.integration-config-alert { min-height: 20px; margin: 14px 0 0; color: #6f7e8c; font-size: 11px; line-height: 1.6; }
.integration-config-actions { margin-top: 14px; padding: 0; border-top: 0; justify-content: flex-end; }
.integration-setup-list { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 10px; padding: 0 16px 16px; }
.integration-setup-item { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.integration-setup-item span { display: block; color: #7f8f9e; font-size: 10px; }
.integration-setup-item strong { display: block; margin-top: 7px; color: #405162; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.integration-checklist, .integration-log-list { display: grid; gap: 10px; padding: 0 16px 16px; }
.integration-check-item, .integration-log-item { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.integration-check-item strong { display: block; margin-top: 7px; color: #405162; font-size: 12px; line-height: 1.55; }
.integration-check-item p { margin-top: 8px; color: #72818f; font-size: 11px; line-height: 1.65; }
.integration-log-item { position: relative; display: grid; gap: 9px; min-height: 108px; padding: 14px 14px 13px 17px; overflow: hidden; }
.integration-log-item::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #a9b9c9; }
.integration-log-item.active::before { background: #21a083; }
.integration-log-item.warning::before,
.integration-log-item.required::before,
.integration-log-item.planning::before { background: #d99725; }
.integration-log-item.blocked::before { background: #d9646c; }
.integration-log-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0; }
.integration-log-title { min-width: 0; color: #405162; font-size: 12px; line-height: 1.45; font-weight: 800; }
.integration-log-time { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 0 9px; border-radius: 999px; color: #6f7f91; background: #eef3f7; font-size: 10px; font-weight: 800; white-space: nowrap; }
.integration-log-detail { margin: 0; color: #72818f; font-size: 11px; line-height: 1.65; }
.integration-log-item .detail-tag-group { margin-top: 0; }
.integration-log-pagination { padding: 0 16px 16px; border-top: 0; }
.integration-log-pagination[hidden] { display: none; }
.integration-log-pagination .pagination-summary { font-size: 10px; }
.integration-log-pagination .pagination-actions { gap: 6px; }
.integration-log-pagination .pagination-button { min-width: 68px; height: 32px; border-radius: 10px; }
.integration-log-modal .integration-workbench-panel {
  min-height: 420px;
}
.integration-log-overview {
  margin: 0 18px 14px;
  padding: 13px 14px;
  border: 1px solid #dbe8f3;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fbff 0%, #eef7f7 100%);
}
.integration-log-overview p {
  margin: 0;
  color: #617589;
  font-size: 12px;
  line-height: 1.65;
}
.global-integration-log-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.integration-inline-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #49627b; }
.migration-steps { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.migration-steps span { padding: 5px 8px; border-radius: 5px; color: #5f806f; background: #eef8f4; font-size: 10px; }
.import-center-panel { margin-top: 13px; overflow: hidden; }
.import-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; padding: 0 18px 18px; }
.import-summary-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #ffffff, #f8fbfd); }
.import-summary-card span { color: #80909d; font-size: 10px; }
.import-summary-card strong { display: block; margin-top: 10px; color: #405162; font-size: 24px; letter-spacing: -.4px; }
.import-summary-card small { display: block; margin-top: 5px; color: #95a1ac; font-size: 10px; line-height: 1.5; }
.import-stepper-shell { margin: 0 18px 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #ffffff, #fbfcfd); }
.import-stepper-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.import-stepper-meta h4 { margin: 4px 0 0; font-size: 15px; }
.import-stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.import-step { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.import-step.done { border-color: #bee7dd; background: #f4fbf9; }
.import-step.active { border-color: #b7d8f3; background: #f2f8ff; }
.import-step-index { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; color: #6f7d89; background: #eef2f5; font-size: 11px; font-weight: 800; }
.import-step.done .import-step-index { color: var(--teal); background: var(--teal-soft); }
.import-step.active .import-step-index { color: var(--blue); background: #eaf3ff; }
.import-step-copy strong, .import-step-copy small { display: block; }
.import-step-copy strong { color: #405162; font-size: 11px; }
.import-step-copy small { margin-top: 4px; color: #93a0ac; font-size: 10px; }
.import-control-grid, .import-review-grid, .import-center-grid { display: grid; gap: 13px; padding: 0 18px 18px; }
.import-control-grid { grid-template-columns: 1.15fr .85fr; }
.import-center-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); }
.import-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.import-control-card, .import-table-panel, .import-side-panel, .review-panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.import-control-card { padding: 16px; }
.import-control-card span, .import-audit-item span { color: #8795a2; font-size: 10px; }
.import-control-card strong { display: block; margin-top: 8px; color: #405162; font-size: 14px; line-height: 1.5; }
.import-control-card p { margin-top: 10px; color: #72818f; font-size: 11px; line-height: 1.65; }
.subpanel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; }
.subpanel-head h4 { margin: 4px 0 0; font-size: 15px; }
.import-audit-list, .review-card-list { display: grid; gap: 11px; padding: 0 16px 16px; }
.import-audit-item { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.import-audit-item strong { display: block; margin-top: 7px; color: #405162; font-size: 12px; }
.import-audit-item p { margin-top: 7px; color: #72818f; font-size: 11px; line-height: 1.6; }
.review-card { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #ffffff, #fbfcfd); }
.review-card-top, .review-card-meta, .review-action-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-card-top { align-items: flex-start; }
.review-card-title strong { display: block; color: #405162; font-size: 13px; }
.review-card-title span { display: block; margin-top: 5px; color: #97a3ad; font-size: 10px; }
.review-card-copy { margin-top: 10px; color: #6f7e8c; font-size: 11px; line-height: 1.6; }
.review-card-meta { margin-top: 12px; flex-wrap: wrap; justify-content: flex-start; }
.review-action-row { margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--line); }
.review-action-group { display: flex; flex-wrap: wrap; gap: 8px; }
.governance-empty-state {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px dashed rgba(126, 144, 159, 0.34);
  border-radius: 12px;
  color: #6f7e8c;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(244, 248, 252, 0.86));
}
.governance-empty-state strong {
  color: #405162;
  font-size: 13px;
}
.governance-empty-state p {
  max-width: 760px;
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
}
.mini-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: #667684; background: #fff; font-size: 11px; font-weight: 700; }
.mini-button:hover { border-color: #c9d4dd; color: var(--ink); }
.mini-button:disabled { cursor: not-allowed; color: #96a6b7; background: #f3f7fb; opacity: .72; transform: none; }
.review-score { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; color: #8a641c; background: #fff7e4; font-size: 10px; font-weight: 700; }
.review-score::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.import-batch-action { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-size: 10px; font-weight: 700; }
.import-batch-action button { padding: 0; border: 0; color: inherit; background: transparent; }
.import-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 10px; font-size: 10px; white-space: nowrap; }
.import-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #a6b1ba; }
.import-status.uploaded { color: #6b7885; background: #f1f4f6; }
.import-status.precheck { color: #3d70ac; background: #edf5ff; }
.import-status.review { color: #8f691f; background: #fff7e4; }
.import-status.imported { color: #197b69; background: #eaf8f4; }
.import-status.rolledback { color: #b9565d; background: #fff0f1; }
.import-status.uploaded::before { background: #95a4b1; }
.import-status.precheck::before { background: var(--blue); }
.import-status.review::before { background: var(--orange); }
.import-status.imported::before { background: var(--teal); }
.import-status.rolledback::before { background: var(--red); }
.merge-policy-panel { margin-top: 13px; }
.merge-policy-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.merge-policy-grid div { padding: 14px 17px; border-right: 1px solid var(--line); }
.merge-policy-grid div:last-child { border-right: 0; }
.merge-policy-grid strong, .merge-policy-grid span { display: block; }
.merge-policy-grid strong { color: #405162; font-size: 11px; }
.merge-policy-grid span { margin-top: 5px; color: #16816e; font-size: 10px; }
.customer-governance-panel {
  margin-top: 14px;
  overflow: hidden;
}
.customer-governance-panel > .rule-hint-inline {
  margin: 0 18px 16px;
}
.customer-governance-review-grid {
  padding-top: 0;
}
.customer-governance-review-grid .review-panel {
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.governance-collapsible-head {
  min-height: 74px;
}
.governance-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}
.governance-count-stack {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}
.governance-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #607184;
  background: #f2f6fb;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.governance-count-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}
.governance-count-pill.is-total {
  color: #3e5369;
  background: #eef4ff;
}
.governance-count-pill.is-total::before {
  background: var(--blue);
}
.governance-count-pill.is-pending {
  color: #8f691f;
  background: #fff7e4;
}
.governance-count-pill.is-pending::before {
  background: var(--orange);
}
.governance-count-pill.is-reviewed {
  color: #16816e;
  background: #eaf8f4;
}
.governance-count-pill.is-reviewed::before {
  background: var(--teal);
}
.governance-toggle-button {
  min-width: 58px;
}
.governance-collapsible-content[hidden] {
  display: none;
}
.governance-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 12px;
}
.customer-governance-policy-head {
  padding: 0 18px 12px;
}
.customer-governance-policy-grid {
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.duplicate-review-modal {
  width: min(860px, calc(100vw - 32px));
}
.duplicate-review-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px 4px;
}
.duplicate-review-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.duplicate-review-summary h3 {
  margin: 4px 0 6px;
  font-size: 18px;
}
.duplicate-review-summary p {
  margin: 0;
  color: #718293;
  font-size: 12px;
  line-height: 1.6;
}
.duplicate-review-score {
  justify-self: end;
}
.duplicate-review-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.duplicate-review-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) 112px;
  border-bottom: 1px solid var(--line);
}
.duplicate-review-row:last-child {
  border-bottom: 0;
}
.duplicate-review-cell {
  min-width: 0;
  padding: 12px 13px;
  border-right: 1px solid var(--line);
  color: #586a7b;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.duplicate-review-cell:last-child {
  border-right: 0;
}
.duplicate-review-row.is-head .duplicate-review-cell {
  color: #405162;
  background: #f5f8fb;
  font-size: 11px;
  font-weight: 800;
}
.duplicate-review-row.is-match .duplicate-review-cell:last-child {
  color: #16816e;
}
.duplicate-review-row.is-warning .duplicate-review-cell:last-child {
  color: #8f691f;
}
.duplicate-review-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border: 1px dashed rgba(126, 144, 159, 0.3);
  border-radius: 14px;
  background: #fbfcfd;
}
.operations-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 13px; }
.operation-card { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.operation-card span { color: #84929f; font-size: 11px; }
.operation-card strong { display: block; margin-top: 9px; font-size: 22px; letter-spacing: -.4px; }
.operation-card small { display: block; margin-top: 4px; color: #9ba7b2; font-size: 10px; }
.order-tabs { display: flex; gap: 6px; }
.progress-cell { min-width: 118px; }
.progress-meta { display: flex; justify-content: space-between; gap: 8px; color: #7b8996; font-size: 10px; }
.progress-track { height: 4px; margin-top: 6px; border-radius: 6px; background: #edf1f4; overflow: hidden; }
.progress-track b { display: block; height: 100%; border-radius: 6px; background: var(--teal); }
.logistics { display: inline-flex; align-items: center; gap: 5px; color: #617280; font-size: 10px; }
.logistics::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #a8b4be; }
.logistics.transit::before { background: var(--blue); }
.logistics.production::before { background: var(--orange); }
.logistics.delivered::before { background: var(--teal); }
.task-filter-row { display: flex; gap: 7px; padding: 14px 16px 5px; }
.filter-pill { padding: 6px 11px; border: 1px solid var(--line); border-radius: 20px; color: #81909d; background: #fff; font-size: 11px; }
.filter-pill.active { border-color: #b9e8df; color: var(--teal); background: var(--teal-soft); }
.task-list.large .task-item { grid-template-columns: 18px 1fr 142px; padding: 14px 3px; }
.task-list.large .task-time { text-align: right; }
dialog { width: min(610px, calc(100vw - 30px)); border: 0; border-radius: 11px; padding: 0; box-shadow: 0 24px 70px rgba(14, 35, 52, .2); }
dialog::backdrop { background: rgba(13, 32, 45, .45); }
.modal-header, .modal-actions { display: flex; align-items: center; justify-content: space-between; }
.modal-header { padding: 20px 22px 15px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin-top: 5px; }
.close-button { border: 0; color: #9aa7b1; background: transparent; font-size: 25px; }
.close-button:hover { color: #667787; }
.modal-subtitle { margin-top: 6px; color: #90a0ad; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 18px 22px 13px; }
.stacked-field { display: grid; align-content: start; gap: 8px; }
.stacked-field span { margin-bottom: 0; }
.customer-combobox { position: relative; }
.customer-combobox input[type="search"] { padding-right: 42px; }
.customer-combobox-toggle { position: absolute; top: 1px; right: 1px; width: 38px; height: calc(100% - 2px); border: 0; border-radius: 0 6px 6px 0; color: #8da0b3; background: transparent; font-size: 17px; }
.customer-combobox-toggle:hover { color: #4f6780; }
.customer-combobox-menu { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30; max-height: 220px; overflow-y: auto; padding: 8px; border: 1px solid #dce3e9; border-radius: 12px; background: #fff; box-shadow: 0 18px 34px rgba(23, 41, 66, 0.16); }
.customer-combobox-option { width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; color: #405162; background: transparent; font-size: 12px; text-align: left; transition: background .2s ease, color .2s ease; }
.customer-combobox-option:hover,
.customer-combobox-option.is-active { color: #203246; background: #eef4fb; }
.customer-combobox-empty { padding: 10px 12px; color: #8da0b3; font-size: 12px; text-align: left; }
.enhanced-select {
  position: relative;
  width: 100%;
}

.enhanced-select-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.enhanced-select--compact {
  width: auto;
  min-width: 132px;
  flex: 0 0 auto;
}

.enhanced-select--mini {
  min-width: 112px;
}

.enhanced-select-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #dce3e9;
  border-radius: 14px;
  outline: none;
  color: #405162;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-size: 12px;
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}

.enhanced-select-trigger:hover {
  border-color: #cfdbe7;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  transform: translateY(-1px);
}

.enhanced-select.is-open .enhanced-select-trigger,
.enhanced-select-trigger:focus-visible {
  border-color: #8db6f6;
  box-shadow: 0 0 0 4px rgba(47, 118, 255, 0.12);
  background: #fff;
}

.enhanced-select-trigger:disabled {
  cursor: not-allowed;
  opacity: .62;
  transform: none;
}

.enhanced-select-value {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enhanced-select-arrow {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  color: #7f93aa;
  font-size: 12px;
  line-height: 1;
  transition: transform .2s ease, color .2s ease;
}

.enhanced-select.is-open .enhanced-select-arrow {
  color: #2f76ff;
  transform: rotate(180deg);
}

.enhanced-select--compact .enhanced-select-trigger {
  min-height: 40px;
  padding: 10px 13px;
  font-size: 12px;
}

.enhanced-select--mini .enhanced-select-trigger {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 11px;
}

.enhanced-select-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 45;
  padding: 8px;
  border: 1px solid #dce5f0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 40px rgba(22, 38, 58, 0.14);
  backdrop-filter: blur(18px);
}

.enhanced-select.open-up .enhanced-select-menu {
  top: auto;
  bottom: calc(100% + 10px);
}

.enhanced-select-search {
  margin-bottom: 8px;
}

.enhanced-select-search-input {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  outline: none;
  color: #405162;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  font-size: 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.enhanced-select-search-input:focus {
  border-color: #8db6f6;
  box-shadow: 0 0 0 4px rgba(47, 118, 255, 0.12);
  background: #fff;
}

.enhanced-select-options {
  display: grid;
  gap: 2px;
  max-height: 208px;
  overflow-y: auto;
}

.enhanced-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  color: #42566c;
  background: transparent;
  font-size: 12px;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.enhanced-select-option:hover,
.enhanced-select-option:focus-visible {
  color: #203246;
  background: #eef4ff;
  transform: translateX(2px);
  outline: none;
}

.enhanced-select-option.is-selected {
  color: #1f4f9c;
  background: linear-gradient(180deg, #eef5ff 0%, #f6faff 100%);
}

.enhanced-select-option:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
}

.enhanced-select-option-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enhanced-select-option-count {
  flex: 0 0 auto;
  color: #7a8a9b;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.enhanced-select-option-check {
  color: #2f76ff;
  font-size: 12px;
  opacity: 0;
}

.enhanced-select-option.is-selected .enhanced-select-option-check {
  opacity: 1;
}

.enhanced-select-empty {
  padding: 10px 12px 6px;
  color: #8da0b3;
  font-size: 12px;
  text-align: left;
}

.enhanced-select-options::-webkit-scrollbar {
  width: 8px;
}

.enhanced-select-options::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(112, 134, 160, 0.34);
  background-clip: padding-box;
}

.temporal-field {
  display: grid;
  align-content: start;
  gap: 8px;
}

.temporal-field > span {
  margin-bottom: 0;
}

.temporal-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #dce3e9;
  border-radius: 14px;
  outline: none;
  color: #405162;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-size: 12px;
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}

.temporal-trigger:hover {
  border-color: #cfdbe7;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  transform: translateY(-1px);
}

.temporal-trigger.is-open,
.temporal-trigger:focus-visible {
  border-color: #8db6f6;
  box-shadow: 0 0 0 4px rgba(47, 118, 255, 0.12);
  background: #fff;
}

.temporal-trigger-value {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #405162;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.temporal-trigger.is-placeholder .temporal-trigger-value {
  color: #90a0af;
  font-weight: 500;
}

.temporal-trigger-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  color: #7f93aa;
  font-size: 12px;
  line-height: 1;
  transition: transform .2s ease, color .2s ease;
}

.temporal-trigger.is-open .temporal-trigger-icon {
  color: #2f76ff;
  transform: rotate(180deg);
}

.temporal-picker-popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 160;
  width: min(364px, calc(100vw - 24px));
}

.temporal-picker-popover.is-inside-dialog {
  position: absolute;
  z-index: 24;
  width: min(680px, calc(100% - 24px));
}

.temporal-picker-shell {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce5f0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 44px rgba(22, 38, 58, 0.18);
  backdrop-filter: blur(18px);
}

.temporal-picker-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 4px;
}

.temporal-picker-caption {
  color: #8ea0b2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.temporal-picker-current {
  margin-top: 4px;
  color: #24364d;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.temporal-picker-hint {
  color: #90a0af;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.temporal-picker-layout {
  display: grid;
  gap: 12px;
}

.temporal-picker-layout-datetime {
  grid-template-columns: minmax(0, 1fr) 238px;
  align-items: start;
}

.temporal-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.temporal-time-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.temporal-time-card {
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.temporal-time-card .enhanced-select,
.temporal-time-card select {
  min-width: 0;
  width: 100%;
}

.temporal-time-card label {
  display: grid;
  gap: 8px;
}

.temporal-time-card label span {
  margin-bottom: 0;
}

.temporal-picker-popover .dashboard-calendar-weekdays span {
  font-size: 10px;
}

.temporal-picker-popover .dashboard-calendar-day {
  min-height: 40px;
  border-radius: 10px;
  font-size: 13px;
}

.temporal-picker-popover .dashboard-calendar-header strong {
  font-size: 16px;
}

.temporal-picker-popover .dashboard-calendar-actions {
  gap: 6px;
}

.temporal-picker-popover .dashboard-calendar-shift {
  width: 32px;
  height: 32px;
  font-size: 19px;
}

.temporal-picker-popover .dashboard-calendar-panel {
  gap: 8px;
  padding: 12px;
}

.temporal-picker-popover .dashboard-calendar-grid {
  gap: 5px;
}

.temporal-time-card .enhanced-select-trigger,
.temporal-time-card select {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 12px;
}

.temporal-time-card .enhanced-select-option {
  padding: 9px 12px;
  font-size: 12px;
}

.temporal-time-card .enhanced-select-menu {
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  min-width: 100%;
}

.temporal-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.temporal-picker-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.temporal-picker-actions-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  justify-content: stretch;
}

.temporal-picker-action {
  min-height: 36px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid #d6e3f3;
  border-radius: 12px;
  color: #406281;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 700;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.temporal-picker-actions-panel .temporal-picker-action {
  padding-left: 8px;
  padding-right: 8px;
}

.temporal-picker-action:hover,
.temporal-picker-action:focus-visible {
  border-color: #bfd3f3;
  color: #2f76ff;
  background: #eef5ff;
  transform: translateY(-1px);
  outline: none;
}

.temporal-picker-action.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #4d7df0 0%, #6795ff 100%);
  box-shadow: 0 10px 18px rgba(47, 118, 255, 0.2);
}

.temporal-picker-action.primary:hover,
.temporal-picker-action.primary:focus-visible {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #4675e2 0%, #5d8fff 100%);
}

label span { display: block; margin-bottom: 6px; color: #647483; font-size: 11px; font-weight: 700; }
label input, label select, textarea { width: 100%; padding: 9px 10px; border: 1px solid #dce3e9; border-radius: 6px; outline: none; color: #405162; background: #fff; font-size: 12px; }
label input:focus, label select:focus, textarea:focus { border-color: #7ccdbd; box-shadow: 0 0 0 3px rgba(11,148,124,.08); }
.full-field textarea { min-height: 96px; }
.full-field { display: block; padding: 0 22px 16px; }
.ai-provider-instruction-field textarea { min-height: 96px; resize: vertical; }
.form-helper-field { padding-top: 2px; padding-bottom: 14px; }
.customer-portrait-helper { display: grid; gap: 10px; }
.customer-portrait-helper-copy strong { display: block; color: #405162; font-size: 12px; }
.customer-portrait-helper-copy p { margin-top: 6px; color: #738290; font-size: 11px; line-height: 1.7; }
.form-alert { min-height: 15px; margin: -5px 22px 12px; color: var(--red); font-size: 11px; }
.portrait-insight-actions { margin-left: auto; }
.portrait-reason-list { margin-top: 14px; }
textarea { resize: vertical; }
.modal-actions { justify-content: flex-end; gap: 8px; padding: 13px 22px; border-top: 1px solid var(--line); background: #fbfcfd; }
.confirm-modal { width: min(360px, calc(100vw - 32px)); border-radius: 22px; text-align: center; overflow: hidden; }
.confirm-modal-body { padding: 22px 22px 20px; }
.confirm-modal-logo { width: 56px; height: 56px; display: block; margin: 0 auto 14px; object-fit: contain; border-radius: 16px; background: #fff; box-shadow: 0 10px 24px rgba(23, 41, 66, 0.1); }
.confirm-modal-copy h2 { margin: 0; color: #203246; font-size: 18px; line-height: 1.45; }
.confirm-modal-copy p { margin: 10px 0 0; color: #596b7c; font-size: 13px; line-height: 1.65; white-space: pre-line; }
.confirm-modal-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.confirm-modal-actions .secondary-button,
.confirm-modal-actions .primary-button { min-height: 46px; border-radius: 14px; font-size: 15px; }
#task-modal {
  width: min(860px, calc(100vw - 40px));
}

#task-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#task-form .full-field {
  flex: 0 0 auto;
}

#task-form .full-field textarea {
  min-height: 96px;
  height: 96px;
}

#task-form .modal-actions {
  margin-top: auto;
}

#order-modal {
  width: min(760px, calc(100vw - 40px));
}

#product-modal {
  width: min(820px, calc(100vw - 40px));
}

#product-form textarea {
  min-height: 78px;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 68px 1fr; }
  .sidebar { padding-inline: 8px; }
  .brand div:last-child, .nav-item span:last-child, .sidebar-tip { display: none; }
  .brand, .nav-item, .user-card { justify-content: center; }
  .theme-switcher { margin: 0 0 12px; padding: 0; border: 0; background: transparent; }
  .theme-switcher-head { display: none; }
  .theme-switcher-buttons { grid-template-columns: 1fr; }
  .theme-mode-button { min-height: 20px; padding: 0; font-size: 10px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .customer-workspace { grid-template-columns: 1fr; }
  .portrait-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .portrait-layout { grid-template-columns: 1fr; }
  .import-summary-grid, .import-review-grid, .import-control-grid, .import-center-grid { grid-template-columns: 1fr; }
  .import-stepper { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: repeat(2, 1fr); }
  .operations-grid { grid-template-columns: repeat(2, 1fr); }
  .merge-policy-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .main-content { padding: 18px 16px 30px; }
  .topbar { align-items: flex-start; }
  .search, .icon-button, .notification-wrap { display: none; }
  .hero-card { align-items: flex-start; flex-direction: column; gap: 16px; }
  .detail-grid-2, .detail-kpi-grid { grid-template-columns: 1fr; display: grid; }
  .detail-grid-2.contact-info-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .portrait-summary-grid, .portrait-cards { grid-template-columns: 1fr; }
  .inquiry-grid { grid-template-columns: 1fr; }
  .approval-rules { grid-template-columns: 1fr; }
  .operations-grid, .channel-grid { grid-template-columns: 1fr; }
  .import-summary-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
  .merge-policy-grid { grid-template-columns: 1fr; }
}

/* OKKI-inspired workspace refresh */
:root {
  --ink: #24364d;
  --muted: #7f90a7;
  --line: #e6edf5;
  --canvas: #f3f6fb;
  --panel: #ffffff;
  --nav: #11263f;
  --nav-soft: #193654;
  --teal: #2f76ff;
  --teal-soft: #edf4ff;
  --blue: #2f76ff;
  --orange: #ffb24a;
  --purple: #7b72f4;
  --red: #ec667a;
  --shadow: 0 18px 40px rgba(33, 53, 79, 0.08);
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  background:
    radial-gradient(circle at top left, rgba(47, 118, 255, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(17, 38, 63, 0.06), transparent 28%),
    var(--canvas);
}

.app-shell {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.sidebar {
  height: calc(100vh - 28px);
  padding: 16px 10px 14px;
  border-radius: 26px;
  background: linear-gradient(180deg, #11263f 0%, #163555 58%, #11263f 100%);
  box-shadow: 0 24px 44px rgba(11, 27, 46, 0.22);
}

.brand {
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 18px;
  text-align: center;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 14px;
  padding: 5px;
}

.brand strong {
  font-size: 12px;
  line-height: 1.2;
}

.brand span {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: 0.3px;
}

.nav-list {
  gap: 8px;
}

.nav-item {
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 60px;
  padding: 8px 6px;
  border-radius: 18px;
}

.nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(105, 164, 255, 0.16);
}

.nav-icon {
  width: 20px;
  height: 20px;
}

.nav-item span:last-child {
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
}

.sidebar-bottom {
  display: grid;
  gap: 8px;
}

.sidebar-tip {
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid rgba(180, 206, 234, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.tip-dot {
  margin-top: 0;
}

.sidebar-tip strong,
.sidebar-tip span {
  font-size: 9px;
  line-height: 1.45;
}

.user-card {
  flex-direction: column;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: background .2s ease, transform .2s ease;
}

.user-card:hover,
.user-card:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.avatar {
  width: 34px;
  height: 34px;
}

.user-card strong {
  font-size: 11px;
  text-align: center;
}

.user-card small {
  font-size: 9px;
  text-align: center;
}

.dots {
  margin-left: 0;
}

.main-content {
  padding: 0 14px 20px 0;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 5;
  padding: 18px 22px;
  border: 1px solid rgba(223, 231, 241, 0.96);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(28, 49, 72, 0.08);
  backdrop-filter: blur(14px);
}

.runtime-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.runtime-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(83, 125, 199, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #375a86;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.runtime-chip.subtle {
  color: #607998;
  font-weight: 600;
}

.runtime-chip.warning {
  border-color: rgba(214, 137, 64, 0.28);
  background: rgba(255, 244, 231, 0.92);
  color: #9b5a14;
}

.runtime-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(224, 154, 70, 0.24);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 248, 239, 0.98), rgba(255, 255, 255, 0.94));
  box-shadow: 0 18px 36px rgba(216, 171, 102, 0.12);
}

.runtime-notice-copy {
  min-width: 0;
}

.runtime-notice-copy strong {
  display: block;
  color: #23446e;
  font-size: 14px;
}

.runtime-notice-copy p {
  margin: 6px 0 0;
  color: #6e84a1;
  font-size: 13px;
  line-height: 1.65;
}

.runtime-notice-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

h1 {
  margin-top: 6px;
  font-size: 26px;
  letter-spacing: -0.7px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 15px;
}

.eyebrow {
  color: #8a9bb2;
  font-size: 10px;
  letter-spacing: 0.9px;
}

.topbar-actions,
.toolbar-actions {
  gap: 12px;
}

.search {
  width: 360px;
  padding: 5px 6px 5px 14px;
  border-color: #dde6f0;
  border-radius: 16px;
  color: #8d9db0;
  background: #f6f9fc;
  box-shadow: none;
}

.search input {
  font-size: 13px;
}

.search-button {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f76ff 0%, #4c8dff 100%);
  box-shadow: 0 10px 20px rgba(47, 118, 255, 0.24);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-color: #dfe7f0;
  border-radius: 14px;
  color: #5e7187;
  background: #f7f9fc;
}

.notification-panel {
  right: 0;
  width: 372px;
}

.primary-button,
.secondary-button,
.ghost-button,
.compact-select,
.filter-pill {
  border-radius: 14px;
}

.primary-button {
  padding: 11px 16px;
  background: linear-gradient(135deg, #2f76ff 0%, #4b8eff 100%);
  box-shadow: 0 12px 22px rgba(47, 118, 255, 0.2);
}

.secondary-button {
  padding: 10px 13px;
  border-color: #dbe4ef;
  color: #51657e;
  background: #fff;
}

.ghost-button {
  border-color: #d6e4ff;
  color: #2f76ff;
  background: #fff;
}

.compact-select {
  padding: 10px 13px;
  border-color: #dbe4ef;
  color: #53667f;
  background: #fff;
  font-size: 12px;
}

.view.active {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid rgba(224, 232, 242, 0.95);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.hero-card {
  margin-top: 0;
  padding: 28px 30px;
  border: 1px solid #dbe7ff;
  border-radius: 24px;
  color: #213650;
  background: linear-gradient(135deg, #f5f9ff 0%, #edf4ff 62%, #fdfefe 100%);
  box-shadow: none;
}

.hero-card h2 {
  margin: 10px 0 8px;
  color: #1c334f;
  font-size: 28px;
}

.hero-card p:last-child {
  color: #5a7391;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
}

.hero-stat-link {
  display: inline-flex;
  align-items: baseline;
  padding: 0 2px;
  border: 0;
  border-radius: 10px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.hero-card strong {
  color: #1f4f95;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hero-stat-link:hover strong,
.hero-stat-link:focus-visible strong {
  color: #1657b8;
}

.hero-stat-link:hover {
  background: rgba(47, 118, 255, 0.08);
}

.hero-stat-link:focus-visible {
  outline: 2px solid #7daeff;
  outline-offset: 2px;
}

.hero-eyebrow {
  color: #5f7da3;
}

.section-heading {
  margin: 24px 0 14px;
}

.dashboard-filter-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-popover-wrap {
  position: relative;
}

.dashboard-filter-button,
.dashboard-nav-button {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid #d7e2ef;
  border-radius: 14px;
  color: #526982;
  background: #fff;
  box-shadow: 0 8px 20px rgba(32, 58, 88, 0.05);
  font-size: 14px;
  font-weight: 700;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.dashboard-filter-button:hover,
.dashboard-nav-button:hover,
.dashboard-filter-button[aria-expanded="true"] {
  border-color: #b8cdea;
  box-shadow: 0 12px 26px rgba(47, 118, 255, 0.08);
  transform: translateY(-1px);
}

.dashboard-date-button {
  min-width: 240px;
  justify-content: space-between;
}

.dashboard-filter-icon,
.dashboard-filter-caret {
  color: #8294ab;
  font-size: 15px;
}

.dashboard-nav-group {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #d7e2ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(32, 58, 88, 0.05);
}

.dashboard-nav-button {
  min-width: 50px;
  border: 0;
  border-right: 1px solid #e6edf5;
  border-radius: 0;
  box-shadow: none;
  font-size: 24px;
  font-weight: 500;
}

.dashboard-nav-button:last-child {
  border-right: 0;
}

.dashboard-date-popover,
.dashboard-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  border: 1px solid #dce5f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(28, 46, 69, 0.14);
}

.dashboard-date-popover {
  width: 472px;
  max-width: calc(100vw - 72px);
}

.dashboard-menu {
  min-width: 150px;
  padding: 6px;
}

.dashboard-menu-item {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: #536b84;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  transition: background .2s ease, color .2s ease;
}

.dashboard-menu-item:hover,
.dashboard-menu-item.active {
  color: #1f3a58;
  background: #edf4ff;
}

.dashboard-date-shell {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.dashboard-date-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-date-mode-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #e2eaf4;
  border-radius: 14px;
  background: #f7fafe;
}

.dashboard-date-mode {
  min-width: 52px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: #667b92;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.dashboard-date-mode:hover,
.dashboard-date-mode.active {
  color: #245db8;
  background: #fff;
  box-shadow: 0 4px 10px rgba(36, 93, 184, 0.12);
}

.dashboard-date-summary {
  color: #7e90a4;
  font-size: 12px;
  font-weight: 600;
}

.dashboard-calendar-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.dashboard-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #35506d;
}

.dashboard-calendar-caption {
  display: block;
  margin-bottom: 4px;
  color: #8ea0b2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-calendar-header strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.dashboard-calendar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-calendar-shift {
  width: 34px;
  height: 34px;
  border: 1px solid #dde6f2;
  border-radius: 10px;
  color: #58708d;
  background: #f7fbff;
  font-size: 22px;
  line-height: 1;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.dashboard-calendar-weekdays,
.dashboard-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-calendar-weekdays {
  padding: 2px 2px 0;
}

.dashboard-calendar-weekdays span {
  color: #97a6b6;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.dashboard-calendar-grid {
  padding: 0 2px;
}

.dashboard-calendar-day {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #556a82;
  background: #f6f9fc;
  font-size: 15px;
  font-weight: 700;
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.dashboard-calendar-day:hover {
  background: #eaf2ff;
  border-color: #d4e1f8;
  transform: translateY(-1px);
}

.dashboard-calendar-day.muted {
  color: #c1c9d2;
  background: #fbfcfe;
}

.dashboard-calendar-day.today {
  border-color: #bfd2f5;
  box-shadow: inset 0 0 0 1px rgba(191, 210, 245, 0.35);
}

.dashboard-calendar-day.selected {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #4d7df0 0%, #6795ff 100%);
  box-shadow: 0 10px 18px rgba(47, 118, 255, 0.2);
}

.dashboard-calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf2f8;
}

.dashboard-calendar-footer span {
  color: #8a99a8;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-calendar-shortcut {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d6e3f3;
  border-radius: 10px;
  color: #406281;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 700;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.dashboard-filter-button:focus-visible,
.dashboard-nav-button:focus-visible,
.dashboard-menu-item:focus-visible,
.dashboard-date-mode:focus-visible,
.dashboard-calendar-shift:focus-visible,
.dashboard-calendar-day:focus-visible,
.dashboard-calendar-shortcut:focus-visible {
  outline: 2px solid #7daeff;
  outline-offset: 2px;
}

.dashboard-calendar-shift:hover,
.dashboard-calendar-shortcut:hover {
  border-color: #bfd3f3;
  background: #eef5ff;
  color: #2f76ff;
}

.dashboard-priority-heading {
  margin-top: 24px;
  margin-bottom: 14px;
}

.dashboard-priority-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  margin-bottom: 24px;
}

.dashboard-main-stack,
.dashboard-side-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.metric-grid,
.dashboard-grid,
.portrait-summary-grid,
.portrait-layout,
.inquiry-grid,
.operations-grid,
.integration-grid,
.import-summary-grid,
.import-review-grid,
.import-control-grid,
.import-center-grid {
  gap: 12px;
}

.metric-card,
.portrait-summary-card,
.operation-card,
.integration-card,
.inquiry-card,
.approval-rules div,
.import-summary-card,
.import-audit-item,
.review-card {
  border: 1px solid #e5ebf4;
  border-radius: 18px;
  box-shadow: none;
}

.metric-card {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
}

.formal-loading-card {
  position: relative;
  overflow: hidden;
  border-color: #dbe7f5;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
}

.formal-loading-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(72, 129, 208, .08) 42%, transparent 72%);
  animation: formal-loading-sweep 1.6s ease-in-out infinite;
  pointer-events: none;
}

.formal-loading-card strong,
.formal-loading-copy {
  color: #6f8298;
}

.formal-loading-error {
  border-color: rgba(216, 95, 103, .3);
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

@keyframes formal-loading-sweep {
  0% { transform: translateX(-100%); opacity: .28; }
  55% { opacity: 1; }
  100% { transform: translateX(100%); opacity: .28; }
}

@media (prefers-reduced-motion: reduce) {
  .formal-loading-card::after {
    animation: none;
  }
}

.metric-card strong {
  margin: 14px 0 5px;
  font-size: 25px;
}

.metric-meta {
  gap: 10px;
  color: #74869c;
}

.panel {
  border: 1px solid #e6edf5;
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}

.panel-header {
  padding: 18px 20px 14px;
}

.panel-note {
  font-size: 11px;
}

.priority-kpi-grid,
.priority-feed,
.focus-summary-grid,
.customer-signal-list,
.dashboard-queue-list {
  padding-left: 20px;
  padding-right: 20px;
}

.priority-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 18px;
}

.priority-kpi-card,
.focus-summary-card {
  padding: 16px;
  border: 1px solid #e5ebf4;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
}

.priority-kpi-card span,
.focus-summary-card span {
  color: #7b8ba1;
  font-size: 11px;
}

.priority-kpi-card strong,
.focus-summary-card strong {
  display: block;
  margin-top: 10px;
  color: #213650;
  font-size: 24px;
  letter-spacing: -0.4px;
}

.dashboard-stat-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease, opacity .2s ease;
}

.dashboard-stat-button:hover {
  color: #2f76ff;
  transform: translateY(-1px);
}

.dashboard-stat-button:focus-visible {
  outline: none;
  color: #2f76ff;
  box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.16);
}

.priority-kpi-card small,
.focus-summary-card small {
  display: block;
  margin-top: 6px;
  color: #92a0ad;
  font-size: 11px;
  line-height: 1.55;
}

.priority-task-list {
  padding-top: 0;
  padding-bottom: 8px;
}

.priority-task-list .dashboard-task-item {
  grid-template-columns: 20px minmax(0, 1fr) max-content;
  align-items: center;
  min-height: 72px;
  gap: 8px;
  padding: 7px 2px;
}

.priority-task-list .task-check {
  margin-top: 0;
}

.dashboard-task-stack {
  gap: 2px;
}

.priority-task-list .task-main-button {
  padding: 1px 0;
  border-radius: 8px;
}

.priority-task-list .task-name {
  font-size: 13px;
  line-height: 1.3;
}

.priority-task-list .task-detail {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
}

.dashboard-task-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 10px;
}

.priority-task-list .task-customer-button,
.priority-task-list .task-assignee {
  margin-top: 0;
  font-size: 11px;
  line-height: 1.35;
}

.priority-task-list .task-time {
  align-self: center;
  white-space: nowrap;
  font-size: 11px;
}

.dashboard-task-pagination {
  margin: 0 20px 18px;
  padding: 14px 0 0;
  border-top: 1px solid #edf2f7;
}

.dashboard-risk-pagination {
  margin: -4px 20px 20px;
  padding: 14px 0 0;
  border-top: 1px solid #edf2f7;
}

.dashboard-queue-pagination {
  margin: -4px 20px 20px;
  padding: 14px 0 0;
  border-top: 1px solid #edf2f7;
}

.priority-feed {
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
}

.dashboard-queue-list {
  display: grid;
  gap: 12px;
  padding-bottom: 20px;
}

.priority-feed-item,
.dashboard-queue-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "top meta"
    "title meta"
    "copy meta";
  align-items: start;
  column-gap: 18px;
  row-gap: 6px;
  min-height: 118px;
  padding: 18px 20px 18px 24px;
  border: 1px solid #e5ebf4;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(47, 118, 255, 0.08), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  overflow: hidden;
}

.priority-feed-item::before,
.dashboard-queue-item::before {
  content: "";
  position: absolute;
  inset: 16px auto 16px 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #6ea8ff;
}

.priority-feed-item.high {
  border-color: #ffd6dc;
  background:
    linear-gradient(90deg, rgba(224, 74, 98, 0.10), transparent 40%),
    linear-gradient(180deg, #fff9fa 0%, #ffffff 100%);
}

.priority-feed-item.high::before,
.dashboard-queue-item.high::before {
  background: #e04a62;
}

.priority-feed-item.medium,
.dashboard-queue-item.medium {
  border-color: #ffe6bf;
  background:
    linear-gradient(90deg, rgba(202, 135, 31, 0.10), transparent 40%),
    linear-gradient(180deg, #fffaf1 0%, #ffffff 100%);
}

.priority-feed-item.medium::before,
.dashboard-queue-item.medium::before {
  background: #ca871f;
}

.dashboard-queue-item.low {
  border-color: #dbe7ff;
  background:
    linear-gradient(90deg, rgba(61, 133, 206, 0.10), transparent 40%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.dashboard-queue-item.low::before {
  background: #3d85ce;
}

.priority-feed-top,
.dashboard-queue-top,
.customer-signal-top,
.customer-signal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.priority-feed-top,
.dashboard-queue-top {
  display: contents;
  grid-area: top;
}

.priority-feed-item .priority-badge,
.dashboard-queue-item .priority-badge {
  grid-area: top;
  align-self: start;
  justify-self: start;
}

.priority-feed-top small,
.dashboard-queue-top small {
  grid-area: meta;
  align-self: start;
  justify-self: end;
  max-width: 220px;
  margin-top: 0;
  padding: 6px 10px;
  border: 1px solid #e5ebf4;
  border-radius: 999px;
  color: #96a2ad;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
  white-space: normal;
}

.priority-feed-item strong,
.dashboard-queue-item strong {
  grid-area: title;
  display: block;
  min-width: 0;
  color: #25374d;
  font-size: 16px;
  line-height: 1.35;
}

.customer-signal-card strong {
  display: block;
  color: #25374d;
  font-size: 14px;
}

.priority-feed-item p,
.dashboard-queue-item p {
  grid-area: copy;
  max-width: 860px;
  margin: 0;
  color: #6f8093;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.customer-signal-card p {
  margin-top: 8px;
  color: #6f8093;
  font-size: 12px;
  line-height: 1.65;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.priority-badge.high {
  color: #c04e61;
  background: #fff0f3;
}

.priority-badge.medium {
  color: #9a6a17;
  background: #fff6e8;
}

.priority-badge.low {
  color: #466d96;
  background: #eef5ff;
}

@media (max-width: 760px) {
  .priority-feed-item,
  .dashboard-queue-item {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "top"
      "title"
      "copy"
      "meta";
    min-height: 0;
    padding: 16px 16px 16px 20px;
  }

  .priority-feed-top small,
  .dashboard-queue-top small {
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }
}

.focus-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 16px;
}

.dashboard-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.pipeline-panel {
  min-height: 316px;
  display: flex;
  flex-direction: column;
}

.pipeline-panel .funnel-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 18px;
}

.pipeline-panel .funnel-row {
  grid-template-columns: 58px 1fr 38px 72px;
  min-height: 38px;
  gap: 12px;
}

.funnel-row-button {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  transition: transform .2s ease, opacity .2s ease;
}

.pipeline-panel .bar-track {
  height: 11px;
  border-radius: 999px;
}

.pipeline-panel .bar {
  border-radius: 999px;
}

.pipeline-panel .funnel-row span,
.pipeline-panel .funnel-row b,
.pipeline-panel .funnel-row em {
  line-height: 1.2;
}

.pipeline-panel .funnel-row span {
  font-size: 11px;
  font-weight: 700;
  color: #8c9caf;
}

.pipeline-panel .funnel-row b {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pipeline-panel .funnel-row em {
  font-size: 11px;
  font-weight: 600;
}

.funnel-row-button:hover,
.funnel-row-button:focus-visible {
  transform: translateY(-1px);
}

.funnel-row-button:hover span,
.funnel-row-button:hover b,
.funnel-row-button:focus-visible span,
.funnel-row-button:focus-visible b {
  color: #2f76ff;
}

.funnel-row-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.16);
  border-radius: 12px;
}

.recent-panel,
.channel-panel {
  margin-top: 0;
  overflow: hidden;
}

.customer-signal-list {
  display: grid;
  gap: 10px;
  padding-bottom: 20px;
}

.customer-signal-card {
  padding: 16px;
  border: 1px solid #e5ebf4;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.customer-signal-top span {
  display: block;
  margin-top: 4px;
  color: #94a1ae;
  font-size: 11px;
}

.customer-signal-meta {
  margin-top: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.customer-signal-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #718295;
  background: #f3f7fb;
  font-size: 10px;
}

.channel-panel .channel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 20px;
}

.dashboard-empty-copy {
  padding: 0 20px 20px;
}

.text-button,
.small-add {
  font-size: 12px;
}

.small-add {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2f76ff 0%, #4c8dff 100%);
}

.funnel-bars,
.task-list,
.channel-grid,
.portrait-summary-grid,
.portrait-layout {
  padding-left: 20px;
  padding-right: 20px;
}

.funnel-bars {
  padding-bottom: 20px;
}

.task-list {
  padding-top: 2px;
  padding-bottom: 18px;
}

.task-item {
  grid-template-columns: 20px 1fr auto;
  gap: 12px;
  padding: 14px 2px;
}

.task-check {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  line-height: 16px;
}

.task-main-button {
  padding: 2px 4px;
  border-radius: 12px;
}

.task-main-stack .task-main-button {
  width: 100%;
}

.task-main-button:hover {
  background: #f7faff;
}

.task-name {
  font-size: 14px;
  color: inherit;
}

.task-customer,
.task-detail,
.task-time {
  font-size: 12px;
}

.channel-grid {
  grid-template-columns: repeat(4, 1fr);
  background: transparent;
  border-top: 0;
  gap: 16px;
}

.channel-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  min-height: 148px;
  padding: 18px 20px 16px;
  border: 1px solid #e6edf5;
  border-radius: 18px;
}

.channel-empty-card {
  grid-column: 1 / -1;
  min-height: 132px;
  padding: 22px 24px;
  border: 1px dashed #d7e3f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.channel-empty-card strong {
  display: block;
  color: #405162;
  font-size: 16px;
}

.channel-empty-card p {
  max-width: 520px;
  margin-top: 8px;
  color: #7d8ea1;
  font-size: 12px;
  line-height: 1.7;
}

.channel-card-button {
  width: 100%;
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.channel-card > span {
  color: #8c9caf;
  font-size: 11px;
  font-weight: 700;
}

.channel-card-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.channel-stat-button {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition: transform .2s ease;
}

.channel-card-stat small {
  display: inline-block;
  color: #8c9caf;
  font-size: 11px;
  font-weight: 600;
}

.channel-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.channel-card-meta small {
  color: #7d8ea1;
  font-size: 11px;
  font-weight: 600;
}

.channel-card-entry {
  color: #2f76ff;
  font-size: 11px;
  font-weight: 700;
}

.channel-card-button:hover,
.channel-card-button:focus-visible {
  border-color: #c9daf6;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(47, 118, 255, 0.08);
}

.channel-stat-button:hover,
.channel-stat-button:focus-visible {
  transform: translateY(-1px);
}

.channel-card strong {
  margin: 0;
  color: #405162;
  font-size: 22px;
  line-height: 1;
}

.channel-stat-button:hover strong,
.channel-stat-button:focus-visible strong {
  color: #2f76ff;
}

.channel-stat-button:focus-visible {
  outline: 2px solid #7daeff;
  outline-offset: 4px;
  border-radius: 10px;
}

.channel-card .channel-line {
  margin-top: 0;
}

.channel-card-button:focus-visible {
  outline: 2px solid #7daeff;
  outline-offset: 4px;
}

table {
  white-space: nowrap;
}

th {
  padding: 12px 18px;
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  color: #6f8299;
  background: #f8fbff;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid #edf2f7;
  color: #64778d;
  font-size: 12px;
}

tbody tr:hover td {
  background: #fbfdff;
}

.customer-table-row.is-selected td {
  background: #eff7ff;
}

.customer-table-row.is-selected:hover td {
  background: #e5f1ff;
}

.customer-table-row:hover td,
.customer-table-row:focus-visible td,
.customer-table-row.is-focus-target td {
  background: #f4f9ff;
}

.customer-table-row.is-selected:hover td,
.customer-table-row.is-selected:focus-visible td,
.customer-table-row.is-selected.is-focus-target td {
  background: #e5f1ff;
}

.stage,
.portrait-badge,
.detail-pill,
.detail-chip,
.portrait-chip {
  border-radius: 999px;
}

.stage {
  padding: 5px 10px;
  font-size: 11px;
}

.view-toolbar {
  align-items: flex-end;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ebf1f7;
}

.customer-toolbar-copy {
  flex: 0 1 420px;
  min-width: 240px;
}

.customer-toolbar-actions {
  flex: 1 1 860px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.inline-guide-link,
.customer-export-button {
  white-space: nowrap;
}

.customer-list-controls {
  display: grid;
  grid-template-columns: minmax(228px, 246px) minmax(0, 1fr);
  gap: 8px;
  padding: 16px 16px 18px;
  border-bottom: 1px solid #edf3f9;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.customer-selection-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid #dfe8f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(36, 54, 77, 0.05);
}

.customer-selection-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.customer-selection-copy strong {
  color: #30465e;
  font-size: 13px;
  line-height: 1.1;
}

.customer-selection-copy small {
  color: #8a9bad;
  font-size: 10px;
  line-height: 1.15;
}

.customer-selection-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex: 0 0 auto;
}

.customer-selection-copy .eyebrow {
  margin-right: 0;
  font-size: 8px;
  line-height: 1;
}

.customer-table-select-head {
  width: 54px;
  min-width: 54px;
}

#customer-select-all {
  flex: 0 0 auto;
}

.selection-bulk-box,
.selection-bulk-menu {
  min-width: 0;
}

.selection-bulk-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 86px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #dbe6f1;
  border-radius: 12px;
  color: #57708d;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  transition: border-color .2s ease, box-shadow .2s ease, color .2s ease, background .2s ease;
}

.selection-bulk-trigger:hover,
.selection-bulk-trigger:focus-visible {
  border-color: #bfd3ea;
  color: #2f4764;
  box-shadow: 0 8px 18px rgba(47, 118, 255, 0.1);
  outline: none;
}

.selection-bulk-trigger.has-selection {
  border-color: #bcd6ff;
  color: #2f76ff;
  background: #f4f8ff;
}

.selection-bulk-trigger:disabled {
  cursor: not-allowed;
  opacity: .65;
  box-shadow: none;
}

.selection-bulk-arrow {
  flex: 0 0 auto;
  color: #7e95b0;
  font-size: 12px;
  transition: transform .2s ease;
}

.selection-bulk-trigger[aria-expanded="true"] .selection-bulk-arrow {
  transform: rotate(180deg);
}

.selection-bulk-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 8;
  min-width: 156px;
  padding: 8px;
  border: 1px solid #dce7f2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 44px rgba(36, 54, 77, 0.14);
  backdrop-filter: blur(14px);
}

.selection-bulk-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  color: #43596f;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  transition: background .2s ease, color .2s ease;
}

.selection-bulk-option:hover,
.selection-bulk-option:focus-visible {
  color: #2f76ff;
  background: #edf4ff;
  outline: none;
}

.customer-filter-toolbar-shell {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
}

.customer-filter-toolbar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.customer-clear-filters {
  align-self: auto;
  justify-self: flex-end;
  min-height: 48px;
  padding-inline: 12px;
  border-radius: 16px;
  font-size: 10px;
  white-space: nowrap;
}

.customer-clear-filters.is-active {
  border-color: #c3d8f6;
  color: #2f76ff;
  background: #eef5ff;
}

.customer-multi-filter {
  position: relative;
  min-width: 0;
}

.customer-multi-filter-trigger {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #dbe6f1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #31465c;
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.customer-multi-filter-trigger:hover,
.customer-multi-filter-trigger:focus-visible {
  border-color: #bfd3ea;
  color: #22384d;
  box-shadow: 0 10px 24px rgba(47, 118, 255, 0.08);
  outline: none;
}

.customer-multi-filter-trigger.has-selection {
  border-color: #bfd6ff;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.customer-multi-filter-label,
.customer-multi-filter-summary {
  min-width: 0;
}

.customer-multi-filter-label {
  color: #6f8299;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
}

.customer-multi-filter-summary {
  color: #31465c;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.customer-multi-filter-arrow {
  flex: 0 0 auto;
  color: #7e95b0;
  font-size: 12px;
  transition: transform .2s ease;
}

.customer-multi-filter.is-open .customer-multi-filter-arrow {
  transform: rotate(180deg);
}

.customer-multi-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 14;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  padding: 10px;
  border: 1px solid #dce7f2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 44px rgba(36, 54, 77, 0.14);
  backdrop-filter: blur(14px);
}

.customer-multi-filter-menu[hidden] {
  display: none !important;
}

.customer-multi-filter-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 10px;
  color: #31465c;
  font-size: 12px;
  font-weight: 800;
}

.customer-multi-filter-reset {
  padding: 0;
  border: 0;
  color: #2f76ff;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.customer-multi-filter-reset:disabled {
  color: #95a8bd;
}

.customer-multi-filter-options {
  display: grid;
  gap: 6px;
  max-height: 256px;
  overflow: auto;
  padding-right: 2px;
}

.customer-multi-filter-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  color: #43596f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.customer-multi-filter-option:hover,
.customer-multi-filter-option:focus-within {
  color: #2f4764;
  background: #edf4ff;
}

.customer-multi-filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  flex: 0 0 16px;
  background: transparent;
  box-shadow: none;
  accent-color: var(--teal);
}

.customer-multi-filter-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-multi-filter-option-count {
  justify-self: end;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #6c83a0;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.customer-multi-filter-empty {
  padding: 10px;
  color: #8396aa;
  font-size: 12px;
  line-height: 1.5;
}

.customer-import-entry {
  min-height: 40px;
}

.customer-action-button {
  min-height: 48px;
  padding: 0 24px;
  border-radius: 22px;
  font-size: 13px;
  letter-spacing: 0;
  box-shadow: none;
}

.customer-action-button.primary-button {
  box-shadow: 0 14px 28px rgba(47, 118, 255, 0.18);
}

.customer-action-button.secondary-button {
  border-color: #cfdceb;
  color: #2e4661;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.customer-action-button.secondary-button:hover {
  border-color: #b8cce2;
  color: #23384d;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}

.muted-copy {
  color: #72849b;
  font-size: 13px;
}

.rule-hint {
  color: #4c79d3;
  font-size: 11px;
}

.rule-hint-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.rule-hint-inline .rule-hint {
  margin-top: 0;
}

.inline-guide-link {
  padding: 0;
  color: #2f76ff;
  font-size: 12px;
  font-weight: 700;
}

.inline-guide-link:hover,
.inline-guide-link:focus-visible {
  color: #1f5fd7;
}

.portrait-panel {
  margin-bottom: 14px;
}

.customer-import-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 16px;
}

.customer-import-intro-card,
.customer-import-upload-card {
  border: 1px solid #e3ebf4;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.customer-import-intro-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.customer-import-intro-copy {
  min-width: 0;
}

.customer-import-intro-copy strong,
.customer-import-upload-head strong,
.customer-import-format-note strong {
  display: block;
  color: #263b52;
  font-size: 14px;
}

.customer-import-intro-copy p,
.customer-import-format-note p {
  margin-top: 8px;
  color: #698094;
  font-size: 12px;
  line-height: 1.7;
}

.customer-import-upload-card {
  padding: 18px;
}

.customer-import-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.customer-import-upload-grid {
  display: grid;
  gap: 14px;
}

.customer-import-upload-card input[type="file"] {
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 16px;
  border-color: #d7e3f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.customer-import-upload-card input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 10px 14px;
  border: 1px solid #d5e1ef;
  border-radius: 12px;
  color: #45607c;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.customer-import-upload-card input[type="file"]::file-selector-button:hover {
  border-color: #bfcfe2;
  color: #29435e;
  background: #f8fbff;
}

.customer-import-format-note {
  padding: 14px 16px;
  border: 1px dashed #cfe0f4;
  border-radius: 16px;
  background: #f7fbff;
}

.customer-import-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.customer-import-columns span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  color: #4d6681;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #dce7f2;
  font-size: 11px;
  font-weight: 700;
}

.customer-export-modal-shell {
  display: grid;
}

.customer-export-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 16px;
}

.customer-export-summary-card,
.customer-export-field-card,
.customer-export-warning-card {
  border: 1px solid #e3ebf4;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.customer-export-summary-card {
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.customer-export-field-card {
  padding: 18px;
  background: linear-gradient(180deg, #fbfffd 0%, #f6fbf8 100%);
}

.customer-export-summary-head,
.customer-export-warning-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.customer-export-summary-head strong,
.customer-export-warning-head strong {
  display: block;
  color: #243a51;
  font-size: 15px;
}

.customer-export-summary-card p,
.customer-export-field-card p,
.customer-export-warning-head p {
  margin-top: 8px;
  color: #6b8196;
  font-size: 12px;
  line-height: 1.75;
}

.customer-export-columns {
  margin-top: 12px;
}

.customer-export-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.customer-export-metric {
  padding: 14px 15px;
  border: 1px solid #dfe8f2;
  border-radius: 16px;
  background: #ffffff;
}

.customer-export-metric span {
  color: #7b8fa4;
  font-size: 11px;
}

.customer-export-metric strong {
  display: block;
  margin-top: 8px;
  color: #23384d;
  font-size: 20px;
  line-height: 1.15;
}

.customer-export-warning-card {
  padding: 16px 18px;
  border-color: #f0d7cf;
  background: linear-gradient(180deg, #fffaf8 0%, #fffdfc 100%);
}

.customer-export-warning-head {
  justify-content: flex-start;
}

.customer-export-warning-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  border-radius: 999px;
  color: #c6634f;
  background: #fde8e1;
  font-size: 14px;
  font-weight: 800;
}

.portrait-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 20px;
}

.portrait-summary-card,
.portrait-card,
.portrait-detail,
.detail-card,
.detail-kpi-card,
.detail-mini-card {
  border-radius: 18px;
}

.portrait-summary-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.portrait-layout {
  grid-template-columns: 1fr;
  padding-bottom: 20px;
}

.portrait-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portrait-cards {
  grid-template-columns: 1fr;
}

.portrait-card {
  border-color: #e5ebf5;
  box-shadow: none;
}

.portrait-card.active,
.customer-view-item.active {
  border-color: #cfdfff;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: none;
}

.portrait-detail {
  border-color: #dde7f8;
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.customer-management-shell {
  display: block;
}

.customer-intelligence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.customer-view-strip {
  padding: 0 18px 18px;
  border-top: 1px solid #edf2f7;
}

.customer-view-strip-head,
.public-pool-audit-top,
.public-pool-audit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.customer-view-strip-head {
  padding: 16px 0 12px;
}

.customer-view-strip-head h4,
.subpanel-head h4 {
  margin-top: 6px;
  font-size: 18px;
}

.customer-view-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}

.customer-view-item {
  min-height: 88px;
  padding: 12px 13px;
  border: 1px solid #e5edf6;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.customer-view-item:hover {
  border-color: #dbe5f3;
  background: #fff;
  transform: none;
}

.customer-list-header {
  padding-bottom: 12px;
}

.customer-detail-panel {
  position: fixed;
  top: 32px;
  right: 24px;
  width: min(680px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  z-index: 34;
  border: 1px solid #e6edf5;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
  box-shadow: 0 30px 80px rgba(18, 37, 63, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.customer-detail-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.customer-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 33;
  background: rgba(10, 22, 38, 0.16);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.customer-detail-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.customer-detail-empty {
  color: #93a2b2;
}

.detail-close-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(24, 45, 77, 0.08);
  font-size: 20px;
}

.mini-button.emphasis {
  border-color: #b9e8df;
  color: var(--teal);
  background: var(--teal-soft);
}

.detail-hero {
  padding: 22px 22px 20px;
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.detail-breadcrumb,
.detail-inline-note,
.detail-subtle {
  color: #8ea0b4;
}

.detail-kpis {
  padding: 16px 22px 14px;
}

.detail-tabs {
  gap: 18px;
  padding: 10px 22px 0;
  border-bottom: 1px solid #edf2f7;
}

.customer-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  row-gap: 8px;
  overflow: visible;
}

.customer-detail-tab {
  flex: 0 0 auto;
  min-width: fit-content;
}

.detail-tab {
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #718398;
  background: transparent;
}

.detail-tab.active {
  border-color: var(--teal);
  color: var(--teal);
  background: transparent;
}

.detail-body {
  padding: 18px 22px 22px;
}

.kanban {
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 10px;
}

.kanban-column {
  min-height: 520px;
  padding: 10px;
  border-color: #e5ebf5;
  border-radius: 18px;
  background: #f7f9fc;
}

.kanban-head {
  padding: 4px 4px 12px;
  font-size: 12px;
}

.kanban-count {
  width: 22px;
  height: 22px;
  color: #667991;
  background: #e5ebf5;
}

.deal-card {
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  box-shadow: none;
}

.approval-rules {
  gap: 12px;
}

.approval-rules div {
  padding: 14px 15px;
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.inquiry-card {
  padding: 18px;
}

.operations-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.progress-track {
  height: 6px;
}

.integration-card {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.merge-policy-grid,
.migration-steps {
  gap: 10px;
}

.import-status,
.approval-status,
.release-status,
.integration-status,
.logistics,
.review-score {
  border-radius: 999px;
}

.review-card,
.import-audit-item,
.detail-card,
dialog {
  border: 1px solid #e5ebf5;
}

dialog {
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(23, 41, 66, 0.18);
}

.modal-header {
  padding: 22px 24px 16px;
}

.form-grid {
  gap: 14px;
  padding: 18px 24px 14px;
}

.profile-avatar-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 24px 4px;
}

.profile-avatar-preview {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  font-size: 22px;
  line-height: 1;
}

.profile-avatar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#user-profile-modal {
  width: min(1080px, calc(100vw - 34px));
  max-width: calc(100vw - 34px);
}

.user-profile-tabs {
  padding-inline: 24px;
}

.user-profile-panels {
  padding: 0 24px 24px;
}

.user-profile-panel {
  padding-top: 18px;
}

.user-profile-grid,
.user-security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.user-security-grid {
  grid-template-columns: minmax(420px, .98fr) minmax(460px, 1.02fr);
  align-items: start;
}

.user-security-side-stack {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.user-profile-main-card,
.user-profile-card,
.user-summary-item {
  min-width: 0;
  border: 1px solid #e5ebf5;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 12px 28px rgba(28, 47, 70, 0.05);
}

.user-profile-main-card {
  overflow: hidden;
}

.user-profile-main-card .profile-avatar-panel,
.user-profile-main-card .form-grid,
.user-profile-main-card .full-field {
  padding-left: 20px;
  padding-right: 20px;
}

.user-profile-main-card .full-field {
  padding-bottom: 20px;
}

.user-profile-sidecard {
  display: grid;
  gap: 18px;
  align-content: start;
}

.user-profile-card {
  padding: 18px;
  overflow: hidden;
}

.user-personal-mailbox-card .user-profile-form-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.user-profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.user-profile-card-head strong {
  display: block;
  margin-top: 5px;
  color: #33485d;
  font-size: 15px;
}

.user-role-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.user-role-list li {
  padding: 12px 13px;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  background: #f8fbfe;
}

.user-role-list li strong,
.user-role-list li span,
.user-summary-item span,
.user-summary-item strong {
  display: block;
}

.user-role-list li strong {
  color: #395066;
  font-size: 12px;
}

.user-role-list li span {
  margin-top: 5px;
  color: #7b8c9d;
  font-size: 11px;
  line-height: 1.65;
}

.user-role-list li.is-active {
  border-color: #bfe2d8;
  background: linear-gradient(180deg, #eefaf5 0%, #f9fdfb 100%);
}

.user-summary-grid,
.user-login-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.user-summary-item {
  padding: 15px 16px;
}

.user-summary-item.wide {
  grid-column: 1 / -1;
}

.user-summary-item span {
  color: #8a9aab;
  font-size: 10px;
  letter-spacing: .2px;
}

.user-summary-item strong {
  margin-top: 9px;
  color: #33485d;
  font-size: 13px;
  line-height: 1.6;
}

.user-profile-form-grid {
  padding: 16px 0 0;
}

.user-profile-form-grid .full-span {
  grid-column: 1 / -1;
}

.user-inline-note {
  margin-top: 14px;
  color: #7f90a1;
  font-size: 11px;
  line-height: 1.65;
}

.user-security-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  min-width: 0;
}

.user-security-status-item {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  background: #f8fbfe;
}

.user-security-status-item--action {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.user-security-verify-card {
  min-height: 118px;
  align-content: center;
}

.user-security-meta-card {
  min-height: 74px;
  display: grid;
  align-content: center;
}

.user-security-status-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.user-security-status-item span,
.user-security-status-item strong {
  display: block;
}

.user-security-status-item span {
  color: #8a9aab;
  font-size: 10px;
}

.user-security-delivery-note {
  display: block;
  min-width: 0;
  color: #7f90a1;
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.user-security-status-label {
  max-width: 7em;
  letter-spacing: .08em;
  line-height: 1.35;
  white-space: nowrap;
}

.user-security-status-item strong {
  margin-top: 8px;
  color: #33485d;
  font-size: 13px;
}

.user-security-status-badge {
  flex: 0 0 auto;
  min-width: 68px;
  margin-top: 0 !important;
  padding: 7px 12px;
  border: 1px solid #dce8f6;
  border-radius: 999px;
  background: #eef6ff;
  color: #24425f !important;
  font-size: 12px !important;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.user-security-status-badge.is-ok {
  border-color: #ccecdf;
  color: #147663 !important;
  background: #eaf8f4;
}

.user-security-action-button {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 14px;
  flex-shrink: 0;
  white-space: nowrap;
}

.user-security-action-button:disabled {
  opacity: .56;
  cursor: not-allowed;
}

.user-security-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.user-security-head-actions .secondary-button,
.user-security-head-actions .ghost-button {
  min-height: 42px;
  padding-inline: 16px;
  white-space: nowrap;
}

.danger-button {
  color: #b24040;
  border-color: #f0caca;
  background: linear-gradient(180deg, #fff9f9 0%, #fff1f1 100%);
}

.danger-button:hover,
.danger-button:focus-visible {
  color: #9e3030;
  border-color: #e7b4b4;
  background: linear-gradient(180deg, #fff2f2 0%, #ffe8e8 100%);
}

.user-security-toggle-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.user-toggle-row {
  min-height: 82px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  background: #f8fbfe;
  cursor: pointer;
}

.user-toggle-row span {
  margin-bottom: 0;
}

.user-toggle-row strong,
.user-toggle-row small {
  display: block;
}

.user-toggle-row strong {
  color: #33485d;
  font-size: 12px;
}

.user-toggle-row small {
  margin-top: 5px;
  color: #8797a8;
  font-size: 10px;
  line-height: 1.5;
}

.user-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.user-login-summary-grid {
  margin-top: 0;
}

.user-login-records-card {
  margin-top: 16px;
}

.user-login-record-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.user-login-record-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  background: #f8fbfe;
}

.user-login-record-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.user-login-record-aside {
  display: flex;
  align-items: center;
  align-self: stretch;
}

.user-login-record-top,
.user-login-record-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-login-record-origin {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
  align-self: center;
}

.user-login-record-top strong {
  color: #33485d;
  font-size: 12px;
}

.user-login-record-source,
.user-login-record-meta span,
.user-login-record-main p {
  color: #7f90a1;
  font-size: 11px;
}

.user-login-record-main p {
  line-height: 1.6;
}

.user-login-record-meta {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 6px;
}

.user-login-record-source,
.user-login-record-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  line-height: 1.45;
}

.user-login-record-status {
  min-width: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.user-login-record-status.success {
  color: #0c7a66;
  background: #e8f8f4;
}

.user-login-record-status.failed {
  color: #c0575f;
  background: #fff1f2;
}

.security-verification-shell {
  display: grid;
  gap: 14px;
  padding: 18px 24px 0;
}

.security-verification-description {
  margin: 0;
  color: #586b7f;
  font-size: 12px;
  line-height: 1.75;
}

.security-verification-target-card,
.security-verification-demo-code {
  padding: 15px 16px;
  border: 1px solid #e6eef5;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f9fe 100%);
}

.security-verification-target-card span,
.security-verification-demo-code span {
  display: block;
  color: #8899aa;
  font-size: 10px;
  letter-spacing: .2px;
}

.security-verification-target-card strong,
.security-verification-demo-code code {
  display: block;
  margin-top: 8px;
  color: #31465c;
  font-size: 15px;
  line-height: 1.45;
}

.security-verification-target-card small {
  display: block;
  margin-top: 8px;
  color: #8192a4;
  font-size: 11px;
  line-height: 1.7;
}

.security-verification-demo-code code {
  font-family: "SFMono-Regular", "SFMono", "Menlo", monospace;
  font-size: 26px;
  letter-spacing: 4px;
}

.user-admin-toolbar-actions {
  flex-wrap: wrap;
}

.user-admin-search-input {
  min-width: 260px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #33485d;
  font-size: 13px;
}

.user-admin-search-input::placeholder {
  color: #91a0ae;
}

.user-admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.user-admin-stat-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  border: 1px solid #e5ebf5;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 12px 28px rgba(28, 47, 70, 0.05);
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.user-admin-stat-card:hover,
.user-admin-stat-card:focus-visible {
  border-color: #d7e4f3;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(20, 38, 62, 0.08);
}

.user-admin-stat-card span,
.user-admin-stat-card small {
  color: #8192a3;
}

.user-admin-stat-card span {
  font-size: 12px;
}

.user-admin-stat-card strong {
  color: #2d4156;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.user-admin-stat-card small {
  font-size: 11px;
  line-height: 1.6;
}

.user-admin-panel {
  overflow: hidden;
}

.user-admin-table {
  min-width: 1400px;
}

.user-admin-table th:nth-child(6),
.user-admin-table td:nth-child(6) {
  min-width: 300px;
}

.user-admin-table th:nth-child(9),
.user-admin-table td:nth-child(9) {
  width: 360px;
  min-width: 360px;
  max-width: 360px;
  white-space: normal;
  vertical-align: middle;
}

.user-admin-panel-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-admin-role-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-admin-role-chip,
.user-admin-mini-chip,
.user-admin-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.user-admin-role-chip,
.user-admin-mini-chip {
  color: #486073;
  background: #f3f7fb;
}

.user-admin-role-chip b {
  color: #0d9c86;
  font-variant-numeric: tabular-nums;
}

.user-admin-account-cell,
.user-admin-contact-cell {
  display: grid;
  gap: 4px;
}

.user-admin-account-cell strong,
.user-admin-contact-cell span {
  color: #33485d;
}

.user-admin-account-cell span,
.user-admin-contact-cell small,
.user-admin-inline-note {
  color: #8a9aab;
  font-size: 11px;
  line-height: 1.6;
}

.user-admin-status-pill.active {
  color: #0f7c68;
  background: #eaf8f4;
}

.user-admin-status-pill.frozen {
  color: #b84f58;
  background: #fff1f2;
}

.user-admin-permission-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 330px;
}

.user-admin-verification-preview {
  display: grid;
  gap: 6px;
  min-width: 132px;
}

.user-admin-verification-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #e4edf6;
  border-radius: 10px;
  background: #f8fbfe;
  color: #5e7186;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.user-admin-verification-chip b,
.user-admin-verification-chip em {
  font-style: normal;
}

.user-admin-verification-chip b {
  color: #52677d;
  font-weight: 800;
}

.user-admin-verification-chip em {
  color: #7d8ea1;
  font-weight: 700;
}

.user-admin-verification-chip.verified {
  border-color: #d7f0e7;
  background: #eefaf6;
}

.user-admin-verification-chip.verified em {
  color: #0f7c68;
}

.user-admin-verification-chip.pending {
  border-color: #f2e4c5;
  background: #fff9eb;
}

.user-admin-verification-chip.pending em {
  color: #a56511;
}

.user-admin-verification-chip.missing {
  border-color: #e5ebf2;
  background: #f6f8fb;
}

.user-admin-verification-chip.missing em {
  color: #8a9aab;
}

.user-admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-admin-inline-note {
  max-width: 100%;
  margin: 10px 0 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.user-admin-empty {
  padding: 24px 18px 10px;
}

.user-admin-empty strong {
  color: #33485d;
}

.user-admin-empty p,
.user-admin-feedback {
  color: #8393a5;
}

.user-admin-feedback {
  padding: 0 18px 18px;
}

#user-admin-modal {
  width: min(1040px, calc(100vw - 34px));
}

.user-admin-permissions {
  margin: 0 24px;
  padding: 18px;
  border: 1px solid #e5ebf5;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 12px 28px rgba(28, 47, 70, 0.05);
}

.user-admin-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.user-admin-permission-item {
  min-height: 84px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  background: #f8fbfe;
  cursor: pointer;
}

.user-admin-permission-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
  cursor: pointer;
}

.user-admin-permission-item span,
.user-admin-permission-item strong,
.user-admin-permission-item small {
  display: block;
}

.user-admin-permission-item strong {
  color: #33485d;
  font-size: 12px;
}

.user-admin-permission-item small {
  margin-top: 6px;
  color: #8494a5;
  font-size: 11px;
  line-height: 1.6;
}

.user-admin-footer-meta {
  display: grid;
  gap: 10px;
  margin: 16px 24px 0;
}

.password-visibility-field {
  position: relative;
}

.password-visibility-field input {
  width: 100%;
  padding-right: 46px;
}

.password-visibility-toggle {
  position: absolute;
  top: calc(50% + 2px);
  right: 12px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #6f7f91;
  background: transparent;
  transform: translateY(-50%);
  transition: color .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
  color: #4f6378;
  outline: none;
}

.password-visibility-toggle[hidden] {
  display: none;
}

.password-visibility-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(47, 118, 255, 0.14);
}

.password-visibility-toggle[aria-pressed="true"] {
  color: #5d6d7f;
}

.password-visibility-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' fill-rule='evenodd' d='M12 5c5.23 0 9.67 3.11 11 7-1.33 3.89-5.77 7-11 7S2.33 15.89 1 12c1.33-3.89 5.77-7 11-7Zm0 3.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' fill-rule='evenodd' d='M12 5c5.23 0 9.67 3.11 11 7-1.33 3.89-5.77 7-11 7S2.33 15.89 1 12c1.33-3.89 5.77-7 11-7Zm0 3.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 18px 18px;
  mask-size: 18px 18px;
}

.password-visibility-toggle[aria-pressed="true"] .password-visibility-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3.53 2.47 2.47 3.53l3.06 3.06A12.3 12.3 0 0 0 1 12c1.33 3.89 5.77 7 11 7 2.1 0 4.05-.5 5.73-1.37l2.74 2.74 1.06-1.06L3.53 2.47ZM12 15.75a3.74 3.74 0 0 1-3.75-3.75c0-.64.16-1.24.43-1.76l5.08 5.08c-.52.27-1.12.43-1.76.43Zm0-10.75c5.23 0 9.67 3.11 11 7-.55 1.62-1.64 3.07-3.07 4.2l-1.08-1.08A9.86 9.86 0 0 0 21.34 12C19.99 8.9 16.37 6.5 12 6.5c-1 0-1.97.13-2.88.38L7.9 5.66A12.9 12.9 0 0 1 12 5Zm-.38 3.27a3.76 3.76 0 0 1 4.1 4.1l-1.57-1.57a2.25 2.25 0 0 0-2.38-2.38l-1.15-1.15Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3.53 2.47 2.47 3.53l3.06 3.06A12.3 12.3 0 0 0 1 12c1.33 3.89 5.77 7 11 7 2.1 0 4.05-.5 5.73-1.37l2.74 2.74 1.06-1.06L3.53 2.47ZM12 15.75a3.74 3.74 0 0 1-3.75-3.75c0-.64.16-1.24.43-1.76l5.08 5.08c-.52.27-1.12.43-1.76.43Zm0-10.75c5.23 0 9.67 3.11 11 7-.55 1.62-1.64 3.07-3.07 4.2l-1.08-1.08A9.86 9.86 0 0 0 21.34 12C19.99 8.9 16.37 6.5 12 6.5c-1 0-1.97.13-2.88.38L7.9 5.66A12.9 12.9 0 0 1 12 5Zm-.38 3.27a3.76 3.76 0 0 1 4.1 4.1l-1.57-1.57a2.25 2.25 0 0 0-2.38-2.38l-1.15-1.15Z'/%3E%3C/svg%3E");
}

.user-admin-password-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d7e5f6;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7fbff 0%, #fdfefe 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.user-admin-password-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #2f76ff;
  background: #eaf2ff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.user-admin-password-copy {
  min-width: 0;
}

.user-admin-password-copy strong {
  display: block;
  color: #33485d;
  font-size: 13px;
  line-height: 1.5;
}

.user-admin-password-copy p {
  margin: 6px 0 0;
  color: #6f8294;
  font-size: 12px;
  line-height: 1.7;
}

.user-admin-footer-meta .form-alert {
  min-height: 18px;
  margin: 0;
  padding: 0 2px;
}

@media (max-width: 1100px) {
  .user-admin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-admin-permission-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .user-admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .user-admin-search-input {
    width: 100%;
    min-width: 0;
  }

  .user-admin-panel-meta {
    justify-content: flex-start;
  }

  .user-admin-password-callout {
    grid-template-columns: 1fr;
  }

  .user-admin-password-badge {
    justify-self: flex-start;
  }
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(10, 148, 124, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(61, 126, 232, 0.14), transparent 28%),
    #f4f7fb;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 24px;
  padding: 26px;
}

.login-aside,
.login-card {
  border: 1px solid rgba(229, 235, 245, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 60px rgba(22, 38, 58, 0.1);
  backdrop-filter: blur(16px);
}

.login-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand-mark {
  width: 58px;
  height: 58px;
  display: block;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(20, 40, 60, 0.12);
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  color: #21384c;
  font-size: 18px;
}

.login-brand span {
  margin-top: 5px;
  color: #7f90a1;
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.login-copy {
  max-width: 560px;
  margin-top: 38px;
}

.login-copy h1 {
  font-size: 42px;
  line-height: 1.12;
}

.login-copy p {
  margin-top: 16px;
  color: #698093;
  font-size: 15px;
  line-height: 1.8;
}

.login-highlight-grid,
.login-policy-grid {
  display: grid;
  gap: 14px;
}

.login-highlight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 30px;
}

.login-highlight-card,
.login-policy-card {
  padding: 18px;
  border: 1px solid #e5ebf5;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.login-highlight-card span,
.login-policy-card span {
  color: #8a9aab;
  font-size: 10px;
}

.login-highlight-card strong,
.login-policy-card strong {
  display: block;
  margin-top: 10px;
  color: #2b4256;
  font-size: 14px;
}

.login-highlight-card p,
.login-policy-card p {
  margin-top: 8px;
  color: #6f8294;
  font-size: 12px;
  line-height: 1.7;
}

.login-policy-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
}

.login-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
}

.login-card-body {
  width: min(100%, 420px);
}

.login-card-topbar {
  position: absolute;
  top: 34px;
  right: 34px;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0;
}

.login-theme-switcher {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-theme-button {
  min-width: 72px;
  min-height: 52px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #73879c;
  background: transparent;
  transition: border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.login-theme-button span {
  font-size: 18px;
  line-height: 1;
}

.login-theme-button small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
}

.login-theme-button:hover,
.login-theme-button:focus-visible {
  color: #2f76ff;
  border-color: #d2dff2;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
  box-shadow: 0 10px 20px rgba(47, 118, 255, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.login-theme-button.active {
  color: #2f76ff;
  border-color: #c8d9f3;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
  box-shadow: inset 0 0 0 1px rgba(47, 118, 255, 0.06);
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #0c7a66;
  background: #e8f8f4;
  font-size: 11px;
  font-weight: 800;
}

.login-card-body h2 {
  margin-top: 18px;
  color: #21384c;
  font-size: 30px;
}

.login-card-body p {
  margin-top: 10px;
  color: #7b8c9d;
  font-size: 13px;
  line-height: 1.75;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.login-form label span {
  font-size: 12px;
}

.login-form input {
  min-height: 48px;
  border-radius: 14px;
  padding-inline: 14px;
  font-size: 14px;
}

.login-password-field {
  position: relative;
}

.login-password-field input {
  width: 100%;
  padding-right: 46px;
}

.login-password-toggle {
  position: absolute;
  top: calc(50% + 2px);
  right: 12px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #6f7782;
  background: transparent;
  transform: translateY(-50%);
  transition: color .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  color: #535d6b;
  outline: none;
}

.login-password-toggle[hidden] {
  display: none;
}

.login-password-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.18);
}

.login-password-toggle[aria-pressed="true"] {
  color: #6b7380;
}

.login-password-toggle-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' fill-rule='evenodd' d='M12 5c5.23 0 9.67 3.11 11 7-1.33 3.89-5.77 7-11 7S2.33 15.89 1 12c1.33-3.89 5.77-7 11-7Zm0 3.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' fill-rule='evenodd' d='M12 5c5.23 0 9.67 3.11 11 7-1.33 3.89-5.77 7-11 7S2.33 15.89 1 12c1.33-3.89 5.77-7 11-7Zm0 3.25a3.75 3.75 0 1 0 0 7.5a3.75 3.75 0 0 0 0-7.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 18px 18px;
  mask-size: 18px 18px;
}

.login-password-toggle[aria-pressed="true"] .login-password-toggle-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3.53 2.47 2.47 3.53l3.06 3.06A12.3 12.3 0 0 0 1 12c1.33 3.89 5.77 7 11 7 2.1 0 4.05-.5 5.73-1.37l2.74 2.74 1.06-1.06L3.53 2.47ZM12 15.75a3.74 3.74 0 0 1-3.75-3.75c0-.64.16-1.24.43-1.76l5.08 5.08c-.52.27-1.12.43-1.76.43Zm0-10.75c5.23 0 9.67 3.11 11 7-.55 1.62-1.64 3.07-3.07 4.2l-1.08-1.08A9.86 9.86 0 0 0 21.34 12C19.99 8.9 16.37 6.5 12 6.5c-1 0-1.97.13-2.88.38L7.9 5.66A12.9 12.9 0 0 1 12 5Zm-.38 3.27a3.76 3.76 0 0 1 4.1 4.1l-1.57-1.57a2.25 2.25 0 0 0-2.38-2.38l-1.15-1.15Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3.53 2.47 2.47 3.53l3.06 3.06A12.3 12.3 0 0 0 1 12c1.33 3.89 5.77 7 11 7 2.1 0 4.05-.5 5.73-1.37l2.74 2.74 1.06-1.06L3.53 2.47ZM12 15.75a3.74 3.74 0 0 1-3.75-3.75c0-.64.16-1.24.43-1.76l5.08 5.08c-.52.27-1.12.43-1.76.43Zm0-10.75c5.23 0 9.67 3.11 11 7-.55 1.62-1.64 3.07-3.07 4.2l-1.08-1.08A9.86 9.86 0 0 0 21.34 12C19.99 8.9 16.37 6.5 12 6.5c-1 0-1.97.13-2.88.38L7.9 5.66A12.9 12.9 0 0 1 12 5Zm-.38 3.27a3.76 3.76 0 0 1 4.1 4.1l-1.57-1.57a2.25 2.25 0 0 0-2.38-2.38l-1.15-1.15Z'/%3E%3C/svg%3E");
}

.login-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #5d7286;
  font-size: 12px;
  cursor: pointer;
}

.login-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--teal);
}

.login-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.login-password-reset-shell {
  display: grid;
  gap: 14px;
  padding: 20px 22px 22px;
}

.login-reset-step-card,
.login-reset-target-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid rgba(79, 144, 226, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(91, 229, 199, 0.08));
}

.login-reset-step-card > span {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  background: #397df6;
  font-weight: 800;
}

.login-reset-step-card strong,
.login-reset-target-card strong {
  display: block;
  color: #22384f;
  font-size: 14px;
}

.login-reset-step-card p,
.login-reset-target-card small {
  display: block;
  margin-top: 4px;
  color: #667a8d;
  font-size: 12px;
  line-height: 1.6;
}

.login-reset-target-card {
  display: grid;
  gap: 4px;
}

.login-reset-target-card span {
  color: #6b8094;
  font-size: 11px;
  font-weight: 800;
}

#login-password-reset-send {
  justify-self: center;
  width: fit-content;
  min-width: 168px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 14px;
}

.login-submit {
  min-height: 50px;
  border-radius: 16px;
  font-size: 14px;
}

.login-divider {
  position: relative;
  margin: 6px 0;
  color: #91a0ae;
  font-size: 11px;
  text-align: center;
}

.login-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid #e5ebf5;
}

.login-divider span {
  position: relative;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.92);
}

.login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.login-helper {
  margin-top: 16px;
  padding: 14px 15px;
  border: 1px dashed #cfe0ee;
  border-radius: 16px;
  color: #6f8294;
  background: #f8fbfe;
  font-size: 12px;
  line-height: 1.7;
}

.login-helper strong {
  color: #2b4256;
}

#login-account-list {
  display: grid;
  gap: 6px;
  margin: 6px 0;
}

.login-account-item {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.login-account-item b {
  color: #2f4153;
}

.login-alert {
  min-height: 18px;
  margin-top: 12px;
  color: var(--red);
  font-size: 12px;
}

.login-footer {
  margin-top: 20px;
  color: #8da0b3;
  font-size: 11px;
  line-height: 1.6;
}

.full-field {
  padding: 0 24px 18px;
}

.modal-actions {
  padding: 14px 24px;
}

body[data-theme="night"] {
  color-scheme: dark;
  --ink: #e6eef8;
  --muted: #8ea2b7;
  --line: #1d3044;
  --canvas: #08111b;
  --panel: #0f1a27;
  --nav: #06101a;
  --nav-soft: #102131;
  --teal-soft: rgba(32, 129, 108, 0.18);
  --customer-link-hover: #7ad7c7;
  --customer-link-focus-ring: rgba(122, 215, 199, 0.18);
  --shadow: none;
  background: radial-gradient(circle at top, #102338 0%, #08111b 52%, #060c14 100%);
}

body[data-theme="night"] .sidebar {
  color: #dce7f2;
  background: linear-gradient(180deg, #07121d 0%, #0c1825 100%);
}

body[data-theme="night"] .brand span,
body[data-theme="night"] .sidebar-tip span,
body[data-theme="night"] .user-card small,
body[data-theme="night"] .dots,
body[data-theme="night"] .eyebrow,
body[data-theme="night"] .panel-note,
body[data-theme="night"] .muted-copy,
body[data-theme="night"] .selection-meta,
body[data-theme="night"] .rule-hint,
body[data-theme="night"] .theme-switcher-head span,
body[data-theme="night"] .task-customer,
body[data-theme="night"] .task-detail,
body[data-theme="night"] .task-time,
body[data-theme="night"] .task-customer-button,
body[data-theme="night"] .detail-inline-note,
body[data-theme="night"] .detail-subtle,
body[data-theme="night"] .detail-breadcrumb,
body[data-theme="night"] .detail-hero-copy,
body[data-theme="night"] .detail-card p,
body[data-theme="night"] .customer-cell small,
body[data-theme="night"] .customer-link-fallback,
body[data-theme="night"] .customer-signal-top span,
body[data-theme="night"] .channel-card > span,
body[data-theme="night"] .channel-card-stat small,
body[data-theme="night"] .metric-meta,
body[data-theme="night"] .metric-card small {
  color: #8ea2b7;
}

body[data-theme="night"] .metric-note-button:hover,
body[data-theme="night"] .metric-note-button:focus-visible {
  color: #8cc8ff;
}

body[data-theme="night"] .theme-switcher {
  border: 0;
  background: transparent;
}

body[data-theme="night"] .theme-switcher-head strong,
body[data-theme="night"] .brand strong,
body[data-theme="night"] h1,
body[data-theme="night"] h2,
body[data-theme="night"] h3,
body[data-theme="night"] .metric-card strong,
body[data-theme="night"] .priority-kpi-card strong,
body[data-theme="night"] .focus-summary-card strong,
body[data-theme="night"] .detail-card strong,
body[data-theme="night"] .detail-kpi-card strong,
body[data-theme="night"] .detail-mini-card strong,
body[data-theme="night"] .customer-cell strong,
body[data-theme="night"] .customer-link-strong,
body[data-theme="night"] .customer-link-table,
body[data-theme="night"] .customer-signal-card strong,
body[data-theme="night"] .customer-view-top strong,
body[data-theme="night"] .portrait-card h4,
body[data-theme="night"] .portrait-detail-head h3,
body[data-theme="night"] .channel-card strong,
body[data-theme="night"] .funnel-row b,
body[data-theme="night"] th,
body[data-theme="night"] td,
body[data-theme="night"] .detail-list-title {
  color: #e6eef8;
}

body[data-theme="night"] .funnel-row span {
  color: #8ea2b7;
}

body[data-theme="night"] .detail-list-action:hover {
  border-color: rgba(112, 196, 180, .35);
  background: linear-gradient(180deg, rgba(20, 37, 51, .92), rgba(16, 29, 43, .92));
  box-shadow: 0 12px 26px rgba(0, 0, 0, .22);
}

body[data-theme="night"] .detail-list-action:focus-visible {
  border-color: rgba(120, 207, 192, .72);
  box-shadow: 0 0 0 3px rgba(42, 197, 170, .22);
}

body[data-theme="night"] .customer-timeline-type {
  color: #9cf1df;
  background: rgba(23, 121, 103, .24);
}

body[data-theme="night"] .customer-timeline-type.type-inquiry {
  color: #a7c9ff;
  background: rgba(61, 126, 232, .2);
}

body[data-theme="night"] .customer-timeline-type.type-order {
  color: #ffd58d;
  background: rgba(232, 154, 66, .2);
}

body[data-theme="night"] .customer-timeline-type.type-task {
  color: #d7b8ff;
  background: rgba(122, 77, 154, .24);
}

body[data-theme="night"] .customer-timeline-type.type-mail {
  color: #9deaff;
  background: rgba(34, 97, 111, .32);
}

body[data-theme="night"] .customer-timeline-type.type-workflow,
body[data-theme="night"] .customer-timeline-type.type-agent {
  color: #9cf1df;
  background: rgba(25, 111, 97, .3);
}

body[data-theme="night"] .customer-timeline-type.type-audit {
  color: #c6d3e2;
  background: rgba(118, 132, 150, .22);
}

body[data-theme="night"] .customer-timeline-warning {
  color: #ffd58d;
  border-color: rgba(232, 154, 66, .32);
  background: rgba(232, 154, 66, .12);
}

body[data-theme="night"] .detail-open-hint {
  color: #93c8ff;
  border-color: rgba(98, 139, 184, .36);
  background: rgba(36, 68, 101, .34);
}

body[data-theme="night"] .channel-card-meta small {
  color: #9cb1c7;
}

body[data-theme="night"] .channel-card-entry {
  color: #7fb0ff;
}

body[data-theme="night"] .dashboard-stat-button {
  color: #eef5ff;
}

body[data-theme="night"] .dashboard-stat-button:hover,
body[data-theme="night"] .dashboard-stat-button:focus-visible {
  color: #8cc8ff;
}

body[data-theme="night"] .nav-item {
  color: #9eb4c8;
}

body[data-theme="night"] .nav-item:hover,
body[data-theme="night"] .nav-item.active {
  color: #f4f9ff;
  background: #112131;
}

body[data-theme="night"] .inquiry-approval-toggle {
  background: rgba(19, 34, 50, 0.88);
}

body[data-theme="night"] .inquiry-approval-toggle:hover {
  background: rgba(25, 44, 64, 0.96);
}

body[data-theme="night"] .topbar,
body[data-theme="night"] .view.active,
body[data-theme="night"] .panel,
body[data-theme="night"] .metric-card,
body[data-theme="night"] .priority-kpi-card,
body[data-theme="night"] .focus-summary-card,
body[data-theme="night"] .priority-feed-item,
body[data-theme="night"] .dashboard-queue-item,
body[data-theme="night"] .portrait-summary-card,
body[data-theme="night"] .inquiry-card,
body[data-theme="night"] .inquiry-approval-panel,
body[data-theme="night"] .inquiry-approval-card,
body[data-theme="night"] .inquiry-approval-empty,
body[data-theme="night"] .integration-card,
body[data-theme="night"] .review-card,
body[data-theme="night"] .import-summary-card,
body[data-theme="night"] .import-stepper-shell,
body[data-theme="night"] .import-step,
body[data-theme="night"] .import-control-card,
body[data-theme="night"] .import-table-panel,
body[data-theme="night"] .import-side-panel,
body[data-theme="night"] .review-panel,
body[data-theme="night"] .import-audit-item,
body[data-theme="night"] .approval-rules div,
body[data-theme="night"] .intel-card,
body[data-theme="night"] .task-filter-row,
body[data-theme="night"] .kanban-column,
body[data-theme="night"] .deal-card,
body[data-theme="night"] .detail-card,
body[data-theme="night"] .detail-kpi-card,
body[data-theme="night"] .detail-mini-card,
body[data-theme="night"] .customer-view-item,
body[data-theme="night"] .customer-signal-card,
body[data-theme="night"] .channel-card,
body[data-theme="night"] .portrait-card,
body[data-theme="night"] .portrait-detail,
body[data-theme="night"] .public-pool-rules,
body[data-theme="night"] .public-pool-list-panel,
body[data-theme="night"] .public-pool-audit-panel,
body[data-theme="night"] .public-pool-rule-card,
body[data-theme="night"] .public-pool-config-card,
body[data-theme="night"] .public-pool-summary-card,
body[data-theme="night"] .public-pool-customer-card,
body[data-theme="night"] .public-pool-audit-item,
body[data-theme="night"] dialog {
  border-color: #1d3044;
  background: #0f1a27;
  box-shadow: none;
}

body[data-theme="night"] .channel-card-button {
  background: linear-gradient(180deg, #0f1a27 0%, #102030 100%);
}

body[data-theme="night"] .channel-empty-card {
  border-color: #27405a;
  background: linear-gradient(180deg, #0f1a27 0%, #102030 100%);
}

body[data-theme="night"] .channel-empty-card strong {
  color: #e6eef8;
}

body[data-theme="night"] .channel-empty-card p {
  color: #9cb1c7;
}

body[data-theme="night"] .formal-loading-card {
  border-color: #253a51;
  background: linear-gradient(180deg, #101d2b 0%, #0d1925 100%);
}

body[data-theme="night"] .formal-loading-card::after {
  background: linear-gradient(105deg, transparent 0%, rgba(120, 166, 228, .1) 42%, transparent 72%);
}

body[data-theme="night"] .formal-loading-card strong,
body[data-theme="night"] .formal-loading-copy {
  color: #a7bad0;
}

body[data-theme="night"] .formal-loading-error {
  border-color: rgba(236, 102, 122, .38);
  background: linear-gradient(180deg, #231923 0%, #111b28 100%);
}

body[data-theme="night"] .channel-card-button:hover,
body[data-theme="night"] .channel-card-button:focus-visible {
  border-color: #355577;
  box-shadow: 0 16px 32px rgba(3, 10, 18, 0.26);
}

body[data-theme="night"] .funnel-row-button:hover span,
body[data-theme="night"] .funnel-row-button:hover b,
body[data-theme="night"] .funnel-row-button:focus-visible span,
body[data-theme="night"] .funnel-row-button:focus-visible b {
  color: #8cc8ff;
}

body[data-theme="night"] .hero-card {
  border-color: #223652;
  color: #d9e8fb;
  background: linear-gradient(135deg, #14243a 0%, #11253f 48%, #132d4a 100%);
}

body[data-theme="night"] .runtime-chip {
  background: rgba(18, 32, 51, 0.88);
  border-color: rgba(96, 180, 126, 0.24);
  color: #9ad0ac;
}

body[data-theme="night"] .runtime-chip.subtle {
  color: #9ab3cb;
}

body[data-theme="night"] .runtime-chip.warning {
  background: rgba(67, 49, 18, 0.9);
  border-color: rgba(227, 171, 84, 0.26);
  color: #f1c46a;
}

body[data-theme="night"] .runtime-notice {
  background: linear-gradient(135deg, rgba(35, 26, 14, 0.96), rgba(19, 30, 49, 0.94));
  border-color: rgba(214, 160, 74, 0.2);
  box-shadow: 0 20px 40px rgba(5, 10, 18, 0.28);
}

body[data-theme="night"] .runtime-notice-copy strong {
  color: #eff6ff;
}

body[data-theme="night"] .runtime-notice-copy p {
  color: #a7bdd4;
}

body[data-theme="night"] .hero-card h2,
body[data-theme="night"] .hero-card strong {
  color: #f5f9ff;
}

body[data-theme="night"] .hero-card p:last-child,
body[data-theme="night"] .hero-eyebrow {
  color: #9db3c9;
}

body[data-theme="night"] .hero-stat-link:hover {
  background: rgba(122, 166, 255, 0.12);
}

body[data-theme="night"] .notification-panel {
  border-color: #22364c;
  background: #0f1a27;
  box-shadow: 0 20px 40px rgba(2, 7, 13, 0.32);
}

body[data-theme="night"] .notification-panel-head strong,
body[data-theme="night"] .notification-item strong {
  color: #e6eef8;
}

body[data-theme="night"] .notification-panel-head span,
body[data-theme="night"] .notification-item-top small,
body[data-theme="night"] .notification-item p,
body[data-theme="night"] .notification-empty,
body[data-theme="night"] .notification-item-read {
  color: #8ea2b7;
}

body[data-theme="night"] .notification-stat-pill {
  border-color: transparent;
  color: #c3d1df;
  background: rgba(142, 162, 183, 0.14);
}

body[data-theme="night"] .notification-stat-pill:hover {
  background: rgba(142, 162, 183, 0.2);
}

body[data-theme="night"] .notification-stat-pill:focus-visible {
  box-shadow: 0 0 0 3px rgba(74, 120, 167, 0.2);
}

body[data-theme="night"] .notification-stat-pill.is-active {
  border-color: rgba(140, 200, 255, 0.26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

body[data-theme="night"] .notification-stat-pill.is-total {
  color: #b9d7ff;
  background: rgba(73, 125, 201, 0.18);
}

body[data-theme="night"] .notification-stat-pill.is-unread {
  color: #ffb6c0;
  background: rgba(139, 57, 76, 0.24);
}

body[data-theme="night"] .notification-stat-pill.is-read {
  color: #8be0ce;
  background: rgba(32, 129, 108, 0.2);
}

body[data-theme="night"] .notification-item {
  border-color: #22364c;
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .notification-item.high {
  border-color: #5b3040;
}

body[data-theme="night"] .pagination-summary,
body[data-theme="night"] .pagination-ellipsis {
  color: #8ea2b7;
}

body[data-theme="night"] .table-pagination {
  border-top-color: #1d3044;
}

body[data-theme="night"] .pagination-button {
  border-color: #23374e;
  color: #d7e5f4;
  background: #111d2b;
}

body[data-theme="night"] .pagination-button:hover,
body[data-theme="night"] .pagination-button:focus-visible {
  border-color: #4d6f96;
  color: #8cc8ff;
}

body[data-theme="night"] .pagination-button.active {
  border-color: #4f81ff;
  color: #9cc0ff;
  background: #142842;
}

body[data-theme="night"] .notification-item.medium {
  border-color: #5e4724;
}

body[data-theme="night"] .notification-item.low {
  border-color: #24485b;
}

body[data-theme="night"] .notification-item:hover {
  border-color: #345a82;
}

body[data-theme="night"] .notification-level.high {
  color: #ffb6c0;
  background: rgba(139, 57, 76, 0.24);
}

body[data-theme="night"] .notification-level.medium {
  color: #ffd888;
  background: rgba(124, 91, 23, 0.22);
}

body[data-theme="night"] .notification-level.low {
  color: #8cc8ff;
  background: rgba(47, 118, 255, 0.16);
}

body[data-theme="night"] .notification-button:hover {
  border-color: #31516f;
  color: #dce7f2;
  background: #152436;
}

body[data-theme="night"] .notification-button[aria-expanded="true"] {
  border-color: #345a82;
  color: #8cc8ff;
  background: #16283a;
}

body[data-theme="night"] .guide-jump-chip,
body[data-theme="night"] .guide-hero-aside-block,
body[data-theme="night"] .guide-overview-card,
body[data-theme="night"] .guide-step,
body[data-theme="night"] .guide-role-card,
body[data-theme="night"] .guide-rule-card,
body[data-theme="night"] .guide-tip-card {
  border-color: rgba(112, 135, 164, 0.24);
  background: linear-gradient(180deg, rgba(22, 34, 49, 0.94) 0%, rgba(18, 29, 43, 0.94) 100%);
}

body[data-theme="night"] .guide-hero-copy,
body[data-theme="night"] .guide-hero-note,
body[data-theme="night"] .guide-step p,
body[data-theme="night"] .guide-role-card p,
body[data-theme="night"] .guide-rule-card p,
body[data-theme="night"] .guide-rule-list li,
body[data-theme="night"] .guide-tip-card p,
body[data-theme="night"] .guide-rule-footer,
body[data-theme="night"] .guide-overview-card small {
  color: #99aec5;
}

body[data-theme="night"] .guide-overview-card strong,
body[data-theme="night"] .guide-step strong,
body[data-theme="night"] .guide-role-card strong,
body[data-theme="night"] .guide-rule-card strong,
body[data-theme="night"] .guide-tip-card strong {
  color: #e4eef9;
}

body[data-theme="night"] .guide-overview-card.is-actionable:hover,
body[data-theme="night"] .guide-overview-card.is-actionable:focus-visible {
  border-color: rgba(116, 157, 205, 0.4);
  background: linear-gradient(180deg, rgba(25, 40, 58, 0.98) 0%, rgba(20, 33, 47, 0.98) 100%);
  box-shadow: 0 14px 28px rgba(3, 10, 20, 0.28);
}

body[data-theme="night"] .guide-hero-main h3,
body[data-theme="night"] .guide-hero-label {
  color: #dce8f5;
}

body[data-theme="night"] .guide-jump-chip,
body[data-theme="night"] .guide-role-badge,
body[data-theme="night"] .guide-step-index {
  color: #8eb9ff;
  background: rgba(45, 92, 166, 0.2);
}

body[data-theme="night"] .guide-jump-chip:hover,
body[data-theme="night"] .guide-jump-chip:focus-visible,
body[data-theme="night"] .guide-role-card.is-current {
  border-color: rgba(88, 140, 227, 0.36);
}

body[data-theme="night"] .search,
body[data-theme="night"] .compact-select,
body[data-theme="night"] .icon-button,
body[data-theme="night"] .secondary-button,
body[data-theme="night"] .ghost-button,
body[data-theme="night"] .mini-button,
body[data-theme="night"] .customer-link-button,
body[data-theme="night"] .dashboard-filter-button,
body[data-theme="night"] .dashboard-nav-group,
body[data-theme="night"] .dashboard-nav-button {
  border-color: #22364c;
  color: #dce7f2;
  background: #101b29;
}

body[data-theme="night"] .danger-button {
  color: #ffb4b4;
  border-color: #5b2f36;
  background: linear-gradient(180deg, #2a1519 0%, #241115 100%);
}

body[data-theme="night"] .danger-button:hover,
body[data-theme="night"] .danger-button:focus-visible {
  color: #ffd1d1;
  border-color: #7b3a46;
  background: linear-gradient(180deg, #35191f 0%, #2f151a 100%);
}

body[data-theme="night"] .task-main-button {
  border-color: transparent;
  color: inherit;
  background: transparent;
}

body[data-theme="night"] .task-main-button:hover {
  background: rgba(20, 34, 48, 0.68);
}

body[data-theme="night"] .task-name {
  color: #eef5ff;
}

body[data-theme="night"] .task-time {
  color: #b9cadb;
}

body[data-theme="night"] .dashboard-filter-button:hover,
body[data-theme="night"] .dashboard-nav-button:hover,
body[data-theme="night"] .dashboard-filter-button[aria-expanded="true"] {
  border-color: #345a82;
  box-shadow: none;
}

body[data-theme="night"] .customer-link-button,
body[data-theme="night"] .customer-name-button,
body[data-theme="night"] .task-customer-button {
  border-color: transparent;
  background: transparent;
}

body[data-theme="night"] .customer-link-button:hover,
body[data-theme="night"] .customer-link-button:focus-visible,
body[data-theme="night"] .task-customer-button:hover,
body[data-theme="night"] .task-customer-button:focus-visible {
  color: var(--customer-link-hover);
  box-shadow: 0 0 0 3px var(--customer-link-focus-ring);
}

body[data-theme="night"] .search input,
body[data-theme="night"] input:not([type="checkbox"]):not([type="file"]),
body[data-theme="night"] textarea,
body[data-theme="night"] select {
  color: #e6eef8;
}

body[data-theme="night"] .customer-combobox-toggle {
  color: #8ea2b7;
}

body[data-theme="night"] .customer-combobox-toggle:hover {
  color: #dce7f2;
}

body[data-theme="night"] .customer-combobox-menu {
  border-color: #22364c;
  background: #101b29;
  box-shadow: 0 18px 34px rgba(2, 7, 13, 0.34);
}

body[data-theme="night"] .customer-combobox-option {
  color: #dce7f2;
}

body[data-theme="night"] .customer-combobox-option:hover,
body[data-theme="night"] .customer-combobox-option.is-active {
  color: #f5f9ff;
  background: #16283a;
}

body[data-theme="night"] .customer-combobox-empty {
  color: #8ea2b7;
}

body[data-theme="night"] .customer-import-intro-card,
body[data-theme="night"] .customer-import-upload-card {
  border-color: #22364c;
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .customer-action-button.secondary-button {
  border-color: #2a435d;
  color: #dce7f2;
  background: linear-gradient(180deg, #101b29 0%, #122031 100%);
}

body[data-theme="night"] .customer-action-button.secondary-button:hover {
  border-color: #3a5a7c;
  color: #f5f9ff;
  background: linear-gradient(180deg, #132334 0%, #16283a 100%);
}

body[data-theme="night"] .customer-import-upload-card input[type="file"] {
  border-color: #29405a;
  background: linear-gradient(180deg, #0f1a27 0%, #122031 100%);
}

body[data-theme="night"] .customer-import-upload-card input[type="file"]::file-selector-button {
  border-color: #2a435d;
  color: #d7e5f4;
  background: #16283a;
}

body[data-theme="night"] .customer-import-upload-card input[type="file"]::file-selector-button:hover {
  border-color: #375778;
  color: #f5f9ff;
  background: #1a3045;
}

body[data-theme="night"] .customer-import-intro-copy strong,
body[data-theme="night"] .customer-import-upload-head strong,
body[data-theme="night"] .customer-import-format-note strong {
  color: #e6eef8;
}

body[data-theme="night"] .customer-import-intro-copy p,
body[data-theme="night"] .customer-import-format-note p {
  color: #9db0c5;
}

body[data-theme="night"] .customer-import-format-note {
  border-color: #2a4661;
  background: #122031;
}

body[data-theme="night"] .customer-import-columns span {
  color: #d9e6f3;
  background: #16283a;
  box-shadow: inset 0 0 0 1px #284059;
}

body[data-theme="night"] .customer-export-summary-card,
body[data-theme="night"] .customer-export-field-card,
body[data-theme="night"] .customer-export-warning-card {
  border-color: #22364c;
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .customer-export-summary-head strong,
body[data-theme="night"] .customer-export-warning-head strong,
body[data-theme="night"] .customer-export-metric strong {
  color: #eef5ff;
}

body[data-theme="night"] .customer-export-summary-card p,
body[data-theme="night"] .customer-export-field-card p,
body[data-theme="night"] .customer-export-warning-head p,
body[data-theme="night"] .customer-export-metric span {
  color: #9db0c5;
}

body[data-theme="night"] .customer-export-metric {
  border-color: #26405a;
  background: #122031;
}

body[data-theme="night"] .customer-export-warning-card {
  border-color: #5e4037;
  background: linear-gradient(180deg, #1c1513 0%, #16110f 100%);
}

body[data-theme="night"] .customer-export-warning-icon {
  color: #ffc0ad;
  background: rgba(198, 99, 79, 0.18);
}

body[data-theme="night"] .enhanced-select-trigger {
  border-color: #22364c;
  color: #dce7f2;
  background: linear-gradient(180deg, #101b29 0%, #122031 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body[data-theme="night"] .enhanced-select-trigger:hover {
  border-color: #31516f;
  background: linear-gradient(180deg, #132334 0%, #16283a 100%);
}

body[data-theme="night"] .enhanced-select.is-open .enhanced-select-trigger,
body[data-theme="night"] .enhanced-select-trigger:focus-visible {
  border-color: #4a78a7;
  box-shadow: 0 0 0 4px rgba(74, 120, 167, 0.2);
  background: #16283a;
}

body[data-theme="night"] .enhanced-select-arrow {
  color: #8ea2b7;
}

body[data-theme="night"] .enhanced-select.is-open .enhanced-select-arrow {
  color: #8cc8ff;
}

body[data-theme="night"] .enhanced-select-menu {
  border-color: #22364c;
  background: rgba(16, 27, 41, 0.98);
  box-shadow: 0 22px 40px rgba(2, 7, 13, 0.44);
}

body[data-theme="night"] .enhanced-select-search-input {
  border-color: #29405a;
  color: #dce7f2;
  background: linear-gradient(180deg, #101b29 0%, #122031 100%);
}

body[data-theme="night"] .enhanced-select-search-input:focus {
  border-color: #4a78a7;
  box-shadow: 0 0 0 4px rgba(74, 120, 167, 0.2);
  background: #16283a;
}

body[data-theme="night"] .enhanced-select-search-input::placeholder,
body[data-theme="night"] .enhanced-select-empty {
  color: #8ea2b7;
}

body[data-theme="night"] .enhanced-select-option {
  color: #dce7f2;
}

body[data-theme="night"] .enhanced-select-option:hover,
body[data-theme="night"] .enhanced-select-option:focus-visible {
  color: #f5f9ff;
  background: #16283a;
}

body[data-theme="night"] .enhanced-select-option.is-selected {
  color: #8cc8ff;
  background: linear-gradient(180deg, rgba(32, 57, 85, 0.94) 0%, rgba(20, 39, 58, 0.94) 100%);
}

body[data-theme="night"] .enhanced-select-option-count {
  color: #8ea2b7;
}

body[data-theme="night"] .temporal-trigger {
  border-color: #22364c;
  color: #dce7f2;
  background: linear-gradient(180deg, #101b29 0%, #122031 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body[data-theme="night"] .temporal-trigger:hover {
  border-color: #31516f;
  background: linear-gradient(180deg, #132334 0%, #16283a 100%);
}

body[data-theme="night"] .temporal-trigger.is-open,
body[data-theme="night"] .temporal-trigger:focus-visible {
  border-color: #4a78a7;
  box-shadow: 0 0 0 4px rgba(74, 120, 167, 0.2);
  background: #16283a;
}

body[data-theme="night"] .temporal-trigger-value {
  color: #dce7f2;
}

body[data-theme="night"] .temporal-trigger.is-placeholder .temporal-trigger-value,
body[data-theme="night"] .temporal-picker-caption,
body[data-theme="night"] .temporal-picker-hint {
  color: #8ea2b7;
}

body[data-theme="night"] .temporal-trigger-icon {
  color: #8ea2b7;
}

body[data-theme="night"] .temporal-trigger.is-open .temporal-trigger-icon {
  color: #8cc8ff;
}

body[data-theme="night"] .temporal-picker-shell {
  border-color: #22364c;
  background: rgba(16, 27, 41, 0.98);
  box-shadow: 0 24px 44px rgba(2, 7, 13, 0.44);
}

body[data-theme="night"] .temporal-picker-current {
  color: #eef5ff;
}

body[data-theme="night"] .temporal-time-card {
  border-color: #26405a;
  background: linear-gradient(180deg, #101b29 0%, #122031 100%);
}

body[data-theme="night"] .temporal-picker-popover .dashboard-calendar-shift {
  border-color: #35536f;
  color: #dce7f2;
  background: #142230;
  box-shadow: none;
}

body[data-theme="night"] .temporal-picker-popover .dashboard-calendar-shift:hover,
body[data-theme="night"] .temporal-picker-popover .dashboard-calendar-shift:focus-visible {
  border-color: #4b75a0;
  color: #eef7ff;
  background: #172c40;
}

body[data-theme="night"] .temporal-picker-action {
  border-color: #2a435d;
  color: #dce7f2;
  background: #16283a;
}

body[data-theme="night"] .temporal-picker-action:hover,
body[data-theme="night"] .temporal-picker-action:focus-visible {
  border-color: #3d6286;
  color: #f5f9ff;
  background: #1b3147;
}

body[data-theme="night"] .temporal-picker-action.primary {
  border-color: transparent;
  color: #f8fbff;
  background: linear-gradient(135deg, #396ecb 0%, #5586ef 100%);
}

body[data-theme="night"] .search input::placeholder,
body[data-theme="night"] textarea::placeholder,
body[data-theme="night"] input::placeholder {
  color: #7f93a8;
}

body[data-theme="night"] .customer-table-row.is-selected td {
  background: #112434;
}

body[data-theme="night"] .customer-table-row.is-selected:hover td,
body[data-theme="night"] .customer-table-row:focus-visible td,
body[data-theme="night"] .customer-table-row.is-focus-target td,
body[data-theme="night"] tbody tr:hover td {
  background: #13283b;
}

body[data-theme="night"] th {
  border-color: #1d3044;
  background: #121f2d;
}

body[data-theme="night"] td {
  border-color: #1d3044;
  color: #d6e1ed;
}

body[data-theme="night"] .customer-list-controls {
  border-color: #1d3044;
  background: linear-gradient(180deg, rgba(18, 31, 45, 0.96) 0%, rgba(16, 28, 42, 0.98) 100%);
}

body[data-theme="night"] .customer-selection-panel {
  border-color: #28415b;
  background: rgba(20, 34, 48, 0.96);
  box-shadow: 0 14px 28px rgba(4, 12, 21, 0.28);
}

body[data-theme="night"] .customer-selection-copy strong {
  color: #edf4fb;
}

body[data-theme="night"] .customer-selection-copy small {
  color: #8aa0b7;
}

body[data-theme="night"] .customer-clear-filters.is-active {
  border-color: rgba(88, 142, 255, 0.34);
  color: #9fc1ff;
  background: rgba(47, 118, 255, 0.14);
}

body[data-theme="night"] .selection-bulk-trigger {
  border-color: #27405a;
  color: #c7d8ea;
  background: linear-gradient(180deg, #182739 0%, #142434 100%);
}

body[data-theme="night"] .selection-bulk-trigger:hover,
body[data-theme="night"] .selection-bulk-trigger:focus-visible {
  border-color: #39608c;
  color: #eef5ff;
  box-shadow: 0 12px 28px rgba(10, 23, 39, 0.3);
}

body[data-theme="night"] .selection-bulk-trigger.has-selection {
  border-color: rgba(88, 142, 255, 0.34);
  color: #9fc1ff;
  background: rgba(47, 118, 255, 0.14);
}

body[data-theme="night"] .customer-multi-filter-trigger {
  border-color: #27405a;
  color: #d9e6f3;
  background: linear-gradient(180deg, #182739 0%, #142434 100%);
}

body[data-theme="night"] .customer-multi-filter-trigger:hover,
body[data-theme="night"] .customer-multi-filter-trigger:focus-visible {
  border-color: #39608c;
  color: #eef5ff;
  box-shadow: 0 12px 28px rgba(10, 23, 39, 0.3);
}

body[data-theme="night"] .customer-multi-filter-trigger.has-selection {
  border-color: rgba(88, 142, 255, 0.34);
  background: rgba(47, 118, 255, 0.14);
}

body[data-theme="night"] .customer-multi-filter-label {
  color: #8ea2b7;
}

body[data-theme="night"] .customer-multi-filter-summary {
  color: #edf4fb;
}

body[data-theme="night"] .customer-multi-filter-arrow {
  color: #8ea2b7;
}

body[data-theme="night"] .customer-multi-filter-menu {
  border-color: #28415b;
  background: rgba(20, 34, 48, 0.98);
  box-shadow: 0 18px 34px rgba(4, 12, 21, 0.28);
}

body[data-theme="night"] .customer-multi-filter-menu-head {
  color: #edf4fb;
}

body[data-theme="night"] .customer-multi-filter-reset:disabled {
  color: #70869c;
}

body[data-theme="night"] .customer-multi-filter-option {
  color: #c7d8ea;
}

body[data-theme="night"] .customer-multi-filter-option:hover,
body[data-theme="night"] .customer-multi-filter-option:focus-within {
  color: #eef5ff;
  background: rgba(47, 118, 255, 0.14);
}

body[data-theme="night"] .customer-multi-filter-option-count {
  background: rgba(47, 118, 255, 0.16);
  color: #aecdff;
}

body[data-theme="night"] .customer-multi-filter-empty {
  color: #8ea2b7;
}

body[data-theme="night"] .selection-bulk-arrow,
body[data-theme="night"] .table-filter-head > span {
  color: #8ea4ba;
}

body[data-theme="night"] .selection-bulk-menu {
  border-color: #27405a;
  background: rgba(16, 28, 42, 0.98);
  box-shadow: 0 20px 40px rgba(5, 14, 24, 0.42);
}

body[data-theme="night"] .selection-bulk-option {
  color: #cfdeed;
}

body[data-theme="night"] .selection-bulk-option:hover,
body[data-theme="night"] .selection-bulk-option:focus-visible {
  color: #9fc1ff;
  background: rgba(47, 118, 255, 0.16);
}

body[data-theme="night"] .customer-filter-field > span {
  color: #8ea4ba;
}

body[data-theme="night"] .customer-level-badge.level-a { color: #79e2c3; background: rgba(28, 113, 93, 0.22); border-color: rgba(84, 191, 160, 0.24); }
body[data-theme="night"] .customer-level-badge.level-b { color: #93b7ff; background: rgba(47, 118, 255, 0.16); border-color: rgba(99, 151, 255, 0.24); }
body[data-theme="night"] .customer-level-badge.level-c { color: #baaaff; background: rgba(111, 92, 214, 0.18); border-color: rgba(148, 126, 255, 0.24); }
body[data-theme="night"] .customer-level-badge.level-d { color: #f1c777; background: rgba(194, 130, 28, 0.2); border-color: rgba(241, 184, 79, 0.2); }
body[data-theme="night"] .customer-level-badge.level-e { color: #f0a4ae; background: rgba(181, 82, 100, 0.2); border-color: rgba(233, 139, 154, 0.22); }

body[data-theme="night"] .bar-track,
body[data-theme="night"] .channel-line,
body[data-theme="night"] .progress-track {
  background: #1b2b3c;
}

body[data-theme="night"] .customer-logo,
body[data-theme="night"] .detail-pill,
body[data-theme="night"] .country-code,
body[data-theme="night"] .portrait-chip,
body[data-theme="night"] .detail-mini-card,
body[data-theme="night"] .customer-signal-meta span,
body[data-theme="night"] .customer-view-top span,
body[data-theme="night"] .dashboard-date-mode-list,
body[data-theme="night"] .dashboard-calendar-shift,
body[data-theme="night"] .dashboard-calendar-shortcut,
body[data-theme="night"] .kanban-count,
body[data-theme="night"] .advance-button,
body[data-theme="night"] .import-step-index,
body[data-theme="night"] .task-filter-row .filter-pill {
  color: #c8d6e6;
  background: #142230;
}

body[data-theme="night"] .public-pool-customer-meta .claim-lock {
  color: #ffe2a7;
  background: rgba(190, 126, 28, 0.22);
}

body[data-theme="night"] .detail-hero,
body[data-theme="night"] .portrait-detail,
body[data-theme="night"] .approval-rules div,
body[data-theme="night"] .integration-card,
body[data-theme="night"] .metric-card,
body[data-theme="night"] .customer-view-item,
body[data-theme="night"] .customer-signal-card,
body[data-theme="night"] .priority-kpi-card,
body[data-theme="night"] .focus-summary-card,
body[data-theme="night"] .priority-feed-item,
body[data-theme="night"] .dashboard-queue-item,
body[data-theme="night"] .portrait-summary-card,
body[data-theme="night"] .deal-card,
body[data-theme="night"] .import-summary-card,
body[data-theme="night"] .review-card,
body[data-theme="night"] .import-audit-item,
body[data-theme="night"] .public-pool-rule-card,
body[data-theme="night"] .public-pool-config-card,
body[data-theme="night"] .public-pool-summary-card,
body[data-theme="night"] .public-pool-customer-card,
body[data-theme="night"] .public-pool-audit-item,
body[data-theme="night"] .intel-card,
body[data-theme="night"] .task-filter-row,
body[data-theme="night"] .import-stepper-shell,
body[data-theme="night"] .import-control-card,
body[data-theme="night"] .import-table-panel,
body[data-theme="night"] .import-side-panel,
body[data-theme="night"] .review-panel {
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .priority-feed-item,
body[data-theme="night"] .dashboard-queue-item {
  border-color: #26445d;
  background:
    linear-gradient(90deg, rgba(75, 156, 211, 0.10), transparent 42%),
    linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .priority-feed-item.high,
body[data-theme="night"] .dashboard-queue-item.high,
body[data-theme="night"] .public-pool-audit-item.warning,
body[data-theme="night"] .rejected,
body[data-theme="night"] .blocked {
  border-color: #5b3040;
  background:
    linear-gradient(90deg, rgba(255, 82, 112, 0.12), transparent 42%),
    linear-gradient(180deg, #1a1218 0%, #121018 100%);
}

body[data-theme="night"] .priority-feed-item.medium,
body[data-theme="night"] .dashboard-queue-item.medium,
body[data-theme="night"] .public-pool-audit-item.recycle,
body[data-theme="night"] .pending {
  border-color: #5e4724;
  background:
    linear-gradient(90deg, rgba(255, 179, 64, 0.12), transparent 42%),
    linear-gradient(180deg, #1b1610 0%, #12100d 100%);
}

body[data-theme="night"] .dashboard-queue-item.low,
body[data-theme="night"] .public-pool-audit-item.claim,
body[data-theme="night"] .approved,
body[data-theme="night"] .released,
body[data-theme="night"] .import-status.imported,
body[data-theme="night"] .integration-status.active {
  border-color: #24485b;
  background:
    linear-gradient(90deg, rgba(75, 156, 211, 0.14), transparent 42%),
    linear-gradient(180deg, #101c29 0%, #0d1823 100%);
}

body[data-theme="night"] .priority-feed-top small,
body[data-theme="night"] .dashboard-queue-top small {
  border-color: #253d53;
  color: #a8bfd7;
  background: rgba(18, 32, 45, 0.78);
}

body[data-theme="night"] .customer-view-item.active,
body[data-theme="night"] .detail-tab.active,
body[data-theme="night"] .portrait-card.active,
body[data-theme="night"] .dashboard-date-mode.active,
body[data-theme="night"] .dashboard-menu-item.active,
body[data-theme="night"] .filter-pill.active,
body[data-theme="night"] .import-step.active {
  border-color: #345a82;
  color: #8cc8ff;
  background: #16283a;
  box-shadow: none;
}

body[data-theme="night"] .detail-tab.active {
  border-color: transparent;
  background: transparent;
  color: #9dd3ff;
}

body[data-theme="night"] .detail-tabs {
  gap: 10px;
  padding-top: 16px;
  border-bottom-color: #1d3044;
  background: transparent;
}

body[data-theme="night"] .detail-tab {
  border-color: transparent;
  color: #94a8bc;
  background: transparent;
}

body[data-theme="night"] .detail-tab:hover {
  color: #dce7f2;
  background: transparent;
}

body[data-theme="night"] .user-profile-main-card,
body[data-theme="night"] .user-profile-card,
body[data-theme="night"] .user-summary-item,
body[data-theme="night"] .user-role-list li,
body[data-theme="night"] .user-security-status-item,
body[data-theme="night"] .security-verification-target-card,
body[data-theme="night"] .security-verification-demo-code,
body[data-theme="night"] .user-toggle-row,
body[data-theme="night"] .user-login-record-item,
body[data-theme="night"] .user-admin-stat-card,
body[data-theme="night"] .user-admin-permissions,
body[data-theme="night"] .user-admin-permission-item,
body[data-theme="night"] .login-aside,
body[data-theme="night"] .login-card,
body[data-theme="night"] .login-highlight-card,
body[data-theme="night"] .login-policy-card,
body[data-theme="night"] .login-helper {
  border-color: #22364c;
  background: linear-gradient(180deg, #0f1a27 0%, #122031 100%);
  box-shadow: none;
}

body[data-theme="night"] .user-role-list li.is-active {
  border-color: #2d5c72;
  background: linear-gradient(180deg, #132736 0%, #152c35 100%);
}

body[data-theme="night"] .user-security-status-badge {
  border-color: #29425d;
  background: rgba(59, 130, 246, 0.12);
  color: #e8f2ff !important;
}

body[data-theme="night"] .user-security-status-badge.is-ok {
  border-color: #245a4b;
  color: #8ee2ca !important;
  background: rgba(33, 160, 131, 0.16);
}

body[data-theme="night"] .user-profile-card-head strong,
body[data-theme="night"] .user-role-list li strong,
body[data-theme="night"] .user-summary-item strong,
body[data-theme="night"] .user-security-status-item strong,
body[data-theme="night"] .security-verification-target-card strong,
body[data-theme="night"] .security-verification-demo-code code,
body[data-theme="night"] .user-toggle-row strong,
body[data-theme="night"] .user-login-record-top strong,
body[data-theme="night"] .user-admin-stat-card strong,
body[data-theme="night"] .user-admin-account-cell strong,
body[data-theme="night"] .user-admin-contact-cell span,
body[data-theme="night"] .user-admin-permission-item strong,
body[data-theme="night"] .login-brand strong,
body[data-theme="night"] .login-highlight-card strong,
body[data-theme="night"] .login-policy-card strong,
body[data-theme="night"] .login-card-body h2,
body[data-theme="night"] .login-helper strong {
  color: #edf4ff;
}

body[data-theme="night"] .user-role-list li span,
body[data-theme="night"] .user-summary-item span,
body[data-theme="night"] .user-security-status-item span,
body[data-theme="night"] .user-security-delivery-note,
body[data-theme="night"] .security-verification-target-card span,
body[data-theme="night"] .security-verification-target-card small,
body[data-theme="night"] .security-verification-demo-code span,
body[data-theme="night"] .user-toggle-row small,
body[data-theme="night"] .user-inline-note,
body[data-theme="night"] .user-admin-stat-card span,
body[data-theme="night"] .user-admin-stat-card small,
body[data-theme="night"] .user-admin-account-cell span,
body[data-theme="night"] .user-admin-contact-cell small,
body[data-theme="night"] .user-admin-inline-note,
body[data-theme="night"] .user-admin-empty p,
body[data-theme="night"] .user-admin-feedback,
body[data-theme="night"] .user-admin-permission-item small,
body[data-theme="night"] .user-login-record-top span,
body[data-theme="night"] .user-login-record-meta span,
body[data-theme="night"] .user-login-record-main p,
body[data-theme="night"] .login-brand span,
body[data-theme="night"] .login-copy p,
body[data-theme="night"] .login-highlight-card span,
body[data-theme="night"] .login-highlight-card p,
body[data-theme="night"] .login-policy-card span,
body[data-theme="night"] .login-policy-card p,
body[data-theme="night"] .login-card-body p,
body[data-theme="night"] .login-footer,
body[data-theme="night"] .login-helper,
body[data-theme="night"] .login-remember {
  color: #9fb4c8;
}

body[data-theme="night"] .user-admin-search-input {
  border-color: #22364c;
  color: #e6eef8;
  background: #101b29;
}

body[data-theme="night"] .user-admin-search-input::placeholder {
  color: #7f93a8;
}

body[data-theme="night"] .user-admin-role-chip,
body[data-theme="night"] .user-admin-mini-chip {
  color: #c8d6e6;
  background: #142230;
}

body[data-theme="night"] .user-admin-verification-chip {
  border-color: #20364d;
  background: #111e2c;
}

body[data-theme="night"] .user-admin-verification-chip b {
  color: #c9d8e8;
}

body[data-theme="night"] .user-admin-verification-chip em {
  color: #94a8bd;
}

body[data-theme="night"] .user-admin-verification-chip.verified {
  border-color: rgba(37, 177, 142, 0.32);
  background: rgba(22, 128, 103, 0.14);
}

body[data-theme="night"] .user-admin-verification-chip.verified em {
  color: #7ee0c2;
}

body[data-theme="night"] .user-admin-verification-chip.pending {
  border-color: rgba(217, 151, 37, 0.34);
  background: rgba(217, 151, 37, 0.13);
}

body[data-theme="night"] .user-admin-verification-chip.pending em {
  color: #e6bd68;
}

body[data-theme="night"] .user-admin-verification-chip.missing {
  border-color: #24384d;
  background: #132231;
}

body[data-theme="night"] .user-admin-verification-chip.missing em {
  color: #8fa3b8;
}

body[data-theme="night"] .user-admin-password-callout {
  border-color: #28415a;
  background: linear-gradient(180deg, #122132 0%, #0f1b2a 100%);
  box-shadow: inset 0 1px 0 rgba(150, 190, 235, 0.06);
}

body[data-theme="night"] .password-visibility-toggle {
  color: #9db1c4;
}

body[data-theme="night"] .password-visibility-toggle:hover,
body[data-theme="night"] .password-visibility-toggle:focus-visible {
  color: #edf7ff;
}

body[data-theme="night"] .password-visibility-toggle[aria-pressed="true"] {
  color: #d7e7f8;
}

body[data-theme="night"] .user-admin-password-badge {
  color: #8ebdff;
  background: rgba(44, 97, 177, 0.2);
}

body[data-theme="night"] .user-admin-password-copy strong {
  color: #eef4fb;
}

body[data-theme="night"] .user-admin-password-copy p {
  color: #a7bacd;
}

body[data-theme="night"] .user-admin-role-chip b {
  color: #8cc8ff;
}

body[data-theme="night"] .user-admin-status-pill.active {
  color: #8ce0cf;
  background: rgba(19, 110, 92, 0.22);
}

body[data-theme="night"] .user-admin-status-pill.frozen {
  color: #ffc1c7;
  background: rgba(139, 57, 76, 0.24);
}

body.login-page[data-theme="night"] {
  background:
    radial-gradient(circle at top left, rgba(20, 113, 99, 0.24), transparent 30%),
    radial-gradient(circle at bottom right, rgba(47, 118, 255, 0.18), transparent 28%),
    #08111b;
}

body[data-theme="night"] .login-badge {
  color: #7ef0d5;
  background: rgba(10, 148, 124, 0.18);
}

body[data-theme="night"] .login-theme-switcher {
  background: transparent;
  box-shadow: none;
}

body[data-theme="night"] .login-theme-button {
  color: #9eb4c9;
}

body[data-theme="night"] .login-theme-button:hover,
body[data-theme="night"] .login-theme-button:focus-visible {
  color: #8cc8ff;
  border-color: #355577;
  background: linear-gradient(180deg, #152434 0%, #112030 100%);
  box-shadow: 0 10px 20px rgba(3, 10, 18, 0.24);
}

body[data-theme="night"] .login-theme-button.active {
  color: #8cc8ff;
  border-color: #345a82;
  background: linear-gradient(180deg, #16283a 0%, #142333 100%);
  box-shadow: inset 0 0 0 1px rgba(140, 200, 255, 0.08);
}

body[data-theme="night"] .login-password-toggle {
  color: #a4b7cb;
}

body[data-theme="night"] .login-password-toggle:hover,
body[data-theme="night"] .login-password-toggle:focus-visible {
  color: #edf7ff;
}

body[data-theme="night"] .login-password-toggle[aria-pressed="true"] {
  color: #dce8f5;
}

body[data-theme="night"] .login-reset-step-card,
body[data-theme="night"] .login-reset-target-card {
  border-color: rgba(103, 154, 217, 0.22);
  background: linear-gradient(135deg, rgba(42, 80, 130, 0.34), rgba(31, 79, 83, 0.22));
}

body[data-theme="night"] .login-reset-step-card strong,
body[data-theme="night"] .login-reset-target-card strong {
  color: #edf7ff;
}

body[data-theme="night"] .login-reset-step-card p,
body[data-theme="night"] .login-reset-target-card small,
body[data-theme="night"] .login-reset-target-card span {
  color: #a7bad0;
}

body[data-theme="night"] .login-divider::before {
  border-color: #22364c;
}

body[data-theme="night"] .login-divider span {
  background: #0f1a27;
}

body[data-theme="night"] .import-step.done {
  border-color: #275346;
  background: #10241d;
}

body[data-theme="night"] .dashboard-date-popover,
body[data-theme="night"] .dashboard-menu,
body[data-theme="night"] .dashboard-calendar-panel {
  border-color: #22364c;
  background: #0f1a27;
}

body[data-theme="night"] .dashboard-calendar-day {
  color: #dce7f2;
  background: #132131;
}

body[data-theme="night"] .dashboard-calendar-day.muted {
  color: #607488;
  background: #101b28;
}

body[data-theme="night"] .dashboard-calendar-day.today {
  border-color: #345a82;
}

body[data-theme="night"] .dashboard-date-mode-list {
  border-color: #27445f;
  background: rgba(18, 34, 48, 0.92);
}

body[data-theme="night"] .dashboard-date-mode {
  color: #91a8bf;
}

body[data-theme="night"] .dashboard-date-mode:hover,
body[data-theme="night"] .dashboard-date-mode.active {
  color: #bfe1ff;
  background: #18314a;
  box-shadow: inset 0 0 0 1px rgba(114, 169, 224, 0.08);
}

body[data-theme="night"] .dashboard-calendar-shift {
  border-color: #35536f;
  color: #dce7f2;
  background: #142230;
}

body[data-theme="night"] .dashboard-calendar-shift:hover {
  border-color: #4b75a0;
  color: #eef7ff;
  background: #172c40;
}

body[data-theme="night"] .dashboard-calendar-footer {
  border-top-color: #22364c;
}

body[data-theme="night"] .dashboard-calendar-shortcut {
  border-color: #35536f;
  color: #dce7f2;
  background: #142230;
}

body[data-theme="night"] .dashboard-calendar-shortcut:hover {
  border-color: #4b75a0;
  color: #eef7ff;
  background: #172c40;
}

body[data-theme="night"] .dashboard-calendar-weekdays span,
body[data-theme="night"] .dashboard-date-summary,
body[data-theme="night"] .dashboard-calendar-footer span,
body[data-theme="night"] .funnel-row em,
body[data-theme="night"] .priority-kpi-card span,
body[data-theme="night"] .focus-summary-card span,
body[data-theme="night"] .priority-kpi-card small,
body[data-theme="night"] .focus-summary-card small,
body[data-theme="night"] .priority-feed-top small,
body[data-theme="night"] .dashboard-queue-top small,
body[data-theme="night"] .priority-feed-item p,
body[data-theme="night"] .dashboard-queue-item p,
body[data-theme="night"] .public-pool-rule-head span,
body[data-theme="night"] .public-pool-config-card span,
body[data-theme="night"] .public-pool-summary-card span,
body[data-theme="night"] .public-pool-config-card small,
body[data-theme="night"] .public-pool-summary-card small,
body[data-theme="night"] .public-pool-customer-card p,
body[data-theme="night"] .public-pool-audit-top span,
body[data-theme="night"] .public-pool-audit-item p,
body[data-theme="night"] .portrait-summary-card span,
body[data-theme="night"] .portrait-summary-card small,
body[data-theme="night"] .portrait-card p,
body[data-theme="night"] .portrait-card-meta,
body[data-theme="night"] .portrait-detail-copy,
body[data-theme="night"] .portrait-filter-note,
body[data-theme="night"] .portrait-detail-list li,
body[data-theme="night"] .deal-card p,
body[data-theme="night"] .kanban-head,
body[data-theme="night"] .approval-rules span,
body[data-theme="night"] .approval-reason,
body[data-theme="night"] .import-step-copy small,
body[data-theme="night"] .import-control-card span,
body[data-theme="night"] .import-control-card p,
body[data-theme="night"] .import-summary-card span,
body[data-theme="night"] .import-summary-card small,
body[data-theme="night"] .import-audit-item span,
body[data-theme="night"] .import-audit-item p,
body[data-theme="night"] .review-card-title span,
body[data-theme="night"] .review-card-copy,
body[data-theme="night"] .governance-empty-state p,
body[data-theme="night"] .intel-card span,
body[data-theme="night"] .intel-card small,
body[data-theme="night"] .task-filter-row::after {
  color: #90a4bb;
}

body[data-theme="night"] .priority-feed-item strong,
body[data-theme="night"] .dashboard-queue-item strong,
body[data-theme="night"] .public-pool-rule-head strong,
body[data-theme="night"] .public-pool-config-card strong,
body[data-theme="night"] .public-pool-summary-card strong,
body[data-theme="night"] .public-pool-customer-top strong,
body[data-theme="night"] .public-pool-audit-top strong,
body[data-theme="night"] .portrait-summary-card strong,
body[data-theme="night"] .deal-card h4,
body[data-theme="night"] .import-step-copy strong,
body[data-theme="night"] .import-control-card strong,
body[data-theme="night"] .import-audit-item strong,
body[data-theme="night"] .review-card-title strong,
body[data-theme="night"] .governance-empty-state strong,
body[data-theme="night"] .intel-card strong {
  color: #e6eef8;
}

body[data-theme="night"] .stage,
body[data-theme="night"] .owner {
  box-shadow: none;
}

body[data-theme="night"] .task-check {
  border-color: #2c435b;
  background: #101b29;
}

body[data-theme="night"] .kanban-column {
  background: #101a27;
}

body[data-theme="night"] .kanban-pagination {
  border-top-color: #1d3044;
}

body[data-theme="night"] .merge-policy-grid div,
body[data-theme="night"] .task-list .task-item,
body[data-theme="night"] .approval-row,
body[data-theme="night"] .inquiry-bottom,
body[data-theme="night"] .review-action-row,
body[data-theme="night"] .public-pool-customer-actions,
body[data-theme="night"] .detail-list li,
body[data-theme="night"] .customer-view-strip,
body[data-theme="night"] .task-filter-row,
body[data-theme="night"] .view-toolbar {
  border-color: #1d3044;
}

body[data-theme="night"] .customer-detail-backdrop {
  background: rgba(2, 7, 13, 0.7);
}

body[data-theme="night"] dialog::backdrop {
  background: rgba(2, 7, 13, 0.76);
}

@media (max-width: 1280px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-priority-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .focus-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .customer-intelligence-grid {
    grid-template-columns: 1fr;
  }

  .customer-view-list,
  .public-pool-audit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inquiry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-avatar-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-profile-grid,
  .user-security-grid,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-copy h1 {
    font-size: 34px;
  }

  .login-policy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .customer-detail-panel {
    top: 16px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
    padding: 10px 12px 12px;
    overflow: hidden;
  }

  .brand,
  .sidebar-bottom {
    flex: 0 0 auto;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 16px;
    padding: 5px;
  }

  .theme-switcher {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
    height: 40px;
    max-width: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .theme-switcher-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-template-columns: repeat(3, 20px);
    gap: 6px;
    min-height: 40px;
  }

  .theme-mode-button {
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
    display: inline-grid;
    place-items: center;
    align-self: center;
    line-height: 1;
  }

  .nav-list {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    flex: 0 0 auto;
    min-width: 100%;
    gap: 8px;
    padding-top: 6px;
    overflow-x: auto;
    align-items: stretch;
  }

  .nav-item {
    min-width: 56px;
    min-height: 48px;
    padding: 7px 5px;
    border-radius: 16px;
  }

  .sidebar-bottom {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 0;
    min-width: 0;
    align-self: center;
    justify-self: end;
  }

  .sidebar-bottom > * {
    align-self: center;
  }

  .sidebar-tip {
    display: none;
  }

  .user-card {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    flex: 0 0 40px;
    display: inline-grid;
    place-items: center;
    align-self: center;
    padding: 0;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background: transparent;
    overflow: hidden;
  }

  .avatar {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    flex: 0 0 40px;
    display: inline-grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    padding: 0;
    border-radius: 999px;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    font-size: 9px;
    letter-spacing: -0.2px;
    text-indent: 0.2px;
    line-height: 1;
  }

  .user-card::after,
  .user-card small,
  .user-card strong,
  .dots {
    display: none;
  }

  .main-content {
    padding: 0;
  }

  .topbar {
    position: static;
  }

  .topbar,
  .view.active {
    border-radius: 22px;
  }

  .dashboard-filter-cluster {
    justify-content: flex-end;
  }

  .dashboard-date-popover {
    max-width: calc(100vw - 64px);
  }

  .guide-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .guide-layout,
  .guide-rule-grid,
  .guide-tip-grid {
    grid-template-columns: 1fr;
  }

  #user-profile-modal {
    width: min(100vw - 22px, 960px);
  }

  .user-profile-tabs,
  .user-profile-panels {
    padding-inline: 18px;
  }

  .customer-toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .detail-list-action {
    min-height: 44px;
    padding: 10px;
  }

  .detail-inquiry-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .integration-log-pagination .pagination-button {
    min-height: 44px;
  }

  .sidebar {
    padding: 10px;
    gap: 8px 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 14px;
  }

  .theme-switcher-buttons {
    gap: 4px;
  }

  .nav-list {
    gap: 6px;
    padding-top: 4px;
  }

  .nav-item {
    min-width: 52px;
    min-height: 44px;
    padding: 6px 4px;
    border-radius: 14px;
  }

  .user-card {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    flex: 0 0 40px;
    padding: 0;
  }

  .avatar {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    flex: 0 0 40px;
  }
}

@media (max-width: 700px) {
  .search {
    display: none;
  }

  .topbar {
    padding: 16px;
  }

  .view.active {
    padding: 16px;
  }

  .guide-hero-head {
    grid-template-columns: 1fr;
  }

  .guide-hero-panel {
    padding: 18px 16px 18px;
  }

  .guide-quickstart,
  .guide-role-grid,
  .guide-rule-grid,
  .guide-tip-grid {
    padding: 0 14px 14px;
  }

  .dashboard-filter-cluster {
    width: 100%;
    justify-content: stretch;
  }

  .dashboard-popover-wrap,
  .dashboard-date-button,
  #dashboard-range-trigger {
    width: 100%;
  }

  .dashboard-nav-group {
    width: 100%;
  }

  .dashboard-nav-button {
    flex: 1;
  }

  .dashboard-date-popover,
  .dashboard-menu {
    left: 0;
    right: auto;
    width: min(calc(100vw - 48px), 100%);
    max-width: calc(100vw - 48px);
  }

  .dashboard-date-shell {
    padding: 12px;
  }

  .dashboard-date-topbar {
    align-items: stretch;
  }

  .dashboard-date-mode-list {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-date-mode {
    flex: 1;
    min-width: 0;
  }

  .dashboard-date-summary {
    width: 100%;
  }

  .dashboard-calendar-panel {
    padding: 12px;
  }

  .dashboard-calendar-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-calendar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-calendar-day {
    min-height: 42px;
  }

  .dashboard-calendar-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-calendar-shortcut {
    width: 100%;
  }

  .temporal-picker-popover {
    width: calc(100vw - 24px);
  }

  .temporal-picker-meta,
  .temporal-picker-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .temporal-picker-layout-datetime {
    grid-template-columns: 1fr;
  }

  .temporal-picker-actions {
    width: 100%;
    justify-content: stretch;
  }

  .temporal-picker-action {
    flex: 1 1 0;
  }

  .temporal-time-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .dashboard-priority-grid,
  .metric-grid,
  .dashboard-grid,
  .guide-overview-grid,
  .guide-layout,
  .guide-rule-grid,
  .guide-tip-grid,
  .priority-kpi-grid,
  .focus-summary-grid,
  .portrait-summary-grid,
  .portrait-layout,
  .inquiry-grid,
  .operations-grid,
  .customer-management-shell,
  .customer-intelligence-grid,
  .public-pool-audit-grid,
  .kanban,
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .customer-view-list,
  .public-pool-rule-grid,
  .public-pool-config-grid,
  .public-pool-summary-grid {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .task-list,
  .portrait-summary-grid,
  .portrait-layout,
  .detail-body,
  .detail-kpis,
  .detail-tabs,
  .detail-hero,
  .funnel-bars,
  .table-pagination {
    padding-left: 16px;
    padding-right: 16px;
  }

  .public-pool-panel > .public-pool-rules {
    margin-left: 16px;
    margin-right: 16px;
  }

  .view-toolbar,
  .topbar,
  .section-heading,
  .panel-header {
    gap: 12px;
  }

  .customer-toolbar-copy,
  .customer-toolbar-actions {
    flex-basis: 100%;
  }

  .customer-list-controls {
    grid-template-columns: 1fr;
  }

  .customer-filter-toolbar-shell {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .customer-filter-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .customer-selection-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .customer-selection-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .customer-toolbar-actions {
    justify-content: stretch;
  }

  .customer-toolbar-actions .compact-select,
  .customer-import-entry,
  .customer-export-button {
    width: 100%;
  }

  .customer-toolbar-actions .compact-select {
    min-width: 0;
    flex-basis: 100%;
  }

  .customer-import-entry,
  .customer-export-button {
    justify-content: center;
    text-align: center;
  }

  .rule-hint-inline {
    align-items: flex-start;
    gap: 8px;
  }

  .customer-import-modal-body,
  .customer-import-upload-card {
    padding-inline: 16px;
  }

  .customer-import-intro-card {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-export-modal-body {
    padding-inline: 16px;
  }

  .customer-export-summary-head,
  .customer-export-warning-head {
    flex-direction: column;
  }

  .customer-export-metric-grid {
    grid-template-columns: 1fr;
  }

  .table-pagination,
  .pagination-actions {
    align-items: stretch;
  }

  .pagination-actions {
    width: 100%;
  }

  .pagination-button {
    flex: 1 1 auto;
  }

  .user-profile-tabs,
  .user-profile-panels {
    padding-inline: 14px;
  }

  .user-summary-grid,
  .user-login-summary-grid,
  .login-highlight-grid,
  .login-actions {
    grid-template-columns: 1fr;
  }

  .login-shell {
    padding: 14px;
  }

  .login-aside,
  .login-card {
    border-radius: 24px;
    padding: 22px;
  }

  .login-copy {
    margin-top: 24px;
  }

  .login-copy h1 {
    font-size: 28px;
  }

  .login-card-topbar {
    position: static;
    justify-content: flex-end;
    margin-bottom: 12px;
  }

  .login-theme-switcher {
    width: auto;
  }

  .login-theme-button {
    min-width: 0;
  }
}

.view-intel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.public-pool-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.public-pool-summary-grid,
.public-pool-rule-grid,
.public-pool-config-grid {
  display: grid;
  gap: 12px;
  padding: 0 20px 18px;
}

.public-pool-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-pool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 0 20px 20px;
}

.public-pool-panel > .public-pool-rules {
  margin: 0 20px 20px;
}

.public-pool-rules,
.public-pool-list-panel,
.public-pool-audit-panel {
  border: 1px solid #e6edf5;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.public-pool-rule-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 0;
  padding-bottom: 14px;
}

.public-pool-rule-card,
.public-pool-config-card,
.public-pool-summary-card,
.public-pool-customer-card {
  border: 1px solid #e6edf5;
  border-radius: 16px;
  background: #fff;
}

.public-pool-rule-card,
.public-pool-config-card,
.public-pool-summary-card {
  padding: 16px;
}

.public-pool-rule-head strong,
.public-pool-config-card strong,
.public-pool-summary-card strong,
.public-pool-customer-top strong {
  display: block;
  color: #24364d;
}

.public-pool-rule-head span,
.public-pool-config-card span,
.public-pool-summary-card span,
.public-pool-customer-top span {
  color: #8194aa;
  font-size: 11px;
}

.public-pool-rule-head span,
.public-pool-config-card small,
.public-pool-summary-card small,
.public-pool-customer-card p {
  display: block;
  margin-top: 6px;
  line-height: 1.6;
}

.public-pool-summary-card strong {
  margin-top: 10px;
  font-size: 24px;
}

.public-pool-summary-card small,
.public-pool-config-card small {
  color: #93a4b7;
  font-size: 11px;
}

.public-pool-rule-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.public-pool-rule-list li {
  position: relative;
  padding-left: 14px;
  color: #5f738b;
  font-size: 12px;
  line-height: 1.55;
}

.public-pool-rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}

.public-pool-config-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.public-pool-config-card {
  min-width: 0;
  padding: 14px;
}

.public-pool-config-card strong {
  margin-top: 8px;
  font-size: 16px;
}

.public-pool-config-card small {
  line-height: 1.55;
}

.public-pool-audit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 20px 20px;
}

.public-pool-list {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  max-height: 760px;
  overflow: auto;
}

.public-pool-pagination {
  margin: -4px 16px 16px;
  padding: 12px 2px 0;
  border-top: 1px solid #edf2f7;
}

.dashboard-customer-signal-pagination {
  margin: -6px 20px 18px;
  padding: 12px 0 0;
  border-top: 1px solid #edf2f7;
}

.public-pool-customer-card {
  padding: 16px;
}

.public-pool-customer-top,
.public-pool-customer-actions,
.public-pool-customer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.public-pool-customer-top {
  align-items: flex-start;
}

.public-pool-customer-card p {
  color: #6f8196;
  font-size: 12px;
}

.public-pool-customer-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 12px;
}

.public-pool-customer-meta .claim-lock {
  color: #8a641c;
  background: #fff7e4;
}

.public-pool-customer-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e6edf5;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.public-pool-customer-card.has-open-enhanced-select,
.public-pool-customer-card:has(.enhanced-select.is-open) {
  position: relative;
  z-index: 4;
}

.public-pool-customer-actions.has-open-enhanced-select,
.public-pool-customer-actions:has(.enhanced-select.is-open) {
  align-items: flex-start;
}

.public-pool-customer-actions .enhanced-select.is-open {
  width: min(260px, 100%);
  min-width: min(260px, 100%);
  flex: 0 0 min(260px, 100%);
}

.public-pool-customer-actions .enhanced-select.is-open .enhanced-select-menu {
  position: static;
  width: 100%;
  margin-top: 8px;
}

.public-pool-customer-actions .enhanced-select.is-open .enhanced-select-options {
  max-height: 176px;
}

.public-pool-audit-panel {
  overflow: hidden;
}

.public-pool-audit-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.public-pool-audit-pagination {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: -4px 16px 16px;
  padding: 12px 0 0;
  border-top: 1px solid #edf2f7;
}

.public-pool-audit-pagination .pagination-summary {
  line-height: 1.5;
}

.public-pool-audit-pagination .pagination-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-pool-audit-pagination .pagination-button {
  min-width: 0;
}

.public-pool-audit-item {
  padding: 14px;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #fff;
}

.public-pool-audit-item.claim {
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf8 100%);
}

.public-pool-audit-item.recycle {
  background: linear-gradient(180deg, #ffffff 0%, #fff9f4 100%);
}

.public-pool-audit-item.warning {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf7 100%);
}

.public-pool-audit-top strong {
  color: #24364d;
  font-size: 13px;
}

.public-pool-audit-top span {
  color: #8a9db2;
  font-size: 11px;
}

.public-pool-audit-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

.public-pool-audit-item p {
  margin-top: 10px;
  color: #5f7388;
  font-size: 12px;
  line-height: 1.65;
}

.public-pool-audit-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mini-select {
  min-width: 112px;
  padding-block: 7px;
}

.intel-card {
  padding: 16px 18px;
  border: 1px solid #e6edf5;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.intel-card span {
  color: #7e91a8;
  font-size: 11px;
}

.intel-card strong {
  display: block;
  margin-top: 10px;
  color: #24364d;
  font-size: 24px;
  letter-spacing: -0.5px;
}

.intel-card small {
  display: block;
  margin-top: 6px;
  color: #93a3b7;
  font-size: 11px;
  line-height: 1.55;
}

.task-intel-grid .intel-card:first-child,
.task-intel-grid .intel-card:nth-child(2),
#inquiry-summary-grid .intel-card:first-child,
#inquiry-summary-grid .intel-card:nth-child(2) {
  background: linear-gradient(180deg, #f9fbff 0%, #eef4ff 100%);
}

.task-page-panel,
.order-panel,
.import-center-panel,
.merge-policy-panel {
  overflow: hidden;
}

.task-page-panel {
  border-radius: 22px;
}

.task-filter-row {
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  border-bottom: 1px solid #edf2f7;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.task-filter-row::after {
  content: "点击任务可查看和修改详细信息";
  margin-left: auto;
  color: #95a6ba;
  font-size: 11px;
}

.task-list.large {
  padding-top: 6px;
}

.task-list.large.task-grid-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.task-list.large.task-grid-layout .task-item {
  min-height: 168px;
  padding: 16px;
  border: 1px solid #e7eef7;
  border-bottom: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 10px 24px rgba(104, 138, 173, 0.08);
  grid-template-columns: 18px minmax(0, 1fr);
  align-content: start;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.task-list.large.task-grid-layout .task-item:hover,
.task-list.large.task-grid-layout .task-item:focus-within {
  border-color: #c9daf0;
  box-shadow: 0 16px 30px rgba(24, 45, 77, 0.10);
  transform: translateY(-2px);
}

.task-list.large.task-grid-layout .task-main-stack {
  align-items: flex-start;
  gap: 6px;
}

.task-list.large.task-grid-layout .task-card-stack > * {
  align-self: flex-start;
}

.task-list.large.task-grid-layout .task-main-button {
  padding: 0;
}

.task-list.large.task-grid-layout .task-name {
  font-size: 15px;
  line-height: 1.35;
}

.task-list.large.task-grid-layout .task-detail {
  width: 100%;
  max-width: none;
  margin-top: 0;
  font-size: 12px;
}

.task-list.large.task-grid-layout .task-customer-button,
.task-list.large.task-grid-layout .task-assignee,
.task-list.large.task-grid-layout .task-time-inline {
  font-size: 11px;
}

.task-list.large.task-grid-layout .task-check {
  margin-top: 2px;
}

.task-list.large:not(.task-grid-layout) .task-item {
  padding: 16px 4px;
}

.task-list.large:not(.task-grid-layout) .task-main-button {
  padding: 4px 6px;
}

.task-list.large:not(.task-grid-layout) .task-name {
  font-size: 15px;
}

.task-list.large:not(.task-grid-layout) .task-detail {
  max-width: 560px;
}

@media (max-width: 1180px) {
  .task-list.large.task-grid-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .inquiry-approval-card {
    grid-template-columns: 1fr;
  }

  .inquiry-approval-toggle {
    display: grid;
  }

  .inquiry-approval-toggle-meta {
    flex-wrap: wrap;
    white-space: normal;
  }

  .inquiry-approval-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .governance-collapsible-head,
  .governance-filter-row,
  .duplicate-review-summary,
  .duplicate-review-row {
    grid-template-columns: 1fr;
  }

  .governance-collapsible-head,
  .governance-filter-row {
    display: grid;
  }

  .governance-head-actions {
    justify-content: flex-start;
    white-space: normal;
  }

  .duplicate-review-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .duplicate-review-cell:last-child {
    border-bottom: 0;
  }

  .task-list.large.task-grid-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }
}

.inquiry-grid {
  gap: 12px;
}

#inquiry-pagination {
  margin-top: 14px;
  padding: 14px 2px 0;
}

.inquiry-card {
  position: relative;
  overflow: hidden;
}

.inquiry-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 18px 0 0 18px;
  background: linear-gradient(180deg, #2f76ff 0%, #7aa6ff 100%);
}

.inquiry-card-top,
.approval-row,
.inquiry-bottom {
  position: relative;
  z-index: 1;
}

.approval-rules {
  margin-bottom: 14px;
}

.operations-grid {
  margin-bottom: 14px;
}

.detail-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-header-actions .danger-button {
  box-shadow: none;
}

.detail-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.detail-focus-item {
  padding: 14px 15px;
  border: 1px solid #e4ebf5;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.detail-focus-item span {
  display: block;
  color: #8ba0b6;
  font-size: 10px;
}

.detail-focus-item strong {
  display: block;
  margin-top: 7px;
  color: #24364d;
  font-size: 16px;
}

.detail-focus-item small {
  display: block;
  margin-top: 6px;
  color: #74889e;
  font-size: 11px;
  line-height: 1.55;
}

.detail-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.detail-mini-card {
  border: 1px solid #ebf1f7;
  background: #fbfdff;
}

:is(
  .guide-hero-aside-block,
  .guide-overview-card,
  .guide-step,
  .guide-role-card,
  .guide-tip-card,
  .guide-rule-card,
  .metric-card,
  .priority-kpi-card,
  .focus-summary-card,
  .priority-feed-item,
  .dashboard-queue-item,
  .portrait-summary-card,
  .customer-view-item,
  .customer-signal-card,
  .portrait-card,
  .detail-card,
  .detail-kpi-card,
  .detail-mini-card,
  .detail-focus-item,
  .operation-card,
  .intel-card,
  .inquiry-card,
  .integration-card,
  .import-summary-card,
  .import-stepper-shell,
  .import-step,
  .import-control-card,
  .import-table-panel,
  .import-side-panel,
  .review-panel,
  .import-audit-item,
  .review-card,
  .approval-rules div,
  .channel-card-button,
  .public-pool-rule-card,
  .public-pool-config-card,
  .public-pool-summary-card,
  .public-pool-customer-card,
  .public-pool-audit-item,
  .user-profile-card,
  .user-summary-item,
  .user-role-list li,
  .user-security-status-item,
  .user-toggle-row,
  .user-login-record-item
) {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

:is(
  .guide-hero-aside-block,
  .guide-overview-card,
  .guide-step,
  .guide-role-card,
  .guide-tip-card,
  .guide-rule-card,
  .metric-card,
  .priority-kpi-card,
  .focus-summary-card,
  .priority-feed-item,
  .dashboard-queue-item,
  .portrait-summary-card,
  .customer-view-item,
  .customer-signal-card,
  .portrait-card,
  .detail-card,
  .detail-kpi-card,
  .detail-mini-card,
  .detail-focus-item,
  .operation-card,
  .intel-card,
  .inquiry-card,
  .integration-card,
  .import-summary-card,
  .import-stepper-shell,
  .import-step,
  .import-control-card,
  .import-table-panel,
  .import-side-panel,
  .review-panel,
  .import-audit-item,
  .review-card,
  .approval-rules div,
  .channel-card-button,
  .public-pool-rule-card,
  .public-pool-config-card,
  .public-pool-summary-card,
  .public-pool-customer-card,
  .public-pool-audit-item,
  .user-profile-card,
  .user-summary-item,
  .user-role-list li,
  .user-security-status-item,
  .user-toggle-row,
  .user-login-record-item
):hover,
:is(
  .guide-hero-aside-block,
  .guide-overview-card,
  .guide-step,
  .guide-role-card,
  .guide-tip-card,
  .guide-rule-card,
  .metric-card,
  .priority-kpi-card,
  .focus-summary-card,
  .priority-feed-item,
  .dashboard-queue-item,
  .portrait-summary-card,
  .customer-view-item,
  .customer-signal-card,
  .portrait-card,
  .detail-card,
  .detail-kpi-card,
  .detail-mini-card,
  .detail-focus-item,
  .operation-card,
  .intel-card,
  .inquiry-card,
  .integration-card,
  .import-summary-card,
  .import-stepper-shell,
  .import-step,
  .import-control-card,
  .import-table-panel,
  .import-side-panel,
  .review-panel,
  .import-audit-item,
  .review-card,
  .approval-rules div,
  .channel-card-button,
  .public-pool-rule-card,
  .public-pool-config-card,
  .public-pool-summary-card,
  .public-pool-customer-card,
  .public-pool-audit-item,
  .user-profile-card,
  .user-summary-item,
  .user-role-list li,
  .user-security-status-item,
  .user-toggle-row,
  .user-login-record-item
):focus-within {
  border-color: #c9daf0;
  box-shadow: 0 16px 30px rgba(24, 45, 77, 0.10);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  :is(
    .guide-hero-aside-block,
    .guide-overview-card,
    .guide-step,
    .guide-role-card,
    .guide-tip-card,
    .guide-rule-card,
    .metric-card,
    .priority-kpi-card,
    .focus-summary-card,
    .priority-feed-item,
    .dashboard-queue-item,
    .portrait-summary-card,
    .customer-view-item,
    .customer-signal-card,
    .portrait-card,
    .detail-card,
    .detail-kpi-card,
    .detail-mini-card,
    .detail-focus-item,
    .operation-card,
    .intel-card,
    .inquiry-card,
    .integration-card,
    .import-summary-card,
    .import-stepper-shell,
    .import-step,
    .import-control-card,
    .import-table-panel,
    .import-side-panel,
    .review-panel,
    .import-audit-item,
    .review-card,
    .approval-rules div,
    .channel-card-button,
    .public-pool-rule-card,
    .public-pool-config-card,
    .public-pool-summary-card,
    .public-pool-customer-card,
    .public-pool-audit-item,
    .user-profile-card,
    .user-summary-item,
    .user-role-list li,
    .user-security-status-item,
    .user-toggle-row,
    .user-login-record-item
  ) {
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  }

  :is(
    .guide-hero-aside-block,
    .guide-overview-card,
    .guide-step,
    .guide-role-card,
    .guide-tip-card,
    .guide-rule-card,
    .metric-card,
    .priority-kpi-card,
    .focus-summary-card,
    .priority-feed-item,
    .dashboard-queue-item,
    .portrait-summary-card,
    .customer-view-item,
    .customer-signal-card,
    .portrait-card,
    .detail-card,
    .detail-kpi-card,
    .detail-mini-card,
    .detail-focus-item,
    .operation-card,
    .intel-card,
    .inquiry-card,
    .integration-card,
    .import-summary-card,
    .import-stepper-shell,
    .import-step,
    .import-control-card,
    .import-table-panel,
    .import-side-panel,
    .review-panel,
    .import-audit-item,
    .review-card,
    .approval-rules div,
    .channel-card-button,
    .public-pool-rule-card,
    .public-pool-config-card,
    .public-pool-summary-card,
    .public-pool-customer-card,
    .public-pool-audit-item,
    .user-profile-card,
    .user-summary-item,
    .user-role-list li,
    .user-security-status-item,
    .user-toggle-row,
    .user-login-record-item
  ):hover,
  :is(
    .guide-hero-aside-block,
    .guide-overview-card,
    .guide-step,
    .guide-role-card,
    .guide-tip-card,
    .guide-rule-card,
    .metric-card,
    .priority-kpi-card,
    .focus-summary-card,
    .priority-feed-item,
    .dashboard-queue-item,
    .portrait-summary-card,
    .customer-view-item,
    .customer-signal-card,
    .portrait-card,
    .detail-card,
    .detail-kpi-card,
    .detail-mini-card,
    .detail-focus-item,
    .operation-card,
    .intel-card,
    .inquiry-card,
    .integration-card,
    .import-summary-card,
    .import-stepper-shell,
    .import-step,
    .import-control-card,
    .import-table-panel,
    .import-side-panel,
    .review-panel,
    .import-audit-item,
    .review-card,
    .approval-rules div,
    .channel-card-button,
    .public-pool-rule-card,
    .public-pool-config-card,
    .public-pool-summary-card,
    .public-pool-customer-card,
    .public-pool-audit-item,
    .user-profile-card,
    .user-summary-item,
    .user-role-list li,
    .user-security-status-item,
    .user-toggle-row,
    .user-login-record-item
  ):focus-within {
    transform: none;
  }
}

body[data-theme="night"] .detail-focus-item {
  border-color: #22364c;
  background: linear-gradient(180deg, rgba(20, 34, 48, 0.94) 0%, rgba(15, 27, 39, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(142, 162, 183, 0.04);
}

body[data-theme="night"] .detail-focus-item span {
  color: #8ea2b7;
}

body[data-theme="night"] .detail-focus-item strong {
  color: #e6eef8;
}

body[data-theme="night"] .detail-focus-item small {
  color: #93a9be;
}

.order-tabs .filter-pill {
  padding-inline: 12px;
}

.integration-card.wide {
  align-items: flex-start;
}

.merge-policy-grid div {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

body[data-theme="night"] .operation-card {
  border-color: #1d3044;
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .operation-card span,
body[data-theme="night"] .merge-policy-grid strong {
  color: #8ea2b7;
}

body[data-theme="night"] .operation-card strong {
  color: #e6eef8;
}

body[data-theme="night"] .operation-card small {
  color: #90a4bb;
}

body[data-theme="night"] .integration-config-panel,
body[data-theme="night"] .integration-side-panel,
body[data-theme="night"] .integration-check-item,
body[data-theme="night"] .integration-setup-item {
  border-color: #1d3044;
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .integration-log-item {
  border-color: #1e344a;
  background: #0f1b29;
  box-shadow: inset 0 1px 0 rgba(148, 180, 214, 0.04);
}

body[data-theme="night"] .integration-config-grid label span,
body[data-theme="night"] .integration-setup-item span,
body[data-theme="night"] .integration-check-item span,
body[data-theme="night"] .integration-config-alert,
body[data-theme="night"] .integration-check-item p,
body[data-theme="night"] .integration-inline-code {
  color: #8ea2b7;
}

body[data-theme="night"] .integration-setup-item strong,
body[data-theme="night"] .integration-check-item strong,
body[data-theme="night"] .integration-log-title {
  color: #e6eef8;
}

body[data-theme="night"] .integration-log-detail {
  color: #9aadc0;
}

body[data-theme="night"] .integration-card-meta span {
  color: #a5b8cb;
  background: #142438;
}

body[data-theme="night"] .mail-integration-modal .panel-header {
  background: rgba(13, 23, 35, .96);
}

body[data-theme="night"] .mail-help-strip {
  border-color: #21384f;
  background: linear-gradient(135deg, #101e2d 0%, #12283d 100%);
}

body[data-theme="night"] .integration-log-overview {
  border-color: #21384f;
  background: linear-gradient(135deg, #101e2d 0%, #12283d 100%);
}

body[data-theme="night"] .integration-log-overview p {
  color: #9aadc0;
}

body[data-theme="night"] .mail-help-copy span {
  color: #8ea8c3;
}

body[data-theme="night"] .mail-help-copy strong {
  color: #e1edf8;
}

body[data-theme="night"] .mail-help-links a {
  border-color: #29445f;
  color: #a9cff2;
  background: rgba(12, 24, 37, .78);
}

body[data-theme="night"] .mail-help-links a:hover,
body[data-theme="night"] .mail-help-links a:focus-visible {
  border-color: #4d7299;
  color: #d6ebff;
  background: #10253a;
}

body[data-theme="night"] .integration-log-time {
  color: #a5b8cb;
  background: #15283b;
}

body[data-theme="night"] .integration-log-pagination .pagination-summary {
  color: #8ea2b7;
}

body[data-theme="night"] .integration-config-panel input,
body[data-theme="night"] .integration-config-panel select,
body[data-theme="night"] .integration-config-panel textarea {
  border-color: #22364c;
  color: #dce7f2;
  background: #101b29;
}

body[data-theme="night"] .integration-config-panel input::placeholder,
body[data-theme="night"] .integration-config-panel textarea::placeholder {
  color: #8aa0b6;
}

body[data-theme="night"] .integration-checkbox-grid label {
  border-color: #22364c;
  background: #101b29;
}

@media (max-width: 1180px) {
  .integration-workbench-layout,
  .integration-setup-layout {
    grid-template-columns: 1fr;
  }

  .mail-integration-modal {
    width: min(940px, calc(100vw - 28px));
  }
}

@media (max-width: 900px) {
  .integration-summary-grid,
  .integration-config-grid,
  .integration-setup-list,
  .global-integration-log-list {
    grid-template-columns: 1fr;
  }

  .mail-help-strip {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .mail-help-links {
    justify-content: flex-start;
  }
}

body[data-theme="night"] :is(
  .guide-hero-aside-block,
  .guide-overview-card,
  .guide-step,
  .guide-role-card,
  .guide-tip-card,
  .guide-rule-card,
  .metric-card,
  .priority-kpi-card,
  .focus-summary-card,
  .priority-feed-item,
  .dashboard-queue-item,
  .portrait-summary-card,
  .customer-view-item,
  .customer-signal-card,
  .portrait-card,
  .detail-card,
  .detail-kpi-card,
  .detail-mini-card,
  .detail-focus-item,
  .operation-card,
  .intel-card,
  .inquiry-card,
  .integration-card,
  .import-summary-card,
  .import-stepper-shell,
  .import-step,
  .import-control-card,
  .import-table-panel,
  .import-side-panel,
  .review-panel,
  .import-audit-item,
  .review-card,
  .approval-rules div,
  .channel-card-button,
  .public-pool-rule-card,
  .public-pool-config-card,
  .public-pool-summary-card,
  .public-pool-customer-card,
  .public-pool-audit-item,
  .user-profile-card,
  .user-summary-item,
  .user-role-list li,
  .user-security-status-item,
  .user-toggle-row,
  .user-login-record-item
):hover,
body[data-theme="night"] :is(
  .guide-hero-aside-block,
  .guide-overview-card,
  .guide-step,
  .guide-role-card,
  .guide-tip-card,
  .guide-rule-card,
  .metric-card,
  .priority-kpi-card,
  .focus-summary-card,
  .priority-feed-item,
  .dashboard-queue-item,
  .portrait-summary-card,
  .customer-view-item,
  .customer-signal-card,
  .portrait-card,
  .detail-card,
  .detail-kpi-card,
  .detail-mini-card,
  .detail-focus-item,
  .operation-card,
  .intel-card,
  .inquiry-card,
  .integration-card,
  .import-summary-card,
  .import-stepper-shell,
  .import-step,
  .import-control-card,
  .import-table-panel,
  .import-side-panel,
  .review-panel,
  .import-audit-item,
  .review-card,
  .approval-rules div,
  .channel-card-button,
  .public-pool-rule-card,
  .public-pool-config-card,
  .public-pool-summary-card,
  .public-pool-customer-card,
  .public-pool-audit-item,
  .user-profile-card,
  .user-summary-item,
  .user-role-list li,
  .user-security-status-item,
  .user-toggle-row,
  .user-login-record-item
):focus-within {
  border-color: #355577;
  box-shadow: 0 18px 34px rgba(3, 10, 18, 0.28);
}

body[data-theme="night"] .deal-card:hover {
  border-color: #345a82;
  box-shadow: 0 12px 24px rgba(4, 10, 18, 0.28);
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-item:hover,
body[data-theme="night"] .task-list.large.task-grid-layout .task-item:focus-within {
  border-color: #355577;
  box-shadow: 0 18px 34px rgba(3, 10, 18, 0.28);
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-item {
  border-color: #23384d;
  background: linear-gradient(180deg, #162433 0%, #101b29 100%);
  box-shadow: 0 12px 28px rgba(3, 10, 18, 0.24);
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-check {
  border-color: #3a5571;
  background: #0d1824;
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-main-button:hover {
  background: transparent;
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-name {
  color: #eef5ff;
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-detail {
  color: #9eb2c6;
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-customer-button,
body[data-theme="night"] .task-list.large.task-grid-layout .task-assignee,
body[data-theme="night"] .task-list.large.task-grid-layout .task-time-inline {
  color: #8ea2b7;
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-item.done {
  border-color: #1f3144;
  background: linear-gradient(180deg, #13202e 0%, #0d1723 100%);
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-item.done .task-name {
  color: #7f95aa;
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-item.done .task-detail,
body[data-theme="night"] .task-list.large.task-grid-layout .task-item.done .task-customer-button,
body[data-theme="night"] .task-list.large.task-grid-layout .task-item.done .task-assignee,
body[data-theme="night"] .task-list.large.task-grid-layout .task-item.done .task-time-inline {
  color: #6f8397;
}

body[data-theme="night"] .task-list.large.task-grid-layout .task-customer-button:hover,
body[data-theme="night"] .task-list.large.task-grid-layout .task-customer-button:focus-visible,
body[data-theme="night"] .task-list.large.task-grid-layout .task-item.done .task-customer-button:hover,
body[data-theme="night"] .task-list.large.task-grid-layout .task-item.done .task-customer-button:focus-visible {
  outline: none;
  color: var(--customer-link-hover);
  box-shadow: 0 0 0 3px var(--customer-link-focus-ring);
}

body[data-theme="night"] .deal-card:focus-visible {
  border-color: #5c8fc8;
  box-shadow: 0 0 0 3px rgba(92, 143, 200, 0.2);
}

body[data-theme="night"] .deal-delete-button {
  border-color: #22364c;
  color: #8ea2b7;
  background: #101b29;
}

body[data-theme="night"] .deal-delete-button:hover {
  border-color: #8d4b5a;
  color: #ff93a2;
  background: #2a1620;
}

body[data-theme="night"] .deal-delete-button:focus-visible {
  border-color: #b26474;
  box-shadow: 0 0 0 3px rgba(178, 100, 116, 0.22);
}

body[data-theme="night"] .task-intel-grid .intel-card:first-child,
body[data-theme="night"] .task-intel-grid .intel-card:nth-child(2),
body[data-theme="night"] #inquiry-summary-grid .intel-card:first-child,
body[data-theme="night"] #inquiry-summary-grid .intel-card:nth-child(2) {
  border-color: #274261;
  background: linear-gradient(180deg, #13263a 0%, #0f1c2c 100%);
}

body[data-theme="night"] .merge-policy-panel {
  border-color: #1d3044;
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .merge-policy-grid {
  border-top-color: #1d3044;
}

body[data-theme="night"] .merge-policy-grid div {
  border-right-color: #1d3044;
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .merge-policy-grid span {
  color: #6bd1b5;
}

body[data-theme="night"] .customer-governance-panel,
body[data-theme="night"] .customer-governance-review-grid .review-panel,
body[data-theme="night"] .governance-empty-state,
body[data-theme="night"] .customer-governance-policy-grid {
  border-color: #1d3044;
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .governance-count-pill {
  color: #c3d1df;
  background: rgba(142, 162, 183, 0.14);
}

body[data-theme="night"] .governance-count-pill.is-total {
  color: #b9d7ff;
  background: rgba(73, 125, 201, 0.18);
}

body[data-theme="night"] .governance-count-pill.is-pending {
  color: #ffd58a;
  background: rgba(210, 145, 43, 0.18);
}

body[data-theme="night"] .governance-count-pill.is-reviewed {
  color: #8be0ce;
  background: rgba(32, 129, 108, 0.2);
}

body[data-theme="night"] .duplicate-review-summary,
body[data-theme="night"] .duplicate-review-table,
body[data-theme="night"] .duplicate-review-evidence {
  border-color: #1d3044;
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
}

body[data-theme="night"] .duplicate-review-row,
body[data-theme="night"] .duplicate-review-cell {
  border-color: #1d3044;
}

body[data-theme="night"] .duplicate-review-row.is-head .duplicate-review-cell {
  color: #edf4ff;
  background: #132235;
}

body[data-theme="night"] .duplicate-review-cell {
  color: #b8c8d8;
}

body[data-theme="night"] .modal-header,
body[data-theme="night"] .modal-actions {
  border-color: #1d3044;
}

body[data-theme="night"] .modal-actions {
  background: linear-gradient(180deg, #101a28 0%, #0c1520 100%);
}

body[data-theme="night"] .confirm-modal-logo {
  background: #f3f6fb;
  box-shadow: 0 12px 22px rgba(2, 7, 13, 0.22);
}

body[data-theme="night"] .confirm-modal-copy h2 {
  color: #e6eef8;
}

body[data-theme="night"] .confirm-modal-copy p {
  color: #9bb0c5;
}

body[data-theme="night"] .close-button {
  color: #8ea2b7;
}

body[data-theme="night"] .close-button:hover {
  color: #e6eef8;
}

body[data-theme="night"] label input,
body[data-theme="night"] label select,
body[data-theme="night"] textarea,
body[data-theme="night"] input[type="datetime-local"] {
  border-color: #22364c;
  color: #e6eef8;
  background: #101b29;
}

body[data-theme="night"] label input:focus,
body[data-theme="night"] label select:focus,
body[data-theme="night"] textarea:focus,
body[data-theme="night"] input[type="datetime-local"]:focus {
  border-color: #4a78a7;
  box-shadow: 0 0 0 3px rgba(74, 120, 167, 0.18);
}

body[data-theme="night"] label input::placeholder,
body[data-theme="night"] textarea::placeholder {
  color: #7f93a8;
}

body[data-theme="night"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.88) hue-rotate(180deg) brightness(0.98);
}

@media (max-width: 1280px) {
  .view-intel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid-2.contact-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .view-intel-grid,
  .detail-focus-grid {
    grid-template-columns: 1fr;
  }

  .customer-filter-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-clear-filters {
    width: 100%;
    min-height: 42px;
    justify-self: stretch;
  }

  .task-filter-row {
    flex-wrap: wrap;
  }

  .task-filter-row::after {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .customer-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .user-security-status-list {
    grid-template-columns: 1fr;
  }

  .user-security-status-item--action {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .user-security-status-copy {
    justify-content: flex-start;
  }

  .user-security-action-button {
    width: 100%;
  }

  .user-security-toggle-group,
  .user-personal-mailbox-card .user-profile-form-grid {
    grid-template-columns: 1fr;
  }

  #login-password-reset-send {
    justify-self: stretch;
    width: 100%;
  }

  .customer-multi-filter-menu {
    min-width: 0;
  }

  .customer-selection-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .selection-bulk-trigger {
    width: 100%;
    justify-content: space-between;
  }
}

.system-ops-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.system-module-panel { overflow: hidden; }
.system-module-header { align-items: flex-start; }
.system-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.system-summary-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.system-summary-card { min-height: 112px; display: grid; align-content: space-between; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.system-summary-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 59, 82, 0.1); }
.system-summary-card span { color: var(--muted); font-size: 11px; }
.system-summary-card strong { font-size: 22px; letter-spacing: -.4px; }
.system-summary-card small { color: #7d8d9b; line-height: 1.6; }
.system-module-shell { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.backup-module-shell { align-items: start; }
.backup-runtime-status-panel {
  margin-top: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(78, 141, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #fcfeff 0%, #f7fbff 100%);
}
.backup-runtime-status-panel.is-error {
  background:
    radial-gradient(circle at top right, rgba(214, 92, 101, 0.08), transparent 30%),
    linear-gradient(180deg, #fffdfd 0%, #fff7f8 100%);
}
.backup-runtime-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
}
.backup-runtime-status-copy {
  min-width: 0;
}
.backup-runtime-status-copy h4 {
  margin: 4px 0 0;
  color: #203246;
  font-size: 20px;
  letter-spacing: -.3px;
}
.backup-runtime-status-copy p:last-child {
  margin: 10px 0 0;
  color: #667c92;
  font-size: 13px;
  line-height: 1.75;
}
.backup-runtime-status-actions {
  flex: 0 0 auto;
}
.backup-runtime-status-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 20px 20px;
}
.backup-runtime-status-fact {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(205, 219, 236, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}
.backup-runtime-status-fact span {
  color: #7a8fa3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.backup-runtime-status-fact strong {
  color: #23364d;
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}
.system-data-backup-panel { margin-top: 16px; overflow: hidden; }
.system-data-transfer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 16px 16px;
}
.system-data-transfer-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: var(--shadow);
}
.system-data-transfer-copy strong {
  display: block;
  color: #23364d;
  font-size: 17px;
  letter-spacing: -.2px;
}
.system-data-transfer-copy p {
  margin: 8px 0 0;
  color: #70808d;
  font-size: 12px;
  line-height: 1.7;
}
.system-data-transfer-card .primary-button,
.system-data-transfer-card .secondary-button {
  width: 100%;
  justify-content: center;
}
.system-data-transfer-alert {
  margin: 0 16px 16px;
  padding: 12px 14px;
  border: 1px solid #d8e5f7;
  border-radius: 14px;
  color: #49637e;
  background: linear-gradient(180deg, #f5f9ff 0%, #fbfdff 100%);
  font-size: 12px;
  line-height: 1.65;
}
.system-import-warning { margin: 0 22px 8px; }
.system-import-preview-shell {
  display: grid;
  gap: 14px;
  padding: 0 22px 14px;
}
.system-import-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.system-import-preview-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.system-import-preview-card span {
  color: #7f90a2;
  font-size: 11px;
  font-weight: 700;
}
.system-import-preview-card strong {
  color: #23364d;
  font-size: 15px;
  line-height: 1.55;
  word-break: break-word;
}
.system-import-preview-card small {
  color: #70808d;
  font-size: 11px;
  line-height: 1.65;
}
.system-import-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.system-module-column { min-width: 0; }
.system-card-list { display: grid; gap: 12px; margin-top: 12px; }
.system-card-list-padded { padding: 0 16px 16px; margin-top: 0; }
.system-record-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.system-record-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 59, 82, 0.1); }
.system-record-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.system-record-top strong { display: block; }
.system-record-top span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.system-record-card p { margin-top: 12px; color: #70808d; font-size: 12px; line-height: 1.65; }
.system-record-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.backup-runtime-card {
  background:
    radial-gradient(circle at top right, rgba(78, 141, 255, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.backup-runtime-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.backup-runtime-facts {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.backup-runtime-fact {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(205, 219, 236, 0.82);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.92), rgba(255, 255, 255, 0.98));
}
.backup-runtime-fact-label {
  color: #7f91a5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.6;
}
.backup-runtime-fact-value {
  min-width: 0;
  color: #23364d;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}
.backup-runtime-fact-value.is-code {
  font-family: "SFMono-Regular", "JetBrains Mono", "Menlo", "Monaco", monospace;
  font-size: 12px;
}
.backup-runtime-item {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid rgba(205, 219, 236, 0.82);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.92), rgba(255, 255, 255, 0.98));
}
.backup-runtime-item span {
  color: #8092a6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
}
.backup-runtime-item strong {
  min-width: 0;
  color: #23364d;
  font-size: 12px;
  line-height: 1.65;
  word-break: break-word;
}
.backup-runtime-warning {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 92, 101, 0.18);
  border-radius: 14px;
  color: #91515b;
  background: linear-gradient(180deg, rgba(255, 244, 245, 0.96), rgba(255, 251, 252, 0.98));
  font-size: 12px;
  line-height: 1.65;
}
.ai-config-workbench { display: grid; grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.45fr) minmax(300px, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.ai-config-sidebar-panel,
.ai-config-editor-panel,
.ai-config-capability-panel { overflow: hidden; }
.ai-provider-workspace-list { display: grid; gap: 12px; padding: 0 16px 16px; }
.ai-provider-pagination {
  margin: -2px 16px 16px;
  padding: 12px 0 0;
}
.ai-provider-workspace-card {
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: var(--shadow);
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.ai-provider-workspace-card:hover,
.ai-provider-workspace-card:focus-visible {
  border-color: #c8d9ee;
  box-shadow: 0 16px 34px rgba(37, 59, 82, 0.12);
  transform: translateY(-2px);
  outline: none;
}
.ai-provider-workspace-card.selected {
  border-color: rgba(47, 118, 255, 0.3);
  background: linear-gradient(180deg, #f6faff 0%, #ffffff 100%);
  box-shadow: 0 18px 36px rgba(47, 118, 255, 0.14);
}
.ai-provider-workspace-head,
.ai-provider-workspace-meta,
.ai-capability-card-head,
.ai-config-instance-card,
.ai-config-instance-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-provider-workspace-head strong,
.ai-config-instance-copy strong { display: block; color: #23364d; font-size: 18px; letter-spacing: -.3px; }
.ai-provider-workspace-head span { display: block; margin-top: 6px; color: #8a9aab; font-size: 11px; }
.ai-provider-workspace-card p { margin: 0; color: #70808d; font-size: 12px; line-height: 1.7; }
.ai-provider-workspace-meta { justify-content: flex-start; flex-wrap: wrap; }
.ai-config-workbench-alert {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border: 1px solid #d8e5f7;
  border-radius: 14px;
  color: #49637e;
  background: linear-gradient(180deg, #f5f9ff 0%, #fbfdff 100%);
  font-size: 12px;
  line-height: 1.65;
}
.ai-config-editor-shell { display: grid; gap: 14px; padding: 0 16px 16px; }
.ai-config-instance-card {
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}
.ai-config-instance-copy { min-width: 0; display: grid; gap: 6px; }
.ai-config-instance-copy p { margin: 0; color: #70808d; font-size: 12px; line-height: 1.7; }
.ai-config-instance-actions { align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ai-config-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ai-config-field-card,
.ai-config-scenario-card,
.ai-capability-hero-card,
.ai-config-empty-state {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: var(--shadow);
}
.ai-config-field-card { min-height: 110px; display: grid; align-content: space-between; gap: 10px; }
.ai-config-field-card-wide { grid-column: 1 / -1; min-height: 96px; }
.ai-config-field-card span { color: #8798a9; font-size: 11px; }
.ai-config-field-card strong { color: #203246; font-size: 16px; line-height: 1.45; word-break: break-word; }
.ai-config-scenario-card { display: grid; gap: 12px; }
.ai-config-scenario-note { margin: 0; color: #7d8d9c; font-size: 12px; line-height: 1.7; }
.ai-config-empty-state { display: grid; gap: 12px; text-align: left; }
.ai-config-empty-state strong { font-size: 18px; color: #23364d; }
.ai-config-empty-state p,
.ai-config-empty-copy { color: #70808d; font-size: 12px; line-height: 1.7; }
.ai-capability-grid { display: grid; gap: 12px; margin-top: 12px; }
.ai-capability-grid-stacked { padding: 0 16px 16px; margin-top: 0; }
.ai-capability-hero-card { display: grid; gap: 10px; }
.ai-capability-hero-card strong { font-size: 20px; color: #23364d; letter-spacing: -.3px; }
.automation-toolbar {
  margin-top: 0;
}
.automation-toolbar .rule-hint { margin-top: 8px; }
.automation-template-dock {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, .58fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  background:
    radial-gradient(circle at top left, rgba(47, 118, 255, .10), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.automation-template-copy {
  min-width: 0;
}
.automation-template-copy h4 {
  margin: 3px 0 6px;
  color: #203246;
  font-size: 18px;
}
.automation-template-copy p:last-child {
  margin: 0;
  color: #718294;
  font-size: 12px;
  line-height: 1.65;
}
.automation-template-picker {
  display: block;
  min-width: 0;
}
.automation-template-picker select {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  color: #203246;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  box-shadow: var(--shadow);
  outline: none;
}
.automation-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.automation-summary-card,
.automation-guide-panel,
.automation-node-card,
.automation-run-step,
.automation-agent-output-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: var(--shadow);
}
.automation-summary-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 16px;
}
.automation-summary-card span,
.automation-node-card span,
.automation-run-step span {
  color: #8192a5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.automation-summary-card strong {
  color: #203246;
  font-size: 24px;
  letter-spacing: -.5px;
}
.automation-summary-card small {
  color: #748598;
  font-size: 12px;
  line-height: 1.6;
}
.automation-guide-panel {
  display: grid;
  grid-template-columns: minmax(170px, .45fr) minmax(0, 1fr) minmax(240px, .7fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
  padding: 16px;
}
.automation-guide-panel h4 {
  margin: 3px 0 0;
  color: #203246;
  font-size: 18px;
}
.automation-guide-panel ol {
  margin: 0;
  padding-left: 18px;
  color: #53687d;
  font-size: 12px;
  line-height: 1.75;
}
.automation-guide-panel p {
  margin: 0;
  color: #718294;
  font-size: 12px;
  line-height: 1.75;
}
.automation-workbench {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.45fr) minmax(300px, .98fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.automation-list-panel,
.automation-canvas-panel,
.automation-agent-panel { overflow: hidden; }
.automation-card-list {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}
.automation-card-list.compact {
  max-height: clamp(320px, 38vh, 520px);
  overflow: auto;
  padding-bottom: 18px;
}
.automation-workflow-shell {
  position: relative;
  min-width: 0;
}
.automation-workflow-shell[draggable="true"] {
  cursor: grab;
}
.automation-workflow-shell.is-dragging {
  opacity: .58;
  cursor: grabbing;
}
.automation-workflow-shell.is-drop-target .automation-workflow-card,
.automation-workflow-shell.is-drop-target .automation-agent-card {
  border-color: rgba(47, 118, 255, .55);
  box-shadow: 0 18px 36px rgba(47, 118, 255, .14);
}
.automation-workflow-card,
.automation-agent-card {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.automation-workflow-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.automation-workflow-delete:hover,
.automation-workflow-delete:focus-visible {
  outline: none;
}
.automation-workflow-shell .automation-workflow-card {
  padding-right: 48px;
}
.automation-agent-shell .automation-agent-card {
  padding-right: 48px;
}
.automation-workflow-card:hover,
.automation-workflow-card:focus-visible,
.automation-agent-card:hover,
.automation-agent-card:focus-visible {
  border-color: rgba(47, 118, 255, .3);
  box-shadow: 0 16px 34px rgba(37, 59, 82, .12);
  transform: translateY(-2px);
  outline: none;
}
.automation-workflow-card.selected,
.automation-agent-card.selected {
  border-color: rgba(47, 118, 255, .38);
  background: linear-gradient(180deg, #f5f9ff, #ffffff);
}
.automation-card-head,
.automation-run-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.automation-card-head strong {
  min-width: 0;
  color: #203246;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
}
.automation-workflow-card p,
.automation-agent-card p {
  margin: 0;
  color: #718294;
  font-size: 12px;
  line-height: 1.65;
}
.automation-card-meta,
.automation-run-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.automation-canvas {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 360px;
  padding: 4px 16px 16px;
}
.automation-canvas::before {
  content: "";
  position: absolute;
  inset: 0 16px 12px;
  border-radius: 22px;
  background-image:
    linear-gradient(rgba(47, 118, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 118, 255, .08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.automation-node-lane {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.automation-node-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  cursor: grab;
}
.automation-node-card.selected {
  border-color: rgba(47, 118, 255, .46);
  background: linear-gradient(180deg, #f3f8ff, #ffffff);
  box-shadow: 0 18px 40px rgba(47, 118, 255, .14);
}
.automation-node-card.dragging { opacity: .62; cursor: grabbing; }
.automation-node-card.drag-over {
  border-color: rgba(47, 118, 255, .42);
  box-shadow: 0 18px 36px rgba(47, 118, 255, .16);
}
.automation-node-card::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -13px;
  width: 13px;
  border-top: 2px dashed rgba(47, 118, 255, .28);
}
.automation-node-card:nth-child(2n)::after,
.automation-node-card:last-child::after { display: none; }
.automation-node-card strong {
  color: #203246;
  font-size: 16px;
  line-height: 1.4;
}
.automation-node-card p {
  margin: 0;
  color: #70808d;
  font-size: 12px;
  line-height: 1.65;
  word-break: break-word;
}
.automation-node-editor,
.automation-edge-editor {
  padding: 0 16px 16px;
}
.automation-node-editor-form,
.automation-edge-editor-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr);
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow);
}
.automation-node-editor-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.automation-node-editor-head h5 {
  margin: 3px 0 0;
  color: #203246;
  font-size: 16px;
}
.automation-node-editor-form label,
.automation-edge-editor-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #506277;
  font-size: 12px;
  font-weight: 800;
}
.automation-node-editor-form input,
.automation-node-editor-form select,
.automation-node-editor-form textarea,
.automation-edge-editor-form input,
.automation-edge-editor-form select,
.automation-edge-editor-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #203246;
  font: inherit;
}
.automation-node-editor-form input,
.automation-node-editor-form select,
.automation-edge-editor-form input,
.automation-edge-editor-form select {
  min-height: 42px;
  padding: 0 12px;
}
.automation-node-editor-form textarea,
.automation-edge-editor-form textarea {
  min-height: 136px;
  padding: 11px 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}
.automation-node-config-field {
  grid-column: 1 / -1;
}
.automation-config-hint,
.automation-edge-note {
  align-self: end;
  margin: 0;
  color: #718294;
  font-size: 12px;
  line-height: 1.6;
}
.automation-inline-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  min-height: 42px;
  padding: 0 2px;
}
.automation-inline-check input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}
.automation-node-editor-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}
.automation-edge-editor-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.automation-node-editor-form.readonly,
.automation-edge-editor-form.readonly {
  background: linear-gradient(180deg, #fbfcff, #f5f8fb);
}
.automation-edge-rail {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.automation-edge-rail.empty {
  grid-template-columns: 1fr;
  padding: 14px;
  border: 1px dashed rgba(47, 118, 255, .22);
  border-radius: 18px;
  color: #718294;
  background: rgba(255, 255, 255, .72);
}
.automation-edge-rail.empty span {
  color: #203246;
  font-size: 13px;
  font-weight: 900;
}
.automation-edge-rail.empty p {
  margin: 0;
  font-size: 12px;
}
.automation-edge-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: inherit;
  background: rgba(255, 255, 255, .88);
  text-align: left;
  box-shadow: 0 10px 22px rgba(37, 59, 82, .06);
}
.automation-edge-chip span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #2f76ff;
  background: rgba(47, 118, 255, .10);
  font-size: 10px;
  font-weight: 900;
}
.automation-edge-chip strong {
  min-width: 0;
  color: #203246;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.automation-edge-chip em {
  color: #718294;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.automation-edge-chip.selected {
  border-color: rgba(47, 118, 255, .42);
  background: linear-gradient(180deg, #f3f8ff, #ffffff);
}
.automation-run-actions {
  margin: 0 16px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}
.automation-run-log {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding: 0 16px 16px;
}
.automation-run-step {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
}
.automation-run-step strong {
  color: #203246;
  font-size: 13px;
}
.automation-run-step p {
  margin: 0;
  color: #718294;
  font-size: 12px;
  line-height: 1.65;
  word-break: break-word;
}
.automation-agent-console {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}
.automation-agent-console label {
  display: grid;
  gap: 8px;
  color: #506277;
  font-size: 12px;
  font-weight: 800;
}
.automation-agent-console textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
}
.automation-agent-output {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}
.automation-agent-action-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  align-content: stretch;
  min-width: 0;
  min-height: 0;
}
.automation-agent-output-card {
  padding: 15px;
}
.automation-agent-output-card strong {
  display: block;
  margin-bottom: 8px;
  color: #203246;
}
.automation-agent-provider-note {
  margin: -2px 0 10px;
  color: #49637e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}
.automation-agent-output-card p {
  margin: 0;
  color: #617488;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.automation-view.sales-agent-focus .automation-toolbar {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.automation-view.sales-agent-focus .automation-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}
.automation-view.sales-agent-focus .automation-workbench {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 0;
}
.automation-view.sales-agent-focus .automation-agent-panel {
  display: grid;
  grid-template-columns: minmax(340px, .42fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  order: 1;
  min-width: 0;
  min-height: clamp(620px, calc(100vh - 250px), 980px);
  padding: 0 16px 16px;
  background:
    radial-gradient(circle at top right, rgba(47, 118, 255, .12), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.automation-view.sales-agent-focus .automation-list-panel {
  order: 2;
  min-width: 0;
}
.automation-view.sales-agent-focus .automation-agent-panel .subpanel-head h4 {
  font-size: 22px;
  letter-spacing: -.35px;
}
.automation-view.sales-agent-focus .automation-agent-panel .subpanel-head {
  grid-column: 1 / -1;
}
.automation-view.sales-agent-focus .automation-agent-panel .panel-note {
  color: #2f76ff;
  font-size: 12px;
  font-weight: 800;
}
.automation-view.sales-agent-focus .automation-agent-panel .automation-card-list.compact {
  grid-column: 1;
  grid-template-columns: 1fr;
  align-content: start;
  max-height: none;
  overflow: visible;
  padding: 0;
}
.automation-view.sales-agent-focus .automation-agent-card {
  min-height: 150px;
  align-content: space-between;
  padding: 18px;
}
.automation-view.sales-agent-focus .automation-agent-action-pane {
  grid-column: 2;
  align-self: stretch;
  gap: 14px;
  height: 100%;
}
.automation-view.sales-agent-focus .automation-agent-console {
  grid-column: auto;
  grid-template-columns: 1fr;
  align-items: end;
  padding: 0;
}
.automation-view.sales-agent-focus .automation-agent-console textarea {
  min-height: 132px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.65;
}
.automation-view.sales-agent-focus .automation-agent-console .primary-button {
  min-height: 48px;
  padding-inline: 22px;
  border-radius: 16px;
}
.automation-view.sales-agent-focus .automation-agent-output {
  grid-column: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
}
.automation-view.sales-agent-focus .automation-agent-output-card {
  height: 100%;
  max-height: none;
  min-height: 320px;
  overflow: auto;
  border-color: rgba(47, 118, 255, .20);
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}
.automation-view.sales-agent-focus .automation-workflow-card {
  min-height: 138px;
}
.ai-capability-hero-card p,
.ai-capability-hero-card small { margin: 0; color: #70808d; line-height: 1.65; }
.ai-capability-grid { display: grid; gap: 12px; margin-top: 12px; }
.ai-capability-card { min-height: 132px; display: grid; align-content: space-between; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(232, 248, 244, 0.72), rgba(255, 255, 255, 0.96)); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.ai-capability-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 59, 82, 0.1); }
.ai-capability-card span { color: #4a6c7a; font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.ai-capability-card strong { font-size: 16px; letter-spacing: -.2px; }
.ai-capability-card p { color: #70808d; font-size: 12px; line-height: 1.65; }
.ai-capability-card-head { align-items: center; }
.ai-capability-card-head b {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #8d661d;
  background: #fff6e0;
  font-size: 10px;
  font-weight: 800;
}
.ai-capability-card.enabled { background: linear-gradient(180deg, #eef8f4 0%, #ffffff 100%); }
.ai-capability-card.enabled .ai-capability-card-head b { color: #197b69; background: #e6f7f0; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.checkbox-grid label,
.checkbox-inline { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfd; color: var(--ink); line-height: 1.5; }
.compact-checkbox-grid label { font-size: 13px; }
.checkbox-grid input,
.checkbox-inline input { width: 16px; height: 16px; margin: 0; }
.warning-callout { margin: 0 22px 8px; padding: 16px; border: 1px solid rgba(216, 95, 103, 0.18); border-radius: 16px; background: linear-gradient(180deg, rgba(255, 244, 245, 0.95), rgba(255, 251, 252, 0.98)); }
.warning-callout strong { display: block; color: #bb4b57; }
.warning-callout p { margin-top: 8px; color: #7b5860; line-height: 1.65; }
.warning-checkbox { margin: 0 22px 10px; }
.customer-ai-analysis-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.customer-ai-analysis-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 8px 24px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.customer-ai-hero { display: flex; align-items: stretch; justify-content: space-between; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, #f5fbf8, #ffffff); box-shadow: var(--shadow); }
.customer-ai-hero > div:first-child { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; }
.customer-ai-score { min-width: 128px; display: grid; align-content: center; justify-items: end; gap: 6px; }
.customer-ai-score span { color: var(--muted); font-size: 11px; }
.customer-ai-score strong { font-size: 34px; line-height: 1; letter-spacing: -.8px; color: var(--teal); }
.customer-ai-summary-card {
  gap: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 14px 32px rgba(36, 58, 84, 0.05);
}
.customer-ai-summary-panel {
  padding: 18px 20px 20px;
  border: 1px solid rgba(207, 221, 233, 0.82);
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfeff 0%, #f5f9fd 100%);
}
.customer-ai-summary-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: #7d92a7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.customer-ai-summary { color: #5e7080; line-height: 1.75; }
.customer-ai-summary-paragraph {
  margin: 0;
  color: #42576b;
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: .01em;
}
.customer-ai-summary-paragraph + .customer-ai-summary-paragraph { margin-top: 12px; }
.customer-ai-grid { align-items: stretch; }
.customer-ai-report-card {
  display: grid;
  gap: 18px;
  padding: 18px 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 14px 32px rgba(36, 58, 84, 0.05);
}
.customer-ai-report-card > .detail-section-head {
  align-items: flex-end;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(217, 226, 235, 0.9);
}
.customer-ai-report-card > .detail-section-head strong {
  font-size: 18px;
  letter-spacing: -.02em;
  color: #203246;
}
.customer-ai-field-grid { display: grid; gap: 12px; }
.customer-ai-field-grid-basic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-ai-field-card,
.customer-ai-section-card,
.customer-ai-mini-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.customer-ai-field-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.customer-ai-field-card span,
.customer-ai-field-row span { color: #7d8fa2; font-size: 11px; font-weight: 700; }
.customer-ai-field-card strong { color: #203246; font-size: 15px; line-height: 1.55; word-break: break-word; }
.customer-ai-mcpc-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.customer-ai-section-card {
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
}
.customer-ai-section-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid rgba(217, 226, 235, 0.92);
  background: linear-gradient(180deg, rgba(246, 250, 253, 0.95), rgba(255, 255, 255, 0.98));
}
.customer-ai-section-title {
  display: grid;
  gap: 6px;
}
.customer-ai-section-title strong {
  color: #24374a;
  font-size: 16px;
  line-height: 1.4;
}
.customer-ai-section-index {
  color: #7b90a3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.customer-ai-section-subtitle {
  max-width: 240px;
  color: #8da0b2;
  font-size: 11px;
  line-height: 1.65;
  text-align: right;
}
.customer-ai-field-stack {
  display: grid;
  gap: 16px;
  padding: 16px 20px 20px;
}
.customer-ai-field-row {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(132, 150, 171, 0.22);
}
.customer-ai-field-row:last-child { padding-bottom: 0; border-bottom: 0; }
.customer-ai-field-row span {
  padding-top: 2px;
  color: #6f8599;
  font-size: 12px;
  line-height: 1.6;
}
.customer-ai-field-row p {
  margin: 0;
  color: #43586d;
  font-size: 14px;
  line-height: 1.9;
  word-break: break-word;
}
.customer-ai-mini-card {
  padding: 18px 20px;
  border-radius: 20px;
}
.customer-ai-followups {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px dashed rgba(132, 150, 171, 0.22);
}
#customer-ai-analysis-modal {
  width: min(980px, calc(100vw - 40px));
  height: min(900px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
}
#customer-ai-analysis-modal[open] {
  display: flex;
  flex-direction: column;
}
#customer-ai-analysis-modal .modal-header { align-items: flex-start; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fffefd, #fcfffe); }
#customer-ai-analysis-modal .modal-header h2 { margin-top: 8px; font-size: 22px; line-height: 1.2; letter-spacing: -.4px; }
#customer-ai-analysis-modal .modal-actions {
  position: relative;
  flex: 0 0 auto;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--line);
  background: rgba(251, 252, 253, 0.98);
  backdrop-filter: blur(10px);
}
#customer-ai-analysis-modal .detail-card { min-width: 0; }
#customer-ai-analysis-modal .detail-list-copy,
#customer-ai-analysis-modal .customer-ai-summary { word-break: break-word; }

body[data-theme="night"] .system-summary-card,
body[data-theme="night"] .system-record-card,
body[data-theme="night"] .backup-runtime-status-fact,
body[data-theme="night"] .system-data-transfer-card,
body[data-theme="night"] .system-import-preview-card,
body[data-theme="night"] .warning-callout,
body[data-theme="night"] .customer-ai-hero,
body[data-theme="night"] .customer-ai-field-card,
body[data-theme="night"] .customer-ai-section-card,
body[data-theme="night"] .customer-ai-mini-card,
body[data-theme="night"] .ai-capability-card,
body[data-theme="night"] .ai-provider-workspace-card,
body[data-theme="night"] .automation-template-dock,
body[data-theme="night"] .automation-summary-card,
body[data-theme="night"] .automation-guide-panel,
body[data-theme="night"] .automation-workflow-card,
body[data-theme="night"] .automation-agent-card,
body[data-theme="night"] .automation-node-card,
body[data-theme="night"] .automation-node-editor-form,
body[data-theme="night"] .automation-edge-editor-form,
body[data-theme="night"] .automation-edge-chip,
body[data-theme="night"] .automation-run-step,
body[data-theme="night"] .automation-agent-output-card,
body[data-theme="night"] .ai-config-instance-card,
body[data-theme="night"] .ai-config-field-card,
body[data-theme="night"] .ai-config-scenario-card,
body[data-theme="night"] .ai-capability-hero-card,
body[data-theme="night"] .ai-config-empty-state,
body[data-theme="night"] .checkbox-grid label,
body[data-theme="night"] .checkbox-inline {
  background: #182433;
  border-color: rgba(129, 152, 177, 0.18);
}
body[data-theme="night"] .automation-node-editor-form input,
body[data-theme="night"] .automation-node-editor-form select,
body[data-theme="night"] .automation-node-editor-form textarea,
body[data-theme="night"] .automation-edge-editor-form input,
body[data-theme="night"] .automation-edge-editor-form select,
body[data-theme="night"] .automation-edge-editor-form textarea {
  background: #142030;
  border-color: rgba(129, 152, 177, 0.18);
  color: #edf4ff;
}
body[data-theme="night"] .automation-template-picker select {
  background: #142030;
  border-color: rgba(129, 152, 177, 0.18);
  color: #edf4ff;
}

body[data-theme="night"] .ai-provider-workspace-card.selected,
body[data-theme="night"] .automation-workflow-card.selected,
body[data-theme="night"] .automation-agent-card.selected,
body[data-theme="night"] .backup-runtime-status-panel,
body[data-theme="night"] .ai-config-workbench-alert {
  background: #1c2a3c;
  border-color: rgba(110, 147, 202, 0.28);
}

body[data-theme="night"] .backup-runtime-status-panel.is-error {
  background: linear-gradient(180deg, #2b1f2a 0%, #241922 100%);
  border-color: rgba(188, 106, 125, 0.24);
}

body[data-theme="night"] .warning-callout strong { color: #ff9ea7; }
body[data-theme="night"] .warning-callout p,
body[data-theme="night"] .backup-runtime-status-copy p:last-child,
body[data-theme="night"] .system-summary-card small,
body[data-theme="night"] .system-record-card p,
body[data-theme="night"] .system-data-transfer-copy p,
body[data-theme="night"] .system-import-preview-card small,
body[data-theme="night"] .backup-runtime-item span,
body[data-theme="night"] .ai-capability-card p,
body[data-theme="night"] .ai-provider-workspace-card p,
body[data-theme="night"] .automation-template-copy p:last-child,
body[data-theme="night"] .automation-config-hint,
body[data-theme="night"] .automation-edge-note,
body[data-theme="night"] .automation-agent-provider-note,
body[data-theme="night"] .automation-edge-chip em,
body[data-theme="night"] .automation-workflow-card p,
body[data-theme="night"] .automation-agent-card p,
body[data-theme="night"] .automation-node-card p,
body[data-theme="night"] .automation-run-step p,
body[data-theme="night"] .automation-agent-output-card p,
body[data-theme="night"] .automation-summary-card small,
body[data-theme="night"] .automation-guide-panel ol,
body[data-theme="night"] .automation-guide-panel p,
body[data-theme="night"] .ai-capability-hero-card p,
body[data-theme="night"] .ai-capability-hero-card small,
body[data-theme="night"] .ai-config-scenario-note,
body[data-theme="night"] .ai-config-empty-state p,
body[data-theme="night"] .customer-ai-field-row p,
body[data-theme="night"] .customer-ai-summary,
body[data-theme="night"] .customer-ai-summary-paragraph { color: #9eb0c2; }
body[data-theme="night"] .system-data-transfer-alert {
  background: #1c2a3c;
  border-color: rgba(110, 147, 202, 0.28);
  color: #a8bed7;
}
body[data-theme="night"] .backup-runtime-card {
  background:
    radial-gradient(circle at top right, rgba(80, 126, 204, 0.16), transparent 35%),
    linear-gradient(180deg, #182433 0%, #162130 100%);
}
body[data-theme="night"] .backup-runtime-fact {
  border-color: rgba(92, 122, 156, 0.28);
  background: linear-gradient(180deg, #142030 0%, #172435 100%);
}
body[data-theme="night"] .backup-runtime-fact-value {
  color: #e3edf8;
}
body[data-theme="night"] .backup-runtime-status-copy h4,
body[data-theme="night"] .backup-runtime-status-fact strong {
  color: #edf4ff;
}
body[data-theme="night"] .backup-runtime-status-fact span {
  color: #8ea4b8;
}
body[data-theme="night"] .backup-runtime-item {
  border-color: rgba(92, 122, 156, 0.28);
  background: linear-gradient(180deg, #142030 0%, #172435 100%);
}
body[data-theme="night"] .backup-runtime-item strong {
  color: #e3edf8;
}
body[data-theme="night"] .backup-runtime-warning {
  border-color: rgba(214, 92, 101, 0.24);
  color: #f0b0b7;
  background: linear-gradient(180deg, rgba(68, 26, 34, 0.9), rgba(46, 20, 27, 0.96));
}
body[data-theme="night"] .ai-config-field-card strong,
body[data-theme="night"] .ai-provider-workspace-head strong,
body[data-theme="night"] .automation-template-copy h4,
body[data-theme="night"] .automation-summary-card strong,
body[data-theme="night"] .automation-card-head strong,
body[data-theme="night"] .automation-node-card strong,
body[data-theme="night"] .automation-edge-chip strong,
body[data-theme="night"] .automation-edge-rail.empty span,
body[data-theme="night"] .automation-node-editor-head h5,
body[data-theme="night"] .automation-run-step strong,
body[data-theme="night"] .automation-agent-output-card strong,
body[data-theme="night"] .automation-guide-panel h4,
body[data-theme="night"] .ai-capability-hero-card strong,
body[data-theme="night"] .customer-ai-field-card strong,
body[data-theme="night"] .ai-config-instance-copy strong,
body[data-theme="night"] .system-data-transfer-copy strong,
body[data-theme="night"] .system-import-preview-card strong { color: #edf4ff; }
body[data-theme="night"] .customer-ai-score strong { color: #7ef0d5; }
body[data-theme="night"] .automation-edge-rail.empty {
  border-color: rgba(129, 152, 177, 0.22);
  background: #142030;
  color: #9eb0c2;
}
body[data-theme="night"] .automation-edge-chip.selected,
body[data-theme="night"] .automation-node-editor-form.readonly,
body[data-theme="night"] .automation-edge-editor-form.readonly {
  background: #1c2a3c;
  border-color: rgba(110, 147, 202, 0.28);
}
body[data-theme="night"] .automation-view.sales-agent-focus .automation-agent-panel,
body[data-theme="night"] .automation-view.sales-agent-focus .automation-agent-output-card {
  background: #182433;
  border-color: rgba(129, 152, 177, 0.18);
}
body[data-theme="night"] .automation-view.sales-agent-focus .automation-agent-panel .panel-note {
  color: #8eb4ff;
}
body[data-theme="night"] .customer-ai-summary-panel,
body[data-theme="night"] .customer-ai-section-headline {
  background: linear-gradient(180deg, rgba(28, 42, 60, 0.96), rgba(24, 36, 51, 0.98));
  border-color: rgba(129, 152, 177, 0.18);
}
body[data-theme="night"] .customer-ai-report-card > .detail-section-head,
body[data-theme="night"] .customer-ai-section-headline {
  border-color: rgba(129, 152, 177, 0.18);
}
body[data-theme="night"] .customer-ai-section-title strong,
body[data-theme="night"] .customer-ai-report-card > .detail-section-head strong { color: #edf4ff; }
body[data-theme="night"] .customer-ai-section-subtitle,
body[data-theme="night"] .customer-ai-section-index,
body[data-theme="night"] .customer-ai-summary-kicker,
body[data-theme="night"] .customer-ai-field-row span { color: #8ea4b8; }
body[data-theme="night"] #customer-ai-analysis-modal .modal-header,
body[data-theme="night"] #customer-ai-analysis-modal .modal-actions {
  background: rgba(24, 36, 51, 0.96);
  border-color: rgba(129, 152, 177, 0.18);
}

.p2-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .92fr);
  gap: 14px;
  margin-top: 14px;
}
.p2-role-panel,
.p2-workbench-panel {
  padding: 16px;
  overflow: hidden;
}
.p2-panel-head,
.product-card-head,
.product-card-foot,
.portrait-operation-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.p2-panel-head h3 {
  margin: 3px 0 0;
  color: #223247;
  font-size: 17px;
}
.p2-role-panel > p {
  margin: 12px 0 0;
  color: #6f7f90;
  font-size: 12px;
  line-height: 1.7;
}
.p2-role-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.p2-role-card,
.p2-view-card {
  min-width: 0;
  border: 1px solid #e4ebf2;
  border-radius: 15px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.p2-role-card {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 13px;
}
.p2-role-card:hover,
.p2-role-card:focus-visible,
.p2-view-card:hover,
.p2-view-card:focus-visible {
  border-color: rgba(10, 148, 124, .28);
  box-shadow: 0 14px 28px rgba(37, 59, 82, .1);
  outline: none;
  transform: translateY(-1px);
}
.p2-role-card span,
.product-summary-card span,
.product-card-head span,
.portrait-operation-foot span {
  color: #8192a5;
  font-size: 11px;
  font-weight: 800;
}
.p2-role-card strong,
.product-summary-card strong {
  color: #203246;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.p2-role-card small,
.product-summary-card small,
.p2-view-card p,
.product-card p,
.product-strategy-box p,
.portrait-operation-card p {
  color: #718294;
  font-size: 12px;
  line-height: 1.65;
}
.p2-view-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.p2-view-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
}
.p2-view-card strong {
  display: block;
  color: #203246;
  font-size: 13px;
}
.p2-view-card p {
  margin: 5px 0 0;
}
.p2-view-card > span {
  min-width: 74px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #0e7b68;
  background: #eaf8f4;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.p2-view-card.blue > span { color: #285ca8; background: #edf4ff; }
.p2-view-card.orange > span { color: #8a5a17; background: #fff5e6; }
.p2-view-card.green > span { color: #0e7b68; background: #eaf8f4; }
.product-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 14px;
}
.product-summary-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
  box-shadow: var(--shadow);
}
.product-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  padding: 0 18px 14px;
}
.product-pagination {
  margin: 0 18px 18px;
}
.product-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: var(--shadow);
}
.product-card-head h4 {
  margin: 5px 0 0;
  color: #203246;
  font-size: 15px;
  line-height: 1.45;
}
.product-sku-row,
.product-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.product-sku-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #4e6376;
  background: #f1f5f8;
  font-size: 11px;
  font-weight: 800;
}
.product-strategy-box {
  padding: 12px;
  border: 1px dashed #d9e7e2;
  border-radius: 14px;
  background: #fbfefd;
}
.product-strategy-box strong,
.portrait-operation-card strong {
  display: block;
  color: #405162;
  font-size: 12px;
}
.product-strategy-box p,
.portrait-operation-card p {
  margin: 6px 0 0;
}
.product-card-foot {
  align-items: center;
  padding-top: 4px;
}
.product-card-foot > span {
  min-width: 0;
  color: #8392a2;
  font-size: 11px;
  line-height: 1.5;
}
.portrait-layout {
  grid-template-columns: minmax(300px, .42fr) minmax(0, 1fr);
  align-items: start;
}
.portrait-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
  gap: 14px;
  min-width: 0;
}
.portrait-operation-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.portrait-operation-list {
  display: grid;
  gap: 11px;
}
.portrait-operation-card {
  padding: 14px;
  border: 1px solid #e4ebf2;
  border-radius: 14px;
  background: #fff;
}
.portrait-operation-foot {
  align-items: center;
  margin-top: 10px;
}

body[data-theme="night"] .p2-role-panel,
body[data-theme="night"] .p2-workbench-panel,
body[data-theme="night"] .p2-role-card,
body[data-theme="night"] .p2-view-card,
body[data-theme="night"] .product-summary-card,
body[data-theme="night"] .product-card,
body[data-theme="night"] .product-strategy-box,
body[data-theme="night"] .portrait-operation-panel,
body[data-theme="night"] .portrait-operation-card {
  border-color: rgba(148, 163, 184, .18);
  background: linear-gradient(180deg, #101b29 0%, #0d1723 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
body[data-theme="night"] .p2-panel-head h3,
body[data-theme="night"] .p2-role-card strong,
body[data-theme="night"] .p2-view-card strong,
body[data-theme="night"] .product-summary-card strong,
body[data-theme="night"] .product-card-head h4,
body[data-theme="night"] .product-strategy-box strong,
body[data-theme="night"] .portrait-operation-card strong {
  color: #e8f1f8;
}
body[data-theme="night"] .p2-role-panel > p,
body[data-theme="night"] .p2-role-card small,
body[data-theme="night"] .p2-view-card p,
body[data-theme="night"] .product-summary-card small,
body[data-theme="night"] .product-card p,
body[data-theme="night"] .product-strategy-box p,
body[data-theme="night"] .portrait-operation-card p,
body[data-theme="night"] .product-card-foot > span {
  color: #9aacbc;
}
body[data-theme="night"] .p2-role-card span,
body[data-theme="night"] .product-summary-card span,
body[data-theme="night"] .product-card-head span,
body[data-theme="night"] .portrait-operation-foot span {
  color: #91a6b8;
}
body[data-theme="night"] .portrait-card-meta {
  border-top-color: rgba(148, 163, 184, .16);
}
body[data-theme="night"] .product-sku-row span {
  color: #c5d5e3;
  background: rgba(148, 163, 184, .12);
}

@media (max-width: 1500px) {
  .automation-view.sales-agent-focus .automation-agent-panel {
    grid-template-columns: minmax(300px, .44fr) minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .system-ops-grid,
  .system-module-shell,
  .backup-runtime-status-facts,
  .system-data-transfer-grid,
  .backup-runtime-grid,
  .p2-dashboard-grid,
  .portrait-layout,
  .portrait-workspace,
  .product-catalog-grid,
  .automation-template-dock,
  .automation-guide-panel,
  .automation-workbench,
  .automation-view.sales-agent-focus .automation-workbench,
  .ai-config-workbench { grid-template-columns: 1fr; }
  .automation-summary-grid,
  .product-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portrait-cards {
    max-height: none;
    padding-right: 0;
  }
  .automation-view.sales-agent-focus .automation-agent-panel { grid-template-columns: 1fr; }
  .automation-view.sales-agent-focus .automation-agent-panel .automation-card-list.compact { grid-template-columns: 1fr; }
  .automation-view.sales-agent-focus .automation-agent-panel .automation-card-list.compact,
  .automation-view.sales-agent-focus .automation-agent-action-pane,
  .automation-view.sales-agent-focus .automation-agent-console,
  .automation-view.sales-agent-focus .automation-agent-output { grid-column: 1; }
  .automation-view.sales-agent-focus .automation-agent-console { grid-template-columns: 1fr; }
}

@media (max-width: 1440px) {
  .portrait-workspace {
    grid-template-columns: 1fr;
  }

  .portrait-operation-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .portrait-summary-grid,
  .portrait-operation-list {
    grid-template-columns: 1fr;
  }

  .backup-runtime-fact {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 720px) {
  .system-summary-grid,
  .automation-summary-grid,
  .p2-role-card-grid,
  .product-summary-grid,
  .automation-node-lane,
  .automation-edge-rail,
  .automation-node-editor-form,
  .automation-edge-editor-form,
  .checkbox-grid,
  .ai-config-field-grid,
  .system-import-preview-grid { grid-template-columns: 1fr; }
  .automation-node-editor-head,
  .automation-node-editor-actions,
  .automation-edge-editor-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .customer-ai-field-grid-basic,
  .customer-ai-mcpc-grid { grid-template-columns: 1fr; }
  .customer-ai-hero { flex-direction: column; }
  .customer-ai-score { justify-items: start; }
  .customer-ai-field-row { grid-template-columns: 1fr; gap: 8px; }
  .customer-ai-section-headline {
    flex-direction: column;
    align-items: flex-start;
  }
  .customer-ai-section-subtitle {
    max-width: none;
    text-align: left;
  }
  .customer-ai-summary-paragraph,
  .customer-ai-field-row p { font-size: 13px; }
  #customer-ai-analysis-modal {
    width: calc(100vw - 20px);
    height: min(920px, calc(100vh - 20px));
    max-height: calc(100vh - 20px);
  }
  #customer-ai-analysis-modal .modal-header,
  #customer-ai-analysis-modal .modal-actions { padding-left: 18px; padding-right: 18px; }
  .customer-ai-analysis-body { padding: 8px 18px 18px; }
  .system-summary-grid-wide { grid-template-columns: 1fr; }
  .ai-provider-workspace-list,
  .ai-config-editor-shell,
  .ai-capability-grid-stacked,
  .system-card-list-padded { padding-left: 14px; padding-right: 14px; }
  .ai-config-instance-card,
  .ai-config-instance-actions { flex-direction: column; align-items: flex-start; }
}
