:root {
  --page-bg: #f3f8fe;
  --text-strong: #071a43;
  --text-main: #17345f;
  --text-muted: #45638c;
  --primary: #155eef;
  --cyan: #08bec5;
  --violet: #5b58eb;
  --green: #27c6a4;
  --line: #dce9f7;
  --glass: rgba(255, 255, 255, 0.74);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.94);
  --shadow: 0 10px 28px rgba(58, 105, 154, 0.09);
  --soft-shadow: 0 7px 18px rgba(62, 104, 151, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-bg);
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-main);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: color 0.22s ease, background-color 0.22s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

i {
  display: inline-block;
  line-height: 1;
}

[hidden] {
  display: none !important;
}

.home-shell {
  width: 100%;
  min-height: 100vh;
  padding: 12px 26px 27px 10px;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 26px;
}

.home-sidebar {
  position: sticky;
  z-index: 20;
  top: 12px;
  align-self: start;
  width: 178px;
  height: calc(100vh - 39px);
  min-height: 720px;
  padding: 36px 14px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 34px rgba(55, 105, 155, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.home-brand {
  min-height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-strong);
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #1764f5;
  font-size: 28px;
}

.home-brand strong {
  font-size: 19px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.side-nav {
  min-height: 0;
  margin-top: 35px;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.side-nav-item,
.side-footer-action,
.side-logout {
  min-height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.side-nav-item {
  padding: 0 13px;
  border: 1px solid transparent;
  color: #284a79;
  font-size: 17px;
  font-weight: 500;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease,
    box-shadow 0.16s ease, transform 0.16s ease;
}

.side-nav-item > i,
.side-footer-action > i,
.side-logout > i {
  width: 24px;
  flex: 0 0 24px;
  color: #3976f3;
  font-size: 24px;
  text-align: center;
}

.side-nav-item:hover,
.side-nav-item:focus-visible {
  color: #1559ed;
  border-color: rgba(103, 143, 235, 0.16);
  background: rgba(242, 247, 255, 0.92);
  outline: 0;
  transform: translateY(-1px);
}

.side-nav-item.is-active {
  color: #1559ed;
  border-color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(110deg, #eff4ff, #f0eeff);
  box-shadow: 0 8px 18px rgba(64, 103, 195, 0.12);
}

.side-nav-group {
  min-width: 0;
}

.side-nav-group > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.side-nav-group > summary > span {
  white-space: nowrap;
}

.side-nav-group > summary::-webkit-details-marker {
  display: none;
}

.side-nav-submenu {
  padding: 6px 0 0 18px;
  display: grid;
  gap: 4px;
}

.side-nav-submenu .side-nav-item {
  min-height: 42px;
  padding-left: 10px;
  font-size: 15px;
}

.side-nav-submenu .side-nav-item > i {
  font-size: 20px;
}

.side-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #dbe8f6;
  display: grid;
  gap: 10px;
}

.sidebar-menu {
  position: relative;
}

.side-footer-action {
  padding: 0 12px;
  color: #36577f;
  font-size: 16px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.side-footer-action::-webkit-details-marker {
  display: none;
}

.side-footer-action:hover,
.side-footer-action:focus-visible,
.sidebar-menu[open] > .side-footer-action {
  color: #1559ed;
  background: #edf4ff;
  outline: 0;
}

.side-popover {
  position: absolute;
  z-index: 40;
  left: calc(100% + 16px);
  bottom: 0;
  width: 242px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 17px;
  display: grid;
  gap: 8px;
  color: #294c79;
  background: rgba(250, 253, 255, 0.96);
  box-shadow: 0 18px 44px rgba(40, 82, 132, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.side-popover-heading {
  padding: 1px 3px 8px;
  border-bottom: 1px solid #e3edf8;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.side-popover-heading strong {
  color: #102c56;
  font-size: 15px;
  font-weight: 750;
}

.side-popover-heading small {
  color: #7790b1;
  font-size: 11px;
}

.side-popover > a {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #3a587e;
  font-size: 13px;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.side-popover > a:hover,
.side-popover > a:focus-visible {
  color: #1559ed;
  background: #edf4ff;
  outline: 0;
}

.side-popover > a b {
  min-width: 28px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #1764f5;
  background: #e8f1ff;
  font-size: 12px;
  font-weight: 750;
}

.settings-theme-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-theme-options button {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid #dbe8f7;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #476487;
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.settings-theme-options button:hover,
.settings-theme-options button:focus-visible,
.settings-theme-options button[aria-pressed="true"] {
  color: #1559ed;
  border-color: #a9c7f6;
  background: #edf4ff;
  outline: 0;
}

.settings-account {
  min-width: 0;
  min-height: 48px;
  margin-top: 2px;
  padding: 8px 10px;
  border-top: 1px solid #e3edf8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-account > i {
  color: #3976f3;
  font-size: 22px;
}

.settings-account span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.settings-account strong,
.settings-account small {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-account strong {
  color: #294c79;
  font-size: 13px;
  font-weight: 700;
}

.settings-account small {
  color: #7189a9;
  font-size: 11px;
}

.side-logout {
  width: 100%;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #36577f;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.side-logout:hover,
.side-logout:focus-visible {
  color: #1559ed;
  background: #edf4ff;
  outline: 0;
}

.dashboard-main {
  min-width: 0;
  padding-top: 0;
}

.hero-card {
  position: relative;
  width: 100%;
  height: 161px;
  padding: 14px 28px 14px 15px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.76);
  background-image: url("assets/home/dashboard-hero-glass.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: var(--shadow);
}

.profile-upload {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  flex: 0 0 132px;
  cursor: pointer;
}

.profile-upload.account-avatar-display {
  cursor: default;
}

.avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.avatar-mark {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 22px;
  display: block;
  overflow: hidden;
  background: #e8f1fa;
  box-shadow: 0 8px 22px rgba(49, 88, 133, 0.11);
}

.avatar-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 26%;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.avatar-edit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #174777;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 5px 12px rgba(41, 77, 119, 0.12);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.profile-upload:hover .avatar-edit,
.profile-upload:focus-within .avatar-edit {
  opacity: 1;
  transform: translateY(0);
}

.profile-upload:hover img {
  filter: saturate(0.96) brightness(0.98);
  transform: scale(1.02);
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 650px;
}

.hero-copy h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(34px, 2.65vw, 40px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hero-copy p {
  margin: 4px 0 0;
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  color: #3f5e88;
  font-family: "PingFang SC Heavy", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 28px;
  font-weight: 1000;
  font-synthesis: weight;
  letter-spacing: -0.02em;
}

.home-welcome-prefix {
  color: #000;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

.home-welcome-name {
  display: inline-block;
  margin-left: 0;
  line-height: inherit;
  vertical-align: baseline;
  color: #1769df;
  font-family: "PingFang SC Heavy", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 1000;
  font-synthesis: weight;
  letter-spacing: -0.02em;
}

.home-account-person {
  display: inline-block;
  margin-left: -0.14em;
  margin-right: 0.16em;
  color: #1769df;
  font-size: 0.9em;
  line-height: inherit;
  vertical-align: baseline;
}

body.is-admin-account .home-welcome-name,
body.is-admin-account .home-account-person {
  color: #581c82;
  background-color: #471668;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, rgba(52, 15, 74, 0.16) 1px 3px, transparent 3px 6px),
    linear-gradient(108deg, #280a3c 0%, #471668 18%, #74339f 32%, #8745ae 40%, #63218f 52%, #351048 64%, #7b36a1 74%, #591c81 86%, #21072f 100%);
  background-blend-mode: soft-light, normal;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(232, 207, 245, 0.22), 0 0 11px rgba(73, 22, 105, 0.26);
}

body.is-vip-account .home-welcome-name,
body.is-vip-account .home-account-person {
  color: #b07912;
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 1px 0 rgba(92, 57, 2, 0.16);
}

body.is-staff-account .home-welcome-name,
body.is-staff-account .home-account-person {
  color: #1769df;
}

.theme-toggle {
  width: 100px;
  height: 42px;
  flex: 0 0 100px;
  margin-left: auto;
  padding: 3px;
  border: 1px solid rgba(63, 82, 114, 0.36);
  border-radius: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  color: #395475;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 5px 16px rgba(47, 83, 126, 0.09);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(60, 113, 226, 0.58);
  outline: 0;
  box-shadow: 0 6px 18px rgba(47, 83, 126, 0.15);
}

.theme-choice {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  justify-self: center;
  font-size: 20px;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

html:not([data-theme="dark"]) .theme-sun {
  color: #fff;
  background: #3d7cf3;
  box-shadow: 0 4px 10px rgba(34, 101, 221, 0.28);
}

html:not([data-theme="dark"]) .theme-moon {
  color: #6d7f99;
}

.module-section {
  margin-top: 30px;
}

.home-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 22px;
}

.focus-card {
  min-width: 0;
  min-height: 330px;
  padding: 8px 24px 12px;
  border: 1px solid rgba(209, 223, 245, 0.9);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  background: rgba(249, 252, 255, 0.88);
  box-shadow: 0 14px 34px rgba(47, 83, 126, 0.08);
  overflow: hidden;
}

.side-popover > a > i:last-child {
  margin-left: auto;
  color: #3976f3;
  font-size: 18px;
}

.focus-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.ai-workbench-card .focus-card-heading,
.smart-match-card .focus-card-heading {
  height: 70px;
  flex: 0 0 70px;
  align-items: flex-end;
  gap: 3px;
}

.ai-workbench-card .focus-card-heading > div,
.smart-match-card .focus-card-heading > div {
  position: relative;
  top: 12px;
}

.focus-title-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 31px;
}

.focus-title-icon.is-ai {
  color: #2f72ed;
  background: #e9f2ff;
}

.focus-title-icon.is-assistant,
.focus-title-icon.is-match-assistant {
  width: 80px;
  height: 85px;
  flex: 0 0 80px;
  align-self: flex-start;
  position: relative;
  top: 4px;
  overflow: hidden;
  background: transparent;
}

.focus-title-icon.is-assistant img,
.focus-title-icon.is-match-assistant img {
  width: 200%;
  max-width: none;
  height: auto;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 3px rgba(59, 92, 173, 0.16));
}

.focus-title-icon.is-match {
  color: #12aa91;
  background: #e4f8f4;
}

.focus-card-heading h2 {
  margin: 0;
  color: #0b1f43;
  font-size: 27px;
  line-height: 34px;
  font-weight: 800;
}

.focus-card-heading p {
  margin: 2px 0 0;
  color: #6d82a2;
  font-size: 15px;
  line-height: 23px;
}

.home-agent-composer {
  margin-top: 19px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 10px;
}

.home-agent-input {
  min-width: 0;
  min-height: 52px;
  padding: 0 17px;
  border: 1px solid #dce7f6;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a9bb5;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(53, 99, 162, 0.05);
}

.home-agent-input i {
  flex: 0 0 auto;
  font-size: 20px;
}

.home-agent-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #14284a;
  background: transparent;
  font-size: 15px;
}

.home-agent-input input::placeholder {
  color: #93a2b9;
}

.home-agent-input:focus-within {
  border-color: #69a0f5;
  box-shadow: 0 0 0 3px rgba(63, 126, 242, 0.11);
}

.home-agent-composer > button {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #397cf3;
  box-shadow: 0 8px 18px rgba(45, 111, 239, 0.25);
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.home-agent-composer > button:hover,
.home-agent-composer > button:focus-visible {
  outline: 0;
  background: #2168e7;
  transform: translateY(-2px);
}

.home-agent-shortcuts {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-agent-shortcuts a {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #426cae;
  background: #edf4ff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.home-agent-shortcuts a:hover,
.home-agent-shortcuts a:focus-visible {
  outline: 0;
  color: #195ccc;
  background: #e1edff;
  transform: translateY(-1px);
}

.home-agent-shortcuts i {
  font-size: 18px;
}

.ai-insight-panel {
  margin-top: 10px;
  padding: 13px 12px;
  border: 1px solid #e0eaf8;
  border-radius: 17px;
  background: #f2f7ff;
}

.ai-insight-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #2a5caa;
  font-size: 15px;
}

.ai-insight-heading i {
  font-size: 19px;
}

.ai-insight-heading span {
  margin-left: auto;
  color: #8b9bb2;
  font-size: 12.5px;
  font-weight: 500;
}

.ai-insight-body {
  margin-top: 8px;
  display: block;
}

.ai-insight-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ai-insight-conclusion {
  min-width: 0;
  margin-inline: -12px;
  padding-inline: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid #dbe7f7;
}

.ai-insight-conclusion strong {
  display: block;
  min-width: 0;
  color: #0c2041;
  font-size: 15px;
  line-height: 21px;
  font-weight: 750;
}

.ai-insight-details {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.ai-insight-details p {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
}

.ai-insight-details span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6f83a1;
  font-size: 13px;
  line-height: 20px;
  font-weight: 650;
}

.ai-insight-details span i {
  font-size: 14px;
}

.ai-insight-details strong {
  min-width: 0;
  color: #314766;
  font-size: 13px;
  line-height: 20px;
  font-weight: 620;
}

.ai-insight-details .is-finding span {
  color: #a86012;
}

.ai-insight-details .is-action span {
  color: #16816f;
}

.focus-primary-link {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  background: #3478ed;
  box-shadow: 0 7px 16px rgba(42, 105, 226, 0.2);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.focus-primary-link:hover,
.focus-primary-link:focus-visible {
  outline: 0;
  background: #1f65dc;
}

.focus-primary-link.is-match {
  background: #22b99f;
  box-shadow: 0 7px 16px rgba(25, 165, 142, 0.22);
}

.focus-primary-link.is-match:hover,
.focus-primary-link.is-match:focus-visible {
  background: #149f88;
}

.match-overview-grid {
  margin-top: 19px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.match-overview-grid > div {
  min-width: 0;
  min-height: 104px;
  padding: 10px 8px;
  border: 1px solid #e9eff7;
  border-radius: 15px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 18px rgba(50, 91, 146, 0.05);
  text-align: center;
}

.match-overview-grid strong {
  color: #0b1e40;
  font-size: 27px;
  line-height: 31px;
  font-weight: 800;
}

.match-overview-grid > .is-primary-pool {
  border-color: #cddff9;
  background: linear-gradient(145deg, #ffffff 0%, #f0f6ff 100%);
  box-shadow: 0 10px 24px rgba(34, 101, 205, 0.11);
}

.match-overview-grid > .is-primary-pool strong {
  min-width: 5ch;
  display: inline-block;
  color: #145ed7;
  font-size: 31px;
  line-height: 35px;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 3px 10px rgba(33, 102, 216, 0.13);
  transition: color 160ms ease, transform 160ms ease, text-shadow 160ms ease;
}

.match-overview-grid > .is-primary-pool.is-counting strong {
  color: #075ce4;
  transform: translateY(-1px) scale(1.04);
  text-shadow: 0 5px 15px rgba(31, 103, 224, 0.24);
}

.match-overview-grid span {
  color: #71839c;
  font-size: 13px;
  line-height: 18px;
}

.priority-opportunity {
  min-height: 161px;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid #e2ebf7;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
}

.priority-opportunity-label {
  min-height: 38px;
  border-bottom: 1px solid #e9eff7;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #3078ef;
  font-size: 15px;
  font-weight: 750;
}

.priority-opportunity-label i {
  font-size: 19px;
}

.priority-opportunity-body {
  min-height: 85px;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.latest-aunt-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.latest-aunt-item {
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #e7eef8;
  border-radius: 10px;
  background: #f8fbff;
  display: grid;
  align-content: center;
  gap: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.latest-aunt-item:hover,
.latest-aunt-item:focus-visible {
  border-color: #9bc5ff;
  background: #eef6ff;
  transform: translateY(-1px);
  outline: none;
}

.latest-aunt-item strong {
  overflow: hidden;
  color: #102344;
  font-size: 14px;
  line-height: 18px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-aunt-item span {
  overflow: hidden;
  color: #6e819e;
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-aunt-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: #6e819e;
  font-size: 12px;
  line-height: 18px;
}

.metrics-panel {
  height: 425px;
  margin-top: 27px;
  padding: 14px 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.metric-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(3, 119px);
  gap: 18px;
}

.metric-card {
  position: relative;
  min-width: 0;
  height: 119px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.73);
  box-shadow: 0 5px 14px rgba(66, 108, 155, 0.04);
}

.metric-icon {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 31px;
  background: linear-gradient(145deg, #2772f8, #70a8ff);
  box-shadow: 0 9px 17px rgba(35, 101, 235, 0.22);
}

.metric-cyan .metric-icon {
  background: linear-gradient(145deg, #06b7c0, #64dedc);
  box-shadow: 0 9px 17px rgba(6, 183, 192, 0.19);
}

.metric-violet .metric-icon {
  background: linear-gradient(145deg, #5554ed, #9186ff);
  box-shadow: 0 9px 17px rgba(85, 84, 237, 0.18);
}

.metric-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.metric-value {
  min-height: 49px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #125de8;
  white-space: nowrap;
}

.metric-cyan .metric-value {
  color: #08bfc6;
}

.metric-violet .metric-value {
  color: #5557e9;
}

.metric-value strong {
  font-size: 44px;
  line-height: 48px;
  font-weight: 730;
  letter-spacing: -0.04em;
}

.metric-value span {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

.metric-copy p {
  margin: 2px 0 0;
  color: #3c5a84;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  white-space: nowrap;
}

.metric-watermark {
  position: absolute;
  right: 24px;
  top: 31px;
  color: #8eb7f4;
  font-size: 53px;
  opacity: 0.17;
  pointer-events: none;
}

.dashboard-bottom {
  height: 165px;
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.performance-card,
.weekly-card {
  height: 165px;
  min-width: 0;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--soft-shadow);
}

.performance-card {
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.performance-copy {
  min-width: 0;
}

.performance-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #17345f;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  white-space: nowrap;
}

.performance-title i {
  color: #3479f3;
  font-size: 20px;
}

.performance-copy > strong {
  display: block;
  margin-top: 13px;
  color: #071a43;
  font-size: 35px;
  line-height: 38px;
  font-weight: 540;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.performance-copy > p {
  margin: 5px 0 0;
  color: #526d93;
  font-size: 14px;
  line-height: 22px;
}

.progress-ring {
  --progress: 0%;
  width: 99px;
  height: 99px;
  flex: 0 0 99px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#78aaf5 0 var(--progress), #deebfc var(--progress) 100%);
}

.progress-ring > span {
  width: 81px;
  height: 81px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #3979ed;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 12px rgba(109, 153, 221, 0.05);
}

.progress-ring > span > strong {
  color: inherit;
  font-size: 23px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.weekly-card {
  padding: 24px 28px 20px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.weekly-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.weekly-card-title > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #17345f;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  white-space: nowrap;
}

.weekly-card-title i {
  color: #397cf4;
  font-size: 20px;
}

.weekly-card-totals {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #526d93;
  font-size: 12px;
  white-space: nowrap;
}

.weekly-card-totals > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.weekly-card-totals i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #4c8cf6;
}

.weekly-card-totals .is-customer i {
  background: #24bdb5;
}

.weekly-card-totals strong {
  color: #17345f;
  font-size: 14px;
  line-height: 18px;
  font-weight: 650;
}

.weekly-days {
  height: 76px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.week-day {
  min-width: 0;
  display: grid;
  grid-template-rows: 14px 1fr;
  justify-items: center;
  gap: 8px;
  color: #526d93;
  font-size: 12px;
  line-height: 1;
}

.week-label {
  line-height: 14px;
}

.week-bar-pair {
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
}

.week-series {
  position: relative;
  width: 10px;
  min-height: 0;
  display: flex;
  align-items: end;
}

.week-series strong {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bar-height) + 2px);
  transform: translateX(-50%);
  color: #294d80;
  font-size: 10px;
  line-height: 11px;
  font-weight: 600;
  text-align: center;
}

.week-bar {
  display: block;
  width: 10px;
  height: var(--bar-height);
  min-height: 3px;
  align-self: end;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #76aaf9, #4c8cf6);
}

.week-series.is-customer .week-bar {
  background: linear-gradient(180deg, #60d4cf, #24bdb5);
}

.week-day.is-today .week-label {
  color: #2169e7;
  font-weight: 650;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  --page-bg: #030405;
  --text-strong: #f6f6f8;
  --text-main: #e4e5e8;
  --text-muted: #a9abb0;
  --line: #34373b;
  --glass: rgba(10, 12, 13, 0.88);
  --glass-strong: rgba(14, 16, 18, 0.94);
  --glass-border: rgba(86, 89, 94, 0.76);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  --soft-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  color: #e4e5e8;
  background: #030405;
}

html[data-theme="dark"] .home-sidebar {
  border-color: rgba(75, 78, 82, 0.78);
  background: rgba(8, 10, 11, 0.86);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .home-brand,
html[data-theme="dark"] .side-nav-item,
html[data-theme="dark"] .side-footer-action,
html[data-theme="dark"] .side-logout {
  color: #c8c9cd;
}

html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .side-nav-item > i,
html[data-theme="dark"] .side-footer-action > i,
html[data-theme="dark"] .side-logout > i {
  color: #bfc1c6;
}

html[data-theme="dark"] .side-nav-item:hover,
html[data-theme="dark"] .side-nav-item:focus-visible,
html[data-theme="dark"] .side-footer-action:hover,
html[data-theme="dark"] .side-footer-action:focus-visible,
html[data-theme="dark"] .sidebar-menu[open] > .side-footer-action,
html[data-theme="dark"] .side-logout:hover,
html[data-theme="dark"] .side-logout:focus-visible {
  color: #eee9ff;
  border-color: rgba(132, 91, 196, 0.52);
  background: rgba(45, 37, 57, 0.56);
}

html[data-theme="dark"] .side-nav-item.is-active {
  color: #f2eff8;
  border-color: rgba(119, 91, 153, 0.9);
  background: linear-gradient(110deg, rgba(48, 48, 52, 0.92), rgba(37, 27, 48, 0.96));
  box-shadow: 0 8px 22px rgba(93, 43, 151, 0.24), inset -2px 0 0 #9f5fea;
}

html[data-theme="dark"] .side-nav-item.is-active > i {
  color: #c6a2f6;
}

html[data-theme="dark"] .side-footer {
  border-top-color: #323437;
}

html[data-theme="dark"] .side-popover {
  color: #c4c5ca;
  border-color: rgba(74, 77, 82, 0.92);
  background: rgba(12, 14, 16, 0.97);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.56);
}

html[data-theme="dark"] .side-popover-heading,
html[data-theme="dark"] .settings-account {
  border-color: #303237;
}

html[data-theme="dark"] .side-popover-heading strong,
html[data-theme="dark"] .settings-account strong {
  color: #f0f0f2;
}

html[data-theme="dark"] .side-popover-heading small,
html[data-theme="dark"] .settings-account small {
  color: #8f9198;
}

html[data-theme="dark"] .side-popover > a {
  color: #c0c1c5;
}

html[data-theme="dark"] .side-popover > a:hover,
html[data-theme="dark"] .side-popover > a:focus-visible {
  color: #eadcff;
  background: rgba(55, 40, 70, 0.72);
}

html[data-theme="dark"] .side-popover > a b {
  color: #d1a6ff;
  background: rgba(96, 59, 135, 0.48);
}

html[data-theme="dark"] .settings-theme-options button {
  color: #b9bbc0;
  border-color: #36383d;
  background: #15171a;
}

html[data-theme="dark"] .settings-theme-options button:hover,
html[data-theme="dark"] .settings-theme-options button:focus-visible,
html[data-theme="dark"] .settings-theme-options button[aria-pressed="true"] {
  color: #eadcff;
  border-color: #6f4b91;
  background: rgba(62, 42, 78, 0.86);
}

html[data-theme="dark"] .settings-account > i {
  color: #c6a2f6;
}

html[data-theme="dark"] .hero-card {
  border-color: rgba(75, 77, 82, 0.82);
  background-color: #060708;
  background-image: url("assets/home/dashboard-hero-night-clean.png");
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .avatar-mark {
  border-color: rgba(178, 179, 184, 0.86);
  background: #1a1d21;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .avatar-edit {
  color: #f3f0f7;
  border-color: rgba(117, 119, 124, 0.84);
  background: rgba(19, 20, 23, 0.9);
}

html[data-theme="dark"] .hero-copy h1 {
  color: #f6f6f8;
}

html[data-theme="dark"] .hero-copy p {
  color: #b3b4b8;
}

html[data-theme="dark"] .home-welcome-prefix {
  color: #fff;
}

html[data-theme="dark"] body.is-admin-account .home-welcome-name,
html[data-theme="dark"] body.is-admin-account .home-account-person {
  color: #d0afe2;
  background-color: #bf94d7;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, rgba(118, 72, 145, 0.1) 1px 3px, transparent 3px 6px),
    linear-gradient(108deg, #a774c5 0%, #bd91d4 18%, #caa8dc 32%, #c49cda 44%, #d0b2df 56%, #b780d0 69%, #c8a4db 82%, #a66ac5 100%);
  background-blend-mode: soft-light, normal;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 13px rgba(202, 159, 237, 0.32);
}

html[data-theme="dark"] body.is-vip-account .home-welcome-name,
html[data-theme="dark"] body.is-vip-account .home-account-person {
  color: #ddb43d;
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] body.is-staff-account .home-welcome-name,
html[data-theme="dark"] body.is-staff-account .home-account-person {
  color: #6fa7ff;
}

html[data-theme="dark"] .theme-toggle {
  color: #d7d8dd;
  border-color: rgba(92, 94, 101, 0.78);
  background: rgba(8, 9, 11, 0.68);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .theme-sun {
  color: #e2e2e5;
}

html[data-theme="dark"] .theme-moon {
  color: #fff;
  background: linear-gradient(145deg, #40344f, #6a5685);
  box-shadow: 0 4px 10px rgba(87, 58, 123, 0.48);
}

html[data-theme="dark"] .module-card,
html[data-theme="dark"] .focus-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .performance-card,
html[data-theme="dark"] .weekly-card {
  border-color: rgba(69, 72, 77, 0.9);
  background: rgba(9, 11, 12, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .module-card:hover,
html[data-theme="dark"] .module-card:focus-visible {
  border-color: rgba(135, 95, 177, 0.82);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(113, 75, 153, 0.2);
}

html[data-theme="dark"] .module-card h2,
html[data-theme="dark"] .metric-copy p,
html[data-theme="dark"] .performance-title,
html[data-theme="dark"] .weekly-card-title > span {
  color: #f0f0f2;
}

html[data-theme="dark"] .module-card p,
html[data-theme="dark"] .performance-copy > p,
html[data-theme="dark"] .week-day {
  color: #aaaab0;
}

html[data-theme="dark"] .focus-card {
  border-color: rgba(69, 72, 77, 0.9);
  background: rgba(9, 11, 12, 0.9);
}

html[data-theme="dark"] .focus-card-heading h2,
html[data-theme="dark"] .ai-insight-conclusion strong,
html[data-theme="dark"] .match-overview-grid strong,
html[data-theme="dark"] .latest-aunt-item strong {
  color: #f2f3f6;
}

html[data-theme="dark"] .focus-card-heading p,
html[data-theme="dark"] .ai-insight-details span,
html[data-theme="dark"] .ai-insight-details strong,
html[data-theme="dark"] .match-overview-grid span,
html[data-theme="dark"] .latest-aunt-item span,
html[data-theme="dark"] .latest-aunt-empty {
  color: #a7abb3;
}

html[data-theme="dark"] .focus-title-icon.is-ai,
html[data-theme="dark"] .home-agent-shortcuts a {
  color: #81adff;
  background: #15233a;
}

html[data-theme="dark"] .focus-title-icon.is-match {
  color: #62ddc9;
  background: #15312e;
}

html[data-theme="dark"] .home-agent-input,
html[data-theme="dark"] .match-overview-grid > div,
html[data-theme="dark"] .priority-opportunity {
  color: #a7abb3;
  border-color: #343b47;
  background: rgba(20, 23, 28, 0.92);
}

html[data-theme="dark"] .match-overview-grid > .is-primary-pool {
  border-color: #355478;
  background: linear-gradient(145deg, rgba(24, 35, 51, 0.98), rgba(17, 27, 42, 0.98));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .match-overview-grid > .is-primary-pool strong {
  color: #8dbaff;
  text-shadow: 0 4px 14px rgba(69, 137, 247, 0.25);
}

html[data-theme="dark"] .home-agent-input input {
  color: #f0f1f4;
}

html[data-theme="dark"] .ai-insight-panel {
  border-color: #303a49;
  background: #121b29;
}

html[data-theme="dark"] .ai-insight-conclusion {
  border-color: #303a49;
}

html[data-theme="dark"] .ai-insight-details .is-finding span {
  color: #e9ae66;
}

html[data-theme="dark"] .ai-insight-details .is-action span {
  color: #65d7c1;
}

html[data-theme="dark"] .priority-opportunity-label {
  border-color: #343b47;
}

html[data-theme="dark"] .latest-aunt-item {
  border-color: #343b47;
  background: rgba(14, 18, 23, 0.92);
}

html[data-theme="dark"] .latest-aunt-item:hover,
html[data-theme="dark"] .latest-aunt-item:focus-visible {
  border-color: #557cab;
  background: rgba(25, 38, 55, 0.96);
}

html[data-theme="dark"] .tone-blue {
  background: linear-gradient(145deg, #2268f5, #73a8ff);
  box-shadow: 0 0 12px rgba(50, 116, 255, 0.5), 0 9px 20px rgba(31, 94, 230, 0.34);
}

html[data-theme="dark"] .metric-blue .metric-icon {
  background: linear-gradient(145deg, #2772f8, #70a8ff);
  box-shadow: 0 0 12px rgba(50, 116, 255, 0.5), 0 9px 20px rgba(31, 94, 230, 0.34);
}

html[data-theme="dark"] .tone-violet {
  background: linear-gradient(145deg, #5a55ed, #9b8bff);
  box-shadow: 0 0 12px rgba(116, 91, 255, 0.46), 0 9px 20px rgba(83, 61, 216, 0.32);
}

html[data-theme="dark"] .metric-violet .metric-icon {
  background: linear-gradient(145deg, #5554ed, #9186ff);
  box-shadow: 0 0 12px rgba(116, 91, 255, 0.46), 0 9px 20px rgba(83, 61, 216, 0.32);
}

html[data-theme="dark"] .tone-cyan {
  background: linear-gradient(145deg, #05bac4, #61e4db);
  box-shadow: 0 0 12px rgba(46, 213, 209, 0.44), 0 9px 20px rgba(3, 155, 165, 0.3);
}

html[data-theme="dark"] .metric-cyan .metric-icon {
  background: linear-gradient(145deg, #06b7c0, #64dedc);
  box-shadow: 0 0 12px rgba(46, 213, 209, 0.44), 0 9px 20px rgba(3, 155, 165, 0.3);
}

html[data-theme="dark"] .tone-green {
  background: linear-gradient(145deg, #1ec5a4, #75e7d1);
  box-shadow: 0 0 12px rgba(50, 211, 179, 0.42), 0 9px 20px rgba(17, 153, 127, 0.3);
}

html[data-theme="dark"] .enter-button {
  color: #c58af0;
  border-color: #34363a;
  background: rgba(14, 16, 18, 0.86);
  box-shadow: none;
}

html[data-theme="dark"] .metrics-panel {
  border-color: rgba(69, 72, 77, 0.86);
  background: rgba(7, 9, 10, 0.76);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .metric-blue .metric-value {
  color: #4f87fa;
}

html[data-theme="dark"] .metric-cyan .metric-value {
  color: #37c9c9;
}

html[data-theme="dark"] .metric-violet .metric-value {
  color: #9469f4;
}

html[data-theme="dark"] .metric-watermark {
  color: #b8b9bd;
  opacity: 0.17;
}

html[data-theme="dark"] .performance-title i,
html[data-theme="dark"] .weekly-card-title i {
  color: #6da1ff;
  text-shadow: 0 0 8px rgba(82, 143, 255, 0.42);
}

html[data-theme="dark"] .performance-copy > strong,
html[data-theme="dark"] .weekly-card-totals strong {
  color: #f4f4f5;
}

html[data-theme="dark"] .progress-ring {
  background: conic-gradient(#b58b4d 0 var(--progress), #3a3b3f var(--progress) 100%);
}

html[data-theme="dark"] .progress-ring > span {
  color: #6da1ff;
  background: #0b0d0e;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .week-series strong {
  color: #bfc0c4;
}

html[data-theme="dark"] .weekly-card-totals {
  color: #aaaab0;
}

html[data-theme="dark"] .week-day.is-today .week-label {
  color: #6da1ff;
}

@media (max-width: 1399px) {
  .home-shell {
    padding: 16px;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 20px;
  }

  .home-sidebar {
    top: 16px;
    width: 168px;
    height: calc(100vh - 32px);
    padding-inline: 12px;
  }

  .dashboard-main {
    padding-top: 0;
  }

  .hero-card {
    min-height: 155px;
  }

  .module-grid,
  body.is-admin-account .module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .module-card {
    height: 210px;
  }

  .focus-card {
    padding: 24px 24px 28px;
  }

  .metrics-panel {
    height: auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .dashboard-bottom {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1050px) {
  .home-shell {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 18px;
  }

  .home-sidebar {
    width: 82px;
    min-height: 620px;
    padding: 24px 10px 16px;
  }

  .home-brand {
    justify-content: center;
    padding: 0;
  }

  .home-brand strong,
  .side-nav-item span,
  .side-footer-action span,
  .side-logout span {
    display: none;
  }

  .side-nav-submenu {
    padding-left: 0;
  }

  .side-nav {
    margin-top: 28px;
    gap: 10px;
  }

  .side-nav-item,
  .side-footer-action,
  .side-logout {
    justify-content: center;
    padding: 0;
  }

  .side-footer {
    justify-items: stretch;
  }

  .hero-card {
    gap: 28px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .theme-toggle {
    width: 88px;
    flex-basis: 88px;
  }

  .home-focus-grid {
    grid-template-columns: 1fr;
  }

  .focus-card {
    min-height: 400px;
  }

  .metric-watermark {
    right: 16px;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .home-shell {
    padding: 0 12px 24px;
    display: block;
  }

  .home-sidebar {
    position: sticky;
    z-index: 20;
    top: 0;
    width: calc(100% + 24px);
    height: 74px;
    min-height: 0;
    margin-left: -12px;
    padding: 10px 12px;
    border-radius: 0 0 18px 18px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
  }

  .home-brand {
    width: 44px;
  }

  .brand-mark {
    font-size: 26px;
  }

  .side-nav {
    min-width: 0;
    margin: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav-item {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  .side-nav-item > i {
    font-size: 22px;
  }

  .side-nav-group {
    flex: 0 0 auto;
  }

  .side-nav-group[open] {
    display: flex;
    gap: 6px;
  }

  .side-nav-submenu {
    padding: 0;
    display: flex;
    gap: 6px;
  }

  .side-nav-submenu .side-nav-item {
    padding: 0;
  }

  .side-footer {
    margin: 0;
    padding: 0;
    border: 0;
    display: block;
  }

  .sidebar-menu {
    display: none;
  }

  .side-logout {
    width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  .dashboard-main {
    width: 100%;
    padding-top: 16px;
    zoom: 0.5;
  }

  .hero-card {
    height: auto;
    min-height: 132px;
    padding: 14px;
    gap: 16px;
    background-position: 63% center;
  }

  .profile-upload {
    width: 84px;
    height: 84px;
    flex-basis: 84px;
  }

  .avatar-mark {
    border-radius: 17px;
  }

  .avatar-edit {
    right: 4px;
    bottom: 4px;
    min-height: 22px;
    padding: 0 6px;
    font-size: 10px;
  }

  .hero-copy h1 {
    font-size: 27px;
    line-height: 1.25;
  }

  .hero-copy p {
    margin-top: 3px;
    font-size: 14px;
    line-height: 22px;
  }

  .theme-toggle {
    width: 78px;
    height: 36px;
    flex-basis: 78px;
    padding: 2px;
  }

  .theme-choice {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .module-section {
    margin-top: 20px;
  }

  .module-grid,
  body.is-admin-account .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .module-card {
    height: 212px;
    padding: 17px;
  }

  .focus-card {
    min-height: 420px;
    padding: 22px 22px 26px;
  }

  .match-overview-grid {
    gap: 10px;
  }

  .metrics-panel {
    margin-top: 18px;
    padding: 12px;
  }

  .metric-grid {
    gap: 12px;
  }

  .metric-card {
    height: 110px;
    padding: 16px;
    gap: 12px;
  }

  .metric-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    font-size: 27px;
  }

  .metric-value {
    min-height: 42px;
  }

  .metric-value strong {
    font-size: 36px;
    line-height: 42px;
  }

  .metric-watermark {
    display: none;
  }

  .dashboard-bottom {
    margin-top: 18px;
    grid-template-columns: 1fr;
  }

  .weekly-card {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .home-focus-grid {
    grid-auto-rows: auto;
    align-items: start;
  }

  .hero-card {
    min-height: 116px;
  }

  .profile-upload {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }

  .hero-copy h1 {
    font-size: 23px;
  }

  .theme-toggle {
    position: absolute;
    top: 8px;
    right: 6px;
    width: 66px;
    height: 34px;
    flex-basis: 66px;
  }

  .theme-choice {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .hero-copy {
    padding-right: 28px;
  }

  .module-grid,
  body.is-admin-account .module-grid {
    grid-template-columns: 1fr;
  }

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

  .module-card {
    height: 202px;
  }

  .focus-card {
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 18px;
  }

  .ai-insight-panel {
    padding-bottom: 10px;
  }

  .ai-insight-details p {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .ai-insight-details span {
    white-space: nowrap;
  }

  .home-agent-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .home-agent-shortcuts a {
    min-height: 38px;
    padding: 0 6px;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
  }

  .home-agent-shortcuts i {
    font-size: 16px;
  }

  .home-agent-shortcuts a:last-child {
    grid-column: auto;
  }

  .match-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .priority-opportunity-body {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 14px 0;
    gap: 10px;
  }

  .metric-card {
    height: 108px;
  }

  .performance-card {
    padding: 22px;
  }

  .progress-ring {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
  }

  .progress-ring > span {
    width: 72px;
    height: 72px;
  }

  .weekly-card {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@view-transition {
  navigation: auto;
}

:root {
  view-transition-name: none;
}

.home-sidebar {
  view-transition-name: system-sidebar;
}

::view-transition-group(system-sidebar),
::view-transition-old(system-sidebar),
::view-transition-new(system-sidebar) {
  animation: none;
  mix-blend-mode: normal;
}
