:root {
  --navy-950: #0b1b2f;
  --navy-900: #10243e;
  --navy-800: #173352;
  --ink: #172234;
  --muted: #6f7c8f;
  --muted-2: #96a0ae;
  --line: #e4e8ee;
  --line-strong: #d5dbe4;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --surface-3: #eef2f5;
  --canvas: #f2f5f7;
  --coral: #df684c;
  --coral-dark: #bf4f37;
  --coral-soft: #fff1ed;
  --gold: #e9a337;
  --gold-soft: #fff7e7;
  --green: #248264;
  --green-soft: #eaf7f2;
  --red: #cf4b49;
  --red-soft: #fff0ef;
  --blue: #3675ba;
  --blue-soft: #ecf5ff;
  --shadow-sm: 0 1px 2px rgba(16, 36, 62, .05);
  --shadow-md: 0 12px 30px rgba(16, 36, 62, .08);
  --shadow-lg: 0 24px 70px rgba(16, 36, 62, .18);
  --radius: 16px;
  --sidebar: 236px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.quality-staff [data-route="receivables"],
.quality-staff [data-route="team"],
.quality-staff [data-route="audit"],
.quality-staff [data-owner-area] {
  display: none !important;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  color: var(--muted);
  background: var(--canvas);
  transition: opacity .3s ease;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: var(--navy-900);
}

.brand-mark span {
  position: absolute;
  border-radius: 99px;
  transform: rotate(-34deg);
}

.brand-mark span:nth-child(1) {
  left: 7px;
  bottom: 8px;
  width: 27px;
  height: 7px;
  background: var(--gold);
}

.brand-mark span:nth-child(2) {
  left: 17px;
  bottom: 17px;
  width: 17px;
  height: 6px;
  background: #f9c878;
}

.brand-mark span:nth-child(3) {
  right: 7px;
  top: 6px;
  width: 7px;
  height: 7px;
  background: var(--coral);
}

.brand-mark.large {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  animation: brandPulse 1.5s ease-in-out infinite;
}

.company-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 14px rgba(9, 27, 47, .12);
}

.company-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loading-logo {
  width: 224px;
  height: 118px;
  padding: 10px;
  border-radius: 18px;
  animation: brandPulse 1.5s ease-in-out infinite;
}

.auth-logo {
  width: 194px;
  height: 104px;
  padding: 9px;
  border-radius: 14px;
}

.sidebar-logo {
  width: 88px;
  height: 46px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 9px;
}

@keyframes brandPulse {
  50% { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(16, 36, 62, .2); }
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(460px, 1.08fr) minmax(420px, .92fr);
  background: var(--surface);
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 680px;
  padding: 42px 56px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 20%, rgba(227, 109, 77, .4), transparent 28%),
    radial-gradient(circle at 15% 86%, rgba(246, 164, 58, .16), transparent 38%),
    linear-gradient(145deg, #0d2137, #173c5a 72%, #154564);
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
}

.auth-visual::before {
  right: -180px;
  top: 80px;
  width: 540px;
  height: 540px;
}

.auth-visual::after {
  right: -65px;
  top: 195px;
  width: 310px;
  height: 310px;
}

.auth-brand,
.sidebar-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand strong,
.sidebar-brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: .04em;
}

.auth-brand small,
.sidebar-brand small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, .52);
  font-size: 9px;
  letter-spacing: .16em;
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 590px;
  margin: auto 0;
  padding: 60px 0 50px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f6b461;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.auth-copy h1 {
  margin: 22px 0;
  font-size: clamp(38px, 4.2vw, 62px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.045em;
}

.auth-copy p {
  max-width: 500px;
  margin: 0;
  color: rgba(255, 255, 255, .66);
  font-size: 15px;
  line-height: 1.9;
}

.auth-metrics {
  display: flex;
  gap: 38px;
  margin-top: 48px;
}

.auth-metrics div {
  display: grid;
  gap: 6px;
}

.auth-metrics strong {
  color: #fff;
  font-size: 18px;
}

.auth-metrics span {
  color: rgba(255, 255, 255, .48);
  font-size: 11px;
}

.auth-footer {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, .38);
  font-size: 11px;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 48px;
  background:
    linear-gradient(rgba(255, 255, 255, .94), rgba(255, 255, 255, .94)),
    linear-gradient(135deg, #fff, #edf2f5);
}

.auth-form-wrap {
  width: 100%;
  max-width: 380px;
}

.auth-form-wrap .auth-kicker {
  margin-bottom: 9px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.auth-form-wrap h2 {
  margin: 0 0 9px;
  font-size: 28px;
  letter-spacing: -.03em;
}

.auth-form-wrap > p {
  margin: 0 0 32px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form-wrap .field {
  margin-bottom: 18px;
}

.auth-form-wrap .btn-submit {
  width: 100%;
  margin-top: 8px;
  padding-block: 13px;
}

.auth-note {
  display: flex;
  gap: 9px;
  margin-top: 28px;
  padding: 13px 15px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1.65;
}

.auth-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--green);
}

.form-error {
  min-height: 20px;
  margin: -4px 0 10px;
  color: var(--red);
  font-size: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 23px 16px 15px;
  color: rgba(255, 255, 255, .66);
  background:
    radial-gradient(circle at 80% 0%, rgba(223, 104, 76, .12), transparent 32%),
    var(--navy-900);
}

.sidebar-brand {
  padding: 0 8px 28px;
}

.auth-brand {
  flex-wrap: wrap;
}

.sidebar-brand .brand-mark {
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-brand strong {
  font-size: 11px;
  letter-spacing: .01em;
  white-space: nowrap;
}

.sidebar-brand small {
  font-size: 8px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 43px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 13px;
  transition: .18s ease;
}

.nav-list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.nav-list a.active {
  color: #fff;
  background: rgba(255, 255, 255, .105);
  box-shadow: inset 3px 0 0 var(--gold);
}

.nav-list a svg {
  width: 18px;
  height: 18px;
  opacity: .8;
}

.nav-divider {
  height: 1px;
  margin: 12px 12px;
  background: rgba(255, 255, 255, .08);
}

.sidebar-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: auto 8px 14px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
}

.help-dot {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
  background: #58c997;
  box-shadow: 0 0 0 4px rgba(88, 201, 151, .1);
}

.sidebar-help strong,
.sidebar-help small {
  display: block;
}

.sidebar-help strong {
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 500;
}

.sidebar-help small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .35);
  font-size: 9px;
}

