:root {
  --ink: #1a2333;
  --muted: #4a5a72;
  --subtle: #7a8ea8;
  --line: rgba(39, 81, 130, 0.12);
  --line-strong: rgba(39, 81, 130, 0.2);
  --paper: #ffffff;
  --soft: #eef1f6;
  --soft-2: #f7f9fc;
  --nav: #172131;
  --nav-2: #21314a;
  --nav-ink: #f4f8ff;
  --nav-muted: rgba(244, 248, 255, 0.64);
  --blue: #2178de;
  --teal: #0fbcd4;
  --orange: #f08a24;
  --green: #168348;
  --danger: #b42318;
  --shadow: 0 18px 44px rgba(28, 39, 49, 0.1);
  --shadow-soft: 0 10px 28px rgba(28, 39, 49, 0.07);
  --shadow-card: 0 16px 38px rgba(24, 47, 76, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--soft);
}

body {
  margin: 0;
  color: var(--ink);
  background: #f5f7fb;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

[hidden] {
  display: none !important;
}

h1,
h2,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

input,
select {
  height: 38px;
  padding: 0 11px;
}

textarea {
  resize: vertical;
  padding: 10px 11px;
}

input::placeholder {
  color: var(--subtle);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 95, 153, 0.14);
}

.hint {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.login-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 24px;
  color: #f4f8ff;
  background:
    radial-gradient(900px 460px at 12% 8%, rgba(96, 165, 250, 0.28), transparent 62%),
    radial-gradient(820px 520px at 88% 92%, rgba(14, 165, 233, 0.22), transparent 60%),
    linear-gradient(160deg, #050a18 0%, #0a1428 50%, #050b1a 100%);
  overflow: hidden;
  isolation: isolate;
}

.login-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.85;
  will-change: transform;
}

.aurora-1 {
  top: -160px;
  left: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #3b82f6 0%, rgba(59, 130, 246, 0) 70%);
  animation: aurora-float-a 18s ease-in-out infinite alternate;
}

.aurora-2 {
  bottom: -180px;
  right: -140px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
  animation: aurora-float-b 22s ease-in-out infinite alternate;
}

.aurora-3 {
  top: 35%;
  left: 45%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #8b5cf6 0%, rgba(139, 92, 246, 0) 72%);
  opacity: 0.55;
  animation: aurora-float-c 26s ease-in-out infinite alternate;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  opacity: 0.55;
}

@keyframes aurora-float-a {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(60px, 40px, 0) scale(1.1); }
}

@keyframes aurora-float-b {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-50px, -30px, 0) scale(1.08); }
}

@keyframes aurora-float-c {
  0% { transform: translate3d(-50%, -50%, 0) scale(0.95); }
  100% { transform: translate3d(-46%, -54%, 0) scale(1.12); }
}

.login-lang-switch {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 3;
  min-width: 92px;
  height: 36px;
  color: #f4f8ff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.login-lang-switch:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
}

.login-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 460px);
  width: min(1080px, 100%);
  min-height: 600px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.55);
  box-shadow:
    0 40px 90px rgba(2, 8, 23, 0.55),
    0 8px 24px rgba(2, 8, 23, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  overflow: hidden;
  animation: stage-in 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes stage-in {
  0% { opacity: 0; transform: translateY(14px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-visual {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 28px;
  min-height: 100%;
  padding: 40px;
  color: #fff;
  background:
    radial-gradient(600px 420px at 20% 0%, rgba(96, 165, 250, 0.42), transparent 60%),
    radial-gradient(600px 460px at 100% 100%, rgba(20, 184, 166, 0.38), transparent 62%),
    linear-gradient(160deg, #0b2545 0%, #0f3460 55%, #082032 100%);
  overflow: hidden;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 75%, transparent 100%);
  pointer-events: none;
  opacity: 0.6;
}

.login-visual > * {
  position: relative;
  z-index: 1;
}

.login-visual-copy {
  display: grid;
  gap: 18px;
  max-width: 540px;
}

.login-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 248, 255, 0.92);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.login-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}

.login-visual-copy h1 {
  margin: 0;
  max-width: 520px;
  font-size: clamp(40px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffffff 0%, #cfe2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.login-visual-copy p:not(.eyebrow) {
  margin: 0;
  max-width: 460px;
  color: rgba(244, 248, 255, 0.78);
  font-size: 15px;
  line-height: 1.6;
}

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

.login-signal-grid div {
  display: grid;
  gap: 6px;
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.login-signal-grid div:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
}

.login-signal-grid span {
  color: rgba(244, 248, 255, 0.66);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-signal-grid strong {
  align-self: end;
  font-size: 18px;
  color: #fff;
}

.login-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 18px;
  width: 100%;
  padding: 48px 44px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.96) 100%);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.4);
  color: var(--ink);
}