.user-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  color: #fff;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-align: left;
}

.user-card:hover {
  background: rgba(255, 255, 255, .06);
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--navy-900);
  border-radius: 10px;
  background: linear-gradient(145deg, #f9c46b, #e79932);
  font-size: 13px;
  font-weight: 700;
}

.user-copy {
  min-width: 0;
  flex: 1;
}

.user-copy strong,
.user-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  font-size: 12px;
  font-weight: 500;
}

.user-copy small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .37);
  font-size: 9px;
}

.user-card > svg {
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
  opacity: .45;
}

.user-popover {
  position: absolute;
  right: 15px;
  bottom: 66px;
  left: 15px;
  z-index: 50;
  padding: 6px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.user-popover a,
.user-popover button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px;
  color: var(--ink);
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  text-align: left;
}

.user-popover a:hover,
.user-popover button:hover {
  background: var(--surface-2);
}

.user-popover svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.main-column {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: 78px;
  padding: 12px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}

.topbar-title span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: .1em;
}

.topbar-title h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.025em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.global-search {
  position: relative;
  flex: 1 1 420px;
  max-width: 540px;
  margin-left: clamp(18px, 4vw, 62px);
}

.global-search .input {
  height: 40px;
  padding: 9px 45px 9px 38px;
  border-color: #d9e1e9;
  background: #f7f9fb;
}

.global-search .input:focus {
  border-color: #91a6ba;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(21, 65, 95, .07);
}

.global-search-icon {
  position: absolute;
  left: 13px;
  top: 12px;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  pointer-events: none;
}

.global-search kbd {
  position: absolute;
  right: 11px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font: 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  pointer-events: none;
}

.global-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  max-height: min(68vh, 620px);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .985);
  box-shadow: 0 22px 55px rgba(16, 36, 62, .17);
}

.global-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 10px;
  color: var(--muted);
}

.global-search-head span {
  color: var(--ink);
  font-weight: 650;
}

.global-search-head small {
  color: var(--muted-2);
  font-size: 9px;
}

.global-search-group + .global-search-group {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.global-search-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: .08em;
}

.global-search-group-title small {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  border-radius: 99px;
  background: var(--surface-2);
}

.global-search-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 15px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}

.global-search-item:hover,
.global-search-item:focus-visible {
  background: var(--surface-2);
}

.global-search-item > span:nth-child(2) {
  min-width: 0;
}

.global-search-item strong,
.global-search-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-item strong {
  font-size: 11px;
}

.global-search-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.global-search-item > svg {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.global-search-type {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--blue);
  border-radius: 8px;
  background: var(--blue-soft);
  font-size: 9px;
  font-weight: 650;
}

.global-search-type.invoice {
  color: var(--green);
  background: var(--green-soft);
}

.global-search-type.product {
  color: #a76c09;
  background: var(--gold-soft);
}

.global-search-type.quote {
  color: var(--coral);
  background: var(--red-soft);
}

.global-search-loading,
.global-search-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 15px;
  color: var(--muted);
}

.global-search-empty {
  align-items: flex-start;
  flex-wrap: wrap;
}

.global-search-empty svg {
  width: 18px;
  height: 18px;
}

.global-search-empty strong {
  flex: 1 1 180px;
  color: var(--ink);
}

.global-search-empty span {
  flex-basis: calc(100% - 30px);
  margin-left: 28px;
  margin-top: -7px;
  font-size: 9px;
}

.today-label {
  color: var(--muted);
  font-size: 11px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 36px;
  margin-right: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.mobile-menu span {
  width: 100%;
  height: 1px;
  background: var(--ink);
}

.content {
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: 28px 34px 60px;
  animation: contentIn .28s ease;
}

@keyframes contentIn {
  from { opacity: 0; transform: translateY(4px); }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-head h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.035em;
}

.page-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: .17s ease;
}

.btn:hover {
  border-color: #b7c1cd;
  background: #fbfcfd;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  color: #fff;
  border-color: var(--coral);
  background: var(--coral);
  box-shadow: 0 4px 12px rgba(223, 104, 76, .2);
}

.btn-primary:hover {
  border-color: var(--coral-dark);
  background: var(--coral-dark);
}

.btn-dark {
  color: #fff;
  border-color: var(--navy-900);
  background: var(--navy-900);
}

.btn-danger {
  color: var(--red);
  border-color: #f1cdcc;
  background: var(--red-soft);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.btn-compact {
  min-height: 34px;
  padding: 7px 12px;
}

.btn-icon {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(270px, .9fr) minmax(440px, 1.4fr);
  overflow: hidden;
  margin-bottom: 18px;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 94% 15%, rgba(234, 163, 55, .22), transparent 34%),
    linear-gradient(120deg, #10243e, #173b5a);
  box-shadow: 0 14px 35px rgba(16, 36, 62, .12);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -130px;
  width: 370px;
  height: 370px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.hero-main {
  position: relative;
  z-index: 1;
  padding: 25px 28px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
}

.hero-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5dd0a0;
}

.hero-value {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 12px;
}

.hero-value strong {
  font-size: 51px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.05em;
}

.hero-value span {
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
}

.hero-progress {
  width: 100%;
  height: 5px;
  margin-top: 19px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .12);
}

.hero-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #f8ca7d);
  transition: width .5s ease;
}

.hero-caption {
  margin-top: 10px;
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-left: 1px solid rgba(255, 255, 255, .09);
}

.hero-stat {
  display: grid;
  align-content: center;
  min-height: 92px;
  padding: 18px 25px;
  border-right: 1px solid rgba(255, 255, 255, .075);
  border-bottom: 1px solid rgba(255, 255, 255, .075);
}

.hero-stat:nth-child(2n) {
  border-right: 0;
}

.hero-stat:nth-last-child(-n+2) {
  border-bottom: 0;
}

.hero-stat span {
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
}

.hero-stat strong {
  margin-top: 5px;
  font-size: 22px;
  font-weight: 550;
}

.hero-stat small {
  margin-top: 4px;
  color: rgba(255, 255, 255, .38);
  font-size: 9px;
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.segmented button {
  padding: 6px 12px;
  color: var(--muted);
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 11px;
}

.segmented button.active {
  color: var(--ink);
  background: var(--surface-3);
  font-weight: 600;
}

.period-navigation {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 2px;
}

.period-navigation span {
  min-width: 126px;
  padding: 0 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.dashboard-toolbar .spacer {
  flex: 1;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  position: relative;
  display: grid;
  min-height: 119px;
  padding: 19px 20px;
  overflow: hidden;
}

.summary-card .summary-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  border-radius: 9px;
  background: var(--surface-2);
}

.summary-icon svg {
  width: 16px;
  height: 16px;
}

.summary-card > span {
  color: var(--muted);
  font-size: 11px;
}

.summary-card > strong {
  align-self: end;
  margin-top: 8px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -.035em;
}

.summary-card > small {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
}

.summary-card.alert > strong {
  color: var(--coral);
}

.summary-card.good .summary-icon {
  color: var(--green);
  background: var(--green-soft);
}

.summary-card.warn .summary-icon {
  color: var(--gold);
  background: var(--gold-soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, .9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 14px 19px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.panel-head .panel-action {
  margin-left: auto;
}

.panel-body {
  padding: 19px;
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 13px;
  height: 205px;
  padding: 10px 4px 0;
}

.trend-column {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: center;
  gap: 7px;
  height: 100%;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
}

.trend-bars i {
  display: block;
  width: min(16px, 35%);
  min-height: 3px;
  border-radius: 4px 4px 1px 1px;
  background: #ccd7e2;
  transition: height .4s ease;
}

.trend-bars i:last-child {
  background: var(--coral);
}

.trend-column strong {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.trend-column span {
  color: var(--muted-2);
  font-size: 8px;
}

.risk-list,
.task-list {
  display: grid;
  gap: 1px;
}

.risk-row,
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.risk-row:last-child,
.task-row:last-child {
  border-bottom: 0;
}

.risk-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px var(--red-soft);
}

.risk-indicator.medium {
  background: var(--gold);
  box-shadow: 0 0 0 5px var(--gold-soft);
}

.risk-copy,
.task-copy {
  min-width: 0;
  flex: 1;
}

.risk-copy strong,
.task-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-copy span,
.task-copy span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tiny-link {
  color: var(--coral);
  border: 0;
  background: transparent;
  font-size: 10px;
  white-space: nowrap;
}

.task-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--muted-2);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
}

.task-check:hover {
  color: var(--green);
  border-color: var(--green);
}

.team-panel .table-wrap {
  border: 0;
  border-radius: 0;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: var(--muted-2);
}

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

.empty-state p {
  max-width: 300px;
  margin: 7px 0 0;
  font-size: 10px;
  line-height: 1.7;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  position: relative;
  flex: 1 1 240px;
  max-width: 390px;
}

.search-field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transform: translateY(-50%);
}

.search-field input {
  width: 100%;
  padding-left: 37px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  font-size: 12px;
  transition: .16s ease;
}

.textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.65;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(223, 104, 76, .1);
}