.login-card-brand {
  margin-bottom: 4px;
}

.login-card-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.login-card .hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field > span {
  color: #324258;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-input {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid rgba(39, 81, 130, 0.18);
  border-radius: 11px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-input:hover {
  border-color: rgba(33, 120, 222, 0.42);
}

.login-input:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(33, 120, 222, 0.14);
  background: #fff;
}

.login-input-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0 4px 0 14px;
  color: #8497ad;
  transition: color 160ms ease;
}

.login-input:focus-within .login-input-icon {
  color: var(--blue);
}

.login-input input {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.login-input input:focus {
  outline: none;
  box-shadow: none;
}

.login-input input::placeholder {
  color: #97a6bc;
}

.login-input-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 100%;
  margin-right: 4px;
  border: 0;
  border-radius: 8px;
  color: #8497ad;
  background: transparent;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}

.login-input-toggle svg {
  width: 18px;
  height: 18px;
}

.login-input-toggle:hover {
  color: var(--blue);
  background: rgba(33, 120, 222, 0.08);
}

.login-input-toggle.is-active {
  color: var(--blue);
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  margin-top: 6px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #1d66c2 0%, #2178de 50%, #06b6d4 100%);
  background-size: 180% 180%;
  background-position: 0% 50%;
  box-shadow: 0 14px 26px rgba(33, 120, 222, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-position 360ms ease, transform 140ms ease, box-shadow 200ms ease;
}

.login-submit svg {
  width: 16px;
  height: 16px;
  transition: transform 200ms ease;
}

.login-submit:hover {
  background-position: 100% 50%;
  box-shadow: 0 18px 32px rgba(33, 120, 222, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.login-submit:hover svg {
  transform: translateX(3px);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-footnote {
  margin: 6px 0 0;
  color: var(--subtle);
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.04em;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.login-brand,
.login-card-brand {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.brand-row.compact {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(238, 244, 248, 0.12);
}

.admin-brand-logo {
  display: block;
  width: min(272px, 100%);
  height: auto;
}

.login-brand .admin-brand-logo {
  width: min(314px, 100%);
}

.login-card-brand .admin-brand-logo {
  width: min(246px, 100%);
}

.admin-brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.sidebar-brand {
  display: grid;
  justify-items: start;
}

.sidebar-brand-full {
  width: 166px;
}

.sidebar-brand-mark {
  display: none;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

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

.brand-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-row span:not(.brand-mark) {
  color: var(--muted);
  font-size: 12px;
}

.login-brand .admin-brand-subtitle {
  color: rgba(244, 248, 255, 0.76);
}

.sidebar .brand-row span:not(.brand-mark) {
  color: var(--nav-muted);
}

.sidebar .brand-mark {
  color: #fff;
}

.admin-app {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 160ms ease;
}

.admin-app.sidebar-collapsed {
  grid-template-columns: 78px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px 14px;
  color: var(--nav-ink);
  background: linear-gradient(180deg, #26364d, #1c2a3e);
  overflow: visible;
}

.sidebar-toggle {
  position: absolute;
  top: 78px;
  right: -13px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  background: #243650;
  box-shadow: 0 8px 18px rgba(18, 27, 38, 0.18);
  cursor: pointer;
}

.sidebar-toggle::before {
  content: "<";
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.admin-app.sidebar-collapsed .sidebar-toggle::before {
  content: ">";
}

.sidebar-toggle:hover {
  border-color: rgba(255, 255, 255, 0.44);
  background: #2c333b;
}

.side-nav {
  display: grid;
  gap: 5px;
}

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

.side-nav-label {
  margin: 2px 0 8px;
  padding: 0 10px;
  color: rgba(244, 248, 255, 0.58);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.side-nav-label-secondary {
  margin-top: 18px;
}

.side-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(244, 248, 255, 0.78);
  background: transparent;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.nav-submenu-block {
  display: grid;
  gap: 6px;
}

.nav-submenu-title {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  color: rgba(244, 248, 255, 0.62);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.nav-submenu-items {
  display: grid;
  gap: 5px;
  padding-left: 18px;
}

.side-nav .nav-submenu-items button {
  min-height: 36px;
  padding-left: 12px;
}

.nav-subdot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(244, 248, 255, 0.34);
}

.nav-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.7;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 7px;
  color: rgba(244, 248, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  overflow: visible;
}

.nav-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.side-nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.side-nav button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(147, 197, 253, 0.26);
  box-shadow: none;
}

.nav-submenu-block.has-active .nav-submenu-title {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(147, 197, 253, 0.22);
}

.nav-submenu-block.has-active .nav-submenu-title .nav-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

.nav-submenu-block.expanded .nav-chevron {
  transform: rotate(225deg);
}

.side-nav button.active .nav-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

.side-nav button.active .nav-subdot {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(33, 120, 222, 0.2);
}

.side-nav button > span:not(.nav-icon):not(.nav-subdot):not(.nav-chevron),
.nav-submenu-title > span:not(.nav-icon):not(.nav-chevron) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar [data-logout] {
  position: relative;
  margin-top: 10px;
  color: rgba(244, 248, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-account {
  display: grid;
  gap: 4px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-account span {
  color: var(--nav-muted);
  font-size: 11px;
  font-weight: 800;
}

.sidebar-account strong {
  color: #fff;
  font-size: 14px;
}

.sidebar [data-logout]:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
}

.admin-app.sidebar-collapsed .sidebar {
  align-items: stretch;
  padding: 18px 10px;
}

.admin-app.sidebar-collapsed .brand-row.compact {
  justify-content: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.admin-app.sidebar-collapsed .sidebar .brand-row div {
  display: none;
}

.admin-app.sidebar-collapsed .sidebar-brand-full {
  display: none;
}

.admin-app.sidebar-collapsed .sidebar-brand-mark {
  display: block;
}

.admin-app.sidebar-collapsed .side-nav button,
.admin-app.sidebar-collapsed .sidebar [data-logout] {
  justify-content: center;
  min-width: 0;
  padding: 0;
  text-align: center;
}

.admin-app.sidebar-collapsed .side-nav button::after,
.admin-app.sidebar-collapsed .sidebar [data-logout]::after {
  content: none;
}

.admin-app.sidebar-collapsed .side-nav button > span:not(.nav-icon):not(.nav-subdot):not(.nav-chevron),
.admin-app.sidebar-collapsed .nav-submenu-title > span:not(.nav-icon):not(.nav-chevron),
.admin-app.sidebar-collapsed .nav-chevron {
  display: none;
}

.admin-app.sidebar-collapsed .nav-submenu-title {
  justify-content: center;
  padding: 0;
}

.admin-app.sidebar-collapsed .nav-submenu-items {
  display: none;
  padding-left: 0;
}

.admin-app.sidebar-collapsed .side-nav .nav-submenu-items button {
  justify-content: center;
  padding: 0;
}

.admin-app.sidebar-collapsed .side-nav-label,
.admin-app.sidebar-collapsed .sidebar-account {
  display: none;
}

.workspace {
  min-width: 0;
  padding: 18px 24px 28px;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 8px 10px;
}

.page-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(24, 47, 76, 0.05);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.welcome-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.welcome-banner > div {
  display: grid;
  gap: 2px;
  min-width: 118px;
  padding: 0;
}

.welcome-banner > div:first-child {
  border-right: 1px solid var(--line);
  padding-right: 14px;
}

.muted-utility {
  opacity: 0.8;
}

.welcome-banner span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.welcome-banner strong {
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-title {
  color: #243650;
  font-size: 15px;
  font-weight: 850;
}

.header-status-card {
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding: 0 2px;
}

.header-status-card span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.header-status-card strong {
  color: var(--ink);
  font-size: 13px;
}

.header-actions,
.toolbar,
.saved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.danger-button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.primary-button {
  border: 1px solid var(--blue);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #1d66c2);
  box-shadow: 0 9px 18px rgba(33, 120, 222, 0.18);
}

.primary-button:hover {
  background: linear-gradient(135deg, #1d66c2, #1557aa);
  border-color: #1557aa;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: #fff;
}

.secondary-button:hover {
  border-color: #b7c3d0;
  background: #f8fafc;
}

.danger-button {
  border: 1px solid rgba(180, 35, 24, 0.22);
  color: var(--danger);
  background: #fff;
}

.danger-button:hover {
  border-color: rgba(180, 35, 24, 0.38);
  background: #fff7f6;
}

.file-button {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.file-button:hover {
  border-color: #b7c3d0;
  background: #f8fafc;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.close-button::before,
.close-button::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.close-button::before {
  transform: rotate(45deg);
}

.close-button::after {
  transform: rotate(-45deg);
}

.full {
  grid-column: 1 / -1;
}

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

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.metric-card {
  position: relative;
  display: grid;
  gap: 9px;
  align-content: start;
  min-height: 142px;
  padding: 18px 18px 16px;
  overflow: hidden;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.metric-card::after {
  content: none;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  color: var(--ink);
  font-size: 36px;
  line-height: 1;
}

.metric-card small {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
}

.metric-card em {
  align-self: end;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.metric-card:hover {
  border-color: rgba(33, 120, 222, 0.24);
  box-shadow: 0 18px 40px rgba(24, 47, 76, 0.12);
}

.metric-card-warning {
  border-color: rgba(180, 35, 24, 0.3);
  background: #fffafa;
}

.metric-card-warning strong,
.metric-card-warning em {
  color: var(--danger);
}

.dashboard-hero {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  min-height: 150px;
  margin-bottom: 18px;
  border: 1px solid rgba(18, 36, 61, 0.2);
  border-radius: 8px;
  padding: 20px 22px;
  color: #f8fbff;
  background:
    linear-gradient(135deg, rgba(18, 35, 56, 0.88), rgba(30, 48, 69, 0.78)),
    url("/media/assets/hero-export-yard.png") center/cover;
  box-shadow: 0 18px 44px rgba(20, 36, 56, 0.14);
  overflow: hidden;
}

.dashboard-hero::after {
  content: none;
}

.dashboard-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  max-width: 820px;
}

.dashboard-hero-copy h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.dashboard-hero-copy > p:not(.eyebrow) {
  margin: 0;
  max-width: 620px;
  color: rgba(248, 251, 255, 0.78);
  font-size: 13px;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.dashboard-hero-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.dashboard-hero-summary div {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-hero-summary strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.dashboard-hero-summary span {
  color: rgba(248, 251, 255, 0.76);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-hero-actions .primary-button {
  border-color: #fff;
  color: #0f1c2d;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.dashboard-hero-actions .primary-button:hover {
  border-color: #e7eef8;
  background: #f4f8ff;
}

.dashboard-hero-actions .secondary-button {
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.dashboard-hero-actions .secondary-button:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.dashboard-hero-status {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  align-self: flex-start;
  min-width: 124px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
}

.dashboard-hero-status span {
  color: rgba(248, 251, 255, 0.7);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-hero-status strong {
  color: #fff;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dashboard-metric-grid .metric-card {
  border-color: rgba(39, 81, 130, 0.16);
  background: #fff;
}

.metric-card-accent {
  border-color: rgba(33, 120, 222, 0.28);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-bottom-grid {
  grid-template-columns: minmax(0, 0.88fr) minmax(380px, 1.12fr);
}

.dashboard-panel {
  border-color: rgba(39, 81, 130, 0.14);
}

.dashboard-todo-list,
.dashboard-inquiry-list,
.inventory-health-summary {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
}

.dashboard-todo-list {
  grid-template-columns: 1fr;
}

.todo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.todo-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.todo-item strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.todo-item em {
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.todo-item:hover {
  border-color: rgba(33, 120, 222, 0.24);
  background: #fbfdff;
}

.todo-warning {
  border-color: rgba(240, 138, 36, 0.24);
}

.todo-danger {
  border-color: rgba(180, 35, 24, 0.2);
}

.todo-info {
  border-color: rgba(33, 120, 222, 0.18);
}

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

.inventory-health-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.inventory-health-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.inventory-health-card strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.inventory-health-card small {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
}

.inventory-health-good {
  border-color: rgba(22, 131, 72, 0.22);
  background: #fbfefc;
}

.inventory-health-warning {
  border-color: rgba(240, 138, 36, 0.24);
  background: #fffdf8;
}

.inventory-health-danger {
  border-color: rgba(180, 35, 24, 0.2);
  background: #fffafa;
}

.inventory-score-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(33, 120, 222, 0.18);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #f7fbff);
}

.inventory-score-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.inventory-score-ring {
  --score: 0;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 59%),
    conic-gradient(var(--green) var(--score), #e5edf6 0);
  box-shadow: inset 0 0 0 1px rgba(39, 81, 130, 0.1);
}

.inventory-score-ring strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.inventory-score-ring span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 850;
}

.ai-diagnosis-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

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

.inquiries-board {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  background: #f7f9fc;
}

.inquiry-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fff;
}

.inquiry-card-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.inquiry-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inquiry-card-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inquiry-card-head strong {
  color: var(--ink);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-card-head span:not(.status-pill) {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.inquiry-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.inquiry-summary summary {
  cursor: pointer;
  overflow-wrap: anywhere;
}

.inquiry-summary p {
  margin: 8px 0 0;
  color: var(--ink);
}

.inquiry-card small {
  color: var(--subtle);
  font-size: 12px;
}

.inquiry-management-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.inquiry-management-card .status-select {
  min-width: 150px;
}

.inquiry-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--subtle);
  font-size: 12px;
}

.inquiry-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inquiry-card-actions .secondary-button {
  min-height: 32px;
  padding: 0 10px;
}

.dashboard-empty-card {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 20px;
  color: var(--muted);
  background: #fbfdff;
  text-align: center;
}

.table-subtext {
  display: block;
  margin-top: 3px;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.35;
}

.compact-actions {
  flex-wrap: nowrap;
}

.compact-actions .secondary-button {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

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

.dashboard-focus-list span {
  position: relative;
  padding-left: 38px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.dashboard-focus-list span::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 3px solid rgba(33, 120, 222, 0.16);
  border-radius: 50%;
  background: var(--blue);
  transform: translateY(-50%);
}

.dashboard-activity {
  display: grid;
  gap: 0;
  padding: 8px 18px 16px;
}

.dashboard-activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  min-height: 58px;
  padding: 12px 0;
}

.dashboard-activity-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 34px;
  bottom: -10px;
  width: 1px;
  background: var(--line);
}

.dashboard-activity-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 3px;
  border: 3px solid #eaf3ff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(33, 120, 222, 0.09);
}

.dashboard-activity-item strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.dashboard-activity-item small,
.dashboard-activity-empty {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.panel-header.wrap {
  flex-wrap: wrap;
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.panel-title-stack {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.panel-title-stack .eyebrow {
  margin: 0;
}

.panel-hint {
  margin: 0;
  color: var(--subtle);
  font-size: 12px;
}

.operations-panel {
  min-height: 100%;
}

.ops-list {
  display: grid;
  gap: 10px;
  padding: 16px 18px 18px;
}

.ops-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: var(--soft-2);
  font-size: 13px;
}

.lead-discovery-shell {
  display: grid;
  gap: 0;
}

.lead-discovery-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.lead-pool-utility-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(420px, 1.28fr);
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.lead-form {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

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

.lead-config-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-side-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.lead-card-heading,
.lead-detail-actions,
.lead-score-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-card-heading {
  grid-column: 1 / -1;
  align-items: flex-start;
}

.lead-card-heading > span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: #12305a;
  background: #e8eef8;
  font-size: 12px;
  font-weight: 850;
}

.lead-card-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.lead-search-card .full,
.lead-advanced-options {
  grid-column: 1 / -1;
}

.lead-manual-panel form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.lead-manual-panel .primary-button {
  justify-self: start;
}

.lead-chip-field {
  display: grid;
  gap: 7px;
}

.lead-chip-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lead-chip-selected,
.lead-chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-chip-selected {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

.lead-chip-selected > span {
  color: var(--subtle);
  font-size: 12px;
}

.lead-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.lead-chip.is-active,
.lead-chip.is-selected {
  border-color: #9bbcf8;
  color: #12305a;
  background: #eef4ff;
}

.lead-advanced-options,
.lead-manual-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--soft-2);
}

.lead-advanced-options summary,
.lead-manual-panel summary {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.lead-advanced-options label,
.lead-manual-panel form {
  margin-top: 12px;
}

.lead-manual-panel form {
  display: grid;
  gap: 10px;
}

.lead-progress-steps {
  display: grid;
  gap: 8px;
}

.lead-progress-summary {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.lead-progress-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.lead-progress-summary span,
.lead-progress-result {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.lead-progress-result.is-error {
  color: #b42318;
}

.lead-progress-meter {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e5e7eb;
}

.lead-progress-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f6fed;
  transition: width 180ms ease;
}

.lead-progress-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-progress-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.lead-progress-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--soft-2);
}

.lead-progress-step.is-active {
  border-color: #2f6fed;
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.08);
}

.lead-progress-step.is-done {
  border-color: #b7e4c7;
  background: #f0fdf4;
}

.lead-progress-step.is-error {
  border-color: #f4b4ab;
  background: #fff1f0;
}

.lead-progress-step span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #12305a;
  font-size: 12px;
  font-weight: 850;
}

.lead-progress-step.is-active span {
  animation: leadPulse 1.1s ease-in-out infinite;
  background: #2f6fed;
}

.lead-progress-step.is-done span {
  background: #138a43;
}

.lead-progress-step.is-error span {
  background: #b42318;
}

.lead-progress-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@keyframes leadPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 111, 237, 0.32);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(47, 111, 237, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 111, 237, 0);
  }
}

.lead-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.lead-stat-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft-2);
}

.lead-stat-grid strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.lead-stat-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.lead-form h3,
.lead-list-panel h3,
.lead-detail-panel h3,
.lead-detail-section h4 {
  margin: 0;
}

.lead-task-list {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.lead-task-list > strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.lead-task-item {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(72px, 0.6fr) minmax(110px, 0.8fr) minmax(70px, 0.5fr) 48px minmax(92px, 0.8fr) auto;
  min-width: 760px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--soft-2);
}

.lead-task-item span {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.lead-task-item strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.lead-discovery-content {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  min-height: 520px;
}

.lead-list-panel {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.lead-list-panel table {
  min-width: 860px;
  table-layout: fixed;
}

.lead-list-panel th:nth-child(1),
.lead-list-panel td:nth-child(1) {
  width: 210px;
}

.lead-list-panel th:nth-child(2),
.lead-list-panel td:nth-child(2) {
  width: 96px;
}

.lead-list-panel th:nth-child(4),
.lead-list-panel td:nth-child(4) {
  width: 130px;
}

.lead-list-panel th:last-child,
.lead-list-panel td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 170px;
  background: #fff;
  box-shadow: -1px 0 0 var(--line);
}

.lead-list-panel th:last-child {
  z-index: 3;
  background: #f3f7fc;
}

.lead-company-cell {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.lead-nowrap,
.contact-quality-badge {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.contact-quality-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 850;
}

.panel-header.compact {
  min-height: 54px;
}

.lead-detail-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  background: #fff;
}

.lead-detail-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.lead-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.lead-detail-header span {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.lead-detail-header h3 {
  margin-top: 4px;
  font-size: 20px;
}

.lead-detail-section {
  display: grid;
  gap: 9px;
}

.lead-detail-section p,
.muted-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.lead-detail-section dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.lead-detail-section dl div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
}

.lead-detail-section dt {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.lead-detail-section dd {
  margin: 0;
  color: var(--ink);
}

.lead-detail-section article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.lead-log-form {
  display: grid;
  gap: 10px;
}

.lead-detail-actions {
  flex-wrap: wrap;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 26px;
  border-radius: 999px;
  color: #0f5132;
  background: #e9f8ef;
  font-weight: 850;
  white-space: nowrap;
}

.score-very_high {
  color: #064e3b;
  background: #d8f5e6;
}

.score-high {
  color: #075985;
  background: #e0f2fe;
}

.score-medium_high {
  color: #365314;
  background: #ecfccb;
}

.score-medium {
  color: #7c4a03;
  background: #fff4d6;
}

.status-needs-verification {
  color: #7c4a03;
  background: #fff4d6;
}

.status-verified {
  color: #064e3b;
  background: #d8f5e6;
}

.status-contacted,
.status-interested,
.status-quoted {
  color: #075985;
  background: #e0f2fe;
}

.status-rejected,
.status-invalid {
  color: #7f1d1d;
  background: #fee2e2;
}

.score-low {
  color: #7f1d1d;
  background: #fee2e2;
}

.product-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) repeat(3, minmax(150px, 0.65fr));
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.settings-toolbar {
  grid-template-columns: 1fr;
}

.dictionary-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dictionary-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.dictionary-tabs button:hover {
  border-color: rgba(33, 120, 222, 0.34);
  color: var(--blue);
}

.dictionary-tabs button.active {
  border-color: rgba(33, 120, 222, 0.28);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 9px 18px rgba(33, 120, 222, 0.16);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.task-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px 18px 18px 34px;
  color: var(--muted);
}

.record-form,
.form-grid {
  display: grid;
  gap: 12px;
}

.record-form {
  padding: 0;
}

.form-grid {
  grid-template-columns: 1fr;
  align-content: start;
}

.form-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.form-section-title {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.image-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.image-field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.choice-field,
.permission-field {
  display: grid;
  gap: 8px;
}

.choice-field > span,
.permission-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.choice-item,
.permission-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.choice-item input,
.permission-item input {
  margin-top: 2px;
}

.choice-item span {
  display: grid;
  gap: 2px;
}

.choice-item strong {
  color: var(--ink);
  font-size: 13px;
}

.choice-item small {
  color: var(--muted);
  font-size: 11px;
}

.permission-matrix {
  display: grid;
  gap: 10px;
}

.permission-matrix fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.permission-matrix legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.empty-inline {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdff;
}

.record-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  justify-items: end;
  pointer-events: none;
}

.record-drawer[aria-hidden="false"] {
  pointer-events: auto;
}

.record-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 32, 0);
  transition: background 180ms ease;
}

.record-drawer[aria-hidden="false"] .record-drawer-backdrop {
  background: rgba(15, 23, 32, 0.42);
}

.record-drawer-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(780px, 100vw);
  height: 100vh;
  background: var(--soft);
  box-shadow: -18px 0 44px rgba(28, 39, 49, 0.18);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.record-drawer[aria-hidden="false"] .record-drawer-panel {
  transform: translateX(0);
}

.record-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.record-drawer-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.drawer-record-form {
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.drawer-record-form .form-grid {
  overflow: auto;
  padding: 16px 18px 94px;
}

.drawer-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 22px rgba(28, 39, 49, 0.06);
}

.drawer-actions .primary-button,
.drawer-actions .secondary-button {
  min-width: 112px;
}

.empty-state {
  display: grid;
  gap: 9px;
  justify-items: start;
  padding: 14px 0;
  color: var(--muted);
}

.empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 244px);
  background: #fff;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

th,
td {
  max-width: 260px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #5d708d;
  background: #f3f7fc;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

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

tbody tr:last-child td {
  border-bottom: 0;
}

.number-cell {
  font-variant-numeric: tabular-nums;
}

.row-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}

.row-actions .secondary-button,
.row-actions .danger-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.status-select {
  min-width: 128px;
  height: 34px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-active,
.status-in-stock,
.status-won,
.status-ev {
  color: #0f6848;
  border-color: rgba(22, 131, 72, 0.2);
  background: #ecfdf3;
}

.status-factory-order,
.status-negotiating,
.status-phev,
.status-commercial {
  color: #8a4b05;
  border-color: rgba(217, 119, 6, 0.2);
  background: #fff7ed;
}

.status-disabled,
.status-sold,
.status-lost,
.status-invalid {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.2);
  background: #fff1f0;
}

.status-draft,
.status-new,
.status-contacted,
.status-quoted {
  color: #1f5f99;
  border-color: rgba(31, 95, 153, 0.2);
  background: #eef6ff;
}

.ai-maintenance-shell {
  display: grid;
  gap: 0;
}

.ai-maintenance-form {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.ai-maintenance-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.ai-maintenance-targets legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ai-maintenance-targets label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-maintenance-targets input {
  width: auto;
}

.ai-maintenance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-maintenance-result {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.ai-maintenance-summary {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfdff;
}

.ai-maintenance-summary strong {
  color: var(--ink);
}

.ai-maintenance-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.ai-maintenance-warnings {
  display: grid;
  gap: 8px;
}

.ai-maintenance-warnings span {
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  color: #8a4b05;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 750;
}

.ai-maintenance-json {
  max-width: 620px;
  max-height: 220px;
  margin: 7px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(420px, calc(100% - 36px));
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  background: #1f2933;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .admin-app {
    grid-template-columns: 1fr;
  }

  .admin-app.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar-toggle {
    display: none;
  }

  .brand-row.compact {
    margin-bottom: 14px;
  }

  .admin-app.sidebar-collapsed .sidebar {
    padding: 18px 14px;
  }

  .admin-app.sidebar-collapsed .brand-row.compact {
    justify-content: flex-start;
    margin-bottom: 14px;
    padding-bottom: 18px;
  }

  .admin-app.sidebar-collapsed .sidebar .brand-row div {
    display: block;
  }

  .admin-app.sidebar-collapsed .sidebar-brand-full {
    display: block;
  }

  .admin-app.sidebar-collapsed .sidebar-brand-mark {
    display: none;
  }

  .side-nav {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  }

  .admin-app.sidebar-collapsed .side-nav button,
  .admin-app.sidebar-collapsed .sidebar [data-logout] {
    justify-content: flex-start;
    padding: 0 12px;
    color: var(--nav-muted);
    text-align: left;
  }

  .admin-app.sidebar-collapsed .side-nav button.active {
    color: #fff;
  }

  .admin-app.sidebar-collapsed .side-nav button::after,
  .admin-app.sidebar-collapsed .sidebar [data-logout]::after {
    content: none;
  }

  .admin-app.sidebar-collapsed .side-nav button > span:not(.nav-icon),
  .admin-app.sidebar-collapsed .nav-submenu-title > span:not(.nav-icon) {
    display: block;
  }

  .admin-app.sidebar-collapsed .nav-submenu-title {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .admin-app.sidebar-collapsed .nav-submenu-items {
    display: grid;
    padding-left: 18px;
  }

  .admin-app.sidebar-collapsed .side-nav-label,
  .admin-app.sidebar-collapsed .sidebar-account {
    display: grid;
  }

  .sidebar [data-logout] {
    margin-top: 14px;
  }

  .header-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .welcome-banner {
    flex-wrap: wrap;
  }

  .welcome-banner > div {
    flex: 1 1 150px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-insight-grid,
  .dashboard-bottom-grid,
  .lead-discovery-content,
  .lead-pool-utility-grid {
    grid-template-columns: 1fr;
  }

  .lead-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-hero {
    align-items: stretch;
  }

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

  .dashboard-inquiry-list {
    grid-template-columns: 1fr;
  }

  .inquiry-management-card {
    grid-template-columns: 1fr;
  }

  .product-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 901px) and (max-width: 1080px) {
  .admin-app {
    grid-template-columns: 216px minmax(0, 1fr);
  }

  .admin-app.sidebar-collapsed {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    height: 100vh;
  }

  .sidebar-toggle {
    display: grid;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .admin-app.sidebar-collapsed .sidebar {
    padding: 18px 10px;
  }

  .admin-app.sidebar-collapsed .brand-row.compact {
    justify-content: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .admin-app.sidebar-collapsed .sidebar .brand-row div,
  .admin-app.sidebar-collapsed .sidebar-brand-full,
  .admin-app.sidebar-collapsed .side-nav button > span:not(.nav-icon):not(.nav-subdot):not(.nav-chevron),
  .admin-app.sidebar-collapsed .nav-submenu-title > span:not(.nav-icon):not(.nav-chevron),
  .admin-app.sidebar-collapsed .nav-chevron,
  .admin-app.sidebar-collapsed .side-nav-label,
  .admin-app.sidebar-collapsed .sidebar-account {
    display: none;
  }

  .admin-app.sidebar-collapsed .sidebar-brand-mark {
    display: block;
  }

  .admin-app.sidebar-collapsed .side-nav button,
  .admin-app.sidebar-collapsed .sidebar [data-logout] {
    justify-content: center;
    padding: 0;
    text-align: center;
  }

  .admin-app.sidebar-collapsed .nav-submenu-title {
    justify-content: center;
    padding: 0;
  }

  .admin-app.sidebar-collapsed .nav-submenu-items {
    display: none;
    padding-left: 0;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 13px;
  }

  .workspace {
    padding: 16px;
  }

  .workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .welcome-banner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .welcome-banner > div:first-child {
    border-right: 0;
    padding-right: 0;
  }

  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
  }

  .dashboard-hero-copy h2 {
    font-size: 30px;
  }

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

  .dashboard-hero-status {
    min-width: 0;
  }

  .dashboard-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .inventory-health-summary {
    grid-template-columns: 1fr;
  }

  .inventory-score-card {
    grid-template-columns: 1fr;
  }

  .lead-discovery-grid,
  .lead-discovery-content,
  .lead-pool-utility-grid,
  .lead-manual-panel form {
    grid-template-columns: 1fr;
  }

  .lead-search-card {
    grid-template-columns: 1fr;
  }

  .lead-detail-panel {
    padding: 16px;
  }

  .lead-detail-header {
    display: grid;
  }

  .inquiry-card-head {
    display: grid;
  }

  .inquiry-management-card .status-select {
    min-width: 0;
  }

  .login-stage {
    grid-template-columns: 1fr;
    min-height: 0;
    width: min(540px, 100%);
    border-radius: 20px;
  }

  .login-visual {
    min-height: 220px;
    padding: 26px 24px 22px;
    align-content: start;
    gap: 22px;
  }

  .login-visual-copy h1 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .login-signal-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .login-signal-grid div {
    min-height: 64px;
    padding: 10px;
    border-radius: 12px;
  }

  .login-signal-grid strong {
    font-size: 15px;
  }

  .login-card {
    padding: 32px 24px 28px;
  }

  .login-card-brand {
    display: none;
  }

  .header-actions,
  .toolbar {
    justify-content: stretch;
  }

  .header-actions > *,
  .toolbar > * {
    flex: 1 1 auto;
  }

  .side-nav,
  .metric-grid,
  .dashboard-grid,
  .form-section-grid,
  .choice-grid,
  .permission-matrix fieldset,
  .image-field-row,
  .product-toolbar {
    grid-template-columns: 1fr;
  }

  .record-drawer-panel {
    width: 100vw;
  }

  .drawer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .primary-button,
  .secondary-button,
  .danger-button,
  .file-button,
  input,
  select,
  textarea {
    transition: none;
  }

  .aurora,
  .login-chip-dot,
  .login-stage,
  .login-submit,
  .login-submit svg {
    animation: none !important;
    transition: none !important;
  }
}