.select {
  min-width: 110px;
  max-width: 190px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.panel .table-wrap {
  border: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th {
  height: 43px;
  padding: 0 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .03em;
  text-align: left;
  text-transform: uppercase;
}

td {
  height: 58px;
  padding: 9px 14px;
  border-bottom: 1px solid #edf0f3;
  font-size: 11px;
  vertical-align: middle;
}

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

tbody tr.clickable {
  cursor: pointer;
}

tbody tr.clickable:hover td {
  background: #fbfcfd;
}

.cell-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: var(--navy-800);
  border-radius: 8px;
  background: var(--surface-3);
  font-size: 10px;
  font-weight: 700;
}

.cell-main strong {
  display: block;
  max-width: 250px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.cell-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9px;
}

.muted {
  color: var(--muted);
}

.danger-text {
  color: var(--red);
}

.success-text {
  color: var(--green);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  padding: 3px 8px;
  color: var(--muted);
  border-radius: 99px;
  background: var(--surface-3);
  font-size: 9px;
  font-weight: 600;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge.green {
  color: var(--green);
  background: var(--green-soft);
}

.badge.yellow {
  color: #a76c09;
  background: var(--gold-soft);
}

.badge.red {
  color: var(--red);
  background: var(--red-soft);
}

.badge.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.gray {
  color: var(--muted);
  background: var(--surface-3);
}

.badge.no-dot::before {
  display: none;
}

.segment {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 700;
}

.segment.A {
  color: #9a5c00;
  background: var(--gold-soft);
}

.segment.B {
  color: var(--blue);
  background: var(--blue-soft);
}

.segment.C {
  color: var(--muted);
  background: var(--surface-3);
}

.pagination-note {
  padding: 13px 17px;
  color: var(--muted-2);
  font-size: 9px;
  text-align: right;
}

.customer-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px 24px;
  overflow: hidden;
}

.customer-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -100px;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 163, 55, .09), transparent 66%);
}

.customer-logo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  color: var(--navy-800);
  border-radius: 15px;
  background: linear-gradient(145deg, #f0f4f7, #e1e8ee);
  font-size: 18px;
  font-weight: 700;
}

.customer-head-main {
  min-width: 0;
  flex: 1;
}

.customer-head-main .back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.back-link svg {
  width: 13px;
  height: 13px;
}

.customer-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.customer-title-row h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -.03em;
}

.customer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 17px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.customer-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.customer-meta svg {
  width: 13px;
  height: 13px;
}

.customer-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
}

.detail-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 15px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.detail-tabs button {
  min-height: 35px;
  padding: 7px 15px;
  color: var(--muted);
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 11px;
  white-space: nowrap;
}

.detail-tabs button.active {
  color: var(--ink);
  background: var(--surface-3);
  font-weight: 600;
}

.detail-tabs button .count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 99px;
  background: #fff;
  font-size: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.info-item {
  min-height: 74px;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.info-item:nth-child(4n) {
  border-right: 0;
}

.info-item span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-2);
  font-size: 9px;
}

.info-item strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr);
  gap: 18px;
}

.contact-card,
.activity-card,
.quality-card,
.task-card,
.order-card {
  position: relative;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.contact-card + .contact-card,
.activity-card + .activity-card,
.quality-card + .quality-card,
.task-card + .task-card,
.order-card + .order-card {
  margin-top: 9px;
}

.contact-top,
.activity-top,
.quality-top,
.task-top,
.order-top {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.contact-top strong,
.activity-top strong,
.quality-top strong,
.order-top strong {
  font-size: 11px;
}

.contact-top small,
.activity-top small,
.quality-top small,
.order-top small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.contact-details,
.activity-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 17px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.activity-card {
  padding-left: 19px;
}

.activity-card::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 22px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.activity-summary {
  margin: 12px 0 0;
  color: #3b485b;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.next-action {
  display: flex;
  gap: 9px;
  margin-top: 11px;
  padding: 10px 11px;
  color: var(--navy-800);
  border-left: 2px solid var(--gold);
  border-radius: 0 7px 7px 0;
  background: var(--gold-soft);
  font-size: 10px;
  line-height: 1.5;
}

.next-action strong {
  font-weight: 600;
}

.section-list {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  min-height: 57px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.section-header h3 {
  margin: 0;
  font-size: 13px;
}

.section-header .btn {
  margin-left: auto;
}

.inline-empty {
  padding: 24px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.quality-card {
  border-left: 3px solid var(--gold);
}

.quality-card.high,
.quality-card.critical {
  border-left-color: var(--red);
}

.quality-card.low {
  border-left-color: var(--blue);
}

.quality-issue {
  margin-top: 11px;
  color: #384659;
  font-size: 11px;
  line-height: 1.65;
}

.quality-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.quality-step {
  padding: 8px;
  border-radius: 7px;
  background: var(--surface-2);
}

.quality-step span {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
}

.quality-step p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 9px;
  line-height: 1.5;
}

.deadline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.deadline svg {
  width: 12px;
  height: 12px;
}

.deadline.overdue {
  color: var(--red);
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.import-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 22px;
}

.import-card .import-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--coral);
  border-radius: 12px;
  background: var(--coral-soft);
}

.import-card h3 {
  margin: 17px 0 7px;
  font-size: 15px;
}

.import-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.import-card .import-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 155px;
  margin-top: 18px;
  padding: 20px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 10px;
  text-align: center;
  transition: .18s ease;
}

.drop-zone.dragging {
  color: var(--coral);
  border-color: var(--coral);
  background: var(--coral-soft);
}

.drop-zone svg {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
}

.drop-zone strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.import-result {
  margin-top: 18px;
}

.import-result-head {
  display: flex;
  gap: 14px;
  padding: 17px;
}

.result-number {
  display: grid;
  place-items: center;
  min-width: 88px;
  padding: 12px;
  border-radius: 9px;
  background: var(--green-soft);
  text-align: center;
}

.result-number strong {
  color: var(--green);
  font-size: 23px;
}

.result-number span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.import-errors {
  max-height: 280px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.import-error-row {
  display: flex;
  gap: 14px;
  padding: 10px 17px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.import-error-row span:first-child {
  color: var(--muted-2);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(360px, 1.15fr);
  gap: 18px;
}

.settings-card {
  padding: 22px;
}

.settings-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.settings-card > p {
  margin: 0 0 21px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.profile-large {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.profile-large .avatar {
  width: 51px;
  height: 51px;
  border-radius: 14px;
  font-size: 18px;
}

.profile-large strong {
  display: block;
  font-size: 15px;
}

.profile-large span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.settings-list {
  display: grid;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.settings-row span {
  color: var(--muted);
}

.settings-row strong {
  margin-left: auto;
  color: var(--ink);
  font-weight: 500;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 25, 43, .48);
  backdrop-filter: blur(3px);
  animation: fadeIn .18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(660px, 100%);
  max-height: calc(100vh - 40px);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}

.modal.wide {
  width: min(840px, 100%);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  padding: 21px 23px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  color: var(--muted);
  border: 0;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 20px;
  line-height: 1;
}

.modal-body {
  overflow: auto;
  padding: 20px 23px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 23px 18px;
  border-top: 1px solid var(--line);
}

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

.field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

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

.field > label {
  color: #4f5d70;
  font-size: 10px;
  font-weight: 600;
}

.field > label .required {
  color: var(--coral);
}

.field-hint {
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.5;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 11px;
}

.check-field input {
  width: 15px;
  height: 15px;
  accent-color: var(--coral);
}

.quality-assignee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.quality-assignee-grid > div > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
}

.quality-assignee-grid p {
  margin: 0;
  font-size: 10px;
}

.quality-assignee-options {
  display: grid;
  gap: 6px;
}

.quality-assignee-options .check-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--surface);
}

.quality-assignee-options .check-field small {
  grid-column: 2;
  color: var(--muted);
  font-size: 9px;
}

.quality-product-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.quality-product-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}

.quality-product-option input {
  margin-top: 2px;
  accent-color: var(--coral);
}

.quality-product-option strong,
.quality-product-option small {
  display: block;
}

.quality-product-option strong {
  font-size: 10px;
}

.quality-product-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  white-space: normal;
}

.quality-followup-box {
  padding: 14px;
  border: 1px solid #cfe0df;
  border-radius: 11px;
  background: #f4f8f7;
}

.quality-followup-box .btn {
  justify-self: start;
  margin-top: 4px;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
}

.field-inline .input {
  width: auto;
  min-width: 150px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  white-space: normal;
}

.table-actions .tiny-link {
  white-space: nowrap;
}

.form-separator {
  grid-column: 1 / -1;
  height: 1px;
  margin: 3px 0;
  background: var(--line);
}

.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: grid;
  gap: 9px;
  width: min(350px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  color: #fff;
  border-radius: 10px;
  background: var(--navy-900);
  box-shadow: var(--shadow-lg);
  font-size: 11px;
  line-height: 1.6;
  animation: toastIn .22s ease;
}

.toast.error {
  background: #a93a39;
}

.toast.success::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--navy-900);
  border-radius: 50%;
  background: #63d4a4;
  font-size: 10px;
  font-weight: 700;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(7px); }
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(8, 20, 34, .5);
}

.page-error {
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}

.page-error strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 25px 27px;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(225, 157, 55, .24), transparent 28%),
    linear-gradient(118deg, #10243e, #1b405d);
  box-shadow: 0 14px 34px rgba(16, 36, 62, .12);
}

.home-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -180px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero > div {
  position: relative;
  z-index: 1;
}

.home-hero .eyebrow {
  color: rgba(255, 255, 255, .55);
}

.home-hero h2 {
  margin: 6px 0 5px;
  color: #fff;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.home-hero p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  line-height: 1.7;
}

.home-hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.home-hero-links .btn {
  color: #fff;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
}

.home-hero-links .btn:hover {
  background: rgba(255, 255, 255, .15);
}

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

.home-kpi {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 15px;
  align-items: center;
  gap: 11px;
  min-height: 112px;
  padding: 17px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.home-kpi:hover {
  border-color: #c8d5e1;
  box-shadow: 0 10px 28px rgba(16, 36, 62, .09);
  transform: translateY(-2px);
}

.home-kpi:focus-visible {
  outline: 3px solid rgba(31, 104, 145, .2);
  outline-offset: 2px;
}

.home-kpi-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--blue);
  border-radius: 11px;
  background: var(--blue-soft);
}

.home-kpi-icon svg {
  width: 18px;
  height: 18px;
}

.home-kpi.danger .home-kpi-icon {
  color: var(--coral);
  background: var(--red-soft);
}

.home-kpi.warn .home-kpi-icon {
  color: #a76c09;
  background: var(--gold-soft);
}

.home-kpi.good .home-kpi-icon {
  color: var(--green);
  background: var(--green-soft);
}

.home-kpi-copy {
  min-width: 0;
}

.home-kpi-copy small,
.home-kpi-copy strong,
.home-kpi-copy em {
  display: block;
}

.home-kpi-copy small {
  color: var(--muted);
  font-size: 10px;
}

.home-kpi-copy strong {
  margin: 3px 0 2px;
  overflow: hidden;
  font-size: 27px;
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-kpi-copy strong.compact-value {
  font-size: 17px;
}

.home-kpi-copy em {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-kpi.danger .home-kpi-copy strong {
  color: var(--coral);
}

.home-kpi-arrow {
  color: var(--muted-2);
}

.home-kpi-arrow svg {
  width: 14px;
  height: 14px;
}

.home-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.home-preview .panel-head {
  min-height: 67px;
}

.home-preview .panel-head .tiny-link {
  padding: 4px 0;
}

.home-detail-list {
  display: grid;
}

.home-detail-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 53px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}

.home-detail-row:last-child {
  border-bottom: 0;
}

.home-row-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  border-radius: 8px;
  background: var(--surface-2);
}

.home-row-icon svg {
  width: 14px;
  height: 14px;
}

.home-detail-row > div {
  min-width: 0;
}

.home-detail-row strong,
.home-detail-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-detail-row > div strong {
  font-size: 10px;
}

.home-detail-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.home-footer-note {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 18px;
}

.home-footer-note > svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.home-footer-note > div {
  flex: 1;
}

.home-footer-note strong,
.home-footer-note span {
  display: block;
}

.home-footer-note strong {
  font-size: 10px;
}

.home-footer-note span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.home-detail-summary {
  display: grid;
  grid-template-columns: 30px auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 15px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.home-detail-summary svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.home-detail-summary strong {
  font-size: 18px;
}

.home-detail-summary span {
  color: var(--muted);
}

.home-detail-table {
  margin: 0 15px 15px;
  max-height: 56vh;
}

@media (max-width: 1180px) {
  :root { --sidebar: 218px; }
  .content { padding-inline: 25px; }
  .topbar { padding-inline: 25px; }
  .dashboard-hero { grid-template-columns: .8fr 1.2fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .page-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .home-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual {
    min-height: 340px;
    padding: 30px;
  }
  .auth-copy {
    padding: 45px 0 20px;
  }
  .auth-copy h1 {
    margin-block: 14px;
    font-size: 36px;
  }
  .auth-copy p,
  .auth-metrics,
  .auth-footer {
    display: none;
  }
  .auth-panel { padding: 34px 24px 50px; }
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 84vw);
    transform: translateX(-102%);
    transition: transform .22s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: flex; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .hero-stats { border-top: 1px solid rgba(255, 255, 255, .09); border-left: 0; }
  .hero-stat { min-height: 87px; }
  .topbar-actions .today-label { display: none; }
  .global-search { max-width: 370px; margin-left: 20px; }
  .home-hero { align-items: flex-start; flex-direction: column; }
  .home-hero-links { justify-content: flex-start; }
  .home-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-preview-grid { grid-template-columns: 1fr; }
  .customer-hero { flex-wrap: wrap; }
  .customer-actions { width: 100%; padding-left: 78px; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .info-item:nth-child(4n) { border-right: 1px solid var(--line); }
  .info-item:nth-child(2n) { border-right: 0; }
}

@media (max-width: 640px) {
  .topbar { min-height: 67px; padding: 9px 15px; }
  .topbar-title span { display: none; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { width: 34px; padding: 0; }
  .global-search { flex: 1; max-width: none; min-width: 0; margin-left: 10px; }
  .global-search .input { height: 36px; padding-right: 12px; font-size: 10px; }
  .global-search kbd { display: none; }
  .global-search-results { position: fixed; left: 12px; right: 12px; top: 62px; }
  .home-hero { padding: 21px 18px; }
  .home-hero h2 { font-size: 21px; }
  .home-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .home-kpi { grid-template-columns: 30px minmax(0, 1fr); min-height: 101px; padding: 13px; }
  .home-kpi-icon { width: 30px; height: 30px; }
  .home-kpi-icon svg { width: 14px; height: 14px; }
  .home-kpi-arrow { display: none; }
  .home-kpi-copy strong { font-size: 21px; }
  .home-kpi-copy strong.compact-value { font-size: 14px; }
  .home-kpi-copy em { display: none; }
  .home-detail-row { grid-template-columns: 28px minmax(0, 1fr); }
  .home-detail-row > :last-child { grid-column: 2; justify-self: start; }
  .content { padding: 18px 14px 45px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 16px; }
  .page-head h2 { font-size: 21px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .dashboard-toolbar { flex-wrap: wrap; }
  .dashboard-toolbar .spacer { display: none; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 9px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .summary-card { min-height: 105px; padding: 15px; }
  .summary-card > strong { font-size: 23px; }
  .summary-icon { width: 27px; height: 27px; }
  .quality-assignee-grid { grid-template-columns: 1fr; }
  .quality-product-options { grid-template-columns: 1fr; }
  .hero-main { padding: 21px; }
  .hero-value strong { font-size: 42px; }
  .hero-stat { padding: 14px 18px; }
  .hero-stat strong { font-size: 18px; }
  .trend-chart { gap: 7px; height: 170px; }
  .panel-body { padding: 14px; }
  .table-toolbar { padding: 12px; }
  .search-field { max-width: none; }
  .select { flex: 1; min-width: 0; max-width: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 17px 17px 0 0;
  }
  .modal-head { padding-inline: 18px; }
  .modal-body { padding: 17px 18px; }
  .modal-foot { padding-inline: 18px; }
  .page-grid { grid-template-columns: 1fr; }
  .customer-hero { padding: 17px; gap: 13px; }
  .customer-logo { width: 46px; height: 46px; border-radius: 12px; }
  .customer-title-row h2 { font-size: 19px; }
  .customer-actions { padding-left: 59px; }
  .customer-actions .btn { flex: 1; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .info-item { padding: 12px; }
  .quality-progress { grid-template-columns: 1fr; }
  .toast-root { right: 16px; bottom: 16px; }
}

.quote-form-section {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
}

.quote-form-section + .quote-form-section {
  margin-top: 14px;
}

.quote-form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.quote-form-title strong {
  color: var(--navy-900);
  font-size: 12px;
}

.quote-form-title span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 9px;
}

.quote-mode-picker {
  display: flex;
  gap: 9px;
}

.quote-mode-picker label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
  cursor: pointer;
}

.quote-mode-picker label:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.quote-mode-picker input {
  accent-color: var(--blue);
}

.quote-existing-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid #c9d9e8;
  border-radius: 9px;
  background: var(--blue-soft);
}

.quote-existing-chip svg {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.quote-existing-chip strong {
  font-size: 11px;
}

.quote-existing-chip span {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
}

.compact-input {
  min-width: 72px;
  min-height: 32px;
  height: 32px;
  padding: 6px 8px;
  font-size: 9px;
}

.product-lookup {
  position: relative;
}

.product-lookup .input {
  width: 100%;
}

.product-suggestions {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  width: min(420px, 78vw);
  max-height: 300px;
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.product-suggestions-floating {
  z-index: 10050;
}

.product-suggestion {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(140px, 1.2fr);
  gap: 3px 10px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.product-suggestion:hover {
  background: var(--surface-2);
}

.product-suggestion strong {
  font-size: 10px;
}

.product-suggestion span {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-suggestion small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 8px;
}

.product-suggestion-empty {
  padding: 9px 10px;
  color: var(--muted);
  font-size: 9px;
}

.quote-items-wrap {
  border-radius: 9px;
  overflow: auto;
}

.quote-items-table {
  min-width: 1050px;
}

.quote-items-table th,
.quote-items-table td {
  padding: 7px;
  vertical-align: middle;
}

.quote-items-table th {
  white-space: nowrap;
  font-size: 8px;
}

.quote-line-amount {
  min-width: 72px;
  color: var(--navy-900);
  font-size: 9px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.row-remove {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid #ead6d4;
  border-radius: 7px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 15px;
  cursor: pointer;
}

.row-remove:hover {
  border-color: var(--red);
}

.quote-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 13px;
  border-radius: 9px;
  background: var(--navy-900);
  color: #fff;
}

.quote-total-bar > label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
}

.quote-total-bar input {
  width: 105px;
  background: rgba(255, 255, 255, .95);
}

.quote-total-bar > div {
  display: flex;
  align-items: center;
  gap: 24px;
}

.quote-total-bar span {
  display: grid;
  gap: 2px;
  color: #aebed0;
  font-size: 8px;
  text-align: right;
}

.quote-total-bar strong {
  color: #fff;
  font-size: 14px;
}

.quote-total-bar span:last-child strong {
  color: #77ddae;
  font-size: 18px;
}

.quote-detail-top {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.quote-detail-top > div {
  display: grid;
  align-content: center;
  min-height: 102px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.quote-detail-top > div:last-child {
  border-right: 0;
}

.quote-detail-top span:first-child {
  color: var(--muted);
  font-size: 8px;
}

.quote-detail-top strong {
  margin: 5px 0;
  color: var(--navy-900);
  font-size: 18px;
}

.quote-detail-top small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.quote-detail-top .quote-detail-text {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-rejection {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 16px 0;
  padding: 12px 14px;
  border: 1px solid #f0cbc7;
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red);
}

.quote-rejection svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.quote-rejection div {
  display: grid;
  gap: 3px;
  font-size: 9px;
  line-height: 1.6;
}

.quote-response-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 14px 16px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.quote-response-panel > div {
  display: grid;
  gap: 5px;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
}

.quote-response-panel > div:last-of-type {
  border-right: 0;
}

.quote-response-panel span {
  color: var(--muted);
  font-size: 8px;
}

.quote-response-panel strong {
  font-size: 10px;
}

.quote-response-panel p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 13px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.quote-response-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.quote-response-summary .info-item {
  padding: 11px 13px;
}

.quote-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.quote-detail-meta .info-item {
  padding: 12px;
}

.quote-detail-items {
  max-height: 390px;
  margin: 0 16px 14px;
}

.quote-detail-items table {
  min-width: 880px;
}

.quote-detail-terms {
  display: flex;
  justify-content: flex-end;
  gap: 30px;
  margin: 0 16px 14px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.quote-detail-terms div {
  display: grid;
  gap: 3px;
  min-width: 100px;
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.quote-detail-terms strong {
  color: var(--ink);
  font-size: 12px;
}

.quote-detail-terms .total strong {
  color: var(--blue);
  font-size: 17px;
}

.quote-detail-notes {
  margin: 0 16px 14px;
  padding: 13px 15px;
  border-left: 3px solid var(--gold);
  border-radius: 0 9px 9px 0;
  background: var(--gold-soft);
}

.quote-detail-notes strong {
  font-size: 9px;
}

.quote-detail-notes p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.quote-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 16px 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.quote-timeline > div {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 3px 8px;
  padding-right: 12px;
}

.quote-timeline > div:not(:last-child)::after {
  position: absolute;
  top: 5px;
  right: 7px;
  left: 5px;
  height: 1px;
  background: var(--line);
  content: "";
}

.quote-timeline i {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border: 2px solid #b7c2ce;
  border-radius: 50%;
  background: #fff;
}

.quote-timeline .done i {
  border-color: var(--green);
  background: var(--green);
}

.quote-timeline .rejected i {
  border-color: var(--red);
  background: var(--red);
}

.quote-timeline strong {
  font-size: 9px;
}

.quote-timeline span {
  grid-column: 2;
  color: var(--muted);
  font-size: 8px;
}

.quote-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.quote-review-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.quote-review-summary > div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quote-review-summary > div:nth-child(2n) {
  border-right: 0;
}

.quote-review-summary > div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.quote-review-tip {
  margin-top: 13px;
  padding: 11px 13px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #3f566e;
  font-size: 9px;
  line-height: 1.7;
}

.quote-send-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.quote-send-grid > div {
  display: grid;
  gap: 5px;
  min-height: 75px;
  padding: 13px;
  border-right: 1px solid var(--line);
}

.quote-send-grid > div:last-child {
  border-right: 0;
}

.quote-send-grid span {
  color: var(--muted);
  font-size: 8px;
}

.quote-send-grid strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 10px;
}

.quote-send-steps {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.quote-send-steps > div {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.quote-send-steps b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy-900);
  color: #fff;
  font-size: 9px;
}

.quote-send-steps span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .quote-detail-top,
  .quote-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-detail-top > div:nth-child(2n) {
    border-right: 0;
  }
  .quote-timeline {
    gap: 14px;
  }
  .quote-response-panel {
    grid-template-columns: 1fr;
  }
  .quote-response-panel > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .quote-send-grid {
    grid-template-columns: 1fr;
  }
  .quote-send-grid > div {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .quote-send-grid > div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .quote-form-section {
    padding: 12px;
  }
  .quote-form-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .quote-mode-picker {
    flex-direction: column;
  }
  .quote-total-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .quote-total-bar > label {
    justify-content: space-between;
  }
  .quote-total-bar > div {
    justify-content: space-between;
  }
  .quote-detail-top,
  .quote-detail-meta {
    grid-template-columns: 1fr;
  }
  .quote-detail-top > div {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .quote-detail-top > div:last-child {
    border-bottom: 0;
  }
  .quote-timeline {
    grid-template-columns: 1fr;
  }
  .quote-timeline > div {
    min-height: 42px;
  }
  .quote-timeline > div:not(:last-child)::after {
    top: 13px;
    right: auto;
    bottom: -8px;
    left: 4px;
    width: 1px;
    height: auto;
  }
  .quote-detail-actions .btn {
    flex: 1;
  }
  .quote-send-steps > div {
    grid-template-columns: 27px 1fr;
  }
  .quote-send-steps .btn {
    grid-column: 2;
    justify-self: start;
  }
}

.annual-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 13px 16px;
  flex-wrap: wrap;
}

.annual-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.annual-toolbar .select {
  min-width: 105px;
}

.annual-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  padding: 11px 14px;
  border: 1px solid #f0cbc7;
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 9px;
}

.annual-alert.yellow {
  border-color: #ead9af;
  background: var(--gold-soft);
  color: #8b5f08;
}

.annual-alert svg {
  width: 16px;
  height: 16px;
}

.annual-summary-grid {
  margin-bottom: 14px;
}

.annual-home-card {
  margin-bottom: 14px;
  padding: 0;
  overflow: hidden;
}

.annual-home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.annual-home-head span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .08em;
}

.annual-home-head h3 {
  margin: 3px 0 0;
  font-size: 14px;
}

.annual-home-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
}

.annual-home-grid > div {
  display: grid;
  gap: 6px;
  min-height: 105px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.annual-home-grid > div:last-child {
  border-right: 0;
}

.annual-home-grid small {
  color: var(--muted);
  font-size: 8px;
}

.annual-home-grid strong {
  color: var(--navy-900);
  font-size: 20px;
}

.annual-home-grid span,
.annual-home-grid em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}

.annual-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecf2;
}

.annual-progress i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef6b51, #f2a15d);
  transition: width .35s ease;
}

.annual-rate {
  display: grid;
  gap: 5px;
  min-width: 95px;
}

.annual-rate strong {
  font-size: 11px;
}

.annual-actions {
  display: flex;
  gap: 9px;
  white-space: nowrap;
}

.annual-target-table td,
.annual-target-table th {
  vertical-align: middle;
}

.annual-month-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 260px;
  padding: 20px 18px 10px;
  border-bottom: 1px solid var(--line);
}

.annual-month-chart > div {
  display: flex;
  flex: 1;
  min-width: 30px;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.annual-month-chart span {
  max-width: 70px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annual-month-chart i {
  width: min(32px, 80%);
  min-height: 4px;
  border-radius: 5px 5px 1px 1px;
  background: linear-gradient(180deg, #f08b64, #e55c45);
}

.annual-month-chart strong {
  font-size: 8px;
}

.annual-month-chart small {
  min-height: 24px;
  color: var(--muted);
  font-size: 7px;
  text-align: center;
}

.annual-report-preview {
  max-height: 540px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: var(--ink);
  background: #fbfcfd;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 10px;
  line-height: 1.75;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .annual-home-grid {
    grid-template-columns: 1fr;
  }
  .annual-home-grid > div {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .annual-home-grid > div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .annual-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .annual-toolbar label {
    justify-content: space-between;
  }
  .annual-toolbar .spacer {
    display: none;
  }
  .annual-month-chart {
    gap: 3px;
    height: 220px;
    padding-inline: 9px;
  }
  .annual-month-chart span,
  .annual-month-chart small {
    display: none;
  }
}
